import{_ as R}from"./tslib.60310f1a.js";import{i as $,r as rn,m as G,c as Z,e as w,a as j,b as ye,d as gt,f as ic,g as O,h as ct,j as kt,k as fb,l as B,n as X,L as Lm,o as pn,p as Wt,P as It,q as oc,s as hb,t as St,u as pb,T as qa,v as zi,w as Le,x as J,Z as ke,y as U,z as db,A as gb,B as yb,C as mb,D as pv,E as is,F as ur,G as Pm,S as Pe,R as Hs,H as Ee,I as me,J as ht,K as te,M as Ws,N as dv,O as Sb,Q as tt,U as ut,V as xb,W as Em,X as $s,Y as _b,_ as wt,$ as os,a0 as Gt,a1 as Gi,a2 as ot,a3 as K,a4 as jt,a5 as Rm,a6 as ge,a7 as Q,a8 as Re,a9 as bt,aa as W,ab as ss,ac as ls,ad as he,ae as sc,af as bb,ag as us,ah as wb,ai as dn,aj as ah,ak as xl,al as Ab,am as an,an as cs,ao as Tb,ap as aa,aq as km,ar as Nm,as as Us,at as Om,au as oa,av as _l,aw as Cb,ax as Db,ay as sa,az as nh,aA as ih,aB as Mb,aC as gn,aD as Jt,aE as Fi,aF as Ib,aG as oh,aH as Nr,aI as Lb,aJ as Pb,aK as Eb,aL as Sa,aM as Rb,aN as yn,aO as ce,aP as gv,aQ as Vm,aR as xa,aS as kb,aT as bl,aU as Yo,aV as Bm,aW as si,aX as vs,aY as Pr,aZ as Hi,a_ as Nb,a$ as Ob,b0 as ja,b1 as sh,b2 as Vb,b3 as lc,b4 as Bb,b5 as zm,b6 as zb,b7 as Gb,b8 as Fb,b9 as Hb,ba as lh,bb as Wb,bc as mi,bd as $b,be as Gm,bf as uh,bg as Ub,bh as Yb,bi as Zb,bj as Xb,bk as Kb,bl as qb,bm as jb,bn as Jb,bo as Qb,bp as tw}from"./zrender.2cb48b70.js";var ch=1e-4,Fm=20;function ew(r){return r.replace(/^\s+|\s+$/g,"")}function mt(r,e,t,a){var n=e[0],i=e[1],o=t[0],s=t[1],l=i-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}function F(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return $(r)?ew(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Vt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Fm),r=(+r).toFixed(e),t?r:+r}function Me(r){return r.sort(function(e,t){return e-t}),r}function Ke(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return rw(r)}function rw(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function Hm(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function aw(r,e){var t=rn(r,function(h,p){return h+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=G(r,function(h){return(isNaN(h)?0:h)/t*a*100}),i=a*100,o=G(n,function(h){return Math.floor(h)}),s=rn(o,function(h,p){return h+p},0),l=G(n,function(h,p){return h-o[p]});su&&(u=l[v],c=v);++o[c],l[c]=0,++s}return G(o,function(h){return h/a})}function nw(r,e){var t=Math.max(Ke(r),Ke(e)),a=r+e;return t>Fm?a:Vt(a,t)}var vh=9007199254740991;function Wm(r){var e=Math.PI*2;return(r%e+e)%e}function fs(r){return r>-ch&&r=10&&e++,e}function $m(r,e){var t=yv(r),a=Math.pow(10,t),n=r/a,i;return e?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,t>=-20?+r.toFixed(t<0?-t:0):r}function wl(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function fh(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||i&&ct(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var Lw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Pw=wa(Lw),Ew=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Pw(this,e,t)},r}(),q=st(),cc=function(r,e,t,a){if(a){var n=q(a);n.dataIndex=t,n.dataType=e,n.seriesIndex=r,a.type==="group"&&a.traverse(function(i){var o=q(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e})}},gh=1,yh={},r0=st(),_v=st(),bv=0,$i=1,Zs=2,pe=["emphasis","blur","select"],xi=["normal","emphasis","blur","select"],Sn=10,Rw=9,fa="highlight",Zo="downplay",ci="select",Xo="unselect",vi="toggleSelect";function ka(r){return r!=null&&r!=="none"}var mh=new Lm(100);function Sh(r){if($(r)){var e=mh.get(r);return e||(e=oc(r,-.1),mh.put(r,e)),e}else if(hb(r)){var t=B({},r);return t.colorStops=G(r.colorStops,function(a){return{offset:a.offset,color:oc(a.color,-.1)}}),t}return r}function Xs(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function a0(r){Xs(r,"emphasis",Zs)}function n0(r){r.hoverState===Zs&&Xs(r,"normal",bv)}function wv(r){Xs(r,"blur",$i)}function i0(r){r.hoverState===$i&&Xs(r,"normal",bv)}function kw(r){r.selected=!0}function Nw(r){r.selected=!1}function xh(r,e,t){e(r,t)}function gr(r,e,t){xh(r,e,t),r.isGroup&&r.traverse(function(a){xh(a,e,t)})}function hs(r,e){switch(e){case"emphasis":r.hoverState=Zs;break;case"normal":r.hoverState=bv;break;case"blur":r.hoverState=$i;break;case"select":r.selected=!0}}function Ow(r,e,t,a){for(var n=r.style,i={},o=0;o=0,i=!1;if(r instanceof It){var o=r0(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ka(s)||ka(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=B({},a),u=B({},u),u.fill=s):!ka(u.fill)&&ka(s)?(i=!0,a=B({},a),u=B({},u),u.fill=Sh(s)):!ka(u.stroke)&&ka(l)&&(i||(a=B({},a),u=B({},u)),u.stroke=Sh(l)),a.style=u}}if(a&&a.z2==null){i||(a=B({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c!=null?c:Sn)}return a}function Bw(r,e,t){if(t&&t.z2==null){t=B({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:Rw)}return t}function zw(r,e,t){var a=ct(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:Ow(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=B({},t),o=B({opacity:a?n:i.opacity*.1},o),t.style=o),t}function Al(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return Vw(this,r,e,t);if(r==="blur")return zw(this,r,t);if(r==="select")return Bw(this,r,t)}return t}function Aa(r){r.stateProxy=Al;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Al),t&&(t.stateProxy=Al)}function _h(r,e){!u0(r,e)&&!r.__highByOuter&&gr(r,a0)}function bh(r,e){!u0(r,e)&&!r.__highByOuter&&gr(r,n0)}function vr(r,e){r.__highByOuter|=1<<(e||0),gr(r,a0)}function fr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&gr(r,n0)}function o0(r){gr(r,wv)}function Av(r){gr(r,i0)}function s0(r){gr(r,kw)}function l0(r){gr(r,Nw)}function u0(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function c0(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=_v(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){i0(u)}),s&&t.push(i)),o.isBlured=!1}),w(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function vc(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,c){for(var v=0;v0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function ha(r,e,t){la(r,!0),gr(r,Aa),hc(r,e,t)}function Uw(r){la(r,!1)}function Nt(r,e,t,a){a?Uw(r):ha(r,e,t)}function hc(r,e,t){var a=q(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var Ah=["emphasis","blur","select"],Yw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function re(r,e,t,a){t=t||"itemStyle";for(var n=0;n0){var v=c.duration,f=c.delay,h=c.easing,p={duration:v,delay:f||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function ft(r,e,t,a,n,i){Cv("update",r,e,t,a,n,i)}function Lt(r,e,t,a,n,i){Cv("enter",r,e,t,a,n,i)}function Ja(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Dh(r){return!r.isGroup}function eA(r){return r.shape!=null}function Ui(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){Dh(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return eA(o)&&(s.shape=B({},o.shape)),s}var i=a(r);e.traverse(function(o){if(Dh(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),ft(o,l,t,q(o).dataIndex)}}})}function d0(r,e){return G(r,function(t){var a=t[0];a=ps(a,e.x),a=ds(a,e.x+e.width);var n=t[1];return n=ps(n,e.y),n=ds(n,e.y+e.height),[a,n]})}function rA(r,e){var t=ps(r.x,e.x),a=ds(r.x+r.width,e.x+e.width),n=ps(r.y,e.y),i=ds(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function Yi(r,e,t){var a=B({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),J(n,t),new ke(a)):Ks(r.replace("path://",""),a,t,"center")}function ti(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=Tl(h,p,c,v)/f;return!(g<0||g>1)}function Tl(r,e,t,a){return r*a-t*e}function aA(r){return r<=1e-6&&r>=-1e-6}function _n(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=$(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&w(Wt(l),function(c){U(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=q(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:J({content:a,formatterParams:s},n)}}function Mh(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Wr(r,e){if(r)if(O(r))for(var t=0;t=0&&s.push(l)}),s}}function $r(r,e){return ot(ot({},r,!0),e,!0)}const gA={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"}},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:". "}}}},yA={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var ys="ZH",Mv="EN",wi=Mv,qo={},Iv={},w0=kt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(ys)>-1?ys:wi}():wi;function A0(r,e){r=r.toUpperCase(),Iv[r]=new Dt(e),qo[r]=e}function mA(r){if($(r)){var e=qo[r.toUpperCase()]||{};return r===ys||r===Mv?K(e):ot(K(e),K(qo[wi]),!1)}else return ot(K(r),K(qo[wi]),!1)}function yc(r){return Iv[r]}function SA(){return Iv[wi]}A0(Mv,gA);A0(ys,yA);var Lv=1e3,Pv=Lv*60,fi=Pv*60,De=fi*24,Rh=De*365,ei={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}"},lo="{yyyy}-{MM}-{dd}",kh={year:"{yyyy}",month:"{yyyy}-{MM}",day:lo,hour:lo+" "+ei.hour,minute:lo+" "+ei.minute,second:lo+" "+ei.second,millisecond:ei.none},Ml=["year","month","day","hour","minute","second","millisecond"],T0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sr(r,e){return r+="","0000".substr(0,e-r.length)+r}function Qa(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 xA(r){return r===Qa(r)}function _A(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Js(r,e,t,a){var n=tr(r),i=n[Ev(t)](),o=n[tn(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[Qs(t)](),u=n["get"+(t?"UTC":"")+"Day"](),c=n[Ai(t)](),v=(c-1)%12+1,f=n[tl(t)](),h=n[el(t)](),p=n[rl(t)](),d=a instanceof Dt?a:yc(a||w0)||SA(),g=d.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),S=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Sr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,Sr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Sr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Sr(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,Sr(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Sr(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Sr(p,3)).replace(/{S}/g,p+"")}function bA(r,e,t,a,n){var i=null;if($(t))i=t;else if(X(t))i=t(r.value,e,{level:r.level});else{var o=B({},ei);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(O(i)){var v=r.level==null?0:r.level>=0?r.level:i.length+r.level;v=Math.min(v,i.length-1),i=i[v]}}return Js(new Date(r.value),i,n,a)}function C0(r,e){var t=tr(r),a=t[tn(e)]()+1,n=t[Qs(e)](),i=t[Ai(e)](),o=t[tl(e)](),s=t[el(e)](),l=t[rl(e)](),u=l===0,c=u&&s===0,v=c&&o===0,f=v&&i===0,h=f&&n===1,p=h&&a===1;return p?"year":h?"month":f?"day":v?"hour":c?"minute":u?"second":"millisecond"}function Nh(r,e,t){var a=gt(r)?tr(r):r;switch(e=e||C0(r,t),e){case"year":return a[Ev(t)]();case"half-year":return a[tn(t)]()>=6?1:0;case"quarter":return Math.floor((a[tn(t)]()+1)/4);case"month":return a[tn(t)]();case"day":return a[Qs(t)]();case"half-day":return a[Ai(t)]()/24;case"hour":return a[Ai(t)]();case"minute":return a[tl(t)]();case"second":return a[el(t)]();case"millisecond":return a[rl(t)]()}}function Ev(r){return r?"getUTCFullYear":"getFullYear"}function tn(r){return r?"getUTCMonth":"getMonth"}function Qs(r){return r?"getUTCDate":"getDate"}function Ai(r){return r?"getUTCHours":"getHours"}function tl(r){return r?"getUTCMinutes":"getMinutes"}function el(r){return r?"getUTCSeconds":"getSeconds"}function rl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function wA(r){return r?"setUTCFullYear":"setFullYear"}function D0(r){return r?"setUTCMonth":"setMonth"}function M0(r){return r?"setUTCDate":"setDate"}function I0(r){return r?"setUTCHours":"setHours"}function L0(r){return r?"setUTCMinutes":"setMinutes"}function P0(r){return r?"setUTCSeconds":"setSeconds"}function E0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function R0(r){if(!Um(r))return $(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function k0(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var An=Rm;function mc(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&Gi(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?tr(r):r;if(isNaN(+l)){if(s)return"-"}else return Js(l,a,t)}if(e==="ordinal")return ic(r)?n(r):gt(r)&&i(r)?r+"":"-";var u=cr(r);return i(u)?R0(u):ic(r)?n(r):typeof r=="boolean"?r+"":"-"}var Oh=["a","b","c","d","e","f","g"],Il=function(r,e){return"{"+r+(e==null?"":e)+"}"};function N0(r,e,t){O(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Ta(r,e){return e=e||"transparent",$(r)?r:j(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function ms(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var jo=w,O0=["left","right","top","bottom","width","height"],ua=[["width","left","right"],["height","top","bottom"]];function Rv(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),v=e.childAt(u+1),f=v&&v.getBoundingRect(),h,p;if(r==="horizontal"){var d=c.width+(f?-f.x+c.x:0);h=i+d,h>a||l.newline?(i=0,h=d,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(f?-f.y+c.y:0);p=o+g,p>n||l.newline?(i+=s+t,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+t:o=p+t)})}var da=Rv;Q(Rv,"vertical");Q(Rv,"horizontal");function CA(r,e,t){var a=e.width,n=e.height,i=F(r.left,a),o=F(r.top,n),s=F(r.right,a),l=F(r.bottom,n);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=An(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Yt(r,e,t){t=An(t||0);var a=e.width,n=e.height,i=F(r.left,a),o=F(r.top,n),s=F(r.right,a),l=F(r.bottom,n),u=F(r.width,a),c=F(r.height,n),v=t[2]+t[0],f=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-f-i),isNaN(c)&&(c=n-l-v-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>a/n?u=a*.8:c=n*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=a-s-u-f),isNaN(o)&&(o=n-l-c-v),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-t[0];break;case"bottom":o=n-c-v;break}i=i||0,o=o||0,isNaN(u)&&(u=a-f-i-(s||0)),isNaN(c)&&(c=n-v-o-(l||0));var p=new wt(i+t[3],o+t[0],u,c);return p.margin=t,p}function al(r,e,t,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new wt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var v=Yt(J({width:u.width,height:u.height},e),t,a),f=o?v.x-u.x:0,h=s?v.y-u.y:0;return l==="raw"?(i.x=f,i.y=h):(i.x+=f,i.y+=h),i===r&&r.markRedraw(),!0}function DA(r,e){return r[ua[e][0]]!=null||r[ua[e][1]]!=null&&r[ua[e][2]]!=null}function Ti(r){var e=r.layoutMode||r.constructor.layoutMode;return j(e)?e:e?{type:e}:null}function Vr(r,e,t){var a=t&&t.ignoreSize;!O(a)&&(a=[a,a]);var n=o(ua[0],0),i=o(ua[1],1);u(ua[0],r,n),u(ua[1],r,i);function o(c,v){var f={},h=0,p={},d=0,g=2;if(jo(c,function(S){p[S]=r[S]}),jo(c,function(S){s(e,S)&&(f[S]=p[S]=e[S]),l(f,S)&&h++,l(p,S)&&d++}),a[v])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(d===g||!h)return p;if(h>=g)return f;for(var y=0;y=0;l--)s=ot(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return Wi(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Dt);e0(Cn,Dt);Ys(Cn);pA(Cn);dA(Cn,IA);function IA(r){var e=[];return w(Cn.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return qe(t).main}),r!=="dataset"&&ct(e,"dataset")<=0&&e.unshift("dataset"),e}const lt=Cn;var B0="";typeof navigator<"u"&&(B0=navigator.platform||"");var Na="rgba(0, 0, 0, 0.2)";const LA={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Na,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Na,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Na,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Na,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Na,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Na,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:B0.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 z0=Z(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Ne="original",se="arrayRows",Oe="objectRows",er="keyedColumns",Er="typedArray",G0="unknown",Qe="column",Dn="row",Qt={Must:1,Might:2,Not:3},F0=st();function PA(r){F0(r).datasetMap=Z()}function H0(r,e,t){var a={},n=Nv(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=F0(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,c,v;r=r.slice(),w(r,function(d,g){var y=j(d)?d:r[g]={name:d};y.type==="ordinal"&&c==null&&(c=g,v=p(y)),a[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:v,valueWayDim:0});w(r,function(d,g){var y=d.name,m=p(d);if(c==null){var S=f.valueWayDim;h(a[y],S,m),h(o,S,m),f.valueWayDim+=m}else if(c===g)h(a[y],0,m),h(i,0,m);else{var S=f.categoryWayDim;h(a[y],S,m),h(o,S,m),f.categoryWayDim+=m}});function h(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function U0(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!a?t:OA(a,o);if(c=c||t,!(!c||!c.length)){var v=c[l];return n&&(u[n]=v),s.paletteIdx=(l+1)%c.length,v}}function VA(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var uo,Rn,Bh,zh="\0_ec_inner",BA=1,Y0=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Dt(i),this._locale=new Dt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=Hh(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,Hh(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?Bh(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&w(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=Z(),u=a&&a.replaceMergeMainTypeMap;PA(this),w(t,function(v,f){v!=null&&(lt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):n[f]=n[f]==null?K(v):ot(n[f],v,!0))}),u&&u.each(function(v,f){lt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),lt.topologicalTravel(s,lt.getAllClassMainTypes(),c,this);function c(v){var f=kA(this,v,_t(t[v])),h=i.get(v),p=h?u&&u.get(v)?"replaceMerge":"normalMerge":"replaceAll",d=qm(h,f,p);dw(d,v,lt),n[v]=null,i.set(v,null),o.set(v,0);var g=[],y=[],m=0,S;w(d,function(x,b){var _=x.existing,A=x.newOption;if(!A)_&&(_.mergeOption({},this),_.optionUpdated({},!1));else{var T=v==="series",C=lt.getClass(v,x.keyInfo.subType,!T);if(!C)return;if(v==="tooltip"){if(S)return;S=!0}if(_&&_.constructor===C)_.name=x.keyInfo.name,_.mergeOption(A,this),_.optionUpdated(A,!1);else{var M=B({componentIndex:b},x.keyInfo);_=new C(A,this,this,M),B(_,M),x.brandNew&&(_.__requireNewView=!0),_.init(A,this,this),_.optionUpdated(null,!0)}}_?(g.push(_.option),y.push(_),m++):(g.push(void 0),y.push(void 0))},this),n[v]=g,i.set(v,y),o.set(v,m),v==="series"&&uo(this)}this._seriesIndices||uo(this)},e.prototype.getOption=function(){var t=K(this.option);return w(t,function(a,n){if(lt.hasClass(n)){for(var i=_t(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Si(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[zh],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function KA(r,e){return r.join(",")===e.join(",")}const qA=UA;var Ve=w,Ci=j,Wh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Pl(r){var e=r&&r.itemStyle;if(!!e)for(var t=0,a=Wh.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,h)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&f>=0&&m>0||l==="samesign"&&f<=0&&m<0){f=nw(f,m),d=m;break}}}return a[0]=f,a[1]=d,a})})}var nl=function(){function r(e){this.data=e.data||(e.sourceFormat===er?{}:[]),this.sourceFormat=e.sourceFormat||G0,this.seriesLayoutBy=e.seriesLayoutBy||Qe,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=S)}h[0]=p,h[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};qh=(e={},e[se+"_"+Qe]={pure:!0,appendData:i},e[se+"_"+Dn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Oe]={pure:!0,appendData:i},e[er]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var c=s[u]||(s[u]=[]),v=0;v<(l||[]).length;v++)c.push(l[v])})}},e[Ne]={appendData:i},e[Er]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return on(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function tp(r){var e,t;return j(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function hi(r){return new hT(r)}var hT=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(m){return!(m>=1)&&(m=1),m}var v;(this._dirty||i==="reset")&&(this._dirty=!1,v=this._doReset(a)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!a&&(v||h1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},dT=function(){function r(e,t){if(!gt(t)){var a="";dt(a)}this._opFn=nS[e],this._rvalFloat=cr(t)}return r.prototype.evaluate=function(e){return gt(e)?this._opFn(e,this._rvalFloat):this._opFn(cr(e),this._rvalFloat)},r}(),iS=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=gt(e)?e:cr(e),n=gt(t)?t:cr(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=$(e),l=$(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),gT=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=cr(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=cr(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function yT(r,e){return r==="eq"||r==="ne"?new gT(r==="eq",e):U(nS,r)?new dT(r,e):null}var mT=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Rr(e,t)},r}();function ST(r,e){var t=new mT,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Qe&&dt(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var S="";U(l,y)&&dt(S),l[y]=m}});else for(var c=0;c65535?DT:MT}function Oa(){return[1/0,-1/0]}function IT(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function ap(r,e,t,a,n){var i=lS[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),c=0;cy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,a){var n=this._chunks,i=n[e],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,c=0,v=this.count();c=0&&l<0)&&(s=p,l=h,u=0),h===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i=v&&m<=f||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=h[n[0]],S=h[n[1]],x=e[n[1]][0],b=e[n[1]][1],y=0;y=v&&m<=f||isNaN(m))&&(_>=x&&_<=b||isNaN(_))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=v&&m<=f||isNaN(m))&&(l[u++]=A)}else for(var y=0;ye[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,v,f,h=new(Nn(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;pc&&(c=v,f=x)}D>0&&Dc-p&&(l=c-p,s.length=l);for(var d=0;dv[1]&&(v[1]=y),f[h++]=m}return i._count=h,i._indices=f,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(!!this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=v)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],n=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,n,i){return Rr(t[i],this._dimensions[i])}kl={arrayRows:e,objectRows:function(t,a,n,i){return Rr(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return Rr(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),uS=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,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 e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,n,i;if(co(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=Re(s)?Er:Ne,i=[];var v=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},h=St(v.seriesLayoutBy,f.seriesLayoutBy)||null,p=St(v.sourceHeader,f.sourceHeader),d=St(v.dimensions,f.dimensions),g=h!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||d;n=g?[_c(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var S=y.get("source",!0);n=[_c(S,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&ip(i)}var o,s=[],l=[];return w(e,function(u){u.prepareSource();var c=u.getSource(n||0),v="";n!=null&&!c&&ip(v),s.push(c),l.push(u._getVersionSign())}),a?o=TT(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[oT(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return w(r.blocks,function(n){var i=hS(n);i>=e&&(e=i+ +(a&&(!i||wc(n)&&!n.noHeader)))}),e}return 0}function ET(r,e,t,a){var n=e.noHeader,i=kT(hS(e)),o=[],s=e.blocks||[];ye(!s||O(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(U(u,l)){var c=new iS(u[l],null);s.sort(function(p,d){return c.evaluate(p.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(p,d){var g=e.valueFormatter,y=fS(p)(g?B(B({},r),{valueFormatter:g}):r,p,d>0?i.html:0,a);y!=null&&o.push(y)});var v=r.renderMode==="richText"?o.join(i.richText):Ac(o.join(""),n?t:i.html);if(n)return v;var f=mc(e.header,"ordinal",r.useUTC),h=vS(a,r.renderMode).nameStyle;return r.renderMode==="richText"?pS(r,f,h)+i.richText+v:Ac('
'+ge(f)+"
"+v,t)}function RT(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(x){return x=O(x)?x:[x],G(x,function(b,_){return mc(b,O(h)?h[_]:h,u)})};if(!(i&&o)){var v=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),f=i?"":mc(l,"ordinal",u),h=e.valueType,p=o?[]:c(e.value),d=!s||!i,g=!s&&i,y=vS(a,n),m=y.nameStyle,S=y.valueStyle;return n==="richText"?(s?"":v)+(i?"":pS(r,f,m))+(o?"":VT(r,p,d,g,S)):Ac((s?"":v)+(i?"":NT(f,!s,m))+(o?"":OT(p,d,g,S)),t)}}function op(r,e,t,a,n,i){if(!!r){var o=fS(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function kT(r){return{html:LT[r],richText:PT[r]}}function Ac(r,e){var t='
',a="margin: "+e+"px 0 0";return'
'+r+t+"
"}function NT(r,e,t){var a=e?"margin-left:2px":"";return''+ge(r)+""}function OT(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=O(r)?r:[r],''+G(r,function(o){return ge(o)}).join("  ")+""}function pS(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function VT(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(O(e)?e.join(" "):e,i)}function dS(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return Ta(a)}function gS(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Nl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Ym()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=TA({color:t,type:e,renderMode:a,markerId:n});return $(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};O(t)?w(t,function(i){return B(a,i)}):B(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function yS(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=O(s),u=dS(e,t),c,v,f,h;if(o>1||l&&!o){var p=BT(s,e,t,i,u);c=p.inlineValues,v=p.inlineValueTypes,f=p.blocks,h=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);h=c=on(n,t,i[0]),v=d.type}else h=c=l?s[0]:s;var g=mv(e),y=g&&e.name||"",m=n.getName(t),S=a?y:m;return qt("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[qt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Gi(S),value:c,valueType:v})].concat(f||[])})}function BT(r,e,t,a,n){var i=e.getData(),o=rn(r,function(v,f,h){var p=i.getDimensionInfo(h);return v=v||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?w(a,function(v){c(on(i,t,v),v)}):w(r,c);function c(v,f){var h=i.getDimensionInfo(f);!h||h.otherDims.tooltip===!1||(o?u.push(qt("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:v,valueType:h.type})):(s.push(v),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var xr=st();function vo(r,e){return r.getName(e)||r.getId(e)}var Jo="__universalTransitionEnabled",ol=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=hi({count:GT,reset:FT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=xr(this).sourceManager=new uS(this);i.prepareSource();var o=this.getInitialData(t,n);lp(o,this),this.dataTask.context.data=o,xr(this).dataBeforeProcessed=o,sp(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Ti(this),i=n?Tn(t):{},o=this.subType;lt.hasClass(o)&&(o+="Series"),ot(t,a.getTheme().get(this.subType)),ot(t,this.getDefaultOption()),_a(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Vr(t,i,n)},e.prototype.mergeOption=function(t,a){t=ot(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Ti(this);n&&Vr(this.option,t,n);var i=xr(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);lp(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,xr(this).dataBeforeProcessed=o,sp(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Re(t))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=Ov.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var n=this.option.selectedMap;if(!!n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[vo(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Jo])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){j(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,a)}},e.registerClass=function(t){return lt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(lt);jt(ol,Gv);jt(ol,Ov);e0(ol,lt);function sp(r){var e=r.name;mv(r)||(r.name=zT(r)||e)}function zT(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return w(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function GT(r){return r.model.getRawData().count()}function FT(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),HT}function HT(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lp(r,e){w(ls(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Q(WT,e))})}function WT(r,e){var t=Tc(r);return t&&t.setOutputEnd((e||this).count()),e}function Tc(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const Et=ol;var Hv=function(){function r(){this.group=new tt,this.uid=wn("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();xv(Hv);Ys(Hv);const Ot=Hv;function Mn(){var r=st();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var mS=st(),$T=Mn(),Wv=function(){function r(){this.group=new tt,this.uid=wn("viewChart"),this.renderTask=hi({plan:UT,reset:YT}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);!i||cp(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);!i||cp(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){Wr(this.group,e)},r.markUpdateMethod=function(e,t){mS(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function up(r,e,t){r&&_i(r)&&(e==="emphasis"?vr:fr)(r,t)}function cp(r,e,t){var a=ba(r,e),n=e&&e.highlightKey!=null?Xw(e.highlightKey):null;a!=null?w(_t(a),function(i){up(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){up(i,t,n)})}xv(Wv);Ys(Wv);function UT(r){return $T(r.model)}function YT(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&mS(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),ZT[l]}var ZT={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Mt=Wv;var Ss="\0__throttleOriginMethod",vp="\0__throttleRate",fp="\0__throttleType";function $v(r,e,t){var a,n=0,i=0,o=null,s,l,u,c;e=e||0;function v(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var h=[],p=0;p=0?v():o=setTimeout(v,-s),n=a};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(h){c=h},f}function In(r,e,t,a){var n=r[e];if(!!n){var i=n[Ss]||n,o=n[fp],s=n[vp];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=$v(i,t,a==="debounce"),n[Ss]=i,n[fp]=a,n[vp]=t}return n}}function Di(r,e){var t=r[e];t&&t[Ss]&&(t.clear&&t.clear(),r[e]=t[Ss])}var hp=st(),pp={itemStyle:wa(b0,!0),lineStyle:wa(_0,!0)},XT={lineStyle:"stroke",itemStyle:"fill"};function SS(r,e){var t=r.visualStyleMapper||pp[e];return t||(console.warn("Unknown style type '"+e+"'."),pp.itemStyle)}function xS(r,e){var t=r.visualDrawType||XT[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var KT={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=SS(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=xS(r,a),u=o[l],c=X(u)?u:null,v=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||v){var f=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=f,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||X(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||X(o.stroke)?f:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var d=r.getDataParams(p),g=B({},o);g[l]=c(d),h.setItemVisual(p,"style",g)}}}},On=new Dt,qT={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=SS(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){On.option=l[a];var u=n(On),c=o.ensureUniqueItemVisual(s,"style");B(c,u),On.option.decal&&(o.setItemVisual(s,"decal",On.option.decal),On.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},jT={performRawSeries:!0,overallReset:function(r){var e=Z();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),hp(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=hp(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=xS(t,s);i.each(function(u){var c=i.getRawIndex(u);n[c]=u}),a.each(function(u){var c=n[u],v=i.getItemVisual(c,"colorFromPalette");if(v){var f=i.ensureUniqueItemVisual(c,"style"),h=a.getName(u)||u+"",p=a.count();f[l]=t.getColorFromPalette(h,o,p)}})}})}},fo=Math.PI;function JT(r,e){e=e||{},J(e,{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 t=new tt,a=new ht({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new ut({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new ht({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new dv({shape:{startAngle:-fo/2,endAngle:-fo/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:fo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:fo*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var QT=function(){function r(e,t,a,n){this._stageTaskMap=Z(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(!!e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.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(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=Z();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;w(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";ye(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;w(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),v=c.seriesTaskMap,f=c.overallTask;if(f){var h,p=f.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),h=!0)}),h&&f.dirty(),o.updatePayload(f,a);var d=o.getPerformArgs(f,n.block);p.each(function(g){g.perform(d)}),f.perform(d)&&(i=!0)}else v&&v.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=Z(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,n).each(c);function c(v){var f=v.uid,h=s.set(f,o&&o.get(f)||hi({plan:nC,reset:iC,count:sC}));h.context={model:v,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(v,h)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||hi({reset:tC});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=Z(),u=e.seriesType,c=e.getTargetSeries,v=!0,f=!1,h="";ye(!e.createOnAllSeries,h),u?a.eachRawSeriesByType(u,p):c?c(a,n).each(p):(v=!1,w(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(f=!0,hi({reset:eC,onDirty:aC})));y.context={model:d,overallProgress:v},y.agent=o,y.__block=v,i._pipe(d,y)}f&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return X(e)&&(e={overallReset:e,seriesType:lC(e)}),e.uid=wn("stageHandler"),t&&(e.visualType=t),e},r}();function tC(r){r.overallReset(r.ecModel,r.api,r.payload)}function eC(r){return r.overallProgress&&rC}function rC(){this.agent.dirty(),this.getDownstream().dirty()}function aC(){this.agent&&this.agent.dirty()}function nC(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function iC(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=_t(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,a){return _S(a)}):oC}var oC=_S(0);function _S(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&h===u.length-f.length){var p=u.slice(0,h);p!=="data"&&(t.mainType=p,t[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,i));function c(v,f,h,p){return v[h]==null||f[p||h]===v[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Cc=["symbol","symbolSize","symbolRotate","symbolOffset"],mp=Cc.concat(["symbolKeepAspect"]),fC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,n){if(!this[ie]){if(this._disposed){this.id;return}var i,o,s;if(j(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[ie]=!0,!this._model||a){var l=new qA(this._api),u=this._theme,c=this._model=new Z0;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Mc);var v={seriesTransition:s,optionChanged:!0};if(n)this[de]={silent:i,updateParams:v},this[ie]=!1,this.getZr().wakeUp();else{try{Ba(this),_r.update.call(this,null,v)}catch(f){throw this[de]=null,this[ie]=!1,f}this._ssr||this._zr.flush(),this[de]=null,this[ie]=!1,Vn.call(this,i),Bn.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||kt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!kt.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return w(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,n=this._model,i=[],o=this;w(a,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return w(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(Mp[n]){var l=s,u=s,c=-s,v=-s,f=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();w(di,function(S,x){if(S.group===n){var b=a?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(K(t)),_=S.getDom().getBoundingClientRect();l=i(_.left,l),u=i(_.top,u),c=o(_.right,c),v=o(_.bottom,v),f.push({dom:b,left:_.left,top:_.top})}}),l*=h,u*=h,c*=h,v*=h;var p=c-l,d=v-u,g=us.createCanvas(),y=ah(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return w(f,function(S){var x=S.left-l,b=S.top-u;m+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new ht({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),w(f,function(S){var x=new ke({style:{x:S.left*h-l,y:S.top*h-u,image:S.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a){return Gl(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return Gl(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=ui(n,t);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(a);else if(l==="seriesModels"){var v=this._chartsMap[u.__viewId];v&&v.containPoint&&(i=i||v.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=ui(n,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?Uv(s,l,a):Ki(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;w(WC,function(a){var n=function(i){var o=t.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&ca(s,function(p){var d=q(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=B({},d.eventData),!0},!0),l){var c=l.componentType,v=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",v=l.seriesIndex);var f=c&&v!=null&&o.getComponent(c,v),h=f&&t[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=i,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:h},t.trigger(a,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(a,n,t)}),w(pi,function(a,n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),w(["selectchanged"],function(a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),pC(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&Jm(this.getDom(),Xv,"");var a=this,n=a._api,i=a._model;w(a._componentsViews,function(o){o.dispose(i,n)}),w(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete di[a.id]},e.prototype.resize=function(t){if(!this[ie]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[de]&&(i==null&&(i=this[de].silent),n=!0,this[de]=null),this[ie]=!0;try{n&&Ba(this),_r.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)})}catch(o){throw this[ie]=!1,o}this[ie]=!1,Vn.call(this,i),Bn.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(j(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!Ic[t]){var n=Ic[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=B({},t);return a.type=pi[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(j(a)||(a={silent:!!a}),!!bs[t.type]&&!!this._model){if(this[ie]){this._pendingActions.push(t);return}var n=a.silent;Hl.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&kt.browser.weChat&&this._throttledZrFlush(),Vn.call(this,n),Bn.call(this,n)}},e.prototype.updateLabelLayout=function(){ze.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Ba=function(v){var f=v._scheduler;f.restorePipelines(v._model),f.prepareStageTasks(),zl(v,!0),zl(v,!1),f.plan()},zl=function(v,f){for(var h=v._model,p=v._scheduler,d=f?v._componentsViews:v._chartsViews,g=f?v._componentsMap:v._chartsMap,y=v._zr,m=v._api,S=0;Sf.get("hoverLayerThreshold")&&!kt.node&&!kt.worker&&f.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=v._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(v,f){var h=v.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function s(v,f){if(!v.preventAutoZ){var h=v.get("z")||0,p=v.get("zlevel")||0;f.eachRendered(function(d){return l(d,h,p,-1/0),!0})}}function l(v,f,h,p){var d=v.getTextContent(),g=v.getTextGuideLine(),y=v.isGroup;if(y)for(var m=v.childrenRef(),S=0;S0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Ja(y))return;if(y instanceof It&&Kw(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var S=y.getTextContent(),x=y.getTextGuideLine();S&&(S.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&n(y)}})}Cp=function(v){return new(function(f){R(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return v._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return v._model.getComponent(d.mainType,d.index);p=p.parent}},h.prototype.enterEmphasis=function(p,d){vr(p,d),xe(v)},h.prototype.leaveEmphasis=function(p,d){fr(p,d),xe(v)},h.prototype.enterBlur=function(p){o0(p),xe(v)},h.prototype.leaveBlur=function(p){Av(p),xe(v)},h.prototype.enterSelect=function(p){s0(p),xe(v)},h.prototype.leaveSelect=function(p){l0(p),xe(v)},h.prototype.getModel=function(){return v.getModel()},h.prototype.getViewOfComponentModel=function(p){return v.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return v.getViewOfSeriesModel(p)},h}(X0))(v)},GS=function(v){function f(h,p){for(var d=0;d=0)){Ip.push(t);var i=AS.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function YS(r,e){Ic[r]=e}function qC(r,e,t){var a=MC("registerMap");a&&a(r,e,t)}var jC=AT;La(Yv,KT);La(sl,qT);La(sl,jT);La(Yv,fC);La(sl,hC);La(kS,TC);$S(q0);US(PC,nT);YS("default",JT);rr({type:fa,event:fa,update:fa},he);rr({type:Zo,event:Zo,update:Zo},he);rr({type:ci,event:ci,update:ci},he);rr({type:Xo,event:Xo,update:Xo},he);rr({type:vi,event:vi,update:vi},he);WS("light",uC);WS("dark",cC);function zn(r){return r==null?0:r.length||1}function Lp(r){return r}var JC=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||Lp,this._newKeyGetter=n||Lp,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(v===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(v===1&&f===1)this._update&&this._update(c,u),n[l]=null;else if(v>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(v>1)for(var h=0;h1)for(var s=0;s30}var Gn=j,br=G,iD=typeof Int32Array>"u"?Array:Int32Array,oD="e\0\0",Pp=-1,sD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],lD=["_approximateExtent"],Ep,yo,Fn,Hn,Ul,mo,Yl,uD=function(){function r(e,t){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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var a,n=!1;XS(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Ne;if(l&&!n.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),O(i)?i=i.slice():Gn(i)&&(i=B({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Gn(t)?B(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Gn(e)?B(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?B(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;cc(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){w(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:br(this.dimensions,this._getDimInfo,this),this.hostModel)),Ul(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];!X(a)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(Ab(arguments)))})},r.internalField=function(){Ep=function(e){var t=e._invertedIndicesMap;w(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new iD(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[t]=l}}}(),r}();const fe=uD;function qi(r,e){Vv(r)||(r=Bv(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=Z(),i=[],o=vD(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&jS(o),l=a===r.dimensionsDefine,u=l?qS(r):KS(a),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var v=Z(c),f=new sS(o),h=0;h0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function vD(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return w(e,function(i){var o;j(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function fD(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var hD=function(){function r(e){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=e}return r}();function pD(r){var e=r.get("coordinateSystem"),t=new hD(e),a=dD[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var dD={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",Ft).models[0],i=r.getReferringComponents("yAxis",Ft).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),za(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),za(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",Ft).models[0];e.coordSysDims=["single"],t.set("single",n),za(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",Ft).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),za(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),za(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();w(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];t.set(c,u),za(u)&&(a.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function za(r){return r.get("type")==="category"}function gD(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;yD(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,v,f;if(w(i,function(m,S){$(m)&&(i[S]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(c=m))}),c&&!a&&!u&&(a=!0),c){v="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,p=c.type,d=0;w(i,function(m){m.coordDim===h&&d++});var g={name:v,coordDim:h,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:f,coordDim:f,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,p),y.storeDimIndex=s.ensureCalculationDimension(v,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:f,stackResultDimension:v}}function yD(r){return!XS(r.schema)}function Br(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function JS(r,e){return Br(r,e)?r.getCalculationInfo("stackResultDimension"):e}function mD(r,e){var t=r.get("coordinateSystem"),a=Xi.get(t),n;return e&&e.coordSysDims&&(n=G(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=As(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function SD(r,e,t){var a,n;return t&&w(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function yr(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=Bv(r)):(n=a.getSource(),i=n.sourceFormat===Ne);var o=pD(e),s=mD(e,o),l=t.useEncodeDefaulter,u=X(l)?l:l?Q(H0,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},v=qi(n,c),f=SD(v.dimensions,t.createInvertedIndices,o),h=i?null:a.getSharedDataStore(v),p=gD(e,{schema:v,store:h}),d=new fe(v,e);d.setCalculationInfo(p);var g=f!=null&&xD(n)?function(y,m,S,x){return x===f?S:this.defaultDimValueGetter(y,m,S,x)}:null;return d.hasItemOption=!1,d.initData(i?n:h,null,g),d}function xD(r){if(r.sourceFormat===Ne){var e=_D(r.data||[]);return!O(mn(e))}}function _D(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Ys(QS);const mr=QS;var bD=0,wD=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++bD}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&G(a,AD);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!$(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},r}();function AD(r){return j(r)&&r.value!=null?r.value:r+""}const Lc=wD;function Pc(r){return r.type==="interval"||r.type==="log"}function TD(r,e,t,a){var n={},i=r[1]-r[0],o=n.interval=$m(i/e,!0);t!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=tx(o),l=n.niceTickExtent=[Vt(Math.ceil(r[0]/o)*o,s),Vt(Math.floor(r[1]/o)*o,s)];return CD(l,r),n}function Zl(r){var e=Math.pow(10,yv(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Vt(t*e)}function tx(r){return Ke(r)+2}function Rp(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function CD(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Rp(r,0,e),Rp(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function ll(r,e){return r>=e[0]&&r<=e[1]}function ul(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function cl(r,e){return r*(e[1]-e[0])+e[0]}var ex=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new Lc({})),O(n)&&(n=new Lc({categories:G(n,function(i){return j(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:$(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),ll(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),ul(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(cl(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,n=a[0];n<=a[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(mr);mr.registerClass(ex);const jv=ex;var Kr=Vt,rx=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return ll(t,this._extent)},e.prototype.normalize=function(t){return ul(t,this._extent)},e.prototype.scale=function(t){return cl(t,this._extent)},e.prototype.setExtent=function(t,a){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(a)||(n[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=tx(t)},e.prototype.getTicks=function(t){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var c=s.length?s[s.length-1].value:i[1];return n[1]>c&&(t?s.push({value:Kr(c+a,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&h0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function ix(r){var e=ID(r),t=[];return w(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),v=i.scale.getExtent(),f=Math.abs(v[1]-v[0]);s=u?c/f*u:c}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=F(a.get("barWidth"),s),d=F(a.get("barMaxWidth"),s),g=F(a.get("barMinWidth")||(cx(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Qv(i),stackId:Jv(a)})}),ox(t)}function ox(r){var e={};w(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var v=a.barMaxWidth;v&&(l[u].maxWidth=v);var f=a.barMinWidth;f&&(l[u].minWidth=f);var h=a.barGap;h!=null&&(s.gap=h);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return w(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Wt(i).length;s=Math.max(35-l*4,15)+"%"}var u=F(s,o),c=F(a.gap,1),v=a.remainedWidth,f=a.autoWidthCount,h=(v-u)/(f+(f-1)*c);h=Math.max(h,0),w(i,function(y){var m=y.maxWidth,S=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),S&&(x=Math.max(x,S)),y.width=x,v-=x+c*x,f--}else{var x=h;m&&mx&&(x=S),x!==h&&(y.width=x,v-=x+c*x,f--)}}),h=(v-u)/(f+(f-1)*c),h=Math.max(h,0);var p=0,d;w(i,function(y,m){y.width||(y.width=h),d=y,p+=y.width*(1+c)}),d&&(p-=d.width*c);var g=-p/2;w(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),t}function LD(r,e,t){if(r&&e){var a=r[Qv(e)];return a!=null&&t!=null?a[Jv(t)]:a}}function sx(r,e){var t=nx(r,e),a=ix(t);w(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=Jv(n),u=a[Qv(s)][l],c=u.offset,v=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:v})})}function lx(r){return{seriesType:r,plan:Mn(),reset:function(e){if(!!ux(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),v=Br(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),f=i.isHorizontal(),h=PD(n,i),p=cx(e),d=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(S,x){for(var b=S.count,_=p&&je(b*3),A=p&&l&&je(b*3),T=p&&je(b),C=a.master.getRect(),M=f?C.width:C.height,D,I=x.getStore(),L=0;(D=S.next())!=null;){var P=I.get(v?g:o,D),E=I.get(s,D),k=h,V=void 0;v&&(V=+P-I.get(o,D));var N=void 0,z=void 0,H=void 0,Y=void 0;if(f){var et=a.dataToPoint([P,E]);if(v){var rt=a.dataToPoint([V,E]);k=rt[0]}N=k,z=et[1]+m,H=et[0]-k,Y=y,Math.abs(H)>>1;r[n][1]n&&(this._approxInterval=n);var s=So.length,l=Math.min(ED(So,this._approxInterval,0,s),s-1);this._interval=So[l][1],this._minLevelUnit=So[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return gt(t)?t:+tr(t)},e.prototype.contain=function(t){return ll(this.parse(t),this._extent)},e.prototype.normalize=function(t){return ul(this.parse(t),this._extent)},e.prototype.scale=function(t){return cl(t,this._extent)},e.type="time",e}(zr),So=[["second",Lv],["minute",Pv],["hour",fi],["quarter-day",fi*6],["half-day",fi*12],["day",De*1.2],["half-week",De*3.5],["week",De*7],["month",De*31],["quarter",De*95],["half-year",Rh/2],["year",Rh]];function RD(r,e,t,a){var n=tr(e),i=tr(t),o=function(p){return Nh(n,p,a)===Nh(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},v=function(){return c()&&o("minute")},f=function(){return v()&&o("second")},h=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return v();case"second":return f();case"millisecond":return h()}}function kD(r,e){return r/=De,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function ND(r){var e=30*De;return r/=e,r>6?6:r>3?3:r>2?2:1}function OD(r){return r/=fi,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function kp(r,e){return r/=e?Pv:Lv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function VD(r){return $m(r,!0)}function BD(r,e,t){var a=new Date(r);switch(Qa(e)){case"year":case"month":a[D0(t)](0);case"day":a[M0(t)](1);case"hour":a[I0(t)](0);case"minute":a[L0(t)](0);case"second":a[P0(t)](0),a[E0(t)](0)}return a.getTime()}function zD(r,e,t,a){var n=1e4,i=T0,o=0;function s(M,D,I,L,P,E,k){for(var V=new Date(D),N=D,z=V[L]();N1&&E===0&&I.unshift({value:I[0].value-N})}}for(var E=0;E=a[0]&&m<=a[1]&&v++)}var S=(a[1]-a[0])/e;if(v>S*1.5&&f>S/1.5||(u.push(g),v>S||r===i[h]))break}c=[]}}}for(var x=bt(G(u,function(M){return bt(M,function(D){return D.value>=a[0]&&D.value<=a[1]&&!D.notAdd})}),function(M){return M.length>0}),b=[],_=x.length-1,h=0;h0;)i*=10;var s=[Vt(HD(a[0]/i)*i),Vt(FD(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){gi.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Be(t)/Be(this.base),ll(t,this._extent)},e.prototype.normalize=function(t){return t=Be(t)/Be(this.base),ul(t,this._extent)},e.prototype.scale=function(t){return t=cl(t,this._extent),xo(this.base,t)},e.type="log",e}(mr),hx=tf.prototype;hx.getMinorTicks=gi.getMinorTicks;hx.getLabel=gi.getLabel;function _o(r,e){return GD(r,Ke(e))}mr.registerClass(tf);const WD=tf;var $D=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,h=this._determinedMax;return f!=null&&(s=f,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:v}},r.prototype.modifyDataMinMax=function(e,t){this[YD[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=UD[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),UD={min:"_determinedMin",max:"_determinedMax"},YD={min:"_dataMin",max:"_dataMax"};function px(r,e,t){var a=r.rawExtentInfo;return a||(a=new $D(r,e,t),r.rawExtentInfo=a,a)}function bo(r,e){return e==null?null:cs(e)?NaN:r.parse(e)}function dx(r,e){var t=r.type,a=px(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=nx("bar",o),l=!1;if(w(s,function(v){l=l||v.getBaseAxis()===e.axis}),l){var u=ix(s),c=ZD(n,i,e,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function ZD(r,e,t,a){var n=t.axis.getExtent(),i=n[1]-n[0],o=LD(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;w(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;w(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,v=1-(s+l)/i,f=c/v-c;return e+=f*(l/u),r-=f*(s/u),{min:r,max:e}}function ln(r,e){var t=e,a=dx(r,t),n=a.extent,i=t.get("splitNumber");r instanceof WD&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function vl(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new jv({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new fx({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(mr.getClass(e)||zr)}}function XD(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function ji(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}}(e):$(e)?function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i!=null?i:"");return o}}(e):X(e)?function(a){return function(n,i){return t!=null&&(i=n.value-t),a(ef(r,n),i,n.level!=null?{level:n.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function ef(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function KD(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,n,i=t.getExtent();t instanceof jv?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=ji(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;cr[1]&&(r[1]=n[1])})}var Ji=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),Op=[],JD={registerPreprocessor:$S,registerProcessor:US,registerPostInit:YC,registerPostUpdate:ZC,registerUpdateLifecycle:Kv,registerAction:rr,registerCoordinateSystem:XC,registerLayout:KC,registerVisual:La,registerTransform:jC,registerLoading:YS,registerMap:qC,registerImpl:DC,PRIORITY:GC,ComponentModel:lt,ComponentView:Ot,SeriesModel:Et,ChartView:Mt,registerComponentModel:function(r){lt.registerClass(r)},registerComponentView:function(r){Ot.registerClass(r)},registerSeriesModel:function(r){Et.registerClass(r)},registerChartView:function(r){Mt.registerClass(r)},registerSubTypeDefaulter:function(r,e){lt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){Tb(r,e)}};function it(r){if(O(r)){w(r,function(e){it(e)});return}ct(Op,r)>=0||(Op.push(r),X(r)&&(r={install:r}),r.install(JD))}var QD=[];function Xl(r,e){for(var t=0;tn&&(a=o,n=l)}if(a)return tM(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?Vp(s.exterior,n,i,t):w(s.points,function(l){Vp(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new wt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function aM(r,e){return r=rM(r),G(bt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Bp(o[0],o.slice(1)));break;case"MultiPolygon":w(n.coordinates,function(l){l[0]&&i.push(new Bp(l[0],l.slice(1)))});break;case"LineString":i.push(new zp([n.coordinates]));break;case"MultiLineString":i.push(new zp(n.coordinates))}var s=new mx(a[e||"name"],i,a.cp);return s.properties=a,s})}var Ii=st();function nM(r){return r.type==="category"?oM(r):lM(r)}function iM(r,e){return r.type==="category"?sM(r,e):{ticks:G(r.scale.getTicks(),function(t){return t.value})}}function oM(r){var e=r.getLabelModel(),t=xx(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function xx(r,e){var t=_x(r,"labels"),a=rf(e),n=bx(t,a);if(n)return n;var i,o;return X(a)?i=Tx(r,a):(o=a==="auto"?uM(r):a,i=Ax(r,o)),wx(t,a,{labels:i,labelCategoryInterval:o})}function sM(r,e){var t=_x(r,"ticks"),a=rf(e),n=bx(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),X(a))i=Tx(r,a,!0);else if(a==="auto"){var s=xx(r,r.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(l){return l.tickValue})}else o=a,i=Ax(r,o,!0);return wx(t,a,{ticks:i,tickCategoryInterval:o})}function lM(r){var e=r.scale.getTicks(),t=ji(r);return{labels:G(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function _x(r,e){return Ii(r)[e]||(Ii(r)[e]=[])}function bx(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(a)),v=Math.abs(u*Math.sin(a)),f=0,h=0;l<=i[1];l+=s){var p=0,d=0,g=Us(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,f=Math.max(f,p,7),h=Math.max(h,d,7)}var y=f/c,m=h/v;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var S=Math.max(0,Math.floor(Math.min(y,m))),x=Ii(r.model),b=r.getExtent(),_=x.lastAutoInterval,A=x.lastTickCount;return _!=null&&A!=null&&Math.abs(_-S)<=1&&Math.abs(A-o)<=1&&_>S&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?S=_:(x.lastTickCount=o,x.lastAutoInterval=S,x.axisExtent0=b[0],x.axisExtent1=b[1]),S}function vM(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Ax(r,e,t){var a=ji(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var v=gx(r),f=o.get("showMinLabel")||v,h=o.get("showMaxLabel")||v;f&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);h&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function Tx(r,e,t){var a=r.scale,n=ji(r),i=[];return w(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var Gp=[0,1],fM=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Hm(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),Fp(a,n.count())),mt(e,Gp,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),Fp(a,n.count()));var i=mt(e,a,Gp,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=iM(this,t),n=a.ticks,i=G(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return hM(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=G(a,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return nM(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 e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return cM(this)},r}();function Fp(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function hM(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],o=e[1]={coord:i[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;w(e,function(h){h.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s},e.push(o)}var v=i[0]>i[1];f(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&f(i[0],e[0].coord)&&e.unshift({coord:i[0]}),f(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&f(o.coord,i[1])&&e.push({coord:i[1]});function f(h,p){return h=Vt(h),p=Vt(p),v?h>p:hn&&(n+=Wn);var h=Math.atan2(s,o);if(h<0&&(h+=Wn),h>=a&&h<=n||h+Wn>=a&&h+Wn<=n)return l[0]=c,l[1]=v,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(p-o)*(p-o)+(d-s)*(d-s),S=(g-o)*(g-o)+(y-s)*(y-s);return m0){e=e/180*Math.PI,Fe.fromArray(r[0]),Tt.fromArray(r[1]),Bt.fromArray(r[2]),Gt.sub(Je,Fe,Tt),Gt.sub(Xe,Bt,Tt);var t=Je.len(),a=Xe.len();if(!(t<.001||a<.001)){Je.scale(1/t),Xe.scale(1/a);var n=Je.dot(Xe),i=Math.cos(e);if(i1&&Gt.copy(ve,Bt),ve.toArray(r[1])}}}}function SM(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Fe.fromArray(r[0]),Tt.fromArray(r[1]),Bt.fromArray(r[2]),Gt.sub(Je,Tt,Fe),Gt.sub(Xe,Bt,Tt);var a=Je.len(),n=Xe.len();if(!(a<.001||n<.001)){Je.scale(1/a),Xe.scale(1/n);var i=Je.dot(e),o=Math.cos(t);if(i=l)Gt.copy(ve,Bt);else{ve.scaleAndAdd(Xe,s/Math.tan(Math.PI/2-c));var v=Bt.x!==Tt.x?(ve.x-Tt.x)/(Bt.x-Tt.x):(ve.y-Tt.y)/(Bt.y-Tt.y);if(isNaN(v))return;v<0?Gt.copy(ve,Tt):v>1&&Gt.copy(ve,Bt)}ve.toArray(r[1])}}}}function Wp(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function xM(r,e){var t=e.smooth,a=e.points;if(!!a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=oa(a[0],a[1]),i=oa(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=_l([],a[1],a[0],o/n),l=_l([],a[1],a[2],o/i),u=_l([],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],a[2][0],a[2][1])}else for(var c=1;c0&&i&&b(-c/o,0,o);var d=r[0],g=r[o-1],y,m;S(),y<0&&_(-y,.8),m<0&&_(m,.8),S(),x(y,m,1),x(m,y,-1),S(),y<0&&A(-y),m<0&&A(m);function S(){y=d.rect[e]-a,m=n-g.rect[e]-g.rect[t]}function x(T,C,M){if(T<0){var D=Math.min(C,-T);if(D>0){b(D*M,0,o);var I=D+T;I<0&&_(-I*M,1)}else _(-T*M,1)}}function b(T,C,M){T!==0&&(u=!0);for(var D=C;D0)for(var I=0;I0;I--){var k=M[I-1]*E;b(-k,I,o)}}}function A(T){var C=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),D=0;D0?b(M,0,D+1):b(-M,o-D-1,o),T-=M,T<=0)return}return u}function _M(r,e,t,a){return Ix(r,"x","width",e,t,a)}function Lx(r,e,t,a){return Ix(r,"y","height",e,t,a)}function Px(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new wt(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),ct(f,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ft(a,u,t,l)}else if(a.attr(u),!bn(a).valueAnimation){var v=St(a.style.opacity,1);a.style.opacity=0,Lt(a,{style:{opacity:v}},t,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};wo(h,u,Ao),wo(h,a.states.select,Ao)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};wo(p,u,Ao),wo(p,a.states.emphasis,Ao)}x0(a,l,c,t,t)}if(n&&!n.ignore&&!n.invisible){var i=AM(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),ft(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Lt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}();const CM=TM;var jl=st();function DM(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=jl(t).labelManager;n||(n=jl(t).labelManager=new CM),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=jl(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var MM=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return yr(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var a=new tt,n=Ht("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);a.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=Ht(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);a.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.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},e}(Et);const IM=MM;function un(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=on(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var LM=function(r){R(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o){this.removeAll();var s=Ht(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=PM,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){vr(this.childAt(0))},e.prototype.downplay=function(){fr(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var v=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,v)}else{var f=this.childAt(0);f.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};c?f.attr(h):ft(f,h,s,a),We(f)}if(this._updateCommon(t,a,l,n,i),u){var f=this.childAt(0);if(!c){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Lt(f,h,s,a)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,c,v,f,h,p,d,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,v=i.selectItemStyle,f=i.focus,h=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),S=m.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),v=m.getModel(["select","itemStyle"]).getItemStyle(),c=m.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),h=S.get("blurScope"),p=S.get("disabled"),d=Kt(m),g=S.getShallow("scale"),y=m.getShallow("cursor")}var x=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=Ia(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var _=t.getItemVisual(a,"style"),A=_.fill;if(s instanceof ke){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},_))}else s.__isEmptyBrush?s.useStyle(B({},_)):s.useStyle(_),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;ae(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:A,defaultOpacity:_.opacity});function I(E){return D?t.getName(E):un(t,E)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=c;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Nt(this,f,h,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=q(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Or(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Or(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Ln(t.getItemVisual(a,"symbolSize"))},e}(tt);function PM(r,e){this.parent.drift(r,e)}const Qi=LM;function Jl(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Up(r){return r!=null&&!j(r)&&(r={isIgnore:r}),r||{}}function Yp(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Kt(e),cursorStyle:e.get("cursor")}}var EM=function(){function r(e){this.group=new tt,this._SymbolCtor=e||Qi}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Up(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Yp(e),u={disableAnimation:s},c=t.getSymbolPoint||function(v){return e.getItemLayout(v)};i||a.removeAll(),e.diff(i).add(function(v){var f=c(v);if(Jl(e,f,v,t)){var h=new o(e,v,l,u);h.setPosition(f),e.setItemGraphicEl(v,h),a.add(h)}}).update(function(v,f){var h=i.getItemGraphicEl(f),p=c(v);if(!Jl(e,p,v,t)){a.remove(h);return}var d=e.getItemVisual(v,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==d)a.remove(h),h=new o(e,v,l,u),h.setPosition(p);else{h.updateData(e,v,l,u);var y={x:p[0],y:p[1]};s?h.attr(y):ft(h,y,n)}a.add(h),e.setItemGraphicEl(v,h)}).remove(function(v){var f=i.getItemGraphicEl(v);f&&f.fadeOut(function(){a.remove(f)},n)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Yp(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=Up(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function kx(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function kM(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function NM(r,e,t,a,n,i,o,s){for(var l=kM(r,e),u=[],c=[],v=[],f=[],h=[],p=[],d=[],g=Rx(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],S=0;S=n||d<0)break;if(ga(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),v=y,f=m;else{var S=y-u,x=m-c;if(S*S+x*x<.5){d+=i;continue}if(o>0){for(var b=d+i,_=e[b*2],A=e[b*2+1];_===y&&A===m&&g=a||ga(_,A))h=y,p=m;else{M=_-u,D=A-c;var P=y-u,E=_-y,k=m-c,V=A-m,N=void 0,z=void 0;if(s==="x"){N=Math.abs(P),z=Math.abs(E);var H=M>0?1:-1;h=y-H*N*o,p=m,I=y+H*z*o,L=m}else if(s==="y"){N=Math.abs(k),z=Math.abs(V);var Y=D>0?1:-1;h=y,p=m-Y*N*o,I=y,L=m+Y*z*o}else N=Math.sqrt(P*P+k*k),z=Math.sqrt(E*E+V*V),C=z/(z+N),h=y-M*o*(1-C),p=m-D*o*(1-C),I=y+M*o*C,L=m+D*o*C,I=wr(I,Ar(_,y)),L=wr(L,Ar(A,m)),I=Ar(I,wr(_,y)),L=Ar(L,wr(A,m)),M=I-y,D=L-m,h=y-M*N/z,p=m-D*N/z,h=wr(h,Ar(u,y)),p=wr(p,Ar(c,m)),h=Ar(h,wr(u,y)),p=Ar(p,wr(c,m)),M=y-h,D=m-p,I=y+M*z/N,L=m+D*z/N}r.bezierCurveTo(v,f,h,p,y,m),v=I,f=L}else r.lineTo(y,m)}u=y,c=m,d+=i}return g}var Nx=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),OM=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nx},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&ga(n[o*2-2],n[o*2-1]);o--);for(;i=0){var x=u?(p-l)*S+l:(h-s)*S+s;return u?[t,x]:[x,t]}s=h,l=p;break;case o.C:h=i[v++],p=i[v++],d=i[v++],g=i[v++],y=i[v++],m=i[v++];var b=u?nh(s,h,d,y,t,c):nh(l,p,g,m,t,c);if(b>0)for(var _=0;_=0){var x=u?ih(l,p,g,m,A):ih(s,h,d,y,A);return u?[t,x]:[x,t]}}s=y,l=m;break}}},e}(It),VM=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Nx),Ox=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new VM},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&ga(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function GM(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(!!i){var l=e.getAxis(n),u=G(i.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,v=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),v.reverse());var f=zM(u,n==="x"?t.getWidth():t.getHeight()),h=f.length;if(!h&&c)return u[0].coord<0?v[1]?v[1]:u[c-1].color:v[0]?v[0]:u[0].color;var p=10,d=f[0].coord-p,g=f[h-1].coord+p,y=g-d;if(y<.001)return"transparent";w(f,function(S){S.offset=(S.coord-d)/y}),f.push({offset:h?f[h-1].offset:.5,color:v[1]||"transparent"}),f.unshift({offset:h?f[0].offset:.5,color:v[0]||"transparent"});var m=new $s(0,0,0,0,f,!0);return m[n]=d,m[n+"2"]=g,m}}}function FM(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(!!i&&!(n&&HM(i,e))){var o=e.mapDimension(i.dim),s={};return w(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function HM(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function WM(r,e){return isNaN(r)||isNaN(e)}function $M(r){for(var e=r.length/2;e>0&&WM(r[e*2-2],r[e*2-1]);e--);return e-1}function jp(r,e){return[r[e*2],r[e*2+1]]}function UM(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function zx(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var H=d.getState("emphasis").style;H.lineWidth=+d.style.lineWidth+1}q(d).seriesIndex=t.seriesIndex,Nt(d,V,N,z);var Y=qp(t.get("smooth")),et=t.get("smoothMonotone");if(d.setShape({smooth:Y,smoothMonotone:et,connectNulls:T}),g){var rt=l.getCalculationInfo("stackedOnSeries"),nt=0;g.useStyle(J(c.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),rt&&(nt=qp(rt.get("smooth"))),g.setShape({smooth:Y,stackedOnSmooth:nt,smoothMonotone:et,connectNulls:T}),re(g,t,"areaStyle"),q(g).seriesIndex=t.seriesIndex,Nt(g,V,N,z)}var pt=function(yt){i._changePolyState(yt)};l.eachItemGraphicEl(function(yt){yt&&(yt.onHoverStateChange=pt)}),this._polyline.onHoverStateChange=pt,this._data=l,this._coordSys=o,this._stackedOnPoints=_,this._points=v,this._step=D,this._valueOrigin=x,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,a){q(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=ba(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],v=l[s*2+1];if(isNaN(c)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,v))return;var f=t.get("zlevel")||0,h=t.get("z")||0;u=new Qi(o,s),u.x=c,u.y=v,u.setZ(f,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Mt.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=ba(o,i);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 Mt.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;hs(this._polyline,t),a&&hs(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new OM({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Ox({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");X(c)&&(c=c(null));var v=u.get("animationDelay")||0,f=X(v)?v(null):v;t.eachItemGraphicEl(function(h,p){var d=h;if(d){var g=[h.x,h.y],y=void 0,m=void 0,S=void 0;if(n)if(o){var x=n,b=a.pointToCoord(g);i?(y=x.startAngle,m=x.endAngle,S=-b[1]/180*Math.PI):(y=x.r0,m=x.r,S=b[0])}else{var _=n;i?(y=_.x,m=_.x+_.width,S=h.x):(y=_.y+_.height,m=_.y,S=h.y)}var A=m===y?0:(S-y)/(m-y);l&&(A=1-A);var T=X(v)?v(p):c*A+f,C=d.getSymbolPath(),M=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(zx(t)){var o=t.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 ut({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=$M(l);c>=0&&(ae(s,Kt(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(v,f,h){return h!=null?Ex(o,h):un(o,v)},enableTextSetter:!0},YM(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var v=n.getLayout("points"),f=n.hostModel,h=f.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,S=a.shape,x=m?y?S.x:S.y+S.height:y?S.x+S.width:S.y,b=(y?d:0)*(m?-1:1),_=(y?0:-d)*(m?-1:1),A=y?"x":"y",T=UM(v,x,A),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!h){var I=jp(v,C[0]);u.attr({x:I[0]+b,y:I[1]+_}),o&&(D=f.getRawValue(C[0]))}else{var I=c.getPointOn(x,A);I&&u.attr({x:I[0]+b,y:I[1]+_});var L=f.getRawValue(C[0]),P=f.getRawValue(C[1]);o&&(D=Qm(n,p,L,P,T.t))}i.lastFrameIndex=C[0]}else{var E=t===1||i.lastFrameIndex>0?C[0]:0,I=jp(v,E);o&&(D=f.getRawValue(E)),u.attr({x:I[0]+b,y:I[1]+_})}if(o){var k=bn(u);typeof k.setLabelText=="function"&&k.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,c=this._polygon,v=t.hostModel,f=NM(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),h=f.current,p=f.stackedOnCurrent,d=f.next,g=f.stackedOnNext;if(o&&(h=Tr(f.current,n,o,l),p=Tr(f.stackedOnCurrent,n,o,l),d=Tr(f.next,n,o,l),g=Tr(f.stackedOnNext,n,o,l)),Kp(h,d)>3e3||c&&Kp(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),c&&(c.stopAnimation(),c.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=h;var y={shape:{points:d}};f.current!==h&&(y.shape.__points=f.next),u.stopAnimation(),ft(u,y,v),c&&(c.setShape({points:h,stackedOnPoints:p}),c.stopAnimation(),ft(c,{shape:{stackedOnPoints:g}},v),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],S=f.status,x=0;xe&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),v=a.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(v||1),h=Math.round(s/f);if(isFinite(h)&&h>1){i==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/h));var p=void 0;$(i)?p=KM[i]:X(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/h,p,qM))}}}}}function jM(r){r.registerChartView(XM),r.registerSeriesModel(IM),r.registerLayout(eo("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Gx("line"))}var Fx=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return yr(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)w(i.getAxes(),function(f,h){if(f.type==="category"&&a!=null){var p=f.getTicksCoords(),d=o[h],g=a[h]==="x1"||a[h]==="y1";if(g&&(d+=1),p.length<2)return;if(p.length===2){s[h]=f.toGlobalCoord(f.getExtent()[g?1:0]);return}for(var y=void 0,m=void 0,S=1,x=0;xd){m=(b+y)/2;break}x===1&&(S=_-p[0].tickValue)}m==null&&(y?y&&(m=p[p.length-1].coord):m=p[0].coord),s[h]=f.toGlobalCoord(m)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),v=i.getBaseAxis().isHorizontal()?0:1;s[v]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Et);Et.registerClass(Fx);const Ms=Fx;var JM=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return yr(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=$r(Ms.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}),e}(Ms);const QM=JM;var tI=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}(),eI=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new tI},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,v=a.endAngle,f=a.clockwise,h=Math.PI*2,p=f?v-cMath.PI/2&&cs)return!0;s=v}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(!!this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){bi(i,t,q(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Mt),Jp={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=tu(e.x,r.x),s=eu(e.x+e.width,n),l=tu(e.y,r.y),u=eu(e.y+e.height,i),c=sn?s:o,e.y=v&&l>i?u:l,e.width=c?0:s-o,e.height=v?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),c||v},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=eu(e.r,r.r),i=tu(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},Qp={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new ht({shape:B({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,v=n?"height":"width";c[v]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?Is:Pe,c=new u({shape:a,z2:1});c.name="item";var v=Hx(n);if(c.calculateTextPosition=rI(v,{isRoundCap:u===Is}),i){var f=c.shape,h=n?"r":"endAngle",p={};f[h]=n?a.r0:a.startAngle,p[h]=a[h],(s?ft:Lt)(c,{shape:p},i)}return c}};function oI(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function td(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?ft:Lt)(t,{shape:l},e,n,null);var c=e?r.baseAxis.model:null;(o?ft:Lt)(t,{shape:u},c,n)}function ed(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function uI(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Hx(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function ad(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,v=va(a.getModel("itemStyle"),c,!0);B(c,v),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=a.getShallow("cursor");f&&r.attr("cursor",f);var h=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",p=Kt(a);ae(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:un(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,aI(r,g==="outside"?h:g,Hx(o),a.get(["label","rotate"]))}S0(d,p,i.getRawValue(t),function(m){return Ex(e,m)});var y=a.getModel(["emphasis"]);Nt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),re(r,a),uI(n)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function cI(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var vI=function(){function r(){}return r}(),nd=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new vI},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function fI(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,v=i.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function Wx(r,e,t){if(Pa(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function hI(r,e,t){var a=r.type==="polar"?Pe:ht;return new a({shape:Wx(e,t,r),silent:!0,z2:0})}const pI=iI;function dI(r){r.registerChartView(pI),r.registerSeriesModel(QM),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Q(sx,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,lx("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Gx("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var Mo=Math.PI*2,sd=Math.PI/180;function $x(r,e){return Yt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Ux(r,e){var t=$x(r,e),a=r.get("center"),n=r.get("radius");O(n)||(n=[0,n]);var i=F(t.width,e.getWidth()),o=F(t.height,e.getHeight()),s=Math.min(i,o),l=F(n[0],s/2),u=F(n[1],s/2),c,v,f=r.coordinateSystem;if(f){var h=f.dataToPoint(a);c=h[0]||0,v=h[1]||0}else O(a)||(a=[a,a]),c=F(a[0],i)+t.x,v=F(a[1],o)+t.y;return{cx:c,cy:v,r0:l,r:u}}function gI(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=$x(a,t),s=Ux(a,t),l=s.cx,u=s.cy,c=s.r,v=s.r0,f=-a.get("startAngle")*sd,h=a.get("minAngle")*sd,p=0;n.each(i,function(M){!isNaN(M)&&p++});var d=n.getSum(i),g=Math.PI/(d||p)*2,y=a.get("clockwise"),m=a.get("roseType"),S=a.get("stillShowZeroSum"),x=n.getDataExtent(i);x[0]=0;var b=Mo,_=0,A=f,T=y?1:-1;if(n.setLayout({viewRect:o,r:c}),n.each(i,function(M,D){var I;if(isNaN(M)){n.setItemLayout(D,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:v,r:m?NaN:c});return}m!=="area"?I=d===0&&S?g:M*g:I=Mo/p,It?y:g,b=Math.abs(S.label.y-t);if(b>=x.maxY){var _=S.label.x-e-S.len2*n,A=a+S.len,T=Math.abs(_)r.unconstrainedWidth?null:h:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-v)/2}}}function ru(r){return r.position==="center"}function SI(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*yI,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,v=s.y,f=s.height;function h(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var A in _.states)if(_.states[A].ignore===!1)return!0;return!1}e.each(function(_){var A=e.getItemGraphicEl(_),T=A.shape,C=A.getTextContent(),M=A.getTextGuideLine(),D=e.getItemModel(_),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),E=I.get("alignTo"),k=F(I.get("edgeDistance"),u),V=I.get("bleedMargin"),N=D.getModel("labelLine"),z=N.get("length");z=F(z,u);var H=N.get("length2");if(H=F(H,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":et>0?"left":"right"}var $t=Math.PI,Xt=0,Se=I.get("rotate");if(gt(Se))Xt=Se*($t/180);else if(L==="center")Xt=0;else if(Se==="radial"||Se===!0){var so=et<0?-Y+$t:-Y;Xt=so}else if(Se==="tangential"&&L!=="outside"&&L!=="outer"){var ar=Math.atan2(et,rt);ar<0&&(ar=$t*2+ar);var vb=rt>0;vb&&(ar=$t+ar),Xt=ar-$t}if(i=!!Xt,C.x=nt,C.y=pt,C.rotation=Xt,C.setStyle({verticalAlign:"middle"}),at){C.setStyle({align:vt});var Sl=C.states.select;Sl&&(Sl.x+=C.x,Sl.y+=C.y)}else{var En=C.getBoundingRect().clone();En.applyTransform(C.getComputedTransform());var rh=(C.style.margin||0)+2.1;En.y-=rh/2,En.height+=rh,t.push({label:C,labelLine:M,position:L,len:z,len2:H,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new Gt(et,rt),linePoints:yt,textAlign:vt,labelDistance:P,labelAlignTo:E,edgeDistance:k,bleedMargin:V,rect:En,unconstrainedWidth:En.width,labelStyleWidth:C.style.width})}A.setTextConfig({inside:at})}}),!i&&r.get("avoidLabelOverlap")&&mI(t,a,n,l,u,f,c,v);for(var d=0;d0){for(var c=o.getItemLayout(0),v=1;isNaN(c&&c.startAngle)&&v=i.r0}},e.type="pie",e}(Mt);const bI=_I;function Pn(r,e,t){e=O(e)&&{coordDimensions:e}||B({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=qi(a,e).dimensions,i=new fe(n,r);return i.initData(a,t),i}var wI=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}();const ao=wI;var AI=st(),TI=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ao(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Pn(this,{coordDimensions:["value"],encodeDefaulter:Q(kv,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=AI(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=aw(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){_a(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,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"},e}(Et);const CI=TI;function DI(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(gt(o)&&!isNaN(o)&&o<0)})}}}function MI(r){r.registerChartView(bI),r.registerSeriesModel(CI),DS("pie",r.registerAction),r.registerLayout(Q(gI,"pie")),r.registerProcessor(ro("pie")),r.registerProcessor(DI("pie"))}var II=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return yr(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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"}},e}(Et);const LI=II;var Zx=4,PI=function(){function r(){}return r}(),EI=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new PI},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var c=u*2,v=i[c]-s/2,f=i[c+1]-l/2;if(t>=v&&a>=f&&t<=v+s&&a<=f+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,v=-1/0,f=0;f=0&&(u.dataIndex=v+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const kI=RI;var NI=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=eo("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,n=a&&a.getArea&&a.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new kI:new to,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Mt);const OI=NI;var VI=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.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"},e}(lt);const BI=VI;var kc=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ft).models[0]},e.type="cartesian2dAxis",e}(lt);jt(kc,Ji);var Xx={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},zI=ot({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Xx),of=ot({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}}},Xx),GI=ot({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},of),FI=J({logBase:10},of);const Kx={category:zI,value:of,time:GI,log:FI};var HI={value:1,category:1,time:1,log:1};function cn(r,e,t,a){w(HI,function(n,i){var o=ot(ot({},Kx[i],!0),a,!0),s=function(l){R(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,v){var f=Ti(this),h=f?Tn(c):{},p=v.getTheme();ot(c,p.get(i+"Axis")),ot(c,this.getDefaultOption()),c.type=ud(c),f&&Vr(c,h,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=Lc.createByAxisModel(this))},u.prototype.getCategories=function(c){var v=this.option;if(v.type==="category")return c?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",ud)}function ud(r){return r.type||(r.data?"category":"value")}var WI=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),bt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const $I=WI;var Nc=["x","y"];function cd(r){return r.type==="interval"||r.type==="time"}var UI=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Nc,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!cd(t)||!cd(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,v=(s[1]-o[1])/u,f=o[0]-n[0]*c,h=o[1]-i[0]*v,p=this._transform=[c,0,0,v,f,h];this._invTransform=zi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new wt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Le(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var n=[];if(this._invTransform)return Le(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(a[0],a[1]),o=Math.max(t[0],t[1])-n,s=Math.max(a[0],a[1])-i;return new wt(n,i,o,s)},e}($I),YI=function(r){R(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ue);const ZI=YI;function Oc(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,c=a.getRect(),v=[c.x,c.x+c.width,c.y,c.y+c.height],f={left:0,right:1,top:0,bottom:1,onZero:2},h=e.get("offset")||0,p=u==="x"?[v[2]-h,v[3]+h]:[v[0]-h,v[1]+h];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[f.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[f[l]]:v[0],u==="x"?p[f[l]]:v[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[f[s]]-p[f.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Jt(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function vd(r){return r.get("coordinateSystem")==="cartesian2d"}function fd(r){var e={xAxisModel:null,yAxisModel:null};return w(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,Ft).models[0];e[a]=i}),e}var au=Math.log;function qx(r,e,t){var a=zr.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=dx(r,e),u=l.extent,c=l.fixMin,v=l.fixMax;if(r.type==="log"){var f=au(r.base);u=[au(u[0])/f,au(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:v});var h=a.getExtent.call(r);c&&(u[0]=h[0]),v&&(u[1]=h[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(c&&v)p=(g-d)/o;else if(c)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=Zl(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Zl(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Vt(g-m),d<0&&u[0]>=0?(d=0,g=Vt(m)):g>0&&u[1]<=0&&(g=0,d=-Vt(m))}var S=(n[0].value-i[0].value)/s,x=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*S,g+p*x),a.setInterval.call(r,p),(S||x)&&a.setNiceExtent.call(r,d+p,g-p)}var XI=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Nc,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=Wt(o),u=l.length;if(!!u){for(var c=[],v=u-1;v>=0;v--){var f=+l[v],h=o[f],p=h.model,d=h.scale;Pc(d)&&p.get("alignTicks")&&p.get("interval")==null?c.push(h):(ln(d,p),Pc(d)&&(s=h))}c.length&&(s||(s=c.pop(),ln(s.scale,s.model)),w(c,function(g){qx(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};w(a.x,function(o){hd(a,"y",o,i)}),w(a.y,function(o){hd(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=Yt(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=KD(u);if(c){var v=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[v]-=c[v]+f,u.position==="top"?o.y+=c.height+f:u.position==="left"&&(o.x+=c.width+f)}}}),l()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(s,function(u){var c=u.isHorizontal(),v=c?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(v[f],v[1-f]),KI(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}j(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):fs(n-Mr)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),dd={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(Le(s,s,o),Le(l,l,o));var c=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new te({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});nn(v.shape,v.style.lineWidth),v.anid="line",t.add(v);var f=e.get(["axisLine","symbol"]);if(f!=null){var h=e.get(["axisLine","symbolSize"]);$(f)&&(f=[f,f]),($(h)||gt(h))&&(h=[h,h]);var p=Ia(e.get(["axisLine","symbolOffset"])||0,h),d=h[0],g=h[1];w([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[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 S=Ht(f[m],-d/2,-g/2,d,g,c.stroke,!0),x=y.r+y.offset,b=u?l:s;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}),t.add(S)}})}}},axisTickLabel:function(r,e,t,a){var n=QI(t,a,e,r),i=eL(t,a,e,r);if(JI(e,i,n),tL(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=Mx(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Px(o)}},axisName:function(r,e,t,a){var n=Jt(r.axisName,e.get("name"));if(!!n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,v=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,yd(i)?r.labelOffset+o*l:0],f,h=e.get("nameRotate");h!=null&&(h=h*Mr/180);var p;yd(i)?f=ya.innerTextLayout(r.rotation,h!=null?h:r.rotation,o):(f=jI(r.rotation,i,h||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(f.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=Jt(r.nameTruncateMaxWidth,g.maxWidth,p),S=new ut({x:v[0],y:v[1],rotation:f.rotation,silent:ya.isLabelSilent(e),style:Ct(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(_n({el:S,componentModel:e,itemName:n}),S.__fullText=n,S.anid="name",e.get("triggerEvent")){var x=ya.makeAxisEventDataBase(e);x.targetType="axisName",x.name=n,q(S).eventData=x}a.add(S),S.updateTransform(),t.add(S),S.decomposeTransform()}}};function jI(r,e,t,a){var n=Wm(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return fs(n-Mr/2)?(o=l?"bottom":"top",i="center"):fs(n-Mr*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nMr/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function JI(r,e,t){if(!gx(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],v=t[t.length-1],f=t[t.length-2];a===!1?(_e(i),_e(u)):gd(i,o)&&(a?(_e(o),_e(c)):(_e(i),_e(u))),n===!1?(_e(s),_e(v)):gd(l,s)&&(n?(_e(l),_e(f)):(_e(s),_e(v)))}}function _e(r){r&&(r.ignore=!0)}function gd(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=pv([]);return Fi(n,n,-r.rotation),t.applyTransform(is([],n,r.getLocalTransform())),a.applyTransform(is([],n,e.getLocalTransform())),t.intersect(a)}}function yd(r){return r==="middle"||r==="center"}function jx(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function sL(r){var e=sf(r);if(!!e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=Vc(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=J({color:p.color},l));var g=ot(K(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:f},!1);if($(c)){var y=g.name;g.name=c.replace("{value}",y!=null?y:"")}else X(c)&&(g.name=c(g.name,g));var m=new Dt(g,null,this.ecModel);return jt(m,Ji.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.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:ot({lineStyle:{color:"#bbb"}},$n.axisLine),axisLabel:Io($n.axisLabel,!1),axisTick:Io($n.axisTick,!1),splitLine:Io($n.splitLine,!0),splitArea:Io($n.splitArea,!0),indicator:[]},e}(lt);const wL=bL;var AL=["axisLine","axisTickLabel","axisName"],TL=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=G(n,function(o){var s=o.model.get("showName")?o.name:"",l=new pr(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});w(i,function(o){w(AL,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),v=s.get("show"),f=l.get("color"),h=u.get("color"),p=O(f)?f:[f],d=O(h)?h:[h],g=[],y=[];function m(E,k,V){var N=V%k.length;return E[N]=E[N]||[],N}if(i==="circle")for(var S=n[0].getTicksCoords(),x=a.cx,b=a.cy,_=0;_3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;ou(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var v=Math.abs(i),f=(i>0?1:-1)*(v>3?.4:v>1?.15:.05);ou(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!wd(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;ou(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(dn);function ou(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(Nr(a.event),a_(r,e,t,a,n))}function a_(r,e,t,a,n){n.isAvailableBehavior=W(ts,null,t,a),r.trigger(e,n)}function ts(r,e,t){var a=t[r];return!r||a&&(!$(a)||e.event[a+"Key"])}const no=NL;function uf(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function cf(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var OL={axisPointer:1,tooltip:1,brush:1};function hl(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!OL.hasOwnProperty(a.mainType)&&n&&n.model!==t}var VL=Z(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),BL=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=Z(),this._freedGraphics=[],this._mapName=e,this._parsedXML=Lb(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=GL(e.named),a=t.regions,n=t.regionsMap;this._regions=a,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,a;try{t=e&&Pb(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=t.root,ye(a!=null)}catch(g){throw new Error(`Invalid svg format `+g.message)}var n=new tt;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,v=void 0,f=void 0;if(i!=null?(u=0,v=i):s&&(u=s.x,v=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var h=a.getBoundingRect();u==null&&(u=h.x,v=h.width),c==null&&(c=h.y,f=h.height)}l=this._boundingRect=new wt(u,c,v,f)}if(s){var p=Eb(s,l);a.scaleX=a.scaleY=p.scale,a.x=p.x,a.y=p.y}n.setClipPath(new ht({shape:l.plain()}));var d=[];return w(t.named,function(g){VL.get(g.svgNodeTagLower)!=null&&(d.push(g),zL(g.el))}),{root:n,boundingRect:l,named:d}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r}();function zL(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function GL(r){var e=[],t=Z();return w(r,function(a){if(a.namedFrom==null){var n=new eM(a.name,a.el);e.push(n),t.set(a.name,n)}}),{regions:e,regionsMap:t}}var zc=[126,25],Ad="\u5357\u6D77\u8BF8\u5C9B",Jr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var jr=0;jr0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Z(),a=Z(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(h,p){return p&&(h=p(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function v(h){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(f=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ae(e,Kt(a),{labelFetcher:f,labelDataIndex:v,defaultText:t},h);var p=e.getTextContent();if(p&&(n_(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Md(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):q(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function Id(r,e,t,a,n){r.data||_n({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function Ld(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Nt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&Zw(e,n,t),o}function Pd(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),w(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},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.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"},e}(Et);const aP=rP;function nP(r,e){var t={};return w(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c1?(x.width=S,x.height=S/g):(x.height=S,x.width=S*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,x=Yt(b,{width:p,height:d})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function uP(r,e){w(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var cP=function(){function r(){this.dimensions=o_}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Nd(l+s,l,B({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=Od,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),w(i,function(o,s){var l=G(o,function(c){return c.get("nameMap")}),u=new Nd(s,s,B({nameMap:gv(l)},n(o[0])));u.zoomLimit=Jt.apply(null,G(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=Od,u.resize(o[0],t),w(o,function(c){c.coordinateSystem=u,uP(u,c)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).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},t.push(s)}}function SP(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){bP(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=wP(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function xP(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Bd(r){return arguments.length?r:CP}function ai(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function _P(r,e){return Yt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function bP(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function wP(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,v=s.hierNode.modifier;s=su(s),i=lu(i),s&&i;){n=su(n),o=lu(o),n.hierNode.ancestor=r;var f=s.hierNode.prelim+v-i.hierNode.prelim-u+a(s,i);f>0&&(TP(AP(s,r,t),r,f),u+=f,l+=f),v+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,c+=o.hierNode.modifier}s&&!su(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=v-l),i&&!lu(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function su(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function lu(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function AP(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function TP(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function CP(r,e){return r.parentNode===e.parentNode?1:2}var DP=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),MP=function(r){R(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new DP},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,v=1-c,f=F(a.forkPosition,1),h=[];h[c]=o[c],h[v]=o[v]+(l[v]-o[v])*f,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[c]=s[c],t.lineTo(h[0],h[1]),h[c]=l[c],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(x=x-Math.PI));var A=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||A,rotation:C==null?-x:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?ls(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(q(t).focus=L),LP(n,o,c,t,p,h,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===$i||hs(t.__edge,P)}})}function LP(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),v=r.getOrient(),f=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new Ws({shape:Gc(c,v,f,n,n)})),ft(d,{shape:Gc(c,v,f,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},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 e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if($(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function h_(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function df(r,e){var t=h_(r);return ct(t,e)>=0}function pl(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var FP=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Dt(n,this,this.ecModel),o=pf.createTree(a,this,s);function s(v){v.wrapMethod("getItemModel",function(f,h){var p=o.getNodeByDataIndex(h);return p&&p.children.length&&p.isExpand||(f.parentModel=i),f})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var f=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=f&&f.collapsed!=null?!f.collapsed:v.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return qt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=pl(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.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},e}(Et);const HP=FP;function WP(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function $P(r,e){r.eachSeriesByType("tree",function(t){UP(t,e)})}function UP(r,e){var t=_P(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Bd(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(n=t.width,i=t.height,o=Bd());var s=r.getData().tree.root,l=s.children[0];if(l){mP(s),WP(l,SP,o),s.hierNode.modifier=-l.hierNode.prelim,Yn(l,xP);var u=l,c=l,v=l;Yn(l,function(S){var x=S.getLayout().x;xc.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var f=u===c?1:o(u,c)/2,h=f-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(c.getLayout().x+f+h),d=i/(v.depth-1||1),Yn(l,function(S){g=(S.getLayout().x+h)*p,y=(S.depth-1)*d;var x=ai(g,y);S.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(c.getLayout().x+f+h),p=n/(v.depth-1||1),Yn(l,function(S){y=(S.getLayout().x+h)*d,g=m==="LR"?(S.depth-1)*p:n-(S.depth-1)*p,S.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(c.getLayout().x+f+h),d=i/(v.depth-1||1),Yn(l,function(S){g=(S.getLayout().x+h)*p,y=m==="TB"?(S.depth-1)*d:i-(S.depth-1)*d,S.setLayout({x:g,y},!0)}))}}}function YP(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");B(s,o)})})}function ZP(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=ff(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function XP(r){r.registerChartView(PP),r.registerSeriesModel(HP),r.registerLayout($P),r.registerVisual(YP),ZP(r)}var Wd=["treemapZoomToNode","treemapRender","treemapMove"];function KP(r){for(var e=0;e1;)i=i.parentNode;var o=xc(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var qP=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};d_(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Dt({itemStyle:o},this,a);i=t.levels=jP(i,a);var l=G(i||[],function(v){return new Dt(v,s,a)},this),u=pf.createTree(n,this,c);function c(v){v.wrapMethod("getItemModel",function(f,h){var p=u.getNodeByDataIndex(h),d=p?l[p.depth]:null;return f.parentModel=d||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return qt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=pl(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=Z(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){p_(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,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:[]},e}(Et);function d_(r){var e=0;w(r.children,function(a){d_(a);var n=a.value;O(n)&&(n=n[0]),e+=n});var t=r.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(r.value)?r.value[0]=t:r.value=t}function jP(r,e){var t=_t(e.get("color")),a=_t(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;w(r,function(s){var l=new Dt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}const JP=qP;var QP=8,$d=8,uu=5,t2=function(){function r(e){this.group=new tt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),v={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,v,u),this._renderContent(e,v,s,l,u,c,n),al(o,v.pos,v.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Ut(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+QP*2,t.emptyItemWidth);t.totalWidth+=s+$d,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),v=CA(t.pos,t.box),f=t.totalWidth,h=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=h.length-1;d>=0;d--){var g=h[d],y=g.node,m=g.width,S=g.text;f>v.width&&(f-=m-u,m=u,S=null);var x=new Ee({shape:{points:e2(l,0,m,c,d===h.length-1,d===0)},style:J(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new ut({style:Ct(i,{text:S})}),textConfig:{position:"inside"},z2:Sn*1e4,onclick:Q(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Ct(o,{text:S}),x.ensureState("emphasis").style=p,Nt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),r2(x,e,y),l+=m+$d}},r.prototype.remove=function(){this.group.removeAll()},r}();function e2(r,e,t,a,n,i){var o=[[n?r:r-uu,e],[r+t,e],[r+t,e+a],[n?r:r-uu,e+a]];return!i&&o.splice(2,0,[r+t+uu,e+a/2]),!n&&o.push([r,e+a/2]),o}function r2(r,e,t){q(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&pl(t,e)}}const a2=t2;var n2=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nYd||Math.abs(t.dy)>Yd)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new wt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;a-=l.x,n-=l.y;var u=yn();xa(u,u,[-a,-n]),kb(u,u,[t.scale,t.scale]),xa(u,u,[a,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(!!i){var o=a.findTarget(n.offsetX,n.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&ms(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new a2(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(df(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Zn(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),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},e.type="treemap",e}(Mt);function Zn(){return{nodeGroup:[],background:[],content:[]}}function c2(r,e,t,a,n,i,o,s,l,u){if(!o)return;var c=o.getLayout(),v=r.getData(),f=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,p=c.height,d=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),S=o.viewChildren,x=c.upperHeight,b=S&&S.length,_=f.getModel("itemStyle"),A=f.getModel(["emphasis","itemStyle"]),T=f.getModel(["blur","itemStyle"]),C=f.getModel(["select","itemStyle"]),M=_.get("borderRadius")||0,D=nt("nodeGroup",Fc);if(!D)return;if(l.add(D),D.x=c.x||0,D.y=c.y||0,D.markRedraw(),Ls(D).nodeWidth=h,Ls(D).nodeHeight=p,c.isAboveViewRoot)return D;var I=nt("background",Ud,u,s2);I&&z(D,I,b&&c.upperLabelHeight);var L=f.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),k=L.get("disabled"),V=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)_i(D)&&la(D,!1),I&&(la(I,!k),v.setItemGraphicEl(o.dataIndex,I),hc(I,V,E));else{var N=nt("content",Ud,u,l2);N&&H(D,N),I.disableMorphing=!0,I&&_i(I)&&la(I,!1),la(D,!k),v.setItemGraphicEl(o.dataIndex,D),hc(D,V,E)}return D;function z(vt,at,At){var xt=q(at);if(xt.dataIndex=o.dataIndex,xt.seriesIndex=r.seriesIndex,at.setShape({x:0,y:0,width:h,height:p,r:M}),g)Y(at);else{at.invisible=!1;var Rt=o.getVisual("style"),Zt=Rt.stroke,ne=Kd(_);ne.fill=Zt;var Pt=Qr(A);Pt.fill=A.get("borderColor");var $t=Qr(T);$t.fill=T.get("borderColor");var Xt=Qr(C);if(Xt.fill=C.get("borderColor"),At){var Se=h-2*d;et(at,Zt,Rt.opacity,{x:d,y:0,width:Se,height:x})}else at.removeTextContent();at.setStyle(ne),at.ensureState("emphasis").style=Pt,at.ensureState("blur").style=$t,at.ensureState("select").style=Xt,Aa(at)}vt.add(at)}function H(vt,at){var At=q(at);At.dataIndex=o.dataIndex,At.seriesIndex=r.seriesIndex;var xt=Math.max(h-2*d,0),Rt=Math.max(p-2*d,0);if(at.culling=!0,at.setShape({x:d,y:d,width:xt,height:Rt,r:M}),g)Y(at);else{at.invisible=!1;var Zt=o.getVisual("style"),ne=Zt.fill,Pt=Kd(_);Pt.fill=ne,Pt.decal=Zt.decal;var $t=Qr(A),Xt=Qr(T),Se=Qr(C);et(at,ne,Zt.opacity,null),at.setStyle(Pt),at.ensureState("emphasis").style=$t,at.ensureState("blur").style=Xt,at.ensureState("select").style=Se,Aa(at)}vt.add(at)}function Y(vt){!vt.invisible&&i.push(vt)}function et(vt,at,At,xt){var Rt=f.getModel(xt?Xd:Zd),Zt=Ut(f.get("name"),null),ne=Rt.getShallow("show");ae(vt,Kt(f,xt?Xd:Zd),{defaultText:ne?Zt:null,inheritColor:at,defaultOpacity:At,labelFetcher:r,labelDataIndex:o.dataIndex});var Pt=vt.getTextContent();if(!!Pt){var $t=Pt.style,Xt=Rm($t.padding||0);xt&&(vt.setTextConfig({layoutRect:xt}),Pt.disableLabelLayout=!0),Pt.beforeUpdate=function(){var so=Math.max((xt?xt.width:vt.shape.width)-Xt[1]-Xt[3],0),ar=Math.max((xt?xt.height:vt.shape.height)-Xt[0]-Xt[2],0);($t.width!==so||$t.height!==ar)&&Pt.setStyle({width:so,height:ar})},$t.truncateMinChar=2,$t.lineOverflow="truncate",rt($t,xt,c);var Se=Pt.getState("emphasis");rt(Se?Se.style:null,xt,c)}}function rt(vt,at,At){var xt=vt?vt.text:null;if(!at&&At.isLeafRoot&&xt!=null){var Rt=r.get("drillDownIcon",!0);vt.text=Rt?Rt+" "+xt:xt}}function nt(vt,at,At,xt){var Rt=m!=null&&t[vt][m],Zt=n[vt];return Rt?(t[vt][m]=null,pt(Zt,Rt)):g||(Rt=new at,Rt instanceof Sa&&(Rt.z2=v2(At,xt)),yt(Zt,Rt)),e[vt][y]=Rt}function pt(vt,at){var At=vt[y]={};at instanceof Fc?(At.oldX=at.x,At.oldY=at.y):At.oldShape=B({},at.shape)}function yt(vt,at){var At=vt[y]={},xt=o.parentNode,Rt=at instanceof tt;if(xt&&(!a||a.direction==="drillDown")){var Zt=0,ne=0,Pt=n.background[xt.getRawIndex()];!a&&Pt&&Pt.oldShape&&(Zt=Pt.oldShape.width,ne=Pt.oldShape.height),Rt?(At.oldX=0,At.oldY=ne):At.oldShape={x:Zt,y:ne,width:0,height:0}}At.fadein=!Rt}}function v2(r,e){return r*o2+e}const f2=u2;var Ei=w,h2=j,Ps=-1,gf=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=K(e);this.type=a,this.mappingMethod=t,this._normalizeData=g2[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(cu(n),p2(n)):t==="category"?n.categories?d2(n):cu(n,!0):(ye(t!=="linear"||n.dataExtent),cu(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return W(this._normalizeData,this)},r.listVisualTypes=function(){return Wt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){j(e)?w(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=O(e)?[]:j(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&Ei(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(O(e))e=e.slice();else if(h2(e)){var t=[];Ei(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function cu(r,e){var t=r.visual,a=[];j(t)?Ei(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),g_(r,a)}function Po(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Hc([0,1])}}function qd(r){var e=this.option.visual;return e[Math.round(mt(r,[0,1],[0,e.length-1],!0))]||{}}function Xn(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function ni(r){var e=this.option.visual;return e[this.option.loop&&r!==Ps?r%e.length:r]}function ta(){return this.option.visual[0]}function Hc(r){return{linear:function(e){return mt(e,r,this.option.visual,!0)},category:ni,piecewise:function(e,t){var a=Wc.call(this,t);return a==null&&(a=mt(e,r,this.option.visual,!0)),a},fixed:ta}}function Wc(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=gf.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function g_(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=Bm(t);return a||[0,0,0,1]})),e}var g2={linear:function(r){return mt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=gf.findPieceIndex(r,e,!0);if(t!=null)return mt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Ps:e},fixed:he};function Eo(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=b2(n,l,d,g,p,a);m_(d,y,t,a)}})}}}function S2(r,e,t){var a=B({},e),n=t.designatedVisualItemStyle;return w(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function jd(r){var e=vu(r,"color");if(e){var t=vu(r,"colorAlpha"),a=vu(r,"colorSaturation");return a&&(e=si(e,null,null,a)),t&&(e=vs(e,t)),e}}function x2(r,e){return e!=null?si(e,null,null,r):null}function vu(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function _2(r,e,t,a,n,i){if(!(!i||!i.length)){var o=fu(e,"color")||n.color!=null&&n.color!=="none"&&(fu(e,"colorAlpha")||fu(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(c==="index"||c==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var f=new ee(v);return y_(f).drColorMappingBy=c,f}}}function fu(r,e){var t=r.get(e);return O(t)&&t.length?{name:e,range:t}:null}function b2(r,e,t,a,n,i){var o=B({},e);if(n){var s=n.type,l=s==="color"&&y_(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Ri=Math.max,Es=Math.min,Jd=Jt,yf=w,S_=["itemStyle","borderWidth"],w2=["itemStyle","gapWidth"],A2=["upperLabel","show"],T2=["upperLabel","height"];const C2={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=Yt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=F(Jd(s.width,l[0]),n),c=F(Jd(s.height,l[1]),i),v=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],h=Pi(a,f,r),p=v==="treemapRender"||v==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=h_(d);if(v!=="treemapMove"){var y=v==="treemapZoomToNode"?E2(r,h,d,u,c):p?[p.width,p.height]:[u,c],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var S={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(x),x_(d,S,!1,0),x=d.getLayout(),yf(g,function(_,A){var T=(g[A+1]||d).getValue();_.setLayout(B({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var b=r.getData().tree.root;b.setLayout(R2(s,p,h),!0),r.setLayoutInfo(s),__(b,new wt(-s.x,-s.y,n,i),g,d,0)}};function x_(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(S_),u=s.get(w2)/2,c=b_(s),v=Math.max(l,c),f=l-u,h=v-u;r.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:c},!0),n=Ri(n-2*f,0),i=Ri(i-f-h,0);var p=n*i,d=D2(r,s,p,e,t,a);if(!!d.length){var g={x:f,y:h,width:n,height:i},y=Es(n,i),m=1/0,S=[];S.area=0;for(var x=0,b=d.length;x=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function P2(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Ri(u*a/l,l/(u*n)):1/0}function Qd(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(n||c>t[l[o]])&&(c=t[l[o]]);for(var v=0,f=r.length;vvh&&(u=vh),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var A=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(x[1],x[0]);v[0].8?"left":f[0]<-.8?"right":"center",d=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*y+c[0],i.y=-f[1]*m+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",d=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*A+c[0],i.y=c[1]+C,p=x[0]<0?"right":"left",i.originX=-y*A,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*A+v[0],i.y=v[1]+C,p=x[0]>=0?"right":"left",i.originX=y*A,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(tt);const _f=J2;var Q2=function(){function r(e){this.group=new tt,this._LineCtor=e||_f}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=ig(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=ig(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!tE(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function ig(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Kt(e)}}function og(r){return isNaN(r[0])||isNaN(r[1])}function yu(r){return r&&!og(r[0])&&!og(r[1])}const bf=Q2;var mu=[],Su=[],xu=[],Ha=zm,_u=zb,sg=Math.abs;function lg(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){mu[0]=Ha(a[0],n[0],i[0],c),mu[1]=Ha(a[1],n[1],i[1],c);var v=sg(_u(mu,e)-l);v=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function bu(r,e){var t=[],a=Bb,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[Pr(u[0]),Pr(u[1])],u[2]&&u.__original.push(Pr(u[2])));var f=u.__original;if(u[2]!=null){if(ce(n[0],f[0]),ce(n[1],f[2]),ce(n[2],f[1]),c&&c!=="none"){var h=oi(s.node1),p=lg(n,f[0],h*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(v&&v!=="none"){var h=oi(s.node2),p=lg(n,f[1],h*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}ce(u[0],n[0]),ce(u[1],n[2]),ce(u[2],n[1])}else{if(ce(i[0],f[0]),ce(i[1],f[1]),ja(o,i[1],i[0]),Hi(o,o),c&&c!=="none"){var h=oi(s.node1);lc(i[0],i[0],o,h*e)}if(v&&v!=="none"){var h=oi(s.node2);lc(i[1],i[1],o,-h*e)}ce(u[0],i[0]),ce(u[1],i[1])}})}function ug(r){return r.type==="view"}var eE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new to,i=new bf,o=this.group;this._controller=new no(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(ug(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):ft(u,c,t)}bu(t.getGraph(),ii(t));var v=t.getData();s.updateData(v);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,p=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,p);var d=t.get("layout");v.graph.eachNode(function(S){var x=S.dataIndex,b=S.getGraphicEl(),_=S.getModel();if(!!b){b.off("drag").off("dragend");var A=_.get("draggable");A&&b.on("drag",function(C){switch(d){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,p),h.setFixed(x),v.setItemLayout(x,[b.x,b.y]);break;case"circular":v.setItemLayout(x,[b.x,b.y]),S.setLayout({fixed:!0},!0),xf(t,"symbolSize",S,[C.offsetX,C.offsetY]),i.updateLayout(t);break;case"none":default:v.setItemLayout(x,[b.x,b.y]),Sf(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(x)}),b.setDraggable(A,!!_.get("cursor"));var T=_.get(["emphasis","focus"]);T==="adjacency"&&(q(b).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var x=S.getGraphicEl(),b=S.getModel().get(["emphasis","focus"]);!x||b==="adjacency"&&(q(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=v.getLayout("cx"),m=v.getLayout("cy");v.graph.eachNode(function(S){C_(S,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,v){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(c,v)&&!hl(u,n,t)}),!ug(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){uf(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){cf(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),bu(t.getGraph(),ii(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=ii(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){bu(t.getGraph(),ii(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Mt);const rE=eE;function Wa(r){return"_EC_"+r}var aE=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[Wa(e)]){var n=new ea(e,t);return n.hostGraph=this,this.nodes.push(n),a[Wa(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Wa(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(gt(e)&&(e=this.nodes[e]),gt(t)&&(t=this.nodes[t]),e instanceof ea||(e=n[Wa(e)]),t instanceof ea||(t=n[Wa(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new M_(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof ea&&(e=e.id),t instanceof ea&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof ea||(t=this._nodesMap[Wa(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}jt(ea,I_("hostGraph","data"));jt(M_,I_("hostGraph","edgeData"));const nE=aE;function L_(r,e,t,a,n){for(var i=new nE(a),o=0;o "+f)),u++)}var h=t.get("coordinateSystem"),p;if(h==="cartesian2d"||h==="polar")p=yr(r,t);else{var d=Xi.get(h),g=d?d.dimensions||[]:[];ct(g,"value")<0&&g.concat(["value"]);var y=qi(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new fe(y,t),p.initData(r)}var m=new fe(["value"],t);return m.initData(l,s),n&&n(p,m),v_({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var iE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new ao(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),_a(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){G2(this);var s=L_(i,n,this,!0,l);return w(s.edges,function(u){F2(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var v=Dt.prototype.getModel;function f(p,d){var g=v.call(this,p,d);return g.resolveParentPath=h,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=h,p.getModel=f,p});function h(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),qt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var v=yS({series:this,dataIndex:t,multipleSeries:a});return v},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(n){return n.value!=null?n:B({value:0},n)}),a=new fe(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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"}}},e}(Et);const oE=iE;var sE={type:"graphRoam",event:"graphRoam",update:"none"};function lE(r){r.registerChartView(rE),r.registerSeriesModel(oE),r.registerProcessor(N2),r.registerVisual(O2),r.registerVisual(V2),r.registerLayout(H2),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,$2),r.registerLayout(Y2),r.registerCoordinateSystem("graphView",{dimensions:io.dimensions,create:X2}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},he),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},he),r.registerAction(sE,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=ff(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var uE=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),cE=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new uE},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),c=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,c)},e}(It);const vE=cE;function fE(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=F(t[0],e.getWidth()),s=F(t[1],e.getHeight()),l=F(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function ko(r,e){var t=r==null?"":r+"";return e&&($(e)?t=e.replace("{value}",t):X(e)&&(t=e(r))),t}var hE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=fE(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),f=v.get("roundCap"),h=f?Is:Pe,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,c];Gb(y,!l),u=y[0],c=y[1];for(var m=c-u,S=u,x=[],b=0;p&&b=C&&(M===0?0:i[M-1][0])Math.PI/2&&(nt+=Math.PI)):rt==="tangential"?nt=-T-Math.PI/2:gt(rt)&&(nt=rt*Math.PI/180),nt===0?v.add(new ut({style:Ct(S,{text:z,x:Y,y:et,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:H}),silent:!0})):v.add(new ut({style:Ct(S,{text:z,x:Y,y:et,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:Y,originY:et,rotation:nt}))}if(m.get("show")&&k!==x){var V=m.get("distance");V=V?V+c:c;for(var pt=0;pt<=b;pt++){P=Math.cos(T),E=Math.sin(T);var yt=new te({shape:{x1:P*(p-V)+f,y1:E*(p-V)+h,x2:P*(p-A-V)+f,y2:E*(p-A-V)+h},silent:!0,style:I});I.stroke==="auto"&&yt.setStyle({stroke:i((k+pt/b)/x)}),v.add(yt),T+=M}T-=M}else T+=C}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,c){var v=this.group,f=this._data,h=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),S=m.mapDimension("value"),x=+t.get("min"),b=+t.get("max"),_=[x,b],A=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),P=F(L.get("width"),o.r),E=F(L.get("length"),o.r),k=t.get(["pointer","icon"]),V=L.get("offsetCenter"),N=F(V[0],o.r),z=F(V[1],o.r),H=L.get("keepAspect"),Y;return k?Y=Ht(k,N-P/2,z-E,P,E,null,H):Y=new vE({shape:{angle:-Math.PI/2,width:P,r:E,x:N,y:z}}),Y.rotation=-(D+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function C(M,D){var I=g.get("roundCap"),L=I?Is:Pe,P=g.get("overlap"),E=P?g.get("width"):c/m.count(),k=P?o.r-E:o.r-(M+1)*E,V=P?o.r:o.r-M*E,N=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:V}});return P&&(N.z2=b-m.get(S,M)%b),N}(y||d)&&(m.diff(f).add(function(M){var D=m.get(S,M);if(d){var I=T(M,s);Lt(I,{rotation:-((isNaN(+D)?A[0]:mt(D,_,A,!0))+Math.PI/2)},t),v.add(I),m.setItemGraphicEl(M,I)}if(y){var L=C(M,s),P=g.get("clip");Lt(L,{shape:{endAngle:mt(D,_,A,P)}},t),v.add(L),cc(t.seriesIndex,m.dataType,M,L),p[M]=L}}).update(function(M,D){var I=m.get(S,M);if(d){var L=f.getItemGraphicEl(D),P=L?L.rotation:s,E=T(M,P);E.rotation=P,ft(E,{rotation:-((isNaN(+I)?A[0]:mt(I,_,A,!0))+Math.PI/2)},t),v.add(E),m.setItemGraphicEl(M,E)}if(y){var k=h[D],V=k?k.shape.endAngle:s,N=C(M,V),z=g.get("clip");ft(N,{shape:{endAngle:mt(I,_,A,z)}},t),v.add(N),cc(t.seriesIndex,m.dataType,M,N),p[M]=N}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),E=I.get("disabled");if(d){var k=m.getItemGraphicEl(M),V=m.getItemVisual(M,"style"),N=V.fill;if(k instanceof ke){var z=k.style;k.useStyle(B({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},V))}else k.useStyle(V),k.type!=="pointer"&&k.setColor(N);k.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",i(mt(m.get(S,M),_,[0,1],!0))),k.z2EmphasisLift=0,re(k,D),Nt(k,L,P,E)}if(y){var H=p[M];H.useStyle(m.getItemVisual(M,"style")),H.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,re(H,D),Nt(H,L,P,E)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=Ht(s,a.cx-o/2+F(l[0],a.r),a.cy-o/2+F(l[1],a.r),o,o,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),v=+t.get("max"),f=new tt,h=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new ut({silent:!0}),p[y]=new ut({silent:!0})}).update(function(y,m){h[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),S=l.get(u,y),x=new tt,b=i(mt(S,[c,v],[0,1],!0)),_=m.getModel("title");if(_.get("show")){var A=_.get("offsetCenter"),T=o.cx+F(A[0],o.r),C=o.cy+F(A[1],o.r),M=h[y];M.attr({z2:g?0:2,style:Ct(_,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+F(I[0],o.r),P=o.cy+F(I[1],o.r),E=F(D.get("width"),o.r),k=F(D.get("height"),o.r),V=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=p[y],N=D.get("formatter");M.attr({z2:g?0:2,style:Ct(D,{x:L,y:P,text:ko(S,N),width:isNaN(E)?null:E,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:V})}),S0(M,{normal:D},S,function(H){return ko(H,N)}),d&&x0(M,y,l,t,{getFormattedLabel:function(H,Y,et,rt,nt,pt){return ko(pt?pt.interpolatedValue:S,N)}}),x.add(M)}f.add(x)}),this.group.add(f),this._titleEls=h,this._detailEls=p},e.type="gauge",e}(Mt);const pE=hE;var dE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Pn(this,["value"])},e.type="series.gauge",e.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}},e}(Et);const gE=dE;function yE(r){r.registerChartView(pE),r.registerSeriesModel(gE)}var mE=["itemStyle","opacity"],SE=function(r){R(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new me,s=new ut;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(mE);c=c==null?1:c,n||We(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Lt(i,{style:{opacity:c}},o,a)):ft(i,{style:{opacity:c},shape:{points:l.points}},o,a),re(i,s),this._updateLabel(t,a),Nt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),c=u.label,v=t.getItemVisual(a,"style"),f=v.fill;ae(o,Kt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:v.opacity,defaultText:t.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:f,outsideFill:f});var h=c.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Gt(h[0][0],h[0][1]):null},ft(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),af(n,nf(l),{stroke:f})},e}(Ee),xE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new SE(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);bi(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Mt);const _E=xE;var bE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ao(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Pn(this,{coordDimensions:["value"],encodeDefaulter:Q(kv,this)})},e.prototype._defaultLabelLine=function(t){_a(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.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"}}},e}(Et);const wE=bE;function AE(r,e){return Yt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function TE(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();o$E)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||!Au(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Au(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const ZE=UE;var XE=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&ot(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){w(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=bt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);w(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.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},e}(lt);const KE=XE;var qE=function(r){R(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ue);const jE=qE;function Ra(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=$a(n,[0,o])),i!=null&&(i=Math.max(i,n!=null?n:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=$a(s,[0,o]),n=i=$a(s,[n,i]),a=0}e[0]=$a(e[0],t),e[1]=$a(e[1],t);var l=Tu(e,a);e[a]+=r;var u=n||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[a]=$a(e[a],c);var v;return v=Tu(e,a),n!=null&&(v.sign!==l.sign||v.spani&&(e[1-a]=e[a]+v.sign*i),e}function Tu(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function $a(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Cu=w,E_=Math.min,R_=Math.max,fg=Math.floor,JE=Math.ceil,hg=Vt,QE=Math.PI,tR=function(){function r(e,t,a){this.type="parallel",this._axesMap=Z(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;Cu(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new jE(o,vl(u),[0,0],u.get("type"),l)),v=c.type==="category";c.onBand=v&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(!!e.contains(a,t)){var n=a.getData();Cu(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),ln(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Yt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,c=No(e.get("axisExpandWidth"),l),v=No(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>v&&v>1&&c>0&&s>0,h=e.get("axisExpandWindow"),p;if(h)p=No(h[1]-h[0],l),h[1]=h[0]+p;else{p=No(c*(v-1),l);var d=e.get("axisExpandCenter")||fg(u/2);h=[c*d-p/2],h[1]=h[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[fg(hg(h[0]/c,1))+1,JE(hg(h[1]/c,1))-1],m=g/c*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Cu(a,function(o,s){var l=(n.axisExpandable?rR:eR)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:QE/2,vertical:0},v=[u[i].x+e.x,u[i].y+e.y],f=c[i],h=yn();Fi(h,h,f),xa(h,h,v),this._axesLayout[o]={position:v,rotation:f,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];w(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=a;ci*(1-v[0])?(u="jump",l=s-i*(1-v[2])):(l=s-i*v[1])>=0&&(l=s-i*(1-v[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Ra(l,n,o,"all"):u="none";else{var h=n[1]-n[0],p=o[1]*s/h;n=[R_(0,p-h/2)],n[1]=E_(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},r}();function No(r,e){return E_(R_(r,e[0]),e[1])}function eR(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function rR(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r=0;n--)Me(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;iuR}function G_(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function F_(r,e,t,a){var n=new tt;return n.add(new ht({name:"main",style:Cf(t),silent:!0,draggable:!0,cursor:"move",drift:Q(yg,r,e,n,["n","s","w","e"]),ondragend:Q(Da,e,{isEnd:!0})})),w(a,function(i){n.add(new ht({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Q(yg,r,e,n,i),ondragend:Q(Da,e,{isEnd:!0})}))}),n}function H_(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=vn(n,cR),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,c=t[0][1],v=t[1][1],f=c-i+n/2,h=v-i+n/2,p=c-o,d=v-s,g=p+n,y=d+n;ir(r,e,"main",o,s,p,d),a.transformable&&(ir(r,e,"w",l,u,i,y),ir(r,e,"e",f,u,i,y),ir(r,e,"n",l,u,g,i),ir(r,e,"s",l,h,g,i),ir(r,e,"nw",l,u,i,i),ir(r,e,"ne",f,u,i,i),ir(r,e,"sw",l,h,i,i),ir(r,e,"se",f,h,i,i))}function Xc(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(Cf(t)),n.attr({silent:!a,cursor:a?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Kc(r,i[0]):yR(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?fR[s]+"-resize":null})})}function ir(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(SR(Df(r,e,[[a,n],[a+i,n+o]])))}function Cf(r){return J({strokeNoScale:!0},r.brushStyle)}function W_(r,e,t,a){var n=[Ni(r,t),Ni(e,a)],i=[vn(r,t),vn(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function gR(r){return pa(r.group)}function Kc(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=qs(t[e],gR(r));return a[n]}function yR(r,e){var t=[Kc(r,e[0]),Kc(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function yg(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=$_(e,n,i);w(a,function(u){var c=vR[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(W_(s[0][0],s[1][0],s[0][1],s[1][1])),wf(e,t),Da(e,{isEnd:!1})}function mR(r,e,t,a){var n=e.__brushOption.range,i=$_(r,t,a);w(n,function(o){o[0]+=i[0],o[1]+=i[1]}),wf(r,e),Da(r,{isEnd:!1})}function $_(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Df(r,e,t){var a=z_(r,e);return a&&a!==Ca?a.clipPath(t,r._transform):K(t)}function SR(r){var e=Ni(r[0][0],r[1][0]),t=Ni(r[0][1],r[1][1]),a=vn(r[0][0],r[1][0]),n=vn(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function xR(r,e,t){if(!(!r._brushType||bR(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=Tf(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var gl={lineX:xg(0),lineY:xg(1),rect:{createCover:function(r,e){function t(a){return a}return F_({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=G_(r);return W_(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){H_(r,e,t,a)},updateCommon:Xc,contain:jc},polygon:{createCover:function(r,e){var t=new tt;return t.add(new me({name:"main",style:Cf(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ee({name:"main",draggable:!0,drift:Q(mR,r,e),ondragend:Q(Da,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Df(r,e,t)})},updateCommon:Xc,contain:jc}};function xg(r){return{createCover:function(e,t){return F_({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=G_(e),a=Ni(t[0][r],t[1][r]),n=vn(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=z_(e,t);if(o!==Ca&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),H_(e,t,l,n)},updateCommon:Xc,contain:jc}}const Mf=pR;function Y_(r){return r=If(r),function(e){return d0(e,r)}}function Z_(r,e){return r=If(r),function(t){var a=e!=null?e:t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function X_(r,e,t){var a=If(r);return function(n,i){return a.contain(i[0],i[1])&&!hl(n,e,t)}}function If(r){return wt.create(r)}var wR=["axisLine","axisTickLabel","axisName"],AR=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new Mf(a.getZr())).on("brush",W(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!TR(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tt,this.group.add(this._axisGroup),!!t.get("show")){var s=DR(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,v=t.axis.dim,f=l.getAxisLayout(v),h=B({strokeContainThreshold:c},f),p=new pr(t,h);w(wR,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(h,u,t,s,c,n),Ui(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),v=wt.create({x:l[0],y:-o/2,width:u,height:o});v.x-=c,v.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Y_(v),isTargetByCursor:X_(v,s,i),getLinearBrushOtherExtent:Z_(v,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(CR(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=G(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Ot);function TR(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function CR(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function DR(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const MR=AR;var IR={type:"axisAreaSelect",event:"axisAreaSelected"};function LR(r){r.registerAction(IR,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var PR={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function K_(r){r.registerComponentView(ZE),r.registerComponentModel(KE),r.registerCoordinateSystem("parallel",oR),r.registerPreprocessor(FE),r.registerComponentModel(pg),r.registerComponentView(MR),cn(r,"parallel",pg,PR),LR(r)}function ER(r){it(K_),r.registerChartView(RE),r.registerSeriesModel(VE),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,GE)}var RR=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}(),kR=function(r){R(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new RR},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){vr(this)},e.prototype.downplay=function(){fr(this)},e}(It),NR=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,v=t.getData(),f=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new kR,g=q(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),S=m.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),_=b.get("localX"),A=b.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),M=C.get("localX"),D=C.get("localY"),I=p.getLayout(),L,P,E,k,V,N,z,H;d.shape.extent=Math.max(1,I.dy),d.shape.orient=h,h==="vertical"?(L=(_!=null?_*u:x.x)+I.sy,P=(A!=null?A*c:x.y)+x.dy,E=(M!=null?M*u:T.x)+I.ty,k=D!=null?D*c:T.y,V=L,N=P*(1-S)+k*S,z=E,H=P*S+k*(1-S)):(L=(_!=null?_*u:x.x)+x.dx,P=(A!=null?A*c:x.y)+I.sy,E=M!=null?M*u:T.x,k=(D!=null?D*c:T.y)+I.ty,V=L*(1-S)+E*S,N=P,z=L*S+E*(1-S),H=k),d.setShape({x1:L,y1:P,x2:E,y2:k,cpx1:V,cpy1:N,cpx2:z,cpy2:H}),d.useStyle(m.getItemStyle()),_g(d.style,h,p);var Y=""+y.get("value"),et=Kt(y,"edgeLabel");ae(d,et,{labelFetcher:{getFormattedLabel:function(pt,yt,vt,at,At,xt){return t.getFormattedLabel(pt,yt,"edge",at,gn(At,et.normal&&et.normal.get("formatter"),Y),xt)}},labelDataIndex:p.dataIndex,defaultText:Y}),d.setTextConfig({position:"inside"});var rt=y.getModel("emphasis");re(d,y,"lineStyle",function(pt){var yt=pt.getItemStyle();return _g(yt,h,p),yt}),s.add(d),f.setItemGraphicEl(p.dataIndex,d);var nt=rt.get("focus");Nt(d,nt==="adjacency"?p.getAdjacentDataIndices():nt==="trajectory"?p.getTrajectoryDataIndices():nt,rt.get("blurScope"),rt.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),S=g.getModel("emphasis"),x=new ht({shape:{x:y!=null?y*u:d.x,y:m!=null?m*c:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});ae(x,Kt(g),{labelFetcher:{getFormattedLabel:function(_,A){return t.getFormattedLabel(_,A,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),re(x,g),s.add(x),v.setItemGraphicEl(p.dataIndex,x),q(x).dataType="node";var b=S.get("focus");Nt(x,b==="adjacency"?p.getAdjacentDataIndices():b==="trajectory"?p.getTrajectoryDataIndices():b,S.get("blurScope"),S.get("disabled"))}),v.eachItemGraphicEl(function(p,d){var g=v.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(OR(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Mt);function _g(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");$(a)&&$(n)&&(r.fill=new $s(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function OR(r,e,t){var a=new ht({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Lt(a,{shape:{width:r.width+20}},e,t),a}const VR=NR;var BR=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Dt(o[l],this,a));if(i&&n){var u=L_(i,n,this,!0,c);return u.data}function c(v,f){v.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(h.parentModel=m)}return h}),f.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,S=d.levelModels[m];S&&(h.parentModel=S)}return h})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return qt("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),v=c.getLayout().value,f=this.getDataParams(t,n).data.name;return qt("nameValue",{name:f!=null?f+"":null,value:v,noValue:i(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.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},e}(Et);const zR=BR;function GR(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=FR(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,c=l.edges;WR(u);var v=bt(u,function(d){return d.getLayout().value===0}),f=v.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),p=t.get("nodeAlign");HR(u,c,a,n,o,s,f,h,p)})}function FR(r,e){return Yt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function HR(r,e,t,a,n,i,o,s,l){$R(r,e,t,n,i,s,l),XR(r,e,i,n,a,o,s),ak(r,s)}function WR(r){w(r,function(e){var t=kr(e.outEdges,Rs),a=kr(e.inEdges,Rs),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function $R(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],c=[],v=0,f=0;f=0;y&&g.depth>h&&(h=g.depth),d.setLayout({depth:y?g.depth:v},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mv-1?h:v-1;o&&o!=="left"&&UR(r,o,i,A);var T=i==="vertical"?(n-t)/A:(a-t)/A;ZR(r,T,i)}function q_(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function UR(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,jR(s,l,o),Du(s,n,t,a,o),rk(s,l,o),Du(s,n,t,a,o)}function KR(r,e){var t=[],a=e==="vertical"?"y":"x",n=uc(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),w(n.keys,function(i){t.push(n.buckets.get(i))}),t}function qR(r,e,t,a,n,i){var o=1/0;w(r,function(s){var l=s.length,u=0;w(s,function(v){u+=v.getLayout().value});var c=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;c0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[f]+e;var p=n==="vertical"?a:t;if(u=c-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=v-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[f]+e-c,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function jR(r,e,t){w(r.slice().reverse(),function(a){w(a,function(n){if(n.outEdges.length){var i=kr(n.outEdges,JR,t)/kr(n.outEdges,Rs);if(isNaN(i)){var o=n.outEdges.length;i=o?kr(n.outEdges,QR,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Gr(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Gr(n,t))*e;n.setLayout({y:l},!0)}}})})}function JR(r,e){return Gr(r.node2,e)*r.getValue()}function QR(r,e){return Gr(r.node2,e)}function tk(r,e){return Gr(r.node1,e)*r.getValue()}function ek(r,e){return Gr(r.node1,e)}function Gr(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Rs(r){return r.getValue()}function kr(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),w(a,function(s){var l=new ee({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&w(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function ik(r){r.registerChartView(VR),r.registerSeriesModel(zR),r.registerLayout(GR),r.registerVisual(nk),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var j_=function(){function r(){}return r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[c],f=u[1-c],h=[n,i],p=h[c].get("type"),d=h[1-c].get("type"),g=e.data;if(g&&l){var y=[];w(g,function(x,b){var _;O(x)?(_=x.slice(),x.unshift(b)):O(x.value)?(_=B({},x),_.value=_.value.slice(),x.value.unshift(b)):_=x,y.push(_)}),e.data=y}var m=this.defaultValueDimensions,S=[{name:v,type:As(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:As(d),dimsDef:m.slice()}];return Pn(this,{coordDimensions:S,dimensionsCount:m.length+1,encodeDefaulter:Q(H0,S,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),J_=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.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},e}(Et);jt(J_,j_,!0);const ok=J_;var sk=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),v=bg(c,i,u,l,!0);i.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,c){var v=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(v);return}var f=i.getItemLayout(u);v?(We(v),Q_(f,v,i,u)):v=bg(f,i,u,l),o.add(v),i.setItemGraphicEl(u,v)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(Mt),lk=function(){function r(){}return r}(),uk=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new lk},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var x=[y,S];a.push(x)}}}return{boxData:t,outliers:a}}var yk={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==se){var a="";dt(a)}var n=gk(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function mk(r){r.registerSeriesModel(ok),r.registerChartView(vk),r.registerLayout(fk),r.registerTransform(yk)}var Sk=["color","borderColor"],xk=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Wr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(c){if(a.hasValue(c)){var v=a.getItemLayout(c);if(s&&wg(u,v))return;var f=Mu(v,c,!0);Lt(f,{shape:{points:v.ends}},t,c),Iu(f,a,c,o),i.add(f),a.setItemGraphicEl(c,f)}}).update(function(c,v){var f=n.getItemGraphicEl(v);if(!a.hasValue(c)){i.remove(f);return}var h=a.getItemLayout(c);if(s&&wg(u,h)){i.remove(f);return}f?(ft(f,{shape:{points:h.ends}},t,c),We(f)):f=Mu(h),Iu(f,a,c,o),i.add(f),a.setItemGraphicEl(c,f)}).remove(function(c){var v=n.getItemGraphicEl(c);v&&i.remove(v)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),Ag(t,this.group);var a=t.get("clip",!0)?fl(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Mu(s);Iu(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){Ag(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Mt),_k=function(){function r(){}return r}(),bk=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new _k},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(It);function Mu(r,e,t){var a=r.ends;return new bk({shape:{points:t?wk(a,r):a},z2:100})}function wg(r,e){for(var t=!0,a=0;a0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(Sk);e.useStyle(i),e.style.fill=null,e.style.stroke=n}const Tk=xk;var t1=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Et);jt(t1,j_,!0);const Ck=t1;function Dk(r){!r||!O(r.series)||w(r.series,function(e){j(e)&&e.type==="k"&&(e.type="candlestick")})}var Mk=["itemStyle","borderColor"],Ik=["itemStyle","borderColor0"],Lk=["itemStyle","borderColorDoji"],Pk=["itemStyle","color"],Ek=["itemStyle","color0"],Rk={seriesType:"candlestick",plan:Mn(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?Pk:Ek)}function a(i,o){return o.get(i===0?Lk:i>0?Mk:Ik)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=a(u,l)||c.fill;var v=o.ensureUniqueItemVisual(s,"style");B(v,c)}}}}}};const kk=Rk;var Nk={seriesType:"candlestick",plan:Mn(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=Ok(r,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=G(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],v=l[2],f=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:h};function h(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var S=m.get(s,y),x=m.get(u,y),b=m.get(c,y),_=m.get(v,y),A=m.get(f,y),T=Math.min(x,b),C=Math.max(x,b),M=V(T,S),D=V(C,S),I=V(_,S),L=V(A,S),P=[];N(P,D,0),N(P,M,1),P.push(H(L),H(D),H(I),H(M));var E=g.getItemModel(y),k=!!E.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:Tg(m,y,x,b,c,k),initBaseline:x>b?D[i]:M[i],ends:P,brushRect:z(_,A,S)})}function V(Y,et){var rt=[];return rt[n]=et,rt[i]=Y,isNaN(et)||isNaN(Y)?[NaN,NaN]:e.dataToPoint(rt)}function N(Y,et,rt){var nt=et.slice(),pt=et.slice();nt[n]=Ko(nt[n]+a/2,1,!1),pt[n]=Ko(pt[n]-a/2,1,!0),rt?Y.push(nt,pt):Y.push(pt,nt)}function z(Y,et,rt){var nt=V(Y,rt),pt=V(et,rt);return nt[n]-=a/2,pt[n]-=a/2,{x:nt[0],y:nt[1],width:a,height:pt[1]-nt[1]}}function H(Y){return Y[n]=Ko(Y[n],1),Y}}function p(d,g){for(var y=je(d.count*4),m=0,S,x=[],b=[],_,A=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(_=d.next())!=null;){var C=A.get(s,_),M=A.get(u,_),D=A.get(c,_),I=A.get(v,_),L=A.get(f,_);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=Tg(A,_,M,D,c,T),x[n]=C,x[i]=I,S=e.dataToPoint(x,null,b),y[m++]=S?S[0]:NaN,y[m++]=S?S[1]:NaN,x[i]=L,S=e.dataToPoint(x,null,b),y[m++]=S?S[1]:NaN}g.setLayout("largePoints",y)}}};function Tg(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function Ok(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=F(St(r.get("barMaxWidth"),n),n),o=F(St(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?F(s,n):Math.max(Math.min(n/2,i),o)}const Vk=Nk;function Bk(r){r.registerChartView(Tk),r.registerSeriesModel(Ck),r.registerPreprocessor(Dk),r.registerVisual(kk),r.registerLayout(Vk)}function Cg(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var zk=function(r){R(e,r);function e(t,a){var n=r.call(this)||this,i=new Qi(t,a),o=new tt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;X(v)?f=v(n):f=v,i.__t>0&&(f=-s*i.__t),this._animateSymbol(i,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return oa(t.__p1,t.__cp1)+oa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=zm,c=Hb;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var v=t.__t<1?c(a[0],i[0],n[0],o):c(n[0],i[0],a[0],1-o),f=t.__t<1?c(a[1],i[1],n[1],o):c(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(f,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var c=(a-i[l])/(i[l+1]-i[l]),v=n[l],f=n[l+1];t.x=v[0]*(1-c)+c*f[0],t.y=v[1]*(1-c)+c*f[1];var h=t.__t<1?f[0]-v[0]:v[0]-f[0],p=t.__t<1?f[1]-v[1]:v[1]-f[1];t.rotation=-Math.atan2(p,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(e1);const Kk=Xk;var qk=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),jk=function(r){R(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new qk},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+v)/2-(c-f)*i,p=(c+f)/2-(v-u)*i;t.quadraticCurveTo(h,p,v,f)}else t.lineTo(v,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var v=i[u++],f=i[u++],h=1;h0){var g=(v+p)/2-(f-d)*o,y=(f+d)/2-(p-v)*o;if(Wb(v,f,g,y,p,d,s,t,a))return l}else if(lh(v,f,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const Qk=Jk;var tN={seriesType:"lines",plan:Mn(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,c=n.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var v=t.get("clip",!0)&&fl(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=a1.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new Qk:new bf(o?i?Kk:r1:i?e1:_f),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Mt);const rN=eN;var aN=typeof Uint32Array>"u"?Array:Uint32Array,nN=typeof Float64Array>"u"?Array:Float64Array;function Dg(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),gv([n,t[0],t[1]])}))}var iN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Dg(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Dg(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ls(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ls(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.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}},e}(Et);const oN=iN;function Oo(r){return r instanceof Array||(r=[r,r]),r}var sN={seriesType:"lines",reset:function(r){var e=Oo(r.get("symbol")),t=Oo(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Oo(s.getShallow("symbol",!0)),u=Oo(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};const lN=sN;function uN(r){r.registerChartView(rN),r.registerSeriesModel(oN),r.registerLayout(a1),r.registerVisual(lN)}var cN=256,vN=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=us.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,v=this.canvas,f=v.getContext("2d"),h=e.length;v.width=t,v.height=a;for(var p=0;p0){var I=o(S)?l:u;S>0&&(S=S*M+T),b[_++]=I[D],b[_++]=I[D+1],b[_++]=I[D+2],b[_++]=I[D+3]*S*256}else _+=4}return f.putImageData(x,0,0),v},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=us.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const fN=vN;function hN(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function Mg(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var dN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Mg(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(Mg(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Wr(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=Pa(s,"cartesian2d"),u,c,v,f;if(l){var h=s.getAxis("x"),p=s.getAxis("y");u=h.getBandWidth()+.5,c=p.getBandWidth()+.5,v=h.scale.getExtent(),f=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),b=Kt(t),_=t.getModel("emphasis"),A=_.get("focus"),T=_.get("blurScope"),C=_.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;Dv[1]||Ef[1])continue;var k=s.dataToPoint([P,E]);I=new ht({shape:{x:k[0]-u/2,y:k[1]-c/2,width:u,height:c},style:L})}else{if(isNaN(g.get(M[1],D)))continue;I=new ht({z2:1,shape:s.dataToRect([g.get(M[0],D)]).contentShape,style:L})}if(g.hasItemOption){var V=g.getItemModel(D),N=V.getModel("emphasis");y=N.getModel("itemStyle").getItemStyle(),m=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),x=V.get(["itemStyle","borderRadius"]),A=N.get("focus"),T=N.get("blurScope"),C=N.get("disabled"),b=Kt(V)}I.shape.r=x;var z=t.getRawValue(D),H="-";z&&z[2]!=null&&(H=z[2]+""),ae(I,b,{labelFetcher:t,labelDataIndex:D,defaultOpacity:L.opacity,defaultText:H}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=S,Nt(I,A,T,C),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),g.setItemGraphicEl(D,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new fN;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=t.getViewRect().clone(),v=t.getRoamTransform();c.applyTransform(v);var f=Math.max(c.x,0),h=Math.max(c.y,0),p=Math.min(c.width+c.x,i.getWidth()),d=Math.min(c.height+c.y,i.getHeight()),g=p-f,y=d-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(m,function(A,T,C){var M=t.dataToPoint([A,T]);return M[0]-=f,M[1]-=h,M.push(C),M}),x=n.getExtent(),b=n.type==="visualMap.continuous"?pN(x,n.option.range):hN(x,n.getPieceList(),n.option.selected);u.update(S,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var _=new ke({style:{width:g,height:y,x:f,y:h,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(Mt);const gN=dN;var yN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return yr(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Xi.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Et);const mN=yN;function SN(r){r.registerChartView(gN),r.registerSeriesModel(mN)}var xN=["itemStyle","borderWidth"],Ig=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Eu=new ur,_N=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),v=l.master.getRect(),f={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:c,valueDim:Ig[+c],categoryDim:Ig[1-+c]};return o.diff(s).add(function(h){if(!!o.hasValue(h)){var p=Pg(o,h),d=Lg(o,h,p,f),g=Eg(o,f,d);o.setItemGraphicEl(h,g),i.add(g),kg(g,f,d)}}).update(function(h,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(h)){i.remove(d);return}var g=Pg(o,h),y=Lg(o,h,g,f),m=u1(o,y);d&&m!==d.__pictorialShapeStr&&(i.remove(d),o.setItemGraphicEl(h,null),d=null),d?MN(d,f,y):d=Eg(o,f,y,!0),o.setItemGraphicEl(h,d),d.__pictorialSymbolMeta=y,i.add(d),kg(d,f,y)}).remove(function(h){var p=s.getItemGraphicEl(h);p&&Rg(s,h,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Rg(i,q(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Mt);function Lg(r,e,t,a){var n=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,v=t.isAnimationEnabled(),f={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};bN(t,i,n,a,f),wN(r,e,n,i,o,f.boundingLength,f.pxSign,c,a,f),AN(t,f.symbolScale,u,a,f);var h=f.symbolSize,p=Ia(t.get("symbolOffset"),h);return TN(t,h,n,i,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,a,f),f}function bN(r,e,t,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(O(o)){var v=[Ru(s,o[0])-l,Ru(s,o[1])-l];v[1]0?1:-1}function Ru(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function wN(r,e,t,a,n,i,o,s,l,u){var c=l.valueDim,v=l.categoryDim,f=Math.abs(t[v.wh]),h=r.getItemVisual(e,"symbolSize"),p;O(h)?p=h.slice():h==null?p=["100%","100%"]:p=[h,h],p[v.index]=F(p[v.index],f),p[c.index]=F(p[c.index],a?f:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[c.index]*=(l.isHorizontal?-1:1)*o}function AN(r,e,t,a,n){var i=r.get(xN)||0;i&&(Eu.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Eu.updateTransform(),i/=Eu.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function TN(r,e,t,a,n,i,o,s,l,u,c,v){var f=c.categoryDim,h=c.valueDim,p=v.pxSign,d=Math.max(e[h.index]+s,0),g=d;if(a){var y=Math.abs(l),m=Jt(r.get("symbolMargin"),"15%")+"",S=!1;m.lastIndexOf("!")===m.length-1&&(S=!0,m=m.slice(0,m.length-1));var x=F(m,e[h.index]),b=Math.max(d+x*2,0),_=S?0:x*2,A=Um(a),T=A?a:Ng((y+_)/b),C=y-T*d;x=C/2/(S?T:Math.max(T-1,1)),b=d+x*2,_=S?0:x*2,!A&&a!=="fixed"&&(T=u?Ng((Math.abs(u)+_)/b):0),g=T*b-_,v.repeatTimes=T,v.symbolMargin=x}var M=p*(g/2),D=v.pathPosition=[];D[f.index]=t[f.wh]/2,D[h.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var I=v.bundlePosition=[];I[f.index]=t[f.xy],I[h.index]=t[h.xy];var L=v.barRectShape=B({},t);L[h.wh]=p*Math.max(Math.abs(t[h.wh]),Math.abs(D[h.index]+M)),L[f.wh]=t[f.wh];var P=v.clipShape={};P[f.xy]=-t[f.xy],P[f.wh]=c.ecSize[f.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function n1(r){var e=r.symbolPatternSize,t=Ht(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function i1(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,v=i[e.valueDim.index]+o+t.symbolMargin*2;for(Lf(r,function(d){d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,c0:y<0)&&(m=u-1-d),g[l.index]=v*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function o1(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?en(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=n1(t),n.add(i),en(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function s1(r,e,t){var a=B({},e.barRectShape),n=r.__pictorialBarRect;n?en(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new ht({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function l1(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=B({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)ft(n,{shape:i},s,l);else{i[o.wh]=0,n=new ht({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Zi[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Pg(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=CN,t.isAnimationEnabled=DN,t}function CN(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function DN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Eg(r,e,t,a){var n=new tt,i=new tt;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?i1(n,e,t):o1(n,e,t),s1(n,t,a),l1(n,e,t,a),n.__pictorialShapeStr=u1(r,t),n.__pictorialSymbolMeta=t,n}function MN(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;ft(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?i1(r,e,t,!0):o1(r,e,t,!0),s1(r,t,!0),l1(r,e,t,!0)}function Rg(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Lf(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),w(i,function(o){Or(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function u1(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Lf(r,e,t){w(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function en(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&Zi[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function kg(r,e,t){var a=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=i.get("focus"),v=i.get("blurScope"),f=i.get("scale");Lf(r,function(d){if(d instanceof ke){var g=d.style;d.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,f&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;ae(p,Kt(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:un(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Nt(r,c,v,i.get("disabled"))}function Ng(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const IN=_N;var LN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=$r(Ms.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%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Ms);const PN=LN;function EN(r){r.registerChartView(IN),r.registerSeriesModel(PN),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Q(sx,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,lx("pictorialBar"))}var RN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,v=u.boundaryGap;s.x=0,s.y=c.y+v[0];function f(g){return g.name}var h=new hr(this._layersSeries||[],l,f,f),p=[];h.add(W(d,this,"add")).update(W(d,this,"update")).remove(W(d,this,"remove")).execute();function d(g,y,m){var S=o._layers;if(g==="remove"){s.remove(S[y]);return}for(var x=[],b=[],_,A=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=v)}return{y0:n,max:i}}function GN(r){r.registerChartView(NN),r.registerSeriesModel(VN),r.registerLayout(BN),r.registerProcessor(ro("themeRiver"))}var FN=2,HN=4,WN=function(r){R(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=FN,o.textConfig={inside:!0},q(o).seriesIndex=a.seriesIndex;var s=new ut({z2:HN,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;q(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),v=B({},c);v.label=null;var f=a.getVisual("style");f.lineJoin="bevel";var h=a.getVisual("decal");h&&(f.decal=sn(h,o));var p=va(l.getModel("itemStyle"),v,!0);B(v,p),w(pe,function(m){var S=s.ensureState(m),x=l.getModel([m,"itemStyle"]);S.style=x.getItemStyle();var b=va(x,v);b&&(S.shape=b)}),t?(s.setShape(v),s.shape.r=c.r0,Lt(s,{shape:{r:c.r}},n,a.dataIndex)):(ft(s,{shape:v},n),We(s)),s.useStyle(f),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Nt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),v=this,f=v.getTextContent(),h=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)Math.PI/2?"right":"left"):!I||I==="center"?(s===2*Math.PI&&o.r0===0?M=0:M=(o.r+o.r0)/2,I="center"):I==="left"?(M=o.r0+D,l>Math.PI/2&&(I="right")):I==="right"&&(M=o.r-D,l>Math.PI/2&&(I="left")),x.style.align=I,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=M*u+o.cx,x.y=M*c+o.cy;var L=g(m,"rotate"),P=0;L==="radial"?(P=sa(-l),P>Math.PI/2&&PMath.PI/2?P-=Math.PI:P<-Math.PI/2&&(P+=Math.PI)):gt(L)&&(P=L*Math.PI/180),x.rotation=sa(P)});function g(y,m){var S=y.get(m);return S==null?i.get(m):S}f.dirtyStyle()},e}(Pe);const Vg=WN;var Jc="sunburstRootToNode",Bg="sunburstHighlight",$N="sunburstUnhighlight";function UN(r){r.registerAction({type:Jc,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=Pi(e,[Jc],n);if(o){var s=n.getViewRoot();s&&(e.direction=df(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:Bg,update:"none"},function(e,t,a){e=B({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Pi(e,[Bg],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(B(e,{type:"highlight"}))}),r.registerAction({type:$N,update:"updateView"},function(e,t,a){e=B({},e),a.dispatchAction(B(e,{type:"downplay"}))})}var YN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,v=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(m){f.push(m)});var h=this._oldChildren||[];p(f,h),y(l,u),this._initEvents(),this._oldChildren=f;function p(m,S){if(m.length===0&&S.length===0)return;new hr(S,m,x,x).add(b).update(b).remove(Q(b,null)).execute();function x(_){return _.getId()}function b(_,A){var T=_==null?null:m[_],C=A==null?null:S[A];d(T,C)}}function d(m,S){if(!v&&m&&!m.getValue()&&(m=null),m!==l&&S!==l){if(S&&S.piece)m?(S.piece.updateData(!1,m,t,a,n),s.setItemGraphicEl(m.dataIndex,S.piece)):g(S);else if(m){var x=new Vg(m,t,a,n);c.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){!m||m.piece&&(c.remove(m.piece),m.piece=null)}function y(m,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new Vg(m,t,a,n),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";ms(u,c)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Jc,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Mt);const ZN=YN;var XN=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};c1(n);var i=this._levelModels=G(t.levels||[],function(l){return new Dt(l,this,a)},this),o=pf.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var v=o.getNodeByDataIndex(c),f=i[v.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=pl(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){p_(this)},e.type="series.sunburst",e.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"},e}(Et);function c1(r){var e=0;w(r.children,function(a){c1(a);var n=a.value;O(n)&&(n=n[0]),e+=n});var t=r.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(r.value)?r.value[0]=t:r.value=t}const KN=XN;var zg=Math.PI/180;function qN(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");O(i)||(i=[0,i]),O(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=F(n[0],o),c=F(n[1],s),v=F(i[0],l/2),f=F(i[1],l/2),h=-a.get("startAngle")*zg,p=a.get("minAngle")*zg,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&v1(g,m);var S=0;w(g.children,function(k){!isNaN(k.getValue())&&S++});var x=g.getValue(),b=Math.PI/(x||S)*2,_=g.depth>0,A=g.height-(_?-1:1),T=(f-v)/(A||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=C?1:-1,I=function(k,V){if(!!k){var N=V;if(k!==d){var z=k.getValue(),H=x===0&&M?b:z*b;H1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&$(s)&&(s=oc(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");B(u,l)})})}function QN(r){r.registerChartView(ZN),r.registerSeriesModel(KN),r.registerLayout(Q(qN,"sunburst")),r.registerProcessor(Q(ro,"sunburst")),r.registerVisual(JN),UN(r)}var Gg={color:"fill",borderColor:"stroke"},tO={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},sr=st(),eO=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return yr(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=sr(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Et);const rO=eO;function aO(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function nO(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:W(aO,r)}}}function iO(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function oO(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:W(iO,r)}}}function sO(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function lO(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:W(sO,r)}}}function uO(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function cO(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:W(uO,r)}}}function vO(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}function f1(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||U(r,"text")))}function h1(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},U(a,"text")&&(o.text=a.text),U(a,"rich")&&(o.rich=a.rich),U(a,"textFill")&&(o.fill=a.textFill),U(a,"textStroke")&&(o.stroke=a.textStroke),U(a,"fontFamily")&&(o.fontFamily=a.fontFamily),U(a,"fontSize")&&(o.fontSize=a.fontSize),U(a,"fontStyle")&&(o.fontStyle=a.fontStyle),U(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=U(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),U(a,"textPosition")&&(n.position=a.textPosition),U(a,"textOffset")&&(n.offset=a.textOffset),U(a,"textRotation")&&(n.rotation=a.textRotation),U(a,"textDistance")&&(n.distance=a.textDistance)}return Fg(o,r),w(o.rich,function(l){Fg(l,l)}),{textConfig:n,textContent:i}}function Fg(r,e){!e||(e.font=e.textFont||e.font,U(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),U(e,"textAlign")&&(r.align=e.textAlign),U(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),U(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),U(e,"textWidth")&&(r.width=e.textWidth),U(e,"textHeight")&&(r.height=e.textHeight),U(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),U(e,"textPadding")&&(r.padding=e.textPadding),U(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),U(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),U(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),U(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),U(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),U(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),U(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function Hg(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";Wg(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,w(e.rich,function(s){Wg(s,s)}),a}function Wg(r,e){!e||(U(e,"fill")&&(r.textFill=e.fill),U(e,"stroke")&&(r.textStroke=e.fill),U(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),U(e,"font")&&(r.font=e.font),U(e,"fontStyle")&&(r.fontStyle=e.fontStyle),U(e,"fontWeight")&&(r.fontWeight=e.fontWeight),U(e,"fontSize")&&(r.fontSize=e.fontSize),U(e,"fontFamily")&&(r.fontFamily=e.fontFamily),U(e,"align")&&(r.textAlign=e.align),U(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),U(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),U(e,"width")&&(r.textWidth=e.width),U(e,"height")&&(r.textHeight=e.height),U(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),U(e,"padding")&&(r.textPadding=e.padding),U(e,"borderColor")&&(r.textBorderColor=e.borderColor),U(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),U(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),U(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),U(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),U(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),U(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),U(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),U(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),U(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),U(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var p1={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},$g=Wt(p1);rn(mi,function(r,e){return r[e]=1,r},{});mi.join(", ");var ks=["","style","shape","extra"],fn=st();function Pf(r,e,t,a,n){var i=r+"Animation",o=xn(r,a,n)||{},s=fn(e).userDuring;return o.duration>0&&(o.during=s?W(gO,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),B(o,t[i]),o}function es(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=fn(r),u=e.style;l.userDuring=e.during;var c={},v={};if(mO(r,e,v),Yg("shape",e,v),Yg("extra",e,v),!i&&s&&(yO(r,e,c),Ug("shape",r,e,c),Ug("extra",r,e,c),SO(r,e,u,c)),v.style=u,fO(r,v,o),pO(r,e),s)if(i){var f={};w(ks,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(f[p]=f[p]||{}),B(p?f[p]:f,d.enterFrom))});var h=Pf("enter",r,e,t,n);h.duration>0&&r.animateFrom(f,h)}else hO(r,e,n||0,t,c);d1(r,e),u?r.dirty():r.markRedraw()}function d1(r,e){for(var t=fn(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function pO(r,e){U(e,"silent")&&(r.silent=e.silent),U(e,"ignore")&&(r.ignore=e.ignore),r instanceof Sa&&U(e,"invisible")&&(r.invisible=e.invisible),r instanceof It&&U(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Ye={},dO={setTransform:function(r,e){return Ye.el[r]=e,this},getTransform:function(r){return Ye.el[r]},setShape:function(r,e){var t=Ye.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Ye.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Ye.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Ye.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Ye.el.extra||(Ye.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Ye.el.extra;if(e)return e[r]}};function gO(){var r=this,e=r.el;if(!!e){var t=fn(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Ye.el=e,a(dO)}}function Ug(r,e,t,a){var n=t[r];if(!!n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),ma(l))B(o,i);else for(var u=_t(l),c=0;c=0){!o&&(o=a[r]={});for(var h=Wt(i),c=0;c=0)){var f=r.getAnimationStyleProps(),h=f?f.style:null;if(h){!i&&(i=a.style={});for(var p=Wt(t),u=0;u=0?e.getStore().get(V,E):void 0}var N=e.get(k.name,E),z=k&&k.ordinalMeta;return z?z.categories[N]:N}function _(P,E){E==null&&(E=u);var k=e.getItemVisual(E,"style"),V=k&&k.fill,N=k&&k.opacity,z=m(E,Ir).getItemStyle();V!=null&&(z.fill=V),N!=null&&(z.opacity=N);var H={inheritColor:$(V)?V:"#000"},Y=S(E,Ir),et=Ct(Y,null,H,!1,!0);et.text=Y.getShallow("show")?St(r.getFormattedLabel(E,Ir),un(e,E)):null;var rt=gs(Y,H,!1);return C(P,z),z=Hg(z,et,rt),P&&T(z,P),z.legacy=!0,z}function A(P,E){E==null&&(E=u);var k=m(E,lr).getItemStyle(),V=S(E,lr),N=Ct(V,null,null,!0,!0);N.text=V.getShallow("show")?gn(r.getFormattedLabel(E,lr),r.getFormattedLabel(E,Ir),un(e,E)):null;var z=gs(V,null,!0);return C(P,k),k=Hg(k,N,z),P&&T(k,P),k.legacy=!0,k}function T(P,E){for(var k in E)U(E,k)&&(P[k]=E[k])}function C(P,E){P&&(P.textFill&&(E.textFill=P.textFill),P.textPosition&&(E.textPosition=P.textPosition))}function M(P,E){if(E==null&&(E=u),U(Gg,P)){var k=e.getItemVisual(E,"style");return k?k[Gg[P]]:null}if(U(tO,P))return e.getItemVisual(E,P)}function D(P){if(i.type==="cartesian2d"){var E=i.getBaseAxis();return MD(J({axis:E},P))}}function I(){return t.getCurrentSeriesIndices()}function L(P){return m0(P,t)}}function LO(r){var e={};return w(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Vu(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=Of(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&Nt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Of(r,e,t,a,n,i){var o=-1,s=e;e&&S1(e,a,n)&&(o=ct(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=kf(a),s&&TO(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),be.normal.cfg=be.normal.conOpt=be.emphasis.cfg=be.emphasis.conOpt=be.blur.cfg=be.blur.conOpt=be.select.cfg=be.select.conOpt=null,be.isLegacy=!1,EO(u,t,a,n,l,be),PO(u,t,a,n,l),Nf(r,u,t,a,be,n,l),U(a,"info")&&(sr(u).info=a.info);for(var c=0;c=0?i.replaceAt(u,o):i.add(u),u}function S1(r,e,t){var a=sr(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&VO(i)&&x1(i)!==a.customPathData||n==="image"&&U(o,"image")&&o.image!==a.customImagePath}function PO(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&S1(o,i,a)&&(o=null),o||(o=kf(i),r.setClipPath(o)),Nf(null,o,e,i,null,a,n)}}function EO(r,e,t,a,n,i){if(!r.isGroup){Xg(t,null,i),Xg(t,lr,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=kf(o),r.setTextContent(c)),Nf(null,c,e,o,null,a,n);for(var v=o&&o.style,f=0;f=c;h--){var p=e.childAt(h);kO(e,p,n)}}}function kO(r,e,t){e&&yl(e,sr(r).option,t)}function NO(r){new hr(r.oldChildren,r.newChildren,Kg,Kg,r).add(qg).update(qg).remove(OO).execute()}function Kg(r,e){var t=r&&r.name;return t!=null?t:wO+e}function qg(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;Of(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function OO(r){var e=this.context,t=e.oldChildren[r];t&&yl(t,sr(t).option,e.seriesModel)}function x1(r){return r&&(r.pathData||r.d)}function VO(r){return r&&(U(r,"pathData")||U(r,"d"))}function BO(r){r.registerChartView(DO),r.registerSeriesModel(rO)}var na=st(),jg=K,Bu=W,zO=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,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,i,e,t,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var v=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new tt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var f=Q(Jg,t,v);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,t)}ty(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=sf(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=na(e).pointerEl=new Zi[i.type](jg(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=na(e).labelEl=new ut(jg(t.label));e.add(i),Qg(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=na(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=na(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),Qg(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Yi(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Nr(u.event)},onmousedown:Bu(this._onHandleDragMove,this,0,0),drift:Bu(this._onHandleDragMove,this),ondragend:Bu(this._onHandleDragEnd,this)}),a.add(n)),ty(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");O(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,In(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Jg(this._axisPointerModel,!t&&this._moveAnimation,this._handle,zu(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(!!a){this._dragging=!0;var n=this.updateHandleTransform(zu(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(zu(n)),na(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Di(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function Jg(r,e,t,a){_1(na(t).lastProp,a)||(na(t).lastProp=a,e?ft(t,a,r):(t.stopAnimation(),t.attr(a)))}function _1(r,e){if(j(r)&&j(e)){var t=!0;return w(e,function(a,n){t=t&&_1(r[n],a)}),!!t}else return r===e}function Qg(r,e){r[e.get(["label","show"])?"show":"hide"]()}function zu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function ty(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}const Bf=zO;function zf(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function b1(r,e,t,a,n){var i=t.get("value"),o=w1(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=An(s.get("padding")||0),u=s.getFont(),c=Us(o,u),v=n.position,f=c.width+l[1]+l[3],h=c.height+l[0]+l[2],p=n.align;p==="right"&&(v[0]-=f),p==="center"&&(v[0]-=f/2);var d=n.verticalAlign;d==="bottom"&&(v[1]-=h),d==="middle"&&(v[1]-=h/2),GO(v,f,h,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:v[0],y:v[1],style:Ct(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function GO(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function w1(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:ef(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};w(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,v=u&&u.getDataParams(c);v&&s.seriesData.push(v)}),$(o)?i=o.replace("{value}",i):X(o)&&(i=o(s))}return i}function Gf(r,e,t){var a=yn();return Fi(a,a,t.rotation),xa(a,a,t.position),He([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function A1(r,e,t,a,n,i){var o=pr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),b1(e,a,n,i,{position:Gf(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Ff(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function T1(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function ey(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var FO=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),c=ry(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var f=zf(i),h=HO[u](s,v,c);h.style=f,t.graphicKey=h.type,t.pointer=h}var p=Oc(l.model,n);A1(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Oc(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Gf(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=ry(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,v=[t.x,t.y];v[c]+=a[c],v[c]=Math.min(l[1],v[c]),v[c]=Math.max(l[0],v[c]);var f=(u[1]+u[0])/2,h=[f,f];h[c]=v[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:p[c]}},e}(Bf);function ry(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var HO={line:function(r,e,t){var a=Ff([e,t[0]],[e,t[1]],ay(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:T1([e-a/2,t[0]],[a,n],ay(r))}}};function ay(r){return r.dim==="x"?0:1}const WO=FO;var $O=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.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}},e}(lt);const UO=$O;var or=st(),YO=w;function C1(r,e,t){if(!kt.node){var a=e.getZr();or(a).records||(or(a).records={}),ZO(a,e);var n=or(a).records[r]||(or(a).records[r]={});n.handler=t}}function ZO(r,e){if(or(r).initialized)return;or(r).initialized=!0,t("click",Q(ny,"click")),t("mousemove",Q(ny,"mousemove")),t("globalout",KO);function t(a,n){r.on(a,function(i){var o=qO(e);YO(or(r).records,function(s){s&&n(s,i,o.dispatchAction)}),XO(o.pendings,e)})}}function XO(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function KO(r,e,t){r.handler("leave",null,t)}function ny(r,e,t,a){e.handler(r,t,a)}function qO(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function ev(r,e){if(!kt.node){var t=e.getZr(),a=(or(t).records||{})[r];a&&(or(t).records[r]=null)}}var jO=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";C1("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})})},e.prototype.remove=function(t,a){ev("axisPointer",a)},e.prototype.dispose=function(t,a){ev("axisPointer",a)},e.type="axisPointer",e}(Ot);const JO=jO;function D1(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=ba(i,r);if(o==null||o<0||O(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),v=c.dim,f=u.dim,h=v==="x"||v==="radius"?1:0,p=i.mapDimension(f),d=[];d[h]=i.get(p,o),d[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(G(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var iy=st();function QO(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||W(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){rs(n)&&(n=D1({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=rs(n),u=i.axesInfo,c=s.axesInfo,v=a==="leave"||rs(n),f={},h={},p={list:[],map:{}},d={showPointer:Q(eV,h),showTooltip:Q(rV,p)};w(s.coordSysMap,function(y,m){var S=l||y.containPoint(n);w(s.coordSysAxesInfo[m],function(x,b){var _=x.axis,A=oV(u,x);if(!v&&S&&(!u||A)){var T=A&&A.value;T==null&&!l&&(T=_.pointToData(n)),T!=null&&oy(x,T,d,!1,f)}})});var g={};return w(c,function(y,m){var S=y.linkGroup;S&&!h[m]&&w(S.axesInfo,function(x,b){var _=h[b];if(x!==y&&_){var A=_.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,sy(x),sy(y)))),g[y.key]=A}})}),w(g,function(y,m){oy(c[m],y,d,!0,f)}),aV(h,c,f),nV(p,n,r,o),iV(c,o,t),f}}function oy(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=tV(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function tV(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return w(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),v,f;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,t);f=h.dataIndices,v=h.nestestValue}else{if(f=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!f.length)return;v=l.getData().get(c[0],f[0])}if(!(v==null||!isFinite(v))){var p=r-v,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=v,i.length=0),w(f,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function eV(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function rV(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Li(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function aV(r,e,t){var a=t.axesInfo=[];w(e,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function nV(r,e,t,a){if(rs(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function iV(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=iy(a)[n]||{},o=iy(a)[n]={};w(r,function(u,c){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&w(v.seriesDataIndices,function(f){var h=f.seriesIndex+" | "+f.dataIndex;o[h]=f})});var s=[],l=[];w(i,function(u,c){!o[c]&&l.push(u)}),w(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function oV(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function sy(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function rs(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function oo(r){Ea.registerAxisPointerClass("CartesianAxisPointer",WO),r.registerComponentModel(UO),r.registerComponentView(JO),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!O(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=rL(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},QO)}function sV(r){it(r_),it(oo)}var lV=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),v=s.dataToCoord(a),f=i.get("type");if(f&&f!=="none"){var h=zf(i),p=cV[f](s,l,v,c);p.style=h,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=uV(a,n,i,l,d);b1(t,n,i,o,g)},e}(Bf);function uV(r,e,t,a,n){var i=e.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,v;if(i.dim==="radius"){var f=yn();Fi(f,f,s),xa(f,f,[a.cx,a.cy]),u=He([o,-n],f);var h=e.getModel("axisLabel").get("rotate")||0,p=pr.innerTextLayout(s,h*Math.PI/180,-1);c=p.textAlign,v=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;c=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",v=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:v}}var cV={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:Ff(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:ey(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:ey(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const vV=lV;var fV=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(lt);const hV=fV;var Hf=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ft).models[0]},e.type="polarAxis",e}(lt);jt(Hf,Ji);var pV=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Hf),dV=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Hf),Wf=function(r){R(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Ue);Wf.prototype.dataToRadius=Ue.prototype.dataToCoord;Wf.prototype.radiusToData=Ue.prototype.coordToData;const gV=Wf;var yV=st(),$f=function(r){R(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Us(s==null?"":s+"",a.getFont(),"center","top"),v=Math.max(c.height,7),f=v/u;isNaN(f)&&(f=1/0);var h=Math.max(0,Math.floor(f)),p=yV(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-h)<=1&&Math.abs(g-o)<=1&&d>h?h=d:(p.lastTickCount=o,p.lastAutoInterval=h),h},e}(Ue);$f.prototype.dataToAngle=Ue.prototype.dataToCoord;$f.prototype.angleToData=Ue.prototype.coordToData;const mV=$f;var M1=["radius","angle"],SV=function(){function r(e){this.dimensions=M1,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new gV,this._angleAxis=new mV,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],a=e[1]/180*Math.PI,n=Math.cos(a)*t+this.cx,i=-Math.sin(a)*t+this.cy;return[n,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,v=this.r,f=this.r0;return c<=v*v&&c>=f*f}}},r.prototype.convertToPixel=function(e,t,a){var n=ly(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=ly(t);return n===this?this.pointToData(a):null},r}();function ly(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const xV=SV;function _V(r,e,t){var a=e.get("center"),n=t.getWidth(),i=t.getHeight();r.cx=F(a[0],n),r.cy=F(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:O(l)||(l=[0,l]);var u=[F(l[0],s),F(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function bV(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();w(Ts(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),w(Ts(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),ln(a.scale,a.model),ln(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function wV(r){return r.mainType==="angleAxis"}function uy(r,e){if(r.type=e.get("type"),r.scale=vl(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),wV(e)){r.inverse=r.inverse!==e.get("clockwise");var t=e.get("startAngle");r.setExtent(t,t+(r.inverse?-360:360))}e.axis=r,r.model=e}var AV={dimensions:M1,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new xV(n+"");i.update=bV;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");uy(o,l),uy(s,u),_V(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",Ft).models[0];a.coordinateSystem=n.coordinateSystem}}),t}};const TV=AV;var CV=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Vo(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Bo(r){var e=r.getRadiusAxis();return e.inverse?0:1}function cy(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var DV=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=G(n.getViewLabels(),function(c){c=K(c);var v=n.scale,f=v.type==="ordinal"?v.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(f),c});cy(u),cy(s),w(CV,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&MV[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Ea),MV={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=Bo(t),l=s?0:1,u;i[l]===0?u=new ur({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Hs({shape:{cx:t.cx,cy:t.cy,r:i[s],r0:i[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Bo(t)],u=G(a,function(c){return new te({shape:Vo(t,[l,l+s],c.coord)})});r.add(Ce(u,{style:J(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(!!n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Bo(t)],c=[],v=0;vy?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];j(b)&&b.textStyle&&(h=new Dt(b.textStyle,l,l.ecModel))}var _=new ut({silent:pr.isLabelSilent(e),style:Ct(h,{x:g[0],y:g[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:S,verticalAlign:x})});if(r.add(_),c){var A=pr.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=v.rawLabel,q(_).eventData=A}},this)},splitLine:function(r,e,t,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],v=0;v=0?"p":"n",L=A;b&&(a[c][D]||(a[c][D]={p:A,n:A}),L=a[c][D][I]);var P=void 0,E=void 0,k=void 0,V=void 0;if(p.dim==="radius"){var N=p.dataToCoord(M)-A,z=l.dataToCoord(D);Math.abs(N)=V})}}})}function VV(r){var e={};w(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=L1(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),v=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=v.stacks;e[l]=v;var h=I1(a);f[h]||v.autoWidthCount++,f[h]=f[h]||{width:0,maxWidth:0};var p=F(a.get("barWidth"),c),d=F(a.get("barMaxWidth"),c),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!f[h].width&&(p=Math.min(v.remainedWidth,p),f[h].width=p,v.remainedWidth-=p),d&&(f[h].maxWidth=d),g!=null&&(v.gap=g),y!=null&&(v.categoryGap=y)});var t={};return w(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=F(a.categoryGap,o),l=F(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,v=(u-s)/(c+(c-1)*l);v=Math.max(v,0),w(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=vy(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=vy(t);return n===this?this.pointToData(a):null},r}();function vy(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function qV(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new KV(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",Ft).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var jV={create:qV,dimensions:E1};const JV=jV;var fy=["x","y"],QV=["width","height"],tB=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=Fu(l,1-Vs(s)),c=l.dataToPoint(a)[0],v=i.get("type");if(v&&v!=="none"){var f=zf(i),h=eB[v](s,c,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var p=rv(n);A1(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=rv(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Gf(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Vs(o),u=Fu(s,l),c=[t.x,t.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var v=Fu(s,1-l),f=(v[1]+v[0])/2,h=[f,f];return h[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(Bf),eB={line:function(r,e,t){var a=Ff([e,t[0]],[e,t[1]],Vs(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:T1([e-a/2,t[0]],[a,n],Vs(r))}}};function Vs(r){return r.isHorizontal()?0:1}function Fu(r,e){var t=r.getRect();return[t[fy[e]],t[fy[e]]+t[QV[e]]]}const rB=tB;var aB=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Ot);function nB(r){it(oo),Ea.registerAxisPointerClass("SingleAxisPointer",rB),r.registerComponentView(aB),r.registerComponentView(YV),r.registerComponentModel(Gu),cn(r,"single",Gu,Gu.defaultOption),r.registerCoordinateSystem("single",JV)}var iB=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=Tn(t);r.prototype.init.apply(this,arguments),hy(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),hy(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.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}},e}(lt);function hy(r,e){var t=r.cellSize,a;O(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=G([0,1],function(i){return DA(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Vr(r,e,{type:"box",ignoreSize:n})}const oB=iB;var sB=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToRect([u],!1).tl,v=new ht({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});n.add(v)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=a.start,f=0;v.time<=a.end.time;f++){p(v.formatedDate),f===0&&(v=s.getDateInfo(a.start.y+"-"+a.start.m));var h=v.date;h.setMonth(h.getMonth()+1),v=s.getDateInfo(h)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,n),l,i)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(t,a,n){var i=new me({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return $(t)&&t?AA(t,a):X(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.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]],c=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,f=n==="horizontal"?0:1,h={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],v],right:[u[f][0],v]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new ut({z2:30,style:Ct(o,{text:y})});m.attr(this._yearTextPositionControl(m,h[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],c=t[1];return n==="horizontal"?(c=c+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||$(s))&&(s&&(a=yc(s)||a),s=a.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",d=0;d=n.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/Hu)-Math.floor(t[0].time/Hu)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var c=Math.floor((n+t[0].day+6)/7),v=a?-c+1:c-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:c,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n);a.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function py(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}const cB=uB;function vB(r){r.registerComponentModel(oB),r.registerComponentView(lB),r.registerCoordinateSystem("calendar",cB)}function fB(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function dy(r,e){var t;return w(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function hB(r,e,t){var a=B({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(ot(n,a,!0),Vr(n,a,{ignoreSize:!0}),V0(t,n),zo(t,n),zo(t,n,"shape"),zo(t,n,"style"),zo(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var R1=["transition","enterFrom","leaveTo"],pB=R1.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function zo(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?R1:pB,n=0;n=0;c--){var v=n[c],f=Ut(v.id,null),h=f!=null?o.get(f):null;if(!!h){var p=h.parent,y=Ae(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},S={},x=al(h,v,m,null,{hv:v.hv,boundingMode:v.bounding},S);if(!Ae(h).isNew&&x){for(var b=v.transition,_={},A=0;A=0)?_[T]=C:h[T]=C}ft(h,_,t,0)}else h.attr(S)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){as(n,Ae(n).option,a,t._lastGraphicModel)}),this._elMap=Z()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ot);function av(r){var e=U(gy,r)?gy[r]:Dv(r),t=new e({});return Ae(t).type=r,t}function yy(r,e,t,a){var n=av(t);return e.add(n),a.set(r,n),Ae(n).id=r,Ae(n).isNew=!0,n}function as(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){as(i,e,t,a)}),yl(r,e,a),t.removeKey(Ae(r).id))}function my(r,e,t,a){r.isGroup||w([["cursor",Sa.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];U(e,i)?r[i]=St(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),w(Wt(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=X(i)?i:null}}),U(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function mB(r){return r=B({},r),w(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(O0),function(e){delete r[e]}),r}function SB(r,e,t){var a=q(r).eventData;!r.silent&&!r.ignore&&!a&&(a=q(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function xB(r){r.registerComponentModel(gB),r.registerComponentView(yB),r.registerPreprocessor(function(e){var t=e.graphic;O(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Sy=["x","y","radius","angle","single"],_B=["cartesian2d","polar","singleAxis"];function bB(r){var e=r.get("coordinateSystem");return ct(_B,e)>=0}function Lr(r){return r+"Axis"}function wB(r,e){var t=Z(),a=[],n=Z();r.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!n.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){n.set(c.uid,!0),a.push(c),u(c)}function l(c){var v=!1;return c.eachTargetAxis(function(f,h){var p=t.get(f);p&&p[h]&&(v=!0)}),v}function u(c){c.eachTargetAxis(function(v,f){(t.get(v)||t.set(v,[]))[f]=!0})}return a}function k1(r){var e=r.ecModel,t={infoList:[],infoMap:Z()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(Lr(a),n);if(!!i){var o=i.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var Wu=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),AB=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,n){var i=xy(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=xy(t);ot(this.option,t,!0),ot(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=Z(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return w(Sy,function(n){var i=this.getReferringComponents(Lr(n),Sw);if(!!i.specified){a=!0;var o=new Wu;w(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var v=u[0];if(!!v){var f=new Wu;if(f.add(v.componentIndex),t.set(c,f),i=!1,c==="x"||c==="y"){var h=v.getReferringComponents("grid",Ft).models[0];h&&w(u,function(p){v.componentIndex!==p.componentIndex&&h===p.getReferringComponents("grid",Ft).models[0]&&f.add(p.componentIndex)})}}}i&&w(Sy,function(u){if(!!i){var c=n.findComponents({mainType:Lr(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var v=new Wu;v.add(c[0].componentIndex),t.set(u,v),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(Lr(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){w(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(Lr(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;w(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(S&&!x&&!b)return!0;S&&(g=!0),x&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Xa(c,function(h){if(i==="empty")l.setData(u=u.map(h,function(d){return s(d)?d:NaN}));else{var p={};p[h]=o,u.selectRange(p)}});Xa(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Xa(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=mt(a[0]+o,a,[0,100],!0):i!=null&&(o=mt(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(!!t){var n=Hm(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function PB(r,e,t){var a=[1/0,-1/0];Xa(t,function(o){jD(a,o.getData(),e)});var n=r.getAxisModel(),i=px(n.axis.scale,n,a).calculate();return[i.min,i.max]}const EB=LB;var RB={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Lr(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new EB(n,i,s,r),t.push(o.__dzAxisProxy))});var a=Z();return w(t,function(n){w(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const kB=RB;function NB(r){r.registerAction("dataZoom",function(e,t){var a=wB(t,e);w(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var by=!1;function Yf(r){by||(by=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,kB),NB(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function OB(r){r.registerComponentModel(CB),r.registerComponentView(IB),Yf(r)}var Te=function(){function r(){}return r}(),N1={};function Ka(r,e){N1[r]=e}function O1(r){return N1[r]}var VB=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;w(this.option.feature,function(a,n){var i=O1(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ot(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.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"}},e}(lt);const BB=VB;function zB(r,e,t){var a=e.getBoxLayoutParams(),n=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Yt(a,i,n);da(e.get("orient"),r,e.get("itemGap"),o.width,o.height),al(r,a,i,n)}function V1(r,e){var t=An(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new ht({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var GB=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),v=[];w(u,function(p,d){v.push(d)}),new hr(this._featureNames||[],v).add(f).update(f).remove(Q(f,null)).execute(),this._featureNames=v;function f(p,d){var g=v[p],y=v[d],m=u[g],S=new Dt(m,t,t.ecModel),x;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(FB(g))x={onclick:S.option.onclick,featureName:g};else{var b=O1(g);if(!b)return;x=new b}c[g]=x}else if(x=c[y],!x)return;x.uid=wn("toolbox-feature"),x.model=S,x.ecModel=a,x.api=n;var _=x instanceof Te;if(!g&&y){_&&x.dispose&&x.dispose(a,n);return}if(!S.get("show")||_&&x.unusable){_&&x.remove&&x.remove(a,n);return}h(S,x,g),S.setIconStatus=function(A,T){var C=this.option,M=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[A]=T,M[A]&&(T==="emphasis"?vr:fr)(M[A])},x instanceof Te&&x.render&&x.render(S,a,n,i)}function h(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),S=d instanceof Te&&d.getIcons?d.getIcons():p.get("icon"),x=p.get("title")||{},b,_;$(S)?(b={},b[g]=S):b=S,$(x)?(_={},_[g]=x):_=x;var A=p.iconPaths={};w(b,function(T,C){var M=Yi(T,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var D=M.ensureState("emphasis");D.style=m.getItemStyle();var I=new ut({style:{text:_[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});M.setTextContent(I),_n({el:M,componentModel:t,itemName:C,formatterParamsExtra:{title:_[C]}}),M.__title=_[C],M.on("mouseover",function(){var L=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||P}),I.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&n.leaveEmphasis(this),I.hide()}),(p.get(["iconStatus",C])==="emphasis"?vr:fr)(M),o.add(M),M.on("click",W(d.onclick,d,a,n,C)),A[C]=M})}zB(o,t,n),o.add(V1(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),S=m&&m.ensureState("emphasis");if(S&&!X(S)&&d){var x=S.style||(S.style={}),b=Us(d,ut.makeFont(x)),_=p.x+o.x,A=p.y+o.y+s,T=!1;A+b.height>n.getHeight()&&(y.position="top",T=!0);var C=T?-5-b.height:s+10;_+b.width/2>n.getWidth()?(y.position=["100%",C],x.align="right"):_-b.width/2<0&&(y.position=[0,C],x.align="left")}})},e.prototype.updateView=function(t,a,n,i){w(this._features,function(o){o instanceof Te&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){w(this._features,function(n){n instanceof Te&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){w(this._features,function(n){n instanceof Te&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Ot);function FB(r){return r.indexOf("my")===0}const HB=GB;var WB=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=kt.browser;if(X(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),h=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];h&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var S=document.createElement("iframe");document.body.appendChild(S);var x=S.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),x.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(S)}}else{var _=n.get("lang"),A='',T=window.open();T.document.write(A),T.document.title=i}},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(Te);const $B=WB;var wy="__ec_magicType_stack__",UB=[["line","bar"],["stack"]],YB=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return w(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(!!Ay[n]){var s={series:[]},l=function(v){var f=v.subType,h=v.id,p=Ay[n](f,h,v,i);p&&(J(p,v.option),s.series.push(p));var d=v.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",S=v.getReferringComponents(m,Ft).models[0],x=S.componentIndex;s[m]=s[m]||[];for(var b=0;b<=x;b++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=n==="bar"}}};w(UB,function(v){ct(v,n)>=0&&w(v,function(f){i.setIconStatus(f,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=ot({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Te),Ay={line:function(r,e,t,a){if(r==="bar")return ot({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return ot({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===wy;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),ot({id:e,stack:n?"":wy},a.get(["option","stack"])||{},!0)}};rr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const ZB=YB;var ml=new Array(60).join("-"),hn=" ";function XB(r){var e={},t=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function KB(r){var e=[];return w(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(G(t.series,function(h){return h.name})),l=[n.model.getCategories()];w(t.series,function(h){var p=h.getRawData();l.push(h.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(hn)],c=0;c=0)return!0}var nv=new RegExp("["+hn+"]+","g");function QB(r){for(var e=r.split(/\n+/g),t=Bs(e.shift()).split(nv),a=[],n=G(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function oz(r){var e=Zf(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return B1(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function sz(r){z1(r).snapshots=null}function lz(r){return Zf(r).length}function Zf(r){var e=z1(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var uz=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){sz(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(Te);rr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const cz=uz;var vz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],fz=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=Ty(t,e);w(hz,function(o,s){(!a||!a.include||ct(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=$u[a.brushType](0,i,n);a.__rangeOffset={offset:Iy[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){w(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&w(i.coordSyses,function(o){var s=$u[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){w(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=$u[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?Iy[a.brushType](i.values,o.offset,pz(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:Y_(n),isTargetByCursor:X_(n,e,a.coordSysModel),getLinearBrushOtherExtent:Z_(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&ct(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=Ty(t,e),i=0;ir[1]&&r.reverse(),r}function Ty(r,e){return ui(r,e,{includeMainTypes:vz})}var hz={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=Z(),o={},s={};!t&&!a&&!n||(w(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),w(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),w(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];w(u.getCartesians(),function(v,f){(ct(t,v.getAxis("x").model)>=0||ct(a,v.getAxis("y").model)>=0)&&c.push(v)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Dy.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){w(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:Dy.geo})})}},Cy=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Dy={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(pa(r)),e}},$u={lineX:Q(My,0),lineY:Q(My,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[iv([n[0],i[0]]),iv([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=G(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);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:i,xyMinMax:n}}};function My(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=iv(G([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var Iy={lineX:Q(Ly,0),lineY:Q(Ly,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function Ly(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function pz(r,e){var t=Py(r),a=Py(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function Py(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const Xf=fz;var ov=w,dz=pw("toolbox-dataZoom_"),gz=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new Mf(n.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),Sz(t,a,this,i,n),mz(t,a)},e.prototype.onclick=function(t,a,n){yz[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Xf(Kf(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,c,v){if(v.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",v,c[0]),s("y",v,c[1])):s({lineX:"x",lineY:"y"}[f],v,c)}}),iz(i,n),this._dispatchZoomAction(n);function s(u,c,v){var f=c.getAxis(u),h=f.model,p=l(u,h,i),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(v=Ra(0,v.slice(),f.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:v[0],endValue:v[1]})}function l(u,c,v){var f;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var p=h.getAxisModel(u,c.componentIndex);p&&(f=h)}),f}},e.prototype._dispatchZoomAction=function(t){var a=[];ov(t,function(n,i){a.push(K(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},e}(Te),yz={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(oz(this.ecModel))}};function Kf(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function mz(r,e){r.setIconStatus("back",lz(e)>1?"emphasis":"normal")}function Sz(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Xf(Kf(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}RA("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=Kf(a),o=ui(r,i);ov(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),ov(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var v=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:dz+u+v};f[c]=v,n.push(f)}return n});const xz=gz;function _z(r){r.registerComponentModel(BB),r.registerComponentView(HB),Ka("saveAsImage",$B),Ka("magicType",ZB),Ka("dataView",nz),Ka("dataZoom",xz),Ka("restore",cz),it(OB)}var bz=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.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}},e}(lt);const wz=bz;function G1(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function F1(r){if(!!kt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,v=o+n,f=v*Math.abs(Math.cos(c))+v*Math.abs(Math.sin(c)),h=Math.round(((f-Math.SQRT2*n)/2+Math.SQRT2*n-(f-v)/2)*100)/100;s+=";"+i+":-"+h+"px";var p=e+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function Lz(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,n="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,n+=kt.transformSupported?","+qf+a:",left"+a+",top"+a),Cz+":"+n}function Ey(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!kt.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=kt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+qf+":"+o+";":[["top",0],["left",0],[H1,o]]}function Pz(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var n=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return n&&i&&e.push("text-shadow:"+o+"px "+s+"px "+i+"px "+n),w(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function Ez(r,e,t){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),v=gS(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+f),e&&n&&a.push(Lz(n,t)),i&&a.push("background-color:"+i),w(["width","color","radius"],function(h){var p="border-"+h,d=k0(p),g=r.get(d);g!=null&&a.push(p+":"+g+(h==="color"?"":"px"))}),a.push(Pz(c)),v!=null&&a.push("padding:"+An(v).join("px ")+"px"),a.join(";")+";"}function Ry(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&Yb(r,o,document.body,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Rz=function(){function r(e,t,a){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,kt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),o=this._appendToBody=a&&a.appendToBody;Ry(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(n):e.appendChild(n),this._container=e;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Ub(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){var t=this._container,a=Tz(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative");var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=Dz+Ez(e,!this._firstShow,this._longHide)+Ey(i[0],i[1],!0)+("border-color:"+Ta(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if($(i)&&a.get("trigger")==="item"&&!G1(a)&&(s=Iz(a,n,i)),$(e))o.innerHTML=e+s;else if(e){o.innerHTML="",O(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||kt.node||!n.getDom())){var o=Oy(i,n);this._ticket="";var s=i.dataByCoordSys,l=Hz(i,a,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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=Vz;c.x=i.x,c.y=i.y,c.update(),q(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,n,i))return;var v=D1(i,a),f=v.point[0],h=v.point[1];f!=null&&h!=null&&this._tryShow({offsetX:f,offsetY:h,target:v.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Oy(i,n))},e.prototype._manuallyAxisShowTip=function(t,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(!!u){var c=u.getData(),v=Kn([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,a){var n=t.target,i=this._tooltipModel;if(!!i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){this._lastDataByCoordSys=null;var s,l;ca(n,function(u){if(q(u).dataIndex!=null)return s=u,!0;if(q(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(t,s,a):l?this._showComponentItemTooltip(t,l,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=W(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Kn([a.tooltipOption],i),l=this._renderMode,u=[],c=qt("section",{blocks:[],noHeader:!0}),v=[],f=new Nl;w(t,function(m){w(m.dataByAxis,function(S){var x=n.getComponent(S.axisDim+"Axis",S.axisIndex),b=S.value;if(!(!x||b==null)){var _=w1(b,x.axis,n,S.seriesDataIndices,S.valueLabelOpt),A=qt("section",{header:_,noHeader:!Gi(_),sortBlocks:!0,blocks:[]});c.blocks.push(A),w(S.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=C.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=S.axisDim,D.axisIndex=S.axisIndex,D.axisType=S.axisType,D.axisId=S.axisId,D.axisValue=ef(x.axis,{value:b}),D.axisValueLabel=_,D.marker=f.makeTooltipMarker("item",Ta(D.color),l);var I=tp(C.formatTooltip(M,!0,null)),L=I.frag;if(L){var P=Kn([C],i).get("valueFormatter");A.blocks.push(P?B({valueFormatter:P},L):L)}I.text&&v.push(I.text),u.push(D)}})}})}),c.blocks.reverse(),v.reverse();var h=a.position,p=s.get("order"),d=op(c,f,l,p,n.get("useUTC"),s.get("textStyle"));d&&v.unshift(d);var g=l==="richText"?` `:"
",y=v.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,f)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=q(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,v=o.dataType,f=u.getData(v),h=this._renderMode,p=t.positionDefault,d=Kn([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,v),m=new Nl;y.marker=m.makeTooltipMarker("item",Ta(y.color),h);var S=tp(u.formatTooltip(c,!1,v)),x=d.get("order"),b=d.get("valueFormatter"),_=S.frag,A=_?op(b?B({valueFormatter:b},_):_,m,h,x,i.get("useUTC"),d.get("textStyle")):S.text,T="item_"+u.name+"_"+c;this._showOrMove(d,function(){this._showTooltipContent(d,A,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=q(a),o=i.tooltipConfig,s=o.option||{};if($(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(i.componentMainType,i.componentIndex);c&&u.push(c),u.push({formatter:s.content});var v=t.positionDefault,f=Kn(u,this._tooltipModel,v?{position:v}:null),h=f.get("content"),p=Math.random()+"",d=new Nl;this._showOrMove(f,function(){var g=K(f.get("formatterParams")||{});this._showTooltipContent(f,h,g,p,t.offsetX,t.offsetY,t.position,a,d)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var v=this._tooltipContent;v.setEnterable(t.get("enterable"));var f=t.get("formatter");l=l||t.get("position");var h=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(f)if($(f)){var g=t.ecModel.get("useUTC"),y=O(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=f,m&&(h=Js(y.axisValue,h,g)),h=N0(h,n,!0)}else if(X(f)){var S=W(function(x,b){x===this._ticket&&(v.setContent(b,c,t,d,l),this._updatePosition(t,l,o,s,v,n,u))},this);this._ticket=i,h=f(n,i,S)}else h=f;v.setContent(h,c,t,d,l),v.show(t,d),this._updatePosition(t,l,o,s,v,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||O(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!O(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||t.get("position");var v=o.getSize(),f=t.get("align"),h=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),X(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,c],contentSize:v.slice()})),O(a))n=F(a[0],u),i=F(a[1],c);else if(j(a)){var d=a;d.width=v[0],d.height=v[1];var g=Yt(d,{width:u,height:c});n=g.x,i=g.y,f=null,h=null}else if($(a)&&l){var y=Fz(a,p,v,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=zz(n,i,o,u,c,f?null:20,h?null:20);n=y[0],i=y[1]}if(f&&(n-=Vy(f)?v[0]/2:f==="right"?v[0]:0),h&&(i-=Vy(h)?v[1]/2:h==="bottom"?v[1]:0),G1(t)){var y=Gz(n,i,o,u,c);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&w(n,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},v=c.dataByAxis||[];o=o&&u.length===v.length,o&&w(u,function(f,h){var p=v[h]||{},d=f.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&d.length===g.length,o&&w(d,function(y,m){var S=g[m];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),i&&w(f.seriesDataIndices,function(y){var m=y.seriesIndex,S=a[m],x=i[m];S&&x&&x.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){kt.node||!a.getDom()||(Di(this,"_updatePosition"),this._tooltipContent.dispose(),ev("itemTooltip",a))},e.type="tooltip",e}(Ot);function Kn(r,e,t){var a=e.ecModel,n;t?(n=new Dt(t,a,a),n=new Dt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Dt&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(n=new Dt(o,n,a)))}return n}function Oy(r,e){return r.dispatchAction||W(e.dispatchAction,e)}function zz(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function Gz(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Fz(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+c+o;break;case"left":s=e.x-n-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function Vy(r){return r==="center"||r==="middle"}function Hz(r,e,t){var a=Sv(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Wi(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=q(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const Wz=Bz;function $z(r){it(oo),r.registerComponentModel(wz),r.registerComponentView(Wz),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},he),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},he)}var Uz=["rect","polygon","keep","clear"];function Yz(r,e){var t=_t(r?r.brush:[]);if(!!t.length){var a=[];w(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;O(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Zz(s),e&&!s.length&&s.push.apply(s,Uz)}}function Zz(r){var e={};w(r,function(t){e[t]=1}),r.length=0,w(e,function(t,a){r.push(a)})}var By=w;function zy(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function sv(r,e,t){var a={};return By(e,function(i){var o=a[i]=n();By(r[i],function(s,l){if(!!ee.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new ee(u),l==="opacity"&&(u=K(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ee(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function $1(r,e,t){var a;w(t,function(n){e.hasOwnProperty(n)&&zy(e[n])&&(a=!0)}),a&&w(t,function(n){e.hasOwnProperty(n)&&zy(e[n])?r[n]=K(e[n]):delete r[n]})}function Xz(r,e,t,a,n,i){var o={};w(r,function(v){var f=ee.prepareVisualTypes(e[v]);o[v]=f});var s;function l(v){return Uv(t,s,v)}function u(v,f){CS(t,s,v,f)}i==null?t.each(c):t.each([i],c);function c(v,f){s=i==null?v:f;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var p=a.call(n,v),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&$y(e)}};function $y(r){return new wt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var rG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new Mf(a.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){U1(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:K(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:K(n),$from:a})},e.type="brush",e}(Ot);const aG=rG;var nG="#ddd",iG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&$1(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:nG},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=G(t,function(a){return Uy(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Uy(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.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},e}(lt);function Uy(r,e){return ot({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Dt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const oG=iG;var sG=["rect","polygon","lineX","lineY","keep","clear"],lG=function(r){R(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,w(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return w(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:sG.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:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Te);const uG=lG;function cG(r){r.registerComponentView(aG),r.registerComponentModel(oG),r.registerPreprocessor(Yz),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,jz),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},he),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},he),Ka("brush",uG)}var vG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.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"}},e}(lt),fG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=St(t.get("textBaseline"),t.get("textVerticalAlign")),c=new ut({style:Ct(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=c.getBoundingRect(),f=t.get("subtext"),h=new ut({style:Ct(s,{text:f,fill:s.getTextColor(),y:v.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!p&&!g,h.silent=!d&&!g,p&&c.on("click",function(){ms(p,"_"+t.get("target"))}),d&&h.on("click",function(){ms(d,"_"+t.get("subtarget"))}),q(c).eventData=q(h).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),f&&i.add(h);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var S=Yt(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),h.setStyle(x),y=i.getBoundingRect();var b=S.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var A=new ht({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:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(A)}},e.type="title",e}(Ot);function hG(r){r.registerComponentModel(vG),r.registerComponentView(fG)}var pG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],w(a,function(u,c){var v=Ut(mn(u),""),f;j(u)?(f=K(u),f.value=c):f=c,o.push(f),i.push(v)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new fe([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.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:[]},e}(lt);const Yy=pG;var Y1=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=$r(Yy.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:[]}),e}(Yy);jt(Y1,Gv.prototype);const dG=Y1;var gG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Ot);const yG=gG;var mG=function(r){R(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ue);const SG=mG;var Yu=Math.PI,Zy=st(),xG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return qt("nameValue",{noName:!0,value:c})},w(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=bG(t,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Yu/2},v=i==="vertical"?o.height:o.width,f=t.getModel("controlStyle"),h=f.get("show",!0),p=h?f.get("itemSize"):0,d=h?f.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Yu/180;var m,S,x,b=f.get("position",!0),_=h&&f.get("showPlayBtn",!0),A=h&&f.get("showPrevBtn",!0),T=h&&f.get("showNextBtn",!0),C=0,M=v;b==="left"||b==="bottom"?(_&&(m=[0,0],C+=g),A&&(S=[C,0],C+=g),T&&(x=[M-p,0],M-=g)):(_&&(m=[M-p,0],M-=g),A&&(S=[0,0],C+=g),T&&(x=[M-p,0],M-=g));var D=[C,M];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:S,nextBtnPosition:x,axisExtent:D,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=yn(),l=o.x,u=o.y+o.height;xa(s,s,[-l,-u]),Fi(s,s,-Yu/2),xa(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),v=m(n.getBoundingRect()),f=m(i.getBoundingRect()),h=[n.x,n.y],p=[i.x,i.y];p[0]=h[0]=c[0][0];var d=t.labelPosOpt;if(d==null||$(d)){var g=d==="+"?0:1;S(h,v,c,1,g),S(p,f,c,1,1-g)}else{var g=d>=0?0:1;S(h,v,c,1,g),p[1]=h[1]+d}n.setPosition(h),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function S(x,b,_,A,T){x[A]+=_[A][T]-b[A][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=_G(a,i);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 SG("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new tt;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(!!i.get(["lineStyle","show"])){var s=new te({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new te({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:J({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],w(l,function(u){var c=n.dataToCoord(u.value),v=s.getItemModel(u.value),f=v.getModel("itemStyle"),h=v.getModel(["emphasis","itemStyle"]),p=v.getModel(["progress","itemStyle"]),d={x:c,y:0,onclick:W(o._changeTimeline,o,u.value)},g=Xy(v,f,a,d);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),ha(g);var y=q(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,s=n.getLabelModel();if(!!s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],w(u,function(c){var v=c.tickValue,f=l.getItemModel(v),h=f.getModel("label"),p=f.getModel(["emphasis","label"]),d=f.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),y=new ut({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:W(o._changeTimeline,o,v),silent:!1,style:Ct(h,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Ct(p),y.ensureState("progress").style=Ct(d),a.add(y),ha(y),Zy(y).dataIndex=v,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),v=i.get("inverse",!0);f(t.nextBtnPosition,"next",W(this._changeTimeline,this,v?"-":"+")),f(t.prevBtnPosition,"prev",W(this._changeTimeline,this,v?"+":"-")),f(t.playPosition,c?"stop":"play",W(this._handlePlayClick,this,!c),!0);function f(h,p,d,g){if(!!h){var y=an(St(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],S=wG(i,p+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});S.ensureState("emphasis").style=u,a.add(S),ha(S)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(v){v.draggable=!0,v.drift=W(u._handlePointerDrag,u),v.ondragend=W(u._handlePointerDragend,u),Ky(v,u._progressLine,s,n,i,!0)},onUpdate:function(v){Ky(v,u._progressLine,s,n,i)}};this._currentPointer=Xy(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=Me(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(f)),[o,v]}var Zu={min:Q(Ho,"min"),max:Q(Ho,"max"),average:Q(Ho,"average"),median:Q(Ho,"median")};function Vi(r,e){if(!!e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!PG(e)&&!O(e.coord)&&O(n)){var i=X1(e,t,a,r);if(e=K(e),e.type&&Zu[e.type]&&i.baseAxis&&i.valueAxis){var o=ct(n,i.baseAxis.dim),s=ct(n,i.valueAxis.dim),l=Zu[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!O(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Zu[u[c]]&&(u[c]=Jf(t,t.mapDimension(n[c]),u[c]));return e}}function X1(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(EG(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function EG(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Bi(r,e){return r&&r.containData&&e.coord&&!uv(e)?r.containData(e.coord):!0}function RG(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!uv(e)&&!uv(t)?r.containZone(e.coord,t.coord):!0}function K1(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Rr(o,e[i])}:function(t,a,n,i){return Rr(t.value,e[i])}}function Jf(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Xu=st(),kG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=Z()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Xu(s).keep=!1}),a.eachSeries(function(s){var l=Hr.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Xu(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Xu(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;w(t,function(i){var o=Hr.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?o0(l):Av(l))})}})},e.type="marker",e}(Ot);const Qf=kG;function jy(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=F(i.get("x"),t.getWidth()),l=F(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),c=r.get(a.dimensions[1],n);o=a.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var NG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Hr.getMarkerModelFromSeries(i,"markPoint");o&&(jy(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new to),v=OG(o,t,a);a.setData(v),jy(a.getData(),t,i),v.each(function(f){var h=v.getItemModel(f),p=h.getShallow("symbol"),d=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(X(p)||X(d)||X(g)||X(y)){var S=a.getRawValue(f),x=a.getDataParams(f);X(p)&&(p=p(S,x)),X(d)&&(d=d(S,x)),X(g)&&(g=g(S,x)),X(y)&&(y=y(S,x))}var b=h.getModel("itemStyle").getItemStyle(),_=Ki(l,"color");b.fill||(b.fill=_),v.setItemVisual(f,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),c.updateData(v),this.group.add(c.group),v.eachItemGraphicEl(function(f){f.traverse(function(h){q(h).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(Qf);function OG(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new fe(a,t),i=G(t.get("data"),Q(Vi,e));r&&(i=bt(i,Q(Bi,r)));var o=K1(!!r,a);return n.initData(i,null,o),n}const VG=NG;function BG(r){r.registerComponentModel(LG),r.registerComponentView(VG),r.registerPreprocessor(function(e){jf(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var zG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.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"},e}(Hr);const GG=zG;var Wo=st(),FG=function(r,e,t,a){var n=r.getData(),i;if(O(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Jt(a.yAxis,a.xAxis);else{var u=X1(a,n,e,r);s=u.valueAxis;var c=JS(n,u.valueDataDim);l=Jf(n,c,o)}var v=s.dim==="x"?0:1,f=1-v,h=K(a),p={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,p.coord[f]=1/0;var d=t.get("precision");d>=0&>(l)&&(l=+l.toFixed(Math.min(d,20))),h.coord[v]=p.coord[v]=l,i=[h,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Vi(r,i[0]),Vi(r,i[1]),B({},i[2])];return g[2].type=g[2].type||null,ot(g[2],g[0]),ot(g[2],g[1]),g};function zs(r){return!isNaN(r)&&!isFinite(r)}function Jy(r,e,t,a){var n=1-r,i=a.dimensions[r];return zs(e[n])&&zs(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function HG(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Jy(1,t,a,r)||Jy(0,t,a,r)))return!0}return Bi(r,e[0])&&Bi(r,e[1])}function Ku(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=F(o.get("x"),n.getWidth()),u=F(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,v=r.get(c[0],e),f=r.get(c[1],e);s=i.dataToPoint([v,f])}if(Pa(i,"cartesian2d")){var h=i.getAxis("x"),p=i.getAxis("y"),c=i.dimensions;zs(r.get(c[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):zs(r.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var WG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Hr.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Wo(o).from,u=Wo(o).to;l.each(function(c){Ku(l,c,!0,i,n),Ku(u,c,!1,i,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new bf);this.group.add(c.group);var v=$G(o,t,a),f=v.from,h=v.to,p=v.line;Wo(a).from=f,Wo(a).to=h,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");O(d)||(d=[d,d]),O(g)||(g=[g,g]),O(y)||(y=[y,y]),O(m)||(m=[m,m]),v.from.each(function(x){S(f,x,!0),S(h,x,!1)}),p.each(function(x){var b=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[f.getItemLayout(x),h.getItemLayout(x)]),b.stroke==null&&(b.stroke=f.getItemVisual(x,"style").fill),p.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:h.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(x,"symbolOffset"),toSymbolRotate:h.getItemVisual(x,"symbolRotate"),toSymbolSize:h.getItemVisual(x,"symbolSize"),toSymbol:h.getItemVisual(x,"symbol"),style:b})}),c.updateData(p),v.line.eachItemGraphicEl(function(x){q(x).dataModel=a,x.traverse(function(b){q(b).dataModel=a})});function S(x,b,_){var A=x.getItemModel(b);Ku(x,b,_,t,i);var T=A.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Ki(l,"color")),x.setItemVisual(b,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:St(A.get("symbolOffset",!0),m[_?0:1]),symbolRotate:St(A.get("symbolRotate",!0),y[_?0:1]),symbolSize:St(A.get("symbolSize"),g[_?0:1]),symbol:St(A.get("symbol",!0),d[_?0:1]),style:T})}this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(Qf);function $G(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new fe(a,t),i=new fe(a,t),o=new fe([],t),s=G(t.get("data"),Q(FG,e,r,t));r&&(s=bt(s,Q(HG,r)));var l=K1(!!r,a);return n.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const UG=WG;function YG(r){r.registerComponentModel(GG),r.registerComponentView(UG),r.registerPreprocessor(function(e){jf(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var ZG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Hr);const XG=ZG;var $o=st(),KG=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Vi(r,n),s=Vi(r,i),l=o.coord,u=s.coord;l[0]=Jt(l[0],-1/0),l[1]=Jt(l[1],-1/0),u[0]=Jt(u[0],1/0),u[1]=Jt(u[1],1/0);var c=gv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Gs(r){return!isNaN(r)&&!isFinite(r)}function Qy(r,e,t,a){var n=1-r;return Gs(e[n])&&Gs(t[n])}function qG(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Pa(r,"cartesian2d")?t&&a&&(Qy(1,t,a)||Qy(0,t,a))?!0:RG(r,n,i):Bi(r,n)||Bi(r,i)}function tm(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=F(o.get(t[0]),n.getWidth()),u=F(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],e),v=r.getValues(["x1","y1"],e),f=i.clampData(c),h=i.clampData(v),p=[];t[0]==="x0"?p[0]=f[0]>h[0]?v[0]:c[0]:p[0]=f[0]>h[0]?c[0]:v[0],t[1]==="y0"?p[1]=f[1]>h[1]?v[1]:c[1]:p[1]=f[1]>h[1]?c[1]:v[1],s=a.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Pa(i,"cartesian2d")){var m=i.getAxis("x"),S=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);Gs(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Gs(g)&&(s[1]=S.toGlobalCoord(S.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var em=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],jG=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Hr.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(em,function(v){return tm(s,l,v,i,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new tt});this.group.add(c.group),this.markKeep(c);var v=JG(o,t,a);a.setData(v),v.each(function(f){var h=G(em,function(T){return tm(v,f,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(v.get("x0",f)),p.parse(v.get("x1",f))],S=[d.parse(v.get("y0",f)),d.parse(v.get("y1",f))];Me(m),Me(S);var x=!(g[0]>m[1]||g[1]S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.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}},e}(lt);const cv=rF;var Ua=Q,vv=w,Uo=tt,aF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Uo),this.group.add(this._selectorGroup=new Uo),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,l,s,u);var c=t.getBoxLayoutParams(),v={width:n.getWidth(),height:n.getHeight()},f=t.get("padding"),h=Yt(c,v,f),p=this.layoutInner(t,o,h,i,l,u),d=Yt(J({width:p.width,height:p.height},c),v,f);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=V1(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),c=Z(),v=a.get("selectedMode"),f=[];n.eachRawSeries(function(h){!h.get("legendHoverLink")&&f.push(h.id)}),vv(a.getData(),function(h,p){var d=h.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new Uo;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!c.get(d))if(y){var m=y.getData(),S=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),b=m.getVisual("style"),_=this._createItem(y,d,p,h,a,t,S,b,x,v,i);_.on("click",Ua(rm,d,null,i,f)).on("mouseover",Ua(fv,y.name,null,i,f)).on("mouseout",Ua(hv,y.name,null,i,f)),c.set(d,!0)}else n.eachRawSeries(function(A){if(!c.get(d)&&A.legendVisualProvider){var T=A.legendVisualProvider;if(!T.containName(d))return;var C=T.indexOfName(d),M=T.getItemVisual(C,"style"),D=T.getItemVisual(C,"legendIcon"),I=Bm(M.fill);I&&I[3]===0&&(I[3]=.2,M=B(B({},M),{fill:Yo(I,"rgba")}));var L=this._createItem(A,d,p,h,a,t,{},M,D,v,i);L.on("click",Ua(rm,null,d,i,f)).on("mouseover",Ua(fv,null,d,i,f)).on("mouseout",Ua(hv,null,d,i,f)),c.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();vv(t,function(u){var c=u.type,v=new ut({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(v);var f=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);ae(v,{normal:f,emphasis:h},{defaultText:u.title}),ha(v)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,c,v,f){var h=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),S=i.get("icon");c=S||c||"roundRect";var x=nF(c,i,l,u,h,g,f),b=new Uo,_=i.getModel("textStyle");if(X(t.getLegendIcon)&&(!S||S==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:c,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var A=S==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(iF({itemWidth:p,itemHeight:d,icon:c,iconRotate:A,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,M=o.get("formatter"),D=a;$(M)&&M?D=M.replace("{name}",a!=null?a:""):X(M)&&(D=M(a));var I=g?_.getTextColor():i.get("inactiveColor");b.add(new ut({style:Ct(_,{text:D,x:T,y:d/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new ht({shape:b.getBoundingRect(),invisible:!0}),P=i.getModel("tooltip");return P.get("show")&&_n({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(E){E.silent=!0}),L.silent=!v,this.getContentGroup().add(b),ha(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();da(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),v=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){da("horizontal",u,t.get("selectorItemGap",!0));var f=u.getBoundingRect(),h=[-f.x,-f.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?h[d]+=c[g]+p:v[d]+=f[g]+p,h[1-d]+=c[y]/2-f[y]/2,u.x=h[0],u.y=h[1],l.x=v[0],l.y=v[1];var S={x:0,y:0};return S[g]=c[g]+p+f[g],S[y]=Math.max(c[y],f[y]),S[m]=Math.min(0,f[m]+h[1-d]),S}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ot);function nF(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),vv(g,function(m,S){g[S]==="inherit"&&(g[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?a.decal:sn(v,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var f=e.getModel("lineStyle"),h=f.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[c];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=f.get("inactiveColor"),h.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function iF(r){var e=r.icon||"roundRect",t=Ht(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function rm(r,e,t,a){hv(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),fv(r,e,t,a)}function q1(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-h.x,-h.y];a||(g[i]=c[u]);var y=[0,0],m=[-p.x,-p.y],S=St(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var x=t.get("pageButtonPosition",!0);x==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+S}m[1-i]+=h[s]/2-p[s]/2,c.setPosition(g),v.setPosition(y),f.setPosition(m);var b={x:0,y:0};if(b[o]=d?n[o]:h[o],b[s]=Math.max(h[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),v.__rectSize=n[o],d){var _={x:0,y:0};_[o]=Math.max(n[o]-p[o]-S,0),_[s]=b[s],v.setClipPath(new ht({shape:_})),v.__rectSize=_[o]}else f.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(t);return A.pageIndex!=null&&ft(c,{x:A.contentPosition[0],y:A.contentPosition[1]},d?t:null),this._updatePageInfoView(t,A),b},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;w(["pagePrev","pageNext"],function(c){var v=c+"DataIndex",f=a[v]!=null,h=n.childOfName(c);h&&(h.setStyle("fill",f?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=f?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=qu[o],l=ju[o],u=this._findTargetItemIndex(a),c=n.children(),v=c[u],f=c.length,h=f?1:0,p={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return p;var d=x(v);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,S=null;g<=f;++g)S=x(c[g]),(!S&&m.e>y.s+i||S&&!b(S,y.s))&&(m.i>y.i?y=m:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=S;for(var g=u-1,y=d,m=d,S=null;g>=-1;--g)S=x(c[g]),(!S||!b(m,S.s))&&y.i=A&&_.s<=A+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(a=s)}),a!=null?a:i},e.type="legend.scroll",e}(j1);const vF=cF;function fF(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function hF(r){it(J1),r.registerComponentModel(uF),r.registerComponentView(vF),fF(r)}function pF(r){it(J1),it(hF)}var dF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=$r(Oi.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Oi);const gF=dF;var th=st();function yF(r,e,t){th(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function mF(r,e){for(var t=th(r).coordSysRecordMap,a=t.keys(),n=0;na[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function wF(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=th(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=Z());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=k1(i);w(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,SF(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Z());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){Q1(n,i);return}var c=bF(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),In(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var AF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),yF(n,t,{pan:W(Ju.pan,this),zoom:W(Ju.zoom,this),scrollMove:W(Ju.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){mF(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Uf),Ju={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(!!o){var s=Qu[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ra(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:im(function(r,e,t,a,n,i){var o=Qu[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:im(function(r,e,t,a,n,i){var o=Qu[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function im(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,a,n);if(Ra(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Qu={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const TF=AF;function tb(r){Yf(r),r.registerComponentModel(gF),r.registerComponentView(TF),wF(r)}var CF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=$r(Oi.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:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Oi);const DF=CF;var Jn=ht,om=7,MF=1,tc=30,IF=7,Qn="horizontal",sm="vertical",LF=5,PF=["line","bar","candlestick","scatter"],EF={easing:"cubicOut",duration:100,delay:0},RF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),In(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Di(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new tt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?IF:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===Qn?{right:s.width-o.x-o.width,top:s.height-tc-om-i,width:o.width,height:tc}:{right:om,top:o.y,width:tc,height:o.height},u=Tn(t.option);w(["right","top","width","height"],function(v){u[v]==="ph"&&(u[v]=l[v])});var c=Yt(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===sm&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Qn&&!o?{scaleY:l?1:-1,scaleX:1}:n===Qn&&o?{scaleY:l?1:-1,scaleX:-1}:n===sm&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Jn({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Jn({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),s=this.api.getZr();i?(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)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var v=o.getDataExtent(l),f=(v[1]-v[0])*.3;v=[v[0]-f,v[1]+f];var h=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,S=Math.round(o.count()/a[0]),x;o.each([l],function(C,M){if(S>0&&M%S){m+=y;return}var D=C==null||isNaN(C)||C==="",I=D?0:mt(C,v,h,!0);D&&!x&&M?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&x&&(d.push([m,0]),g.push([m,0])),d.push([m,I]),g.push([m,I]),m+=y,x=D}),u=this._shadowPolygonPts=d,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var b=this.dataZoomModel;function _(C){var M=b.getModel(C?"selectedDataBackground":"dataBackground"),D=new tt,I=new Ee({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new me({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(I),D.add(L),D}for(var A=0;A<3;A++){var T=_(A===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!n&&!(a!==!0&&ct(PF,u.get("type"))<0)){var c=i.getComponent(Lr(o),s).axis,v=kF(o),f,h=u.coordinateSystem;v!=null&&h.getOtherAxis&&(f=h.getOtherAxis(c).inverse),v=u.getData().mapDimension(v),n={thisAxis:c,series:u,thisDim:o,otherDim:v,otherAxisInverse:f}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,v=l.get("brushSelect"),f=a.filler=new Jn({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Jn({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:MF,fill:"rgba(0,0,0,0)"}})),w([0,1],function(S){var x=l.get("handleIcon");!_s[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=Ht(x,-1,0,2,2,null,!0);b.attr({cursor:lm(this._orient),draggable:!0,drift:W(this._onDragMove,this,S),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var _=b.getBoundingRect(),A=l.get("handleSize");this._handleHeight=F(A,this._size[1]),this._handleWidth=_.width/_.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(),ha(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[S]=b);var C=l.getModel("textStyle");t.add(i[S]=new ut({silent:!0,invisible:!0,style:Ct(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=f;if(v){var p=F(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new ht({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=Ht(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));h=a.moveZone=new ht({invisible:!0,shape:{y:s[1]-m,height:p+m}}),h.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:lm(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[mt(t[0],[0,100],a,!0),mt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ra(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?mt(s.minSpan,l,o,!0):null,s.maxSpan!=null?mt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Me([mt(i[0],o,l,!0),mt(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=Me(n.slice()),o=this._size;w([0,1],function(h){var p=a.handles[h],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[h]+(h?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;ca[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new Gt(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Me([mt(n.x,o,s,!0),mt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Nr(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Jn({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),c=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:v[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?EF:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=k1(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Uf);function kF(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function lm(r){return r==="vertical"?"ns-resize":"ew-resize"}const NF=RF;function eb(r){r.registerComponentModel(DF),r.registerComponentView(NF),Yf(r)}function OF(r){it(tb),it(eb)}var VF={get:function(r,e,t){var a=K((BF[r]||{})[e]);return t&&O(a)?a[a.length-1]:a}},BF={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]}};const rb=VF;var um=ee.mapVisual,zF=ee.eachVisual,GF=O,cm=w,FF=Me,HF=mt,WF=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&$1(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=W(t,this),this.controllerVisuals=sv(this.option.controller,a,t),this.targetVisuals=sv(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=_t(t),a},e.prototype.eachTargetSeries=function(t,a){w(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],O(t)&&(t=t.slice(),u=!0);var c=a?t:u?[v(t[0]),v(t[1])]:v(t);if($(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(X(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+c[1]:t[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function v(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=FF([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});ot(i,n),ot(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(v){GF(a.color)&&!v.inRange&&(v.inRange={color:a.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,f,h){var p=v[f],d=v[h];p&&!d&&(d=v[h]={},cm(p,function(g,y){if(!!ee.isValidType(y)){var m=rb.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(v){var f=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,h=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";cm(this.stateList,function(y){var m=this.itemSize,S=v[y];S||(S=v[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=f&&K(f)||(s?g:[g])),S.symbolSize==null&&(S.symbolSize=h&&K(h)||(s?m[0]:[m[0],m[0]])),S.symbol=um(S.symbol,function(_){return _==="none"?g:_});var x=S.symbolSize;if(x!=null){var b=-1/0;zF(x,function(_){_>b&&(b=_)}),S.symbolSize=um(x,function(_){return HF(_,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.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"}},e}(lt);const Fs=WF;var vm=[20,140],$F=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=vm[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=vm[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):O(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Me((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=fm(this,"outOfRange",this.getExtent()),n=fm(this,"inRange",this.option.range.slice()),i=[];function o(h,p){i.push({value:h,color:t(h,p)})}for(var s=0,l=0,u=n.length,c=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new tt(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(!!this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent();ZF([0,1],function(c){var v=o[c];v.setStyle("fill",a.handlesColor[c]),v.y=t[c];var f=Ze(t[c],[0,l[1]],u,!0),h=this.getControllerVisual(f,"symbolSize");v.scaleX=v.scaleY=h/l[0],v.x=l[0]-h/2;var p=He(n.handleLabelPoints[c],pa(v,this.group));s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,v=c.indicator;if(!!v){v.attr("invisible",!1);var f={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",f),p=this.getControllerVisual(t,"symbolSize"),d=Ze(t,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=He(c.indicatorLabelPoint,pa(v,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),b=this._orient,_=b==="horizontal";S.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:_?x:"middle",align:_?"center":x});var A={x:g,y:d,style:{fill:h}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(A,C),S.animateTo(T,C)}else v.attr(A),S.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(v[1]=1/0),a&&(v[0]===-1/0?this._showIndicator(c,v[1],"< ",l):v[1]===1/0?this._showIndicator(c,v[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var f=this._hoverLinkDataIndices,h=[];(a||gm(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(v));var p=yw(f,h);this._dispatchHighDown("downplay",ns(p[0],n)),this._dispatchHighDown("highlight",ns(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(ca(t.target,function(l){var u=q(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function r5(r,e,t,a){for(var n=e.targetVisuals[a],i=ee.prepareVisualTypes(n),o={color:Ki(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(QF,t5),w(e5,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(a5))}function ob(r){r.registerComponentModel(UF),r.registerComponentView(JF),ib(r)}var n5=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],i5[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=K(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=K(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=ee.listVisualTypes(),i=this.isCategory();w(t.pieces,function(s){w(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),w(a,function(s,l){var u=!1;w(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&w(this.stateList,function(c){(t[c]||(t[c]={}))[l]=rb.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,w(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;w(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=K(t)},e.prototype.getValueState=function(t){var a=ee.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=ee.findPieceIndex(l,n);c===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,v){var f=i.getRepresentValue({interval:c});v||(v=i.getValueState(f));var h=t(f,v);c[0]===-1/0?n[0]=h:c[1]===1/0?n[1]=h:a.push({value:c[0],color:h},{value:c[1],color:h})}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 w(s,function(c){var v=c.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=$r(Fs.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}),e}(Fs),i5={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function xm(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const o5=n5;var s5=function(r){R(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),v=c.endsText,f=Jt(a.get("showLabel",!0),!v);v&&this._renderEndsText(t,v[0],u,f,l),w(c.viewPieceList,function(h){var p=h.piece,d=new tt;d.onclick=W(this._onItemClick,this,p),this._enableHoverLink(d,h.indexInModelPieceList);var g=a.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),f){var y=this.visualMapModel.getValueState(g);d.add(new ut({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),v&&this._renderEndsText(t,v[1],u,f,l),da(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:ns(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return nb(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(!!a){var s=new tt,l=this.visualMapModel.textStyleModel;s.add(new ut({style:Ct(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n){t.add(Ht(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color")))},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(!!i){var o=K(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,w(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})}},e.type="visualMap.piecewise",e}(ab);const l5=s5;function sb(r){r.registerComponentModel(o5),r.registerComponentView(l5),ib(r)}function u5(r){it(ob),it(sb)}var c5={label:{enabled:!0},decal:{show:!1}},_m=st(),v5={};function f5(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=K(c5);ot(a.label,r.getLocaleModel().get("aria"),!1),ot(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var v=Z();r.eachSeries(function(f){if(!f.isColorBySeries()){var h=v.get(f.type);h||(h={},v.set(f.type,h)),_m(f).scope=h}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(X(f.enableAriaDecal)){f.enableAriaDecal();return}var h=f.getData();if(f.isColorBySeries()){var m=xc(f.ecModel,f.name,v5,r.getSeriesCount()),S=h.getVisual("decal");h.setVisual("decal",x(S,m))}else{var p=f.getRawData(),d={},g=_m(f).scope;h.each(function(b){var _=h.getRawIndex(b);d[_]=b});var y=p.count();p.each(function(b){var _=d[b],A=p.getName(b)||b+"",T=xc(f.ecModel,A,g,y),C=h.getItemVisual(_,"decal");h.setItemVisual(_,"decal",x(C,T))})}function x(b,_){var A=b?B(B({},_),b):_;return A.dirty=!0,A}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=J(c.option,u),!!c.get("enabled")){var v=e.getZr().dom;if(c.get("description")){v.setAttribute("aria-label",c.get("description"));return}var f=r.getSeriesCount(),h=c.get(["data","maxCount"])||10,p=c.get(["series","maxCount"])||10,d=Math.min(f,p),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 S=[],x=f>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:f}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>h){var P=c.get(["data","partialData"]);M+=o(P,{displayCnt:h})}else M+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),k=c.get(["data","separator","end"]),V=[],N=0;N":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},d5=function(){function r(e){var t=this._condVal=$(e)?new RegExp(e):Zb(e)?e:null;if(t==null){var a="";dt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return $(t)?this._condVal.test(e):gt(t)?this._condVal.test(e+""):!1},r}(),g5=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),y5=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var R5={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Am(r)&&(u=r,c=e),Am(e)&&(u=e,c=r);function v(y,m,S,x,b){var _=y.many,A=y.one;if(_.length===1&&!b){var T=m?_[0]:A,C=m?A:_[0];if(qb(T))v({many:[T],one:C},!0,S,x,!0);else{var M=s?J({delay:s(S,x)},l):l;jb(T,C,M),i(T,C,T,C,M)}}else for(var D=J({dividePath:R5[t],individualDelay:s&&function(V,N,z,H){return s(V+S,x)}},l),I=m?Jb(_,A,D):Qb(A,_,D),L=I.fromIndividuals,P=I.toIndividuals,E=L.length,k=0;ke.length,h=u?Tm(c,u):Tm(f?e:r,[f?r:e]),p=0,d=0;dub))for(var n=a.getIndices(),i=N5(a),o=0;o0&&x.group.traverse(function(_){_ instanceof It&&!_.animators.length&&_.animateFrom({style:{opacity:0}},b)})})}function Dm(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Mm(r){return O(r)?r.sort().join(","):r}function Dr(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function B5(r,e){var t=Z(),a=Z(),n=Z();return w(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Dm(i),c=Mm(u);a.set(c,{dataGroupId:s,data:l}),O(u)&&w(u,function(v){n.set(v,{key:c,dataGroupId:s,data:l})})}),w(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Dm(i),u=Mm(l),c=a.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Dr(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Dr(s),data:s}]});else if(O(l)){var v=[];w(l,function(p){var d=a.get(p);d.data&&v.push({dataGroupId:d.dataGroupId,divide:Dr(d.data),data:d.data})}),v.length&&t.set(u,{oldSeries:v,newSeries:[{dataGroupId:o,data:s,divide:Dr(s)}]})}else{var f=n.get(l);if(f){var h=t.get(f.key);h||(h={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Dr(f.data)}],newSeries:[]},t.set(f.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Dr(s)})}}}}),t}function Im(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Dr(e.oldData[s]),dim:o.dimension})}),w(_t(r.to),function(o){var s=Im(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Dr(l),dim:o.dimension})}}),n.length>0&&i.length>0&&cb(n,i,a)}function G5(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){w(_t(a.seriesTransition),function(n){w(_t(n.to),function(i){for(var o=a.updatedSeries,s=0;s