import{a as Le,r as ge,j as X,e as LD}from"./compiler-runtime-B78v824U.js";import{c as Xs,B as fu,a as ba,f as BO,j as zO,g as VO,$ as FO,k as ox,l as GO,u as HO}from"./button-NdiquA2s.js";import{C as WO}from"./check-BD1XFc3L.js";import{C as UO}from"./copy-CtdUO1YJ.js";import{j as YO,n as $O,k as XO,l as ZO,m as jO,a as qO,b as KO,c as JO,u as QO,D as tN}from"./tooltip-CVK-MXwT.js";import{u as eN}from"./use-table-density-Dve4bDEG.js";import{u as rN,c as nN,P as S0,a as aN,d as iN,f as oN}from"./index-B2DfzJuI.js";const lr=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"];function Ir(r,t){const e=r.columns.indexOf(t);return e===-1?[]:r.rows.map(n=>n[e]??"")}function Is(r){return r.map(t=>{const e=parseFloat(t);return isNaN(e)?0:e})}function sN(r,t){switch(r.type){case"bar":return sx(r,t);case"line":return uN(r,t);case"pie":return cN(r,t);case"scatter":return hN(r,t);case"area":return vN(r,t);default:return sx(r,t)}}function sx(r,t){const e=Ir(t,r.x_column);if(r.series_column)return lN(r,t,e);const n=r.y_columns.map((a,i)=>({name:a,type:"bar",data:Is(Ir(t,a)),stack:r.stacked?"total":void 0,itemStyle:{color:lr[i%lr.length]}}));return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:r.show_legend!==!1&&r.y_columns.length>1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:e,axisLabel:{rotate:e.length>10?45:0}},yAxis:{type:"value"},series:n}}function lN(r,t,e){const n=r.series_column,a=Ir(t,n),i=[...new Set(a)],o=[...new Set(e)],s=i.map((l,u)=>{const f=o.map(c=>{const h=t.rows.findIndex((d,g)=>e[g]===c&&a[g]===l);if(h===-1)return 0;const v=r.y_columns[0],p=t.columns.indexOf(v);return parseFloat(t.rows[h][p]??"0")||0});return{name:l,type:"bar",data:f,stack:r.stacked?"total":void 0,itemStyle:{color:lr[u%lr.length]}}});return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:r.show_legend!==!1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:o,axisLabel:{rotate:o.length>10?45:0}},yAxis:{type:"value"},series:s}}function uN(r,t){const e=Ir(t,r.x_column);if(r.series_column)return fN(r,t,e);const n=r.y_columns.map((a,i)=>({name:a,type:"line",data:Is(Ir(t,a)),smooth:!0,itemStyle:{color:lr[i%lr.length]}}));return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis"},legend:{show:r.show_legend!==!1&&r.y_columns.length>1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:e,boundaryGap:!1},yAxis:{type:"value"},series:n}}function fN(r,t,e){const n=r.series_column,a=Ir(t,n),i=[...new Set(a)],o=[...new Set(e)],s=i.map((l,u)=>{const f=o.map(c=>{const h=t.rows.findIndex((d,g)=>e[g]===c&&a[g]===l);if(h===-1)return 0;const v=r.y_columns[0],p=t.columns.indexOf(v);return parseFloat(t.rows[h][p]??"0")||0});return{name:l,type:"line",data:f,smooth:!0,itemStyle:{color:lr[u%lr.length]}}});return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis"},legend:{show:r.show_legend!==!1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:o,boundaryGap:!1},yAxis:{type:"value"},series:s}}function cN(r,t){const e=Ir(t,r.x_column),n=Is(Ir(t,r.y_columns[0])),a=e.map((i,o)=>({name:i,value:n[o],itemStyle:{color:lr[o%lr.length]}}));return{title:{text:r.title,left:"center"},tooltip:{trigger:"item",formatter:"{a}
{b}: {c} ({d}%)"},legend:{show:r.show_legend!==!1,orient:"vertical",left:"left",top:"middle"},series:[{name:r.y_columns[0],type:"pie",radius:["40%","70%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},label:{show:!0,formatter:"{b}: {d}%"},data:a}]}}function hN(r,t){const e=Is(Ir(t,r.x_column)),n=Is(Ir(t,r.y_columns[0])),a=e.map((i,o)=>[i,n[o]]);return{title:{text:r.title,left:"center"},tooltip:{trigger:"item",formatter:i=>{const o=i;return Array.isArray(o.data)?`${r.x_column}: ${o.data[0]}
${r.y_columns[0]}: ${o.data[1]}`:""}},xAxis:{type:"value",name:r.x_column},yAxis:{type:"value",name:r.y_columns[0]},series:[{type:"scatter",data:a,symbolSize:10,itemStyle:{color:lr[0]}}]}}function vN(r,t){const e=Ir(t,r.x_column);if(r.series_column)return pN(r,t,e);const n=r.y_columns.map((a,i)=>({name:a,type:"line",data:Is(Ir(t,a)),smooth:!0,stack:r.stacked?"total":void 0,areaStyle:{},itemStyle:{color:lr[i%lr.length]}}));return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:r.show_legend!==!1&&r.y_columns.length>1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:e,boundaryGap:!1},yAxis:{type:"value"},series:n}}function pN(r,t,e){const n=r.series_column,a=Ir(t,n),i=[...new Set(a)],o=[...new Set(e)],s=i.map((l,u)=>{const f=o.map(c=>{const h=t.rows.findIndex((d,g)=>e[g]===c&&a[g]===l);if(h===-1)return 0;const v=r.y_columns[0],p=t.columns.indexOf(v);return parseFloat(t.rows[h][p]??"0")||0});return{name:l,type:"line",data:f,smooth:!0,stack:r.stacked?"total":void 0,areaStyle:{},itemStyle:{color:lr[u%lr.length]}}});return{title:{text:r.title,left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:r.show_legend!==!1,top:30},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:o,boundaryGap:!1},yAxis:{type:"value"},series:s}}var Jg=function(r,t){return Jg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},Jg(r,t)};function F(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jg(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var dN=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),gN=(function(){function r(){this.browser=new dN,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),Lt=new gN;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Lt.wxa=!0,Lt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Lt.worker=!0:!Lt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Lt.node=!0,Lt.svgSupported=!0):yN(navigator.userAgent,Lt);function yN(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),a&&(e.ie=!0,e.version=a[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var b0=12,ID="sans-serif",pa=b0+"px "+ID,mN=20,_N=100,xN="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function SN(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){D(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function GN(r,t,e){for(var n=e?"invTrans":"trans",a=t[n],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),c=2*u,h=f.left,v=f.top;o.push(h,v),l=l&&i&&h===i[c]&&v===i[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(t.srcCoords=o,t[n]=e?cx(s,o):cx(o,s))}function BD(r){return r.nodeName.toUpperCase()==="CANVAS"}var HN=/([&<>"'])/g,WN={"&":"&","<":"<",">":">",'"':""","'":"'"};function ir(r){return r==null?"":(r+"").replace(HN,function(t,e){return WN[e]})}var UN=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,hp=[],YN=Lt.browser.firefox&&+Lt.browser.version.split(".")[0]<39;function oy(r,t,e,n){return e=e||{},n?hx(r,t,e):YN&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):hx(r,t,e),e}function hx(r,t,e){if(Lt.domSupported&&r.getBoundingClientRect){var n=t.clientX,a=t.clientY;if(BD(r)){var i=r.getBoundingClientRect();e.zrX=n-i.left,e.zrY=a-i.top;return}else if(iy(hp,r,n,a)){e.zrX=hp[0],e.zrY=hp[1];return}}e.zrX=e.zrY=0}function L0(r){return r||window.event}function Br(r,t,e){if(t=L0(t),t.zrX!=null)return t;var n=t.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&oy(r,o,t,e)}else{oy(r,t,t,e);var i=$N(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&UN.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function $N(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var a=Math.abs(n!==0?n:e),i=n>0?-1:n<0?1:e>0?-1:1;return 3*a*i}function sy(r,t,e,n){r.addEventListener(t,e,n)}function XN(r,t,e,n){r.removeEventListener(t,e,n)}var da=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function vx(r){return r.which===2||r.which===3}var ZN=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var a=t.touches;if(a){for(var i={points:[],touches:[],target:e,event:t},o=0,s=a.length;o1&&n&&n.length>1){var i=px(n)/px(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=jN(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function ze(){return[1,0,0,1,0,0]}function Tv(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Cv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function zn(r,t,e){var n=t[0]*e[0]+t[2]*e[1],a=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Wn(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function ci(r,t,e,n){n===void 0&&(n=[0,0]);var a=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),c=Math.cos(e);return r[0]=a*c+s*f,r[1]=-a*f+s*c,r[2]=i*c+l*f,r[3]=-i*f+c*l,r[4]=c*(o-n[0])+f*(u-n[1])+n[0],r[5]=c*(u-n[1])-f*(o-n[0])+n[1],r}function I0(r,t,e){var n=e[0],a=e[1];return r[0]=t[0]*n,r[1]=t[1]*a,r[2]=t[2]*n,r[3]=t[3]*a,r[4]=t[4]*n,r[5]=t[5]*a,r}function fn(r,t){var e=t[0],n=t[2],a=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-e*s)*l,r):null}function qN(r){var t=ze();return Cv(t,r),t}var ct=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,a){t.x=e.x+n.x*a,t.y=e.y+n.y*a},r.lerp=function(t,e,n,a){var i=1-a;t.x=i*e.x+a*n.x,t.y=i*e.y+a*n.y},r})(),to=Math.min,gs=Math.max,ly=Math.abs,dx=["x","y"],KN=["width","height"],yi=new ct,mi=new ct,_i=new ct,xi=new ct,wr=zD(),Kl=wr.minTv,uy=wr.maxTv,hu=[0,0],pt=(function(){function r(t,e,n,a){r.set(this,t,e,n,a)}return r.set=function(t,e,n,a,i){return a<0&&(e=e+a,a=-a),i<0&&(n=n+i,i=-i),t.x=e,t.y=n,t.width=a,t.height=i,t},r.prototype.union=function(t){var e=to(t.x,this.x),n=to(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gs(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=gs(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,a=t.height/e.height,i=ze();return Wn(i,i,[-e.x,-e.y]),I0(i,i,[n,a]),Wn(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,n){return r.intersect(this,t,e,n)},r.intersect=function(t,e,n,a){n&&ct.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(JN,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(QN,e.x,e.y,e.width,e.height));var s=!!n;wr.reset(a,s);var l=wr.touchThreshold,u=t.x+l,f=t.x+t.width-l,c=t.y+l,h=t.y+t.height-l,v=e.x+l,p=e.x+e.width-l,d=e.y+l,g=e.y+e.height-l;if(u>f||c>h||v>p||d>g)return!1;var y=!(f=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];t.x=e.x*a+o,t.y=e.y*i+s,t.width=e.width*a,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}yi.x=_i.x=e.x,yi.y=xi.y=e.y,mi.x=xi.x=e.x+e.width,mi.y=_i.y=e.y+e.height,yi.transform(n),xi.transform(n),mi.transform(n),_i.transform(n),t.x=to(yi.x,mi.x,_i.x,xi.x),t.y=to(yi.y,mi.y,_i.y,xi.y);var l=gs(yi.x,mi.x,_i.x,xi.x),u=gs(yi.y,mi.y,_i.y,xi.y);t.width=l-t.x,t.height=u-t.y},r})(),JN=new pt(0,0,0,0),QN=new pt(0,0,0,0);function gx(r,t,e,n,a,i,o,s){var l=ly(t-e),u=ly(n-r),f=to(l,u),c=dx[a],h=dx[1-a],v=KN[a];t=u||!wr.bidirectional)&&(Kl[c]=-u,Kl[h]=0,wr.useDir&&wr.calcDirMTV())))}function zD(){var r=0,t=new ct,e=new ct,n={minTv:new ct,maxTv:new ct,useDir:!1,dirMinTv:new ct,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=gs(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),e.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(a(f)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,a(e.x)&&a(e.y)){o.set(0,0);return}(n.bidirectional||t.dot(e)>0)&&e.len()=0;c--){var h=i[c];h!==a&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(pp.copy(h.getBoundingRect()),h.transform&&pp.applyTransform(h.transform),pp.intersect(f)&&s.push(h))}if(s.length)for(var v=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function aB(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?VD:!0}return!1}function yx(r,t,e,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=aB(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==VD)){t.target=o;break}}}function GD(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var HD=32,gl=7;function iB(r){for(var t=0;r>=HD;)t|=r&1,r>>=1;return r+t}function mx(r,t,e,n){var a=t+1;if(a===e)return 1;if(n(r[a++],r[t])<0){for(;a=0;)a++;return a-t}function oB(r,t,e){for(e--;t>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function dp(r,t,e,n,a,i){var o=0,s=0,l=1;if(i(r,t[e+a])>0){for(s=n-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function gp(r,t,e,n,a,i){var o=0,s=0,l=1;if(i(r,t[e+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function sB(r,t){var e=gl,n,a,i=0,o=[];n=[],a=[];function s(v,p){n[i]=v,a[i]=p,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]a[v+1])break;f(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]=gl||w>=gl);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),p===1){for(y=0;y=0;y--)r[S+y]=r[b+y];r[x]=o[_];return}for(var w=e;;){var T=0,C=0,A=!1;do if(t(o[_],r[m])<0){if(r[x--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[x--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[S+y]=r[b+y];if(p===0){A=!0;break}}if(r[x--]=o[_--],--g===1){A=!0;break}if(C=g-dp(r[m],o,0,g,g-1,t),C!==0){for(x-=C,_-=C,g-=C,S=x+1,b=_+1,y=0;y=gl||C>=gl);if(A)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(x-=p,m-=p,S=x+1,b=m+1,y=p-1;y>=0;y--)r[S+y]=r[b+y];r[x]=o[_]}else{if(g===0)throw new Error;for(b=x-(g-1),y=0;ys&&(l=s),_x(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),a-=i,e+=i}while(a!==0);o.forceMergeRuns()}}var Tr=1,Jl=2,hs=4,xx=!1;function yp(){xx||(xx=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Sx(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var lB=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Sx}return r.prototype.traverse=function(t,e){for(var n=0;n=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),ph;ph=Lt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var vu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-vu.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?vu.bounceIn(r*2)*.5:vu.bounceOut(r*2-1)*.5+.5}},Mf=Math.pow,Ka=Math.sqrt,dh=1e-8,WD=1e-4,bx=Ka(3),Df=1/3,Dn=Ao(),Gr=Ao(),ws=Ao();function Ya(r){return r>-dh&&rdh||r<-dh}function ke(r,t,e,n,a){var i=1-a;return i*i*(i*r+3*a*t)+a*a*(a*n+3*i*e)}function Tx(r,t,e,n,a){var i=1-a;return 3*(((t-r)*i+2*(e-t)*a)*i+(n-e)*a*a)}function gh(r,t,e,n,a,i){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-a,f=s*s-3*o*l,c=s*l-9*o*u,h=l*l-3*s*u,v=0;if(Ya(f)&&Ya(c))if(Ya(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[v++]=p)}else{var d=c*c-4*f*h;if(Ya(d)){var g=c/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y)}else if(d>0){var m=Ka(d),_=f*s+1.5*o*(-c+m),x=f*s+1.5*o*(-c-m);_<0?_=-Mf(-_,Df):_=Mf(_,Df),x<0?x=-Mf(-x,Df):x=Mf(x,Df);var p=(-s-(_+x))/(3*o);p>=0&&p<=1&&(i[v++]=p)}else{var b=(2*f*s-3*o*c)/(2*Ka(f*f*f)),S=Math.acos(b)/3,w=Ka(f),T=Math.cos(S),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+bx*Math.sin(S)))/(3*o),C=(-s+w*(T-bx*Math.sin(S)))/(3*o);p>=0&&p<=1&&(i[v++]=p),y>=0&&y<=1&&(i[v++]=y),C>=0&&C<=1&&(i[v++]=C)}}return v}function YD(r,t,e,n,a){var i=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(Ya(o)){if(UD(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var f=i*i-4*o*s;if(Ya(f))a[0]=-i/(2*o);else if(f>0){var c=Ka(f),u=(-i+c)/(2*o),h=(-i-c)/(2*o);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function ai(r,t,e,n,a,i){var o=(t-r)*a+r,s=(e-t)*a+t,l=(n-e)*a+e,u=(s-o)*a+o,f=(l-s)*a+s,c=(f-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=c,i[4]=c,i[5]=f,i[6]=l,i[7]=n}function $D(r,t,e,n,a,i,o,s,l,u,f){var c,h=.005,v=1/0,p,d,g,y;Dn[0]=l,Dn[1]=u;for(var m=0;m<1;m+=.05)Gr[0]=ke(r,e,a,o,m),Gr[1]=ke(t,n,i,s,m),g=oo(Dn,Gr),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*i*s;if(Ya(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var c=Ka(f),u=(-o+c)/(2*i),h=(-o-c)/(2*i);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function XD(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function Du(r,t,e,n,a){var i=(t-r)*n+r,o=(e-t)*n+t,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=e}function ZD(r,t,e,n,a,i,o,s,l){var u,f=.005,c=1/0;Dn[0]=o,Dn[1]=s;for(var h=0;h<1;h+=.05){Gr[0]=Be(r,e,a,h),Gr[1]=Be(t,n,i,h);var v=oo(Dn,Gr);v=0&&v=1?1:gh(0,n,i,1,l,s)&&ke(0,a,o,1,s[0])}}}var vB=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||ve,this.ondestroy=t.ondestroy||ve,this.onrestart=t.onrestart||ve,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,a=t-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=it(t)?t:vu[t]||k0(t)},r})(),jD=(function(){function r(t){this.value=t}return r})(),pB=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new jD(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Ps=(function(){function r(t){this._list=new pB,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,a=this._map,i=null;if(a[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new jD(e),s.key=t,n.insertEntry(s),a[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Cx={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function on(r){return r=Math.round(r),r<0?0:r>255?255:r}function dB(r){return r=Math.round(r),r<0?0:r>360?360:r}function Lu(r){return r<0?0:r>1?1:r}function mp(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?on(parseFloat(t)/100*255):on(parseInt(t,10))}function Ja(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Lu(parseFloat(t)/100):Lu(parseFloat(t))}function _p(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function $a(r,t,e){return r+(t-r)*e}function Nr(r,t,e,n,a){return r[0]=t,r[1]=e,r[2]=n,r[3]=a,r}function cy(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var qD=new Ps(20),Lf=null;function Vo(r,t){Lf&&cy(Lf,t),Lf=qD.put(r,Lf||t.slice())}function dr(r,t){if(r){t=t||[];var e=qD.get(r);if(e)return cy(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in Cx)return cy(t,Cx[n]),Vo(r,t),t;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){Nr(t,0,0,0,1);return}return Nr(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),Vo(r,t),t}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Nr(t,0,0,0,1);return}return Nr(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),Vo(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Nr(t,+u[0],+u[1],+u[2],1):Nr(t,0,0,0,1);f=Ja(u.pop());case"rgb":if(u.length>=3)return Nr(t,mp(u[0]),mp(u[1]),mp(u[2]),u.length===3?f:Ja(u[3])),Vo(r,t),t;Nr(t,0,0,0,1);return;case"hsla":if(u.length!==4){Nr(t,0,0,0,1);return}return u[3]=Ja(u[3]),hy(u,t),Vo(r,t),t;case"hsl":if(u.length!==3){Nr(t,0,0,0,1);return}return hy(u,t),Vo(r,t),t;default:return}}Nr(t,0,0,0,1)}}function hy(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=Ja(r[1]),a=Ja(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return t=t||[],Nr(t,on(_p(o,i,e+1/3)*255),on(_p(o,i,e)*255),on(_p(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function gB(r){if(r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,a=Math.min(t,e,n),i=Math.max(t,e,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var f=((i-t)/6+o/2)/o,c=((i-e)/6+o/2)/o,h=((i-n)/6+o/2)/o;t===i?l=h-c:e===i?l=1/3+f-h:n===i&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function vy(r,t){var e=dr(r);if(e){for(var n=0;n<3;n++)t<0?e[n]=e[n]*(1-t)|0:e[n]=(255-e[n])*t+e[n]|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return Vn(e,e.length===4?"rgba":"rgb")}}function xp(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var n=r*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=t[a],s=t[i],l=n-a;return e[0]=on($a(o[0],s[0],l)),e[1]=on($a(o[1],s[1],l)),e[2]=on($a(o[2],s[2],l)),e[3]=Lu($a(o[3],s[3],l)),e}}function yB(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=dr(t[a]),s=dr(t[i]),l=n-a,u=Vn([on($a(o[0],s[0],l)),on($a(o[1],s[1],l)),on($a(o[2],s[2],l)),Lu($a(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function Qa(r,t,e,n){var a=dr(r);if(r)return a=gB(a),t!=null&&(a[0]=dB(it(t)?t(a[0]):t)),e!=null&&(a[1]=Ja(it(e)?e(a[1]):e)),n!=null&&(a[2]=Ja(it(n)?n(a[2]):n)),Vn(hy(a),"rgba")}function yh(r,t){var e=dr(r);if(e&&t!=null)return e[3]=Lu(t),Vn(e,"rgba")}function Vn(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function mh(r,t){var e=dr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var Ax=new Ps(100);function py(r){if(q(r)){var t=Ax.get(r);return t||(t=vy(r,-.1),Ax.put(r,t)),t}else if(Sv(r)){var e=W({},r);return e.colorStops=Y(r.colorStops,function(n){return{offset:n.offset,color:vy(n.color,-.1)}}),e}return r}var _h=Math.round;function Iu(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=dr(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var Mx=1e-4;function Xa(r){return r-Mx}function If(r){return _h(r*1e3)/1e3}function dy(r){return _h(r*1e4)/1e4}function mB(r){return"matrix("+If(r[0])+","+If(r[1])+","+If(r[2])+","+If(r[3])+","+dy(r[4])+","+dy(r[5])+")"}var _B={left:"start",right:"end",center:"middle",middle:"middle"};function xB(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function SB(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function bB(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function KD(r){return r&&!!r.image}function wB(r){return r&&!!r.svgElement}function P0(r){return KD(r)||wB(r)}function JD(r){return r.type==="linear"}function QD(r){return r.type==="radial"}function t2(r){return r&&(r.type==="linear"||r.type==="radial")}function Av(r){return"url(#"+r+")"}function e2(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function r2(r){var t=r.x||0,e=r.y||0,n=(r.rotation||0)*Wc,a=nt(r.scaleX,1),i=nt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+_h(o*Wc)+"deg, "+_h(s*Wc)+"deg)"),l.join(" ")}var TB=(function(){return Lt.hasGlobalWindow&&it(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})(),gy=Array.prototype.slice;function aa(r,t,e){return(t-r)*e+r}function Sp(r,t,e,n){for(var a=t.length,i=0;in?t:r,i=Math.min(e,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)n.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=Lx,l=e;if(je(e)){var u=DB(e);s=u,(u===1&&!Rt(e[0])||u===2&&!Rt(e[0][0]))&&(o=!0)}else if(Rt(e)&&!Ze(e))s=Pf;else if(q(e))if(!isNaN(+e))s=Pf;else{var f=dr(e);f&&(l=f,s=Ql)}else if(Sv(e)){var c=W({},l);c.colorStops=Y(e.colorStops,function(v){return{offset:v.offset,color:dr(v.color)}}),JD(e)?s=yy:QD(e)&&(s=my),l=c}i===0?this.valType=s:(s!==this.valType||s===Lx)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=it(n)?n:vu[n]||k0(n)),a.push(h),h},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(d,g){return d.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=Ef(a),u=Ix(a),f=0;f=0&&!(o[f].percent<=e);f--);f=h(f,s-2)}else{for(f=c;fe);f++);f=h(f-1,s-2)}p=o[f+1],v=o[f]}if(v&&p){this._lastFr=f,this._lastFrP=e;var g=p.percent-v.percent,y=g===0?1:h((e-v.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=n?this._additiveValue:u?yl:t[l];if((Ef(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:p.rawValue;else if(Ef(i))i===Zc?Sp(m,v[a],p[a],y):CB(m,v[a],p[a],y);else if(Ix(i)){var _=v[a],x=p[a],b=i===yy;t[l]={type:b?"linear":"radial",x:aa(_.x,x.x,y),y:aa(_.y,x.y,y),colorStops:Y(_.colorStops,function(w,T){var C=x.colorStops[T];return{offset:aa(w.offset,C.offset,y),color:Xc(Sp([],w.color,C.color,y))}}),global:x.global},b?(t[l].x2=aa(_.x2,x.x2,y),t[l].y2=aa(_.y2,x.y2,y)):t[l].r=aa(_.r,x.r,y)}else if(u)Sp(m,v[a],p[a],y),n||(t[l]=Xc(m));else{var S=aa(v[a],p[a],y);n?this._additiveValue=S:t[l]=S}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,a=this._additiveValue;e===Pf?t[n]=t[n]+a:e===Ql?(dr(t[n],yl),kf(yl,yl,a,1),t[n]=Xc(yl)):e===Zc?kf(t[n],t[n],a,1):e===n2&&Dx(t[n],t[n],a,1)},r})(),E0=(function(){function r(t,e,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&a){C0("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,kt(e),n)},r.prototype.whenWithKeys=function(t,e,n,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,pu(u),a),this._trackKeys.push(s)}l.addKeyframe(t,pu(e[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function ys(){return new Date().getTime()}var IB=(function(r){te(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,a=e.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=ys()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,e||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(ph(n),!e._paused&&e.update())}ph(n)},t.prototype.start=function(){this._running||(this._time=ys(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ys(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ys()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var a=new E0(e,n.loop);return this.addAnimator(a),a},t})(Kr),kB=300,bp=Lt.domSupported,wp=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Y(r,function(a){var i=a.replace("mouse","pointer");return e.hasOwnProperty(i)?i:a});return{mouse:r,touch:t,pointer:n}})(),kx={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Px=!1;function _y(r){var t=r.pointerType;return t==="pen"||t==="touch"}function PB(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Tp(r){r&&(r.zrByTouch=!0)}function EB(r,t){return Br(r.dom,new RB(r,t),!0)}function a2(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var RB=(function(){function r(t,e){this.stopPropagation=ve,this.stopImmediatePropagation=ve,this.preventDefault=ve,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),en={mousedown:function(r){r=Br(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Br(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Br(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Br(this.dom,r);var t=r.toElement||r.relatedTarget;a2(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Px=!0,r=Br(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Px||(r=Br(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Br(this.dom,r),Tp(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),en.mousemove.call(this,r),en.mousedown.call(this,r)},touchmove:function(r){r=Br(this.dom,r),Tp(r),this.handler.processGesture(r,"change"),en.mousemove.call(this,r)},touchend:function(r){r=Br(this.dom,r),Tp(r),this.handler.processGesture(r,"end"),en.mouseup.call(this,r),+new Date-+this.__lastTouchMomentOx||r<-Ox}var bi=[],Fo=[],Ap=ze(),Mp=Math.abs,sa=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Si(this.rotation)||Si(this.x)||Si(this.y)||Si(this.scaleX-1)||Si(this.scaleY-1)||Si(this.skewX)||Si(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(Rx(n),this.invTransform=null);return}n=n||ze(),e?this.getLocalTransform(n):Rx(n),t&&(e?zn(n,t,n):Cv(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(bi);var n=bi[0]<0?-1:1,a=bi[1]<0?-1:1,i=((bi[0]-n)*e+n)/bi[0]||0,o=((bi[1]-a)*e+a)/bi[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||ze(),fn(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||ze(),zn(Fo,t.invTransform,e),e=Fo);var n=this.originX,a=this.originY;(n||a)&&(Ap[4]=n,Ap[5]=a,zn(Fo,e,Ap),Fo[4]-=n,Fo[5]-=a,e=Fo),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],a=this.invTransform;return a&&pe(n,n,a),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],a=this.transform;return a&&pe(n,n,a),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&Mp(t[0]-1)>1e-10&&Mp(t[3]-1)>1e-10?Math.sqrt(Mp(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Sh(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,a=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,c=t.y,h=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||a||s||l){var p=n+s,d=a+l;e[4]=-p*i-h*d*o,e[5]=-d*o-v*p*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=v*i,e[2]=h*o,u&&ci(e,e,u),e[4]+=n+f,e[5]+=a+c,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),Un=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Sh(r,t){for(var e=0;e=Nx)){r=r||pa;for(var t=[],e=+new Date,n=0;n<=127;n++)t[n]=un.measureText(String.fromCharCode(n),r).width;var a=+new Date-e;return a>16?Dp=Nx:a>2&&Dp++,t}}var Dp=0,Nx=5;function o2(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=VB(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function Gn(r,t){var e=r.strWidthCache,n=e.get(t);return n==null&&(n=un.measureText(t,r.font).width,e.put(t,n)),n}function Bx(r,t,e,n){var a=Gn(Fn(t),r),i=of(t),o=Es(0,a,e),s=so(0,i,n),l=new pt(o,s,a,i);return l}function Mv(r,t,e,n){var a=((r||"")+"").split(` `),i=a.length;if(i===1)return Bx(a[0],t,e,n);for(var o=new pt(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function bh(r,t,e){var n=t.position||"inside",a=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",c="top";if(n instanceof Array)l+=cn(n[0],e.width),u+=cn(n[1],e.height),f=null,c=null;else switch(n){case"left":l-=a,u+=s,f="right",c="middle";break;case"right":l+=a+o,u+=s,c="middle";break;case"top":l+=o/2,u-=a,f="center",c="bottom";break;case"bottom":l+=o/2,u+=i+a,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=a,u+=s,c="middle";break;case"insideRight":l+=o-a,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=a,f="center";break;case"insideBottom":l+=o/2,u+=i-a,f="center",c="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,f="right";break;case"insideBottomLeft":l+=a,u+=i-a,c="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var Lp="__zr_normal__",Ip=Un.concat(["ignore"]),FB=Hn(Un,function(r,t){return r[t]=!0,r},{ignore:!1}),Go={},GB=new pt(0,0,0,0),Of=[],Dv=(function(){function r(t){this.id=ED(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;i.copyTransform(e);var f=n.position!=null,c=n.autoOverflowArea,h=void 0;if((c||f)&&(h=GB,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),a||h.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Go,n,h):bh(Go,n,h),i.x=Go.x,i.y=Go.y,o=Go.align,s=Go.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,d=void 0;v==="center"?(p=h.width*.5,d=h.height*.5):(p=cn(v[0],h.width),d=cn(v[1],h.height)),u=!0,i.originX=-i.x+p+(a?0:h.x),i.originY=-i.y+d+(a?0:h.y)}}n.rotation!=null&&(i.rotation=n.rotation);var g=n.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var m=y.overflowRect=y.overflowRect||new pt(0,0,0,0);i.getLocalTransform(Of),fn(Of,Of),pt.copy(m,h),m.applyTransform(Of)}else y.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,x=void 0,b=void 0,S=void 0;_&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(x),S=!0)):(x=n.outsideFill,b=n.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(x),S=!0)),x=x||"#000",(x!==y.fill||b!==y.stroke||S!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=x,y.stroke=b,y.autoStroke=S,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=Tr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?wy:by},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&dr(e);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Vn(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},W(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(vt(t))for(var n=t,a=kt(n),i=0;i0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Lp,!1,t)},r.prototype.useState=function(t,e,n,a){var i=t===Lp,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(St(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){C0("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,h=this._textGuide;return c&&c.useState(t,e,n,f),h&&h.useState(t,e,n,f),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tr),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(t,e,h),g&&g.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tr)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var a=this.currentStates.slice(),i=St(a,t),o=St(a,e)>=0;i>=0?o?a.splice(i,1):a[i]=e:n&&!o&&a.push(e),this.useStates(a)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,a=0;a=0&&i.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,a=n.length,i=[],o=0;o0&&e.during&&i[0].during(function(p,d){e.during(d)});for(var h=0;h0||a.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},h&&(T={});for(var x=0;x<_;x++){var y=d[x];C[y]=e[y],h?T[y]=n[y]:e[y]=n[y]}}else if(h){A={};for(var x=0;x<_;x++){var y=d[x];A[y]=pu(e[y]),WB(e,n,y)}}var b=new E0(e,!1,!1,c?Ht(p,function(I){return I.targetName===t}):null);b.targetName=t,a.scope&&(b.scope=a.scope),h&&T&&b.whenWithKeys(0,T,d),A&&b.whenWithKeys(0,A,d),b.whenWithKeys(u??500,s?C:n,d).delay(f||0),r.addAnimator(b,t),o.push(b)}}var ot=(function(r){te(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,a=0;a=0&&(a.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var a=St(this._children,e);return a>=0&&this.replaceAt(n,a),this},t.prototype.replaceAt=function(e,n){var a=this._children,i=a[n];if(e&&e!==this&&e.parent!==this&&e!==i){a[n]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,a=this._children,i=St(a,e);return i<0?this:(a.splice(i,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var Z=QB;function QB(r,t,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 wh(r,t,e)}function wh(r,t,e){return q(r)?JB(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function ye(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),u2),r=(+r).toFixed(t),e?r:+r}function Xr(r){return r.sort(function(t,e){return t-e}),r}function En(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return tz(r)}function tz(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,a=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function f2(r,t){var e=Math.log,n=Math.LN10,a=Math.floor(e(r[1]-r[0])/n),i=Math.round(e(Pn(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function ez(r,t){var e=Hn(r,function(v,p){return v+(isNaN(p)?0:p)},0);if(e===0)return[];for(var n=Math.pow(10,t),a=Y(r,function(v){return(isNaN(v)?0:v)/e*n*100}),i=n*100,o=Y(a,function(v){return Math.floor(v)}),s=Hn(o,function(v,p){return v+p},0),l=Y(a,function(v,p){return v-o[p]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return Y(o,function(v){return v/n})}function rz(r,t){var e=Math.max(En(r),En(t)),n=r+t;return e>u2?n:ye(n,e)}var Fx=9007199254740991;function c2(r){var t=Math.PI*2;return(r%t+t)%t}function ku(r){return r>-Vx&&r=10&&t++,t}function h2(r,t){var e=R0(r),n=Math.pow(10,e),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Ep(r,t){var e=(r.length-1)*t+1,n=Math.floor(e),a=+r[n-1],i=e-n;return i?a+i*(r[n]-a):a}function Gx(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,n=0;n0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Rp(r){r.option=r.parentModel=r.ecModel=null}var wz=".",wi="___EC__COMPONENT__CONTAINER___",w2="___EC__EXTENDED_CLASS___";function Rn(r){var t={main:"",sub:""};if(r){var e=r.split(wz);t.main=e[0]||"",t.sub=e[1]||""}return t}function Tz(r){qe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Cz(r){return!!(r&&r[w2])}function B0(r,t){r.$constructor=r,r.extend=function(e){var n=this,a;return Az(n)?a=(function(i){F(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(e.$constructor||n).apply(this,arguments)},MN(a,this)),W(a.prototype,e),a[w2]=!0,a.extend=this.extend,a.superCall=Lz,a.superApply=Iz,a.superClass=n,a}}function Az(r){return it(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function T2(r,t){r.extend=t.extend}var Mz=Math.round(Math.random()*10);function Dz(r){var t=["__\0is_clz",Mz++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function Lz(r,t){for(var e=[],n=2;n=0||i&&St(i,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var kz=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Pz=mo(kz),Ez=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Pz(this,t,e)},r})(),Ay=new Ps(50);function Rz(r){if(typeof r=="string"){var t=Ay.get(r);return t&&t.image}else return r}function z0(r,t,e,n,a){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=Ay.get(r),o={hostEl:e,cb:n,cbPayload:a};return i?(t=i.image,!Iv(t)&&i.pending.push(o)):(t=un.loadImage(r,Yx,Yx),t.__zrImageSrc=r,Ay.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Yx(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=Gn(o,e);return f>l&&(e="",f=0),l=r-f,a.ellipsis=e,a.ellipsisWidth=f,a.contentWidth=l,a.containerWidth=r,a}function A2(r,t,e){var n=e.containerWidth,a=e.contentWidth,i=e.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=Gn(i,t);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?Nz(t,a,i):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=Gn(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Nz(r,t,e){for(var n=0,a=0,i=r.length;ag&&v){var _=Math.floor(g/h);p=p||y.length>_,y=y.slice(0,_),m=y.length*h}if(a&&f&&d!=null)for(var x=C2(d,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},S=0;Sp&&Np(i,o.substring(p,g),t,v),Np(i,d[2],t,v,d[1]),p=Op.lastIndex}pc){var z=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,M,A),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&p+n.accumWidth>n.width&&(f=t.split(` `),u=!0),n.accumWidth=p}else{var d=M2(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=d.accumWidth+v,c=d.linesWidths,f=d.lines}}f||(f=t.split(` `));for(var g=Fn(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Hz=Hn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Wz(r){return Gz(r)?!!Hz[r]:!0}function M2(r,t,e,n,a){for(var i=[],o=[],s="",l="",u=0,f=0,c=Fn(t),h=0;he:a+f+p>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=v,u+=p,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=v,f=p)):d?(i.push(l),o.push(u),l=v,u=p):(i.push(v),o.push(p));continue}f+=p,d?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}function Xx(r,t,e,n,a,i){if(r.baseX=e,r.baseY=n,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;pt.set(Zx,Es(e,o,a),so(n,s,i),o,s),pt.intersect(t,Zx,null,jx);var l=jx.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Es(l.x,l.width,a,!0),r.baseY=so(l.y,l.height,i,!0)}}var Zx=new pt(0,0,0,0),jx={outIntersectRect:{},clamp:!0};function V0(r){return r!=null?r+="":r=""}function Uz(r){var t=V0(r.text),e=r.font,n=Gn(Fn(e),t),a=of(e);return My(r,n,a,null)}function My(r,t,e,n){var a=new pt(Es(r.x||0,t,r.textAlign),so(r.y||0,e,r.textBaseline),t,e),i=n??(D2(r)?r.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function D2(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Dy="__zr_style_"+Math.round(Math.random()*10),lo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},kv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};lo[Dy]=!0;var qx=["z","z2","invisible"],Yz=["invisible"],jr=(function(r){te(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=kt(e),a=0;a1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(Nf[0]=Fp(a)*e+r,Nf[1]=Vp(a)*n+t,Bf[0]=Fp(i)*e+r,Bf[1]=Vp(i)*n+t,u(s,Nf,Bf),f(l,Nf,Bf),a=a%Ti,a<0&&(a=a+Ti),i=i%Ti,i<0&&(i=i+Ti),a>i&&!o?i+=Ti:aa&&(zf[0]=Fp(v)*e+r,zf[1]=Vp(v)*n+t,u(s,zf,s),f(l,zf,l))}var jt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ci=[],Ai=[],yn=[],Da=[],mn=[],_n=[],Gp=Math.min,Hp=Math.max,Mi=Math.cos,Di=Math.sin,Qn=Math.abs,Ly=Math.PI,za=Ly*2,Wp=typeof Float32Array<"u",ml=[];function Up(r){var t=Math.round(r/Ly*1e8)/1e8;return t%2*Ly}function Ev(r,t){var e=Up(r[0]);e<0&&(e+=za);var n=e-r[0],a=r[1];a+=n,!t&&a-e>=za?a=e+za:t&&e-a>=za?a=e-za:!t&&e>a?a=e+(za-Up(e-a)):t&&e0&&(this._ux=Qn(n/xh/t)||0,this._uy=Qn(n/xh/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(jt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=Qn(t-this._xi),a=Qn(e-this._yi),i=n>this._ux||a>this._uy;if(this.addData(jt.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,a,i,o){return this._drawPendingPt(),this.addData(jt.C,t,e,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,a){return this._drawPendingPt(),this.addData(jt.Q,t,e,n,a),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(t,e,n,a,i,o){this._drawPendingPt(),ml[0]=a,ml[1]=i,Ev(ml,o),a=ml[0],i=ml[1];var s=i-a;return this.addData(jt.A,t,e,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,a,i,o),this._xi=Mi(i)*n+t,this._yi=Di(i)*n+e,this},r.prototype.arcTo=function(t,e,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,a,i),this},r.prototype.rect=function(t,e,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,a),this.addData(jt.R,t,e,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(jt.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&Wp&&(this.data=new Float32Array(e));for(var n=0;n0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){yn[0]=yn[1]=mn[0]=mn[1]=Number.MAX_VALUE,Da[0]=Da[1]=_n[0]=_n[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,a=0,i=0,o;for(o=0;on||Qn(_)>a||h===e-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case jt.C:{var x=t[h++],b=t[h++],g=t[h++],y=t[h++],S=t[h++],w=t[h++];d=uB(i,o,x,b,g,y,S,w,10),i=S,o=w;break}case jt.Q:{var x=t[h++],b=t[h++],g=t[h++],y=t[h++];d=cB(i,o,x,b,g,y,10),i=g,o=y;break}case jt.A:var T=t[h++],C=t[h++],A=t[h++],M=t[h++],I=t[h++],L=t[h++],P=L+I;h+=1,p&&(s=Mi(I)*A+T,l=Di(I)*M+C),d=Hp(A,M)*Gp(za,Math.abs(L)),i=Mi(P)*A+T,o=Di(P)*M+C;break;case jt.R:{s=i=t[h++],l=o=t[h++];var E=t[h++],R=t[h++];d=E*2+R*2;break}case jt.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[c++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,f,c,h,v=e<1,p,d,g=0,y=0,m,_=0,x,b;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=e*d,!m)))t:for(var S=0;S0&&(t.lineTo(x,b),_=0),w){case jt.M:s=u=n[S++],l=f=n[S++],t.moveTo(u,f);break;case jt.L:{c=n[S++],h=n[S++];var C=Qn(c-u),A=Qn(h-f);if(C>a||A>i){if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;t.lineTo(u*(1-I)+c*I,f*(1-I)+h*I);break t}g+=M}t.lineTo(c,h),u=c,f=h,_=0}else{var L=C*C+A*A;L>_&&(x=c,b=h,_=L)}break}case jt.C:{var P=n[S++],E=n[S++],R=n[S++],B=n[S++],N=n[S++],z=n[S++];if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;ai(u,P,R,N,I,Ci),ai(f,E,B,z,I,Ai),t.bezierCurveTo(Ci[1],Ai[1],Ci[2],Ai[2],Ci[3],Ai[3]);break t}g+=M}t.bezierCurveTo(P,E,R,B,N,z),u=N,f=z;break}case jt.Q:{var P=n[S++],E=n[S++],R=n[S++],B=n[S++];if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;Du(u,P,R,I,Ci),Du(f,E,B,I,Ai),t.quadraticCurveTo(Ci[1],Ai[1],Ci[2],Ai[2]);break t}g+=M}t.quadraticCurveTo(P,E,R,B),u=R,f=B;break}case jt.A:var k=n[S++],G=n[S++],H=n[S++],O=n[S++],j=n[S++],st=n[S++],_t=n[S++],zt=!n[S++],lt=H>O?H:O,rt=Qn(H-O)>.001,yt=j+st,tt=!1;if(v){var M=p[y++];g+M>m&&(yt=j+st*(m-g)/M,tt=!0),g+=M}if(rt&&t.ellipse?t.ellipse(k,G,H,O,_t,j,yt,zt):t.arc(k,G,lt,j,yt,zt),tt)break t;T&&(s=Mi(j)*H+k,l=Di(j)*O+G),u=Mi(yt)*H+k,f=Di(yt)*O+G;break;case jt.R:s=u=n[S],l=f=n[S+1],c=n[S++],h=n[S++];var gt=n[S++],Yt=n[S++];if(v){var M=p[y++];if(g+M>m){var Pt=m-g;t.moveTo(c,h),t.lineTo(c+Gp(Pt,gt),h),Pt-=gt,Pt>0&&t.lineTo(c+gt,h+Gp(Pt,Yt)),Pt-=Yt,Pt>0&&t.lineTo(c+Hp(gt-Pt,0),h+Yt),Pt-=gt,Pt>0&&t.lineTo(c,h+Hp(Yt-Pt,0));break t}g+=M}t.rect(c,h,gt,Yt);break;case jt.Z:if(v){var M=p[y++];if(g+M>m){var I=(m-g)/M;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=M}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=jt,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function Fa(r,t,e,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>t+s&&o>n+s||or+s&&i>e+s||it+c&&f>n+c&&f>i+c&&f>s+c||fr+c&&u>e+c&&u>a+c&&u>o+c||ut+u&&l>n+u&&l>i+u||lr+u&&s>e+u&&s>a+u||se||f+ua&&(a+=_l);var h=Math.atan2(l,s);return h<0&&(h+=_l),h>=n&&h<=a||h+_l>=n&&h+_l<=a}function ia(r,t,e,n,a,i){if(i>t&&i>n||ia?s:0}var La=Yn.CMD,Li=Math.PI*2,Jz=1e-4;function Qz(r,t){return Math.abs(r-t)t&&u>n&&u>i&&u>s||u1&&tV(),v=ke(t,n,i,s,Vr[0]),h>1&&(p=ke(t,n,i,s,Vr[1]))),h===2?gt&&s>n&&s>i||s=0&&u<=1){for(var f=0,c=Be(t,n,i,u),h=0;he||s<-e)return 0;var l=Math.sqrt(e*e-s*s);nr[0]=-l,nr[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=Li-1e-4){n=0,a=Li;var f=i?1:-1;return o>=nr[0]+r&&o<=nr[1]+r?f:0}if(n>a){var c=n;n=a,a=c}n<0&&(n+=Li,a+=Li);for(var h=0,v=0;v<2;v++){var p=nr[v];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=Li+d),(d>=n&&d<=a||d+Li>=n&&d+Li<=a)&&(d>Math.PI/2&&d1&&(e||(s+=ia(l,u,f,c,n,a))),g&&(l=i[p],u=i[p+1],f=l,c=u),d){case La.M:f=i[p++],c=i[p++],l=f,u=c;break;case La.L:if(e){if(Fa(l,u,i[p],i[p+1],t,n,a))return!0}else s+=ia(l,u,i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case La.C:if(e){if(qz(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],t,n,a))return!0}else s+=eV(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case La.Q:if(e){if(L2(l,u,i[p++],i[p++],i[p],i[p+1],t,n,a))return!0}else s+=rV(l,u,i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case La.A:var y=i[p++],m=i[p++],_=i[p++],x=i[p++],b=i[p++],S=i[p++];p+=1;var w=!!(1-i[p++]);h=Math.cos(b)*_+y,v=Math.sin(b)*x+m,g?(f=h,c=v):s+=ia(l,u,h,v,n,a);var T=(n-y)*x/_+y;if(e){if(Kz(y,m,x,b,b+S,w,t,T,a))return!0}else s+=nV(y,m,x,b,b+S,w,T,a);l=Math.cos(b+S)*_+y,u=Math.sin(b+S)*x+m;break;case La.R:f=l=i[p++],c=u=i[p++];var C=i[p++],A=i[p++];if(h=f+C,v=c+A,e){if(Fa(f,c,h,c,t,n,a)||Fa(h,c,h,v,t,n,a)||Fa(h,v,f,v,t,n,a)||Fa(f,v,f,c,t,n,a))return!0}else s+=ia(h,c,h,v,n,a),s+=ia(f,v,f,c,n,a);break;case La.Z:if(e){if(Fa(l,u,f,c,t,n,a))return!0}else s+=ia(l,u,f,c,n,a);l=f,u=c;break}}return!e&&!Qz(u,c)&&(s+=ia(l,u,f,c,n,a)||0),s!==0}function aV(r,t,e){return I2(r,0,!1,t,e)}function iV(r,t,e,n){return I2(r,t,!0,e,n)}var Th=ht({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},lo),oV={style:ht({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},kv.style)},Yp=Un.concat(["invisible","culling","z","z2","zlevel","parent"]),At=(function(r){te(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(l){e.buildPath(l,e.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s.5?by:n>.2?zB:wy}else if(e)return wy}return by},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(q(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=mh(e,0)0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,a=!e;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&hs)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||a){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect(),o=this.style;if(e=a[0],n=a[1],i.contain(e,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),iV(s,l/u,e,n)))return!0}if(this.hasFill())return aV(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=hs,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var a=this.shape;return a||(a=this.shape={}),typeof e=="string"?a[e]=n:W(a,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&hs)},t.prototype.createStyle=function(e){return wv(Th,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=W({},this.shape))},t.prototype._applyStateObj=function(e,n,a,i,o,s){r.prototype._applyStateObj.call(this,e,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=W({},a.shape),W(u,n.shape)):(u=W({},i?this.shape:a.shape),W(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=W({},this.shape);for(var f={},c=kt(u),h=0;ha&&(c=s+l,s*=a/c,l*=a/c),u+f>a&&(c=u+f,u*=a/c,f*=a/c),l+u>i&&(c=l+u,l*=i/c,u*=i/c),s+f>i&&(c=s+f,s*=i/c,f*=i/c),r.moveTo(e+s,n),r.lineTo(e+a-l,n),l!==0&&r.arc(e+a-l,n+l,l,-Math.PI/2,0),r.lineTo(e+a,n+i-u),u!==0&&r.arc(e+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(e+f,n+i),f!==0&&r.arc(e+f,n+i-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var ms=Math.round;function Rv(r,t,e){if(t){var n=t.x1,a=t.x2,i=t.y1,o=t.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(ms(n*2)===ms(a*2)&&(r.x1=r.x2=Ar(n,s,!0)),ms(i*2)===ms(o*2)&&(r.y1=r.y2=Ar(i,s,!0))),r}}function k2(r,t,e){if(t){var n=t.x,a=t.y,i=t.width,o=t.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Ar(n,s,!0),r.y=Ar(a,s,!0),r.width=Math.max(Ar(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Ar(a+o,s,!1)-r.y,o===0?0:1)),r}}function Ar(r,t,e){if(!t)return r;var n=ms(r*2);return(n+ms(t))%2===0?n/2:(n+(e?1:-1))/2}var hV=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),vV={},Tt=(function(r){te(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new hV},t.prototype.buildPath=function(e,n){var a,i,o,s;if(this.subPixelOptimize){var l=k2(vV,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?cV(e,n):e.rect(a,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(At);Tt.prototype.type="rect";var eS={fill:"#000"},rS=2,xn={},pV={style:ht({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},kv.style)},Ot=(function(r){te(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=eS,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=0;I=0&&(P=S[L],P.align==="right");)this._placeToken(P,e,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(M+=(f-(M-g)-(m-I)-C)/2;A<=L;)P=S[A],this._placeToken(P,e,T,y,M+P.width/2,"center",_),M+=P.width,A++;y+=T}},t.prototype._placeToken=function(e,n,a,i,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,c=i+a/2;f==="top"?c=i+e.height/2:f==="bottom"&&(c=i+a-e.height/2);var h=!e.isLineHolder&&$p(u);h&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,c-e.height/2,e.width,e.height);var v=!!u.backgroundColor,p=e.textPadding;p&&(o=lS(o,s,p),c-=e.height/2-p[0]-e.innerHeight/2);var d=this._getOrCreateChild(Rs),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,x=!1,b=sS("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),S=oS("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||m)?(_=rS,x=!0,y.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=c,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||pa,g.opacity=Dr(u.opacity,n.opacity,1),aS(g,u),S&&(g.lineWidth=Dr(u.lineWidth,n.lineWidth,_),g.lineDash=nt(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=S),b&&(g.fill=b),d.setBoundingRect(My(g,e.contentWidth,e.contentHeight,x?0:null))},t.prototype._renderBackground=function(e,n,a,i,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,c=l&&l.image,h=l&&!c,v=e.borderRadius,p=this,d,g;if(h||e.lineHeight||u&&f){d=this._getOrCreateChild(Tt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=v,d.dirtyShape()}if(h){var m=d.style;m.fill=l||null,m.fillOpacity=nt(e.fillOpacity,1)}else if(c){g=this._getOrCreateChild(Fe),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=nt(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var x=(d||g).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=Dr(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return E2(e)&&(n=[e.fontStyle,e.fontWeight,P2(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&$r(n)||e.textFont||e.font},t})(jr),dV={left:!0,right:1,center:1},gV={top:1,bottom:1,middle:1},nS=["fontStyle","fontWeight","fontSize","fontFamily"];function P2(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?b0+"px":r+"px"}function aS(r,t){for(var e=0;e=0,i=!1;if(r instanceof At){var o=R2(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Ho(s)||Ho(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=W({},n),u=W({},u),u.fill=s):!Ho(u.fill)&&Ho(s)?(i=!0,n=W({},n),u=W({},u),u.fill=py(s)):!Ho(u.stroke)&&Ho(l)&&(i||(n=W({},n),u=W({},u)),u.stroke=py(l)),n.style=u}}if(n&&n.z2==null){i||(n=W({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??Js)}return n}function wV(r,t,e){if(e&&e.z2==null){e=W({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??mV)}return e}function TV(r,t,e){var n=St(r.currentStates,t)>=0,a=r.style.opacity,i=n?null:SV(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=W({},e),o=W({opacity:n?a:i.opacity*.1},o),e.style=o),e}function Xp(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return bV(this,r,t,e);if(r==="blur")return TV(this,r,e);if(r==="select")return wV(this,r,e)}return e}function _o(r){r.stateProxy=Xp;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Xp),e&&(e.stateProxy=Xp)}function vS(r,t){!G2(r,t)&&!r.__highByOuter&&wa(r,O2)}function pS(r,t){!G2(r,t)&&!r.__highByOuter&&wa(r,N2)}function ya(r,t){r.__highByOuter|=1<<(t||0),wa(r,O2)}function ma(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&wa(r,N2)}function z2(r){wa(r,W0)}function U0(r){wa(r,B2)}function V2(r){wa(r,_V)}function F2(r){wa(r,xV)}function G2(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function H2(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(a,i){var o=F0(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){B2(u)}),s&&e.push(i)),o.isBlured=!1}),D(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function Py(r,t,e,n){var a=n.getModel();e=e||"coordinateSystem";function i(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function fo(r,t,e){eo(r,!0),wa(r,_o),Ry(r,t,e)}function IV(r){eo(r,!1)}function ne(r,t,e,n){n?IV(r):fo(r,t,e)}function Ry(r,t,e){var n=dt(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var gS=["emphasis","blur","select"],kV={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Me(r,t,e,n){e=e||"itemStyle";for(var a=0;a1&&(o*=Zp(p),s*=Zp(p));var d=(a===i?-1:1)*Zp((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,g=d*o*v/s,y=d*-s*h/o,m=(r+e)/2+Ff(c)*g-Vf(c)*y,_=(t+n)/2+Vf(c)*g+Ff(c)*y,x=xS([1,0],[(h-g)/o,(v-y)/s]),b=[(h-g)/o,(v-y)/s],S=[(-1*h-g)/o,(-1*v-y)/s],w=xS(b,S);if(Ny(b,S)<=-1&&(w=xl),Ny(b,S)>=1&&(w=0),w<0){var T=Math.round(w/xl*1e6)/1e6;w=xl*2+T%2*xl}f.addData(u,m,_,o,s,x,w,c,i)}var BV=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,zV=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function VV(r){var t=new Yn;if(!r)return t;var e=0,n=0,a=e,i=n,o,s=Yn.CMD,l=r.match(BV);if(!l)return t;for(var u=0;uP*P+E*E&&(T=A,C=M),{cx:T,cy:C,x0:-f,y0:-c,x1:T*(a/b-1),y1:C*(a/b-1)}}function $V(r){var t;if(U(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function XV(r,t){var e,n=tu(t.r,0),a=tu(t.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,c=t.cy,h=!!t.clockwise,v=bS(u-l),p=v>jp&&v%jp;if(p>tn&&(v=p),!(n>tn))r.moveTo(f,c);else if(v>jp-tn)r.moveTo(f+n*Uo(l),c+n*Ii(l)),r.arc(f,c,n,l,u,!h),a>tn&&(r.moveTo(f+a*Uo(u),c+a*Ii(u)),r.arc(f,c,a,u,l,h));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0,w=void 0,T=void 0,C=void 0,A=void 0,M=void 0,I=void 0,L=void 0,P=void 0,E=n*Uo(l),R=n*Ii(l),B=a*Uo(u),N=a*Ii(u),z=v>tn;if(z){var k=t.cornerRadius;k&&(e=$V(k),d=e[0],g=e[1],y=e[2],m=e[3]);var G=bS(n-a)/2;if(_=Sn(G,y),x=Sn(G,m),b=Sn(G,d),S=Sn(G,g),C=w=tu(_,x),A=T=tu(b,S),(w>tn||T>tn)&&(M=n*Uo(u),I=n*Ii(u),L=a*Uo(l),P=a*Ii(l),vtn){var rt=Sn(y,C),yt=Sn(m,C),tt=Gf(L,P,E,R,n,rt,h),gt=Gf(M,I,B,N,n,yt,h);r.moveTo(f+tt.cx+tt.x0,c+tt.cy+tt.y0),C0&&r.arc(f+tt.cx,c+tt.cy,rt,$e(tt.y0,tt.x0),$e(tt.y1,tt.x1),!h),r.arc(f,c,n,$e(tt.cy+tt.y1,tt.cx+tt.x1),$e(gt.cy+gt.y1,gt.cx+gt.x1),!h),yt>0&&r.arc(f+gt.cx,c+gt.cy,yt,$e(gt.y1,gt.x1),$e(gt.y0,gt.x0),!h))}else r.moveTo(f+E,c+R),r.arc(f,c,n,l,u,!h);if(!(a>tn)||!z)r.lineTo(f+B,c+N);else if(A>tn){var rt=Sn(d,A),yt=Sn(g,A),tt=Gf(B,N,M,I,a,-yt,h),gt=Gf(E,R,L,P,a,-rt,h);r.lineTo(f+tt.cx+tt.x0,c+tt.cy+tt.y0),A0&&r.arc(f+tt.cx,c+tt.cy,yt,$e(tt.y0,tt.x0),$e(tt.y1,tt.x1),!h),r.arc(f,c,a,$e(tt.cy+tt.y1,tt.cx+tt.x1),$e(gt.cy+gt.y1,gt.cx+gt.x1),h),rt>0&&r.arc(f+gt.cx,c+gt.cy,rt,$e(gt.y1,gt.x1),$e(gt.y0,gt.x0),!h))}else r.lineTo(f+B,c+N),r.arc(f,c,a,u,l,h)}r.closePath()}}}var ZV=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})(),Ke=(function(r){te(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new ZV},t.prototype.buildPath=function(e,n){XV(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(At);Ke.prototype.type="sector";var jV=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),lf=(function(r){te(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new jV},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.PI*2;e.moveTo(a+n.r,i),e.arc(a,i,n.r,0,o,!1),e.moveTo(a+n.r0,i),e.arc(a,i,n.r0,0,o,!0)},t})(At);lf.prototype.type="ring";function qV(r,t,e,n){var a=[],i=[],o=[],s=[],l,u,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var h=0,v=r.length;h=2){if(n){var i=qV(a,n,e,t.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,c=a.length;sPi[1]){if(i=!1,Ne.negativeSize||n)return i;var l=Hf(Pi[0]-ki[1]),u=Hf(ki[0]-Pi[1]);qp(l,u)>Uf.len()&&(l=u||!Ne.bidirectional)&&(ct.scale(Wf,s,-u*a),Ne.useDir&&Ne.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var a=this._axes[t],i=this._origin,o=e[0].dot(a)+i[t],s=o,l=o,u=1;u0){var c=f.duration,h=f.delay,v=f.easing,p={duration:c,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Bt(r,t,e,n,a,i){X0("update",r,t,e,n,a,i)}function Qt(r,t,e,n,a,i){X0("enter",r,t,e,n,a,i)}function Cs(r){if(!r.__zr)return!0;for(var t=0;tPn(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function CS(r){return!r.isGroup}function c5(r){return r.shape!=null}function ff(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){CS(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return c5(o)&&(s.shape=ut(o.shape)),s}var i=n(r);t.traverse(function(o){if(CS(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Bt(o,l,e,dt(o).dataIndex)}}})}function nL(r,t){return Y(r,function(e){var n=e[0];n=he(n,t.x),n=Lr(n,t.x+t.width);var a=e[1];return a=he(a,t.y),a=Lr(a,t.y+t.height),[n,a]})}function h5(r,t){var e=he(r.x,t.x),n=Lr(r.x+r.width,t.x+t.width),a=he(r.y,t.y),i=Lr(r.y+r.height,t.y+t.height);if(n>=e&&i>=a)return{x:e,y:a,width:n-e,height:i-a}}function cf(r,t,e){var n=W({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),ht(a,e),new Fe(n)):Ou(r.replace("path://",""),n,e,"center")}function eu(r,t,e,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=Kp(v,p,f,c)/h;return!(g<0||g>1)}function Kp(r,t,e,n){return r*n-e*t}function v5(r){return r<=1e-6&&r>=-1e-6}function xo(r,t,e,n,a){return t==null||(Rt(t)?ie[0]=ie[1]=ie[2]=ie[3]=t:(ie[0]=t[0],ie[1]=t[1],ie[2]=t[2],ie[3]=t[3]),n&&(ie[0]=he(0,ie[0]),ie[1]=he(0,ie[1]),ie[2]=he(0,ie[2]),ie[3]=he(0,ie[3])),e&&(ie[0]=-ie[0],ie[1]=-ie[1],ie[2]=-ie[2],ie[3]=-ie[3]),AS(r,ie,"x","width",3,1,a&&a[0]||0),AS(r,ie,"y","height",0,2,a&&a[1]||0)),r}var ie=[0,0,0,0];function AS(r,t,e,n,a,i,o){var s=t[i]+t[a],l=r[n];r[n]+=s,o=he(0,Lr(o,l)),r[n]=0?-t[a]:t[i]>=0?l+t[i]:Pn(s)>1e-8?(l-o)*t[a]/s:0):r[e]-=t[a]}function Ca(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,a=q(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&D(kt(l),function(f){Q(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=dt(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:ht({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function zy(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function hi(r,t){if(r)if(U(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function Gv(r,t,e){oL(r,t,e,-1/0)}function oL(r,t,e,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function vi(r,t){return bt(bt({},r,!0),t,!0)}const C5={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},A5={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Ih="ZH",K0="EN",As=K0,Qc={},J0={},hL=Lt.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||As).toUpperCase();return r.indexOf(Ih)>-1?Ih:As})():As;function vL(r,t){r=r.toUpperCase(),J0[r]=new It(t),Qc[r]=t}function M5(r){if(q(r)){var t=Qc[r.toUpperCase()]||{};return r===Ih||r===K0?ut(t):bt(ut(t),ut(Qc[As]),!1)}else return bt(ut(r),ut(Qc[As]),!1)}function Fy(r){return J0[r]}function D5(){return J0[As]}vL(K0,C5);vL(Ih,A5);var Gy=null;function L5(r){Gy||(Gy=r)}function _e(){return Gy}var Q0=1e3,t_=Q0*60,yu=t_*60,Yr=yu*24,kS=Yr*365,I5={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},th={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},k5="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",$f="{yyyy}-{MM}-{dd}",PS={year:"{yyyy}",month:"{yyyy}-{MM}",day:$f,hour:$f+" "+th.hour,minute:$f+" "+th.minute,second:$f+" "+th.second,millisecond:k5},br=["year","month","day","hour","minute","second","millisecond"],P5=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function E5(r){return!q(r)&&!it(r)?R5(r):r}function R5(r){r=r||{};var t={},e=!0;return D(br,function(n){e&&(e=r[n]==null)}),D(br,function(n,a){var i=r[n];t[n]={};for(var o=null,s=a;s>=0;s--){var l=br[s],u=vt(i)&&!U(i)?i[l]:i,f=void 0;U(u)?(f=u.slice(),o=f[0]||""):q(u)?(o=u,f=[o]):(o==null?o=th[n]:I5[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[n][l]=f}}),t}function Ia(r,t){return r+="","0000".substr(0,t-r.length)+r}function mu(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 O5(r){return r===mu(r)}function N5(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Wv(r,t,e,n){var a=Mo(r),i=a[pL(e)](),o=a[e_(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[r_(e)](),u=a["get"+(e?"UTC":"")+"Day"](),f=a[n_(e)](),c=(f-1)%12+1,h=a[a_(e)](),v=a[i_(e)](),p=a[o_(e)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=n instanceof It?n:Fy(n||hL)||D5(),m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),S=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Ia(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Ia(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ia(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ia(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ia(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Ia(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Ia(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Ia(p,3)).replace(/{S}/g,p+"")}function B5(r,t,e,n,a){var i=null;if(q(e))i=e;else if(it(e)){var o={time:r.time,level:r.time.level},s=_e();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=xs(r.value,a);i=e[f][f][0]}}return Wv(new Date(r.value),i,a,n)}function xs(r,t){var e=Mo(r),n=e[e_(t)]()+1,a=e[r_(t)](),i=e[n_(t)](),o=e[a_(t)](),s=e[i_(t)](),l=e[o_(t)](),u=l===0,f=u&&s===0,c=f&&o===0,h=c&&i===0,v=h&&a===1,p=v&&n===1;return p?"year":v?"month":h?"day":c?"hour":f?"minute":u?"second":"millisecond"}function Hy(r,t,e){switch(t){case"year":r[dL(e)](0);case"month":r[gL(e)](1);case"day":r[yL(e)](0);case"hour":r[mL(e)](0);case"minute":r[_L(e)](0);case"second":r[xL(e)](0)}return r}function pL(r){return r?"getUTCFullYear":"getFullYear"}function e_(r){return r?"getUTCMonth":"getMonth"}function r_(r){return r?"getUTCDate":"getDate"}function n_(r){return r?"getUTCHours":"getHours"}function a_(r){return r?"getUTCMinutes":"getMinutes"}function i_(r){return r?"getUTCSeconds":"getSeconds"}function o_(r){return r?"getUTCMilliseconds":"getMilliseconds"}function z5(r){return r?"setUTCFullYear":"setFullYear"}function dL(r){return r?"setUTCMonth":"setMonth"}function gL(r){return r?"setUTCDate":"setDate"}function yL(r){return r?"setUTCHours":"setHours"}function mL(r){return r?"setUTCMinutes":"setMinutes"}function _L(r){return r?"setUTCSeconds":"setSeconds"}function xL(r){return r?"setUTCMilliseconds":"setMilliseconds"}function SL(r){if(!v2(r))return q(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function bL(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var hf=bv;function Wy(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&$r(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Mo(r):r;if(isNaN(+l)){if(s)return"-"}else return Wv(l,n,e)}if(t==="ordinal")return Qg(r)?a(r):Rt(r)&&i(r)?r+"":"-";var u=ga(r);return i(u)?SL(u):Qg(r)?a(r):typeof r=="boolean"?r+"":"-"}var ES=["a","b","c","d","e","f","g"],td=function(r,t){return"{"+r+(t??"")+"}"};function wL(r,t,e){U(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function bo(r,t){return t=t||"transparent",q(r)?r:vt(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function kh(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var eh={},ed={},vf=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=n(eh),this._normalMasterList=n(ed);function n(a,i){var o=[];return D(a,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){D(this._normalMasterList,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){eh[t]=e;return}ed[t]=e},r.get=function(t){return ed[t]||eh[t]},r})();function G5(r){return!!eh[r]}var Uy={coord:1,coord2:2};function H5(r){TL.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var TL=et();function W5(r){var t=r.getShallow("coord",!0),e=Uy.coord;if(t==null){var n=TL.get(r.type);n&&n.getCoord2&&(e=Uy.coord2,t=n.getCoord2(r))}return{coord:t,from:e}}var Ln={none:0,dataCoordSys:1,boxCoordSys:2};function CL(r,t){var e=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=Ln.none;if(e){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=Ln.dataCoordSys,i||(a=Ln.none)):n==="box"&&(a=Ln.boxCoordSys,!i&&!G5(e)&&(a=Ln.none))}return{coordSysType:e,kind:a}}function pf(r){var t=r.targetModel,e=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys;r.allowNotFound;var i=CL(t),o=i.kind,s=i.coordSysType;if(a&&o!==Ln.dataCoordSys&&(o=Ln.dataCoordSys,s=e),o===Ln.none||s!==e)return!1;var l=n(e,t);return l?(o===Ln.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var AL=function(r,t){var e=t.getReferringComponents(r,le).models[0];return e&&e.coordinateSystem},rh=D,ML=["left","right","top","bottom","width","height"],ro=[["width","left","right"],["height","top","bottom"]];function s_(r,t,e,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),h=c&&c.getBoundingRect(),v,p;if(r==="horizontal"){var d=f.width+(h?-h.x+f.x:0);v=i+d,v>n||l.newline?(i=0,v=d,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);p=o+g,p>a||l.newline?(i+=s+e,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+e:o=p+e)})}var ho=s_;xt(s_,"vertical");xt(s_,"horizontal");function DL(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function U5(r,t){var e=Ie(r,t,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(e.type===ru.point)i=e.refPoint,a=ae(n,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=U(o)?o:[o,o];a=ae(n,e.refContainer),i=e.boxCoordFrom===Uy.coord2?e.refPoint:[Z(s[0],a.width)+a.x,Z(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function LL(r,t){var e=U5(r,t),n=e.viewRect,a=e.center,i=r.get("radius");U(i)||(i=[0,i]);var o=Z(n.width,t.getWidth()),s=Z(n.height,t.getHeight()),l=Math.min(o,s),u=Z(i[0],l/2),f=Z(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:f,viewRect:n}}function ae(r,t,e){e=hf(e||0);var n=t.width,a=t.height,i=Z(r.left,n),o=Z(r.top,a),s=Z(r.right,n),l=Z(r.bottom,a),u=Z(r.width,n),f=Z(r.height,a),c=e[2]+e[0],h=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(f)&&(f=a-l-c-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-f-c),r.left||r.right){case"center":i=n/2-u/2-e[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-e[0];break;case"bottom":o=a-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(f)&&(f=a-c-o-(l||0));var p=new pt((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,f);return p.margin=e,p}function IL(r,t,e){var n=r.getShallow("preserveAspect",!0);if(!n)return t;var a=t.width/t.height;if(Math.abs(Math.atan(e)-Math.atan(a))<1e-9)return t;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=n==="cover";return a>e&&!l||a=d)return c;for(var g=0;g=0;l--)s=bt(s,a[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var a=e+"Index",i=e+"Id";return Ks(this.ecModel,e,{index:this.get(a,!0),id:this.get(i,!0)},n)},t.prototype.getBoxLayoutParams=function(){return DL(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(It);T2(Mt,It);Lv(Mt);w5(Mt);T5(Mt,X5);function X5(r){var t=[];return D(Mt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Y(t,function(e){return Rn(e).main}),r!=="dataset"&&St(t,"dataset")<=0&&t.unshift("dataset"),t}var V={color:{},darkColor:{},size:{}},fe=V.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};W(fe,{primary:fe.neutral80,secondary:fe.neutral70,tertiary:fe.neutral60,quaternary:fe.neutral50,disabled:fe.neutral20,border:fe.neutral30,borderTint:fe.neutral20,borderShade:fe.neutral40,background:fe.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:fe.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:fe.neutral70,axisLineTint:fe.neutral40,axisTick:fe.neutral70,axisTickMinor:fe.neutral60,axisLabel:fe.neutral70,axisSplitLine:fe.neutral15,axisMinorSplitLine:fe.neutral05});for(var Ei in fe)if(fe.hasOwnProperty(Ei)){var RS=fe[Ei];Ei==="theme"?V.darkColor.theme=fe.theme.slice():Ei==="highlight"?V.darkColor.highlight="rgba(255,231,130,0.4)":Ei.indexOf("accent")===0?V.darkColor[Ei]=Qa(RS,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):V.darkColor[Ei]=Qa(RS,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}V.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var PL="";typeof navigator<"u"&&(PL=navigator.platform||"");var Yo="rgba(0, 0, 0, 0.2)",EL=V.color.theme[0],Z5=Qa(EL,null,null,.9);const j5={darkMode:"auto",colorBy:"series",color:V.color.theme,gradientColor:[Z5,EL],aria:{decal:{decals:[{color:Yo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Yo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Yo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Yo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Yo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Yo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:PL.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 RL=et(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),kr="original",Ve="arrayRows",Pr="objectRows",pn="keyedColumns",ei="typedArray",OL="unknown",ln="column",Io="row",He={Must:1,Might:2,Not:3},NL=Ct();function q5(r){NL(r).datasetMap=et()}function BL(r,t,e){var n={},a=u_(t);if(!a||!r)return n;var i=[],o=[],s=t.ecModel,l=NL(s).datasetMap,u=a.uid+"_"+e.seriesLayoutBy,f,c;r=r.slice(),D(r,function(d,g){var y=vt(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,c=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});D(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=h.valueWayDim;v(n[y],_,m),v(o,_,m),h.valueWayDim+=m}else if(f===g)v(n[y],0,m),v(i,0,m);else{var _=h.categoryWayDim;v(n[y],_,m),v(o,_,m),h.categoryWayDim+=m}});function v(d,g,y){for(var m=0;mt)return r[n];return r[e-1]}function FL(r,t,e,n,a,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?e:e3(n,o);if(f=f||e,!(!f||!f.length)){var c=f[l];return a&&(u[a]=c),s.paletteIdx=(l+1)%f.length,c}}function r3(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Xf,Sl,NS,BS="\0_ec_inner",n3=1,c_=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,a,i,o,s){i=i||{},this.option=null,this._theme=new It(i),this._locale=new It(o),this._optionManager=s},t.prototype.setOption=function(e,n,a){var i=FS(n);this._optionManager.setOption(e,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,n){return this._resetOption(e,FS(n))},t.prototype._resetOption=function(e,n){var a=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?NS(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&D(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=et(),u=n&&n.replaceMergeMainTypeMap;q5(this),D(e,function(c,h){c!=null&&(Mt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?ut(c):bt(a[h],c,!0))}),u&&u.each(function(c,h){Mt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Mt.topologicalTravel(s,Mt.getAllClassMainTypes(),f,this);function f(c){var h=Q5(this,c,Zt(e[c])),v=i.get(c),p=v?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",d=_2(v,h,p);gz(d,c,Mt),a[c]=null,i.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;D(d,function(x,b){var S=x.existing,w=x.newOption;if(!w)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=c==="series",C=Mt.getClass(c,x.keyInfo.subType,!T);if(!C)return;if(c==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===C)S.name=x.keyInfo.name,S.mergeOption(w,this),S.optionUpdated(w,!1);else{var A=W({componentIndex:b},x.keyInfo);S=new C(w,this,this,A),W(S,A),x.brandNew&&(S.__requireNewView=!0),S.init(w,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),y.push(S),m++):(g.push(void 0),y.push(void 0))},this),a[c]=g,i.set(c,y),o.set(c,m),c==="series"&&Xf(this)}this._seriesIndices||Xf(this)},t.prototype.getOption=function(){var e=ut(this.option);return D(e,function(n,a){if(Mt.hasClass(a)){for(var i=Zt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Pu(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[a]=i}}),delete e[BS],e},t.prototype.setTheme=function(e){this._theme=new It(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var a=this._componentsMap.get(e);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function h3(r,t){return r.join(",")===t.join(",")}var Qr=D,zu=vt,GS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function rd(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=GS.length;e0?e[o-1].seriesModel:null)}),S3(e)}})}function S3(r){D(r,function(t,e){var n=[],a=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,c){var h=o.get(t.stackedDimension,c);if(isNaN(h))return a;var v,p;s?p=o.getRawIndex(c):v=o.get(t.stackedByDimension,c);for(var d=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=rz(h,m),d=m;break}}}return n[0]=h,n[1]=d,n})})}var Yv=(function(){function r(t){this.data=t.data||(t.sourceFormat===pn?{}:[]),this.sourceFormat=t.sourceFormat||OL,this.seriesLayoutBy=t.seriesLayoutBy||ln,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nd&&(d=_)}v[0]=p,v[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};ZS=(t={},t[Ve+"_"+ln]={pure:!0,appendData:i},t[Ve+"_"+Io]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Pr]={pure:!0,appendData:i},t[pn]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[kr]={appendData:i},t[ei]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(t,e){return Ns(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r})();function JS(r){var t,e;return vt(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function _u(r){return new L3(r)}var L3=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||v1&&n>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},k3=(function(){function r(t,e){if(!Rt(e)){var n="";Ft(n)}this._opFn=KL[t],this._rvalFloat=ga(e)}return r.prototype.evaluate=function(t){return Rt(t)?this._opFn(t,this._rvalFloat):this._opFn(ga(t),this._rvalFloat)},r})(),JL=(function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=Rt(t)?t:ga(t),a=Rt(e)?e:ga(e),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=q(t),l=q(e);s&&(n=l?t:0),l&&(a=s?e:0)}return na?-this._resultLT:0},r})(),P3=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=ga(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=ga(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function E3(r,t){return r==="eq"||r==="ne"?new P3(r==="eq",t):Q(KL,r)?new k3(r,t):null}var R3=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ri(t,e)},r})();function O3(r,t){var e=new R3,n=r.data,a=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==ln&&Ft(o);var s=[],l={},u=r.dimensionsDefine;if(u)D(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Q(l,y)&&Ft(_),l[y]=m}});else for(var f=0;f65535?W3:U3}function Xo(){return[1/0,-1/0]}function Y3(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function eb(r,t,e,n,a){var i=eI[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Y(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&nt)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i=c&&m<=h||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],x=t[a[1]][0],b=t[a[1]][1],y=0;y=c&&m<=h||isNaN(m))&&(S>=x&&S<=b||isNaN(S))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=c&&m<=h||isNaN(m))&&(l[u++]=w)}else for(var y=0;yt[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,c,h,v=new($o(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pf&&(f=c,h=x)}M>0&&Ms&&(d=s-f);for(var g=0;gp&&(p=m,v=f+g)}var _=this.getRawIndex(c),x=this.getRawIndex(v);cf-p&&(l=f-p,s.length=l);for(var d=0;dc[1]&&(c[1]=y),h[v++]=m}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();il&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],a=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,n,a,i){return ri(e[i],this._dimensions[i])}id={arrayRows:t,objectRows:function(e,n,a,i){return ri(e[n],this._dimensions[i])},keyedColumns:t,original:function(e,n,a,i){var o=e&&(e.value==null?e:e.value);return ri(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,n,a,i){return e[i]}}})(),r})(),rI=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,a,i;if(jf(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=yr(s)?ei:kr,i=[];var c=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=nt(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=nt(c.sourceHeader,h.sourceHeader),d=nt(c.dimensions,h.dimensions),g=v!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d;a=g?[Xy(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:d},l)]:[]}else{var y=t;if(n){var m=this._applyTransform(e);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[Xy(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&nb(i)}var o,s=[],l=[];return D(t,function(u){u.prepareSource();var f=u.getSource(a||0),c="";a!=null&&!f&&nb(c),s.push(f),l.push(u._getVersionSign())}),n?o=G3(n,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[b3(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return D(r.blocks,function(a){var i=oI(a);i>=t&&(t=i+ +(n&&(!i||jy(a)&&!a.noHeader)))}),t}return 0}function j3(r,t,e,n){var a=t.noHeader,i=K3(oI(t)),o=[],s=t.blocks||[];qe(!s||U(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Q(u,l)){var f=new JL(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(d,g){var y=t.valueFormatter,m=iI(d)(y?W(W({},r),{valueFormatter:y}):r,d,g>0?i.html:0,n);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):qy(n,o.join(""),a?e:i.html);if(a)return c;var h=Wy(t.header,"ordinal",r.useUTC),v=aI(n,r.renderMode).nameStyle,p=nI(n);return r.renderMode==="richText"?sI(r,h,v)+i.richText+c:qy(n,'
'+ir(h)+"
"+c,e)}function q3(r,t,e,n){var a=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(x){return x=U(x)?x:[x],Y(x,function(b,S){return Wy(b,U(v)?v[S]:v,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||V.color.secondary,a),h=i?"":Wy(l,"ordinal",u),v=t.valueType,p=o?[]:f(t.value,t.dataIndex),d=!s||!i,g=!s&&i,y=aI(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":c)+(i?"":sI(r,h,m))+(o?"":tF(r,p,d,g,_)):qy(n,(s?"":c)+(i?"":J3(h,!s,m))+(o?"":Q3(p,d,g,_)),e)}}function ab(r,t,e,n,a,i){if(r){var o=iI(r),s={useUTC:a,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function K3(r){return{html:X3[r],richText:Z3[r]}}function qy(r,t,e){var n='
',a="margin: "+e+"px 0 0",i=nI(r);return'
'+t+n+"
"}function J3(r,t,e){var n=t?"margin-left:2px":"";return''+ir(r)+""}function Q3(r,t,e,n){var a=e?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return r=U(r)?r:[r],''+Y(r,function(o){return ir(o)}).join("  ")+""}function sI(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function tF(r,t,e,n,a){var i=[a],o=n?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(U(t)?t.join(" "):t,i)}function lI(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return bo(n)}function uI(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var od=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=p2()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var a=n==="richText"?this._generateStyleName():null,i=F5({color:e,type:t,renderMode:n,markerId:a});return q(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};U(e)?D(e,function(i){return W(n,i)}):W(n,e);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},r})();function fI(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=U(s),u=lI(t,e),f,c,h,v;if(o>1||l&&!o){var p=eF(s,t,e,i,u);f=p.inlineValues,c=p.inlineValueTypes,h=p.blocks,v=p.inlineValues[0]}else if(o){var d=a.getDimensionInfo(i[0]);v=f=Ns(a,e,i[0]),c=d.type}else v=f=l?s[0]:s;var g=O0(t),y=g&&t.name||"",m=a.getName(e),_=n?y:m;return Se("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[Se("nameValue",{markerType:"item",markerColor:u,name:_,noName:!$r(_),value:f,valueType:c,dataIndex:e})].concat(h||[])})}function eF(r,t,e,n,a){var i=t.getData(),o=Hn(r,function(c,h,v){var p=i.getDimensionInfo(v);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(c){f(Ns(i,e,c),c)}):D(r,f);function f(c,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Se("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ka=Ct();function qf(r,t){return r.getName(t)||r.getId(t)}var nh="__universalTransitionEnabled",Kt=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,a){this.seriesIndex=this.componentIndex,this.dataTask=_u({count:nF,reset:aF}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var i=ka(this).sourceManager=new rI(this);i.prepareSource();var o=this.getInitialData(e,a);ob(o,this),this.dataTask.context.data=o,ka(this).dataBeforeProcessed=o,ib(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=Bu(this),i=a?Lo(e):{},o=this.subType;Mt.hasClass(o)&&(o+="Series"),bt(e,n.getTheme().get(this.subType)),bt(e,this.getDefaultOption()),go(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&$n(e,i,a)},t.prototype.mergeOption=function(e,n){e=bt(this.option,e,!0),this.fillDataTextStyle(e.data);var a=Bu(this);a&&$n(this.option,e,a);var i=ka(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,n);ob(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ka(this).dataBeforeProcessed=o,ib(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!yr(e))for(var n=["show"],a=0;a=0&&h<0)&&(c=m,h=y,v=0),y===h&&(f[v++]=d))}),f.length=v,f},t.prototype.formatTooltip=function(e,n,a){return fI({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Lt.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,a){var i=this.ecModel,o=f_.prototype.getColorFromPalette.call(this,e,n,a);return o||(o=i.getColorFromPalette(e,n,a)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(e,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[qf(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[nh])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){vt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return Mt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(Mt);we(Kt,$v);we(Kt,f_);T2(Kt,Mt);function ib(r){var t=r.name;O0(r)||(r.name=rF(r)||t)}function rF(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return D(e,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function nF(r){return r.model.getRawData().count()}function aF(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),iF}function iF(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function ob(r,t){D(Mu(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,xt(oF,t))})}function oF(r,t){var e=Ky(r);return e&&e.setOutputEnd((t||this).count()),t}function Ky(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var ee=(function(){function r(){this.group=new ot,this.uid=rl("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){},r.prototype.updateLayout=function(t,e,n,a){},r.prototype.updateVisual=function(t,e,n,a){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();B0(ee);Lv(ee);function nl(){var r=Ct();return function(t){var e=r(t),n=t.pipelineContext,a=!!e.large,i=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var cI=Ct(),sF=nl(),$t=(function(){function r(){this.group=new ot,this.uid=rl("viewChart"),this.renderTask=_u({plan:lF,reset:uF}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.highlight=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&lb(i,a,"emphasis")},r.prototype.downplay=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&lb(i,a,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateLayout=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateVisual=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.eachRendered=function(t){hi(this.group,t)},r.markUpdateMethod=function(t,e){cI(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function sb(r,t,e){r&&Ru(r)&&(t==="emphasis"?ya:ma)(r,e)}function lb(r,t,e){var n=yo(r,t),a=t&&t.highlightKey!=null?EV(t.highlightKey):null;n!=null?D(Zt(n),function(i){sb(r.getItemGraphicEl(i),e,a)}):r.eachItemGraphicEl(function(i){sb(i,e,a)})}B0($t);Lv($t);function lF(r){return sF(r.model)}function uF(r){var t=r.model,e=r.ecModel,n=r.api,a=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=a&&cI(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,a),fF[l]}var fF={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ph="\0__throttleOriginMethod",ub="\0__throttleRate",fb="\0__throttleType";function g_(r,t,e){var n,a=0,i=0,o=null,s,l,u,f;t=t||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],p=0;p=0?c():o=setTimeout(c,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){f=v},h}function al(r,t,e,n){var a=r[t];if(a){var i=a[Ph]||a,o=a[fb],s=a[ub];if(s!==e||o!==n){if(e==null||!n)return r[t]=i;a=r[t]=g_(i,e,n==="debounce"),a[Ph]=i,a[fb]=n,a[ub]=e}return a}}function Vu(r,t){var e=r[t];e&&e[Ph]&&(e.clear&&e.clear(),r[t]=e[Ph])}var cb=Ct(),hb={itemStyle:mo(cL,!0),lineStyle:mo(fL,!0)},cF={lineStyle:"stroke",itemStyle:"fill"};function hI(r,t){var e=r.visualStyleMapper||hb[t];return e||(console.warn("Unknown style type '"+t+"'."),hb.itemStyle)}function vI(r,t){var e=r.visualDrawType||cF[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var hF={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=hI(r,n),o=i(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=vI(r,n),u=o[l],f=it(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||it(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||it(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var d=r.getDataParams(p),g=W({},o);g[l]=f(d),v.setItemVisual(p,"style",g)}}}},wl=new It,vF={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=hI(r,n),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){wl.option=l[n];var u=a(wl),f=o.ensureUniqueItemVisual(s,"style");W(f,u),wl.option.decal&&(o.setItemVisual(s,"decal",wl.option.decal),wl.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},pF={performRawSeries:!0,overallReset:function(r){var t=et();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),cb(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),a={},i=e.getData(),o=cb(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=vI(e,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var h=i.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",p=n.count();h[l]=e.getColorFromPalette(v,o,p)}})}})}},Kf=Math.PI;function dF(r,t){t=t||{},ht(t,{text:"loading",textColor:V.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:V.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new ot,n=new Tt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var a=new Ot({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new Tt({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new zv({shape:{startAngle:-Kf/2,endAngle:-Kf/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Kf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Kf*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var pI=(function(){function r(t,e,n,a){this._stageTaskMap=et(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!e&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=et();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;D(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";qe(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,e,n),a.overallReset&&this._createOverallStageTask(a,i,e,n)},this)},r.prototype.prepareView=function(t,e,n,a){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,a){a=a||{};var i=!1,o=this;D(t,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var v,p=h.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,a.block);p.each(function(g){g.perform(d)}),h.perform(d)&&(i=!0)}else c&&c.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),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(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,a){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=et(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(c){var h=c.uid,v=s.set(h,o&&o.get(h)||_u({plan:xF,reset:SF,count:wF}));v.context={model:c,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,n,a){var i=this,o=e.overallTask=e.overallTask||_u({reset:gF});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=et(),u=t.seriesType,f=t.getTargetSeries,c=!0,h=!1,v="";qe(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):f?f(n,a).each(p):(c=!1,D(n.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(h=!0,_u({reset:yF,onDirty:_F})));y.context={model:d,overallProgress:c},y.agent=o,y.__block=c,i._pipe(d,y)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return it(t)&&(t={overallReset:t,seriesType:TF(t)}),t.uid=rl("stageHandler"),e&&(t.visualType=e),t},r})();function gF(r){r.overallReset(r.ecModel,r.api,r.payload)}function yF(r){return r.overallProgress&&mF}function mF(){this.agent.dirty(),this.getDownstream().dirty()}function _F(){this.agent&&this.agent.dirty()}function xF(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function SF(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Zt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Y(t,function(e,n){return dI(n)}):bF}var bF=dI(0);function dI(r){return function(t,e){var n=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var i=t.start;i0&&v===u.length-h.length){var p=u.slice(0,v);p!=="data"&&(e.mainType=p,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:a}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,i));function f(c,h,v,p){return c[v]==null||h[p||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),Jy=["symbol","symbolSize","symbolRotate","symbolOffset"],pb=Jy.concat(["symbolKeepAspect"]),MF={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o=0&&ao(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Qy(r,t,e){for(var n=t.type==="radial"?HF(r,t,e):GF(r,t,e),a=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Rt(r)?[r]:U(r)?r:null}function m_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&UF(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var a=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(e=Y(e,function(i){return i/a}),n/=a)}return[e,n]}var YF=new Yn(!0);function Oh(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function db(r){return typeof r=="string"&&r!=="none"}function Nh(r){var t=r.fill;return t!=null&&t!=="none"}function gb(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function yb(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function tm(r,t,e){var n=z0(t.image,t.__image,e);if(Iv(n)){var a=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*Wc),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function $F(r,t,e,n){var a,i=Oh(e),o=Nh(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||YF,c=t.__dirty;if(!n){var h=e.fill,v=e.stroke,p=o&&!!h.colorStops,d=i&&!!v.colorStops,g=o&&!!h.image,y=i&&!!v.image,m=void 0,_=void 0,x=void 0,b=void 0,S=void 0;(p||d)&&(S=t.getBoundingRect()),p&&(m=c?Qy(r,h,S):t.__canvasFillGradient,t.__canvasFillGradient=m),d&&(_=c?Qy(r,v,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(x=c||!t.__canvasFillPattern?tm(r,h,t):t.__canvasFillPattern,t.__canvasFillPattern=x),y&&(b=c||!t.__canvasStrokePattern?tm(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),p?r.fillStyle=m:g&&(x?r.fillStyle=x:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(a=m_(t),T=a[0],C=a[1]);var A=!0;(u||c&hs)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(e.strokeFirst?(i&&yb(r,e),o&&gb(r,e)):(o&&gb(r,e),i&&yb(r,e))),T&&r.setLineDash([])}function XF(r,t,e){var n=t.__image=z0(e.image,t.__image,t,t.onload);if(!(!n||!Iv(n))){var a=e.x||0,i=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,a,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,c=o-u,h=s-f;r.drawImage(n,u,f,c,h,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function ZF(r,t,e){var n,a=e.text;if(a!=null&&(a+=""),a){r.font=e.font||pa,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=m_(t),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(Oh(e)&&r.strokeText(a,e.x,e.y),Nh(e)&&r.fillText(a,e.x,e.y)):(Nh(e)&&r.fillText(a,e.x,e.y),Oh(e)&&r.strokeText(a,e.x,e.y)),i&&r.setLineDash([])}}var mb=["shadowBlur","shadowOffsetX","shadowOffsetY"],_b=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function SI(r,t,e,n,a){var i=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){pr(r,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?lo.opacity:o}(n||t.blend!==e.blend)&&(i||(pr(r,a),i=!0),r.globalCompositeOperation=t.blend||lo.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,a){if(!this[Te]){if(this._disposed){this.id;return}var i,o,s;if(vt(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Te]=!0,Ko(this),!this._model||n){var l=new l3(this._api),u=this._theme,f=this._model=new c_;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},am);var c={seriesTransition:s,optionChanged:!0};if(a)this[Oe]={silent:i,updateParams:c},this[Te]=!1,this.getZr().wakeUp();else{try{zi(this),ea.update.call(this,null,c)}catch(h){throw this[Oe]=null,this[Te]=!1,h}this._ssr||this._zr.flush(),this[Oe]=null,this[Te]=!1,jo.call(this,i),qo.call(this,i)}}},t.prototype.setTheme=function(e,n){if(!this[Te]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[Oe]&&(i==null&&(i=this[Oe].silent),o=this[Oe].updateParams,this[Oe]=null),this[Te]=!0,Ko(this);try{this._updateTheme(e),a.setTheme(this._theme),zi(this),ea.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Te]=!1,s}this[Te]=!1,jo.call(this,i),qo.call(this,i)}}},t.prototype._updateTheme=function(e){q(e)&&(e=VI[e]),e&&(e=ut(e),e&&WL(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Lt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,n=e.storage.getDisplayList();return D(n,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,a=this._model,i=[],o=this;D(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return D(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Rb[a]){var l=s,u=s,f=-s,c=-s,h=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();D(xu,function(_,x){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ut(e)),S=_.getDom().getBoundingClientRect();l=i(S.left,l),u=i(S.top,u),f=o(S.right,f),c=o(S.bottom,c),h.push({dom:b,left:S.left,top:S.top})}}),l*=v,u*=v,f*=v,c*=v;var p=f-l,d=c-u,g=un.createCanvas(),y=zx(g,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:d}),n){var m="";return D(h,function(_){var x=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new Tt({shape:{x:0,y:0,width:p,height:d},style:{fill:e.connectedBackgroundColor}})),D(h,function(_){var x=new Fe({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n,a){return ec(this,"convertToPixel",e,n,a)},t.prototype.convertToLayout=function(e,n,a){return ec(this,"convertToLayout",e,n,a)},t.prototype.convertFromPixel=function(e,n,a){return ec(this,"convertFromPixel",e,n,a)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var a=this._model,i,o=Ts(a,e);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(n,u))}},this)},this),!!i},t.prototype.getVisual=function(e,n){var a=this._model,i=Ts(a,e,{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?y_(s,l,n):df(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;D(SG,function(a){var i=function(o){var s=e.getModel(),l=o.target,u,f=a==="globalout";if(f?u={}:l&&no(l,function(d){var g=dt(d);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=W({},g.eventData),!0},!0),u){var c=u.componentType,h=u.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",h=u.seriesIndex);var v=c&&h!=null&&s.getComponent(c,h),p=v&&e[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=a,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},e.trigger(a,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(a,i,e)});var n=this._messageCenter;D(rm,function(a,i){n.on(i,function(o){e.trigger(i,o)})}),LF(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&S2(this.getDom(),S_,"");var n=this,a=n._api,i=n._model;D(n._componentsViews,function(o){o.dispose(i,a)}),D(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete xu[n.id]},t.prototype.resize=function(e){if(!this[Te]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=e&&e.silent;this[Oe]&&(i==null&&(i=this[Oe].silent),a=!0,this[Oe]=null),this[Te]=!0,Ko(this);try{a&&zi(this),ea.update.call(this,{type:"resize",animation:W({duration:0},e&&e.animation)})}catch(o){throw this[Te]=!1,o}this[Te]=!1,jo.call(this,i),qo.call(this,i)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(vt(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!im[e]){var a=im[e](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=W({},e);return n.type=em[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(vt(n)||(n={silent:!!n}),!!Bh[e.type]&&this._model){if(this[Te]){this._pendingActions.push(e);return}var a=n.silent;hd.call(this,e,a);var i=n.flush;i?this._zr.flush():i!==!1&&Lt.browser.weChat&&this._throttledZrFlush(),jo.call(this,a),qo.call(this,a)}},t.prototype.updateLabelLayout=function(){rn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){zi=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),fd(c,!0),fd(c,!1),h.plan()},fd=function(c,h){for(var v=c._model,p=c._scheduler,d=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_h.get("hoverLayerThreshold")&&!Lt.node&&!Lt.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(c,h){var v=c.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(c,h){if(!c.preventAutoZ){var v=So(c);h.eachRendered(function(p){return Gv(p,v.z,v.zlevel),!0})}}function u(c,h){h.eachRendered(function(v){if(!Cs(v)){var p=v.getTextContent(),d=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(c,h){var v=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),d=v.get("duration"),g=d>0?{duration:d,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Cs(y))return;if(y instanceof At&&RV(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),x=y.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&i(y)}})}Pb=function(c){return new((function(h){F(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return c._model.getComponent(d.mainType,d.index);p=p.parent}},v.prototype.enterEmphasis=function(p,d){ya(p,d),Er(c)},v.prototype.leaveEmphasis=function(p,d){ma(p,d),Er(c)},v.prototype.enterBlur=function(p){z2(p),Er(c)},v.prototype.leaveBlur=function(p){U0(p),Er(c)},v.prototype.enterSelect=function(p){V2(p),Er(c)},v.prototype.leaveSelect=function(p){F2(p),Er(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return c[Qf]},v})(GL))(c)},BI=function(c){function h(v,p){for(var d=0;d=0)){Ob.push(e);var i=pI.wrapStageHandler(e,a);i.__prio=t,i.__raw=e,r.push(i)}}function WI(r,t){im[r]=t}function LG(r,t,e){var n=aG("registerMap");n&&n(r,t,e)}var IG=F3;Po(__,hF);Po(Zv,vF);Po(Zv,pF);Po(__,MF);Po(Zv,DF);Po(kI,rG);GI(WL);HI(uG,x3);WI("default",dF);qn({type:uo,event:uo,update:uo},ve);qn({type:Kc,event:Kc,update:Kc},ve);qn({type:Ch,event:H0,update:Ch,action:ve,refineEvent:T_,publishNonRefinedEvent:!0});qn({type:ky,event:H0,update:ky,action:ve,refineEvent:T_,publishNonRefinedEvent:!0});qn({type:Ah,event:H0,update:Ah,action:ve,refineEvent:T_,publishNonRefinedEvent:!0});function T_(r,t,e,n){return{eventContent:{selected:LV(e),isFromClick:t.isFromClick||!1}}}FI("default",{});FI("dark",mI);var Nb=[],kG={registerPreprocessor:GI,registerProcessor:HI,registerPostInit:CG,registerPostUpdate:AG,registerUpdateLifecycle:b_,registerAction:qn,registerCoordinateSystem:MG,registerLayout:DG,registerVisual:Po,registerTransform:IG,registerLoading:WI,registerMap:LG,registerImpl:nG,PRIORITY:mG,ComponentModel:Mt,ComponentView:ee,SeriesModel:Kt,ChartView:$t,registerComponentModel:function(r){Mt.registerClass(r)},registerComponentView:function(r){ee.registerClass(r)},registerSeriesModel:function(r){Kt.registerClass(r)},registerChartView:function(r){$t.registerClass(r)},registerCustomSeries:function(r,t){iG(r,t)},registerSubTypeDefaulter:function(r,t){Mt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){jB(r,t)}};function wt(r){if(U(r)){D(r,function(t){wt(t)});return}St(Nb,r)>=0||(Nb.push(r),it(r)&&(r={install:r}),r.install(kG))}function Cl(r){return r==null?0:r.length||1}function Bb(r){return r}var _a=(function(){function r(t,e,n,a,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Bb,this._newKeyGetter=a||Bb,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},a=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,a,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(c===1&&h===1)this._update&&this._update(f,u),a[l]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(c>1)for(var v=0;v1)for(var s=0;s30}var Al=vt,Pa=Y,BG=typeof Int32Array>"u"?Array:Int32Array,zG="e\0\0",zb=-1,VG=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],FG=["_approximateExtent"],Vb,nc,Ml,Dl,dd,Ll,gd,or=(function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;YI(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=e)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===kr;if(l&&!a.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[e];return i==null&&(i=this.getVisual(e),U(i)?i=i.slice():Al(i)&&(i=W({},i)),a[e]=i),i},r.prototype.setItemVisual=function(t,e,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,Al(e)?W(a,e):a[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Al(t)?W(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?W(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Iy(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){D(this._graphicEls,function(n,a){n&&t&&t.call(e,n,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Pa(this.dimensions,this._getDimInfo,this),this.hostModel)),dd(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];it(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return e.apply(this,[a].concat(M0(arguments)))})},r.internalField=(function(){Vb=function(t){var e=t._invertedIndicesMap;D(e,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=e[a]=new BG(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[e]=l}}})(),r})();function gf(r,t){h_(r)||(r=v_(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],a=et(),i=[],o=HG(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&ZI(o),l=n===r.dimensionsDefine,u=l?XI(r):$I(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var c=et(f),h=new tI(o),v=0;v0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function HG(r,t,e,n){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return D(t,function(i){var o;vt(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function WG(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var UG=(function(){function r(t){this.coordSysDims=[],this.axisMap=et(),this.categoryAxisMap=et(),this.coordSysName=t}return r})();function YG(r){var t=r.get("coordinateSystem"),e=new UG(t),n=$G[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var $G={cartesian2d:function(r,t,e,n){var a=r.getReferringComponents("xAxis",le).models[0],i=r.getReferringComponents("yAxis",le).models[0];t.coordSysDims=["x","y"],e.set("x",a),e.set("y",i),Jo(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),Jo(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var a=r.getReferringComponents("singleAxis",le).models[0];t.coordSysDims=["single"],e.set("single",a),Jo(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var a=r.getReferringComponents("polar",le).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Jo(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),Jo(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();D(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Jo(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,n){var a=r.getReferringComponents("matrix",le).models[0];t.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");e.set("x",i),e.set("y",o),n.set("x",i),n.set("y",o)}};function Jo(r){return r.get("type")==="category"}function XG(r,t,e){e=e||{};var n=e.byIndex,a=e.stackedCoordDimension,i,o,s;ZG(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,c,h;if(D(i,function(m,_){q(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,p=f.type,d=0;D(i,function(m){m.coordDim===v&&d++});var g={name:c,coordDim:v,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function ZG(r){return!YI(r.schema)}function oi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function jI(r,t){return oi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function jG(r,t){var e=r.get("coordinateSystem"),n=vf.get(e),a;return t&&t.coordSysDims&&(a=Y(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=Vh(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function qG(r,t,e){var n,a;return e&&D(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function Aa(r,t,e){e=e||{};var n=t.getSourceManager(),a,i=!1;r?(i=!0,a=v_(r)):(a=n.getSource(),i=a.sourceFormat===kr);var o=YG(t),s=jG(t,o),l=e.useEncodeDefaulter,u=it(l)?l:l?xt(BL,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=gf(a,f),h=qG(c.dimensions,e.createInvertedIndices,o),v=i?null:n.getSharedDataStore(c),p=XG(t,{schema:c,store:v}),d=new or(c,t);d.setCalculationInfo(p);var g=h!=null&&KG(a)?function(y,m,_,x){return x===h?_:this.defaultDimValueGetter(y,m,_,x)}:null;return d.hasItemOption=!1,d.initData(i?a:v,null,g),d}function KG(r){if(r.sourceFormat===kr){var t=JG(r.data||[]);return!U(qs(t))}}function JG(r){for(var t=0;ta&&(o=i.interval=a);var s=i.intervalPrecision=Hu(o),l=i.niceTickExtent=[ye(Math.ceil(r[0]/o)*o,s),ye(Math.floor(r[1]/o)*o,s)];return t4(l,r),i}function yd(r){var t=Math.pow(10,R0(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,ye(e*t)}function Hu(r){return En(r)+2}function Fb(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function t4(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Fb(r,0,t),Fb(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function C_(r,t){return r>=t[0]&&r<=t[1]}var e4=(function(){function r(){this.normalize=Gb,this.scale=Hb}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=K(t.normalize,t),this.scale=K(t.scale,t)):(this.normalize=Gb,this.scale=Hb)},r})();function Gb(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Hb(r,t){return r*(t[1]-t[0])+t[0]}function sm(r,t,e){var n=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/n,Math.log(e?t[1]:Math.max(0,t[1]))/n]}var pi=(function(){function r(t){this._calculator=new e4,this._setting=t||{},this._extent=[1/0,-1/0];var e=_e();e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(t){var e=_e();e&&this._innerSetBreak(e.parseAxisBreakOption(t,K(this.parse,this)))},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Lv(pi);var r4=0,Wu=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++r4,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,n=e.data,a=n&&Y(n,n4);return new r({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!q(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,a.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=et(this.categories))},r})();function n4(r){return vt(r)&&r.value!=null?r.value:r+""}var zs=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Wu({})),U(a)&&(a=new Wu({categories:Y(a,function(i){return vt(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:q(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return C_(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(pi);pi.registerClass(zs);var Ea=ye,xa=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return C_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Hu(e)},t.prototype.getTicks=function(e){e=e||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=_e(),l=[];if(!n)return l;if(e.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;a[0]=0&&(c=Ea(c+h*n,o))}if(l.length>0&&c===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return a[1]>v&&(e.expandToNicedExtent?l.push({value:Ea(v+n,o)}):l.push({value:a[1]})),s&&s.pruneTicksByBreak(e.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),e.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=this.getExtent(),o=1;oi[0]&&p0&&(i=i===null?s:Math.min(i,s))}e[n]=i}}return e}function QI(r){var t=o4(r),e=[];return D(r,function(n){var a=n.coordinateSystem,i=a.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=t[l],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=u?f/h*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=Z(n.get("barWidth"),s),d=Z(n.get("barMaxWidth"),s),g=Z(n.get("barMinWidth")||(ak(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap"),_=n.get("defaultBarGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:A_(i),stackId:KI(n)})}),tk(e)}function tk(r){var t={};D(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return D(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=kt(i).length;s=Math.max(35-l*4,15)+"%"}var u=Z(s,o),f=Z(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,v=(c-u)/(h+(h-1)*f);v=Math.max(v,0),D(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),_&&(x=Math.max(x,_)),y.width=x,c-=x+f*x,h--}else{var x=v;m&&mx&&(x=_),x!==v&&(y.width=x,c-=x+f*x,h--)}}),v=(c-u)/(h+(h-1)*f),v=Math.max(v,0);var p=0,d;D(i,function(y,m){y.width||(y.width=v),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;D(i,function(y,m){e[a][m]=e[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function s4(r,t,e){if(r&&t){var n=r[A_(t)];return n}}function ek(r,t){var e=JI(r,t),n=QI(e);D(e,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=KI(a),u=n[A_(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function rk(r){return{seriesType:r,plan:nl(),reset:function(t){if(nk(t)){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),c=oi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=l4(a,i),p=ak(t),d=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var b=_.count,S=p&&On(b*3),w=p&&l&&On(b*3),T=p&&On(b),C=n.master.getRect(),A=h?C.width:C.height,M,I=x.getStore(),L=0;(M=_.next())!=null;){var P=I.get(c?g:o,M),E=I.get(s,M),R=v,B=void 0;c&&(B=+P-I.get(o,M));var N=void 0,z=void 0,k=void 0,G=void 0;if(h){var H=n.dataToPoint([P,E]);if(c){var O=n.dataToPoint([B,E]);R=O[0]}N=R,z=H[1]+m,k=H[0]-R,G=y,Math.abs(k)0?e:1:e))}var u4=function(r,t,e,n){for(;e>>1;r[a][1]a&&(this._approxInterval=a);var o=ac.length,s=Math.min(u4(ac,this._approxInterval,0,o),o-1);this._interval=ac[s][1],this._intervalPrecision=Hu(this._interval),this._minLevelUnit=ac[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return Rt(e)?e:+Mo(e)},t.prototype.contain=function(e){return C_(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t})(xa),ac=[["second",Q0],["minute",t_],["hour",yu],["quarter-day",yu*6],["half-day",yu*12],["day",Yr*1.2],["half-week",Yr*3.5],["week",Yr*7],["month",Yr*31],["quarter",Yr*95],["half-year",kS/2],["year",kS]];function ik(r,t,e,n){return Hy(new Date(t),r,n).getTime()===Hy(new Date(e),r,n).getTime()}function f4(r,t){return r/=Yr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function c4(r){var t=30*Yr;return r/=t,r>6?6:r>3?3:r>2?2:1}function h4(r){return r/=yu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Wb(r,t){return r/=t?t_:Q0,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function v4(r){return h2(r)}function p4(r,t,e){var n=Math.max(0,St(br,t)-1);return Hy(new Date(r),br[n],e).getTime()}function d4(r,t){var e=new Date(0);e[r](1);var n=e.getTime();e[r](1+t);var a=e.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function g4(r,t,e,n,a,i){var o=1e4,s=P5,l=0;function u(L,P,E,R,B,N,z){for(var k=d4(B,L),G=P,H=new Date(G);Go));)if(H[B](H[R]()+L),G=H.getTime(),i){var O=i.calcNiceTickMultiple(G,k);O>0&&(H[B](H[R]()+O*L),G=H.getTime())}z.push({value:G,notAdd:!0})}function f(L,P,E){var R=[],B=!P.length;if(!ik(mu(L),n[0],n[1],e)){B&&(P=[{value:p4(n[0],L,e)},{value:n[1]}]);for(var N=0;N=n[0]&&z<=n[1]&&u(G,z,k,H,O,j,R),L==="year"&&E.length>1&&N===0&&E.unshift({value:E[0].value-G})}}for(var N=0;N=n[0]&&x<=n[1]&&v++)}var b=a/t;if(v>b*1.5&&p>b/1.5||(c.push(m),v>b||r===s[d]))break}h=[]}}}for(var S=Ht(Y(c,function(L){return Ht(L,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=S.length-1,d=0;d0;)i*=10;var s=[um(m4(n[0]/i)*i),um(y4(n[1]/i)*i)];this._interval=i,this._intervalPrecision=Hu(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=oc(e)/oc(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=oc(e)/oc(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),ic(this.base,e)},t.prototype.setBreaksFromOption=function(e){var n=_e();if(n){var a=n.logarithmicParseBreaksFromOption(e,this.base,K(this.parse,this)),i=a.parsedOriginal,o=a.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t})(xa);function sc(r,t){return um(r,En(t))}pi.registerClass(ok);var _4=(function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[S4[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=x4[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),x4={min:"_determinedMin",max:"_determinedMax"},S4={min:"_dataMin",max:"_dataMax"};function sk(r,t,e){var n=r.rawExtentInfo;return n||(n=new _4(r,t,e),r.rawExtentInfo=n,n)}function lc(r,t){return t==null?null:Ze(t)?NaN:r.parse(t)}function lk(r,t){var e=r.type,n=sk(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&e==="time"){var s=JI("bar",o),l=!1;if(D(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=QI(s),f=b4(a,i,t,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function b4(r,t,e,n){var a=e.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=s4(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;D(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;D(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,c=1-(s+l)/i,h=f/c-f;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function Vs(r,t){var e=t,n=lk(r,e),a=n.extent,i=e.get("splitNumber");r instanceof ok&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(fk(e)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function jv(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new zs({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new M_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(pi.getClass(t)||xa)}}function w4(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function ol(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=E5(t);return function(a,i){return r.scale.getFormattedLabel(a,i,e)}}else{if(q(t))return function(a){var i=r.scale.getLabel(a),o=t.replace("{value}",i??"");return o};if(it(t)){if(r.type==="category")return function(a,i){return t(Fh(r,a),a.value-r.scale.getExtent()[0],null)};var n=_e();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),t(Fh(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function Fh(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function D_(r){var t=r.get("interval");return t??"auto"}function uk(r){return r.type==="category"&&D_(r.getLabelModel())===0}function Gh(r,t){var e={};return D(r.mapDimensionsAll(t),function(n){e[jI(r,n)]=!0}),kt(e)}function T4(r,t,e){t&&D(Gh(t,e),function(n){var a=t.getApproximateExtent(n);a[0]r[1]&&(r[1]=a[1])})}function Fs(r){return r==="middle"||r==="center"}function Uu(r){return r.getShallow("show")}function fk(r){var t=r.get("breaks",!0);if(t!=null)return!_e()||!C4(r.axis)?void 0:t}function C4(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var yf=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),A4=1e-8;function Ub(r,t){return Math.abs(r-t)a&&(n=o,a=l)}if(n)return D4(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var n=this._rect;if(n&&!e)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?Yb(s.exterior,a,i,e):D(s.points,function(l){Yb(l,a,i,e)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new pt(a[0],a[1],i[0]-a[0],i[1]-a[1]),e||(this._rect=n),n},t.prototype.contain=function(e){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(e[0],e[1]))return!1;t:for(var i=0,o=a.length;i>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/e,l/e])}return n}function k4(r,t){return r=I4(r),Y(Ht(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,a=e.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new $b(o[0],o.slice(1)));break;case"MultiPolygon":D(a.coordinates,function(l){l[0]&&i.push(new $b(l[0],l.slice(1)))});break;case"LineString":i.push(new Xb([a.coordinates]));break;case"MultiLineString":i.push(new Xb(a.coordinates))}var s=new hk(n[t||"name"],i,n.cp);return s.properties=n,s})}var P4=Ct(),Su=Ct(),hn={estimate:1,determine:2};function Hh(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function pk(r,t){var e=Y(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function E4(r,t){var e=r.getLabelModel().get("customValues");if(e){var n=ol(r),a=r.scale.getExtent(),i=pk(r,e),o=Ht(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?O4(r,t):B4(r)}function R4(r,t,e){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=pk(r,n);return{ticks:Ht(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?N4(r,t):{ticks:Y(r.scale.getTicks(e),function(o){return o.value})}}function O4(r,t){var e=r.getLabelModel(),n=dk(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:n}function dk(r,t,e){var n=V4(r),a=D_(t),i=e.kind===hn.estimate;if(!i){var o=yk(n,a);if(o)return o}var s,l;it(a)?s=xk(r,a):(l=a==="auto"?F4(r,e):a,s=_k(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return fm(n,a,u),!0}):fm(n,a,u),u}function N4(r,t){var e=z4(r),n=D_(t),a=yk(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),it(n))i=xk(r,n,!0);else if(n==="auto"){var s=dk(r,r.getLabelModel(),Hh(hn.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=n,i=_k(r,o,!0);return fm(e,n,{ticks:i,tickCategoryInterval:o})}function B4(r){var t=r.scale.getTicks(),e=ol(r);return{labels:Y(t,function(n,a){return{formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var z4=gk("axisTick"),V4=gk("axisLabel");function gk(r){return function(e){return Su(e)[r]||(Su(e)[r]={list:[]})}}function yk(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var c=s[0],h=r.dataToCoord(c+1)-r.dataToCoord(c),v=Math.abs(h*Math.cos(i)),p=Math.abs(h*Math.sin(i)),d=0,g=0;c<=s[1];c+=u){var y=0,m=0,_=Mv(a({value:c}),n.font,"center","top");y=_.width*1.3,m=_.height*1.3,d=Math.max(d,y,7),g=Math.max(g,m,7)}var x=d/v,b=g/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(x,b)));if(e===hn.estimate)return t.out.noPxChangeTryDetermine.push(K(H4,null,r,S,l)),S;var w=mk(r,S,l);return w??S}function H4(r,t,e){return mk(r,t,e)==null}function mk(r,t,e){var n=P4(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=e,n.lastAutoInterval=t,n.axisExtent0=a[0],n.axisExtent1=a[1]}function W4(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function _k(r,t,e){var n=ol(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=uk(r),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);v&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(e?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function xk(r,t,e){var n=r.scale,a=ol(r),i=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Zb=[0,1],dn=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return f2(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,a=this.scale;return t=a.normalize(a.parse(t)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),jb(n,a.count())),Gt(t,Zb,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),jb(n,a.count()));var i=Gt(t,n,Zb,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=R4(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),a=n.ticks,i=Y(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return U4(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),a=Y(n,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(t){return t=t||Hh(hn.determine),E4(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(t){return t=t||Hh(hn.determine),G4(this,t)},r})();function jb(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function U4(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;D(t,function(v){v.coord-=u/2,v.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var c=i[0]>i[1];h(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&h(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&h(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function h(v,p){return v=ye(v),p=ye(p),c?v>p:va&&(a+=Il);var v=Math.atan2(s,o);if(v<0&&(v+=Il),v>=n&&v<=a||v+Il>=n&&v+Il<=a)return l[0]=f,l[1]=c,u-e;var p=e*Math.cos(n)+r,d=e*Math.sin(n)+t,g=e*Math.cos(a)+r,y=e*Math.sin(a)+t,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Wh(r,t,e,n,a,i,o,s){var l=a-r,u=i-t,f=e-r,c=n-t,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var v=l*f+u*c,p=v/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var d=o[0]=r+p*f,g=o[1]=t+p*c;return Math.sqrt((d-a)*(d-a)+(g-i)*(g-i))}function Sk(r,t,e,n,a,i,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var nn=[];function Z4(r,t,e){var n=Sk(t.x,t.y,t.width,t.height,r.x,r.y,nn);return e.set(nn[0],nn[1]),n}function j4(r,t,e){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=t.data,c=r.x,h=r.y,v=0;v0){t=t/180*Math.PI,an.fromArray(r[0]),Jt.fromArray(r[1]),ce.fromArray(r[2]),ct.sub(Nn,an,Jt),ct.sub(In,ce,Jt);var e=Nn.len(),n=In.len();if(!(e<.001||n<.001)){Nn.scale(1/e),In.scale(1/n);var a=Nn.dot(In),i=Math.cos(t);if(i1&&ct.copy(ar,ce),ar.toArray(r[1])}}}}function q4(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,an.fromArray(r[0]),Jt.fromArray(r[1]),ce.fromArray(r[2]),ct.sub(Nn,Jt,an),ct.sub(In,ce,Jt);var n=Nn.len(),a=In.len();if(!(n<.001||a<.001)){Nn.scale(1/n),In.scale(1/a);var i=Nn.dot(t),o=Math.cos(e);if(i=l)ct.copy(ar,ce);else{ar.scaleAndAdd(In,s/Math.tan(Math.PI/2-f));var c=ce.x!==Jt.x?(ar.x-Jt.x)/(ce.x-Jt.x):(ar.y-Jt.y)/(ce.y-Jt.y);if(isNaN(c))return;c<0?ct.copy(ar,Jt):c>1&&ct.copy(ar,ce)}ar.toArray(r[1])}}}}function xd(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function K4(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var a=Ha(n[0],n[1]),i=Ha(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=Yc([],n[1],n[0],o/a),l=Yc([],n[1],n[2],o/i),u=Yc([],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],n[2][0],n[2][1])}else for(var f=1;f0){x(A*C,0,i);var M=A+w;M<0&&b(-M*C,1)}else b(-w*C,1)}}function x(w,T,C){w!==0&&(f=!0);for(var A=T;A0)for(var M=0;M0;M--){var E=C[M-1]*P;x(-E,M,i)}}}function S(w){var T=w<0?-1:1;w=Math.abs(w);for(var C=Math.ceil(w/(i-1)),A=0;A0?x(C,0,A+1):x(-C,i-A-1,i),w-=C,w<=0)return}return f}function tH(r){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),St(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Bt(n,u,e,l)}else if(n.attr(u),!el(n).valueAnimation){var c=nt(n.style.opacity,1);n.style.opacity=0,Qt(n,{style:{opacity:c}},e,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};uc(v,u,fc),uc(v,n.states.select,fc)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};uc(p,u,fc),uc(p,n.states.emphasis,fc)}uL(n,l,f,e,e)}if(a&&!a.ignore&&!a.invisible){var i=nH(a),o=i.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),Bt(a,{shape:d},e)):(a.setShape(d),a.style.strokePercent=0,Qt(a,{style:{strokePercent:1}},e)),i.oldLayout=d}},r})(),wd=Ct();function iH(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=wd(e).labelManager;a||(a=wd(e).labelManager=new aH),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=wd(e).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}var Td=Math.sin,Cd=Math.cos,Mk=Math.PI,Fi=Math.PI*2,oH=180/Mk,Dk=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,n,a,i,o){this._add("C",t,e,n,a,i,o)},r.prototype.quadraticCurveTo=function(t,e,n,a){this._add("Q",t,e,n,a)},r.prototype.arc=function(t,e,n,a,i,o){this.ellipse(t,e,n,n,0,a,i,o)},r.prototype.ellipse=function(t,e,n,a,i,o,s,l){var u=s-o,f=!l,c=Math.abs(u),h=Xa(c-Fi)||(f?u>=Fi:-u>=Fi),v=u>0?u%Fi:u%Fi+Fi,p=!1;h?p=!0:Xa(c)?p=!1:p=v>=Mk==!!f;var d=t+n*Cd(o),g=e+a*Td(o);this._start&&this._add("M",d,g);var y=Math.round(i*oH);if(h){var m=1/this._p,_=(f?1:-1)*(Fi-m);this._add("A",n,a,y,1,+f,t+n*Cd(o+_),e+a*Td(o+_)),m>.01&&this._add("A",n,a,y,0,+f,d,g)}else{var x=t+n*Cd(s),b=e+a*Td(s);this._add("A",n,a,y,+p,+f,x,b)}},r.prototype.rect=function(t,e,n,a){this._add("M",t,e),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,n,a,i,o,s,l,u){for(var f=[],c=this._p,h=1;h"}function dH(r){return""}function P_(r,t){t=t||{};var e=t.newline?` `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return pH(o,s)+(o!=="style"?ir(l):l||"")+(i?""+e+Y(i,function(u){return n(u)}).join(e)+e:"")+dH(o)}return n(r)}function gH(r,t,e){e=e||{};var n=e.newline?` `:"",a=" {"+n,i=n+"}",o=Y(kt(r),function(l){return l+a+Y(kt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=Y(kt(t),function(l){return"@keyframes "+l+a+Y(kt(t[l]),function(u){return u+a+Y(kt(t[l][u]),function(f){var c=t[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":[""].join(n)}function dm(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ew(r,t,e,n){return Pe("svg","root",{width:r,height:t,xmlns:Lk,"xmlns:xlink":Ik,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+t:!1},e)}var yH=0;function Pk(){return yH++}var rw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Wi="transform-origin";function mH(r,t,e){var n=W({},r.shape);W(n,t),r.buildPath(e,n);var a=new Dk;return a.reset(e2(r)),e.rebuildPath(a,1),a.generateStr(),a.getStr()}function _H(r,t){var e=t.originX,n=t.originY;(e||n)&&(r[Wi]=e+"px "+n+"px")}var xH={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ek(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function SH(r,t,e){var n=r.shape.paths,a={},i,o;if(D(n,function(l){var u=dm(e.zrId);u.animation=!0,Kv(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,h=kt(f),v=h.length;if(v){o=h[v-1];var p=f[o];for(var d in p){var g=p[d];a[d]=a[d]||{d:""},a[d].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=Ek(a,e);return i.replace(o,s)}}function nw(r){return q(r)?rw[r]?"cubic-bezier("+rw[r]+")":k0(r)?r:"":""}function Kv(r,t,e,n){var a=r.animators,i=a.length,o=[];if(r instanceof Vv){var s=SH(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var zt=Ek(w,e);return zt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+Pk();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function bH(r,t,e){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};aw(n,t,e)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=py(l))}var u=a.lineWidth;if(u){var f=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),aw(n,t,e)}}function aw(r,t,e,n){var a=JSON.stringify(r),i=e.cssStyleCache[a];i||(i=e.zrId+"-cls-"+Pk(),e.cssStyleCache[a]=i,e.cssNodes["."+i+":hover"]=r),t.class=t.class?t.class+" "+i:i}var Yu=Math.round;function Rk(r){return r&&q(r.src)}function Ok(r){return r&&it(r.toDataURL)}function E_(r,t,e,n){cH(function(a,i){var o=a==="fill"||a==="stroke";o&&t2(i)?Bk(t,r,a,n):o&&P0(i)?zk(e,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),LH(e,r,n)}function R_(r,t){var e=qB(t);e&&(e.each(function(n,a){n!=null&&(r[(tw+a).toLowerCase()]=n+"")}),t.isSilent()&&(r[tw+"silent"]="true"))}function iw(r){return Xa(r[0]-1)&&Xa(r[1])&&Xa(r[2])&&Xa(r[3]-1)}function wH(r){return Xa(r[4])&&Xa(r[5])}function O_(r,t,e){if(t&&!(wH(t)&&iw(t))){var n=1e4;r.transform=iw(t)?"translate("+Yu(t[4]*n)/n+" "+Yu(t[5]*n)/n+")":mB(t)}}function ow(r,t,e){for(var n=r.points,a=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";qe(h,g),qe(v,g)}else if(h==null||v==null){var y=function(A,M){if(A){var I=A.elm,L=h||M.width,P=v||M.height;A.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),A.attrs.width=L,A.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=z0(p,null,r,function(A){l||y(S,A),y(c,A)});m&&m.width&&m.height&&(h=h||m.width,v=v||m.height)}c=Pe("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else a.svgElement&&(c=ut(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(c){var _,x;l?_=x=1:u?(x=1,_=o.width/i.width):f?(_=1,x=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var b=r2(a);b&&(o.patternTransform=b);var S=Pe("pattern","",o,[c]),w=P_(S),T=n.patternCache,C=T[w];C||(C=n.zrId+"-p"+n.patternIdx++,T[w]=C,o.id=C,S=n.defs[C]=Pe("pattern",C,o,[c])),t[e]=Av(C)}}function IH(r,t,e){var n=e.clipPathCache,a=e.defs,i=n[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=Pe("clipPath",i,o,[Nk(r,e)])}t["clip-path"]=Av(i)}function uw(r){return document.createTextNode(r)}function qi(r,t,e){r.insertBefore(t,e)}function fw(r,t){r.removeChild(t)}function cw(r,t){r.appendChild(t)}function Vk(r){return r.parentNode}function Fk(r){return r.nextSibling}function Ad(r,t){r.textContent=t}var hw=58,kH=120,PH=Pe("","");function gm(r){return r===void 0}function Mn(r){return r!==void 0}function EH(r,t,e){for(var n={},a=t;a<=e;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function au(r,t){var e=r.key===t.key,n=r.tag===t.tag;return n&&e}function $u(r){var t,e=r.children,n=r.tag;if(Mn(n)){var a=r.elm=kk(n);if(N_(PH,r),U(e))for(t=0;ti?(p=e[l+1]==null?null:e[l+1].elm,Gk(r,p,e,a,l)):Xh(r,t,n,i))}function vs(r,t){var e=t.elm=r.elm,n=r.children,a=t.children;r!==t&&(N_(r,t),gm(t.text)?Mn(n)&&Mn(a)?n!==a&&RH(e,n,a):Mn(a)?(Mn(r.text)&&Ad(e,""),Gk(e,null,a,0,a.length-1)):Mn(n)?Xh(e,n,0,n.length-1):Mn(r.text)&&Ad(e,""):r.text!==t.text&&(Mn(n)&&Xh(e,n,0,n.length-1),Ad(e,t.text)))}function OH(r,t){if(au(r,t))vs(r,t);else{var e=r.elm,n=Vk(e);$u(t),n!==null&&(qi(n,t.elm,Fk(e)),Xh(n,[r],0,0))}return t}var NH=0,BH=(function(){function r(t,e,n){if(this.type="svg",this.refreshHover=vw(),this.configLayer=vw(),this.storage=e,this._opts=n=W({},n),this.root=t,this._id="zr"+NH++,this._oldVNode=ew(n.width,n.height),t&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=kk("svg");N_(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",OH(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return lw(t,dm(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=dm(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=zH(n,a,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=Pe("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=Y(kt(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(Pe("defs","defs",{},u)),t.animation){var f=gH(i.cssNodes,i.cssAnims,{newline:!0});if(f){var c=Pe("style","stl",{},[],f);o.push(c)}}return ew(n,a,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},P_(this.renderToVNode({animation:nt(t.cssAnimation,!0),emphasis:nt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:nt(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,n){for(var a=t.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var c=this.__startIndex;c15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=v.dpr,M=0;M0&&t>a[0]){for(l=0;lt);l++);s=n[a[l]]}if(a.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,a=0;a0?cc:0),this._needsManuallyCompositing),f.__builtin__||C0("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),a.__dirty&Tr&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?bt(n[t],e,!0):n[t]=e;for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill=V.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(Kt);function Gs(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Ns(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}var mf=(function(r){F(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o,s){this.removeAll();var l=be(e,-1,-1,2,2,null,s);l.attr({z2:nt(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=$H,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ya(this.childAt(0))},t.prototype.downplay=function(){ma(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=t.getSymbolZ2(e,n),f=o!==this._symbolType,c=i&&i.disableAnimation;if(f){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?v.attr(p):Bt(v,p,s,n),qr(v)}if(this._updateCommon(e,n,l,a,i),f){var v=this.childAt(0);if(!c){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Qt(v,p,s,n)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,f,c,h,v,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,h=i.focus,v=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),p=_.get("disabled"),d=De(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var b=ko(e.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var S=e.getItemVisual(n,"style"),w=S.fill;if(s instanceof Fe){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(W({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;Re(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:w,defaultOpacity:S.opacity});function I(E){return M?e.getName(E):Gs(e,E)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;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),ne(this,h,v,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=dt(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&ii(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ii(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return il(e.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(e,n){return e.getItemVisual(n,"z2")},t})(ot);function $H(r,t){this.parent.drift(r,t)}function Dd(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function gw(r){return r!=null&&!vt(r)&&(r={isIgnore:r}),r||{}}function yw(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:De(t),cursorStyle:t.get("cursor")}}var _f=(function(){function r(t){this.group=new ot,this._SymbolCtor=t||mf}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=gw(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=yw(t),u={disableAnimation:s},f=e.getSymbolPoint||function(c){return t.getItemLayout(c)};i||n.removeAll(),t.diff(i).add(function(c){var h=f(c);if(Dd(t,h,c,e)){var v=new o(t,c,l,u);v.setPosition(h),t.setItemGraphicEl(c,v),n.add(v)}}).update(function(c,h){var v=i.getItemGraphicEl(h),p=f(c);if(!Dd(t,p,c,e)){n.remove(v);return}var d=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==d)n.remove(v),v=new o(t,c,l,u),v.setPosition(p);else{v.updateData(t,c,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Bt(v,y,a)}n.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yw(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=gw(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=n[0]:n[1]<0&&(e=n[1]),e}function Uk(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function ZH(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function jH(r,t,e,n,a,i,o,s){for(var l=ZH(r,t),u=[],f=[],c=[],h=[],v=[],p=[],d=[],g=Wk(a,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=a||d<0)break;if(vo(y,m)){if(l){d+=i;continue}break}if(d===e)r[i>0?"moveTo":"lineTo"](y,m),c=y,h=m;else{var _=y-u,x=m-f;if(_*_+x*x<.5){d+=i;continue}if(o>0){for(var b=d+i,S=t[b*2],w=t[b*2+1];S===y&&w===m&&g=n||vo(S,w))v=y,p=m;else{A=S-u,M=w-f;var P=y-u,E=S-y,R=m-f,B=w-m,N=void 0,z=void 0;if(s==="x"){N=Math.abs(P),z=Math.abs(E);var k=A>0?1:-1;v=y-k*N*o,p=m,I=y+k*z*o,L=m}else if(s==="y"){N=Math.abs(R),z=Math.abs(B);var G=M>0?1:-1;v=y,p=m-G*N*o,I=y,L=m+G*z*o}else N=Math.sqrt(P*P+R*R),z=Math.sqrt(E*E+B*B),C=z/(z+N),v=y-A*o*(1-C),p=m-M*o*(1-C),I=y+A*o*C,L=m+M*o*C,I=Ra(I,Oa(S,y)),L=Ra(L,Oa(w,m)),I=Oa(I,Ra(S,y)),L=Oa(L,Ra(w,m)),A=I-y,M=L-m,v=y-A*N/z,p=m-M*N/z,v=Ra(v,Oa(u,y)),p=Ra(p,Oa(f,m)),v=Oa(v,Ra(u,y)),p=Oa(p,Ra(f,m)),A=y-v,M=m-p,I=y+A*z/N,L=m+M*z/N}r.bezierCurveTo(c,h,v,p,y,m),c=I,h=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var Yk=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),qH=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Yk},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&vo(a[o*2-2],a[o*2-1]);o--);for(;i=0){var x=u?(p-l)*_+l:(v-s)*_+s;return u?[e,x]:[x,e]}s=v,l=p;break;case o.C:v=i[c++],p=i[c++],d=i[c++],g=i[c++],y=i[c++],m=i[c++];var b=u?gh(s,v,d,y,e,f):gh(l,p,g,m,e,f);if(b>0)for(var S=0;S=0){var x=u?ke(l,p,g,m,w):ke(s,v,d,y,w);return u?[e,x]:[x,e]}}s=y,l=m;break}}},t})(At),KH=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Yk),$k=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new KH},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&vo(a[s*2-2],a[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function tW(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=t.getAxis(a),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=QH(u,a==="x"?e.getWidth():e.getHeight()),v=h.length;if(!v&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var p=10,d=h[0].coord-p,g=h[v-1].coord+p,y=g-d;if(y<.001)return"transparent";D(h,function(_){_.offset=(_.coord-d)/y}),h.push({offset:v?h[v-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:c[0]||"transparent"});var m=new Qs(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}}function eW(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(a&&rW(i,t))){var o=t.mapDimension(i.dim),s={};return D(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function rW(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function nW(r,t){return isNaN(r)||isNaN(t)}function aW(r){for(var t=r.length/2;t>0&&nW(r[t*2-2],r[t*2-1]);t--);return t-1}function bw(r,t){return[r[t*2],r[t*2+1]]}function iW(r,t,e){for(var n=r.length/2,a=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function jk(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=p.getState("emphasis").style;z.lineWidth=+p.style.lineWidth+1}dt(p).seriesIndex=e.seriesIndex,ne(p,R,B,N);var k=Sw(e.get("smooth")),G=e.get("smoothMonotone");if(p.setShape({smooth:k,smoothMonotone:G,connectNulls:w}),d){var H=s.getCalculationInfo("stackedOnSeries"),O=0;d.useStyle(ht(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(O=Sw(H.get("smooth"))),d.setShape({smooth:k,stackedOnSmooth:O,smoothMonotone:G,connectNulls:w}),Me(d,e,"areaStyle"),dt(d).seriesIndex=e.seriesIndex,ne(d,R,B,N)}var j=this._changePolyState;s.eachItemGraphicEl(function(st){st&&(st.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,p),d&&this.packEventData(e,d))},t.prototype.packEventData=function(e,n){dt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=yo(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 f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=e.get("zlevel")||0,v=e.get("z")||0;u=new mf(o,s),u.x=f,u.y=c,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else $t.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=yo(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 $t.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;Mh(this._polyline,e),n&&Mh(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new qH({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new $k({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");it(f)&&(f=f(null));var c=u.get("animationDelay")||0,h=it(c)?c(null):c;e.eachItemGraphicEl(function(v,p){var d=v;if(d){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var x=a,b=n.pointToCoord(g);i?(y=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(y=x.r0,m=x.r,_=b[0])}else{var S=a;i?(y=S.x,m=S.x+S.width,_=v.x):(y=S.y+S.height,m=S.y,_=v.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=it(c)?c(p):f*w+h,C=d.getSymbolPath(),A=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(jk(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=aW(l);f>=0&&(Re(s,De(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(c,h,v){return v!=null?Hk(o,v):Gs(o,c)},enableTextSetter:!0},oW(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),S=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=iW(c,x,w),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!v){var I=bw(c,C[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(M=h.getRawValue(C[0]))}else{var I=f.getPointOn(x,w);I&&u.attr({x:I[0]+b,y:I[1]+S});var L=h.getRawValue(C[0]),P=h.getRawValue(C[1]);o&&(M=b2(a,p,L,P,T.t))}i.lastFrameIndex=C[0]}else{var E=e===1||i.lastFrameIndex>0?C[0]:0,I=bw(c,E);o&&(M=h.getRawValue(E)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var R=el(u);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,c=e.hostModel,h=jH(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,d=h.next,g=h.stackedOnNext;if(o&&(p=Na(h.stackedOnCurrent,h.current,a,o,l),v=Na(h.current,null,a,o,l),g=Na(h.stackedOnNext,h.next,a,o,l),d=Na(h.next,null,a,o,l)),xw(v,d)>3e3||f&&xw(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:d}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Bt(u,y,c),f&&(f.setShape({points:v,stackedOnPoints:p}),f.stopAnimation(),Bt(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=h.status,x=0;x<_.length;x++){var b=_[x].cmd;if(b==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var p=void 0;q(i)?p=lW[i]:it(i)&&(p=i),p&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,p,uW))}}}}}function fW(r){r.registerChartView(sW),r.registerSeriesModel(YH),r.registerLayout(Sf("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qk("line"))}var Xu=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Aa(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)D(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),d=h.getTickModel().get("alignWithLabel"),g=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,b=0;bg){_=(S+m)/2;break}b===1&&(x=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[v]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(Kt);Kt.registerClass(Xu);var cW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Aa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=vi(Xu.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:V.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Xu),hW=(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})(),Zh=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new hW},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){fa(i,e,dt(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})($t),ww={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=Id(t.x,r.x),s=kd(t.x+t.width,a),l=Id(t.y,r.y),u=kd(t.y+t.height,i),f=sa?s:o,t.y=c&&l>i?u:l,t.width=f?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=kd(t.r,r.r),i=Id(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},Tw={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new Tt({shape:W({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,c=a?"height":"width";f[c]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?Zh:Ke,f=new u({shape:n,z2:1});f.name="item";var c=Kk(a);if(f.calculateTextPosition=vW(c,{isRoundCap:u===Zh}),i){var h=f.shape,v=a?"r":"endAngle",p={};h[v]=a?n.r0:n.startAngle,p[v]=n[v],(s?Bt:Qt)(f,{shape:p},i)}return f}};function yW(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Cw(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Bt:Qt)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?Bt:Qt)(e,{shape:u},f,a)}function Aw(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function xW(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Kk(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function Dw(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=Bn(n.getModel("itemStyle"),f,!0);W(f,c),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=De(n);Re(r,p,{labelFetcher:i,labelDataIndex:e,defaultText:Gs(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var d=r.getTextContent();if(s&&d){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,pW(r,g==="outside"?v:g,Kk(o),n.get(["label","rotate"]))}lL(d,p,i.getRawValue(e),function(m){return Hk(t,m)});var y=n.getModel(["emphasis"]);ne(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Me(r,n),xW(a)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function SW(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var bW=(function(){function r(){}return r})(),Lw=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new bW},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function wW(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function Jk(r,t,e){if(si(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function TW(r,t,e){var n=r.type==="polar"?Ke:Tt;return new n({shape:Jk(t,e,r),silent:!0,z2:0})}function CW(r){r.registerChartView(gW),r.registerSeriesModel(cW),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,xt(ek,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rk("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qk("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var Pw=Math.PI*2,dc=Math.PI/180;function AW(r,t,e){t.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=LL(n,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=o.viewRect,h=-n.get("startAngle")*dc,v=n.get("endAngle"),p=n.get("padAngle")*dc;v=v==="auto"?h-Pw:-v*dc;var d=n.get("minAngle")*dc,g=d+p,y=0;a.each(i,function(B){!isNaN(B)&&y++});var m=a.getSum(i),_=Math.PI/(m||y)*2,x=n.get("clockwise"),b=n.get("roseType"),S=n.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var T=x?1:-1,C=[h,v],A=T*p/2;Ev(C,!x),h=C[0],v=C[1];var M=Qk(n);M.startAngle=h,M.endAngle=v,M.clockwise=x,M.cx=s,M.cy=l,M.r=u,M.r0=f;var I=Math.abs(v-h),L=I,P=0,E=h;if(a.setLayout({viewRect:c,r:u}),a.each(i,function(B,N){var z;if(isNaN(B)){a.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?z=m===0&&S?_:B*_:z=I/y,zz?(G=E+T*z/2,H=G):(G=E+A,H=k-A),a.setItemLayout(N,{angle:z,startAngle:G,endAngle:H,clockwise:x,cx:s,cy:l,r0:f,r:b?Gt(B,w,[f,u]):u}),E=k}),Le?y:g,b=Math.abs(_.label.y-e);if(b>=x.maxY){var S=_.label.x-t-_.len2*a,w=n+_.len,T=Math.abs(S)r.unconstrainedWidth?null:h:null;n.setStyle("width",v)}eP(i,n)}}}function eP(r,t){Rw.rect=r,Ck(Rw,t,LW)}var LW={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Rw={};function Pd(r){return r.position==="center"}function IW(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*MW,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,h=s.height;function v(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}t.each(function(S){var w=t.getItemGraphicEl(S),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),M=t.getItemModel(S),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),E=I.get("alignTo"),R=Z(I.get("edgeDistance"),u),B=I.get("bleedMargin");B==null&&(B=Math.min(u,h)>200?10:2);var N=M.getModel("labelLine"),z=N.get("length");z=Z(z,u);var k=N.get("length2");if(k=Z(k,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":H>0?"left":"right"}var Vt=Math.PI,Ut=0,ue=I.get("rotate");if(Rt(ue))Ut=ue*(Vt/180);else if(L==="center")Ut=0;else if(ue==="radial"||ue===!0){var tr=H<0?-G+Vt:-G;Ut=tr}else if(ue==="tangential"&&L!=="outside"&&L!=="outer"){var Ge=Math.atan2(H,O);Ge<0&&(Ge=Vt*2+Ge);var gn=O>0;gn&&(Ge=Vt+Ge),Ut=Ge-Vt}if(i=!!Ut,C.x=j,C.y=st,C.rotation=Ut,C.setStyle({verticalAlign:"middle"}),lt){C.setStyle({align:zt});var hl=C.states.select;hl&&(hl.x+=C.x,hl.y+=C.y)}else{var Ma=new pt(0,0,0,0);eP(Ma,C),e.push({label:C,labelLine:A,position:L,len:z,len2:k,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new ct(H,O),linePoints:_t,textAlign:zt,labelDistance:P,labelAlignTo:E,edgeDistance:R,bleedMargin:B,rect:Ma,unconstrainedWidth:Ma.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:lt})}}),!i&&r.get("avoidLabelOverlap")&&DW(e,n,a,l,u,h,f,c);for(var d=0;d0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},t.type="pie",t})($t);function ll(r,t,e){t=U(t)&&{coordDimensions:t}||W({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=gf(n,t).dimensions,i=new or(a,r);return i.initData(n,e),i}var ul=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r})(),EW=Ct(),rP=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ul(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ll(this,{coordDimensions:["value"],encodeDefaulter:xt(l_,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=EW(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=ez(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){go(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})(Kt);H5({fullType:rP.type,getCoord2:function(r){return r.getShallow("center")}});function RW(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(Rt(o)&&!isNaN(o)&&o<0)})}}}function OW(r){r.registerChartView(PW),r.registerSeriesModel(rP),xI("pie",r.registerAction),r.registerLayout(xt(AW,"pie")),r.registerProcessor(sl("pie")),r.registerProcessor(RW("pie"))}var NW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return Aa(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,a){return a.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:V.color.primary}},universalTransition:{divideShape:"clone"}},t})(Kt),nP=4,BW=(function(){function r(){}return r})(),zW=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new BW},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,c=i[f]-s/2,h=i[f+1]-l/2;if(e>=c&&n>=h&&e<=c+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,h=0;h=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),FW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,a){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Sf("").reset(e,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new VW:new _f,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})($t),aP={left:0,right:0,top:0,bottom:0},jh=["25%","25%"],GW=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,n){var a=Lo(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&e.outerBounds&&$n(e.outerBounds,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&$n(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:aP,outerBoundsContain:"all",outerBoundsClampWidth:jh[0],outerBoundsClampHeight:jh[1],backgroundColor:V.color.transparent,borderWidth:1,borderColor:V.color.neutral30},t})(Mt),mm=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",le).models[0]},t.type="cartesian2dAxis",t})(Mt);we(mm,yf);var iP={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:V.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:V.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:V.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[V.color.backgroundTint,V.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:V.color.neutral00,borderColor:V.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},HW=bt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},iP),B_=bt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:V.color.axisMinorSplitLine,width:1}}},iP),WW=bt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},B_),UW=ht({logBase:10},B_);const oP={category:HW,value:B_,time:WW,log:UW};var YW={value:1,category:1,time:1,log:1},_m=null;function $W(r){_m||(_m=r)}function bf(){return _m}function Hs(r,t,e,n){D(YW,function(a,i){var o=bt(bt({},oP[i],!0),n,!0),s=(function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var h=Bu(this),v=h?Lo(f):{},p=c.getTheme();bt(f,p.get(i+"Axis")),bt(f,this.getDefaultOption()),f.type=Ow(f),h&&$n(f,v,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Wu.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var c=bf();return c?c.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Ow)}function Ow(r){return r.type||(r.data?"category":"value")}var XW=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Y(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ht(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),xm=["x","y"];function Nw(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var ZW=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=xm,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Nw(e)||!Nw(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-a[0]*f,v=o[1]-i[0]*c,p=this._transform=[f,0,0,c,h,v];this._invTransform=fn([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new pt(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return pe(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n,a){if(a=a||[],this._invTransform)return pe(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-e,o=Math.min(a[0],a[1])-e,s=Math.max(n[0],n[1])-i+e,l=Math.max(a[0],a[1])-o+e;return new pt(i,o,s,l)},t})(XW),sP=(function(r){F(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(dn),Jv="expandAxisBreak",lP="collapseAxisBreak",uP="toggleAxisBreak",z_="axisbreakchanged",jW={type:Jv,event:z_,update:"update",refineEvent:V_},qW={type:lP,event:z_,update:"update",refineEvent:V_},KW={type:uP,event:z_,update:"update",refineEvent:V_};function V_(r,t,e,n){var a=[];return D(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function JW(r){r.registerAction(jW,t),r.registerAction(qW,t),r.registerAction(KW,t);function t(e,n){var a=[],i=Ts(n,e);function o(s,l){D(i[s],function(u){var f=u.updateAxisBreaks(e);D(f.breaks,function(c){var h;a.push(ht((h={},h[l]=u.componentIndex,h),c))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var Za=Math.PI,QW=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],t6=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ws=Ct(),fP=Ct(),cP=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,a=this.recordMap,i=a[e]||(a[e]=[]);return i[n]||(i[n]={ready:{}})},r})();function e6(r,t,e,n){var a=e.axis,i=t.ensureRecord(e),o=[],s,l=F_(r.axisName)&&Fs(r.nameLocation);D(n,function(p){var d=Xn(p);if(!(!d||d.label.ignore)){o.push(d);var g=i.transGroup;l&&(g.transform?fn(kl,g.transform):Tv(kl),d.transform&&zn(kl,kl,d.transform),pt.copy(gc,d.localRect),gc.applyTransform(kl),s?s.union(gc):pt.copy(s=new pt(0,0,0,0),gc))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(p,d){return Math.abs(p.label[u]-f)-Math.abs(d.label[u]-f)}),l&&s){var c=a.getExtent(),h=Math.min(c[0],c[1]),v=Math.max(c[0],c[1])-h;s.union(new pt(h,0,v,1))}i.stOccupiedRect=s,i.labelInfoList=o}var kl=ze(),gc=new pt(0,0,0,0),hP=function(r,t,e,n,a,i){if(Fs(r.nameLocation)){var o=i.stOccupiedRect;o&&vP(Q4({},o,i.transGroup.transform),n,a)}else pP(i.labelInfoList,i.dirVec,n,a)};function vP(r,t,e){var n=new ct;qv(r,t,n,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&cm(t,n)}function pP(r,t,e,n){for(var a=ct.dot(n,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):ku(a-Za)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),r6=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],n6={axisLine:function(r,t,e,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],h=f[0]>c[0];u&&(pe(f,f,u),pe(c,c,u));var v=W({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())bf().buildAxisBreakLine(n,a,i,p);else{var d=new me(W({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},p));Os(d.shape,d.style.lineWidth),d.anid="line",a.add(d)}var g=n.get(["axisLine","symbol"]);if(g!=null){var y=n.get(["axisLine","symbolSize"]);q(g)&&(g=[g,g]),(q(y)||Rt(y))&&(y=[y,y]);var m=ko(n.get(["axisLine","symbolOffset"])||0,y),_=y[0],x=y[1];D([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(b,S){if(g[S]!=="none"&&g[S]!=null){var w=be(g[S],-_/2,-x/2,_,x,v.stroke,!0),T=b.r+b.offset,C=h?c:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,n,a,i,o,s){var l=zw(t,a,s);l&&Bw(r,t,e,n,a,i,o,hn.estimate)},axisTickLabelDetermine:function(r,t,e,n,a,i,o,s){var l=zw(t,a,s);l&&Bw(r,t,e,n,a,i,o,hn.determine);var u=s6(r,a,i,n);o6(r,t.labelLayoutList,u),l6(r,a,i,n,r.tickDirection)},axisName:function(r,t,e,n,a,i,o,s){var l=e.ensureRecord(n);t.nameEl&&(a.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(F_(u)){var f=r.nameLocation,c=r.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),d=n.axis.inverse?-1:1,g=new ct(0,0),y=new ct(0,0);f==="start"?(g.x=p[0]-d*v,y.x=-d):f==="end"?(g.x=p[1]+d*v,y.x=d):(g.x=(p[0]+p[1])/2,g.y=r.labelOffset+c*v,y.y=c);var m=ze();y.transform(ci(m,m,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*Za/180);var x,b;Fs(f)?x=sr.innerTextLayout(r.rotation,_??r.rotation,c):(x=a6(r.rotation,f,_||0,p),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(x.rotation)),!isFinite(b)&&(b=null)));var S=h.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ue(r.raw.nameTruncateMaxWidth,w.maxWidth,b),A=s.nameMarginLevel||0,M=new Ot({x:g.x,y:g.y,rotation:x.rotation,silent:sr.isLabelSilent(n),style:qt(h,{text:u,font:S,overflow:"truncate",width:C,ellipsis:T,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||x.textAlign,verticalAlign:h.get("verticalAlign")||x.textVerticalAlign}),z2:1});if(Ca({el:M,componentModel:n,itemName:u}),M.__fullText=u,M.anid="name",n.get("triggerEvent")){var I=sr.makeAxisEventDataBase(n);I.targetType="axisName",I.name=u,dt(M).eventData=I}i.add(M),M.updateTransform(),t.nameEl=M;var L=l.nameLayout=Xn({label:M,priority:M.z2,defaultAttr:{ignore:M.ignore},marginDefault:Fs(f)?QW[A]:t6[A]});if(l.nameLocation=f,a.add(M),M.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(n);e.resolveAxisNameOverlap(r,e,n,L,y,P)}}}};function Bw(r,t,e,n,a,i,o,s){gP(t)||u6(r,t,a,s,n,o);var l=t.labelLayoutList;f6(r,n,l,i),v6(n,r.rotation,l);var u=r.optionHideOverlap;i6(n,l,u),u&&Ak(Ht(l,function(f){return f&&!f.label.ignore})),e6(r,e,n,l)}function a6(r,t,e,n){var a=c2(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return ku(a-Za/2)?(o=l?"bottom":"top",i="center"):ku(a-Za*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aZa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function i6(r,t,e){if(uk(r.axis))return;function n(s,l,u){var f=Xn(t[l]),c=Xn(t[u]);if(!(!f||!c)){if(s===!1||f.suggestIgnore){iu(f.label);return}if(c.suggestIgnore){iu(c.label);return}var h=.1;if(!e){var v=[0,0,0,0];f=hm({marginForce:v},f),c=hm({marginForce:v},c)}qv(f,c,null,{touchThreshold:h})&&iu(s?c.label:f.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;n(a,0,1),n(i,o-1,o-2)}function o6(r,t,e){r.showMinorTicks||D(t,function(n){if(n&&n.label.ignore)for(var a=0;au[0]&&isFinite(p)&&isFinite(u[0]);)v=yd(v),p=u[1]-v*o;else{var g=r.getTicks().length-1;g>o&&(v=yd(v));var y=v*o;d=Math.ceil(u[1]/v)*v,p=ye(d-y),p<0&&u[0]>=0?(p=0,d=ye(y)):d>0&&u[1]<=0&&(d=0,p=-ye(y))}var m=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+v*m,d+v*_),n.setInterval.call(r,v),(m||_)&&n.setNiceExtent.call(r,p+v,d-v)}var Fw=[[3,1],[0,2]],y6=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=xm,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=kt(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var h=+l[c],v=o[h],p=v.model,d=v.scale;om(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(v):(Vs(d,p),om(d)&&(s=v))}f.length&&(s||(s=f.pop(),Vs(s.scale,s.model)),D(f,function(g){yP(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};D(n.x,function(o){Gw(n,"y",o,i)}),D(n.y,function(o){Gw(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=Ie(t,e),i=this._rect=ae(t.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(bm(o,i),!n){var u=x6(i,s,o,l,e),f=void 0;if(l)wm?(wm(this._axesList,i),bm(o,i)):f=Uw(i.clone(),"axisLabel",null,i,o,u,a);else{var c=S6(t,i,a),h=c.outerBoundsRect,v=c.parsedOuterBoundsContain,p=c.outerBoundsClamp;h&&(f=Uw(h,v,p,i,o,u,a))}mP(i,o,hn.determine,null,f,a)}D(this._coordsList,function(d){d.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}vt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0})==null;return xo(n,s,!0,!0,e),bm(a,n),l;function u(h){D(a[mt[h]],function(v){if(Uu(v.model)){var p=i.ensureRecord(v.model),d=p.labelInfoList;if(d)for(var g=0;g0&&!Ze(v)&&v>1e-4&&(h/=v),h}}function x6(r,t,e,n,a){var i=new cP(b6);return D(e,function(o){return D(o,function(s){if(Uu(s.model)){var l=!n;s.axisBuilder=d6(r,t,s.model,a,i,l)}})}),i}function mP(r,t,e,n,a,i){var o=e===hn.determine;D(t,function(u){return D(u,function(f){Uu(f.model)&&(g6(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[mt[1-u]]=r[xe[u]]<=i.refContainer[xe[u]]*.5?0:1-u===1?2:1}D(t,function(u,f){return D(u,function(c){Uu(c.model)&&((n==="all"||o)&&c.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&c.axisBuilder.build({axisLine:!0}))})})}function S6(r,t,e){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=t.clone():(a==null||a==="auto")&&(n=ae(r.get("outerBounds",!0)||aP,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||St(["all","axisLabel"],i)<0?o="all":o=i;var s=[wh(nt(r.get("outerBoundsClampWidth",!0),jh[0]),t.width),wh(nt(r.get("outerBoundsClampHeight",!0),jh[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var b6=function(r,t,e,n,a,i){var o=e.axis.dim==="x"?"y":"x";hP(r,t,e,n,a,i),Fs(r.nameLocation)||D(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&pP(s.labelInfoList,s.dirVec,n,a)})};function w6(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return T6(e,r,t),e.seriesInvolved&&A6(e,r),e}function T6(r,t,e){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];D(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Zu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",n);if(D(s.getAxes(),xt(d,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",v=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||v)&&D(p.baseAxes,xt(d,v?"cross":!0,h)),v&&D(p.otherAxes,xt(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",a),x=_.get("show");if(!(!x||x==="auto"&&!g&&!Tm(_))){y==null&&(y=_.get("triggerTooltip")),_=g?C6(m,c,a,t,g,y):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),w=Zu(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:Tm(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var A=M6(i,m);if(A!=null){var M=o[A]||(o[A]={axesInfo:{}});M.axesInfo[w]=C,M.mapper=i[A].mapper,C.linkGroup=M}}}})}function C6(r,t,e,n,a,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};D(s,function(h){l[h]=ut(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&ht(u,c.textStyle)}}return r.model.getModel("axisPointer",new It(l,e,n))}function A6(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,a=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||D(r.coordSysAxesInfo[Zu(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function M6(r,t){for(var e=t.model,n=t.dim,a=0;a=0||r===t}function D6(r){var t=G_(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=Tm(e);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var O6=Ct();function Xw(r,t,e,n){if(r instanceof sP){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return e}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?TP(e,o,u,n):N6(r,t,e,n,o,l):e}function TP(r,t,e,n){if(e===null)return r+(Math.random()-.5)*t;var a=e-n*2,i=Math.min(Math.max(0,t),a);return r+(Math.random()-.5)*i}function N6(r,t,e,n,a,i){var o=O6(r);o.items||(o.items=[]);var s=o.items,l=Zw(s,t,e,n,a,i,1),u=Zw(s,t,e,n,a,i,-1),f=Math.abs(l-e)a/2||c&&h>c/2-n?TP(e,a,c,n):(s.push({fixedCoord:t,floatCoord:f,r:n}),f)}function Zw(r,t,e,n,a,i,o){for(var s=e,l=0;la/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=ht({color:p.color},l));var g=bt(ut(p),{boundaryGap:e,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:h},!1);if(q(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else it(f)&&(g.name=f(g.name,g));var m=new It(g,null,this.ecModel);return we(m,yf.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:V.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:bt({lineStyle:{color:V.color.neutral20}},Pl.axisLine),axisLabel:yc(Pl.axisLabel,!1),axisTick:yc(Pl.axisTick,!1),splitLine:yc(Pl.splitLine,!0),splitArea:yc(Pl.splitArea,!0),indicator:[]},t})(Mt),Y6=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group;i.removeAll(),this._buildAxes(e,a),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,n){var a=e.coordinateSystem,i=a.getIndicatorAxes(),o=Y(i,function(s){var l=s.model.get("showName")?s.name:"",u=new sr(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});D(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var n=e.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),h=l.get("color"),v=u.get("color"),p=U(h)?h:[h],d=U(v)?v:[v],g=[],y=[];function m(E,R,B){var N=B%R.length;return E[N]=E[N]||[],N}if(i==="circle")for(var _=a[0].getTicksCoords(),x=n.cx,b=n.cy,S=0;S<_.length;S++){if(f){var w=m(g,p,S);g[w].push(new Ta({shape:{cx:x,cy:b,r:_[S].coord}}))}if(c&&S<_.length-1){var w=m(y,d,S);y[w].push(new lf({shape:{cx:x,cy:b,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var T,C=Y(a,function(E,R){var B=E.getTicksCoords();return T=T==null?B.length-1:Math.min(B.length-1,T),Y(B,function(N){return n.coordToPoint(N.coord,R)})}),A=[],S=0;S<=T;S++){for(var M=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var c=Math.abs(i),h=(i>0?1:-1)*(c>3?.4:c>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(Kw(this._zr,"globalPan")||El(e))){var n=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,n,a,i,o){e._checkPointer(i,o.originX,o.originY)&&(da(i.event),i.__ecRoamConsumed=!0,Jw(e,n,a,i,o))},t})(Kr);function El(r){return r.__ecRoamConsumed}var Q6=Ct();function Qv(r){var t=Q6(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Rl(r,t,e,n){for(var a=Qv(r),i=a.roam,o=i[t]=i[t]||[],s=0;s=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(c=IP(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var v=a;a=new ot,a.add(v),v.scaleX=v.scaleY=c.scale,v.x=c.x,v.y=c.y}return!e.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Tt({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:i}},r.prototype._parseNode=function(t,e,n,a,i,o){var s=t.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=Od[s];if(f&&Q(Od,s)){l=f.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});e.add(l)}}var v=rT[s];if(v&&Q(rT,s)){var p=v.call(this,t),d=t.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var n=new Rs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),nU(n,e);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,e.add(n),n},r.internalField=(function(){Od={g:function(t,e){var n=new ot;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Tt;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Ta;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new me;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Bv;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n=t.getAttribute("points"),a;n&&(a=iT(n));var i=new Je({shape:{points:a||[]},silent:!0});return Rr(e,i),xr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var n=t.getAttribute("points"),a;n&&(a=iT(n));var i=new Ye({shape:{points:a||[]},silent:!0});return Rr(e,i),xr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var n=new Fe;return Rr(e,n),xr(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",a=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new ot;return Rr(e,s),xr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var n=t.getAttribute("x"),a=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new ot;return Rr(e,s),xr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var n=t.getAttribute("d")||"",a=X2(n);return Rr(e,a),xr(t,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),rT={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new Qs(t,e,n,a);return nT(r,i),aT(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new K2(t,e,n);return nT(r,a),aT(r,a),a}};function nT(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function aT(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var n=e.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};LP(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=dr(o),u=l&&l[3];u&&(l[3]*=Ja(s),o=Vn(l,"rgba"))}t.colorStops.push({offset:a,color:o})}e=e.nextSibling}}function Rr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),ht(t.__inheritedStyle,r.__inheritedStyle))}function iT(r){for(var t=ep(r),e=[],n=0;n0;i-=2){var o=n[i],s=n[i-1],l=ep(o);switch(a=a||ze(),s){case"translate":Wn(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":I0(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ci(a,a,-parseFloat(l[0])*Nd,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Nd);zn(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Nd);zn(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}t.setLocalTransform(a)}}var sT=/([^\s:;]+)\s*:\s*([^:;]+)/g;function LP(r,t,e){var n=r.getAttribute("style");if(n){sT.lastIndex=0;for(var a;(a=sT.exec(n))!=null;){var i=a[1],o=Q(Kh,i)?Kh[i]:null;o&&(t[o]=a[2]);var s=Q(Jh,i)?Jh[i]:null;s&&(e[s]=a[2])}}}function uU(r,t,e){for(var n=0;n0,m={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(t,g,e,n),this._updateMapSelectHandler(t,u,n,a)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=et(),n=et(),a=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(v,p){return p&&(v=p(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function c(v){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(h=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Re(t,De(n),{labelFetcher:h,labelDataIndex:c,defaultText:e},v);var p=t.getTextContent();if(p&&(kP(p).ignore=p.ignore,t.textConfig&&o)){var d=t.getBoundingRect().clone();t.textConfig.layoutRect=d,t.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function hT(r,t,e,n,a,i){r.data?r.data.setItemGraphicEl(i,t):dt(t).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:e,region:n&&n.option||{}}}function vT(r,t,e,n,a){r.data||Ca({el:t,componentModel:a,itemName:e,itemTooltipOption:n.get("tooltip")})}function pT(r,t,e,n,a){t.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return ne(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&PV(t,a,e),o}function dT(r,t,e){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill=V.color.neutral00,a.style.lineWidth=2),a},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:V.color.tertiary},itemStyle:{borderWidth:.5,borderColor:V.color.border,areaColor:V.color.background},emphasis:{label:{show:!0,color:V.color.primary},itemStyle:{areaColor:V.color.highlight}},select:{label:{show:!0,color:V.color.primary},itemStyle:{color:V.color.highlight}},nameProperty:"name"},t})(Kt);function LU(r,t){var e={};return D(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);e[o]=e[o]||[],isNaN(a)||e[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=e[i].length,f=0;f1?(_.width=m,_.height=m/d):(_.height=m,_.width=m*d),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var x=r.getBoxLayoutParams();x.aspect=d,_=ae(x,p),_=IL(r,_,d)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function EU(r,t){D(t.get("geoCoord"),function(e,n){r.addGeoCoord(n,e)})}var RU=(function(){function r(){this.dimensions=EP}return r.prototype.create=function(t,e){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Mm(l+s,l,W({nameMap:o.get("nameMap"),api:e,ecModel:t},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=_T,u.resize(o,e)}),t.eachSeries(function(o){pf({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",le).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=Y(o,function(f){return f.get("nameMap")}),u=new Mm(s,s,W({nameMap:A0(l),api:e,ecModel:t},a(o[0])));u.zoomLimit=Ue.apply(null,Y(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=_T,u.resize(o[0],e),D(o,function(f){f.coordinateSystem=u,EU(u,f)})}),n},r.prototype.getFilledRegions=function(t,e,n,a){for(var i=(t||[]).slice(),o=et(),s=0;s=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function FU(r,t){var e=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(e.length){HU(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+t(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+t(r,a));r.parentNode.hierNode.defaultAncestor=WU(r,a,r.parentNode.hierNode.defaultAncestor||n[0],t)}function GU(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function xT(r){return arguments.length?r:$U}function ou(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function HU(r){for(var t=r.children,e=t.length,n=0,a=0;--e>=0;){var i=t[e];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function WU(r,t,e,n){if(t){for(var a=r,i=r,o=i.parentNode.children[0],s=t,l=a.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=Bd(s),i=zd(i),s&&i;){a=Bd(a),o=zd(o),a.hierNode.ancestor=r;var h=s.hierNode.prelim+c-i.hierNode.prelim-u+n(s,i);h>0&&(YU(UU(s,r,e),r,h),u+=h,l+=h),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,f+=o.hierNode.modifier}s&&!Bd(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),i&&!zd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,e=r)}return e}function Bd(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function zd(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function UU(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function YU(r,t,e){var n=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=n}function $U(r,t){return r.parentNode===t.parentNode?1:2}var XU=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),ZU=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new XU},t.prototype.buildPath=function(e,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,h=Z(n.forkPosition,1),v=[];v[f]=o[f],v[c]=o[c]+(l[c]-o[c])*h,e.moveTo(o[0],o[1]),e.lineTo(v[0],v[1]),e.moveTo(s[0],s[1]),v[f]=s[f],e.lineTo(v[0],v[1]),v[f]=l[f],e.lineTo(v[0],v[1]),e.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(x=x-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-x:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Mu(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(dt(e).focus=L),qU(a,o,f,e,p,v,d,n),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===sf||Mh(e.__edge,P)}})}function qU(r,t,e,n,a,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),f=r.get("layout"),c=r.getOrient(),h=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(d||(d=n.__edge=new uf({shape:Dm(f,c,h,a,a)})),Bt(d,{shape:Dm(f,c,h,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=a.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,a=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var n=e.getData().tree.root,a=r.targetNode;if(q(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function VP(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function j_(r,t){var e=VP(r);return St(e,t)>=0}function rp(r,t){for(var e=[];r;){var n=r.dataIndex;e.push({name:r.name,dataIndex:n,value:t.getRawValue(n)}),r=r.parentNode}return e.reverse(),e}var i8=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var n={name:e.name,children:e.data},a=e.leaves||{},i=new It(a,this,this.ecModel),o=Z_.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=e.expandAndCollapse,f=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=f}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Se("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=rp(a,this),n.collapsed=!a.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:V.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(Kt);function o8(r,t,e){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)e.push(a[i])}}function s8(r,t){r.eachSeriesByType("tree",function(e){l8(e,t)})}function l8(r,t){var e=Ie(r,t).refContainer,n=ae(r.getBoxLayoutParams(),e);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=xT(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(i=n.width,o=n.height,s=xT());var l=r.getData().tree.root,u=l.children[0];if(u){VU(l),o8(u,FU,s),l.hierNode.modifier=-u.hierNode.prelim,Bl(u,GU);var f=u,c=u,h=u;Bl(u,function(x){var b=x.getLayout().x;bc.getLayout().x&&(c=x),x.depth>h.depth&&(h=x)});var v=f===c?1:s(f,c)/2,p=v-f.getLayout().x,d=0,g=0,y=0,m=0;if(a==="radial")d=i/(c.getLayout().x+v+p),g=o/(h.depth-1||1),Bl(u,function(x){y=(x.getLayout().x+p)*d,m=(x.depth-1)*g;var b=ou(y,m);x.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(c.getLayout().x+v+p),d=i/(h.depth-1||1),Bl(u,function(x){m=(x.getLayout().x+p)*g,y=_==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(d=i/(c.getLayout().x+v+p),g=o/(h.depth-1||1),Bl(u,function(x){y=(x.getLayout().x+p)*d,m=_==="TB"?(x.depth-1)*g:o-(x.depth-1)*g,x.setLayout({x:y,y:m},!0)}))}}}function u8(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),n=e.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(a.dataIndex,"style");W(s,o)})})}function f8(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var a=t.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var i=a.coordinateSystem,o=tp(i,t,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function c8(r){r.registerChartView(jU),r.registerSeriesModel(i8),r.registerLayout(s8),r.registerVisual(u8),f8(r)}var CT=["treemapZoomToNode","treemapRender","treemapMove"];function h8(r){for(var t=0;t1;)i=i.parentNode;var o=$y(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var v8=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,n){var a={name:e.name,children:e.data};GP(a);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new It({itemStyle:o},this,n);i=e.levels=p8(i,n);var l=Y(i||[],function(c){return new It(c,s,n)},this),u=Z_.createTree(a,this,f);function f(c){c.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,n,a){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return Se("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=rp(a,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var n=this._idIndexMap;n||(n=this._idIndexMap=et(),this._idIndexMapCount=0);var a=n.get(e);return a==null&&n.set(e,a=this._idIndexMapCount++),a},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){FP(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:V.size.l,top:V.size.xxxl,right:V.size.l,bottom:V.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:V.size.m,emptyItemWidth:25,itemStyle:{color:V.color.backgroundShade,textStyle:{color:V.color.secondary}},emphasis:{itemStyle:{color:V.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:V.color.neutral00,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:V.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t})(Kt);function GP(r){var t=0;D(r.children,function(n){GP(n);var a=n.value;U(a)&&(a=a[0]),t+=a});var e=r.value;U(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),U(r.value)?r.value[0]=e:r.value=e}function p8(r,t){var e=Zt(t.get("color")),n=Zt(t.get(["aria","decal","decals"]));if(e){r=r||[];var a,i;D(r,function(s){var l=new It(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=e.slice()),!i&&n&&(o.decal=n.slice()),r}}var d8=8,AT=8,Vd=5,g8=(function(){function r(t){this.group=new ot,t.add(this.group)}return r.prototype.render=function(t,e,n,a){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c=Ie(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},v={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=ae(h,c);this._prepare(n,v,u),this._renderContent(t,v,p,s,l,u,f,a),Uv(o,h,c)}},r.prototype._prepare=function(t,e,n){for(var a=t;a;a=a.parentNode){var i=Ae(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+d8*2,e.emptyItemWidth);e.totalWidth+=s+AT,e.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(t,e,n,a,i,o,s,l){for(var u=0,f=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),h=e.totalWidth,v=e.renderList,p=i.getModel("itemStyle").getItemStyle(),d=v.length-1;d>=0;d--){var g=v[d],y=g.node,m=g.width,_=g.text;h>n.width&&(h-=m-f,m=f,_=null);var x=new Je({shape:{points:y8(u,0,m,c,d===v.length-1,d===0)},style:ht(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ot({style:qt(o,{text:_})}),textConfig:{position:"inside"},z2:Js*1e4,onclick:xt(l,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=qt(s,{text:_}),x.ensureState("emphasis").style=p,ne(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),m8(x,t,y),u+=m+AT}},r.prototype.remove=function(){this.group.removeAll()},r})();function y8(r,t,e,n,a,i){var o=[[a?r:r-Vd,t],[r+e,t],[r+e,t+n],[a?r:r-Vd,t+n]];return!i&&o.splice(2,0,[r+e+Vd,t+n/2]),!a&&o.push([r,t+n/2]),o}function m8(r,t,e){dt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&rp(e,t)}}var _8=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,n,a,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},a=0,i=this._storage.length;aDT||Math.abs(e.dy)>DT)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+e.dx,y:a.y+e.dy,width:a.width,height:a.height}})}},t.prototype._onZoom=function(e){var n=e.originX,a=e.originY,i=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new pt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var c=f.zoom=f.zoom||1;if(c*=i,u){var h=u.min||0,v=u.max||1/0;c=Math.max(Math.min(v,c),h)}var p=c/f.zoom;f.zoom=c;var d=this.seriesModel.layoutInfo;n-=d.x,a-=d.y;var g=ze();Wn(g,g,[-n,-a]),I0(g,g,[p,p]),Wn(g,g,[n,a]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var n=this;e.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&kh(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,n,a){var i=this;a||(a=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new g8(this.group))).render(e,n,a.node,function(o){i._state!=="animating"&&(j_(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=zl(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,n){var a,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(e,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},t.type="treemap",t})($t);function zl(){return{nodeGroup:[],background:[],content:[]}}function C8(r,t,e,n,a,i,o,s,l,u){if(!o)return;var f=o.getLayout(),c=r.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var v=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,x=f.upperHeight,b=_&&_.length,S=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),A=S.get("borderRadius")||0,M=st("nodeGroup",Lm);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),Qh(M).nodeWidth=v,Qh(M).nodeHeight=p,f.isAboveViewRoot)return M;var I=st("background",MT,u,b8);I&&k(M,I,b&&f.upperLabelHeight);var L=h.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),R=L.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Ru(M)&&eo(M,!1),I&&(eo(I,!R),c.setItemGraphicEl(o.dataIndex,I),Ry(I,B,E));else{var N=st("content",MT,u,w8);N&&G(M,N),I.disableMorphing=!0,I&&Ru(I)&&eo(I,!1),eo(M,!R),c.setItemGraphicEl(o.dataIndex,M);var z=h.getShallow("cursor");z&&N.attr("cursor",z),Ry(M,B,E)}return M;function k(lt,rt,yt){var tt=dt(rt);if(tt.dataIndex=o.dataIndex,tt.seriesIndex=r.seriesIndex,rt.setShape({x:0,y:0,width:v,height:p,r:A}),g)H(rt);else{rt.invisible=!1;var gt=o.getVisual("style"),Yt=gt.stroke,Pt=kT(S);Pt.fill=Yt;var Vt=Yi(w);Vt.fill=w.get("borderColor");var Ut=Yi(T);Ut.fill=T.get("borderColor");var ue=Yi(C);if(ue.fill=C.get("borderColor"),yt){var tr=v-2*d;O(rt,Yt,gt.opacity,{x:d,y:0,width:tr,height:x})}else rt.removeTextContent();rt.setStyle(Pt),rt.ensureState("emphasis").style=Vt,rt.ensureState("blur").style=Ut,rt.ensureState("select").style=ue,_o(rt)}lt.add(rt)}function G(lt,rt){var yt=dt(rt);yt.dataIndex=o.dataIndex,yt.seriesIndex=r.seriesIndex;var tt=Math.max(v-2*d,0),gt=Math.max(p-2*d,0);if(rt.culling=!0,rt.setShape({x:d,y:d,width:tt,height:gt,r:A}),g)H(rt);else{rt.invisible=!1;var Yt=o.getVisual("style"),Pt=Yt.fill,Vt=kT(S);Vt.fill=Pt,Vt.decal=Yt.decal;var Ut=Yi(w),ue=Yi(T),tr=Yi(C);O(rt,Pt,Yt.opacity,null),rt.setStyle(Vt),rt.ensureState("emphasis").style=Ut,rt.ensureState("blur").style=ue,rt.ensureState("select").style=tr,_o(rt)}lt.add(rt)}function H(lt){!lt.invisible&&i.push(lt)}function O(lt,rt,yt,tt){var gt=h.getModel(tt?IT:LT),Yt=Ae(h.get("name"),null),Pt=gt.getShallow("show");Re(lt,De(h,tt?IT:LT),{defaultText:Pt?Yt:null,inheritColor:rt,defaultOpacity:yt,labelFetcher:r,labelDataIndex:o.dataIndex});var Vt=lt.getTextContent();if(Vt){var Ut=Vt.style,ue=bv(Ut.padding||0);tt&&(lt.setTextConfig({layoutRect:tt}),Vt.disableLabelLayout=!0),Vt.beforeUpdate=function(){var Ge=Math.max((tt?tt.width:lt.shape.width)-ue[1]-ue[3],0),gn=Math.max((tt?tt.height:lt.shape.height)-ue[0]-ue[2],0);(Ut.width!==Ge||Ut.height!==gn)&&Vt.setStyle({width:Ge,height:gn})},Ut.truncateMinChar=2,Ut.lineOverflow="truncate",j(Ut,tt,f);var tr=Vt.getState("emphasis");j(tr?tr.style:null,tt,f)}}function j(lt,rt,yt){var tt=lt?lt.text:null;if(!rt&&yt.isLeafRoot&&tt!=null){var gt=r.get("drillDownIcon",!0);lt.text=gt?gt+" "+tt:tt}}function st(lt,rt,yt,tt){var gt=m!=null&&e[lt][m],Yt=a[lt];return gt?(e[lt][m]=null,_t(Yt,gt)):g||(gt=new rt,gt instanceof jr&&(gt.z2=A8(yt,tt)),zt(Yt,gt)),t[lt][y]=gt}function _t(lt,rt){var yt=lt[y]={};rt instanceof Lm?(yt.oldX=rt.x,yt.oldY=rt.y):yt.oldShape=W({},rt.shape)}function zt(lt,rt){var yt=lt[y]={},tt=o.parentNode,gt=rt instanceof ot;if(tt&&(!n||n.direction==="drillDown")){var Yt=0,Pt=0,Vt=a.background[tt.getRawIndex()];!n&&Vt&&Vt.oldShape&&(Yt=Vt.oldShape.width,Pt=Vt.oldShape.height),gt?(yt.oldX=0,yt.oldY=Pt):yt.oldShape={x:Yt,y:Pt,width:0,height:0}}yt.fadein=!gt}}function A8(r,t){return r*S8+t}var qu=D,M8=vt,tv=-1,Ee=(function(){function r(t){var e=t.mappingMethod,n=t.type,a=this.option=ut(t);this.type=n,this.mappingMethod=e,this._normalizeData=I8[e];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(Fd(a),D8(a)):e==="category"?a.categories?L8(a):Fd(a,!0):(qe(e!=="linear"||a.dataExtent),Fd(a))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return K(this._normalizeData,this)},r.listVisualTypes=function(){return kt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,n){vt(t)?D(t,e,n):e.call(n,t)},r.mapVisual=function(t,e,n){var a,i=U(t)?[]:vt(t)?{}:(a=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},n;return t&&qu(r.visualHandlers,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],n=!0)}),n?e:null},r.prepareVisualTypes=function(t){if(U(t))t=t.slice();else if(M8(t)){var e=[];qu(t,function(n,a){e.push(a)}),t=e}else return[];return t.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,n){for(var a,i=1/0,o=0,s=e.length;o=0;i--)n[i]==null&&(delete e[t[i]],t.pop())}function Fd(r,t){var e=r.visual,n=[];vt(e)?qu(e,function(i){n.push(i)}):e!=null&&n.push(e);var a={color:1,symbol:1};!t&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),HP(r,n)}function _c(r){return{applyVisual:function(t,e,n){var a=this.mapValueToVisual(t);n("color",r(e("color"),a))},_normalizedToVisual:Im([0,1])}}function PT(r){var t=this.option.visual;return t[Math.round(Gt(r,[0,1],[0,t.length-1],!0))]||{}}function Vl(r){return function(t,e,n){n(r,this.mapValueToVisual(t))}}function su(r){var t=this.option.visual;return t[this.option.loop&&r!==tv?r%t.length:r]}function $i(){return this.option.visual[0]}function Im(r){return{linear:function(t){return Gt(t,r,this.option.visual,!0)},category:su,piecewise:function(t,e){var n=km.call(this,e);return n==null&&(n=Gt(t,r,this.option.visual,!0)),n},fixed:$i}}function km(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var n=Ee.findPieceIndex(r,e),a=e[n];if(a&&a.visual)return a.visual[this.type]}}function HP(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=Y(t,function(e){var n=dr(e);return n||[0,0,0,1]})),t}var I8={linear:function(r){return Gt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Ee.findPieceIndex(r,t,!0);if(e!=null)return Gt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??tv},fixed:ve};function xc(r,t,e){return r?t<=e:t=e.length||d===e[d.depth]){var y=N8(a,l,d,g,p,n);UP(d,y,e,n)}})}}}function E8(r,t,e){var n=W({},t),a=e.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){a[i]=t[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function ET(r){var t=Gd(r,"color");if(t){var e=Gd(r,"colorAlpha"),n=Gd(r,"colorSaturation");return n&&(t=Qa(t,null,null,n)),e&&(t=yh(t,e)),t}}function R8(r,t){return t!=null?Qa(t,null,null,r):null}function Gd(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function O8(r,t,e,n,a,i){if(!(!i||!i.length)){var o=Hd(t,"color")||a.color!=null&&a.color!=="none"&&(Hd(t,"colorAlpha")||Hd(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new Ee(c);return WP(h).drColorMappingBy=f,h}}}function Hd(r,t){var e=r.get(t);return U(e)&&e.length?{name:t,range:e}:null}function N8(r,t,e,n,a,i){var o=W({},t);if(a){var s=a.type,l=s==="color"&&WP(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var Ku=Math.max,ev=Math.min,RT=Ue,q_=D,YP=["itemStyle","borderWidth"],B8=["itemStyle","gapWidth"],z8=["upperLabel","show"],V8=["upperLabel","height"];const F8={seriesType:"treemap",reset:function(r,t,e,n){var a=r.option,i=Ie(r,e).refContainer,o=ae(r.getBoxLayoutParams(),i),s=a.size||[],l=Z(RT(o.width,s[0]),i.width),u=Z(RT(o.height,s[1]),i.height),f=n&&n.type,c=["treemapZoomToNode","treemapRootToNode"],h=ju(n,c,r),v=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),d=VP(p);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?$8(r,h,p,l,u):v?[v.width,v.height]:[l,u],y=a.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:a.squareRatio,sort:y,leafDepth:a.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),$P(p,m,!1,0),_=p.getLayout(),q_(d,function(b,S){var w=(d[S+1]||p).getValue();b.setLayout(W({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var x=r.getData().tree.root;x.setLayout(X8(o,v,h),!0),r.setLayoutInfo(o),XP(x,new pt(-o.x,-o.y,e.getWidth(),e.getHeight()),d,p,0)}};function $P(r,t,e,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(YP),u=s.get(B8)/2,f=ZP(s),c=Math.max(l,f),h=l-u,v=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),a=Ku(a-2*h,0),i=Ku(i-h-v,0);var p=a*i,d=G8(r,s,p,t,e,n);if(d.length){var g={x:h,y:v,width:a,height:i},y=ev(a,i),m=1/0,_=[];_.area=0;for(var x=0,b=d.length;x=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Y8(r,t,e){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;in&&(n=o));var l=r.area*r.area,u=t*t*e;return l?Ku(u*n/l,l/(u*a)):1/0}function OT(r,t,e,n,a){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(a||f>e[l[o]])&&(f=e[l[o]]);for(var c=0,h=r.length;cFx&&(u=Fx),i=s}un&&(n=t);var i=n%2?n+2:n+3;a=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(x[1],x[0]);c[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+f[0],i.y=-h[1]*m+f[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,p=x[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=S[0],i.y=S[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+c[0],i.y=c[1]+C,p=x[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},t})(ot),e1=(function(){function r(t){this.group=new ot,this._LineCtor=t||t1}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=t,i||a.removeAll();var o=GT(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=GT(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function n(s){!s.isGroup&&!f7(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0}function GT(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:De(t)}}function HT(r){return isNaN(r[0])||isNaN(r[1])}function Xd(r){return r&&!HT(r[0])&&!HT(r[1])}var Zd=[],jd=[],qd=[],es=Be,Kd=oo,WT=Math.abs;function UT(r,t,e){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=e*e,u=.1,f=.1;f<=.9;f+=.1){Zd[0]=es(n[0],a[0],i[0],f),Zd[1]=es(n[1],a[1],i[1],f);var c=WT(Kd(Zd,t)-l);c=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Jd(r,t){var e=[],n=Du,a=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[ua(u[0]),ua(u[1])],u[2]&&u.__original.push(ua(u[2])));var h=u.__original;if(u[2]!=null){if(rr(a[0],h[0]),rr(a[1],h[2]),rr(a[2],h[1]),f&&f!=="none"){var v=uu(s.node1),p=UT(a,h[0],v*t);n(a[0][0],a[1][0],a[2][0],p,e),a[0][0]=e[3],a[1][0]=e[4],n(a[0][1],a[1][1],a[2][1],p,e),a[0][1]=e[3],a[1][1]=e[4]}if(c&&c!=="none"){var v=uu(s.node2),p=UT(a,h[1],v*t);n(a[0][0],a[1][0],a[2][0],p,e),a[1][0]=e[1],a[2][0]=e[2],n(a[0][1],a[1][1],a[2][1],p,e),a[1][1]=e[1],a[2][1]=e[2]}rr(u[0],a[0]),rr(u[1],a[2]),rr(u[2],a[1])}else{if(rr(i[0],h[0]),rr(i[1],h[1]),Qi(o,i[1],i[0]),js(o,o),f&&f!=="none"){var v=uu(s.node1);ey(i[0],i[0],o,v*t)}if(c&&c!=="none"){var v=uu(s.node2);ey(i[1],i[1],o,-v*t)}rr(u[0],i[0]),rr(u[1],i[1])}})}var eE=Ct();function c7(r){if(r)return eE(r).bridge}function YT(r,t){r&&(eE(r).bridge=t)}function $T(r){return r.type==="view"}var h7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){var a=new _f,i=new e1,o=this.group,s=new ot;this._controller=new Ro(n.getZr()),this._controllerHost={target:s},s.add(a.group),s.add(i.group),o.add(s),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(e,n,a){var i=this,o=e.coordinateSystem,s=!1;this._model=e,this._api=a,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(a);var u=this._symbolDraw,f=this._lineDraw;if($T(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(c):Bt(this._mainGroup,c,e)}Jd(e.getGraph(),lu(e));var h=e.getData();u.updateData(h);var v=e.getEdgeData();f.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,e,a),clearTimeout(this._layoutTimeout);var p=e.forceLayout,d=e.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,a,d));var g=e.get("layout");h.graph.eachNode(function(x){var b=x.dataIndex,S=x.getGraphicEl(),w=x.getModel();if(S){S.off("drag").off("dragend");var T=w.get("draggable");T&&S.on("drag",function(A){switch(g){case"force":p.warmUp(),!i._layouting&&i._startForceLayoutIteration(p,a,d),p.setFixed(b),h.setItemLayout(b,[S.x,S.y]);break;case"circular":h.setItemLayout(b,[S.x,S.y]),x.setLayout({fixed:!0},!0),Q_(e,"symbolSize",x,[A.offsetX,A.offsetY]),i.updateLayout(e);break;case"none":default:h.setItemLayout(b,[S.x,S.y]),J_(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){p&&p.setUnfixed(b)}),S.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(dt(S).focus=x.getAdjacentDataIndices())}}),h.graph.eachEdge(function(x){var b=x.getGraphicEl(),S=x.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(dt(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),_=h.getLayout("cy");h.graph.eachNode(function(x){JP(x,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(e,a,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,n,a){var i=this,o=!1;(function s(){e.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(a?i._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(e,n,a){var i=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!$T(s)){i.disable();return}i.enable(n.get("roam"),{api:a,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!e||e.contain(u,f)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(e,n,a){this._active&&(W_(this._controllerHost,a.dx,a.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,n,a){this._active&&(U_(this._controllerHost,a.zoom,a.originX,a.originY),this._updateNodeAndLinkScale(),Jd(e.getGraph(),lu(e)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,n=e.getData(),a=lu(e);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},t.prototype.updateLayout=function(e){this._active&&(Jd(e.getGraph(),lu(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,n=e.coordinateSystem;if(n.type==="view"){var a=c7(e);if(a)return{bridge:a,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,n,a,i){var o=this._getThumbnailInfo();if(o){var s=new ot,l=a.group.children(),u=i.group.children(),f=new ot,c=new ot;s.add(c),s.add(f);for(var h=0;h=0&&t.call(e,n[i],i)},r.prototype.eachEdge=function(t,e){for(var n=this.edges,a=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(e,n[i],i)},r.prototype.breadthFirstTraverse=function(t,e,n,a){if(e instanceof Xi||(e=this._nodesMap[rs(e)]),!!e){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i=0&&!t.hasKey(p)&&(t.set(p,!0),o.push(v.node1))}for(l=0;l=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),rE=(function(){function r(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=n??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,n=e.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=et(),e=et();t.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i=0&&!t.hasKey(c)&&(t.set(c,!0),n.push(f.node1))}for(i=0;i=0&&!t.hasKey(d)&&(t.set(d,!0),a.push(p.node2))}return{edge:t.keys(),node:e.keys()}},r})();function nE(r,t){return{getValue:function(e){var n=this[r][t];return n.getStore().get(n.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,n){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,n)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,n){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,n)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}we(Xi,nE("hostGraph","data"));we(rE,nE("hostGraph","edgeData"));function r1(r,t,e,n,a){for(var i=new v7(n),o=0;o "+h)),u++)}var v=e.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar"||v==="matrix")p=Aa(r,e);else{var d=vf.get(v),g=d?d.dimensions||[]:[];St(g,"value")<0&&g.concat(["value"]);var y=gf(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;p=new or(y,e),p.initData(r)}var m=new or(["value"],e);return m.initData(l,s),a&&a(p,m),BP({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var p7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new ul(a,a),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),go(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,n){var a=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&a){t7(this);var s=r1(i,a,this,!0,l);return D(s.edges,function(u){e7(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){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 c=It.prototype.getModel;function h(p,d){var g=c.call(this,p,d);return g.resolveParentPath=v,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(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}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(e,a),s=i.graph.getEdgeByIndex(e),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),Se("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=fI({series:this,dataIndex:e,multipleSeries:n});return c},t.prototype._updateCategoriesData=function(){var e=Y(this.option.categories||[],function(a){return a.value!=null?a:W({value:0},a)}),n=new or(["value"],this);n.initData(e),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:V.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},t})(Kt);function d7(r){r.registerChartView(h7),r.registerSeriesModel(p7),r.registerProcessor(j8),r.registerVisual(q8),r.registerVisual(K8),r.registerLayout(r7),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,a7),r.registerLayout(o7),r.registerCoordinateSystem("graphView",{dimensions:Oo.dimensions,create:l7}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ve),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ve),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",query:t},function(a){var i=n.getViewOfSeriesModel(a);i&&(t.dx!=null&&t.dy!=null&&i.updateViewOnPan(a,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&i.updateViewOnZoom(a,n,t));var o=a.coordinateSystem,s=tp(o,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(s.center),a.setZoom&&a.setZoom(s.zoom)})})}var XT=(function(r){F(t,r);function t(e,n,a){var i=r.call(this)||this;dt(i).dataType="node",i.z2=2;var o=new Ot;return i.setTextContent(o),i.updateData(e,n,a,!0),i}return t.prototype.updateData=function(e,n,a,i){var o=this,s=e.graph.getNodeByIndex(n),l=e.hostModel,u=s.getModel(),f=u.getModel("emphasis"),c=e.getItemLayout(n),h=W(Bn(u.getModel("itemStyle"),c,!0),c),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}i?v.setShape(h):Bt(v,{shape:h},l,n);var p=W(Bn(u.getModel("itemStyle"),c,!0),c);o.setShape(p),o.useStyle(e.getItemVisual(n,"style")),Me(o,u),this._updateLabel(l,u,s),e.setItemGraphicEl(n,v),Me(v,u,"itemStyle");var d=f.get("focus");ne(this,d==="adjacency"?s.getAdjacentDataIndices():d,f.get("blurScope"),f.get("disabled"))},t.prototype._updateLabel=function(e,n,a){var i=this.getTextContent(),o=a.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=n.getModel("label");i.ignore=!f.get("show");var c=De(n),h=a.getVisual("style");Re(i,c,{labelFetcher:{getFormattedLabel:function(m,_,x,b,S,w){return e.getFormattedLabel(m,_,"node",b,Dr(S,c.normal&&c.normal.get("formatter"),n.get("name")),w)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=f.get("position")||"outside",p=f.get("distance")||0,d;v==="outside"?d=o.r+p:d=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var g=v!=="outside"?f.get("align")||"center":l>0?"left":"right",y=v!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*d+o.cx,y:u*d+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},t})(Ke),g7=(function(r){F(t,r);function t(e,n,a,i){var o=r.call(this)||this;return dt(o).dataType="edge",o.updateData(e,n,a,i,!0),o}return t.prototype.buildPath=function(e,n){e.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;e.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),e.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),e.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),e.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),e.closePath()},t.prototype.updateData=function(e,n,a,i,o){var s=e.hostModel,l=n.graph.getEdgeByIndex(a),u=l.getLayout(),f=l.node1.getModel(),c=n.getItemModel(l.dataIndex),h=c.getModel("lineStyle"),v=c.getModel("emphasis"),p=v.get("focus"),d=W(Bn(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(d.sStartAngle)||isNaN(d.tStartAngle)){g.setShape(d);return}o?(g.setShape(d),ZT(g,l,e,h)):(qr(g),ZT(g,l,e,h),Bt(g,{shape:d},s,a)),ne(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled")),Me(g,c,"lineStyle"),n.setItemGraphicEl(l.dataIndex,g)},t})(At);function ZT(r,t,e,n){var a=t.node1,i=t.node2,o=r.style;r.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=e.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=e.getItemVisual(a.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(q(l)&&q(u)){var f=r.shape,c=(f.s1[0]+f.s2[0])/2,h=(f.s1[1]+f.s2[1])/2,v=(f.t1[0]+f.t2[0])/2,p=(f.t1[1]+f.t2[1])/2;o.fill=new Qs(c,h,v,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var y7=Math.PI/180,m7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){},t.prototype.render=function(e,n,a){var i=e.getData(),o=this._data,s=this.group,l=-e.get("startAngle")*y7;if(i.diff(o).add(function(f){var c=i.getItemLayout(f);if(c){var h=new XT(i,f,l);dt(h).dataIndex=f,s.add(h)}}).update(function(f,c){var h=o.getItemGraphicEl(c),v=i.getItemLayout(f);if(!v){h&&fa(h,e,c);return}h?h.updateData(i,f,l):h=new XT(i,f,l),s.add(h)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&fa(c,e,f)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Z(u[0],a.getWidth()),this.group.originY=Z(u[1],a.getHeight()),Qt(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,l)},t.prototype.renderEdges=function(e,n){var a=e.getData(),i=e.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new g7(a,i,l,n);dt(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,i,l,n),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&fa(u,e,l)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type="chord",t})($t),_7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new ul(K(this.getData,this),K(this.getRawData,this))},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},t.prototype.getInitialData=function(e,n){var a=e.edges||e.links||[],i=e.data||e.nodes||[];if(i&&a){var o=r1(i,a,this,!0,s);return o.data}function s(l,u){var f=It.prototype.getModel;function c(v,p){var d=f.call(this,v,p);return d.resolveParentPath=h,d}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=c,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,n,a){var i=this.getDataParams(e,a);if(a==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),Se("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return Se("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,n){var a=r.prototype.getDataParams.call(this,e,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(a.name==null&&(a.name=i.getName(e)),a.value==null){var s=o.getLayout().value;a.value=s}}return a},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(Kt),Qd=Math.PI/180;function x7(r,t){r.eachSeriesByType("chord",function(e){S7(e,t)})}function S7(r,t){var e=r.getData(),n=e.graph,a=r.getEdgeData(),i=a.count();if(i){var o=LL(r,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=Math.max((r.get("padAngle")||0)*Qd,0),h=Math.max((r.get("minAngle")||0)*Qd,0),v=-r.get("startAngle")*Qd,p=v+Math.PI*2,d=r.get("clockwise"),g=d?1:-1,y=[v,p];Ev(y,!d);var m=y[0],_=y[1],x=_-m,b=e.getSum("value")===0&&a.getSum("value")===0,S=[],w=0;n.eachEdge(function(N){var z=b?1:N.getValue("value");b&&(z>0||h)&&(w+=2);var k=N.node1.dataIndex,G=N.node2.dataIndex;S[k]=(S[k]||0)+z,S[G]=(S[G]||0)+z});var T=0;if(n.eachNode(function(N){var z=N.getValue("value");isNaN(z)||(S[N.dataIndex]=Math.max(z,S[N.dataIndex]||0)),!b&&(S[N.dataIndex]>0||h)&&w++,T+=S[N.dataIndex]||0}),!(w===0||T===0)){c*w>=Math.abs(x)&&(c=Math.max(0,(Math.abs(x)-h*w)/w)),(c+h)*w>=Math.abs(x)&&(h=(Math.abs(x)-c*w)/w);var C=(x-c*w*g)/T,A=0,M=0,I=0;n.eachNode(function(N){var z=S[N.dataIndex]||0,k=C*(T?z:1)*g;Math.abs(k)M){var P=A/M;n.eachNode(function(N){var z=N.getLayout().angle;Math.abs(z)>=h?N.setLayout({angle:z*P,ratio:P},!0):N.setLayout({angle:h,ratio:h===0?1:z/h},!0)})}else n.eachNode(function(N){if(!L){var z=N.getLayout().angle,k=Math.min(z/I,1),G=k*A;z-Gh&&h>0){var k=L?1:Math.min(z/I,1),G=z-h,H=Math.min(G,Math.min(E,A*k));E-=H,N.setLayout({angle:z-H,ratio:(z-H)/z},!0)}else h>0&&N.setLayout({angle:h,ratio:z===0?1:h/z},!0)}});var R=m,B=[];n.eachNode(function(N){var z=Math.max(N.getLayout().angle,h);N.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:R,endAngle:R+z*g,clockwise:d},!0),B[N.dataIndex]=R,R+=(z+c)*g}),n.eachEdge(function(N){var z=b?1:N.getValue("value"),k=C*(T?z:1)*g,G=N.node1.dataIndex,H=B[G]||0,O=Math.abs((N.node1.getLayout().ratio||1)*k),j=H+O*g,st=[s+f*Math.cos(H),l+f*Math.sin(H)],_t=[s+f*Math.cos(j),l+f*Math.sin(j)],zt=N.node2.dataIndex,lt=B[zt]||0,rt=Math.abs((N.node2.getLayout().ratio||1)*k),yt=lt+rt*g,tt=[s+f*Math.cos(lt),l+f*Math.sin(lt)],gt=[s+f*Math.cos(yt),l+f*Math.sin(yt)];N.setLayout({s1:st,s2:_t,sStartAngle:H,sEndAngle:j,t1:tt,t2:gt,tStartAngle:lt,tEndAngle:yt,cx:s,cy:l,r:f,value:z,clockwise:d}),B[G]=j,B[zt]=yt})}}}function b7(r){r.registerChartView(m7),r.registerSeriesModel(_7),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,x7),r.registerProcessor(sl("chord"))}var w7=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),T7=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new w7},t.prototype.buildPath=function(e,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),f=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(n.x+a(l)*s,n.y+i(l)*s),e.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),e.lineTo(n.x-a(l)*s,n.y-i(l)*s),e.lineTo(u,f)},t})(At);function C7(r,t){var e=r.get("center"),n=t.getWidth(),a=t.getHeight(),i=Math.min(n,a),o=Z(e[0],t.getWidth()),s=Z(e[1],t.getHeight()),l=Z(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function bc(r,t){var e=r==null?"":r+"";return t&&(q(t)?e=t.replace("{value}",e):it(t)&&(e=t(r))),e}var A7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=C7(e,a);this._renderMain(e,n,a,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,n,a,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),h=c.get("roundCap"),v=h?Zh:Ke,p=c.get("show"),d=c.getModel("lineStyle"),g=d.get("width"),y=[u,f];Ev(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,x=[],b=0;p&&b=C&&(A===0?0:i[A-1][0])Math.PI/2&&(j+=Math.PI)):O==="tangential"?j=-T-Math.PI/2:Rt(O)&&(j=O*Math.PI/180),j===0?c.add(new Ot({style:qt(_,{text:z,x:G,y:H,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:k}),silent:!0})):c.add(new Ot({style:qt(_,{text:z,x:G,y:H,verticalAlign:"middle",align:"center"},{inheritColor:k}),silent:!0,originX:G,originY:H,rotation:j}))}if(m.get("show")&&R!==x){var B=m.get("distance");B=B?B+f:f;for(var st=0;st<=b;st++){P=Math.cos(T),E=Math.sin(T);var _t=new me({shape:{x1:P*(p-B)+h,y1:E*(p-B)+v,x2:P*(p-w-B)+h,y2:E*(p-w-B)+v},silent:!0,style:I});I.stroke==="auto"&&_t.setStyle({stroke:i((R+st/b)/x)}),c.add(_t),T+=A}T-=A}else T+=C}},t.prototype._renderPointer=function(e,n,a,i,o,s,l,u,f){var c=this.group,h=this._data,v=this._progressEls,p=[],d=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),x=+e.get("min"),b=+e.get("max"),S=[x,b],w=[s,l];function T(A,M){var I=m.getItemModel(A),L=I.getModel("pointer"),P=Z(L.get("width"),o.r),E=Z(L.get("length"),o.r),R=e.get(["pointer","icon"]),B=L.get("offsetCenter"),N=Z(B[0],o.r),z=Z(B[1],o.r),k=L.get("keepAspect"),G;return R?G=be(R,N-P/2,z-E,P,E,null,k):G=new T7({shape:{angle:-Math.PI/2,width:P,r:E,x:N,y:z}}),G.rotation=-(M+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(A,M){var I=g.get("roundCap"),L=I?Zh:Ke,P=g.get("overlap"),E=P?g.get("width"):f/m.count(),R=P?o.r-E:o.r-(A+1)*E,B=P?o.r:o.r-A*E,N=new L({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:B}});return P&&(N.z2=Gt(m.get(_,A),[x,b],[100,0],!0)),N}(y||d)&&(m.diff(h).add(function(A){var M=m.get(_,A);if(d){var I=T(A,s);Qt(I,{rotation:-((isNaN(+M)?w[0]:Gt(M,S,w,!0))+Math.PI/2)},e),c.add(I),m.setItemGraphicEl(A,I)}if(y){var L=C(A,s),P=g.get("clip");Qt(L,{shape:{endAngle:Gt(M,S,w,P)}},e),c.add(L),Iy(e.seriesIndex,m.dataType,A,L),p[A]=L}}).update(function(A,M){var I=m.get(_,A);if(d){var L=h.getItemGraphicEl(M),P=L?L.rotation:s,E=T(A,P);E.rotation=P,Bt(E,{rotation:-((isNaN(+I)?w[0]:Gt(I,S,w,!0))+Math.PI/2)},e),c.add(E),m.setItemGraphicEl(A,E)}if(y){var R=v[M],B=R?R.shape.endAngle:s,N=C(A,B),z=g.get("clip");Bt(N,{shape:{endAngle:Gt(I,S,w,z)}},e),c.add(N),Iy(e.seriesIndex,m.dataType,A,N),p[A]=N}}).execute(),m.each(function(A){var M=m.getItemModel(A),I=M.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),E=I.get("disabled");if(d){var R=m.getItemGraphicEl(A),B=m.getItemVisual(A,"style"),N=B.fill;if(R instanceof Fe){var z=R.style;R.useStyle(W({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},B))}else R.useStyle(B),R.type!=="pointer"&&R.setColor(N);R.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(Gt(m.get(_,A),S,[0,1],!0))),R.z2EmphasisLift=0,Me(R,M),ne(R,L,P,E)}if(y){var k=p[A];k.useStyle(m.getItemVisual(A,"style")),k.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),k.z2EmphasisLift=0,Me(k,M),ne(k,L,P,E)}}),this._progressEls=p)},t.prototype._renderAnchor=function(e,n){var a=e.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),f=be(s,n.cx-o/2+Z(l[0],n.r),n.cy-o/2+Z(l[1],n.r),o,o,null,u);f.z2=a.get("showAbove")?1:0,f.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,n,a,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),c=+e.get("max"),h=new ot,v=[],p=[],d=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Ot({silent:!0}),p[y]=new Ot({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),x=new ot,b=i(Gt(_,[f,c],[0,1],!0)),S=m.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),T=o.cx+Z(w[0],o.r),C=o.cy+Z(w[1],o.r),A=v[y];A.attr({z2:g?0:2,style:qt(S,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(A)}var M=m.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),L=o.cx+Z(I[0],o.r),P=o.cy+Z(I[1],o.r),E=Z(M.get("width"),o.r),R=Z(M.get("height"),o.r),B=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,A=p[y],N=M.get("formatter");A.attr({z2:g?0:2,style:qt(M,{x:L,y:P,text:bc(_,N),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:B})}),lL(A,{normal:M},_,function(k){return bc(k,N)}),d&&uL(A,y,l,e,{getFormattedLabel:function(k,G,H,O,j,st){return bc(st?st.interpolatedValue:_,N)}}),x.add(A)}h.add(x)}),this.group.add(h),this._titleEls=v,this._detailEls=p},t.type="gauge",t})($t),M7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,n){return ll(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,V.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:V.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:V.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:V.color.axisLabel,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:V.color.neutral00,borderWidth:0,borderColor:V.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:V.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:V.color.transparent,borderWidth:0,borderColor:V.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:V.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Kt);function D7(r){r.registerChartView(A7),r.registerSeriesModel(M7)}var L7=["itemStyle","opacity"],I7=(function(r){F(t,r);function t(e,n){var a=r.call(this)||this,i=a,o=new Ye,s=new Ot;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(e,n,!0),a}return t.prototype.updateData=function(e,n,a){var i=this,o=e.hostModel,s=e.getItemModel(n),l=e.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(L7);f=f??1,a||qr(i),i.useStyle(e.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,Qt(i,{style:{opacity:f}},o,n)):Bt(i,{style:{opacity:f},shape:{points:l.points}},o,n),Me(i,s),this._updateLabel(e,n),ne(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=e.hostModel,l=e.getItemModel(n),u=e.getItemLayout(n),f=u.label,c=e.getItemVisual(n,"style"),h=c.fill;Re(o,De(l),{labelFetcher:e.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:e.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var v=l.getModel("label"),p=v.get("color"),d=p==="inherit"?h:null;a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:d,outsideFill:d});var g=f.linePoints;i.setShape({points:g}),a.textGuideLineConfig={anchor:g?new ct(g[0][0],g[0][1]):null},Bt(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),L_(a,I_(l),{stroke:h})},t})(Je),k7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new I7(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);fa(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})($t),P7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ul(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,n){return ll(this,{coordDimensions:["value"],encodeDefaulter:xt(l_,this)})},t.prototype._defaultLabelLine=function(e){go(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var n=this.getData(),a=r.prototype.getDataParams.call(this,e),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,e)/o*100).toFixed(2):0,a.$vars.push("percent"),a},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:V.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},t})(Kt);function E7(r,t){for(var e=r.mapDimension("value"),n=r.mapArray(e,function(l){return l}),a=[],i=t==="ascending",o=0,s=r.count();oj7)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!eg(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=e.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function eg(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var J7=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var n=this.option;e&&bt(n,e,!0),this._initDimensions()},t.prototype.contains=function(e,n){var a=e.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},t.prototype.setAxisExpand=function(e){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){e.hasOwnProperty(n)&&(this.option[n]=e[n])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[],a=Ht(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(a,function(i){e.push("dim"+i.get("dim")),n.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(Mt),Q7=(function(r){F(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(dn);function li(r,t,e,n,a,i){r=r||0;var o=e[1]-e[0];if(a!=null&&(a=ns(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=ns(s,[0,o]),a=i=ns(s,[a,i]),n=0}t[0]=ns(t[0],e),t[1]=ns(t[1],e);var l=rg(t,n);t[n]+=r;var u=a||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=ns(t[n],f);var c;return c=rg(t,n),a!=null&&(c.sign!==l.sign||c.spani&&(t[1-n]=t[n]+c.sign*i),t}function rg(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ns(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var ng=D,iE=Math.min,oE=Math.max,KT=Math.floor,t9=Math.ceil,JT=ye,e9=Math.PI,r9=(function(){function r(t,e,n){this.type="parallel",this._axesMap=et(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return r.prototype._init=function(t,e,n){var a=t.dimensions,i=t.parallelAxisIndex;ng(a,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new Q7(o,jv(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=n&&o<=n+e.axisLength&&s>=a&&s<=a+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var a=n.getData();ng(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Vs(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var n=Ie(t,e).refContainer;this._rect=ae(t.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,n=["x","y"],a=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[a[o]],l=[0,s],u=this.dimensions.length,f=wc(t.get("axisExpandWidth"),l),c=wc(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,v=t.get("axisExpandWindow"),p;if(v)p=wc(v[1]-v[0],l),v[1]=v[0]+p;else{p=wc(f*(c-1),l);var d=t.get("axisExpandCenter")||KT(u/2);v=[f*d-p/2],v[1]=v[0]+p}var g=(s-p)/(u-c);g<3&&(g=0);var y=[KT(JT(v[0]/f,1))+1,t9(JT(v[1]/f,1))-1],m=g/f*v[0];return{layout:i,pixelDimIndex:o,layoutBase:e[n[o]],layoutLength:s,axisBase:e[n[1-o]],axisLength:e[a[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),ng(n,function(o,s){var l=(a.axisExpandable?a9:n9)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},f={horizontal:e9/2,vertical:0},c=[u[i].x+t.x,u[i].y+t.y],h=f[i],v=ze();ci(v,v,h),Wn(v,v,c),this._axesLayout[o]={position:c,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,n,a){n==null&&(n=0),a==null&&(a=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=n;fi*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?li(l,a,o,"all"):u="none";else{var v=a[1]-a[0],p=o[1]*s/v;a=[oE(0,p-v/2)],a[1]=iE(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r})();function wc(r,t){return iE(oE(r,t[0]),t[1])}function n9(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function a9(r,t){var e=t.layoutLength,n=t.axisExpandWidth,a=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r=0;a--)Xr(n[a])},t.prototype.getActiveState=function(e){var n=this.activeIntervals;if(!n.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=e&&e<=a[1])return"active"}else for(var i=0,o=n.length;iu9}function hE(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function vE(r,t,e,n){var a=new ot;return a.add(new Tt({name:"main",style:s1(e),silent:!0,draggable:!0,cursor:"move",drift:xt(eC,r,t,a,["n","s","w","e"]),ondragend:xt(To,t,{isEnd:!0})})),D(n,function(i){a.add(new Tt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:xt(eC,r,t,a,i),ondragend:xt(To,t,{isEnd:!0})}))}),a}function pE(r,t,e,n){var a=n.brushStyle.lineWidth||0,i=Us(a,f9),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,f=e[0][1],c=e[1][1],h=f-i+a/2,v=c-i+a/2,p=f-o,d=c-s,g=p+a,y=d+a;na(r,t,"main",o,s,p,d),n.transformable&&(na(r,t,"w",l,u,i,y),na(r,t,"e",h,u,i,y),na(r,t,"n",l,u,g,i),na(r,t,"s",l,v,g,i),na(r,t,"nw",l,u,i,i),na(r,t,"ne",h,u,i,i),na(r,t,"sw",l,v,i,i),na(r,t,"se",h,v,i,i))}function Bm(r,t){var e=t.__brushOption,n=e.transformable,a=t.childAt(0);a.useStyle(s1(e)),a.attr({silent:!n,cursor:n?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?zm(r,i[0]):g9(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?h9[s]+"-resize":null})})}function na(r,t,e,n,a,i,o){var s=t.childOfName(e);s&&s.setShape(m9(l1(r,t,[[n,a],[n+i,a+o]])))}function s1(r){return ht({strokeNoScale:!0},r.brushStyle)}function dE(r,t,e,n){var a=[Qu(r,e),Qu(t,n)],i=[Us(r,e),Us(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function d9(r){return co(r.group)}function zm(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Fv(e[t],d9(r));return n[a]}function g9(r,t){var e=[zm(r,t[0]),zm(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function eC(r,t,e,n,a,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=gE(t,a,i);D(n,function(u){var f=c9[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(dE(s[0][0],s[1][0],s[0][1],s[1][1])),a1(t,e),To(t,{isEnd:!1})}function y9(r,t,e,n){var a=t.__brushOption.range,i=gE(r,e,n);D(a,function(o){o[0]+=i[0],o[1]+=i[1]}),a1(r,t),To(r,{isEnd:!1})}function gE(r,t,e){var n=r.group,a=n.transformCoordToLocal(t,e),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function l1(r,t,e){var n=cE(r,t);return n&&n!==wo?n.clipPath(e,r._transform):ut(e)}function m9(r){var t=Qu(r[0][0],r[1][0]),e=Qu(r[0][1],r[1][1]),n=Us(r[0][0],r[1][0]),a=Us(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:a-e}}function _9(r,t,e){if(!(!r._brushType||S9(r,t.offsetX,t.offsetY))){var n=r._zr,a=r._covers,i=o1(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var ap={lineX:aC(0),lineY:aC(1),rect:{createCover:function(r,t){function e(n){return n}return vE({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=hE(r);return dE(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){pE(r,t,e,n)},updateCommon:Bm,contain:Fm},polygon:{createCover:function(r,t){var e=new ot;return e.add(new Ye({name:"main",style:s1(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Je({name:"main",draggable:!0,drift:xt(y9,r,t),ondragend:xt(To,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:l1(r,t,e)})},updateCommon:Bm,contain:Fm}};function aC(r){return{createCover:function(t,e){return vE({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=hE(t),n=Qu(e[0][r],e[1][r]),a=Us(e[0][r],e[1][r]);return[n,a]},updateCoverShape:function(t,e,n,a){var i,o=cE(t,e);if(o!==wo&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),pE(t,e,l,a)},updateCommon:Bm,contain:Fm}}function mE(r){return r=u1(r),function(t){return nL(t,r)}}function _E(r,t){return r=u1(r),function(e){var n=t??e,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function xE(r,t,e){var n=u1(r);return function(a,i){return n.contain(i[0],i[1])&&!CP(a,t,e)}}function u1(r){return pt.create(r)}var b9=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){r.prototype.init.apply(this,arguments),(this._brushController=new n1(n.getZr())).on("brush",K(this._onBrush,this))},t.prototype.render=function(e,n,a,i){if(!w9(e,n,i)){this.axisModel=e,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ot,this.group.add(this._axisGroup),!!e.get("show")){var s=C9(e,n),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,c=e.axis.dim,h=l.getAxisLayout(c),v=W({strokeContainThreshold:f},h),p=new sr(e,a,v);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(v,u,e,s,f,a),ff(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=pt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:mE(c),isTargetByCursor:xE(c,s,i),getLinearBrushOtherExtent:_E(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(T9(a))},t.prototype._onBrush=function(e){var n=e.areas,a=this.axisModel,i=a.axis,o=Y(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(ee);function w9(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function T9(r){var t=r.axis;return Y(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function C9(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var A9={type:"axisAreaSelect",event:"axisAreaSelected"};function M9(r){r.registerAction(A9,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var D9={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function SE(r){r.registerComponentView(q7),r.registerComponentModel(J7),r.registerCoordinateSystem("parallel",o9),r.registerPreprocessor($7),r.registerComponentModel(Om),r.registerComponentView(b9),Hs(r,"parallel",Om,D9),M9(r)}function L9(r){wt(SE),r.registerChartView(z7),r.registerSeriesModel(G7),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Y7)}var I9=(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})(),k9=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new I9},t.prototype.buildPath=function(e,n){var a=n.extent;e.moveTo(n.x1,n.y1),e.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(e.lineTo(n.x2+a,n.y2),e.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(e.lineTo(n.x2,n.y2+a),e.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),e.closePath()},t.prototype.highlight=function(){ya(this)},t.prototype.downplay=function(){ma(this)},t})(At),P9=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new ot,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,n){this._controller=new Ro(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,n,a){var i=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,f=l.height,c=e.getData(),h=e.getData("edge"),v=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,a),AP(e,a,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var d=new k9,g=dt(d);g.dataIndex=p.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),S=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),A=C.get("localX"),M=C.get("localY"),I=p.getLayout(),L,P,E,R,B,N,z,k;d.shape.extent=Math.max(1,I.dy),d.shape.orient=v,v==="vertical"?(L=(S!=null?S*u:x.x)+I.sy,P=(w!=null?w*f:x.y)+x.dy,E=(A!=null?A*u:T.x)+I.ty,R=M!=null?M*f:T.y,B=L,N=P*(1-_)+R*_,z=E,k=P*_+R*(1-_)):(L=(S!=null?S*u:x.x)+x.dx,P=(w!=null?w*f:x.y)+I.sy,E=A!=null?A*u:T.x,R=(M!=null?M*f:T.y)+I.ty,B=L*(1-_)+E*_,N=P,z=L*_+E*(1-_),k=R),d.setShape({x1:L,y1:P,x2:E,y2:R,cpx1:B,cpy1:N,cpx2:z,cpy2:k}),d.useStyle(m.getItemStyle()),iC(d.style,v,p);var G=""+y.get("value"),H=De(y,"edgeLabel");Re(d,H,{labelFetcher:{getFormattedLabel:function(st,_t,zt,lt,rt,yt){return e.getFormattedLabel(st,_t,"edge",lt,Dr(rt,H.normal&&H.normal.get("formatter"),G),yt)}},labelDataIndex:p.dataIndex,defaultText:G}),d.setTextConfig({position:"inside"});var O=y.getModel("emphasis");Me(d,y,"lineStyle",function(st){var _t=st.getItemStyle();return iC(_t,v,p),_t}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var j=O.get("focus");ne(d,j==="adjacency"?p.getAdjacentDataIndices():j==="trajectory"?p.getTrajectoryDataIndices():j,O.get("blurScope"),O.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new Tt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});Re(b,De(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),Me(b,g),s.add(b),c.setItemGraphicEl(p.dataIndex,b),dt(b).dataType="node";var S=_.get("focus");ne(b,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(p,d){var g=c.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(E9(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,n){var a=e.layoutInfo,i=a.width,o=a.height,s=e.coordinateSystem=new Oo(null,{api:n,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t})($t);function iC(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var n=e.node1.getVisual("color"),a=e.node2.getVisual("color");q(n)&&q(a)&&(r.fill=new Qs(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function E9(r,t,e){var n=new Tt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Qt(n,{shape:{width:r.width+20}},t,e),n}var R9=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){var a=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new It(o[l],this,n));var u=r1(i,a,this,!0,f);return u.data;function f(c,h){c.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(v.parentModel=m)}return v}),h.wrapMethod("getItemModel",function(v,p){var d=v.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(v.parentModel=_)}return v})}},t.prototype.setNodePosition=function(e,n){var a=this.option.data||this.option.nodes,i=a[e];i.localX=n[0],i.localY=n[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(e,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Se("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(e),c=f.getLayout().value,h=this.getDataParams(e,a).data.name;return Se("nameValue",{name:h!=null?h+"":null,value:c,noValue:i(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,n){var a=r.prototype.getDataParams.call(this,e,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;a.value=o}return a},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:V.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:V.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Kt);function O9(r,t){r.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),a=e.get("nodeGap"),i=Ie(e,t).refContainer,o=ae(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,c=u.edges;B9(f);var h=Ht(f,function(g){return g.getLayout().value===0}),v=h.length!==0?0:e.get("layoutIterations"),p=e.get("orient"),d=e.get("nodeAlign");N9(f,c,n,a,s,l,v,p,d)})}function N9(r,t,e,n,a,i,o,s,l){z9(r,t,e,a,i,s,l),H9(r,t,i,a,n,o,s),K9(r,s)}function B9(r){D(r,function(t){var e=ni(t.outEdges,rv),n=ni(t.inEdges,rv),a=t.getValue()||0,i=Math.max(e,n,a);t.setLayout({value:i},!0)})}function z9(r,t,e,n,a,i,o){for(var s=[],l=[],u=[],f=[],c=0,h=0;h=0;y&&g.depth>v&&(v=g.depth),d.setLayout({depth:y?g.depth:c},!0),i==="vertical"?d.setLayout({dy:e},!0):d.setLayout({dx:e},!0);for(var m=0;mc-1?v:c-1;o&&o!=="left"&&V9(r,o,i,w);var T=i==="vertical"?(a-e)/w:(n-e)/w;G9(r,T,i)}function bE(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function V9(r,t,e,n){if(t==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,Y9(s,l,o),ag(s,a,e,n,o),q9(s,l,o),ag(s,a,e,n,o)}function W9(r,t){var e=[],n=t==="vertical"?"y":"x",a=Cy(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),D(a.keys,function(i){e.push(a.buckets.get(i))}),e}function U9(r,t,e,n,a,i){var o=1/0;D(r,function(s){var l=s.length,u=0;D(s,function(c){u+=c.getLayout().value});var f=i==="vertical"?(n-(l-1)*a)/u:(e-(l-1)*a)/u;f0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[h]+t;var p=a==="vertical"?n:e;if(u=f-t-p,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var v=c-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[h]+t-f,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function Y9(r,t,e){D(r.slice().reverse(),function(n){D(n,function(a){if(a.outEdges.length){var i=ni(a.outEdges,$9,e)/ni(a.outEdges,rv);if(isNaN(i)){var o=a.outEdges.length;i=o?ni(a.outEdges,X9,e)/o:0}if(e==="vertical"){var s=a.getLayout().x+(i-ui(a,e))*t;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ui(a,e))*t;a.setLayout({y:l},!0)}}})})}function $9(r,t){return ui(r.node2,t)*r.getValue()}function X9(r,t){return ui(r.node2,t)}function Z9(r,t){return ui(r.node1,t)*r.getValue()}function j9(r,t){return ui(r.node1,t)}function ui(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function rv(r){return r.getValue()}function ni(r,t,e){for(var n=0,a=r.length,i=-1;++io&&(o=l)}),D(n,function(s){var l=new Ee({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&D(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Q9(r){r.registerChartView(P9),r.registerSeriesModel(R9),r.registerLayout(O9),r.registerVisual(J9),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){var i=a.coordinateSystem,o=tp(i,t,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}var wE=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],h=u[1-f],v=[a,i],p=v[f].get("type"),d=v[1-f].get("type"),g=t.data;if(g&&l){var y=[];D(g,function(x,b){var S;U(x)?(S=x.slice(),x.unshift(b)):U(x.value)?(S=W({},x),S.value=S.value.slice(),x.value.unshift(b)):S=x,y.push(S)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:Vh(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Vh(d),dimsDef:m.slice()}];return ll(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:xt(BL,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),TE=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:V.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:V.color.shadow}},animationDuration:800},t})(Kt);we(TE,wE,!0);var tY=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),c=oC(f,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(c);return}var h=i.getItemLayout(u);c?(qr(c),CE(h,c,i,u)):c=oC(h,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},t.prototype.remove=function(e){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},t.type="boxplot",t})($t),eY=(function(){function r(){}return r})(),rY=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new eY},t.prototype.buildPath=function(e,n){var a=n.points,i=0;for(e.moveTo(a[i][0],a[i][1]),i++;i<4;i++)e.lineTo(a[i][0],a[i][1]);for(e.closePath();id){var x=[y,_];n.push(x)}}}return{boxData:e,outliers:n}}var uY={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Ve){var n="";Ft(n)}var a=lY(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function fY(r){r.registerSeriesModel(TE),r.registerChartView(tY),r.registerLayout(aY),r.registerTransform(uY)}var cY=["itemStyle","borderColor"],hY=["itemStyle","borderColor0"],vY=["itemStyle","borderColorDoji"],pY=["itemStyle","color"],dY=["itemStyle","color0"];function f1(r,t){return t.get(r>0?pY:dY)}function c1(r,t){return t.get(r===0?vY:r>0?cY:hY)}var gY={seriesType:"candlestick",plan:nl(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=f1(s,o),l.stroke=c1(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");W(u,l)}}}}}},yY=["color","borderColor"],mY=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,a){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){hi(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&sC(u,c))return;var h=ig(c,f,!0);Qt(h,{shape:{points:c.ends}},e,f),og(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}}).update(function(f,c){var h=a.getItemGraphicEl(c);if(!n.hasValue(f)){i.remove(h);return}var v=n.getItemLayout(f);if(s&&sC(u,v)){i.remove(h);return}h?(Bt(h,{shape:{points:v.ends}},e,f),qr(h)):h=ig(v),og(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}).remove(function(f){var c=a.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),lC(e,this.group);var n=e.get("clip",!0)?xf(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=a.getItemLayout(o),l=ig(s);og(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){lC(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})($t),_Y=(function(){function r(){}return r})(),xY=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new _Y},t.prototype.buildPath=function(e,n){var a=n.points;this.__simpleBox?(e.moveTo(a[4][0],a[4][1]),e.lineTo(a[6][0],a[6][1])):(e.moveTo(a[0][0],a[0][1]),e.lineTo(a[1][0],a[1][1]),e.lineTo(a[2][0],a[2][1]),e.lineTo(a[3][0],a[3][1]),e.closePath(),e.moveTo(a[4][0],a[4][1]),e.lineTo(a[5][0],a[5][1]),e.moveTo(a[6][0],a[6][1]),e.lineTo(a[7][0],a[7][1]))},t})(At);function ig(r,t,e){var n=r.ends;return new xY({shape:{points:e?SY(n,r):n},z2:100})}function sC(r,t){for(var e=!0,n=0;nb?M[i]:A[i],ends:P,brushRect:z(S,w,_)})}function B(G,H){var O=[];return O[a]=H,O[i]=G,isNaN(H)||isNaN(G)?[NaN,NaN]:t.dataToPoint(O)}function N(G,H,O){var j=H.slice(),st=H.slice();j[a]=Jc(j[a]+n/2,1,!1),st[a]=Jc(st[a]-n/2,1,!0),O?G.push(j,st):G.push(st,j)}function z(G,H,O){var j=B(G,O),st=B(H,O);return j[a]-=n/2,st[a]-=n/2,{x:j[0],y:j[1],width:n,height:st[1]-j[1]}}function k(G){return G[a]=Jc(G[a],1),G}}function p(d,g){for(var y=On(d.count*4),m=0,_,x=[],b=[],S,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=d.next())!=null;){var C=w.get(s,S),A=w.get(u,S),M=w.get(f,S),I=w.get(c,S),L=w.get(h,S);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=uC(w,S,A,M,f,T),x[a]=C,x[i]=I,_=t.dataToPoint(x,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,x[i]=L,_=t.dataToPoint(x,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function uC(r,t,e,n,a,i){var o;return e>n?o=-1:e0?r.get(a,t-1)<=n?1:-1:1,o}function CY(r,t){var e=r.getBaseAxis(),n,a=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=Z(nt(r.get("barMaxWidth"),a),a),o=Z(nt(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?Z(s,a):Math.max(Math.min(a/2,i),o)}function AY(r){r.registerChartView(mY),r.registerSeriesModel(AE),r.registerPreprocessor(wY),r.registerVisual(gY),r.registerLayout(TY)}function fC(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var MY=(function(r){F(t,r);function t(e,n){var a=r.call(this)||this,i=new mf(e,n),o=new ot;return a.add(i),a.add(o),a.updateData(e,n),a}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var n=e.symbolType,a=e.color,i=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;it(c)?h=c(a):h=c,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,n,a,i,o){if(n>0){e.__t=0;var s=this,l=e.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(e)});i||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return Ha(e.__p1,e.__cp1)+Ha(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,n){e.__p1=n[0],e.__p2=n[1],e.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(e,n,a){this.childAt(0).updateData(e,n,a),this._updateEffectSymbol(e,n)},t.prototype._updateSymbolPosition=function(e){var n=e.__p1,a=e.__p2,i=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Be,f=fy;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var c=e.__t<1?f(n[0],i[0],a[0],o):f(a[0],i[0],n[0],1-o),h=e.__t<1?f(n[1],i[1],a[1],o):f(a[1],i[1],n[1],1-o);e.rotation=-Math.atan2(h,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var f=(n-i[l])/(i[l+1]-i[l]),c=a[l],h=a[l+1];e.x=c[0]*(1-f)+f*h[0],e.y=c[1]*(1-f)+f*h[1];var v=e.__t<1?h[0]-c[0]:c[0]-h[0],p=e.__t<1?h[1]-c[1]:c[1]-h[1];e.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,e.ignore=!1}},t})(ME),PY=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),EY=(function(r){F(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:V.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new PY},t.prototype.buildPath=function(e,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o0){e.moveTo(a[o++],a[o++]);for(var l=1;l0){var v=(u+c)/2-(f-h)*i,p=(f+h)/2-(c-u)*i;e.quadraticCurveTo(v,p,c,h)}else e.lineTo(c,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u0)for(var c=i[u++],h=i[u++],v=1;v0){var g=(c+p)/2-(h-d)*o,y=(h+d)/2-(p-c)*o;if(L2(c,h,g,y,p,d,s,e,n))return l}else if(Fa(c,h,p,d,s,e,n))return l;l++}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),LE={seriesType:"lines",plan:nl(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(e){for(var u=0,f=a.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=e.get("clip",!0)&&xf(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._lineDraw.incrementalUpdate(e,n.getData()),this._finished=e.end===n.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,n,a){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=LE.reset(e,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},t.prototype._updateLineDraw=function(e,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new RY:new e1(o?i?kY:DE:i?ME:t1),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var n=e.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(e,n){this.remove(e,n)},t.type="lines",t})($t),NY=typeof Uint32Array>"u"?Array:Uint32Array,BY=typeof Float64Array>"u"?Array:Float64Array;function cC(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=Y(t,function(e){var n=[e[0].coord,e[1].coord],a={coords:n};return e[0].name&&(a.fromName=e[0].name),e[1].name&&(a.toName=e[1].name),A0([a,e[0],e[1]])}))}var zY=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],cC(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(cC(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var n=this._processFlatCoordsArray(e.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Mu(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Mu(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),e.data=new Float32Array(n.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var n=this.getData().getItemModel(e),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),n=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t})(Kt);function Tc(r){return r instanceof Array||(r=[r,r]),r}var VY={seriesType:"lines",reset:function(r){var t=Tc(r.get("symbol")),e=Tc(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",e&&e[0]),n.setVisual("toSymbolSize",e&&e[1]);function a(i,o){var s=i.getItemModel(o),l=Tc(s.getShallow("symbol",!0)),u=Tc(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:n.hasItemOption?a:null}}};function FY(r){r.registerChartView(OY),r.registerSeriesModel(zY),r.registerLayout(LE),r.registerVisual(VY)}var GY=256,HY=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=un.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),v=t.length;c.width=e,c.height=n;for(var p=0;p0){var I=o(_)?l:u;_>0&&(_=_*A+T),b[S++]=I[M],b[S++]=I[M+1],b[S++]=I[M+2],b[S++]=I[M+3]*_*256}else S+=4}return h.putImageData(x,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=un.createCanvas()),e=this.pointSize+this.blurSize,n=e*2;t.width=n,t.height=n;var a=t.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=V.color.neutral99,a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},r.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,a=n[e]||(n[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r})();function WY(r,t,e){var n=r[1]-r[0];t=Y(t,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=t.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=t[0]&&n<=t[1]}}function hC(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var YY=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,a,0,e.getData().count()):hC(o)&&this._renderOnGeo(o,e,i,a)},t.prototype.incrementalPrepareRender=function(e,n,a){this.group.removeAll()},t.prototype.incrementalRender=function(e,n,a,i){var o=n.coordinateSystem;o&&(hC(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){hi(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,n,a,i,o){var s=e.coordinateSystem,l=si(s,"cartesian2d"),u=si(s,"matrix"),f,c,h,v;if(l){var p=s.getAxis("x"),d=s.getAxis("y");f=p.getBandWidth()+.5,c=d.getBandWidth()+.5,h=p.scale.getExtent(),v=d.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),x=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),S=De(e),w=e.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),A=w.get("disabled"),M=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=a;Ih[1]||Rv[1])continue;var B=s.dataToPoint([E,R]);L=new Tt({shape:{x:B[0]-f/2,y:B[1]-c/2,width:f,height:c},style:P})}else if(u){var N=s.dataToLayout([y.get(M[0],I),y.get(M[1],I)]).rect;if(Ze(N.x))continue;L=new Tt({z2:1,shape:N,style:P})}else{if(isNaN(y.get(M[1],I)))continue;var z=s.dataToLayout([y.get(M[0],I)]),N=z.contentRect||z.rect;if(Ze(N.x)||Ze(N.y))continue;L=new Tt({z2:1,shape:N,style:P})}if(y.hasItemOption){var k=y.getItemModel(I),G=k.getModel("emphasis");m=G.getModel("itemStyle").getItemStyle(),_=k.getModel(["blur","itemStyle"]).getItemStyle(),x=k.getModel(["select","itemStyle"]).getItemStyle(),b=k.get(["itemStyle","borderRadius"]),T=G.get("focus"),C=G.get("blurScope"),A=G.get("disabled"),S=De(k)}L.shape.r=b;var H=e.getRawValue(I),O="-";H&&H[2]!=null&&(O=H[2]+""),Re(L,S,{labelFetcher:e,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:O}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=x,ne(L,T,C,A),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new HY;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=e.getViewRect().clone(),c=e.getRoamTransform();f.applyTransform(c);var h=Math.max(f.x,0),v=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-h,y=d-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var A=e.dataToPoint([w,T]);return A[0]-=h,A[1]-=v,A.push(C),A}),x=a.getExtent(),b=a.type==="visualMap.continuous"?UY(x,a.option.range):WY(x,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new Fe({style:{width:g,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(S)},t.type="heatmap",t})($t),$Y=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Aa(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=vf.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:V.color.primary}}},t})(Kt);function XY(r){r.registerChartView(YY),r.registerSeriesModel($Y)}var ZY=["itemStyle","borderWidth"],vC=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ug=new Ta,jY=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:vC[+f],categoryDim:vC[1-+f]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=dC(o,p),g=pC(o,p,d,h),y=gC(o,h,g);o.setItemGraphicEl(p,y),i.add(y),mC(y,h,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=dC(o,p),m=pC(o,p,y,h),_=OE(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?r$(g,h,m):g=gC(o,h,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),mC(g,h,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&yC(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var v=e.get("clip",!0)?xf(e.coordinateSystem,!1,e):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,n){var a=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){yC(i,dt(o).dataIndex,e,o)}):a.removeAll()},t.type="pictorialBar",t})($t);function pC(r,t,e,n){var a=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};qY(e,i,a,n,h),KY(r,t,a,i,o,h.boundingLength,h.pxSign,f,n,h),JY(e,h.symbolScale,u,n,h);var v=h.symbolSize,p=ko(e.get("symbolOffset"),v);return QY(e,v,a,i,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function qY(r,t,e,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(U(o)){var c=[fg(s,o[0])-l,fg(s,o[1])-l];c[1]=0?1:-1:f>0?1:-1}function fg(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function KY(r,t,e,n,a,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,h=Math.abs(e[c.wh]),v=r.getItemVisual(t,"symbolSize"),p;U(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[c.index]=Z(p[c.index],h),p[f.index]=Z(p[f.index],n?h:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function JY(r,t,e,n,a){var i=r.get(ZY)||0;i&&(ug.attr({scaleX:t[0],scaleY:t[1],rotation:e}),ug.updateTransform(),i/=ug.getLineScale(),i*=t[n.valueDim.index]),a.valueLineWidth=i||0}function QY(r,t,e,n,a,i,o,s,l,u,f,c){var h=f.categoryDim,v=f.valueDim,p=c.pxSign,d=Math.max(t[v.index]+s,0),g=d;if(n){var y=Math.abs(l),m=Ue(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Z(m,t[v.index]),b=Math.max(d+x*2,0),S=_?0:x*2,w=v2(n),T=w?n:_C((y+S)/b),C=y-T*d;x=C/2/(_?T:Math.max(T-1,1)),b=d+x*2,S=_?0:x*2,!w&&n!=="fixed"&&(T=u?_C((Math.abs(u)+S)/b):0),g=T*b-S,c.repeatTimes=T,c.symbolMargin=x}var A=p*(g/2),M=c.pathPosition=[];M[h.index]=e[h.wh]/2,M[v.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var I=c.bundlePosition=[];I[h.index]=e[h.xy],I[v.index]=e[v.xy];var L=c.barRectShape=W({},e);L[v.wh]=p*Math.max(Math.abs(e[v.wh]),Math.abs(M[v.index]+A)),L[h.wh]=e[h.wh];var P=c.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=f.ecSize[h.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function IE(r){var t=r.symbolPatternSize,e=be(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function kE(r,t,e,n){var a=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(h1(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function PE(r,t,e,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Ms(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,n):(i=r.__pictorialMainPath=IE(e),a.add(i),Ms(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,n))}function EE(r,t,e){var n=W({},t.barRectShape),a=r.__pictorialBarRect;a?Ms(a,null,{shape:n},t,e):(a=r.__pictorialBarRect=new Tt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function RE(r,t,e,n){if(e.symbolClip){var a=r.__pictorialClipPath,i=W({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(a)Bt(a,{shape:i},s,l);else{i[o.wh]=0,a=new Tt({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=e.clipShape[o.wh],Do[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function dC(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=t$,e.isAnimationEnabled=e$,e}function t$(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function e$(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function gC(r,t,e,n){var a=new ot,i=new ot;return a.add(i),a.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?kE(a,t,e):PE(a,t,e),EE(a,e,n),RE(a,t,e,n),a.__pictorialShapeStr=OE(r,e),a.__pictorialSymbolMeta=e,a}function r$(r,t,e){var n=e.animationModel,a=e.dataIndex,i=r.__pictorialBundle;Bt(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},n,a),e.symbolRepeat?kE(r,t,e,!0):PE(r,t,e,!0),EE(r,e,!0),RE(r,t,e,!0)}function yC(r,t,e,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];h1(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),D(i,function(o){ii(o,{scaleX:0,scaleY:0},e,t,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(t,null)}function OE(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function h1(r,t,e){D(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&t.call(e,n)})}function Ms(r,t,e,n,a,i){t&&r.attr(t),n.symbolClip&&!a?e&&r.attr(e):e&&Do[a?"updateProps":"initProps"](r,e,n.animationModel,n.dataIndex,i)}function mC(r,t,e){var n=e.dataIndex,a=e.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");h1(r,function(d){if(d instanceof Fe){var g=d.style;d.useStyle(W({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else d.useStyle(e.style);var y=d.ensureState("emphasis");y.style=o,h&&(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=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Re(p,De(a),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:Gs(t.seriesModel.getData(),n),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),ne(r,f,c,i.get("disabled"))}function _C(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var n$=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=vi(Xu.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:V.color.primary}}}),t})(Xu);function a$(r){r.registerChartView(jY),r.registerSeriesModel(n$),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,xt(ek,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rk("pictorialBar"))}var i$=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function h(g){return g.name}var v=new _a(this._layersSeries||[],l,h,h),p=[];v.add(K(d,this,"add")).update(K(d,this,"update")).remove(K(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var x=[],b=[],S,w=l[y].indices,T=0;Ti&&(i=s),n.push(s)}for(var u=0;ui&&(i=c)}return{y0:a,max:i}}function f$(r){r.registerChartView(i$),r.registerSeriesModel(s$),r.registerLayout(l$),r.registerProcessor(sl("themeRiver"))}var c$=2,h$=4,SC=(function(r){F(t,r);function t(e,n,a,i){var o=r.call(this)||this;o.z2=c$,o.textConfig={inside:!0},dt(o).seriesIndex=n.seriesIndex;var s=new Ot({z2:h$,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,n,a,i),o}return t.prototype.updateData=function(e,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;dt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),c=W({},f);c.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=Bs(v,o));var p=Bn(l.getModel("itemStyle"),c,!0);W(c,p),D(ur,function(m){var _=s.ensureState(m),x=l.getModel([m,"itemStyle"]);_.style=x.getItemStyle();var b=Bn(x,c);b&&(_.shape=b)}),e?(s.setShape(c),s.shape.r=f.r0,Qt(s,{shape:{r:f.r}},a,n.dataIndex)):(Bt(s,{shape:c},a),qr(s)),s.useStyle(h),this._updateLabel(a);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?Mu(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;ne(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,h=c.getTextContent(),v=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!ku(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,n,a):(o.virtualPiece=new SC(m,e,n,a),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";kh(u,f)}}a=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Gm,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="sunburst",t})($t),g$=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,n){var a={name:e.name,children:e.data};NE(a);var i=this._levelModels=Y(e.levels||[],function(l){return new It(l,this,n)},this),o=Z_.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),h=i[c.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=rp(a,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){FP(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t})(Kt);function NE(r){var t=0;D(r.children,function(n){NE(n);var a=n.value;U(a)&&(a=a[0]),t+=a});var e=r.value;U(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),U(r.value)?r.value[0]=e:r.value=e}var wC=Math.PI/180;function y$(r,t,e){t.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");U(i)||(i=[0,i]),U(a)||(a=[a,a]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=Z(a[0],o),f=Z(a[1],s),c=Z(i[0],l/2),h=Z(i[1],l/2),v=-n.get("startAngle")*wC,p=n.get("minAngle")*wC,d=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&BE(g,m);var _=0;D(g.children,function(R){!isNaN(R.getValue())&&_++});var x=g.getValue(),b=Math.PI/(x||_)*2,S=g.depth>0,w=g.height-(S?-1:1),T=(h-c)/(w||1),C=n.get("clockwise"),A=n.get("stillShowZeroSum"),M=C?1:-1,I=function(R,B){if(R){var N=B;if(R!==d){var z=R.getValue(),k=x===0&&A?b:z*b;k1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&q(s)&&(s=vy(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");W(u,l)})})}function x$(r){r.registerChartView(d$),r.registerSeriesModel(g$),r.registerLayout(xt(y$,"sunburst")),r.registerProcessor(xt(sl,"sunburst")),r.registerVisual(_$),p$(r)}var TC={color:"fill",borderColor:"stroke"},S$={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ca=Ct(),b$=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,n){return Aa(null,this)},t.prototype.getDataParams=function(e,n,a){var i=r.prototype.getDataParams.call(this,e,n);return a&&(i.info=ca(a).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(Kt);function w$(r,t){return t=t||[0,0],Y(["x","y"],function(e,n){var a=this.getAxis(e),i=t[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function T$(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:K(w$,r)}}}function C$(r,t){return t=t||[0,0],Y([0,1],function(e){var n=t[e],a=r[e]/2,i=[],o=[];return i[e]=n-a,o[e]=n+a,i[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(o)[e])},this)}function A$(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:K(C$,r)}}}function M$(r,t){var e=this.getAxis(),n=t instanceof Array?t[0]:t,a=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(n-a)-e.dataToCoord(n+a))}function D$(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:K(M$,r)}}}function L$(r,t){return t=t||[0,0],Y(["Radius","Angle"],function(e,n){var a="get"+e+"Axis",i=this[a](),o=t[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function I$(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=t.dataToRadius(a[0]),o=e.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:K(L$,r)}}}function k$(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)},layout:function(n,a){return r.dataToLayout(n,a)}}}}function P$(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,n){return r.dataToPoint(e,n)},layout:function(e,n){return r.dataToLayout(e,n)}}}}function zE(r,t,e,n){return r&&(r.legacy||r.legacy!==!1&&!e&&!n&&t!=="tspan"&&(t==="text"||Q(r,"text")))}function VE(r,t,e){var n=r,a,i,o;if(t==="text")o=n;else{o={},Q(n,"text")&&(o.text=n.text),Q(n,"rich")&&(o.rich=n.rich),Q(n,"textFill")&&(o.fill=n.textFill),Q(n,"textStroke")&&(o.stroke=n.textStroke),Q(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Q(n,"fontSize")&&(o.fontSize=n.fontSize),Q(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Q(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=Q(n,"textPosition");e?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Q(n,"textPosition")&&(a.position=n.textPosition),Q(n,"textOffset")&&(a.offset=n.textOffset),Q(n,"textRotation")&&(a.rotation=n.textRotation),Q(n,"textDistance")&&(a.distance=n.textDistance)}return CC(o,r),D(o.rich,function(l){CC(l,l)}),{textConfig:a,textContent:i}}function CC(r,t){t&&(t.font=t.textFont||t.font,Q(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),Q(t,"textAlign")&&(r.align=t.textAlign),Q(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),Q(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),Q(t,"textWidth")&&(r.width=t.textWidth),Q(t,"textHeight")&&(r.height=t.textHeight),Q(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),Q(t,"textPadding")&&(r.padding=t.textPadding),Q(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),Q(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),Q(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),Q(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),Q(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),Q(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),Q(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function AC(r,t,e){var n=r;n.textPosition=n.textPosition||e.position||"inside",e.offset!=null&&(n.textOffset=e.offset),e.rotation!=null&&(n.textRotation=e.rotation),e.distance!=null&&(n.textDistance=e.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||V.color.neutral99;MC(n,t);var o=n.textFill==null;return a?o&&(n.textFill=e.insideFill||V.color.neutral00,!n.textStroke&&e.insideStroke&&(n.textStroke=e.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||e.outsideFill||V.color.neutral00),!n.textStroke&&e.outsideStroke&&(n.textStroke=e.outsideStroke)),n.text=t.text,n.rich=t.rich,D(t.rich,function(s){MC(s,s)}),n}function MC(r,t){t&&(Q(t,"fill")&&(r.textFill=t.fill),Q(t,"stroke")&&(r.textStroke=t.fill),Q(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),Q(t,"font")&&(r.font=t.font),Q(t,"fontStyle")&&(r.fontStyle=t.fontStyle),Q(t,"fontWeight")&&(r.fontWeight=t.fontWeight),Q(t,"fontSize")&&(r.fontSize=t.fontSize),Q(t,"fontFamily")&&(r.fontFamily=t.fontFamily),Q(t,"align")&&(r.textAlign=t.align),Q(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),Q(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),Q(t,"width")&&(r.textWidth=t.width),Q(t,"height")&&(r.textHeight=t.height),Q(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),Q(t,"padding")&&(r.textPadding=t.padding),Q(t,"borderColor")&&(r.textBorderColor=t.borderColor),Q(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),Q(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),Q(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),Q(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),Q(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),Q(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),Q(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),Q(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),Q(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),Q(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var FE={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},DC=kt(FE);Hn(Un,function(r,t){return r[t]=1,r},{});Un.join(", ");var nv=["","style","shape","extra"],Ys=Ct();function v1(r,t,e,n,a){var i=r+"Animation",o=tl(r,n,a)||{},s=Ys(t).userDuring;return o.duration>0&&(o.during=s?K(B$,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),W(o,e[i]),o}function oh(r,t,e,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=e.isAnimationEnabled(),l=Ys(r),u=t.style;l.userDuring=t.during;var f={},c={};if(V$(r,t,c),r.type==="compound")for(var h=r.shape.paths,v=t.shape.paths,p=0;p0&&r.animateFrom(g,y)}else R$(r,t,a||0,e,f);GE(r,t),u?r.dirty():r.markRedraw()}function GE(r,t){for(var e=Ys(r).leaveToProps,n=0;n0&&r.animateFrom(a,i)}}function O$(r,t){Q(t,"silent")&&(r.silent=t.silent),Q(t,"ignore")&&(r.ignore=t.ignore),r instanceof jr&&Q(t,"invisible")&&(r.invisible=t.invisible),r instanceof At&&Q(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var Tn={},N$={setTransform:function(r,t){return Tn.el[r]=t,this},getTransform:function(r){return Tn.el[r]},setShape:function(r,t){var e=Tn.el,n=e.shape||(e.shape={});return n[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=Tn.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=Tn.el,n=e.style;return n&&(n[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=Tn.el.style;if(t)return t[r]},setExtra:function(r,t){var e=Tn.el.extra||(Tn.el.extra={});return e[r]=t,this},getExtra:function(r){var t=Tn.el.extra;if(t)return t[r]}};function B$(){var r=this,t=r.el;if(t){var e=Ys(t).userDuring,n=r.userDuring;if(e!==n){r.el=r.userDuring=null;return}Tn.el=t,n(N$)}}function LC(r,t,e,n){var a=e[r];if(a){var i=t[r],o;if(i){var s=e.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),po(l))W(o,i);else for(var u=Zt(l),f=0;f=0){!o&&(o=n[r]={});for(var v=kt(i),f=0;f=0)){var h=r.getAnimationStyleProps(),v=h?h.style:null;if(v){!i&&(i=n.style={});for(var p=kt(e),u=0;u=0?t.getStore().get(N,R):void 0}var z=t.get(B.name,R),k=B&&B.ordinalMeta;return k?k.categories[z]:z}function w(E,R){R==null&&(R=f);var B=t.getItemVisual(R,"style"),N=B&&B.fill,z=B&&B.opacity,k=_(R,ja).getItemStyle();N!=null&&(k.fill=N),z!=null&&(k.opacity=z);var G={inheritColor:q(N)?N:V.color.neutral99},H=x(R,ja),O=qt(H,null,G,!1,!0);O.text=H.getShallow("show")?nt(r.getFormattedLabel(R,ja),Gs(t,R)):null;var j=Lh(H,G,!1);return A(E,k),k=AC(k,O,j),E&&C(k,E),k.legacy=!0,k}function T(E,R){R==null&&(R=f);var B=_(R,ha).getItemStyle(),N=x(R,ha),z=qt(N,null,null,!0,!0);z.text=N.getShallow("show")?Dr(r.getFormattedLabel(R,ha),r.getFormattedLabel(R,ja),Gs(t,R)):null;var k=Lh(N,null,!0);return A(E,B),B=AC(B,z,k),E&&C(B,E),B.legacy=!0,B}function C(E,R){for(var B in R)Q(R,B)&&(E[B]=R[B])}function A(E,R){E&&(E.textFill&&(R.textFill=E.textFill),E.textPosition&&(R.textPosition=E.textPosition))}function M(E,R){if(R==null&&(R=f),Q(TC,E)){var B=t.getItemVisual(R,"style");return B?B[TC[E]]:null}if(Q(S$,E))return t.getItemVisual(R,E)}function I(E){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return i4(ht({axis:R},E))}}function L(){return e.getCurrentSeriesIndices()}function P(E){return q0(E,e)}}function q$(r){var t={};return D(r.dimensions,function(e){var n=r.getDimensionInfo(e);if(!n.isExtraCoord){var a=n.coordDim,i=t[a]=t[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(e)}}),t}function dg(r,t,e,n,a,i,o){if(!n){i.remove(t);return}var s=m1(r,t,e,n,a,i);return s&&o.setItemGraphicEl(e,s),s&&ne(s,n.focus,n.blurScope,n.emphasisDisabled),s}function m1(r,t,e,n,a,i){var o=-1,s=t;t&&YE(t,n,a)&&(o=St(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=g1(n),s&&$$(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Or.normal.cfg=Or.normal.conOpt=Or.emphasis.cfg=Or.emphasis.conOpt=Or.blur.cfg=Or.blur.conOpt=Or.select.cfg=Or.select.conOpt=null,Or.isLegacy=!1,J$(u,e,n,a,l,Or),K$(u,e,n,a,l),y1(r,u,e,n,Or,a,l),Q(n,"info")&&(ca(u).info=n.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function YE(r,t,e){var n=ca(r),a=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&nX(i)&&$E(i)!==n.customPathData||a==="image"&&Q(o,"image")&&o.image!==n.customImagePath}function K$(r,t,e,n,a){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&YE(o,i,n)&&(o=null),o||(o=g1(i),r.setClipPath(o)),y1(null,o,t,i,null,n,a)}}function J$(r,t,e,n,a,i){if(!(r.isGroup||r.type==="compoundPath")){kC(e,null,i),kC(e,ha,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 f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=g1(o),r.setTextContent(f)),y1(null,f,t,o,null,n,a);for(var c=o&&o.style,h=0;h=f;v--){var p=t.childAt(v);tX(t,p,a)}}}function tX(r,t,e){t&&ip(t,ca(r).option,e)}function eX(r){new _a(r.oldChildren,r.newChildren,PC,PC,r).add(EC).update(EC).remove(rX).execute()}function PC(r,t){var e=r&&r.name;return e??U$+t}function EC(r,t){var e=this.context,n=r!=null?e.newChildren[r]:null,a=t!=null?e.oldChildren[t]:null;m1(e.api,a,e.dataIndex,n,e.seriesModel,e.group)}function rX(r){var t=this.context,e=t.oldChildren[r];e&&ip(e,ca(e).option,t.seriesModel)}function $E(r){return r&&(r.pathData||r.d)}function nX(r){return r&&(Q(r,"pathData")||Q(r,"d"))}function aX(r){r.registerChartView(X$),r.registerSeriesModel(b$)}var Ki=Ct(),RC=ut,gg=K,x1=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,a){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!a&&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,t,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new ot,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var h=xt(OC,e,c);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}BC(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),a=t.axis,i=a.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=G_(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,a,i){},r.prototype.createPointerEl=function(t,e,n,a){var i=e.pointer;if(i){var o=Ki(t).pointerEl=new Do[i.type](RC(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,a){if(e.label){var i=Ki(t).labelEl=new Ot(RC(e.label));t.add(i),NC(i,a)}},r.prototype.updatePointerEl=function(t,e,n){var a=Ki(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),n(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,a){var i=Ki(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),NC(i,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=cf(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){da(u.event)},onmousedown:gg(this._onHandleDragMove,this,0,0),drift:gg(this._onHandleDragMove,this),ondragend:gg(this._onHandleDragEnd,this)}),n.add(a)),BC(a,e,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");U(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,al(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){OC(this._axisPointerModel,!e&&this._moveAnimation,this._handle,yg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(yg(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(yg(a)),Ki(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,a=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Vu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r})();function OC(r,t,e,n){XE(Ki(e).lastProp,n)||(Ki(e).lastProp=n,t?Bt(e,n,r):(e.stopAnimation(),e.attr(n)))}function XE(r,t){if(vt(r)&&vt(t)){var e=!0;return D(t,function(n,a){e=e&&XE(r[a],n)}),!!e}else return r===t}function NC(r,t){r[t.get(["label","show"])?"show":"hide"]()}function yg(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function BC(r,t,e){var n=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=e)})}function S1(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function ZE(r,t,e,n,a){var i=e.get("value"),o=jE(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=hf(s.get("padding")||0),u=s.getFont(),f=Mv(o,u),c=a.position,h=f.width+l[1]+l[3],v=f.height+l[0]+l[2],p=a.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var d=a.verticalAlign;d==="bottom"&&(c[1]-=v),d==="middle"&&(c[1]-=v/2),iX(c,h,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:qt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function iX(r,t,e,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+t,a)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function jE(r,t,e,n,a){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Fh(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),q(o)?i=o.replace("{value}",i):it(o)&&(i=o(s))}return i}function b1(r,t,e){var n=ze();return ci(n,n,e.rotation),Wn(n,n,e.position),sn([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function qE(r,t,e,n,a,i){var o=sr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),ZE(t,n,a,i,{position:b1(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function w1(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function KE(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function zC(r,t,e,n,a,i){return{cx:r,cy:t,r0:e,r:n,startAngle:a,endAngle:i,clockwise:!0}}var oX=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=VC(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=S1(i),v=sX[u](s,c,f);v.style=h,e.graphicKey=v.type,e.pointer=v}var p=qh(l.getRect(),a);qE(n,e,p,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=qh(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=b1(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=VC(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[e.x,e.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var h=(u[1]+u[0])/2,v=[h,h];v[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:v,tooltipOption:p[f]}},t})(x1);function VC(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var sX={line:function(r,t,e){var n=w1([t,e[0]],[t,e[1]],FC(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:KE([t-n/2,e[0]],[n,a],FC(r))}}};function FC(r){return r.dim==="x"?0:1}var lX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:V.color.border,width:1,type:"dashed"},shadowStyle:{color:V.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:V.color.neutral00,padding:[5,7,5,7],backgroundColor:V.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:V.color.accent40,throttle:40}},t})(Mt),la=Ct(),uX=D;function JE(r,t,e){if(!Lt.node){var n=t.getZr();la(n).records||(la(n).records={}),fX(n,t);var a=la(n).records[r]||(la(n).records[r]={});a.handler=e}}function fX(r,t){if(la(r).initialized)return;la(r).initialized=!0,e("click",xt(GC,"click")),e("mousemove",xt(GC,"mousemove")),e("globalout",hX);function e(n,a){r.on(n,function(i){var o=vX(t);uX(la(r).records,function(s){s&&a(s,i,o.dispatchAction)}),cX(o.pendings,t)})}}function cX(r,t){var e=r.showTip.length,n=r.hideTip.length,a;e?a=r.showTip[e-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function hX(r,t,e){r.handler("leave",null,e)}function GC(r,t,e,n){t.handler(r,e,n)}function vX(r){var t={showTip:[],hideTip:[]},e=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function Um(r,t){if(!Lt.node){var e=t.getZr(),n=(la(e).records||{})[r];n&&(la(e).records[r]=null)}}var pX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=n.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";JE("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){Um("axisPointer",n)},t.prototype.dispose=function(e,n){Um("axisPointer",n)},t.type="axisPointer",t})(ee);function QE(r,t){var e=[],n=r.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=yo(i,r);if(o==null||o<0||U(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,h=u.dim,v=c==="x"||c==="radius"?1:0,p=i.mapDimension(h),d=[];d[v]=i.get(p,o),d[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(d)||[]}else e=l.dataToPoint(i.getValues(Y(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var HC=Ct();function dX(r,t,e){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||K(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){sh(a)&&(a=QE({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=sh(a),u=i.axesInfo,f=s.axesInfo,c=n==="leave"||sh(a),h={},v={},p={list:[],map:{}},d={showPointer:xt(yX,v),showTooltip:xt(mX,p)};D(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);D(s.coordSysAxesInfo[m],function(x,b){var S=x.axis,w=bX(u,x);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(a)),T!=null&&WC(x,T,d,!1,h)}})});var g={};return D(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&D(_.axesInfo,function(x,b){var S=v[b];if(x!==y&&S){var w=S.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,UC(x),UC(y)))),g[y.key]=w}})}),D(g,function(y,m){WC(f[m],y,d,!0,h)}),_X(v,f,h),xX(p,a,r,o),SX(f,o,e),h}}function WC(r,t,e,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=gX(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&W(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function gX(r,t){var e=t.axis,n=e.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);h=v.dataIndices,c=v.nestestValue}else{if(h=l.indicesOfNearest(n,f[0],r,e.type==="category"?.5:null),!h.length)return;c=l.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var p=r-c,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,a=c,i.length=0),D(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function yX(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function mX(r,t,e,n){var a=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=Zu(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function _X(r,t,e){var n=e.axesInfo=[];D(t,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function xX(r,t,e,n){if(sh(t)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function SX(r,t,e){var n=e.getZr(),a="axisPointerLastHighlights",i=HC(n)[a]||{},o=HC(n)[a]={};D(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&D(c.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];D(i,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!i[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function bX(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function UC(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function sh(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function wf(r){Eo.registerAxisPointerClass("CartesianAxisPointer",oX),r.registerComponentModel(lX),r.registerComponentView(pX),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!U(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=w6(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},dX)}function wX(r){wt(wP),wt(wf)}var TX=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(n),h=i.get("type");if(h&&h!=="none"){var v=S1(i),p=AX[h](s,l,c,f);p.style=v,e.graphicKey=p.type,e.pointer=p}var d=i.get(["label","margin"]),g=CX(n,a,i,l,d);ZE(e,a,i,o,g)},t})(x1);function CX(r,t,e,n,a){var i=t.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,f,c;if(i.dim==="radius"){var h=ze();ci(h,h,s),Wn(h,h,[n.cx,n.cy]),u=sn([o,-a],h);var v=t.getModel("axisLabel").get("rotate")||0,p=sr.innerTextLayout(s,v*Math.PI/180,-1);f=p.textAlign,c=p.textVerticalAlign}else{var d=l[1];u=n.coordToPoint([d+a,o]);var g=n.cx,y=n.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var AX={line:function(r,t,e,n){return r.dim==="angle"?{type:"Line",shape:w1(t.coordToPoint([n[0],e]),t.coordToPoint([n[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:zC(t.cx,t.cy,n[0],n[1],(-e-a/2)*i,(-e+a/2)*i)}:{type:"Sector",shape:zC(t.cx,t.cy,e-a/2,e+a/2,0,Math.PI*2)}}},MX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var n,a=this.ecModel;return a.eachComponent(e,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t})(Mt),T1=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",le).models[0]},t.type="polarAxis",t})(Mt);we(T1,yf);var DX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t})(T1),LX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t})(T1),C1=(function(r){F(t,r);function t(e,n){return r.call(this,"radius",e,n)||this}return t.prototype.pointToData=function(e,n){return this.polar.pointToData(e,n)[this.dim==="radius"?0:1]},t})(dn);C1.prototype.dataToRadius=dn.prototype.dataToCoord;C1.prototype.radiusToData=dn.prototype.coordToData;var IX=Ct(),A1=(function(r){F(t,r);function t(e,n){return r.call(this,"angle",e,n||[0,360])||this}return t.prototype.pointToData=function(e,n){return this.polar.pointToData(e,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,n=e.getLabelModel(),a=e.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),f=Mv(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(f.height,7),h=c/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),p=IX(e.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-v)<=1&&Math.abs(g-o)<=1&&d>v?v=d:(p.lastTickCount=o,p.lastAutoInterval=v),v},t})(dn);A1.prototype.dataToAngle=dn.prototype.dataToCoord;A1.prototype.angleToData=dn.prototype.coordToData;var tR=["radius","angle"],kX=(function(){function r(t){this.dimensions=tR,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new C1,this._angleAxis=new A1,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===t&&e.push(n),a.scale.type===t&&e.push(a),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],n)},r.prototype.pointToData=function(t,e,n){n=n||[];var a=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(a[0],e),n[1]=this._angleAxis.angleToData(a[1],e),n},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+n*n);e/=l,n/=l;for(var u=Math.atan2(-n,e)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(t,e){e=e||[];var n=t[0],a=t[1]/180*Math.PI;return e[0]=Math.cos(a)*n+this.cx,e[1]=-Math.sin(a)*n+this.cy,e},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),n=e.getExtent().slice();n[0]>n[1]&&n.reverse();var a=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,c=u*u+f*f,h=this.r,v=this.r0;return h!==v&&c-o<=h*h&&c+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},r.prototype.convertToPixel=function(t,e,n){var a=YC(e);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(t,e,n){var a=YC(e);return a===this?this.pointToData(n):null},r})();function YC(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function PX(r,t,e){var n=t.get("center"),a=Ie(t,e).refContainer;r.cx=Z(n[0],a.width)+a.x,r.cy=Z(n[1],a.height)+a.y;var i=r.getRadiusAxis(),o=Math.min(a.width,a.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:U(s)||(s=[0,s]);var l=[Z(s[0],o),Z(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function EX(r,t){var e=this,n=e.getAngleAxis(),a=e.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();D(Gh(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),D(Gh(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Vs(n.scale,n.model),Vs(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function RX(r){return r.mainType==="angleAxis"}function $C(r,t){var e;if(r.type=t.get("type"),r.scale=jv(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),RX(t)){r.inverse=r.inverse!==t.get("clockwise");var n=t.get("startAngle"),a=(e=t.get("endAngle"))!==null&&e!==void 0?e:n+(r.inverse?-360:360);r.setExtent(n,a)}t.axis=r,r.model=t}var OX={dimensions:tR,create:function(r,t){var e=[];return r.eachComponent("polar",function(n,a){var i=new kX(a+"");i.update=EX;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");$C(o,l),$C(s,u),PX(i,n,t),e.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",le).models[0];n.coordinateSystem=a.coordinateSystem}}),e}},NX=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Cc(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var n=r.coordToPoint([t[0],e]),a=r.coordToPoint([t[1],e]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function Ac(r){var t=r.getRadiusAxis();return t.inverse?0:1}function XC(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var BX=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,n){if(this.group.removeAll(),!!e.get("show")){var a=e.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords({breakTicks:"none"}),l=a.getMinorTicksCoords(),u=Y(a.getViewLabels(),function(f){f=ut(f);var c=a.scale,h=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=a.dataToCoord(h),f});XC(u),XC(s),D(NX,function(f){e.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&zX[f](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t})(Eo),zX={axisLine:function(r,t,e,n,a,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Ac(e),c=f?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[c]===0?h=new Do[v]({shape:{cx:e.cx,cy:e.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new lf({shape:{cx:e.cx,cy:e.cy,r:i[f],r0:i[c]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,t,e,n,a,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Ac(e)],u=Y(n,function(f){return new me({shape:Cc(e,[l,l+s],f.coord)})});r.add(Ur(u,{style:ht(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,n,a,i){if(a.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Ac(e)],f=[],c=0;cy?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];vt(b)&&b.textStyle&&(v=new It(b.textStyle,l,l.ecModel))}var S=new Ot({silent:sr.isLabelSilent(t),style:qt(v,{x:g[0],y:g[1],fill:v.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),Ca({el:S,componentModel:t,itemName:c.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:c.rawLabel,tickIndex:h}}),f){var w=sr.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=c.rawLabel,dt(S).eventData=w}},this)},splitLine:function(r,t,e,n,a,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",E=C;b&&(n[f][L]||(n[f][L]={p:C,n:C}),E=n[f][L][P]);var R=void 0,B=void 0,N=void 0,z=void 0;if(p.dim==="radius"){var k=p.dataToCoord(I)-C,G=l.dataToCoord(L);Math.abs(k)=z})}}})}function UX(r){var t={};D(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=rR(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=c.stacks;t[l]=c;var v=eR(n);h[v]||c.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var p=Z(n.get("barWidth"),f),d=Z(n.get("barMaxWidth"),f),g=n.get("barGap"),y=n.get("barCategoryGap");p&&!h[v].width&&(p=Math.min(c.remainedWidth,p),h[v].width=p,c.remainedWidth-=p),d&&(h[v].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var e={};return D(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=Z(n.categoryGap,o),l=Z(n.gap,1),u=n.remainedWidth,f=n.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),D(i,function(d,g){var y=d.maxWidth;y&&y=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t,e,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(t[a.orient==="horizontal"?0:1])),n},r.prototype.dataToPoint=function(t,e,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+t)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(t,e,n){var a=ZC(e);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(t,e,n){var a=ZC(e);return a===this?this.pointToData(n):null},r})();function ZC(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function tZ(r,t){var e=[];return r.eachComponent("singleAxis",function(n,a){var i=new QX(n,r,t);i.name="single_"+a,i.resize(n,t),n.coordinateSystem=i,e.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",le).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),e}var eZ={create:tZ,dimensions:nR},jC=["x","y"],rZ=["width","height"],nZ=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=mg(l,1-ov(s)),f=l.dataToPoint(n)[0],c=i.get("type");if(c&&c!=="none"){var h=S1(i),v=aZ[c](s,f,u);v.style=h,e.graphicKey=v.type,e.pointer=v}var p=Ym(a);qE(n,e,p,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=Ym(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=b1(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.coordinateSystem,l=ov(o),u=mg(s,l),f=[e.x,e.y];f[l]+=n[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=mg(s,1-l),h=(c[1]+c[0])/2,v=[h,h];return v[l]=f[l],{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},t})(x1),aZ={line:function(r,t,e){var n=w1([t,e[0]],[t,e[1]],ov(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=r.getBandWidth(),a=e[1]-e[0];return{type:"Rect",shape:KE([t-n/2,e[0]],[n,a],ov(r))}}};function ov(r){return r.isHorizontal()?0:1}function mg(r,t){var e=r.getRect();return[e[jC[t]],e[jC[t]]+e[rZ[t]]]}var iZ=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t})(ee);function oZ(r){wt(wf),Eo.registerAxisPointerClass("SingleAxisPointer",nZ),r.registerComponentView(iZ),r.registerComponentView(qX),r.registerComponentModel(lh),Hs(r,"single",lh,lh.defaultOption),r.registerCoordinateSystem("single",eZ)}var sZ=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n,a){var i=Lo(e);r.prototype.init.apply(this,arguments),qC(e,i)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),qC(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:V.color.axisLine,width:1,type:"solid"}},itemStyle:{color:V.color.neutral00,borderWidth:1,borderColor:V.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:V.size.s,color:V.color.secondary},monthLabel:{show:!0,position:"start",margin:V.size.s,align:"center",formatter:null,color:V.color.secondary},yearLabel:{show:!0,position:null,margin:V.size.xl,formatter:null,color:V.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t})(Mt);function qC(r,t){var e=r.cellSize,n;U(e)?n=e:n=r.cellSize=[e,e],n.length===1&&(n[1]=n[0]);var a=Y([0,1],function(i){return Y5(t,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});$n(r,t,{type:"box",ignoreSize:a})}var lZ=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group;i.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(e,s,i),this._renderLines(e,s,l,i),this._renderYearText(e,s,l,i),this._renderMonthText(e,u,l,i),this._renderWeekText(e,u,s,l,i)},t.prototype._renderDayRect=function(e,n,a){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,c=new Tt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});a.add(c)}},t.prototype._renderLines=function(e,n,a,i){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,h=0;c.time<=n.end.time;h++){p(c.formatedDate),h===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var v=c.date;v.setMonth(v.getMonth()+1),c=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToCalendarLayout([d],!1).tl);var g=o._getLinePointsOfOneWeek(e,d,a);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,f,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,a),l,i)},t.prototype._getEdgesPoints=function(e,n,a){var i=[e[0].slice(),e[e.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},t.prototype._drawSplitline=function(e,n,a){var i=new Ye({z2:20,shape:{points:e},style:n});a.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,n,a){for(var i=e.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[a==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,n){return q(e)&&e?V5(e,n):it(e)?e(n):n.nameMap},t.prototype._yearTextPositionControl=function(e,n,a,i,o){var s=n[0],l=n[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 f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,n,a,i){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,h=a==="horizontal"?0:1,v={top:[f,u[h][1]],bottom:[f,u[1-h][1]],left:[u[1-h][0],c],right:[u[h][0],c]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var d=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Ot({z2:30,style:qt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,n,a,i,o){var s="left",l="top",u=e[0],f=e[1];return a==="horizontal"?(f=f+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,n,a,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||q(s))&&(s&&(n=Fy(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=o.get("silent"),g=0;g=i.start.time&&a.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;e[0].time>e[1].time&&(n=!0,e.reverse());var a=Math.floor(e[1].time/_g)-Math.floor(e[0].time/_g)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)a-=u,i.setDate(l-u);var f=Math.floor((a+e[0].day+6)/7),c=n?-f+1:f-1;return n&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:a,weeks:f,nthWeek:c,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,n){var a=this._getRangeInfo(n);if(t>a.weeks||t===0&&ea.lweek)return null;var i=(t-1)*7-a.fweek+e,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var n=[];return t.eachComponent("calendar",function(a){var i=new r(a,t,e);n.push(i),a.coordinateSystem=i}),t.eachComponent(function(a,i){pf({targetModel:i,coordSysType:"calendar",coordSysProvider:AL})}),n},r.dimensions=["time","value"],r})();function xg(r){var t=r.calendarModel,e=r.seriesModel,n=t?t.coordinateSystem:e?e.coordinateSystem:null;return n}function fZ(r){r.registerComponentModel(sZ),r.registerComponentView(lZ),r.registerCoordinateSystem("calendar",uZ)}var oa={level:1,leaf:2,nonLeaf:3},va={none:0,all:1,body:2,corner:3};function $m(r,t,e){var n=t[mt[e]].getCell(r);return!n&&Rt(r)&&r<0&&(n=t[mt[1-e]].getUnitLayoutInfo(e,Math.round(r))),n}function aR(r){var t=r||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function iR(r,t,e,n,a){KC(r[0],t,a,e,n,0),KC(r[1],t,a,e,n,1)}function KC(r,t,e,n,a,i){r[0]=1/0,r[1]=-1/0;var o=n[i],s=U(o)?o:[o],l=s.length,u=!!e;if(l>=1?(JC(r,t,s,u,a,i,0),l>1&&JC(r,t,s,u,a,i,l-1)):r[0]=r[1]=NaN,u){var f=-a[mt[1-i]].getLocatorCount(i),c=a[mt[i]].getLocatorCount(i)-1;e===va.body?f=he(0,f):e===va.corner&&(c=Lr(-1,c)),c=t[0]&&r[0]<=t[1]}function eA(r,t){r.id.set(t[0][0],t[1][0]),r.span.set(t[0][1]-r.id.x+1,t[1][1]-r.id.y+1)}function vZ(r,t){r[0][0]=t[0][0],r[0][1]=t[0][1],r[1][0]=t[1][0],r[1][1]=t[1][1]}function rA(r,t,e,n){var a=$m(t[n][0],e,n),i=$m(t[n][1],e,n);r[mt[n]]=r[xe[n]]=NaN,a&&i&&(r[mt[n]]=a.xy,r[xe[n]]=i.xy+i.wh-a.xy)}function Fl(r,t,e,n){return r[mt[t]]=e,r[mt[1-t]]=n,r}function pZ(r){return r&&(r.type===oa.leaf||r.type===oa.nonLeaf)?r:null}function sv(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var nA=(function(){function r(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=e,this._uniqueValueGen=dZ(t);var n=e.get("data",!0);n!=null&&!U(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return r.prototype._initByDimModelData=function(t){var e=this,n=e._cells,a=e._levels,i=[],o=0;e._leavesCount=s(t,0,0),l();return;function s(u,f,c){var h=0;return u&&D(u,function(v,p){var d;q(v)?d={value:v}:vt(v)?(d=v,v.value!=null&&!q(v.value)&&(d={value:null})):d={value:null};var g={type:oa.nonLeaf,ordinal:NaN,level:c,firstLeafLocator:f,id:new ct,span:Fl(new ct,e.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:e,rect:sv()};o++,(i[f]||(i[f]=[])).push(g),a[c]||(a[c]={type:oa.level,xy:NaN,wh:NaN,option:null,id:new ct,dim:e});var y=s(d.children,f,c+1),m=Math.max(1,y);g.span[mt[e.dimIdx]]=m,h+=m,f+=m}),h}function l(){for(var u=[];n.length=1,_=e[mt[n]],x=i.getLocatorCount(n)-1,b=new ti;for(o.resetLayoutIterator(b,n);b.next();)S(b.item);for(i.resetLayoutIterator(b,n);b.next();)S(b.item);function S(w){Ze(w.wh)&&(w.wh=y),w.xy=_,w.id[mt[n]]===x&&!m&&(w.wh=e[mt[n]]+e[xe[n]]-w.xy),_+=w.wh}}function fA(r,t){for(var e=t[mt[r]].resetCellIterator();e.next();){var n=e.item;lv(n.rect,r,n.id,n.span,t),lv(n.rect,1-r,n.id,n.span,t),n.type===oa.nonLeaf&&(n.xy=n.rect[mt[r]],n.wh=n.rect[xe[r]])}}function cA(r,t){r.travelExistingCells(function(e){var n=e.span;if(n){var a=e.spanRect,i=e.id;lv(a,0,i,n,t),lv(a,1,i,n,t)}})}function lv(r,t,e,n,a){r[xe[t]]=0;var i=e[mt[t]],o=i<0?a[mt[1-t]]:a[mt[t]],s=o.getUnitLayoutInfo(t,e[mt[t]]);if(r[mt[t]]=s.xy,r[xe[t]]=s.wh,n[mt[t]]>1){var l=o.getUnitLayoutInfo(t,e[mt[t]]+n[mt[t]]-1);r[xe[t]]=l.xy+l.wh-s.xy}}function DZ(r,t,e){var n=wh(r,e[xe[t]]);return Zm(n,e[xe[t]])}function Zm(r,t){return Math.max(Math.min(r,nt(t,1/0)),0)}function wg(r){var t=r.matrixModel,e=r.seriesModel,n=t?t.coordinateSystem:e?e.coordinateSystem:null;return n}var We={inBody:1,inCorner:2,outside:3},bn={x:null,y:null,point:[]};function hA(r,t,e,n,a){var i=e[mt[t]],o=e[mt[1-t]],s=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),l=i.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),f=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,c=r.point[t]=n[t];if(!l&&!f){r[mt[t]]=We.outside;return}if(a===va.body){l?(r[mt[t]]=We.inBody,c=Lr(s.xy+s.wh,he(l.xy,c)),r.point[t]=c):r[mt[t]]=We.outside;return}else if(a===va.corner){f?(r[mt[t]]=We.inCorner,c=Lr(f.xy+f.wh,he(u.xy,c)),r.point[t]=c):r[mt[t]]=We.outside;return}var h=l?l.xy:f?f.xy+f.wh:NaN,v=u?u.xy:h,p=s?s.xy+s.wh:h;if(cp){if(!a){r[mt[t]]=We.outside;return}c=p}r.point[t]=c,r[mt[t]]=h<=c&&c<=p?We.inBody:v<=c&&c<=h?We.inCorner:We.outside}function vA(r,t,e,n){var a=1-e;if(r[mt[e]]!==We.outside)for(n[mt[e]].resetCellIterator(bg);bg.next();){var i=bg.item;if(dA(r.point[e],i.rect,e)&&dA(r.point[a],i.rect,a)){t[e]=i.ordinal,t[a]=i.id[mt[a]];return}}}function pA(r,t,e,n){if(r[mt[e]]!==We.outside){var a=r[mt[e]]===We.inCorner?n[mt[1-e]]:n[mt[e]];for(a.resetLayoutIterator(kc,e);kc.next();)if(LZ(r.point[e],kc.item)){t[e]=kc.item.id[mt[e]];return}}}function LZ(r,t){return t.xy<=r&&r<=t.xy+t.wh}function dA(r,t,e){return t[mt[e]]<=r&&r<=t[mt[e]]+t[xe[e]]}function IZ(r){r.registerComponentModel(_Z),r.registerComponentView(TZ),r.registerCoordinateSystem("matrix",MZ)}function kZ(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function gA(r,t){var e;return D(t,function(n){r[n]!=null&&r[n]!=="auto"&&(e=!0)}),e}function PZ(r,t,e){var n=W({},e),a=r[t],i=e.$action||"merge";i==="merge"?a?(bt(a,n,!0),$n(a,n,{ignoreSize:!0}),kL(e,a),Pc(e,a),Pc(e,a,"shape"),Pc(e,a,"style"),Pc(e,a,"extra"),e.clipPath=a.clipPath):r[t]=n:i==="replace"?r[t]=n:i==="remove"&&a&&(r[t]=null)}var sR=["transition","enterFrom","leaveTo"],EZ=sR.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Pc(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var n=e?sR:EZ,a=0;a=0;f--){var c=a[f],h=Ae(c.id,null),v=h!=null?o.get(h):null;if(v){var p=v.parent,y=Fr(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},x=Uv(v,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!Fr(v).isNew&&x){for(var b=c.transition,S={},w=0;w=0)?S[T]=C:v[T]=C}Bt(v,S,e,0)}else v.attr(_)}}},t.prototype._clear=function(){var e=this,n=this._elMap;n.each(function(a){uh(a,Fr(a).option,n,e._lastGraphicModel)}),this._elMap=et()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t})(ee);function jm(r){var t=Q(yA,r)?yA[r]:Dh(r),e=new t({});return Fr(e).type=r,e}function mA(r,t,e,n){var a=jm(e);return t.add(a),n.set(r,a),Fr(a).id=r,Fr(a).isNew=!0,a}function uh(r,t,e,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){uh(i,t,e,n)}),ip(r,t,n),e.removeKey(Fr(r).id))}function _A(r,t,e,n){r.isGroup||D([["cursor",jr.prototype.cursor],["zlevel",n||0],["z",e||0],["z2",0]],function(a){var i=a[0];Q(t,i)?r[i]=nt(t[i],a[1]):r[i]==null&&(r[i]=a[1])}),D(kt(t),function(a){if(a.indexOf("on")===0){var i=t[a];r[a]=it(i)?i:null}}),Q(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function BZ(r){return r=W({},r),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(ML),function(t){delete r[t]}),r}function zZ(r,t,e){var n=dt(r).eventData;!r.silent&&!r.ignore&&!n&&(n=dt(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),n&&(n.info=e.info)}function VZ(r){r.registerComponentModel(OZ),r.registerComponentView(NZ),r.registerPreprocessor(function(t){var e=t.graphic;U(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var xA=["x","y","radius","angle","single"],FZ=["cartesian2d","polar","singleAxis"];function GZ(r){var t=r.get("coordinateSystem");return St(FZ,t)>=0}function qa(r){return r+"Axis"}function HZ(r,t){var e=et(),n=[],a=et();r.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(h,v){var p=e.get(h);p&&p[v]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,h){(e.get(c)||e.set(c,[]))[h]=!0})}return n}function lR(r){var t=r.ecModel,e={infoList:[],infoMap:et()};return r.eachTargetAxis(function(n,a){var i=t.getComponent(qa(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var Tg=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),tf=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,a){var i=SA(e);this.settledOption=i,this.mergeDefaultAndTheme(e,a),this._doInit(i)},t.prototype.mergeOption=function(e){var n=SA(e);bt(this.option,e,!0),bt(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=et(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return D(xA,function(a){var i=this.getReferringComponents(qa(a),xz);if(i.specified){n=!0;var o=new Tg;D(i.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var h=new Tg;if(h.add(c.componentIndex),e.set(f,h),i=!1,f==="x"||f==="y"){var v=c.getReferringComponents("grid",le).models[0];v&&D(u,function(p){c.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",le).models[0]&&h.add(p.componentIndex)})}}}i&&D(xA,function(u){if(i){var f=a.findComponents({mainType:qa(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var c=new Tg;c.add(f[0].componentIndex),e.set(u,c),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,a=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,a){e==null&&(e=this.ecModel.getComponent(qa(n),a))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(a,i){D(a.indexList,function(o){e.call(n,i,o)})})},t.prototype.getAxisProxy=function(e,n){var a=this.getAxisModel(e,n);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[n])return this.ecModel.getComponent(qa(e),n)},t.prototype.setRawRange=function(e){var n=this.option,a=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(n[i[0]]=a[i[0]]=e[i[0]],n[i[1]]=a[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;D(["start","startValue","end","endValue"],function(a){n[a]=e[a]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!x&&!b)return!0;_&&(g=!0),x&&(p=!0),b&&(d=!0)}return g&&p&&d})}else ps(f,function(v){if(i==="empty")l.setData(u=u.map(v,function(d){return s(d)?d:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});ps(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ps(["min","max"],function(a){var i=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Gt(n[0]+o,n,[0,100],!0):i!=null&&(o=Gt(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var a=f2(n,[0,500]);a=Math.min(a,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),e[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function $Z(r,t,e){var n=[1/0,-1/0];ps(e,function(o){T4(n,o.getData(),t)});var a=r.getAxisModel(),i=sk(a.axis.scale,a,n).calculate();return[i.min,i.max]}var XZ={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(qa(o),s);a(o,s,l,i)})})}t(function(a,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new YZ(a,i,s,r),e.push(o.__dzAxisProxy))});var n=et();return D(e,function(a){D(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).reset(e)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function ZZ(r){r.registerAction("dataZoom",function(t,e){var n=HZ(e,t);D(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var wA=!1;function I1(r){wA||(wA=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,XZ),ZZ(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function jZ(r){r.registerComponentModel(WZ),r.registerComponentView(UZ),I1(r)}var Hr=(function(){function r(){}return r})(),uR={};function ds(r,t){uR[r]=t}function fR(r){return uR[r]}var qZ=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;D(this.option.feature,function(n,a){var i=fR(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),bt(n,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:V.size.m,itemSize:15,itemGap:V.size.s,showTitle:!0,iconStyle:{borderColor:V.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:V.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(Mt);function cR(r,t){var e=hf(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var a=new Tt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var KZ=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),c=[];D(u,function(m,_){c.push(_)}),new _a(this._featureNames||[],c).add(h).update(h).remove(xt(h,null)).execute(),this._featureNames=c;function h(m,_){var x=c[m],b=c[_],S=u[x],w=new It(S,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===x&&(S.title=i.newTitle),x&&!b){if(JZ(x))T={onclick:w.option.onclick,featureName:x};else{var C=fR(x);if(!C)return;T=new C}f[x]=T}else if(T=f[b],!T)return;T.uid=rl("toolbox-feature"),T.model=w,T.ecModel=n,T.api=a;var A=T instanceof Hr;if(!x&&b){A&&T.dispose&&T.dispose(n,a);return}if(!w.get("show")||A&&T.unusable){A&&T.remove&&T.remove(n,a);return}v(w,T,x),w.setIconStatus=function(M,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[M]=I,P[M]&&(I==="emphasis"?ya:ma)(P[M])},T instanceof Hr&&T.render&&T.render(w,n,a,i)}function v(m,_,x){var b=m.getModel("iconStyle"),S=m.getModel(["emphasis","iconStyle"]),w=_ instanceof Hr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,A;q(w)?(C={},C[x]=w):C=w,q(T)?(A={},A[x]=T):A=T;var M=m.iconPaths={};D(C,function(I,L){var P=cf(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var E=P.ensureState("emphasis");E.style=S.getItemStyle();var R=new Ot({style:{text:A[L],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:q0({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},n)},ignore:!0});P.setTextContent(R),Ca({el:P,componentModel:e,itemName:L,formatterParamsExtra:{title:A[L]}}),P.__title=A[L],P.on("mouseover",function(){var B=S.getItemStyle(),N=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";R.setStyle({fill:S.get("textFill")||B.fill||B.stroke||V.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),P.setTextConfig({position:S.get("textPosition")||N}),R.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&a.leaveEmphasis(this),R.hide()}),(m.get(["iconStatus",L])==="emphasis"?ya:ma)(P),o.add(P),P.on("click",K(_.onclick,_,n,a,L)),M[L]=P})}var p=Ie(e,a).refContainer,d=e.getBoxLayoutParams(),g=e.get("padding"),y=ae(d,p,g);ho(e.get("orient"),o,e.get("itemGap"),y.width,y.height),Uv(o,d,p,g),o.add(cR(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,x=m.ensureState("emphasis"),b=x.textConfig||(x.textConfig={}),S=m.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!it(w)&&_){var T=w.style||(w.style={}),C=Mv(_,Ot.makeFont(T)),A=m.x+o.x,M=m.y+o.y+s,I=!1;M+C.height>a.getHeight()&&(b.position="top",I=!0);var L=I?-5-C.height:s+10;A+C.width/2>a.getWidth()?(b.position=["100%",L],T.align="right"):A-C.width/2<0&&(b.position=[0,L],T.align="left")}})},t.prototype.updateView=function(e,n,a,i){D(this._features,function(o){o instanceof Hr&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.remove=function(e,n){D(this._features,function(a){a instanceof Hr&&a.remove&&a.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){D(this._features,function(a){a instanceof Hr&&a.dispose&&a.dispose(e,n)})},t.type="toolbox",t})(ee);function JZ(r){return r.indexOf("my")===0}var QZ=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var a=this.model,i=a.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||V.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=Lt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];v&&(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 _=document.createElement("iframe");document.body.appendChild(_);var x=_.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(_)}}else{var S=a.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},t.getDefaultOption=function(e){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:V.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t})(Hr),TA="__ec_magicType_stack__",tj=[["line","bar"],["stack"]],ej=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),a={};return D(e.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},t.getDefaultOption=function(e){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(CA[a]){var s={series:[]},l=function(c){var h=c.subType,v=c.id,p=CA[a](h,v,c,i);p&&(ht(p,c.option),s.series.push(p));var d=c.coordinateSystem;if(d&&d.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=c.getReferringComponents(m,le).models[0],x=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=x;b++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=a==="bar"}}};D(tj,function(c){St(c,a)>=0&&D(c,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=bt({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t})(Hr),CA={line:function(r,t,e,n){if(r==="bar")return bt({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return bt({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var a=e.get("stack")===TA;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),bt({id:t,stack:a?"":TA},n.get(["option","stack"])||{},!0)}};qn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var op=new Array(60).join("-"),$s=" ";function rj(r){var t={},e=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function nj(r){var t=[];return D(r,function(e,n){var a=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(Y(e.series,function(v){return v.name})),l=[a.model.getCategories()];D(e.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join($s)],f=0;f=0)return!0}var qm=new RegExp("["+$s+"]+","g");function sj(r){for(var t=r.split(/\n+/g),e=uv(t.shift()).split(qm),n=[],a=Y(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function vj(r){var t=k1(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return hR(e,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function pj(r){vR(r).snapshots=null}function dj(r){return k1(r).length}function k1(r){var t=vR(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var gj=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){pj(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t})(Hr);qn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var yj=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],P1=(function(){function r(t,e,n){var a=this;this._targetInfoList=[];var i=AA(e,t);D(mj,function(o,s){(!n||!n.include||St(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=Cg[n.brushType](0,i,a);n.__rangeOffset={offset:IA[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){D(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&D(i.coordSyses,function(o){var s=Cg[a.brushType](1,o,a.range,!0);n(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){D(t,function(n){var a=this.findTargetInfo(n,e);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=Cg[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?IA[n.brushType](i.values,o.offset,_j(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return Y(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:mE(a),isTargetByCursor:xE(a,t,n.coordSysModel),getLinearBrushOtherExtent:_E(a)}})},r.prototype.controlSeries=function(t,e,n){var a=this.findTargetInfo(t,n);return a===!0||a&&St(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,a=AA(e,t),i=0;ir[1]&&r.reverse(),r}function AA(r,t){return Ts(r,t,{includeMainTypes:yj})}var mj={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=et(),o={},s={};!e&&!n&&!a||(D(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),D(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),D(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];D(u.getCartesians(),function(c,h){(St(e,c.getAxis("x").model)>=0||St(n,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:DA.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){D(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:DA.geo})})}},MA=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],DA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(co(r)),t}},Cg={lineX:xt(LA,0),lineY:xt(LA,1),rect:function(r,t,e,n){var a=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),i=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[Km([a[0],i[0]]),Km([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=Y(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function LA(r,t,e,n){var a=e.getAxis(["x","y"][r]),i=Km(Y([0,1],function(s){return t?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var IA={lineX:xt(kA,0),lineY:xt(kA,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return Y(r,function(n,a){return[n[0]-e[0]*t[a][0],n[1]-e[1]*t[a][1]]})}};function kA(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function _j(r,t){var e=PA(r),n=PA(t),a=[e[0]/n[0],e[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function PA(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Jm=D,xj=dz("toolbox-dataZoom_"),Sj=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){this._brushController||(this._brushController=new n1(a.getZr()),this._brushController.on("brush",K(this._onBrush,this)).mount()),Tj(e,n,this,i,a),wj(e,n)},t.prototype.onclick=function(e,n,a){bj[a].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new P1(E1(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,f,c){if(c.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[h],c,f)}}),hj(i,a),this._dispatchZoomAction(a);function s(u,f,c){var h=f.getAxis(u),v=h.model,p=l(u,v,i),d=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(c=li(0,c.slice(),h.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(a[p.id]={dataZoomId:p.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var h;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,f.componentIndex);p&&(h=v)}),h}},t.prototype._dispatchZoomAction=function(e){var n=[];Jm(e,function(a,i){n.push(ut(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:V.color.backgroundTint}};return n},t})(Hr),bj={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(vj(this.ecModel))}};function E1(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function wj(r,t){r.setIconStatus("back",dj(t)>1?"emphasis":"normal")}function Tj(r,t,e,n,a){var i=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new P1(E1(r),t,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}J5("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),a=[],i=E1(n),o=Ts(r,i);Jm(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Jm(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:xj+u+c};h[f]=c,a.push(h)}return a});function Cj(r){r.registerComponentModel(qZ),r.registerComponentView(KZ),ds("saveAsImage",QZ),ds("magicType",ej),ds("dataView",fj),ds("dataZoom",Sj),ds("restore",gj),wt(jZ)}var Aj=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:V.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:V.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:V.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:V.color.tertiary,fontSize:14}},t})(Mt);function pR(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function dR(r){if(Lt.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e-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 f=u*Math.PI/180,c=o+a,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-c)/2)*100)/100;s+=";"+i+":-"+v+"px";var p=t+" solid "+a+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Ej(r,t,e){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return e&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),t||(a=" "+r+"s "+n,i+=(i.length?",":"")+(Lt.transformSupported?""+R1+a:",left"+a+",top"+a)),Lj+":"+i}function EA(r,t,e){var n=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!Lt.transformSupported)return e?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=Lt.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return e?"top:0;left:0;"+R1+":"+o+";":[["top",0],["left",0],[gR,o]]}function Rj(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var a=nt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),D(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function Oj(r,t,e,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),c=r.getModel("textStyle"),h=uI(r,"html"),v=u+"px "+f+"px "+s+"px "+l;return a.push("box-shadow:"+v),t&&i>0&&a.push(Ej(i,e,n)),o&&a.push("background-color:"+o),D(["width","color","radius"],function(p){var d="border-"+p,g=bL(d),y=r.get(g);y!=null&&a.push(d+":"+y+(p==="color"?"":"px"))}),a.push(Rj(c)),h!=null&&a.push("padding:"+hf(h).join("px ")+"px"),a.join(";")+";"}function RA(r,t,e,n,a){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&zN(r,o,e,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var Nj=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Lt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),i=e.appendTo,o=i&&(q(i)?document.querySelector(i):ks(i)?i:it(i)&&i(t.getDom()));RA(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;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=a.handler,f=a.painter.getViewportRoot();Br(f,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(t){if(!this._container){var e=this._api.getDom(),n=Dj(e,"position"),a=e.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=Ij+Oj(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+EA(i[0],i[1],!0)+("border-color:"+bo(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(q(i)&&n.get("trigger")==="item"&&!pR(n)&&(s=Pj(n,a,i)),q(t))o.innerHTML=t+s;else if(t){o.innerHTML="",U(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,a=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(e,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,a,i){if(!(i.from===this.uid||Lt.node||!a.getDom())){var o=BA(i,a);this._ticket="";var s=i.dataByCoordSys,l=Wj(i,n,a);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 f=zj;f.x=i.x,f.y=i.y,f.update(),dt(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},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(e,n,a,i))return;var c=QE(i,n),h=c.point[0],v=c.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,a,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(BA(i,a))},t.prototype._manuallyAxisShowTip=function(e,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=Hl([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,n){var a=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(a){var s=dt(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;no(a,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(dt(f).dataIndex!=null?l=f:dt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var a=e.get("showDelay");n=K(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(e,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Hl([n.tooltipOption],i),l=this._renderMode,u=[],f=Se("section",{blocks:[],noHeader:!0}),c=[],h=new od;D(e,function(m){D(m.dataByAxis,function(_){var x=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!x||b==null)){var S=jE(b,x.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=Se("section",{header:S,noHeader:!$r(S),sortBlocks:!0,blocks:[]});f.blocks.push(w),D(_.seriesDataIndices,function(T){var C=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,M=C.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Fh(x.axis,{value:b}),M.axisValueLabel=S,M.marker=h.makeTooltipMarker("item",bo(M.color),l);var I=JS(C.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=Hl([C],i).get("valueFormatter");w.blocks.push(P?W({valueFormatter:P},L):L)}I.text&&c.push(I.text),u.push(M)}})}})}),f.blocks.reverse(),c.reverse();var v=n.position,p=s.get("order"),d=ab(f,h,l,p,a.get("useUTC"),s.get("textStyle"));d&&c.unshift(d);var g=l==="richText"?` `:"
",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,n,a){var i=this._ecModel,o=dt(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,p=e.positionDefault,d=Hl([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,c),m=new od;y.marker=m.makeTooltipMarker("item",bo(y.color),v);var _=JS(u.formatTooltip(f,!1,c)),x=d.get("order"),b=d.get("valueFormatter"),S=_.frag,w=S?ab(b?W({valueFormatter:b},S):S,m,v,x,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,a){var i=this._renderMode==="html",o=dt(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(q(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=ut(l),l.content=ir(l.content));var c=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:l.content});var v=e.positionDefault,p=Hl(c,this._tooltipModel,v?{position:v}:null),d=p.get("content"),g=Math.random()+"",y=new od;this._showOrMove(p,function(){var m=ut(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,e.offsetX,e.offsetY,e.position,n,y)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,a,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=n,p=this._getNearestPoint([o,s],a,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),d=p.color;if(h)if(q(h)){var g=e.ecModel.get("useUTC"),y=U(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,m&&(v=Wv(y.axisValue,v,g)),v=wL(v,a,!0)}else if(it(h)){var _=K(function(x,b){x===this._ticket&&(c.setContent(b,f,e,d,l),this._updatePosition(e,l,o,s,c,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;c.setContent(v,f,e,d,l),c.show(e,d),this._updatePosition(e,l,o,s,c,a,u)}},t.prototype._getNearestPoint=function(e,n,a,i,o){if(a==="axis"||U(n))return{color:i||o};if(!U(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,a,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var c=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),it(n)&&(n=n([a,i],s,o.el,p,{viewSize:[u,f],contentSize:c.slice()})),U(n))a=Z(n[0],u),i=Z(n[1],f);else if(vt(n)){var d=n;d.width=c[0],d.height=c[1];var g=ae(d,{width:u,height:f});a=g.x,i=g.y,h=null,v=null}else if(q(n)&&l){var y=Hj(n,p,c,e.get("borderWidth"));a=y[0],i=y[1]}else{var y=Fj(a,i,o,u,f,h?null:20,v?null:20);a=y[0],i=y[1]}if(h&&(a-=zA(h)?c[0]/2:h==="right"?c[0]:0),v&&(i-=zA(v)?c[1]/2:v==="bottom"?c[1]:0),pR(e)){var y=Gj(a,i,o,u,f);a=y[0],i=y[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===e.length;return o&&D(a,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&D(u,function(h,v){var p=c[v]||{},d=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&d.length===g.length,o&&D(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&D(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],x=i[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){Lt.node||!n.getDom()||(Vu(this,"_updatePosition"),this._tooltipContent.dispose(),Um("itemTooltip",n))},t.type="tooltip",t})(ee);function Hl(r,t,e){var n=t.ecModel,a;e?(a=new It(e,n,n),a=new It(t.option,a,n)):a=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof It&&(o=o.get("tooltip",!0)),q(o)&&(o={formatter:o}),o&&(a=new It(o,a,n)))}return a}function BA(r,t){return r.dispatchAction||K(t.dispatchAction,t)}function Fj(r,t,e,n,a,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function Gj(r,t,e,n,a){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function Hj(r,t,e,n){var a=e[0],i=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-a/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+f+o;break;case"left":s=t.x-a-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function zA(r){return r==="center"||r==="middle"}function Wj(r,t,e){var n=N0(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Ks(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=dt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function Uj(r){wt(wf),r.registerComponentModel(Aj),r.registerComponentView(Vj),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ve),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ve)}var Yj=["rect","polygon","keep","clear"];function $j(r,t){var e=Zt(r?r.brush:[]);if(e.length){var n=[];D(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;U(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Xj(s),t&&!s.length&&s.push.apply(s,Yj)}}function Xj(r){var t={};D(r,function(e){t[e]=1}),r.length=0,D(t,function(e,n){r.push(n)})}var VA=D;function FA(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function Qm(r,t,e){var n={};return VA(t,function(i){var o=n[i]=a();VA(r[i],function(s,l){if(Ee.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new Ee(u),l==="opacity"&&(u=ut(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ee(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function mR(r,t,e){var n;D(e,function(a){t.hasOwnProperty(a)&&FA(t[a])&&(n=!0)}),n&&D(e,function(a){t.hasOwnProperty(a)&&FA(t[a])?r[a]=ut(t[a]):delete r[a]})}function Zj(r,t,e,n,a,i){var o={};D(r,function(c){var h=Ee.prepareVisualTypes(t[c]);o[c]=h});var s;function l(c){return y_(e,s,c)}function u(c,h){_I(e,s,c,h)}e.each(f);function f(c,h){s=c;var v=e.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(a,c),d=t[p],g=o[p],y=0,m=g.length;yt[0][1]&&(t[0][1]=i[0]),i[1]t[1][1]&&(t[1][1]=i[1])}return t&&YA(t)}};function YA(r){return new pt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var rq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){this.ecModel=e,this.api=n,this.model,(this._brushController=new n1(n.getZr())).on("brush",K(this._onBrush,this)).mount()},t.prototype.render=function(e,n,a,i){this.model=e,this._updateController(e,n,a,i)},t.prototype.updateTransform=function(e,n,a,i){_R(n),this._updateController(e,n,a,i)},t.prototype.updateVisual=function(e,n,a,i){this.updateTransform(e,n,a,i)},t.prototype.updateView=function(e,n,a,i){this._updateController(e,n,a,i)},t.prototype._updateController=function(e,n,a,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(a)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ut(a),$from:n}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ut(a),$from:n})},t.type="brush",t})(ee),nq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,n){var a=this.option;!n&&mR(a,e,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=Y(e,function(n){return $A(this.option,n)},this))},t.prototype.setBrushOption=function(e){this.brushOption=$A(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:V.color.backgroundTint,borderColor:V.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:V.color.disabled},t})(Mt);function $A(r,t){return bt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new It(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var aq=["rect","polygon","lineX","lineY","keep","clear"],iq=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,D(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,n,a){this.render(e,n,a)},t.prototype.getIcons=function(){var e=this.model,n=e.get("icon",!0),a={};return D(e.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},t.prototype.onclick=function(e,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var n={show:!0,type:aq.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return n},t})(Hr);function oq(r){r.registerComponentView(rq),r.registerComponentModel(nq),r.registerPreprocessor($j),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Kj),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ve),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ve),ds("brush",iq)}var sq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:V.size.m,backgroundColor:V.color.transparent,borderColor:V.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:V.color.primary},subtextStyle:{fontSize:12,color:V.color.quaternary}},t})(Mt),lq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=nt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Ot({style:qt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=e.get("subtext"),v=new Ot({style:qt(s,{text:h,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),d=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!p&&!g,v.silent=!d&&!g,p&&f.on("click",function(){kh(p,"_"+e.get("target"))}),d&&v.on("click",function(){kh(d,"_"+e.get("subtarget"))}),dt(f).eventData=dt(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(v);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ie(e,a),x=ae(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),i.x=x.x,i.y=x.y,i.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),v.setStyle(b),y=i.getBoundingRect();var S=x.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new Tt({shape:{x:y.x-S[3],y:y.y-S[0],width:y.width+S[1]+S[3],height:y.height+S[0]+S[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t})(ee);function uq(r){r.registerComponentModel(sq),r.registerComponentView(lq)}var XA=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var n=this._data.count();this.option.loop?e=(e%n+n)%n:(e>=n&&(e=n-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,n=e.data||[],a=e.axisType,i=this._names=[],o;a==="category"?(o=[],D(n,function(u,f){var c=Ae(qs(u),""),h;vt(u)?(h=ut(u),h.value=f):h=f,o.push(h),i.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new or([{name:"value",type:s}],this);l.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:V.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:V.color.secondary},data:[]},t})(Mt),xR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=vi(XA.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:V.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:V.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:V.color.tertiary},itemStyle:{color:V.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:V.color.accent50,borderColor:V.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:V.color.accent50,borderColor:V.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:V.color.accent60},itemStyle:{color:V.color.accent60,borderColor:V.color.accent60},controlStyle:{color:V.color.accent70,borderColor:V.color.accent70}},progress:{lineStyle:{color:V.color.accent30},itemStyle:{color:V.color.accent40}},data:[]}),t})(XA);we(xR,$v.prototype);var fq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t})(ee),cq=(function(r){F(t,r);function t(e,n,a,i){var o=r.call(this,e,n,a)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(dn),Mg=Math.PI,ZA=Ct(),hq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){this.api=n},t.prototype.render=function(e,n,a){if(this.model=e,this.api=a,this.ecModel=n,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return Se("nameValue",{noName:!0,value:f})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,n){var a=e.get(["label","position"]),i=e.get("orient"),o=pq(e,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Mg/2},c=i==="vertical"?o.height:o.width,h=e.getModel("controlStyle"),v=h.get("show",!0),p=v?h.get("itemSize"):0,d=v?h.get("itemGap"):0,g=p+d,y=e.get(["label","rotate"])||0;y=y*Mg/180;var m,_,x,b=h.get("position",!0),S=v&&h.get("showPlayBtn",!0),w=v&&h.get("showPrevBtn",!0),T=v&&h.get("showNextBtn",!0),C=0,A=c;b==="left"||b==="bottom"?(S&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(x=[A-p,0],A-=g)):(S&&(m=[A-p,0],A-=g),w&&(_=[0,0],C+=g),T&&(x=[A-p,0],A-=g));var M=[C,A];return e.get("inverse")&&M.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:M,controlSize:p,controlGap:d}},t.prototype._position=function(e,n){var a=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=ze(),l=o.x,u=o.y+o.height;Wn(s,s,[-l,-u]),ci(s,s,-Mg/2),Wn(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),c=m(a.getBoundingRect()),h=m(i.getBoundingRect()),v=[a.x,a.y],p=[i.x,i.y];p[0]=v[0]=f[0][0];var d=e.labelPosOpt;if(d==null||q(d)){var g=d==="+"?0:1;_(v,c,f,1,g),_(p,h,f,1,1-g)}else{var g=d>=0?0:1;_(v,c,f,1,g),p[1]=v[1]+d}a.setPosition(v),i.setPosition(p),a.rotation=i.rotation=e.rotation,y(a),y(i);function y(x){x.originX=f[0][0]-x.x,x.originY=f[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,b,S,w,T){x[w]+=S[w][T]-b[w][T]}},t.prototype._createAxis=function(e,n){var a=n.getData(),i=n.get("axisType"),o=vq(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new cq("value",o,e.axisExtent,i);return l.model=n,l},t.prototype._createGroup=function(e){var n=this[e]=new ot;return this.group.add(n),n},t.prototype._renderAxisLine=function(e,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new me({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:W({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new me({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:ht({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(e,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],D(l,function(u){var f=a.dataToCoord(u.value),c=s.getItemModel(u.value),h=c.getModel("itemStyle"),v=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:K(o._changeTimeline,o,u.value)},g=jA(c,h,n,d);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),fo(g);var y=dt(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],D(u,function(f){var c=f.tickValue,h=l.getItemModel(c),v=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=a.dataToCoord(f.tickValue),y=new Ot({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:K(o._changeTimeline,o,c),silent:!1,style:qt(v,{text:f.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=qt(p),y.ensureState("progress").style=qt(d),n.add(y),fo(y),ZA(y).dataIndex=c,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,n,a,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),c=i.get("inverse",!0);h(e.nextBtnPosition,"next",K(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"prev",K(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,f?"stop":"play",K(this._handlePlayClick,this,!f),!0);function h(v,p,d,g){if(v){var y=cn(nt(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=dq(i,p+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,n.add(_),fo(_)}}},t.prototype._renderCurrentPointer=function(e,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=K(u._handlePointerDrag,u),c.ondragend=K(u._handlePointerDragend,u),qA(c,u._progressLine,s,a,i,!0)},onUpdate:function(c){qA(c,u._progressLine,s,a,i)}};this._currentPointer=jA(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,n){var a=this._toAxisCoord(e)[0],i=this._axis,o=Xr(i.getExtent().slice());a>o[1]&&(a=o[1]),a=0&&(s[o]=+s[o].toFixed(p)),[s,v]}var Nc={min:xt(Oc,"min"),max:xt(Oc,"max"),average:xt(Oc,"average"),median:xt(Oc,"median")};function ef(r,t){if(t){var e=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!Sq(t)&&!U(t.coord)&&U(a)){var i=SR(t,e,n,r);if(t=ut(t),t.type&&Nc[t.type]&&i.baseAxis&&i.valueAxis){var o=St(a,i.baseAxis.dim),s=St(a,i.valueAxis.dim),l=Nc[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!U(a)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&Nc[t.type]){var f=n.getOtherAxis(u);f&&(t.value=fv(e,e.mapDimension(f.dim),t.type))}}else for(var c=t.coord,h=0;h<2;h++)Nc[c[h]]&&(c[h]=fv(e,e.mapDimension(a[h]),c[h]));return t}}function SR(r,t,e,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,a.valueAxis=e.getAxis(bq(n,a.valueDataDim)),a.baseAxis=e.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=e.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function bq(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function rf(r,t){return r&&r.containData&&t.coord&&!e0(t)?r.containData(t.coord):!0}function wq(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!e0(t)&&!e0(e)?r.containZone(t.coord,e.coord):!0}function bR(r,t){return r?function(e,n,a,i){var o=i<2?e.coord&&e.coord[i]:e.value;return ri(o,t[i])}:function(e,n,a,i){return ri(e.value,t[i])}}function fv(r,t,e){if(e==="average"){var n=0,a=0;return r.each(t,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Dg=Ct(),N1=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=et()},t.prototype.render=function(e,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){Dg(s).keep=!1}),n.eachSeries(function(s){var l=Zn.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!Dg(s).keep&&i.group.remove(s.group)}),Tq(n,o,this.type)},t.prototype.markKeep=function(e){Dg(e).keep=!0},t.prototype.toggleBlurSeries=function(e,n){var a=this;D(e,function(i){var o=Zn.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?z2(l):U0(l))})}})},t.type="marker",t})(ee);function Tq(r,t,e){r.eachSeries(function(n){var a=Zn.getMarkerModelFromSeries(n,e),i=t.get(n.id);if(a&&i&&i.group){var o=So(a),s=o.z,l=o.zlevel;Gv(i.group,s,l)}})}function JA(r,t,e){var n=t.coordinateSystem,a=e.getWidth(),i=e.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:a,c=u?o?o.height:0:i,h=u&&o?o.x:0,v=u&&o?o.y:0,p,d=Z(l.get("x"),f)+h,g=Z(l.get("y"),c)+v;if(!isNaN(d)&&!isNaN(g))p=[d,g];else if(t.getMarkerPosition)p=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var y=r.get(n.dimensions[0],s),m=r.get(n.dimensions[1],s);p=n.dataToPoint([y,m])}isNaN(d)||(p[0]=d),isNaN(g)||(p[1]=g),r.setItemLayout(s,p)})}var Cq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,n,a){n.eachSeries(function(i){var o=Zn.getMarkerModelFromSeries(i,"markPoint");o&&(JA(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,n,a,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new _f),c=Aq(o,e,n);n.setData(c),JA(n.getData(),e,i),c.each(function(h){var v=c.getItemModel(h),p=v.getShallow("symbol"),d=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(it(p)||it(d)||it(g)||it(y)){var _=n.getRawValue(h),x=n.getDataParams(h);it(p)&&(p=p(_,x)),it(d)&&(d=d(_,x)),it(g)&&(g=g(_,x)),it(y)&&(y=y(_,x))}var b=v.getModel("itemStyle").getItemStyle(),S=v.get("z2"),w=df(l,"color");b.fill||(b.fill=w),c.setItemVisual(h,{z2:nt(S,0),symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(h){h.traverse(function(v){dt(v).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||e.get("silent")},t.type="markPoint",t})(N1);function Aq(r,t,e){var n;r?n=Y(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new or(n,e),i=Y(e.get("data"),xt(ef,t));r&&(i=Ht(i,xt(rf,r)));var o=bR(!!r,n);return a.initData(i,null,o),a}function Mq(r){r.registerComponentModel(xq),r.registerComponentView(Cq),r.registerPreprocessor(function(t){O1(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Dq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,n,a){return new t(e,n,a)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t})(Zn),Bc=Ct(),Lq=function(r,t,e,n){var a=r.getData(),i;if(U(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Ue(n.yAxis,n.xAxis);else{var u=SR(n,a,t,r);s=u.valueAxis;var f=jI(a,u.valueDataDim);l=fv(a,f,o)}var c=s.dim==="x"?0:1,h=1-c,v=ut(n),p={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,p.coord[h]=1/0;var d=e.get("precision");d>=0&&Rt(l)&&(l=+l.toFixed(Math.min(d,20))),v.coord[c]=p.coord[c]=l,i=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var g=[ef(r,i[0]),ef(r,i[1]),W({},i[2])];return g[2].type=g[2].type||null,bt(g[2],g[0]),bt(g[2],g[1]),g};function cv(r){return!isNaN(r)&&!isFinite(r)}function QA(r,t,e,n){var a=1-r,i=n.dimensions[r];return cv(t[a])&&cv(e[a])&&t[r]===e[r]&&n.getAxis(i).containData(t[r])}function Iq(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,n=t[1].coord;if(e&&n&&(QA(1,e,n,r)||QA(0,e,n,r)))return!0}return rf(r,t[0])&&rf(r,t[1])}function Lg(r,t,e,n,a){var i=n.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get("x"),a.getWidth()),u=Z(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=i.dimensions,c=r.get(f[0],t),h=r.get(f[1],t);s=i.dataToPoint([c,h])}if(si(i,"cartesian2d")){var v=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;cv(r.get(f[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):cv(r.get(f[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var kq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,n,a){n.eachSeries(function(i){var o=Zn.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Bc(o).from,u=Bc(o).to;l.each(function(f){Lg(l,f,!0,i,a),Lg(u,f,!1,i,a)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,n,a,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new e1);this.group.add(f.group);var c=Pq(o,e,n),h=c.from,v=c.to,p=c.line;Bc(n).from=h,Bc(n).to=v,n.setData(p);var d=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");U(d)||(d=[d,d]),U(g)||(g=[g,g]),U(y)||(y=[y,y]),U(m)||(m=[m,m]),c.from.each(function(x){_(h,x,!0),_(v,x,!1)}),p.each(function(x){var b=p.getItemModel(x),S=b.getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),v.getItemLayout(x)]);var w=b.get("z2");S.stroke==null&&(S.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{z2:nt(w,0),fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:v.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(x,"symbolOffset"),toSymbolRotate:v.getItemVisual(x,"symbolRotate"),toSymbolSize:v.getItemVisual(x,"symbolSize"),toSymbol:v.getItemVisual(x,"symbol"),style:S})}),f.updateData(p),c.line.eachItemGraphicEl(function(x){dt(x).dataModel=n,x.traverse(function(b){dt(b).dataModel=n})});function _(x,b,S){var w=x.getItemModel(b);Lg(x,b,S,e,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=df(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:nt(w.get("symbolOffset",!0),m[S?0:1]),symbolRotate:nt(w.get("symbolRotate",!0),y[S?0:1]),symbolSize:nt(w.get("symbolSize"),g[S?0:1]),symbol:nt(w.get("symbol",!0),d[S?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||e.get("silent")},t.type="markLine",t})(N1);function Pq(r,t,e){var n;r?n=Y(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return W(W({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new or(n,e),i=new or(n,e),o=new or([],e),s=Y(e.get("data"),xt(Lq,t,r,e));r&&(s=Ht(s,xt(Iq,r)));var l=bR(!!r,n);return a.initData(Y(s,function(u){return u[0]}),null,l),i.initData(Y(s,function(u){return u[1]}),null,l),o.initData(Y(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function Eq(r){r.registerComponentModel(Dq),r.registerComponentView(kq),r.registerPreprocessor(function(t){O1(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var Rq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,n,a){return new t(e,n,a)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t})(Zn),zc=Ct(),Oq=function(r,t,e,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=ef(r,a),s=ef(r,i),l=o.coord,u=s.coord;l[0]=Ue(l[0],-1/0),l[1]=Ue(l[1],-1/0),u[0]=Ue(u[0],1/0),u[1]=Ue(u[1],1/0);var f=A0([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function hv(r){return!isNaN(r)&&!isFinite(r)}function tM(r,t,e,n){var a=1-r;return hv(t[a])&&hv(e[a])}function Nq(r,t){var e=t.coord[0],n=t.coord[1],a={coord:e,x:t.x0,y:t.y0},i={coord:n,x:t.x1,y:t.y1};return si(r,"cartesian2d")?e&&n&&(tM(1,e,n)||tM(0,e,n))?!0:wq(r,a,i):rf(r,a)||rf(r,i)}function eM(r,t,e,n,a){var i=n.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get(e[0]),a.getWidth()),u=Z(o.get(e[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var f=r.getValues(["x0","y0"],t),c=r.getValues(["x1","y1"],t),h=i.clampData(f),v=i.clampData(c),p=[];e[0]==="x0"?p[0]=h[0]>v[0]?c[0]:f[0]:p[0]=h[0]>v[0]?f[0]:c[0],e[1]==="y0"?p[1]=h[1]>v[1]?c[1]:f[1]:p[1]=h[1]>v[1]?f[1]:c[1],s=n.getMarkerPosition(p,e,!0)}else{var d=r.get(e[0],t),g=r.get(e[1],t),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(si(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(e[0],t),g=r.get(e[1],t);hv(d)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):hv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var rM=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Bq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,n,a){n.eachSeries(function(i){var o=Zn.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Y(rM,function(c){return eM(s,l,c,i,a)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,n,a,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new ot});this.group.add(f.group),this.markKeep(f);var c=zq(o,e,n);n.setData(c),c.each(function(h){var v=Y(rM,function(A){return eM(c,h,A,e,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(c.get("x0",h)),p.parse(c.get("x1",h))],_=[d.parse(c.get("y0",h)),d.parse(c.get("y1",h))];Xr(m),Xr(_);var x=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!x;c.setItemLayout(h,{points:v,allClipped:b});var S=c.getItemModel(h),w=S.getModel("itemStyle").getItemStyle(),T=S.get("z2"),C=df(l,"color");w.fill||(w.fill=C,q(w.fill)&&(w.fill=yh(w.fill,.4))),w.stroke||(w.stroke=C),c.setItemVisual(h,"style",w),c.setItemVisual(h,"z2",nt(T,0))}),c.diff(zc(f).data).add(function(h){var v=c.getItemLayout(h),p=c.getItemVisual(h,"z2");if(!v.allClipped){var d=new Je({z2:nt(p,0),shape:{points:v.points}});c.setItemGraphicEl(h,d),f.group.add(d)}}).update(function(h,v){var p=zc(f).data.getItemGraphicEl(v),d=c.getItemLayout(h),g=c.getItemVisual(h,"z2");d.allClipped?p&&f.group.remove(p):(p?Bt(p,{z2:nt(g,0),shape:{points:d.points}},n,h):p=new Je({shape:{points:d.points}}),c.setItemGraphicEl(h,p),f.group.add(p))}).remove(function(h){var v=zc(f).data.getItemGraphicEl(h);f.group.remove(v)}).execute(),c.eachItemGraphicEl(function(h,v){var p=c.getItemModel(v),d=c.getItemVisual(v,"style");h.useStyle(c.getItemVisual(v,"style")),Re(h,De(p),{labelFetcher:n,labelDataIndex:v,defaultText:c.getName(v)||"",inheritColor:q(d.fill)?yh(d.fill,1):V.color.neutral99}),Me(h,p),ne(h,null,null,p.get(["emphasis","disabled"])),dt(h).dataModel=n}),zc(f).data=c,f.group.silent=n.get("silent")||e.get("silent")},t.type="markArea",t})(N1);function zq(r,t,e){var n,a,i=["x0","y0","x1","y1"];if(r){var o=Y(r&&r.dimensions,function(u){var f=t.getData(),c=f.getDimensionInfo(f.mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})});a=Y(i,function(u,f){return{name:u,type:o[f%2].type}}),n=new or(a,e)}else a=[{name:"value",type:"float"}],n=new or(a,e);var s=Y(e.get("data"),xt(Oq,t,r,e));r&&(s=Ht(s,xt(Nq,r)));var l=r?function(u,f,c,h){var v=u.coord[Math.floor(h/2)][h%2];return ri(v,a[h])}:function(u,f,c,h){return ri(u.value,a[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function Vq(r){r.registerComponentModel(Rq),r.registerComponentView(Bq),r.registerPreprocessor(function(t){O1(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var Fq=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},r0=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,a=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),U(n)&&D(n,function(i,o){q(i)&&(i={type:i}),n[o]=bt(i,Fq(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:V.size.m,align:"auto",backgroundColor:V.color.transparent,borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:V.color.disabled,inactiveBorderColor:V.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:V.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:V.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:V.color.tertiary,borderWidth:1,borderColor:V.color.border},emphasis:{selectorLabel:{show:!0,color:V.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(Mt),os=xt,n0=D,Vc=ot,wR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Vc),this.group.add(this._selectorGroup=new Vc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,a,l,s,u);var f=Ie(e,a).refContainer,c=e.getBoxLayoutParams(),h=e.get("padding"),v=ae(c,f,h),p=this.layoutInner(e,o,v,i,l,u),d=ae(ht({width:p.width,height:p.height},c),f,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=cR(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,a,i,o,s,l){var u=this.getContentGroup(),f=et(),c=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];a.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),n0(n.getData(),function(p,d){var g=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new Vc;m.newline=!0,u.add(m);return}var _=a.getSeriesByName(y)[0];if(!f.get(y))if(_){var x=_.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),w=x.getVisual("style"),T=this._createItem(_,y,d,p,n,e,b,w,S,c,i);T.on("click",os(nM,y,null,i,v)).on("mouseover",os(a0,_.name,null,i,v)).on("mouseout",os(i0,_.name,null,i,v)),a.ssr&&T.eachChild(function(C){var A=dt(C);A.seriesIndex=_.seriesIndex,A.dataIndex=d,A.ssrType="legend"}),h&&T.eachChild(function(C){g.packEventData(C,n,_,d,y)}),f.set(y,!0)}else a.eachRawSeries(function(C){var A=this;if(!f.get(y)&&C.legendVisualProvider){var M=C.legendVisualProvider;if(!M.containName(y))return;var I=M.indexOfName(y),L=M.getItemVisual(I,"style"),P=M.getItemVisual(I,"legendIcon"),E=dr(L.fill);E&&E[3]===0&&(E[3]=.2,L=W(W({},L),{fill:Vn(E,"rgba")}));var R=this._createItem(C,y,d,p,n,e,{},L,P,c,i);R.on("click",os(nM,null,y,i,v)).on("mouseover",os(a0,null,y,i,v)).on("mouseout",os(i0,null,y,i,v)),a.ssr&&R.eachChild(function(B){var N=dt(B);N.seriesIndex=C.seriesIndex,N.dataIndex=d,N.ssrType="legend"}),h&&R.eachChild(function(B){A.packEventData(B,n,C,d,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},t.prototype.packEventData=function(e,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};dt(e).eventData=s},t.prototype._createSelector=function(e,n,a,i,o){var s=this.getSelectorGroup();n0(e,function(u){var f=u.type,c=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(c);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Re(c,{normal:h,emphasis:v},{defaultText:u.title}),fo(c)})},t.prototype._createItem=function(e,n,a,i,o,s,l,u,f,c,h){var v=e.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var x=Gq(f,i,l,u,v,g,h),b=new Vc,S=i.getModel("textStyle");if(it(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(Hq({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:x.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,A=o.get("formatter"),M=n;q(A)&&A?M=A.replace("{name}",n??""):it(A)&&(M=A(n));var I=g?S.getTextColor():i.get("inactiveColor");b.add(new Ot({style:qt(S,{text:M,x:T,y:d/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new Tt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Ca({el:L,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(E){E.silent=!0}),L.silent=!c,this.getContentGroup().add(b),fo(b),b.__legendDataIndex=a,b},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ho(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ho("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],p=e.get("selectorButtonGap",!0),d=e.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?v[d]+=f[g]+p:c[d]+=h[g]+p,v[1-d]+=f[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+p+h[g],_[y]=Math.max(f[y],h[y]),_[m]=Math.min(0,h[m]+v[1-d]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(ee);function Gq(r,t,e,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),n0(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:Bs(c,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:e).opacity),s(u,n);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var p=t.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?n.lineWidth>0&&d?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function Hq(r){var t=r.icon||"roundRect",e=be(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=V.color.neutral00,e.style.lineWidth=2),e}function nM(r,t,e,n){i0(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),a0(r,t,e,n)}function TR(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,a=t.length;na[o],g=[-v.x,-v.y];n||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=nt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(d){var x=e.get("pageButtonPosition",!0);x==="end"?m[i]+=a[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=v[s]/2-p[s]/2,f.setPosition(g),c.setPosition(y),h.setPosition(m);var b={x:0,y:0};if(b[o]=d?a[o]:v[o],b[s]=Math.max(v[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),c.__rectSize=a[o],d){var S={x:0,y:0};S[o]=Math.max(a[o]-p[o]-_,0),S[s]=b[s],c.setClipPath(new Tt({shape:S})),c.__rectSize=S[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Bt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,n,a){var i=this._getPageInfo(n)[e];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var a=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",q(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Ig[o],l=kg[o],u=this._findTargetItemIndex(n),f=a.children(),c=f[u],h=f.length,v=h?1:0,p={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var d=x(c);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=h;++g)_=x(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=x(f[g]),(!_||!b(m,_.s))&&y.i=w&&S.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(n=s)}),n??i},t.type="legend.scroll",t})(wR);function Xq(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function Zq(r){wt(CR),r.registerComponentModel(Yq),r.registerComponentView($q),Xq(r)}function jq(r){wt(CR),wt(Zq)}var qq=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=vi(tf.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(tf),B1=Ct();function Kq(r,t,e){B1(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(t.uid);a&&(a.getRange=e)})}function Jq(r,t){for(var e=B1(r).coordSysRecordMap,n=e.keys(),a=0;ai[a+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function nK(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=B1(e),a=n.coordSysRecordMap||(n.coordSysRecordMap=et());a.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=lR(i);D(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Qq(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=et());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.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){AR(a,i);return}var f=rK(l,i,e);o.enable(f.controlType,f.opt),al(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var aK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,n,a){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),Kq(a,e,{pan:K(Pg.pan,this),zoom:K(Pg.zoom,this),scrollMove:K(Pg.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Jq(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(L1),Pg={zoom:function(r,t,e,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=Eg[t](null,[n.originX,n.originY],o,e,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/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(li(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:sM(function(r,t,e,n,a,i){var o=Eg[n]([i.oldX,i.oldY],[i.newX,i.newY],t,a,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:sM(function(r,t,e,n,a,i){var o=Eg[n]([0,0],[i.scrollDelta,i.scrollDelta],t,a,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function sM(r){return function(t,e,n,a){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,n,a);if(li(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Eg={grid:function(r,t,e,n,a){var i=e.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,n,a){var i=e.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,n,a){var i=e.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function MR(r){I1(r),r.registerComponentModel(qq),r.registerComponentView(aK),nK(r)}var iK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=vi(tf.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:V.color.accent10,borderRadius:0,backgroundColor:V.color.transparent,dataBackground:{lineStyle:{color:V.color.accent30,width:.5},areaStyle:{color:V.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:V.color.accent40,width:.5},areaStyle:{color:V.color.accent20,opacity:.3}},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:V.color.neutral00,borderColor:V.color.accent20},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:V.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:V.color.tertiary},brushSelect:!0,brushStyle:{color:V.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:V.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(tf),Yl=Tt,oK=1,Rg=30,sK=7,$l="horizontal",lM="vertical",lK=5,uK=["line","bar","candlestick","scatter"],fK={easing:"cubicOut",duration:100,delay:0},cK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,n){this.api=n,this._onBrush=K(this._onBrush,this),this._onBrushEnd=K(this._onBrushEnd,this)},t.prototype.render=function(e,n,a,i){if(r.prototype.render.apply(this,arguments),al(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Vu(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new ot;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,a=e.get("brushSelect"),i=a?sK:0,o=Ie(e,n).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===$l?{right:o.width-s.x-s.width,top:o.height-Rg-l-i,width:s.width,height:Rg}:{right:l,top:s.y,width:Rg,height:s.height},f=Lo(e.option);D(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var c=ae(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===lM&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===$l&&!o?{scaleY:l?1:-1,scaleX:1}:a===$l&&o?{scaleY:l?1:-1,scaleX:-1}:a===lM&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=e.get("brushSelect");a.add(new Yl({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Yl({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:K(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)),a.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,a=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var c=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],d=[0,n[0]],g=[[n[0],0],[0,0]],y=[],m=d[1]/Math.max(1,o.count()-1),_=n[0]/(c[1]-c[0]),x=e.thisAxis.type==="time",b=-m,S=Math.round(o.count()/n[0]),w;o.each([e.thisDim,l],function(I,L,P){if(S>0&&P%S){x||(b+=m);return}b=x?(+I-c[0])*_:b+m;var E=L==null||isNaN(L)||L==="",R=E?0:Gt(L,h,p,!0);E&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!E&&w&&(g.push([b,0]),y.push([b,0])),E||(g.push([b,R]),y.push([b,R])),w=E}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new ot,E=new Je({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Ye({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(E),P.add(R),P}for(var A=0;A<3;A++){var M=C(A===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!a&&!(n!==!0&&St(uK,u.get("type"))<0)){var f=i.getComponent(qa(o),s).axis,c=hK(o),h,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(h=v.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var p=u.getData().mapDimension(o);a={thisAxis:f,series:u,thisDim:p,otherDim:c,otherAxisInverse:h}}},this)},this),a}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),h=n.filler=new Yl({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Yl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:oK,fill:V.color.transparent}})),D([0,1],function(_){var x=l.get("handleIcon");!Rh[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var b=be(x,-1,0,2,2,null,!0);b.attr({cursor:vK(this._orient),draggable:!0,drift:K(this._onDragMove,this,_),ondragend:K(this._onDragEnd,this),onmouseover:K(this._showDataInfo,this,!0),onmouseout:K(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Z(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),fo(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(a[_]=b);var C=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;e.add(i[_]=new Ot({silent:!0,invisible:!M,style:qt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var v=h;if(c){var p=Z(l.get("moveHandleSize"),s[1]),d=n.moveHandle=new Tt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=be(l.get("moveHandleIcon"),-g/2,-g/2,g,g,V.color.neutral00,!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));v=n.moveZone=new Tt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),v.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:K(this._onDragMove,this,"all"),ondragstart:K(this._showDataInfo,this,!0),ondragend:K(this._onDragEnd,this),onmouseover:K(this._showDataInfo,this,!0),onmouseout:K(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Gt(e[0],[0,100],n,!0),Gt(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];li(n,i,o,a.get("zoomLock")?"all":e,s.minSpan!=null?Gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Gt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Xr([Gt(i[0],o,l,!0),Gt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,a=this._handleEnds,i=Xr(a.slice()),o=this._size;D([0,1],function(v){var p=n.handles[v],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:a[v]+(v?-1:1),y:o[1]/2-d/2})},this),n.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]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fn[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,a=e.offsetY;this._brushStart=new ct(n,a),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[a.x,a.x+a.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();li(0,l,o,0,u.minSpan!=null?Gt(u.minSpan,s,o,!0):null,u.maxSpan!=null?Gt(u.maxSpan,s,o,!0):null),this._range=Xr([Gt(l[0],o,s,!0),Gt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(da(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new Yl({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,n),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?fK:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=lR(this.dataZoomModel).infoList;if(!e&&n.length){var a=n[0].model.coordinateSystem;e=a.getRect&&a.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(L1);function hK(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function vK(r){return r==="vertical"?"ns-resize":"ew-resize"}function DR(r){r.registerComponentModel(iK),r.registerComponentView(cK),I1(r)}function pK(r){wt(MR),wt(DR)}var LR={get:function(r,t,e){var n=ut((dK[r]||{})[t]);return e&&U(n)?n[n.length-1]:n}},dK={color:{active:["#006edd","#e0ffff"],inactive:[V.color.transparent]},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]}},uM=Ee.mapVisual,gK=Ee.eachVisual,yK=U,fM=D,mK=Xr,_K=Gt,vv=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a)},t.prototype.optionUpdated=function(e,n){var a=this.option;!n&&mR(a,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var n=this.stateList;e=K(e,this),this.controllerVisuals=Qm(this.option.controller,n,e),this.targetVisuals=Qm(this.option.target,n,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,n=this.option.seriesIndex;n==null&&e==null&&(n="all");var a=Ks(this.ecModel,"series",{index:n,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return Y(a,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,n){D(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&e.call(n,i)},this)},t.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(a){a===e&&(n=!0)}),n},t.prototype.formatValueText=function(e,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],U(e)&&(e=e.slice(),u=!0);var f=n?e:u?[c(e[0]),c(e[1])]:c(e);if(q(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(it(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?a[0]+" "+f[1]:e[1]===s[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,n=mK([e.min,e.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(e){var n=this.option.dimension;if(n!=null)return e.getDimensionIndex(n);for(var a=e.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});bt(i,a),bt(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){yK(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,h,v){var p=c[h],d=c[v];p&&!d&&(d=c[v]={},fM(p,function(g,y){if(Ee.isValidType(y)){var m=LR.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";fM(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=h&&ut(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&ut(v)||(s?m[0]:[m[0],m[0]])),_.symbol=uM(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var b=-1/0;gK(x,function(S){S>b&&(b=S)}),_.symbolSize=uM(x,function(S){return _K(S,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:V.color.transparent,borderColor:V.color.borderTint,contentColor:V.color.theme[0],inactiveColor:V.color.disabled,borderWidth:0,padding:V.size.m,textGap:10,precision:0,textStyle:{color:V.color.secondary}},t})(Mt),cM=[20,140],xK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=cM[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=cM[1])},t.prototype._resetRange=function(){var e=this.getExtent(),n=this.option.range;!n||n.auto?(e.auto=1,this.option.range=e):U(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],e[0]),n[1]=Math.min(n[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(e){var n=this.option.controller[e].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),n=Xr((this.get("range")||[]).slice());return n[0]>e[1]&&(n[0]=e[1]),n[1]>e[1]&&(n[1]=e[1]),n[0]=a[1]||e<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},t.prototype.getVisualMeta=function(e){var n=hM(this,"outOfRange",this.getExtent()),a=hM(this,"inRange",this.option.range.slice()),i=[];function o(v,p){i.push({value:v,color:e(v,p)})}for(var s=0,l=0,u=a.length,f=n.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(e[1],"color",n),offset:1}),i},t.prototype._createBarPoints=function(e,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],e[0]],[a[0],e[0]],[a[0],e[1]],[a[0]-n[1],e[1]]]},t.prototype._createBarGroup=function(e){var n=this._orient,a=this.visualMapModel.get("inverse");return new ot(n==="horizontal"&&!a?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",a.mainGroup);SK([0,1],function(c){var h=o[c];h.setStyle("fill",n.handlesColor[c]),h.y=e[c];var v=Cn(e[c],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var d=sn(a.handleLabelPoints[c],co(h,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",h),p=this.getControllerVisual(e,"symbolSize"),d=Cn(e,s,u,!0),g=l[0]-p/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var m=sn(f.indicatorLabelPoint,co(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",f.mainGroup),b=this._orient,S=b==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:S?x:"middle",align:S?"center":x});var w={x:g,y:d,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,C),_.animateTo(T,C)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;Mo[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(n||gM(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(c));var p=mz(h,v);this._dispatchHighDown("downplay",fh(p[0],a)),this._dispatchHighDown("highlight",fh(p[1],a))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var n;if(no(e.target,function(l){var u=dt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function LK(r,t,e,n){for(var a=t.targetVisuals[n],i=Ee.prepareVisualTypes(a),o={color:df(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(AK,MK),D(DK,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(IK))}function ER(r){r.registerComponentModel(xK),r.registerComponentView(TK),PR(r)}var kK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],PK[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=ut(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Y(this._pieceList,function(l){return l=ut(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,n={},a=Ee.listVisualTypes(),i=this.isCategory();D(e.pieces,function(s){D(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),D(n,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&D(this.stateList,function(f){(e[f]||(e[f]={}))[l]=LR.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,n){var a=this.option,i=this._pieceList,o=(n?a:e).selected||{};if(a.selected=o,D(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var s=!1;D(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=ut(e)},t.prototype.getValueState=function(e){var n=Ee.findPieceIndex(e,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Ee.findPieceIndex(l,a);f===e&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(e){var n;if(this.isCategory())n=e.value;else if(e.value!=null)n=e.value;else{var a=e.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(f,c){var h=i.getRepresentValue({interval:f});c||(c=i.getValueState(h));var v=e(h,c);f[0]===-1/0?a[0]=v:f[1]===1/0?a[1]=v:n.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:a}},t.type="visualMap.piecewise",t.defaultOption=vi(vv.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(vv),PK={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,a)},this)}};function xM(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var EK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,f=Ue(n.get("showLabel",!0),!u),c=!n.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),D(l.viewPieceList,function(h){var v=h.piece,p=new ot;p.onclick=K(this._onItemClick,this,v),this._enableHoverLink(p,h.indexInModelPieceList);var d=n.getRepresentValue(v);if(this._createItemSymbol(p,d,[0,0,s[0],s[1]],c),f){var g=this.visualMapModel.getValueState(d),y=i.get("align")||o;p.add(new Ot({style:qt(i,{x:y==="right"?-a:s[0]+a,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:nt(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:c}))}e.add(p)},this),u&&this._renderEndsText(e,u[1],s,f,o),ho(n.get("orient"),e,n.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,n){var a=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:fh(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,n=e.option;if(n.orient==="vertical")return kR(e,this.api,e.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},t.prototype._renderEndsText=function(e,n,a,i,o){if(n){var s=new ot,l=this.visualMapModel.textStyleModel;s.add(new Ot({style:qt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,n=Y(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},t.prototype._createItemSymbol=function(e,n,a,i){var o=be(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=ut(a.selected),s=n.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(IR);function RR(r){r.registerComponentModel(kK),r.registerComponentView(EK),PR(r)}function RK(r){wt(ER),wt(RR)}var OK=(function(){function r(t){this._thumbnailModel=t}return r.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},r.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:iL(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(t,e){var n=e.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},r})(),NK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.optionUpdated=function(e,n){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new OK(this);if(this._target=null,this.ecModel.eachSeries(function(a){YT(a,null)}),this.shouldShow()){var n=this.getTarget();YT(n.baseMapProvider,e)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!=="graph"&&(e=null):e=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:e},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:V.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:V.color.neutral30,borderColor:V.color.neutral40,opacity:.3},z:10},t})(Mt),BK=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){if(this._api=a,this._model=e,this._coordSys||(this._coordSys=new Oo),!this._isEnabled()){this._clear();return}this._renderVersion=a.getMainProcessVersion();var i=this.group;i.removeAll();var o=e.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||V.color.neutral00);var l=Ie(e,a).refContainer,u=ae(DL(e,!0),l),f=s.lineWidth||0,c=this._contentRect=xo(u.clone(),f/2,!0,!0),h=new ot;i.add(h),h.setClipPath(new Tt({shape:c.plain()}));var v=this._targetGroup=new ot;h.add(v);var p=u.plain();p.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Tt({style:s,shape:p,silent:!1,cursor:"grab"}));var d=e.getModel("windowStyle"),g=d.getShallow("borderRadius",!0);h.add(this._windowRect=new Tt({shape:{x:0,y:0,width:0,height:0,r:g},style:d.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),bM(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),bM(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!e){var o=e.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=e.z2Range.min-10,a.setBoundingRect(s.x,s.y,s.width,s.height);var l=ae({left:"center",top:"center",aspect:s.width/s.height},i);a.setViewRect(l.x,l.y,l.width,l.height),o.attr(a.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var n=this._bridgeRendered;n&&n.renderVersion===e.renderVersion&&(n.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var n=fn([],e.targetTrans),a=zn([],this._coordSys.transform,n);this._transThisToTarget=fn([],a);var i=e.viewportRect;i?i=i.clone():i=new pt(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,s=o.shape.r;o.setShape(ht({r:s},i))}},t.prototype._resetRoamController=function(e){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new Ro(a.getZr())),!e||!this._isEnabled()){i.disable();return}i.enable(e,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",K(this._onPan,this)).on("zoom",K(this._onZoom,this))},t.prototype._onPan=function(e){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=pe([],[e.oldX,e.oldY],n),i=pe([],[e.oldX-e.dx,e.oldY-e.dy],n);this._api.dispatchAction(SM(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},t.prototype._onZoom=function(e){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=pe([],[e.originX,e.originY],n);this._api.dispatchAction(SM(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:a[0],originY:a[1]}))}},t.prototype._isEnabled=function(){var e=this._model;if(!e||!e.shouldShow())return!1;var n=e.getTarget().baseMapProvider;return!!n},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t})(ee);function SM(r,t){var e=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",n={type:e};return n[r.mainType+"Id"]=r.id,W(n,t),n}function bM(r,t){var e=So(r);Gv(t.group,e.z,e.zlevel)}function zK(r){r.registerComponentModel(NK),r.registerComponentView(BK)}var VK={label:{enabled:!0},decal:{show:!1}},wM=Ct(),FK={};function GK(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var n=ut(VK);bt(n.label,r.getLocaleModel().get("aria"),!1),bt(e.option,n,!1),a(),i();function a(){var u=e.getModel("decal"),f=u.get("show");if(f){var c=et();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=c.get(h.type);v||(v={},c.set(h.type,v)),wM(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(it(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=$y(h.ecModel,h.name,FK,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",x(_,m))}else{var p=h.getRawData(),d={},g=wM(h).scope;v.each(function(b){var S=v.getRawIndex(b);d[S]=b});var y=p.count();p.each(function(b){var S=d[b],w=p.getName(b)||b+"",T=$y(h.ecModel,w,g,y),C=v.getItemVisual(S,"decal");v.setItemVisual(S,"decal",x(C,T))})}function x(b,S){var w=b?W(W({},S),b):S;return w.dirty=!0,w}})}}function i(){var u=t.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=ht(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,p=c.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],x=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",I]):c.get(["series","single",I]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>v){var P=c.get(["data","partialData"]);A+=o(P,{displayCnt:v})}else A+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),B=c.get(["data","excludeDimensionId"]),N=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},UK=(function(){function r(t){var e=this._condVal=q(t)?new RegExp(t):IN(t)?t:null;if(e==null){var n="";Ft(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return q(e)?this._condVal.test(t):Rt(e)?this._condVal.test(t+""):!1},r})(),YK=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),$K=(function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&n.push(a),a=[L,P]}function f(L,P,E,R){bs(L,E)&&bs(P,R)||a.push(L,P,E,R,E,R)}function c(L,P,E,R,B,N){var z=Math.abs(P-L),k=Math.tan(z/4)*4/3,G=PT:M2&&n.push(a),n}function s0(r,t,e,n,a,i,o,s,l,u){if(bs(r,e)&&bs(t,n)&&bs(a,o)&&bs(i,s)){l.push(o,s);return}var f=2/u,c=f*f,h=o-r,v=s-t,p=Math.sqrt(h*h+v*v);h/=p,v/=p;var d=e-r,g=n-t,y=a-o,m=i-s,_=d*d+g*g,x=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],A=[];ai(r,e,a,o,.5,C),ai(t,n,i,s,.5,A),s0(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),s0(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function oJ(r,t){var e=o0(r),n=[];t=t||1;for(var a=0;a0)for(var u=0;uMath.abs(u),c=NR([l,u],f?0:1,t),h=(f?s:u)/c.length,v=0;va,o=NR([n,a],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",c=r[s]/o.length,h=0;h1?null:new ct(d*l+r,d*u+t)}function uJ(r,t,e){var n=new ct;ct.sub(n,e,t),n.normalize();var a=new ct;ct.sub(a,r,t);var i=a.dot(n);return i}function ls(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function fJ(r,t,e){for(var n=r.length,a=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),fJ(t,u,f)}function pv(r,t,e,n){if(e===1)n.push(t);else{var a=Math.floor(e/2),i=r(t);pv(r,i[0],a,n),pv(r,i[1],e-a,n)}return n}function cJ(r,t){for(var e=[],n=0;n0;u/=2){var f=0,c=0;(r&u)>0&&(f=1),(t&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function yv(r){var t=1/0,e=1/0,n=-1/0,a=-1/0,i=Y(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),e=Math.min(c,e),n=Math.max(f,n),a=Math.max(c,a),[f,c]}),o=Y(i,function(s,l){return{cp:s,z:xJ(s[0],s[1],t,e,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function VR(r){return pJ(r.path,r.count)}function l0(){return{fromIndividuals:[],toIndividuals:[],count:0}}function SJ(r,t,e){var n=[];function a(b){for(var S=0;S=0;a--)if(!e[a].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[a].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var wJ={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;PM(r)&&(u=r,f=t),PM(t)&&(u=t,f=r);function c(y,m,_,x,b){var S=y.many,w=y.one;if(S.length===1&&!b){var T=m?S[0]:w,C=m?w:S[0];if(dv(T))c({many:[T],one:C},!0,_,x,!0);else{var A=s?ht({delay:s(_,x)},l):l;V1(T,C,A),i(T,C,T,C,A)}}else for(var M=ht({dividePath:wJ[e],individualDelay:s&&function(B,N,z,k){return s(B+_,x)}},l),I=m?SJ(S,w,M):bJ(w,S,M),L=I.fromIndividuals,P=I.toIndividuals,E=L.length,R=0;Rt.length,v=u?EM(f,u):EM(h?t:r,[h?r:t]),p=0,d=0;dFR))for(var i=n.getIndices(),o=0;o0&&S.group.traverse(function(T){T instanceof At&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function zM(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function VM(r){return U(r)?r.sort().join(","):r}function Ga(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function IJ(r,t){var e=et(),n=et(),a=et();return D(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=zM(i),f=VM(u);n.set(f,{dataGroupId:s,data:l}),U(u)&&D(u,function(c){a.set(c,{key:f,dataGroupId:s,data:l})})}),D(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=zM(i),u=VM(l),f=n.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Ga(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Ga(s),data:s}]});else if(U(l)){var c=[];D(l,function(p){var d=n.get(p);d.data&&c.push({dataGroupId:d.dataGroupId,divide:Ga(d.data),data:d.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Ga(s)}]})}else{var h=a.get(l);if(h){var v=e.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ga(h.data)}],newSeries:[]},e.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ga(s)})}}}}),e}function FM(r,t){for(var e=0;e=0&&a.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Ga(t.oldData[s]),groupIdDim:o.dimension})}),D(Zt(r.to),function(o){var s=FM(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Ga(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&GR(a,i,n)}function PJ(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){D(Zt(n.seriesTransition),function(a){D(Zt(a.to),function(i){for(var o=n.updatedSeries,s=0;so.vmin?e+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-n,n=o.vmax,a=!1;break}e+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(e+=t-n),e},r.prototype.unelapse=function(t){for(var e=GM,n=HM,a=!0,i=0,o=0;ol?i=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):i=n+t-e,n=s.vmax,a=!1;break}e=u,n=s.vmax}return a&&(i=n+t-e),i},r})();function RJ(){return new EJ}var GM=0,HM=0;function OJ(r,t){var e=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:a(),tpPrct:a()},E:{tpAbs:a(),tpPrct:a()}};D(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(e+=l.val);var u=F1(s,t);if(u){var f=u.vmin!==s.vmin,c=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(f&&c))if(f||c){var v=f?"S":"E";i[v][l.type].has=!0,i[v][l.type].span=h,i[v][l.type].inExtFrac=h/(s.vmax-s.vmin),i[v][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=e*(0+(t[1]-t[0])+(n.tpAbs.val-n.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));D(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=e!==0?Math.max(o,0)*l.val/e:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function NJ(r,t,e,n,a,i){r!=="no"&&D(e,function(o){var s=F1(o,i);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],f=n(u),c=a*3/4;f>s.vmin-c&&ft[0]&&e=0&&o<1-1e-5}D(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ut(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(q(o.gap)){var u=$r(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;a(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var c=t(o.gap);(!isFinite(c)||c<0)&&(c=0),s.gapParsed.type="tpAbs",s.gapParsed.val=c}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),e&&e.noNegative&&D(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return D(n,function(o,s){i>o.vmin&&(n[s]=null),i=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function G1(r,t){return f0(t)===f0(r)}function f0(r){return r.start+"_\0_"+r.end}function zJ(r,t,e){var n=[];D(r,function(i,o){var s=t(i);s&&s.type==="vmin"&&n.push([o])}),D(r,function(i,o){var s=t(i);if(s&&s.type==="vmax"){var l=Co(n,function(u){return G1(t(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var a=[];return D(n,function(i){i.length===2&&a.push(e?i:[r[i[0]],r[i[1]]])}),a}function VJ(r,t,e,n){var a,i;if(r.break){var o=r.break.parsedBreak,s=Co(e,function(c){return G1(c.breakOption,r.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?ye(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};a={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:a}}function FJ(r,t,e){var n={noNegative:!0},a=u0(r,e,n),i=u0(r,e,n),o=Math.log(t);return i.breaks=Y(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:a,parsedLogged:i}}var GJ={vmin:"start",vmax:"end"};function HJ(r,t){return t&&(r=r||{},r.break={type:GJ[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),r}function WJ(){L5({createScaleBreakContext:RJ,pruneTicksByBreak:NJ,addBreaksToTicks:BJ,parseAxisBreakOption:u0,identifyAxisBreak:G1,serializeAxisBreakIdentifier:f0,retrieveAxisBreakPairs:zJ,getTicksLogTransformBreak:VJ,logarithmicParseBreaksFromOption:FJ,makeAxisLabelFormatterParamBreak:HJ})}var WM=Ct();function UJ(r,t){var e=Co(r,function(n){return _e().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return e||r.push(e={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),e}function YJ(r){D(r,function(t){return t.shouldRemove=!0})}function $J(r){for(var t=r.length-1;t>=0;t--)r[t].shouldRemove&&r.splice(t,1)}function XJ(r,t,e,n,a){var i=e.axis;if(i.scale.isBlank()||!_e())return;var o=_e().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=e.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var c=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),p=v.getItemStyle(),d=p.stroke,g=p.lineWidth,y=p.lineDash,m=p.fill,_=new ot({ignoreModelZ:!0}),x=i.isHorizontal(),b=WM(t).visualList||(WM(t).visualList=[]);YJ(b);for(var S=function(C){var A=o[C][0].break.parsedBreak,M=[];M[0]=i.toGlobalCoord(i.dataToCoord(A.vmin,!0)),M[1]=i.toGlobalCoord(i.dataToCoord(A.vmax,!0)),M[1]=N;_t&&(O=N);var zt=[],lt=[];zt[R]=M,lt[R]=I,!st&&!_t&&(zt[R]+=H?-l:l,lt[R]-=H?l:-l),zt[B]=O,lt[B]=O,k.push(zt),G.push(lt);var rt=void 0;if(jm[1]&&m.reverse(),{coordPair:m,brkId:_e().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,c=0;c=0?l[0].width:l[1].width),h=(c+f.x)/2-u.x,v=Math.min(h,h-f.x),p=Math.max(h,h-f.x),d=p<0?p:v>0?v:0;s=(h-d)/f.x}var g=new ct,y=new ct;ct.scale(g,n,-s),ct.scale(y,n,1-s),cm(e[0],g),cm(e[1],y)}function qJ(r,t){var e={breaks:[]};return D(t.breaks,function(n){if(n){var a=Co(r.get("breaks",!0),function(s){return _e().identifyAxisBreak(s,n)});if(a){var i=t.type,o={isExpanded:!!a.isExpanded};a.isExpanded=i===Jv?!0:i===lP?!1:i===uP?!a.isExpanded:a.isExpanded,e.breaks.push({start:a.start,end:a.end,isExpanded:!!a.isExpanded,old:o})}}}),e}function KJ(){$W({adjustBreakLabelPair:jJ,buildAxisBreakLine:ZJ,rectCoordBuildBreakAxis:XJ,updateModelAxisBreak:qJ})}function JJ(r){JW(r),WJ(),KJ()}function QJ(){_6(tQ)}function tQ(r,t){D(r,function(e){if(!e.model.get(["axisLabel","inside"])){var n=eQ(e);if(n){var a=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[a]-=n[a]+i,e.position==="top"?t.y+=n.height+i:e.position==="left"&&(t.x+=n.width+i)}}})}function eQ(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var n,a,i=e.getExtent();e instanceof zs?a=e.count():(n=e.getTicks(),a=n.length);var o=r.getLabelModel(),s=ol(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;f{if(!n.current||!l)return;try{a.current&&a.current.dispose();const m=wG(n.current);a.current=m;const _=sN(l.spec,l.data);m.setOption(_)}catch(m){const _=m,x=_ instanceof Error?_.message:"Failed to render chart";queueMicrotask(()=>o(x))}const y=()=>{a.current?.resize()};return window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y),a.current?.dispose()}},f=[l],t[2]=l,t[3]=u,t[4]=f):(u=t[3],f=t[4]),ge.useEffect(u,f);let c;t[5]!==l?.spec?(c=()=>{if(!a.current)return;const y=a.current.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),m=document.createElement("a");m.download=`chart-${l?.spec.title?.replace(/\s+/g,"-").toLowerCase()||"export"}.png`,m.href=y,document.body.appendChild(m),m.click(),document.body.removeChild(m)},t[5]=l?.spec,t[6]=c):c=t[6];const h=c;if(!l){let y;return t[7]===Symbol.for("react.memo_cache_sentinel")?(y=X.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-4 text-red-700",children:"Failed to parse chart data"}),t[7]=y):y=t[7],y}if(i){let y;return t[8]!==i?(y=X.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-4 text-red-700",children:i}),t[8]=i,t[9]=y):y=t[9],y}let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v=X.jsx(HR,{className:"mr-1 h-4 w-4"}),t[10]=v):v=t[10];let p;t[11]!==h?(p=X.jsx("div",{className:"flex w-full justify-end pb-2",children:X.jsxs(fu,{onClick:h,variant:"ghost",children:[v,"Download PNG"]})}),t[11]=h,t[12]=p):p=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=X.jsx("div",{ref:n,className:"h-[400px] w-full"}),t[13]=d):d=t[13];let g;return t[14]!==p?(g=X.jsxs("div",{className:"rounded-md border",children:[p,d]}),t[14]=p,t[15]=g):g=t[15],g}function vQ(r){const t=Le.c(20);let e,n,a,i,o;t[0]!==r?({onCopy:n,variant:o,size:i,helpText:e,...a}=r,t[0]=r,t[1]=e,t[2]=n,t[3]=a,t[4]=i,t[5]=o):(e=t[1],n=t[2],a=t[3],i=t[4],o=t[5]);const s=o===void 0?"ghost":o,l=i??(e?"default":"icon"),[u,f]=ge.useState(!1);let c;t[6]!==n||t[7]!==a?(c=g=>{n?.(),f(!0),setTimeout(()=>f(!1),2e3),a.onClick?.(g)},t[6]=n,t[7]=a,t[8]=c):c=t[8];const h=c;let v;t[9]!==u?(v=u?X.jsx(WO,{className:"size-4 text-green-500"}):X.jsx(UO,{className:"size-4"}),t[9]=u,t[10]=v):v=t[10];let p;t[11]!==e?(p=e&&X.jsx("span",{children:e}),t[11]=e,t[12]=p):p=t[12];let d;return t[13]!==l||t[14]!==h||t[15]!==a||t[16]!==v||t[17]!==p||t[18]!==s?(d=X.jsxs(fu,{variant:s,size:l,onClick:h,...a,children:[v,p]}),t[13]=l,t[14]=h,t[15]=a,t[16]=v,t[17]=p,t[18]=s,t[19]=d):d=t[19],d}const WR=ge.createContext("default");function UR(){return ge.useContext(WR)}function YR(r){const t=Le.c(13);let e,n,a;t[0]!==r?({className:e,variant:a,...n}=r,t[0]=r,t[1]=e,t[2]=n,t[3]=a):(e=t[1],n=t[2],a=t[3]);const i=a===void 0?"default":a,o=i==="compact"?"text-xs":"text-sm";let s;t[4]!==e||t[5]!==o?(s=ba("w-full caption-bottom",o,e),t[4]=e,t[5]=o,t[6]=s):s=t[6];let l;t[7]!==n||t[8]!==s?(l=X.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:X.jsx("table",{"data-slot":"table",className:s,...n})}),t[7]=n,t[8]=s,t[9]=l):l=t[9];let u;return t[10]!==l||t[11]!==i?(u=X.jsx(WR.Provider,{value:i,children:l}),t[10]=l,t[11]=i,t[12]=u):u=t[12],u}function $R(r){const t=Le.c(8);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let a;t[3]!==e?(a=ba("[&_tr]:border-b",e),t[3]=e,t[4]=a):a=t[4];let i;return t[5]!==n||t[6]!==a?(i=X.jsx("thead",{"data-slot":"table-header",className:a,...n}),t[5]=n,t[6]=a,t[7]=i):i=t[7],i}function XR(r){const t=Le.c(8);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let a;t[3]!==e?(a=ba("[&_tr:last-child]:border-0",e),t[3]=e,t[4]=a):a=t[4];let i;return t[5]!==n||t[6]!==a?(i=X.jsx("tbody",{"data-slot":"table-body",className:a,...n}),t[5]=n,t[6]=a,t[7]=i):i=t[7],i}function nf(r){const t=Le.c(8);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let a;t[3]!==e?(a=ba("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),t[3]=e,t[4]=a):a=t[4];let i;return t[5]!==n||t[6]!==a?(i=X.jsx("tr",{"data-slot":"table-row",className:a,...n}),t[5]=n,t[6]=a,t[7]=i):i=t[7],i}function ZR(r){const t=Le.c(9);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);const i=UR()==="compact"?"h-7 px-1.5 py-1":"h-10 px-2";let o;t[3]!==e||t[4]!==i?(o=ba("text-foreground text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i,e),t[3]=e,t[4]=i,t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==o?(s=X.jsx("th",{"data-slot":"table-head",className:o,...n}),t[6]=n,t[7]=o,t[8]=s):s=t[8],s}function H1(r){const t=Le.c(9);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);const i=UR()==="compact"?"px-1.5 py-1":"p-2";let o;t[3]!==e||t[4]!==i?(o=ba("align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i,e),t[3]=e,t[4]=i,t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==o?(s=X.jsx("td",{"data-slot":"table-cell",className:o,...n}),t[6]=n,t[7]=o,t[8]=s):s=t[8],s}function pQ(r){const t=Le.c(8);let e,n;t[0]!==r?({className:e,...n}=r,t[0]=r,t[1]=e,t[2]=n):(e=t[1],n=t[2]);let a;t[3]!==e?(a=ba("text-muted-foreground mt-4 text-sm",e),t[3]=e,t[4]=a):a=t[4];let i;return t[5]!==n||t[6]!==a?(i=X.jsx("caption",{"data-slot":"table-caption",className:a,...n}),t[5]=n,t[6]=a,t[7]=i):i=t[7],i}function dQ(r,t){const e={};return(r[r.length-1]===""?[...r,""]:r).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}const gQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mQ={};function YM(r,t){return(mQ.jsx?yQ:gQ).test(r)}const _Q=/[ \t\n\f\r]/g;function xQ(r){return typeof r=="object"?r.type==="text"?$M(r.value):!1:$M(r)}function $M(r){return r.replace(_Q,"")===""}class Tf{constructor(t,e,n){this.normal=e,this.property=t,n&&(this.space=n)}}Tf.prototype.normal={};Tf.prototype.property={};Tf.prototype.space=void 0;function jR(r,t){const e={},n={};for(const a of r)Object.assign(e,a.property),Object.assign(n,a.normal);return new Tf(e,n,t)}function c0(r){return r.toLowerCase()}class mr{constructor(t,e){this.attribute=e,this.property=t}}mr.prototype.attribute="";mr.prototype.booleanish=!1;mr.prototype.boolean=!1;mr.prototype.commaOrSpaceSeparated=!1;mr.prototype.commaSeparated=!1;mr.prototype.defined=!1;mr.prototype.mustUseProperty=!1;mr.prototype.number=!1;mr.prototype.overloadedBoolean=!1;mr.prototype.property="";mr.prototype.spaceSeparated=!1;mr.prototype.space=void 0;let SQ=0;const Nt=No(),Ce=No(),h0=No(),J=No(),oe=No(),Ds=No(),Sr=No();function No(){return 2**++SQ}const v0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Ce,commaOrSpaceSeparated:Sr,commaSeparated:Ds,number:J,overloadedBoolean:h0,spaceSeparated:oe},Symbol.toStringTag,{value:"Module"})),Vg=Object.keys(v0);class W1 extends mr{constructor(t,e,n,a){let i=-1;if(super(t,e),XM(this,"space",a),typeof n=="number")for(;++i4&&e.slice(0,4)==="data"&&AQ.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ZM,LQ);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ZM.test(i)){let o=i.replace(CQ,DQ);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=W1}return new a(n,t)}function DQ(r){return"-"+r.toLowerCase()}function LQ(r){return r.charAt(1).toUpperCase()}const IQ=jR([qR,bQ,QR,tO,eO],"html"),U1=jR([qR,wQ,QR,tO,eO],"svg");function kQ(r){return r.join(" ").trim()}var fs={},Fg,jM;function PQ(){if(jM)return Fg;jM=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,e=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=` `,u="/",f="*",c="",h="comment",v="declaration";function p(g,y){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];y=y||{};var m=1,_=1;function x(P){var E=P.match(t);E&&(m+=E.length);var R=P.lastIndexOf(l);_=~R?P.length-R:_+P.length}function b(){var P={line:m,column:_};return function(E){return E.position=new S(P),C(),E}}function S(P){this.start=P,this.end={line:m,column:_},this.source=y.source}S.prototype.content=g;function w(P){var E=new Error(y.source+":"+m+":"+_+": "+P);if(E.reason=P,E.filename=y.source,E.line=m,E.column=_,E.source=g,!y.silent)throw E}function T(P){var E=P.exec(g);if(E){var R=E[0];return x(R),g=g.slice(R.length),E}}function C(){T(e)}function A(P){var E;for(P=P||[];E=M();)E!==!1&&P.push(E);return P}function M(){var P=b();if(!(u!=g.charAt(0)||f!=g.charAt(1))){for(var E=2;c!=g.charAt(E)&&(f!=g.charAt(E)||u!=g.charAt(E+1));)++E;if(E+=2,c===g.charAt(E-1))return w("End of comment missing");var R=g.slice(2,E-2);return _+=2,x(R),g=g.slice(E),_+=2,P({type:h,comment:R})}}function I(){var P=b(),E=T(n);if(E){if(M(),!T(a))return w("property missing ':'");var R=T(i),B=P({type:v,property:d(E[0].replace(r,c)),value:R?d(R[0].replace(r,c)):c});return T(o),B}}function L(){var P=[];A(P);for(var E;E=I();)E!==!1&&(P.push(E),A(P));return P}return C(),L()}function d(g){return g?g.replace(s,c):c}return Fg=p,Fg}var qM;function EQ(){if(qM)return fs;qM=1;var r=fs&&fs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=e;const t=r(PQ());function e(n,a){let i=null;if(!n||typeof n!="string")return i;const o=(0,t.default)(n),s=typeof a=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:f}=l;s?a(u,f,l):f&&(i=i||{},i[u]=f)}),i}return fs}var Xl={},KM;function RQ(){if(KM)return Xl;KM=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,e=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||e.test(u)||r.test(u)},o=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},l=function(u,f){return f===void 0&&(f={}),i(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(a,s):u=u.replace(n,s),u.replace(t,o))};return Xl.camelCase=l,Xl}var Zl,JM;function OQ(){if(JM)return Zl;JM=1;var r=Zl&&Zl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=r(EQ()),e=RQ();function n(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(s,l){s&&l&&(o[(0,e.camelCase)(s,i)]=l)}),o}return n.default=n,Zl=n,Zl}var NQ=OQ();const BQ=LD(NQ),rO=nO("end"),Y1=nO("start");function nO(r){return t;function t(e){const n=e&&e.position&&e.position[r]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function zQ(r){const t=Y1(r),e=rO(r);if(t&&e)return{start:t,end:e}}function Tu(r){return!r||typeof r!="object"?"":"position"in r||"type"in r?QM(r.position):"start"in r||"end"in r?QM(r):"line"in r||"column"in r?p0(r):""}function p0(r){return tD(r&&r.line)+":"+tD(r&&r.column)}function QM(r){return p0(r&&r.start)+"-"+p0(r&&r.end)}function tD(r){return r&&typeof r=="number"?r:1}class Qe extends Error{constructor(t,e,n){super(),typeof e=="string"&&(n=e,e=void 0);let a="",i={},o=!1;if(e&&("line"in e&&"column"in e?i={place:e}:"start"in e&&"end"in e?i={place:e}:"type"in e?i={ancestors:[e],place:e.position}:i={...e}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=s?s.line:void 0,this.name=Tu(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const $1={}.hasOwnProperty,VQ=new Map,FQ=/[A-Z]/g,GQ=new Set(["table","tbody","thead","tfoot","tr"]),HQ=new Set(["td","th"]),aO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WQ(r,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const e=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=KQ(e,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=qQ(e,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:e,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?U1:IQ,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=iO(a,r,void 0);return i&&typeof i!="string"?i:a.create(r,a.Fragment,{children:i||void 0},void 0)}function iO(r,t,e){if(t.type==="element")return UQ(r,t,e);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return YQ(r,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return XQ(r,t,e);if(t.type==="mdxjsEsm")return $Q(r,t);if(t.type==="root")return ZQ(r,t,e);if(t.type==="text")return jQ(r,t)}function UQ(r,t,e){const n=r.schema;let a=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=U1,r.schema=a),r.ancestors.push(t);const i=sO(r,t.tagName,!1),o=JQ(r,t);let s=Z1(r,t);return GQ.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!xQ(l):!0})),oO(r,o,i,t),X1(o,s),r.ancestors.pop(),r.schema=n,r.create(t,i,o,e)}function YQ(r,t){if(t.data&&t.data.estree&&r.evaluater){const n=t.data.estree.body[0];return n.type,r.evaluater.evaluateExpression(n.expression)}af(r,t.position)}function $Q(r,t){if(t.data&&t.data.estree&&r.evaluater)return r.evaluater.evaluateProgram(t.data.estree);af(r,t.position)}function XQ(r,t,e){const n=r.schema;let a=n;t.name==="svg"&&n.space==="html"&&(a=U1,r.schema=a),r.ancestors.push(t);const i=t.name===null?r.Fragment:sO(r,t.name,!0),o=QQ(r,t),s=Z1(r,t);return oO(r,o,i,t),X1(o,s),r.ancestors.pop(),r.schema=n,r.create(t,i,o,e)}function ZQ(r,t,e){const n={};return X1(n,Z1(r,t)),r.create(t,r.Fragment,n,e)}function jQ(r,t){return t.value}function oO(r,t,e,n){typeof e!="string"&&e!==r.Fragment&&r.passNode&&(t.node=n)}function X1(r,t){if(t.length>0){const e=t.length>1?t:t[0];e&&(r.children=e)}}function qQ(r,t,e){return n;function n(a,i,o,s){const u=Array.isArray(o.children)?e:t;return s?u(i,o,s):u(i,o)}}function KQ(r,t){return e;function e(n,a,i,o){const s=Array.isArray(i.children),l=Y1(n);return t(a,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:r,lineNumber:l?l.line:void 0},void 0)}}function JQ(r,t){const e={};let n,a;for(a in t.properties)if(a!=="children"&&$1.call(t.properties,a)){const i=ttt(r,a,t.properties[a]);if(i){const[o,s]=i;r.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&HQ.has(t.tagName)?n=s:e[o]=s}}if(n){const i=e.style||(e.style={});i[r.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return e}function QQ(r,t){const e={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&r.evaluater){const i=n.data.estree.body[0];i.type;const o=i.expression;o.type;const s=o.properties[0];s.type,Object.assign(e,r.evaluater.evaluateExpression(s.argument))}else af(r,t.position);else{const a=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&r.evaluater){const s=n.value.data.estree.body[0];s.type,i=r.evaluater.evaluateExpression(s.expression)}else af(r,t.position);else i=n.value===null?!0:n.value;e[a]=i}return e}function Z1(r,t){const e=[];let n=-1;const a=r.passKeys?new Map:VQ;for(;++na?0:a+t:t=t>a?a:t,e=e>0?e:0,n.length<1e4)o=Array.from(n),o.unshift(t,e),r.splice(...o);else for(e&&r.splice(t,e);i0?(jn(r,r.length,0,t),r):t}const nD={}.hasOwnProperty;function ltt(r){const t={};let e=-1;for(;++e13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)===65535||(e&65535)===65534||e>1114111?"�":String.fromCodePoint(e)}function Ls(r){return r.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn=di(/[A-Za-z]/),Mr=di(/[\dA-Za-z]/),ctt=di(/[#-'*+\--9=?A-Z^-~]/);function d0(r){return r!==null&&(r<32||r===127)}const g0=di(/\d/),htt=di(/[\dA-Fa-f]/),vtt=di(/[!-/:-@[-`{-~]/);function Dt(r){return r!==null&&r<-2}function gr(r){return r!==null&&(r<0||r===32)}function Xt(r){return r===-2||r===-1||r===32}const ptt=di(new RegExp("\\p{P}|\\p{S}","u")),dtt=di(/\s/);function di(r){return t;function t(e){return e!==null&&e>-1&&r.test(String.fromCharCode(e))}}function cl(r){const t=[];let e=-1,n=0,a=0;for(;++e55295&&i<57344){const s=r.charCodeAt(e+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(r.slice(n,e),encodeURIComponent(o)),n=e+a+1,o=""),a&&(e+=a,a=0)}return t.join("")+r.slice(n)}function se(r,t,e,n){const a=n?n-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return Xt(l)?(r.enter(e),s(l)):t(l)}function s(l){return Xt(l)&&i++o))return;const w=t.events.length;let T=w,C,A;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(C){A=t.events[T][1].end;break}C=!0}for(y(n),S=w;S_;){const b=e[x];t.containerState=b[1],b[0].exit.call(t,r)}e.length=_}function m(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function xtt(r,t,e){return se(r,r.attempt(this.parser.constructs.document,t,e),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function iD(r){if(r===null||gr(r)||dtt(r))return 1;if(ptt(r))return 2}function q1(r,t,e){const n=[];let a=-1;for(;++a1&&r[e][1].end.offset-r[e][1].start.offset>1?2:1;const c={...r[n][1].end},h={...r[e][1].start};oD(c,-l),oD(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...r[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...r[e][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...r[n][1].end},end:{...r[e][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},r[n][1].end={...o.start},r[e][1].start={...s.end},u=[],r[n][1].end.offset-r[n][1].start.offset&&(u=Wr(u,[["enter",r[n][1],t],["exit",r[n][1],t]])),u=Wr(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Wr(u,q1(t.parser.constructs.insideSpan.null,r.slice(n+1,e),t)),u=Wr(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",a,t]]),r[e][1].end.offset-r[e][1].start.offset?(f=2,u=Wr(u,[["enter",r[e][1],t],["exit",r[e][1],t]])):f=0,jn(r,n-1,e-n+3,u),e=n+u.length-f-2;break}}for(e=-1;++e0&&Xt(S)?se(r,m,"linePrefix",i+1)(S):m(S)}function m(S){return S===null||Dt(S)?r.check(sD,d,x)(S):(r.enter("codeFlowValue"),_(S))}function _(S){return S===null||Dt(S)?(r.exit("codeFlowValue"),m(S)):(r.consume(S),_)}function x(S){return r.exit("codeFenced"),t(S)}function b(S,w,T){let C=0;return A;function A(E){return S.enter("lineEnding"),S.consume(E),S.exit("lineEnding"),M}function M(E){return S.enter("codeFencedFence"),Xt(E)?se(S,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):I(E)}function I(E){return E===s?(S.enter("codeFencedFenceSequence"),L(E)):T(E)}function L(E){return E===s?(C++,S.consume(E),L):C>=o?(S.exit("codeFencedFenceSequence"),Xt(E)?se(S,P,"whitespace")(E):P(E)):T(E)}function P(E){return E===null||Dt(E)?(S.exit("codeFencedFence"),w(E)):T(E)}}}function Ptt(r,t,e){const n=this;return a;function a(o){return o===null?e(o):(r.enter("lineEnding"),r.consume(o),r.exit("lineEnding"),i)}function i(o){return n.parser.lazy[n.now().line]?e(o):t(o)}}const Hg={name:"codeIndented",tokenize:Rtt},Ett={partial:!0,tokenize:Ott};function Rtt(r,t,e){const n=this;return a;function a(u){return r.enter("codeIndented"),se(r,i,"linePrefix",5)(u)}function i(u){const f=n.events[n.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):e(u)}function o(u){return u===null?l(u):Dt(u)?r.attempt(Ett,o,l)(u):(r.enter("codeFlowValue"),s(u))}function s(u){return u===null||Dt(u)?(r.exit("codeFlowValue"),o(u)):(r.consume(u),s)}function l(u){return r.exit("codeIndented"),t(u)}}function Ott(r,t,e){const n=this;return a;function a(o){return n.parser.lazy[n.now().line]?e(o):Dt(o)?(r.enter("lineEnding"),r.consume(o),r.exit("lineEnding"),a):se(r,i,"linePrefix",5)(o)}function i(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Dt(o)?a(o):e(o)}}const Ntt={name:"codeText",previous:ztt,resolve:Btt,tokenize:Vtt};function Btt(r){let t=r.length-4,e=3,n,a;if((r[e][1].type==="lineEnding"||r[e][1].type==="space")&&(r[t][1].type==="lineEnding"||r[t][1].type==="space")){for(n=e;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,e,n){const a=e||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return n&&jl(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),jl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),jl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(o):r.interrupt(n.parser.constructs.flow,e,t)(o)}}function pO(r,t,e,n,a,i,o,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(r.enter(n),r.enter(a),r.enter(i),r.consume(y),r.exit(i),h):y===null||y===32||y===41||d0(y)?e(y):(r.enter(n),r.enter(o),r.enter(s),r.enter("chunkString",{contentType:"string"}),d(y))}function h(y){return y===62?(r.enter(i),r.consume(y),r.exit(i),r.exit(a),r.exit(n),t):(r.enter(s),r.enter("chunkString",{contentType:"string"}),v(y))}function v(y){return y===62?(r.exit("chunkString"),r.exit(s),h(y)):y===null||y===60||Dt(y)?e(y):(r.consume(y),y===92?p:v)}function p(y){return y===60||y===62||y===92?(r.consume(y),v):v(y)}function d(y){return!f&&(y===null||y===41||gr(y))?(r.exit("chunkString"),r.exit(s),r.exit(o),r.exit(n),t(y)):f999||v===null||v===91||v===93&&!l||v===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?e(v):v===93?(r.exit(i),r.enter(a),r.consume(v),r.exit(a),r.exit(n),t):Dt(v)?(r.enter("lineEnding"),r.consume(v),r.exit("lineEnding"),f):(r.enter("chunkString",{contentType:"string"}),c(v))}function c(v){return v===null||v===91||v===93||Dt(v)||s++>999?(r.exit("chunkString"),f(v)):(r.consume(v),l||(l=!Xt(v)),v===92?h:c)}function h(v){return v===91||v===92||v===93?(r.consume(v),s++,c):c(v)}}function gO(r,t,e,n,a,i){let o;return s;function s(h){return h===34||h===39||h===40?(r.enter(n),r.enter(a),r.consume(h),r.exit(a),o=h===40?41:h,l):e(h)}function l(h){return h===o?(r.enter(a),r.consume(h),r.exit(a),r.exit(n),t):(r.enter(i),u(h))}function u(h){return h===o?(r.exit(i),l(o)):h===null?e(h):Dt(h)?(r.enter("lineEnding"),r.consume(h),r.exit("lineEnding"),se(r,u,"linePrefix")):(r.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===o||h===null||Dt(h)?(r.exit("chunkString"),u(h)):(r.consume(h),h===92?c:f)}function c(h){return h===o||h===92?(r.consume(h),f):f(h)}}function Cu(r,t){let e;return n;function n(a){return Dt(a)?(r.enter("lineEnding"),r.consume(a),r.exit("lineEnding"),e=!0,n):Xt(a)?se(r,n,e?"linePrefix":"lineSuffix")(a):t(a)}}const Xtt={name:"definition",tokenize:jtt},Ztt={partial:!0,tokenize:qtt};function jtt(r,t,e){const n=this;let a;return i;function i(v){return r.enter("definition"),o(v)}function o(v){return dO.call(n,r,s,e,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function s(v){return a=Ls(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),v===58?(r.enter("definitionMarker"),r.consume(v),r.exit("definitionMarker"),l):e(v)}function l(v){return gr(v)?Cu(r,u)(v):u(v)}function u(v){return pO(r,f,e,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function f(v){return r.attempt(Ztt,c,c)(v)}function c(v){return Xt(v)?se(r,h,"whitespace")(v):h(v)}function h(v){return v===null||Dt(v)?(r.exit("definition"),n.parser.defined.push(a),t(v)):e(v)}}function qtt(r,t,e){return n;function n(s){return gr(s)?Cu(r,a)(s):e(s)}function a(s){return gO(r,i,e,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Xt(s)?se(r,o,"whitespace")(s):o(s)}function o(s){return s===null||Dt(s)?t(s):e(s)}}const Ktt={name:"hardBreakEscape",tokenize:Jtt};function Jtt(r,t,e){return n;function n(i){return r.enter("hardBreakEscape"),r.consume(i),a}function a(i){return Dt(i)?(r.exit("hardBreakEscape"),t(i)):e(i)}}const Qtt={name:"headingAtx",resolve:tet,tokenize:eet};function tet(r,t){let e=r.length-2,n=3,a,i;return r[n][1].type==="whitespace"&&(n+=2),e-2>n&&r[e][1].type==="whitespace"&&(e-=2),r[e][1].type==="atxHeadingSequence"&&(n===e-1||e-4>n&&r[e-2][1].type==="whitespace")&&(e-=n+1===e?2:4),e>n&&(a={type:"atxHeadingText",start:r[n][1].start,end:r[e][1].end},i={type:"chunkText",start:r[n][1].start,end:r[e][1].end,contentType:"text"},jn(r,n,e-n+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),r}function eet(r,t,e){let n=0;return a;function a(f){return r.enter("atxHeading"),i(f)}function i(f){return r.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&n++<6?(r.consume(f),o):f===null||gr(f)?(r.exit("atxHeadingSequence"),s(f)):e(f)}function s(f){return f===35?(r.enter("atxHeadingSequence"),l(f)):f===null||Dt(f)?(r.exit("atxHeading"),t(f)):Xt(f)?se(r,s,"whitespace")(f):(r.enter("atxHeadingText"),u(f))}function l(f){return f===35?(r.consume(f),l):(r.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||gr(f)?(r.exit("atxHeadingText"),s(f)):(r.consume(f),u)}}const ret=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],uD=["pre","script","style","textarea"],net={concrete:!0,name:"htmlFlow",resolveTo:oet,tokenize:set},aet={partial:!0,tokenize:fet},iet={partial:!0,tokenize:uet};function oet(r){let t=r.length;for(;t--&&!(r[t][0]==="enter"&&r[t][1].type==="htmlFlow"););return t>1&&r[t-2][1].type==="linePrefix"&&(r[t][1].start=r[t-2][1].start,r[t+1][1].start=r[t-2][1].start,r.splice(t-2,2)),r}function set(r,t,e){const n=this;let a,i,o,s,l;return u;function u(O){return f(O)}function f(O){return r.enter("htmlFlow"),r.enter("htmlFlowData"),r.consume(O),c}function c(O){return O===33?(r.consume(O),h):O===47?(r.consume(O),i=!0,d):O===63?(r.consume(O),a=3,n.interrupt?t:k):kn(O)?(r.consume(O),o=String.fromCharCode(O),g):e(O)}function h(O){return O===45?(r.consume(O),a=2,v):O===91?(r.consume(O),a=5,s=0,p):kn(O)?(r.consume(O),a=4,n.interrupt?t:k):e(O)}function v(O){return O===45?(r.consume(O),n.interrupt?t:k):e(O)}function p(O){const j="CDATA[";return O===j.charCodeAt(s++)?(r.consume(O),s===j.length?n.interrupt?t:I:p):e(O)}function d(O){return kn(O)?(r.consume(O),o=String.fromCharCode(O),g):e(O)}function g(O){if(O===null||O===47||O===62||gr(O)){const j=O===47,st=o.toLowerCase();return!j&&!i&&uD.includes(st)?(a=1,n.interrupt?t(O):I(O)):ret.includes(o.toLowerCase())?(a=6,j?(r.consume(O),y):n.interrupt?t(O):I(O)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?e(O):i?m(O):_(O))}return O===45||Mr(O)?(r.consume(O),o+=String.fromCharCode(O),g):e(O)}function y(O){return O===62?(r.consume(O),n.interrupt?t:I):e(O)}function m(O){return Xt(O)?(r.consume(O),m):A(O)}function _(O){return O===47?(r.consume(O),A):O===58||O===95||kn(O)?(r.consume(O),x):Xt(O)?(r.consume(O),_):A(O)}function x(O){return O===45||O===46||O===58||O===95||Mr(O)?(r.consume(O),x):b(O)}function b(O){return O===61?(r.consume(O),S):Xt(O)?(r.consume(O),b):_(O)}function S(O){return O===null||O===60||O===61||O===62||O===96?e(O):O===34||O===39?(r.consume(O),l=O,w):Xt(O)?(r.consume(O),S):T(O)}function w(O){return O===l?(r.consume(O),l=null,C):O===null||Dt(O)?e(O):(r.consume(O),w)}function T(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||gr(O)?b(O):(r.consume(O),T)}function C(O){return O===47||O===62||Xt(O)?_(O):e(O)}function A(O){return O===62?(r.consume(O),M):e(O)}function M(O){return O===null||Dt(O)?I(O):Xt(O)?(r.consume(O),M):e(O)}function I(O){return O===45&&a===2?(r.consume(O),R):O===60&&a===1?(r.consume(O),B):O===62&&a===4?(r.consume(O),G):O===63&&a===3?(r.consume(O),k):O===93&&a===5?(r.consume(O),z):Dt(O)&&(a===6||a===7)?(r.exit("htmlFlowData"),r.check(aet,H,L)(O)):O===null||Dt(O)?(r.exit("htmlFlowData"),L(O)):(r.consume(O),I)}function L(O){return r.check(iet,P,H)(O)}function P(O){return r.enter("lineEnding"),r.consume(O),r.exit("lineEnding"),E}function E(O){return O===null||Dt(O)?L(O):(r.enter("htmlFlowData"),I(O))}function R(O){return O===45?(r.consume(O),k):I(O)}function B(O){return O===47?(r.consume(O),o="",N):I(O)}function N(O){if(O===62){const j=o.toLowerCase();return uD.includes(j)?(r.consume(O),G):I(O)}return kn(O)&&o.length<8?(r.consume(O),o+=String.fromCharCode(O),N):I(O)}function z(O){return O===93?(r.consume(O),k):I(O)}function k(O){return O===62?(r.consume(O),G):O===45&&a===2?(r.consume(O),k):I(O)}function G(O){return O===null||Dt(O)?(r.exit("htmlFlowData"),H(O)):(r.consume(O),G)}function H(O){return r.exit("htmlFlow"),t(O)}}function uet(r,t,e){const n=this;return a;function a(o){return Dt(o)?(r.enter("lineEnding"),r.consume(o),r.exit("lineEnding"),i):e(o)}function i(o){return n.parser.lazy[n.now().line]?e(o):t(o)}}function fet(r,t,e){return n;function n(a){return r.enter("lineEnding"),r.consume(a),r.exit("lineEnding"),r.attempt(sp,t,e)}}const cet={name:"htmlText",tokenize:het};function het(r,t,e){const n=this;let a,i,o;return s;function s(k){return r.enter("htmlText"),r.enter("htmlTextData"),r.consume(k),l}function l(k){return k===33?(r.consume(k),u):k===47?(r.consume(k),b):k===63?(r.consume(k),_):kn(k)?(r.consume(k),T):e(k)}function u(k){return k===45?(r.consume(k),f):k===91?(r.consume(k),i=0,p):kn(k)?(r.consume(k),m):e(k)}function f(k){return k===45?(r.consume(k),v):e(k)}function c(k){return k===null?e(k):k===45?(r.consume(k),h):Dt(k)?(o=c,B(k)):(r.consume(k),c)}function h(k){return k===45?(r.consume(k),v):c(k)}function v(k){return k===62?R(k):k===45?h(k):c(k)}function p(k){const G="CDATA[";return k===G.charCodeAt(i++)?(r.consume(k),i===G.length?d:p):e(k)}function d(k){return k===null?e(k):k===93?(r.consume(k),g):Dt(k)?(o=d,B(k)):(r.consume(k),d)}function g(k){return k===93?(r.consume(k),y):d(k)}function y(k){return k===62?R(k):k===93?(r.consume(k),y):d(k)}function m(k){return k===null||k===62?R(k):Dt(k)?(o=m,B(k)):(r.consume(k),m)}function _(k){return k===null?e(k):k===63?(r.consume(k),x):Dt(k)?(o=_,B(k)):(r.consume(k),_)}function x(k){return k===62?R(k):_(k)}function b(k){return kn(k)?(r.consume(k),S):e(k)}function S(k){return k===45||Mr(k)?(r.consume(k),S):w(k)}function w(k){return Dt(k)?(o=w,B(k)):Xt(k)?(r.consume(k),w):R(k)}function T(k){return k===45||Mr(k)?(r.consume(k),T):k===47||k===62||gr(k)?C(k):e(k)}function C(k){return k===47?(r.consume(k),R):k===58||k===95||kn(k)?(r.consume(k),A):Dt(k)?(o=C,B(k)):Xt(k)?(r.consume(k),C):R(k)}function A(k){return k===45||k===46||k===58||k===95||Mr(k)?(r.consume(k),A):M(k)}function M(k){return k===61?(r.consume(k),I):Dt(k)?(o=M,B(k)):Xt(k)?(r.consume(k),M):C(k)}function I(k){return k===null||k===60||k===61||k===62||k===96?e(k):k===34||k===39?(r.consume(k),a=k,L):Dt(k)?(o=I,B(k)):Xt(k)?(r.consume(k),I):(r.consume(k),P)}function L(k){return k===a?(r.consume(k),a=void 0,E):k===null?e(k):Dt(k)?(o=L,B(k)):(r.consume(k),L)}function P(k){return k===null||k===34||k===39||k===60||k===61||k===96?e(k):k===47||k===62||gr(k)?C(k):(r.consume(k),P)}function E(k){return k===47||k===62||gr(k)?C(k):e(k)}function R(k){return k===62?(r.consume(k),r.exit("htmlTextData"),r.exit("htmlText"),t):e(k)}function B(k){return r.exit("htmlTextData"),r.enter("lineEnding"),r.consume(k),r.exit("lineEnding"),N}function N(k){return Xt(k)?se(r,z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):z(k)}function z(k){return r.enter("htmlTextData"),o(k)}}const K1={name:"labelEnd",resolveAll:get,resolveTo:yet,tokenize:met},vet={tokenize:_et},pet={tokenize:xet},det={tokenize:bet};function get(r){let t=-1;const e=[];for(;++t=3&&(u===null||Dt(u))?(r.exit("thematicBreak"),t(u)):e(u)}function l(u){return u===a?(r.consume(u),n++,l):(r.exit("thematicBreakSequence"),Xt(u)?se(r,s,"whitespace")(u):s(u))}}const cr={continuation:{tokenize:Pet},exit:Ret,name:"list",tokenize:ket},Let={partial:!0,tokenize:Oet},Iet={partial:!0,tokenize:Eet};function ket(r,t,e){const n=this,a=n.events[n.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(v){const p=n.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||v===n.containerState.marker:g0(v)){if(n.containerState.type||(n.containerState.type=p,r.enter(p,{_container:!0})),p==="listUnordered")return r.enter("listItemPrefix"),v===42||v===45?r.check(ch,e,u)(v):u(v);if(!n.interrupt||v===49)return r.enter("listItemPrefix"),r.enter("listItemValue"),l(v)}return e(v)}function l(v){return g0(v)&&++o<10?(r.consume(v),l):(!n.interrupt||o<2)&&(n.containerState.marker?v===n.containerState.marker:v===41||v===46)?(r.exit("listItemValue"),u(v)):e(v)}function u(v){return r.enter("listItemMarker"),r.consume(v),r.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||v,r.check(sp,n.interrupt?e:f,r.attempt(Let,h,c))}function f(v){return n.containerState.initialBlankLine=!0,i++,h(v)}function c(v){return Xt(v)?(r.enter("listItemPrefixWhitespace"),r.consume(v),r.exit("listItemPrefixWhitespace"),h):e(v)}function h(v){return n.containerState.size=i+n.sliceSerialize(r.exit("listItemPrefix"),!0).length,t(v)}}function Pet(r,t,e){const n=this;return n.containerState._closeFlow=void 0,r.check(sp,a,i);function a(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,se(r,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!Xt(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,r.attempt(Iet,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,se(r,r.attempt(cr,t,e),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Eet(r,t,e){const n=this;return se(r,a,"listItemIndent",n.containerState.size+1);function a(i){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(i):e(i)}}function Ret(r){r.exit(this.containerState.type)}function Oet(r,t,e){const n=this;return se(r,a,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=n.events[n.events.length-1];return!Xt(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):e(i)}}const fD={name:"setextUnderline",resolveTo:Net,tokenize:Bet};function Net(r,t){let e=r.length,n,a,i;for(;e--;)if(r[e][0]==="enter"){if(r[e][1].type==="content"){n=e;break}r[e][1].type==="paragraph"&&(a=e)}else r[e][1].type==="content"&&r.splice(e,1),!i&&r[e][1].type==="definition"&&(i=e);const o={type:"setextHeading",start:{...r[n][1].start},end:{...r[r.length-1][1].end}};return r[a][1].type="setextHeadingText",i?(r.splice(a,0,["enter",o,t]),r.splice(i+1,0,["exit",r[n][1],t]),r[n][1].end={...r[i][1].end}):r[n][1]=o,r.push(["exit",o,t]),r}function Bet(r,t,e){const n=this;let a;return i;function i(u){let f=n.events.length,c;for(;f--;)if(n.events[f][1].type!=="lineEnding"&&n.events[f][1].type!=="linePrefix"&&n.events[f][1].type!=="content"){c=n.events[f][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||c)?(r.enter("setextHeadingLine"),a=u,o(u)):e(u)}function o(u){return r.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===a?(r.consume(u),s):(r.exit("setextHeadingLineSequence"),Xt(u)?se(r,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Dt(u)?(r.exit("setextHeadingLine"),t(u)):e(u)}}const zet={tokenize:Vet};function Vet(r){const t=this,e=r.attempt(sp,n,r.attempt(this.parser.constructs.flowInitial,a,se(r,r.attempt(this.parser.constructs.flow,a,r.attempt(Htt,a)),"linePrefix")));return e;function n(i){if(i===null){r.consume(i);return}return r.enter("lineEndingBlank"),r.consume(i),r.exit("lineEndingBlank"),t.currentConstruct=void 0,e}function a(i){if(i===null){r.consume(i);return}return r.enter("lineEnding"),r.consume(i),r.exit("lineEnding"),t.currentConstruct=void 0,e}}const Fet={resolveAll:mO()},Get=yO("string"),Het=yO("text");function yO(r){return{resolveAll:mO(r==="text"?Wet:void 0),tokenize:t};function t(e){const n=this,a=this.parser.constructs[r],i=e.attempt(a,o,s);return o;function o(f){return u(f)?i(f):s(f)}function s(f){if(f===null){e.consume(f);return}return e.enter("data"),e.consume(f),l}function l(f){return u(f)?(e.exit("data"),i(f)):(e.consume(f),l)}function u(f){if(f===null)return!0;const c=a[f];let h=-1;if(c)for(;++h-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}i>0&&o.push(r[a].slice(0,i))}return o}function rrt(r,t){let e=-1;const n=[];let a;for(;++e0){const Jr=Et.tokenStack[Et.tokenStack.length-1];(Jr[1]||hD).call(Et,void 0,Jr[0])}for(at.position={start:Ba($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:Ba($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re0&&(n.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:n,children:[{type:"text",value:e}]};return t.meta&&(i.data={meta:t.meta}),r.patch(t,i),i=r.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},r.patch(t,i),i}function grt(r,t){const e={type:"element",tagName:"del",properties:{},children:r.all(t)};return r.patch(t,e),r.applyData(t,e)}function yrt(r,t){const e={type:"element",tagName:"em",properties:{},children:r.all(t)};return r.patch(t,e),r.applyData(t,e)}function mrt(r,t){const e=typeof r.options.clobberPrefix=="string"?r.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),a=cl(n.toLowerCase()),i=r.footnoteOrder.indexOf(n);let o,s=r.footnoteCounts.get(n);s===void 0?(s=0,r.footnoteOrder.push(n),o=r.footnoteOrder.length):o=i+1,s+=1,r.footnoteCounts.set(n,s);const l={type:"element",tagName:"a",properties:{href:"#"+e+"fn-"+a,id:e+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};r.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return r.patch(t,u),r.applyData(t,u)}function _rt(r,t){const e={type:"element",tagName:"h"+t.depth,properties:{},children:r.all(t)};return r.patch(t,e),r.applyData(t,e)}function xrt(r,t){if(r.options.allowDangerousHtml){const e={type:"raw",value:t.value};return r.patch(t,e),r.applyData(t,e)}}function SO(r,t){const e=t.referenceType;let n="]";if(e==="collapsed"?n+="[]":e==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const a=r.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=n:a.push({type:"text",value:n}),a}function Srt(r,t){const e=String(t.identifier).toUpperCase(),n=r.definitionById.get(e);if(!n)return SO(r,t);const a={src:cl(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"img",properties:a,children:[]};return r.patch(t,i),r.applyData(t,i)}function brt(r,t){const e={src:cl(t.url)};t.alt!==null&&t.alt!==void 0&&(e.alt=t.alt),t.title!==null&&t.title!==void 0&&(e.title=t.title);const n={type:"element",tagName:"img",properties:e,children:[]};return r.patch(t,n),r.applyData(t,n)}function wrt(r,t){const e={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};r.patch(t,e);const n={type:"element",tagName:"code",properties:{},children:[e]};return r.patch(t,n),r.applyData(t,n)}function Trt(r,t){const e=String(t.identifier).toUpperCase(),n=r.definitionById.get(e);if(!n)return SO(r,t);const a={href:cl(n.url||"")};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"a",properties:a,children:r.all(t)};return r.patch(t,i),r.applyData(t,i)}function Crt(r,t){const e={href:cl(t.url)};t.title!==null&&t.title!==void 0&&(e.title=t.title);const n={type:"element",tagName:"a",properties:e,children:r.all(t)};return r.patch(t,n),r.applyData(t,n)}function Art(r,t,e){const n=r.all(t),a=e?Mrt(e):bO(t),i={},o=[];if(typeof t.checked=="boolean"){const f=n[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},n.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s1}function Drt(r,t){const e={},n=r.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(e.start=t.start);++a0){const o={type:"element",tagName:"tbody",properties:{},children:r.wrap(e,!0)},s=Y1(t.children[1]),l=rO(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),a.push(o)}const i={type:"element",tagName:"table",properties:{},children:r.wrap(a,!0)};return r.patch(t,i),r.applyData(t,i)}function Ert(r,t,e){const n=e?e.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",o=e&&e.type==="table"?e.align:void 0,s=o?o.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),n[0]),a=n.index+n[0].length,n=e.exec(t);return i.push(dD(t.slice(a),a>0,!1)),i.join("")}function dD(r,t,e){let n=0,a=r.length;if(t){let i=r.codePointAt(n);for(;i===vD||i===pD;)n++,i=r.codePointAt(n)}if(e){let i=r.codePointAt(a-1);for(;i===vD||i===pD;)a--,i=r.codePointAt(a-1)}return a>n?r.slice(n,a):""}function Nrt(r,t){const e={type:"text",value:Ort(String(t.value))};return r.patch(t,e),r.applyData(t,e)}function Brt(r,t){const e={type:"element",tagName:"hr",properties:{},children:[]};return r.patch(t,e),r.applyData(t,e)}const zrt={blockquote:vrt,break:prt,code:drt,delete:grt,emphasis:yrt,footnoteReference:mrt,heading:_rt,html:xrt,imageReference:Srt,image:brt,inlineCode:wrt,linkReference:Trt,link:Crt,listItem:Art,list:Drt,paragraph:Lrt,root:Irt,strong:krt,table:Prt,tableCell:Rrt,tableRow:Ert,text:Nrt,thematicBreak:Brt,toml:Fc,yaml:Fc,definition:Fc,footnoteDefinition:Fc};function Fc(){}const wO=-1,lp=0,Au=1,mv=2,J1=3,Q1=4,tx=5,ex=6,TO=7,CO=8,gD=typeof self=="object"?self:globalThis,Vrt=(r,t)=>{const e=(a,i)=>(r.set(i,a),a),n=a=>{if(r.has(a))return r.get(a);const[i,o]=t[a];switch(i){case lp:case wO:return e(o,a);case Au:{const s=e([],a);for(const l of o)s.push(n(l));return s}case mv:{const s=e({},a);for(const[l,u]of o)s[n(l)]=n(u);return s}case J1:return e(new Date(o),a);case Q1:{const{source:s,flags:l}=o;return e(new RegExp(s,l),a)}case tx:{const s=e(new Map,a);for(const[l,u]of o)s.set(n(l),n(u));return s}case ex:{const s=e(new Set,a);for(const l of o)s.add(n(l));return s}case TO:{const{name:s,message:l}=o;return e(new gD[s](l),a)}case CO:return e(BigInt(o),a);case"BigInt":return e(Object(BigInt(o)),a);case"ArrayBuffer":return e(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return e(new DataView(s),o)}}return e(new gD[i](o),a)};return n},yD=r=>Vrt(new Map,r)(0),cs="",{toString:Frt}={},{keys:Grt}=Object,ql=r=>{const t=typeof r;if(t!=="object"||!r)return[lp,t];const e=Frt.call(r).slice(8,-1);switch(e){case"Array":return[Au,cs];case"Object":return[mv,cs];case"Date":return[J1,cs];case"RegExp":return[Q1,cs];case"Map":return[tx,cs];case"Set":return[ex,cs];case"DataView":return[Au,e]}return e.includes("Array")?[Au,e]:e.includes("Error")?[TO,e]:[mv,e]},Gc=([r,t])=>r===lp&&(t==="function"||t==="symbol"),Hrt=(r,t,e,n)=>{const a=(o,s)=>{const l=n.push(o)-1;return e.set(s,l),l},i=o=>{if(e.has(o))return e.get(o);let[s,l]=ql(o);switch(s){case lp:{let f=o;switch(l){case"bigint":s=CO,f=o.toString();break;case"function":case"symbol":if(r)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return a([wO],o)}return a([s,f],o)}case Au:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),a([l,[...h]],o)}const f=[],c=a([s,f],o);for(const h of o)f.push(i(h));return c}case mv:{if(l)switch(l){case"BigInt":return a([l,o.toString()],o);case"Boolean":case"Number":case"String":return a([l,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const f=[],c=a([s,f],o);for(const h of Grt(o))(r||!Gc(ql(o[h])))&&f.push([i(h),i(o[h])]);return c}case J1:return a([s,o.toISOString()],o);case Q1:{const{source:f,flags:c}=o;return a([s,{source:f,flags:c}],o)}case tx:{const f=[],c=a([s,f],o);for(const[h,v]of o)(r||!(Gc(ql(h))||Gc(ql(v))))&&f.push([i(h),i(v)]);return c}case ex:{const f=[],c=a([s,f],o);for(const h of o)(r||!Gc(ql(h)))&&f.push(i(h));return c}}const{message:u}=o;return a([s,{name:l,message:u}],o)};return i},mD=(r,{json:t,lossy:e}={})=>{const n=[];return Hrt(!(t||e),!!t,new Map,n)(r),n},_v=typeof structuredClone=="function"?(r,t)=>t&&("json"in t||"lossy"in t)?yD(mD(r,t)):structuredClone(r):(r,t)=>yD(mD(r,t));function Wrt(r,t){const e=[{type:"text",value:"↩"}];return t>1&&e.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),e}function Urt(r,t){return"Back to reference "+(r+1)+(t>1?"-"+t:"")}function Yrt(r){const t=typeof r.options.clobberPrefix=="string"?r.options.clobberPrefix:"user-content-",e=r.options.footnoteBackContent||Wrt,n=r.options.footnoteBackLabel||Urt,a=r.options.footnoteLabel||"Footnotes",i=r.options.footnoteLabelTagName||"h2",o=r.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&p.push({type:"text",value:" "});let m=typeof e=="string"?e:e(l,v);typeof m=="string"&&(m={type:"text",value:m}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,v),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const g=f[f.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const m=g.children[g.children.length-1];m&&m.type==="text"?m.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...p)}else f.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:r.wrap(f,!0)};r.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{..._v(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:r.wrap(s,!0)},{type:"text",value:` `}]}}const AO=(function(r){if(r==null)return jrt;if(typeof r=="function")return up(r);if(typeof r=="object")return Array.isArray(r)?$rt(r):Xrt(r);if(typeof r=="string")return Zrt(r);throw new Error("Expected function, string, or object as test")});function $rt(r){const t=[];let e=-1;for(;++e":""))+")"})}return h;function h(){let v=MO,p,d,g;if((!t||i(l,u,f[f.length-1]||void 0))&&(v=tnt(e(l,f)),v[0]===_D))return v;if("children"in l&&l.children){const y=l;if(y.children&&v[0]!==Jrt)for(d=(n?y.children.length:-1)+o,g=f.concat(y);d>-1&&d0&&e.push({type:"text",value:` `}),e}function xD(r){let t=0,e=r.charCodeAt(t);for(;e===9||e===32;)t++,e=r.charCodeAt(t);return r.slice(t)}function SD(r,t){const e=rnt(r,t),n=e.one(r,void 0),a=Yrt(e),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&i.children.push({type:"text",value:` `},a),i}function snt(r,t){return r&&"run"in r?async function(e,n){const a=SD(e,{file:n,...t});await r.run(a,n)}:function(e,n){return SD(e,{file:n,...r||t})}}function bD(r){if(r)throw r}var Ug,wD;function lnt(){if(wD)return Ug;wD=1;var r=Object.prototype.hasOwnProperty,t=Object.prototype.toString,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=r.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&r.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var h;for(h in u);return typeof h>"u"||r.call(u,h)},o=function(u,f){e&&f.name==="__proto__"?e(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(r.call(u,f)){if(n)return n(u,f).value}else return;return u[f]};return Ug=function l(){var u,f,c,h,v,p,d=arguments[0],g=1,y=arguments.length,m=!1;for(typeof d=="boolean"&&(m=d,d=arguments[1]||{},g=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});go.length;let l;s&&o.push(a);try{l=r.apply(this,o)}catch(u){const f=u;if(s&&e)throw f;return a(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,a):l instanceof Error?a(l):i(l))}function a(o,...s){e||(e=!0,t(o,...s))}function i(o){a(null,o)}}const An={basename:hnt,dirname:vnt,extname:pnt,join:dnt,sep:"/"};function hnt(r,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cf(r);let e=0,n=-1,a=r.length,i;if(t===void 0||t.length===0||t.length>r.length){for(;a--;)if(r.codePointAt(a)===47){if(i){e=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":r.slice(e,n)}if(t===r)return"";let o=-1,s=t.length-1;for(;a--;)if(r.codePointAt(a)===47){if(i){e=a+1;break}}else o<0&&(i=!0,o=a+1),s>-1&&(r.codePointAt(a)===t.codePointAt(s--)?s<0&&(n=a):(s=-1,n=o));return e===n?n=o:n<0&&(n=r.length),r.slice(e,n)}function vnt(r){if(Cf(r),r.length===0)return".";let t=-1,e=r.length,n;for(;--e;)if(r.codePointAt(e)===47){if(n){t=e;break}}else n||(n=!0);return t<0?r.codePointAt(0)===47?"/":".":t===1&&r.codePointAt(0)===47?"//":r.slice(0,t)}function pnt(r){Cf(r);let t=r.length,e=-1,n=0,a=-1,i=0,o;for(;t--;){const s=r.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}e<0&&(o=!0,e=t+1),s===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||e<0||i===0||i===1&&a===e-1&&a===n+1?"":r.slice(a,e)}function dnt(...r){let t=-1,e;for(;++t0&&r.codePointAt(r.length-1)===47&&(e+="/"),t?"/"+e:e}function ynt(r,t){let e="",n=0,a=-1,i=0,o=-1,s,l;for(;++o<=r.length;){if(o2){if(l=e.lastIndexOf("/"),l!==e.length-1){l<0?(e="",n=0):(e=e.slice(0,l),n=e.length-1-e.lastIndexOf("/")),a=o,i=0;continue}}else if(e.length>0){e="",n=0,a=o,i=0;continue}}t&&(e=e.length>0?e+"/..":"..",n=2)}else e.length>0?e+="/"+r.slice(a+1,o):e=r.slice(a+1,o),n=o-a-1;a=o,i=0}else s===46&&i>-1?i++:i=-1}return e}function Cf(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}const mnt={cwd:_nt};function _nt(){return"/"}function x0(r){return!!(r!==null&&typeof r=="object"&&"href"in r&&r.href&&"protocol"in r&&r.protocol&&r.auth===void 0)}function xnt(r){if(typeof r=="string")r=new URL(r);else if(!x0(r)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+r+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(r.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Snt(r)}function Snt(r){if(r.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=r.pathname;let e=-1;for(;++e0){let[v,...p]=f;const d=n[h][1];_0(d)&&_0(v)&&(v=Yg(!0,d,v)),n[h]=[u,v,...p]}}}}const Cnt=new rx().freeze();function jg(r,t){if(typeof t!="function")throw new TypeError("Cannot `"+r+"` without `parser`")}function qg(r,t){if(typeof t!="function")throw new TypeError("Cannot `"+r+"` without `compiler`")}function Kg(r,t){if(t)throw new Error("Cannot call `"+r+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function CD(r){if(!_0(r)||typeof r.type!="string")throw new TypeError("Expected node, got `"+r+"`")}function AD(r,t,e){if(!e)throw new Error("`"+r+"` finished async. Use `"+t+"` instead")}function Hc(r){return Ant(r)?r:new LO(r)}function Ant(r){return!!(r&&typeof r=="object"&&"message"in r&&"messages"in r)}function Mnt(r){return typeof r=="string"||Dnt(r)}function Dnt(r){return!!(r&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r)}const Lnt="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",MD=[],DD={allowDangerousHtml:!0},Int=/^(https?|ircs?|mailto|xmpp)$/i,knt=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pnt(r){const t=Ent(r),e=Rnt(r);return Ont(t.runSync(t.parse(e),e),r)}function Ent(r){const t=r.rehypePlugins||MD,e=r.remarkPlugins||MD,n=r.remarkRehypeOptions?{...r.remarkRehypeOptions,...DD}:DD;return Cnt().use(hrt).use(e).use(snt,n).use(t)}function Rnt(r){const t=r.children||"",e=new LO;return typeof t=="string"&&(e.value=t),e}function Ont(r,t){const e=t.allowedElements,n=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Nnt;for(const f of knt)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Lnt+f.id,void 0);return DO(r,u),WQ(r,{Fragment:X.Fragment,components:a,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0});function u(f,c,h){if(f.type==="raw"&&h&&typeof c=="number")return o?h.children.splice(c,1):h.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let v;for(v in Gg)if(Object.hasOwn(Gg,v)&&Object.hasOwn(f.properties,v)){const p=f.properties[v],d=Gg[v];(d===null||d.includes(f.tagName))&&(f.properties[v]=l(String(p||""),v,f))}}if(f.type==="element"){let v=e?!e.includes(f.tagName):i?i.includes(f.tagName):!1;if(!v&&n&&typeof c=="number"&&(v=!n(f,c,h)),v&&h&&typeof c=="number")return s&&f.children?h.children.splice(c,1,...f.children):h.children.splice(c,1),c}}}function Nnt(r){const t=r.indexOf(":"),e=r.indexOf("?"),n=r.indexOf("#"),a=r.indexOf("/");return t===-1||a!==-1&&t>a||e!==-1&&t>e||n!==-1&&t>n||Int.test(r.slice(0,t))?r:""}function Bnt(r){const t=Le.c(2);let e;return t[0]!==r.p.data?(e=X.jsx("div",{className:"prose p-2",children:X.jsx(Pnt,{children:r.p.data})}),t[0]=r.p.data,t[1]=e):e=t[1],e}function znt(r,t){if(r.length===0)return!1;const e=r.map(n=>n[t]).filter(n=>n!==""&&n!==null&&n!==void 0);return e.length===0?!1:e.every(n=>!isNaN(parseFloat(n)))}function Vnt(r){const t=Le.c(60),[e,n]=ge.useState(!1),{tableDensity:a}=eN();let i,o,s,l,u,f,c,h,v,p,d,g,y,m;if(t[0]!==e||t[1]!==r.p.data||t[2]!==a){y=JSON.parse(r.p.data);let I;t[17]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{n(Fnt)},t[17]=I):I=t[17],m=I;const L=async G=>{const H=y.columns.at(G)??"",O=VO(y.rows,G);await navigator.clipboard.writeText(H+` `+O.join(` `))};l=y.columns.map((G,H)=>znt(y.rows,H)),d="rounded-md border";let P;t[18]===Symbol.for("react.memo_cache_sentinel")?(P=()=>m(),t[18]=P):P=t[18];let E,R;t[19]===Symbol.for("react.memo_cache_sentinel")?(E=X.jsxs(X.Fragment,{children:[X.jsx(UM,{})," Minimize"]}),R=X.jsxs(X.Fragment,{children:[X.jsx(lQ,{})," Expand"]}),t[19]=E,t[20]=R):(E=t[19],R=t[20]);let B;t[21]!==e?(B=FO(e,E,R),t[21]=e,t[22]=B):B=t[22];let N;t[23]!==B?(N=X.jsx(fu,{onClick:P,variant:"ghost",className:"mr-auto",children:B}),t[23]=B,t[24]=N):N=t[24];let z;t[25]===Symbol.for("react.memo_cache_sentinel")?(z=X.jsx(HR,{}),t[25]=z):z=t[25],g=X.jsxs("div",{className:"flex w-full justify-end pb-2",children:[N,X.jsx(vQ,{onCopy:()=>navigator.clipboard.writeText(ox(y)),helpText:"Copy table"}),X.jsxs(fu,{onClick:()=>GO("table.tsv",ox(y)),variant:"ghost",children:[z,"Download"]})]});const k=e?"none":"400px";t[26]!==k?(v={maxHeight:k},t[26]=k,t[27]=v):v=t[27],p="relative overflow-auto",s=YR,f="relative",c=a,h=!!y.caption&&X.jsx(pQ,{children:y.caption}),o=$R,i=nf,u=y.columns.map((G,H)=>X.jsx(ZR,{onClick:()=>L(H),className:l[H]?"text-right":"",children:X.jsxs(qO,{children:[X.jsx(KO,{children:G}),X.jsx(JO,{children:X.jsx("p",{children:"Click to copy column to clipboard"})})]})},H)),t[0]=e,t[1]=r.p.data,t[2]=a,t[3]=i,t[4]=o,t[5]=s,t[6]=l,t[7]=u,t[8]=f,t[9]=c,t[10]=h,t[11]=v,t[12]=p,t[13]=d,t[14]=g,t[15]=y,t[16]=m}else i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],f=t[8],c=t[9],h=t[10],v=t[11],p=t[12],d=t[13],g=t[14],y=t[15],m=t[16];let _;t[28]!==i||t[29]!==u?(_=X.jsx(i,{children:u}),t[28]=i,t[29]=u,t[30]=_):_=t[30];let x;t[31]!==o||t[32]!==_?(x=X.jsx(o,{children:_}),t[31]=o,t[32]=_,t[33]=x):x=t[33];let b;if(t[34]!==l||t[35]!==y.rows){let I;t[37]!==l?(I=(L,P)=>X.jsx(nf,{children:L.map((E,R)=>X.jsx(H1,{className:l[R]?"text-right":"",children:E},R))},P),t[37]=l,t[38]=I):I=t[38],b=y.rows.map(I),t[34]=l,t[35]=y.rows,t[36]=b}else b=t[36];let S;t[39]!==b?(S=X.jsx(XR,{children:b}),t[39]=b,t[40]=S):S=t[40];let w;t[41]!==s||t[42]!==f||t[43]!==S||t[44]!==c||t[45]!==h||t[46]!==x?(w=X.jsxs(s,{className:f,variant:c,children:[h,x,S]}),t[41]=s,t[42]=f,t[43]=S,t[44]=c,t[45]=h,t[46]=x,t[47]=w):w=t[47];let T;t[48]===Symbol.for("react.memo_cache_sentinel")?(T=X.jsx(UM,{}),t[48]=T):T=t[48];let C;t[49]!==m?(C=X.jsx("div",{children:X.jsxs(fu,{onClick:m,variant:"ghost",children:[T," Minimize"]})}),t[49]=m,t[50]=C):C=t[50];let A;t[51]!==w||t[52]!==C||t[53]!==v||t[54]!==p?(A=X.jsxs("div",{style:v,className:p,children:[w,C]}),t[51]=w,t[52]=C,t[53]=v,t[54]=p,t[55]=A):A=t[55];let M;return t[56]!==A||t[57]!==d||t[58]!==g?(M=X.jsxs("div",{className:d,children:[g,A]}),t[56]=A,t[57]=d,t[58]=g,t[59]=M):M=t[59],M}function Fnt(r){return!r}function Gnt(r){const t=Le.c(2);let e;return t[0]!==r.p.data?(e=X.jsx("img",{src:r.p.data}),t[0]=r.p.data,t[1]=e):e=t[1],e}function Hnt(r){const t=Le.c(4);let e;t[0]!==r.p.data?(e=zO(JSON.parse(r.p.data)),t[0]=r.p.data,t[1]=e):e=t[1];const n=e;let a;return t[2]!==n?(a=X.jsx("pre",{children:X.jsx("code",{children:n})}),t[2]=n,t[3]=a):a=t[3],a}function Wnt(r){const t=Le.c(4);let e;t[0]!==r.parts?(e=r.parts.map(Unt),t[0]=r.parts,t[1]=e):e=t[1];let n;return t[2]!==e?(n=X.jsx(X.Fragment,{children:e}),t[2]=e,t[3]=n):n=t[3],n}function Unt(r){return r.mime_type==="text/plain"||r.mime_type==="text/markdown"?X.jsx(Bnt,{p:r},r.uuid):r.mime_type==="image/png"||r.mime_type==="image/jpeg"?X.jsx(Gnt,{p:r},r.uuid):r.mime_type==="application/json;kind=chart"?X.jsx(hQ,{p:r},r.uuid):r.mime_type==="application/json;kind=table"?X.jsx(Vnt,{p:r},r.uuid):r.mime_type==="application/json"?X.jsx(Hnt,{p:r},r.uuid):null}function fat(r){const t=Le.c(20),e=r.message.role==="u"?"w-full rounded-sm border border-gray-400 bg-gray-100 shadow-xs":"pl-8";let n;t[0]!==e?(n=ba("relative",e),t[0]=e,t[1]=n):n=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=X.jsx(YO,{asChild:!0,children:X.jsx(oQ,{size:16,className:"cursor-pointer text-gray-400 hover:text-primary"})}),t[2]=a):a=t[2];let i;t[3]!==r?(i=()=>r.onDelete(r.message.uuid),t[3]=r,t[4]=i):i=t[4];let o,s;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=X.jsx(cQ,{className:"text-destructive"}),s=X.jsx("span",{children:"Delete"}),t[5]=o,t[6]=s):(o=t[5],s=t[6]);let l;t[7]!==i?(l=X.jsx("div",{className:"absolute top-1 right-1",children:X.jsxs($O,{children:[a,X.jsx(XO,{children:X.jsx(ZO,{children:X.jsxs(jO,{className:"items-ce flex items-center gap-x-1",onClick:i,children:[o,s]})})})]})}),t[7]=i,t[8]=l):l=t[8];let u;t[9]!==r.message.parts?(u=X.jsx(Wnt,{parts:r.message.parts}),t[9]=r.message.parts,t[10]=u):u=t[10];let f;t[11]!==r.message.created_at?(f=BO(r.message.created_at),t[11]=r.message.created_at,t[12]=f):f=t[12];let c;t[13]!==f?(c=X.jsx("div",{className:"text-right",children:X.jsx("small",{className:"pr-2 pb-2 text-[10px] text-gray-400",children:f})}),t[13]=f,t[14]=c):c=t[14];let h;return t[15]!==n||t[16]!==l||t[17]!==u||t[18]!==c?(h=X.jsxs("div",{className:n,children:[l,u,c]}),t[15]=n,t[16]=l,t[17]=u,t[18]=c,t[19]=h):h=t[19],h}var fp="Collapsible",[Ynt,cat]=nN(fp),[$nt,nx]=Ynt(fp),IO=ge.forwardRef((r,t)=>{const{__scopeCollapsible:e,open:n,defaultOpen:a,disabled:i,onOpenChange:o,...s}=r,[l,u]=rN({prop:n,defaultProp:a??!1,onChange:o,caller:fp});return X.jsx($nt,{scope:e,disabled:i,contentId:QO(),open:l,onOpenToggle:ge.useCallback(()=>u(f=>!f),[u]),children:X.jsx(S0.div,{"data-state":ix(l),"data-disabled":i?"":void 0,...s,ref:t})})});IO.displayName=fp;var kO="CollapsibleTrigger",PO=ge.forwardRef((r,t)=>{const{__scopeCollapsible:e,...n}=r,a=nx(kO,e);return X.jsx(S0.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":ix(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:aN(r.onClick,a.onOpenToggle)})});PO.displayName=kO;var ax="CollapsibleContent",EO=ge.forwardRef((r,t)=>{const{forceMount:e,...n}=r,a=nx(ax,r.__scopeCollapsible);return X.jsx(iN,{present:e||a.open,children:({present:i})=>X.jsx(Xnt,{...n,ref:t,present:i})})});EO.displayName=ax;var Xnt=ge.forwardRef((r,t)=>{const{__scopeCollapsible:e,present:n,children:a,...i}=r,o=nx(ax,e),[s,l]=ge.useState(n),u=ge.useRef(null),f=HO(t,u),c=ge.useRef(0),h=c.current,v=ge.useRef(0),p=v.current,d=o.open||s,g=ge.useRef(d),y=ge.useRef(void 0);return ge.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),oN(()=>{const m=u.current;if(m){y.current=y.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const _=m.getBoundingClientRect();c.current=_.height,v.current=_.width,g.current||(m.style.transitionDuration=y.current.transitionDuration,m.style.animationName=y.current.animationName),l(n)}},[o.open,n]),X.jsx(S0.div,{"data-state":ix(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!d,...i,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...r.style},children:d&&a})});function ix(r){return r?"open":"closed"}var Znt=IO;function jnt(r){const t=Le.c(4);let e;t[0]!==r?({...e}=r,t[0]=r,t[1]=e):e=t[1];let n;return t[2]!==e?(n=X.jsx(Znt,{"data-slot":"collapsible",...e}),t[2]=e,t[3]=n):n=t[3],n}function qnt(r){const t=Le.c(4);let e;t[0]!==r?({...e}=r,t[0]=r,t[1]=e):e=t[1];let n;return t[2]!==e?(n=X.jsx(PO,{"data-slot":"collapsible-trigger",...e}),t[2]=e,t[3]=n):n=t[3],n}function Knt(r){const t=Le.c(4);let e;t[0]!==r?({...e}=r,t[0]=r,t[1]=e):e=t[1];let n;return t[2]!==e?(n=X.jsx(EO,{"data-slot":"collapsible-content",...e}),t[2]=e,t[3]=n):n=t[3],n}function Jnt(r,t,e){const n={};return r.forEach((a,i)=>{if(e[a]!=="text")return;const o=t.map(l=>l[i]).filter(l=>l!=null&&l!==""),s=new Set(o);s.size<=10&&t.length>=3&&(n[a]=s.size)}),n}function Qnt(r,t,e){const n=t[r]||"unknown";return r in e?{type:"categorical",distinctCount:e[r]}:{type:n}}function tat(r){const t=Le.c(12),{typeInfo:e}=r;let n,a;if(t[0]!==e.type){const u={number:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",text:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",date:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",boolean:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",categorical:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",unknown:"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"};let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f={number:"number",text:"text",date:"date",boolean:"bool",categorical:"categorical",unknown:"?"},t[3]=f):f=t[3],n=f,a=ba("ml-1.5 inline-flex items-center rounded px-1 py-0.5 text-[10px] font-medium",u[e.type]),t[0]=e.type,t[1]=n,t[2]=a}else n=t[1],a=t[2];const i=e.type==="categorical"?`${e.distinctCount} unique values`:e.type,o=n[e.type];let s;t[4]!==e.distinctCount||t[5]!==e.type?(s=e.type==="categorical"&&e.distinctCount!==void 0&&X.jsxs("span",{className:"ml-0.5 opacity-70",children:["(",e.distinctCount,")"]}),t[4]=e.distinctCount,t[5]=e.type,t[6]=s):s=t[6];let l;return t[7]!==a||t[8]!==i||t[9]!==o||t[10]!==s?(l=X.jsxs("span",{className:a,title:i,children:[o,s]}),t[7]=a,t[8]=i,t[9]=o,t[10]=s,t[11]=l):l=t[11],l}function hat(r){const t=Le.c(10),{dataSources:e}=r;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={},t[0]=n):n=t[0];const[a,i]=ge.useState(n);if(e.length===0)return null;let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=c=>{i(h=>({...h,[c]:!h[c]}))},t[1]=o):o=t[1];const s=o;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=X.jsx("p",{className:"text-muted-foreground mb-2 text-xs",children:"Data sources"}),t[2]=l):l=t[2];let u;if(t[3]!==e||t[4]!==a){let c;t[6]!==a?(c=h=>{const v=Jnt(h.columns,h.sample,h.columnTypes||{});return X.jsxs(jnt,{open:a[h.uuid],onOpenChange:()=>s(h.uuid),children:[X.jsxs(qnt,{className:"bg-muted/30 hover:bg-muted/50 flex w-full items-center justify-between rounded-lg border px-3 py-2 text-left transition-colors",children:[X.jsxs("div",{className:"flex items-center gap-2",children:[X.jsx(tN,{className:"text-muted-foreground size-4"}),X.jsx("span",{className:"text-sm font-medium",children:h.title}),h.rowCount!==null&&X.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",h.rowCount.toLocaleString()," rows)"]})]}),X.jsx(nQ,{className:`text-muted-foreground size-4 transition-transform ${a[h.uuid]?"rotate-180":""}`})]}),X.jsx(Knt,{children:X.jsxs("div",{className:"mt-2 overflow-hidden rounded-lg border",children:[X.jsxs(YR,{variant:"compact",children:[X.jsx($R,{children:X.jsx(nf,{className:"bg-muted/30",children:h.columns.map((p,d)=>{const g=Qnt(p,h.columnTypes||{},v);return X.jsx(ZR,{className:"text-xs font-semibold",children:X.jsxs("div",{className:"flex items-center",children:[p,X.jsx(tat,{typeInfo:g})]})},d)})})}),X.jsx(XR,{children:h.sample.length===0?X.jsx(nf,{children:X.jsx(H1,{colSpan:h.columns.length,className:"text-muted-foreground text-center text-xs",children:"No sample data available"})}):h.sample.map(eat)})]}),h.sample.length>0&&X.jsxs("div",{className:"bg-muted/20 text-muted-foreground border-t px-3 py-1.5 text-xs",children:["Showing ",h.sample.length," of"," ",h.rowCount?.toLocaleString()??"?"," rows"]})]})})]},h.uuid)},t[6]=a,t[7]=c):c=t[7],u=e.map(c),t[3]=e,t[4]=a,t[5]=u}else u=t[5];let f;return t[8]!==u?(f=X.jsxs("div",{className:"mb-6 space-y-2",children:[l,u]}),t[8]=u,t[9]=f):f=t[9],f}function eat(r,t){return X.jsx(nf,{children:r.map(rat)},t)}function rat(r,t){return X.jsx(H1,{className:"text-muted-foreground max-w-[200px] truncate text-xs",title:r,children:r},t)}export{fat as C,hat as D,vQ as a};