@ovalbee/reportifact 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/{Chart.vue_vue_type_style_index_0_lang-BYILFTfl.js → Chart.vue_vue_type_style_index_0_lang-Bp14Es_r.js} +2341 -2290
- package/dist/Chart.vue_vue_type_style_index_0_lang-Dj7m6i3v.cjs +1 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BTA6fIp9.js +2640 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-CZ8Y2pXG.cjs +2 -0
- package/dist/index-3DTuh2Dr.cjs +47 -0
- package/dist/{index-DFz2A8yJ.js → index-DevYhXSC.js} +9252 -8377
- package/dist/portable/ReportifactFigure.vue.d.ts +4 -0
- package/dist/reportifact.cjs +1 -1
- package/dist/reportifact.js +3 -3
- package/dist/style.css +1 -1
- package/dist/widgets/chart.cjs +1 -1
- package/dist/widgets/chart.js +1 -1
- package/dist/widgets/figure.cjs +1 -1
- package/dist/widgets/figure.js +37 -37
- package/dist/widgets/timeline.cjs +1 -1
- package/dist/widgets/timeline.js +1 -1
- package/package.json +9 -8
- package/dist/Chart.vue_vue_type_style_index_0_lang-B4novMFC.cjs +0 -1
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs +0 -2
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BnrgKBMh.js +0 -2598
- package/dist/index-DmTzvbys.cjs +0 -47
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const W=require("vue"),s=require("./index-DmTzvbys.cjs"),gr=require("./useFetch-BfOAq-Kg.cjs"),dr=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs");function Ut(i,r,e,t,a,n,o,l){var u=a-i,h=n-r,c=e-i,v=t-r,g=Math.sqrt(c*c+v*v);c/=g,v/=g;var p=u*c+h*v,f=p/g;f*=g;var d=o[0]=i+f*c,S=o[1]=r+f*v;return Math.sqrt((d-a)*(d-a)+(S-n)*(S-n))}var ae=new s.Point,U=new s.Point,$=new s.Point,ie=new s.Point,q=new s.Point,Te=[],Z=new s.Point;function mr(i,r){if(r<=180&&r>0){r=r/180*Math.PI,ae.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),s.Point.sub(ie,ae,U),s.Point.sub(q,$,U);var e=ie.len(),t=q.len();if(!(e<.001||t<.001)){ie.scale(1/e),q.scale(1/t);var a=ie.dot(q),n=Math.cos(r);if(n<a){var o=Ut(U.x,U.y,$.x,$.y,ae.x,ae.y,Te);Z.fromArray(Te),Z.scaleAndAdd(q,o/Math.tan(Math.PI-r));var l=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(l))return;l<0?s.Point.copy(Z,U):l>1&&s.Point.copy(Z,$),Z.toArray(i[1])}}}}function yr(i,r,e){if(e<=180&&e>0){e=e/180*Math.PI,ae.fromArray(i[0]),U.fromArray(i[1]),$.fromArray(i[2]),s.Point.sub(ie,U,ae),s.Point.sub(q,$,U);var t=ie.len(),a=q.len();if(!(t<.001||a<.001)){ie.scale(1/t),q.scale(1/a);var n=ie.dot(r),o=Math.cos(e);if(n<o){var l=Ut(U.x,U.y,$.x,$.y,ae.x,ae.y,Te);Z.fromArray(Te);var u=Math.PI/2,h=Math.acos(q.dot(r)),c=u+h-e;if(c>=u)s.Point.copy(Z,$);else{Z.scaleAndAdd(q,l/Math.tan(Math.PI/2-c));var v=$.x!==U.x?(Z.x-U.x)/($.x-U.x):(Z.y-U.y)/($.y-U.y);if(isNaN(v))return;v<0?s.Point.copy(Z,U):v>1&&s.Point.copy(Z,$)}Z.toArray(i[1])}}}}function Ge(i,r,e,t){var a=e==="normal",n=a?i:i.ensureState(e);n.ignore=r;var o=t.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var l=t.getModel("lineStyle").getLineStyle();a?i.useStyle(l):n.style=l}function Sr(i,r){var e=r.smooth,t=r.points;if(t)if(i.moveTo(t[0][0],t[0][1]),e>0&&t.length>=3){var a=s.dist(t[0],t[1]),n=s.dist(t[1],t[2]);if(!a||!n){i.lineTo(t[1][0],t[1][1]),i.lineTo(t[2][0],t[2][1]);return}var o=Math.min(a,n)*e,l=s.lerp([],t[1],t[0],o/a),u=s.lerp([],t[1],t[2],o/n),h=s.lerp([],l,u,.5);i.bezierCurveTo(l[0],l[1],l[0],l[1],h[0],h[1]),i.bezierCurveTo(u[0],u[1],u[0],u[1],t[2][0],t[2][1])}else for(var c=1;c<t.length;c++)i.lineTo(t[c][0],t[c][1])}function br(i,r,e){var t=i.getTextGuideLine(),a=i.getTextContent();if(!a){t&&i.removeTextGuideLine();return}for(var n=r.normal,o=n.get("show"),l=a.ignore,u=0;u<s.DISPLAY_STATES.length;u++){var h=s.DISPLAY_STATES[u],c=r[h],v=h==="normal";if(c){var g=c.get("show"),p=v?l:s.retrieve2(a.states[h]&&a.states[h].ignore,l);if(p||!s.retrieve2(g,o)){var f=v?t:t&&t.states[h];f&&(f.ignore=!0),t&&Ge(t,!0,h,c);continue}t||(t=new s.Polyline,i.setTextGuideLine(t),!v&&(l||!o)&&Ge(t,!0,"normal",r.normal),i.stateProxy&&(t.stateProxy=i.stateProxy)),Ge(t,!1,h,c)}}if(t){s.defaults(t.style,e),t.style.fill=null;var d=n.get("showAbove"),S=i.textGuideLineConfig=i.textGuideLineConfig||{};S.showAbove=d||!1,t.buildPath=Sr}}function xr(i,r){r=r||"labelLine";for(var e={normal:i.getModel(r)},t=0;t<s.SPECIAL_STATES.length;t++){var a=s.SPECIAL_STATES[t];e[a]=i.getModel([a,r])}return e}var _r=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var t=e.coordinateSystem;if(t!=="polar"&&t!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return s.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getLegendIcon=function(e){var t=new s.Group,a=s.createSymbol("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(a),a.setStyle(e.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=n==="none"?"circle":n,u=e.itemHeight*.8,h=s.createSymbol(l,(e.itemWidth-u)/2,(e.itemHeight-u)/2,u,u,e.itemStyle.fill);t.add(h),h.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return h.rotation=c*Math.PI/180,h.setOrigin([e.itemWidth/2,e.itemHeight/2]),l.indexOf("empty")>-1&&(h.style.stroke=h.style.fill,h.style.fill=s.tokens.color.neutral00,h.style.lineWidth=2),t},r.type="series.line",r.dependencies=["grid","polar"],r.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},r})(s.SeriesModel),Ke=(function(i){s.__extends(r,i);function r(e,t,a,n){var o=i.call(this)||this;return o.updateData(e,t,a,n),o}return r.prototype._createSymbol=function(e,t,a,n,o,l){this.removeAll();var u=s.createSymbol(e,-1,-1,2,2,null,l);u.attr({z2:s.retrieve2(o,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),u.drift=Ar,this._symbolType=e,this.add(u)},r.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},r.prototype.getSymbolType=function(){return this._symbolType},r.prototype.getSymbolPath=function(){return this.childAt(0)},r.prototype.highlight=function(){s.enterEmphasis(this.childAt(0))},r.prototype.downplay=function(){s.leaveEmphasis(this.childAt(0))},r.prototype.setZ=function(e,t){var a=this.childAt(0);a.zlevel=e,a.z=t},r.prototype.setDraggable=function(e,t){var a=this.childAt(0);a.draggable=e,a.cursor=!t&&e?"move":a.cursor},r.prototype.updateData=function(e,t,a,n){this.silent=!1;var o=e.getItemVisual(t,"symbol")||"circle",l=e.hostModel,u=r.getSymbolSize(e,t),h=r.getSymbolZ2(e,t),c=o!==this._symbolType,v=n&&n.disableAnimation;if(c){var g=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(o,e,t,u,h,g)}else{var p=this.childAt(0);p.silent=!1;var f={scaleX:u[0]/2,scaleY:u[1]/2};v?p.attr(f):s.updateProps(p,f,l,t),s.saveOldStyle(p)}if(this._updateCommon(e,t,u,a,n),c){var p=this.childAt(0);if(!v){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,s.initProps(p,f,l,t)}}v&&this.childAt(0).stopAnimation("leave")},r.prototype._updateCommon=function(e,t,a,n,o){var l=this.childAt(0),u=e.hostModel,h,c,v,g,p,f,d,S,m;if(n&&(h=n.emphasisItemStyle,c=n.blurItemStyle,v=n.selectItemStyle,g=n.focus,p=n.blurScope,d=n.labelStatesModels,S=n.hoverScale,m=n.cursorStyle,f=n.emphasisDisabled),!n||e.hasItemOption){var y=n&&n.itemModel?n.itemModel:e.getItemModel(t),b=y.getModel("emphasis");h=b.getModel("itemStyle").getItemStyle(),v=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),g=b.get("focus"),p=b.get("blurScope"),f=b.get("disabled"),d=s.getLabelStatesModels(y),S=b.getShallow("scale"),m=y.getShallow("cursor")}var I=e.getItemVisual(t,"symbolRotate");l.attr("rotation",(I||0)*Math.PI/180||0);var D=s.normalizeSymbolOffset(e.getItemVisual(t,"symbolOffset"),a);D&&(l.x=D[0],l.y=D[1]),m&&l.attr("cursor",m);var _=e.getItemVisual(t,"style"),x=_.fill;if(l instanceof s.ZRImage){var A=l.style;l.useStyle(s.extend({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},_))}else l.__isEmptyBrush?l.useStyle(s.extend({},_)):l.useStyle(_),l.style.decal=null,l.setColor(x,o&&o.symbolInnerColor),l.style.strokeNoScale=!0;var C=e.getItemVisual(t,"liftZ"),w=this._z2;C!=null?w==null&&(this._z2=l.z2,l.z2+=C):w!=null&&(l.z2=w,this._z2=null);var M=o&&o.useNameLabel;s.setLabelStyle(l,d,{labelFetcher:u,labelDataIndex:t,defaultText:L,inheritColor:x,defaultOpacity:_.opacity});function L(T){return M?e.getName(T):s.getDefaultLabel(e,T)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var P=l.ensureState("emphasis");P.style=h,l.ensureState("select").style=v,l.ensureState("blur").style=c;var E=S==null||S===!0?Math.max(1.1,3/this._sizeY):isFinite(S)&&S>0?+S:1;P.scaleX=this._sizeX*E,P.scaleY=this._sizeY*E,this.setSymbolScale(1),s.toggleHoverEmphasis(this,g,p,f)},r.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},r.prototype.fadeOut=function(e,t,a){var n=this.childAt(0),o=s.getECData(this).dataIndex,l=a&&a.animation;if(this.silent=n.silent=!0,a&&a.fadeLabel){var u=n.getTextContent();u&&s.removeElement(u,{style:{opacity:0}},t,{dataIndex:o,removeOpt:l,cb:function(){n.removeTextContent()}})}else n.removeTextContent();s.removeElement(n,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:l})},r.getSymbolSize=function(e,t){return s.normalizeSymbolSize(e.getItemVisual(t,"symbolSize"))},r.getSymbolZ2=function(e,t){return e.getItemVisual(t,"z2")},r})(s.Group);function Ar(i,r){this.parent.drift(i,r)}function He(i,r,e,t){return r&&!isNaN(r[0])&&!isNaN(r[1])&&!(t.isIgnore&&t.isIgnore(e))&&!(t.clipShape&&!t.clipShape.contain(r[0],r[1]))&&i.getItemVisual(e,"symbol")!=="none"}function at(i){return i!=null&&!s.isObject(i)&&(i={isIgnore:i}),i||{}}function it(i){var r=i.hostModel,e=r.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:r.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:r.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:s.getLabelStatesModels(r),cursorStyle:r.get("cursor")}}var wr=(function(){function i(r){this.group=new s.Group,this._SymbolCtor=r||Ke}return i.prototype.updateData=function(r,e){this._progressiveEls=null,e=at(e);var t=this.group,a=r.hostModel,n=this._data,o=this._SymbolCtor,l=e.disableAnimation,u=it(r),h={disableAnimation:l},c=e.getSymbolPoint||function(v){return r.getItemLayout(v)};n||t.removeAll(),r.diff(n).add(function(v){var g=c(v);if(He(r,g,v,e)){var p=new o(r,v,u,h);p.setPosition(g),r.setItemGraphicEl(v,p),t.add(p)}}).update(function(v,g){var p=n.getItemGraphicEl(g),f=c(v);if(!He(r,f,v,e)){t.remove(p);return}var d=r.getItemVisual(v,"symbol")||"circle",S=p&&p.getSymbolType&&p.getSymbolType();if(!p||S&&S!==d)t.remove(p),p=new o(r,v,u,h),p.setPosition(f);else{p.updateData(r,v,u,h);var m={x:f[0],y:f[1]};l?p.attr(m):s.updateProps(p,m,a)}t.add(p),r.setItemGraphicEl(v,p)}).remove(function(v){var g=n.getItemGraphicEl(v);g&&g.fadeOut(function(){t.remove(g)},a)}).execute(),this._getSymbolPoint=c,this._data=r},i.prototype.updateLayout=function(){var r=this,e=this._data;e&&e.eachItemGraphicEl(function(t,a){var n=r._getSymbolPoint(a);t.setPosition(n),t.markRedraw()})},i.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=it(r),this._data=null,this.group.removeAll()},i.prototype.incrementalUpdate=function(r,e,t){this._progressiveEls=[],t=at(t);function a(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var n=r.start;n<r.end;n++){var o=e.getItemLayout(n);if(He(e,o,n,t)){var l=new this._SymbolCtor(e,n,this._seriesScope);l.traverse(a),l.setPosition(o),this.group.add(l),e.setItemGraphicEl(n,l),this._progressiveEls.push(l)}}},i.prototype.eachRendered=function(r){s.traverseElements(this._progressiveEls||this.group,r)},i.prototype.remove=function(r){var e=this.group,t=this._data;t&&r?t.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)},t.hostModel)}):e.removeAll()},i})();function $t(i,r,e){var t=i.getBaseAxis(),a=i.getOtherAxis(t),n=Mr(a,e),o=t.dim,l=a.dim,u=r.mapDimension(l),h=r.mapDimension(o),c=l==="x"||l==="radius"?1:0,v=s.map(i.dimensions,function(f){return r.mapDimension(f)}),g=!1,p=r.getCalculationInfo("stackResultDimension");return s.isDimensionStacked(r,v[0])&&(g=!0,v[0]=p),s.isDimensionStacked(r,v[1])&&(g=!0,v[1]=p),{dataDimsForPoint:v,valueStart:n,valueAxisDim:l,baseAxisDim:o,stacked:!!g,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:r.getCalculationInfo("stackedOverDimension")}}function Mr(i,r){var e=0,t=i.scale.getExtent();return r==="start"?e=t[0]:r==="end"?e=t[1]:s.isNumber(r)&&!isNaN(r)?e=r:t[0]>0?e=t[0]:t[1]<0&&(e=t[1]),e}function Xt(i,r,e,t){var a=NaN;i.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),t)),isNaN(a)&&(a=i.valueStart);var n=i.baseDataOffset,o=[];return o[n]=e.get(i.baseDim,t),o[1-n]=a,r.dataToPoint(o)}function Dr(i,r){var e=[];return r.diff(i).add(function(t){e.push({cmd:"+",idx:t})}).update(function(t,a){e.push({cmd:"=",idx:a,idx1:t})}).remove(function(t){e.push({cmd:"-",idx:t})}).execute(),e}function Ir(i,r,e,t,a,n,o,l){for(var u=Dr(i,r),h=[],c=[],v=[],g=[],p=[],f=[],d=[],S=$t(a,r,o),m=i.getLayout("points")||[],y=r.getLayout("points")||[],b=0;b<u.length;b++){var I=u[b],D=!0,_=void 0,x=void 0;switch(I.cmd){case"=":_=I.idx*2,x=I.idx1*2;var A=m[_],C=m[_+1],w=y[x],M=y[x+1];(isNaN(A)||isNaN(C))&&(A=w,C=M),h.push(A,C),c.push(w,M),v.push(e[_],e[_+1]),g.push(t[x],t[x+1]),d.push(r.getRawIndex(I.idx1));break;case"+":var L=I.idx,P=S.dataDimsForPoint,E=a.dataToPoint([r.get(P[0],L),r.get(P[1],L)]);x=L*2,h.push(E[0],E[1]),c.push(y[x],y[x+1]);var T=Xt(S,a,r,L);v.push(T[0],T[1]),g.push(t[x],t[x+1]),d.push(r.getRawIndex(L));break;case"-":D=!1}D&&(p.push(I),f.push(f.length))}f.sort(function(B,J){return d[B]-d[J]});for(var k=h.length,N=s.createFloat32Array(k),V=s.createFloat32Array(k),O=s.createFloat32Array(k),R=s.createFloat32Array(k),z=[],b=0;b<f.length;b++){var G=f[b],H=b*2,F=G*2;N[H]=h[F],N[H+1]=h[F+1],V[H]=c[F],V[H+1]=c[F+1],O[H]=v[F],O[H+1]=v[F+1],R[H]=g[F],R[H+1]=g[F+1],z[b]=p[G]}return{current:N,next:V,stackedOnCurrent:O,stackedOnNext:R,status:z}}var ee=Math.min,te=Math.max;function oe(i,r){return isNaN(i)||isNaN(r)}function Ze(i,r,e,t,a,n,o,l,u){for(var h,c,v,g,p,f,d=e,S=0;S<t;S++){var m=r[d*2],y=r[d*2+1];if(d>=a||d<0)break;if(oe(m,y)){if(u){d+=n;continue}break}if(d===e)i[n>0?"moveTo":"lineTo"](m,y),v=m,g=y;else{var b=m-h,I=y-c;if(b*b+I*I<.5){d+=n;continue}if(o>0){for(var D=d+n,_=r[D*2],x=r[D*2+1];_===m&&x===y&&S<t;)S++,D+=n,d+=n,_=r[D*2],x=r[D*2+1],m=r[d*2],y=r[d*2+1],b=m-h,I=y-c;var A=S+1;if(u)for(;oe(_,x)&&A<t;)A++,D+=n,_=r[D*2],x=r[D*2+1];var C=.5,w=0,M=0,L=void 0,P=void 0;if(A>=t||oe(_,x))p=m,f=y;else{w=_-h,M=x-c;var E=m-h,T=_-m,k=y-c,N=x-y,V=void 0,O=void 0;if(l==="x"){V=Math.abs(E),O=Math.abs(T);var R=w>0?1:-1;p=m-R*V*o,f=y,L=m+R*O*o,P=y}else if(l==="y"){V=Math.abs(k),O=Math.abs(N);var z=M>0?1:-1;p=m,f=y-z*V*o,L=m,P=y+z*O*o}else V=Math.sqrt(E*E+k*k),O=Math.sqrt(T*T+N*N),C=O/(O+V),p=m-w*o*(1-C),f=y-M*o*(1-C),L=m+w*o*C,P=y+M*o*C,L=ee(L,te(_,m)),P=ee(P,te(x,y)),L=te(L,ee(_,m)),P=te(P,ee(x,y)),w=L-m,M=P-y,p=m-w*V/O,f=y-M*V/O,p=ee(p,te(h,m)),f=ee(f,te(c,y)),p=te(p,ee(h,m)),f=te(f,ee(c,y)),w=m-p,M=y-f,L=m+w*O/V,P=y+M*O/V}i.bezierCurveTo(v,g,p,f,m,y),v=L,g=P}else i.lineTo(m,y)}h=m,c=y,d+=n}return S}var Zt=(function(){function i(){this.smooth=0,this.smoothConstraint=!0}return i})(),Lr=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polyline",t}return r.prototype.getDefaultStyle=function(){return{stroke:s.tokens.color.neutral99,fill:null}},r.prototype.getDefaultShape=function(){return new Zt},r.prototype.buildPath=function(e,t){var a=t.points,n=0,o=a.length/2;if(t.connectNulls){for(;o>0&&oe(a[o*2-2],a[o*2-1]);o--);for(;n<o&&oe(a[n*2],a[n*2+1]);n++);}for(;n<o;)n+=Ze(e,a,n,o,o,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},r.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,n=a.data,o=s.PathProxy.CMD,l,u,h=t==="x",c=[],v=0;v<n.length;){var g=n[v++],p=void 0,f=void 0,d=void 0,S=void 0,m=void 0,y=void 0,b=void 0;switch(g){case o.M:l=n[v++],u=n[v++];break;case o.L:if(p=n[v++],f=n[v++],b=h?(e-l)/(p-l):(e-u)/(f-u),b<=1&&b>=0){var I=h?(f-u)*b+u:(p-l)*b+l;return h?[e,I]:[I,e]}l=p,u=f;break;case o.C:p=n[v++],f=n[v++],d=n[v++],S=n[v++],m=n[v++],y=n[v++];var D=h?s.cubicRootAt(l,p,d,m,e,c):s.cubicRootAt(u,f,S,y,e,c);if(D>0)for(var _=0;_<D;_++){var x=c[_];if(x<=1&&x>=0){var I=h?s.cubicAt(u,f,S,y,x):s.cubicAt(l,p,d,m,x);return h?[e,I]:[I,e]}}l=m,u=y;break}}},r})(s.Path),Cr=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r})(Zt),Pr=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="ec-polygon",t}return r.prototype.getDefaultShape=function(){return new Cr},r.prototype.buildPath=function(e,t){var a=t.points,n=t.stackedOnPoints,o=0,l=a.length/2,u=t.smoothMonotone;if(t.connectNulls){for(;l>0&&oe(a[l*2-2],a[l*2-1]);l--);for(;o<l&&oe(a[o*2],a[o*2+1]);o++);}for(;o<l;){var h=Ze(e,a,o,l,l,1,t.smooth,u,t.connectNulls);Ze(e,n,o+h-1,h,l,-1,t.stackedOnSmooth,u,t.connectNulls),o+=h+1,e.closePath()}},r})(s.Path);function me(i,r){return i.type===r}function nt(i,r){if(i.length===r.length){for(var e=0;e<i.length;e++)if(i[e]!==r[e])return;return!0}}function ot(i){for(var r=1/0,e=1/0,t=-1/0,a=-1/0,n=0;n<i.length;){var o=i[n++],l=i[n++];isNaN(o)||(r=Math.min(o,r),t=Math.max(o,t)),isNaN(l)||(e=Math.min(l,e),a=Math.max(l,a))}return[[r,e],[t,a]]}function st(i,r){var e=ot(i),t=e[0],a=e[1],n=ot(r),o=n[0],l=n[1];return Math.max(Math.abs(t[0]-o[0]),Math.abs(t[1]-o[1]),Math.abs(a[0]-l[0]),Math.abs(a[1]-l[1]))}function lt(i){return s.isNumber(i)?i:i?.5:0}function Tr(i,r,e){if(!e.valueDim)return[];for(var t=r.count(),a=s.createFloat32Array(t*2),n=0;n<t;n++){var o=Xt(e,i,r,n);a[n*2]=o[0],a[n*2+1]=o[1]}return a}function re(i,r,e,t,a){var n=e.getBaseAxis(),o=n.dim==="x"||n.dim==="radius"?0:1,l=[],u=0,h=[],c=[],v=[],g=[];if(a){for(u=0;u<i.length;u+=2){var p=r||i;!isNaN(p[u])&&!isNaN(p[u+1])&&g.push(i[u],i[u+1])}i=g}for(u=0;u<i.length-2;u+=2)switch(v[0]=i[u+2],v[1]=i[u+3],c[0]=i[u],c[1]=i[u+1],l.push(c[0],c[1]),t){case"end":h[o]=v[o],h[1-o]=c[1-o],l.push(h[0],h[1]);break;case"middle":var f=(c[o]+v[o])/2,d=[];h[o]=d[o]=f,h[1-o]=c[1-o],d[1-o]=v[1-o],l.push(h[0],h[1]),l.push(d[0],d[1]);break;default:h[o]=c[o],h[1-o]=v[1-o],l.push(h[0],h[1])}return l.push(i[u++],i[u++]),l}function Vr(i,r){var e=[],t=i.length,a,n;function o(c,v,g){var p=c.coord,f=(g-p)/(v.coord-p),d=s.lerp$1(f,[c.color,v.color]);return{coord:g,color:d}}for(var l=0;l<t;l++){var u=i[l],h=u.coord;if(h<0)a=u;else if(h>r){n?e.push(o(n,u,r)):a&&e.push(o(a,u,0),o(a,u,r));break}else a&&(e.push(o(a,u,0)),a=null),e.push(u),n=u}return e}function kr(i,r,e){var t=i.getVisual("visualMeta");if(!(!t||!t.length||!i.count())){if(r.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,n,o=t.length-1;o>=0;o--){var l=i.getDimensionInfo(t[o].dimension);if(a=l&&l.coordDim,a==="x"||a==="y"){n=t[o];break}}if(!n){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=r.getAxis(a),h=s.map(n.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),c=h.length,v=n.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),v.reverse());var g=Vr(h,a==="x"?e.getWidth():e.getHeight()),p=g.length;if(!p&&c)return h[0].coord<0?v[1]?v[1]:h[c-1].color:v[0]?v[0]:h[0].color;var f=10,d=g[0].coord-f,S=g[p-1].coord+f,m=S-d;if(m<.001)return"transparent";s.each(g,function(b){b.offset=(b.coord-d)/m}),g.push({offset:p?g[p-1].offset:.5,color:v[1]||"transparent"}),g.unshift({offset:p?g[0].offset:.5,color:v[0]||"transparent"});var y=new s.LinearGradient(0,0,0,0,g,!0);return y[a]=d,y[a+"2"]=S,y}}function Er(i,r,e){var t=i.get("showAllSymbol"),a=t==="auto";if(!(t&&!a)){var n=e.getAxesByScale("ordinal")[0];if(n&&!(a&&Nr(n,r))){var o=r.mapDimension(n.dim),l={};return s.each(n.getViewLabels(),function(u){var h=n.scale.getRawOrdinalNumber(u.tickValue);l[h]=1}),function(u){return!l.hasOwnProperty(r.get(o,u))}}}}function Nr(i,r){var e=i.getExtent(),t=Math.abs(e[1]-e[0])/i.scale.count();isNaN(t)&&(t=0);for(var a=r.count(),n=Math.max(1,Math.round(a/5)),o=0;o<a;o+=n)if(Ke.getSymbolSize(r,o)[i.isHorizontal()?1:0]*1.5>t)return!1;return!0}function Or(i,r){return isNaN(i)||isNaN(r)}function Rr(i){for(var r=i.length/2;r>0&&Or(i[r*2-2],i[r*2-1]);r--);return r-1}function ut(i,r){return[i[r*2],i[r*2+1]]}function zr(i,r,e){for(var t=i.length/2,a=e==="x"?0:1,n,o,l=0,u=-1,h=0;h<t;h++)if(o=i[h*2+a],!(isNaN(o)||isNaN(i[h*2+1-a]))){if(h===0){n=o;continue}if(n<=r&&o>=r||n>=r&&o<=r){u=h;break}l=h,n=o}return{range:[l,u],t:(r-n)/(o-n)}}function Yt(i){if(i.get(["endLabel","show"]))return!0;for(var r=0;r<s.SPECIAL_STATES.length;r++)if(i.get([s.SPECIAL_STATES[r],"endLabel","show"]))return!0;return!1}function Fe(i,r,e,t){if(me(r,"cartesian2d")){var a=t.getModel("endLabel"),n=a.get("valueAnimation"),o=t.getData(),l={lastFrameIndex:0},u=Yt(t)?function(p,f){i._endLabelOnDuring(p,f,o,l,n,a,r)}:null,h=r.getBaseAxis().isHorizontal(),c=s.createGridClipPath(r,e,t,function(){var p=i._endLabel;p&&e&&l.originalX!=null&&p.attr({x:l.originalX,y:l.originalY})},u);if(!t.get("clip",!0)){var v=c.shape,g=Math.max(v.width,v.height);h?(v.y-=g,v.height+=g*2):(v.x-=g,v.width+=g*2)}return u&&u(1,c),c}else return process.env.NODE_ENV!=="production"&&t.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),s.createPolarClipPath(r,e,t)}function Gr(i,r){var e=r.getBaseAxis(),t=e.isHorizontal(),a=e.inverse,n=t?a?"right":"left":"center",o=t?"middle":a?"top":"bottom";return{normal:{align:i.get("align")||n,verticalAlign:i.get("verticalAlign")||o}}}var Hr=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.init=function(){var e=new s.Group,t=new wr;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=s.bind(this._changePolyState,this)},r.prototype.render=function(e,t,a){var n=e.coordinateSystem,o=this.group,l=e.getData(),u=e.getModel("lineStyle"),h=e.getModel("areaStyle"),c=l.getLayout("points")||[],v=n.type==="polar",g=this._coordSys,p=this._symbolDraw,f=this._polyline,d=this._polygon,S=this._lineGroup,m=!t.ssr&&e.get("animation"),y=!h.isEmpty(),b=h.get("origin"),I=$t(n,l,b),D=y&&Tr(n,l,I),_=e.get("showSymbol"),x=e.get("connectNulls"),A=_&&!v&&Er(e,l,n),C=this._data;C&&C.eachItemGraphicEl(function(B,J){B.__temp&&(o.remove(B),C.setItemGraphicEl(J,null))}),_||p.remove(),o.add(S);var w=v?!1:e.get("step"),M;n&&n.getArea&&e.get("clip",!0)&&(M=n.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var L=kr(l,n,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(f&&g.type===n.type&&w===this._step))_&&p.updateData(l,{isIgnore:A,clipShape:M,disableAnimation:!0,getSymbolPoint:function(B){return[c[B*2],c[B*2+1]]}}),m&&this._initSymbolLabelAnimation(l,n,M),w&&(D&&(D=re(D,c,n,w,x)),c=re(c,null,n,w,x)),f=this._newPolyline(c),y?d=this._newPolygon(c,D):d&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,s.convertToColorString(L)),S.setClipPath(Fe(this,n,!0,e));else{y&&!d?d=this._newPolygon(c,D):d&&!y&&(S.remove(d),d=this._polygon=null),v||this._initOrUpdateEndLabel(e,n,s.convertToColorString(L));var P=S.getClipPath();if(P){var E=Fe(this,n,!1,e);s.initProps(P,{shape:E.shape},e)}else S.setClipPath(Fe(this,n,!0,e));_&&p.updateData(l,{isIgnore:A,clipShape:M,disableAnimation:!0,getSymbolPoint:function(B){return[c[B*2],c[B*2+1]]}}),(!nt(this._stackedOnPoints,D)||!nt(this._points,c))&&(m?this._doUpdateAnimation(l,D,n,a,w,b,x):(w&&(D&&(D=re(D,c,n,w,x)),c=re(c,null,n,w,x)),f.setShape({points:c}),d&&d.setShape({points:c,stackedOnPoints:D})))}var T=e.getModel("emphasis"),k=T.get("focus"),N=T.get("blurScope"),V=T.get("disabled");if(f.useStyle(s.defaults(u.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),s.setStatesStylesFromModel(f,e,"lineStyle"),f.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var O=f.getState("emphasis").style;O.lineWidth=+f.style.lineWidth+1}s.getECData(f).seriesIndex=e.seriesIndex,s.toggleHoverEmphasis(f,k,N,V);var R=lt(e.get("smooth")),z=e.get("smoothMonotone");if(f.setShape({smooth:R,smoothMonotone:z,connectNulls:x}),d){var G=l.getCalculationInfo("stackedOnSeries"),H=0;d.useStyle(s.defaults(h.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),G&&(H=lt(G.get("smooth"))),d.setShape({smooth:R,stackedOnSmooth:H,smoothMonotone:z,connectNulls:x}),s.setStatesStylesFromModel(d,e,"areaStyle"),s.getECData(d).seriesIndex=e.seriesIndex,s.toggleHoverEmphasis(d,k,N,V)}var F=this._changePolyState;l.eachItemGraphicEl(function(B){B&&(B.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=l,this._coordSys=n,this._stackedOnPoints=D,this._points=c,this._step=w,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,f),d&&this.packEventData(e,d))},r.prototype.packEventData=function(e,t){s.getECData(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},r.prototype.highlight=function(e,t,a,n){var o=e.getData(),l=s.queryDataIndex(o,n);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var u=o.getLayout("points"),h=o.getItemGraphicEl(l);if(!h){var c=u[l*2],v=u[l*2+1];if(isNaN(c)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,v))return;var g=e.get("zlevel")||0,p=e.get("z")||0;h=new Ke(o,l),h.x=c,h.y=v,h.setZ(g,p);var f=h.getSymbolPath().getTextContent();f&&(f.zlevel=g,f.z=p,f.z2=this._polyline.z2+1),h.__temp=!0,o.setItemGraphicEl(l,h),h.stopSymbolAnimation(!0),this.group.add(h)}h.highlight()}else s.ChartView.prototype.highlight.call(this,e,t,a,n)},r.prototype.downplay=function(e,t,a,n){var o=e.getData(),l=s.queryDataIndex(o,n);if(this._changePolyState("normal"),l!=null&&l>=0){var u=o.getItemGraphicEl(l);u&&(u.__temp?(o.setItemGraphicEl(l,null),this.group.remove(u)):u.downplay())}else s.ChartView.prototype.downplay.call(this,e,t,a,n)},r.prototype._changePolyState=function(e){var t=this._polygon;s.setStatesFlag(this._polyline,e),t&&s.setStatesFlag(t,e)},r.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Lr({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},r.prototype._newPolygon=function(e,t){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new Pr({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},r.prototype._initSymbolLabelAnimation=function(e,t,a){var n,o,l=t.getBaseAxis(),u=l.inverse;t.type==="cartesian2d"?(n=l.isHorizontal(),o=!1):t.type==="polar"&&(n=l.dim==="angle",o=!0);var h=e.hostModel,c=h.get("animationDuration");s.isFunction(c)&&(c=c(null));var v=h.get("animationDelay")||0,g=s.isFunction(v)?v(null):v;e.eachItemGraphicEl(function(p,f){var d=p;if(d){var S=[p.x,p.y],m=void 0,y=void 0,b=void 0;if(a)if(o){var I=a,D=t.pointToCoord(S);n?(m=I.startAngle,y=I.endAngle,b=-D[1]/180*Math.PI):(m=I.r0,y=I.r,b=D[0])}else{var _=a;n?(m=_.x,y=_.x+_.width,b=p.x):(m=_.y+_.height,y=_.y,b=p.y)}var x=y===m?0:(b-m)/(y-m);u&&(x=1-x);var A=s.isFunction(v)?v(f):c*x+g,C=d.getSymbolPath(),w=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:A}),C.disableLabelAnimation=!0}})},r.prototype._initOrUpdateEndLabel=function(e,t,a){var n=e.getModel("endLabel");if(Yt(e)){var o=e.getData(),l=this._polyline,u=o.getLayout("points");if(!u){l.removeTextContent(),this._endLabel=null;return}var h=this._endLabel;h||(h=this._endLabel=new s.ZRText({z2:200}),h.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var c=Rr(u);c>=0&&(s.setLabelStyle(l,s.getLabelStatesModels(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:c,defaultText:function(v,g,p){return p!=null?s.getDefaultInterpolatedLabel(o,p):s.getDefaultLabel(o,v)},enableTextSetter:!0},Gr(n,t)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},r.prototype._endLabelOnDuring=function(e,t,a,n,o,l,u){var h=this._endLabel,c=this._polyline;if(h){e<1&&n.originalX==null&&(n.originalX=h.x,n.originalY=h.y);var v=a.getLayout("points"),g=a.hostModel,p=g.get("connectNulls"),f=l.get("precision"),d=l.get("distance")||0,S=u.getBaseAxis(),m=S.isHorizontal(),y=S.inverse,b=t.shape,I=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,D=(m?d:0)*(y?-1:1),_=(m?0:-d)*(y?-1:1),x=m?"x":"y",A=zr(v,I,x),C=A.range,w=C[1]-C[0],M=void 0;if(w>=1){if(w>1&&!p){var L=ut(v,C[0]);h.attr({x:L[0]+D,y:L[1]+_}),o&&(M=g.getRawValue(C[0]))}else{var L=c.getPointOn(I,x);L&&h.attr({x:L[0]+D,y:L[1]+_});var P=g.getRawValue(C[0]),E=g.getRawValue(C[1]);o&&(M=s.interpolateRawValues(a,f,P,E,A.t))}n.lastFrameIndex=C[0]}else{var T=e===1||n.lastFrameIndex>0?C[0]:0,L=ut(v,T);o&&(M=g.getRawValue(T)),h.attr({x:L[0]+D,y:L[1]+_})}if(o){var k=s.labelInner(h);typeof k.setLabelText=="function"&&k.setLabelText(M)}}},r.prototype._doUpdateAnimation=function(e,t,a,n,o,l,u){var h=this._polyline,c=this._polygon,v=e.hostModel,g=Ir(this._data,e,this._stackedOnPoints,t,this._coordSys,a,this._valueOrigin),p=g.current,f=g.stackedOnCurrent,d=g.next,S=g.stackedOnNext;if(o&&(f=re(g.stackedOnCurrent,g.current,a,o,u),p=re(g.current,null,a,o,u),S=re(g.stackedOnNext,g.next,a,o,u),d=re(g.next,null,a,o,u)),st(p,d)>3e3||c&&st(f,S)>3e3){h.stopAnimation(),h.setShape({points:d}),c&&(c.stopAnimation(),c.setShape({points:d,stackedOnPoints:S}));return}h.shape.__points=g.current,h.shape.points=p;var m={shape:{points:d}};g.current!==p&&(m.shape.__points=g.next),h.stopAnimation(),s.updateProps(h,m,v),c&&(c.setShape({points:p,stackedOnPoints:f}),c.stopAnimation(),s.updateProps(c,{shape:{stackedOnPoints:S}},v),h.shape.points!==c.shape.points&&(c.shape.points=h.shape.points));for(var y=[],b=g.status,I=0;I<b.length;I++){var D=b[I].cmd;if(D==="="){var _=e.getItemGraphicEl(b[I].idx1);_&&y.push({el:_,ptIdx:I})}}h.animators&&h.animators.length&&h.animators[0].during(function(){c&&c.dirtyShape();for(var x=h.shape.__points,A=0;A<y.length;A++){var C=y[A].el,w=y[A].ptIdx*2;C.x=x[w],C.y=x[w+1],C.markRedraw()}})},r.prototype.remove=function(e){var t=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(n,o){n.__temp&&(t.remove(n),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},r.type="line",r})(s.ChartView);function Fr(i,r){return{seriesType:i,plan:s.createRenderPlanner(),reset:function(e){var t=e.getData(),a=e.coordinateSystem;if(e.pipelineContext,!!a){var n=s.map(a.dimensions,function(v){return t.mapDimension(v)}).slice(0,2),o=n.length,l=t.getCalculationInfo("stackResultDimension");s.isDimensionStacked(t,n[0])&&(n[0]=l),s.isDimensionStacked(t,n[1])&&(n[1]=l);var u=t.getStore(),h=t.getDimensionIndex(n[0]),c=t.getDimensionIndex(n[1]);return o&&{progress:function(v,g){for(var p=v.end-v.start,f=s.createFloat32Array(p*o),d=[],S=[],m=v.start,y=0;m<v.end;m++){var b=void 0;if(o===1){var I=u.get(h,m);b=a.dataToPoint(I,null,S)}else d[0]=u.get(h,m),d[1]=u.get(c,m),b=a.dataToPoint(d,null,S);f[y++]=b[0],f[y++]=b[1]}g.setLayout("points",f)}}}}}}var Br={average:function(i){for(var r=0,e=0,t=0;t<i.length;t++)isNaN(i[t])||(r+=i[t],e++);return e===0?NaN:r/e},sum:function(i){for(var r=0,e=0;e<i.length;e++)r+=i[e]||0;return r},max:function(i){for(var r=-1/0,e=0;e<i.length;e++)i[e]>r&&(r=i[e]);return isFinite(r)?r:NaN},min:function(i){for(var r=1/0,e=0;e<i.length;e++)i[e]<r&&(r=i[e]);return isFinite(r)?r:NaN},nearest:function(i){return i[0]}},Wr=function(i){return Math.round(i.length/2)};function qt(i){return{seriesType:i,reset:function(r,e,t){var a=r.getData(),n=r.get("sampling"),o=r.coordinateSystem,l=a.count();if(l>10&&o.type==="cartesian2d"&&n){var u=o.getBaseAxis(),h=o.getOtherAxis(u),c=u.getExtent(),v=t.getDevicePixelRatio(),g=Math.abs(c[1]-c[0])*(v||1),p=Math.round(l/g);if(isFinite(p)&&p>1){n==="lttb"?r.setData(a.lttbDownSample(a.mapDimension(h.dim),1/p)):n==="minmax"&&r.setData(a.minmaxDownSample(a.mapDimension(h.dim),1/p));var f=void 0;s.isString(n)?f=Br[n]:s.isFunction(n)&&(f=n),f&&r.setData(a.downSample(a.mapDimension(h.dim),1/p,f,Wr))}}}}}function jt(i){i.registerChartView(Hr),i.registerSeriesModel(_r),i.registerLayout(Fr("line")),i.registerVisual({seriesType:"line",reset:function(r){var e=r.getData(),t=r.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,qt("line"))}var Ye=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return s.createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getMarkerPosition=function(e,t,a){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(e),l=n.dataToPoint(o);if(a)s.each(n.getAxes(),function(g,p){if(g.type==="category"&&t!=null){var f=g.getTicksCoords(),d=g.getTickModel().get("alignWithLabel"),S=o[p],m=t[p]==="x1"||t[p]==="y1";if(m&&!d&&(S+=1),f.length<2)return;if(f.length===2){l[p]=g.toGlobalCoord(g.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,I=1,D=0;D<f.length;D++){var _=f[D].coord,x=D===f.length-1?f[D-1].tickValue+I:f[D].tickValue;if(x===S){b=_;break}else if(x<S)y=_;else if(y!=null&&x>S){b=(_+y)/2;break}D===1&&(I=x-f[0].tickValue)}b==null&&(y?y&&(b=f[f.length-1].coord):b=f[0].coord),l[p]=g.toGlobalCoord(b)}});else{var u=this.getData(),h=u.getLayout("offset"),c=u.getLayout("size"),v=n.getBaseAxis().isHorizontal()?0:1;l[v]+=h+c/2}return l}return[NaN,NaN]},r.type="series.__base_bar__",r.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},r})(s.SeriesModel);s.SeriesModel.registerClass(Ye);var Ur=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(){return s.createSeriesData(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},r.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},r.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},r.prototype.brushSelector=function(e,t,a){return a.rect(t.getItemLayout(e))},r.type="series.bar",r.dependencies=["grid","polar"],r.defaultOption=s.inheritDefaultOption(Ye.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:s.tokens.color.primary,borderWidth:2}},realtimeSort:!1}),r})(Ye),$r=(function(){function i(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return i})(),Ve=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="sausage",t}return r.prototype.getDefaultShape=function(){return new $r},r.prototype.buildPath=function(e,t){var a=t.cx,n=t.cy,o=Math.max(t.r0||0,0),l=Math.max(t.r,0),u=(l-o)*.5,h=o+u,c=t.startAngle,v=t.endAngle,g=t.clockwise,p=Math.PI*2,f=g?v-c<p:c-v<p;f||(c=v-(g?p:-p));var d=Math.cos(c),S=Math.sin(c),m=Math.cos(v),y=Math.sin(v);f?(e.moveTo(d*o+a,S*o+n),e.arc(d*h+a,S*h+n,u,-Math.PI+c,c,!g)):e.moveTo(d*l+a,S*l+n),e.arc(a,n,l,c,v,!g),e.arc(m*h+a,y*h+n,u,v-Math.PI*2,v-Math.PI,!g),o!==0&&e.arc(a,n,o,v,c,g)},r})(s.Path);function Xr(i,r){r=r||{};var e=r.isRoundCap;return function(t,a,n){var o=a.position;if(!o||o instanceof Array)return s.calculateTextPosition(t,a,n);var l=i(o),u=a.distance!=null?a.distance:5,h=this.shape,c=h.cx,v=h.cy,g=h.r,p=h.r0,f=(g+p)/2,d=h.startAngle,S=h.endAngle,m=(d+S)/2,y=e?Math.abs(g-p)/2:0,b=Math.cos,I=Math.sin,D=c+g*b(d),_=v+g*I(d),x="left",A="top";switch(l){case"startArc":D=c+(p-u)*b(m),_=v+(p-u)*I(m),x="center",A="top";break;case"insideStartArc":D=c+(p+u)*b(m),_=v+(p+u)*I(m),x="center",A="bottom";break;case"startAngle":D=c+f*b(d)+_e(d,u+y,!1),_=v+f*I(d)+Ae(d,u+y,!1),x="right",A="middle";break;case"insideStartAngle":D=c+f*b(d)+_e(d,-u+y,!1),_=v+f*I(d)+Ae(d,-u+y,!1),x="left",A="middle";break;case"middle":D=c+f*b(m),_=v+f*I(m),x="center",A="middle";break;case"endArc":D=c+(g+u)*b(m),_=v+(g+u)*I(m),x="center",A="bottom";break;case"insideEndArc":D=c+(g-u)*b(m),_=v+(g-u)*I(m),x="center",A="top";break;case"endAngle":D=c+f*b(S)+_e(S,u+y,!0),_=v+f*I(S)+Ae(S,u+y,!0),x="left",A="middle";break;case"insideEndAngle":D=c+f*b(S)+_e(S,-u+y,!0),_=v+f*I(S)+Ae(S,-u+y,!0),x="right",A="middle";break;default:return s.calculateTextPosition(t,a,n)}return t=t||{},t.x=D,t.y=_,t.align=x,t.verticalAlign=A,t}}function Zr(i,r,e,t){if(s.isNumber(t)){i.setTextConfig({rotation:t});return}else if(s.isArray(r)){i.setTextConfig({rotation:0});return}var a=i.shape,n=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,l=(n+o)/2,u,h=e(r);switch(h){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=l;break;case"startAngle":case"insideStartAngle":u=n;break;case"endAngle":case"insideEndAngle":u=o;break;default:i.setTextConfig({rotation:0});return}var c=Math.PI*1.5-u;h==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),i.setTextConfig({rotation:c})}function _e(i,r,e){return r*Math.sin(i)*(e?-1:1)}function Ae(i,r,e){return r*Math.cos(i)*(e?1:-1)}function ge(i,r,e){var t=i.get("borderRadius");if(t==null)return e?{cornerRadius:0}:null;s.isArray(t)||(t=[t,t,t,t]);var a=Math.abs(r.r||0-r.r0||0);return{cornerRadius:s.map(t,function(n){return s.parsePercent$1(n,a)})}}var Be=Math.max,We=Math.min;function Yr(i,r){var e=i.getArea&&i.getArea();if(me(i,"cartesian2d")){var t=i.getBaseAxis();if(t.type!=="category"||!t.onBand){var a=r.getLayout("bandWidth");t.isHorizontal()?(e.x-=a,e.width+=a*2):(e.y-=a,e.height+=a*2)}}return e}var qr=(function(i){s.__extends(r,i);function r(){var e=i.call(this)||this;return e.type=r.type,e._isFirstFrame=!0,e}return r.prototype.render=function(e,t,a,n){this._model=e,this._removeOnRenderedListener(a),this._updateDrawMode(e);var o=e.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,a):this._renderNormal(e,t,a,n)):process.env.NODE_ENV!=="production"&&s.warn("Only cartesian2d and polar supported for bar.")},r.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},r.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},r.prototype.eachRendered=function(e){s.traverseElements(this._progressiveEls||this.group,e)},r.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},r.prototype._renderNormal=function(e,t,a,n){var o=this.group,l=e.getData(),u=this._data,h=e.coordinateSystem,c=h.getBaseAxis(),v;h.type==="cartesian2d"?v=c.isHorizontal():h.type==="polar"&&(v=c.dim==="angle");var g=e.isAnimationEnabled()?e:null,p=jr(e,h);p&&this._enableRealtimeSort(p,l,a);var f=e.get("clip",!0)||p,d=Yr(h,l);o.removeClipPath();var S=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),b=y.get("borderRadius")||0,I=[],D=this._backgroundEls,_=n&&n.isInitSort,x=n&&n.type==="changeAxisOrder";function A(M){var L=we[h.type](l,M);if(!L)return null;var P=aa(h,v,L);return P.useStyle(y.getItemStyle()),h.type==="cartesian2d"?P.setShape("r",b):P.setShape("cornerRadius",b),I[M]=P,P}l.diff(u).add(function(M){var L=l.getItemModel(M),P=we[h.type](l,M,L);if(P&&(m&&A(M),!(!l.hasValue(M)||!ft[h.type](P)))){var E=!1;f&&(E=ct[h.type](d,P));var T=ht[h.type](e,l,M,P,v,g,c.model,!1,S);p&&(T.forceLabelAnimation=!0),gt(T,l,M,L,P,e,v,h.type==="polar"),_?T.attr({shape:P}):p?vt(p,g,T,P,M,v,!1,!1):s.initProps(T,{shape:P},e,M),l.setItemGraphicEl(M,T),o.add(T),T.ignore=E}}).update(function(M,L){var P=l.getItemModel(M),E=we[h.type](l,M,P);if(E){if(m){var T=void 0;D.length===0?T=A(L):(T=D[L],T.useStyle(y.getItemStyle()),h.type==="cartesian2d"?T.setShape("r",b):T.setShape("cornerRadius",b),I[M]=T);var k=we[h.type](l,M),N=Jt(v,k,h);s.updateProps(T,{shape:N},g,M)}var V=u.getItemGraphicEl(L);if(!l.hasValue(M)||!ft[h.type](E)){o.remove(V);return}var O=!1;f&&(O=ct[h.type](d,E),O&&o.remove(V));var R=V&&(V.type==="sector"&&S||V.type==="sausage"&&!S);if(R&&(V&&s.removeElementWithFadeOut(V,e,L),V=null),V?s.saveOldStyle(V):V=ht[h.type](e,l,M,E,v,g,c.model,!0,S),p&&(V.forceLabelAnimation=!0),x){var z=V.getTextContent();if(z){var G=s.labelInner(z);G.prevValue!=null&&(G.prevValue=G.value)}}else gt(V,l,M,P,E,e,v,h.type==="polar");_?V.attr({shape:E}):p?vt(p,g,V,E,M,v,!0,x):s.updateProps(V,{shape:E},e,M,null),l.setItemGraphicEl(M,V),V.ignore=O,o.add(V)}}).remove(function(M){var L=u.getItemGraphicEl(M);L&&s.removeElementWithFadeOut(L,e,M)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new s.Group);C.removeAll();for(var w=0;w<I.length;++w)C.add(I[w]);o.add(C),this._backgroundEls=I,this._data=l},r.prototype._renderLarge=function(e,t,a){this._clear(),mt(e,this.group),this._updateLargeClip(e)},r.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),mt(t,this.group,this._progressiveEls,!0)},r.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&s.createClipPath(e.coordinateSystem,!1,e),a=this.group;t?a.setClipPath(t):a.removeClipPath()},r.prototype._enableRealtimeSort=function(e,t,a){var n=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,a),this._isFirstFrame=!1;else{var l=function(u){var h=t.getItemGraphicEl(u),c=h&&h.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){n._updateSortWithinSameData(t,l,o,a)},a.getZr().on("rendered",this._onRendered)}}},r.prototype._dataSort=function(e,t,a){var n=[];return e.each(e.mapDimension(t.dim),function(o,l){var u=a(l);u=u??NaN,n.push({dataIndex:l,mappedValue:u,ordinalNumber:o})}),n.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:s.map(n,function(o){return o.ordinalNumber})}},r.prototype._isOrderChangedWithinSameData=function(e,t,a){for(var n=a.scale,o=e.mapDimension(a.dim),l=Number.MAX_VALUE,u=0,h=n.getOrdinalMeta().categories.length;u<h;++u){var c=e.rawIndexOf(o,n.getRawOrdinalNumber(u)),v=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(v>l)return!0;l=v}return!1},r.prototype._isOrderDifferentInView=function(e,t){for(var a=t.scale,n=a.getExtent(),o=Math.max(0,n[0]),l=Math.min(n[1],a.getOrdinalMeta().categories.length-1);o<=l;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},r.prototype._updateSortWithinSameData=function(e,t,a,n){if(this._isOrderChangedWithinSameData(e,t,a)){var o=this._dataSort(e,a,t);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},r.prototype._dispatchInitSort=function(e,t,a){var n=t.baseAxis,o=this._dataSort(e,n,function(l){return e.get(e.mapDimension(t.otherAxis.dim),l)});a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},r.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},r.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},r.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},r.prototype._clear=function(e){var t=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(n){s.removeElementWithFadeOut(n,e,s.getECData(n).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},r.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},r.type="bar",r})(s.ChartView),ct={cartesian2d:function(i,r){var e=r.width<0?-1:1,t=r.height<0?-1:1;e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height);var a=i.x+i.width,n=i.y+i.height,o=Be(r.x,i.x),l=We(r.x+r.width,a),u=Be(r.y,i.y),h=We(r.y+r.height,n),c=l<o,v=h<u;return r.x=c&&o>a?l:o,r.y=v&&u>n?h:u,r.width=c?0:l-o,r.height=v?0:h-u,e<0&&(r.x+=r.width,r.width=-r.width),t<0&&(r.y+=r.height,r.height=-r.height),c||v},polar:function(i,r){var e=r.r0<=r.r?1:-1;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}var a=We(r.r,i.r),n=Be(r.r0,i.r0);r.r=a,r.r0=n;var o=a-n<0;if(e<0){var t=r.r;r.r=r.r0,r.r0=t}return o}},ht={cartesian2d:function(i,r,e,t,a,n,o,l,u){var h=new s.Rect({shape:s.extend({},t),z2:1});if(h.__dataIndex=e,h.name="item",n){var c=h.shape,v=a?"height":"width";c[v]=0}return h},polar:function(i,r,e,t,a,n,o,l,u){var h=!a&&u?Ve:s.Sector,c=new h({shape:t,z2:1});c.name="item";var v=Kt(a);if(c.calculateTextPosition=Xr(v,{isRoundCap:h===Ve}),n){var g=c.shape,p=a?"r":"endAngle",f={};g[p]=a?t.r0:t.startAngle,f[p]=t[p],(l?s.updateProps:s.initProps)(c,{shape:f},n)}return c}};function jr(i,r){var e=i.get("realtimeSort",!0),t=r.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(t.type!=="category"&&s.warn("`realtimeSort` will not work because this bar series is not based on a category axis."),r.type!=="cartesian2d"&&s.warn("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&t.type==="category"&&r.type==="cartesian2d")return{baseAxis:t,otherAxis:r.getOtherAxis(t)}}function vt(i,r,e,t,a,n,o,l){var u,h;n?(h={x:t.x,width:t.width},u={y:t.y,height:t.height}):(h={y:t.y,height:t.height},u={x:t.x,width:t.width}),l||(o?s.updateProps:s.initProps)(e,{shape:u},r,a,null);var c=r?i.baseAxis.model:null;(o?s.updateProps:s.initProps)(e,{shape:h},c,a)}function pt(i,r){for(var e=0;e<r.length;e++)if(!isFinite(i[r[e]]))return!0;return!1}var Kr=["x","y","width","height"],Jr=["cx","cy","r","startAngle","endAngle"],ft={cartesian2d:function(i){return!pt(i,Kr)},polar:function(i){return!pt(i,Jr)}},we={cartesian2d:function(i,r,e){var t=i.getItemLayout(r);if(!t)return null;var a=e?ea(e,t):0,n=t.width>0?1:-1,o=t.height>0?1:-1;return{x:t.x+n*a/2,y:t.y+o*a/2,width:t.width-n*a,height:t.height-o*a}},polar:function(i,r,e){var t=i.getItemLayout(r);return{cx:t.cx,cy:t.cy,r0:t.r0,r:t.r,startAngle:t.startAngle,endAngle:t.endAngle,clockwise:t.clockwise}}};function Qr(i){return i.startAngle!=null&&i.endAngle!=null&&i.startAngle===i.endAngle}function Kt(i){return(function(r){var e=r?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}})(i)}function gt(i,r,e,t,a,n,o,l){var u=r.getItemVisual(e,"style");if(l){if(!n.get("roundCap")){var c=i.shape,v=ge(t.getModel("itemStyle"),c,!0);s.extend(c,v),i.setShape(c)}}else{var h=t.get(["itemStyle","borderRadius"])||0;i.setShape("r",h)}i.useStyle(u);var g=t.getShallow("cursor");g&&i.attr("cursor",g);var p=l?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",f=s.getLabelStatesModels(t);s.setLabelStyle(i,f,{labelFetcher:n,labelDataIndex:e,defaultText:s.getDefaultLabel(n.getData(),e),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:p});var d=i.getTextContent();if(l&&d){var S=t.get(["label","position"]);i.textConfig.inside=S==="middle"?!0:null,Zr(i,S==="outside"?p:S,Kt(o),t.get(["label","rotate"]))}s.setLabelValueAnimation(d,f,n.getRawValue(e),function(y){return s.getDefaultInterpolatedLabel(r,y)});var m=t.getModel(["emphasis"]);s.toggleHoverEmphasis(i,m.get("focus"),m.get("blurScope"),m.get("disabled")),s.setStatesStylesFromModel(i,t),Qr(a)&&(i.style.fill="none",i.style.stroke="none",s.each(i.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function ea(i,r){var e=i.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var t=i.get(["itemStyle","borderWidth"])||0,a=isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),n=isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height);return Math.min(t,a,n)}var ta=(function(){function i(){}return i})(),dt=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="largeBar",t}return r.prototype.getDefaultShape=function(){return new ta},r.prototype.buildPath=function(e,t){for(var a=t.points,n=this.baseDimIdx,o=1-this.baseDimIdx,l=[],u=[],h=this.barWidth,c=0;c<a.length;c+=3)u[n]=h,u[o]=a[c+2],l[n]=a[c+n],l[o]=a[c+o],e.rect(l[0],l[1],u[0],u[1])},r})(s.Path);function mt(i,r,e,t){var a=i.getData(),n=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),l=a.getLayout("size"),u=i.getModel("backgroundStyle"),h=a.getLayout("largeBackgroundPoints");if(h){var c=new dt({shape:{points:h},incremental:!!t,silent:!0,z2:0});c.baseDimIdx=n,c.largeDataIndices=o,c.barWidth=l,c.useStyle(u.getItemStyle()),r.add(c),e&&e.push(c)}var v=new dt({shape:{points:a.getLayout("largePoints")},incremental:!!t,ignoreCoarsePointer:!0,z2:1});v.baseDimIdx=n,v.largeDataIndices=o,v.barWidth=l,r.add(v),v.useStyle(a.getVisual("style")),v.style.stroke=null,s.getECData(v).seriesIndex=i.seriesIndex,i.get("silent")||(v.on("mousedown",yt),v.on("mousemove",yt)),e&&e.push(v)}var yt=s.throttle(function(i){var r=this,e=ra(r,i.offsetX,i.offsetY);s.getECData(r).dataIndex=e>=0?e:null},30,!1);function ra(i,r,e){for(var t=i.baseDimIdx,a=1-t,n=i.shape.points,o=i.largeDataIndices,l=[],u=[],h=i.barWidth,c=0,v=n.length/3;c<v;c++){var g=c*3;if(u[t]=h,u[a]=n[g+2],l[t]=n[g+t],l[a]=n[g+a],u[a]<0&&(l[a]+=u[a],u[a]=-u[a]),r>=l[0]&&r<=l[0]+u[0]&&e>=l[1]&&e<=l[1]+u[1])return o[c]}return-1}function Jt(i,r,e){if(me(e,"cartesian2d")){var t=r,a=e.getArea();return{x:i?t.x:a.x,y:i?a.y:t.y,width:i?t.width:a.width,height:i?a.height:t.height}}else{var a=e.getArea(),n=r;return{cx:a.cx,cy:a.cy,r0:i?a.r0:n.r0,r:i?a.r:n.r,startAngle:i?n.startAngle:0,endAngle:i?n.endAngle:Math.PI*2}}}function aa(i,r,e){var t=i.type==="polar"?s.Sector:s.Rect;return new t({shape:Jt(r,e,i),silent:!0,z2:0})}function ia(i){i.registerChartView(qr),i.registerSeriesModel(Ur),i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,s.curry(s.layout,"bar")),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,s.createProgressiveLayout("bar")),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,qt("bar")),i.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(r,e){var t=r.componentType||"series";e.eachComponent({mainType:t,query:r},function(a){r.sortInfo&&a.axis.setCategorySortInfo(r.sortInfo)})})}var St=Math.PI*2,Me=Math.PI/180;function na(i,r,e){r.eachSeriesByType(i,function(t){var a=t.getData(),n=a.mapDimension("value"),o=s.getCircleLayout(t,e),l=o.cx,u=o.cy,h=o.r,c=o.r0,v=o.viewRect,g=-t.get("startAngle")*Me,p=t.get("endAngle"),f=t.get("padAngle")*Me;p=p==="auto"?g-St:-p*Me;var d=t.get("minAngle")*Me,S=d+f,m=0;a.each(n,function(N){!isNaN(N)&&m++});var y=a.getSum(n),b=Math.PI/(y||m)*2,I=t.get("clockwise"),D=t.get("roseType"),_=t.get("stillShowZeroSum"),x=a.getDataExtent(n);x[0]=0;var A=I?1:-1,C=[g,p],w=A*f/2;s.normalizeArcAngles(C,!I),g=C[0],p=C[1];var M=Qt(t);M.startAngle=g,M.endAngle=p,M.clockwise=I,M.cx=l,M.cy=u,M.r=h,M.r0=c;var L=Math.abs(p-g),P=L,E=0,T=g;if(a.setLayout({viewRect:v,r:h}),a.each(n,function(N,V){var O;if(isNaN(N)){a.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:I,cx:l,cy:u,r0:c,r:D?NaN:h});return}D!=="area"?O=y===0&&_?b:N*b:O=L/m,O<S?(O=S,P-=S):E+=N;var R=T+A*O,z=0,G=0;f>O?(z=T+A*O/2,G=z):(z=T+w,G=R-w),a.setItemLayout(V,{angle:O,startAngle:z,endAngle:G,clockwise:I,cx:l,cy:u,r0:c,r:D?s.linearMap(N,x,[c,h]):h}),T=R}),P<St&&m)if(P<=.001){var k=L/m;a.each(n,function(N,V){if(!isNaN(N)){var O=a.getItemLayout(V);O.angle=k;var R=0,z=0;k<f?(R=g+A*(V+1/2)*k,z=R):(R=g+A*V*k+w,z=g+A*(V+1)*k-w),O.startAngle=R,O.endAngle=z}})}else b=P/E,T=g,a.each(n,function(N,V){if(!isNaN(N)){var O=a.getItemLayout(V),R=O.angle===S?S:N*b,z=0,G=0;R<f?(z=T+A*R/2,G=z):(z=T+w,G=T+A*R-w),O.startAngle=z,O.endAngle=G,T+=A*R}})})}var Qt=s.makeInner();function er(i){return{seriesType:i,reset:function(r,e){var t=e.findComponents({mainType:"legend"});if(!(!t||!t.length)){var a=r.getData();a.filterSelf(function(n){for(var o=a.getName(n),l=0;l<t.length;l++)if(!t[l].isSelected(o))return!1;return!0})}}}}var oa=Math.PI/180;function bt(i,r,e,t,a,n,o,l,u,h){if(i.length<2)return;function c(d){for(var S=d.rB,m=S*S,y=0;y<d.list.length;y++){var b=d.list[y],I=Math.abs(b.label.y-e),D=t+b.len,_=D*D,x=Math.sqrt(Math.abs((1-I*I/m)*_)),A=r+(x+b.len2)*a,C=A-b.label.x,w=b.targetTextWidth-C*a;tr(b,w,!0),b.label.x=A}}function v(d){for(var S={list:[],maxY:0},m={list:[],maxY:0},y=0;y<d.length;y++)if(d[y].labelAlignTo==="none"){var b=d[y],I=b.label.y>e?m:S,D=Math.abs(b.label.y-e);if(D>=I.maxY){var _=b.label.x-r-b.len2*a,x=t+b.len,A=Math.abs(_)<x?Math.sqrt(D*D/(1-_*_/x/x)):x;I.rB=A,I.maxY=D}I.list.push(b)}c(S),c(m)}for(var g=i.length,p=0;p<g;p++)if(i[p].position==="outer"&&i[p].labelAlignTo==="labelLine"){var f=i[p].label.x-h;i[p].linePoints[1][0]+=f,i[p].label.x=h}s.shiftLayoutOnXY(i,1,u,u+o)&&v(i)}function sa(i,r,e,t,a,n,o,l){for(var u=[],h=[],c=Number.MAX_VALUE,v=-Number.MAX_VALUE,g=0;g<i.length;g++){var p=i[g].label;Ue(i[g])||(p.x<r?(c=Math.min(c,p.x),u.push(i[g])):(v=Math.max(v,p.x),h.push(i[g])))}for(var g=0;g<i.length;g++){var f=i[g];if(!Ue(f)&&f.linePoints){if(f.labelStyleWidth!=null)continue;var p=f.label,d=f.linePoints,S=void 0;f.labelAlignTo==="edge"?p.x<r?S=d[2][0]-f.labelDistance-o-f.edgeDistance:S=o+a-f.edgeDistance-d[2][0]-f.labelDistance:f.labelAlignTo==="labelLine"?p.x<r?S=c-o-f.bleedMargin:S=o+a-v-f.bleedMargin:p.x<r?S=p.x-o-f.bleedMargin:S=o+a-p.x-f.bleedMargin,f.targetTextWidth=S,tr(f,S,!1)}}bt(h,r,e,t,1,a,n,o,l,v),bt(u,r,e,t,-1,a,n,o,l,c);for(var g=0;g<i.length;g++){var f=i[g];if(!Ue(f)&&f.linePoints){var p=f.label,d=f.linePoints,m=f.labelAlignTo==="edge",y=p.style.padding,b=y?y[1]+y[3]:0,I=p.style.backgroundColor?0:b,D=f.rect.width+I,_=d[1][0]-d[2][0];m?p.x<r?d[2][0]=o+f.edgeDistance+D+f.labelDistance:d[2][0]=o+a-f.edgeDistance-D-f.labelDistance:(p.x<r?d[2][0]=p.x+f.labelDistance:d[2][0]=p.x-f.labelDistance,d[1][0]=d[2][0]+_),d[1][1]=d[2][1]=p.y}}}function tr(i,r,e){if(i.labelStyleWidth==null){var t=i.label,a=t.style,n=i.rect,o=a.backgroundColor,l=a.padding,u=l?l[1]+l[3]:0,h=a.overflow,c=n.width+(o?0:u);if(r<c||e){if(h&&h.match("break")){t.setStyle("backgroundColor",null),t.setStyle("width",r-u);var v=t.getBoundingRect();t.setStyle("width",Math.ceil(v.width)),t.setStyle("backgroundColor",o)}else{var g=r-u,p=r<c?g:e?g>i.unconstrainedWidth?null:g:null;t.setStyle("width",p)}rr(n,t)}}}function rr(i,r){xt.rect=i,s.computeLabelGeometry(xt,r,la)}var la={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},xt={};function Ue(i){return i.position==="center"}function ua(i){var r=i.getData(),e=[],t,a,n=!1,o=(i.get("minShowLabelAngle")||0)*oa,l=r.getLayout("viewRect"),u=r.getLayout("r"),h=l.width,c=l.x,v=l.y,g=l.height;function p(_){_.ignore=!0}function f(_){if(!_.ignore)return!0;for(var x in _.states)if(_.states[x].ignore===!1)return!0;return!1}r.each(function(_){var x=r.getItemGraphicEl(_),A=x.shape,C=x.getTextContent(),w=x.getTextGuideLine(),M=r.getItemModel(_),L=M.getModel("label"),P=L.get("position")||M.get(["emphasis","label","position"]),E=L.get("distanceToLabelLine"),T=L.get("alignTo"),k=s.parsePercent(L.get("edgeDistance"),h),N=L.get("bleedMargin");N==null&&(N=Math.min(h,g)>200?10:2);var V=M.getModel("labelLine"),O=V.get("length");O=s.parsePercent(O,h);var R=V.get("length2");if(R=s.parsePercent(R,h),Math.abs(A.endAngle-A.startAngle)<o){s.each(C.states,p),C.ignore=!0,w&&(s.each(w.states,p),w.ignore=!0);return}if(f(C)){var z=(A.startAngle+A.endAngle)/2,G=Math.cos(z),H=Math.sin(z),F,B,J,xe;t=A.cx,a=A.cy;var se=P==="inside"||P==="inner";if(P==="center")F=A.cx,B=A.cy,xe="center";else{var Ne=(se?(A.r+A.r0)/2*G:A.r*G)+t,Oe=(se?(A.r+A.r0)/2*H:A.r*H)+a;if(F=Ne+G*3,B=Oe+H*3,!se){var Qe=Ne+G*(O+u-A.r),et=Oe+H*(O+u-A.r),tt=Qe+(G<0?-1:1)*R,rt=et;T==="edge"?F=G<0?c+k:c+h-k:F=tt+(G<0?-E:E),B=rt,J=[[Ne,Oe],[Qe,et],[tt,rt]]}xe=se?"center":T==="edge"?G>0?"right":"left":G>0?"left":"right"}var he=Math.PI,le=0,ve=L.get("rotate");if(s.isNumber(ve))le=ve*(he/180);else if(P==="center")le=0;else if(ve==="radial"||ve===!0){var pr=G<0?-z+he:-z;le=pr}else if(ve==="tangential"&&P!=="outside"&&P!=="outer"){var ue=Math.atan2(G,H);ue<0&&(ue=he*2+ue);var fr=H>0;fr&&(ue=he+ue),le=ue-he}if(n=!!le,C.x=F,C.y=B,C.rotation=le,C.setStyle({verticalAlign:"middle"}),se){C.setStyle({align:xe});var ze=C.states.select;ze&&(ze.x+=C.x,ze.y+=C.y)}else{var Re=new s.BoundingRect(0,0,0,0);rr(Re,C),e.push({label:C,labelLine:w,position:P,len:O,len2:R,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new s.Point(G,H),linePoints:J,textAlign:xe,labelDistance:E,labelAlignTo:T,edgeDistance:k,bleedMargin:N,rect:Re,unconstrainedWidth:Re.width,labelStyleWidth:C.style.width})}x.setTextConfig({inside:se})}}),!n&&i.get("avoidLabelOverlap")&&sa(e,t,a,u,h,g,c,v);for(var d=0;d<e.length;d++){var S=e[d],m=S.label,y=S.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:S.textAlign}),b&&(s.each(m.states,p),m.ignore=!0);var I=m.states.select;I&&(I.x+=m.x,I.y+=m.y)}if(y){var D=S.linePoints;b||!D?(s.each(y.states,p),y.ignore=!0):(mr(D,S.minTurnAngle),yr(D,S.surfaceNormal,S.maxSurfaceAngle),y.setShape({points:D}),m.__hostTarget.textGuideLineConfig={anchor:new s.Point(D[0][0],D[0][1])})}}}var ca=(function(i){s.__extends(r,i);function r(e,t,a){var n=i.call(this)||this;n.z2=2;var o=new s.ZRText;return n.setTextContent(o),n.updateData(e,t,a,!0),n}return r.prototype.updateData=function(e,t,a,n){var o=this,l=e.hostModel,u=e.getItemModel(t),h=u.getModel("emphasis"),c=e.getItemLayout(t),v=s.extend(ge(u.getModel("itemStyle"),c,!0),c);if(isNaN(v.startAngle)){o.setShape(v);return}if(n){o.setShape(v);var g=l.getShallow("animationType");l.ecModel.ssr?(s.initProps(o,{scaleX:0,scaleY:0},l,{dataIndex:t,isFrom:!0}),o.originX=v.cx,o.originY=v.cy):g==="scale"?(o.shape.r=c.r0,s.initProps(o,{shape:{r:c.r}},l,t)):a!=null?(o.setShape({startAngle:a,endAngle:a}),s.initProps(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},l,t)):(o.shape.endAngle=c.startAngle,s.updateProps(o,{shape:{endAngle:c.endAngle}},l,t))}else s.saveOldStyle(o),s.updateProps(o,{shape:v},l,t);o.useStyle(e.getItemVisual(t,"style")),s.setStatesStylesFromModel(o,u);var p=(c.startAngle+c.endAngle)/2,f=l.get("selectedOffset"),d=Math.cos(p)*f,S=Math.sin(p)*f,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(l,e,t),o.ensureState("emphasis").shape=s.extend({r:c.r+(h.get("scale")&&h.get("scaleSize")||0)},ge(h.getModel("itemStyle"),c)),s.extend(o.ensureState("select"),{x:d,y:S,shape:ge(u.getModel(["select","itemStyle"]),c)}),s.extend(o.ensureState("blur"),{shape:ge(u.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&s.extend(y.ensureState("select"),{x:d,y:S}),s.extend(b.ensureState("select"),{x:d,y:S}),s.toggleHoverEmphasis(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},r.prototype._updateLabel=function(e,t,a){var n=this,o=t.getItemModel(a),l=o.getModel("labelLine"),u=t.getItemVisual(a,"style"),h=u&&u.fill,c=u&&u.opacity;s.setLabelStyle(n,s.getLabelStatesModels(o),{labelFetcher:t.hostModel,labelDataIndex:a,inheritColor:h,defaultOpacity:c,defaultText:e.getFormattedLabel(a,"normal")||t.getName(a)});var v=n.getTextContent();n.setTextConfig({position:null,rotation:null}),v.attr({z2:10});var g=o.get(["label","position"]);if(g!=="outside"&&g!=="outer")n.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new s.Polyline,this.setTextGuideLine(p)),br(this,xr(o),{stroke:h,opacity:s.retrieve3(l.get(["lineStyle","opacity"]),c,1)})}},r})(s.Sector),ha=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return r.prototype.render=function(e,t,a,n){var o=e.getData(),l=this._data,u=this.group,h;if(!l&&o.count()>0){for(var c=o.getItemLayout(0),v=1;isNaN(c&&c.startAngle)&&v<o.count();++v)c=o.getItemLayout(v);c&&(h=c.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var g=Qt(e),p=new s.Sector({shape:s.clone(g)});p.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,u.add(p)}o.diff(l).add(function(f){var d=new ca(o,f,h);o.setItemGraphicEl(f,d),u.add(d)}).update(function(f,d){var S=l.getItemGraphicEl(d);S.updateData(o,f,h),S.off("click"),u.add(S),o.setItemGraphicEl(f,S)}).remove(function(f){var d=l.getItemGraphicEl(f);s.removeElementWithFadeOut(d,e,f)}).execute(),ua(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},r.prototype.dispose=function(){},r.prototype.containPoint=function(e,t){var a=t.getData(),n=a.getItemLayout(0);if(n){var o=e[0]-n.cx,l=e[1]-n.cy,u=Math.sqrt(o*o+l*l);return u<=n.r&&u>=n.r0}},r.type="pie",r})(s.ChartView);function Je(i,r,e){r=s.isArray(r)&&{coordDimensions:r}||s.extend({encodeDefine:i.getEncode()},r);var t=i.getSource(),a=s.prepareSeriesDataSchema(t,r).dimensions,n=new s.SeriesData(a,i);return n.initData(t,e),n}var ar=(function(){function i(r,e){this._getDataWithEncodedVisual=r,this._getRawData=e}return i.prototype.getAllNames=function(){var r=this._getRawData();return r.mapArray(r.getName)},i.prototype.containName=function(r){var e=this._getRawData();return e.indexOfName(r)>=0},i.prototype.indexOfName=function(r){var e=this._getDataWithEncodedVisual();return e.indexOfName(r)},i.prototype.getItemVisual=function(r,e){var t=this._getDataWithEncodedVisual();return t.getItemVisual(r,e)},i})(),va=s.makeInner(),ir=(function(i){s.__extends(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ar(s.bind(this.getData,this),s.bind(this.getRawData,this)),this._defaultLabelLine(e)},r.prototype.mergeOption=function(){i.prototype.mergeOption.apply(this,arguments)},r.prototype.getInitialData=function(){return Je(this,{coordDimensions:["value"],encodeDefaulter:s.curry(s.makeSeriesEncodeForNameBased,this)})},r.prototype.getDataParams=function(e){var t=this.getData(),a=va(t),n=a.seats;if(!n){var o=[];t.each(t.mapDimension("value"),function(u){o.push(u)}),n=a.seats=s.getPercentSeats(o,t.hostModel.get("percentPrecision"))}var l=i.prototype.getDataParams.call(this,e);return l.percent=n[e]||0,l.$vars.push("percent"),l},r.prototype._defaultLabelLine=function(e){s.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,a=e.emphasis.labelLine;t.show=t.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},r.type="series.pie",r.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"},r})(s.SeriesModel);s.registerLayOutOnCoordSysUsage({fullType:ir.type,getCoord2:function(i){return i.getShallow("center")}});function pa(i){return{seriesType:i,reset:function(r,e){var t=r.getData();t.filterSelf(function(a){var n=t.mapDimension("value"),o=t.get(n,a);return!(s.isNumber(o)&&!isNaN(o)&&o<0)})}}}function fa(i){i.registerChartView(ha),i.registerSeriesModel(ir),s.createLegacyDataSelectAction("pie",i.registerAction),i.registerLayout(s.curry(na,"pie")),i.registerProcessor(er("pie")),i.registerProcessor(pa("pie"))}function ga(i){i.eachSeriesByType("radar",function(r){var e=r.getData(),t=[],a=r.coordinateSystem;if(a){var n=a.getIndicatorAxes();s.each(n,function(o,l){e.each(e.mapDimension(n[l].dim),function(u,h){t[h]=t[h]||[];var c=a.dataToPoint(u,l);t[h][l]=_t(c)?c:At(a)})}),e.each(function(o){var l=s.find(t[o],function(u){return _t(u)})||At(a);t[o].push(l.slice()),e.setItemLayout(o,t[o])})}})}function _t(i){return!isNaN(i[0])&&!isNaN(i[1])}function At(i){return[i.cx,i.cy]}function da(i){var r=i.polar;if(r){s.isArray(r)||(r=[r]);var e=[];s.each(r,function(t,a){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],s.isArray(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):e.push(t)}),i.polar=e}s.each(i.series,function(t){t&&t.type==="radar"&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var ma=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n=e.coordinateSystem,o=this.group,l=e.getData(),u=this._data;function h(g,p){var f=g.getItemVisual(p,"symbol")||"circle";if(f!=="none"){var d=s.normalizeSymbolSize(g.getItemVisual(p,"symbolSize")),S=s.createSymbol(f,-1,-1,2,2),m=g.getItemVisual(p,"symbolRotate")||0;return S.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:m*Math.PI/180||0}),S}}function c(g,p,f,d,S,m){f.removeAll();for(var y=0;y<p.length-1;y++){var b=h(d,S);b&&(b.__dimIdx=y,g[y]?(b.setPosition(g[y]),s.graphic[m?"initProps":"updateProps"](b,{x:p[y][0],y:p[y][1]},e,S)):b.setPosition(p[y]),f.add(b))}}function v(g){return s.map(g,function(p){return[n.cx,n.cy]})}l.diff(u).add(function(g){var p=l.getItemLayout(g);if(p){var f=new s.Polygon,d=new s.Polyline,S={shape:{points:p}};f.shape.points=v(p),d.shape.points=v(p),s.initProps(f,S,e,g),s.initProps(d,S,e,g);var m=new s.Group,y=new s.Group;m.add(d),m.add(f),m.add(y),c(d.shape.points,p,y,l,g,!0),l.setItemGraphicEl(g,m)}}).update(function(g,p){var f=u.getItemGraphicEl(p),d=f.childAt(0),S=f.childAt(1),m=f.childAt(2),y={shape:{points:l.getItemLayout(g)}};y.shape.points&&(c(d.shape.points,y.shape.points,m,l,g,!1),s.saveOldStyle(S),s.saveOldStyle(d),s.updateProps(d,y,e),s.updateProps(S,y,e),l.setItemGraphicEl(g,f))}).remove(function(g){o.remove(u.getItemGraphicEl(g))}).execute(),l.eachItemGraphicEl(function(g,p){var f=l.getItemModel(p),d=g.childAt(0),S=g.childAt(1),m=g.childAt(2),y=l.getItemVisual(p,"style"),b=y.fill;o.add(g),d.useStyle(s.defaults(f.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),s.setStatesStylesFromModel(d,f,"lineStyle"),s.setStatesStylesFromModel(S,f,"areaStyle");var I=f.getModel("areaStyle"),D=I.isEmpty()&&I.parentModel.isEmpty();S.ignore=D,s.each(["emphasis","select","blur"],function(x){var A=f.getModel([x,"areaStyle"]),C=A.isEmpty()&&A.parentModel.isEmpty();S.ensureState(x).ignore=C&&D;var w=f.getModel([x,"lineStyle"]).getLineStyle();d.ensureState(x).style=w;var M=A.getAreaStyle();S.ensureState(x).style=M;var L=f.getModel([x,"itemStyle"]).getItemStyle();m.eachChild(function(P){P.ensureState(x).style=s.clone(L)})}),S.useStyle(s.defaults(f.getModel("areaStyle").getAreaStyle(),{fill:b,opacity:.7,decal:y.decal}));var _=f.getModel("emphasis");m.eachChild(function(x){if(x instanceof s.ZRImage){var A=x.style;x.useStyle(s.extend({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},y))}else x.useStyle(y),x.setColor(b),x.style.strokeNoScale=!0;var C=l.getStore().get(l.getDimensionIndex(x.__dimIdx),p);(C==null||isNaN(C))&&(C=""),s.setLabelStyle(x,s.getLabelStatesModels(f),{labelFetcher:l.hostModel,labelDataIndex:p,labelDimIndex:x.__dimIdx,defaultText:C,inheritColor:b,defaultOpacity:y.opacity})}),s.toggleHoverEmphasis(g,_.get("focus"),_.get("blurScope"),_.get("disabled"))}),this._data=l},r.prototype.remove=function(){this.group.removeAll(),this._data=null},r.type="radar",r})(s.ChartView),ya=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.hasSymbolVisual=!0,e}return r.prototype.init=function(e){i.prototype.init.apply(this,arguments),this.legendVisualProvider=new ar(s.bind(this.getData,this),s.bind(this.getRawData,this))},r.prototype.getInitialData=function(e,t){return Je(this,{generateCoord:"indicator_",generateCoordCount:1/0})},r.prototype.formatTooltip=function(e,t,a){var n=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),u=this.getData().getName(e),h=u===""?this.name:u,c=s.retrieveVisualColorForTooltipMarker(this,e);return s.createTooltipMarkup("section",{header:h,sortBlocks:!0,blocks:s.map(l,function(v){var g=n.get(n.mapDimension(v.dim),e);return s.createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:c,name:v.name,value:g,sortParam:g})})})},r.prototype.getTooltipPosition=function(e){if(e!=null){for(var t=this.getData(),a=this.coordinateSystem,n=t.getValues(s.map(a.dimensions,function(h){return t.mapDimension(h)}),e),o=0,l=n.length;o<l;o++)if(!isNaN(n[o])){var u=a.getIndicatorAxes();return a.coordToPoint(u[o].dataToCoord(n[o]),o)}}},r.type="series.radar",r.dependencies=["radar"],r.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},r})(s.SeriesModel),pe=s.axisDefault.value;function De(i,r){return s.defaults({show:r},i)}var Sa=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),a=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),l=this.get("axisLabel"),u=this.get("axisName"),h=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),v=this.get("axisNameGap"),g=this.get("triggerEvent"),p=s.map(this.get("indicator")||[],function(f){f.max!=null&&f.max>0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var d=u;f.color!=null&&(d=s.defaults({color:f.color},u));var S=s.merge(s.clone(f),{boundaryGap:e,splitNumber:t,scale:a,axisLine:n,axisTick:o,axisLabel:l,name:f.text,showName:h,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:g},!1);if(s.isString(c)){var m=S.name;S.name=c.replace("{value}",m??"")}else s.isFunction(c)&&(S.name=c(S.name,S));var y=new s.Model(S,null,this.ecModel);return s.mixin(y,s.AxisModelCommonMixin.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=p},r.prototype.getIndicatorModels=function(){return this._indicatorModels},r.type="radar",r.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:s.tokens.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:s.merge({lineStyle:{color:s.tokens.color.neutral20}},pe.axisLine),axisLabel:De(pe.axisLabel,!1),axisTick:De(pe.axisTick,!1),splitLine:De(pe.splitLine,!0),splitArea:De(pe.splitArea,!0),indicator:[]},r})(s.ComponentModel),ba=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n=this.group;n.removeAll(),this._buildAxes(e,a),this._buildSplitLineAndArea(e)},r.prototype._buildAxes=function(e,t){var a=e.coordinateSystem,n=a.getIndicatorAxes(),o=s.map(n,function(l){var u=l.model.get("showName")?l.name:"",h=new s.AxisBuilder(l.model,t,{axisName:u,position:[a.cx,a.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return h});s.each(o,function(l){l.build(),this.group.add(l.group)},this)},r.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,a=t.getIndicatorAxes();if(!a.length)return;var n=e.get("shape"),o=e.getModel("splitLine"),l=e.getModel("splitArea"),u=o.getModel("lineStyle"),h=l.getModel("areaStyle"),c=o.get("show"),v=l.get("show"),g=u.get("color"),p=h.get("color"),f=s.isArray(g)?g:[g],d=s.isArray(p)?p:[p],S=[],m=[];function y(T,k,N){var V=N%k.length;return T[V]=T[V]||[],V}if(n==="circle")for(var b=a[0].getTicksCoords(),I=t.cx,D=t.cy,_=0;_<b.length;_++){if(c){var x=y(S,f,_);S[x].push(new s.Circle({shape:{cx:I,cy:D,r:b[_].coord}}))}if(v&&_<b.length-1){var x=y(m,d,_);m[x].push(new s.Ring({shape:{cx:I,cy:D,r0:b[_].coord,r:b[_+1].coord}}))}}else for(var A,C=s.map(a,function(T,k){var N=T.getTicksCoords();return A=A==null?N.length-1:Math.min(N.length-1,A),s.map(N,function(V){return t.coordToPoint(V.coord,k)})}),w=[],_=0;_<=A;_++){for(var M=[],L=0;L<a.length;L++)M.push(C[L][_]);if(M[0]?M.push(M[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+_),c){var x=y(S,f,_);S[x].push(new s.Polyline({shape:{points:M}}))}if(v&&w){var x=y(m,d,_-1);m[x].push(new s.Polygon({shape:{points:M.concat(w)}}))}w=M.slice().reverse()}var P=u.getLineStyle(),E=h.getAreaStyle();s.each(m,function(T,k){this.group.add(s.mergePath(T,{style:s.defaults({stroke:"none",fill:d[k%d.length]},E),silent:!0}))},this),s.each(S,function(T,k){this.group.add(s.mergePath(T,{style:s.defaults({fill:"none",stroke:f[k%f.length]},P),silent:!0}))},this)},r.type="radar",r})(s.ComponentView),xa=(function(i){s.__extends(r,i);function r(e,t,a){var n=i.call(this,e,t,a)||this;return n.type="value",n.angle=0,n.name="",n}return r})(s.Axis),_a=(function(){function i(r,e,t){this.dimensions=[],this._model=r,this._indicatorAxes=s.map(r.getIndicatorModels(),function(a,n){var o="indicator_"+n,l=new xa(o,new s.IntervalScale);return l.name=a.get("name"),l.model=a,a.axis=l,this.dimensions.push(o),l},this),this.resize(r,t)}return i.prototype.getIndicatorAxes=function(){return this._indicatorAxes},i.prototype.dataToPoint=function(r,e){var t=this._indicatorAxes[e];return this.coordToPoint(t.dataToCoord(r),e)},i.prototype.coordToPoint=function(r,e){var t=this._indicatorAxes[e],a=t.angle,n=this.cx+r*Math.cos(a),o=this.cy-r*Math.sin(a);return[n,o]},i.prototype.pointToData=function(r){var e=r[0]-this.cx,t=r[1]-this.cy,a=Math.sqrt(e*e+t*t);e/=a,t/=a;for(var n=Math.atan2(-t,e),o=1/0,l,u=-1,h=0;h<this._indicatorAxes.length;h++){var c=this._indicatorAxes[h],v=Math.abs(n-c.angle);v<o&&(l=c,u=h,o=v)}return[u,+(l&&l.coordToData(a))]},i.prototype.resize=function(r,e){var t=s.createBoxLayoutReference(r,e).refContainer,a=r.get("center"),n=Math.min(t.width,t.height)/2;this.cx=s.parsePercent(a[0],t.width)+t.x,this.cy=s.parsePercent(a[1],t.height)+t.y,this.startAngle=r.get("startAngle")*Math.PI/180;var o=r.get("radius");(s.isString(o)||s.isNumber(o))&&(o=[0,o]),this.r0=s.parsePercent(o[0],n),this.r=s.parsePercent(o[1],n),s.each(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var h=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;h=Math.atan2(Math.sin(h),Math.cos(h)),l.angle=h},this)},i.prototype.update=function(r,e){var t=this._indicatorAxes,a=this._model;s.each(t,function(l){l.scale.setExtent(1/0,-1/0)}),r.eachSeriesByType("radar",function(l,u){if(!(l.get("coordinateSystem")!=="radar"||r.getComponent("radar",l.get("radarIndex"))!==a)){var h=l.getData();s.each(t,function(c){c.scale.unionExtentFromData(h,h.mapDimension(c.dim))})}},this);var n=a.get("splitNumber"),o=new s.IntervalScale;o.setExtent(0,n),o.setInterval(1),s.each(t,function(l,u){s.alignScaleTicks(l.scale,l.model,o)})},i.prototype.convertToPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.convertFromPixel=function(r,e,t){return console.warn("Not implemented."),null},i.prototype.containPoint=function(r){return console.warn("Not implemented."),!1},i.create=function(r,e){var t=[];return r.eachComponent("radar",function(a){var n=new i(a,r,e);t.push(n),a.coordinateSystem=n}),r.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=t[a.get("radarIndex")||0])}),t},i.dimensions=[],i})();function nr(i){i.registerCoordinateSystem("radar",_a),i.registerComponentModel(Sa),i.registerComponentView(ba),i.registerVisual({seriesType:"radar",reset:function(r){var e=r.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function Aa(i){s.use(nr),i.registerChartView(ma),i.registerSeriesModel(ya),i.registerLayout(ga),i.registerProcessor(er("radar")),i.registerPreprocessor(da)}var ye=s.each,wa=s.isObject,ke=-1,X=(function(){function i(r){var e=r.mappingMethod,t=r.type,a=this.option=s.clone(r);this.type=t,this.mappingMethod=e,this._normalizeData=Ia[e];var n=i.visualHandlers[t];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],e==="piecewise"?($e(a),Ma(a)):e==="category"?a.categories?Da(a):$e(a,!0):(s.assert(e!=="linear"||a.dataExtent),$e(a))}return i.prototype.mapValueToVisual=function(r){var e=this._normalizeData(r);return this._normalizedToVisual(e,r)},i.prototype.getNormalizer=function(){return s.bind(this._normalizeData,this)},i.listVisualTypes=function(){return s.keys(i.visualHandlers)},i.isValidType=function(r){return i.visualHandlers.hasOwnProperty(r)},i.eachVisual=function(r,e,t){s.isObject(r)?s.each(r,e,t):e.call(t,r)},i.mapVisual=function(r,e,t){var a,n=s.isArray(r)?[]:s.isObject(r)?{}:(a=!0,null);return i.eachVisual(r,function(o,l){var u=e.call(t,o,l);a?n=u:n[l]=u}),n},i.retrieveVisuals=function(r){var e={},t;return r&&ye(i.visualHandlers,function(a,n){r.hasOwnProperty(n)&&(e[n]=r[n],t=!0)}),t?e:null},i.prepareVisualTypes=function(r){if(s.isArray(r))r=r.slice();else if(wa(r)){var e=[];ye(r,function(t,a){e.push(a)}),r=e}else return[];return r.sort(function(t,a){return a==="color"&&t!=="color"&&t.indexOf("color")===0?1:-1}),r},i.dependsOn=function(r,e){return e==="color"?!!(r&&r.indexOf(e)===0):r===e},i.findPieceIndex=function(r,e,t){for(var a,n=1/0,o=0,l=e.length;o<l;o++){var u=e[o].value;if(u!=null){if(u===r||s.isString(u)&&u===r+"")return o;t&&g(u,o)}}for(var o=0,l=e.length;o<l;o++){var h=e[o],c=h.interval,v=h.close;if(c){if(c[0]===-1/0){if(Le(v[1],r,c[1]))return o}else if(c[1]===1/0){if(Le(v[0],c[0],r))return o}else if(Le(v[0],c[0],r)&&Le(v[1],r,c[1]))return o;t&&g(c[0],o),t&&g(c[1],o)}}if(t)return r===1/0?e.length-1:r===-1/0?0:a;function g(p,f){var d=Math.abs(p-r);d<n&&(n=d,a=f)}},i.visualHandlers={color:{applyVisual:fe("color"),getColorMapper:function(){var r=this.option;return s.bind(r.mappingMethod==="category"?function(e,t){return!t&&(e=this._normalizeData(e)),de.call(this,e)}:function(e,t,a){var n=!!a;return!t&&(e=this._normalizeData(e)),a=s.fastLerp(e,r.parsedVisual,a),n?a:s.stringify(a,"rgba")},this)},_normalizedToVisual:{linear:function(r){return s.stringify(s.fastLerp(r,this.option.parsedVisual),"rgba")},category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=s.stringify(s.fastLerp(r,this.option.parsedVisual),"rgba")),t},fixed:ne}},colorHue:Ie(function(r,e){return s.modifyHSL(r,e)}),colorSaturation:Ie(function(r,e){return s.modifyHSL(r,null,e)}),colorLightness:Ie(function(r,e){return s.modifyHSL(r,null,null,e)}),colorAlpha:Ie(function(r,e){return s.modifyAlpha(r,e)}),decal:{applyVisual:fe("decal"),_normalizedToVisual:{linear:null,category:de,piecewise:null,fixed:null}},opacity:{applyVisual:fe("opacity"),_normalizedToVisual:qe([0,1])},liftZ:{applyVisual:fe("liftZ"),_normalizedToVisual:{linear:ne,category:ne,piecewise:ne,fixed:ne}},symbol:{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("symbol",a)},_normalizedToVisual:{linear:wt,category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=wt.call(this,r)),t},fixed:ne}},symbolSize:{applyVisual:fe("symbolSize"),_normalizedToVisual:qe([0,1])}},i})();function Ma(i){var r=i.pieceList;i.hasSpecialVisual=!1,s.each(r,function(e,t){e.originIndex=t,e.visual!=null&&(i.hasSpecialVisual=!0)})}function Da(i){var r=i.categories,e=i.categoryMap={},t=i.visual;if(ye(r,function(o,l){e[o]=l}),!s.isArray(t)){var a=[];s.isObject(t)?ye(t,function(o,l){var u=e[l];a[u??ke]=o}):a[ke]=t,t=or(i,a)}for(var n=r.length-1;n>=0;n--)t[n]==null&&(delete e[r[n]],r.pop())}function $e(i,r){var e=i.visual,t=[];s.isObject(e)?ye(e,function(n){t.push(n)}):e!=null&&t.push(e);var a={color:1,symbol:1};!r&&t.length===1&&!a.hasOwnProperty(i.type)&&(t[1]=t[0]),or(i,t)}function Ie(i){return{applyVisual:function(r,e,t){var a=this.mapValueToVisual(r);t("color",i(e("color"),a))},_normalizedToVisual:qe([0,1])}}function wt(i){var r=this.option.visual;return r[Math.round(s.linearMap(i,[0,1],[0,r.length-1],!0))]||{}}function fe(i){return function(r,e,t){t(i,this.mapValueToVisual(r))}}function de(i){var r=this.option.visual;return r[this.option.loop&&i!==ke?i%r.length:i]}function ne(){return this.option.visual[0]}function qe(i){return{linear:function(r){return s.linearMap(r,i,this.option.visual,!0)},category:de,piecewise:function(r,e){var t=je.call(this,e);return t==null&&(t=s.linearMap(r,i,this.option.visual,!0)),t},fixed:ne}}function je(i){var r=this.option,e=r.pieceList;if(r.hasSpecialVisual){var t=X.findPieceIndex(i,e),a=e[t];if(a&&a.visual)return a.visual[this.type]}}function or(i,r){return i.visual=r,i.type==="color"&&(i.parsedVisual=s.map(r,function(e){var t=s.parse(e);return!t&&process.env.NODE_ENV!=="production"&&s.warn("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),r}var Ia={linear:function(i){return s.linearMap(i,this.option.dataExtent,[0,1],!0)},piecewise:function(i){var r=this.option.pieceList,e=X.findPieceIndex(i,r,!0);if(e!=null)return s.linearMap(e,[0,r.length-1],[0,1],!0)},category:function(i){var r=this.option.categories?this.option.categoryMap[i]:i;return r??ke},fixed:s.noop};function Le(i,r,e){return i?r<=e:r<e}var La=(function(){function i(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return i})(),Ca=(function(i){s.__extends(r,i);function r(e){var t=i.call(this,e)||this;return t.type="pointer",t}return r.prototype.getDefaultShape=function(){return new La},r.prototype.buildPath=function(e,t){var a=Math.cos,n=Math.sin,o=t.r,l=t.width,u=t.angle,h=t.x-a(u)*l*(l>=o/3?1:2),c=t.y-n(u)*l*(l>=o/3?1:2);u=t.angle-Math.PI/2,e.moveTo(h,c),e.lineTo(t.x+a(u)*l,t.y+n(u)*l),e.lineTo(t.x+a(t.angle)*o,t.y+n(t.angle)*o),e.lineTo(t.x-a(u)*l,t.y-n(u)*l),e.lineTo(h,c)},r})(s.Path);function Pa(i,r){var e=i.get("center"),t=r.getWidth(),a=r.getHeight(),n=Math.min(t,a),o=s.parsePercent(e[0],r.getWidth()),l=s.parsePercent(e[1],r.getHeight()),u=s.parsePercent(i.get("radius"),n/2);return{cx:o,cy:l,r:u}}function Ce(i,r){var e=i==null?"":i+"";return r&&(s.isString(r)?e=r.replace("{value}",e):s.isFunction(r)&&(e=r(i))),e}var Ta=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){this.group.removeAll();var n=e.get(["axisLine","lineStyle","color"]),o=Pa(e,a);this._renderMain(e,t,a,n,o),this._data=e.getData()},r.prototype.dispose=function(){},r.prototype._renderMain=function(e,t,a,n,o){var l=this.group,u=e.get("clockwise"),h=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,v=e.getModel("axisLine"),g=v.get("roundCap"),p=g?Ve:s.Sector,f=v.get("show"),d=v.getModel("lineStyle"),S=d.get("width"),m=[h,c];s.normalizeArcAngles(m,!u),h=m[0],c=m[1];for(var y=c-h,b=h,I=[],D=0;f&&D<n.length;D++){var _=Math.min(Math.max(n[D][0],0),1);c=h+y*_;var x=new p({shape:{startAngle:b,endAngle:c,cx:o.cx,cy:o.cy,clockwise:u,r0:o.r-S,r:o.r},silent:!0});x.setStyle({fill:n[D][1]}),x.setStyle(d.getLineStyle(["color","width"])),I.push(x),b=c}I.reverse(),s.each(I,function(C){return l.add(C)});var A=function(C){if(C<=0)return n[0][1];var w;for(w=0;w<n.length;w++)if(n[w][0]>=C&&(w===0?0:n[w-1][0])<C)return n[w][1];return n[w-1][1]};this._renderTicks(e,t,a,A,o,h,c,u,S),this._renderTitleAndDetail(e,t,a,A,o),this._renderAnchor(e,o),this._renderPointer(e,t,a,A,o,h,c,u,S)},r.prototype._renderTicks=function(e,t,a,n,o,l,u,h,c){for(var v=this.group,g=o.cx,p=o.cy,f=o.r,d=+e.get("min"),S=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),b=e.getModel("axisLabel"),I=e.get("splitNumber"),D=y.get("splitNumber"),_=s.parsePercent(m.get("length"),f),x=s.parsePercent(y.get("length"),f),A=l,C=(u-l)/I,w=C/D,M=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),P=m.get("distance"),E,T,k=0;k<=I;k++){if(E=Math.cos(A),T=Math.sin(A),m.get("show")){var N=P?P+c:c,V=new s.Line({shape:{x1:E*(f-N)+g,y1:T*(f-N)+p,x2:E*(f-_-N)+g,y2:T*(f-_-N)+p},style:M,silent:!0});M.stroke==="auto"&&V.setStyle({stroke:n(k/I)}),v.add(V)}if(b.get("show")){var N=b.get("distance")+P,O=Ce(s.round(k/I*(S-d)+d),b.get("formatter")),R=n(k/I),z=E*(f-_-N)+g,G=T*(f-_-N)+p,H=b.get("rotate"),F=0;H==="radial"?(F=-A+2*Math.PI,F>Math.PI/2&&(F+=Math.PI)):H==="tangential"?F=-A-Math.PI/2:s.isNumber(H)&&(F=H*Math.PI/180),F===0?v.add(new s.ZRText({style:s.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:T<-.8?"top":T>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:R}),silent:!0})):v.add(new s.ZRText({style:s.createTextStyle(b,{text:O,x:z,y:G,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:z,originY:G,rotation:F}))}if(y.get("show")&&k!==I){var N=y.get("distance");N=N?N+c:c;for(var B=0;B<=D;B++){E=Math.cos(A),T=Math.sin(A);var J=new s.Line({shape:{x1:E*(f-N)+g,y1:T*(f-N)+p,x2:E*(f-x-N)+g,y2:T*(f-x-N)+p},silent:!0,style:L});L.stroke==="auto"&&J.setStyle({stroke:n((k+B/D)/I)}),v.add(J),A+=w}A-=w}else A+=C}},r.prototype._renderPointer=function(e,t,a,n,o,l,u,h,c){var v=this.group,g=this._data,p=this._progressEls,f=[],d=e.get(["pointer","show"]),S=e.getModel("progress"),m=S.get("show"),y=e.getData(),b=y.mapDimension("value"),I=+e.get("min"),D=+e.get("max"),_=[I,D],x=[l,u];function A(w,M){var L=y.getItemModel(w),P=L.getModel("pointer"),E=s.parsePercent(P.get("width"),o.r),T=s.parsePercent(P.get("length"),o.r),k=e.get(["pointer","icon"]),N=P.get("offsetCenter"),V=s.parsePercent(N[0],o.r),O=s.parsePercent(N[1],o.r),R=P.get("keepAspect"),z;return k?z=s.createSymbol(k,V-E/2,O-T,E,T,null,R):z=new Ca({shape:{angle:-Math.PI/2,width:E,r:T,x:V,y:O}}),z.rotation=-(M+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function C(w,M){var L=S.get("roundCap"),P=L?Ve:s.Sector,E=S.get("overlap"),T=E?S.get("width"):c/y.count(),k=E?o.r-T:o.r-(w+1)*T,N=E?o.r:o.r-w*T,V=new P({shape:{startAngle:l,endAngle:M,cx:o.cx,cy:o.cy,clockwise:h,r0:k,r:N}});return E&&(V.z2=s.linearMap(y.get(b,w),[I,D],[100,0],!0)),V}(m||d)&&(y.diff(g).add(function(w){var M=y.get(b,w);if(d){var L=A(w,l);s.initProps(L,{rotation:-((isNaN(+M)?x[0]:s.linearMap(M,_,x,!0))+Math.PI/2)},e),v.add(L),y.setItemGraphicEl(w,L)}if(m){var P=C(w,l),E=S.get("clip");s.initProps(P,{shape:{endAngle:s.linearMap(M,_,x,E)}},e),v.add(P),s.setCommonECData(e.seriesIndex,y.dataType,w,P),f[w]=P}}).update(function(w,M){var L=y.get(b,w);if(d){var P=g.getItemGraphicEl(M),E=P?P.rotation:l,T=A(w,E);T.rotation=E,s.updateProps(T,{rotation:-((isNaN(+L)?x[0]:s.linearMap(L,_,x,!0))+Math.PI/2)},e),v.add(T),y.setItemGraphicEl(w,T)}if(m){var k=p[M],N=k?k.shape.endAngle:l,V=C(w,N),O=S.get("clip");s.updateProps(V,{shape:{endAngle:s.linearMap(L,_,x,O)}},e),v.add(V),s.setCommonECData(e.seriesIndex,y.dataType,w,V),f[w]=V}}).execute(),y.each(function(w){var M=y.getItemModel(w),L=M.getModel("emphasis"),P=L.get("focus"),E=L.get("blurScope"),T=L.get("disabled");if(d){var k=y.getItemGraphicEl(w),N=y.getItemVisual(w,"style"),V=N.fill;if(k instanceof s.ZRImage){var O=k.style;k.useStyle(s.extend({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},N))}else k.useStyle(N),k.type!=="pointer"&&k.setColor(V);k.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",n(s.linearMap(y.get(b,w),_,[0,1],!0))),k.z2EmphasisLift=0,s.setStatesStylesFromModel(k,M),s.toggleHoverEmphasis(k,P,E,T)}if(m){var R=f[w];R.useStyle(y.getItemVisual(w,"style")),R.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),R.z2EmphasisLift=0,s.setStatesStylesFromModel(R,M),s.toggleHoverEmphasis(R,P,E,T)}}),this._progressEls=f)},r.prototype._renderAnchor=function(e,t){var a=e.getModel("anchor"),n=a.get("show");if(n){var o=a.get("size"),l=a.get("icon"),u=a.get("offsetCenter"),h=a.get("keepAspect"),c=s.createSymbol(l,t.cx-o/2+s.parsePercent(u[0],t.r),t.cy-o/2+s.parsePercent(u[1],t.r),o,o,null,h);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},r.prototype._renderTitleAndDetail=function(e,t,a,n,o){var l=this,u=e.getData(),h=u.mapDimension("value"),c=+e.get("min"),v=+e.get("max"),g=new s.Group,p=[],f=[],d=e.isAnimationEnabled(),S=e.get(["pointer","showAbove"]);u.diff(this._data).add(function(m){p[m]=new s.ZRText({silent:!0}),f[m]=new s.ZRText({silent:!0})}).update(function(m,y){p[m]=l._titleEls[y],f[m]=l._detailEls[y]}).execute(),u.each(function(m){var y=u.getItemModel(m),b=u.get(h,m),I=new s.Group,D=n(s.linearMap(b,[c,v],[0,1],!0)),_=y.getModel("title");if(_.get("show")){var x=_.get("offsetCenter"),A=o.cx+s.parsePercent(x[0],o.r),C=o.cy+s.parsePercent(x[1],o.r),w=p[m];w.attr({z2:S?0:2,style:s.createTextStyle(_,{x:A,y:C,text:u.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:D})}),I.add(w)}var M=y.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),P=o.cx+s.parsePercent(L[0],o.r),E=o.cy+s.parsePercent(L[1],o.r),T=s.parsePercent(M.get("width"),o.r),k=s.parsePercent(M.get("height"),o.r),N=e.get(["progress","show"])?u.getItemVisual(m,"style").fill:D,w=f[m],V=M.get("formatter");w.attr({z2:S?0:2,style:s.createTextStyle(M,{x:P,y:E,text:Ce(b,V),width:isNaN(T)?null:T,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:N})}),s.setLabelValueAnimation(w,{normal:M},b,function(R){return Ce(R,V)}),d&&s.animateLabelValue(w,m,u,e,{getFormattedLabel:function(R,z,G,H,F,B){return Ce(B?B.interpolatedValue:b,V)}}),I.add(w)}g.add(I)}),this.group.add(g),this._titleEls=p,this._detailEls=f},r.type="gauge",r})(s.ChartView),Va=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.visualStyleAccessPath="itemStyle",e}return r.prototype.getInitialData=function(e,t){return Je(this,["value"])},r.type="series.gauge",r.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,s.tokens.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:s.tokens.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:s.tokens.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:s.tokens.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:s.tokens.color.neutral00,borderWidth:0,borderColor:s.tokens.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:s.tokens.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:s.tokens.color.transparent,borderWidth:0,borderColor:s.tokens.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:s.tokens.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},r})(s.SeriesModel);function ka(i){i.registerChartView(Ta),i.registerSeriesModel(Va)}var Ea=256,Na=(function(){function i(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var r=s.platformApi.createCanvas();this.canvas=r}return i.prototype.update=function(r,e,t,a,n,o){var l=this._getBrush(),u=this._getGradient(n,"inRange"),h=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,v=this.canvas,g=v.getContext("2d"),p=r.length;v.width=e,v.height=t;for(var f=0;f<p;++f){var d=r[f],S=d[0],m=d[1],y=d[2],b=a(y);g.globalAlpha=b,g.drawImage(l,S-c,m-c)}if(!v.width||!v.height)return v;for(var I=g.getImageData(0,0,v.width,v.height),D=I.data,_=0,x=D.length,A=this.minOpacity,C=this.maxOpacity,w=C-A;_<x;){var b=D[_+3]/256,M=Math.floor(b*(Ea-1))*4;if(b>0){var L=o(b)?u:h;b>0&&(b=b*w+A),D[_++]=L[M],D[_++]=L[M+1],D[_++]=L[M+2],D[_++]=L[M+3]*b*256}else _+=4}return g.putImageData(I,0,0),v},i.prototype._getBrush=function(){var r=this._brushCanvas||(this._brushCanvas=s.platformApi.createCanvas()),e=this.pointSize+this.blurSize,t=e*2;r.width=t,r.height=t;var a=r.getContext("2d");return a.clearRect(0,0,t,t),a.shadowOffsetX=t,a.shadowBlur=this.blurSize,a.shadowColor=s.tokens.color.neutral99,a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),r},i.prototype._getGradient=function(r,e){for(var t=this._gradientPixels,a=t[e]||(t[e]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,l=0;l<256;l++)r[e](l/255,!0,n),a[o++]=n[0],a[o++]=n[1],a[o++]=n[2],a[o++]=n[3];return a},i})();function Oa(i,r,e){var t=i[1]-i[0];r=s.map(r,function(o){return{interval:[(o.interval[0]-i[0])/t,(o.interval[1]-i[0])/t]}});var a=r.length,n=0;return function(o){var l;for(l=n;l<a;l++){var u=r[l].interval;if(u[0]<=o&&o<=u[1]){n=l;break}}if(l===a)for(l=n-1;l>=0;l--){var u=r[l].interval;if(u[0]<=o&&o<=u[1]){n=l;break}}return l>=0&&l<a&&e[l]}}function Ra(i,r){var e=i[1]-i[0];return r=[(r[0]-i[0])/e,(r[1]-i[0])/e],function(t){return t>=r[0]&&t<=r[1]}}function Mt(i){var r=i.dimensions;return r[0]==="lng"&&r[1]==="lat"}var za=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.render=function(e,t,a){var n;if(t.eachComponent("visualMap",function(l){l.eachTargetSeries(function(u){u===e&&(n=l)})}),process.env.NODE_ENV!=="production"&&!n)throw new Error("Heatmap must use with visualMap");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()):Mt(o)&&this._renderOnGeo(o,e,n,a)},r.prototype.incrementalPrepareRender=function(e,t,a){this.group.removeAll()},r.prototype.incrementalRender=function(e,t,a,n){var o=t.coordinateSystem;o&&(Mt(o)?this.render(t,a,n):(this._progressiveEls=[],this._renderOnGridLike(t,n,e.start,e.end,!0)))},r.prototype.eachRendered=function(e){s.traverseElements(this._progressiveEls||this.group,e)},r.prototype._renderOnGridLike=function(e,t,a,n,o){var l=e.coordinateSystem,u=me(l,"cartesian2d"),h=me(l,"matrix"),c,v,g,p;if(u){var f=l.getAxis("x"),d=l.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(f.type==="category"&&d.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(f.onBand&&d.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}c=f.getBandWidth()+.5,v=d.getBandWidth()+.5,g=f.scale.getExtent(),p=d.scale.getExtent()}for(var S=this.group,m=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),b=e.getModel(["blur","itemStyle"]).getItemStyle(),I=e.getModel(["select","itemStyle"]).getItemStyle(),D=e.get(["itemStyle","borderRadius"]),_=s.getLabelStatesModels(e),x=e.getModel("emphasis"),A=x.get("focus"),C=x.get("blurScope"),w=x.get("disabled"),M=u||h?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=a;L<n;L++){var P=void 0,E=m.getItemVisual(L,"style");if(u){var T=m.get(M[0],L),k=m.get(M[1],L);if(isNaN(m.get(M[2],L))||isNaN(T)||isNaN(k)||T<g[0]||T>g[1]||k<p[0]||k>p[1])continue;var N=l.dataToPoint([T,k]);P=new s.Rect({shape:{x:N[0]-c/2,y:N[1]-v/2,width:c,height:v},style:E})}else if(h){var V=l.dataToLayout([m.get(M[0],L),m.get(M[1],L)]).rect;if(s.eqNaN(V.x))continue;P=new s.Rect({z2:1,shape:V,style:E})}else{if(isNaN(m.get(M[1],L)))continue;var O=l.dataToLayout([m.get(M[0],L)]),V=O.contentRect||O.rect;if(s.eqNaN(V.x)||s.eqNaN(V.y))continue;P=new s.Rect({z2:1,shape:V,style:E})}if(m.hasItemOption){var R=m.getItemModel(L),z=R.getModel("emphasis");y=z.getModel("itemStyle").getItemStyle(),b=R.getModel(["blur","itemStyle"]).getItemStyle(),I=R.getModel(["select","itemStyle"]).getItemStyle(),D=R.get(["itemStyle","borderRadius"]),A=z.get("focus"),C=z.get("blurScope"),w=z.get("disabled"),_=s.getLabelStatesModels(R)}P.shape.r=D;var G=e.getRawValue(L),H="-";G&&G[2]!=null&&(H=G[2]+""),s.setLabelStyle(P,_,{labelFetcher:e,labelDataIndex:L,defaultOpacity:E.opacity,defaultText:H}),P.ensureState("emphasis").style=y,P.ensureState("blur").style=b,P.ensureState("select").style=I,s.toggleHoverEmphasis(P,A,C,w),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),S.add(P),m.setItemGraphicEl(L,P),this._progressiveEls&&this._progressiveEls.push(P)}},r.prototype._renderOnGeo=function(e,t,a,n){var o=a.targetVisuals.inRange,l=a.targetVisuals.outOfRange,u=t.getData(),h=this._hmLayer||this._hmLayer||new Na;h.blurSize=t.get("blurSize"),h.pointSize=t.get("pointSize"),h.minOpacity=t.get("minOpacity"),h.maxOpacity=t.get("maxOpacity");var c=e.getViewRect().clone(),v=e.getRoamTransform();c.applyTransform(v);var g=Math.max(c.x,0),p=Math.max(c.y,0),f=Math.min(c.width+c.x,n.getWidth()),d=Math.min(c.height+c.y,n.getHeight()),S=f-g,m=d-p,y=[u.mapDimension("lng"),u.mapDimension("lat"),u.mapDimension("value")],b=u.mapArray(y,function(x,A,C){var w=e.dataToPoint([x,A]);return w[0]-=g,w[1]-=p,w.push(C),w}),I=a.getExtent(),D=a.type==="visualMap.continuous"?Ra(I,a.option.range):Oa(I,a.getPieceList(),a.option.selected);h.update(b,S,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},D);var _=new s.ZRImage({style:{width:S,height:m,x:g,y:p,image:h.canvas},silent:!0});this.group.add(_)},r.type="heatmap",r})(s.ChartView),Ga=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.getInitialData=function(e,t){return s.createSeriesData(null,this,{generateCoord:"value"})},r.prototype.preventIncremental=function(){var e=s.CoordinateSystemManager.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},r.type="series.heatmap",r.dependencies=["grid","geo","calendar","matrix"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:s.tokens.color.primary}}},r})(s.SeriesModel);function Ha(i){i.registerChartView(za),i.registerSeriesModel(Ga)}var Dt=s.each;function It(i){if(i){for(var r in i)if(i.hasOwnProperty(r))return!0}}function Lt(i,r,e){var t={};return Dt(r,function(n){var o=t[n]=a();Dt(i[n],function(l,u){if(X.isValidType(u)){var h={type:u,visual:l};e&&e(h,n),o[u]=new X(h),u==="opacity"&&(h=s.clone(h),h.type="colorAlpha",o.__hidden.__alphaForOpacity=new X(h))}})}),t;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function Fa(i,r,e){var t;s.each(e,function(a){r.hasOwnProperty(a)&&It(r[a])&&(t=!0)}),t&&s.each(e,function(a){r.hasOwnProperty(a)&&It(r[a])?i[a]=s.clone(r[a]):delete i[a]})}function Ba(i,r,e,t){var a={};return s.each(i,function(n){var o=X.prepareVisualTypes(r[n]);a[n]=o}),{progress:function(o,l){var u;t!=null&&(u=l.getDimensionIndex(t));function h(D){return s.getItemVisualFromData(l,v,D)}function c(D,_){s.setItemVisualFromData(l,v,D,_)}for(var v,g=l.getStore();(v=o.next())!=null;){var p=l.getRawDataItem(v);if(!(p&&p.visualMap===!1))for(var f=t!=null?g.get(u,v):v,d=e(f),S=r[d],m=a[d],y=0,b=m.length;y<b;y++){var I=m[y];S[I]&&S[I].applyVisual(f,h,c)}}}}}var sr={get:function(i,r,e){var t=s.clone((Wa[i]||{})[r]);return e&&s.isArray(t)?t[t.length-1]:t}},Wa={color:{active:["#006edd","#e0ffff"],inactive:[s.tokens.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]}},Ct=X.mapVisual,Ua=X.eachVisual,$a=s.isArray,Pt=s.each,Xa=s.asc,Za=s.linearMap,Ee=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.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 r.prototype.init=function(e,t,a){this.mergeDefaultAndTheme(e,a)},r.prototype.optionUpdated=function(e,t){var a=this.option;!t&&Fa(a,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},r.prototype.resetVisual=function(e){var t=this.stateList;e=s.bind(e,this),this.controllerVisuals=Lt(this.option.controller,t,e),this.targetVisuals=Lt(this.option.target,t,e)},r.prototype.getItemSymbol=function(){return null},r.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,t=this.option.seriesIndex;t==null&&e==null&&(t="all");var a=s.queryReferringComponents(this.ecModel,"series",{index:t,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return s.map(a,function(n){return n.componentIndex})},r.prototype.eachTargetSeries=function(e,t){s.each(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&e.call(t,n)},this)},r.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(a){a===e&&(t=!0)}),t},r.prototype.formatValueText=function(e,t,a){var n=this.option,o=n.precision,l=this.dataBound,u=n.formatter,h;a=a||["<",">"],s.isArray(e)&&(e=e.slice(),h=!0);var c=t?e:h?[v(e[0]),v(e[1])]:v(e);if(s.isString(u))return u.replace("{value}",h?c[0]:c).replace("{value2}",h?c[1]:c);if(s.isFunction(u))return h?u(e[0],e[1]):u(e);if(h)return e[0]===l[0]?a[0]+" "+c[1]:e[1]===l[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function v(g){return g===l[0]?"min":g===l[1]?"max":(+g).toFixed(Math.min(o,20))}},r.prototype.resetExtent=function(){var e=this.option,t=Xa([e.min,e.max]);this._dataExtent=t},r.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(t!=null)return e.getDimensionIndex(t);for(var a=e.dimensions,n=a.length-1;n>=0;n--){var o=a[n],l=e.getDimensionInfo(o);if(!l.isCalculationCoord)return l.storeDimIndex}},r.prototype.getExtent=function(){return this._dataExtent.slice()},r.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,a={inRange:t.inRange,outOfRange:t.outOfRange},n=t.target||(t.target={}),o=t.controller||(t.controller={});s.merge(n,a),s.merge(o,a);var l=this.isCategory();u.call(this,n),u.call(this,o),h.call(this,n,"inRange","outOfRange"),c.call(this,o);function u(v){$a(t.color)&&!v.inRange&&(v.inRange={color:t.color.slice().reverse()}),v.inRange=v.inRange||{color:e.get("gradientColor")}}function h(v,g,p){var f=v[g],d=v[p];f&&!d&&(d=v[p]={},Pt(f,function(S,m){if(X.isValidType(m)){var y=sr.get(m,"inactive",l);y!=null&&(d[m]=y,m==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(v){var g=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,p=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,f=this.get("inactiveColor"),d=this.getItemSymbol(),S=d||"roundRect";Pt(this.stateList,function(m){var y=this.itemSize,b=v[m];b||(b=v[m]={color:l?f:[f]}),b.symbol==null&&(b.symbol=g&&s.clone(g)||(l?S:[S])),b.symbolSize==null&&(b.symbolSize=p&&s.clone(p)||(l?y[0]:[y[0],y[0]])),b.symbol=Ct(b.symbol,function(_){return _==="none"?S:_});var I=b.symbolSize;if(I!=null){var D=-1/0;Ua(I,function(_){_>D&&(D=_)}),b.symbolSize=Ct(I,function(_){return Za(_,[0,D],[0,y[0]],!0)})}},this)}},r.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},r.prototype.isCategory=function(){return!!this.option.categories},r.prototype.setSelected=function(e){},r.prototype.getSelected=function(){return null},r.prototype.getValueState=function(e){return null},r.prototype.getVisualMeta=function(e){return null},r.type="visualMap",r.dependencies=["series"],r.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:s.tokens.color.transparent,borderColor:s.tokens.color.borderTint,contentColor:s.tokens.color.theme[0],inactiveColor:s.tokens.color.disabled,borderWidth:0,padding:s.tokens.size.m,textGap:10,precision:0,textStyle:{color:s.tokens.color.secondary}},r})(s.ComponentModel),Tt=[20,140],Ya=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},r.prototype.resetItemSize=function(){i.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Tt[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Tt[1])},r.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):s.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},r.prototype.completeVisualOption=function(){i.prototype.completeVisualOption.apply(this,arguments),s.each(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},r.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},r.prototype.getSelected=function(){var e=this.getExtent(),t=s.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},r.prototype.getValueState=function(e){var t=this.option.range,a=this.getExtent(),n=s.retrieve2(this.option.unboundedRange,!0);return(n&&t[0]<=a[0]||t[0]<=e)&&(n&&t[1]>=a[1]||e<=t[1])?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,u){e[0]<=l&&l<=e[1]&&n.push(u)},this),t.push({seriesId:a.id,dataIndex:n})},this),t},r.prototype.getVisualMeta=function(e){var t=Vt(this,"outOfRange",this.getExtent()),a=Vt(this,"inRange",this.option.range.slice()),n=[];function o(p,f){n.push({value:p,color:e(p,f)})}for(var l=0,u=0,h=a.length,c=t.length;u<c&&(!a.length||t[u]<=a[0]);u++)t[u]<a[l]&&o(t[u],"outOfRange");for(var v=1;l<h;l++,v=0)v&&n.length&&o(a[l],"outOfRange"),o(a[l],"inRange");for(var v=1;u<c;u++)(!a.length||a[a.length-1]<t[u])&&(v&&(n.length&&o(n[n.length-1].value,"outOfRange"),v=0),o(t[u],"outOfRange"));var g=n.length;return{stops:n,outerColors:[g?n[0].color:"transparent",g?n[g-1].color:"transparent"]}},r.type="visualMap.continuous",r.defaultOption=s.inheritDefaultOption(Ee.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:s.tokens.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:s.tokens.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:s.tokens.color.shadow}}),r})(Ee);function Vt(i,r,e){if(e[0]===e[1])return e.slice();for(var t=200,a=(e[1]-e[0])/t,n=e[0],o=[],l=0;l<=t&&n<e[1];l++)o.push(n),n+=a;return o.push(e[1]),o}var lr=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return r.prototype.init=function(e,t){this.ecModel=e,this.api=t},r.prototype.render=function(e,t,a,n){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,t,a,n)},r.prototype.renderBackground=function(e){var t=this.visualMapModel,a=s.normalizeCssArray(t.get("padding")||0),n=e.getBoundingRect();e.add(new s.Rect({z2:-1,silent:!0,shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[3]+a[1],height:n.height+a[0]+a[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},r.prototype.getControllerVisual=function(e,t,a){a=a||{};var n=a.forceState,o=this.visualMapModel,l={};if(t==="color"){var u=o.get("contentColor");l.color=u}function h(p){return l[p]}function c(p,f){l[p]=f}var v=o.controllerVisuals[n||o.getValueState(e)],g=X.prepareVisualTypes(v);return s.each(g,function(p){var f=v[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",f=v.__alphaForOpacity),X.dependsOn(p,t)&&f&&f.applyVisual(e,h,c)}),l[t]},r.prototype.positionGroup=function(e){var t=this.visualMapModel,a=this.api,n=s.createBoxLayoutReference(t,a).refContainer;s.positionElement(e,t.getBoxLayoutParams(),n)},r.prototype.doRender=function(e,t,a,n){},r.type="visualMap",r})(s.ComponentView),kt=[["left","right","width"],["top","bottom","height"]];function ur(i,r,e){var t=i.option,a=t.align;if(a!=null&&a!=="auto")return a;for(var n={width:r.getWidth(),height:r.getHeight()},o=t.orient==="horizontal"?1:0,l=kt[o],u=[0,null,10],h={},c=0;c<3;c++)h[kt[1-o][c]]=u[c],h[l[c]]=c===2?e[0]:t[l[c]];var v=[["x","width",3],["y","height",0]][o],g=s.getLayoutRect(h,n,t.padding);return l[(g.margin[v[2]]||0)+g[v[0]]+g[v[1]]*.5<n[v[1]]*.5?0:1]}function Pe(i,r){return s.each(i||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(r?r.componentIndex:"")}),i}var Y=s.linearMap,qa=s.each,Et=Math.min,Xe=Math.max,ja=12,Ka=6,Ja=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return r.prototype.init=function(e,t){i.prototype.init.call(this,e,t),this._hoverLinkFromSeriesMouseOver=s.bind(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=s.bind(this._hideIndicator,this)},r.prototype.doRender=function(e,t,a,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},r.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var a=e.get("text");this._renderEndsText(t,a,0),this._renderEndsText(t,a,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},r.prototype._renderEndsText=function(e,t,a){if(t){var n=t[1-a];n=n!=null?n+"":"";var o=this.visualMapModel,l=o.get("textGap"),u=o.itemSize,h=this._shapes.mainGroup,c=this._applyTransform([u[0]/2,a===0?-l:u[1]+l],h),v=this._applyTransform(a===0?"bottom":"top",h),g=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new s.ZRText({style:s.createTextStyle(p,{x:c[0],y:c[1],verticalAlign:p.get("verticalAlign")||(g==="horizontal"?"middle":v),align:p.get("align")||(g==="horizontal"?v:"center"),text:n})}))}},r.prototype._renderBar=function(e){var t=this.visualMapModel,a=this._shapes,n=t.itemSize,o=this._orient,l=this._useHandle,u=ur(t,this.api,n),h=a.mainGroup=this._createBarGroup(u),c=new s.Group;h.add(c),c.add(a.outOfRange=Nt()),c.add(a.inRange=Nt(null,l?Rt(this._orient):null,s.bind(this._dragHandle,this,"all",!1),s.bind(this._dragHandle,this,"all",!0))),c.setClipPath(new s.Rect({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var v=t.textStyleModel.getTextRect("国"),g=Xe(v.width,v.height);l&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(t,h,0,n,g,o),this._createHandle(t,h,1,n,g,o)),this._createIndicator(t,h,n,g,o),e.add(h)},r.prototype._createHandle=function(e,t,a,n,o,l){var u=s.bind(this._dragHandle,this,a,!1),h=s.bind(this._dragHandle,this,a,!0),c=s.parsePercent$1(e.get("handleSize"),n[0]),v=s.createSymbol(e.get("handleIcon"),-c/2,-c/2,c,c,null,!0),g=Rt(this._orient);v.attr({cursor:g,draggable:!0,drift:u,ondragend:h,onmousemove:function(m){s.stop(m.event)}}),v.x=n[0]/2,v.useStyle(e.getModel("handleStyle").getItemStyle()),v.setStyle({strokeNoScale:!0,strokeFirst:!0}),v.style.lineWidth*=2,v.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),s.setAsHighDownDispatcher(v,!0),t.add(v);var p=this.visualMapModel.textStyleModel,f=new s.ZRText({cursor:g,draggable:!0,drift:u,onmousemove:function(m){s.stop(m.event)},ondragend:h,style:s.createTextStyle(p,{x:0,y:0,text:""})});f.ensureState("blur").style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var d=[c,0],S=this._shapes;S.handleThumbs[a]=v,S.handleLabelPoints[a]=d,S.handleLabels[a]=f},r.prototype._createIndicator=function(e,t,a,n,o){var l=s.parsePercent$1(e.get("indicatorSize"),a[0]),u=s.createSymbol(e.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);u.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var h=e.getModel("indicatorStyle").getItemStyle();if(u instanceof s.ZRImage){var c=u.style;u.useStyle(s.extend({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},h))}else u.useStyle(h);t.add(u);var v=this.visualMapModel.textStyleModel,g=new s.ZRText({silent:!0,invisible:!0,style:s.createTextStyle(v,{x:0,y:0,text:""})});this.group.add(g);var p=[(o==="horizontal"?n/2:Ka)+a[0]/2,0],f=this._shapes;f.indicator=u,f.indicatorLabel=g,f.indicatorLabelPoint=p,this._firstShowIndicator=!0},r.prototype._dragHandle=function(e,t,a,n){if(this._useHandle){if(this._dragging=!t,!t){var o=this._applyTransform([a,n],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():Ot(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},r.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),a=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[Y(t[0],a,n,!0),Y(t[1],a,n,!0)]},r.prototype._updateInterval=function(e,t){t=t||0;var a=this.visualMapModel,n=this._handleEnds,o=[0,a.itemSize[1]];s.sliderMove(t,n,o,e,0);var l=a.getExtent();this._dataInterval=[Y(n[0],o,l,!0),Y(n[1],o,l,!0)]},r.prototype._updateView=function(e){var t=this.visualMapModel,a=t.getExtent(),n=this._shapes,o=[0,t.itemSize[1]],l=e?o:this._handleEnds,u=this._createBarVisual(this._dataInterval,a,l,"inRange"),h=this._createBarVisual(a,a,o,"outOfRange");n.inRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),n.outOfRange.setStyle({fill:h.barColor}).setShape("points",h.barPoints),this._updateHandle(l,u)},r.prototype._createBarVisual=function(e,t,a,n){var o={forceState:n,convertOpacityToAlpha:!0},l=this._makeColorGradient(e,o),u=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],h=this._createBarPoints(a,u);return{barColor:new s.LinearGradient(0,0,0,1,l),barPoints:h,handlesColor:[l[0].color,l[l.length-1].color]}},r.prototype._makeColorGradient=function(e,t){var a=100,n=[],o=(e[1]-e[0])/a;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var l=1;l<a;l++){var u=e[0]+o*l;if(u>e[1])break;n.push({color:this.getControllerVisual(u,"color",t),offset:l/a})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},r.prototype._createBarPoints=function(e,t){var a=this.visualMapModel.itemSize;return[[a[0]-t[0],e[0]],[a[0],e[0]],[a[0],e[1]],[a[0]-t[1],e[1]]]},r.prototype._createBarGroup=function(e){var t=this._orient,a=this.visualMapModel.get("inverse");return new s.Group(t==="horizontal"&&!a?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:t==="horizontal"&&a?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:t==="vertical"&&!a?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},r.prototype._updateHandle=function(e,t){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,l=a.handleLabels,u=n.itemSize,h=n.getExtent(),c=this._applyTransform("left",a.mainGroup);qa([0,1],function(v){var g=o[v];g.setStyle("fill",t.handlesColor[v]),g.y=e[v];var p=Y(e[v],[0,u[1]],h,!0),f=this.getControllerVisual(p,"symbolSize");g.scaleX=g.scaleY=f/u[0],g.x=u[0]-f/2;var d=s.applyTransform(a.handleLabelPoints[v],s.getTransform(g,this.group));if(this._orient==="horizontal"){var S=c==="left"||c==="top"?(u[0]-f)/2:(u[0]-f)/-2;d[1]+=S}l[v].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},r.prototype._showIndicator=function(e,t,a,n){var o=this.visualMapModel,l=o.getExtent(),u=o.itemSize,h=[0,u[1]],c=this._shapes,v=c.indicator;if(v){v.attr("invisible",!1);var g={convertOpacityToAlpha:!0},p=this.getControllerVisual(e,"color",g),f=this.getControllerVisual(e,"symbolSize"),d=Y(e,l,h,!0),S=u[0]-f/2,m={x:v.x,y:v.y};v.y=d,v.x=S;var y=s.applyTransform(c.indicatorLabelPoint,s.getTransform(v,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var I=this._applyTransform("left",c.mainGroup),D=this._orient,_=D==="horizontal";b.setStyle({text:(a||"")+o.formatValueText(t),verticalAlign:_?I:"middle",align:_?"center":I});var x={x:S,y:d,style:{fill:p}},A={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};v.x=m.x,v.y=m.y,v.animateTo(x,C),b.animateTo(A,C)}else v.attr(x),b.attr(A);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var M=0;M<w.length;M++)this.api.enterBlur(w[M])}},r.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var a=e.visualMapModel.itemSize,n=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);n[1]=Et(Xe(0,n[1]),a[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=a[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},r.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},r.prototype._doHoverLinkToSeries=function(e,t){var a=this.visualMapModel,n=a.itemSize;if(a.option.hoverLink){var o=[0,n[1]],l=a.getExtent();e=Et(Xe(o[0],e),o[1]);var u=Qa(a,l,o),h=[e-u,e+u],c=Y(e,o,l,!0),v=[Y(h[0],o,l,!0),Y(h[1],o,l,!0)];h[0]<o[0]&&(v[0]=-1/0),h[1]>o[1]&&(v[1]=1/0),t&&(v[0]===-1/0?this._showIndicator(c,v[1],"< ",u):v[1]===1/0?this._showIndicator(c,v[0],"> ",u):this._showIndicator(c,c,"≈ ",u));var g=this._hoverLinkDataIndices,p=[];(t||Ot(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(v));var f=s.compressBatches(g,p);this._dispatchHighDown("downplay",Pe(f[0],a)),this._dispatchHighDown("highlight",Pe(f[1],a))}},r.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(s.findEventDispatcher(e.target,function(u){var h=s.getECData(u);if(h.dataIndex!=null)return t=h,!0},!0),!!t){var a=this.ecModel.getSeriesByIndex(t.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var o=a.getData(t.dataType),l=o.getStore().get(n.getDataDimensionIndex(o),t.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},r.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var a=0;a<t.length;a++)this.api.leaveBlur(t[a])},r.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Pe(e,this.visualMapModel)),e.length=0},r.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},r.prototype._applyTransform=function(e,t,a,n){var o=s.getTransform(t,n?null:this.group);return s.isArray(e)?s.applyTransform(e,o,a):s.transformDirection(e,o,a)},r.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},r.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},r.type="visualMap.continuous",r})(lr);function Nt(i,r,e,t){return new s.Polygon({shape:{points:i},draggable:!!e,cursor:r,drift:e,onmousemove:function(a){s.stop(a.event)},ondragend:t})}function Qa(i,r,e){var t=ja/2,a=i.get("hoverLinkDataSize");return a&&(t=Y(a,r,e,!0)/2),t}function Ot(i){var r=i.get("hoverLinkOnHandle");return!!(r??i.get("realtime"))}function Rt(i){return i==="vertical"?"ns-resize":"ew-resize"}var ei={type:"selectDataRange",event:"dataRangeSelected",update:"update"},ti=function(i,r){r.eachComponent({mainType:"visualMap",query:i},function(e){e.setSelected(i.selected)})},ri=[{createOnAllSeries:!0,reset:function(i,r){var e=[];return r.eachComponent("visualMap",function(t){var a=i.pipelineContext;!t.isTargetSeries(i)||a&&a.large||e.push(Ba(t.stateList,t.targetVisuals,s.bind(t.getValueState,t),t.getDataDimensionIndex(i.getData())))}),e}},{createOnAllSeries:!0,reset:function(i,r){var e=i.getData(),t=[];r.eachComponent("visualMap",function(a){if(a.isTargetSeries(i)){var n=a.getVisualMeta(s.bind(ai,null,i,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(e);o>=0&&(n.dimension=o,t.push(n))}}),i.getData().setVisual("visualMeta",t)}}];function ai(i,r,e,t){for(var a=r.targetVisuals[t],n=X.prepareVisualTypes(a),o={color:s.getVisualFromData(i.getData(),"color")},l=0,u=n.length;l<u;l++){var h=n[l],c=a[h==="opacity"?"__alphaForOpacity":h];c&&c.applyVisual(e,v,g)}return o.color;function v(p){return o[p]}function g(p,f){o[p]=f}}var zt=s.each;function ii(i){var r=i&&i.visualMap;s.isArray(r)||(r=r?[r]:[]),zt(r,function(e){if(e){ce(e,"splitList")&&!ce(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&s.isArray(t)&&zt(t,function(a){s.isObject(a)&&(ce(a,"start")&&!ce(a,"min")&&(a.min=a.start),ce(a,"end")&&!ce(a,"max")&&(a.max=a.end))})}})}function ce(i,r){return i&&i.hasOwnProperty&&i.hasOwnProperty(r)}var Gt=!1;function cr(i){Gt||(Gt=!0,i.registerSubTypeDefaulter("visualMap",function(r){return!r.categories&&(!(r.pieces?r.pieces.length>0:r.splitNumber>0)||r.calculable)?"continuous":"piecewise"}),i.registerAction(ei,ti),s.each(ri,function(r){i.registerVisual(i.PRIORITY.VISUAL.COMPONENT,r)}),i.registerPreprocessor(ii))}function ni(i){i.registerComponentModel(Ya),i.registerComponentView(Ja),cr(i)}var oi=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e._pieceList=[],e}return r.prototype.optionUpdated=function(e,t){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],si[this._mode].call(this,this._pieceList),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual(function(o,l){a==="categories"?(o.mappingMethod="category",o.categories=s.clone(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=s.map(this._pieceList,function(u){return u=s.clone(u),l!=="inRange"&&(u.visual=null),u}))})},r.prototype.completeVisualOption=function(){var e=this.option,t={},a=X.listVisualTypes(),n=this.isCategory();s.each(e.pieces,function(l){s.each(a,function(u){l.hasOwnProperty(u)&&(t[u]=1)})}),s.each(t,function(l,u){var h=!1;s.each(this.stateList,function(c){h=h||o(e,c,u)||o(e.target,c,u)},this),!h&&s.each(this.stateList,function(c){(e[c]||(e[c]={}))[u]=sr.get(u,c==="inRange"?"active":"inactive",n)})},this);function o(l,u,h){return l&&l[u]&&l[u].hasOwnProperty(h)}i.prototype.completeVisualOption.apply(this,arguments)},r.prototype._resetSelected=function(e,t){var a=this.option,n=this._pieceList,o=(t?a:e).selected||{};if(a.selected=o,s.each(n,function(u,h){var c=this.getSelectedMapKey(u);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var l=!1;s.each(n,function(u,h){var c=this.getSelectedMapKey(u);o[c]&&(l?o[c]=!1:l=!0)},this)}},r.prototype.getItemSymbol=function(){return this.get("itemSymbol")},r.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},r.prototype.getPieceList=function(){return this._pieceList},r.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},r.prototype.setSelected=function(e){this.option.selected=s.clone(e)},r.prototype.getValueState=function(e){var t=X.findPieceIndex(e,this._pieceList);return t!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(e){var t=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],l=n.getData();l.each(this.getDataDimensionIndex(l),function(u,h){var c=X.findPieceIndex(u,a);c===e&&o.push(h)},this),t.push({seriesId:n.id,dataIndex:o})},this),t},r.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var a=e.interval||[];t=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return t},r.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],a=["",""],n=this;function o(c,v){var g=n.getRepresentValue({interval:c});v||(v=n.getValueState(g));var p=e(g,v);c[0]===-1/0?a[0]=p:c[1]===1/0?a[1]=p:t.push({value:c[0],color:p},{value:c[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var u=l[0].interval[0];u!==-1/0&&l.unshift({interval:[-1/0,u]}),u=l[l.length-1].interval[1],u!==1/0&&l.push({interval:[u,1/0]})}var h=-1/0;return s.each(l,function(c){var v=c.interval;v&&(v[0]>h&&o([h,v[0]],"outOfRange"),o(v.slice()),h=v[1])},this),{stops:t,outerColors:a}},r.type="visualMap.piecewise",r.defaultOption=s.inheritDefaultOption(Ee.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}),r})(Ee),si={splitNumber:function(i){var r=this.option,e=Math.min(r.precision,20),t=this.getExtent(),a=r.splitNumber;a=Math.max(parseInt(a,10),1),r.splitNumber=a;for(var n=(t[1]-t[0])/a;+n.toFixed(e)!==n&&e<5;)e++;r.precision=e,n=+n.toFixed(e),r.minOpen&&i.push({interval:[-1/0,t[0]],close:[0,0]});for(var o=0,l=t[0];o<a;l+=n,o++){var u=o===a-1?t[1]:l+n;i.push({interval:[l,u],close:[1,1]})}r.maxOpen&&i.push({interval:[t[1],1/0],close:[0,0]}),s.reformIntervals(i),s.each(i,function(h,c){h.index=c,h.text=this.formatValueText(h.interval)},this)},categories:function(i){var r=this.option;s.each(r.categories,function(e){i.push({text:this.formatValueText(e,!0),value:e})},this),Ht(r,i)},pieces:function(i){var r=this.option;s.each(r.pieces,function(e,t){s.isObject(e)||(e={value:e});var a={text:"",index:t};if(e.label!=null&&(a.text=e.label),e.hasOwnProperty("value")){var n=a.value=e.value;a.interval=[n,n],a.close=[1,1]}else{for(var o=a.interval=[],l=a.close=[0,0],u=[1,0,1],h=[-1/0,1/0],c=[],v=0;v<2;v++){for(var g=[["gte","gt","min"],["lte","lt","max"]][v],p=0;p<3&&o[v]==null;p++)o[v]=e[g[p]],l[v]=u[p],c[v]=p===2;o[v]==null&&(o[v]=h[v])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-1/0&&(l[1]=0),process.env.NODE_ENV!=="production"&&o[0]>o[1]&&console.warn("Piece "+t+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&l[0]&&l[1]&&(a.value=o[0])}a.visual=X.retrieveVisuals(e),i.push(a)},this),Ht(r,i),s.reformIntervals(i),s.each(i,function(e){var t=e.close,a=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,a)},this)}};function Ht(i,r){var e=i.inverse;(i.orient==="vertical"?!e:e)&&r.reverse()}var li=(function(i){s.__extends(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return e.type=r.type,e}return r.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,a=t.get("textGap"),n=t.textStyleModel,o=this._getItemAlign(),l=t.itemSize,u=this._getViewData(),h=u.endsText,c=s.retrieve(t.get("showLabel",!0),!h),v=!t.get("selectedMode");h&&this._renderEndsText(e,h[0],l,c,o),s.each(u.viewPieceList,function(g){var p=g.piece,f=new s.Group;f.onclick=s.bind(this._onItemClick,this,p),this._enableHoverLink(f,g.indexInModelPieceList);var d=t.getRepresentValue(p);if(this._createItemSymbol(f,d,[0,0,l[0],l[1]],v),c){var S=this.visualMapModel.getValueState(d),m=n.get("align")||o;f.add(new s.ZRText({style:s.createTextStyle(n,{x:m==="right"?-a:l[0]+a,y:l[1]/2,text:p.text,verticalAlign:n.get("verticalAlign")||"middle",align:m,opacity:s.retrieve2(n.get("opacity"),S==="outOfRange"?.5:1)}),silent:v}))}e.add(f)},this),h&&this._renderEndsText(e,h[1],l,c,o),s.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},r.prototype._enableHoverLink=function(e,t){var a=this;e.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var l=a.visualMapModel;l.option.hoverLink&&a.api.dispatchAction({type:o,batch:Pe(l.findTargetDataIndices(t),l)})}},r.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient==="vertical")return ur(e,this.api,e.itemSize);var a=t.align;return(!a||a==="auto")&&(a="left"),a},r.prototype._renderEndsText=function(e,t,a,n,o){if(t){var l=new s.Group,u=this.visualMapModel.textStyleModel;l.add(new s.ZRText({style:s.createTextStyle(u,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:t})})),e.add(l)}},r.prototype._getViewData=function(){var e=this.visualMapModel,t=s.map(e.getPieceList(),function(l,u){return{piece:l,indexInModelPieceList:u}}),a=e.get("text"),n=e.get("orient"),o=e.get("inverse");return(n==="horizontal"?o:!o)?t.reverse():a&&(a=a.slice().reverse()),{viewPieceList:t,endsText:a}},r.prototype._createItemSymbol=function(e,t,a,n){var o=s.createSymbol(this.getControllerVisual(t,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(t,"color"));o.silent=n,e.add(o)},r.prototype._onItemClick=function(e){var t=this.visualMapModel,a=t.option,n=a.selectedMode;if(n){var o=s.clone(a.selected),l=t.getSelectedMapKey(e);n==="single"||n===!0?(o[l]=!0,s.each(o,function(u,h){o[h]=h===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},r.type="visualMap.piecewise",r})(lr);function ui(i){i.registerComponentModel(oi),i.registerComponentView(li),cr(i)}function ci(i){s.use(ni),s.use(ui)}function Se(i,r,e){const t=i==null?void 0:i[r];return typeof t=="string"?t:e}function j(){return{animationDurationUpdate:0,backgroundColor:"transparent"}}function K(i,r,e={}){return{text:Se(i,"title",r),left:"center",top:4,...e,textStyle:{...e.textStyle??{},fontSize:14}}}function be(i="15%"){return{left:"3%",right:"4%",bottom:i,containLabel:!0}}function Q(i={}){return{...i,textStyle:{fontSize:12,...i.textStyle??{}}}}function hr(i){const r=typeof i=="object"&&i!==null&&"value"in i?i.value:i;if(!Array.isArray(r)||r.length<3)return null;const e=r.slice(0,3).map(Number);return e.every(Number.isFinite)?e:null}function hi(i){if(!i.length)return{min:0,max:0};const r=i.map(e=>{var t;return(t=hr(e))==null?void 0:t[2]}).filter(e=>typeof e=="number");return r.length?{min:Math.min(...r),max:Math.max(...r)}:{min:0,max:0}}function Ft(i,r,e){const[t,a]=e?[1,0]:[0,1];return new s.LinearGradient(0,0,t,a,[{offset:0,color:i},{offset:1,color:r}])}const vi=(i,r)=>{const e=(r==null?void 0:r.horizontal)===!0||(r==null?void 0:r.horizontal)==="true",t={type:"category",data:i.xAxis,axisLabel:{rotate:e?0:90}},a={type:"value"};return{...j(),title:K(r,"Gradient Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),grid:be(),xAxis:e?a:t,yAxis:e?{...t,inverse:!0}:a,series:[{type:"bar",barMaxWidth:32,data:i.data,itemStyle:{color:Ft("#83bff6","#188df0",e)},emphasis:{itemStyle:{color:Ft("#2378f7","#83bff6",e)}}}]}},pi=(i,r)=>({...j(),title:K(r,"Grouped Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",emphasis:{focus:"series"},data:e.data}))});function Bt(i){if(typeof i=="number")return i;if(typeof i=="object"&&i!==null&&"value"in i){const r=Number(i.value);return Number.isFinite(r)?r:0}return 0}function fi(i){if(typeof i=="object"&&i!==null&&"clickId"in i){const r=i.clickId;return typeof r=="string"?r:void 0}}function gi(i,r){return r.map((e,t)=>{const a=Bt(e),n=i.reduce((u,h)=>u+Bt(h.data[t]),0),o=n?a/n:0,l=fi(e);return l?{value:o,clickId:l}:o})}const di=(i,r)=>({...j(),title:K(r,"Normalized Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=e.reduce((a,n)=>a+n.value,0);return e.map(a=>{const n=t?(a.value/t*100).toFixed(1):0;return`${a.seriesName}: ${a.value} (${n}%)`}).join("<br/>")}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis},yAxis:{type:"value",max:1,axisLabel:{formatter:e=>`${e*100}%`}},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},data:gi(i.series,e.data)}))}),mi=(i,r)=>({...j(),title:K(r,"Stacked Bar Chart"),tooltip:Q({trigger:"axis",axisPointer:{type:"shadow"}}),legend:{data:i.legend,bottom:0},grid:be(),xAxis:{type:"category",data:i.xAxis,axisLabel:{rotate:i.xAxis.length>8?30:0}},yAxis:{type:"value"},series:i.series.map(e=>({name:e.name,type:"bar",stack:"total",emphasis:{focus:"series"},...e.color?{itemStyle:{color:e.color}}:{},data:e.data}))});function Wt(i,r){return`${Number.isInteger(i)?String(i):i.toFixed(2).replace(/\.?0+$/,"")}${r}`}const yi=(i,r)=>{const e=i.unit??Se(r,"unit","%"),t=i.name??Se(r,"seriesName",""),a=Number(i.value)||0,n=Wt(a,e);return{...j(),title:K(r,t||"Gauge",{top:8}),tooltip:Q({formatter:`{b}: {c}${e}`}),series:[{type:"gauge",startAngle:200,endAngle:-20,min:0,max:100,splitNumber:10,center:["50%","55%"],radius:"74%",itemStyle:{color:"#58D9F9",shadowColor:"rgba(0,138,255,0.45)",shadowBlur:7,shadowOffsetX:1,shadowOffsetY:1},progress:{show:!0,roundCap:!0,width:10},pointer:{icon:"path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z",length:"64%",width:12,offsetCenter:[0,"5%"]},axisLine:{roundCap:!0,lineStyle:{width:10}},axisTick:{splitNumber:2,length:7,lineStyle:{width:1.5,color:"#999"}},splitLine:{length:9,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:14,color:"#999",fontSize:9},title:{show:!1},detail:{backgroundColor:"#fff",borderColor:"#999",borderWidth:2,width:Math.max(72,Math.min(104,n.length*11+16)),lineHeight:28,height:28,borderRadius:7,offsetCenter:[0,"42%"],valueAnimation:!0,formatter:o=>Wt(Number(o)||0,e),rich:{},color:"#464646",fontSize:n.length>=7?18:20,fontWeight:"bolder"},data:[{value:a,name:t}]}]}},Si=(i,r)=>{const e=Number(i.value)||0,t=i.grade??bi(e);return{...j(),title:K(r,"Assistance Score",{top:8}),series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","69%"],radius:"78%",min:0,max:1,splitNumber:20,axisLine:{lineStyle:{width:7,color:[[.3,"#FF6E76"],[.6,"#FDDD60"],[.9,"#58D9F9"],[1,"#7CFFB2"]]}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"10%",width:16,offsetCenter:[0,"-55%"],itemStyle:{color:"auto"}},axisTick:{length:7,lineStyle:{color:"auto",width:1}},splitLine:{length:10,lineStyle:{color:"auto",width:2}},axisLabel:{color:"#464646",fontSize:9,distance:-30,rotate:"tangential",formatter(a){return Math.abs(a-.15)<.001?"Minimal":Math.abs(a-.45)<.001?"Partial":Math.abs(a-.75)<.001?"Strong":Math.abs(a-.95)<.001?"Production":""}},title:{offsetCenter:[0,"26%"],fontSize:14},detail:{fontSize:24,offsetCenter:[0,"-20%"],valueAnimation:!0,formatter(a){return a.toFixed(2)},color:"inherit"},data:[{value:e,name:t}]}]}};function bi(i){return i>=.9?"Production-grade":i>=.6?"Strong assist":i>=.3?"Partial assist":"Minimal assist"}const xi=(i,r)=>{const{min:e,max:t}=hi(i.data);return{...j(),title:K(r,"Heatmap"),tooltip:Q({position:"top",formatter:a=>{const[n,o,l]=hr(a.data)??[0,0,0];return`${i.yAxis[o]} / ${i.xAxis[n]}: ${l}`}}),grid:{height:"60%",top:"14%"},xAxis:{type:"category",data:i.xAxis,splitArea:{show:!0}},yAxis:{type:"category",data:i.yAxis,splitArea:{show:!0}},visualMap:{min:e,max:t,calculable:!0,orient:"horizontal",left:"center",bottom:0},series:[{type:"heatmap",data:i.data,label:{show:!0},emphasis:{itemStyle:{shadowBlur:10}}}]}},_i=(i,r)=>({...j(),title:K(r,"Line Chart"),tooltip:Q({trigger:"axis"}),legend:{data:i.legend||[],left:"center",bottom:0},grid:be(),xAxis:{type:"category",boundaryGap:!1,data:i.xAxis||[]},yAxis:{type:"value"},series:(i.series||[]).map(e=>({type:"line",smooth:(r==null?void 0:r.smooth)!==!1,...e}))});function Ai(i){return i.includes(",")?i.split(",").map(r=>r.trim()):i}const wi=(i,r)=>({...j(),title:K(r,"Pie Chart"),tooltip:Q({trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"}),legend:{orient:"vertical",left:"left"},series:[{name:Se(r,"seriesName","Data"),type:"pie",radius:Ai(Se(r,"radius","50%")),data:Array.isArray(i)?i:i.data,label:{textBorderWidth:0},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),Mi=(i,r)=>{const e=i.series.length>1;return{...j(),title:K(r,"Radar Chart"),tooltip:Q(),legend:e?{data:i.legend||i.series.map(t=>t.name),bottom:0}:void 0,radar:{indicator:i.indicator},series:[{type:"radar",data:i.series.map(t=>({name:t.name,value:t.value}))}]}},Di={pie:wi,line:_i,radar:Mi,"bar-normalized":di,heatmap:xi,"bar-gradient":vi,"bar-grouped":pi,"bar-stacked":mi,"custom-gauge":yi,"gauge-grade":Si};function Ii(i,r,e){const t=Di[i];return t(r,e)}const Li="400px";function vr(i,r=Li){const e=i==null?void 0:i.height;return typeof e=="number"&&Number.isFinite(e)&&e>0?`${e}px`:typeof e=="string"&&e.trim()?e:r}const Ci=W.defineComponent({__name:"Chart",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},type:{},options:{default:void 0}},emits:["row-click"],setup(i,{expose:r,emit:e}){s.use([s.install,fa,jt,Aa,ia,Ha,ka,s.install$1,s.install$2,s.install$3,s.install$4,nr,ci]);const t=W.ref(!1);let a=null;W.onMounted(()=>{t.value=document.documentElement.classList.contains("dark"),a=new MutationObserver(()=>{t.value=document.documentElement.classList.contains("dark")}),a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),W.onUnmounted(()=>{a==null||a.disconnect()});const n=i,o=e,l=W.ref(null),u=W.ref(null),h=W.computed(()=>n.data===void 0?n.src??n.url??"":""),c=W.computed(()=>vr(n.options));function v(x){const A=m(x)?x:null;u.value=(A==null?void 0:A.click)??null,l.value=I(Ii(n.type,x,n.options),u.value)}const{loading:g,error:p,fetchData:f}=gr.useFetch(h,{async onSuccess(x){v(await x.json())}}),d=W.computed(()=>n.data===void 0&&g.value),S=W.computed(()=>n.data!==void 0?null:n.src||n.url?p.value:"Resource not found in asset");W.watch(()=>n.data,x=>{x!==void 0&&v(x)},{immediate:!0,deep:!0});function m(x){return typeof x=="object"&&x!==null}function y(x){const A=b(x);A&&o("row-click",A)}function b(x){var w,M;if(!m(x)||!m(x.data))return null;const A=x.data.clickId;if(typeof A!="string")return null;const C=(M=(w=u.value)==null?void 0:w.payloads)==null?void 0:M[A];return C===void 0?null:m(C)?"payload"in C?C.payload:typeof C.src=="string"?{action:"load-report-payload",src:C.src}:null:C}function I(x,A){const C=(A==null?void 0:A.payloads)??{},w=x.series,M=Array.isArray(w)?w.map(L=>D(L,C)):D(w,C);return{...x,series:M}}function D(x,A){if(!m(x))return x;const C=Array.isArray(x.data)?x.data.map(w=>!m(w)||typeof w.clickId!="string"?w:w.clickId in A?{...w,cursor:"pointer"}:w):x.data;return{...x,cursor:"default",data:C}}function _(){n.data!==void 0?v(n.data):f()}return r({refresh:_}),(x,A)=>(W.openBlock(),W.createBlock(dr._sfc_main,{loading:!l.value&&d.value,error:S.value},{skeleton:W.withCtx(()=>[W.createElementVNode("div",{class:"reportifact-chart-skeleton",style:W.normalizeStyle({"--reportifact-chart-height":c.value})},[...A[0]||(A[0]=[W.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"200px",height:"24px","margin-bottom":"16px"}},null,-1),W.createElementVNode("div",{class:"reportifact-skeleton-line reportifact-chart-skeleton-body"},null,-1)])],4)]),default:W.withCtx(()=>[W.createElementVNode("div",{class:"reportifact-chart-container",style:W.normalizeStyle({"--reportifact-chart-height":c.value})},[l.value?(W.openBlock(),W.createBlock(W.unref(s.src_default),{key:0,option:l.value,theme:t.value?"dark":void 0,autoresize:!0,class:"reportifact-chart",onClick:y},null,8,["option","theme"])):W.createCommentVNode("",!0)],4)]),_:1},8,["loading","error"]))}});exports._sfc_main=Ci;exports.install=jt;exports.resolveChartHeight=vr;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const b=require("vue"),s=require("./index-DmTzvbys.cjs"),yt=require("./useFetch-BfOAq-Kg.cjs"),xt=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs");var _t=s.makeInner();function Ne(r,e){return!!_t(r)[e]}s.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},s.noop);var St={axisPointer:1,tooltip:1,brush:1};function wt(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||St.hasOwnProperty(n.mainType))return!1;var o=n.coordinateSystem;if(!o||o.model===t)return!1;var i=s.retrieveZInfo(n),a=s.retrieveZInfo(t);return!((i.zlevel-a.zlevel||i.z-a.z)<=0)}var Mt=(function(r){s.__extends(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var o=s.bind(n._mousedownHandler,n),i=s.bind(n._mousemoveHandler,n),a=s.bind(n._mouseupHandler,n),l=s.bind(n._mousewheelHandler,n),u=s.bind(n._pinchHandler,n);return n.enable=function(f,c){var d=c.zInfo,h=s.retrieveZInfo(d.component),v=h.z,p=h.zlevel,x={component:d.component,z:v,zlevel:p,z2:s.retrieve2(d.z2,-1/0)},w=s.extend({},c.triggerInfo);this._opt=s.defaults(s.extend({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:x,triggerInfo:w}),f==null&&(f=!0),(!this._enabled||this._controlType!==f)&&(this._enabled=!0,this.disable(),(f===!0||f==="move"||f==="pan")&&(se(t,"mousedown",o,x),se(t,"mousemove",i,x),se(t,"mouseup",a,x)),(f===!0||f==="scale"||f==="zoom")&&(se(t,"mousewheel",l,x),se(t,"pinch",u,x)))},n.disable=function(){this._enabled=!1,le(t,"mousedown",o),le(t,"mousemove",i),le(t,"mouseup",a),le(t,"mousewheel",l),le(t,"pinch",u)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,n,o){var i=this._opt,a=i.zInfoParsed;if(wt(t,i.api,a.component))return!1;var l=i.triggerInfo,u=l.roamTrigger,f=!1;return u==="global"&&(f=!0),f||(f=l.isInSelf(t,n,o)),f&&l.isInClip&&!l.isInClip(t,n,o)&&(f=!1),f},e.prototype._decideCursorStyle=function(t,n,o,i){var a=t.target;if(!a&&this._checkPointer(t,n,o))return"grab";if(i)return a&&a.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(s.isMiddleOrRightButtonOnMouseUpDown(t)||ie(t))){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var o=t.offsetX,i=t.offsetY;this._checkPointer(t,o,i)&&(this._x=o,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var n=this._zr;if(!(t.gestureEvent==="pinch"||Ne(n,"globalPan")||ie(t))){var o=t.offsetX,i=t.offsetY;if(!this._dragging||!de("moveOnMouseMove",t,this._opt)){var a=this._decideCursorStyle(t,o,i,!1);a&&n.setCursorStyle(a);return}n.setCursorStyle("grabbing");var l=this._x,u=this._y,f=o-l,c=i-u;this._x=o,this._y=i,this._opt.preventDefaultMouseMove&&s.stop(t.event),t.__ecRoamConsumed=!0,Be(this,"pan","moveOnMouseMove",t,{dx:f,dy:c,oldX:l,oldY:u,newX:o,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!ie(t)){var n=this._zr;if(!s.isMiddleOrRightButtonOnMouseUpDown(t)){this._dragging=!1;var o=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);o&&n.setCursorStyle(o)}}},e.prototype._mousewheelHandler=function(t){if(!ie(t)){var n=de("zoomOnMouseWheel",t,this._opt),o=de("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,a=Math.abs(i),l=t.offsetX,u=t.offsetY;if(!(i===0||!n&&!o)){if(n){var f=a>3?1.4:a>1?1.2:1.1,c=i>0?f:1/f;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:l,originY:u,isAvailableBehavior:null})}if(o){var d=Math.abs(i),h=(i>0?1:-1)*(d>3?.4:d>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:l,originY:u,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Ne(this._zr,"globalPan")||ie(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,o,i,a){t._checkPointer(i,a.originX,a.originY)&&(s.stop(i.event),i.__ecRoamConsumed=!0,Be(t,n,o,i,a))},e})(s.Eventful);function ie(r){return r.__ecRoamConsumed}var bt=s.makeInner();function ye(r){var e=bt(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function se(r,e,t,n){for(var o=ye(r),i=o.roam,a=i[e]=i[e]||[],l=0;l<a.length;l++){var u=a[l].zInfoParsed;if((u.zlevel-n.zlevel||u.z-n.z||u.z2-n.z2)<=0)break}a.splice(l,0,{listener:t,zInfoParsed:n}),At(r,e)}function le(r,e,t){for(var n=ye(r),o=n.roam[e]||[],i=0;i<o.length;i++)if(o[i].listener===t){o.splice(i,1),o.length||Et(r,e);return}}function At(r,e){var t=ye(r);t.uniform[e]||r.on(e,t.uniform[e]=function(n){var o=t.roam[e];if(o)for(var i=0;i<o.length;i++)o[i].listener(n)})}function Et(r,e){var t=ye(r),n=t.uniform;n[e]&&(r.off(e,n[e]),n[e]=null)}function Be(r,e,t,n,o){o.isAvailableBehavior=s.bind(de,null,t,n),r.trigger(e,o)}function de(r,e,t){var n=t[r];return!r||n&&(!s.isString(n)||e.event[n+"Key"])}var Fe={color:"fill",borderColor:"stroke"},Ct={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$=s.makeInner(),Rt=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return s.createSeriesData(null,this)},e.prototype.getDataParams=function(t,n,o){var i=r.prototype.getDataParams.call(this,t,n);return o&&(i.info=$(o).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(s.SeriesModel);function Dt(r,e){return e=e||[0,0],s.map(["x","y"],function(t,n){var o=this.getAxis(t),i=e[n],a=r[n]/2;return o.type==="category"?o.getBandWidth():Math.abs(o.dataToCoord(i-a)-o.dataToCoord(i+a))},this)}function Ot(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:s.bind(Dt,r)}}}function Tt(r,e){return e=e||[0,0],s.map([0,1],function(t){var n=e[t],o=r[t]/2,i=[],a=[];return i[t]=n-o,a[t]=n+o,i[1-t]=a[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(a)[t])},this)}function Pt(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:s.bind(Tt,r)}}}function Lt(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,o=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-o)-t.dataToCoord(n+o))}function kt(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:s.bind(Lt,r)}}}function zt(r,e){return e=e||[0,0],s.map(["Radius","Angle"],function(t,n){var o="get"+t+"Axis",i=this[o](),a=e[n],l=r[n]/2,u=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-l)-i.dataToCoord(a+l));return t==="Angle"&&(u=u*Math.PI/180),u},this)}function Zt(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.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(o){var i=e.dataToRadius(o[0]),a=t.dataToAngle(o[1]),l=r.coordToPoint([i,a]);return l.push(i,a*Math.PI/180),l},size:s.bind(zt,r)}}}function Vt(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,o){return r.dataToPoint(n,o)},layout:function(n,o){return r.dataToLayout(n,o)}}}}function Nt(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,n){return r.dataToPoint(t,n)},layout:function(t,n){return r.dataToLayout(t,n)}}}}var We={};function Bt(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||s.hasOwn(r,"text")))}function Ft(r,e,t){var n=r,o,i,a;if(e==="text")a=n;else{a={},s.hasOwn(n,"text")&&(a.text=n.text),s.hasOwn(n,"rich")&&(a.rich=n.rich),s.hasOwn(n,"textFill")&&(a.fill=n.textFill),s.hasOwn(n,"textStroke")&&(a.stroke=n.textStroke),s.hasOwn(n,"fontFamily")&&(a.fontFamily=n.fontFamily),s.hasOwn(n,"fontSize")&&(a.fontSize=n.fontSize),s.hasOwn(n,"fontStyle")&&(a.fontStyle=n.fontStyle),s.hasOwn(n,"fontWeight")&&(a.fontWeight=n.fontWeight),i={type:"text",style:a,silent:!0},o={};var l=s.hasOwn(n,"textPosition");t?o.position=l?n.textPosition:"inside":l&&(o.position=n.textPosition),s.hasOwn(n,"textPosition")&&(o.position=n.textPosition),s.hasOwn(n,"textOffset")&&(o.offset=n.textOffset),s.hasOwn(n,"textRotation")&&(o.rotation=n.textRotation),s.hasOwn(n,"textDistance")&&(o.distance=n.textDistance)}return He(a,r),s.each(a.rich,function(u){He(u,u)}),{textConfig:o,textContent:i}}function He(r,e){e&&(e.font=e.textFont||e.font,s.hasOwn(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),s.hasOwn(e,"textAlign")&&(r.align=e.textAlign),s.hasOwn(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),s.hasOwn(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),s.hasOwn(e,"textWidth")&&(r.width=e.textWidth),s.hasOwn(e,"textHeight")&&(r.height=e.textHeight),s.hasOwn(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),s.hasOwn(e,"textPadding")&&(r.padding=e.textPadding),s.hasOwn(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),s.hasOwn(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),s.hasOwn(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),s.hasOwn(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),s.hasOwn(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),s.hasOwn(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),s.hasOwn(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function Ge(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var o=n.textPosition.indexOf("inside")>=0,i=r.fill||s.tokens.color.neutral99;Ie(n,e);var a=n.textFill==null;return o?a&&(n.textFill=t.insideFill||s.tokens.color.neutral00,!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(a&&(n.textFill=r.fill||t.outsideFill||s.tokens.color.neutral00),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,s.each(e.rich,function(l){Ie(l,l)}),n}function Ie(r,e){e&&(s.hasOwn(e,"fill")&&(r.textFill=e.fill),s.hasOwn(e,"stroke")&&(r.textStroke=e.fill),s.hasOwn(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),s.hasOwn(e,"font")&&(r.font=e.font),s.hasOwn(e,"fontStyle")&&(r.fontStyle=e.fontStyle),s.hasOwn(e,"fontWeight")&&(r.fontWeight=e.fontWeight),s.hasOwn(e,"fontSize")&&(r.fontSize=e.fontSize),s.hasOwn(e,"fontFamily")&&(r.fontFamily=e.fontFamily),s.hasOwn(e,"align")&&(r.textAlign=e.align),s.hasOwn(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),s.hasOwn(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),s.hasOwn(e,"width")&&(r.textWidth=e.width),s.hasOwn(e,"height")&&(r.textHeight=e.height),s.hasOwn(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),s.hasOwn(e,"padding")&&(r.textPadding=e.padding),s.hasOwn(e,"borderColor")&&(r.textBorderColor=e.borderColor),s.hasOwn(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),s.hasOwn(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),s.hasOwn(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),s.hasOwn(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),s.hasOwn(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),s.hasOwn(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),s.hasOwn(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),s.hasOwn(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),s.hasOwn(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),s.hasOwn(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}function Ye(r,e){if(process.env.NODE_ENV!=="production"){var t=r+"^_^"+e;We[t]||(console.warn('[ECharts] DEPRECATED: "'+r+'" has been deprecated. '+e),We[t]=!0)}}var st={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Xe=s.keys(st),he=s.reduce(s.TRANSFORMABLE_PROPS,function(r,e){return r[e]=1,r},{}),Ue=s.TRANSFORMABLE_PROPS.join(", "),ve=["","style","shape","extra"],oe=s.makeInner();function De(r,e,t,n,o){var i=r+"Animation",a=s.getAnimationConfig(r,n,o)||{},l=oe(e).userDuring;return a.duration>0&&(a.during=l?s.bind(Ut,{el:e,userDuring:l}):null,a.setToFinal=!0,a.scope=r),s.extend(a,t[i]),a}function Wt(r,e,t,n){n=n||{};var o=n.dataIndex,i=n.isInit,a=n.clearStyle,l=t.isAnimationEnabled(),u=oe(r),f=e.style;u.userDuring=e.during;var c={},d={};if(Kt(r,e,d),r.type==="compound")for(var h=r.shape.paths,v=e.shape.paths,p=0;p<v.length;p++){var x=v[p];xe("shape",x,h[p])}else xe("shape",e,d),xe("extra",e,d);if(!i&&l&&($t(r,e,c),$e("shape",r,e,c),$e("extra",r,e,c),qt(r,e,f,c)),d.style=f,Gt(r,d,a),Yt(r,e),l)if(i){var w={};s.each(ve,function(M){var T=M?e[M]:e;T&&T.enterFrom&&(M&&(w[M]=w[M]||{}),s.extend(M?w[M]:w,T.enterFrom))});var E=De("enter",r,e,t,o);E.duration>0&&r.animateFrom(w,E)}else It(r,e,o||0,t,c);Ht(r,e),f?r.dirty():r.markRedraw()}function Ht(r,e){for(var t=oe(r).leaveToProps,n=0;n<ve.length;n++){var o=ve[n],i=o?e[o]:e;i&&i.leaveTo&&(t||(t=oe(r).leaveToProps={}),o&&(t[o]=t[o]||{}),s.extend(o?t[o]:t,i.leaveTo))}}function Oe(r,e,t,n){if(r){var o=r.parent,i=oe(r).leaveToProps;if(i){var a=De("update",r,e,t,0);a.done=function(){o&&o.remove(r)},r.animateTo(i,a)}else o&&o.remove(r)}}function ae(r){return r==="all"}function Gt(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var o=r.animators,i=0;i<o.length;i++){var a=o[i];a.targetName==="style"&&a.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function It(r,e,t,n,o){if(o){var i=De("update",r,e,n,t);i.duration>0&&r.animateFrom(o,i)}}function Yt(r,e){s.hasOwn(e,"silent")&&(r.silent=e.silent),s.hasOwn(e,"ignore")&&(r.ignore=e.ignore),r instanceof s.Displayable&&s.hasOwn(e,"invisible")&&(r.invisible=e.invisible),r instanceof s.Path&&s.hasOwn(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var X={},Xt={setTransform:function(r,e){return process.env.NODE_ENV!=="production"&&s.assert(s.hasOwn(he,r),"Only "+Ue+" available in `setTransform`."),X.el[r]=e,this},getTransform:function(r){return process.env.NODE_ENV!=="production"&&s.assert(s.hasOwn(he,r),"Only "+Ue+" available in `getTransform`."),X.el[r]},setShape:function(r,e){process.env.NODE_ENV!=="production"&&re(r);var t=X.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){process.env.NODE_ENV!=="production"&&re(r);var e=X.el.shape;if(e)return e[r]},setStyle:function(r,e){process.env.NODE_ENV!=="production"&&re(r);var t=X.el,n=t.style;return n&&(process.env.NODE_ENV!=="production"&&s.eqNaN(e)&&s.warn("style."+r+" must not be assigned with NaN."),n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){process.env.NODE_ENV!=="production"&&re(r);var e=X.el.style;if(e)return e[r]},setExtra:function(r,e){process.env.NODE_ENV!=="production"&&re(r);var t=X.el.extra||(X.el.extra={});return t[r]=e,this},getExtra:function(r){process.env.NODE_ENV!=="production"&&re(r);var e=X.el.extra;if(e)return e[r]}};function re(r){if(process.env.NODE_ENV!=="production"&&(r==="transition"||r==="enterFrom"||r==="leaveTo"))throw new Error('key must not be "'+r+'"')}function Ut(){var r=this,e=r.el;if(e){var t=oe(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}X.el=e,n(Xt)}}function $e(r,e,t,n){var o=t[r];if(o){var i=e[r],a;if(i){var l=t.transition,u=o.transition;if(u)if(!a&&(a=n[r]={}),ae(u))s.extend(a,i);else for(var f=s.normalizeToArray(u),c=0;c<f.length;c++){var d=f[c],h=i[d];a[d]=h}else if(ae(l)||s.indexOf(l,r)>=0){!a&&(a=n[r]={});for(var v=s.keys(i),c=0;c<v.length;c++){var d=v[c],h=i[d];jt(o[d],h)&&(a[d]=h)}}}}}function xe(r,e,t){var n=e[r];if(n)for(var o=t[r]={},i=s.keys(n),a=0;a<i.length;a++){var l=i[a];o[l]=s.cloneValue(n[l])}}function $t(r,e,t){for(var n=e.transition,o=ae(n)?s.TRANSFORMABLE_PROPS:s.normalizeToArray(n||[]),i=0;i<o.length;i++){var a=o[i];if(!(a==="style"||a==="shape"||a==="extra")){var l=r[a];process.env.NODE_ENV!=="production"&<(a,"el.transition"),t[a]=l}}}function Kt(r,e,t){for(var n=0;n<Xe.length;n++){var o=Xe[n],i=st[o],a=e[o];a&&(t[i[0]]=a[0],t[i[1]]=a[1])}for(var n=0;n<s.TRANSFORMABLE_PROPS.length;n++){var l=s.TRANSFORMABLE_PROPS[n];e[l]!=null&&(t[l]=e[l])}}function qt(r,e,t,n){if(t){var o=r.style,i;if(o){var a=t.transition,l=e.transition;if(a&&!ae(a)){var u=s.normalizeToArray(a);!i&&(i=n.style={});for(var f=0;f<u.length;f++){var c=u[f],d=o[c];i[c]=d}}else if(r.getAnimationStyleProps&&(ae(l)||ae(a)||s.indexOf(l,"style")>=0)){var h=r.getAnimationStyleProps(),v=h?h.style:null;if(v){!i&&(i=n.style={});for(var p=s.keys(t),f=0;f<p.length;f++){var c=p[f];if(v[c]){var d=o[c];i[c]=d}}}}}}}function jt(r,e){return s.isArrayLike(r)?r!==e:r!=null&&isFinite(r)}var lt;process.env.NODE_ENV!=="production"&&(lt=function(r,e){s.hasOwn(he,r)||s.warn("Prop `"+r+"` is not a permitted in `"+e+"`. Only `"+s.keys(he).join("`, `")+"` are permitted.")});var ut=s.makeInner(),Jt=["percent","easing","shape","style","extra"];function Qt(r){r.stopAnimation("keyframe"),r.attr(ut(r))}function ft(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(s.isArray(e)){s.each(e,function(l){ft(r,l,t)});return}var n=e.keyframes,o=e.duration;if(t&&o==null){var i=s.getAnimationConfig("enter",t,0);o=i&&i.duration}if(!(!n||!o)){var a=ut(r);s.each(ve,function(l){if(!(l&&!r[l])){var u,f=!1;n.sort(function(c,d){return c.percent-d.percent}),s.each(n,function(c){var d=r.animators,h=l?c[l]:c;if(process.env.NODE_ENV!=="production"&&c.percent>=1&&(f=!0),!!h){var v=s.keys(h);if(l||(v=s.filter(v,function(w){return s.indexOf(Jt,w)<0})),!!v.length){u||(u=r.animate(l,e.loop,!0),u.scope="keyframe");for(var p=0;p<d.length;p++)d[p]!==u&&d[p].targetName===u.targetName&&d[p].stopTracks(v);l&&(a[l]=a[l]||{});var x=l?a[l]:a;s.each(v,function(w){x[w]=((l?r[l]:r)||{})[w]}),u.whenWithKeys(o*c.percent,h,v,c.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(f||s.warn("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(o).start(e.easing))}})}}}var K="emphasis",J="normal",Te="blur",Pe="select",ee=[J,K,Te,Pe],_e={normal:["itemStyle"],emphasis:[K,"itemStyle"],blur:[Te,"itemStyle"],select:[Pe,"itemStyle"]},Se={normal:["label"],emphasis:[K,"label"],blur:[Te,"label"],select:[Pe,"label"]},er=["x","y"],tr="e\0\0",B={normal:{},emphasis:{},blur:{},select:{}},Ke={cartesian2d:Ot,geo:Pt,single:kt,polar:Zt,calendar:Vt,matrix:Nt};function pe(r){return r instanceof s.Path}function Re(r){return r instanceof s.Displayable}function rr(r,e){e.copyTransform(r),Re(e)&&Re(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,pe(e)&&pe(r)&&e.setShape(r.shape))}var nr=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,o,i){this._progressiveEls=null;var a=this._data,l=t.getData(),u=this.group,f=qe(t,l,n,o);a||u.removeAll(),l.diff(a).add(function(d){we(o,null,d,f(d,i),t,u,l)}).remove(function(d){var h=a.getItemGraphicEl(d);h&&Oe(h,$(h).option,t)}).update(function(d,h){var v=a.getItemGraphicEl(h);we(o,v,d,f(d,i),t,u,l)}).execute();var c=t.get("clip",!0)?s.createClipPath(t.coordinateSystem,!1,t):null;c?u.setClipPath(c):u.removeClipPath(),this._data=l},e.prototype.incrementalPrepareRender=function(t,n,o){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,o,i,a){var l=n.getData(),u=qe(n,l,o,i),f=this._progressiveEls=[];function c(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var d=t.start;d<t.end;d++){var h=we(null,null,d,u(d,a),n,this.group,l);h&&(h.traverse(c),f.push(h))}},e.prototype.eachRendered=function(t){s.traverseElements(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,o,i){var a=n.element;if(a==null||o.name===a)return!0;for(;(o=o.__hostTarget||o.parent)&&o!==this.group;)if(o.name===a)return!0;return!1},e.type="custom",e})(s.ChartView);function Le(r){var e=r.type,t;if(e==="path"){var n=r.shape,o=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=ht(n);t=s.makePath(i,null,o,n.layout||"center"),$(t).customPathData=i}else if(e==="image")t=new s.ZRImage({}),$(t).customImagePath=r.style.image;else if(e==="text")t=new s.ZRText({});else if(e==="group")t=new s.Group;else if(e==="compoundPath"){var n=r.shape;if(!n||!n.paths){var a="";process.env.NODE_ENV!=="production"&&(a="shape.paths must be specified in compoundPath"),s.throwError(a)}var l=s.map(n.paths,function(c){if(c.type==="path")return s.makePath(c.shape.pathData,c,null);var d=s.getShapeClass(c.type);if(!d){var h="";process.env.NODE_ENV!=="production"&&(h='graphic type "'+e+'" can not be found.'),s.throwError(h)}return new d});t=new s.CompoundPath({shape:{paths:l}})}else{var u=s.getShapeClass(e);if(!u){var a="";process.env.NODE_ENV!=="production"&&(a='graphic type "'+e+'" can not be found.'),s.throwError(a)}t=new u}return $(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function ke(r,e,t,n,o,i,a){Qt(e);var l=o&&o.normal.cfg;l&&e.setTextConfig(l),n&&n.transition==null&&(n.transition=er);var u=n&&n.style;if(u){if(e.type==="text"){var f=u;s.hasOwn(f,"textFill")&&(f.fill=f.textFill),s.hasOwn(f,"textStroke")&&(f.stroke=f.textStroke)}var c=void 0,d=pe(e)?u.decal:null;r&&d&&(d.dirty=!0,c=s.createOrUpdatePatternFromDecal(d,r)),u.__decalPattern=c}if(Re(e)&&u){var c=u.__decalPattern;c&&(u.decal=c)}Wt(e,n,i,{dataIndex:t,isInit:a,clearStyle:!0}),ft(e,n.keyframeAnimation,i)}function ct(r,e,t,n,o){var i=e.isGroup?null:e,a=o&&o[r].cfg;if(i){var l=i.ensureState(r);if(n===!1){var u=i.getState(r);u&&(u.style=null)}else l.style=n||null;a&&(l.textConfig=a),s.setDefaultStateProxy(i)}}function ar(r,e,t){if(!r.isGroup){var n=r,o=t.currentZ,i=t.currentZLevel;n.z=o,n.zlevel=i;var a=e.z2;a!=null&&(n.z2=a||0);for(var l=0;l<ee.length;l++)or(n,e,ee[l])}}function or(r,e,t){var n=t===J,o=n?e:ge(e,t),i=o?o.z2:null,a;i!=null&&(a=n?r:r.ensureState(t),a.z2=i||0)}function qe(r,e,t,n){var o=r.get("renderItem");if(typeof o=="string"){var i=s.getCustomSeries(o);i?o=i:process.env.NODE_ENV!=="production"&&console.warn("Custom series renderItem '"+o+`' not found.
|
|
2
|
-
Call 'echarts.registerCustomSeries' to register it.`)}var a=r.coordinateSystem,l={};a&&(process.env.NODE_ENV!=="production"&&(s.assert(o,"series.render is required."),s.assert(a.prepareCustoms||Ke[a.type],"This coordSys does not support custom series.")),l=a.prepareCustoms?a.prepareCustoms(a):Ke[a.type](a));for(var u=s.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:R,style:I,ordinalRawValue:U,styleEmphasis:q,visual:j,barLayout:te,currentSeriesIndices:V,font:Y},l.api||{}),f={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:l.coordSys,dataInsideLength:e.count(),encode:ir(r.getData()),itemPayload:r.get("itemPayload")||{}},c,d,h={},v={},p={},x={},w=0;w<ee.length;w++){var E=ee[w];p[E]=r.getModel(_e[E]),x[E]=r.getModel(Se[E])}function M(m){return m===c?d||(d=e.getItemModel(m)):e.getItemModel(m)}function T(m,g){return e.hasItemOption?m===c?h[g]||(h[g]=M(m).getModel(_e[g])):M(m).getModel(_e[g]):p[g]}function O(m,g){return e.hasItemOption?m===c?v[g]||(v[g]=M(m).getModel(Se[g])):M(m).getModel(Se[g]):x[g]}return function(m,g){return c=m,d=null,h={},v={},o&&o(s.defaults({dataIndexInside:m,dataIndex:e.getRawIndex(m),actionType:g?g.type:null},f),u)};function R(m,g){return g==null&&(g=c),e.getStore().get(e.getDimensionIndex(m||0),g)}function U(m,g){g==null&&(g=c),m=m||0;var C=e.getDimensionInfo(m);if(!C){var z=e.getDimensionIndex(m);return z>=0?e.getStore().get(z,g):void 0}var H=e.get(C.name,g),P=C&&C.ordinalMeta;return P?P.categories[H]:H}function I(m,g){process.env.NODE_ENV!=="production"&&Ye("api.style","Please write literal style directly instead."),g==null&&(g=c);var C=e.getItemVisual(g,"style"),z=C&&C.fill,H=C&&C.opacity,P=T(g,J).getItemStyle();z!=null&&(P.fill=z),H!=null&&(P.opacity=H);var _={inheritColor:s.isString(z)?z:s.tokens.color.neutral99},S=O(g,J),A=s.createTextStyle(S,null,_,!1,!0);A.text=S.getShallow("show")?s.retrieve2(r.getFormattedLabel(g,J),s.getDefaultLabel(e,g)):null;var y=s.createTextConfig(S,_,!1);return W(m,P),P=Ge(P,A,y),m&&F(P,m),P.legacy=!0,P}function q(m,g){process.env.NODE_ENV!=="production"&&Ye("api.styleEmphasis","Please write literal style directly instead."),g==null&&(g=c);var C=T(g,K).getItemStyle(),z=O(g,K),H=s.createTextStyle(z,null,null,!0,!0);H.text=z.getShallow("show")?s.retrieve3(r.getFormattedLabel(g,K),r.getFormattedLabel(g,J),s.getDefaultLabel(e,g)):null;var P=s.createTextConfig(z,null,!0);return W(m,C),C=Ge(C,H,P),m&&F(C,m),C.legacy=!0,C}function F(m,g){for(var C in g)s.hasOwn(g,C)&&(m[C]=g[C])}function W(m,g){m&&(m.textFill&&(g.textFill=m.textFill),m.textPosition&&(g.textPosition=m.textPosition))}function j(m,g){if(g==null&&(g=c),s.hasOwn(Fe,m)){var C=e.getItemVisual(g,"style");return C?C[Fe[m]]:null}if(s.hasOwn(Ct,m))return e.getItemVisual(g,m)}function te(m){if(a.type==="cartesian2d"){var g=a.getBaseAxis();return s.getLayoutOnAxis(s.defaults({axis:g},m))}}function V(){return t.getCurrentSeriesIndices()}function Y(m){return s.getFont(m,t)}}function ir(r){var e={};return s.each(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var o=n.coordDim,i=e[o]=e[o]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function we(r,e,t,n,o,i,a){if(!n){i.remove(e);return}var l=ze(r,e,t,n,o,i);return l&&a.setItemGraphicEl(t,l),l&&s.toggleHoverEmphasis(l,n.focus,n.blurScope,n.emphasisDisabled),l}function ze(r,e,t,n,o,i){process.env.NODE_ENV!=="production"&&s.assert(n,"should not have an null/undefined element setting");var a=-1,l=e;e&&dt(e,n,o)&&(a=s.indexOf(i.childrenRef(),e),e=null);var u=!e,f=e;f?f.clearStates():(f=Le(n),l&&rr(l,f)),n.morph===!1?f.disableMorphing=!0:f.disableMorphing&&(f.disableMorphing=!1),n.tooltipDisabled&&(f.tooltipDisabled=!0),B.normal.cfg=B.normal.conOpt=B.emphasis.cfg=B.emphasis.conOpt=B.blur.cfg=B.blur.conOpt=B.select.cfg=B.select.conOpt=null,B.isLegacy=!1,lr(f,t,n,o,u,B),sr(f,t,n,o,u),ke(r,f,t,n,B,o,u),s.hasOwn(n,"info")&&($(f).info=n.info);for(var c=0;c<ee.length;c++){var d=ee[c];if(d!==J){var h=ge(n,d),v=Ze(n,h,d);ct(d,f,h,v,B)}}return ar(f,n,o),n.type==="group"&&ur(r,f,t,n,o),a>=0?i.replaceAt(f,a):i.add(f),f}function dt(r,e,t){var n=$(r),o=e.type,i=e.shape,a=e.style;return t.isUniversalTransitionEnabled()||o!=null&&o!==n.customGraphicType||o==="path"&&hr(i)&&ht(i)!==n.customPathData||o==="image"&&s.hasOwn(a,"image")&&a.image!==n.customImagePath}function sr(r,e,t,n,o){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var a=r.getClipPath();a&&dt(a,i,n)&&(a=null),a||(a=Le(i),process.env.NODE_ENV!=="production"&&s.assert(pe(a),"Only any type of `path` can be used in `clipPath`, rather than "+a.type+"."),r.setClipPath(a)),ke(null,a,e,i,null,n,o)}}function lr(r,e,t,n,o,i){if(!(r.isGroup||r.type==="compoundPath")){je(t,null,i),je(t,K,i);var a=i.normal.conOpt,l=i.emphasis.conOpt,u=i.blur.conOpt,f=i.select.conOpt;if(a!=null||l!=null||f!=null||u!=null){var c=r.getTextContent();if(a===!1)c&&r.removeTextContent();else{a=i.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=Le(a),r.setTextContent(c)),ke(null,c,e,a,null,n,o);for(var d=a&&a.style,h=0;h<ee.length;h++){var v=ee[h];if(v!==J){var p=i[v].conOpt;ct(v,c,p,Ze(a,p,v),null)}}d?c.dirty():c.markRedraw()}}}}function je(r,e,t){var n=e?ge(r,e):r,o=e?Ze(r,n,K):r.style,i=r.type,a=n?n.textConfig:null,l=r.textContent,u=l?e?ge(l,e):l:null;if(o&&(t.isLegacy||Bt(o,i,!!a,!!u))){t.isLegacy=!0;var f=Ft(o,i,!e);!a&&f.textConfig&&(a=f.textConfig),!u&&f.textContent&&(u=f.textContent)}if(!e&&u){var c=u;!c.type&&(c.type="text"),process.env.NODE_ENV!=="production"&&s.assert(c.type==="text",'textContent.type must be "text"')}var d=e?t[e]:t.normal;d.cfg=a,d.conOpt=u}function ge(r,e){return e?r?r[e]:null:r}function Ze(r,e,t){var n=e&&e.style;return n==null&&t===K&&r&&(n=r.styleEmphasis),n}function ur(r,e,t,n,o){var i=n.children,a=i?i.length:0,l=n.$mergeChildren,u=l==="byName"||n.diffChildrenByName,f=l===!1;if(!(!a&&!u&&!f)){if(u){cr({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:o,group:e});return}f&&e.removeAll();for(var c=0;c<a;c++){var d=i[c],h=e.childAt(c);d?(d.ignore==null&&(d.ignore=!1),ze(r,h,t,d,o,e)):(process.env.NODE_ENV!=="production"&&s.assert(h,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),h.ignore=!0)}for(var v=e.childCount()-1;v>=c;v--){var p=e.childAt(v);fr(e,p,o)}}}function fr(r,e,t){e&&Oe(e,$(r).option,t)}function cr(r){new s.DataDiffer(r.oldChildren,r.newChildren,Je,Je,r).add(Qe).update(Qe).remove(dr).execute()}function Je(r,e){var t=r&&r.name;return t??tr+e}function Qe(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,o=e!=null?t.oldChildren[e]:null;ze(t.api,o,t.dataIndex,n,t.seriesModel,t.group)}function dr(r){var e=this.context,t=e.oldChildren[r];t&&Oe(t,$(t).option,e.seriesModel)}function ht(r){return r&&(r.pathData||r.d)}function hr(r){return r&&(s.hasOwn(r,"pathData")||s.hasOwn(r,"d"))}function vr(r){r.registerChartView(nr),r.registerSeriesModel(Rt)}var et=["x","y","radius","angle","single"],pr=["cartesian2d","polar","singleAxis"];function gr(r){var e=r.get("coordinateSystem");return s.indexOf(pr,e)>=0}function Q(r){return process.env.NODE_ENV!=="production"&&s.assert(r),r+"Axis"}function mr(r,e){var t=s.createHashMap(),n=[],o=s.createHashMap();r.eachComponent({mainType:"dataZoom",query:e},function(c){o.get(c.uid)||l(c)});var i;do i=!1,r.eachComponent("dataZoom",a);while(i);function a(c){!o.get(c.uid)&&u(c)&&(l(c),i=!0)}function l(c){o.set(c.uid,!0),n.push(c),f(c)}function u(c){var d=!1;return c.eachTargetAxis(function(h,v){var p=t.get(h);p&&p[v]&&(d=!0)}),d}function f(c){c.eachTargetAxis(function(d,h){(t.get(d)||t.set(d,[]))[h]=!0})}return n}function vt(r){var e=r.ecModel,t={infoList:[],infoMap:s.createHashMap()};return r.eachTargetAxis(function(n,o){var i=e.getComponent(Q(n),o);if(i){var a=i.getCoordSysModel();if(a){var l=a.uid,u=t.infoMap.get(l);u||(u={model:a,axisModels:[]},t.infoList.push(u),t.infoMap.set(l,u)),u.axisModels.push(i)}}}),t}var Me=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),me=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,o){var i=tt(t);this.settledOption=i,this.mergeDefaultAndTheme(t,o),this._doInit(i)},e.prototype.mergeOption=function(t){var n=tt(t);s.merge(this.option,t,!0),s.merge(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var o=this.settledOption;s.each([["start","startValue"],["end","endValue"]],function(i,a){this._rangePropMode[a]==="value"&&(n[i[0]]=o[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=s.createHashMap(),o=this._fillSpecifiedTargetAxis(n);o?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return s.each(et,function(o){var i=this.getReferringComponents(Q(o),s.MULTIPLE_REFERRING);if(i.specified){n=!0;var a=new Me;s.each(i.models,function(l){a.add(l.componentIndex)}),t.set(o,a)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var o=this.ecModel,i=!0;if(i){var a=n==="vertical"?"y":"x",l=o.findComponents({mainType:a+"Axis"});u(l,a)}if(i){var l=o.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});u(l,"single")}function u(f,c){var d=f[0];if(d){var h=new Me;if(h.add(d.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var v=d.getReferringComponents("grid",s.SINGLE_REFERRING).models[0];v&&s.each(f,function(p){d.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",s.SINGLE_REFERRING).models[0]&&h.add(p.componentIndex)})}}}i&&s.each(et,function(f){if(i){var c=o.findComponents({mainType:Q(f),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var d=new Me;d.add(c[0].componentIndex),t.set(f,d),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,o=this.get("rangeMode");s.each([["start","startValue"],["end","endValue"]],function(i,a){var l=t[i[0]]!=null,u=t[i[1]]!=null;l&&!u?n[a]="percent":!l&&u?n[a]="value":o?n[a]=o[a]:l&&(n[a]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,o){t==null&&(t=this.ecModel.getComponent(Q(n),o))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(o,i){s.each(o.indexList,function(a){t.call(n,i,a)})})},e.prototype.getAxisProxy=function(t,n){var o=this.getAxisModel(t,n);if(o)return o.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){process.env.NODE_ENV!=="production"&&s.assert(t&&n!=null);var o=this._targetAxisInfoMap.get(t);if(o&&o.indexMap[n])return this.ecModel.getComponent(Q(t),n)},e.prototype.setRawRange=function(t){var n=this.option,o=this.settledOption;s.each([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=o[i[0]]=t[i[0]],n[i[1]]=o[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;s.each(["start","startValue","end","endValue"],function(o){n[o]=t[o]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var o=this.findRepresentativeAxisProxy();if(o)return o.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,o=this._targetAxisInfoMap.keys(),i=0;i<o.length;i++)for(var a=o[i],l=this._targetAxisInfoMap.get(a),u=0;u<l.indexList.length;u++){var f=this.getAxisProxy(a,l.indexList[u]);if(f.hostedBy(this))return f;n||(n=f)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&s.assert(this._orient),this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(s.ComponentModel);function tt(r){var e={};return s.each(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var pt=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,o,i){this.dataZoomModel=t,this.ecModel=n,this.api=o},e.type="dataZoom",e})(s.ComponentView),ne=s.each,rt=s.asc,yr=(function(){function r(e,t,n,o){this._dimName=e,this._axisIndex=t,this.ecModel=o,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(gr(t)){var n=Q(this._dimName),o=t.getReferringComponents(n,s.SINGLE_REFERRING).models[0];o&&this._axisIndex===o.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return s.clone(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),o=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],l=[],u=[],f;ne(["start","end"],function(h,v){var p=e[h],x=e[h+"Value"];i[v]==="percent"?(p==null&&(p=a[v]),x=o.parse(s.linearMap(p,a,t))):(f=!0,x=x==null?t[v]:o.parse(x),p=s.linearMap(x,t,a)),u[v]=x==null||isNaN(x)?t[v]:x,l[v]=p==null||isNaN(p)?a[v]:p}),rt(u),rt(l);var c=this._minMaxSpan;f?d(u,l,t,a,!1):d(l,u,a,t,!0);function d(h,v,p,x,w){var E=w?"Span":"ValueSpan";s.sliderMove(0,h,p,"all",c["min"+E],c["max"+E]);for(var M=0;M<2;M++)v[M]=s.linearMap(h[M],p,x,!0),w&&(v[M]=o.parse(v[M]))}return{valueWindow:u,percentWindow:l}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=xr(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,o=this.getTargetSeriesModels(),i=e.get("filterMode"),a=this._valueWindow;if(i==="none")return;ne(o,function(u){var f=u.getData(),c=f.mapDimensionsAll(n);if(c.length){if(i==="weakFilter"){var d=f.getStore(),h=s.map(c,function(v){return f.getDimensionIndex(v)},f);f.filterSelf(function(v){for(var p,x,w,E=0;E<c.length;E++){var M=d.get(h[E],v),T=!isNaN(M),O=M<a[0],R=M>a[1];if(T&&!O&&!R)return!0;T&&(w=!0),O&&(p=!0),R&&(x=!0)}return w&&p&&x})}else ne(c,function(v){if(i==="empty")u.setData(f=f.map(v,function(x){return l(x)?x:NaN}));else{var p={};p[v]=a,f.selectRange(p)}});ne(c,function(v){f.setApproximateExtent(a,v)})}});function l(u){return u>=a[0]&&u<=a[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;ne(["min","max"],function(o){var i=t.get(o+"Span"),a=t.get(o+"ValueSpan");a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a!=null?i=s.linearMap(n[0]+a,n,[0,100],!0):i!=null&&(a=s.linearMap(i,[0,100],n,!0)-n[0]),e[o+"Span"]=i,e[o+"ValueSpan"]=a},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var o=s.getPixelPrecision(n,[0,500]);o=Math.min(o,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(o)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(o)),i.freeze()}},r})();function xr(r,e,t){var n=[1/0,-1/0];ne(t,function(a){s.unionAxisExtentFromData(n,a.getData(),e)});var o=r.getAxisModel(),i=s.ensureScaleRawExtentInfo(o.axis.scale,o,n).calculate();return[i.min,i.max]}var _r={getTargetSeries:function(r){function e(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(a,l){var u=r.getComponent(Q(a),l);o(a,l,u,i)})})}e(function(o,i,a,l){a.__dzAxisProxy=null});var t=[];e(function(o,i,a,l){a.__dzAxisProxy||(a.__dzAxisProxy=new yr(o,i,l,r),t.push(a.__dzAxisProxy))});var n=s.createHashMap();return s.each(t,function(o){s.each(o.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,o){t.getAxisProxy(n,o).reset(t)}),t.eachTargetAxis(function(n,o){t.getAxisProxy(n,o).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var o=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:o[0],end:o[1],startValue:i[0],endValue:i[1]})}})}};function Sr(r){r.registerAction("dataZoom",function(e,t){var n=mr(t,e);s.each(n,function(o){o.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var nt=!1;function gt(r){nt||(nt=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,_r),Sr(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}var wr=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=s.inheritDefaultOption(me.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(me),Ve=s.makeInner();function Mr(r,e,t){Ve(r).coordSysRecordMap.each(function(n){var o=n.dataZoomInfoMap.get(e.uid);o&&(o.getRange=t)})}function br(r,e){for(var t=Ve(r).coordSysRecordMap,n=t.keys(),o=0;o<n.length;o++){var i=n[o],a=t.get(i),l=a.dataZoomInfoMap;if(l){var u=e.uid,f=l.get(u);f&&(l.removeKey(u),l.keys().length||mt(t,a))}}}function mt(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Ar(r,e){var t={model:e,containsPoint:s.curry(Cr,e),dispatchAction:s.curry(Er,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Mt(r.getZr());return s.each(["pan","zoom","scrollMove"],function(o){n.on(o,function(i){var a=[];t.dataZoomInfoMap.each(function(l){if(i.isAvailableBehavior(l.model.option)){var u=(l.getRange||{})[o],f=u&&u(l.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!l.model.get("disabled",!0)&&f&&a.push({dataZoomId:l.model.id,start:f[0],end:f[1]})}}),a.length&&t.dispatchAction(a)})}),t}function Er(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Cr(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function Rr(r,e,t){var n,o="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(l){var u=l.model,f=u.get("disabled",!0)?!1:u.get("zoomLock",!0)?"move":!0;i[o+f]>i[o+n]&&(n=f),a=a&&u.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Dr(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Ve(t),o=n.coordSysRecordMap||(n.coordSysRecordMap=s.createHashMap());o.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var a=vt(i);s.each(a.infoList,function(l){var u=l.model.uid,f=o.get(u)||o.set(u,Ar(t,l.model)),c=f.dataZoomInfoMap||(f.dataZoomInfoMap=s.createHashMap());c.set(i.uid,{dzReferCoordSysInfo:l,model:i,getRange:null})})}),o.each(function(i){var a=i.controller,l,u=i.dataZoomInfoMap;if(u){var f=u.keys()[0];f!=null&&(l=u.get(f))}if(!l){mt(o,i);return}var c=Rr(u,i,t);a.enable(c.controlType,c.opt),s.createOrUpdate(i,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var Or=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,o){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Mr(o,t,{pan:s.bind(be.pan,this),zoom:s.bind(be.zoom,this),scrollMove:s.bind(be.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){br(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(pt),be={zoom:function(r,e,t,n){var o=this.range,i=o.slice(),a=r.axisModels[0];if(a){var l=Ae[e](null,[n.originX,n.originY],a,t,r),u=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(i[1]-i[0])+i[0],f=Math.max(1/n.scale,0);i[0]=(i[0]-u)*f+u,i[1]=(i[1]-u)*f+u;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(s.sliderMove(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1])return i}},pan:at(function(r,e,t,n,o,i){var a=Ae[n]([i.oldX,i.oldY],[i.newX,i.newY],e,o,t);return a.signal*(r[1]-r[0])*a.pixel/a.pixelLength}),scrollMove:at(function(r,e,t,n,o,i){var a=Ae[n]([0,0],[i.scrollDelta,i.scrollDelta],e,o,t);return a.signal*(r[1]-r[0])*i.scrollDelta})};function at(r){return function(e,t,n,o){var i=this.range,a=i.slice(),l=e.axisModels[0];if(l){var u=r(a,l,e,t,n,o);if(s.sliderMove(u,a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}}}var Ae={grid:function(r,e,t,n,o){var i=t.axis,a={},l=o.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(a.pixel=e[0]-r[0],a.pixelLength=l.width,a.pixelStart=l.x,a.signal=i.inverse?1:-1):(a.pixel=e[1]-r[1],a.pixelLength=l.height,a.pixelStart=l.y,a.signal=i.inverse?-1:1),a},polar:function(r,e,t,n,o){var i=t.axis,a={},l=o.model.coordinateSystem,u=l.getRadiusAxis().getExtent(),f=l.getAngleAxis().getExtent();return r=r?l.pointToCoord(r):[0,0],e=l.pointToCoord(e),t.mainType==="radiusAxis"?(a.pixel=e[0]-r[0],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=i.inverse?1:-1):(a.pixel=e[1]-r[1],a.pixelLength=f[1]-f[0],a.pixelStart=f[0],a.signal=i.inverse?-1:1),a},singleAxis:function(r,e,t,n,o){var i=t.axis,a=o.model.coordinateSystem.getRect(),l={};return r=r||[0,0],i.orient==="horizontal"?(l.pixel=e[0]-r[0],l.pixelLength=a.width,l.pixelStart=a.x,l.signal=i.inverse?1:-1):(l.pixel=e[1]-r[1],l.pixelLength=a.height,l.pixelStart=a.y,l.signal=i.inverse?-1:1),l}};function Tr(r){gt(r),r.registerComponentModel(wr),r.registerComponentView(Or),Dr(r)}var Pr=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=s.inheritDefaultOption(me.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:s.tokens.color.accent10,borderRadius:0,backgroundColor:s.tokens.color.transparent,dataBackground:{lineStyle:{color:s.tokens.color.accent30,width:.5},areaStyle:{color:s.tokens.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:s.tokens.color.accent40,width:.5},areaStyle:{color:s.tokens.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:s.tokens.color.neutral00,borderColor:s.tokens.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:s.tokens.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:s.tokens.color.tertiary},brushSelect:!0,brushStyle:{color:s.tokens.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:s.tokens.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(me),ue=s.Rect,Lr=1,Ee=30,kr=7,fe="horizontal",ot="vertical",zr=5,Zr=["line","bar","candlestick","scatter"],Vr={easing:"cubicOut",duration:100,delay:0},Nr=(function(r){s.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=s.bind(this._onBrush,this),this._onBrushEnd=s.bind(this._onBrushEnd,this)},e.prototype.render=function(t,n,o,i){if(r.prototype.render.apply(this,arguments),s.createOrUpdate(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){s.clear(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new s.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,o=t.get("brushSelect"),i=o?kr:0,a=s.createBoxLayoutReference(t,n).refContainer,l=this._findCoordRect(),u=t.get("defaultLocationEdgeGap",!0)||0,f=this._orient===fe?{right:a.width-l.x-l.width,top:a.height-Ee-u-i,width:l.width,height:Ee}:{right:u,top:l.y,width:Ee,height:l.height},c=s.getLayoutParams(t.option);s.each(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=f[h])});var d=s.getLayoutRect(c,a);this._location={x:d.x,y:d.y},this._size=[d.width,d.height],this._orient===ot&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,o=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),a=i&&i.get("inverse"),l=this._displayables.sliderGroup,u=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(o===fe&&!a?{scaleY:u?1:-1,scaleX:1}:o===fe&&a?{scaleY:u?1:-1,scaleX:-1}:o===ot&&!a?{scaleY:u?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:u?-1:1,scaleX:-1,rotation:Math.PI/2});var f=t.getBoundingRect([l]);t.x=n.x-f.x,t.y=n.y-f.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,o=this._displayables.sliderGroup,i=t.get("brushSelect");o.add(new ue({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var a=new ue({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:s.bind(this._onClickPanel,this)}),l=this.api.getZr();i?(a.on("mousedown",this._onBrushStart,this),a.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),o.add(a)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,o=this._shadowSize||[],i=t.series,a=i.getRawData(),l=i.getShadowDim&&i.getShadowDim(),u=l&&a.getDimensionInfo(l)?i.getShadowDim():t.otherDim;if(u==null)return;var f=this._shadowPolygonPts,c=this._shadowPolylinePts;if(a!==this._shadowData||u!==this._shadowDim||n[0]!==o[0]||n[1]!==o[1]){var d=a.getDataExtent(t.thisDim),h=a.getDataExtent(u),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],x=[0,n[0]],w=[[n[0],0],[0,0]],E=[],M=x[1]/Math.max(1,a.count()-1),T=n[0]/(d[1]-d[0]),O=t.thisAxis.type==="time",R=-M,U=Math.round(a.count()/n[0]),I;a.each([t.thisDim,u],function(te,V,Y){if(U>0&&Y%U){O||(R+=M);return}R=O?(+te-d[0])*T:R+M;var m=V==null||isNaN(V)||V==="",g=m?0:s.linearMap(V,h,p,!0);m&&!I&&Y?(w.push([w[w.length-1][0],0]),E.push([E[E.length-1][0],0])):!m&&I&&(w.push([R,0]),E.push([R,0])),m||(w.push([R,g]),E.push([R,g])),I=m}),f=this._shadowPolygonPts=w,c=this._shadowPolylinePts=E}this._shadowData=a,this._shadowDim=u,this._shadowSize=[n[0],n[1]];var q=this.dataZoomModel;function F(te){var V=q.getModel(te?"selectedDataBackground":"dataBackground"),Y=new s.Group,m=new s.Polygon({shape:{points:f},segmentIgnoreThreshold:1,style:V.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),g=new s.Polyline({shape:{points:c},segmentIgnoreThreshold:1,style:V.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return Y.add(m),Y.add(g),Y}for(var W=0;W<3;W++){var j=F(W===1);this._displayables.sliderGroup.add(j),this._displayables.dataShadowSegs.push(j)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var o,i=this.ecModel;return t.eachTargetAxis(function(a,l){var u=t.getAxisProxy(a,l).getTargetSeriesModels();s.each(u,function(f){if(!o&&!(n!==!0&&s.indexOf(Zr,f.get("type"))<0)){var c=i.getComponent(Q(a),l).axis,d=Br(a),h,v=f.coordinateSystem;d!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),d=f.getData().mapDimension(d);var p=f.getData().mapDimension(a);o={thisAxis:c,series:f,thisDim:p,otherDim:d,otherAxisInverse:h}}},this)},this),o}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,o=n.handles=[null,null],i=n.handleLabels=[null,null],a=this._displayables.sliderGroup,l=this._size,u=this.dataZoomModel,f=this.api,c=u.get("borderRadius")||0,d=u.get("brushSelect"),h=n.filler=new ue({silent:d,style:{fill:u.get("fillerColor")},textConfig:{position:"inside"}});a.add(h),a.add(new ue({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:c},style:{stroke:u.get("dataBackgroundColor")||u.get("borderColor"),lineWidth:Lr,fill:s.tokens.color.transparent}})),s.each([0,1],function(T){var O=u.get("handleIcon");!s.symbolBuildProxies[O]&&O.indexOf("path://")<0&&O.indexOf("image://")<0&&(O="path://"+O,process.env.NODE_ENV!=="production"&&s.deprecateLog("handleIcon now needs 'path://' prefix when using a path string"));var R=s.createSymbol(O,-1,0,2,2,null,!0);R.attr({cursor:Fr(this._orient),draggable:!0,drift:s.bind(this._onDragMove,this,T),ondragend:s.bind(this._onDragEnd,this),onmouseover:s.bind(this._showDataInfo,this,!0),onmouseout:s.bind(this._showDataInfo,this,!1),z2:5});var U=R.getBoundingRect(),I=u.get("handleSize");this._handleHeight=s.parsePercent(I,this._size[1]),this._handleWidth=U.width/U.height*this._handleHeight,R.setStyle(u.getModel("handleStyle").getItemStyle()),R.style.strokeNoScale=!0,R.rectHover=!0,R.ensureState("emphasis").style=u.getModel(["emphasis","handleStyle"]).getItemStyle(),s.enableHoverEmphasis(R);var q=u.get("handleColor");q!=null&&(R.style.fill=q),a.add(o[T]=R);var F=u.getModel("textStyle"),W=u.get("handleLabel")||{},j=W.show||!1;t.add(i[T]=new s.ZRText({silent:!0,invisible:!j,style:s.createTextStyle(F,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:F.getTextColor(),font:F.getFont()}),z2:10}))},this);var v=h;if(d){var p=s.parsePercent(u.get("moveHandleSize"),l[1]),x=n.moveHandle=new s.Rect({style:u.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:p}}),w=p*.8,E=n.moveHandleIcon=s.createSymbol(u.get("moveHandleIcon"),-w/2,-w/2,w,w,s.tokens.color.neutral00,!0);E.silent=!0,E.y=l[1]+p/2-.5,x.ensureState("emphasis").style=u.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var M=Math.min(l[1]/2,Math.max(p,10));v=n.moveZone=new s.Rect({invisible:!0,shape:{y:l[1]-M,height:p+M}}),v.on("mouseover",function(){f.enterEmphasis(x)}).on("mouseout",function(){f.leaveEmphasis(x)}),a.add(x),a.add(E),a.add(v)}v.attr({draggable:!0,cursor:"default",drift:s.bind(this._onDragMove,this,"all"),ondragstart:s.bind(this._showDataInfo,this,!0),ondragend:s.bind(this._onDragEnd,this),onmouseover:s.bind(this._showDataInfo,this,!0),onmouseout:s.bind(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[s.linearMap(t[0],[0,100],n,!0),s.linearMap(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var o=this.dataZoomModel,i=this._handleEnds,a=this._getViewExtent(),l=o.findRepresentativeAxisProxy().getMinMaxSpan(),u=[0,100];s.sliderMove(n,i,a,o.get("zoomLock")?"all":t,l.minSpan!=null?s.linearMap(l.minSpan,u,a,!0):null,l.maxSpan!=null?s.linearMap(l.maxSpan,u,a,!0):null);var f=this._range,c=this._range=s.asc([s.linearMap(i[0],a,u,!0),s.linearMap(i[1],a,u,!0)]);return!f||f[0]!==c[0]||f[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,o=this._handleEnds,i=s.asc(o.slice()),a=this._size;s.each([0,1],function(v){var p=n.handles[v],x=this._handleHeight;p.attr({scaleX:x/2,scaleY:x/2,x:o[v]+(v?-1:1),y:a[1]/2-x/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:a[1]});var l={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(l),n.moveZone.setShape(l),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",l.x+l.width/2));for(var u=n.dataShadowSegs,f=[0,i[0],i[1],a[0]],c=0;c<u.length;c++){var d=u[c],h=d.getClipPath();h||(h=new s.Rect,d.setClipPath(h)),h.setShape({x:f[c],y:0,width:f[c+1]-f[c],height:a[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,o=this._displayables,i=o.handleLabels,a=this._orient,l=["",""];if(n.get("showDetail")){var u=n.findRepresentativeAxisProxy();if(u){var f=u.getAxisModel().axis,c=this._range,d=t?u.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:u.getDataValueWindow();l=[this._formatLabel(d[0],f),this._formatLabel(d[1],f)]}}var h=s.asc(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(p){var x=s.getTransform(o.handles[p].parent,this.group),w=s.transformDirection(p===0?"right":"left",x),E=this._handleWidth/2+zr,M=s.applyTransform([h[p]+(p===0?-E:E),this._size[1]/2],x);i[p].setStyle({x:M[0],y:M[1],verticalAlign:a===fe?"middle":w,align:a===fe?w:"center",text:l[p]})}},e.prototype._formatLabel=function(t,n){var o=this.dataZoomModel,i=o.get("labelFormatter"),a=o.get("labelPrecision");(a==null||a==="auto")&&(a=n.getPixelPrecision());var l=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(a,20));return s.isFunction(i)?i(t,l):s.isString(i)?i.replace("{value}",l):l},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},o=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),a=i.get("show")||!1,l=t||this._dragging?a:o,u=this._displayables,f=u.handleLabels;f[0].attr("invisible",!l),f[1].attr("invisible",!l),u.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](u.moveHandle,1)},e.prototype._onDragMove=function(t,n,o,i){this._dragging=!0,s.stop(i.event);var a=this._displayables.sliderGroup.getLocalTransform(),l=s.applyTransform([n,o],a,!0),u=this._updateInterval(t,l[0]),f=this.dataZoomModel.get("realtime");this._updateView(!f),u&&f&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,o=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(o[0]<0||o[0]>n[0]||o[1]<0||o[1]>n[1])){var i=this._handleEnds,a=(i[0]+i[1])/2,l=this._updateInterval("all",o[0]-a);this._updateView(),l&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,o=t.offsetY;this._brushStart=new s.Point(n,o),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var o=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(o.width)<5)){var a=this._getViewExtent(),l=[0,100],u=this._handleEnds=[o.x,o.x+o.width],f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();s.sliderMove(0,u,a,0,f.minSpan!=null?s.linearMap(f.minSpan,l,a,!0):null,f.maxSpan!=null?s.linearMap(f.maxSpan,l,a,!0):null),this._range=s.asc([s.linearMap(u[0],a,l,!0),s.linearMap(u[1],a,l,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(s.stop(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var o=this._displayables,i=this.dataZoomModel,a=o.brushRect;a||(a=o.brushRect=new ue({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),o.sliderGroup.add(a)),a.attr("ignore",!1);var l=this._brushStart,u=this._displayables.sliderGroup,f=u.transformCoordToLocal(t,n),c=u.transformCoordToLocal(l.x,l.y),d=this._size;f[0]=Math.max(Math.min(d[0],f[0]),0),a.setShape({x:c[0],y:0,width:f[0]-c[0],height:d[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Vr:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=vt(this.dataZoomModel).infoList;if(!t&&n.length){var o=n[0].model.coordinateSystem;t=o.getRect&&o.getRect()}if(!t){var i=this.api.getWidth(),a=this.api.getHeight();t={x:i*.2,y:a*.2,width:i*.6,height:a*.6}}return t},e.type="dataZoom.slider",e})(pt);function Br(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Fr(r){return r==="vertical"?"ns-resize":"ew-resize"}function Wr(r){r.registerComponentModel(Pr),r.registerComponentView(Nr),gt(r)}function Hr(r){s.use(Tr),s.use(Wr)}const Gr={class:"reportifact-timeline-toolbar"},Ir=["onClick"],it="#ef4444",Ce="Cuts",Yr=22,Xr=b.defineComponent({__name:"Timeline",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},options:{default:void 0}},emits:["row-click"],setup(r,{expose:e,emit:t}){var z,H,P;s.use([s.install,vr,s.install$1,s.install$2,s.install$3,s.install$4,Hr]);const n=["#3b82f6","#f59e0b","#10b981","#8b5cf6","#0ea5e9","#64748b","#ec4899","#14b8a6"],o=[{value:"seconds",label:"sec"},{value:"clock",label:"mm:ss"}],i=b.ref(!1);let a=null;b.onMounted(()=>{i.value=document.documentElement.classList.contains("dark"),a=new MutationObserver(()=>{i.value=document.documentElement.classList.contains("dark")}),a.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),b.onUnmounted(()=>{a==null||a.disconnect()});const l=r,u=t,f=b.ref([]),c=b.computed(()=>l.data===void 0?l.src??l.url??"":""),d=b.ref(((z=l.options)==null?void 0:z.timeFormat)==="clock"?"clock":"seconds"),h=((H=l.options)==null?void 0:H.zoom)===!0||((P=l.options)==null?void 0:P.zoom)==="true",{loading:v,error:p,fetchData:x}=yt.useFetch(c,{async onSuccess(_){M(await _.json())}}),w=b.computed(()=>l.data===void 0&&v.value),E=b.computed(()=>l.data!==void 0?null:l.src||l.url?p.value:"Resource not found in asset");function M(_){const S=Array.isArray(_)?_:typeof _=="object"&&_!==null&&"rows"in _?_.rows:[];f.value=T(S)}b.watch(()=>l.data,_=>{_!==void 0&&M(_)},{immediate:!0,deep:!0});function T(_){if(!Array.isArray(_))return[];const S=[];for(const A of _){if(typeof A!="object"||A===null)continue;const y=A,Z=Number(y.end);if(typeof y.name!="string"||!Number.isFinite(Z))continue;const k=Number(y.start),N=Array.isArray(y.cuts)?y.cuts.map(Number).filter(Number.isFinite).sort((L,D)=>L-D):[];S.push({id:typeof y.id=="string"?y.id:void 0,name:y.name,group:typeof y.group=="string"&&y.group?y.group:void 0,color:typeof y.color=="string"&&y.color?y.color:void 0,start:Number.isFinite(k)?k:0,end:Z,cuts:N,click:typeof y.click=="object"&&y.click!==null?y.click:void 0})}return S}const O=b.computed(()=>`${Math.max(280,f.value.length*Yr+(h?150:126))}px`),R=b.computed(()=>f.value.reduce((_,S)=>Math.max(_,S.end),0));function U(_,S,A){const y=Math.max(0,Math.round(_));if(S==="seconds")return`${y}s`;const Z=Math.floor(y/3600),k=Math.floor(y%3600/60),N=y%60,L=D=>String(D).padStart(2,"0");return A>=3600?`${L(Z)}:${L(k)}:${L(N)}`:`${L(k)}:${L(N)}`}const I=b.computed(()=>{const _=[];for(const S of f.value){const A=S.group??"";_.includes(A)||_.push(A)}return _});function q(_){const S=I.value.indexOf(_);return n[Math.max(0,S)%n.length]}function F(_,S){return s.clipRectByRect(S,_.coordSys)}function W(_){return Math.min(_.size([0,1])[1]*.6,14)}function j(_,S){const A=S.value(0),y=S.coord([S.value(1),A]),Z=S.coord([S.value(2),A]),k=W(S),N=F(_,{x:y[0],y:y[1]-k/2,width:Math.max(Z[0]-y[0],1),height:k});if(!N)return;const L=f.value[A];return{type:"rect",shape:{...N,r:2},style:{fill:(L==null?void 0:L.color)??S.visual("color")}}}function te(_,S){const A=S.value(0),y=S.coord([S.value(1),A]),Z=W(S)+4,k=F(_,{x:y[0]-1,y:y[1]-Z/2,width:2,height:Z});if(k)return{type:"rect",shape:k,style:{fill:it}}}function V(_){return typeof _=="object"&&_!==null&&"rowIndex"in _}function Y(_,S){var D;const A=_;if(!V(A.data))return"";const y=f.value[A.data.rowIndex];if(!y)return"";if(A.seriesName===Ce){const G=A.data.value[1];return`${y.name}<br/>cut @ <strong>${S(G)}</strong>`}const Z=S(y.end-(y.start??0)),k=`${S(y.start??0)} – ${S(y.end)}`,N=y.group?`${y.group} · `:"",L=(D=y.cuts)!=null&&D.length?`${y.cuts.length} cuts: ${y.cuts.map(G=>S(G)).join(", ")}`:"no cuts";return`<strong>${y.name}</strong><br/>${N}${Z} (${k})<br/>${L}`}const m=b.computed(()=>{var L;if(!f.value.length)return null;const _=d.value,S=R.value||1,A=D=>U(D,_,S),y=I.value.map(D=>({name:D||"videos",type:"custom",renderItem:j,itemStyle:{color:q(D)},encode:{x:[1,2],y:0},data:f.value.map((G,ce)=>({value:[ce,G.start??0,G.end],rowIndex:ce})).filter(G=>(f.value[G.rowIndex].group??"")===D)})),Z=f.value.flatMap((D,G)=>(D.cuts??[]).map(ce=>({value:[G,ce],rowIndex:G}))),k={name:Ce,type:"custom",renderItem:te,itemStyle:{color:it},encode:{x:1,y:0},z:10,data:Z},N=typeof((L=l.options)==null?void 0:L.title)=="string"?l.options.title:"";return{animationDurationUpdate:0,backgroundColor:"transparent",title:N?{text:N,left:0,top:0,textStyle:{fontSize:14}}:void 0,legend:{top:0,left:"center",data:[...y.map(D=>D.name),Ce]},tooltip:{trigger:"item",textStyle:{fontSize:12},formatter:D=>Y(D,A)},grid:{left:8,right:16,top:32,bottom:h?44:24,containLabel:!0},xAxis:{type:"value",min:0,max:S,axisLabel:{fontSize:10,formatter:A}},yAxis:{type:"category",inverse:!0,data:f.value.map(D=>D.name),axisLabel:{fontSize:10,width:180,overflow:"truncate"}},dataZoom:h?[{type:"inside",xAxisIndex:0},{type:"slider",xAxisIndex:0,height:16,bottom:8,labelFormatter:A}]:void 0,series:[...y,k]}});function g(_){var y;const S=_;if(!V(S.data))return;const A=(y=f.value[S.data.rowIndex])==null?void 0:y.click;A&&u("row-click",A)}function C(){l.data!==void 0?M(l.data):x()}return e({refresh:C}),(_,S)=>(b.openBlock(),b.createBlock(xt._sfc_main,{loading:!f.value.length&&w.value,error:E.value},{skeleton:b.withCtx(()=>[b.createElementVNode("div",{class:"reportifact-chart-skeleton",style:b.normalizeStyle({"--reportifact-chart-height":O.value})},[...S[0]||(S[0]=[b.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"200px",height:"24px","margin-bottom":"16px"}},null,-1),b.createElementVNode("div",{class:"reportifact-skeleton-line reportifact-chart-skeleton-body"},null,-1)])],4)]),default:b.withCtx(()=>[b.createElementVNode("div",{class:"reportifact-timeline-container",style:b.normalizeStyle({"--reportifact-chart-height":O.value})},[b.createElementVNode("div",Gr,[(b.openBlock(),b.createElementBlock(b.Fragment,null,b.renderList(o,A=>b.createElementVNode("button",{key:A.value,type:"button",class:b.normalizeClass(["reportifact-timeline-mode",{"is-active":d.value===A.value}]),onClick:y=>d.value=A.value},b.toDisplayString(A.label),11,Ir)),64))]),m.value?(b.openBlock(),b.createBlock(b.unref(s.src_default),{key:0,option:m.value,theme:i.value?"dark":void 0,autoresize:!0,class:"reportifact-chart",onClick:g},null,8,["option","theme"])):b.createCommentVNode("",!0)],4)]),_:1},8,["loading","error"]))}});exports._sfc_main=Xr;
|