var TO=Object.defineProperty;var MO=(r,t,e)=>t in r?TO(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var j=(r,t,e)=>MO(r,typeof t!="symbol"?t+"":t,e);import{r as Wr,b as b0,g as CO}from"./react-vendor-CmFgShSM.js";/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License */function ah(r){return r+.5|0}const bn=(r,t,e)=>Math.max(Math.min(r,e),t);function El(r){return bn(ah(r*2.55),0,255)}function En(r){return bn(ah(r*255),0,255)}function Vi(r){return bn(ah(r/2.55)/100,0,1)}function ub(r){return bn(ah(r*100),0,100)}const gr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vy=[..."0123456789ABCDEF"],AO=r=>vy[r&15],DO=r=>vy[(r&240)>>4]+vy[r&15],Ph=r=>(r&240)>>4===(r&15),LO=r=>Ph(r.r)&&Ph(r.g)&&Ph(r.b)&&Ph(r.a);function IO(r){var t=r.length,e;return r[0]==="#"&&(t===4||t===5?e={r:255&gr[r[1]]*17,g:255&gr[r[2]]*17,b:255&gr[r[3]]*17,a:t===5?gr[r[4]]*17:255}:(t===7||t===9)&&(e={r:gr[r[1]]<<4|gr[r[2]],g:gr[r[3]]<<4|gr[r[4]],b:gr[r[5]]<<4|gr[r[6]],a:t===9?gr[r[7]]<<4|gr[r[8]]:255})),e}const PO=(r,t)=>r<255?t(r):"";function kO(r){var t=LO(r)?AO:DO;return r?"#"+t(r.r)+t(r.g)+t(r.b)+PO(r.a,t):void 0}const RO=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ID(r,t,e){const i=t*Math.min(e,1-e),n=(a,o=(a+r/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function EO(r,t,e){const i=(n,a=(n+r/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function OO(r,t,e){const i=ID(r,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function NO(r,t,e,i,n){return r===n?(t-e)/i+(t.5?h/(2-a-o):h/(a+o),l=NO(e,i,n,h,a),l=l*60+.5),[l|0,u||0,s]}function w0(r,t,e,i){return(Array.isArray(t)?r(t[0],t[1],t[2]):r(t,e,i)).map(En)}function T0(r,t,e){return w0(ID,r,t,e)}function BO(r,t,e){return w0(OO,r,t,e)}function zO(r,t,e){return w0(EO,r,t,e)}function PD(r){return(r%360+360)%360}function VO(r){const t=RO.exec(r);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?El(+t[5]):En(+t[5]));const n=PD(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=BO(n,a,o):t[1]==="hsv"?i=zO(n,a,o):i=T0(n,a,o),{r:i[0],g:i[1],b:i[2],a:e}}function FO(r,t){var e=S0(r);e[0]=PD(e[0]+t),e=T0(e),r.r=e[0],r.g=e[1],r.b=e[2]}function GO(r){if(!r)return;const t=S0(r),e=t[0],i=ub(t[1]),n=ub(t[2]);return r.a<255?`hsla(${e}, ${i}%, ${n}%, ${Vi(r.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const hb={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},cb={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function HO(){const r={},t=Object.keys(cb),e=Object.keys(hb);let i,n,a,o,s;for(i=0;i>16&255,a>>8&255,a&255]}return r}let kh;function WO(r){kh||(kh=HO(),kh.transparent=[0,0,0,0]);const t=kh[r.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const UO=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function YO(r){const t=UO.exec(r);let e=255,i,n,a;if(t){if(t[7]!==i){const o=+t[7];e=t[8]?El(o):bn(o*255,0,255)}return i=+t[1],n=+t[3],a=+t[5],i=255&(t[2]?El(i):bn(i,0,255)),n=255&(t[4]?El(n):bn(n,0,255)),a=255&(t[6]?El(a):bn(a,0,255)),{r:i,g:n,b:a,a:e}}}function $O(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${Vi(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}const Id=r=>r<=.0031308?r*12.92:Math.pow(r,1/2.4)*1.055-.055,Lo=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function XO(r,t,e){const i=Lo(Vi(r.r)),n=Lo(Vi(r.g)),a=Lo(Vi(r.b));return{r:En(Id(i+e*(Lo(Vi(t.r))-i))),g:En(Id(n+e*(Lo(Vi(t.g))-n))),b:En(Id(a+e*(Lo(Vi(t.b))-a))),a:r.a+e*(t.a-r.a)}}function Rh(r,t,e){if(r){let i=S0(r);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=T0(i),r.r=i[0],r.g=i[1],r.b=i[2]}}function kD(r,t){return r&&Object.assign(t||{},r)}function fb(r){var t={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(t={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(t.a=En(r[3]))):(t=kD(r,{r:0,g:0,b:0,a:1}),t.a=En(t.a)),t}function ZO(r){return r.charAt(0)==="r"?YO(r):VO(r)}class Su{constructor(t){if(t instanceof Su)return t;const e=typeof t;let i;e==="object"?i=fb(t):e==="string"&&(i=IO(t)||WO(t)||ZO(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=kD(this._rgb);return t&&(t.a=Vi(t.a)),t}set rgb(t){this._rgb=fb(t)}rgbString(){return this._valid?$O(this._rgb):void 0}hexString(){return this._valid?kO(this._rgb):void 0}hslString(){return this._valid?GO(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let a;const o=e===a?.5:e,s=2*o-1,l=i.a-n.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-u,i.r=255&u*i.r+a*n.r+.5,i.g=255&u*i.g+a*n.g+.5,i.b=255&u*i.b+a*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=XO(this._rgb,t._rgb,e)),this}clone(){return new Su(this.rgb)}alpha(t){return this._rgb.a=En(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=ah(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Rh(this._rgb,2,t),this}darken(t){return Rh(this._rgb,2,-t),this}saturate(t){return Rh(this._rgb,1,t),this}desaturate(t){return Rh(this._rgb,1,-t),this}rotate(t){return FO(this._rgb,t),this}}/*! * Chart.js v4.5.1 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */function Pi(){}const jO=(()=>{let r=0;return()=>r++})();function It(r){return r==null}function jt(r){if(Array.isArray&&Array.isArray(r))return!0;const t=Object.prototype.toString.call(r);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Rt(r){return r!==null&&Object.prototype.toString.call(r)==="[object Object]"}function ne(r){return(typeof r=="number"||r instanceof Number)&&isFinite(+r)}function ur(r,t){return ne(r)?r:t}function bt(r,t){return typeof r>"u"?t:r}const qO=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100:+r/t,RD=(r,t)=>typeof r=="string"&&r.endsWith("%")?parseFloat(r)/100*t:+r;function Zt(r,t,e){if(r&&typeof r.call=="function")return r.apply(e,t)}function Wt(r,t,e,i){let n,a,o;if(jt(r))for(a=r.length,n=0;nr,x:r=>r.x,y:r=>r.y};function QO(r){const t=r.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function tN(r){const t=QO(r);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Wn(r,t){return(vb[t]||(vb[t]=tN(t)))(r)}function M0(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Tu=r=>typeof r<"u",Un=r=>typeof r=="function",db=(r,t)=>{if(r.size!==t.size)return!1;for(const e of r)if(!t.has(e))return!1;return!0};function eN(r){return r.type==="mouseup"||r.type==="click"||r.type==="contextmenu"}const Nt=Math.PI,qt=2*Nt,rN=qt+Nt,wf=Number.POSITIVE_INFINITY,iN=Nt/180,se=Nt/2,na=Nt/4,pb=Nt*2/3,Sn=Math.log10,_i=Math.sign;function Ql(r,t,e){return Math.abs(r-t)n-a).pop(),t}function aN(r){return typeof r=="symbol"||typeof r=="object"&&r!==null&&!(Symbol.toPrimitive in r||"toString"in r||"valueOf"in r)}function _s(r){return!aN(r)&&!isNaN(parseFloat(r))&&isFinite(r)}function oN(r,t){const e=Math.round(r);return e-t<=r&&e+t>=r}function OD(r,t,e){let i,n,a;for(i=0,n=r.length;il&&u=Math.min(t,e)-i&&r<=Math.max(t,e)+i}function A0(r,t,e){e=e||(o=>r[o]1;)a=n+i>>1,e(a)?n=a:i=a;return{lo:n,hi:i}}const Gi=(r,t,e,i)=>A0(r,e,i?n=>{const a=r[n][t];return ar[n][t]A0(r,e,i=>r[i][t]>=e);function hN(r,t,e){let i=0,n=r.length;for(;ii&&r[n-1]>e;)n--;return i>0||n{const i="_onData"+M0(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(...a){const o=n.apply(this,a);return r._chartjs.listeners.forEach(s=>{typeof s[i]=="function"&&s[i](...a)}),o}})})}function mb(r,t){const e=r._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(BD.forEach(a=>{delete r[a]}),delete r._chartjs)}function zD(r){const t=new Set(r);return t.size===r.length?r:Array.from(t)}const VD=function(){return typeof window>"u"?function(r){return r()}:window.requestAnimationFrame}();function FD(r,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,VD.call(window,()=>{i=!1,r.apply(t,e)}))}}function fN(r,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(r,t,i)):r.apply(this,i),t}}const D0=r=>r==="start"?"left":r==="end"?"right":"center",Pe=(r,t,e)=>r==="start"?t:r==="end"?e:(t+e)/2,vN=(r,t,e,i)=>r===(i?"left":"right")?e:r==="center"?(t+e)/2:t;function GD(r,t,e){const i=t.length;let n=0,a=i;if(r._sorted){const{iScale:o,vScale:s,_parsed:l}=r,u=r.dataset&&r.dataset.options?r.dataset.options.spanGaps:null,h=o.axis,{min:c,max:f,minDefined:v,maxDefined:d}=o.getUserBounds();if(v){if(n=Math.min(Gi(l,h,c).lo,e?i:Gi(t,h,o.getPixelForValue(c)).lo),u){const p=l.slice(0,n+1).reverse().findIndex(g=>!It(g[s.axis]));n-=Math.max(0,p)}n=Se(n,0,i-1)}if(d){let p=Math.max(Gi(l,o.axis,f,!0).hi+1,e?0:Gi(t,h,o.getPixelForValue(f),!0).hi+1);if(u){const g=l.slice(p-1).findIndex(y=>!It(y[s.axis]));p+=Math.max(0,g)}a=Se(p,n,i)-n}else a=i-n}return{start:n,count:a}}function HD(r){const{xScale:t,yScale:e,_scaleRanges:i}=r,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return r._scaleRanges=n,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),a}const Eh=r=>r===0||r===1,_b=(r,t,e)=>-(Math.pow(2,10*(r-=1))*Math.sin((r-t)*qt/e)),xb=(r,t,e)=>Math.pow(2,-10*r)*Math.sin((r-t)*qt/e)+1,tu={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>-Math.cos(r*se)+1,easeOutSine:r=>Math.sin(r*se),easeInOutSine:r=>-.5*(Math.cos(Nt*r)-1),easeInExpo:r=>r===0?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>r===1?1:-Math.pow(2,-10*r)+1,easeInOutExpo:r=>Eh(r)?r:r<.5?.5*Math.pow(2,10*(r*2-1)):.5*(-Math.pow(2,-10*(r*2-1))+2),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>Eh(r)?r:_b(r,.075,.3),easeOutElastic:r=>Eh(r)?r:xb(r,.075,.3),easeInOutElastic(r){return Eh(r)?r:r<.5?.5*_b(r*2,.1125,.45):.5+.5*xb(r*2-1,.1125,.45)},easeInBack(r){return r*r*((1.70158+1)*r-1.70158)},easeOutBack(r){return(r-=1)*r*((1.70158+1)*r+1.70158)+1},easeInOutBack(r){let t=1.70158;return(r/=.5)<1?.5*(r*r*(((t*=1.525)+1)*r-t)):.5*((r-=2)*r*(((t*=1.525)+1)*r+t)+2)},easeInBounce:r=>1-tu.easeOutBounce(1-r),easeOutBounce(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},easeInOutBounce:r=>r<.5?tu.easeInBounce(r*2)*.5:tu.easeOutBounce(r*2-1)*.5+.5};function L0(r){if(r&&typeof r=="object"){const t=r.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function bb(r){return L0(r)?r:new Su(r)}function Pd(r){return L0(r)?r:new Su(r).saturate(.5).darken(.1).hexString()}const dN=["x","y","borderWidth","radius","tension"],pN=["color","borderColor","backgroundColor"];function gN(r){r.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),r.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),r.set("animations",{colors:{type:"color",properties:pN},numbers:{type:"number",properties:dN}}),r.describe("animations",{_fallback:"animation"}),r.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function yN(r){r.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Sb=new Map;function mN(r,t){t=t||{};const e=r+JSON.stringify(t);let i=Sb.get(e);return i||(i=new Intl.NumberFormat(r,t),Sb.set(e,i)),i}function oh(r,t,e){return mN(t,e).format(r)}const WD={values(r){return jt(r)?r:""+r},numeric(r,t,e){if(r===0)return"0";const i=this.chart.options.locale;let n,a=r;if(e.length>1){const u=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(u<1e-4||u>1e15)&&(n="scientific"),a=_N(r,e)}const o=Sn(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),oh(r,i,l)},logarithmic(r,t,e){if(r===0)return"0";const i=e[t].significand||r/Math.pow(10,Math.floor(Sn(r)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?WD.numeric.call(this,r,t,e):""}};function _N(r,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&r!==Math.floor(r)&&(e=r-Math.floor(r)),e}var Dv={formatters:WD};function xN(r){r.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Dv.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),r.route("scale.ticks","color","","color"),r.route("scale.grid","color","","borderColor"),r.route("scale.border","color","","borderColor"),r.route("scale.title","color","","color"),r.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),r.describe("scales",{_fallback:"scale"}),r.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const lo=Object.create(null),py=Object.create(null);function eu(r,t){if(!t)return r;const e=t.split(".");for(let i=0,n=e.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,n)=>Pd(n.backgroundColor),this.hoverBorderColor=(i,n)=>Pd(n.borderColor),this.hoverColor=(i,n)=>Pd(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return kd(this,t,e)}get(t){return eu(this,t)}describe(t,e){return kd(py,t,e)}override(t,e){return kd(lo,t,e)}route(t,e,i,n){const a=eu(this,t),o=eu(this,i),s="_"+e;Object.defineProperties(a,{[s]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[s],u=o[n];return Rt(l)?Object.assign({},u,l):bt(l,u)},set(l){this[s]=l}}})}apply(t){t.forEach(e=>e(this))}}var Jt=new bN({_scriptable:r=>!r.startsWith("on"),_indexable:r=>r!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[gN,yN,xN]);function SN(r){return!r||It(r.size)||It(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}function Tf(r,t,e,i,n){let a=t[n];return a||(a=t[n]=r.measureText(n).width,e.push(n)),a>i&&(i=a),i}function wN(r,t,e,i){i=i||{};let n=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},a=i.garbageCollect=[],i.font=t),r.save(),r.font=t;let o=0;const s=e.length;let l,u,h,c,f;for(l=0;le.length){for(l=0;l0&&r.stroke()}}function Hi(r,t,e){return e=e||.5,!t||r&&r.x>t.left-e&&r.xt.top-e&&r.y0&&a.strokeColor!=="";let l,u;for(r.save(),r.font=n.string,CN(r,a),l=0;l+r||0;function I0(r,t){const e={},i=Rt(t),n=i?Object.keys(t):t,a=Rt(r)?i?o=>bt(r[o],r[t[o]]):o=>r[o]:()=>r;for(const o of n)e[o]=kN(a(o));return e}function YD(r){return I0(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Ja(r){return I0(r,["topLeft","topRight","bottomLeft","bottomRight"])}function ze(r){const t=YD(r);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function de(r,t){r=r||{},t=t||Jt.font;let e=bt(r.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=bt(r.style,t.style);i&&!(""+i).match(IN)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:bt(r.family,t.family),lineHeight:PN(bt(r.lineHeight,t.lineHeight),e),size:e,style:i,weight:bt(r.weight,t.weight),string:""};return n.string=SN(n),n}function Ol(r,t,e,i){let n,a,o;for(n=0,a=r.length;ne&&s===0?0:s+l;return{min:o(i,-Math.abs(a)),max:o(n,a)}}function Kn(r,t){return Object.assign(Object.create(r),t)}function P0(r,t=[""],e,i,n=()=>r[0]){const a=e||r;typeof i>"u"&&(i=jD("_fallback",r));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:a,_fallback:i,_getTarget:n,override:s=>P0([s,...r],t,a,i)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete r[0][l],!0},get(s,l){return XD(s,l,()=>GN(l,t,r,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(r[0])},has(s,l){return Mb(s).includes(l)},ownKeys(s){return Mb(s)},set(s,l,u){const h=s._storage||(s._storage=n());return s[l]=h[l]=u,delete s._keys,!0}})}function xs(r,t,e,i){const n={_cacheable:!1,_proxy:r,_context:t,_subProxy:e,_stack:new Set,_descriptors:$D(r,i),setContext:a=>xs(r,a,e,i),override:a=>xs(r.override(a),t,e,i)};return new Proxy(n,{deleteProperty(a,o){return delete a[o],delete r[o],!0},get(a,o,s){return XD(a,o,()=>ON(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(r,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,o)},getPrototypeOf(){return Reflect.getPrototypeOf(r)},has(a,o){return Reflect.has(r,o)},ownKeys(){return Reflect.ownKeys(r)},set(a,o,s){return r[o]=s,delete a[o],!0}})}function $D(r,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=r;return{allKeys:n,scriptable:e,indexable:i,isScriptable:Un(e)?e:()=>e,isIndexable:Un(i)?i:()=>i}}const EN=(r,t)=>r?r+M0(t):t,k0=(r,t)=>Rt(t)&&r!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function XD(r,t,e){if(Object.prototype.hasOwnProperty.call(r,t)||t==="constructor")return r[t];const i=e();return r[t]=i,i}function ON(r,t,e){const{_proxy:i,_context:n,_subProxy:a,_descriptors:o}=r;let s=i[t];return Un(s)&&o.isScriptable(t)&&(s=NN(t,s,r,e)),jt(s)&&s.length&&(s=BN(t,s,r,o.isIndexable)),k0(t,s)&&(s=xs(s,n,a&&a[t],o)),s}function NN(r,t,e,i){const{_proxy:n,_context:a,_subProxy:o,_stack:s}=e;if(s.has(r))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+r);s.add(r);let l=t(a,o||i);return s.delete(r),k0(r,l)&&(l=R0(n._scopes,n,r,l)),l}function BN(r,t,e,i){const{_proxy:n,_context:a,_subProxy:o,_descriptors:s}=e;if(typeof a.index<"u"&&i(r))return t[a.index%t.length];if(Rt(t[0])){const l=t,u=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const c=R0(u,n,r,h);t.push(xs(c,a,o&&o[r],s))}}return t}function ZD(r,t,e){return Un(r)?r(t,e):r}const zN=(r,t)=>r===!0?t:typeof r=="string"?Wn(t,r):void 0;function VN(r,t,e,i,n){for(const a of t){const o=zN(e,a);if(o){r.add(o);const s=ZD(o._fallback,e,n);if(typeof s<"u"&&s!==e&&s!==i)return s}else if(o===!1&&typeof i<"u"&&e!==i)return null}return!1}function R0(r,t,e,i){const n=t._rootScopes,a=ZD(t._fallback,e,i),o=[...r,...n],s=new Set;s.add(i);let l=Tb(s,o,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=Tb(s,o,a,l,i),l===null)?!1:P0(Array.from(s),[""],n,a,()=>FN(t,e,i))}function Tb(r,t,e,i,n){for(;e;)e=VN(r,t,e,i,n);return e}function FN(r,t,e){const i=r._getTarget();t in i||(i[t]={});const n=i[t];return jt(n)&&Rt(e)?e:n||{}}function GN(r,t,e,i){let n;for(const a of t)if(n=jD(EN(a,r),e),typeof n<"u")return k0(r,n)?R0(e,i,r,n):n}function jD(r,t){for(const e of t){if(!e)continue;const i=e[r];if(typeof i<"u")return i}}function Mb(r){let t=r._keys;return t||(t=r._keys=HN(r._scopes)),t}function HN(r){const t=new Set;for(const e of r)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function qD(r,t,e,i){const{iScale:n}=r,{key:a="r"}=this._parsing,o=new Array(i);let s,l,u,h;for(s=0,l=i;str==="x"?"y":"x";function UN(r,t,e,i){const n=r.skip?t:r,a=t,o=e.skip?t:e,s=dy(a,n),l=dy(o,a);let u=s/(s+l),h=l/(s+l);u=isNaN(u)?0:u,h=isNaN(h)?0:h;const c=i*u,f=i*h;return{previous:{x:a.x-c*(o.x-n.x),y:a.y-c*(o.y-n.y)},next:{x:a.x+f*(o.x-n.x),y:a.y+f*(o.y-n.y)}}}function YN(r,t,e){const i=r.length;let n,a,o,s,l,u=bs(r,0);for(let h=0;h!u.skip)),t.cubicInterpolationMode==="monotone")XN(r,n);else{let u=i?r[r.length-1]:r[0];for(a=0,o=r.length;ar.ownerDocument.defaultView.getComputedStyle(r,null);function qN(r,t){return Pv(r).getPropertyValue(t)}const KN=["top","right","bottom","left"];function Qa(r,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const a=KN[n];i[a]=parseFloat(r[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const JN=(r,t,e)=>(r>0||t>0)&&(!e||!e.shadowRoot);function QN(r,t){const e=r.touches,i=e&&e.length?e[0]:r,{offsetX:n,offsetY:a}=i;let o=!1,s,l;if(JN(n,a,r.target))s=n,l=a;else{const u=t.getBoundingClientRect();s=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function ka(r,t){if("native"in r)return r;const{canvas:e,currentDevicePixelRatio:i}=t,n=Pv(e),a=n.boxSizing==="border-box",o=Qa(n,"padding"),s=Qa(n,"border","width"),{x:l,y:u,box:h}=QN(r,e),c=o.left+(h&&s.left),f=o.top+(h&&s.top);let{width:v,height:d}=t;return a&&(v-=o.width+s.width,d-=o.height+s.height),{x:Math.round((l-c)/v*e.width/i),y:Math.round((u-f)/d*e.height/i)}}function tB(r,t,e){let i,n;if(t===void 0||e===void 0){const a=r&&O0(r);if(!a)t=r.clientWidth,e=r.clientHeight;else{const o=a.getBoundingClientRect(),s=Pv(a),l=Qa(s,"border","width"),u=Qa(s,"padding");t=o.width-u.width-l.width,e=o.height-u.height-l.height,i=Mf(s.maxWidth,a,"clientWidth"),n=Mf(s.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||wf,maxHeight:n||wf}}const wn=r=>Math.round(r*10)/10;function eB(r,t,e,i){const n=Pv(r),a=Qa(n,"margin"),o=Mf(n.maxWidth,r,"clientWidth")||wf,s=Mf(n.maxHeight,r,"clientHeight")||wf,l=tB(r,t,e);let{width:u,height:h}=l;if(n.boxSizing==="content-box"){const f=Qa(n,"border","width"),v=Qa(n,"padding");u-=v.width+f.width,h-=v.height+f.height}return u=Math.max(0,u-a.width),h=Math.max(0,i?u/i:h-a.height),u=wn(Math.min(u,o,l.maxWidth)),h=wn(Math.min(h,s,l.maxHeight)),u&&!h&&(h=wn(u/2)),(t!==void 0||e!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,u=wn(Math.floor(h*i))),{width:u,height:h}}function Cb(r,t,e){const i=t||1,n=wn(r.height*i),a=wn(r.width*i);r.height=wn(r.height),r.width=wn(r.width);const o=r.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${r.height}px`,o.style.width=`${r.width}px`),r.currentDevicePixelRatio!==i||o.height!==n||o.width!==a?(r.currentDevicePixelRatio=i,o.height=n,o.width=a,r.ctx.setTransform(i,0,0,i,0,0),!0):!1}const rB=function(){let r=!1;try{const t={get passive(){return r=!0,!1}};E0()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return r}();function Ab(r,t){const e=qN(r,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ra(r,t,e,i){return{x:r.x+e*(t.x-r.x),y:r.y+e*(t.y-r.y)}}function iB(r,t,e,i){return{x:r.x+e*(t.x-r.x),y:i==="middle"?e<.5?r.y:t.y:i==="after"?e<1?r.y:t.y:e>0?t.y:r.y}}function nB(r,t,e,i){const n={x:r.cp2x,y:r.cp2y},a={x:t.cp1x,y:t.cp1y},o=Ra(r,n,e),s=Ra(n,a,e),l=Ra(a,t,e),u=Ra(o,s,e),h=Ra(s,l,e);return Ra(u,h,e)}const aB=function(r,t){return{x(e){return r+r+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},oB=function(){return{x(r){return r},setWidth(r){},textAlign(r){return r},xPlus(r,t){return r+t},leftForLtr(r,t){return r}}};function us(r,t,e){return r?aB(t,e):oB()}function JD(r,t){let e,i;(t==="ltr"||t==="rtl")&&(e=r.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),r.prevTextDirection=i)}function QD(r,t){t!==void 0&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",t[0],t[1]))}function tL(r){return r==="angle"?{between:Mu,compare:sN,normalize:Ee}:{between:Fi,compare:(t,e)=>t-e,normalize:t=>t}}function Db({start:r,end:t,count:e,loop:i,style:n}){return{start:r%e,end:t%e,loop:i&&(t-r+1)%e===0,style:n}}function sB(r,t,e){const{property:i,start:n,end:a}=e,{between:o,normalize:s}=tL(i),l=t.length;let{start:u,end:h,loop:c}=r,f,v;if(c){for(u+=l,h+=l,f=0,v=l;fl(n,_,y)&&s(n,_)!==0,b=()=>s(a,y)===0||l(a,_,y),S=()=>p||x(),w=()=>!p||b();for(let T=h,M=h;T<=c;++T)m=t[T%o],!m.skip&&(y=u(m[i]),y!==_&&(p=l(y,n,a),g===null&&S()&&(g=s(y,n)===0?T:M),g!==null&&w()&&(d.push(Db({start:g,end:T,loop:f,count:o,style:v})),g=null),M=T,_=y));return g!==null&&d.push(Db({start:g,end:c,loop:f,count:o,style:v})),d}function rL(r,t){const e=[],i=r.segments;for(let n=0;nn&&r[a%t].skip;)a--;return a%=t,{start:n,end:a}}function uB(r,t,e,i){const n=r.length,a=[];let o=t,s=r[t],l;for(l=t+1;l<=e;++l){const u=r[l%n];u.skip||u.stop?s.skip||(i=!1,a.push({start:t%n,end:(l-1)%n,loop:i}),t=o=u.stop?l:null):(o=l,s.skip&&(t=l)),s=u}return o!==null&&a.push({start:t%n,end:o%n,loop:i}),a}function hB(r,t){const e=r.points,i=r.options.spanGaps,n=e.length;if(!n)return[];const a=!!r._loop,{start:o,end:s}=lB(e,n,a,i);if(i===!0)return Lb(r,[{start:o,end:s,loop:a}],e,t);const l=ss({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=VD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const a=i.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};var Oi=new dB;const Pb="transparent",pB={boolean(r,t,e){return e>.5?t:r},color(r,t,e){const i=bb(r||Pb),n=i.valid&&bb(t||Pb);return n&&n.valid?n.mix(i,e).hexString():t},number(r,t,e){return r+(t-r)*e}};let gB=class{constructor(t,e,i,n){const a=e[i];n=Ol([t.to,n,a,t.from]);const o=Ol([t.from,a,n]);this._active=!0,this._fn=t.fn||pB[t.type||typeof o],this._easing=tu[t.easing]||tu.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],a=i-this._start,o=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Ol([t.to,e,n,t.from]),this._from=Ol([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n{const a=t[n];if(!Rt(a))return;const o={};for(const s of e)o[s]=a[s];(jt(a.properties)&&a.properties||[n]).forEach(s=>{(s===n||!i.has(s))&&i.set(s,o)})})}_animateOptions(t,e){const i=e.options,n=mB(t,i);if(!n)return[];const a=this._createAnimations(n,i);return i.$shared&&yB(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,n=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[u];let c=a[u];const f=i.get(u);if(c)if(f&&c.active()){c.update(f,h,s);continue}else c.cancel();if(!f||!f.duration){t[u]=h;continue}a[u]=c=new gB(f,t,u,h),n.push(c)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return Oi.add(this._chart,i),!0}}function yB(r,t){const e=[],i=Object.keys(t);for(let n=0;n0||!e&&a<0)return n.index}return null}function Ob(r,t){const{chart:e,_cachedMeta:i}=r,n=e._stacks||(e._stacks={}),{iScale:a,vScale:o,index:s}=i,l=a.axis,u=o.axis,h=SB(a,o,i),c=t.length;let f;for(let v=0;ve[i].axis===t).shift()}function MB(r,t){return Kn(r,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function CB(r,t,e){return Kn(r,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function tl(r,t){const e=r.controller.index,i=r.vScale&&r.vScale.axis;if(i){t=t||r._parsed;for(const n of t){const a=n._stacks;if(!a||a[i]===void 0||a[i][e]===void 0)return;delete a[i][e],a[i]._visualValues!==void 0&&a[i]._visualValues[e]!==void 0&&delete a[i]._visualValues[e]}}}const Od=r=>r==="reset"||r==="none",Nb=(r,t)=>t?r:Object.assign({},r),AB=(r,t,e)=>r&&!t.hidden&&t._stacked&&{keys:aL(e,!0),values:null};class Zr{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Rd(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&tl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(c,f,v,d)=>c==="x"?f:c==="r"?d:v,a=e.xAxisID=bt(i.xAxisID,Ed(t,"x")),o=e.yAxisID=bt(i.yAxisID,Ed(t,"y")),s=e.rAxisID=bt(i.rAxisID,Ed(t,"r")),l=e.indexAxis,u=e.iAxisID=n(l,a,o,s),h=e.vAxisID=n(l,o,a,s);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mb(this._data,this),t._stacked&&tl(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Rt(e)){const n=this._cachedMeta;this._data=bB(e,n)}else if(i!==e){if(i){mb(i,this);const n=this._cachedMeta;tl(n),n._parsed=[]}e&&Object.isExtensible(e)&&cN(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const a=e._stacked;e._stacked=Rd(e.vScale,e),e.stack!==i.stack&&(n=!0,tl(e),e.stack=i.stack),this._resyncElements(t),(n||a!==e._stacked)&&(Ob(this,e._parsed),e._stacked=Rd(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:a,_stacked:o}=i,s=a.axis;let l=t===0&&e===n.length?!0:i._sorted,u=t>0&&i._parsed[t-1],h,c,f;if(this._parsing===!1)i._parsed=n,i._sorted=!0,f=n;else{jt(n[t])?f=this.parseArrayData(i,n,t,e):Rt(n[t])?f=this.parseObjectData(i,n,t,e):f=this.parsePrimitiveData(i,n,t,e);const v=()=>c[s]===null||u&&c[s]p||c=0;--f)if(!d()){this.updateRangeFromParsed(u,t,v,l);break}}return u}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,a,o;for(n=0,a=e.length;n=0&&tthis.getContext(i,n,e),p=u.resolveNamedOptions(f,v,d,c);return p.$shared&&(p.$shared=l,a[o]=Object.freeze(Nb(p,l))),p}_resolveAnimations(t,e,i){const n=this.chart,a=this._cachedDataOpts,o=`animation-${e}`,s=a[o];if(s)return s;let l;if(n.options.animation!==!1){const h=this.chart.config,c=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),c);l=h.createResolver(f,this.getContext(t,i,e))}const u=new nL(n,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Od(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(e,a)||a!==n;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:o}}updateElement(t,e,i,n){Od(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Od(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const a=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const n=i.length,a=e.length,o=Math.min(a,n);o&&this.parse(0,o),a>n?this._insertElements(n,a-n,t):a{for(u.length+=e,s=u.length-1;s>=o;s--)u[s]=u[s-e]};for(l(a),s=t;sn-a))}return r._cache.$bar}function LB(r){const t=r.iScale,e=DB(t,r.type);let i=t._length,n,a,o,s;const l=()=>{o===32767||o===-32768||(Tu(s)&&(i=Math.min(i,Math.abs(o-s)||i)),s=o)};for(n=0,a=e.length;n0?n[r-1]:null,s=rMath.abs(s)&&(l=s,u=o),t[e.axis]=u,t._custom={barStart:l,barEnd:u,start:n,end:a,min:o,max:s}}function oL(r,t,e,i){return jt(r)?kB(r,t,e,i):t[e.axis]=e.parse(r,i),t}function Bb(r,t,e,i){const n=r.iScale,a=r.vScale,o=n.getLabels(),s=n===a,l=[];let u,h,c,f;for(u=e,h=e+i;u=e?1:-1)}function EB(r){let t,e,i,n,a;return r.horizontal?(t=r.base>r.x,e="left",i="right"):(t=r.baseh.controller.options.grouped),a=i.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(e),l=s&&s[i.axis],u=h=>{const c=h._parsed.find(v=>v[i.axis]===l),f=c&&c[h.vScale.axis];if(It(f)||isNaN(f))return!0};for(const h of n)if(!(e!==void 0&&u(h))&&((a===!1||o.indexOf(h.stack)===-1||a===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[bt(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),a=e!==void 0?n.indexOf(e):-1;return a===-1?n.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let a,o;for(a=0,o=e.data.length;a=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:a}=e,o=this.getParsed(t),s=n.getLabelForValue(o.x),l=a.getLabelForValue(o.y),u=o._custom;return{label:i[t]||"",value:"("+s+", "+l+(u?", "+u:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const a=n==="reset",{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,n),h=o.axis,c=s.axis;for(let f=e;fMu(_,s,l,!0)?1:Math.max(x,x*e,b,b*e),d=(_,x,b)=>Mu(_,s,l,!0)?-1:Math.min(x,x*e,b,b*e),p=v(0,u,c),g=v(se,h,f),y=d(Nt,u,c),m=d(Nt+se,h,f);i=(p-y)/2,n=(g-m)/2,a=-(p+y)/2,o=-(g+m)/2}return{ratioX:i,ratioY:n,offsetX:a,offsetY:o}}class Tn extends Zr{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let a=l=>+i[l];if(Rt(i[t])){const{key:l="value"}=this._parsing;a=u=>+Wn(i[u],l)}let o,s;for(o=t,s=t+e;o0&&!isNaN(t)?qt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=oh(e._parsed[t],i.options.locale);return{label:n[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,a,o,s,l;if(!t){for(n=0,a=i.data.datasets.length;nt!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),j(Tn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,u)=>{const c=t.getDatasetMeta(0).controller.getStyle(u);return{text:l,fillStyle:c.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(u),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:n,pointStyle:i,borderRadius:o&&(s||c.borderRadius),index:u}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class iu extends Zr{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:a}=e,o=this.chart._animationsDisabled;let{start:s,count:l}=GD(e,n,o);this._drawStart=s,this._drawCount=l,HD(e)&&(s=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},t),this.updateElements(n,s,l,t)}updateElements(t,e,i,n){const a=n==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),f=o.axis,v=s.axis,{spanGaps:d,segment:p}=this.options,g=_s(d)?d:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||n==="none",m=e+i,_=t.length;let x=e>0&&this.getParsed(e-1);for(let b=0;b<_;++b){const S=t[b],w=y?S:{};if(b=m){w.skip=!0;continue}const T=this.getParsed(b),M=It(T[v]),C=w[f]=o.getPixelForValue(T[f],b),D=w[v]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,T,l):T[v],b);w.skip=isNaN(C)||isNaN(D)||M,w.stop=b>0&&Math.abs(T[f]-x[f])>g,p&&(w.parsed=T,w.raw=u.data[b]),c&&(w.options=h||this.resolveDataElementOptions(b,S.active?"active":n)),y||this.updateElement(S,b,w,n),x=T}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}j(iu,"id","line"),j(iu,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),j(iu,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class nu extends Zr{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],a=oh(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:a}}parseObjectData(t,e,i,n){return qD.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{const a=this.getParsed(n).r;!isNaN(a)&&this.chart.getDataVisibility(n)&&(ae.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(n/2,0),o=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),s=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const a=n==="reset",o=this.chart,l=o.options.animation,u=this._cachedMeta.rScale,h=u.xCenter,c=u.yCenter,f=u.getIndexAngle(0)-.5*Nt;let v=f,d;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Yr(this.resolveDataElementOptions(t,e).angle||i):0}}j(nu,"id","polarArea"),j(nu,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),j(nu,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Cf extends Tn{}j(Cf,"id","pie"),j(Cf,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class jc extends Zr{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return qD.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],a=e.iScale.getLabels();if(i.points=n,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const s={_loop:!0,_fullLoop:a.length===n.length,options:o};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const a=this._cachedMeta.rScale,o=n==="reset";for(let s=e;s0&&this.getParsed(e-1);for(let x=e;x0&&Math.abs(S[v]-_[v])>y,g&&(w.parsed=S,w.raw=u.data[x]),f&&(w.options=c||this.resolveDataElementOptions(x,b.active?"active":n)),m||this.updateElement(b,x,w,n),_=S}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let s=0;for(let l=e.length-1;l>=0;--l)s=Math.max(s,e[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const a=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,a,o)/2}}j(qc,"id","scatter"),j(qc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),j(qc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var VB=Object.freeze({__proto__:null,BarController:ru,BubbleController:Zc,DoughnutController:Tn,LineController:iu,PieController:Cf,PolarAreaController:nu,RadarController:jc,ScatterController:qc});function oa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class N0{constructor(t){j(this,"options");this.options=t||{}}static override(t){Object.assign(N0.prototype,t)}init(){}formats(){return oa()}parse(){return oa()}format(){return oa()}add(){return oa()}diff(){return oa()}startOf(){return oa()}endOf(){return oa()}}var FB={_date:N0};function GB(r,t,e,i){const{controller:n,data:a,_sorted:o}=r,s=n._cachedMeta.iScale,l=r.dataset&&r.dataset.options?r.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const u=s._reversePixels?uN:Gi;if(i){if(n._sharedOptions){const h=a[0],c=typeof h.getRange=="function"&&h.getRange(t);if(c){const f=u(a,t,e-c),v=u(a,t,e+c);return{lo:f.lo,hi:v.hi}}}}else{const h=u(a,t,e);if(l){const{vScale:c}=n._cachedMeta,{_parsed:f}=r,v=f.slice(0,h.lo+1).reverse().findIndex(p=>!It(p[c.axis]));h.lo-=Math.max(0,v);const d=f.slice(h.hi).findIndex(p=>!It(p[c.axis]));h.hi+=Math.max(0,d)}return h}}return{lo:0,hi:a.length-1}}function kv(r,t,e,i,n){const a=r.getSortedVisibleDatasetMetas(),o=e[t];for(let s=0,l=a.length;s{l[o]&&l[o](t[e],n)&&(a.push({element:l,datasetIndex:u,index:h}),s=s||l.inRange(t.x,t.y,n))}),i&&!s?[]:a}var YB={modes:{index(r,t,e,i){const n=ka(t,r),a=e.axis||"x",o=e.includeInvisible||!1,s=e.intersect?Bd(r,n,a,i,o):zd(r,n,a,!1,i,o),l=[];return s.length?(r.getSortedVisibleDatasetMetas().forEach(u=>{const h=s[0].index,c=u.data[h];c&&!c.skip&&l.push({element:c,datasetIndex:u.index,index:h})}),l):[]},dataset(r,t,e,i){const n=ka(t,r),a=e.axis||"xy",o=e.includeInvisible||!1;let s=e.intersect?Bd(r,n,a,i,o):zd(r,n,a,!1,i,o);if(s.length>0){const l=s[0].datasetIndex,u=r.getDatasetMeta(l).data;s=[];for(let h=0;he.pos===t)}function Gb(r,t){return r.filter(e=>sL.indexOf(e.pos)===-1&&e.box.axis===t)}function rl(r,t){return r.sort((e,i)=>{const n=t?i:e,a=t?e:i;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function $B(r){const t=[];let e,i,n,a,o,s;for(e=0,i=(r||[]).length;eu.box.fullSize),!0),i=rl(el(t,"left"),!0),n=rl(el(t,"right")),a=rl(el(t,"top"),!0),o=rl(el(t,"bottom")),s=Gb(t,"x"),l=Gb(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:n.concat(l).concat(o).concat(s),chartArea:el(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:a.concat(o).concat(s)}}function Hb(r,t,e,i){return Math.max(r[e],t[e])+Math.max(r[i],t[i])}function lL(r,t){r.top=Math.max(r.top,t.top),r.left=Math.max(r.left,t.left),r.bottom=Math.max(r.bottom,t.bottom),r.right=Math.max(r.right,t.right)}function qB(r,t,e,i){const{pos:n,box:a}=e,o=r.maxPadding;if(!Rt(n)){e.size&&(r[n]-=e.size);const c=i[e.stack]||{size:0,count:1};c.size=Math.max(c.size,e.horizontal?a.height:a.width),e.size=c.size/c.count,r[n]+=e.size}a.getPadding&&lL(o,a.getPadding());const s=Math.max(0,t.outerWidth-Hb(o,r,"left","right")),l=Math.max(0,t.outerHeight-Hb(o,r,"top","bottom")),u=s!==r.w,h=l!==r.h;return r.w=s,r.h=l,e.horizontal?{same:u,other:h}:{same:h,other:u}}function KB(r){const t=r.maxPadding;function e(i){const n=Math.max(t[i]-r[i],0);return r[i]+=n,n}r.y+=e("top"),r.x+=e("left"),e("right"),e("bottom")}function JB(r,t){const e=t.maxPadding;function i(n){const a={left:0,top:0,right:0,bottom:0};return n.forEach(o=>{a[o]=Math.max(t[o],e[o])}),a}return i(r?["left","right"]:["top","bottom"])}function Nl(r,t,e,i){const n=[];let a,o,s,l,u,h;for(a=0,o=r.length,u=0;a{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,c=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/h,hBoxMaxHeight:o/2}),f=Object.assign({},n);lL(f,ze(i));const v=Object.assign({maxPadding:f,w:a,h:o,x:n.left,y:n.top},n),d=ZB(l.concat(u),c);Nl(s.fullSize,v,c,d),Nl(l,v,c,d),Nl(u,v,c,d)&&Nl(l,v,c,d),KB(v),Wb(s.leftAndTop,v,c,d),v.x+=v.w,v.y+=v.h,Wb(s.rightAndBottom,v,c,d),r.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},Wt(s.chartArea,p=>{const g=p.box;Object.assign(g,r.chartArea),g.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class uL{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class QB extends uL{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Kc="$chartjs",tz={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ub=r=>r===null||r==="";function ez(r,t){const e=r.style,i=r.getAttribute("height"),n=r.getAttribute("width");if(r[Kc]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ub(n)){const a=Ab(r,"width");a!==void 0&&(r.width=a)}if(Ub(i))if(r.style.height==="")r.height=r.width/(t||2);else{const a=Ab(r,"height");a!==void 0&&(r.height=a)}return r}const hL=rB?{passive:!0}:!1;function rz(r,t,e){r&&r.addEventListener(t,e,hL)}function iz(r,t,e){r&&r.canvas&&r.canvas.removeEventListener(t,e,hL)}function nz(r,t){const e=tz[r.type]||r.type,{x:i,y:n}=ka(r,t);return{type:e,chart:t,native:r,x:i!==void 0?i:null,y:n!==void 0?n:null}}function Af(r,t){for(const e of r)if(e===t||e.contains(t))return!0}function az(r,t,e){const i=r.canvas,n=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Af(s.addedNodes,i),o=o&&!Af(s.removedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function oz(r,t,e){const i=r.canvas,n=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Af(s.removedNodes,i),o=o&&!Af(s.addedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Au=new Map;let Yb=0;function cL(){const r=window.devicePixelRatio;r!==Yb&&(Yb=r,Au.forEach((t,e)=>{e.currentDevicePixelRatio!==r&&t()}))}function sz(r,t){Au.size||window.addEventListener("resize",cL),Au.set(r,t)}function lz(r){Au.delete(r),Au.size||window.removeEventListener("resize",cL)}function uz(r,t,e){const i=r.canvas,n=i&&O0(i);if(!n)return;const a=FD((s,l)=>{const u=n.clientWidth;e(s,l),u{const l=s[0],u=l.contentRect.width,h=l.contentRect.height;u===0&&h===0||a(u,h)});return o.observe(n),sz(r,a),o}function Vd(r,t,e){e&&e.disconnect(),t==="resize"&&lz(r)}function hz(r,t,e){const i=r.canvas,n=FD(a=>{r.ctx!==null&&e(nz(a,r))},r);return rz(i,t,n),n}class cz extends uL{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(ez(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Kc])return!1;const i=e[Kc].initial;["height","width"].forEach(a=>{const o=i[a];It(o)?e.removeAttribute(a):e.setAttribute(a,o)});const n=i.style||{};return Object.keys(n).forEach(a=>{e.style[a]=n[a]}),e.width=e.width,delete e[Kc],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:az,detach:oz,resize:uz}[e]||hz;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Vd,detach:Vd,resize:Vd}[e]||iz)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return eB(t,e,i,n)}isAttached(t){const e=t&&O0(t);return!!(e&&e.isConnected)}}function fz(r){return!E0()||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas?QB:cz}var $c;let an=($c=class{constructor(){j(this,"x");j(this,"y");j(this,"active",!1);j(this,"options");j(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return _s(this.x)&&_s(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(a=>{n[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),n}},j($c,"defaults",{}),j($c,"defaultRoutes"),$c);function vz(r,t){const e=r.options.ticks,i=dz(r),n=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?gz(t):[],o=a.length,s=a[0],l=a[o-1],u=[];if(o>n)return yz(t,u,a,o/n),u;const h=pz(a,t,n);if(o>0){let c,f;const v=o>1?Math.round((l-s)/(o-1)):null;for(zh(t,u,h,It(v)?0:s-v,s),c=0,f=o-1;cn)return l}return Math.max(n,1)}function gz(r){const t=[];let e,i;for(e=0,i=r.length;er==="left"?"right":r==="right"?"left":r,$b=(r,t,e)=>t==="top"||t==="left"?r[t]+e:r[t]-e,Xb=(r,t)=>Math.min(t||r,r);function Zb(r,t){const e=[],i=r.length/t,n=r.length;let a=0;for(;ao+s)))return l}function bz(r,t){Wt(r,e=>{const i=e.gc,n=i.length/2;let a;if(n>t){for(a=0;ai?i:e,i=n&&e>i?e:i,{min:ur(e,ur(i,e)),max:ur(i,ur(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Zt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=RN(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=a||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),c=h.widest.width,f=h.highest.height,v=Se(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:v/(i-1),c+6>s&&(s=v/(i-(t.offset?.5:1)),l=this.maxHeight-il(t.grid)-e.padding-jb(t.title,this.chart.options.font),u=Math.sqrt(c*c+f*f),o=C0(Math.min(Math.asin(Se((h.highest.height+6)/s,-1,1)),Math.asin(Se(l/u,-1,1))-Math.asin(Se(f/u,-1,1)))),o=Math.max(n,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Zt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=jb(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=il(a)+l):(t.height=this.maxHeight,t.width=il(a)+l),i.display&&this.ticks.length){const{first:u,last:h,widest:c,highest:f}=this._getLabelSizes(),v=i.padding*2,d=Yr(this.labelRotation),p=Math.cos(d),g=Math.sin(d);if(s){const y=i.mirror?0:g*c.width+p*f.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{const y=i.mirror?0:p*c.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+v)}this._calculatePadding(u,h,g,p)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,v=0;l?u?(f=n*t.width,v=i*e.height):(f=i*t.height,v=n*e.width):a==="start"?v=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,v=e.width/2),this.paddingLeft=Math.max((f-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((v-c+o)*this.width/(this.width-c),0)}else{let h=e.height/2,c=t.height/2;a==="start"?(h=0,c=t.height):a==="end"&&(h=e.height,c=0),this.paddingTop=h+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Zt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e({width:o[M]||0,height:s[M]||0});return{first:T(0),last:T(e-1),widest:T(S),highest:T(w),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return lN(this._alignToPixels?aa(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:a,position:o,border:s}=n,l=a.offset,u=this.isHorizontal(),c=this.ticks.length+(l?1:0),f=il(a),v=[],d=s.setContext(this.getContext()),p=d.display?d.width:0,g=p/2,y=function(R){return aa(i,R,p)};let m,_,x,b,S,w,T,M,C,D,L,I;if(o==="top")m=y(this.bottom),w=this.bottom-f,M=m-g,D=y(t.top)+g,I=t.bottom;else if(o==="bottom")m=y(this.top),D=t.top,I=y(t.bottom)-g,w=m+g,M=this.top+f;else if(o==="left")m=y(this.right),S=this.right-f,T=m-g,C=y(t.left)+g,L=t.right;else if(o==="right")m=y(this.left),C=t.left,L=y(t.right)-g,S=m+g,T=this.left+f;else if(e==="x"){if(o==="center")m=y((t.top+t.bottom)/2+.5);else if(Rt(o)){const R=Object.keys(o)[0],N=o[R];m=y(this.chart.scales[R].getPixelForValue(N))}D=t.top,I=t.bottom,w=m+g,M=w+f}else if(e==="y"){if(o==="center")m=y((t.left+t.right)/2);else if(Rt(o)){const R=Object.keys(o)[0],N=o[R];m=y(this.chart.scales[R].getPixelForValue(N))}S=m-g,T=S-f,C=t.left,L=t.right}const P=bt(n.ticks.maxTicksLimit,c),k=Math.max(1,Math.ceil(c/P));for(_=0;_0&&(Ct-=K/2);break}H={left:Ct,top:nt,width:K+W.width,height:q+W.height,color:k.backdropColor}}g.push({label:x,font:M,textOffset:L,options:{rotation:p,color:N,strokeColor:O,strokeWidth:B,textAlign:G,textBaseline:I,translation:[b,S],backdrop:H}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Yr(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let u,h;return e==="left"?n?(h=this.right+a,i==="near"?u="left":i==="center"?(u="center",h+=l/2):(u="right",h+=l)):(h=this.right-s,i==="near"?u="right":i==="center"?(u="center",h-=l/2):(u="left",h=this.left)):e==="right"?n?(h=this.left+a,i==="near"?u="right":i==="center"?(u="center",h-=l/2):(u="left",h-=l)):(h=this.left+s,i==="near"?u="left":i==="center"?(u="center",h+=l/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:a,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,a,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(a=>a.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,u,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(e.display)for(a=0,o=n.length;a{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let a,o;for(a=0,o=e.length;a{const i=e.split("."),n=i.pop(),a=[r].concat(i).join("."),o=t[e].split("."),s=o.pop(),l=o.join(".");Jt.route(a,n,l,s)})}function Dz(r){return"id"in r&&"defaults"in r}class Lz{constructor(){this.controllers=new Vh(Zr,"datasets",!0),this.elements=new Vh(an,"elements"),this.plugins=new Vh(Object,"plugins"),this.scales=new Vh(sh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const a=i||this._getRegistryForType(n);i||a.isForType(n)||a===this.plugins&&n.id?this._exec(t,a,n):Wt(n,o=>{const s=i||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,e,i){const n=M0(t);Zt(i["before"+n],[],i),e[t](i),Zt(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;ea.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Pz(r){const t={},e=[],i=Object.keys(fi.plugins.items);for(let a=0;a1&&qb(r[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${r}' axis. Please provide 'axis' or 'position' option.`)}function Kb(r,t,e){if(e[t+"AxisID"]===r)return{axis:t}}function zz(r,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===r||i.yAxisID===r);if(e.length)return Kb(r,"x",e[0])||Kb(r,"y",e[0])}return{}}function Vz(r,t){const e=lo[r.type]||{scales:{}},i=t.scales||{},n=yy(r.type,t),a=Object.create(null);return Object.keys(i).forEach(o=>{const s=i[o];if(!Rt(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=my(o,s,zz(o,r),Jt.scales[s.type]),u=Nz(l,n),h=e.scales||{};a[o]=Jl(Object.create(null),[{axis:l},s,h[l],h[u]])}),r.data.datasets.forEach(o=>{const s=o.type||r.type,l=o.indexAxis||yy(s,t),h=(lo[s]||{}).scales||{};Object.keys(h).forEach(c=>{const f=Oz(c,l),v=o[f+"AxisID"]||f;a[v]=a[v]||Object.create(null),Jl(a[v],[{axis:f},i[v],h[c]])})}),Object.keys(a).forEach(o=>{const s=a[o];Jl(s,[Jt.scales[s.type],Jt.scale])}),a}function vL(r){const t=r.options||(r.options={});t.plugins=bt(t.plugins,{}),t.scales=Vz(r,t)}function dL(r){return r=r||{},r.datasets=r.datasets||[],r.labels=r.labels||[],r}function Fz(r){return r=r||{},r.data=dL(r.data),vL(r),r}const Jb=new Map,pL=new Set;function Fh(r,t){let e=Jb.get(r);return e||(e=t(),Jb.set(r,e),pL.add(e)),e}const nl=(r,t,e)=>{const i=Wn(t,e);i!==void 0&&r.add(i)};class Gz{constructor(t){this._config=Fz(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=dL(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),vL(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Fh(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Fh(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Fh(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:a}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(c=>nl(l,t,c))),h.forEach(c=>nl(l,n,c)),h.forEach(c=>nl(l,lo[a]||{},c)),h.forEach(c=>nl(l,Jt,c)),h.forEach(c=>nl(l,py,c))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),pL.has(e)&&o.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,lo[e]||{},Jt.datasets[e]||{},{type:e},Jt,py]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=Qb(this._resolverCache,t,n);let l=o;if(Wz(o,e)){a.$shared=!1,i=Un(i)?i():i;const u=this.createResolver(t,i,s);l=xs(o,i,u)}for(const u of e)a[u]=l[u];return a}createResolver(t,e,i=[""],n){const{resolver:a}=Qb(this._resolverCache,t,i);return Rt(e)?xs(a,e,void 0,n):a}}function Qb(r,t,e){let i=r.get(t);i||(i=new Map,r.set(t,i));const n=e.join();let a=i.get(n);return a||(a={resolver:P0(t,e),subPrefixes:e.filter(s=>!s.toLowerCase().includes("hover"))},i.set(n,a)),a}const Hz=r=>Rt(r)&&Object.getOwnPropertyNames(r).some(t=>Un(r[t]));function Wz(r,t){const{isScriptable:e,isIndexable:i}=$D(r);for(const n of t){const a=e(n),o=i(n),s=(o||a)&&r[n];if(a&&(Un(s)||Hz(s))||o&&jt(s))return!0}return!1}var Uz="4.5.1";const Yz=["top","bottom","left","right","chartArea"];function t1(r,t){return r==="top"||r==="bottom"||Yz.indexOf(r)===-1&&t==="x"}function e1(r,t){return function(e,i){return e[r]===i[r]?e[t]-i[t]:e[r]-i[r]}}function r1(r){const t=r.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Zt(e&&e.onComplete,[r],t)}function $z(r){const t=r.chart,e=t.options.animation;Zt(e&&e.onProgress,[r],t)}function gL(r){return E0()&&typeof r=="string"?r=document.getElementById(r):r&&r.length&&(r=r[0]),r&&r.canvas&&(r=r.canvas),r}const Jc={},i1=r=>{const t=gL(r);return Object.values(Jc).filter(e=>e.canvas===t).pop()};function Xz(r,t,e){const i=Object.keys(r);for(const n of i){const a=+n;if(a>=t){const o=r[n];delete r[n],(e>0||a>t)&&(r[a+e]=o)}}}function Zz(r,t,e,i){return!e||r.type==="mouseout"?null:i?t:r}var gn;let B0=(gn=class{static register(...t){fi.add(...t),n1()}static unregister(...t){fi.remove(...t),n1()}constructor(t,e){const i=this.config=new Gz(e),n=gL(t),a=i1(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||fz(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,h=l&&l.width;if(this.id=jO(),this.ctx=s,this.canvas=l,this.width=h,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Iz,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fN(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Jc[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Oi.listen(this,"complete",r1),Oi.listen(this,"progress",$z),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:a}=this;return It(t)?e&&a?a:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return fi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cb(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wb(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,a),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Cb(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Zt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Wt(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((o,s)=>(o[s]=!1,o),{});let a=[];e&&(a=a.concat(Object.keys(e).map(o=>{const s=e[o],l=my(o,s),u=l==="r",h=l==="x";return{options:s,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),Wt(a,o=>{const s=o.options,l=s.id,u=my(l,s),h=bt(s.type,o.dtype);(s.position===void 0||t1(s.position,u)!==t1(o.dposition))&&(s.position=o.dposition),n[l]=!0;let c=null;if(l in i&&i[l].type===h)c=i[l];else{const f=fi.getScale(h);c=new f({id:l,type:h,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(s,t)}),Wt(n,(o,s)=>{o||delete i[s]}),Wt(i,o=>{Ne.configure(this,o,o.options),Ne.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,a)=>n.index-a.index),i>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,h=this.data.datasets.length;u{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(e1("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Wt(this.scales,t=>{Ne.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!db(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:a}of e){const o=i==="_removeElements"?-a:a;Xz(t,n,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),n=i(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ne.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Wt(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,a)=>{n._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=iL(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(n&&Lv(e,n),t.controller.draw(),n&&Iv(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Hi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const a=YB.modes[e];return typeof a=="function"?a(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(a=>a&&a._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Kn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,n);Tu(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(a,{visible:i}),this.update(s=>s.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,a,o),t[a]=o},n=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};Wt(this.options.events,a=>i(a,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,u)=>{e.addEventListener(this,l,u),t[l]=u},n=(l,u)=>{t[l]&&(e.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",a),i("detach",o)};o=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){Wt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Wt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let a,o,s,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),s=0,l=t.length;s{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!bf(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,a=(l,u)=>l.filter(h=>!u.some(c=>h.datasetIndex===c.datasetIndex&&h.index===c.index)),o=a(e,t),s=i?t:a(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:a}=this,o=e,s=this._getActiveElements(t,n,i,o),l=eN(t),u=Zz(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Zt(a.onHover,[t,s,this],this),l&&Zt(a.onClick,[t,s,this],this));const h=!bf(s,n);return(h||e)&&(this._active=s,this._updateHoverStyles(s,n,e)),this._lastEvent=u,h}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,n)}},j(gn,"defaults",Jt),j(gn,"instances",Jc),j(gn,"overrides",lo),j(gn,"registry",fi),j(gn,"version",Uz),j(gn,"getChart",i1),gn);function n1(){return Wt(B0.instances,r=>r._plugins.invalidate())}function jz(r,t,e){const{startAngle:i,x:n,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:u,borderJoinStyle:h}=l,c=Math.min(u/o,Ee(i-e));if(r.beginPath(),r.arc(n,a,o-u/2,i+c/2,e-c/2),s>0){const f=Math.min(u/s,Ee(i-e));r.arc(n,a,s+u/2,e-f/2,i+f/2,!0)}else{const f=Math.min(u/2,o*Ee(i-e));if(h==="round")r.arc(n,a,f,e-Nt/2,i+Nt/2,!0);else if(h==="bevel"){const v=2*f*f,d=-v*Math.cos(e+Nt/2)+n,p=-v*Math.sin(e+Nt/2)+a,g=v*Math.cos(i+Nt/2)+n,y=v*Math.sin(i+Nt/2)+a;r.lineTo(d,p),r.lineTo(g,y)}}r.closePath(),r.moveTo(0,0),r.rect(0,0,r.canvas.width,r.canvas.height),r.clip("evenodd")}function qz(r,t,e){const{startAngle:i,pixelMargin:n,x:a,y:o,outerRadius:s,innerRadius:l}=t;let u=n/s;r.beginPath(),r.arc(a,o,s,i-u,e+u),l>n?(u=n/l,r.arc(a,o,l,e+u,i-u,!0)):r.arc(a,o,n,e+se,i-se),r.closePath(),r.clip()}function Kz(r){return I0(r,["outerStart","outerEnd","innerStart","innerEnd"])}function Jz(r,t,e,i){const n=Kz(r.options.borderRadius),a=(e-t)/2,o=Math.min(a,i*t/2),s=l=>{const u=(e-Math.min(a,l))*i/2;return Se(l,0,Math.min(a,u))};return{outerStart:s(n.outerStart),outerEnd:s(n.outerEnd),innerStart:Se(n.innerStart,0,o),innerEnd:Se(n.innerEnd,0,o)}}function Io(r,t,e,i){return{x:e+r*Math.cos(t),y:i+r*Math.sin(t)}}function Df(r,t,e,i,n,a){const{x:o,y:s,startAngle:l,pixelMargin:u,innerRadius:h}=t,c=Math.max(t.outerRadius+i+e-u,0),f=h>0?h+i+e+u:0;let v=0;const d=n-l;if(i){const k=h>0?h-i:0,R=c>0?c-i:0,N=(k+R)/2,O=N!==0?d*N/(N+i):d;v=(d-O)/2}const p=Math.max(.001,d*c-e/Nt)/c,g=(d-p)/2,y=l+g+v,m=n-g-v,{outerStart:_,outerEnd:x,innerStart:b,innerEnd:S}=Jz(t,f,c,m-y),w=c-_,T=c-x,M=y+_/w,C=m-x/T,D=f+b,L=f+S,I=y+b/D,P=m-S/L;if(r.beginPath(),a){const k=(M+C)/2;if(r.arc(o,s,c,M,k),r.arc(o,s,c,k,C),x>0){const B=Io(T,C,o,s);r.arc(B.x,B.y,x,C,m+se)}const R=Io(L,m,o,s);if(r.lineTo(R.x,R.y),S>0){const B=Io(L,P,o,s);r.arc(B.x,B.y,S,m+se,P+Math.PI)}const N=(m-S/f+(y+b/f))/2;if(r.arc(o,s,f,m-S/f,N,!0),r.arc(o,s,f,N,y+b/f,!0),b>0){const B=Io(D,I,o,s);r.arc(B.x,B.y,b,I+Math.PI,y-se)}const O=Io(w,y,o,s);if(r.lineTo(O.x,O.y),_>0){const B=Io(w,M,o,s);r.arc(B.x,B.y,_,y-se,M)}}else{r.moveTo(o,s);const k=Math.cos(M)*c+o,R=Math.sin(M)*c+s;r.lineTo(k,R);const N=Math.cos(C)*c+o,O=Math.sin(C)*c+s;r.lineTo(N,O)}r.closePath()}function Qz(r,t,e,i,n){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Df(r,t,e,i,l,n);for(let u=0;u=Nt&&v===0&&h!=="miter"&&jz(r,t,p),a||(Df(r,t,e,i,p,n),r.stroke())}class Bl extends an{constructor(e){super();j(this,"circumference");j(this,"endAngle");j(this,"fullCircles");j(this,"innerRadius");j(this,"outerRadius");j(this,"pixelMargin");j(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,n){const a=this.getProps(["x","y"],n),{angle:o,distance:s}=ND(a,{x:e,y:i}),{startAngle:l,endAngle:u,innerRadius:h,outerRadius:c,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),v=(this.options.spacing+this.options.borderWidth)/2,d=bt(f,u-l),p=Mu(o,l,u)&&l!==u,g=d>=qt||p,y=Fi(s,h+v,c+v);return g&&y}getCenterPoint(e){const{x:i,y:n,startAngle:a,endAngle:o,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:h}=this.options,c=(a+o)/2,f=(s+l+h+u)/2;return{x:i+Math.cos(c)*f,y:n+Math.sin(c)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:n}=this,a=(i.offset||0)/4,o=(i.spacing||0)/2,s=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=n>qt?Math.floor(n/qt):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const u=1-Math.sin(Math.min(Nt,n||0)),h=a*u;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,Qz(e,this,h,o,s),tV(e,this,h,o,s),e.restore()}}j(Bl,"id","arc"),j(Bl,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),j(Bl,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(Bl,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function yL(r,t,e=t){r.lineCap=bt(e.borderCapStyle,t.borderCapStyle),r.setLineDash(bt(e.borderDash,t.borderDash)),r.lineDashOffset=bt(e.borderDashOffset,t.borderDashOffset),r.lineJoin=bt(e.borderJoinStyle,t.borderJoinStyle),r.lineWidth=bt(e.borderWidth,t.borderWidth),r.strokeStyle=bt(e.borderColor,t.borderColor)}function eV(r,t,e){r.lineTo(e.x,e.y)}function rV(r){return r.stepped?TN:r.tension||r.cubicInterpolationMode==="monotone"?MN:eV}function mL(r,t,e={}){const i=r.length,{start:n=0,end:a=i-1}=e,{start:o,end:s}=t,l=Math.max(n,o),u=Math.min(a,s),h=ns&&a>s;return{count:i,start:l,loop:t.loop,ilen:u(o+(u?s-x:x))%a,_=()=>{p!==g&&(r.lineTo(h,g),r.lineTo(h,p),r.lineTo(h,y))};for(l&&(v=n[m(0)],r.moveTo(v.x,v.y)),f=0;f<=s;++f){if(v=n[m(f)],v.skip)continue;const x=v.x,b=v.y,S=x|0;S===d?(bg&&(g=b),h=(c*h+x)/++c):(_(),r.lineTo(x,b),d=S,c=0,p=g=b),y=b}_()}function _y(r){const t=r.options,e=t.borderDash&&t.borderDash.length;return!r._decimated&&!r._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?nV:iV}function aV(r){return r.stepped?iB:r.tension||r.cubicInterpolationMode==="monotone"?nB:Ra}function oV(r,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),yL(r,t.options),r.stroke(n)}function sV(r,t,e,i){const{segments:n,options:a}=t,o=_y(t);for(const s of n)yL(r,a,s.style),r.beginPath(),o(r,t,s,{start:e,end:e+i-1})&&r.closePath(),r.stroke()}const lV=typeof Path2D=="function";function uV(r,t,e,i){lV&&!t.options.segment?oV(r,t,e,i):sV(r,t,e,i)}class Mn extends an{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;jN(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=hB(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],a=this.points,o=rL(this,{property:e,start:n,end:n});if(!o.length)return;const s=[],l=aV(i);let u,h;for(u=0,h=o.length;ut!=="borderDash"&&t!=="fill"});function a1(r,t,e,i){const n=r.options,{[e]:a}=r.getProps([e],i);return Math.abs(t-a)r.replace("rgb(","rgba(").replace(")",", 0.5)"));function xL(r){return xy[r%xy.length]}function bL(r){return o1[r%o1.length]}function gV(r,t){return r.borderColor=xL(t),r.backgroundColor=bL(t),++t}function yV(r,t){return r.backgroundColor=r.data.map(()=>xL(t++)),t}function mV(r,t){return r.backgroundColor=r.data.map(()=>bL(t++)),t}function _V(r){let t=0;return(e,i)=>{const n=r.getDatasetMeta(i).controller;n instanceof Tn?t=yV(e,t):n instanceof nu?t=mV(e,t):n&&(t=gV(e,t))}}function s1(r){let t;for(t in r)if(r[t].borderColor||r[t].backgroundColor)return!0;return!1}function xV(r){return r&&(r.borderColor||r.backgroundColor)}function bV(){return Jt.borderColor!=="rgba(0,0,0,0.1)"||Jt.backgroundColor!=="rgba(0,0,0,0.1)"}var SV={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(r,t,e){if(!e.enabled)return;const{data:{datasets:i},options:n}=r.config,{elements:a}=n,o=s1(i)||xV(n)||a&&s1(a)||bV();if(!e.forceOverride&&o)return;const s=_V(r);i.forEach(s)}};function wV(r,t,e,i,n){const a=n.samples||i;if(a>=e)return r.slice(t,t+e);const o=[],s=(e-2)/(a-2);let l=0;const u=t+e-1;let h=t,c,f,v,d,p;for(o[l++]=r[h],c=0;cv&&(v=d,f=r[m],p=m);o[l++]=f,h=p}return o[l++]=r[u],o}function TV(r,t,e,i){let n=0,a=0,o,s,l,u,h,c,f,v,d,p;const g=[],y=t+e-1,m=r[t].x,x=r[y].x-m;for(o=t;op&&(p=u,f=o),n=(a*n+s.x)/++a;else{const S=o-1;if(!It(c)&&!It(f)){const w=Math.min(c,f),T=Math.max(c,f);w!==v&&w!==S&&g.push({...r[w],x:n}),T!==v&&T!==S&&g.push({...r[T],x:n})}o>0&&S!==v&&g.push(r[S]),g.push(s),h=b,a=0,d=p=u,c=f=v=o}}return g}function SL(r){if(r._decimated){const t=r._data;delete r._decimated,delete r._data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function l1(r){r.data.datasets.forEach(t=>{SL(t)})}function MV(r,t){const e=t.length;let i=0,n;const{iScale:a}=r,{min:o,max:s,minDefined:l,maxDefined:u}=a.getUserBounds();return l&&(i=Se(Gi(t,a.axis,o).lo,0,e-1)),u?n=Se(Gi(t,a.axis,s).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var CV={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(r,t,e)=>{if(!e.enabled){l1(r);return}const i=r.width;r.data.datasets.forEach((n,a)=>{const{_data:o,indexAxis:s}=n,l=r.getDatasetMeta(a),u=o||n.data;if(Ol([s,r.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=r.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||r.options.parsing)return;let{start:c,count:f}=MV(l,u);const v=e.threshold||4*i;if(f<=v){SL(n);return}It(o)&&(n._data=u,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let d;switch(e.algorithm){case"lttb":d=wV(u,c,f,i,e);break;case"min-max":d=TV(u,c,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=d})},destroy(r){l1(r)}};function AV(r,t,e){const i=r.segments,n=r.points,a=t.points,o=[];for(const s of i){let{start:l,end:u}=s;u=Rv(l,u,n);const h=by(e,n[l],n[u],s.loop);if(!t.segments){o.push({source:s,target:h,start:n[l],end:n[u]});continue}const c=rL(t,h);for(const f of c){const v=by(e,a[f.start],a[f.end],f.loop),d=eL(s,n,v);for(const p of d)o.push({source:p,target:f,start:{[e]:u1(h,v,"start",Math.max)},end:{[e]:u1(h,v,"end",Math.min)}})}}return o}function by(r,t,e,i){if(i)return;let n=t[r],a=e[r];return r==="angle"&&(n=Ee(n),a=Ee(a)),{property:r,start:n,end:a}}function DV(r,t){const{x:e=null,y:i=null}=r||{},n=t.points,a=[];return t.segments.forEach(({start:o,end:s})=>{s=Rv(o,s,n);const l=n[o],u=n[s];i!==null?(a.push({x:l.x,y:i}),a.push({x:u.x,y:i})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:u.y}))}),a}function Rv(r,t,e){for(;t>r;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function u1(r,t,e,i){return r&&t?i(r[e],t[e]):r?r[e]:t?t[e]:0}function wL(r,t){let e=[],i=!1;return jt(r)?(i=!0,e=r):e=DV(r,t),e.length?new Mn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function h1(r){return r&&r.fill!==!1}function LV(r,t,e){let n=r[t].fill;const a=[t];let o;if(!e)return n;for(;n!==!1&&a.indexOf(n)===-1;){if(!ne(n))return n;if(o=r[n],!o)return!1;if(o.visible)return n;a.push(n),n=o.fill}return!1}function IV(r,t,e){const i=EV(r);if(Rt(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return ne(n)&&Math.floor(n)===n?PV(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function PV(r,t,e,i){return(r==="-"||r==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function kV(r,t){let e=null;return r==="start"?e=t.bottom:r==="end"?e=t.top:Rt(r)?e=t.getPixelForValue(r.value):t.getBasePixel&&(e=t.getBasePixel()),e}function RV(r,t,e){let i;return r==="start"?i=e:r==="end"?i=t.options.reverse?t.min:t.max:Rt(r)?i=r.value:i=t.getBaseValue(),i}function EV(r){const t=r.options,e=t.fill;let i=bt(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function OV(r){const{scale:t,index:e,line:i}=r,n=[],a=i.segments,o=i.points,s=NV(t,e);s.push(wL({x:null,y:t.bottom},i));for(let l=0;l=0;--o){const s=n[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),i&&s.fill&&Hd(r.ctx,s,a))}},beforeDatasetsDraw(r,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=r.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const a=i[n].$filler;h1(a)&&Hd(r.ctx,a,r.chartArea)}},beforeDatasetDraw(r,t,e){const i=t.meta.$filler;!h1(i)||e.drawTime!=="beforeDatasetDraw"||Hd(r.ctx,i,r.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const d1=(r,t)=>{let{boxHeight:e=t,boxWidth:i=t}=r;return r.usePointStyle&&(e=Math.min(e,t),i=r.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},XV=(r,t)=>r!==null&&t!==null&&r.datasetIndex===t.datasetIndex&&r.index===t.index;class p1 extends an{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Zt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=de(i.font),a=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=d1(i,a);let u,h;e.font=n.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(o,a,s,l)+10):(h=this.maxHeight,u=this._fitCols(o,n,s,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],h=n+s;let c=t;a.textAlign="left",a.textBaseline="middle";let f=-1,v=-h;return this.legendItems.forEach((d,p)=>{const g=i+e/2+a.measureText(d.text).width;(p===0||u[u.length-1]+g+2*s>o)&&(c+=h,u[u.length-(p>0?0:1)]=0,v+=h,f++),l[p]={left:0,top:v,row:f,width:g,height:n},u[u.length-1]+=g+s}),c}_fitCols(t,e,i,n){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],h=o-t;let c=s,f=0,v=0,d=0,p=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:m,itemHeight:_}=ZV(i,e,a,g,n);y>0&&v+_+2*s>h&&(c+=f+s,u.push({width:f,height:v}),d+=f+s,p++,f=v=0),l[y]={left:d,top:v,col:p,width:m,height:_},f=Math.max(f,m),v+=_+s}),c+=f,u.push({width:f,height:v}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:a}}=this,o=us(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=Pe(i,this.left+n,this.right-this.lineWidths[s]);for(const u of e)s!==u.row&&(s=u.row,l=Pe(i,this.left+n,this.right-this.lineWidths[s])),u.top+=this.top+t+n,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+n}else{let s=0,l=Pe(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const u of e)u.col!==s&&(s=u.col,l=Pe(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+n,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Lv(t,this),this._draw(),Iv(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:a,labels:o}=t,s=Jt.color,l=us(t.rtl,this.left,this.width),u=de(o.font),{padding:h}=o,c=u.size,f=c/2;let v;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=u.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=d1(o,c),y=function(S,w,T){if(isNaN(d)||d<=0||isNaN(p)||p<0)return;n.save();const M=bt(T.lineWidth,1);if(n.fillStyle=bt(T.fillStyle,s),n.lineCap=bt(T.lineCap,"butt"),n.lineDashOffset=bt(T.lineDashOffset,0),n.lineJoin=bt(T.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=bt(T.strokeStyle,s),n.setLineDash(bt(T.lineDash,[])),o.usePointStyle){const C={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:M},D=l.xPlus(S,d/2),L=w+f;UD(n,C,D,L,o.pointStyleWidth&&d)}else{const C=w+Math.max((c-p)/2,0),D=l.leftForLtr(S,d),L=Ja(T.borderRadius);n.beginPath(),Object.values(L).some(I=>I!==0)?Cu(n,{x:D,y:C,w:d,h:p,radius:L}):n.rect(D,C,d,p),n.fill(),M!==0&&n.stroke()}n.restore()},m=function(S,w,T){uo(n,T.text,S,w+g/2,u,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?v={x:Pe(a,this.left+h,this.right-i[0]),y:this.top+h+x,line:0}:v={x:this.left+h,y:Pe(a,this.top+x+h,this.bottom-e[0].height),line:0},JD(this.ctx,t.textDirection);const b=g+h;this.legendItems.forEach((S,w)=>{n.strokeStyle=S.fontColor,n.fillStyle=S.fontColor;const T=n.measureText(S.text).width,M=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),C=d+f+T;let D=v.x,L=v.y;l.setWidth(this.width),_?w>0&&D+C+h>this.right&&(L=v.y+=b,v.line++,D=v.x=Pe(a,this.left+h,this.right-i[v.line])):w>0&&L+b>this.bottom&&(D=v.x=D+e[v.line].width+h,v.line++,L=v.y=Pe(a,this.top+x+h,this.bottom-e[v.line].height));const I=l.x(D);if(y(I,L,S),D=vN(M,D+d+f,_?D+C:this.right,t.rtl),m(l.x(D),L,S),_)v.x+=C+h;else if(typeof S.text!="string"){const P=u.lineHeight;v.y+=ML(S,P)+h}else v.y+=b}),QD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=de(e.font),n=ze(e.padding);if(!e.display)return;const a=us(t.rtl,this.left,this.width),o=this.ctx,s=e.position,l=i.size/2,u=n.top+l;let h,c=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+u,c=Pe(t.align,c,this.right-f);else{const d=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);h=u+Pe(t.align,this.top,this.bottom-d-t.labels.padding-this._computeTitleHeight())}const v=Pe(s,c,c+f);o.textAlign=a.textAlign(D0(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,uo(o,e.text,v,h,i)}_computeTitleHeight(){const t=this.options.title,e=de(t.font),i=ze(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,a;if(Fi(t,this.left,this.right)&&Fi(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;ia.length>o.length?a:o)),t+e.size/2+i.measureText(n).width}function qV(r,t,e){let i=r;return typeof t.text!="string"&&(i=ML(t,e)),i}function ML(r,t){const e=r.text?r.text.length:0;return t*e}function KV(r,t){return!!((r==="mousemove"||r==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(r==="click"||r==="mouseup"))}var JV={id:"legend",_element:p1,start(r,t,e){const i=r.legend=new p1({ctx:r.ctx,options:e,chart:r});Ne.configure(r,i,e),Ne.addBox(r,i)},stop(r){Ne.removeBox(r,r.legend),delete r.legend},beforeUpdate(r,t,e){const i=r.legend;Ne.configure(r,i,e),i.options=e},afterUpdate(r){const t=r.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(r,t){t.replay||r.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(r,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:r=>r.chart.options.color,boxWidth:40,padding:10,generateLabels(r){const t=r.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:a,useBorderRadius:o,borderRadius:s}}=r.legend.options;return r._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(e?0:void 0),h=ze(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:i||u.pointStyle,rotation:u.rotation,textAlign:n||u.textAlign,borderRadius:o&&(s||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:r=>r.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:r=>!r.startsWith("on"),labels:{_scriptable:r=>!["generateLabels","filter","sort"].includes(r)}}};class z0 extends an{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=jt(i.text)?i.text.length:1;this._padding=ze(i.padding);const a=n*de(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:n,right:a,options:o}=this,s=o.align;let l=0,u,h,c;return this.isHorizontal()?(h=Pe(s,i,a),c=e+t,u=a-i):(o.position==="left"?(h=i+t,c=Pe(s,n,e),l=Nt*-.5):(h=a-t,c=Pe(s,e,n),l=Nt*.5),u=n-e),{titleX:h,titleY:c,maxWidth:u,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=de(e.font),a=i.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:u}=this._drawArgs(a);uo(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:u,textAlign:D0(e.align),textBaseline:"middle",translation:[o,s]})}}function QV(r,t){const e=new z0({ctx:r.ctx,options:t,chart:r});Ne.configure(r,e,t),Ne.addBox(r,e),r.titleBlock=e}var t5={id:"title",_element:z0,start(r,t,e){QV(r,e)},stop(r){const t=r.titleBlock;Ne.removeBox(r,t),delete r.titleBlock},beforeUpdate(r,t,e){const i=r.titleBlock;Ne.configure(r,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gh=new WeakMap;var e5={id:"subtitle",start(r,t,e){const i=new z0({ctx:r.ctx,options:e,chart:r});Ne.configure(r,i,e),Ne.addBox(r,i),Gh.set(r,i)},stop(r){Ne.removeBox(r,Gh.get(r)),Gh.delete(r)},beforeUpdate(r,t,e){const i=Gh.get(r);Ne.configure(r,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zl={average(r){if(!r.length)return!1;let t,e,i=new Set,n=0,a=0;for(t=0,e=r.length;ts+l)/i.size,y:n/a}},nearest(r,t){if(!r.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=r.length;a-1?r.split(` `):r}function r5(r,t){const{element:e,datasetIndex:i,index:n}=t,a=r.getDatasetMeta(i).controller,{label:o,value:s}=a.getLabelAndValue(n);return{chart:r,label:o,parsed:a.getParsed(n),raw:r.data.datasets[i].data[n],formattedValue:s,dataset:a.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function g1(r,t){const e=r.chart.ctx,{body:i,footer:n,title:a}=r,{boxWidth:o,boxHeight:s}=t,l=de(t.bodyFont),u=de(t.titleFont),h=de(t.footerFont),c=a.length,f=n.length,v=i.length,d=ze(t.padding);let p=d.height,g=0,y=i.reduce((x,b)=>x+b.before.length+b.lines.length+b.after.length,0);if(y+=r.beforeBody.length+r.afterBody.length,c&&(p+=c*u.lineHeight+(c-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=v*x+(y-v)*l.lineHeight+(y-1)*t.bodySpacing}f&&(p+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let m=0;const _=function(x){g=Math.max(g,e.measureText(x).width+m)};return e.save(),e.font=u.string,Wt(r.title,_),e.font=l.string,Wt(r.beforeBody.concat(r.afterBody),_),m=t.displayColors?o+2+t.boxPadding:0,Wt(i,x=>{Wt(x.before,_),Wt(x.lines,_),Wt(x.after,_)}),m=0,e.font=h.string,Wt(r.footer,_),e.restore(),g+=d.width,{width:g,height:p}}function i5(r,t){const{y:e,height:i}=t;return er.height-i/2?"bottom":"center"}function n5(r,t,e,i){const{x:n,width:a}=i,o=e.caretSize+e.caretPadding;if(r==="left"&&n+a+o>t.width||r==="right"&&n-a-o<0)return!0}function a5(r,t,e,i){const{x:n,width:a}=e,{width:o,chartArea:{left:s,right:l}}=r;let u="center";return i==="center"?u=n<=(s+l)/2?"left":"right":n<=a/2?u="left":n>=o-a/2&&(u="right"),n5(u,r,t,e)&&(u="center"),u}function y1(r,t,e){const i=e.yAlign||t.yAlign||i5(r,e);return{xAlign:e.xAlign||t.xAlign||a5(r,t,e,i),yAlign:i}}function o5(r,t){let{x:e,width:i}=r;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function s5(r,t,e){let{y:i,height:n}=r;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function m1(r,t,e,i){const{caretSize:n,caretPadding:a,cornerRadius:o}=r,{xAlign:s,yAlign:l}=e,u=n+a,{topLeft:h,topRight:c,bottomLeft:f,bottomRight:v}=Ja(o);let d=o5(t,s);const p=s5(t,l,u);return l==="center"?s==="left"?d+=u:s==="right"&&(d-=u):s==="left"?d-=Math.max(h,f)+n:s==="right"&&(d+=Math.max(c,v)+n),{x:Se(d,0,i.width-t.width),y:Se(p,0,i.height-t.height)}}function Hh(r,t,e){const i=ze(e.padding);return t==="center"?r.x+r.width/2:t==="right"?r.x+r.width-i.right:r.x+i.left}function _1(r){return ui([],Ni(r))}function l5(r,t,e){return Kn(r,{tooltip:t,tooltipItems:e,type:"tooltip"})}function x1(r,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?r.override(e):r}const CL={beforeTitle:Pi,title(r){if(r.length>0){const t=r[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex"u"?CL[t].call(e,i):n}class Sy extends an{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,a=new nL(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=l5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=Qe(i,"beforeTitle",this,t),a=Qe(i,"title",this,t),o=Qe(i,"afterTitle",this,t);let s=[];return s=ui(s,Ni(n)),s=ui(s,Ni(a)),s=ui(s,Ni(o)),s}getBeforeBody(t,e){return _1(Qe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return Wt(t,a=>{const o={before:[],lines:[],after:[]},s=x1(i,a);ui(o.before,Ni(Qe(s,"beforeLabel",this,a))),ui(o.lines,Qe(s,"label",this,a)),ui(o.after,Ni(Qe(s,"afterLabel",this,a))),n.push(o)}),n}getAfterBody(t,e){return _1(Qe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Qe(i,"beforeFooter",this,t),a=Qe(i,"footer",this,t),o=Qe(i,"afterFooter",this,t);let s=[];return s=ui(s,Ni(n)),s=ui(s,Ni(a)),s=ui(s,Ni(o)),s}_createItems(t){const e=this._active,i=this.chart.data,n=[],a=[],o=[];let s=[],l,u;for(l=0,u=e.length;lt.filter(h,c,f,i))),t.itemSort&&(s=s.sort((h,c)=>t.itemSort(h,c,i))),Wt(s,h=>{const c=x1(t.callbacks,h);n.push(Qe(c,"labelColor",this,h)),a.push(Qe(c,"labelPointStyle",this,h)),o.push(Qe(c,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let a,o=[];if(!n.length)this.opacity!==0&&(a={opacity:0});else{const s=zl[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=g1(this,i),u=Object.assign({},s,l),h=y1(this.chart,i,u),c=m1(i,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:c.x,y:c.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const a=this.getCaretPosition(t,i,n);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:a}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:l,topRight:u,bottomLeft:h,bottomRight:c}=Ja(s),{x:f,y:v}=t,{width:d,height:p}=e;let g,y,m,_,x,b;return a==="center"?(x=v+p/2,n==="left"?(g=f,y=g-o,_=x+o,b=x-o):(g=f+d,y=g+o,_=x-o,b=x+o),m=g):(n==="left"?y=f+Math.max(l,h)+o:n==="right"?y=f+d-Math.max(u,c)-o:y=this.caretX,a==="top"?(_=v,x=_-o,g=y-o,m=y+o):(_=v+p,x=_+o,g=y+o,m=y-o),b=_),{x1:g,x2:y,x3:m,y1:_,y2:x,y3:b}}drawTitle(t,e,i){const n=this.title,a=n.length;let o,s,l;if(a){const u=us(i.rtl,this.x,this.width);for(t.x=Hh(this,i.titleAlign,i),e.textAlign=u.textAlign(i.titleAlign),e.textBaseline="middle",o=de(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,l=0;lm!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Cu(t,{x:p,y:d,w:u,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Cu(t,{x:g,y:d+1,w:u-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(p,d,u,l),t.strokeRect(p,d,u,l),t.fillStyle=o.backgroundColor,t.fillRect(g,d+1,u-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:h}=i,c=de(i.bodyFont);let f=c.lineHeight,v=0;const d=us(i.rtl,this.x,this.width),p=function(T){e.fillText(T,d.x(t.x+v),t.y+f/2),t.y+=f+a},g=d.textAlign(o);let y,m,_,x,b,S,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Hh(this,g,i),e.fillStyle=i.bodyColor,Wt(this.beforeBody,p),v=s&&g!=="right"?o==="center"?u/2+h:u+2+h:0,x=0,S=n.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,a=i&&i.y;if(n||a){const o=zl[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=g1(this,t),l=Object.assign({},o,this._size),u=y1(e,t,l),h=m1(t,l,u,e);(n._to!==h.x||a._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ze(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,n,e),JD(t,e.textDirection),a.y+=o.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),QD(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),a=!bf(i,n),o=this._positionChanged(n,e);(a||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],o=this._getActiveElements(t,a,e,i),s=this._positionChanged(o,t),l=e||!bf(o,a)||s;return l&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const a=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:a}=this,o=zl[a.position].call(this,t,e);return o!==!1&&(i!==o.x||n!==o.y)}}j(Sy,"positioners",zl);var u5={id:"tooltip",_element:Sy,positioners:zl,afterInit(r,t,e){e&&(r.tooltip=new Sy({chart:r,options:e}))},beforeUpdate(r,t,e){r.tooltip&&r.tooltip.initialize(e)},reset(r,t,e){r.tooltip&&r.tooltip.initialize(e)},afterDraw(r){const t=r.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(r.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(r.ctx),r.notifyPlugins("afterTooltipDraw",e)}},afterEvent(r,t){if(r.tooltip){const e=t.replay;r.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(r,t)=>t.bodyFont.size,boxWidth:(r,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:CL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:r=>r!=="filter"&&r!=="itemSort"&&r!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},h5=Object.freeze({__proto__:null,Colors:SV,Decimation:CV,Filler:$V,Legend:JV,SubTitle:e5,Title:t5,Tooltip:u5});const c5=(r,t,e,i)=>(typeof t=="string"?(e=r.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function f5(r,t,e,i){const n=r.indexOf(t);if(n===-1)return c5(r,t,e,i);const a=r.lastIndexOf(t);return n!==a?e:n}const v5=(r,t)=>r===null?null:Se(Math.round(r),0,t);function b1(r){const t=this.getLabels();return r>=0&&re.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}j(wy,"id","category"),j(wy,"defaults",{ticks:{callback:b1}});function d5(r,t){const e=[],{bounds:n,step:a,min:o,max:s,precision:l,count:u,maxTicks:h,maxDigits:c,includeBounds:f}=r,v=a||1,d=h-1,{min:p,max:g}=t,y=!It(o),m=!It(s),_=!It(u),x=(g-p)/(c+1);let b=gb((g-p)/d/v)*v,S,w,T,M;if(b<1e-14&&!y&&!m)return[{value:p},{value:g}];M=Math.ceil(g/b)-Math.floor(p/b),M>d&&(b=gb(M*b/d/v)*v),It(l)||(S=Math.pow(10,l),b=Math.ceil(b*S)/S),n==="ticks"?(w=Math.floor(p/b)*b,T=Math.ceil(g/b)*b):(w=p,T=g),y&&m&&a&&oN((s-o)/a,b/1e3)?(M=Math.round(Math.min((s-o)/b,h)),b=(s-o)/M,w=o,T=s):_?(w=y?o:w,T=m?s:T,M=u-1,b=(T-w)/M):(M=(T-w)/b,Ql(M,Math.round(M),b/1e3)?M=Math.round(M):M=Math.ceil(M));const C=Math.max(yb(b),yb(w));S=Math.pow(10,It(l)?C:l),w=Math.round(w*S)/S,T=Math.round(T*S)/S;let D=0;for(y&&(f&&w!==o?(e.push({value:o}),ws)break;e.push({value:L})}return m&&f&&T!==s?e.length&&Ql(e[e.length-1].value,s,S1(s,x,r))?e[e.length-1].value=s:e.push({value:s}):(!m||T===s)&&e.push({value:T}),e}function S1(r,t,{horizontal:e,minRotation:i}){const n=Yr(i),a=(e?Math.sin(n):Math.cos(n))||.001,o=.75*t*(""+r).length;return Math.min(t/a,o)}class Lf extends sh{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return It(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:a}=this;const o=l=>n=e?n:l,s=l=>a=i?a:l;if(t){const l=_i(n),u=_i(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(n===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(n-l)}this.min=n,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,o=d5(n,a);return t.bounds==="ticks"&&OD(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return oh(t,this.chart.options.locale,this.options.ticks.format)}}class Ty extends Lf{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ne(t)?t:0,this.max=ne(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Yr(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}j(Ty,"id","linear"),j(Ty,"defaults",{ticks:{callback:Dv.formatters.numeric}});const Du=r=>Math.floor(Sn(r)),sa=(r,t)=>Math.pow(10,Du(r)+t);function w1(r){return r/Math.pow(10,Du(r))===1}function T1(r,t,e){const i=Math.pow(10,e),n=Math.floor(r/i);return Math.ceil(t/i)-n}function p5(r,t){const e=t-r;let i=Du(e);for(;T1(r,t,i)>10;)i++;for(;T1(r,t,i)<10;)i--;return Math.min(i,Du(r))}function g5(r,{min:t,max:e}){t=ur(r.min,t);const i=[],n=Du(t);let a=p5(t,e),o=a<0?Math.pow(10,Math.abs(a)):1;const s=Math.pow(10,a),l=n>a?Math.pow(10,n):0,u=Math.round((t-l)*o)/o,h=Math.floor((t-l)/s/10)*s*10;let c=Math.floor((u-h)/Math.pow(10,a)),f=ur(r.min,Math.round((l+h+c*Math.pow(10,a))*o)/o);for(;f=10?c=c<15?15:20:c++,c>=20&&(a++,c=2,o=a>=0?1:o),f=Math.round((l+h+c*Math.pow(10,a))*o)/o;const v=ur(r.max,f);return i.push({value:v,major:w1(v),significand:c}),i}class My extends sh{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Lf.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return ne(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ne(t)?Math.max(0,t):null,this.max=ne(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ne(this._userMin)&&(this.min=t===sa(this.min,0)?sa(this.min,-1):sa(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const a=s=>i=t?i:s,o=s=>n=e?n:s;i===n&&(i<=0?(a(1),o(10)):(a(sa(i,-1)),o(sa(n,1)))),i<=0&&a(sa(n,-1)),n<=0&&o(sa(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=g5(e,this);return t.bounds==="ticks"&&OD(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":oh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Sn(t),this._valueRange=Sn(this.max)-Sn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Sn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}j(My,"id","logarithmic"),j(My,"defaults",{ticks:{callback:Dv.formatters.logarithmic,major:{enabled:!0}}});function Cy(r){const t=r.ticks;if(t.display&&r.display){const e=ze(t.backdropPadding);return bt(t.font&&t.font.size,Jt.font.size)+e.height}return 0}function y5(r,t,e){return e=jt(e)?e:[e],{w:wN(r,t.string,e),h:e.length*t.lineHeight}}function M1(r,t,e,i,n){return r===i||r===n?{start:t-e/2,end:t+e/2}:rn?{start:t-e,end:t}:{start:t,end:t+e}}function m5(r){const t={l:r.left+r._padding.left,r:r.right-r._padding.right,t:r.top+r._padding.top,b:r.bottom-r._padding.bottom},e=Object.assign({},t),i=[],n=[],a=r._pointLabels.length,o=r.options.pointLabels,s=o.centerPointLabels?Nt/a:0;for(let l=0;lt.r&&(s=(i.end-t.r)/a,r.r=Math.max(r.r,t.r+s)),n.startt.b&&(l=(n.end-t.b)/o,r.b=Math.max(r.b,t.b+l))}function x5(r,t,e){const i=r.drawingArea,{extra:n,additionalAngle:a,padding:o,size:s}=e,l=r.getPointPosition(t,i+n+o,a),u=Math.round(C0(Ee(l.angle+se))),h=M5(l.y,s.h,u),c=w5(u),f=T5(l.x,s.w,c);return{visible:!0,x:l.x,y:h,textAlign:c,left:f,top:h,right:f+s.w,bottom:h+s.h}}function b5(r,t){if(!t)return!0;const{left:e,top:i,right:n,bottom:a}=r;return!(Hi({x:e,y:i},t)||Hi({x:e,y:a},t)||Hi({x:n,y:i},t)||Hi({x:n,y:a},t))}function S5(r,t,e){const i=[],n=r._pointLabels.length,a=r.options,{centerPointLabels:o,display:s}=a.pointLabels,l={extra:Cy(a)/2,additionalAngle:o?Nt/n:0};let u;for(let h=0;h270||e<90)&&(r-=t),r}function C5(r,t,e){const{left:i,top:n,right:a,bottom:o}=e,{backdropColor:s}=t;if(!It(s)){const l=Ja(t.borderRadius),u=ze(t.backdropPadding);r.fillStyle=s;const h=i-u.left,c=n-u.top,f=a-i+u.width,v=o-n+u.height;Object.values(l).some(d=>d!==0)?(r.beginPath(),Cu(r,{x:h,y:c,w:f,h:v,radius:l}),r.fill()):r.fillRect(h,c,f,v)}}function A5(r,t){const{ctx:e,options:{pointLabels:i}}=r;for(let n=t-1;n>=0;n--){const a=r._pointLabelItems[n];if(!a.visible)continue;const o=i.setContext(r.getPointLabelContext(n));C5(e,o,a);const s=de(o.font),{x:l,y:u,textAlign:h}=a;uo(e,r._pointLabels[n],l,u+s.lineHeight/2,s,{color:o.color,textAlign:h,textBaseline:"middle"})}}function AL(r,t,e,i){const{ctx:n}=r;if(e)n.arc(r.xCenter,r.yCenter,t,0,qt);else{let a=r.getPointPosition(0,t);n.moveTo(a.x,a.y);for(let o=1;o{const n=Zt(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?m5(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=qt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Ee(t*e+Yr(i))}getDistanceFromCenterForValue(t){if(It(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(It(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(c!==0||c===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const f=this.getContext(c),v=n.setContext(f),d=a.setContext(f);D5(this,v,l,o,d)}}),i.display){for(t.save(),s=o-1;s>=0;s--){const h=i.setContext(this.getPointLabelContext(s)),{color:c,lineWidth:f}=h;!f||!c||(t.lineWidth=f,t.strokeStyle=c,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),u=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const u=i.setContext(this.getContext(l)),h=de(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=h.string,o=t.measureText(s.label).width,t.fillStyle=u.backdropColor;const c=ze(u.backdropPadding);t.fillRect(-o/2-c.left,-a-h.size/2-c.top,o+c.width,h.size+c.height)}uo(t,s.label,0,-a,h,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}j(Vl,"id","radialLinear"),j(Vl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Dv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),j(Vl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),j(Vl,"descriptors",{angleLines:{_fallback:"grid"}});const Ev={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},nr=Object.keys(Ev);function C1(r,t){return r-t}function A1(r,t){if(It(t))return null;const e=r._adapter,{parser:i,round:n,isoWeekday:a}=r._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),ne(o)||(o=typeof i=="string"?e.parse(o,i):e.parse(o)),o===null?null:(n&&(o=n==="week"&&(_s(a)||a===!0)?e.startOf(o,"isoWeek",a):e.startOf(o,n)),+o)}function D1(r,t,e,i){const n=nr.length;for(let a=nr.indexOf(r);a=nr.indexOf(e);a--){const o=nr[a];if(Ev[o].common&&r._adapter.diff(n,i,o)>=t-1)return o}return nr[e?nr.indexOf(e):0]}function P5(r){for(let t=nr.indexOf(r)+1,e=nr.length;t=t?e[i]:e[n];r[a]=!0}}function k5(r,t,e,i){const n=r._adapter,a=+n.startOf(t[0].value,i),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+n.add(s,1,i))l=e[s],l>=0&&(t[l].major=!0);return t}function I1(r,t,e){const i=[],n={},a=t.length;let o,s;for(o=0;o+t.value))}initOffsets(t=[]){let e=0,i=0,n,a;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=Se(e,0,o),i=Se(i,0,o),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,a=n.time,o=a.unit||D1(a.minUnit,e,i,this._getLabelCapacity(e)),s=bt(n.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,u=_s(l)||l===!0,h={};let c=e,f,v;if(u&&(c=+t.startOf(c,"isoWeek",l)),c=+t.startOf(c,u?"day":o),t.diff(i,e,o)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const d=n.ticks.source==="data"&&this.getDataTimestamps();for(f=c,v=0;f+p)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,a=this._unit,o=e||n[a];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,n){const a=this.options,o=a.ticks.callback;if(o)return Zt(o,[t,e,i],this);const s=a.time.displayFormats,l=this._unit,u=this._majorUnit,h=l&&s[l],c=u&&s[u],f=i[e],v=u&&c&&f&&f.major;return this._adapter.format(t,n||(v?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e=r[i].pos&&t<=r[n].pos&&({lo:i,hi:n}=Gi(r,"pos",t)),{pos:a,time:s}=r[i],{pos:o,time:l}=r[n]):(t>=r[i].time&&t<=r[n].time&&({lo:i,hi:n}=Gi(r,"time",t)),{time:a,pos:s}=r[i],{time:o,pos:l}=r[n]);const u=o-a;return u?s+(l-s)*(t-a)/u:s}class Dy extends Ay{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Wh(e,this.min),this._tableRange=Wh(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],a=[];let o,s,l,u,h;for(o=0,s=t.length;o=e&&u<=i&&n.push(u);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;on-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Wh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Wh(this._table,i*this._tableRange+this._minPos,!0)}}j(Dy,"id","timeseries"),j(Dy,"defaults",Ay.defaults);var R5=Object.freeze({__proto__:null,CategoryScale:wy,LinearScale:Ty,LogarithmicScale:My,RadialLinearScale:Vl,TimeScale:Ay,TimeSeriesScale:Dy});const Prt=[VB,pV,h5,R5],DL="label";function P1(r,t){typeof r=="function"?r(t):r&&(r.current=t)}function E5(r,t){const e=r.options;e&&t&&Object.assign(e,t)}function LL(r,t){r.labels=t}function IL(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DL;const i=[];r.datasets=t.map(n=>{const a=r.datasets.find(o=>o[e]===n[e]);return!a||!n.data||i.includes(a)?{...n}:(i.push(a),Object.assign(a,n),a)})}function O5(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:DL;const e={labels:[],datasets:[]};return LL(e,r.labels),IL(e,r.datasets,t),e}function N5(r,t){const{height:e=150,width:i=300,redraw:n=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:u=[],fallbackContent:h,updateMode:c,...f}=r,v=Wr.useRef(null),d=Wr.useRef(null),p=()=>{v.current&&(d.current=new B0(v.current,{type:o,data:O5(s,a),options:l&&{...l},plugins:u}),P1(t,d.current))},g=()=>{P1(t,null),d.current&&(d.current.destroy(),d.current=null)};return Wr.useEffect(()=>{!n&&d.current&&l&&E5(d.current,l)},[n,l]),Wr.useEffect(()=>{!n&&d.current&&LL(d.current.config.data,s.labels)},[n,s.labels]),Wr.useEffect(()=>{!n&&d.current&&s.datasets&&IL(d.current.config.data,s.datasets,a)},[n,s.datasets]),Wr.useEffect(()=>{d.current&&(n?(g(),setTimeout(p)):d.current.update(c))},[n,l,s.labels,s.datasets,c]),Wr.useEffect(()=>{d.current&&(g(),setTimeout(p))},[o]),Wr.useEffect(()=>(p(),()=>g()),[]),b0.createElement("canvas",{ref:v,role:"img",height:e,width:i,...f},h)}const B5=Wr.forwardRef(N5);function Ov(r,t){return B0.register(t),Wr.forwardRef((e,i)=>b0.createElement(B5,{...e,ref:i,type:r}))}const krt=Ov("line",iu),Rrt=Ov("bar",ru),Ert=Ov("doughnut",Tn),Ort=Ov("pie",Cf);/*! ***************************************************************************** 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 Ly=function(r,t){return Ly=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Ly(r,t)};function E(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ly(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Iy=function(){return Iy=Object.assign||function(t){for(var e,i=1,n=arguments.length;i"u"&&typeof self<"u"?mt.worker=!0:!mt.hasGlobalWindow||"Deno"in window?(mt.node=!0,mt.svgSupported=!0):F5(navigator.userAgent,mt);function F5(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var V0=12,PL="sans-serif",Yn=V0+"px "+PL,G5=20,H5=100,W5="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function U5(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function fF(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),c=2*u,f=h.left,v=h.top;o.push(f,v),l=l&&a&&f===a[c]&&v===a[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?R1(s,o):R1(o,s))}function WL(r){return r.nodeName.toUpperCase()==="CANVAS"}var vF=/([&<>"'])/g,dF={"&":"&","<":"<",">":">",'"':""","'":"'"};function Oe(r){return r==null?"":(r+"").replace(vF,function(t,e){return dF[e]})}var pF=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yd=[],gF=mt.browser.firefox&&+mt.browser.version.split(".")[0]<39;function Oy(r,t,e,i){return e=e||{},i?O1(r,t,e):gF&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):O1(r,t,e),e}function O1(r,t,e){if(mt.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(WL(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Ey(Yd,r,i,n)){e.zrX=Yd[0],e.zrY=Yd[1];return}}e.zrX=e.zrY=0}function $0(r){return r||window.event}function Sr(r,t,e){if(t=$0(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Oy(r,o,t,e)}else{Oy(r,t,t,e);var a=yF(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&pF.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function yF(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function Ny(r,t,e,i){r.addEventListener(t,e,i)}function mF(r,t,e,i){r.removeEventListener(t,e,i)}var qi=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function N1(r){return r.which===2||r.which===3}var _F=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&i&&i.length>1){var a=B1(i)/B1(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=xF(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function or(){return[1,0,0,1,0,0]}function hh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Gv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function bi(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function ti(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Qn(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],h=Math.sin(e),c=Math.cos(e);return r[0]=n*c+s*h,r[1]=-n*h+s*c,r[2]=a*c+l*h,r[3]=-a*h+c*l,r[4]=c*(o-i[0])+h*(u-i[1])+i[0],r[5]=c*(u-i[1])-h*(o-i[0])+i[1],r}function Hv(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function bo(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}function UL(r){var t=or();return Gv(t,r),t}const bF=Object.freeze(Object.defineProperty({__proto__:null,clone:UL,copy:Gv,create:or,identity:hh,invert:bo,mul:bi,rotate:Qn,scale:Hv,translate:ti},Symbol.toStringTag,{value:"Module"}));var ct=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r}(),Yh=Math.min,$h=Math.max,la=new ct,ua=new ct,ha=new ct,ca=new ct,al=new ct,ol=new ct,ft=function(){function r(t,e,i,n){i<0&&(t=t+i,i=-i),n<0&&(e=e+n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return r.prototype.union=function(t){var e=Yh(t.x,this.x),i=Yh(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$h(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=$h(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=or();return ti(a,a,[-e.x,-e.y]),Hv(a,a,[i,n]),ti(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,h=t.y,c=t.y+t.height,f=!(ad&&(d=_,pd&&(d=x,y=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}la.x=ha.x=e.x,la.y=ca.y=e.y,ua.x=ca.x=e.x+e.width,ua.y=ha.y=e.y+e.height,la.transform(i),ca.transform(i),ua.transform(i),ha.transform(i),t.x=Yh(la.x,ua.x,ha.x,ca.x),t.y=Yh(la.y,ua.y,ha.y,ca.y);var l=$h(la.x,ua.x,ha.x,ca.x),u=$h(la.y,ua.y,ha.y,ca.y);t.width=l-t.x,t.height=u-t.y},r}(),YL="silent";function SF(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:wF}}function wF(){qi(this.event)}var TF=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Rr),sl=function(){function r(t,e){this.x=t,this.y=e}return r}(),MF=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xd=new ft(0,0,0,0),$L=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new sl(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new TF,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new lF(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(A(MF,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=XL(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new sl(i,n):this.findHover(i,n),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new sl(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=SF(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new sl(e,i);if(z1(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new ft(e-u,i-u,l,l),c=a.length-1;c>=0;c--){var f=a[c];f!==n&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Xd.copy(f.getBoundingRect()),f.transform&&Xd.applyTransform(f.transform),Xd.intersect(h)&&s.push(f))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function CF(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?YL:!0}return!1}function z1(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=CF(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==YL)){t.target=o;break}}}function XL(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var ZL=32,ll=7;function AF(r){for(var t=0;r>=ZL;)t|=r&1,r>>=1;return r+t}function V1(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function DF(r,t,e){for(e--;t>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Zd(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(r,t[e+h])>0?o=h+1:l=h}return l}function jd(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(r,t[e+h])<0?l=h:o=h+1}return l}function LF(r,t){var e=ll,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]n[v+1])break;h(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]=ll||w>=ll);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[S+y]=r[b+y];r[x]=o[_];return}for(var w=e;;){var T=0,M=0,C=!1;do if(t(o[_],r[m])<0){if(r[x--]=r[m--],T++,M=0,--d===0){C=!0;break}}else if(r[x--]=o[_--],M++,T=0,--g===1){C=!0;break}while((T|M)=0;y--)r[S+y]=r[b+y];if(d===0){C=!0;break}}if(r[x--]=o[_--],--g===1){C=!0;break}if(M=g-Zd(r[m],o,0,g,g-1,t),M!==0){for(x-=M,_-=M,g-=M,S=x+1,b=_+1,y=0;y=ll||M>=ll);if(C)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(x-=d,m-=d,S=x+1,b=m+1,y=d-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_]}else{if(g===0)throw new Error;for(b=x-(g-1),y=0;ys&&(l=s),F1(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var hr=1,Fl=2,ts=4,G1=!1;function qd(){G1||(G1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function H1(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var IF=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=H1}return r.prototype.traverse=function(t,e){for(var i=0;i0&&(h.__clipPaths=[]),isNaN(h.z)&&(qd(),h.z=0),isNaN(h.z2)&&(qd(),h.z2=0),isNaN(h.zlevel)&&(qd(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,i);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,e,i);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),Rf;Rf=mt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var lu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-lu.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?lu.bounceIn(r*2)*.5:lu.bounceOut(r*2-1)*.5+.5}},Xh=Math.pow,Nn=Math.sqrt,Ef=1e-8,jL=1e-4,W1=Nn(3),Zh=1/3,di=Jn(),Cr=Jn(),cs=Jn();function Dn(r){return r>-Ef&&rEf||r<-Ef}function ve(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function U1(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function Of(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,h=s*s-3*o*l,c=s*l-9*o*u,f=l*l-3*s*u,v=0;if(Dn(h)&&Dn(c))if(Dn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=c*c-4*h*f;if(Dn(p)){var g=c/h,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y)}else if(p>0){var m=Nn(p),_=h*s+1.5*o*(-c+m),x=h*s+1.5*o*(-c-m);_<0?_=-Xh(-_,Zh):_=Xh(_,Zh),x<0?x=-Xh(-x,Zh):x=Xh(x,Zh);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*h*s-3*o*c)/(2*Nn(h*h*h)),S=Math.acos(b)/3,w=Nn(h),T=Math.cos(S),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+W1*Math.sin(S)))/(3*o),M=(-s+w*(T-W1*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[v++]=d),y>=0&&y<=1&&(a[v++]=y),M>=0&&M<=1&&(a[v++]=M)}}return v}function KL(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Dn(o)){if(qL(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var h=a*a-4*o*s;if(Dn(h))n[0]=-a/(2*o);else if(h>0){var c=Nn(h),u=(-a+c)/(2*o),f=(-a-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function $n(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,h=(l-s)*n+s,c=(h-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function JL(r,t,e,i,n,a,o,s,l,u,h){var c,f=.005,v=1/0,d,p,g,y;di[0]=l,di[1]=u;for(var m=0;m<1;m+=.05)Cr[0]=ve(r,e,n,o,m),Cr[1]=ve(t,i,a,s,m),g=On(di,Cr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var h=o*o-4*a*s;if(Dn(h)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(h>0){var c=Nn(h),u=(-o+c)/(2*a),f=(-o-c)/(2*a);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function QL(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function Pu(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function t2(r,t,e,i,n,a,o,s,l){var u,h=.005,c=1/0;di[0]=o,di[1]=s;for(var f=0;f<1;f+=.05){Cr[0]=be(r,e,n,f),Cr[1]=be(t,i,a,f);var v=On(di,Cr);v=0&&v=1?1:Of(0,i,a,1,l,s)&&ve(0,n,o,1,s[0])}}}var OF=function(){function r(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||ee,this.ondestroy=t.ondestroy||ee,this.onrestart=t.onrestart||ee,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Q(t)?t:lu[t]||X0(t)},r}(),e2=function(){function r(t){this.value=t}return r}(),NF=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new e2(t);return this.insertEntry(e),e},r.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++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),ch=function(){function r(t){this._list=new NF,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new e2(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Y1={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 qr(r){return r=Math.round(r),r<0?0:r>255?255:r}function BF(r){return r=Math.round(r),r<0?0:r>360?360:r}function ku(r){return r<0?0:r>1?1:r}function Kd(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?qr(parseFloat(t)/100*255):qr(parseInt(t,10))}function to(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ku(parseFloat(t)/100):ku(parseFloat(t))}function Jd(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Ln(r,t,e){return r+(t-r)*e}function br(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function zy(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var r2=new ch(20),jh=null;function ko(r,t){jh&&zy(jh,t),jh=r2.put(r,jh||t.slice())}function Ze(r,t){if(r){t=t||[];var e=r2.get(r);if(e)return zy(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Y1)return zy(t,Y1[i]),ko(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){br(t,0,0,0,1);return}return br(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),ko(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){br(t,0,0,0,1);return}return br(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),ko(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?br(t,+u[0],+u[1],+u[2],1):br(t,0,0,0,1);h=to(u.pop());case"rgb":if(u.length>=3)return br(t,Kd(u[0]),Kd(u[1]),Kd(u[2]),u.length===3?h:to(u[3])),ko(r,t),t;br(t,0,0,0,1);return;case"hsla":if(u.length!==4){br(t,0,0,0,1);return}return u[3]=to(u[3]),Vy(u,t),ko(r,t),t;case"hsl":if(u.length!==3){br(t,0,0,0,1);return}return Vy(u,t),ko(r,t),t;default:return}}br(t,0,0,0,1)}}function Vy(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=to(r[1]),n=to(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],br(t,qr(Jd(o,a,e+1/3)*255),qr(Jd(o,a,e)*255),qr(Jd(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function zF(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var h=((a-t)/6+o/2)/o,c=((a-e)/6+o/2)/o,f=((a-i)/6+o/2)/o;t===a?l=f-c:e===a?l=1/3+h-f:i===a&&(l=2/3+c-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function Nf(r,t){var e=Ze(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return Kr(e,e.length===4?"rgba":"rgb")}}function VF(r){var t=Ze(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function uu(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=qr(Ln(o[0],s[0],l)),e[1]=qr(Ln(o[1],s[1],l)),e[2]=qr(Ln(o[2],s[2],l)),e[3]=ku(Ln(o[3],s[3],l)),e}}var FF=uu;function Z0(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Ze(t[n]),s=Ze(t[a]),l=i-n,u=Kr([qr(Ln(o[0],s[0],l)),qr(Ln(o[1],s[1],l)),qr(Ln(o[2],s[2],l)),ku(Ln(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var GF=Z0;function fs(r,t,e,i){var n=Ze(r);if(r)return n=zF(n),t!=null&&(n[0]=BF(t)),e!=null&&(n[1]=to(e)),i!=null&&(n[2]=to(i)),Kr(Vy(n),"rgba")}function Ru(r,t){var e=Ze(r);if(e&&t!=null)return e[3]=ku(t),Kr(e,"rgba")}function Kr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Eu(r,t){var e=Ze(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function HF(){return Kr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var $1=new ch(100);function Bf(r){if(Y(r)){var t=$1.get(r);return t||(t=Nf(r,-.1),$1.put(r,t)),t}else if(lh(r)){var e=z({},r);return e.colorStops=F(r.colorStops,function(i){return{offset:i.offset,color:Nf(i.color,-.1)}}),e}return r}const WF=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:uu,fastMapToColor:FF,lerp:Z0,lift:Nf,liftColor:Bf,lum:Eu,mapToColor:GF,modifyAlpha:Ru,modifyHSL:fs,parse:Ze,random:HF,stringify:Kr,toHex:VF},Symbol.toStringTag,{value:"Module"}));var zf=Math.round;function Ou(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Ze(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var X1=1e-4;function In(r){return r-X1}function qh(r){return zf(r*1e3)/1e3}function Fy(r){return zf(r*1e4)/1e4}function UF(r){return"matrix("+qh(r[0])+","+qh(r[1])+","+qh(r[2])+","+qh(r[3])+","+Fy(r[4])+","+Fy(r[5])+")"}var YF={left:"start",right:"end",center:"middle",middle:"middle"};function $F(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function XF(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function ZF(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function i2(r){return r&&!!r.image}function jF(r){return r&&!!r.svgElement}function j0(r){return i2(r)||jF(r)}function n2(r){return r.type==="linear"}function a2(r){return r.type==="radial"}function o2(r){return r&&(r.type==="linear"||r.type==="radial")}function Wv(r){return"url(#"+r+")"}function s2(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function l2(r){var t=r.x||0,e=r.y||0,i=(r.rotation||0)*au,n=lt(r.scaleX,1),a=lt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(o||s)&&l.push("skew("+zf(o*au)+"deg, "+zf(s*au)+"deg)"),l.join(" ")}var qF=function(){return mt.hasGlobalWindow&&Q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Gy=Array.prototype.slice;function Bi(r,t,e){return(t-r)*e+r}function Qd(r,t,e,i){for(var n=t.length,a=0;ai?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=j1,l=e;if(Me(e)){var u=tG(e);s=u,(u===1&&!Mt(e[0])||u===2&&!Mt(e[0][0]))&&(o=!0)}else if(Mt(e)&&!Ss(e))s=Jh;else if(Y(e))if(!isNaN(+e))s=Jh;else{var h=Ze(e);h&&(l=h,s=Gl)}else if(lh(e)){var c=z({},l);c.colorStops=F(e.colorStops,function(v){return{offset:v.offset,color:Ze(v.color)}}),n2(e)?s=Hy:a2(e)&&(s=Wy),l=c}a===0?this.valType=s:(s!==this.valType||s===j1)&&(o=!0),this.discrete=this.discrete||o;var f={time:t,value:l,rawValue:e,percent:0};return i&&(f.easing=i,f.easingFunc=Q(i)?i:lu[i]||X0(i)),n.push(f),f},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(p,g){return p.time-g.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Qh(n),u=q1(n),h=0;h=0&&!(o[h].percent<=e);h--);h=f(h,s-2)}else{for(h=c;he);h++);h=f(h-1,s-2)}d=o[h+1],v=o[h]}if(v&&d){this._lastFr=h,this._lastFrP=e;var g=d.percent-v.percent,y=g===0?1:f((e-v.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=i?this._additiveValue:u?ul:t[l];if((Qh(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:d.rawValue;else if(Qh(a))a===nf?Qd(m,v[n],d[n],y):KF(m,v[n],d[n],y);else if(q1(a)){var _=v[n],x=d[n],b=a===Hy;t[l]={type:b?"linear":"radial",x:Bi(_.x,x.x,y),y:Bi(_.y,x.y,y),colorStops:F(_.colorStops,function(w,T){var M=x.colorStops[T];return{offset:Bi(w.offset,M.offset,y),color:rf(Qd([],w.color,M.color,y))}}),global:x.global},b?(t[l].x2=Bi(_.x2,x.x2,y),t[l].y2=Bi(_.y2,x.y2,y)):t[l].r=Bi(_.r,x.r,y)}else if(u)Qd(m,v[n],d[n],y),i||(t[l]=rf(m));else{var S=Bi(v[n],d[n],y);i?this._additiveValue=S:t[l]=S}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===Jh?t[i]=t[i]+n:e===Gl?(Ze(t[i],ul),Kh(ul,ul,n,1),t[i]=rf(ul)):e===nf?Kh(t[i],t[i],n,1):e===u2&&Z1(t[i],t[i],n,1)},r}(),q0=function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Bv("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,xt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,hu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,hu(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function as(){return new Date().getTime()}var rG=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=as()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(Rf(i),!e._paused&&e.update())}Rf(i)},t.prototype.start=function(){this._running||(this._time=as(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=as(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=as()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new q0(e,i.loop);return this.addAnimator(n),n},t}(Rr),iG=300,tp=mt.domSupported,ep=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=F(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}}(),K1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},J1=!1;function Uy(r){var t=r.pointerType;return t==="pen"||t==="touch"}function nG(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function rp(r){r&&(r.zrByTouch=!0)}function aG(r,t){return Sr(r.dom,new oG(r,t),!0)}function h2(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var oG=function(){function r(t,e){this.stopPropagation=ee,this.stopImmediatePropagation=ee,this.preventDefault=ee,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Gr={mousedown:function(r){r=Sr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Sr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Sr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Sr(this.dom,r);var t=r.toElement||r.relatedTarget;h2(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){J1=!0,r=Sr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){J1||(r=Sr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Sr(this.dom,r),rp(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Gr.mousemove.call(this,r),Gr.mousedown.call(this,r)},touchmove:function(r){r=Sr(this.dom,r),rp(r),this.handler.processGesture(r,"change"),Gr.mousemove.call(this,r)},touchend:function(r){r=Sr(this.dom,r),rp(r),this.handler.processGesture(r,"end"),Gr.mouseup.call(this,r),+new Date-+this.__lastTouchMomenteS||r<-eS}var va=[],Ro=[],np=or(),ap=Math.abs,$i=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return fa(this.rotation)||fa(this.x)||fa(this.y)||fa(this.scaleX-1)||fa(this.scaleY-1)||fa(this.skewX)||fa(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(tS(i),this.invTransform=null);return}i=i||or(),e?this.getLocalTransform(i):tS(i),t&&(e?bi(i,t,i):Gv(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(va);var i=va[0]<0?-1:1,n=va[1]<0?-1:1,a=((va[0]-i)*e+i)/va[0]||0,o=((va[1]-n)*e+n)/va[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||or(),bo(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||or(),bi(Ro,t.invTransform,e),e=Ro);var i=this.originX,n=this.originY;(i||n)&&(np[4]=i,np[5]=n,bi(Ro,e,np),Ro[4]-=i,Ro[5]-=n,e=Ro),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&we(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&we(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&ap(t[0]-1)>1e-10&&ap(t[3]-1)>1e-10?Math.sqrt(ap(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){f2(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,f=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,p=n+l;e[4]=-d*a-f*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=f*o,u&&Qn(e,e,u),e[4]+=i+h,e[5]+=n+c,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Ti=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f2(r,t){for(var e=0;e=0?parseFloat(r)/100*t:parseFloat(r):r}function Ff(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,h="left",c="top";if(i instanceof Array)l+=ei(i[0],e.width),u+=ei(i[1],e.height),h=null,c=null;else switch(i){case"left":l-=n,u+=s,h="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+n,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=n,h="center";break;case"insideBottom":l+=o/2,u+=a-n,h="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,h="right";break;case"insideBottomLeft":l+=n,u+=a-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,h="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=h,r.verticalAlign=c,r}var op="__zr_normal__",sp=Ti.concat(["ignore"]),cG=Pr(Ti,function(r,t){return r[t]=!0,r},{ignore:!1}),Eo={},fG=new ft(0,0,0,0),Yv=function(){function r(t){this.id=H0(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(e),i.position!=null){var h=fG;i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Eo,i,h):Ff(Eo,i,h),a.x=Eo.x,a.y=Eo.y,o=Eo.align,s=Eo.verticalAlign;var c=i.origin;if(c&&i.rotation!=null){var f=void 0,v=void 0;c==="center"?(f=h.width*.5,v=h.height*.5):(f=ei(c[0],h.width),v=ei(c[1],h.height)),u=!0,a.originX=-a.x+f+(n?0:h.x),a.originY=-a.y+v+(n?0:h.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=hr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Zy:Xy},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Ze(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Kr(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},z(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(et(t))for(var i=t,n=xt(i),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(op,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===op,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(vt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Bv("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,f=this._textGuide;return c&&c.useState(t,e,i,h),f&&f.useState(t,e,i,h),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~hr),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,f),g&&g.useStates(t,e,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~hr)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=vt(n,t),o=vt(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var f=0;f0||n.force&&!o.length){var T=void 0,M=void 0,C=void 0;if(s){M={},f&&(T={});for(var x=0;x<_;x++){var y=p[x];M[y]=e[y],f?T[y]=i[y]:e[y]=i[y]}}else if(f){C={};for(var x=0;x<_;x++){var y=p[x];C[y]=hu(e[y]),dG(e,i,y)}}var b=new q0(e,!1,!1,c?Dt(d,function(L){return L.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),f&&T&&b.whenWithKeys(0,T,p),C&&b.whenWithKeys(0,C,p),b.whenWithKeys(u??500,s?M:i,p).delay(h||0),r.addAnimator(b,t),o.push(b)}}var at=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,n=0;n=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=vt(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=vt(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function U(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Y(r)?MG(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Qt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),y2),r=(+r).toFixed(t),e?r:+r}function fr(r){return r.sort(function(t,e){return t-e}),r}function $r(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return m2(r)}function m2(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function K0(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function CG(r,t,e){if(!r[t])return 0;var i=_2(r,e);return i[t]||0}function _2(r,t){var e=Pr(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var i=Math.pow(10,t),n=F(r,function(v){return(isNaN(v)?0:v)/e*i*100}),a=i*100,o=F(n,function(v){return Math.floor(v)}),s=Pr(o,function(v,d){return v+d},0),l=F(n,function(v,d){return v-o[d]});su&&(u=l[c],h=c);++o[h],l[h]=0,++s}return F(o,function(v){return v/i})}function AG(r,t){var e=Math.max($r(r),$r(t)),i=r+t;return e>y2?i:Qt(i,e)}var Ky=9007199254740991;function J0(r){var t=Math.PI*2;return(r%t+t)%t}function Ts(r){return r>-nS&&r=10&&t++,t}function Q0(r,t){var e=$v(r),i=Math.pow(10,e),n=r/i,a;return t?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function sf(r,t){var e=(r.length-1)*t+1,i=Math.floor(e),n=+r[i-1],a=e-i;return a?n+a*(r[i]-n):n}function Jy(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i=0||a&&vt(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var JG=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],QG=vo(JG),t3=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return QG(this,t,e)},r}(),tm=new ch(50);function e3(r){if(typeof r=="string"){var t=tm.get(r);return t&&t.image}else return r}function n_(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=tm.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!Zv(t)&&a.pending.push(o)):(t=Qr.loadImage(r,lS,lS),t.__zrImageSrc=r,tm.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function lS(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=dr(e,t);return u>s&&(e="",u=0),s=r-u,n.ellipsis=e,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function R2(r,t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=dr(t,n);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?i3(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=dr(t,n)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function i3(r,t,e,i){for(var n=0,a=0,o=r.length;ad&&u){var p=Math.floor(d/s);h=h||f.length>p,f=f.slice(0,p)}if(r&&a&&c!=null)for(var g=k2(c,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},m=0;ms&&cp(e,r.substring(s,u),t,o),cp(e,l[2],t,o,l[1]),s=hp.lastIndex}sn){var I=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),y(_,b,x),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m),e.isTruncated=e.isTruncated||e.lines.length0&&d+i.accumWidth>i.width&&(h=t.split(` `),u=!0),i.accumWidth=d}else{var p=E2(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,c=p.linesWidths,h=p.lines}}else h=t.split(` `);for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var u3=Pr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function h3(r){return l3(r)?!!u3[r]:!0}function E2(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;ce:n+h+v>e){h?(s||l)&&(d?(s||(s=l,l="",u=0,h=u),a.push(s),o.push(h-u),l+=f,u+=v,s="",h=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=f,h=v)):d?(a.push(l),o.push(u),l=f,u=v):(a.push(f),o.push(v));continue}h+=v,d?(l+=f,u+=v):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),a.length===1&&(h+=n),{accumWidth:h,lines:a,linesWidths:o}}var em="__zr_style_"+Math.round(Math.random()*10),eo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},jv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};eo[em]=!0;var hS=["z","z2","invisible"],c3=["invisible"],kr=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=xt(e),n=0;n1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(tc[0]=pp(n)*e+r,tc[1]=dp(n)*i+t,ec[0]=pp(a)*e+r,ec[1]=dp(a)*i+t,u(s,tc,ec),h(l,tc,ec),n=n%pa,n<0&&(n=n+pa),a=a%pa,a<0&&(a=a+pa),n>a&&!o?a+=pa:nn&&(rc[0]=pp(v)*e+r,rc[1]=dp(v)*i+t,u(s,rc,s),h(l,rc,l))}var Ft={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ga=[],ya=[],ni=[],ln=[],ai=[],oi=[],gp=Math.min,yp=Math.max,ma=Math.cos,_a=Math.sin,ki=Math.abs,rm=Math.PI,yn=rm*2,mp=typeof Float32Array<"u",hl=[];function _p(r){var t=Math.round(r/rm*1e8)/1e8;return t%2*rm}function a_(r,t){var e=_p(r[0]);e<0&&(e+=yn);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=yn?n=e+yn:t&&e-n>=yn?n=e-yn:!t&&e>n?n=e+(yn-_p(e-n)):t&&e0&&(this._ux=ki(i/Vf/t)||0,this._uy=ki(i/Vf/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ft.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=ki(t-this._xi),n=ki(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Ft.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(Ft.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Ft.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),hl[0]=n,hl[1]=a,a_(hl,o),n=hl[0],a=hl[1];var s=a-n;return this.addData(Ft.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=ma(a)*i+t,this._yi=_a(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ft.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ft.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&mp&&(this.data=new Float32Array(e));for(var i=0;ih.length&&(this._expandData(),h=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){ni[0]=ni[1]=ai[0]=ai[1]=Number.MAX_VALUE,ln[0]=ln[1]=oi[0]=oi[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;oi||ki(_)>n||f===e-1)&&(p=Math.sqrt(m*m+_*_),a=g,o=y);break}case Ft.C:{var x=t[f++],b=t[f++],g=t[f++],y=t[f++],S=t[f++],w=t[f++];p=PF(a,o,x,b,g,y,S,w,10),a=S,o=w;break}case Ft.Q:{var x=t[f++],b=t[f++],g=t[f++],y=t[f++];p=RF(a,o,x,b,g,y,10),a=g,o=y;break}case Ft.A:var T=t[f++],M=t[f++],C=t[f++],D=t[f++],L=t[f++],I=t[f++],P=I+L;f+=1,d&&(s=ma(L)*C+T,l=_a(L)*D+M),p=yp(C,D)*gp(yn,Math.abs(I)),a=ma(P)*C+T,o=_a(P)*D+M;break;case Ft.R:{s=a=t[f++],l=o=t[f++];var k=t[f++],R=t[f++];p=k*2+R*2;break}case Ft.Z:{var m=s-a,_=l-o;p=Math.sqrt(m*m+_*_),a=s,o=l;break}}p>=0&&(u[c++]=p,h+=p)}return this._pathLen=h,h},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,h,c,f,v=e<1,d,p,g=0,y=0,m,_=0,x,b;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var S=0;S0&&(t.lineTo(x,b),_=0),w){case Ft.M:s=u=i[S++],l=h=i[S++],t.moveTo(u,h);break;case Ft.L:{c=i[S++],f=i[S++];var M=ki(c-u),C=ki(f-h);if(M>n||C>a){if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+c*L,h*(1-L)+f*L);break t}g+=D}t.lineTo(c,f),u=c,h=f,_=0}else{var I=M*M+C*C;I>_&&(x=c,b=f,_=I)}break}case Ft.C:{var P=i[S++],k=i[S++],R=i[S++],N=i[S++],O=i[S++],B=i[S++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;$n(u,P,R,O,L,ga),$n(h,k,N,B,L,ya),t.bezierCurveTo(ga[1],ya[1],ga[2],ya[2],ga[3],ya[3]);break t}g+=D}t.bezierCurveTo(P,k,R,N,O,B),u=O,h=B;break}case Ft.Q:{var P=i[S++],k=i[S++],R=i[S++],N=i[S++];if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;Pu(u,P,R,L,ga),Pu(h,k,N,L,ya),t.quadraticCurveTo(ga[1],ya[1],ga[2],ya[2]);break t}g+=D}t.quadraticCurveTo(P,k,R,N),u=R,h=N;break}case Ft.A:var G=i[S++],H=i[S++],W=i[S++],q=i[S++],K=i[S++],nt=i[S++],Ct=i[S++],te=!i[S++],dt=W>q?W:q,rt=ki(W-q)>.001,gt=K+nt,J=!1;if(v){var D=d[y++];g+D>m&&(gt=K+nt*(m-g)/D,J=!0),g+=D}if(rt&&t.ellipse?t.ellipse(G,H,W,q,Ct,K,gt,te):t.arc(G,H,dt,K,gt,te),J)break t;T&&(s=ma(K)*W+G,l=_a(K)*q+H),u=ma(gt)*W+G,h=_a(gt)*q+H;break;case Ft.R:s=u=i[S],l=h=i[S+1],c=i[S++],f=i[S++];var st=i[S++],Ht=i[S++];if(v){var D=d[y++];if(g+D>m){var Et=m-g;t.moveTo(c,f),t.lineTo(c+gp(Et,st),f),Et-=st,Et>0&&t.lineTo(c+st,f+gp(Et,Ht)),Et-=Ht,Et>0&&t.lineTo(c+yp(st-Et,0),f+Ht),Et-=st,Et>0&&t.lineTo(c,f+yp(Ht-Et,0));break t}g+=D}t.rect(c,f,st,Ht);break;case Ft.Z:if(v){var D=d[y++];if(g+D>m){var L=(m-g)/D;t.lineTo(u*(1-L)+s*L,h*(1-L)+l*L);break t}g+=D}t.closePath(),u=s,h=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=Ft,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function _n(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||or+s&&a>e+s||at+c&&h>i+c&&h>a+c&&h>s+c||hr+c&&u>e+c&&u>n+c&&u>o+c||ut+u&&l>i+u&&l>a+u||lr+u&&s>e+u&&s>n+u||se||h+un&&(n+=cl);var f=Math.atan2(l,s);return f<0&&(f+=cl),f>=i&&f<=n||f+cl>=i&&f+cl<=n}function zi(r,t,e,i,n,a){if(a>t&&a>i||an?s:0}var un=Ci.CMD,xa=Math.PI*2,m3=1e-4;function _3(r,t){return Math.abs(r-t)t&&u>i&&u>a&&u>s||u1&&x3(),v=ve(t,i,a,s,Tr[0]),f>1&&(d=ve(t,i,a,s,Tr[1]))),f===2?gt&&s>i&&s>a||s=0&&u<=1){for(var h=0,c=be(t,i,a,u),f=0;fe||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Ye[0]=-l,Ye[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=xa-1e-4){i=0,n=xa;var h=a?1:-1;return o>=Ye[0]+r&&o<=Ye[1]+r?h:0}if(i>n){var c=i;i=n,n=c}i<0&&(i+=xa,n+=xa);for(var f=0,v=0;v<2;v++){var d=Ye[v];if(d+r>o){var p=Math.atan2(s,d),h=a?1:-1;p<0&&(p=xa+p),(p>=i&&p<=n||p+xa>=i&&p+xa<=n)&&(p>Math.PI/2&&p1&&(e||(s+=zi(l,u,h,c,i,n))),g&&(l=a[d],u=a[d+1],h=l,c=u),p){case un.M:h=a[d++],c=a[d++],l=h,u=c;break;case un.L:if(e){if(_n(l,u,a[d],a[d+1],t,i,n))return!0}else s+=zi(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.C:if(e){if(g3(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=b3(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.Q:if(e){if(O2(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=S3(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case un.A:var y=a[d++],m=a[d++],_=a[d++],x=a[d++],b=a[d++],S=a[d++];d+=1;var w=!!(1-a[d++]);f=Math.cos(b)*_+y,v=Math.sin(b)*x+m,g?(h=f,c=v):s+=zi(l,u,f,v,i,n);var T=(i-y)*x/_+y;if(e){if(y3(y,m,x,b,b+S,w,t,T,n))return!0}else s+=w3(y,m,x,b,b+S,w,T,n);l=Math.cos(b+S)*_+y,u=Math.sin(b+S)*x+m;break;case un.R:h=l=a[d++],c=u=a[d++];var M=a[d++],C=a[d++];if(f=h+M,v=c+C,e){if(_n(h,c,f,c,t,i,n)||_n(f,c,f,v,t,i,n)||_n(f,v,h,v,t,i,n)||_n(h,v,h,c,t,i,n))return!0}else s+=zi(f,c,f,v,i,n),s+=zi(h,v,h,c,i,n);break;case un.Z:if(e){if(_n(l,u,h,c,t,i,n))return!0}else s+=zi(l,u,h,c,i,n);l=h,u=c;break}}return!e&&!_3(u,c)&&(s+=zi(l,u,h,c,i,n)||0),s!==0}function T3(r,t,e){return N2(r,0,!1,t,e)}function M3(r,t,e,i){return N2(r,t,!0,e,i)}var Gf=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},eo),C3={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},jv.style)},xp=Ti.concat(["invisible","culling","z","z2","zlevel","parent"]),_t=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Xy:i>.2?hG:Zy}else if(e)return Zy}return Xy},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(Y(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Eu(e,0)<$y;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~ts},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Ci(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ts)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),M3(s,l/u,e,i)))return!0}if(this.hasFill())return T3(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ts,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:z(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ts)},t.prototype.createStyle=function(e){return uh(Gf,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=z({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=z({},n.shape),z(u,i.shape)):(u=z({},a?this.shape:n.shape),z(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var h={},c=xt(u),f=0;f0},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return uh(A3,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var n=fh(i,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(kr);Ms.prototype.type="tspan";var D3=tt({x:0,y:0},eo),L3={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},jv.style)};function I3(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var xe=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return uh(D3,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=I3(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return L3},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ft(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(kr);xe.prototype.type="image";function P3(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,h;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var c;s+l>n&&(c=s+l,s*=n/c,l*=n/c),u+h>n&&(c=u+h,u*=n/c,h*=n/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+h>a&&(c=s+h,s*=a/c,h*=a/c),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+h,i+a),h!==0&&r.arc(e+h,i+a-h,h,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var os=Math.round;function B2(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(os(i*2)===os(n*2)&&(r.x1=r.x2=Ya(i,s,!0)),os(a*2)===os(o*2)&&(r.y1=r.y2=Ya(a,s,!0))),r}}function z2(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Ya(i,s,!0),r.y=Ya(n,s,!0),r.width=Math.max(Ya(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Ya(n+o,s,!1)-r.y,o===0?0:1)),r}}function Ya(r,t,e){if(!t)return r;var i=os(r*2);return(i+os(t))%2===0?i/2:(i+(e?1:-1))/2}var k3=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),R3={},wt=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new k3},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=z2(R3,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?P3(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(_t);wt.prototype.type="rect";var pS={fill:"#000"},gS=2,E3={style:tt({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},jv.style)},St=function(r){E(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=pS,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,L=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=S[I],P.align==="right");)this._placeToken(P,e,T,y,L,"right",_),M-=P.width,L-=P.width,I--;for(D+=(a-(D-g)-(m-L)-M)/2;C<=I;)P=S[C],this._placeToken(P,e,T,y,D+P.width/2,"center",_),D+=P.width,C++;y+=T}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var h=e.verticalAlign,c=a+n/2;h==="top"?c=a+e.height/2:h==="bottom"&&(c=a+n-e.height/2);var f=!e.isLineHolder&&bp(u);f&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,c-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=SS(o,s,d),c-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(Ms),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,x=bS("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,y.fill)),b=xS("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!y.autoStroke||m)?(_=gS,y.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=o,g.y=c,S&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Yn,g.opacity=jr(u.opacity,i.opacity,1),mS(g,u),b&&(g.lineWidth=jr(u.lineWidth,i.lineWidth,_),g.lineDash=lt(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=b),x&&(g.fill=x);var w=e.contentWidth,T=e.contentHeight;p.setBoundingRect(new ft(Hl(g.x,w,g.textAlign),es(g.y,T,g.textBaseline),w,T))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,h=e.borderColor,c=l&&l.image,f=l&&!c,v=e.borderRadius,d=this,p,g;if(f||e.lineHeight||u&&h){p=this._getOrCreateChild(wt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=a,y.width=o,y.height=s,y.r=v,p.dirtyShape()}if(f){var m=p.style;m.fill=l||null,m.fillOpacity=lt(e.fillOpacity,1)}else if(c){g=this._getOrCreateChild(xe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&h){var m=p.style;m.lineWidth=u,m.stroke=h,m.strokeOpacity=lt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var x=(p||g).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=jr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return F2(e)&&(i=[e.fontStyle,e.fontWeight,V2(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Lr(i)||e.textFont||e.font},t}(kr),O3={left:!0,right:1,center:1},N3={top:1,bottom:1,middle:1},yS=["fontStyle","fontWeight","fontSize","fontFamily"];function V2(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?V0+"px":r+"px"}function mS(r,t){for(var e=0;e=0,a=!1;if(r instanceof _t){var o=G2(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Oo(s)||Oo(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=z({},i),u=z({},u),u.fill=s):!Oo(u.fill)&&Oo(s)?(a=!0,i=z({},i),u=z({},u),u.fill=Bf(s)):!Oo(u.stroke)&&Oo(l)&&(a||(i=z({},i),u=z({},u)),u.stroke=Bf(l)),i.style=u}}if(i&&i.z2==null){a||(i=z({},i));var h=r.z2EmphasisLift;i.z2=r.z2+(h??Ns)}return i}function W3(r,t,e){if(e&&e.z2==null){e=z({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??z3)}return e}function U3(r,t,e){var i=vt(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:G3(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=z({},e),o=z({opacity:i?n:a.opacity*.1},o),e.style=o),e}function Sp(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return H3(this,r,t,e);if(r==="blur")return U3(this,r,e);if(r==="select")return W3(this,r,e)}return e}function po(r){r.stateProxy=Sp;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Sp),e&&(e.stateProxy=Sp)}function AS(r,t){!Z2(r,t)&&!r.__highByOuter&&on(r,H2)}function DS(r,t){!Z2(r,t)&&!r.__highByOuter&&on(r,W2)}function Ki(r,t){r.__highByOuter|=1<<(t||0),on(r,H2)}function Ji(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&on(r,W2)}function Y2(r){on(r,l_)}function u_(r){on(r,U2)}function $2(r){on(r,V3)}function X2(r){on(r,F3)}function Z2(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function j2(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=o_(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){U2(u)}),s&&e.push(a)),o.isBlured=!1}),A(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function nm(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,h){for(var c=0;c0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Bn(r,t,e){$a(r,!0),on(r,po),om(r,t,e)}function q3(r){$a(r,!1)}function Kt(r,t,e,i){i?q3(r):Bn(r,t,e)}function om(r,t,e){var i=ot(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var IS=["emphasis","blur","select"],K3={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ce(r,t,e,i){e=e||"itemStyle";for(var n=0;n1&&(o*=wp(d),s*=wp(d));var p=(n===a?-1:1)*wp((o*o*(s*s)-o*o*(v*v)-s*s*(f*f))/(o*o*(v*v)+s*s*(f*f)))||0,g=p*o*v/s,y=p*-s*f/o,m=(r+e)/2+nc(c)*g-ic(c)*y,_=(t+i)/2+ic(c)*g+nc(c)*y,x=ES([1,0],[(f-g)/o,(v-y)/s]),b=[(f-g)/o,(v-y)/s],S=[(-1*f-g)/o,(-1*v-y)/s],w=ES(b,S);if(lm(b,S)<=-1&&(w=fl),lm(b,S)>=1&&(w=0),w<0){var T=Math.round(w/fl*1e6)/1e6;w=fl*2+T%2*fl}h.addData(u,m,_,o,s,x,w,c,a)}var iH=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,nH=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function aH(r){var t=new Ci;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Ci.CMD,l=r.match(iH);if(!l)return t;for(var u=0;uP*P+k*k&&(T=C,M=D),{cx:T,cy:M,x0:-h,y0:-c,x1:T*(n/b-1),y1:M*(n/b-1)}}function fH(r){var t;if(V(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function vH(r,t){var e,i=Wl(t.r,0),n=Wl(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var h=t.cx,c=t.cy,f=!!t.clockwise,v=NS(u-l),d=v>Tp&&v%Tp;if(d>Fr&&(v=d),!(i>Fr))r.moveTo(h,c);else if(v>Tp-Fr)r.moveTo(h+i*Bo(l),c+i*ba(l)),r.arc(h,c,i,l,u,!f),n>Fr&&(r.moveTo(h+n*Bo(u),c+n*ba(u)),r.arc(h,c,n,u,l,f));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=void 0,M=void 0,C=void 0,D=void 0,L=void 0,I=void 0,P=void 0,k=i*Bo(l),R=i*ba(l),N=n*Bo(u),O=n*ba(u),B=v>Fr;if(B){var G=t.cornerRadius;G&&(e=fH(G),p=e[0],g=e[1],y=e[2],m=e[3]);var H=NS(i-n)/2;if(_=si(H,y),x=si(H,m),b=si(H,p),S=si(H,g),M=w=Wl(_,x),C=T=Wl(b,S),(w>Fr||T>Fr)&&(D=i*Bo(u),L=i*ba(u),I=n*Bo(l),P=n*ba(l),vFr){var rt=si(y,M),gt=si(m,M),J=ac(I,P,k,R,i,rt,f),st=ac(D,L,N,O,i,gt,f);r.moveTo(h+J.cx+J.x0,c+J.cy+J.y0),M0&&r.arc(h+J.cx,c+J.cy,rt,De(J.y0,J.x0),De(J.y1,J.x1),!f),r.arc(h,c,i,De(J.cy+J.y1,J.cx+J.x1),De(st.cy+st.y1,st.cx+st.x1),!f),gt>0&&r.arc(h+st.cx,c+st.cy,gt,De(st.y1,st.x1),De(st.y0,st.x0),!f))}else r.moveTo(h+k,c+R),r.arc(h,c,i,l,u,!f);if(!(n>Fr)||!B)r.lineTo(h+N,c+O);else if(C>Fr){var rt=si(p,C),gt=si(g,C),J=ac(N,O,D,L,n,-gt,f),st=ac(k,R,I,P,n,-rt,f);r.lineTo(h+J.cx+J.x0,c+J.cy+J.y0),C0&&r.arc(h+J.cx,c+J.cy,gt,De(J.y0,J.x0),De(J.y1,J.x1),!f),r.arc(h,c,n,De(J.cy+J.y1,J.cx+J.x1),De(st.cy+st.y1,st.cx+st.x1),f),rt>0&&r.arc(h+st.cx,c+st.cy,rt,De(st.y1,st.x1),De(st.y0,st.x0),!f))}else r.lineTo(h+N,c+O),r.arc(h,c,n,u,l,f)}r.closePath()}}}var dH=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Fe=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new dH},t.prototype.buildPath=function(e,i){vH(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(_t);Fe.prototype.type="sector";var pH=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Bs=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new pH},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t}(_t);Bs.prototype.type="ring";function gH(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,h,c;if(i){h=[1/0,1/0],c=[-1/0,-1/0];for(var f=0,v=r.length;f=2){if(i){var a=gH(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],h=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;swa[1]){if(s=!1,a)return s;var h=Math.abs(wa[0]-Sa[1]),c=Math.abs(Sa[0]-wa[1]);Math.min(h,c)>n.len()&&(h0){var c=h.duration,f=h.delay,v=h.easing,d={duration:c,delay:f||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function At(r,t,e,i,n,a){v_("update",r,t,e,i,n,a)}function $t(r,t,e,i,n,a){v_("enter",r,t,e,i,n,a)}function vs(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function VS(r){return!r.isGroup}function AH(r){return r.shape!=null}function mh(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){VS(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return AH(o)&&(s.shape=z({},o.shape)),s}var a=i(r);t.traverse(function(o){if(VS(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),At(o,l,e,ot(o).dataIndex)}}})}function g_(r,t){return F(r,function(e){var i=e[0];i=Uf(i,t.x),i=Yf(i,t.x+t.width);var n=e[1];return n=Uf(n,t.y),n=Yf(n,t.y+t.height),[i,n]})}function uI(r,t){var e=Uf(r.x,t.x),i=Yf(r.x+r.width,t.x+t.width),n=Uf(r.y,t.y),a=Yf(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function Gs(r,t,e){var i=z({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),tt(n,e),new xe(i)):yh(r.replace("path://",""),i,e,"center")}function Ul(r,t,e,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var g=Mp(v,d,h,c)/f;return!(g<0||g>1)}function Mp(r,t,e,i){return r*i-e*t}function DH(r){return r<=1e-6&&r>=-1e-6}function So(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=Y(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&A(xt(l),function(h){X(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=ot(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:tt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function FS(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ta(r,t){if(r)if(V(r))for(var e=0;e=0&&s.push(l)}),s}}function ea(r,t){return ht(ht({},r,!0),t,!0)}const FH={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:". "}}}},GH={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 Xf="ZH",m_="EN",ds=m_,cf={},__={},gI=mt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ds).toUpperCase();return r.indexOf(Xf)>-1?Xf:ds}():ds;function x_(r,t){r=r.toUpperCase(),__[r]=new Lt(t),cf[r]=t}function HH(r){if(Y(r)){var t=cf[r.toUpperCase()]||{};return r===Xf||r===m_?it(t):ht(it(t),it(cf[ds]),!1)}else return ht(it(r),it(cf[ds]),!1)}function cm(r){return __[r]}function WH(){return __[ds]}x_(m_,FH);x_(Xf,GH);var b_=1e3,S_=b_*60,gu=S_*60,Dr=gu*24,YS=Dr*365,Yl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},lc="{yyyy}-{MM}-{dd}",$S={year:"{yyyy}",month:"{yyyy}-{MM}",day:lc,hour:lc+" "+Yl.hour,minute:lc+" "+Yl.minute,second:lc+" "+Yl.second,millisecond:Yl.none},Dp=["year","month","day","hour","minute","second","millisecond"],yI=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function $e(r,t){return r+="","0000".substr(0,t-r.length)+r}function ps(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function UH(r){return r===ps(r)}function YH(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function _h(r,t,e,i){var n=pr(r),a=n[w_(e)](),o=n[gs(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[id(e)](),u=n["get"+(e?"UTC":"")+"Day"](),h=n[Fu(e)](),c=(h-1)%12+1,f=n[nd(e)](),v=n[ad(e)](),d=n[od(e)](),p=h>=12?"pm":"am",g=p.toUpperCase(),y=i instanceof Lt?i:cm(i||gI)||WH(),m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),S=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,$e(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,$e(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,$e(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,$e(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,$e(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,$e(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,$e(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,$e(d,3)).replace(/{S}/g,d+"")}function $H(r,t,e,i,n){var a=null;if(Y(e))a=e;else if(Q(e))a=e(r.value,t,{level:r.level});else{var o=z({},Yl);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(V(a)){var c=r.level==null?0:r.level>=0?r.level:a.length+r.level;c=Math.min(c,a.length-1),a=a[c]}}return _h(new Date(r.value),a,n,i)}function mI(r,t){var e=pr(r),i=e[gs(t)]()+1,n=e[id(t)](),a=e[Fu(t)](),o=e[nd(t)](),s=e[ad(t)](),l=e[od(t)](),u=l===0,h=u&&s===0,c=h&&o===0,f=c&&a===0,v=f&&n===1,d=v&&i===1;return d?"year":v?"month":f?"day":c?"hour":h?"minute":u?"second":"millisecond"}function XS(r,t,e){var i=Mt(r)?pr(r):r;switch(t=t||mI(r,e),t){case"year":return i[w_(e)]();case"half-year":return i[gs(e)]()>=6?1:0;case"quarter":return Math.floor((i[gs(e)]()+1)/4);case"month":return i[gs(e)]();case"day":return i[id(e)]();case"half-day":return i[Fu(e)]()/24;case"hour":return i[Fu(e)]();case"minute":return i[nd(e)]();case"second":return i[ad(e)]();case"millisecond":return i[od(e)]()}}function w_(r){return r?"getUTCFullYear":"getFullYear"}function gs(r){return r?"getUTCMonth":"getMonth"}function id(r){return r?"getUTCDate":"getDate"}function Fu(r){return r?"getUTCHours":"getHours"}function nd(r){return r?"getUTCMinutes":"getMinutes"}function ad(r){return r?"getUTCSeconds":"getSeconds"}function od(r){return r?"getUTCMilliseconds":"getMilliseconds"}function XH(r){return r?"setUTCFullYear":"setFullYear"}function _I(r){return r?"setUTCMonth":"setMonth"}function xI(r){return r?"setUTCDate":"setDate"}function bI(r){return r?"setUTCHours":"setHours"}function SI(r){return r?"setUTCMinutes":"setMinutes"}function wI(r){return r?"setUTCSeconds":"setSeconds"}function TI(r){return r?"setUTCMilliseconds":"setMilliseconds"}function ZH(r,t,e,i,n,a,o,s){var l=new St({style:{text:r,font:t,align:e,verticalAlign:i,padding:n,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function T_(r){if(!t_(r))return Y(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function M_(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var To=Fv;function fm(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(h){return h&&Lr(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?pr(r):r;if(isNaN(+l)){if(s)return"-"}else return _h(l,i,e)}if(t==="ordinal")return If(r)?n(r):Mt(r)&&a(r)?r+"":"-";var u=Mi(r);return a(u)?T_(u):If(r)?n(r):typeof r=="boolean"?r+"":"-"}var ZS=["a","b","c","d","e","f","g"],Lp=function(r,t){return"{"+r+(t??"")+"}"};function C_(r,t,e){V(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a':'';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function qH(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd yyyy`);var i=pr(t),n=e?"getUTC":"get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),h=i[n+"Seconds"](),c=i[n+"Milliseconds"]();return r=r.replace("MM",$e(o,2)).replace("M",o).replace("yyyy",a).replace("yy",$e(a%100+"",2)).replace("dd",$e(s,2)).replace("d",s).replace("hh",$e(l,2)).replace("h",l).replace("mm",$e(u,2)).replace("m",u).replace("ss",$e(h,2)).replace("s",h).replace("SSS",$e(c,3)),r}function KH(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function go(r,t){return t=t||"transparent",Y(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Zf(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var ff=A,CI=["left","right","top","bottom","width","height"],Xa=[["width","left","right"],["height","top","bottom"]];function A_(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var h=l.getBoundingRect(),c=t.childAt(u+1),f=c&&c.getBoundingRect(),v,d;if(r==="horizontal"){var p=h.width+(f?-f.x+h.x:0);v=a+p,v>i||l.newline?(a=0,v=p,o+=s+e,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);d=o+g,d>n||l.newline?(a+=s+e,o=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var io=A_;ut(A_,"vertical");ut(A_,"horizontal");function JH(r,t,e){var i=t.width,n=t.height,a=U(r.left,i),o=U(r.top,n),s=U(r.right,i),l=U(r.bottom,n);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),e=To(e||0),{width:Math.max(s-a-e[1]-e[3],0),height:Math.max(l-o-e[0]-e[2],0)}}function ue(r,t,e){e=To(e||0);var i=t.width,n=t.height,a=U(r.left,i),o=U(r.top,n),s=U(r.right,i),l=U(r.bottom,n),u=U(r.width,i),h=U(r.height,n),c=e[2]+e[0],f=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-f-a),isNaN(h)&&(h=n-l-c-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>i/n?u=i*.8:h=n*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(a)&&(a=i-s-u-f),isNaN(o)&&(o=n-l-h-c),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-h/2-e[0];break;case"bottom":o=n-h-c;break}a=a||0,o=o||0,isNaN(u)&&(u=i-f-a-(s||0)),isNaN(h)&&(h=n-c-o-(l||0));var d=new ft(a+e[3],o+e[0],u,h);return d.margin=e,d}function sd(r,t,e,i,n,a){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ft(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var h=r.getLocalTransform();u=u.clone(),u.applyTransform(h)}var c=ue(tt({width:u.width,height:u.height},t),e,i),f=o?c.x-u.x:0,v=s?c.y-u.y:0;return l==="raw"?(a.x=f,a.y=v):(a.x+=f,a.y+=v),a===r&&r.markRedraw(),!0}function QH(r,t){return r[Xa[t][0]]!=null||r[Xa[t][1]]!=null&&r[Xa[t][2]]!=null}function Gu(r){var t=r.layoutMode||r.constructor.layoutMode;return et(t)?t:t?{type:t}:null}function Zn(r,t,e){var i=e&&e.ignoreSize;!V(i)&&(i=[i,i]);var n=o(Xa[0],0),a=o(Xa[1],1);u(Xa[0],r,n),u(Xa[1],r,a);function o(h,c){var f={},v=0,d={},p=0,g=2;if(ff(h,function(_){d[_]=r[_]}),ff(h,function(_){s(t,_)&&(f[_]=d[_]=t[_]),l(f,_)&&v++,l(d,_)&&p++}),i[c])return l(t,h[1])?d[h[2]]=null:l(t,h[2])&&(d[h[1]]=null),d;if(p===g||!v)return d;if(v>=g)return f;for(var y=0;y=0;l--)s=ht(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return vh(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Lt);I2(yt,Lt);Xv(yt);zH(yt);VH(yt,eW);function eW(r){var t=[];return A(yt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=F(t,function(e){return gi(e).main}),r!=="dataset"&&vt(t,"dataset")<=0&&t.unshift("dataset"),t}var DI="";typeof navigator<"u"&&(DI=navigator.platform||"");var zo="rgba(0, 0, 0, 0.2)";const rW={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:DI.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};var LI=Z(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Or="original",He="arrayRows",Nr="objectRows",Di="keyedColumns",Vn="typedArray",II="unknown",Si="column",Ys="row",Te={Must:1,Might:2,Not:3},PI=Tt();function iW(r){PI(r).datasetMap=Z()}function kI(r,t,e){var i={},n=L_(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=PI(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,h,c;r=r.slice(),A(r,function(p,g){var y=et(p)?p:r[g]={name:p};y.type==="ordinal"&&h==null&&(h=g,c=d(y)),i[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(h==null){var _=f.valueWayDim;v(i[y],_,m),v(o,_,m),f.valueWayDim+=m}else if(h===g)v(i[y],0,m),v(a,0,m);else{var _=f.categoryWayDim;v(i[y],_,m),v(o,_,m),f.categoryWayDim+=m}});function v(p,g,y){for(var m=0;mt)return r[i];return r[e-1]}function OI(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var h=o==null||!i?e:lW(i,o);if(h=h||e,!(!h||!h.length)){var c=h[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%h.length,c}}function uW(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var uc,vl,qS,KS="\0_ec_inner",hW=1,P_=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Lt(a),this._locale=new Lt(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=tw(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,tw(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?qS(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=i&&i.replaceMergeMainTypeMap;iW(this),A(e,function(c,f){c!=null&&(yt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):n[f]=n[f]==null?it(c):ht(n[f],c,!0))}),u&&u.each(function(c,f){yt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),yt.topologicalTravel(s,yt.getAllClassMainTypes(),h,this);function h(c){var f=oW(this,c,Bt(e[c])),v=a.get(c),d=v?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=M2(v,f,d);BG(p,c,yt),n[c]=null,a.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;A(p,function(x,b){var S=x.existing,w=x.newOption;if(!w)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=c==="series",M=yt.getClass(c,x.keyInfo.subType,!T);if(!M)return;if(c==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===M)S.name=x.keyInfo.name,S.mergeOption(w,this),S.optionUpdated(w,!1);else{var C=z({componentIndex:b},x.keyInfo);S=new M(w,this,this,C),z(S,C),x.brandNew&&(S.__requireNewView=!0),S.init(w,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),y.push(S),m++):(g.push(void 0),y.push(void 0))},this),n[c]=g,a.set(c,y),o.set(c,m),c==="series"&&uc(this)}this._seriesIndices||uc(this)},t.prototype.getOption=function(){var e=it(this.option);return A(e,function(i,n){if(yt.hasClass(n)){for(var a=Bt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Nu(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[KS],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function _W(r,t){return r.join(",")===t.join(",")}var zr=A,Hu=et,ew=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pp(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=ew.length;e=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&f>=0&&m>0||l==="samesign"&&f<=0&&m<0){f=AG(f,m),p=m;break}}}return i[0]=f,i[1]=p,i})})}var ld=function(){function r(t){this.data=t.data||(t.sourceFormat===Di?{}:[]),this.sourceFormat=t.sourceFormat||II,this.seriesLayoutBy=t.seriesLayoutBy||Si,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;ip&&(p=_)}v[0]=d,v[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};lw=(t={},t[He+"_"+Si]={pure:!0,appendData:a},t[He+"_"+Ys]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Nr]={pure:!0,appendData:a},t[Di]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var h=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)h.push(l[c])})}},t[Or]={appendData:a},t[Vn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return As(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function fw(r){var t,e;return et(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function yu(r){return new NW(r)}var NW=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function h(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(i)),this._modBy=l,this._modDataCount=u;var f=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!i&&(c||v1&&i>0?s:o}};return a;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},zW=function(){function r(t,e){if(!Mt(e)){var i="";kt(i)}this._opFn=$I[t],this._rvalFloat=Mi(e)}return r.prototype.evaluate=function(t){return Mt(t)?this._opFn(t,this._rvalFloat):this._opFn(Mi(t),this._rvalFloat)},r}(),XI=function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=Mt(t)?t:Mi(t),n=Mt(e)?e:Mi(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=Y(t),l=Y(e);s&&(i=l?t:0),l&&(n=s?e:0)}return in?-this._resultLT:0},r}(),VW=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Mi(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(e=Mi(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function FW(r,t){return r==="eq"||r==="ne"?new VW(r==="eq",t):X($I,r)?new zW(r,t):null}var GW=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return Fn(t,e)},r}();function HW(r,t){var e=new GW,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Si&&kt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";X(l,y)&&kt(_),l[y]=m}});else for(var h=0;h65535?qW:KW}function Fo(){return[1/0,-1/0]}function JW(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function pw(r,t,e,i,n){var a=qI[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(m){return m.property}),h=0;hy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&it)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks,a=n[t],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,h=0,c=this.count();h=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=h))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a=c&&m<=f||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[n[0]],_=v[n[1]],x=t[n[1]][0],b=t[n[1]][1],y=0;y=c&&m<=f||isNaN(m))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var y=0;y=c&&m<=f||isNaN(m))&&(l[u++]=w)}else for(var y=0;yt[C][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),h,c,f,v=new(Vo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;dh&&(h=c,f=x)}D>0&&Ds&&(p=s-h);for(var g=0;gd&&(d=m,v=h+g)}var _=this.getRawIndex(c),x=this.getRawIndex(v);ch-d&&(l=h-d,s.length=l);for(var p=0;pc[1]&&(c[1]=y),f[v++]=m}return a._count=v,a._indices=f,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,n,a){return Fn(e[a],this._dimensions[a])}Ep={arrayRows:t,objectRows:function(e,i,n,a){return Fn(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return Fn(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}}(),r}(),KI=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(hc(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var h=e[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,a=[h._getVersionSign()]}else s=o.get("data",!0),l=qe(s)?Vn:Or,a=[];var c=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},v=lt(c.seriesLayoutBy,f.seriesLayoutBy)||null,d=lt(c.sourceHeader,f.sourceHeader),p=lt(c.dimensions,f.dimensions),g=v!==f.seriesLayoutBy||!!d!=!!f.sourceHeader||p;n=g?[pm(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(i){var m=this._applyTransform(e);n=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);n=[pm(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&yw(a)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var h=u.getSource(n||0),c="";n!=null&&!h&&yw(c),s.push(h),l.push(u._getVersionSign())}),i?o=ZW(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[LW(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return A(r.blocks,function(n){var a=eP(n);a>=t&&(t=a+ +(i&&(!a||ym(n)&&!n.noHeader)))}),t}return 0}function r4(r,t,e,i){var n=t.noHeader,a=n4(eP(t)),o=[],s=t.blocks||[];Ve(!s||V(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(X(u,l)){var h=new XI(u[l],null);s.sort(function(p,g){return h.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=t.valueFormatter,m=tP(p)(y?z(z({},r),{valueFormatter:y}):r,p,g>0?a.html:0,i);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(a.richText):mm(i,o.join(""),n?e:a.html);if(n)return c;var f=fm(t.header,"ordinal",r.useUTC),v=QI(i,r.renderMode).nameStyle,d=JI(i);return r.renderMode==="richText"?rP(r,f,v)+a.richText+c:mm(i,'
'+Oe(f)+"
"+c,e)}function i4(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,h=t.valueFormatter||r.valueFormatter||function(x){return x=V(x)?x:[x],F(x,function(b,S){return fm(b,V(v)?v[S]:v,u)})};if(!(a&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),f=a?"":fm(l,"ordinal",u),v=t.valueType,d=o?[]:h(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=QI(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(a?"":rP(r,f,m))+(o?"":s4(r,d,p,g,_)):mm(i,(s?"":c)+(a?"":a4(f,!s,m))+(o?"":o4(d,p,g,_)),e)}}function mw(r,t,e,i,n,a){if(r){var o=tP(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function n4(r){return{html:t4[r],richText:e4[r]}}function mm(r,t,e){var i='
',n="margin: "+e+"px 0 0",a=JI(r);return'
'+t+i+"
"}function a4(r,t,e){var i=t?"margin-left:2px":"";return''+Oe(r)+""}function o4(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],''+F(r,function(o){return Oe(o)}).join("  ")+""}function rP(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function s4(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(t)?t.join(" "):t,a)}function iP(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return go(i)}function nP(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Op=function(){function r(){this.richTextStyles={},this._nextStyleNameId=b2()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=MI({color:e,type:t,renderMode:i,markerId:n});return Y(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};V(e)?A(e,function(a){return z(i,a)}):z(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function aP(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=V(s),u=iP(t,e),h,c,f,v;if(o>1||l&&!o){var d=l4(s,t,e,a,u);h=d.inlineValues,c=d.inlineValueTypes,f=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=h=As(n,e,a[0]),c=p.type}else v=h=l?s[0]:s;var g=e_(t),y=g&&t.name||"",m=n.getName(e),_=i?y:m;return _e("section",{header:y,noHeader:i||!g,sortParam:v,blocks:[_e("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Lr(_),value:h,valueType:c,dataIndex:e})].concat(f||[])})}function l4(r,t,e,i,n){var a=t.getData(),o=Pr(r,function(c,f,v){var d=a.getDimensionInfo(v);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?A(i,function(c){h(As(a,e,c),c)}):A(r,h);function h(c,f){var v=a.getDimensionInfo(f);!v||v.otherDims.tooltip===!1||(o?u.push(_e("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var hn=Tt();function cc(r,t){return r.getName(t)||r.getId(t)}var vf="__universalTransitionEnabled",zt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=yu({count:h4,reset:c4}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=hn(this).sourceManager=new KI(this);a.prepareSource();var o=this.getInitialData(e,n);xw(o,this),this.dataTask.context.data=o,hn(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Gu(this),a=n?Us(e):{},o=this.subType;yt.hasClass(o)&&(o+="Series"),ht(e,i.getTheme().get(this.subType)),ht(e,this.getDefaultOption()),co(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Zn(e,a,n)},t.prototype.mergeOption=function(e,i){e=ht(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Gu(this);n&&Zn(this.option,e,n);var a=hn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);xw(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,hn(this).dataBeforeProcessed=o,_w(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!qe(e))for(var i=["show"],n=0;nthis.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=I_.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[cc(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[vf])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h0&&this._innerSelect(e,i)}},t.registerClass=function(e){return yt.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(yt);re(zt,ud);re(zt,I_);I2(zt,yt);function _w(r){var t=r.name;e_(r)||(r.name=u4(r)||t)}function u4(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return A(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function h4(r){return r.model.getRawData().count()}function c4(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),f4}function f4(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function xw(r,t){A(ws(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ut(v4,t))})}function v4(r,t){var e=_m(r);return e&&e.setOutputEnd((t||this).count()),t}function _m(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Yt=function(){function r(){this.group=new at,this.uid=Ws("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();i_(Yt);Xv(Yt);function Xs(){var r=Tt();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var oP=Tt(),d4=Xs(),Ot=function(){function r(){this.group=new at,this.uid=Ws("viewChart"),this.renderTask=yu({plan:p4,reset:g4}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Sw(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Sw(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){ta(this.group,t)},r.markUpdateMethod=function(t,e){oP(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function bw(r,t,e){r&&zu(r)&&(t==="emphasis"?Ki:Ji)(r,e)}function Sw(r,t,e){var i=fo(r,t),n=t&&t.highlightKey!=null?Q3(t.highlightKey):null;i!=null?A(Bt(i),function(a){bw(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){bw(a,e,n)})}i_(Ot);Xv(Ot);function p4(r){return d4(r.model)}function g4(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&oP(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),y4[l]}var y4={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},jf="\0__throttleOriginMethod",ww="\0__throttleRate",Tw="\0__throttleType";function cd(r,t,e){var i,n=0,a=0,o=null,s,l,u,h;t=t||0;function c(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var v=[],d=0;d=0?c():o=setTimeout(c,-s),n=i};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(v){h=v},f}function Zs(r,t,e,i){var n=r[t];if(n){var a=n[jf]||n,o=n[Tw],s=n[ww];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=cd(a,e,i==="debounce"),n[jf]=a,n[Tw]=i,n[ww]=e}return n}}function Wu(r,t){var e=r[t];e&&e[jf]&&(e.clear&&e.clear(),r[t]=e[jf])}var Mw=Tt(),Cw={itemStyle:vo(pI,!0),lineStyle:vo(dI,!0)},m4={lineStyle:"stroke",itemStyle:"fill"};function sP(r,t){var e=r.visualStyleMapper||Cw[t];return e||(console.warn("Unknown style type '"+t+"'."),Cw.itemStyle)}function lP(r,t){var e=r.visualDrawType||m4[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var _4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=sP(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=lP(r,i),u=o[l],h=Q(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||c){var f=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=f,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?f:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&h)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=z({},o);g[l]=h(p),v.setItemVisual(d,"style",g)}}}},pl=new Lt,x4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=sP(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){pl.option=l[i];var u=n(pl),h=o.ensureUniqueItemVisual(s,"style");z(h,u),pl.option.decal&&(o.setItemVisual(s,"decal",pl.option.decal),pl.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},b4={performRawSeries:!0,overallReset:function(r){var t=Z();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),Mw(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=Mw(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=lP(e,s);a.each(function(u){var h=a.getRawIndex(u);n[h]=u}),i.each(function(u){var h=n[u],c=a.getItemVisual(h,"colorFromPalette");if(c){var f=a.ensureUniqueItemVisual(h,"style"),v=i.getName(u)||u+"",d=i.count();f[l]=e.getColorFromPalette(v,o,d)}})}})}},fc=Math.PI;function S4(r,t){t=t||{},tt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new at,i=new wt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new St({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new wt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new gh({shape:{startAngle:-fc/2,endAngle:-fc/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:fc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:fc*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),h=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:h}),a.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var uP=function(){function r(t,e,i,n){this._stageTaskMap=Z(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=Z();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;A(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";Ve(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),c=h.seriesTaskMap,f=h.overallTask;if(f){var v,d=f.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),v=!0)}),v&&f.dirty(),o.updatePayload(f,i);var p=o.getPerformArgs(f,n.block);d.each(function(g){g.perform(p)}),f.perform(p)&&(a=!0)}else c&&c.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,i),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=Z(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(h):l?i.eachRawSeriesByType(l,h):u&&u(i,n).each(h);function h(c){var f=c.uid,v=s.set(f,o&&o.get(f)||yu({plan:A4,reset:D4,count:I4}));v.context={model:c,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||yu({reset:w4});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=t.seriesType,h=t.getTargetSeries,c=!0,f=!1,v="";Ve(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):h?h(i,n).each(d):(c=!1,A(i.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(f=!0,yu({reset:T4,onDirty:C4})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,a._pipe(p,y)}f&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:P4(t)}),t.uid=Ws("stageHandler"),e&&(t.visualType=e),t},r}();function w4(r){r.overallReset(r.ecModel,r.api,r.payload)}function T4(r){return r.overallProgress&&M4}function M4(){this.agent.dirty(),this.getDownstream().dirty()}function C4(){this.agent&&this.agent.dirty()}function A4(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function D4(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Bt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?F(t,function(e,i){return hP(i)}):L4}var L4=hP(0);function hP(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a0&&v===u.length-f.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[f.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(i[u]=l,h=!0),h||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function h(c,f,v,d){return c[v]==null||f[d||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),xm=["symbol","symbolSize","symbolRotate","symbolOffset"],Iw=xm.concat(["symbolKeepAspect"]),E4={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&ja(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function bm(r,t,e){for(var i=t.type==="radial"?j4(r,t,e):Z4(r,t,e),n=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Mt(r)?[r]:V(r)?r:null}function B_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&K4(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=F(e,function(a){return a/n}),i/=n)}return[e,i]}var J4=new Ci(!0);function Jf(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Pw(r){return typeof r=="string"&&r!=="none"}function Qf(r){var t=r.fill;return t!=null&&t!=="none"}function kw(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Rw(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Sm(r,t,e){var i=n_(t.image,t.__image,e);if(Zv(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*au),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function Q4(r,t,e,i){var n,a=Jf(e),o=Qf(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var h=t.path||J4,c=t.__dirty;if(!i){var f=e.fill,v=e.stroke,d=o&&!!f.colorStops,p=a&&!!v.colorStops,g=o&&!!f.image,y=a&&!!v.image,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(d||p)&&(S=t.getBoundingRect()),d&&(m=c?bm(r,f,S):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=c?bm(r,v,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(x=c||!t.__canvasFillPattern?Sm(r,f,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(b=c||!t.__canvasStrokePattern?Sm(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),d?r.fillStyle=m:g&&(x?r.fillStyle=x:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:a=!1)}var w=t.getGlobalScale();h.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,M;r.setLineDash&&e.lineDash&&(n=B_(t),T=n[0],M=n[1]);var C=!0;(u||c&ts)&&(h.setDPR(r.dpr),l?h.setContext(null):(h.setContext(r),C=!1),h.reset(),t.buildPath(h,t.shape,i),h.toStatic(),t.pathUpdated()),C&&h.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=M),i||(e.strokeFirst?(a&&Rw(r,e),o&&kw(r,e)):(o&&kw(r,e),a&&Rw(r,e))),T&&r.setLineDash([])}function t6(r,t,e){var i=t.__image=n_(e.image,t.__image,t,t.onload);if(!(!i||!Zv(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,h=e.sy||0;r.drawImage(i,u,h,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,h=e.sy,c=o-u,f=s-h;r.drawImage(i,u,h,c,f,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function e6(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Yn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=B_(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Jf(e)&&r.strokeText(n,e.x,e.y),Qf(e)&&r.fillText(n,e.x,e.y)):(Qf(e)&&r.fillText(n,e.x,e.y),Jf(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var Ew=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ow=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function gP(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){ar(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?eo.opacity:o}(i||t.blend!==e.blend)&&(a||(ar(r,n),a=!0),r.globalCompositeOperation=t.blend||eo.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,n){if(!this[Le]){if(this._disposed){this.id;return}var a,o,s;if(et(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Le]=!0,!this._model||i){var l=new pW(this._api),u=this._theme,h=this._model=new P_;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Tm);var c={seriesTransition:s,optionChanged:!0};if(n)this[er]={silent:a,updateParams:c},this[Le]=!1,this.getZr().wakeUp();else{try{Ho(this),cn.update.call(this,null,c)}catch(f){throw this[er]=null,this[Le]=!1,f}this._ssr||this._zr.flush(),this[er]=null,this[Le]=!1,gl.call(this,a),yl.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||mt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(mt.svgSupported){var e=this._zr,i=e.storage.getDisplayList();return A(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;A(i,function(l){n.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(iv[n]){var l=s,u=s,h=-s,c=-s,f=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();A(no,function(_,x){if(_.group===n){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(it(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),h=o(S.right,h),c=o(S.bottom,c),f.push({dom:b,left:S.left,top:S.top})}}),l*=v,u*=v,h*=v,c*=v;var d=h-l,p=c-u,g=Qr.createCanvas(),y=jy(g,{renderer:i?"svg":"canvas"});if(y.resize({width:d,height:p}),i){var m="";return A(f,function(_){var x=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new wt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),A(f,function(_){var x=new xe({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i){return Fp(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return Fp(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=fu(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(i);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=fu(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?N_(s,l,i):xh(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(C6,function(i){var n=function(a){var o=e.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&Za(s,function(d){var p=ot(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=z({},p.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var f=h&&c!=null&&o.getComponent(h,c),v=f&&e[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=i,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:v},e.trigger(i,l)}};n.zrEventfulCallAtLast=!0,e._zr.on(i,n,e)}),A(mu,function(i,n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),A(["selectchanged"],function(i){e._messageCenter.on(i,function(n){this.trigger(i,n)},e)}),N4(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&A2(this.getDom(),G_,"");var i=this,n=i._api,a=i._model;A(i._componentsViews,function(o){o.dispose(a,n)}),A(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete no[i.id]},t.prototype.resize=function(e){if(!this[Le]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[er]&&(a==null&&(a=this[er].silent),n=!0,this[er]=null),this[Le]=!0;try{n&&Ho(this),cn.update.call(this,{type:"resize",animation:z({duration:0},e&&e.animation)})}catch(o){throw this[Le]=!1,o}this[Le]=!1,gl.call(this,a),yl.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(et(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!Mm[e]){var n=Mm[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=z({},e);return i.type=mu[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(et(i)||(i={silent:!!i}),!!ev[e.type]&&this._model){if(this[Le]){this._pendingActions.push(e);return}var n=i.silent;Hp.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&mt.browser.weChat&&this._throttledZrFlush(),gl.call(this,n),yl.call(this,n)}},t.prototype.updateLabelLayout=function(){Hr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Ho=function(c){var f=c._scheduler;f.restorePipelines(c._model),f.prepareStageTasks(),Vp(c,!0),Vp(c,!1),f.plan()},Vp=function(c,f){for(var v=c._model,d=c._scheduler,p=f?c._componentsViews:c._chartsViews,g=f?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_f.get("hoverLayerThreshold")&&!mt.node&&!mt.worker&&f.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(c,f){var v=c.get("blendMode")||null;f.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(c,f){if(!c.preventAutoZ){var v=c.get("z")||0,d=c.get("zlevel")||0;f.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(c,f,v,d){var p=c.getTextContent(),g=c.getTextGuideLine(),y=c.isGroup;if(y)for(var m=c.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(vs(y))return;if(y instanceof _t&&tH(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),x=y.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&n(y)}})}Zw=function(c){return new(function(f){E(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){Ki(d,p),yr(c)},v.prototype.leaveEmphasis=function(d,p){Ji(d,p),yr(c)},v.prototype.enterBlur=function(d){Y2(d),yr(c)},v.prototype.leaveBlur=function(d){u_(d),yr(c)},v.prototype.enterSelect=function(d){$2(d),yr(c)},v.prototype.leaveSelect=function(d){X2(d),yr(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},v}(NI))(c)},kP=function(c){function f(v,d){for(var p=0;p=0)){qw.push(e);var a=uP.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function X_(r,t){Mm[r]=t}function O6(r){kL({createCanvas:r})}function VP(r,t,e){var i=SP("registerMap");i&&i(r,t,e)}function N6(r){var t=SP("getMap");return t&&t(r)}var FP=XW;ra(V_,_4);ra(fd,x4);ra(fd,b4);ra(V_,E4);ra(fd,O4);ra(MP,u6);U_(zI);Y_(p6,AW);X_("default",S4);ii({type:ro,event:ro,update:ro},ee);ii({type:lf,event:lf,update:lf},ee);ii({type:vu,event:vu,update:vu},ee);ii({type:uf,event:uf,update:uf},ee);ii({type:du,event:du,update:du},ee);W_("light",k4);W_("dark",vP);var B6={},Kw=[],z6={registerPreprocessor:U_,registerProcessor:Y_,registerPostInit:OP,registerPostUpdate:NP,registerUpdateLifecycle:vd,registerAction:ii,registerCoordinateSystem:BP,registerLayout:zP,registerVisual:ra,registerTransform:FP,registerLoading:X_,registerMap:VP,registerImpl:h6,PRIORITY:CP,ComponentModel:yt,ComponentView:Yt,SeriesModel:zt,ChartView:Ot,registerComponentModel:function(r){yt.registerClass(r)},registerComponentView:function(r){Yt.registerClass(r)},registerSeriesModel:function(r){zt.registerClass(r)},registerChartView:function(r){Ot.registerClass(r)},registerSubTypeDefaulter:function(r,t){yt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){d2(r,t)}};function pt(r){if(V(r)){A(r,function(t){pt(t)});return}vt(Kw,r)>=0||(Kw.push(r),Q(r)&&(r={install:r}),r.install(z6))}function ml(r){return r==null?0:r.length||1}function Jw(r){return r}var Qi=function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||Jw,this._newKeyGetter=n||Jw,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o1){var h=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(h,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(h,u),n[l]=null;else if(c===1&&f>1)this._updateOneToMany&&this._updateOneToMany(h,u),n[l]=null;else if(c===1&&f===1)this._update&&this._update(h,u),n[l]=null;else if(c>1&&f>1)this._updateManyToMany&&this._updateManyToMany(h,u),n[l]=null;else if(c>1)for(var v=0;v1)for(var s=0;s30}var _l=et,fn=F,U6=typeof Int32Array>"u"?Array:Int32Array,Y6="e\0\0",Qw=-1,$6=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],X6=["_approximateExtent"],tT,yc,xl,bl,Yp,Sl,$p,Be=function(){function r(t,e){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 i,n=!1;HP(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},h=0;h=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Or;if(l&&!n.pure)for(var u=[],h=t;h0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),V(a)?a=a.slice():_l(a)&&(a=z({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,_l(e)?z(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){_l(t)?z(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?z(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;im(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:fn(this.dimensions,this._getDimInfo,this),this.hostModel)),Yp(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];Q(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Vv(arguments)))})},r.internalField=function(){tT=function(t){var e=t._invertedIndicesMap;A(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new U6(o.categories.length);for(var l=0;l1&&(l+="__ec__"+h),n[e]=l}}}(),r}();function Z6(r,t){return qs(r,t).dimensions}function qs(r,t){k_(r)||(r=R_(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=Z(),a=[],o=q6(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&YP(o),l=i===r.dimensionsDefine,u=l?UP(r):WP(i),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(r,o));for(var c=Z(h),f=new jI(o),v=0;v0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function q6(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return A(t,function(a){var o;et(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function K6(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var J6=function(){function r(t){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=t}return r}();function Q6(r){var t=r.get("coordinateSystem"),e=new J6(t),i=tU[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var tU={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",le).models[0],a=r.getReferringComponents("yAxis",le).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),Wo(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),Wo(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",le).models[0];t.coordSysDims=["single"],e.set("single",n),Wo(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",le).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Wo(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Wo(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),h=o[l];e.set(h,u),Wo(u)&&(i.set(h,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Wo(r){return r.get("type")==="category"}function $P(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;eU(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,h,c,f;if(A(a,function(m,_){Y(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!h&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(h=m))}),h&&!i&&!u&&(i=!0),h){c="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=h.coordDim,d=h.type,p=0;A(a,function(m){m.coordDim===v&&p++});var g={name:c,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,d),y.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:f,stackResultDimension:c}}function eU(r){return!HP(r.schema)}function tn(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Z_(r,t){return tn(r,t)?r.getCalculationInfo("stackResultDimension"):t}function rU(r,t){var e=r.get("coordinateSystem"),i=$s.get(e),n;return t&&t.coordSysDims&&(n=F(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=nv(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function iU(r,t,e){var i,n;return e&&A(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Li(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;r?(a=!0,n=R_(r)):(n=i.getSource(),a=n.sourceFormat===Or);var o=Q6(t),s=rU(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?ut(kI,s,t):null,h={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=qs(n,h),f=iU(c.dimensions,e.createInvertedIndices,o),v=a?null:i.getSharedDataStore(c),d=$P(t,{schema:c,store:v}),p=new Be(c,t);p.setCalculationInfo(d);var g=f!=null&&nU(n)?function(y,m,_,x){return x===f?_:this.defaultDimValueGetter(y,m,_,x)}:null;return p.hasItemOption=!1,p.initData(a?n:v,null,g),p}function nU(r){if(r.sourceFormat===Or){var t=aU(r.data||[]);return!V(Os(t))}}function aU(r){for(var t=0;te[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Xv(Ii);var oU=0,Cm=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++oU}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&F(i,sU);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!Y(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function sU(r){return et(r)&&r.value!=null?r.value:r+""}function Am(r){return r.type==="interval"||r.type==="log"}function lU(r,t,e,i){var n={},a=r[1]-r[0],o=n.interval=Q0(a/t,!0);e!=null&&oi&&(o=n.interval=i);var s=n.intervalPrecision=XP(o),l=n.niceTickExtent=[Qt(Math.ceil(r[0]/o)*o,s),Qt(Math.floor(r[1]/o)*o,s)];return uU(l,r),n}function Xp(r){var t=Math.pow(10,$v(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Qt(e*t)}function XP(r){return $r(r)+2}function eT(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function uU(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),eT(r,0,t),eT(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function dd(r,t){return r>=t[0]&&r<=t[1]}function pd(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function gd(r,t){return r*(t[1]-t[0])+t[0]}var yd=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new Cm({})),V(n)&&(n=new Cm({categories:F(n,function(a){return et(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:Y(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),dd(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),pd(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(gd(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,n=i[0];n<=i[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ii);Ii.registerClass(yd);var Aa=Qt,en=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return dd(e,this._extent)},t.prototype.normalize=function(e){return pd(e,this._extent)},t.prototype.scale=function(e){return gd(e,this._extent)},t.prototype.setExtent=function(e,i){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(i)||(n[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=XP(e)},t.prototype.getTicks=function(e){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]l)return[];var h=s.length?s[s.length-1].value:a[1];return n[1]>h&&(e?s.push({value:Aa(h+i,o)}):s.push({value:n[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;oa[0]&&v0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function KP(r){var t=fU(r),e=[];return A(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],h=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),f=Math.abs(c[1]-c[0]);s=u?h/f*u:h}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=U(i.get("barWidth"),s),p=U(i.get("barMaxWidth"),s),g=U(i.get("barMinWidth")||(rk(i)?.5:1),s),y=i.get("barGap"),m=i.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:j_(a),stackId:jP(i)})}),JP(e)}function JP(r){var t={};A(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=i.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var c=i.barMaxWidth;c&&(l[u].maxWidth=c);var f=i.barMinWidth;f&&(l[u].minWidth=f);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=xt(a).length;s=Math.max(35-l*4,15)+"%"}var u=U(s,o),h=U(i.gap,1),c=i.remainedWidth,f=i.autoWidthCount,v=(c-u)/(f+(f-1)*h);v=Math.max(v,0),A(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),_&&(x=Math.max(x,_)),y.width=x,c-=x+h*x,f--}else{var x=v;m&&mx&&(x=_),x!==v&&(y.width=x,c-=x+h*x,f--)}}),v=(c-u)/(f+(f-1)*h),v=Math.max(v,0);var d=0,p;A(a,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+h)}),p&&(d-=p.width*h);var g=-d/2;A(a,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+h)})}),e}function vU(r,t,e){if(r&&t){var i=r[j_(t)];return i}}function QP(r,t){var e=qP(r,t),i=KP(e);A(e,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=jP(n),u=i[j_(s)][l],h=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:h,size:c})})}function tk(r){return{seriesType:r,plan:Xs(),reset:function(t){if(ek(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),h=e.getCalculationInfo("stackResultDimension"),c=tn(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),v=dU(n,a),d=rk(t),p=t.get("barMinHeight")||0,g=h&&e.getDimensionIndex(h),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=d&&yi(b*3),w=d&&l&&yi(b*3),T=d&&yi(b),M=i.master.getRect(),C=f?M.width:M.height,D,L=x.getStore(),I=0;(D=_.next())!=null;){var P=L.get(c?g:o,D),k=L.get(s,D),R=v,N=void 0;c&&(N=+P-L.get(o,D));var O=void 0,B=void 0,G=void 0,H=void 0;if(f){var W=i.dataToPoint([P,k]);if(c){var q=i.dataToPoint([N,k]);R=q[0]}O=R,B=W[1]+m,G=W[0]-R,H=y,Math.abs(G)0?e:1:e))}var pU=function(r,t,e,i){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var s=mc.length,l=Math.min(pU(mc,this._approxInterval,0,s),s-1);this._interval=mc[l][1],this._minLevelUnit=mc[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return Mt(e)?e:+pr(e)},t.prototype.contain=function(e){return dd(this.parse(e),this._extent)},t.prototype.normalize=function(e){return pd(this.parse(e),this._extent)},t.prototype.scale=function(e){return gd(e,this._extent)},t.type="time",t}(en),mc=[["second",b_],["minute",S_],["hour",gu],["quarter-day",gu*6],["half-day",gu*12],["day",Dr*1.2],["half-week",Dr*3.5],["week",Dr*7],["month",Dr*31],["quarter",Dr*95],["half-year",YS/2],["year",YS]];function gU(r,t,e,i){var n=pr(t),a=pr(e),o=function(d){return XS(n,d,i)===XS(a,d,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},c=function(){return h()&&o("minute")},f=function(){return c()&&o("second")},v=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return f();case"millisecond":return v()}}function yU(r,t){return r/=Dr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function mU(r){var t=30*Dr;return r/=t,r>6?6:r>3?3:r>2?2:1}function _U(r){return r/=gu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function rT(r,t){return r/=t?S_:b_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function xU(r){return Q0(r,!0)}function bU(r,t,e){var i=new Date(r);switch(ps(t)){case"year":case"month":i[_I(e)](0);case"day":i[xI(e)](1);case"hour":i[bI(e)](0);case"minute":i[SI(e)](0);case"second":i[wI(e)](0),i[TI(e)](0)}return i.getTime()}function SU(r,t,e,i){var n=1e4,a=yI,o=0;function s(C,D,L,I,P,k,R){for(var N=new Date(D),O=D,B=N[I]();O1&&k===0&&L.unshift({value:L[0].value-O})}}for(var k=0;k=i[0]&&m<=i[1]&&c++)}var _=(i[1]-i[0])/t;if(c>_*1.5&&f>_/1.5||(u.push(g),c>_||r===a[v]))break}h=[]}}}for(var x=Dt(F(u,function(C){return Dt(C,function(D){return D.value>=i[0]&&D.value<=i[1]&&!D.notAdd})}),function(C){return C.length>0}),b=[],S=x.length-1,v=0;v0;)a*=10;var s=[Qt(MU(i[0]/a)*a),Qt(TU(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){_u.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Vr(e)/Vr(this.base),dd(e,this._extent)},t.prototype.normalize=function(e){return e=Vr(e)/Vr(this.base),pd(e,this._extent)},t.prototype.scale=function(e){return e=gd(e,this._extent),_c(this.base,e)},t.type="log",t}(Ii),ik=K_.prototype;ik.getMinorTicks=_u.getMinorTicks;ik.getLabel=_u.getLabel;function xc(r,t){return wU(r,$r(t))}Ii.registerClass(K_);var CU=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var f=this._determinedMin,v=this._determinedMax;return f!=null&&(s=f,u=!0),v!=null&&(l=v,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[DU[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=AU[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),AU={min:"_determinedMin",max:"_determinedMax"},DU={min:"_dataMin",max:"_dataMax"};function nk(r,t,e){var i=r.rawExtentInfo;return i||(i=new CU(r,t,e),r.rawExtentInfo=i,i)}function bc(r,t){return t==null?null:Ss(t)?NaN:r.parse(t)}function ak(r,t){var e=r.type,i=nk(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=qP("bar",o),l=!1;if(A(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=KP(s),h=LU(n,a,t,u);n=h.min,a=h.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function LU(r,t,e,i){var n=e.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=vU(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;A(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=t-r,c=1-(s+l)/a,f=h/c-h;return t+=f*(l/u),r-=f*(s/u),{min:r,max:t}}function yo(r,t){var e=t,i=ak(r,e),n=i.extent,a=e.get("splitNumber");r instanceof K_&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function bh(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new yd({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new q_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ii.getClass(t)||en)}}function IU(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function Ks(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(t):Y(t)?function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}}(t):Q(t)?function(i){return function(n,a){return e!=null&&(a=n.value-e),i(J_(r,n),a,n.level!=null?{level:n.level}:null)}}(t):function(i){return r.scale.getLabel(i)}}function J_(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function PU(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var i,n,a=e.getExtent();e instanceof yd?n=e.count():(i=e.getTicks(),n=i.length);var o=r.getLabelModel(),s=Ks(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var h=0;hr[1]&&(r[1]=n[1])})}var Js=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}();function EU(r){return Li(null,r)}var OU={isDimensionStacked:tn,enableDataStack:$P,getStackedDimension:Z_};function NU(r,t){var e=t;t instanceof Lt||(e=new Lt(t));var i=bh(e);return i.setExtent(r[0],r[1]),yo(i,e),i}function BU(r){re(r,Js)}function zU(r,t){return t=t||{},Gt(r,null,null,t.state!=="normal")}const VU=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Z6,createList:EU,createScale:NU,createSymbol:ae,createTextStyle:zU,dataStack:OU,enableHoverEmphasis:Bn,getECData:ot,getLayoutRect:ue,mixinAxisModelCommonMethods:BU},Symbol.toStringTag,{value:"Module"}));var FU=1e-8;function nT(r,t){return Math.abs(r-t)n&&(i=o,n=l)}if(i)return HU(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?aT(s.exterior,n,a,e):A(s.points,function(l){aT(l,n,a,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new ft(n[0],n[1],a[0]-n[0],a[1]-n[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(e[0],e[1]))return!1;t:for(var a=0,o=n.length;a>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/e,l/e])}return i}function Lm(r,t){return r=UU(r),F(Dt(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,n=e.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new oT(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&a.push(new oT(l[0],l.slice(1)))});break;case"LineString":a.push(new sT([n.coordinates]));break;case"MultiLineString":a.push(new sT(n.coordinates))}var s=new lk(i[t||"name"],a,i.cp);return s.properties=i,s})}const YU=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Ky,asc:fr,getPercentWithPrecision:CG,getPixelPrecision:K0,getPrecision:$r,getPrecisionSafe:m2,isNumeric:t_,isRadianAroundZero:Ts,linearMap:Pt,nice:Q0,numericToNumber:Mi,parseDate:pr,quantile:sf,quantity:x2,quantityExponent:$v,reformIntervals:Jy,remRadian:J0,round:Qt},Symbol.toStringTag,{value:"Module"})),$U=Object.freeze(Object.defineProperty({__proto__:null,format:_h,parse:pr},Symbol.toStringTag,{value:"Module"})),XU=Object.freeze(Object.defineProperty({__proto__:null,Arc:gh,BezierCurve:zs,BoundingRect:ft,Circle:Ai,CompoundPath:Qv,Ellipse:ph,Group:at,Image:xe,IncrementalDisplayable:nI,Line:ce,LinearGradient:Vs,Polygon:Ge,Polyline:We,RadialGradient:f_,Rect:wt,Ring:Bs,Sector:Fe,Text:St,clipPointsByRect:g_,clipRectByRect:uI,createIcon:Gs,extendPath:sI,extendShape:oI,getShapeClass:td,getTransform:zn,initProps:$t,makeImage:d_,makePath:yh,mergePath:cr,registerShape:Er,resizePath:p_,updateProps:At},Symbol.toStringTag,{value:"Module"})),ZU=Object.freeze(Object.defineProperty({__proto__:null,addCommas:T_,capitalFirst:KH,encodeHTML:Oe,formatTime:qH,formatTpl:C_,getTextRect:ZH,getTooltipMarker:MI,normalizeCssArray:To,toCamelCase:M_,truncateText:r3},Symbol.toStringTag,{value:"Module"})),jU=Object.freeze(Object.defineProperty({__proto__:null,bind:$,clone:it,curry:ut,defaults:tt,each:A,extend:z,filter:Dt,indexOf:vt,inherits:W0,isArray:V,isFunction:Q,isObject:et,isString:Y,map:F,merge:ht,reduce:Pr},Symbol.toStringTag,{value:"Module"}));var $u=Tt();function hk(r,t){var e=F(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function qU(r){var t=r.getLabelModel().get("customValues");if(t){var e=Ks(r),i=r.scale.getExtent(),n=hk(r,t),a=Dt(n,function(o){return o>=i[0]&&o<=i[1]});return{labels:F(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?JU(r):tY(r)}function KU(r,t){var e=r.getTickModel().get("customValues");if(e){var i=r.scale.getExtent(),n=hk(r,e);return{ticks:Dt(n,function(a){return a>=i[0]&&a<=i[1]})}}return r.type==="category"?QU(r,t):{ticks:F(r.scale.getTicks(),function(a){return a.value})}}function JU(r){var t=r.getLabelModel(),e=ck(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function ck(r,t){var e=fk(r,"labels"),i=Q_(t),n=vk(e,i);if(n)return n;var a,o;return Q(i)?a=gk(r,i):(o=i==="auto"?eY(r):i,a=pk(r,o)),dk(e,i,{labels:a,labelCategoryInterval:o})}function QU(r,t){var e=fk(r,"ticks"),i=Q_(t),n=vk(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),Q(i))a=gk(r,i,!0);else if(i==="auto"){var s=ck(r,r.getLabelModel());o=s.labelCategoryInterval,a=F(s.labels,function(l){return l.tickValue})}else o=i,a=pk(r,o,!0);return dk(e,i,{ticks:a,tickCategoryInterval:o})}function tY(r){var t=r.scale.getTicks(),e=Ks(r);return{labels:F(t,function(i,n){return{level:i.level,formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function fk(r,t){return $u(r)[t]||($u(r)[t]=[])}function vk(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),f=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=fh(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,f=Math.max(f,d,7),v=Math.max(v,p,7)}var y=f/h,m=v/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),x=$u(r.model),b=r.getExtent(),S=x.lastAutoInterval,w=x.lastTickCount;return S!=null&&w!=null&&Math.abs(S-_)<=1&&Math.abs(w-o)<=1&&S>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}function iY(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function pk(r,t,e){var i=Ks(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],h=n.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=ok(r),f=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;f&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:i(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function gk(r,t,e){var i=r.scale,n=Ks(r),a=[];return A(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var lT=[0,1],Br=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return K0(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&n.type==="ordinal"&&(i=i.slice(),uT(i,n.count())),Pt(t,lT,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),uT(i,n.count()));var a=Pt(t,i,lT,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=KU(this,e),n=i.ticks,a=F(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return nY(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=F(i,function(a){return F(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return qU(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return rY(this)},r}();function uT(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function nY(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(v){v.coord-=u/2});var h=r.scale.getExtent();s=1+h[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:h[1]+1},t.push(o)}var c=a[0]>a[1];f(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&f(a[0],t[0].coord)&&t.unshift({coord:a[0]}),f(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&f(o.coord,a[1])&&t.push({coord:a[1]});function f(v,d){return v=Qt(v),d=Qt(d),c?v>d:vn&&(n+=wl);var v=Math.atan2(s,o);if(v<0&&(v+=wl),v>=i&&v<=n||v+wl>=i&&v+wl<=n)return l[0]=h,l[1]=c,u-e;var d=e*Math.cos(i)+r,p=e*Math.sin(i)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function ov(r,t,e,i,n,a,o,s){var l=n-r,u=a-t,h=e-r,c=i-t,f=Math.sqrt(h*h+c*c);h/=f,c/=f;var v=l*h+u*c,d=v/f;s&&(d=Math.min(Math.max(d,0),1)),d*=f;var p=o[0]=r+d*h,g=o[1]=t+d*c;return Math.sqrt((p-n)*(p-n)+(g-a)*(g-a))}function yk(r,t,e,i,n,a,o){e<0&&(r=r+e,e=-e),i<0&&(t=t+i,i=-i);var s=r+e,l=t+i,u=o[0]=Math.min(Math.max(n,r),s),h=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-n)*(u-n)+(h-a)*(h-a))}var Ur=[];function fY(r,t,e){var i=yk(t.x,t.y,t.width,t.height,r.x,r.y,Ur);return e.set(Ur[0],Ur[1]),i}function vY(r,t,e){for(var i=0,n=0,a=0,o=0,s,l,u=1/0,h=t.data,c=r.x,f=r.y,v=0;v0){t=t/180*Math.PI,Xr.fromArray(r[0]),Ut.fromArray(r[1]),ie.fromArray(r[2]),ct.sub(mi,Xr,Ut),ct.sub(pi,ie,Ut);var e=mi.len(),i=pi.len();if(!(e<.001||i<.001)){mi.scale(1/e),pi.scale(1/i);var n=mi.dot(pi),a=Math.cos(t);if(a1&&ct.copy(Xe,ie),Xe.toArray(r[1])}}}}function dY(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Xr.fromArray(r[0]),Ut.fromArray(r[1]),ie.fromArray(r[2]),ct.sub(mi,Ut,Xr),ct.sub(pi,ie,Ut);var i=mi.len(),n=pi.len();if(!(i<.001||n<.001)){mi.scale(1/i),pi.scale(1/n);var a=mi.dot(t),o=Math.cos(e);if(a=l)ct.copy(Xe,ie);else{Xe.scaleAndAdd(pi,s/Math.tan(Math.PI/2-h));var c=ie.x!==Ut.x?(Xe.x-Ut.x)/(ie.x-Ut.x):(Xe.y-Ut.y)/(ie.y-Ut.y);if(isNaN(c))return;c<0?ct.copy(Xe,Ut):c>1&&ct.copy(Xe,ie)}Xe.toArray(r[1])}}}}function qp(r,t,e,i){var n=e==="normal",a=n?r:r.ensureState(e);a.ignore=t;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):a.style=s}function pY(r,t){var e=t.smooth,i=t.points;if(i)if(r.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var n=Wi(i[0],i[1]),a=Wi(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*e,s=su([],i[1],i[0],o/n),l=su([],i[1],i[2],o/a),u=su([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0){_(M*T,0,o);var C=M+S;C<0&&x(-C*T,1)}else x(-S*T,1)}}function _(S,w,T){S!==0&&(u=!0);for(var M=w;M0)for(var C=0;C0;C--){var P=T[C-1]*I;_(-P,C,o)}}}function b(S){var w=S<0?-1:1;S=Math.abs(S);for(var T=Math.ceil(S/(o-1)),M=0;M0?_(T,0,M+1):_(-T,o-M-1,o),S-=T,S<=0)return}return u}function gY(r,t,e,i){return xk(r,"x","width",t,e)}function bk(r,t,e,i){return xk(r,"y","height",t,e)}function Sk(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new ft(0,0,0,0);function i(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var n=0;n=0&&i.attr(a.oldLayoutSelect),vt(f,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),At(i,u,e,l)}else if(i.attr(u),!Hs(i).valueAnimation){var c=lt(i.style.opacity,1);i.style.opacity=0,$t(i,{style:{opacity:c}},e,l)}if(a.oldLayout=u,i.states.select){var v=a.oldLayoutSelect={};Sc(v,u,wc),Sc(v,i.states.select,wc)}if(i.states.emphasis){var d=a.oldLayoutEmphasis={};Sc(d,u,wc),Sc(d,i.states.emphasis,wc)}vI(i,l,h,e,e)}if(n&&!n.ignore&&!n.invisible){var a=_Y(n),o=a.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),At(n,{shape:p},e)):(n.setShape(p),n.style.strokePercent=0,$t(n,{style:{strokePercent:1}},e)),a.oldLayout=p}},r}(),Jp=Tt();function bY(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){var n=Jp(e).labelManager;n||(n=Jp(e).labelManager=new xY),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,i){var n=Jp(e).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(e.getViewOfSeriesModel(a))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Qp=Math.sin,tg=Math.cos,wk=Math.PI,La=Math.PI*2,SY=180/wk,Tk=function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){this._add("C",t,e,i,n,a,o)},r.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},r.prototype.arc=function(t,e,i,n,a,o){this.ellipse(t,e,i,i,0,n,a,o)},r.prototype.ellipse=function(t,e,i,n,a,o,s,l){var u=s-o,h=!l,c=Math.abs(u),f=In(c-La)||(h?u>=La:-u>=La),v=u>0?u%La:u%La+La,d=!1;f?d=!0:In(c)?d=!1:d=v>=wk==!!h;var p=t+i*tg(o),g=e+n*Qp(o);this._start&&this._add("M",p,g);var y=Math.round(a*SY);if(f){var m=1/this._p,_=(h?1:-1)*(La-m);this._add("A",i,n,y,1,+h,t+i*tg(o+_),e+n*Qp(o+_)),m>.01&&this._add("A",i,n,y,0,+h,p,g)}else{var x=t+i*tg(s),b=e+n*Qp(s);this._add("A",i,n,y,+d,+h,x,b)}},r.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,i,n,a,o,s,l,u){for(var h=[],c=this._p,f=1;f"}function PY(r){return""}function ix(r,t){t=t||{};var e=t.newline?` `:"";function i(n){var a=n.children,o=n.tag,s=n.attrs,l=n.text;return IY(o,s)+(o!=="style"?Oe(l):l||"")+(a?""+e+F(a,function(u){return i(u)}).join(e)+e:"")+PY(o)}return i(r)}function kY(r,t,e){e=e||{};var i=e.newline?` `:"",n=" {"+i,a=i+"}",o=F(xt(r),function(l){return l+n+F(xt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),s=F(xt(t),function(l){return"@keyframes "+l+n+F(xt(t[l]),function(u){return u+n+F(xt(t[l][u]),function(h){var c=t[l][u][h];return h==="d"&&(c='path("'+c+'")'),h+":"+c+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":[""].join(i)}function Pm(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vT(r,t,e,i){return ge("svg","root",{width:r,height:t,xmlns:Mk,"xmlns:xlink":Ck,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+t:!1},e)}var RY=0;function Dk(){return RY++}var dT={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ea="transform-origin";function EY(r,t,e){var i=z({},r.shape);z(i,t),r.buildPath(e,i);var n=new Tk;return n.reset(s2(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function OY(r,t){var e=t.originX,i=t.originY;(e||i)&&(r[Ea]=e+"px "+i+"px")}var NY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Lk(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function BY(r,t,e){var i=r.shape.paths,n={},a,o;if(A(i,function(l){var u=Pm(e.zrId);u.animation=!0,md(l,{},u,!0);var h=u.cssAnims,c=u.cssNodes,f=xt(h),v=f.length;if(v){o=f[v-1];var d=h[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(a=m)}}}),!!a){t.d=!1;var s=Lk(n,e);return a.replace(o,s)}}function pT(r){return Y(r)?dT[r]?"cubic-bezier("+dT[r]+")":X0(r)?r:"":""}function md(r,t,e,i){var n=r.animators,a=n.length,o=[];if(r instanceof Qv){var s=BY(r,t,e);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var te=Lk(w,e);return te+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+Dk();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function zY(r,t,e){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};gT(i,t,e)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(a=Bf(l))}var u=n.lineWidth;if(u){var h=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),gT(i,t,e)}}function gT(r,t,e,i){var n=JSON.stringify(r),a=e.cssStyleCache[n];a||(a=e.zrId+"-cls-"+Dk(),e.cssStyleCache[n]=a,e.cssNodes["."+a+":hover"]=r),t.class=t.class?t.class+" "+a:a}var Xu=Math.round;function Ik(r){return r&&Y(r.src)}function Pk(r){return r&&Q(r.toDataURL)}function nx(r,t,e,i){AY(function(n,a){var o=n==="fill"||n==="stroke";o&&o2(a)?Rk(t,r,n,i):o&&j0(a)?Ek(e,r,n,i):r[n]=a,o&&i.ssr&&a==="none"&&(r["pointer-events"]="visible")},t,e,!1),YY(e,r,i)}function ax(r,t){var e=p2(t);e&&(e.each(function(i,n){i!=null&&(r[(fT+n).toLowerCase()]=i+"")}),t.isSilent()&&(r[fT+"silent"]="true"))}function yT(r){return In(r[0]-1)&&In(r[1])&&In(r[2])&&In(r[3]-1)}function VY(r){return In(r[4])&&In(r[5])}function ox(r,t,e){if(t&&!(VY(t)&&yT(t))){var i=1e4;r.transform=yT(t)?"translate("+Xu(t[4]*i)/i+" "+Xu(t[5]*i)/i+")":UF(t)}}function mT(r,t,e){for(var i=r.points,n=[],a=0;a"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ve(f,g),Ve(v,g)}else if(f==null||v==null){var y=function(C,D){if(C){var L=C.elm,I=f||D.width,P=v||D.height;C.tag==="pattern"&&(u?(P=1,I/=a.width):h&&(I=1,P/=a.height)),C.attrs.width=I,C.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=n_(d,null,r,function(C){l||y(S,C),y(c,C)});m&&m.width&&m.height&&(f=f||m.width,v=v||m.height)}c=ge("image","img",{href:d,width:f,height:v}),o.width=f,o.height=v}else n.svgElement&&(c=it(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):h?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=l2(n);b&&(o.patternTransform=b);var S=ge("pattern","",o,[c]),w=ix(S),T=i.patternCache,M=T[w];M||(M=i.zrId+"-p"+i.patternIdx++,T[w]=M,o.id=M,S=i.defs[M]=ge("pattern",M,o,[c])),t[e]=Wv(M)}}function $Y(r,t,e){var i=e.clipPathCache,n=e.defs,a=i[r.id];if(!a){a=e.zrId+"-c"+e.clipPathIdx++;var o={id:a};i[r.id]=a,n[a]=ge("clipPath",a,o,[kk(r,e)])}t["clip-path"]=Wv(a)}function bT(r){return document.createTextNode(r)}function Ga(r,t,e){r.insertBefore(t,e)}function ST(r,t){r.removeChild(t)}function wT(r,t){r.appendChild(t)}function Ok(r){return r.parentNode}function Nk(r){return r.nextSibling}function eg(r,t){r.textContent=t}var TT=58,XY=120,ZY=ge("","");function km(r){return r===void 0}function vi(r){return r!==void 0}function jY(r,t,e){for(var i={},n=t;n<=e;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function Xl(r,t){var e=r.key===t.key,i=r.tag===t.tag;return i&&e}function Zu(r){var t,e=r.children,i=r.tag;if(vi(i)){var n=r.elm=Ak(i);if(sx(ZY,r),V(e))for(t=0;ta?(d=e[l+1]==null?null:e[l+1].elm,Bk(r,d,e,n,l)):lv(r,t,i,a))}function rs(r,t){var e=t.elm=r.elm,i=r.children,n=t.children;r!==t&&(sx(r,t),km(t.text)?vi(i)&&vi(n)?i!==n&&qY(e,i,n):vi(n)?(vi(r.text)&&eg(e,""),Bk(e,null,n,0,n.length-1)):vi(i)?lv(e,i,0,i.length-1):vi(r.text)&&eg(e,""):r.text!==t.text&&(vi(i)&&lv(e,i,0,i.length-1),eg(e,t.text)))}function KY(r,t){if(Xl(r,t))rs(r,t);else{var e=r.elm,i=Ok(e);Zu(t),i!==null&&(Ga(i,t.elm,Nk(e)),lv(i,[r],0,0))}return t}var JY=0,QY=function(){function r(t,e,i){if(this.type="svg",this.refreshHover=MT(),this.configLayer=MT(),this.storage=e,this._opts=i=z({},i),this.root=t,this._id="zr"+JY++,this._oldVNode=vT(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Ak("svg");sx(null,this._oldVNode),n.appendChild(a),t.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",KY(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return xT(t,Pm(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=Pm(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=t8(i,n,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=ge("g","main",{},[]);this._paintList(e,a,l?l.children:o),l&&o.push(l);var u=F(xt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(ge("defs","defs",{},u)),t.animation){var h=kY(a.cssNodes,a.cssAnims,{newline:!0});if(h){var c=ge("style","stl",{},[],h);o.push(c)}}return vT(i,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},ix(this.renderToVNode({animation:lt(t.cssAnimation,!0),emphasis:lt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:lt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,i){for(var n=t.length,a=[],o=0,s,l,u=0,h=0;h=0&&!(f&&l&&f[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=a[o-1];for(var y=p+1;y=s)}}for(var c=this.__startIndex;c15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var C=v.dpr,D=0;D0&&t>n[0]){for(l=0;lt);l++);s=i[n[l]]}if(n.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n0?Tc:0),this._needsManuallyCompositing),h.__builtin__||Bv("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,e(l),a=h),n.__dirty&hr&&!n.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(c,f){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,A(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?ht(i[t],e,!0):i[t]=e;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(zt);function Ls(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=As(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(t[a])}return i.join(" ")}var Sh=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o){this.removeAll();var s=ae(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=l8,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ki(this.childAt(0))},t.prototype.downplay=function(){Ji(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=o!==this._symbolType,h=a&&a.disableAnimation;if(u){var c=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,c)}else{var f=this.childAt(0);f.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};h?f.attr(v):At(f,v,s,i),ri(f)}if(this._updateCommon(e,i,l,n,a),u){var f=this.childAt(0);if(!h){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,$t(f,v,s,i)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,h,c,f,v,d,p,g,y;if(a&&(u=a.emphasisItemStyle,h=a.blurItemStyle,c=a.selectItemStyle,f=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),h=m.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=me(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Mo(e.getItemVisual(i,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var S=e.getItemVisual(i,"style"),w=S.fill;if(s instanceof xe){var T=s.style;s.useStyle(z({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(z({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=e.getItemVisual(i,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var D=o&&o.useNameLabel;Ae(s,p,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(k){return D?e.getName(k):Ls(e,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=h;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),Kt(this,f,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=ot(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Xn(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Xn(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return js(e.getItemVisual(i,"symbolSize"))},t}(at);function l8(r,t){this.parent.drift(r,t)}function ig(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function DT(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function LT(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:me(t),cursorStyle:t.get("cursor")}}var wh=function(){function r(t){this.group=new at,this._SymbolCtor=t||Sh}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=DT(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=LT(t),u={disableAnimation:s},h=e.getSymbolPoint||function(c){return t.getItemLayout(c)};a||i.removeAll(),t.diff(a).add(function(c){var f=h(c);if(ig(t,f,c,e)){var v=new o(t,c,l,u);v.setPosition(f),t.setItemGraphicEl(c,v),i.add(v)}}).update(function(c,f){var v=a.getItemGraphicEl(f),d=h(c);if(!ig(t,d,c,e)){i.remove(v);return}var p=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)i.remove(v),v=new o(t,c,l,u),v.setPosition(d);else{v.updateData(t,c,l,u);var y={x:d[0],y:d[1]};s?v.attr(y):At(v,y,n)}i.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&f.fadeOut(function(){i.remove(f)},n)}).execute(),this._getSymbolPoint=h,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=LT(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=DT(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?e=i[0]:i[1]<0&&(e=i[1]),e}function Fk(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function h8(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function c8(r,t,e,i,n,a,o,s){for(var l=h8(r,t),u=[],h=[],c=[],f=[],v=[],d=[],p=[],g=Vk(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||p<0)break;if(ao(y,m)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](y,m),c=y,f=m;else{var _=y-u,x=m-h;if(_*_+x*x<.5){p+=a;continue}if(o>0){for(var b=p+a,S=t[b*2],w=t[b*2+1];S===y&&w===m&&g=i||ao(S,w))v=y,d=m;else{C=S-u,D=w-h;var P=y-u,k=S-y,R=m-h,N=w-m,O=void 0,B=void 0;if(s==="x"){O=Math.abs(P),B=Math.abs(k);var G=C>0?1:-1;v=y-G*O*o,d=m,L=y+G*B*o,I=m}else if(s==="y"){O=Math.abs(R),B=Math.abs(N);var H=D>0?1:-1;v=y,d=m-H*O*o,L=y,I=m+H*B*o}else O=Math.sqrt(P*P+R*R),B=Math.sqrt(k*k+N*N),M=B/(B+O),v=y-C*o*(1-M),d=m-D*o*(1-M),L=y+C*o*M,I=m+D*o*M,L=vn(L,dn(S,y)),I=vn(I,dn(w,m)),L=dn(L,vn(S,y)),I=dn(I,vn(w,m)),C=L-y,D=I-m,v=y-C*O/B,d=m-D*O/B,v=vn(v,dn(u,y)),d=vn(d,dn(h,m)),v=dn(v,vn(u,y)),d=dn(d,vn(h,m)),C=y-v,D=m-d,L=y+C*B/O,I=m+D*B/O}r.bezierCurveTo(c,f,v,d,y,m),c=L,f=I}else r.lineTo(y,m)}u=y,h=m,p+=a}return g}var Gk=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),f8=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Gk},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&ao(n[o*2-2],n[o*2-1]);o--);for(;a=0){var x=u?(d-l)*_+l:(v-s)*_+s;return u?[e,x]:[x,e]}s=v,l=d;break;case o.C:v=a[c++],d=a[c++],p=a[c++],g=a[c++],y=a[c++],m=a[c++];var b=u?Of(s,v,p,y,e,h):Of(l,d,g,m,e,h);if(b>0)for(var S=0;S=0){var x=u?ve(l,d,g,m,w):ve(s,v,p,y,w);return u?[e,x]:[x,e]}}s=y,l=m;break}}},t}(_t),v8=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Gk),Hk=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new v8},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&ao(n[s*2-2],n[s*2-1]);s--);for(;ot){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function g8(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=F(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),h=u.length,c=a.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var f=p8(u,n==="x"?e.getWidth():e.getHeight()),v=f.length;if(!v&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var d=10,p=f[0].coord-d,g=f[v-1].coord+d,y=g-p;if(y<.001)return"transparent";A(f,function(_){_.offset=(_.coord-p)/y}),f.push({offset:v?f[v-1].offset:.5,color:c[1]||"transparent"}),f.unshift({offset:v?f[0].offset:.5,color:c[0]||"transparent"});var m=new Vs(0,0,0,0,f,!0);return m[n]=p,m[n+"2"]=g,m}}}function y8(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&m8(a,t))){var o=t.mapDimension(a.dim),s={};return A(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function m8(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function _8(r,t){return isNaN(r)||isNaN(t)}function x8(r){for(var t=r.length/2;t>0&&_8(r[t*2-2],r[t*2-1]);t--);return t-1}function ET(r,t){return[r[t*2],r[t*2+1]]}function b8(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function Yk(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var B=d.getState("emphasis").style;B.lineWidth=+d.style.lineWidth+1}ot(d).seriesIndex=e.seriesIndex,Kt(d,R,N,O);var G=RT(e.get("smooth")),H=e.get("smoothMonotone");if(d.setShape({smooth:G,smoothMonotone:H,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),q=0;p.useStyle(tt(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(q=RT(W.get("smooth"))),p.setShape({smooth:G,stackedOnSmooth:q,smoothMonotone:H,connectNulls:w}),Ce(p,e,"areaStyle"),ot(p).seriesIndex=e.seriesIndex,Kt(p,R,N,O)}var K=this._changePolyState;s.eachItemGraphicEl(function(nt){nt&&(nt.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=h,this._step=C,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,i){ot(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=fo(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],c=l[s*2+1];if(isNaN(h)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,c))return;var f=e.get("zlevel")||0,v=e.get("z")||0;u=new Sh(o,s),u.x=h,u.y=c,u.setZ(f,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=f,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ot.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=fo(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ot.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Hf(this._polyline,e),i&&Hf(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new f8({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Hk({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,h=u.get("animationDuration");Q(h)&&(h=h(null));var c=u.get("animationDelay")||0,f=Q(c)?c(null):c;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var x=n,b=i.pointToCoord(g);a?(y=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(y=x.r0,m=x.r,_=b[0])}else{var S=n;a?(y=S.x,m=S.x+S.width,_=v.x):(y=S.y+S.height,m=S.y,_=v.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=Q(c)?c(d):h*w+f,M=p.getSymbolPath(),C=M.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(Yk(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new St({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=x8(l);h>=0&&(Ae(s,me(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:h,defaultText:function(c,f,v){return v!=null?zk(o,v):Ls(o,c)},enableTextSetter:!0},S8(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,h=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=n.getLayout("points"),f=n.hostModel,v=f.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=i.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),S=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=b8(c,x,w),M=T.range,C=M[1]-M[0],D=void 0;if(C>=1){if(C>1&&!v){var L=ET(c,M[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(D=f.getRawValue(M[0]))}else{var L=h.getPointOn(x,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var I=f.getRawValue(M[0]),P=f.getRawValue(M[1]);o&&(D=D2(n,d,I,P,T.t))}a.lastFrameIndex=M[0]}else{var k=e===1||a.lastFrameIndex>0?M[0]:0,L=ET(c,k);o&&(D=f.getRawValue(k)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var R=Hs(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,h=this._polygon,c=e.hostModel,f=c8(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=f.current,d=f.stackedOnCurrent,p=f.next,g=f.stackedOnNext;if(o&&(d=pn(f.stackedOnCurrent,f.current,n,o,l),v=pn(f.current,null,n,o,l),g=pn(f.stackedOnNext,f.next,n,o,l),p=pn(f.next,null,n,o,l)),kT(v,p)>3e3||h&&kT(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),h&&(h.stopAnimation(),h.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=v;var y={shape:{points:p}};f.current!==v&&(y.shape.__points=f.next),u.stopAnimation(),At(u,y,c),h&&(h.setShape({points:v,stackedOnPoints:d}),h.stopAnimation(),At(h,{shape:{stackedOnPoints:g}},c),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var m=[],_=f.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){h&&h.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),c=i.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(c||1),v=Math.round(s/f);if(isFinite(v)&&v>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var d=void 0;Y(a)?d=T8[a]:Q(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,d,M8))}}}}}function C8(r){r.registerChartView(w8),r.registerSeriesModel(s8),r.registerLayout(Mh("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$k("line"))}var ju=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)A(a.getAxes(),function(f,v){if(f.type==="category"&&i!=null){var d=f.getTicksCoords(),p=f.getTickModel().get("alignWithLabel"),g=o[v],y=i[v]==="x1"||i[v]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,b=0;bg){_=(S+m)/2;break}b===1&&(x=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+h/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(zt);zt.registerClass(ju);var A8=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Li(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ea(ju.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(ju),D8=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),uv=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new D8},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,h=i.startAngle,c=i.endAngle,f=i.clockwise,v=Math.PI*2,d=f?c-hMath.PI/2&&hs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){Vu(a,e,ot(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ot),OT={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=ag(t.x,r.x),s=og(t.x+t.width,n),l=ag(t.y,r.y),u=og(t.y+t.height,a),h=sn?s:o,t.y=c&&l>a?u:l,t.width=h?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),h||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=og(t.r,r.r),a=ag(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},NT={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new wt({shape:z({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var h=u.shape,c=n?"height":"width";h[c]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?uv:Fe,h=new u({shape:i,z2:1});h.name="item";var c=Xk(n);if(h.calculateTextPosition=L8(c,{isRoundCap:u===uv}),a){var f=h.shape,v=n?"r":"endAngle",d={};f[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?At:$t)(h,{shape:d},a)}return h}};function R8(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function BT(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?At:$t)(e,{shape:l},t,n,null);var h=t?r.baseAxis.model:null;(o?At:$t)(e,{shape:u},h,n)}function zT(r,t){for(var e=0;e0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function N8(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Xk(r){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(r)}function FT(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var h=r.shape,c=Ka(i.getModel("itemStyle"),h,!0);z(h,c),r.setShape(h)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=i.getShallow("cursor");f&&r.attr("cursor",f);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=me(i);Ae(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Ls(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=i.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,I8(r,g==="outside"?v:g,Xk(o),i.get(["label","rotate"]))}fI(p,d,a.getRawValue(e),function(m){return zk(t,m)});var y=i.getModel(["emphasis"]);Kt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ce(r,i),N8(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function B8(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var z8=function(){function r(){}return r}(),GT=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new z8},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h=0?e:null},30,!1);function V8(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,h=0,c=a.length/3;h=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[h]}return-1}function Zk(r,t,e){if(Co(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function F8(r,t,e){var i=r.type==="polar"?Fe:wt;return new i({shape:Zk(t,e,r),silent:!0,z2:0})}function G8(r){r.registerChartView(k8),r.registerSeriesModel(A8),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(QP,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tk("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$k("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var UT=Math.PI*2,Dc=Math.PI/180;function jk(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function qk(r,t){var e=jk(r,t),i=r.get("center"),n=r.get("radius");V(n)||(n=[0,n]);var a=U(e.width,t.getWidth()),o=U(e.height,t.getHeight()),s=Math.min(a,o),l=U(n[0],s/2),u=U(n[1],s/2),h,c,f=r.coordinateSystem;if(f){var v=f.dataToPoint(i);h=v[0]||0,c=v[1]||0}else V(i)||(i=[i,i]),h=U(i[0],a)+e.x,c=U(i[1],o)+e.y;return{cx:h,cy:c,r0:l,r:u}}function H8(r,t,e){t.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=jk(i,e),s=qk(i,e),l=s.cx,u=s.cy,h=s.r,c=s.r0,f=-i.get("startAngle")*Dc,v=i.get("endAngle"),d=i.get("padAngle")*Dc;v=v==="auto"?f-UT:-v*Dc;var p=i.get("minAngle")*Dc,g=p+d,y=0;n.each(a,function(N){!isNaN(N)&&y++});var m=n.getSum(a),_=Math.PI/(m||y)*2,x=i.get("clockwise"),b=i.get("roseType"),S=i.get("stillShowZeroSum"),w=n.getDataExtent(a);w[0]=0;var T=x?1:-1,M=[f,v],C=T*d/2;a_(M,!x),f=M[0],v=M[1];var D=Kk(i);D.startAngle=f,D.endAngle=v,D.clockwise=x;var L=Math.abs(v-f),I=L,P=0,k=f;if(n.setLayout({viewRect:o,r:h}),n.each(a,function(N,O){var B;if(isNaN(N)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:c,r:b?NaN:h});return}b!=="area"?B=m===0&&S?_:N*_:B=L/y,BB?(H=k+T*B/2,W=H):(H=k+C,W=G-C),n.setItemLayout(O,{angle:B,startAngle:H,endAngle:W,clockwise:x,cx:l,cy:u,r0:c,r:b?Pt(N,w,[c,h]):h}),k=G}),Ie?y:g,b=Math.abs(_.label.y-e);if(b>=x.maxY){var S=_.label.x-t-_.len2*n,w=i+_.len,T=Math.abs(S)r.unconstrainedWidth?null:v:null;i.setStyle("width",d)}var p=i.getBoundingRect();a.width=p.width;var g=(i.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-c)/2}}}function sg(r){return r.position==="center"}function Y8(r){var t=r.getData(),e=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*W8,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,h=s.x,c=s.y,f=s.height;function v(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),T=w.shape,M=w.getTextContent(),C=w.getTextGuideLine(),D=t.getItemModel(S),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),k=L.get("alignTo"),R=U(L.get("edgeDistance"),u),N=L.get("bleedMargin"),O=D.getModel("labelLine"),B=O.get("length");B=U(B,u);var G=O.get("length2");if(G=U(G,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":W>0?"left":"right"}var Vt=Math.PI,Xt=0,fe=L.get("rotate");if(Mt(fe))Xt=fe*(Vt/180);else if(I==="center")Xt=0;else if(fe==="radial"||fe===!0){var sr=W<0?-H+Vt:-H;Xt=sr}else if(fe==="tangential"&&I!=="outside"&&I!=="outer"){var Je=Math.atan2(W,q);Je<0&&(Je=Vt*2+Je);var ia=q>0;ia&&(Je=Vt+Je),Xt=Je-Vt}if(a=!!Xt,M.x=K,M.y=nt,M.rotation=Xt,M.setStyle({verticalAlign:"middle"}),dt){M.setStyle({align:te});var Ld=M.states.select;Ld&&(Ld.x+=M.x,Ld.y+=M.y)}else{var sn=M.getBoundingRect().clone();sn.applyTransform(M.getComputedTransform());var lb=(M.style.margin||0)+2.1;sn.y-=lb/2,sn.height+=lb,e.push({label:M,labelLine:C,position:I,len:B,len2:G,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ct(W,q),linePoints:Ct,textAlign:te,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:N,rect:sn,unconstrainedWidth:sn.width,labelStyleWidth:M.style.width})}w.setTextConfig({inside:dt})}}),!a&&r.get("avoidLabelOverlap")&&U8(e,i,n,l,u,f,h,c);for(var p=0;p0){for(var h=o.getItemLayout(0),c=1;isNaN(h&&h.startAngle)&&c=a.r0}},t.type="pie",t}(Ot);function Qs(r,t,e){t=V(t)&&{coordDimensions:t}||z({encodeDefine:r.getEncode()},t);var i=r.getSource(),n=qs(i,t).dimensions,a=new Be(n,r);return a.initData(i,e),a}var Ah=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var i=this._getDataWithEncodedVisual();return i.getItemVisual(t,e)},r}(),Z8=Tt(),j8=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ah($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Qs(this,{coordDimensions:["value"],encodeDefaulter:ut(D_,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),n=Z8(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=_2(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){co(e,"labelLine",["show"]);var i=e.labelLine,n=e.emphasis.labelLine;i.show=i.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(zt);function q8(r){return{seriesType:r,reset:function(t,e){var i=t.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(Mt(o)&&!isNaN(o)&&o<0)})}}}function K8(r){r.registerChartView(X8),r.registerSeriesModel(j8),pP("pie",r.registerAction),r.registerLayout(ut(H8,"pie")),r.registerProcessor(Ch("pie")),r.registerProcessor(q8("pie"))}var J8=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,i,n){return n.point(i.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(zt),Qk=4,Q8=function(){function r(){}return r}(),t$=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return t.prototype.getDefaultShape=function(){return new Q8},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,i){var n=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]=0;u--){var h=u*2,c=a[h]-s/2,f=a[h+1]-l/2;if(e>=c&&i>=f&&e<=c+s&&i<=f+l)return u}return-1},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(e=n[0],i=n[1],a.contain(e,i)){var o=this.hoverDataIdx=this.findDataIndex(e,i);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var i=this.shape,n=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,h=-1/0,c=-1/0,f=0;f=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),r$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,i,n){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,i,n){this._symbolDraw.incrementalUpdate(e,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=e.end===i.getData().count()},t.prototype.updateTransform=function(e,i,n){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Mh("").reset(e,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var i=e.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,i){var n=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new e$:new wh,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Ot),i$=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(yt),Em=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",le).models[0]},t.type="cartesian2dAxis",t}(yt);re(Em,Js);var tR={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:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},n$=ht({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},tR),lx=ht({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},tR),a$=ht({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},lx),o$=tt({logBase:10},lx);const eR={category:n$,value:lx,time:a$,log:o$};var s$={value:1,category:1,time:1,log:1};function Is(r,t,e,i){A(s$,function(n,a){var o=ht(ht({},eR[a],!0),i,!0),s=function(l){E(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=t+"Axis."+a,h}return u.prototype.mergeDefaultAndTheme=function(h,c){var f=Gu(this),v=f?Us(h):{},d=c.getTheme();ht(h,d.get(a+"Axis")),ht(h,this.getDefaultOption()),h.type=$T(h),f&&Zn(h,v,f)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Cm.createByAxisModel(this))},u.prototype.getCategories=function(h){var c=this.option;if(c.type==="category")return h?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",$T)}function $T(r){return r.type||(r.data?"category":"value")}var l$=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return F(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Dt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),Om=["x","y"];function XT(r){return r.type==="interval"||r.type==="time"}var u$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Om,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!XT(e)||!XT(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,c=(s[1]-o[1])/u,f=o[0]-n[0]*h,v=o[1]-a[0]*c,d=this._transform=[h,0,0,c,f,v];this._invTransform=bo([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new ft(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return we(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var n=[];if(this._invTransform)return we(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new ft(a,o,s,l)},t}(l$),h$=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Br);function Nm(r,t,e){e=e||{};var i=r.coordinateSystem,n=t.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],f={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[c[2]-v,c[3]+v]:[c[0]-v,c[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[f.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[f[l]]:c[0],u==="x"?d[f[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[f[s]]-d[f.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),pe(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function ZT(r){return r.get("coordinateSystem")==="cartesian2d"}function jT(r){var t={xAxisModel:null,yAxisModel:null};return A(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,le).models[0];t[i]=a}),t}var lg=Math.log;function rR(r,t,e){var i=en.prototype,n=i.getTicks.call(e),a=i.getTicks.call(e,!0),o=n.length-1,s=i.getInterval.call(e),l=ak(r,t),u=l.extent,h=l.fixMin,c=l.fixMax;if(r.type==="log"){var f=lg(r.base);u=[lg(u[0])/f,lg(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:c});var v=i.getExtent.call(r);h&&(u[0]=v[0]),c&&(u[1]=v[1]);var d=i.getInterval.call(r),p=u[0],g=u[1];if(h&&c)d=(g-p)/o;else if(h)for(g=u[0]+d*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)d=Xp(d),p=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=Xp(d));var m=d*o;g=Math.ceil(u[1]/d)*d,p=Qt(g-m),p<0&&u[0]>=0?(p=0,g=Qt(m)):g>0&&u[1]<=0&&(g=0,p=-Qt(m))}var _=(n[0].value-a[0].value)/s,x=(n[o].value-a[o].value)/s;i.setExtent.call(r,p+d*_,g+d*x),i.setInterval.call(r,d),(_||x)&&i.setNiceExtent.call(r,p+d,g-d)}var c$=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Om,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=xt(o),u=l.length;if(u){for(var h=[],c=u-1;c>=0;c--){var f=+l[c],v=o[f],d=v.model,p=v.scale;Am(p)&&d.get("alignTicks")&&d.get("interval")==null?h.push(v):(yo(p,d),Am(p)&&(s=v))}h.length&&(s||(s=h.pop(),yo(s.scale,s.model)),A(h,function(g){rR(g.scale,g.model,s.scale)}))}}n(i.x),n(i.y);var a={};A(i.x,function(o){qT(i,"y",o,a)}),A(i.y,function(o){qT(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=t.getBoxLayoutParams(),a=!i&&t.get("containLabel"),o=ue(n,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=PU(u);if(h){var c=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[c]-=h[c]+f,u.position==="top"?o.y+=h.height+f:u.position==="left"&&(o.x+=h.width+f)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var h=u.isHorizontal(),c=h?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(c[f],c[1-f]),f$(u,h?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}et(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n0?"top":"bottom",a="center"):Ts(n-Pn)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),JT={axisLine:function(r,t,e,i){var n=t.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=t.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(we(s,s,o),we(l,l,o));var h=z({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new ce({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Cs(c.shape,c.style.lineWidth),c.anid="line",e.add(c);var f=t.get(["axisLine","symbol"]);if(f!=null){var v=t.get(["axisLine","symbolSize"]);Y(f)&&(f=[f,f]),(Y(v)||Mt(v))&&(v=[v,v]);var d=Mo(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];A([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(f[m]!=="none"&&f[m]!=null){var _=ae(f[m],-p/2,-g/2,p,g,h.stroke,!0),x=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+x*Math.cos(r.rotation),y:b[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,i){var n=p$(e,i,t,r),a=y$(e,i,t,r);if(d$(t,a,n),g$(e,i,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=_k(F(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Sk(o)}},axisName:function(r,t,e,i){var n=pe(r.axisName,t.get("name"));if(n){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),h=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-h*l:a==="end"?u[1]+h*l:(u[0]+u[1])/2,tM(a)?r.labelOffset+o*l:0],f,v=t.get("nameRotate");v!=null&&(v=v*Pn/180);var d;tM(a)?f=je.innerTextLayout(r.rotation,v??r.rotation,o):(f=v$(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(f.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},y=g.ellipsis,m=pe(r.nameTruncateMaxWidth,g.maxWidth,d),_=new St({x:c[0],y:c[1],rotation:f.rotation,silent:je.isLabelSilent(t),style:Gt(s,{text:n,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(So({el:_,componentModel:t,itemName:n}),_.__fullText=n,_.anid="name",t.get("triggerEvent")){var x=je.makeAxisEventDataBase(t);x.targetType="axisName",x.name=n,ot(_).eventData=x}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function v$(r,t,e,i){var n=J0(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Ts(n-Pn/2)?(o=l?"bottom":"top",a="center"):Ts(n-Pn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nPn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function d$(r,t,e){if(!ok(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],h=e[1],c=e[e.length-1],f=e[e.length-2];i===!1?(mr(a),mr(u)):QT(a,o)&&(i?(mr(o),mr(h)):(mr(a),mr(u))),n===!1?(mr(s),mr(c)):QT(l,s)&&(n?(mr(l),mr(f)):(mr(s),mr(c)))}}function mr(r){r&&(r.ignore=!0)}function QT(r,t){var e=r&&r.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(!(!e||!i)){var n=hh([]);return Qn(n,n,-r.rotation),e.applyTransform(bi([],n,r.getLocalTransform())),i.applyTransform(bi([],n,t.getLocalTransform())),e.intersect(i)}}function tM(r){return r==="middle"||r==="center"}function iR(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l=0||r===t}function w$(r){var t=ux(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=Bm(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=tt({color:d.color},l));var g=ht(it(d),{boundaryGap:e,splitNumber:i,scale:n,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:f},!1);if(Y(h)){var y=g.name;g.name=h.replace("{value}",y??"")}else Q(h)&&(g.name=h(g.name,g));var m=new Lt(g,null,this.ecModel);return re(m,Js.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ht({lineStyle:{color:"#bbb"}},Tl.axisLine),axisLabel:Lc(Tl.axisLabel,!1),axisTick:Lc(Tl.axisTick,!1),splitLine:Lc(Tl.splitLine,!0),splitArea:Lc(Tl.splitArea,!0),indicator:[]},t}(yt),N$=["axisLine","axisTickLabel","axisName"],B$=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group;a.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var i=e.coordinateSystem,n=i.getIndicatorAxes(),a=F(n,function(o){var s=o.model.get("showName")?o.name:"",l=new je(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});A(a,function(o){A(N$,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var i=e.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),c=s.get("show"),f=l.get("color"),v=u.get("color"),d=V(f)?f:[f],p=V(v)?v:[v],g=[],y=[];function m(k,R,N){var O=N%R.length;return k[O]=k[O]||[],O}if(a==="circle")for(var _=n[0].getTicksCoords(),x=i.cx,b=i.cy,S=0;S<_.length;S++){if(h){var w=m(g,d,S);g[w].push(new Ai({shape:{cx:x,cy:b,r:_[S].coord}}))}if(c&&S<_.length-1){var w=m(y,p,S);y[w].push(new Bs({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,M=F(n,function(k,R){var N=k.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),F(N,function(O){return i.coordToPoint(O.coord,R)})}),C=[],S=0;S<=T;S++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,h=a>0?u:1/u;cg(this,"zoom","zoomOnMouseWheel",e,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(n){var c=Math.abs(a),f=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);cg(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!oM(this._zr,"globalPan")){var i=e.pinchScale>1?1.1:1/1.1;cg(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(Rr);function cg(r,t,e,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(qi(i.event),uR(r,t,e,i,n))}function uR(r,t,e,i,n){n.isAvailableBehavior=$(pf,null,e,i),r.trigger(t,n)}function pf(r,t,e){var i=e[r];return!r||i&&(!Y(i)||t.event[i+"Key"])}function cx(r,t,e){var i=r.target;i.x+=t,i.y+=e,i.dirty()}function fx(r,t,e,i){var n=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(e-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var U$={axisPointer:1,tooltip:1,brush:1};function _d(r,t,e){var i=t.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==e&&!U$.hasOwnProperty(i.mainType)&&n&&n.model!==e}function hR(r){if(Y(r)){var t=new DOMParser;r=t.parseFromString(r,"text/xml")}var e=r;for(e.nodeType===9&&(e=e.firstChild);e.nodeName.toLowerCase()!=="svg"||e.nodeType!==1;)e=e.nextSibling;return e}var fg,hv={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},sM=xt(hv),cv={"alignment-baseline":"textBaseline","stop-color":"stopColor"},lM=xt(cv),Y$=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(t,e){e=e||{};var i=hR(t);this._defsUsePending=[];var n=new at;this._root=n;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||e.width),l=parseFloat(i.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),lr(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;Z$(this._defs,this._defsUsePending),this._defsUsePending=[];var h,c;if(o){var f=xd(o);f.length>=4&&(h={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(h&&s!=null&&l!=null&&(c=fR(h,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var v=n;n=new at,n.add(v),v.scaleX=v.scaleY=c.scale,v.x=c.x,v.y=c.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new wt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:h,viewBoxTransform:c,named:a}},r.prototype._parseNode=function(t,e,i,n,a,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!a){var h=fg[s];if(h&&X(fg,s)){l=h.call(this,t,e);var c=t.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:l};i.push(f),s==="g"&&(u=f)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var v=uM[s];if(v&&X(uM,s)){var d=v.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,i,u,a,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var i=new Ms({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});_r(e,i),lr(t,i,this._defsUsePending,!1,!1),$$(i,e);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=i.getBoundingRect();return this._textX+=s.width,e.add(i),i},r.internalField=function(){fg={g:function(t,e){var i=new at;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new wt;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new Ai;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new ce;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new ph;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i=t.getAttribute("points"),n;i&&(n=fM(i));var a=new Ge({shape:{points:n||[]},silent:!0});return _r(e,a),lr(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,e){var i=t.getAttribute("points"),n;i&&(n=fM(i));var a=new We({shape:{points:n||[]},silent:!0});return _r(e,a),lr(t,a,this._defsUsePending,!1,!1),a},image:function(t,e){var i=new xe;return _r(e,i),lr(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new at;return _r(e,s),lr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new at;return _r(e,s),lr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,e){var i=t.getAttribute("d")||"",n=tI(i);return _r(e,n),lr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),uM={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new Vs(t,e,i,n);return hM(r,a),cM(r,a),a},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new f_(t,e,i);return hM(r,n),cM(r,n),n}};function hM(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function cM(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var i=e.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};cR(e,a,a);var o=a.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function _r(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),tt(t.__inheritedStyle,r.__inheritedStyle))}function fM(r){for(var t=xd(r),e=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=xd(o);switch(n=n||or(),s){case"translate":ti(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Hv(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Qn(n,n,-parseFloat(l[0])*vg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*vg);bi(n,[1,0,u,1,0,0],n);break;case"skewY":var h=Math.tan(parseFloat(l[0])*vg);bi(n,[1,h,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var dM=/([^\s:;]+)\s*:\s*([^:;]+)/g;function cR(r,t,e){var i=r.getAttribute("style");if(i){dM.lastIndex=0;for(var n;(n=dM.exec(i))!=null;){var a=n[1],o=X(hv,a)?hv[a]:null;o&&(t[o]=n[2]);var s=X(cv,a)?cv[a]:null;s&&(e[s]=n[2])}}}function J$(r,t,e){for(var i=0;i0,g={api:i,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,u,i,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Z(),i=Z(),n=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function h(v,d){return d&&(v=d(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function c(v){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(f=n);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ae(t,me(i),{labelFetcher:f,labelDataIndex:c,defaultText:e},v);var d=t.getTextContent();if(d&&(vR(d).ignore=d.ignore,t.textConfig&&o)){var p=t.getBoundingRect().clone();t.textConfig.layoutRect=p,t.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function _M(r,t,e,i,n,a){r.data?r.data.setItemGraphicEl(a,t):ot(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:i&&i.option||{}}}function xM(r,t,e,i,n){r.data||So({el:t,componentModel:n,itemName:e,itemTooltipOption:i.get("tooltip")})}function bM(r,t,e,i,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return Kt(t,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&J3(t,n,e),o}function SM(r,t,e){var i=[],n;function a(){n=[]}function o(){n.length&&(i.push(n),n=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(zt);function m7(r,t){var e={};return A(r,function(i){i.each(i.mapDimension("value"),function(n,a){var o="ec-"+i.getName(a);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=e[a].length,h=0;h1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,x=ue(b,{width:d,height:p})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function S7(r,t){A(t.get("geoCoord"),function(e,i){r.addGeoCoord(i,e)})}var w7=function(){function r(){this.dimensions=pR}return r.prototype.create=function(t,e){var i=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Fm(l+s,l,z({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=CM,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),A(a,function(o,s){var l=F(o,function(h){return h.get("nameMap")}),u=new Fm(s,s,z({nameMap:zv(l)},n(o[0])));u.zoomLimit=pe.apply(null,F(o,function(h){return h.get("scaleLimit")})),i.push(u),u.resize=CM,u.resize(o[0],e),A(o,function(h){h.coordinateSystem=u,S7(u,h)})}),i},r.prototype.getFilledRegions=function(t,e,i,n){for(var a=(t||[]).slice(),o=Z(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function L7(r,t){var e=r.isExpand?r.children:[],i=r.parentNode.children,n=r.hierNode.i?i[r.hierNode.i-1]:null;if(e.length){k7(r);var a=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=R7(r,n,r.parentNode.hierNode.defaultAncestor||i[0],t)}function I7(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function DM(r){return arguments.length?r:N7}function Zl(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function P7(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function k7(r){for(var t=r.children,e=t.length,i=0,n=0;--e>=0;){var a=t[e];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function R7(r,t,e,i){if(t){for(var n=r,a=r,o=a.parentNode.children[0],s=t,l=n.hierNode.modifier,u=a.hierNode.modifier,h=o.hierNode.modifier,c=s.hierNode.modifier;s=dg(s),a=pg(a),s&&a;){n=dg(n),o=pg(o),n.hierNode.ancestor=r;var f=s.hierNode.prelim+c-a.hierNode.prelim-u+i(s,a);f>0&&(O7(E7(s,r,e),r,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,h+=o.hierNode.modifier}s&&!dg(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),a&&!pg(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-h,e=r)}return e}function dg(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function pg(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function E7(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function O7(r,t,e){var i=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=i}function N7(r,t){return r.parentNode===t.parentNode?1:2}var B7=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),z7=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new B7},t.prototype.buildPath=function(e,i){var n=i.childPoints,a=n.length,o=i.parentPoint,s=n[0],l=n[a-1];if(a===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=i.orient,h=u==="TB"||u==="BT"?0:1,c=1-h,f=U(i.forkPosition,1),v=[];v[h]=o[h],v[c]=o[c]+(l[c]-o[c])*f,e.moveTo(o[0],o[1]),e.lineTo(v[0],v[1]),e.moveTo(s[0],s[1]),v[h]=s[h],e.lineTo(v[0],v[1]),v[h]=l[h],e.lineTo(v[0],v[1]),e.lineTo(l[0],l[1]);for(var d=1;dm.x,b||(x=x-Math.PI));var w=b?"left":"right",T=s.getModel("label"),M=T.get("rotate"),C=M*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:M==null?-x:C,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?ws(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ot(e).focus=I),F7(n,o,h,e,d,v,p,i),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===dh||Hf(e.__edge,P)}})}function F7(r,t,e,i,n,a,o,s){var l=t.getModel(),u=r.get("edgeShape"),h=r.get("layout"),c=r.getOrient(),f=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=i.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=i.__edge=new zs({shape:Gm(h,c,f,n,n)})),At(p,{shape:Gm(h,c,f,a,o)},r));else if(u==="polyline"&&h==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=e.getData().tree.root,n=r.targetNode;if(Y(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=r.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function bR(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function yx(r,t){var e=bR(r);return vt(e,t)>=0}function bd(r,t){for(var e=[];r;){var i=r.dataIndex;e.push({name:r.name,dataIndex:i,value:t.getRawValue(i)}),r=r.parentNode}return e.reverse(),e}var j7=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var i={name:e.name,children:e.data},n=e.leaves||{},a=new Lt(n,this,this.ecModel),o=gx.createTree(i,this,s);function s(c){c.wrapMethod("getItemModel",function(f,v){var d=o.getNodeByDataIndex(v);return d&&d.children.length&&d.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=e.expandAndCollapse,h=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=h}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,i,n){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return _e("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=bd(n,this),i.collapsed=!n.isExpand,i},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(zt);function q7(r,t,e){for(var i=[r],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)e.push(n[a])}}function K7(r,t){r.eachSeriesByType("tree",function(e){J7(e,t)})}function J7(r,t){var e=P7(r,t);r.layoutInfo=e;var i=r.get("layout"),n=0,a=0,o=null;i==="radial"?(n=2*Math.PI,a=Math.min(e.height,e.width)/2,o=DM(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(n=e.width,a=e.height,o=DM());var s=r.getData().tree.root,l=s.children[0];if(l){D7(s),q7(l,L7,o),s.hierNode.modifier=-l.hierNode.prelim,Cl(l,I7);var u=l,h=l,c=l;Cl(l,function(_){var x=_.getLayout().x;xh.getLayout().x&&(h=_),_.depth>c.depth&&(c=_)});var f=u===h?1:o(u,h)/2,v=f-u.getLayout().x,d=0,p=0,g=0,y=0;if(i==="radial")d=n/(h.getLayout().x+f+v),p=a/(c.depth-1||1),Cl(l,function(_){g=(_.getLayout().x+v)*d,y=(_.depth-1)*p;var x=Zl(g,y);_.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=a/(h.getLayout().x+f+v),d=n/(c.depth-1||1),Cl(l,function(_){y=(_.getLayout().x+v)*p,g=m==="LR"?(_.depth-1)*d:n-(_.depth-1)*d,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(d=n/(h.getLayout().x+f+v),p=a/(c.depth-1||1),Cl(l,function(_){g=(_.getLayout().x+v)*d,y=m==="TB"?(_.depth-1)*p:a-(_.depth-1)*p,_.setLayout({x:g,y},!0)}))}}}function Q7(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),i=e.tree;i.eachNode(function(n){var a=n.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");z(s,o)})})}function t9(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var n=t.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,i){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var a=n.coordinateSystem,o=dx(a,t,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function e9(r){r.registerChartView(V7),r.registerSeriesModel(j7),r.registerLayout(K7),r.registerVisual(Q7),t9(r)}var RM=["treemapZoomToNode","treemapRender","treemapMove"];function r9(r){for(var t=0;t1;)a=a.parentNode;var o=dm(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",o)})}var i9=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,i){var n={name:e.name,children:e.data};wR(n);var a=e.levels||[],o=this.designatedVisualItemStyle={},s=new Lt({itemStyle:o},this,i);a=e.levels=n9(a,i);var l=F(a||[],function(c){return new Lt(c,s,i)},this),u=gx.createTree(n,this,h);function h(c){c.wrapMethod("getItemModel",function(f,v){var d=u.getNodeByDataIndex(v),p=d?l[d.depth]:null;return f.parentModel=p||s,f})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return _e("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=bd(n,this),i.treePathInfo=i.treeAncestors,i},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},z(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var i=this._idIndexMap;i||(i=this._idIndexMap=Z(),this._idIndexMapCount=0);var n=i.get(e);return n==null&&i.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var i=this.getRawData().tree.root;(!e||e!==i&&!i.contains(e))&&(this._viewRoot=i)},t.prototype.enableAriaDecal=function(){SR(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(zt);function wR(r){var t=0;A(r.children,function(i){wR(i);var n=i.value;V(n)&&(n=n[0]),t+=n});var e=r.value;V(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),V(r.value)?r.value[0]=e:r.value=e}function n9(r,t){var e=Bt(t.get("color")),i=Bt(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,a;A(r,function(s){var l=new Lt(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!a&&i&&(o.decal=i.slice()),r}}var a9=8,EM=8,gg=5,o9=function(){function r(t){this.group=new at,t.add(this.group)}return r.prototype.render=function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,c,u),this._renderContent(t,c,s,l,u,h,n),sd(o,c.pos,c.box)}},r.prototype._prepare=function(t,e,i){for(var n=t;n;n=n.parentNode){var a=he(n.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+a9*2,e.emptyItemWidth);e.totalWidth+=s+EM,e.renderList.push({node:n,text:a,width:s})}},r.prototype._renderContent=function(t,e,i,n,a,o,s){for(var l=0,u=e.emptyItemWidth,h=t.get(["breadcrumb","height"]),c=JH(e.pos,e.box),f=e.totalWidth,v=e.renderList,d=n.getModel("itemStyle").getItemStyle(),p=v.length-1;p>=0;p--){var g=v[p],y=g.node,m=g.width,_=g.text;f>c.width&&(f-=m-u,m=u,_=null);var x=new Ge({shape:{points:s9(l,0,m,h,p===v.length-1,p===0)},style:tt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new St({style:Gt(a,{text:_})}),textConfig:{position:"inside"},z2:Ns*1e4,onclick:ut(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Gt(o,{text:_}),x.ensureState("emphasis").style=d,Kt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),l9(x,t,y),l+=m+EM}},r.prototype.remove=function(){this.group.removeAll()},r}();function s9(r,t,e,i,n,a){var o=[[n?r:r-gg,t],[r+e,t],[r+e,t+i],[n?r:r-gg,t+i]];return!a&&o.splice(2,0,[r+e+gg,t+i/2]),!n&&o.push([r,t+i/2]),o}function l9(r,t,e){ot(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&bd(e,t)}}var u9=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,i,n,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:i,delay:n,easing:a}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,i=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,a=this._storage.length;nNM||Math.abs(e.dy)>NM)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var i=e.originX,n=e.originY,a=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ft(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var c=h.zoom=h.zoom||1;if(c*=a,u){var f=u.min||0,v=u.max||1/0;c=Math.max(Math.min(v,c),f)}var d=c/h.zoom;h.zoom=c;var p=this.seriesModel.layoutInfo;i-=p.x,n-=p.y;var g=or();ti(g,g,[-i,-n]),Hv(g,g,[d,d]),ti(g,g,[i,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var i=this;e.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&Zf(u,h)}}}}},this)},t.prototype._renderBreadcrumb=function(e,i,n){var a=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new o9(this.group))).render(e,i,n.node,function(o){a._state!=="animating"&&(yx(e.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Al(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},t.type="treemap",t}(Ot);function Al(){return{nodeGroup:[],background:[],content:[]}}function p9(r,t,e,i,n,a,o,s,l,u){if(!o)return;var h=o.getLayout(),c=r.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var v=h.width,d=h.height,p=h.borderWidth,g=h.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,x=h.upperHeight,b=_&&_.length,S=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),T=f.getModel(["blur","itemStyle"]),M=f.getModel(["select","itemStyle"]),C=S.get("borderRadius")||0,D=nt("nodeGroup",Hm);if(!D)return;if(l.add(D),D.x=h.x||0,D.y=h.y||0,D.markRedraw(),fv(D).nodeWidth=v,fv(D).nodeHeight=d,h.isAboveViewRoot)return D;var L=nt("background",OM,u,f9);L&&G(D,L,b&&h.upperLabelHeight);var I=f.getModel("emphasis"),P=I.get("focus"),k=I.get("blurScope"),R=I.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)zu(D)&&$a(D,!1),L&&($a(L,!R),c.setItemGraphicEl(o.dataIndex,L),om(L,N,k));else{var O=nt("content",OM,u,v9);O&&H(D,O),L.disableMorphing=!0,L&&zu(L)&&$a(L,!1),$a(D,!R),c.setItemGraphicEl(o.dataIndex,D);var B=f.getShallow("cursor");B&&O.attr("cursor",B),om(D,N,k)}return D;function G(dt,rt,gt){var J=ot(rt);if(J.dataIndex=o.dataIndex,J.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:v,height:d,r:C}),g)W(rt);else{rt.invisible=!1;var st=o.getVisual("style"),Ht=st.stroke,Et=VM(S);Et.fill=Ht;var Vt=Na(w);Vt.fill=w.get("borderColor");var Xt=Na(T);Xt.fill=T.get("borderColor");var fe=Na(M);if(fe.fill=M.get("borderColor"),gt){var sr=v-2*p;q(rt,Ht,st.opacity,{x:p,y:0,width:sr,height:x})}else rt.removeTextContent();rt.setStyle(Et),rt.ensureState("emphasis").style=Vt,rt.ensureState("blur").style=Xt,rt.ensureState("select").style=fe,po(rt)}dt.add(rt)}function H(dt,rt){var gt=ot(rt);gt.dataIndex=o.dataIndex,gt.seriesIndex=r.seriesIndex;var J=Math.max(v-2*p,0),st=Math.max(d-2*p,0);if(rt.culling=!0,rt.setShape({x:p,y:p,width:J,height:st,r:C}),g)W(rt);else{rt.invisible=!1;var Ht=o.getVisual("style"),Et=Ht.fill,Vt=VM(S);Vt.fill=Et,Vt.decal=Ht.decal;var Xt=Na(w),fe=Na(T),sr=Na(M);q(rt,Et,Ht.opacity,null),rt.setStyle(Vt),rt.ensureState("emphasis").style=Xt,rt.ensureState("blur").style=fe,rt.ensureState("select").style=sr,po(rt)}dt.add(rt)}function W(dt){!dt.invisible&&a.push(dt)}function q(dt,rt,gt,J){var st=f.getModel(J?zM:BM),Ht=he(f.get("name"),null),Et=st.getShallow("show");Ae(dt,me(f,J?zM:BM),{defaultText:Et?Ht:null,inheritColor:rt,defaultOpacity:gt,labelFetcher:r,labelDataIndex:o.dataIndex});var Vt=dt.getTextContent();if(Vt){var Xt=Vt.style,fe=Fv(Xt.padding||0);J&&(dt.setTextConfig({layoutRect:J}),Vt.disableLabelLayout=!0),Vt.beforeUpdate=function(){var Je=Math.max((J?J.width:dt.shape.width)-fe[1]-fe[3],0),ia=Math.max((J?J.height:dt.shape.height)-fe[0]-fe[2],0);(Xt.width!==Je||Xt.height!==ia)&&Vt.setStyle({width:Je,height:ia})},Xt.truncateMinChar=2,Xt.lineOverflow="truncate",K(Xt,J,h);var sr=Vt.getState("emphasis");K(sr?sr.style:null,J,h)}}function K(dt,rt,gt){var J=dt?dt.text:null;if(!rt&>.isLeafRoot&&J!=null){var st=r.get("drillDownIcon",!0);dt.text=st?st+" "+J:J}}function nt(dt,rt,gt,J){var st=m!=null&&e[dt][m],Ht=n[dt];return st?(e[dt][m]=null,Ct(Ht,st)):g||(st=new rt,st instanceof kr&&(st.z2=g9(gt,J)),te(Ht,st)),t[dt][y]=st}function Ct(dt,rt){var gt=dt[y]={};rt instanceof Hm?(gt.oldX=rt.x,gt.oldY=rt.y):gt.oldShape=z({},rt.shape)}function te(dt,rt){var gt=dt[y]={},J=o.parentNode,st=rt instanceof at;if(J&&(!i||i.direction==="drillDown")){var Ht=0,Et=0,Vt=n.background[J.getRawIndex()];!i&&Vt&&Vt.oldShape&&(Ht=Vt.oldShape.width,Et=Vt.oldShape.height),st?(gt.oldX=0,gt.oldY=Et):gt.oldShape={x:Ht,y:Et,width:0,height:0}}gt.fadein=!st}}function g9(r,t){return r*c9+t}var Ju=A,y9=et,vv=-1,ye=function(){function r(t){var e=t.mappingMethod,i=t.type,n=this.option=it(t);this.type=i,this.mappingMethod=e,this._normalizeData=x9[e];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[e],e==="piecewise"?(yg(n),m9(n)):e==="category"?n.categories?_9(n):yg(n,!0):(Ve(e!=="linear"||n.dataExtent),yg(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return $(this._normalizeData,this)},r.listVisualTypes=function(){return xt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,i){et(t)?A(t,e,i):e.call(i,t)},r.mapVisual=function(t,e,i){var n,a=V(t)?[]:et(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(i,o,s);n?a=l:a[s]=l}),a},r.retrieveVisuals=function(t){var e={},i;return t&&Ju(r.visualHandlers,function(n,a){t.hasOwnProperty(a)&&(e[a]=t[a],i=!0)}),i?e:null},r.prepareVisualTypes=function(t){if(V(t))t=t.slice();else if(y9(t)){var e=[];Ju(t,function(i,n){e.push(n)}),t=e}else return[];return t.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,i){for(var n,a=1/0,o=0,s=e.length;o=0;a--)i[a]==null&&(delete e[t[a]],t.pop())}function yg(r,t){var e=r.visual,i=[];et(e)?Ju(e,function(a){i.push(a)}):e!=null&&i.push(e);var n={color:1,symbol:1};!t&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),TR(r,i)}function Pc(r){return{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);i("color",r(e("color"),n))},_normalizedToVisual:Wm([0,1])}}function FM(r){var t=this.option.visual;return t[Math.round(Pt(r,[0,1],[0,t.length-1],!0))]||{}}function Dl(r){return function(t,e,i){i(r,this.mapValueToVisual(t))}}function jl(r){var t=this.option.visual;return t[this.option.loop&&r!==vv?r%t.length:r]}function Ba(){return this.option.visual[0]}function Wm(r){return{linear:function(t){return Pt(t,r,this.option.visual,!0)},category:jl,piecewise:function(t,e){var i=Um.call(this,e);return i==null&&(i=Pt(t,r,this.option.visual,!0)),i},fixed:Ba}}function Um(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var i=ye.findPieceIndex(r,e),n=e[i];if(n&&n.visual)return n.visual[this.type]}}function TR(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=F(t,function(e){var i=Ze(e);return i||[0,0,0,1]})),t}var x9={linear:function(r){return Pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=ye.findPieceIndex(r,t,!0);if(e!=null)return Pt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??vv},fixed:ee};function kc(r,t,e){return r?t<=e:t=e.length||p===e[p.depth]){var y=C9(n,l,p,g,d,i);CR(p,y,e,i)}})}}}function w9(r,t,e){var i=z({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(a){n[a]=t[a];var o=r.get(a);n[a]=null,o!=null&&(i[a]=o)}),i}function GM(r){var t=mg(r,"color");if(t){var e=mg(r,"colorAlpha"),i=mg(r,"colorSaturation");return i&&(t=fs(t,null,null,i)),e&&(t=Ru(t,e)),t}}function T9(r,t){return t!=null?fs(t,null,null,r):null}function mg(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function M9(r,t,e,i,n,a){if(!(!a||!a.length)){var o=_g(t,"color")||n.color!=null&&n.color!=="none"&&(_g(t,"colorAlpha")||_g(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(h==="index"||h==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new ye(c);return MR(f).drColorMappingBy=h,f}}}function _g(r,t){var e=r.get(t);return V(e)&&e.length?{name:t,range:e}:null}function C9(r,t,e,i,n,a){var o=z({},t);if(n){var s=n.type,l=s==="color"&&MR(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Qu=Math.max,dv=Math.min,HM=pe,mx=A,AR=["itemStyle","borderWidth"],A9=["itemStyle","gapWidth"],D9=["upperLabel","show"],L9=["upperLabel","height"];const I9={seriesType:"treemap",reset:function(r,t,e,i){var n=e.getWidth(),a=e.getHeight(),o=r.option,s=ue(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=o.size||[],u=U(HM(s.width,l[0]),n),h=U(HM(s.height,l[1]),a),c=i&&i.type,f=["treemapZoomToNode","treemapRootToNode"],v=Ku(i,f,r),d=c==="treemapRender"||c==="treemapMove"?i.rootRect:null,p=r.getViewRoot(),g=bR(p);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?N9(r,v,p,u,h):d?[d.width,d.height]:[u,h],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};p.setLayout(x),DR(p,_,!1,0),x=p.getLayout(),mx(g,function(S,w){var T=(g[w+1]||p).getValue();S.setLayout(z({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var b=r.getData().tree.root;b.setLayout(B9(s,d,v),!0),r.setLayoutInfo(s),LR(b,new ft(-s.x,-s.y,n,a),g,p,0)}};function DR(r,t,e,i){var n,a;if(!r.isRemoved()){var o=r.getLayout();n=o.width,a=o.height;var s=r.getModel(),l=s.get(AR),u=s.get(A9)/2,h=IR(s),c=Math.max(l,h),f=l-u,v=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),n=Qu(n-2*f,0),a=Qu(a-f-v,0);var d=n*a,p=P9(r,s,d,t,e,i);if(p.length){var g={x:f,y:v,width:n,height:a},y=dv(n,a),m=1/0,_=[];_.area=0;for(var x=0,b=p.length;x=0;l--){var u=n[i==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function O9(r,t,e){for(var i=0,n=1/0,a=0,o=void 0,s=r.length;ai&&(i=o));var l=r.area*r.area,u=t*t*e;return l?Qu(u*i/l,l/(u*n)):1/0}function WM(r,t,e,i,n){var a=t===e.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=e[s[a]],h=t?r.area/t:0;(n||h>e[l[o]])&&(h=e[l[o]]);for(var c=0,f=r.length;cKy&&(u=Ky),a=s}ui&&(i=t);var a=i%2?i+2:i+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(x[1],x[0]);c[0].8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+h[0],a.y=-f[1]*m+h[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*w+h[0],a.y=h[1]+M,d=x[0]<0?"right":"left",a.originX=-y*w,a.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+M,d="center",a.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*w+c[0],a.y=c[1]+M,d=x[0]>=0?"right":"left",a.originX=y*w,a.originY=-M;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||d})}},t}(at),Tx=function(){function r(t){this.group=new at,this._LineCtor=t||Sx}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=jM(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=jM(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function i(s){!s.isGroup&&!eX(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function jM(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:me(t)}}function qM(r){return isNaN(r[0])||isNaN(r[1])}function Tg(r){return r&&!qM(r[0])&&!qM(r[1])}var Mg=[],Cg=[],Ag=[],$o=be,Dg=On,KM=Math.abs;function JM(r,t,e){for(var i=r[0],n=r[1],a=r[2],o=1/0,s,l=e*e,u=.1,h=.1;h<=.9;h+=.1){Mg[0]=$o(i[0],n[0],a[0],h),Mg[1]=$o(i[1],n[1],a[1],h);var c=KM(Dg(Mg,t)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Lg(r,t){var e=[],i=Pu,n=[[],[],[]],a=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[xi(u[0]),xi(u[1])],u[2]&&u.__original.push(xi(u[2])));var f=u.__original;if(u[2]!=null){if(ke(n[0],f[0]),ke(n[1],f[2]),ke(n[2],f[1]),h&&h!=="none"){var v=Kl(s.node1),d=JM(n,f[0],v*t);i(n[0][0],n[1][0],n[2][0],d,e),n[0][0]=e[3],n[1][0]=e[4],i(n[0][1],n[1][1],n[2][1],d,e),n[0][1]=e[3],n[1][1]=e[4]}if(c&&c!=="none"){var v=Kl(s.node2),d=JM(n,f[1],v*t);i(n[0][0],n[1][0],n[2][0],d,e),n[1][0]=e[1],n[2][0]=e[2],i(n[0][1],n[1][1],n[2][1],d,e),n[1][1]=e[1],n[2][1]=e[2]}ke(u[0],n[0]),ke(u[1],n[2]),ke(u[2],n[1])}else{if(ke(a[0],f[0]),ke(a[1],f[1]),An(o,a[1],a[0]),xo(o,o),h&&h!=="none"){var v=Kl(s.node1);Pf(a[0],a[0],o,v*t)}if(c&&c!=="none"){var v=Kl(s.node2);Pf(a[1],a[1],o,-v*t)}ke(u[0],a[0]),ke(u[1],a[1])}})}function QM(r){return r.type==="view"}var rX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){var n=new wh,a=new Tx,o=this.group;this._controller=new Dh(i.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(e,i,n){var a=this,o=e.coordinateSystem;this._model=e;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(QM(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):At(u,h,e)}Lg(e.getGraph(),ql(e));var c=e.getData();s.updateData(c);var f=e.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(e,i,n),clearTimeout(this._layoutTimeout);var v=e.forceLayout,d=e.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,d);var p=e.get("layout");c.graph.eachNode(function(_){var x=_.dataIndex,b=_.getGraphicEl(),S=_.getModel();if(b){b.off("drag").off("dragend");var w=S.get("draggable");w&&b.on("drag",function(M){switch(p){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,d),v.setFixed(x),c.setItemLayout(x,[b.x,b.y]);break;case"circular":c.setItemLayout(x,[b.x,b.y]),_.setLayout({fixed:!0},!0),bx(e,"symbolSize",_,[M.offsetX,M.offsetY]),a.updateLayout(e);break;case"none":default:c.setItemLayout(x,[b.x,b.y]),xx(e.getGraph(),e),a.updateLayout(e);break}}).on("dragend",function(){v&&v.setUnfixed(x)}),b.setDraggable(w,!!S.get("cursor"));var T=S.get(["emphasis","focus"]);T==="adjacency"&&(ot(b).focus=_.getAdjacentDataIndices())}}),c.graph.eachEdge(function(_){var x=_.getGraphicEl(),b=_.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(ot(x).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),y=c.getLayout("cx"),m=c.getLayout("cy");c.graph.eachNode(function(_){ER(_,g,y,m)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,i){var n=this;(function a(){e.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(e,i,n){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(h,c)&&!_d(u,n,e)}),!QM(e.coordinateSystem)){o.disable();return}o.enable(e.get("roam")),s.zoomLimit=e.get("scaleLimit"),s.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){cx(s,u.dx,u.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){fx(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Lg(e.getGraph(),ql(e)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,i=e.getData(),n=ql(e);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(n)})},t.prototype.updateLayout=function(e){Lg(e.getGraph(),ql(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(Ot);function Xo(r){return"_EC_"+r}var iX=function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var i=this._nodesMap;if(!i[Xo(t)]){var n=new za(t,e);return n.hostGraph=this,this.nodes.push(n),i[Xo(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[Xo(t)]},r.prototype.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if(Mt(t)&&(t=this.nodes[t]),Mt(e)&&(e=this.nodes[e]),t instanceof za||(t=n[Xo(t)]),e instanceof za||(e=n[Xo(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new NR(t,e,i);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof za&&(t=t.id),e instanceof za&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;a=0&&t.call(e,i[a],a)},r.prototype.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},r.prototype.breadthFirstTraverse=function(t,e,i,n){if(e instanceof za||(e=this._nodesMap[Xo(e)]),!!e){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=n.length;a=0&&this[r][t].setItemVisual(this.dataIndex,e,i)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,i){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,i)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}re(za,BR("hostGraph","data"));re(NR,BR("hostGraph","edgeData"));function zR(r,t,e,i,n){for(var a=new iX(i),o=0;o "+f)),u++)}var v=e.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Li(r,e);else{var p=$s.get(v),g=p?p.dimensions||[]:[];vt(g,"value")<0&&g.concat(["value"]);var y=qs(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new Be(y,e),d.initData(r)}var m=new Be(["value"],e);return m.initData(l,s),n&&n(d,m),_R({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var nX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new Ah(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),co(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,i){var n=e.edges||e.links||[],a=e.data||e.nodes||[],o=this;if(a&&n){U9(this);var s=zR(a,n,this,!0,l);return A(s.edges,function(u){Y9(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var c=Lt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=v,g}h.wrapMethod("getItemModel",function(d){return d.resolveParentPath=v,d.getModel=f,d});function v(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,i,n){if(n==="edge"){var a=this.getData(),o=this.getDataParams(e,n),s=a.graph.getEdgeByIndex(e),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),_e("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var c=aP({series:this,dataIndex:e,multipleSeries:i});return c},t.prototype._updateCategoriesData=function(){var e=F(this.option.categories||[],function(n){return n.value!=null?n:z({value:0},n)}),i=new Be(["value"],this);i.initData(e),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.getItemModel(n)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(zt),aX={type:"graphRoam",event:"graphRoam",update:"none"};function oX(r){r.registerChartView(rX),r.registerSeriesModel(nX),r.registerProcessor(V9),r.registerVisual(F9),r.registerVisual(G9),r.registerLayout($9),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Z9),r.registerLayout(q9),r.registerCoordinateSystem("graphView",{dimensions:Lh.dimensions,create:J9}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ee),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ee),r.registerAction(aX,function(t,e,i){e.eachComponent({mainType:"series",query:t},function(n){var a=n.coordinateSystem,o=dx(a,t,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var sX=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),lX=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="pointer",i}return t.prototype.getDefaultShape=function(){return new sX},t.prototype.buildPath=function(e,i){var n=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-n(l)*s*(s>=o/3?1:2),h=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,e.moveTo(u,h),e.lineTo(i.x+n(l)*s,i.y+a(l)*s),e.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),e.lineTo(i.x-n(l)*s,i.y-a(l)*s),e.lineTo(u,h)},t}(_t);function uX(r,t){var e=r.get("center"),i=t.getWidth(),n=t.getHeight(),a=Math.min(i,n),o=U(e[0],t.getWidth()),s=U(e[1],t.getHeight()),l=U(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Ec(r,t){var e=r==null?"":r+"";return t&&(Y(t)?e=t.replace("{value}",e):Q(t)&&(e=t(r))),e}var hX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),o=uX(e,n);this._renderMain(e,i,n,a,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,i,n,a,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,h=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),f=c.get("roundCap"),v=f?uv:Fe,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),y=[u,h];a_(y,!l),u=y[0],h=y[1];for(var m=h-u,_=u,x=[],b=0;d&&b=M&&(C===0?0:a[C-1][0])Math.PI/2&&(K+=Math.PI)):q==="tangential"?K=-T-Math.PI/2:Mt(q)&&(K=q*Math.PI/180),K===0?c.add(new St({style:Gt(_,{text:B,x:H,y:W,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:G}),silent:!0})):c.add(new St({style:Gt(_,{text:B,x:H,y:W,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:H,originY:W,rotation:K}))}if(m.get("show")&&R!==x){var N=m.get("distance");N=N?N+h:h;for(var nt=0;nt<=b;nt++){P=Math.cos(T),k=Math.sin(T);var Ct=new ce({shape:{x1:P*(d-N)+f,y1:k*(d-N)+v,x2:P*(d-w-N)+f,y2:k*(d-w-N)+v},silent:!0,style:L});L.stroke==="auto"&&Ct.setStyle({stroke:a((R+nt/b)/x)}),c.add(Ct),T+=C}T-=C}else T+=M}},t.prototype._renderPointer=function(e,i,n,a,o,s,l,u,h){var c=this.group,f=this._data,v=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),x=+e.get("min"),b=+e.get("max"),S=[x,b],w=[s,l];function T(C,D){var L=m.getItemModel(C),I=L.getModel("pointer"),P=U(I.get("width"),o.r),k=U(I.get("length"),o.r),R=e.get(["pointer","icon"]),N=I.get("offsetCenter"),O=U(N[0],o.r),B=U(N[1],o.r),G=I.get("keepAspect"),H;return R?H=ae(R,O-P/2,B-k,P,k,null,G):H=new lX({shape:{angle:-Math.PI/2,width:P,r:k,x:O,y:B}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function M(C,D){var L=g.get("roundCap"),I=L?uv:Fe,P=g.get("overlap"),k=P?g.get("width"):h/m.count(),R=P?o.r-k:o.r-(C+1)*k,N=P?o.r:o.r-C*k,O=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:N}});return P&&(O.z2=Pt(m.get(_,C),[x,b],[100,0],!0)),O}(y||p)&&(m.diff(f).add(function(C){var D=m.get(_,C);if(p){var L=T(C,s);$t(L,{rotation:-((isNaN(+D)?w[0]:Pt(D,S,w,!0))+Math.PI/2)},e),c.add(L),m.setItemGraphicEl(C,L)}if(y){var I=M(C,s),P=g.get("clip");$t(I,{shape:{endAngle:Pt(D,S,w,P)}},e),c.add(I),im(e.seriesIndex,m.dataType,C,I),d[C]=I}}).update(function(C,D){var L=m.get(_,C);if(p){var I=f.getItemGraphicEl(D),P=I?I.rotation:s,k=T(C,P);k.rotation=P,At(k,{rotation:-((isNaN(+L)?w[0]:Pt(L,S,w,!0))+Math.PI/2)},e),c.add(k),m.setItemGraphicEl(C,k)}if(y){var R=v[D],N=R?R.shape.endAngle:s,O=M(C,N),B=g.get("clip");At(O,{shape:{endAngle:Pt(L,S,w,B)}},e),c.add(O),im(e.seriesIndex,m.dataType,C,O),d[C]=O}}).execute(),m.each(function(C){var D=m.getItemModel(C),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),k=L.get("disabled");if(p){var R=m.getItemGraphicEl(C),N=m.getItemVisual(C,"style"),O=N.fill;if(R instanceof xe){var B=R.style;R.useStyle(z({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else R.useStyle(N),R.type!=="pointer"&&R.setColor(O);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a(Pt(m.get(_,C),S,[0,1],!0))),R.z2EmphasisLift=0,Ce(R,D),Kt(R,I,P,k)}if(y){var G=d[C];G.useStyle(m.getItemVisual(C,"style")),G.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Ce(G,D),Kt(G,I,P,k)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,i){var n=e.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),h=ae(s,i.cx-o/2+U(l[0],i.r),i.cy-o/2+U(l[1],i.r),o,o,null,u);h.z2=n.get("showAbove")?1:0,h.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(h)}},t.prototype._renderTitleAndDetail=function(e,i,n,a,o){var s=this,l=e.getData(),u=l.mapDimension("value"),h=+e.get("min"),c=+e.get("max"),f=new at,v=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new St({silent:!0}),d[y]=new St({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),x=new at,b=a(Pt(_,[h,c],[0,1],!0)),S=m.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),T=o.cx+U(w[0],o.r),M=o.cy+U(w[1],o.r),C=v[y];C.attr({z2:g?0:2,style:Gt(S,{x:T,y:M,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(C)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+U(L[0],o.r),P=o.cy+U(L[1],o.r),k=U(D.get("width"),o.r),R=U(D.get("height"),o.r),N=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,C=d[y],O=D.get("formatter");C.attr({z2:g?0:2,style:Gt(D,{x:I,y:P,text:Ec(_,O),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:N})}),fI(C,{normal:D},_,function(G){return Ec(G,O)}),p&&vI(C,y,l,e,{getFormattedLabel:function(G,H,W,q,K,nt){return Ec(nt?nt.interpolatedValue:_,O)}}),x.add(C)}f.add(x)}),this.group.add(f),this._titleEls=v,this._detailEls=d},t.type="gauge",t}(Ot),cX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,i){return Qs(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(zt);function fX(r){r.registerChartView(hX),r.registerSeriesModel(cX)}var vX=["itemStyle","opacity"],dX=function(r){E(t,r);function t(e,i){var n=r.call(this)||this,a=n,o=new We,s=new St;return a.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,i,!0),n}return t.prototype.updateData=function(e,i,n){var a=this,o=e.hostModel,s=e.getItemModel(i),l=e.getItemLayout(i),u=s.getModel("emphasis"),h=s.get(vX);h=h??1,n||ri(a),a.useStyle(e.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,$t(a,{style:{opacity:h}},o,i)):At(a,{style:{opacity:h},shape:{points:l.points}},o,i),Ce(a,s),this._updateLabel(e,i),Kt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i){var n=this,a=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(i),u=e.getItemLayout(i),h=u.label,c=e.getItemVisual(i,"style"),f=c.fill;Ae(o,me(l),{labelFetcher:e.hostModel,labelDataIndex:i,defaultOpacity:c.opacity,defaultText:e.getName(i)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),n.setTextConfig({local:!0,inside:!!h.inside,insideStroke:f,outsideFill:f});var v=h.linePoints;a.setShape({points:v}),n.textGuideLineConfig={anchor:v?new ct(v[0][0],v[0][1]):null},At(o,{style:{x:h.x,y:h.y}},s,i),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),tx(n,ex(l),{stroke:f})},t}(Ge),pX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new dX(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(a,l),s.add(h),a.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Vu(u,e,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Ot),gX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ah($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,i){return Qs(this,{coordDimensions:["value"],encodeDefaulter:ut(D_,this)})},t.prototype._defaultLabelLine=function(e){co(e,"labelLine",["show"]);var i=e.labelLine,n=e.emphasis.labelLine;i.show=i.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var i=this.getData(),n=r.prototype.getDataParams.call(this,e),a=i.mapDimension("value"),o=i.getSum(a);return n.percent=o?+(i.get(a,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(zt);function yX(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function mX(r,t){for(var e=r.mapDimension("value"),i=r.mapArray(e,function(l){return l}),n=[],a=t==="ascending",o=0,s=r.count();oEX)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Pg(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=e.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Pg(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var BX=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var i=this.option;e&&ht(i,e,!0),this._initDimensions()},t.prototype.contains=function(e,i){var n=e.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){e.hasOwnProperty(i)&&(this.option[i]=e[i])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[],n=Dt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(a){e.push("dim"+a.get("dim")),i.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(yt),zX=function(r){E(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Br);function Do(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Zo(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Zo(s,[0,o]),n=a=Zo(s,[n,a]),i=0}t[0]=Zo(t[0],e),t[1]=Zo(t[1],e);var l=kg(t,i);t[i]+=r;var u=n||0,h=e.slice();l.sign<0?h[0]+=u:h[1]-=u,t[i]=Zo(t[i],h);var c;return c=kg(t,i),n!=null&&(c.sign!==l.sign||c.spana&&(t[1-i]=t[i]+c.sign*a),t}function kg(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Zo(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Rg=A,FR=Math.min,GR=Math.max,rC=Math.floor,VX=Math.ceil,iC=Qt,FX=Math.PI,GX=function(){function r(t,e,i){this.type="parallel",this._axesMap=Z(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return r.prototype._init=function(t,e,i){var n=t.dimensions,a=t.parallelAxisIndex;Rg(n,function(o,s){var l=a[s],u=e.getComponent("parallelAxis",l),h=this._axesMap.set(o,new zX(o,bh(u),[0,0],u.get("type"),l)),c=h.type==="category";h.onBand=c&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],s=t[a];return o>=i&&o<=i+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();Rg(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(n,n.mapDimension(a)),yo(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=ue(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,i=["x","y"],n=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,h=Oc(t.get("axisExpandWidth"),l),c=Oc(t.get("axisExpandCount")||0,[0,u]),f=t.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,v=t.get("axisExpandWindow"),d;if(v)d=Oc(v[1]-v[0],l),v[1]=v[0]+d;else{d=Oc(h*(c-1),l);var p=t.get("axisExpandCenter")||rC(u/2);v=[h*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-c);g<3&&(g=0);var y=[rC(iC(v[0]/h,1))+1,VX(iC(v[1]/h,1))-1],m=g/h*v[0];return{layout:a,pixelDimIndex:o,layoutBase:e[i[o]],layoutLength:s,axisBase:e[i[1-o]],axisLength:e[n[1-o]],axisExpandable:f,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Rg(i,function(o,s){var l=(n.axisExpandable?WX:HX)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},h={horizontal:FX/2,vertical:0},c=[u[a].x+t.x,u[a].y+t.y],f=h[a],v=or();Qn(v,v,f),ti(v,v,c),this._axesLayout[o]={position:c,rotation:f,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,i,n){i==null&&(i=0),n==null&&(n=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),h=i;ha*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=e.axisExpandWidth/h,l?Do(l,n,o,"all"):u="none";else{var v=n[1]-n[0],d=o[1]*s/v;n=[GR(0,d-v/2)],n[1]=FR(o[1],n[0]+v),n[0]=n[1]-v}return{axisExpandWindow:n,behavior:u}},r}();function Oc(r,t){return FR(GR(r,t[0]),t[1])}function HX(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function WX(r,t){var e=t.layoutLength,i=t.axisExpandWidth,n=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,h;return r=0;n--)fr(i[n])},t.prototype.getActiveState=function(e){var i=this.activeIntervals;if(!i.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var a=0,o=i.length;aZX}function XR(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function ZR(r,t,e,i){var n=new at;return n.add(new wt({name:"main",style:Lx(e),silent:!0,draggable:!0,cursor:"move",drift:ut(oC,r,t,n,["n","s","w","e"]),ondragend:ut(_o,t,{isEnd:!0})})),A(i,function(a){n.add(new wt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(oC,r,t,n,a),ondragend:ut(_o,t,{isEnd:!0})}))}),n}function jR(r,t,e,i){var n=i.brushStyle.lineWidth||0,a=Ps(n,jX),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,h=e[0][1],c=e[1][1],f=h-a+n/2,v=c-a+n/2,d=h-o,p=c-s,g=d+n,y=p+n;Ei(r,t,"main",o,s,d,p),i.transformable&&(Ei(r,t,"w",l,u,a,y),Ei(r,t,"e",f,u,a,y),Ei(r,t,"n",l,u,g,a),Ei(r,t,"s",l,v,g,a),Ei(r,t,"nw",l,u,a,a),Ei(r,t,"ne",f,u,a,a),Ei(r,t,"sw",l,v,a,a),Ei(r,t,"se",f,v,a,a))}function qm(r,t){var e=t.__brushOption,i=e.transformable,n=t.childAt(0);n.useStyle(Lx(e)),n.attr({silent:!i,cursor:i?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?Km(r,a[0]):eZ(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?KX[s]+"-resize":null})})}function Ei(r,t,e,i,n,a,o){var s=t.childOfName(e);s&&s.setShape(iZ(Ix(r,t,[[i,n],[i+a,n+o]])))}function Lx(r){return tt({strokeNoScale:!0},r.brushStyle)}function qR(r,t,e,i){var n=[eh(r,e),eh(t,i)],a=[Ps(r,e),Ps(t,i)];return[[n[0],a[0]],[n[1],a[1]]]}function tZ(r){return zn(r.group)}function Km(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=ed(e[t],tZ(r));return i[n]}function eZ(r,t){var e=[Km(r,t[0]),Km(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function oC(r,t,e,i,n,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=KR(t,n,a);A(i,function(u){var h=qX[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=r.fromRectRange(qR(s[0][0],s[1][0],s[0][1],s[1][1])),Cx(t,e),_o(t,{isEnd:!1})}function rZ(r,t,e,i){var n=t.__brushOption.range,a=KR(r,e,i);A(n,function(o){o[0]+=a[0],o[1]+=a[1]}),Cx(r,t),_o(r,{isEnd:!1})}function KR(r,t,e){var i=r.group,n=i.transformCoordToLocal(t,e),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function Ix(r,t,e){var i=$R(r,t);return i&&i!==mo?i.clipPath(e,r._transform):it(e)}function iZ(r){var t=eh(r[0][0],r[1][0]),e=eh(r[0][1],r[1][1]),i=Ps(r[0][0],r[1][0]),n=Ps(r[0][1],r[1][1]);return{x:t,y:e,width:i-t,height:n-e}}function nZ(r,t,e){if(!(!r._brushType||oZ(r,t.offsetX,t.offsetY))){var i=r._zr,n=r._covers,a=Dx(r,t,e);if(!r._dragging)for(var o=0;oi.getWidth()||e<0||e>i.getHeight()}var wd={lineX:uC(0),lineY:uC(1),rect:{createCover:function(r,t){function e(i){return i}return ZR({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=XR(r);return qR(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,i){jR(r,t,e,i)},updateCommon:qm,contain:Qm},polygon:{createCover:function(r,t){var e=new at;return e.add(new We({name:"main",style:Lx(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ge({name:"main",draggable:!0,drift:ut(rZ,r,t),ondragend:ut(_o,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,i){t.childAt(0).setShape({points:Ix(r,t,e)})},updateCommon:qm,contain:Qm}};function uC(r){return{createCover:function(t,e){return ZR({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=XR(t),i=eh(e[0][r],e[1][r]),n=Ps(e[0][r],e[1][r]);return[i,n]},updateCoverShape:function(t,e,i,n){var a,o=$R(t,e);if(o!==mo&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),jR(t,e,l,n)},updateCommon:qm,contain:Qm}}function QR(r){return r=Px(r),function(t){return g_(t,r)}}function tE(r,t){return r=Px(r),function(e){var i=t??e,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function eE(r,t,e){var i=Px(r);return function(n,a){return i.contain(a[0],a[1])&&!_d(n,t,e)}}function Px(r){return ft.create(r)}var sZ=["axisLine","axisTickLabel","axisName"],lZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){r.prototype.init.apply(this,arguments),(this._brushController=new Mx(i.getZr())).on("brush",$(this._onBrush,this))},t.prototype.render=function(e,i,n,a){if(!uZ(e,i,a)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!e.get("show")){var s=cZ(e,i),l=s.coordinateSystem,u=e.getAreaSelectStyle(),h=u.width,c=e.axis.dim,f=l.getAxisLayout(c),v=z({strokeContainThreshold:h},f),d=new je(e,v);A(sZ,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,e,s,h,n),mh(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,i,n,a,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),c=ft.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:QR(c),isTargetByCursor:eE(c,s,a),getLinearBrushOtherExtent:tE(c,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(hZ(n))},t.prototype._onBrush=function(e){var i=e.areas,n=this.axisModel,a=n.axis,o=F(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Yt);function uZ(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function hZ(r){var t=r.axis;return F(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function cZ(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var fZ={type:"axisAreaSelect",event:"axisAreaSelected"};function vZ(r){r.registerAction(fZ,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(i){i.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(i){i.setAxisExpand(t)})})}var dZ={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function rE(r){r.registerComponentView(OX),r.registerComponentModel(BX),r.registerCoordinateSystem("parallel",YX),r.registerPreprocessor(PX),r.registerComponentModel(Zm),r.registerComponentView(lZ),Is(r,"parallel",Zm,dZ),vZ(r)}function pZ(r){pt(rE),r.registerChartView(wX),r.registerSeriesModel(CX),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,IX)}var gZ=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),yZ=function(r){E(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new gZ},t.prototype.buildPath=function(e,i){var n=i.extent;e.moveTo(i.x1,i.y1),e.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(e.lineTo(i.x2+n,i.y2),e.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(e.lineTo(i.x2,i.y2+n),e.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),e.closePath()},t.prototype.highlight=function(){Ki(this)},t.prototype.downplay=function(){Ji(this)},t}(_t),mZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._focusAdjacencyDisabled=!1,e}return t.prototype.render=function(e,i,n){var a=this,o=e.getGraph(),s=this.group,l=e.layoutInfo,u=l.width,h=l.height,c=e.getData(),f=e.getData("edge"),v=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new yZ,g=ot(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),x=d.node1.getLayout(),b=d.node1.getModel(),S=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),M=d.node2.getModel(),C=M.get("localX"),D=M.get("localY"),L=d.getLayout(),I,P,k,R,N,O,B,G;p.shape.extent=Math.max(1,L.dy),p.shape.orient=v,v==="vertical"?(I=(S!=null?S*u:x.x)+L.sy,P=(w!=null?w*h:x.y)+x.dy,k=(C!=null?C*u:T.x)+L.ty,R=D!=null?D*h:T.y,N=I,O=P*(1-_)+R*_,B=k,G=P*_+R*(1-_)):(I=(S!=null?S*u:x.x)+x.dx,P=(w!=null?w*h:x.y)+L.sy,k=C!=null?C*u:T.x,R=(D!=null?D*h:T.y)+L.ty,N=I*(1-_)+k*_,O=P,B=I*_+k*(1-_),G=R),p.setShape({x1:I,y1:P,x2:k,y2:R,cpx1:N,cpy1:O,cpx2:B,cpy2:G}),p.useStyle(m.getItemStyle()),hC(p.style,v,d);var H=""+y.get("value"),W=me(y,"edgeLabel");Ae(p,W,{labelFetcher:{getFormattedLabel:function(nt,Ct,te,dt,rt,gt){return e.getFormattedLabel(nt,Ct,"edge",dt,jr(rt,W.normal&&W.normal.get("formatter"),H),gt)}},labelDataIndex:d.dataIndex,defaultText:H}),p.setTextConfig({position:"inside"});var q=y.getModel("emphasis");Ce(p,y,"lineStyle",function(nt){var Ct=nt.getItemStyle();return hC(Ct,v,d),Ct}),s.add(p),f.setItemGraphicEl(d.dataIndex,p);var K=q.get("focus");Kt(p,K==="adjacency"?d.getAdjacentDataIndices():K==="trajectory"?d.getTrajectoryDataIndices():K,q.get("blurScope"),q.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new wt({shape:{x:y!=null?y*u:p.x,y:m!=null?m*h:p.y,width:p.dx,height:p.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ae(b,me(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),Ce(b,g),s.add(b),c.setItemGraphicEl(d.dataIndex,b),ot(b).dataType="node";var S=_.get("focus");Kt(b,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/h})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(_Z(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(Ot);function hC(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var i=e.node1.getVisual("color"),n=e.node2.getVisual("color");Y(i)&&Y(n)&&(r.fill=new Vs(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function _Z(r,t,e){var i=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return $t(i,{shape:{width:r.width+20}},t,e),i}var xZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){var n=e.edges||e.links||[],a=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Lt(o[l],this,i));var u=zR(a,n,this,!0,h);return u.data;function h(c,f){c.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(v.parentModel=m)}return v}),f.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(v.parentModel=_)}return v})}},t.prototype.setNodePosition=function(e,i){var n=this.option.data||this.option.nodes,a=n[e];a.localX=i[0],a.localY=i[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,i,n){function a(v){return isNaN(v)||v==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return _e("nameValue",{name:u,value:l,noValue:a(l)})}else{var h=this.getGraph().getNodeByIndex(e),c=h.getLayout().value,f=this.getDataParams(e,n).data.name;return _e("nameValue",{name:f!=null?f+"":null,value:c,noValue:a(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,i){var n=r.prototype.getDataParams.call(this,e,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(e),o=a.getLayout().value;n.value=o}return n},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(zt);function bZ(r,t){r.eachSeriesByType("sankey",function(e){var i=e.get("nodeWidth"),n=e.get("nodeGap"),a=SZ(e,t);e.layoutInfo=a;var o=a.width,s=a.height,l=e.getGraph(),u=l.nodes,h=l.edges;TZ(u);var c=Dt(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:e.get("layoutIterations"),v=e.get("orient"),d=e.get("nodeAlign");wZ(u,h,i,n,o,s,f,v,d)})}function SZ(r,t){return ue(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function wZ(r,t,e,i,n,a,o,s,l){MZ(r,t,e,n,a,s,l),LZ(r,t,a,n,i,o,s),zZ(r,s)}function TZ(r){A(r,function(t){var e=Gn(t.outEdges,pv),i=Gn(t.inEdges,pv),n=t.getValue()||0,a=Math.max(e,i,n);t.setLayout({value:a},!0)})}function MZ(r,t,e,i,n,a,o){for(var s=[],l=[],u=[],h=[],c=0,f=0;f=0;y&&g.depth>v&&(v=g.depth),p.setLayout({depth:y?g.depth:c},!0),a==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;mc-1?v:c-1;o&&o!=="left"&&CZ(r,o,a,w);var T=a==="vertical"?(n-e)/w:(i-e)/w;DZ(r,T,a)}function iE(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function CZ(r,t,e,i){if(t==="right"){for(var n=[],a=r,o=0;a.length;){for(var s=0;s0;a--)l*=.99,kZ(s,l,o),Eg(s,n,e,i,o),BZ(s,l,o),Eg(s,n,e,i,o)}function IZ(r,t){var e=[],i=t==="vertical"?"y":"x",n=Qy(r,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,o){return a-o}),A(n.keys,function(a){e.push(n.buckets.get(a))}),e}function PZ(r,t,e,i,n,a){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(c){u+=c.getLayout().value});var h=a==="vertical"?(i-(l-1)*n)/u:(e-(l-1)*n)/u;h0&&(s=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]+l.getLayout()[f]+t;var d=n==="vertical"?i:e;if(u=h-t-d,u>0){s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var v=c-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[f]+t-h,u>0&&(s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]}})}function kZ(r,t,e){A(r.slice().reverse(),function(i){A(i,function(n){if(n.outEdges.length){var a=Gn(n.outEdges,RZ,e)/Gn(n.outEdges,pv);if(isNaN(a)){var o=n.outEdges.length;a=o?Gn(n.outEdges,EZ,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(a-jn(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(a-jn(n,e))*t;n.setLayout({y:l},!0)}}})})}function RZ(r,t){return jn(r.node2,t)*r.getValue()}function EZ(r,t){return jn(r.node2,t)}function OZ(r,t){return jn(r.node1,t)*r.getValue()}function NZ(r,t){return jn(r.node1,t)}function jn(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function pv(r){return r.getValue()}function Gn(r,t,e){for(var i=0,n=r.length,a=-1;++ao&&(o=l)}),A(i,function(s){var l=new ye({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function FZ(r){r.registerChartView(mZ),r.registerSeriesModel(xZ),r.registerLayout(bZ),r.registerVisual(VZ),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){i.setNodePosition(t.dataIndex,[t.localX,t.localY])})})}var nE=function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var i,n=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",i=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",i=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],h=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[h],f=u[1-h],v=[n,a],d=v[h].get("type"),p=v[1-h].get("type"),g=t.data;if(g&&l){var y=[];A(g,function(x,b){var S;V(x)?(S=x.slice(),x.unshift(b)):V(x.value)?(S=z({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,y.push(S)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:nv(d),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:nv(p),dimsDef:m.slice()}];return Qs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:ut(kI,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),aE=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(zt);re(aE,nE,!0);var GZ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var h=a.getItemLayout(u),c=cC(h,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,h){var c=s.getItemGraphicEl(h);if(!a.hasValue(u)){o.remove(c);return}var f=a.getItemLayout(u);c?(ri(c),oE(f,c,a,u)):c=cC(f,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=a},t.prototype.remove=function(e){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},t.type="boxplot",t}(Ot),HZ=function(){function r(){}return r}(),WZ=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="boxplotBoxPath",i}return t.prototype.getDefaultShape=function(){return new HZ},t.prototype.buildPath=function(e,i){var n=i.points,a=0;for(e.moveTo(n[a][0],n[a][1]),a++;a<4;a++)e.lineTo(n[a][0],n[a][1]);for(e.closePath();ap){var x=[y,_];i.push(x)}}}return{boxData:e,outliers:i}}var qZ={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==He){var i="";kt(i)}var n=jZ(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function KZ(r){r.registerSeriesModel(aE),r.registerChartView(GZ),r.registerLayout(YZ),r.registerTransform(qZ)}var JZ=["itemStyle","borderColor"],QZ=["itemStyle","borderColor0"],tj=["itemStyle","borderColorDoji"],ej=["itemStyle","color"],rj=["itemStyle","color0"];function kx(r,t){return t.get(r>0?ej:rj)}function Rx(r,t){return t.get(r===0?tj:r>0?JZ:QZ)}var ij={seriesType:"candlestick",plan:Xs(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(i,n){for(var a;(a=i.next())!=null;){var o=n.getItemModel(a),s=n.getItemLayout(a).sign,l=o.getItemStyle();l.fill=kx(s,o),l.stroke=Rx(s,o)||l.fill;var u=n.ensureUniqueItemVisual(a,"style");z(u,l)}}}}}},nj=["color","borderColor"],aj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,i,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,i):this._incrementalRenderNormal(e,i)},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e){var i=e.getData(),n=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(h){if(i.hasValue(h)){var c=i.getItemLayout(h);if(s&&fC(u,c))return;var f=Og(c,h,!0);$t(f,{shape:{points:c.ends}},e,h),Ng(f,i,h,o),a.add(f),i.setItemGraphicEl(h,f)}}).update(function(h,c){var f=n.getItemGraphicEl(c);if(!i.hasValue(h)){a.remove(f);return}var v=i.getItemLayout(h);if(s&&fC(u,v)){a.remove(f);return}f?(At(f,{shape:{points:v.ends}},e,h),ri(f)):f=Og(v),Ng(f,i,h,o),a.add(f),i.setItemGraphicEl(h,f)}).remove(function(h){var c=n.getItemGraphicEl(h);c&&a.remove(c)}).execute(),this._data=i},t.prototype._renderLarge=function(e){this._clear(),vC(e,this.group);var i=e.get("clip",!0)?Th(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=n.getItemLayout(o),l=Og(s);Ng(l,n,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,i){vC(i,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Ot),oj=function(){function r(){}return r}(),sj=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i.type="normalCandlestickBox",i}return t.prototype.getDefaultShape=function(){return new oj},t.prototype.buildPath=function(e,i){var n=i.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(_t);function Og(r,t,e){var i=r.ends;return new sj({shape:{points:e?lj(i,r):i},z2:100})}function fC(r,t){for(var e=!0,i=0;ib?D[a]:C[a],ends:P,brushRect:B(S,w,_)})}function N(H,W){var q=[];return q[n]=W,q[a]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:t.dataToPoint(q)}function O(H,W,q){var K=W.slice(),nt=W.slice();K[n]=hf(K[n]+i/2,1,!1),nt[n]=hf(nt[n]-i/2,1,!0),q?H.push(K,nt):H.push(nt,K)}function B(H,W,q){var K=N(H,q),nt=N(W,q);return K[n]-=i/2,nt[n]-=i/2,{x:K[0],y:K[1],width:i,height:nt[1]-K[1]}}function G(H){return H[n]=hf(H[n],1),H}}function d(p,g){for(var y=yi(p.count*4),m=0,_,x=[],b=[],S,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var M=w.get(s,S),C=w.get(u,S),D=w.get(h,S),L=w.get(c,S),I=w.get(f,S);if(isNaN(M)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=dC(w,S,C,D,h,T),x[n]=M,x[a]=L,_=t.dataToPoint(x,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,x[a]=I,_=t.dataToPoint(x,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function dC(r,t,e,i,n,a){var o;return e>i?o=-1:e0?r.get(n,t-1)<=i?1:-1:1,o}function fj(r,t){var e=r.getBaseAxis(),i,n=e.type==="category"?e.getBandWidth():(i=e.getExtent(),Math.abs(i[1]-i[0])/t.count()),a=U(lt(r.get("barMaxWidth"),n),n),o=U(lt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?U(s,n):Math.max(Math.min(n/2,a),o)}function vj(r){r.registerChartView(aj),r.registerSeriesModel(sE),r.registerPreprocessor(hj),r.registerVisual(ij),r.registerLayout(cj)}function pC(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(i){i.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var dj=function(r){E(t,r);function t(e,i){var n=r.call(this)||this,a=new Sh(e,i),o=new at;return n.add(a),n.add(o),n.updateData(e,i),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var i=e.symbolType,n=e.color,a=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;Q(c)?f=c(n):f=c,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,i,n,a,o){if(i>0){e.__t=0;var s=this,l=e.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});a||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return Wi(e.__p1,e.__cp1)+Wi(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,i){e.__p1=i[0],e.__p2=i[1],e.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},t.prototype.updateData=function(e,i,n){this.childAt(0).updateData(e,i,n),this._updateEffectSymbol(e,i)},t.prototype._updateSymbolPosition=function(e){var i=e.__p1,n=e.__p2,a=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=be,h=By;s[0]=u(i[0],a[0],n[0],o),s[1]=u(i[1],a[1],n[1],o);var c=e.__t<1?h(i[0],a[0],n[0],o):h(n[0],a[0],i[0],1-o),f=e.__t<1?h(i[1],a[1],n[1],o):h(n[1],a[1],i[1],1-o);e.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;li);l++);l=Math.min(l-1,o-2)}var h=(i-a[l])/(a[l+1]-a[l]),c=n[l],f=n[l+1];e.x=c[0]*(1-h)+h*f[0],e.y=c[1]*(1-h)+h*f[1];var v=e.__t<1?f[0]-c[0]:c[0]-f[0],d=e.__t<1?f[1]-c[1]:c[1]-f[1];e.rotation=-Math.atan2(d,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,e.ignore=!1}},t}(lE),_j=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),xj=function(r){E(t,r);function t(e){var i=r.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _j},t.prototype.buildPath=function(e,i){var n=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var l=1;l0){var v=(u+c)/2-(h-f)*a,d=(h+f)/2-(c-u)*a;e.quadraticCurveTo(v,d,c,f)}else e.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,i){var n=this.shape,a=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var c=a[u++],f=a[u++],v=1;v0){var g=(c+d)/2-(f-p)*o,y=(f+p)/2-(d-c)*o;if(O2(c,f,g,y,d,p,s,e,i))return l}else if(_n(c,f,d,p,s,e,i))return l;l++}return-1},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(e=n[0],i=n[1],a.contain(e,i)){var o=this.hoverDataIdx=this.findDataIndex(e,i);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var i=this.shape,n=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),hE={seriesType:"lines",plan:Xs(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(n,a){var o=[];if(i){var s=void 0,l=n.end-n.start;if(e){for(var u=0,h=n.start;h0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=e.get("clip",!0)&&Th(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,i,n){var a=e.getData(),o=this._updateLineDraw(a,e);o.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,i,n){this._lineDraw.incrementalUpdate(e,i.getData()),this._finished=e.end===i.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,i,n){var a=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=hE.reset(e,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,i){var n=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!n||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new bj:new Tx(o?a?mj:uE:a?lE:Sx),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var i=e.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},t.prototype.dispose=function(e,i){this.remove(e,i)},t.type="lines",t}(Ot),wj=typeof Uint32Array>"u"?Array:Uint32Array,Tj=typeof Float64Array>"u"?Array:Float64Array;function gC(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=F(t,function(e){var i=[e[0].coord,e[1].coord],n={coords:i};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),zv([n,e[0],e[1]])}))}var Mj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],gC(e);var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(gC(e),e.data){var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var i=this._processFlatCoordsArray(e.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=ws(this._flatCoords,i.flatCoords),this._flatCoordsOffset=ws(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),e.data=new Float32Array(i.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var i=this.getData().getItemModel(e),n=i.option instanceof Array?i.option:i.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],a=this._flatCoordsOffset[e*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),i=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&i>0?i+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(zt);function Nc(r){return r instanceof Array||(r=[r,r]),r}var Cj={seriesType:"lines",reset:function(r){var t=Nc(r.get("symbol")),e=Nc(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",t&&t[0]),i.setVisual("toSymbol",t&&t[1]),i.setVisual("fromSymbolSize",e&&e[0]),i.setVisual("toSymbolSize",e&&e[1]);function n(a,o){var s=a.getItemModel(o),l=Nc(s.getShallow("symbol",!0)),u=Nc(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}};function Aj(r){r.registerChartView(Sj),r.registerSeriesModel(Mj),r.registerLayout(hE),r.registerVisual(Cj)}var Dj=256,Lj=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Qr.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,i,n,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),h=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),v=t.length;c.width=e,c.height=i;for(var d=0;d0){var L=o(_)?l:u;_>0&&(_=_*C+T),b[S++]=L[D],b[S++]=L[D+1],b[S++]=L[D+2],b[S++]=L[D+3]*_*256}else S+=4}return f.putImageData(x,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Qr.createCanvas()),e=this.pointSize+this.blurSize,i=e*2;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var i=this._gradientPixels,n=i[e]||(i[e]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n},r}();function Ij(r,t,e){var i=r[1]-r[0];t=F(t,function(o){return{interval:[(o.interval[0]-r[0])/i,(o.interval[1]-r[0])/i]}});var n=t.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=t[0]&&i<=t[1]}}function yC(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var kj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):yC(o)&&this._renderOnGeo(o,e,a,n)},t.prototype.incrementalPrepareRender=function(e,i,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,i,n,a){var o=i.coordinateSystem;o&&(yC(o)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){ta(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,i,n,a,o){var s=e.coordinateSystem,l=Co(s,"cartesian2d"),u,h,c,f;if(l){var v=s.getAxis("x"),d=s.getAxis("y");u=v.getBandWidth()+.5,h=d.getBandWidth()+.5,c=v.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),_=e.getModel(["select","itemStyle"]).getItemStyle(),x=e.get(["itemStyle","borderRadius"]),b=me(e),S=e.getModel("emphasis"),w=S.get("focus"),T=S.get("blurScope"),M=S.get("disabled"),C=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;Dc[1]||kf[1])continue;var R=s.dataToPoint([P,k]);L=new wt({shape:{x:R[0]-u/2,y:R[1]-h/2,width:u,height:h},style:I})}else{if(isNaN(g.get(C[1],D)))continue;L=new wt({z2:1,shape:s.dataToRect([g.get(C[0],D)]).contentShape,style:I})}if(g.hasItemOption){var N=g.getItemModel(D),O=N.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),x=N.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),M=O.get("disabled"),b=me(N)}L.shape.r=x;var B=e.getRawValue(D),G="-";B&&B[2]!=null&&(G=B[2]+""),Ae(L,b,{labelFetcher:e,labelDataIndex:D,defaultOpacity:I.opacity,defaultText:G}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=m,L.ensureState("select").style=_,Kt(L,w,T,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),p.add(L),g.setItemGraphicEl(D,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,i,n,a){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new Lj;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var h=e.getViewRect().clone(),c=e.getRoamTransform();h.applyTransform(c);var f=Math.max(h.x,0),v=Math.max(h.y,0),d=Math.min(h.width+h.x,a.getWidth()),p=Math.min(h.height+h.y,a.getHeight()),g=d-f,y=p-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,M){var C=e.dataToPoint([w,T]);return C[0]-=f,C[1]-=v,C.push(M),C}),x=n.getExtent(),b=n.type==="visualMap.continuous"?Pj(x,n.option.range):Ij(x,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new xe({style:{width:g,height:y,x:f,y:v,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t}(Ot),Rj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Li(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=$s.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(zt);function Ej(r){r.registerChartView(kj),r.registerSeriesModel(Rj)}var Oj=["itemStyle","borderWidth"],mC=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vg=new Ai,Nj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),c=l.master.getRect(),f={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:h,valueDim:mC[+h],categoryDim:mC[1-+h]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=xC(o,d),g=_C(o,d,p,f),y=bC(o,f,g);o.setItemGraphicEl(d,y),a.add(y),wC(y,f,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){a.remove(g);return}var y=xC(o,d),m=_C(o,d,y,f),_=gE(o,m);g&&_!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?Wj(g,f,m):g=bC(o,f,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,a.add(g),wC(g,f,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&SC(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=e.get("clip",!0)?Th(e.coordinateSystem,!1,e):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,i){var n=this.group,a=this._data;e.get("animation")?a&&a.eachItemGraphicEl(function(o){SC(a,ot(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t}(Ot);function _C(r,t,e,i){var n=r.getItemLayout(t),a=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),f={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};Bj(e,a,n,i,f),zj(r,t,n,a,o,f.boundingLength,f.pxSign,h,i,f),Vj(e,f.symbolScale,u,i,f);var v=f.symbolSize,d=Mo(e.get("symbolOffset"),v);return Fj(e,v,n,a,o,d,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,i,f),f}function Bj(r,t,e,i,n){var a=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[a.wh]<=0),h;if(V(o)){var c=[Fg(s,o[0])-l,Fg(s,o[1])-l];c[1]=0?1:-1:h>0?1:-1}function Fg(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function zj(r,t,e,i,n,a,o,s,l,u){var h=l.valueDim,c=l.categoryDim,f=Math.abs(e[c.wh]),v=r.getItemVisual(t,"symbolSize"),d;V(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[c.index]=U(d[c.index],f),d[h.index]=U(d[h.index],i?f:Math.abs(a)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*o}function Vj(r,t,e,i,n){var a=r.get(Oj)||0;a&&(Vg.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Vg.updateTransform(),a/=Vg.getLineScale(),a*=t[i.valueDim.index]),n.valueLineWidth=a||0}function Fj(r,t,e,i,n,a,o,s,l,u,h,c){var f=h.categoryDim,v=h.valueDim,d=c.pxSign,p=Math.max(t[v.index]+s,0),g=p;if(i){var y=Math.abs(l),m=pe(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=U(m,t[v.index]),b=Math.max(p+x*2,0),S=_?0:x*2,w=t_(i),T=w?i:TC((y+S)/b),M=y-T*p;x=M/2/(_?T:Math.max(T-1,1)),b=p+x*2,S=_?0:x*2,!w&&i!=="fixed"&&(T=u?TC((Math.abs(u)+S)/b):0),g=T*b-S,c.repeatTimes=T,c.symbolMargin=x}var C=d*(g/2),D=c.pathPosition=[];D[f.index]=e[f.wh]/2,D[v.index]=o==="start"?C:o==="end"?l-C:l/2,a&&(D[0]+=a[0],D[1]+=a[1]);var L=c.bundlePosition=[];L[f.index]=e[f.xy],L[v.index]=e[v.xy];var I=c.barRectShape=z({},e);I[v.wh]=d*Math.max(Math.abs(e[v.wh]),Math.abs(D[v.index]+C)),I[f.wh]=e[f.wh];var P=c.clipShape={};P[f.xy]=-e[f.xy],P[f.wh]=h.ecSize[f.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function cE(r){var t=r.symbolPatternSize,e=ae(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function fE(r,t,e,i){var n=r.__pictorialBundle,a=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,h=0,c=a[t.valueDim.index]+o+e.symbolMargin*2;for(Ex(r,function(p){p.__pictorialAnimationIndex=h,p.__pictorialRepeatTimes=u,h0:y<0)&&(m=u-1-p),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function vE(r,t,e,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?ys(a,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,i):(a=r.__pictorialMainPath=cE(e),n.add(a),ys(a,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,i))}function dE(r,t,e){var i=z({},t.barRectShape),n=r.__pictorialBarRect;n?ys(n,null,{shape:i},t,e):(n=r.__pictorialBarRect=new wt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function pE(r,t,e,i){if(e.symbolClip){var n=r.__pictorialClipPath,a=z({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)At(n,{shape:a},s,l);else{a[o.wh]=0,n=new wt({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],wo[i?"updateProps":"initProps"](n,{shape:u},s,l)}}}function xC(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=Gj,e.isAnimationEnabled=Hj,e}function Gj(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Hj(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function bC(r,t,e,i){var n=new at,a=new at;return n.add(a),n.__pictorialBundle=a,a.x=e.bundlePosition[0],a.y=e.bundlePosition[1],e.symbolRepeat?fE(n,t,e):vE(n,t,e),dE(n,e,i),pE(n,t,e,i),n.__pictorialShapeStr=gE(r,e),n.__pictorialSymbolMeta=e,n}function Wj(r,t,e){var i=e.animationModel,n=e.dataIndex,a=r.__pictorialBundle;At(a,{x:e.bundlePosition[0],y:e.bundlePosition[1]},i,n),e.symbolRepeat?fE(r,t,e,!0):vE(r,t,e,!0),dE(r,e,!0),pE(r,t,e,!0)}function SC(r,t,e,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];Ex(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(e=null),A(a,function(o){Xn(o,{scaleX:0,scaleY:0},e,t,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(t,null)}function gE(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Ex(r,t,e){A(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&t.call(e,i)})}function ys(r,t,e,i,n,a){t&&r.attr(t),i.symbolClip&&!n?e&&r.attr(e):e&&wo[n?"updateProps":"initProps"](r,e,i.animationModel,i.dataIndex,a)}function wC(r,t,e){var i=e.dataIndex,n=e.itemModel,a=n.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),h=a.get("focus"),c=a.get("blurScope"),f=a.get("scale");Ex(r,function(p){if(p instanceof xe){var g=p.style;p.useStyle(z({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var y=p.ensureState("emphasis");y.style=o,f&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Ae(d,me(n),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Ls(t.seriesModel.getData(),i),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),Kt(r,h,c,a.get("disabled"))}function TC(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var Uj=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ea(ju.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(ju);function Yj(r){r.registerChartView(Nj),r.registerSeriesModel(Uj),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(QP,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tk("pictorialBar"))}var $j=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,i,n){var a=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=a.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.x=0,s.y=h.y+c[0];function f(g){return g.name}var v=new Qi(this._layersSeries||[],l,f,f),d=[];v.add($(p,this,"add")).update($(p,this,"update")).remove($(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var x=[],b=[],S,w=l[y].indices,T=0;Ta&&(a=s),i.push(s)}for(var u=0;ua&&(a=c)}return{y0:n,max:a}}function Kj(r){r.registerChartView($j),r.registerSeriesModel(Zj),r.registerLayout(jj),r.registerProcessor(Ch("themeRiver"))}var Jj=2,Qj=4,CC=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this)||this;o.z2=Jj,o.textConfig={inside:!0},ot(o).seriesIndex=i.seriesIndex;var s=new St({z2:Qj,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,i,n,a),o}return t.prototype.updateData=function(e,i,n,a,o){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var s=this;ot(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),h=i.getLayout(),c=z({},h);c.label=null;var f=i.getVisual("style");f.lineJoin="bevel";var v=i.getVisual("decal");v&&(f.decal=Ds(v,o));var d=Ka(l.getModel("itemStyle"),c,!0);z(c,d),A(Ke,function(m){var _=s.ensureState(m),x=l.getModel([m,"itemStyle"]);_.style=x.getItemStyle();var b=Ka(x,c);b&&(_.shape=b)}),e?(s.setShape(c),s.shape.r=h.r0,$t(s,{shape:{r:h.r}},n,i.dataIndex)):(At(s,{shape:c},n),ri(s)),s.useStyle(f),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),y=g==="relative"?ws(i.getAncestorsIndices(),i.getDescendantIndices()):g==="ancestor"?i.getAncestorsIndices():g==="descendant"?i.getDescendantIndices():g;Kt(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var i=this,n=this.node.getModel(),a=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),c=this,f=c.getTextContent(),v=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(d!=null&&Math.abs(s)P&&!Ts(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,i,n):(o.virtualPiece=new CC(m,e,i,n),h.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=e.seriesModel.getViewRoot();a.eachNode(function(o){if(!n&&o.piece&&o.piece===i.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";Zf(u,h)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:t0,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(Ot),iq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,i){var n={name:e.name,children:e.data};yE(n);var a=this._levelModels=F(e.levels||[],function(l){return new Lt(l,this,i)},this),o=gx.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var c=o.getNodeByDataIndex(h),f=a[c.depth];return f&&(u.parentModel=f),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treePathInfo=bd(n,this),i},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var i=this.getRawData().tree.root;(!e||e!==i&&!i.contains(e))&&(this._viewRoot=i)},t.prototype.enableAriaDecal=function(){SR(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(zt);function yE(r){var t=0;A(r.children,function(i){yE(i);var n=i.value;V(n)&&(n=n[0]),t+=n});var e=r.value;V(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),V(r.value)?r.value[0]=e:r.value=e}var DC=Math.PI/180;function nq(r,t,e){t.eachSeriesByType(r,function(i){var n=i.get("center"),a=i.get("radius");V(a)||(a=[0,a]),V(n)||(n=[n,n]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=U(n[0],o),h=U(n[1],s),c=U(a[0],l/2),f=U(a[1],l/2),v=-i.get("startAngle")*DC,d=i.get("minAngle")*DC,p=i.getData().tree.root,g=i.getViewRoot(),y=g.depth,m=i.get("sort");m!=null&&mE(g,m);var _=0;A(g.children,function(R){!isNaN(R.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),T=(f-c)/(w||1),M=i.get("clockwise"),C=i.get("stillShowZeroSum"),D=M?1:-1,L=function(R,N){if(R){var O=N;if(R!==p){var B=R.getValue(),G=x===0&&C?b:B*b;G1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return i.depth>1&&Y(s)&&(s=Nf(s,(i.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,i,a.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");z(u,l)})})}function sq(r){r.registerChartView(rq),r.registerSeriesModel(iq),r.registerLayout(ut(nq,"sunburst")),r.registerProcessor(ut(Ch,"sunburst")),r.registerVisual(oq),eq(r)}var LC={color:"fill",borderColor:"stroke"},lq={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Zi=Tt(),uq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,i){return Li(null,this)},t.prototype.getDataParams=function(e,i,n){var a=r.prototype.getDataParams.call(this,e,i);return n&&(a.info=Zi(n).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(zt);function hq(r,t){return t=t||[0,0],F(["x","y"],function(e,i){var n=this.getAxis(e),a=t[i],o=r[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))},this)}function cq(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:$(hq,r)}}}function fq(r,t){return t=t||[0,0],F([0,1],function(e){var i=t[e],n=r[e]/2,a=[],o=[];return a[e]=i-n,o[e]=i+n,a[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(a)[e]-this.dataToPoint(o)[e])},this)}function vq(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:$(fq,r)}}}function dq(r,t){var e=this.getAxis(),i=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(i-n)-e.dataToCoord(i+n))}function pq(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:$(dq,r)}}}function gq(r,t){return t=t||[0,0],F(["Radius","Angle"],function(e,i){var n="get"+e+"Axis",a=this[n](),o=t[i],s=r[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function yq(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:$(gq,r)}}}function mq(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(i,n){return r.dataToPoint(i,n)}}}}function _E(r,t,e,i){return r&&(r.legacy||r.legacy!==!1&&!e&&!i&&t!=="tspan"&&(t==="text"||X(r,"text")))}function xE(r,t,e){var i=r,n,a,o;if(t==="text")o=i;else{o={},X(i,"text")&&(o.text=i.text),X(i,"rich")&&(o.rich=i.rich),X(i,"textFill")&&(o.fill=i.textFill),X(i,"textStroke")&&(o.stroke=i.textStroke),X(i,"fontFamily")&&(o.fontFamily=i.fontFamily),X(i,"fontSize")&&(o.fontSize=i.fontSize),X(i,"fontStyle")&&(o.fontStyle=i.fontStyle),X(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},n={};var s=X(i,"textPosition");e?n.position=s?i.textPosition:"inside":s&&(n.position=i.textPosition),X(i,"textPosition")&&(n.position=i.textPosition),X(i,"textOffset")&&(n.offset=i.textOffset),X(i,"textRotation")&&(n.rotation=i.textRotation),X(i,"textDistance")&&(n.distance=i.textDistance)}return IC(o,r),A(o.rich,function(l){IC(l,l)}),{textConfig:n,textContent:a}}function IC(r,t){t&&(t.font=t.textFont||t.font,X(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),X(t,"textAlign")&&(r.align=t.textAlign),X(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),X(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),X(t,"textWidth")&&(r.width=t.textWidth),X(t,"textHeight")&&(r.height=t.textHeight),X(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),X(t,"textPadding")&&(r.padding=t.textPadding),X(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),X(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),X(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),X(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),X(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),X(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),X(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function PC(r,t,e){var i=r;i.textPosition=i.textPosition||e.position||"inside",e.offset!=null&&(i.textOffset=e.offset),e.rotation!=null&&(i.textRotation=e.rotation),e.distance!=null&&(i.textDistance=e.distance);var n=i.textPosition.indexOf("inside")>=0,a=r.fill||"#000";kC(i,t);var o=i.textFill==null;return n?o&&(i.textFill=e.insideFill||"#fff",!i.textStroke&&e.insideStroke&&(i.textStroke=e.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=r.fill||e.outsideFill||"#000"),!i.textStroke&&e.outsideStroke&&(i.textStroke=e.outsideStroke)),i.text=t.text,i.rich=t.rich,A(t.rich,function(s){kC(s,s)}),i}function kC(r,t){t&&(X(t,"fill")&&(r.textFill=t.fill),X(t,"stroke")&&(r.textStroke=t.fill),X(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),X(t,"font")&&(r.font=t.font),X(t,"fontStyle")&&(r.fontStyle=t.fontStyle),X(t,"fontWeight")&&(r.fontWeight=t.fontWeight),X(t,"fontSize")&&(r.fontSize=t.fontSize),X(t,"fontFamily")&&(r.fontFamily=t.fontFamily),X(t,"align")&&(r.textAlign=t.align),X(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),X(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),X(t,"width")&&(r.textWidth=t.width),X(t,"height")&&(r.textHeight=t.height),X(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),X(t,"padding")&&(r.textPadding=t.padding),X(t,"borderColor")&&(r.textBorderColor=t.borderColor),X(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),X(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),X(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),X(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),X(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),X(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),X(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),X(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),X(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),X(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var bE={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},RC=xt(bE);Pr(Ti,function(r,t){return r[t]=1,r},{});Ti.join(", ");var gv=["","style","shape","extra"],ks=Tt();function Ox(r,t,e,i,n){var a=r+"Animation",o=Fs(r,i,n)||{},s=ks(t).userDuring;return o.duration>0&&(o.during=s?$(wq,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),z(o,e[a]),o}function gf(r,t,e,i){i=i||{};var n=i.dataIndex,a=i.isInit,o=i.clearStyle,s=e.isAnimationEnabled(),l=ks(r),u=t.style;l.userDuring=t.during;var h={},c={};if(Mq(r,t,c),OC("shape",t,c),OC("extra",t,c),!a&&s&&(Tq(r,t,h),EC("shape",r,t,h),EC("extra",r,t,h),Cq(r,t,u,h)),c.style=u,_q(r,c,o),bq(r,t),s)if(a){var f={};A(gv,function(d){var p=d?t[d]:t;p&&p.enterFrom&&(d&&(f[d]=f[d]||{}),z(d?f[d]:f,p.enterFrom))});var v=Ox("enter",r,t,e,n);v.duration>0&&r.animateFrom(f,v)}else xq(r,t,n||0,e,h);SE(r,t),u?r.dirty():r.markRedraw()}function SE(r,t){for(var e=ks(r).leaveToProps,i=0;i0&&r.animateFrom(n,a)}}function bq(r,t){X(t,"silent")&&(r.silent=t.silent),X(t,"ignore")&&(r.ignore=t.ignore),r instanceof kr&&X(t,"invisible")&&(r.invisible=t.invisible),r instanceof _t&&X(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var hi={},Sq={setTransform:function(r,t){return hi.el[r]=t,this},getTransform:function(r){return hi.el[r]},setShape:function(r,t){var e=hi.el,i=e.shape||(e.shape={});return i[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=hi.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=hi.el,i=e.style;return i&&(i[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=hi.el.style;if(t)return t[r]},setExtra:function(r,t){var e=hi.el.extra||(hi.el.extra={});return e[r]=t,this},getExtra:function(r){var t=hi.el.extra;if(t)return t[r]}};function wq(){var r=this,t=r.el;if(t){var e=ks(t).userDuring,i=r.userDuring;if(e!==i){r.el=r.userDuring=null;return}hi.el=t,i(Sq)}}function EC(r,t,e,i){var n=e[r];if(n){var a=t[r],o;if(a){var s=e.transition,l=n.transition;if(l)if(!o&&(o=i[r]={}),oo(l))z(o,a);else for(var u=Bt(l),h=0;h=0){!o&&(o=i[r]={});for(var v=xt(a),h=0;h=0)){var f=r.getAnimationStyleProps(),v=f?f.style:null;if(v){!a&&(a=i.style={});for(var d=xt(e),u=0;u=0?t.getStore().get(N,k):void 0}var O=t.get(R.name,k),B=R&&R.ordinalMeta;return B?B.categories[O]:O}function S(P,k){k==null&&(k=u);var R=t.getItemVisual(k,"style"),N=R&&R.fill,O=R&&R.opacity,B=m(k,kn).getItemStyle();N!=null&&(B.fill=N),O!=null&&(B.opacity=O);var G={inheritColor:Y(N)?N:"#000"},H=_(k,kn),W=Gt(H,null,G,!1,!0);W.text=H.getShallow("show")?lt(r.getFormattedLabel(k,kn),Ls(t,k)):null;var q=$f(H,G,!1);return M(P,B),B=PC(B,W,q),P&&T(B,P),B.legacy=!0,B}function w(P,k){k==null&&(k=u);var R=m(k,ji).getItemStyle(),N=_(k,ji),O=Gt(N,null,null,!0,!0);O.text=N.getShallow("show")?jr(r.getFormattedLabel(k,ji),r.getFormattedLabel(k,kn),Ls(t,k)):null;var B=$f(N,null,!0);return M(P,R),R=PC(R,O,B),P&&T(R,P),R.legacy=!0,R}function T(P,k){for(var R in k)X(k,R)&&(P[R]=k[R])}function M(P,k){P&&(P.textFill&&(k.textFill=P.textFill),P.textPosition&&(k.textPosition=P.textPosition))}function C(P,k){if(k==null&&(k=u),X(LC,P)){var R=t.getItemVisual(k,"style");return R?R[LC[P]]:null}if(X(lq,P))return t.getItemVisual(k,P)}function D(P){if(a.type==="cartesian2d"){var k=a.getBaseAxis();return cU(tt({axis:k},P))}}function L(){return e.getCurrentSeriesIndices()}function I(P){return y_(P,e)}}function Nq(r){var t={};return A(r.dimensions,function(e){var i=r.getDimensionInfo(e);if(!i.isExtraCoord){var n=i.coordDim,a=t[n]=t[n]||[];a[i.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Ug(r,t,e,i,n,a,o){if(!i){a.remove(t);return}var s=Fx(r,t,e,i,n,a);return s&&o.setItemGraphicEl(e,s),s&&Kt(s,i.focus,i.blurScope,i.emphasisDisabled),s}function Fx(r,t,e,i,n,a){var o=-1,s=t;t&&CE(t,i,n)&&(o=vt(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=zx(i),s&&kq(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),xr.normal.cfg=xr.normal.conOpt=xr.emphasis.cfg=xr.emphasis.conOpt=xr.blur.cfg=xr.blur.conOpt=xr.select.cfg=xr.select.conOpt=null,xr.isLegacy=!1,zq(u,e,i,n,l,xr),Bq(u,e,i,n,l),Vx(r,u,e,i,xr,n,l),X(i,"info")&&(Zi(u).info=i.info);for(var h=0;h=0?a.replaceAt(u,o):a.add(u),u}function CE(r,t,e){var i=Zi(r),n=t.type,a=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&Wq(a)&&AE(a)!==i.customPathData||n==="image"&&X(o,"image")&&o.image!==i.customImagePath}function Bq(r,t,e,i,n){var a=e.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&CE(o,a,i)&&(o=null),o||(o=zx(a),r.setClipPath(o)),Vx(null,o,t,a,null,i,n)}}function zq(r,t,e,i,n,a){if(!r.isGroup){BC(e,null,a),BC(e,ji,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=r.getTextContent();if(o===!1)h&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=zx(o),r.setTextContent(h)),Vx(null,h,t,o,null,i,n);for(var c=o&&o.style,f=0;f=h;v--){var d=t.childAt(v);Fq(t,d,n)}}}function Fq(r,t,e){t&&Td(t,Zi(r).option,e)}function Gq(r){new Qi(r.oldChildren,r.newChildren,zC,zC,r).add(VC).update(VC).remove(Hq).execute()}function zC(r,t){var e=r&&r.name;return e??Iq+t}function VC(r,t){var e=this.context,i=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;Fx(e.api,n,e.dataIndex,i,e.seriesModel,e.group)}function Hq(r){var t=this.context,e=t.oldChildren[r];e&&Td(e,Zi(e).option,t.seriesModel)}function AE(r){return r&&(r.pathData||r.d)}function Wq(r){return r&&(X(r,"pathData")||X(r,"d"))}function Uq(r){r.registerChartView(Rq),r.registerSeriesModel(uq)}var Ha=Tt(),FC=it,Yg=$,Hx=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new at,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var f=ut(GC,e,c);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,e)}WC(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=ux(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=Ha(t).pointerEl=new wo[a.type](FC(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=Ha(t).labelEl=new St(FC(e.label));t.add(a),HC(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=Ha(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=Ha(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),HC(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Gs(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){qi(u.event)},onmousedown:Yg(this._onHandleDragMove,this,0,0),drift:Yg(this._onHandleDragMove,this),ondragend:Yg(this._onHandleDragEnd,this)}),i.add(n)),WC(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Zs(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){GC(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$g(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform($g(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr($g(n)),Ha(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Wu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function GC(r,t,e,i){DE(Ha(e).lastProp,i)||(Ha(e).lastProp=i,t?At(e,i,r):(e.stopAnimation(),e.attr(i)))}function DE(r,t){if(et(r)&&et(t)){var e=!0;return A(t,function(i,n){e=e&&DE(r[n],i)}),!!e}else return r===t}function HC(r,t){r[t.get(["label","show"])?"show":"hide"]()}function $g(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function WC(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function Wx(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function LE(r,t,e,i,n){var a=e.get("value"),o=IE(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=To(s.get("padding")||0),u=s.getFont(),h=fh(o,u),c=n.position,f=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=n.align;d==="right"&&(c[0]-=f),d==="center"&&(c[0]-=f/2);var p=n.verticalAlign;p==="bottom"&&(c[1]-=v),p==="middle"&&(c[1]-=v/2),Yq(c,f,v,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Yq(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function IE(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:J_(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),Y(o)?a=o.replace("{value}",a):Q(o)&&(a=o(s))}return a}function Ux(r,t,e){var i=or();return Qn(i,i,e.rotation),ti(i,i,e.position),Jr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function PE(r,t,e,i,n,a){var o=je.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),LE(t,i,n,a,{position:Ux(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Yx(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function kE(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function UC(r,t,e,i,n,a){return{cx:r,cy:t,r0:e,r:i,startAngle:n,endAngle:a,clockwise:!0}}var $q=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),h=YC(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var f=Wx(a),v=Xq[u](s,c,h);v.style=f,e.graphicKey=v.type,e.pointer=v}var d=Nm(l.model,n);PE(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Nm(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ux(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=YC(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[e.x,e.y];c[h]+=i[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var f=(u[1]+u[0])/2,v=[f,f];v[h]=c[h];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[h]}},t}(Hx);function YC(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var Xq={line:function(r,t,e){var i=Yx([t,e[0]],[t,e[1]],$C(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:kE([t-i/2,e[0]],[i,n],$C(r))}}};function $C(r){return r.dim==="x"?0:1}var Zq=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(yt),Xi=Tt(),jq=A;function RE(r,t,e){if(!mt.node){var i=t.getZr();Xi(i).records||(Xi(i).records={}),qq(i,t);var n=Xi(i).records[r]||(Xi(i).records[r]={});n.handler=e}}function qq(r,t){if(Xi(r).initialized)return;Xi(r).initialized=!0,e("click",ut(XC,"click")),e("mousemove",ut(XC,"mousemove")),e("globalout",Jq);function e(i,n){r.on(i,function(a){var o=Qq(t);jq(Xi(r).records,function(s){s&&n(s,a,o.dispatchAction)}),Kq(o.pendings,t)})}}function Kq(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function Jq(r,t,e){r.handler("leave",null,e)}function XC(r,t,e,i){t.handler(r,e,i)}function Qq(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function i0(r,t){if(!mt.node){var e=t.getZr(),i=(Xi(e).records||{})[r];i&&(Xi(e).records[r]=null)}}var tK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";RE("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){i0("axisPointer",i)},t.prototype.dispose=function(e,i){i0("axisPointer",i)},t.type="axisPointer",t}(Yt);function EE(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=fo(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,f=u.dim,v=c==="x"||c==="radius"?1:0,d=a.mapDimension(f),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(F(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var ZC=Tt();function eK(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||$(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){yf(n)&&(n=EE({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=yf(n),u=a.axesInfo,h=s.axesInfo,c=i==="leave"||yf(n),f={},v={},d={list:[],map:{}},p={showPointer:ut(iK,v),showTooltip:ut(nK,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(x,b){var S=x.axis,w=lK(u,x);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(n)),T!=null&&jC(x,T,p,!1,f)}})});var g={};return A(h,function(y,m){var _=y.linkGroup;_&&!v[m]&&A(_.axesInfo,function(x,b){var S=v[b];if(x!==y&&S){var w=S.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,qC(x),qC(y)))),g[y.key]=w}})}),A(g,function(y,m){jC(h[m],y,p,!0,f)}),aK(v,h,f),oK(d,n,r,o),sK(h,o,e),f}}function jC(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=rK(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function rK(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(i),c,f;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,r,e);f=v.dataIndices,c=v.nestestValue}else{if(f=l.getData().indicesOfNearest(h[0],r,e.type==="category"?.5:null),!f.length)return;c=l.getData().get(h[0],f[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=c,a.length=0),A(f,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function iK(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function nK(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=qu(l),h=r.map[u];h||(h=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function aK(r,t,e){var i=e.axesInfo=[];A(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function oK(r,t,e,i){if(yf(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function sK(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=ZC(i)[n]||{},o=ZC(i)[n]={};A(r,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&A(c.seriesDataIndices,function(f){var v=f.seriesIndex+" | "+f.dataIndex;o[v]=f})});var s=[],l=[];A(a,function(u,h){!o[h]&&l.push(u)}),A(o,function(u,h){!a[h]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function lK(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function qC(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function yf(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ih(r){Ao.registerAxisPointerClass("CartesianAxisPointer",$q),r.registerComponentModel(Zq),r.registerComponentView(tK),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=m$(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},eK)}function uK(r){pt(lR),pt(Ih)}var hK=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(i),f=a.get("type");if(f&&f!=="none"){var v=Wx(a),d=fK[f](s,l,c,h);d.style=v,e.graphicKey=d.type,e.pointer=d}var p=a.get(["label","margin"]),g=cK(i,n,a,l,p);LE(e,n,a,o,g)},t}(Hx);function cK(r,t,e,i,n){var a=t.axis,o=a.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,h,c;if(a.dim==="radius"){var f=or();Qn(f,f,s),ti(f,f,[i.cx,i.cy]),u=Jr([o,-n],f);var v=t.getModel("axisLabel").get("rotate")||0,d=je.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign,c=d.textVerticalAlign}else{var p=l[1];u=i.coordToPoint([p+n,o]);var g=i.cx,y=i.cy;h=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:c}}var fK={line:function(r,t,e,i){return r.dim==="angle"?{type:"Line",shape:Yx(t.coordToPoint([i[0],e]),t.coordToPoint([i[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:UC(t.cx,t.cy,i[0],i[1],(-e-n/2)*a,(-e+n/2)*a)}:{type:"Sector",shape:UC(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}},vK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var i,n=this.ecModel;return n.eachComponent(e,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(yt),$x=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",le).models[0]},t.type="polarAxis",t}(yt);re($x,Js);var dK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}($x),pK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}($x),Xx=function(r){E(t,r);function t(e,i){return r.call(this,"radius",e,i)||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t}(Br);Xx.prototype.dataToRadius=Br.prototype.dataToCoord;Xx.prototype.radiusToData=Br.prototype.coordToData;var gK=Tt(),Zx=function(r){E(t,r);function t(e,i){return r.call(this,"angle",e,i||[0,360])||this}return t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,i=e.getLabelModel(),n=e.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),h=fh(s==null?"":s+"",i.getFont(),"center","top"),c=Math.max(h.height,7),f=c/u;isNaN(f)&&(f=1/0);var v=Math.max(0,Math.floor(f)),d=gK(e.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},t}(Br);Zx.prototype.dataToAngle=Br.prototype.dataToCoord;Zx.prototype.angleToData=Br.prototype.coordToData;var OE=["radius","angle"],yK=function(){function r(t){this.dimensions=OE,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Xx,this._angleAxis=new Zx,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+i*i);e/=l,i/=l;for(var u=Math.atan2(-i,e)/Math.PI*180,h=us;)u+=h*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,a=-Math.sin(i)*e+this.cy;return[n,a]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,c=u*u+h*h,f=this.r,v=this.r0;return f!==v&&c-o<=f*f&&c+o>=v*v}}},r.prototype.convertToPixel=function(t,e,i){var n=KC(e);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var n=KC(e);return n===this?this.pointToData(i):null},r}();function KC(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function mK(r,t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight();r.cx=U(i[0],n),r.cy=U(i[1],a);var o=r.getRadiusAxis(),s=Math.min(n,a)/2,l=t.get("radius");l==null?l=[0,"100%"]:V(l)||(l=[0,l]);var u=[U(l[0],s),U(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function _K(r,t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();A(av(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(av(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),yo(i.scale,i.model),yo(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function xK(r){return r.mainType==="angleAxis"}function JC(r,t){var e;if(r.type=t.get("type"),r.scale=bh(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),xK(t)){r.inverse=r.inverse!==t.get("clockwise");var i=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:i+(r.inverse?-360:360);r.setExtent(i,n)}t.axis=r,r.model=t}var bK={dimensions:OE,create:function(r,t){var e=[];return r.eachComponent("polar",function(i,n){var a=new yK(n+"");a.update=_K;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");JC(o,l),JC(s,u),mK(a,i,t),e.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",le).models[0];i.coordinateSystem=n.coordinateSystem}}),e}},SK=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Bc(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var i=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function zc(r){var t=r.getRadiusAxis();return t.inverse?0:1}function QC(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var wK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,i){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,a=n.polar,o=a.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=F(n.getViewLabels(),function(h){h=it(h);var c=n.scale,f=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=n.dataToCoord(f),h});QC(u),QC(s),A(SK,function(h){e.get([h,"show"])&&(!n.scale.isBlank()||h==="axisLine")&&TK[h](this.group,e,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Ao),TK={axisLine:function(r,t,e,i,n,a){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=zc(e),c=h?0:1,f,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[c]===0?f=new wo[v]({shape:{cx:e.cx,cy:e.cy,r:a[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new Bs({shape:{cx:e.cx,cy:e.cy,r:a[h],r0:a[c]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,r.add(f)},axisTick:function(r,t,e,i,n,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[zc(e)],u=F(i,function(h){return new ce({shape:Bc(e,[l,l+s],h.coord)})});r.add(cr(u,{style:tt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,i,n,a){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[zc(e)],h=[],c=0;cy?"left":"right",x=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var b=s[d];et(b)&&b.textStyle&&(v=new Lt(b.textStyle,l,l.ecModel))}var S=new St({silent:je.isLabelSilent(t),style:Gt(v,{x:g[0],y:g[1],fill:v.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),h){var w=je.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,ot(S).eventData=w}},this)},splitLine:function(r,t,e,i,n,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c=0?"p":"n",k=M;b&&(i[h][I]||(i[h][I]={p:M,n:M}),k=i[h][I][P]);var R=void 0,N=void 0,O=void 0,B=void 0;if(d.dim==="radius"){var G=d.dataToCoord(L)-M,H=l.dataToCoord(I);Math.abs(G)=B})}}})}function PK(r){var t={};A(r,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=BE(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=t[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=c.stacks;t[l]=c;var v=NE(i);f[v]||c.autoWidthCount++,f[v]=f[v]||{width:0,maxWidth:0};var d=U(i.get("barWidth"),h),p=U(i.get("barMaxWidth"),h),g=i.get("barGap"),y=i.get("barCategoryGap");d&&!f[v].width&&(d=Math.min(c.remainedWidth,d),f[v].width=d,c.remainedWidth-=d),p&&(f[v].maxWidth=p),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=U(i.categoryGap,o),l=U(i.gap,1),u=i.remainedWidth,h=i.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),A(a,function(p,g){var y=p.maxWidth;y&&y=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(t){var e=this.getAxis(),i=this.getRect(),n=[],a=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(t,e,i){var n=tA(e);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(t,e,i){var n=tA(e);return n===this?this.pointToData(i):null},r}();function tA(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function HK(r,t){var e=[];return r.eachComponent("singleAxis",function(i,n){var a=new GK(i,r,t);a.name="single_"+n,a.resize(i,t),i.coordinateSystem=a,e.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",le).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),e}var WK={create:HK,dimensions:zE},eA=["x","y"],UK=["width","height"],YK=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.coordinateSystem,u=Xg(l,1-_v(s)),h=l.dataToPoint(i)[0],c=a.get("type");if(c&&c!=="none"){var f=Wx(a),v=$K[c](s,h,u);v.style=f,e.graphicKey=v.type,e.pointer=v}var d=n0(n);PE(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=n0(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ux(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.coordinateSystem,l=_v(o),u=Xg(s,l),h=[e.x,e.y];h[l]+=i[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var c=Xg(s,1-l),f=(c[1]+c[0])/2,v=[f,f];return v[l]=h[l],{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},t}(Hx),$K={line:function(r,t,e){var i=Yx([t,e[0]],[t,e[1]],_v(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=r.getBandWidth(),n=e[1]-e[0];return{type:"Rect",shape:kE([t-i/2,e[0]],[i,n],_v(r))}}};function _v(r){return r.isHorizontal()?0:1}function Xg(r,t){var e=r.getRect();return[e[eA[t]],e[eA[t]]+e[UK[t]]]}var XK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(Yt);function ZK(r){pt(Ih),Ao.registerAxisPointerClass("SingleAxisPointer",YK),r.registerComponentView(XK),r.registerComponentView(zK),r.registerComponentModel(mf),Is(r,"single",mf,mf.defaultOption),r.registerCoordinateSystem("single",WK)}var jK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i,n){var a=Us(e);r.prototype.init.apply(this,arguments),rA(e,a)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),rA(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(yt);function rA(r,t){var e=r.cellSize,i;V(e)?i=e:i=r.cellSize=[e,e],i.length===1&&(i[1]=i[0]);var n=F([0,1],function(a){return QH(t,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});Zn(r,t,{type:"box",ignoreSize:n})}var qK=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=this.group;a.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(e,s,a),this._renderLines(e,s,l,a),this._renderYearText(e,s,l,a),this._renderMonthText(e,u,l,a),this._renderWeekText(e,u,s,l,a)},t.prototype._renderDayRect=function(e,i,n){for(var a=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var h=a.dataToRect([u],!1).tl,c=new wt({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},t.prototype._renderLines=function(e,i,n,a){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=i.start,f=0;c.time<=i.end.time;f++){d(c.formatedDate),f===0&&(c=s.getDateInfo(i.start.y+"-"+i.start.m));var v=c.date;v.setMonth(v.getMonth()+1),c=s.getDateInfo(v)}d(s.getNextNDay(i.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([p],!1).tl);var g=o._getLinePointsOfOneWeek(e,p,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,n),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,n),l,a)},t.prototype._getEdgesPoints=function(e,i,n){var a=[e[0].slice(),e[e.length-1].slice()],o=n==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},t.prototype._drawSplitline=function(e,i,n){var a=new We({z2:20,shape:{points:e},style:i});n.add(a)},t.prototype._getLinePointsOfOneWeek=function(e,i,n){for(var a=e.coordinateSystem,o=a.getDateInfo(i),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),h=a.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,i){return Y(e)&&e?jH(e,i):Q(e)?e(i):i.nameMap},t.prototype._yearTextPositionControl=function(e,i,n,a,o){var s=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(a==="left"||a==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,i,n,a){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,f=n==="horizontal"?0:1,v={top:[h,u[f][1]],bottom:[h,u[1-f][1]],left:[u[1-f][0],c],right:[u[f][0],c]},d=i.start.y;+i.end.y>+i.start.y&&(d=d+"-"+i.end.y);var p=o.get("formatter"),g={start:i.start.y,end:i.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new St({z2:30,style:Gt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,v[l],n,l,s)),a.add(m)}},t.prototype._monthTextPositionControl=function(e,i,n,a,o){var s="left",l="top",u=e[0],h=e[1];return n==="horizontal"?(h=h+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,i,n,a){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||Y(s))&&(s&&(i=cm(s)||i),s=i.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,v=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=h==="center",p=o.get("silent"),g=0;g=n.start.time&&i.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],i;e[0].time>e[1].time&&(i=!0,e.reverse());var n=Math.floor(e[1].time/Zg)-Math.floor(e[0].time/Zg)+1,a=new Date(e[0].time),o=a.getDate(),s=e[1].date.getDate();a.setDate(o+n-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-e[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-e[1].time)*u>0;)n-=u,a.setDate(l-u);var h=Math.floor((n+e[0].day+6)/7),c=i?-h+1:h-1;return i&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:h,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||t===0&&en.lweek)return null;var a=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+a),this.getDateInfo(o)},r.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new r(n);i.push(a),n.coordinateSystem=a}),t.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function iA(r){var t=r.calendarModel,e=r.seriesModel,i=t?t.coordinateSystem:e?e.coordinateSystem:null;return i}function JK(r){r.registerComponentModel(jK),r.registerComponentView(qK),r.registerCoordinateSystem("calendar",KK)}function QK(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var i=t.parentOption;i?t.parentId=i.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function nA(r,t){var e;return A(t,function(i){r[i]!=null&&r[i]!=="auto"&&(e=!0)}),e}function tJ(r,t,e){var i=z({},e),n=r[t],a=e.$action||"merge";a==="merge"?n?(ht(n,i,!0),Zn(n,i,{ignoreSize:!0}),AI(e,n),Vc(e,n),Vc(e,n,"shape"),Vc(e,n,"style"),Vc(e,n,"extra"),e.clipPath=n.clipPath):r[t]=i:a==="replace"?r[t]=i:a==="remove"&&n&&(r[t]=null)}var VE=["transition","enterFrom","leaveTo"],eJ=VE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Vc(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var i=e?VE:eJ,n=0;n=0;h--){var c=n[h],f=he(c.id,null),v=f!=null?o.get(f):null;if(v){var d=v.parent,y=Mr(d),m=d===a?{width:s,height:l}:{width:y.width,height:y.height},_={},x=sd(v,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!Mr(v).isNew&&x){for(var b=c.transition,S={},w=0;w=0)?S[T]=M:v[T]=M}At(v,S,e,0)}else v.attr(_)}}},t.prototype._clear=function(){var e=this,i=this._elMap;i.each(function(n){_f(n,Mr(n).option,i,e._lastGraphicModel)}),this._elMap=Z()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Yt);function a0(r){var t=X(aA,r)?aA[r]:td(r),e=new t({});return Mr(e).type=r,e}function oA(r,t,e,i){var n=a0(e);return t.add(n),i.set(r,n),Mr(n).id=r,Mr(n).isNew=!0,n}function _f(r,t,e,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){_f(a,t,e,i)}),Td(r,t,i),e.removeKey(Mr(r).id))}function sA(r,t,e,i){r.isGroup||A([["cursor",kr.prototype.cursor],["zlevel",i||0],["z",e||0],["z2",0]],function(n){var a=n[0];X(t,a)?r[a]=lt(t[a],n[1]):r[a]==null&&(r[a]=n[1])}),A(xt(t),function(n){if(n.indexOf("on")===0){var a=t[n];r[n]=Q(a)?a:null}}),X(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function aJ(r){return r=z({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(CI),function(t){delete r[t]}),r}function oJ(r,t,e){var i=ot(r).eventData;!r.silent&&!r.ignore&&!i&&(i=ot(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),i&&(i.info=e.info)}function sJ(r){r.registerComponentModel(iJ),r.registerComponentView(nJ),r.registerPreprocessor(function(t){var e=t.graphic;V(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var lA=["x","y","radius","angle","single"],lJ=["cartesian2d","polar","singleAxis"];function uJ(r){var t=r.get("coordinateSystem");return vt(lJ,t)>=0}function Rn(r){return r+"Axis"}function hJ(r,t){var e=Z(),i=[],n=Z();r.eachComponent({mainType:"dataZoom",query:t},function(h){n.get(h.uid)||s(h)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(h){!n.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){n.set(h.uid,!0),i.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(f,v){var d=e.get(f);d&&d[v]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,f){(e.get(c)||e.set(c,[]))[f]=!0})}return i}function FE(r){var t=r.ecModel,e={infoList:[],infoMap:Z()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(Rn(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var jg=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),rh=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=uA(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=uA(e);ht(this.option,e,!0),ht(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=Z(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return A(lA,function(n){var a=this.getReferringComponents(Rn(n),GG);if(a.specified){i=!0;var o=new jg;A(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===i}});l(s,"single")}function l(u,h){var c=u[0];if(c){var f=new jg;if(f.add(c.componentIndex),e.set(h,f),a=!1,h==="x"||h==="y"){var v=c.getReferringComponents("grid",le).models[0];v&&A(u,function(d){c.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",le).models[0]&&f.add(d.componentIndex)})}}}a&&A(lA,function(u){if(a){var h=n.findComponents({mainType:Rn(u),filter:function(f){return f.get("type",!0)==="category"}});if(h[0]){var c=new jg;c.add(h[0].componentIndex),e.set(u,c),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(Rn(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){A(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(Rn(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;A(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(d=!0),b&&(p=!0)}return g&&d&&p})}else is(h,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});is(h,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;is(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Pt(i[0]+o,i,[0,100],!0):a!=null&&(o=Pt(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=K0(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function dJ(r,t,e){var i=[1/0,-1/0];is(e,function(o){RU(i,o.getData(),t)});var n=r.getAxisModel(),a=nk(n.axis.scale,n,i).calculate();return[a.min,a.max]}var pJ={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Rn(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new vJ(n,a,s,r),e.push(o.__dzAxisProxy))});var i=Z();return A(e,function(n){A(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function gJ(r){r.registerAction("dataZoom",function(t,e){var i=hJ(e,t);A(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var cA=!1;function qx(r){cA||(cA=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,pJ),gJ(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function yJ(r){r.registerComponentModel(cJ),r.registerComponentView(fJ),qx(r)}var Ar=function(){function r(){}return r}(),GE={};function ns(r,t){GE[r]=t}function HE(r){return GE[r]}var mJ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(i,n){var a=HE(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),ht(i,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(yt);function _J(r,t,e){var i=t.getBoxLayoutParams(),n=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=ue(i,a,n);io(t.get("orient"),r,t.get("itemGap"),o.width,o.height),sd(r,i,a,n)}function WE(r,t){var e=To(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),r=new wt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var xJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},h=this._features||(this._features={}),c=[];A(u,function(d,p){c.push(p)}),new Qi(this._featureNames||[],c).add(f).update(f).remove(ut(f,null)).execute(),this._featureNames=c;function f(d,p){var g=c[d],y=c[p],m=u[g],_=new Lt(m,e,e.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===g&&(m.title=a.newTitle),g&&!y){if(bJ(g))x={onclick:_.option.onclick,featureName:g};else{var b=HE(g);if(!b)return;x=new b}h[g]=x}else if(x=h[y],!x)return;x.uid=Ws("toolbox-feature"),x.model=_,x.ecModel=i,x.api=n;var S=x instanceof Ar;if(!g&&y){S&&x.dispose&&x.dispose(i,n);return}if(!_.get("show")||S&&x.unusable){S&&x.remove&&x.remove(i,n);return}v(_,x,g),_.setIconStatus=function(w,T){var M=this.option,C=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[w]=T,C[w]&&(T==="emphasis"?Ki:Ji)(C[w])},x instanceof Ar&&x.render&&x.render(_,i,n,a)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Ar&&p.getIcons?p.getIcons():d.get("icon"),x=d.get("title")||{},b,S;Y(_)?(b={},b[g]=_):b=_,Y(x)?(S={},S[g]=x):S=x;var w=d.iconPaths={};A(b,function(T,M){var C=Gs(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(y.getItemStyle());var D=C.ensureState("emphasis");D.style=m.getItemStyle();var L=new St({style:{text:S[M],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:y_({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},i)},ignore:!0});C.setTextContent(L),So({el:C,componentModel:e,itemName:M,formatterParamsExtra:{title:S[M]}}),C.__title=S[M],C.on("mouseover",function(){var I=m.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),C.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",M])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",M])==="emphasis"?Ki:Ji)(C),o.add(C),C.on("click",$(p.onclick,p,i,n,M)),w[M]=C})}_J(o,e,n),o.add(WE(o.getBoundingRect(),e)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!Q(_)&&p){var x=_.style||(_.style={}),b=fh(p,St.makeFont(x)),S=d.x+o.x,w=d.y+o.y+s,T=!1;w+b.height>n.getHeight()&&(y.position="top",T=!0);var M=T?-5-b.height:s+10;S+b.width/2>n.getWidth()?(y.position=["100%",M],x.align="right"):S-b.width/2<0&&(y.position=[0,M],x.align="left")}})},t.prototype.updateView=function(e,i,n,a){A(this._features,function(o){o instanceof Ar&&o.updateView&&o.updateView(o.model,i,n,a)})},t.prototype.remove=function(e,i){A(this._features,function(n){n instanceof Ar&&n.remove&&n.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){A(this._features,function(n){n instanceof Ar&&n.dispose&&n.dispose(e,i)})},t.type="toolbox",t}(Yt);function bJ(r){return r.indexOf("my")===0}var SJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){var n=this.model,a=n.get("name")||e.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=mt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),v=f[0].indexOf("base64")>-1,d=o?decodeURIComponent(f[1]):f[1];v&&(d=window.atob(d));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),x.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var S=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=a}},t.getDefaultOption=function(e){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},t}(Ar),fA="__ec_magicType_stack__",wJ=[["line","bar"],["stack"]],TJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),n={};return A(e.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},t.getDefaultOption=function(e){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},t.prototype.onclick=function(e,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(vA[n]){var s={series:[]},l=function(c){var f=c.subType,v=c.id,d=vA[n](f,v,c,a);d&&(tt(d,c.option),s.series.push(d));var p=c.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=c.getReferringComponents(m,le).models[0],x=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=x;b++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=n==="bar"}}};A(wJ,function(c){vt(c,n)>=0&&A(c,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=n;n==="stack"&&(u=ht({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(h="tiled")),i.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Ar),vA={line:function(r,t,e,i){if(r==="bar")return ht({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,t,e,i){if(r==="line")return ht({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,t,e,i){var n=e.get("stack")===fA;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),ht({id:t,stack:n?"":fA},i.get(["option","stack"])||{},!0)}};ii({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Md=new Array(60).join("-"),Rs=" ";function MJ(r){var t={},e=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:i}}function CJ(r){var t=[];return A(r,function(e,i){var n=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(F(e.series,function(v){return v.name})),l=[n.model.getCategories()];A(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Rs)],h=0;h=0)return!0}var o0=new RegExp("["+Rs+"]+","g");function IJ(r){for(var t=r.split(/\n+/g),e=xv(t.shift()).split(o0),i=[],n=F(e,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=e[a];if(o[n])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function NJ(r){var t=Kx(r),e=t[t.length-1];t.length>1&&t.pop();var i={};return UE(e,function(n,a){for(var o=t.length-1;o>=0;o--)if(n=t[o][a],n){i[a]=n;break}}),i}function BJ(r){YE(r).snapshots=null}function zJ(r){return Kx(r).length}function Kx(r){var t=YE(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var VJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){BJ(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return i},t}(Ar);ii({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var FJ=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Jx=function(){function r(t,e,i){var n=this;this._targetInfoList=[];var a=dA(e,t);A(GJ,function(o,s){(!i||!i.include||vt(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=qg[i.brushType](0,a,n);i.__rangeOffset={offset:mA[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,i){A(t,function(n){var a=this.findTargetInfo(n,e);a&&a!==!0&&A(a.coordSyses,function(o){var s=qg[n.brushType](1,o,n.range,!0);i(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(i){var n=this.findTargetInfo(i,e);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=qg[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?mA[i.brushType](a.values,o.offset,HJ(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return F(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:QR(n),isTargetByCursor:eE(n,t,i.coordSysModel),getLinearBrushOtherExtent:tE(n)}})},r.prototype.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&vt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dA(e,t),a=0;ar[1]&&r.reverse(),r}function dA(r,t){return fu(r,t,{includeMainTypes:FJ})}var GJ={grid:function(r,t){var e=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=Z(),o={},s={};!e&&!i&&!n||(A(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),A(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),A(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];A(u.getCartesians(),function(c,f){(vt(e,c.getAxis("x").model)>=0||vt(i,c.getAxis("y").model)>=0)&&h.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:gA.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:gA.geo})})}},pA=[function(r,t){var e=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],gA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(zn(r)),t}},qg={lineX:ut(yA,0),lineY:ut(yA,1),rect:function(r,t,e,i){var n=r?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),a=r?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),o=[s0([n[0],a[0]]),s0([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=F(e,function(o){var s=r?t.pointToData(o,i):t.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function yA(r,t,e,i){var n=e.getAxis(["x","y"][r]),a=s0(F([0,1],function(s){return t?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var mA={lineX:ut(_A,0),lineY:ut(_A,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return F(r,function(i,n){return[i[0]-e[0]*t[n][0],i[1]-e[1]*t[n][1]]})}};function _A(r,t,e,i){return[t[0]-i[r]*e[0],t[1]-i[r]*e[1]]}function HJ(r,t){var e=xA(r),i=xA(t),n=[e[0]/i[0],e[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function xA(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var l0=A,WJ=NG("toolbox-dataZoom_"),UJ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){this._brushController||(this._brushController=new Mx(n.getZr()),this._brushController.on("brush",$(this._onBrush,this)).mount()),XJ(e,i,this,a,n),$J(e,i)},t.prototype.onclick=function(e,i,n){YJ[n].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(!e.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new Jx(Qx(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,h,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[f],c,h)}}),OJ(a,n),this._dispatchZoomAction(n);function s(u,h,c){var f=h.getAxis(u),v=f.model,d=l(u,v,a),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=Do(0,c.slice(),f.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,h.componentIndex);d&&(f=v)}),f}},t.prototype._dispatchZoomAction=function(e){var i=[];l0(e,function(n,a){i.push(it(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},t}(Ar),YJ={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(NJ(this.ecModel))}};function Qx(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function $J(r,t){r.setIconStatus("back",zJ(t)>1?"emphasis":"normal")}function XJ(r,t,e,i,n){var a=e._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new Jx(Qx(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}aW("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var i=t.getModel(e),n=[],a=Qx(i),o=fu(r,a);l0(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),l0(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:WJ+u+c};f[h]=c,n.push(f)}return n});function ZJ(r){r.registerComponentModel(mJ),r.registerComponentView(xJ),ns("saveAsImage",SJ),ns("magicType",TJ),ns("dataView",RJ),ns("dataZoom",UJ),ns("restore",VJ),pt(yJ)}var jJ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(yt);function $E(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function XE(r){if(mt.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+n,f=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),v=Math.round(((f-Math.SQRT2*n)/2+Math.SQRT2*n-(f-c)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function rQ(r,t){var e="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+e,n="opacity"+i+",visibility"+i;return t||(i=" "+r+"s "+e,n+=mt.transformSupported?","+tb+i:",left"+i+",top"+i),JJ+":"+n}function bA(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!mt.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=mt.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+tb+":"+o+";":[["top",0],["left",0],[ZE,o]]}function iQ(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=lt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),A(["decoration","align"],function(u){var h=r.get(u);h&&t.push("text-"+u+":"+h)}),t.join(";")}function nQ(r,t,e){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),h=r.getModel("textStyle"),c=nP(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+f),t&&n&&i.push(rQ(n,e)),a&&i.push("background-color:"+a),A(["width","color","radius"],function(v){var d="border-"+v,p=M_(d),g=r.get(p);g!=null&&i.push(d+":"+g+(v==="color"?"":"px"))}),i.push(iQ(h)),c!=null&&i.push("padding:"+To(c).join("px ")+"px"),i.join(";")+";"}function SA(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&hF(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var aQ=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,mt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(Y(a)?document.querySelector(a):ho(a)?a:Q(a)&&a(t.getDom()));SA(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,h=n.painter.getViewportRoot();Sr(h,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=KJ(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=QJ+nQ(t,!this._firstShow,this._longHide)+bA(a[0],a[1],!0)+("border-color:"+go(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Y(a)&&i.get("trigger")==="item"&&!$E(i)&&(s=eQ(i,n,a)),Y(t))o.innerHTML=t+s;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||mt.node||!n.getDom())){var o=MA(a,n);this._ticket="";var s=a.dataByCoordSys,l=fQ(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=sQ;h.x=a.x,h.y=a.y,h.update(),ot(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var c=EE(a,i),f=c.point[0],v=c.point[1];f!=null&&v!=null&&this._tryShow({offsetX:f,offsetY:v,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(MA(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var h=u.getData(),c=Ll([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=ot(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Za(n,function(h){if(ot(h).dataIndex!=null)return l=h,!0;if(ot(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=$(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ll([i.tooltipOption],a),l=this._renderMode,u=[],h=_e("section",{blocks:[],noHeader:!0}),c=[],f=new Op;A(e,function(m){A(m.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=IE(b,x.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=_e("section",{header:S,noHeader:!Lr(S),sortBlocks:!0,blocks:[]});h.blocks.push(w),A(_.seriesDataIndices,function(T){var M=n.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,D=M.getDataParams(C);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=J_(x.axis,{value:b}),D.axisValueLabel=S,D.marker=f.makeTooltipMarker("item",go(D.color),l);var L=fw(M.formatTooltip(C,!0,null)),I=L.frag;if(I){var P=Ll([M],a).get("valueFormatter");w.blocks.push(P?z({valueFormatter:P},I):I)}L.text&&c.push(L.text),u.push(D)}})}})}),h.blocks.reverse(),c.reverse();var v=i.position,d=s.get("order"),p=mw(h,f,l,d,n.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?` `:"
",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,f)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=ot(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,f=u.getData(c),v=this._renderMode,d=e.positionDefault,p=Ll([f.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(h,c),m=new Op;y.marker=m.makeTooltipMarker("item",go(y.color),v);var _=fw(u.formatTooltip(h,!1,c)),x=p.get("order"),b=p.get("valueFormatter"),S=_.frag,w=S?mw(b?z({valueFormatter:b},S):S,m,v,x,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+h;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:h,dataIndex:f.getRawIndex(h),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=ot(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var h=l;l={content:h,formatter:h},u=!0}u&&a&&l.content&&(l=it(l),l.content=Oe(l.content));var c=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&c.push(f),c.push({formatter:l.content});var v=e.positionDefault,d=Ll(c,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",y=new Op;this._showOrMove(d,function(){var m=it(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,i,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,h){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var f=e.get("formatter");l=l||e.get("position");var v=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),p=d.color;if(f)if(Y(f)){var g=e.ecModel.get("useUTC"),y=V(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=f,m&&(v=_h(y.axisValue,v,g)),v=C_(v,n,!0)}else if(Q(f)){var _=$(function(x,b){x===this._ticket&&(c.setContent(b,h,e,p,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=a,v=f(n,a,_)}else v=f;c.setContent(v,h,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||V(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!V(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();i=i||e.get("position");var c=o.getSize(),f=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,h],contentSize:c.slice()})),V(i))n=U(i[0],u),a=U(i[1],h);else if(et(i)){var p=i;p.width=c[0],p.height=c[1];var g=ue(p,{width:u,height:h});n=g.x,a=g.y,f=null,v=null}else if(Y(i)&&l){var y=cQ(i,d,c,e.get("borderWidth"));n=y[0],a=y[1]}else{var y=uQ(n,a,o,u,h,f?null:20,v?null:20);n=y[0],a=y[1]}if(f&&(n-=CA(f)?c[0]/2:f==="right"?c[0]:0),v&&(a-=CA(v)?c[1]/2:v==="bottom"?c[1]:0),$E(e)){var y=hQ(n,a,o,u,h);n=y[0],a=y[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],h=e[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&A(u,function(f,v){var d=c[v]||{},p=f.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&f.value===d.value&&f.axisType===d.axisType&&f.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&A(f.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],x=a[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){mt.node||!i.getDom()||(Wu(this,"_updatePosition"),this._tooltipContent.dispose(),i0("itemTooltip",i))},t.type="tooltip",t}(Yt);function Ll(r,t,e){var i=t.ecModel,n;e?(n=new Lt(e,i,i),n=new Lt(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Lt&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Lt(o,n,i)))}return n}function MA(r,t){return r.dispatchAction||$(t.dispatchAction,t)}function uQ(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function hQ(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function cQ(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,h=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+h/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+h+o;break;case"left":s=t.x-n-o,l=t.y+h/2-a/2;break;case"right":s=t.x+u+o,l=t.y+h/2-a/2}return[s,l]}function CA(r){return r==="center"||r==="middle"}function fQ(r,t,e){var i=r_(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=vh(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=ot(u).tooltipConfig;if(h&&h.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function vQ(r){pt(Ih),r.registerComponentModel(jJ),r.registerComponentView(lQ),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}var dQ=["rect","polygon","keep","clear"];function pQ(r,t){var e=Bt(r?r.brush:[]);if(e.length){var i=[];A(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=r&&r.toolbox;V(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var a=n.feature||(n.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),gQ(s),t&&!s.length&&s.push.apply(s,dQ)}}function gQ(r){var t={};A(r,function(e){t[e]=1}),r.length=0,A(t,function(e,i){r.push(i)})}var AA=A;function DA(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function u0(r,t,e){var i={};return AA(t,function(a){var o=i[a]=n();AA(r[a],function(s,l){if(ye.isValidType(l)){var u={type:l,visual:s};e&&e(u,a),o[l]=new ye(u),l==="opacity"&&(u=it(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ye(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function qE(r,t,e){var i;A(e,function(n){t.hasOwnProperty(n)&&DA(t[n])&&(i=!0)}),i&&A(e,function(n){t.hasOwnProperty(n)&&DA(t[n])?r[n]=it(t[n]):delete r[n]})}function yQ(r,t,e,i,n,a){var o={};A(r,function(c){var f=ye.prepareVisualTypes(t[c]);o[c]=f});var s;function l(c){return N_(e,s,c)}function u(c,f){dP(e,s,c,f)}e.each(h);function h(c,f){s=c;var v=e.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=i.call(n,c),p=t[d],g=o[d],y=0,m=g.length;yt[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&RA(t)}};function RA(r){return new ft(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var MQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.ecModel=e,this.api=i,this.model,(this._brushController=new Mx(i.getZr())).on("brush",$(this._onBrush,this)).mount()},t.prototype.render=function(e,i,n,a){this.model=e,this._updateController(e,i,n,a)},t.prototype.updateTransform=function(e,i,n,a){KE(i),this._updateController(e,i,n,a)},t.prototype.updateVisual=function(e,i,n,a){this.updateTransform(e,i,n,a)},t.prototype.updateView=function(e,i,n,a){this._updateController(e,i,n,a)},t.prototype._updateController=function(e,i,n,a){(!a||a.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:it(n),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:it(n),$from:i})},t.type="brush",t}(Yt),CQ="#ddd",AQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,i){var n=this.option;!i&&qE(n,e,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:CQ},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=F(e,function(i){return EA(this.option,i)},this))},t.prototype.setBrushOption=function(e){this.brushOption=EA(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(yt);function EA(r,t){return ht({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var DQ=["rect","polygon","lineX","lineY","keep","clear"],LQ=function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(e,i,n){this.render(e,i,n)},t.prototype.getIcons=function(){var e=this.model,i=e.get("icon",!0),n={};return A(e.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},t.prototype.onclick=function(e,i,n){var a=this._brushType,o=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var i={show:!0,type:DQ.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return i},t}(Ar);function IQ(r){r.registerComponentView(MQ),r.registerComponentModel(AQ),r.registerPreprocessor(pQ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,xQ),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(i){i.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ee),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ee),ns("brush",LQ)}var PQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(yt),kQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=lt(e.get("textBaseline"),e.get("textVerticalAlign")),h=new St({style:Gt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),f=e.get("subtext"),v=new St({style:Gt(s,{text:f,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);h.silent=!d&&!g,v.silent=!p&&!g,d&&h.on("click",function(){Zf(d,"_"+e.get("target"))}),p&&v.on("click",function(){Zf(p,"_"+e.get("subtarget"))}),ot(h).eventData=ot(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(h),f&&a.add(v);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ue(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var x={align:l,verticalAlign:u};h.setStyle(x),v.setStyle(x),y=a.getBoundingRect();var b=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var w=new wt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(w)}},t.type="title",t}(Yt);function RQ(r){r.registerComponentModel(PQ),r.registerComponentView(kQ)}var OA=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var i=this._data.count();this.option.loop?e=(e%i+i)%i:(e>=i&&(e=i-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,i=e.data||[],n=e.axisType,a=this._names=[],o;n==="category"?(o=[],A(i,function(u,h){var c=he(Os(u),""),f;et(u)?(f=it(u),f.value=h):f=h,o.push(f),a.push(c)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Be([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(yt),JE=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=ea(OA.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(OA);re(JE,ud.prototype);var EQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(Yt),OQ=function(r){E(t,r);function t(e,i,n,a){var o=r.call(this,e,i,n)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Br),Jg=Math.PI,NA=Tt(),NQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.api=i},t.prototype.render=function(e,i,n){if(this.model=e,this.api=n,this.ecModel=i,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,e);e.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return _e("nameValue",{noName:!0,value:h})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,e)},this),this._renderAxisLabel(a,s,l,e),this._position(a,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,i){var n=e.get(["label","position"]),a=e.get("orient"),o=zQ(e,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Jg/2},c=a==="vertical"?o.height:o.width,f=e.getModel("controlStyle"),v=f.get("show",!0),d=v?f.get("itemSize"):0,p=v?f.get("itemGap"):0,g=d+p,y=e.get(["label","rotate"])||0;y=y*Jg/180;var m,_,x,b=f.get("position",!0),S=v&&f.get("showPlayBtn",!0),w=v&&f.get("showPrevBtn",!0),T=v&&f.get("showNextBtn",!0),M=0,C=c;b==="left"||b==="bottom"?(S&&(m=[0,0],M+=g),w&&(_=[M,0],M+=g),T&&(x=[C-d,0],C-=g)):(S&&(m=[C-d,0],C-=g),w&&(_=[0,0],M+=g),T&&(x=[C-d,0],C-=g));var D=[M,C];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[a],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[a],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:D,controlSize:d,controlGap:p}},t.prototype._position=function(e,i){var n=this._mainGroup,a=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=or(),l=o.x,u=o.y+o.height;ti(s,s,[-l,-u]),Qn(s,s,-Jg/2),ti(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=m(o),c=m(n.getBoundingRect()),f=m(a.getBoundingRect()),v=[n.x,n.y],d=[a.x,a.y];d[0]=v[0]=h[0][0];var p=e.labelPosOpt;if(p==null||Y(p)){var g=p==="+"?0:1;_(v,c,h,1,g),_(d,f,h,1,1-g)}else{var g=p>=0?0:1;_(v,c,h,1,g),d[1]=v[1]+p}n.setPosition(v),a.setPosition(d),n.rotation=a.rotation=e.rotation,y(n),y(a);function y(x){x.originX=h[0][0]-x.x,x.originY=h[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,b,S,w,T){x[w]+=S[w][T]-b[w][T]}},t.prototype._createAxis=function(e,i){var n=i.getData(),a=i.get("axisType"),o=BQ(i,a);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new OQ("value",o,e.axisExtent,a);return l.model=i,l},t.prototype._createGroup=function(e){var i=this[e]=new at;return this.group.add(i),i},t.prototype._renderAxisLine=function(e,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new ce({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:z({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new ce({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:tt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},t.prototype._renderAxisTick=function(e,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var h=n.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),v=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),p={x:h,y:0,onclick:$(o._changeTimeline,o,u.value)},g=BA(c,f,i,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),Bn(g);var y=ot(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(h){var c=h.tickValue,f=l.getItemModel(c),v=f.getModel("label"),d=f.getModel(["emphasis","label"]),p=f.getModel(["progress","label"]),g=n.dataToCoord(h.tickValue),y=new St({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:$(o._changeTimeline,o,c),silent:!1,style:Gt(v,{text:h.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Gt(d),y.ensureState("progress").style=Gt(p),i.add(y),Bn(y),NA(y).dataIndex=c,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,i,n,a){var o=e.controlSize,s=e.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);f(e.nextBtnPosition,"next",$(this._changeTimeline,this,c?"-":"+")),f(e.prevBtnPosition,"prev",$(this._changeTimeline,this,c?"+":"-")),f(e.playPosition,h?"stop":"play",$(this._handlePlayClick,this,!h),!0);function f(v,d,p,g){if(v){var y=ei(lt(a.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=VQ(a,d+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,i.add(_),Bn(_)}}},t.prototype._renderCurrentPointer=function(e,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=$(u._handlePointerDrag,u),c.ondragend=$(u._handlePointerDragend,u),zA(c,u._progressLine,s,n,a,!0)},onUpdate:function(c){zA(c,u._progressLine,s,n,a)}};this._currentPointer=BA(l,l,this._mainGroup,{},this._currentPointer,h)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,i){var n=this._toAxisCoord(e)[0],a=this._axis,o=fr(a.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[a]=+o[a].toFixed(f)),[o,c]}var Qg={min:ut(Hc,"min"),max:ut(Hc,"max"),average:ut(Hc,"average"),median:ut(Hc,"median")};function ih(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!YQ(t)&&!V(t.coord)&&V(n)){var a=QE(t,e,i,r);if(t=it(t),t.type&&Qg[t.type]&&a.baseAxis&&a.valueAxis){var o=vt(n,a.baseAxis.dim),s=vt(n,a.valueAxis.dim),l=Qg[t.type](e,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!V(n))t.coord=[];else for(var u=t.coord,h=0;h<2;h++)Qg[u[h]]&&(u[h]=rb(e,e.mapDimension(n[h]),u[h]));return t}}function QE(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis($Q(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function $Q(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function nh(r,t){return r&&r.containData&&t.coord&&!c0(t)?r.containData(t.coord):!0}function XQ(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!c0(t)&&!c0(e)?r.containZone(t.coord,e.coord):!0}function tO(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return Fn(o,t[a])}:function(e,i,n,a){return Fn(e.value,t[a])}}function rb(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var ty=Tt(),ib=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=Z()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){ty(s).keep=!1}),i.eachSeries(function(s){var l=nn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!ty(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(e){ty(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;A(e,function(a){var o=nn.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Y2(l):u_(l))})}})},t.type="marker",t}(Yt);function FA(r,t,e){var i=t.coordinateSystem;r.each(function(n){var a=r.getItemModel(n),o,s=U(a.get("x"),e.getWidth()),l=U(a.get("y"),e.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(t.getMarkerPosition)o=t.getMarkerPosition(r.getValues(r.dimensions,n));else if(i){var u=r.get(i.dimensions[0],n),h=r.get(i.dimensions[1],n);o=i.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var ZQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markPoint");o&&(FA(o.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new wh),c=jQ(o,e,i);i.setData(c),FA(i.getData(),e,a),c.each(function(f){var v=c.getItemModel(f),d=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(Q(d)||Q(p)||Q(g)||Q(y)){var _=i.getRawValue(f),x=i.getDataParams(f);Q(d)&&(d=d(_,x)),Q(p)&&(p=p(_,x)),Q(g)&&(g=g(_,x)),Q(y)&&(y=y(_,x))}var b=v.getModel("itemStyle").getItemStyle(),S=xh(l,"color");b.fill||(b.fill=S),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(f){f.traverse(function(v){ot(v).dataModel=i})}),this.markKeep(h),h.group.silent=i.get("silent")||e.get("silent")},t.type="markPoint",t}(ib);function jQ(r,t,e){var i;r?i=F(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return z(z({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Be(i,e),a=F(e.get("data"),ut(ih,t));r&&(a=Dt(a,ut(nh,r)));var o=tO(!!r,i);return n.initData(a,null,o),n}function qQ(r){r.registerComponentModel(UQ),r.registerComponentView(ZQ),r.registerPreprocessor(function(t){eb(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var KQ=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(nn),Wc=Tt(),JQ=function(r,t,e,i){var n=r.getData(),a;if(V(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=pe(i.yAxis,i.xAxis);else{var u=QE(i,n,t,r);s=u.valueAxis;var h=Z_(n,u.valueDataDim);l=rb(n,h,o)}var c=s.dim==="x"?0:1,f=1-c,v=it(i),d={coord:[]};v.type=null,v.coord=[],v.coord[f]=-1/0,d.coord[f]=1/0;var p=e.get("precision");p>=0&&Mt(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[c]=d.coord[c]=l,a=[v,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var g=[ih(r,a[0]),ih(r,a[1]),z({},a[2])];return g[2].type=g[2].type||null,ht(g[2],g[0]),ht(g[2],g[1]),g};function bv(r){return!isNaN(r)&&!isFinite(r)}function GA(r,t,e,i){var n=1-r,a=i.dimensions[r];return bv(t[n])&&bv(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function QQ(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(GA(1,e,i,r)||GA(0,e,i,r)))return!0}return nh(r,t[0])&&nh(r,t[1])}function ey(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=U(o.get("x"),n.getWidth()),u=U(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var h=a.dimensions,c=r.get(h[0],t),f=r.get(h[1],t);s=a.dataToPoint([c,f])}if(Co(a,"cartesian2d")){var v=a.getAxis("x"),d=a.getAxis("y"),h=a.dimensions;bv(r.get(h[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):bv(r.get(h[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var ttt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Wc(o).from,u=Wc(o).to;l.each(function(h){ey(l,h,!0,a,n),ey(u,h,!1,a,n)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Tx);this.group.add(h.group);var c=ett(o,e,i),f=c.from,v=c.to,d=c.line;Wc(i).from=f,Wc(i).to=v,i.setData(d);var p=i.get("symbol"),g=i.get("symbolSize"),y=i.get("symbolRotate"),m=i.get("symbolOffset");V(p)||(p=[p,p]),V(g)||(g=[g,g]),V(y)||(y=[y,y]),V(m)||(m=[m,m]),c.from.each(function(x){_(f,x,!0),_(v,x,!1)}),d.each(function(x){var b=d.getItemModel(x).getModel("lineStyle").getLineStyle();d.setItemLayout(x,[f.getItemLayout(x),v.getItemLayout(x)]),b.stroke==null&&(b.stroke=f.getItemVisual(x,"style").fill),d.setItemVisual(x,{fromSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(x,"symbolOffset"),fromSymbolRotate:f.getItemVisual(x,"symbolRotate"),fromSymbolSize:f.getItemVisual(x,"symbolSize"),fromSymbol:f.getItemVisual(x,"symbol"),toSymbolKeepAspect:v.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(x,"symbolOffset"),toSymbolRotate:v.getItemVisual(x,"symbolRotate"),toSymbolSize:v.getItemVisual(x,"symbolSize"),toSymbol:v.getItemVisual(x,"symbol"),style:b})}),h.updateData(d),c.line.eachItemGraphicEl(function(x){ot(x).dataModel=i,x.traverse(function(b){ot(b).dataModel=i})});function _(x,b,S){var w=x.getItemModel(b);ey(x,b,S,e,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=xh(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:lt(w.get("symbolOffset",!0),m[S?0:1]),symbolRotate:lt(w.get("symbolRotate",!0),y[S?0:1]),symbolSize:lt(w.get("symbolSize"),g[S?0:1]),symbol:lt(w.get("symbol",!0),p[S?0:1]),style:T})}this.markKeep(h),h.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t}(ib);function ett(r,t,e){var i;r?i=F(r&&r.dimensions,function(u){var h=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return z(z({},h),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new Be(i,e),a=new Be(i,e),o=new Be([],e),s=F(e.get("data"),ut(JQ,t,r,e));r&&(s=Dt(s,ut(QQ,r)));var l=tO(!!r,i);return n.initData(F(s,function(u){return u[0]}),null,l),a.initData(F(s,function(u){return u[1]}),null,l),o.initData(F(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function rtt(r){r.registerComponentModel(KQ),r.registerComponentView(ttt),r.registerPreprocessor(function(t){eb(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var itt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(nn),Uc=Tt(),ntt=function(r,t,e,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=ih(r,n),s=ih(r,a),l=o.coord,u=s.coord;l[0]=pe(l[0],-1/0),l[1]=pe(l[1],-1/0),u[0]=pe(u[0],1/0),u[1]=pe(u[1],1/0);var h=zv([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function Sv(r){return!isNaN(r)&&!isFinite(r)}function HA(r,t,e,i){var n=1-r;return Sv(t[n])&&Sv(e[n])}function att(r,t){var e=t.coord[0],i=t.coord[1],n={coord:e,x:t.x0,y:t.y0},a={coord:i,x:t.x1,y:t.y1};return Co(r,"cartesian2d")?e&&i&&(HA(1,e,i)||HA(0,e,i))?!0:XQ(r,n,a):nh(r,n)||nh(r,a)}function WA(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=U(o.get(e[0]),n.getWidth()),u=U(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var h=r.getValues(["x0","y0"],t),c=r.getValues(["x1","y1"],t),f=a.clampData(h),v=a.clampData(c),d=[];e[0]==="x0"?d[0]=f[0]>v[0]?c[0]:h[0]:d[0]=f[0]>v[0]?h[0]:c[0],e[1]==="y0"?d[1]=f[1]>v[1]?c[1]:h[1]:d[1]=f[1]>v[1]?h[1]:c[1],s=i.getMarkerPosition(d,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),y=[p,g];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(Co(a,"cartesian2d")){var m=a.getAxis("x"),_=a.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);Sv(p)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Sv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var UA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ott=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=nn.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=F(UA,function(c){return WA(s,l,c,a,n)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new at});this.group.add(h.group),this.markKeep(h);var c=stt(o,e,i);i.setData(c),c.each(function(f){var v=F(UA,function(T){return WA(c,f,T,e,a)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],_=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];fr(m),fr(_);var x=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!x;c.setItemLayout(f,{points:v,allClipped:b});var S=c.getItemModel(f).getModel("itemStyle").getItemStyle(),w=xh(l,"color");S.fill||(S.fill=w,Y(S.fill)&&(S.fill=Ru(S.fill,.4))),S.stroke||(S.stroke=w),c.setItemVisual(f,"style",S)}),c.diff(Uc(h).data).add(function(f){var v=c.getItemLayout(f);if(!v.allClipped){var d=new Ge({shape:{points:v.points}});c.setItemGraphicEl(f,d),h.group.add(d)}}).update(function(f,v){var d=Uc(h).data.getItemGraphicEl(v),p=c.getItemLayout(f);p.allClipped?d&&h.group.remove(d):(d?At(d,{shape:{points:p.points}},i,f):d=new Ge({shape:{points:p.points}}),c.setItemGraphicEl(f,d),h.group.add(d))}).remove(function(f){var v=Uc(h).data.getItemGraphicEl(f);h.group.remove(v)}).execute(),c.eachItemGraphicEl(function(f,v){var d=c.getItemModel(v),p=c.getItemVisual(v,"style");f.useStyle(c.getItemVisual(v,"style")),Ae(f,me(d),{labelFetcher:i,labelDataIndex:v,defaultText:c.getName(v)||"",inheritColor:Y(p.fill)?Ru(p.fill,1):"#000"}),Ce(f,d),Kt(f,null,null,d.get(["emphasis","disabled"])),ot(f).dataModel=i}),Uc(h).data=c,h.group.silent=i.get("silent")||e.get("silent")},t.type="markArea",t}(ib);function stt(r,t,e){var i,n,a=["x0","y0","x1","y1"];if(r){var o=F(r&&r.dimensions,function(u){var h=t.getData(),c=h.getDimensionInfo(h.mapDimension(u))||{};return z(z({},c),{name:u,ordinalMeta:null})});n=F(a,function(u,h){return{name:u,type:o[h%2].type}}),i=new Be(n,e)}else n=[{name:"value",type:"float"}],i=new Be(n,e);var s=F(e.get("data"),ut(ntt,t,r,e));r&&(s=Dt(s,ut(att,r)));var l=r?function(u,h,c,f){var v=u.coord[Math.floor(f/2)][f%2];return Fn(v,n[f])}:function(u,h,c,f){return Fn(u.value,n[f])};return i.initData(s,null,l),i.hasItemOption=!0,i}function ltt(r){r.registerComponentModel(itt),r.registerComponentView(ott),r.registerPreprocessor(function(t){eb(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var utt=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},f0=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),V(i)&&A(i,function(a,o){Y(a)&&(a={type:a}),i[o]=ht(a,utt(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(yt),jo=ut,v0=A,Yc=at,eO=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Yc),this.group.add(this._selectorGroup=new Yc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var h=e.getBoxLayoutParams(),c={width:n.getWidth(),height:n.getHeight()},f=e.get("padding"),v=ue(h,c,f),d=this.layoutInner(e,o,v,a,l,u),p=ue(tt({width:d.width,height:d.height},h),c,f);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=WE(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),h=Z(),c=i.get("selectedMode"),f=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&f.push(v.id)}),v0(i.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var g=new Yc;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(p)[0];if(!h.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),b=m.getVisual("style"),S=this._createItem(y,p,d,v,i,e,_,b,x,c,a);S.on("click",jo(YA,p,null,a,f)).on("mouseover",jo(d0,y.name,null,a,f)).on("mouseout",jo(p0,y.name,null,a,f)),n.ssr&&S.eachChild(function(w){var T=ot(w);T.seriesIndex=y.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),h.set(p,!0)}else n.eachRawSeries(function(w){if(!h.get(p)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(p))return;var M=T.indexOfName(p),C=T.getItemVisual(M,"style"),D=T.getItemVisual(M,"legendIcon"),L=Ze(C.fill);L&&L[3]===0&&(L[3]=.2,C=z(z({},C),{fill:Kr(L,"rgba")}));var I=this._createItem(w,p,d,v,i,e,{},C,D,c,a);I.on("click",jo(YA,null,p,a,f)).on("mouseover",jo(d0,null,p,a,f)).on("mouseout",jo(p0,null,p,a,f)),n.ssr&&I.eachChild(function(P){var k=ot(P);k.seriesIndex=w.seriesIndex,k.dataIndex=d,k.ssrType="legend"}),h.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();v0(e,function(u){var h=u.type,c=new St({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(c);var f=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);Ae(c,{normal:f,emphasis:v},{defaultText:u.title}),Bn(c)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,h,c,f){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");h=_||h||"roundRect";var x=htt(h,a,l,u,v,g,f),b=new Yc,S=a.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:h,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(ctt({itemWidth:d,itemHeight:p,icon:h,iconRotate:w,itemStyle:x.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,M=s,C=o.get("formatter"),D=i;Y(C)&&C?D=C.replace("{name}",i??""):Q(C)&&(D=C(i));var L=g?S.getTextColor():a.get("inactiveColor");b.add(new St({style:Gt(S,{text:D,x:T,y:p/2,fill:L,align:M,verticalAlign:"middle"},{inheritColor:L})}));var I=new wt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&So({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(k){k.silent=!0}),I.silent=!c,this.getContentGroup().add(b),Bn(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();io(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var h=l.getBoundingRect(),c=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){io("horizontal",u,e.get("selectorItemGap",!0));var f=u.getBoundingRect(),v=[-f.x,-f.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=h[g]+d:c[p]+=f[g]+d,v[1-p]+=h[y]/2-f[y]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=h[g]+d+f[g],_[y]=Math.max(h[y],f[y]),_[m]=Math.min(0,f[m]+v[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Yt);function htt(r,t,e,i,n,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),v0(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),h=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?i.decal:Ds(c,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[h]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var f=t.getModel("lineStyle"),v=f.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[h];u.lineWidth=d==="auto"?i.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=f.get("inactiveColor"),v.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function ctt(r){var t=r.icon||"roundRect",e=ae(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function YA(r,t,e,i){p0(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),d0(r,t,e,i)}function rO(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,n=t.length;in[o],g=[-v.x,-v.y];i||(g[a]=h[u]);var y=[0,0],m=[-d.x,-d.y],_=lt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var x=e.get("pageButtonPosition",!0);x==="end"?m[a]+=n[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,h.setPosition(g),c.setPosition(y),f.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-a]),c.__rectSize=n[o],p){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-_,0),S[s]=b[s],c.setClipPath(new wt({shape:S})),c.__rectSize=S[o]}else f.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&At(h,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(h){var c=h+"DataIndex",f=i[c]!=null,v=n.childOfName(h);v&&(v.setStyle("fill",f?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=f?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=ry[o],l=iy[o],u=this._findTargetItemIndex(i),h=n.children(),c=h[u],f=h.length,v=f?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=x(c);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=f;++g)_=x(h[g]),(!_&&m.e>y.s+a||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=x(h[g]),(!_||!b(m,_.s))&&y.i=w&&S.s<=w+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t}(eO);function gtt(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function ytt(r){pt(iO),r.registerComponentModel(dtt),r.registerComponentView(ptt),gtt(r)}function mtt(r){pt(iO),pt(ytt)}var _tt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=ea(rh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(rh),nb=Tt();function xtt(r,t,e){nb(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function btt(r,t){for(var e=nb(r).coordSysRecordMap,i=e.keys(),n=0;ni[e+t]&&(t=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ctt(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var i=nb(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=Z());n.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=FE(a);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,Stt(e,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=Z());h.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){nO(n,a);return}var h=Mtt(l);o.enable(h.controlType,h.opt),o.setPointerChecker(a.containsPoint),Zs(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Att=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),xtt(n,e,{pan:$(ny.pan,this),zoom:$(ny.zoom,this),scrollMove:$(ny.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){btt(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(jx),ny={zoom:function(r,t,e,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=ay[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Do(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:jA(function(r,t,e,i,n,a){var o=ay[i]([a.oldX,a.oldY],[a.newX,a.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:jA(function(r,t,e,i,n,a){var o=ay[i]([0,0],[a.scrollDelta,a.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function jA(r){return function(t,e,i,n){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,i,n);if(Do(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var ay={grid:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,i,n){var a=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function aO(r){qx(r),r.registerComponentModel(_tt),r.registerComponentView(Att),Ctt(r)}var Dtt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ea(rh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(rh),kl=wt,qA=7,Ltt=1,oy=30,Itt=7,Rl="horizontal",KA="vertical",Ptt=5,ktt=["line","bar","candlestick","scatter"],Rtt={easing:"cubicOut",duration:100,delay:0},Ett=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=$(this._onBrush,this),this._onBrushEnd=$(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),Zs(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Wu(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new at;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?Itt:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Rl?{right:s.width-o.x-o.width,top:s.height-oy-qA-a,width:o.width,height:oy}:{right:qA,top:o.y,width:oy,height:o.height},u=Us(e.option);A(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=ue(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===KA&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Rl&&!o?{scaleY:l?1:-1,scaleX:1}:n===Rl&&o?{scaleY:l?1:-1,scaleX:-1}:n===KA&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new kl({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new kl({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:$(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var c=o.getDataExtent(l),f=(c[1]-c[0])*.3;c=[c[0]-f,c[1]+f];var v=[0,i[1]],d=[0,i[0]],p=[[i[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/i[0]),x;o.each([l],function(M,C){if(_>0&&C%_){m+=y;return}var D=M==null||isNaN(M)||M==="",L=D?0:Pt(M,c,v,!0);D&&!x&&C?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&x&&(p.push([m,0]),g.push([m,0])),p.push([m,L]),g.push([m,L]),m+=y,x=D}),u=this._shadowPolygonPts=p,h=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var b=this.dataZoomModel;function S(M){var C=b.getModel(M?"selectedDataBackground":"dataBackground"),D=new at,L=new Ge({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new We({shape:{points:h},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(I),D}for(var w=0;w<3;w++){var T=S(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(i!==!0&&vt(ktt,u.get("type"))<0)){var h=a.getComponent(Rn(o),s).axis,c=Ott(o),f,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(f=v.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),n={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:f}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),f=i.filler=new kl({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new kl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Ltt,fill:"rgba(0,0,0,0)"}})),A([0,1],function(_){var x=l.get("handleIcon");!Kf[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=ae(x,-1,0,2,2,null,!0);b.attr({cursor:JA(this._orient),draggable:!0,drift:$(this._onDragMove,this,_),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=U(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Bn(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var M=l.getModel("textStyle"),C=l.get("handleLabel")||{},D=C.show||!1;e.add(a[_]=new St({silent:!0,invisible:!D,style:Gt(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=f;if(c){var d=U(l.get("moveHandleSize"),s[1]),p=i.moveHandle=new wt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=i.moveHandleIcon=ae(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=i.moveZone=new wt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:JA(this._orient),drift:$(this._onDragMove,this,"all"),ondragstart:$(this._showDataInfo,this,!0),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[Pt(e[0],[0,100],i,!0),Pt(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Do(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Pt(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=fr([Pt(a[0],o,l,!0),Pt(a[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=fr(n.slice()),o=this._size;A([0,1],function(v){var d=i.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],h=0;hi[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new ct(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=fr([Pt(n.x,o,s,!0),Pt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(qi(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new kl({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),h=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Rtt:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=FE(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(jx);function Ott(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function JA(r){return r==="vertical"?"ns-resize":"ew-resize"}function oO(r){r.registerComponentModel(Dtt),r.registerComponentView(Ett),qx(r)}function Ntt(r){pt(aO),pt(oO)}var sO={get:function(r,t,e){var i=it((Btt[r]||{})[t]);return e&&V(i)?i[i.length-1]:i}},Btt={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},QA=ye.mapVisual,ztt=ye.eachVisual,Vtt=V,tD=A,Ftt=fr,Gtt=Pt,wv=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,i){var n=this.option;!i&&qE(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=$(e,this),this.controllerVisuals=u0(this.option.controller,i,e),this.targetVisuals=u0(this.option.target,i,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,i=[];return e==null||e==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=Bt(e),i},t.prototype.eachTargetSeries=function(e,i){A(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&e.call(i,a)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(n){n===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],V(e)&&(e=e.slice(),u=!0);var h=i?e:u?[c(e[0]),c(e[1])]:c(e);if(Y(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+h[1]:e[1]===s[1]?n[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,i=Ftt([e.min,e.max]);this._dataExtent=i},t.prototype.getDataDimensionIndex=function(e){var i=this.option.dimension;if(i!=null)return e.getDimensionIndex(i);for(var n=e.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});ht(a,n),ht(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),h.call(this,o);function l(c){Vtt(i.color)&&!c.inRange&&(c.inRange={color:i.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,f,v){var d=c[f],p=c[v];d&&!p&&(p=c[v]={},tD(d,function(g,y){if(ye.isValidType(y)){var m=sO.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function h(c){var f=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";tD(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=f&&it(f)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&it(v)||(s?m[0]:[m[0],m[0]])),_.symbol=QA(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var b=-1/0;ztt(x,function(S){S>b&&(b=S)}),_.symbolSize=QA(x,function(S){return Gtt(S,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(yt),eD=[20,140],Htt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=eD[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=eD[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):V(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],e[0]),i[1]=Math.min(i[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var i=this.option.controller[e].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),i=fr((this.get("range")||[]).slice());return i[0]>e[1]&&(i[0]=e[1]),i[1]>e[1]&&(i[1]=e[1]),i[0]=n[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},t.prototype.getVisualMeta=function(e){var i=rD(this,"outOfRange",this.getExtent()),n=rD(this,"inRange",this.option.range.slice()),a=[];function o(v,d){a.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,h=i.length;le[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),a},t.prototype._createBarPoints=function(e,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,n=this.visualMapModel.get("inverse");return new at(i==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent(),h=this._applyTransform("left",n.mainGroup);Wtt([0,1],function(c){var f=o[c];f.setStyle("fill",i.handlesColor[c]),f.y=e[c];var v=ci(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Jr(n.handleLabelPoints[c],zn(f,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,n,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var f={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",f),d=this.getControllerVisual(e,"symbolSize"),p=ci(e,s,u,!0),g=l[0]-d/2,y={x:c.x,y:c.y};c.y=p,c.x=g;var m=Jr(h.indicatorLabelPoint,zn(c,this.group)),_=h.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",h.mainGroup),b=this._orient,S=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:S?x:"middle",align:S?"center":x});var w={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,M),_.animateTo(T,M)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var D=0;Do[1]&&(c[1]=1/0),i&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var f=this._hoverLinkDataIndices,v=[];(i||oD(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=VG(f,v);this._dispatchHighDown("downplay",xf(d[0],n)),this._dispatchHighDown("highlight",xf(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(Za(e.target,function(l){var u=ot(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n=0&&(a.dimension=o,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function Ktt(r,t,e,i){for(var n=t.targetVisuals[i],a=ye.prepareVisualTypes(n),o={color:xh(r.getData(),"color")},s=0,l=a.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(Ztt,jtt),A(qtt,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(Jtt))}function cO(r){r.registerComponentModel(Htt),r.registerComponentView($tt),hO(r)}var Qtt=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],tet[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=it(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=F(this._pieceList,function(l){return l=it(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},n=ye.listVisualTypes(),a=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),A(i,function(s,l){var u=!1;A(this.stateList,function(h){u=u||o(e,h,l)||o(e.target,h,l)},this),!u&&A(this.stateList,function(h){(e[h]||(e[h]={}))[l]=sO.get(l,h==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var n=this.option,a=this._pieceList,o=(i?n:e).selected||{};if(n.selected=o,A(a,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),n.selectedMode==="single"){var s=!1;A(a,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=it(e)},t.prototype.getValueState=function(e){var i=ye.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=ye.findPieceIndex(l,n);h===e&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},t.prototype.getRepresentValue=function(e){var i;if(this.isCategory())i=e.value;else if(e.value!=null)i=e.value;else{var n=e.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(h,c){var f=a.getRepresentValue({interval:h});c||(c=a.getValueState(f));var v=e(f,c);h[0]===-1/0?n[0]=v:h[1]===1/0?n[1]=v:i.push({value:h[0],color:v},{value:h[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:i,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=ea(wv.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(wv),tet={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(e)!==a&&e<5;)e++;t.precision=e,a=+a.toFixed(e),t.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","≥"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function hD(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var eet=function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,h=this._getViewData(),c=h.endsText,f=pe(i.get("showLabel",!0),!c),v=!i.get("selectedMode");c&&this._renderEndsText(e,c[0],u,f,l),A(h.viewPieceList,function(d){var p=d.piece,g=new at;g.onclick=$(this._onItemClick,this,p),this._enableHoverLink(g,d.indexInModelPieceList);var y=i.getRepresentValue(p);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],v),f){var m=this.visualMapModel.getValueState(y);g.add(new St({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:v}))}e.add(g)},this),c&&this._renderEndsText(e,c[1],u,f,l),io(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var n=this;e.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:xf(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return uO(e,this.api,e.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,i,n,a,o){if(i){var s=new at,l=this.visualMapModel.textStyleModel;s.add(new St({style:Gt(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=F(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),a=e.get("orient"),o=e.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},t.prototype._createItemSymbol=function(e,i,n,a){var o=ae(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color"));o.silent=a,e.add(o)},t.prototype._onItemClick=function(e){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=it(n.selected),s=i.getSelectedMapKey(e);a==="single"||a===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(lO);function fO(r){r.registerComponentModel(Qtt),r.registerComponentView(eet),hO(r)}function ret(r){pt(cO),pt(fO)}var iet={label:{enabled:!0},decal:{show:!1}},cD=Tt(),net={};function aet(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var i=it(iet);ht(i.label,r.getLocaleModel().get("aria"),!1),ht(e.option,i,!1),n(),a();function n(){var u=e.getModel("decal"),h=u.get("show");if(h){var c=Z();r.eachSeries(function(f){if(!f.isColorBySeries()){var v=c.get(f.type);v||(v={},c.set(f.type,v)),cD(f).scope=v}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(Q(f.enableAriaDecal)){f.enableAriaDecal();return}var v=f.getData();if(f.isColorBySeries()){var m=dm(f.ecModel,f.name,net,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",x(_,m))}else{var d=f.getRawData(),p={},g=cD(f).scope;v.each(function(b){var S=v.getRawIndex(b);p[S]=b});var y=d.count();d.each(function(b){var S=p[b],w=d.getName(b)||b+"",T=dm(f.ecModel,w,g,y),M=v.getItemVisual(S,"decal");v.setItemVisual(S,"decal",x(M,T))})}function x(b,S){var w=b?z(z({},S),b):S;return w.dirty=!0,w}})}}function a(){var u=t.getZr().dom;if(u){var h=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=tt(c.option,h),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var f=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(f,d),g;if(!(f<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],x=f>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:f}),r.eachSeries(function(T,M){if(M1?c.get(["series","multiple",L]):c.get(["series","single",L]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=c.get(["data","partialData"]);C+=o(P,{displayCnt:v})}else C+=c.get(["data","allData"]);for(var k=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),N=c.get(["data","excludeDimensionId"]),O=[],B=0;B":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},uet=function(){function r(t){var e=this._condVal=Y(t)?new RegExp(t):BL(t)?t:null;if(e==null){var i="";kt(i)}}return r.prototype.evaluate=function(t){var e=typeof t;return Y(e)?this._condVal.test(t):Mt(e)?this._condVal.test(t+""):!1},r}(),het=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),cet=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&i.push(n),n=[I,P]}function h(I,P,k,R){ls(I,k)&&ls(P,R)||n.push(I,P,k,R,k,R)}function c(I,P,k,R,N,O){var B=Math.abs(P-I),G=Math.tan(B/4)*4/3,H=PT:D2&&i.push(n),i}function y0(r,t,e,i,n,a,o,s,l,u){if(ls(r,e)&&ls(t,i)&&ls(n,o)&&ls(a,s)){l.push(o,s);return}var h=2/u,c=h*h,f=o-r,v=s-t,d=Math.sqrt(f*f+v*v);f/=d,v/=d;var p=e-r,g=i-t,y=n-o,m=a-s,_=p*p+g*g,x=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var M=[],C=[];$n(r,e,n,o,.5,M),$n(t,i,a,s,.5,C),y0(M[0],C[0],M[1],C[1],M[2],C[2],M[3],C[3],l,u),y0(M[4],C[4],M[5],C[5],M[6],C[6],M[7],C[7],l,u)}function Cet(r,t){var e=g0(r),i=[];t=t||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=dO([l,u],h?0:1,t),f=(h?s:u)/c.length,v=0;vn,o=dO([i,n],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",h=a?"y":"x",c=r[s]/o.length,f=0;f1?null:new ct(p*l+r,p*u+t)}function Let(r,t,e){var i=new ct;ct.sub(i,e,t),i.normalize();var n=new ct;ct.sub(n,r,t);var a=n.dot(i);return a}function Ko(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Iet(r,t,e){for(var i=r.length,n=[],a=0;ao?(u.x=h.x=s+a/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+a),Iet(t,u,h)}function Tv(r,t,e,i){if(e===1)i.push(t);else{var n=Math.floor(e/2),a=r(t);Tv(r,a[0],n,i),Tv(r,a[1],e-n,i)}return i}function Pet(r,t){for(var e=[],i=0;i0;u/=2){var h=0,c=0;(r&u)>0&&(h=1),(t&u)>0&&(c=1),s+=u*u*(3*h^c),c===0&&(h===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Av(r){var t=1/0,e=1/0,i=-1/0,n=-1/0,a=F(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(h,t),e=Math.min(c,e),i=Math.max(h,i),n=Math.max(c,n),[h,c]}),o=F(a,function(s,l){return{cp:s,z:Fet(s[0],s[1],t,e,i,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function yO(r){return Eet(r.path,r.count)}function m0(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Get(r,t,e){var i=[];function n(b){for(var S=0;S=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var a=l.length,u=Math.ceil(a/2);e[n].many=l.slice(u,a),e[s].many=l.slice(0,u),s++}return e}var Wet={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;xD(r)&&(u=r,h=t),xD(t)&&(u=t,h=r);function c(y,m,_,x,b){var S=y.many,w=y.one;if(S.length===1&&!b){var T=m?S[0]:w,M=m?w:S[0];if(Mv(T))c({many:[T],one:M},!0,_,x,!0);else{var C=s?tt({delay:s(_,x)},l):l;ob(T,M,C),a(T,M,T,M,C)}}else for(var D=tt({dividePath:Wet[e],individualDelay:s&&function(N,O,B,G){return s(N+_,x)}},l),L=m?Get(S,w,D):Het(w,S,D),I=L.fromIndividuals,P=L.toIndividuals,k=I.length,R=0;Rt.length,v=u?bD(h,u):bD(f?t:r,[f?r:t]),d=0,p=0;pmO))for(var a=i.getIndices(),o=0;o0&&S.group.traverse(function(T){T instanceof _t&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function CD(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function AD(r){return V(r)?r.sort().join(","):r}function xn(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function qet(r,t){var e=Z(),i=Z(),n=Z();return A(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=CD(a),h=AD(u);i.set(h,{dataGroupId:s,data:l}),V(u)&&A(u,function(c){n.set(c,{key:h,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=CD(a),u=AD(l),h=i.get(u);if(h)e.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:xn(h.data),data:h.data}],newSeries:[{dataGroupId:o,divide:xn(s),data:s}]});else if(V(l)){var c=[];A(l,function(d){var p=i.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:xn(p.data),data:p.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:xn(s)}]})}else{var f=n.get(l);if(f){var v=e.get(f.key);v||(v={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:xn(f.data)}],newSeries:[]},e.set(f.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:xn(s)})}}}}),e}function DD(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:xn(t.oldData[s]),groupIdDim:o.dimension})}),A(Bt(r.to),function(o){var s=DD(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:xn(l),groupIdDim:o.dimension})}}),n.length>0&&a.length>0&&_O(n,a,i)}function Jet(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){A(Bt(i.seriesTransition),function(n){A(Bt(n.to),function(a){for(var o=i.updatedSeries,s=0;s1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u