infobae-charts 0.0.7 → 0.0.8
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/dist/components/StackedBarChart/index.d.ts.map +1 -1
- package/dist/components/StackedBarChart/types.d.ts +3 -0
- package/dist/components/StackedBarChart/types.d.ts.map +1 -1
- package/dist/components/TestComponent/index.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +11 -10
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StackedBarChart/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StackedBarChart/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,eAAe,GAAI,mBAAwB,oBAAoB,gCAuC3E,CAAC"}
|
|
@@ -11,12 +11,15 @@ export interface Metadata {
|
|
|
11
11
|
title?: string | undefined;
|
|
12
12
|
description?: string | undefined;
|
|
13
13
|
source?: string | undefined;
|
|
14
|
+
image?: string | undefined;
|
|
14
15
|
}
|
|
15
16
|
export interface Settings {
|
|
16
17
|
showTitle?: boolean;
|
|
17
18
|
showDescription?: boolean;
|
|
18
19
|
showImage?: boolean;
|
|
19
20
|
showLegend?: boolean;
|
|
21
|
+
showChart?: boolean;
|
|
22
|
+
showSource?: boolean;
|
|
20
23
|
}
|
|
21
24
|
export interface SerieItem {
|
|
22
25
|
key?: string | number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/StackedBarChart/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CACxC;AAED,KAAK,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;AAEvD,MAAM,WAAW,IAAI;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/StackedBarChart/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CACxC;AAED,KAAK,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;AAEvD,MAAM,WAAW,IAAI;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TestComponent/index.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TestComponent/index.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,aAAa,gCA6KpC"}
|
package/dist/index.cjs
CHANGED
|
@@ -22,4 +22,4 @@ echarts.use([`+c+`]);`:`Unknown series `+s))}return}if(t===`tooltip`){if(f){proc
|
|
|
22
22
|
|
|
23
23
|
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=yu(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=UA([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new hy;h.marker=g.makeTooltipMarker(`item`,Xh(h.color),d);var _=gv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?oy(y?P({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=yu(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(W(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=M(a),a.content=ft(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=UA(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new hy;this._showOrMove(d,function(){var n=M(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(W(u)){var p=e.ecModel.get(`useUTC`),m=H(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=wh(m.axisValue,d,p)),d=Jh(d,n,!0)}else if(U(u)){var g=V(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||H(t))return{color:r||i};if(!H(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),U(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),H(t))n=oo(t[0],s),r=oo(t[1],c);else if(G(t)){var p=t;p.width=l[0],p.height=l[1];var m=ug(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(W(t)&&o){var h=qA(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=GA(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=JA(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=JA(d)?l[1]/2:d===`bottom`?l[1]:0),bA(e)){var h=KA(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){l.node||!t.getDom()||(Wy(this,`_updatePosition`),this._tooltipContent.dispose(),Wk(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(ky);function UA(e,t,n){var r=t.ecModel,i;n?(i=new Lm(n,r,r),i=new Lm(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Lm&&(o=o.get(`tooltip`,!0)),W(o)&&(o={formatter:o}),o&&(i=new Lm(o,i,r)))}return i}function WA(e,t){return e.dispatchAction||V(t.dispatchAction,t)}function GA(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function KA(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function qA(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function JA(e){return e===`center`||e===`middle`}function YA(e,t,n){var r=ms(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=gs(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=yu(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function XA(e){AE(aA),e.registerComponentModel(yA),e.registerComponentView(HA),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Me),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Me)}function ZA(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=pv(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(pv(e,t,n[o]));return a.join(` `)}}function QA(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!H(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}function $A(e,t){return e.type===t}function ej(e,t,n,r,i){var a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);var d=new eu({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=U(i)?function(e){i(e,d)}:null;up(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function tj(e,t,n){var r=e.getArea(),i=uo(r.r0,1),a=uo(r.r,1),o=new Df({shape:{cx:uo(e.cx,1),cy:uo(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,up(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function nj(e,t,n,r,i){return e?e.type===`polar`?tj(e,t,n):e.type===`cartesian2d`?ej(e,t,n,r,i):null:null}var rj={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},ij=function(e){return Math.round(e.length/2)};function aj(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;W(i)?p=rj[i]:U(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,ij))}}}}}var oj=As(),sj=`__ec_stack_`;function cj(e){return e.get(`stack`)||sj+e.seriesIndex}function lj(e,t){var n=uj(e,t);return n.columnMap=dj(n),n}function uj(e,t){var n=hA(t,wD),r=[],i=eD(e,{fromStat:{key:n},min:1});return GT(e,n,function(e){r.push({barWidth:oo(e.get(`barWidth`),i.w),barMaxWidth:oo(e.get(`barMaxWidth`),i.w),barMinWidth:oo(e.get(`barMinWidth`)||(mj(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:cj(e)})}),{bandWidthResult:i,seriesInfo:r}}function dj(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};L(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;je(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=Ya(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=X(35-o.length*4,15)+`%`;var c=oo(i,t),l=oo(a,1),u=(n-c)/(r+(r-1)*l);u=X(u,0),L(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=Ya(o,i)),a&&(o=X(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=Ya(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=X(u,0);var d=0,f;L(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return L(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function fj(e){return{seriesType:e,overallReset:function(t){var n=hA(e,wD);qT(t,n,function(t){process.env.NODE_ENV!==`production`&&q(t instanceof zD);var r=lj(t,e);GT(t,n,function(e){var t=r.columnMap[cj(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function pj(e){return{seriesType:e,plan:Ay(),reset:function(e){if(xO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=dw(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(vA(i))),p=mj(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&lA(r*3),c=p&&s&&lA(r*3),l=p&&lA(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,Xa(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,Xa(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function mj(e){return e.pipelineContext&&e.pipelineContext.large}function hj(e){return mA(hA(e,wD))}function gj(e){oj(e,function(){function t(t){var n=hA(t,wD);_A(e,n,t,wD),gE(n,hj(t))}t(`bar`),t(`pictorialBar`)})}var _j=function(e){s(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return hw(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)L(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(by);by.registerClass(_j);var vj=function(e){s(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return hw(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Is(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Hm(_j.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:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(_j),yj=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),bj=function(e){s(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new yj},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(Bl);function xj(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return _a(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+Cj(m,s+_,!1),x=u+p*y(m)+wj(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+Cj(m,-s+_,!1),x=u+p*y(m)+wj(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+Cj(h,s+_,!0),x=u+p*y(h)+wj(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+Cj(h,-s+_,!0),x=u+p*y(h)+wj(h,-s+_,!0),S=`right`,C=`middle`;break;default:return _a(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function Sj(e,t,n,r){if(ue(r)){e.setTextConfig({rotation:r});return}if(H(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function Cj(e,t,n){return t*Math.sin(e)*(n?-1:1)}function wj(e,t,n){return t*Math.cos(e)*(n?1:-1)}function Tj(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;H(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:R(r,function(e){return ga(e,i)})}}var Ej=Math.max,Dj=Math.min,Oj=function(e){s(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);i===`cartesian2d`||i===`polar`?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r)):process.env.NODE_ENV!==`production`&&Io(`Only cartesian2d and polar supported for bar.`)},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Zp(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=jj(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=Lj[s.type](a,e);if(!t)return null;var n=Jj(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=Lj[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!Ij[s.type](r)))){var o=!1;f&&(o=kj[s.type](p,r));var g=Aj[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),Bj(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?Mj(d,u,g,r,t,l,!1,!1):up(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=Lj[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=Lj[s.type](a,t),E=qj(l,T,s);lp(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Ij[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=kj[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&mp(D,e,n),D=null),D?hp(D):D=Aj[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=wm(k);A.prevValue!=null&&(A.prevValue=A.value)}}else Bj(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?Mj(d,u,D,C,t,l,!0,x):lp(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&mp(n,e,t)}).execute();var C=this._backgroundGroup||=new Fa;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),Wj(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),Wj(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&nj(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:R(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){mp(t,e,yu(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(Ny),kj={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=Ej(t.x,e.x),s=Dj(t.x+t.width,i),c=Ej(t.y,e.y),l=Dj(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Dj(t.r,e.r),a=Ej(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},Aj={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new eu({shape:P({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?bj:Df,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=xj(zj(i),{isRoundCap:l===bj}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?lp:up)(u,{shape:p},a)}return u}};function jj(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(process.env.NODE_ENV!==`production`&&n&&(r.type!==`category`&&Io("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!==`cartesian2d`&&Io("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function Mj(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?lp:up)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?lp:up)(n,{shape:l},u,i)}function Nj(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var Pj=[`x`,`y`,`width`,`height`],Fj=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Ij={cartesian2d:function(e){return!Nj(e,Pj)},polar:function(e){return!Nj(e,Fj)}},Lj={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Vj(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function Rj(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function zj(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function Bj(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;P(u,Tj(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?Yj(i,a.coordinateSystem):Xj(i,a.coordinateSystem),p=mm(r);pm(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:ZA(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,Sj(e,h===`outside`?f:h,zj(o),r.get([`label`,`rotate`]))}Tm(m,p,a.getRawValue(n),function(e){return QA(t,e)});var g=r.getModel([`emphasis`]);Dd(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),jd(e,r),Rj(i)&&(e.style.fill=`none`,e.style.stroke=`none`,L(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Vj(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var Hj=function(){function e(){}return e}(),Uj=function(e){s(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new Hj},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(Bl);function Wj(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?Fs(e):0;if(l){var d=new Uj({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new Uj({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,yu(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,Gj),f.on(`mousemove`,Gj)),n&&n.push(f)}var Gj=Hy(function(e){var t=this,n=Kj(t,e.offsetX,e.offsetY);yu(t).dataIndex=n>=0?n:null},30,!1);function Kj(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function qj(e,t,n){if($A(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function Jj(e,t,n){return new(e.type===`polar`?Df:eu)({shape:qj(t,n,e),silent:!0,z2:0})}function Yj(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function Xj(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function Zj(e){e.registerChartView(Oj),e.registerSeriesModel(vj),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,fj(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,pj(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,aj(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),gj(e)}var Qj=Math.sin,$j=Math.cos,eM=Math.PI,tM=Math.PI*2,nM=180/eM,rM=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Nr(u-tM)||(l?c>=tM:-c>=tM),f=c>0?c%tM:c%tM+tM,p=!1;p=d?!0:!Nr(u)&&f>=eM==!!l;var m=e+n*$j(a),h=t+r*Qj(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*nM);if(d){var _=1/this._p,v=(l?1:-1)*(tM-_);this._add(`A`,n,r,g,1,+l,e+n*$j(a+v),t+r*Qj(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*$j(o),b=t+r*Qj(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),iM=`none`,aM=Math.round;function oM(e){var t=e.fill;return t!=null&&t!==iM}function sM(e){var t=e.stroke;return t!=null&&t!==iM}var cM=[`lineCap`,`miterLimit`,`lineJoin`],lM=R(cM,function(e){return`stroke-`+e.toLowerCase()});function uM(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Kl){e(`opacity`,i);return}if(oM(t)){var a=jr(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,iM);if(sM(t)){var s=jr(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=sx(n),p=f[0],m=f[1];p&&(m=aM(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,iM);for(var h=0;h<cM.length;h++){var g=cM[h];if(r||t[g]!==Ll[g]){var _=t[g]||Ll[g];_&&e(lM[h],_)}}}else r&&e(`stroke`,iM)}var dM=`http://www.w3.org/2000/svg`,fM=`http://www.w3.org/1999/xlink`,pM=`http://www.w3.org/2000/xmlns/`,mM=`http://www.w3.org/XML/1998/namespace`,hM=`ecmeta_`;function gM(e){return document.createElementNS(dM,e)}function _M(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function vM(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function yM(e){return`</`+e+`>`}function bM(e,t){t||={};var n=t.newline?`
|
|
24
24
|
`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return vM(i,a)+(i===`style`?o||``:ft(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+yM(i)}return r(e)}function xM(e,t,n){n||={};var r=n.newline?`
|
|
25
|
-
`:``,i=` {`+r,a=r+`}`,o=R(B(e),function(t){return t+i+R(B(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(B(t),function(e){return`@keyframes `+e+i+R(B(t[e]),function(n){return n+i+R(B(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function SM(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function CM(e,t,n,r){return _M(`svg`,`root`,{width:e,height:t,xmlns:dM,"xmlns:xlink":fM,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var wM=0;function TM(){return wM++}var EM={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},DM=`transform-origin`;function OM(e,t,n){var r=P({},e.shape);P(r,t),e.buildPath(n,r);var i=new rM;return i.reset(Jr(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function kM(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[DM]=n+`px `+r+`px`)}var AM={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function jM(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function MM(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=SM(n.zrId);t.animation=!0,PM(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=B(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=jM(i,n);return a.replace(o,s)}}function NM(e){return W(e)?EM[e]?`cubic-bezier(`+EM[e]+`)`:ir(e)?e:``:``}function PM(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Gf){var s=MM(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=NM(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=NM(d.easing),m=d.rawValue;(W(m)||ue(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};ra(g,e),P(g,s[h]);var _=Yr(g),v=s[h][u];l[h]=_?{transform:_}:{},kM(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new hl);var S=y.len();y.reset(),l[h].d=OM(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return AM[e]})}for(var w=B(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][DM]!==l[O][DM]){T=!1;break}E=l[D][DM]}if(T&&E){for(var h in l)l[h][DM]&&delete l[h][DM];t[DM]=E}if(oe(w,function(e){return B(l[e]).length>0}).length)return jM(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+TM();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function FM(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};IM(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=kr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),IM(r,t,n,!0)}}}function IM(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+TM(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var LM=Math.round;function RM(e){return e&&W(e.src)}function zM(e){return e&&U(e.toDataURL)}function BM(e,t,n,r){uM(function(i,a){var o=i===`fill`||i===`stroke`;o&&Kr(a)?tN(t,e,i,r):o&&Ur(a)?nN(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),eN(n,e,r)}function VM(e,t){var n=Wa(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[hM+`silent`]=`true`))}function HM(e){return Nr(e[0]-1)&&Nr(e[1])&&Nr(e[2])&&Nr(e[3]-1)}function UM(e){return Nr(e[4])&&Nr(e[5])}function WM(e,t,n){if(t&&!(UM(t)&&HM(t))){var r=n?10:1e4;e.transform=HM(t)?`translate(`+LM(t[4]*r)/r+` `+LM(t[5]*r)/r+`)`:Ir(t)}}function GM(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(LM(r[a][0]*n)/n),i.push(LM(r[a][1]*n)/n);t.points=i.join(` `)}function KM(e){return!e.smooth}function qM(e){var t=R(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=LM(o*r)/r)}}}var JM={circle:[qM([`cx`,`cy`,`r`])],polyline:[GM,KM],polygon:[GM,KM]};function YM(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function XM(e,t){var n=e.style,r=e.shape,i=JM[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&Jr(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&YM(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new rM,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return WM(a,e.transform),BM(a,n,e,t),VM(a,e),t.animation&&PM(e,a,t),t.emphasis&&FM(e,a,t),_M(s,e.id+``,a)}function ZM(e,t){var n=e.style,r=n.image;if(r&&!W(r)&&(RM(r)?r=r.src:zM(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),WM(c,e.transform),BM(c,n,e,t),VM(c,e),t.animation&&PM(e,c,t),_M(`image`,e.id+``,c)}}function QM(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Rr(n.y||0,ha(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Lr[n.textAlign]||n.textAlign};if(du(n)){var c=``,l=n.fontStyle,u=lu(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),WM(s,e.transform),BM(s,n,e,t),VM(s,e),t.animation&&PM(e,s,t),_M(`text`,e.id+``,s,void 0,r)}}function $M(e,t){if(e instanceof Bl)return XM(e,t);if(e instanceof Kl)return ZM(e,t);if(e instanceof Hl)return QM(e,t)}function eN(e,t,n){var r=e.style;if(zr(r)){var i=Br(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=jr(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=_M(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[_M(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=qr(o)}}function tN(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(Wr(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Gr(i))a=`radialGradient`,o.cx=K(i.x,.5),o.cy=K(i.y,.5),o.r=K(i.r,.5);else{process.env.NODE_ENV!==`production`&&ee(`Illegal gradient type.`);return}for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=Fr(s[l].offset)*100+`%`,f=s[l].color,p=jr(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(_M(`stop`,l+``,g))}var _=bM(_M(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=_M(a,y,o,c)),t[n]=qr(y)}function nN(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(Vr(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(W(h)?m=h:RM(h)?m=h.src:zM(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;q(f,g),q(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rc(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=_M(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Yr(i);x&&(o.patternTransform=x);var S=_M(`pattern`,``,o,[d]),C=bM(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=_M(`pattern`,T,o,[d])),t[n]=qr(T)}}function rN(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=_M(`clipPath`,a,o,[XM(e,n)])}t[`clip-path`]=qr(a)}function iN(e){return document.createTextNode(e)}function aN(e,t,n){e.insertBefore(t,n)}function oN(e,t){e.removeChild(t)}function sN(e,t){e.appendChild(t)}function cN(e){return e.parentNode}function lN(e){return e.nextSibling}function uN(e,t){e.textContent=t}var dN=58,fN=120,pN=_M(``,``);function mN(e){return e===void 0}function hN(e){return e!==void 0}function gN(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!==`production`&&r[a]!=null&&console.error(`Duplicate key `+a),r[a]=i)}return r}function _N(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function vN(e){var t,n=e.children,r=e.tag;if(hN(r)){var i=e.elm=gM(r);if(xN(pN,e),H(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&sN(i,vN(a))}else hN(e.text)&&!G(e.text)&&sN(i,iN(e.text))}else e.elm=iN(e.text);return e.elm}function yN(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&aN(e,vN(a),t)}}function bN(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(hN(i.tag)?oN(cN(i.elm),i.elm):oN(e,i.elm))}}function xN(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===fN?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(pM,n,o):n.charCodeAt(3)===dN?r.setAttributeNS(mM,n,o):n.charCodeAt(5)===dN?r.setAttributeNS(fM,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function SN(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:_N(o,l)?(CN(o,l),o=t[++r],l=n[++i]):_N(s,u)?(CN(s,u),s=t[--a],u=n[--c]):_N(o,u)?(CN(o,u),aN(e,o.elm,lN(s.elm)),o=t[++r],u=n[--c]):_N(s,l)?(CN(s,l),aN(e,s.elm,o.elm),s=t[--a],l=n[++i]):(mN(d)&&(d=gN(t,r,a)),f=d[l.key],mN(f)?aN(e,vN(l),o.elm):(p=t[f],p.tag===l.tag?(CN(p,l),t[f]=void 0,aN(e,p.elm,o.elm)):aN(e,vN(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,yN(e,m,n,i,c)):bN(e,t,r,a))}function CN(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(xN(e,t),mN(t.text)?hN(r)&&hN(i)?r!==i&&SN(n,r,i):hN(i)?(hN(e.text)&&uN(n,``),yN(n,null,i,0,i.length-1)):hN(r)?bN(n,r,0,r.length-1):hN(e.text)&&uN(n,``):e.text!==t.text&&(hN(r)&&bN(n,r,0,r.length-1),uN(n,t.text)))}function wN(e,t){if(_N(e,t))CN(e,t);else{var n=e.elm,r=cN(n);vN(t),r!==null&&(aN(r,t.elm,lN(n)),bN(r,[e],0,0))}return t}var TN=0,EN=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=DN(`configLayer`),this.storage=t,this._opts=n=P({},n),this.root=e,this._id=`zr`+TN++,this._oldVNode=CM(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=gM(`svg`);xN(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,wN(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return $M(e,SM(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=SM(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=ON(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=_M(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(B(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(_M(`defs`,`defs`,{},c)),e.animation){var l=xM(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=_M(`style`,`stl`,{},[],l);a.push(u)}}return CM(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},bM(this.renderToVNode({animation:K(e.cssAnimation,!0),emphasis:K(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:K(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};rN(d[g],_,t);var v=_M(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=$M(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=ax(r,0,n),t=ax(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(Ur(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=Xr(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function DN(e){return function(){process.env.NODE_ENV!==`production`&&ee(`In SVG mode painter not support method "`+e+`"`)}}function ON(e,t,n,r){var i;if(n&&n!==`none`){if(i=_M(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),Kr(n))tN({fill:n},i.attrs,`fill`,r);else if(Ur(n))nN({style:{fill:n},dirty:Me,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=jr(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function kN(e){e.registerPainter(`svg`,EN)}var AN=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},jN=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},MN=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:100},barMaxWidth:30,emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}}}}),u=jN({visualization:e,data:t}),d=AN({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})};AE([oA,XA,Zj,kN]);var NN=({visualization:e={},data:t={},showLegend:i=!0})=>{let a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=MN({visualization:e,data:t}),c=jN({visualization:e,data:t}),{series:l=[]}=e||{};return(0,r.useEffect)(()=>{if(!a.current)return;o.current||=sC(a.current,void 0,{renderer:`svg`});let e=s.reduce((e,t)=>{let n=t.data.map(e=>typeof e==`number`?e:e.value),r=Math.max(...n);return r>e?r:e},0),t=Array.from({length:s.length}).map((t,n)=>({color:`var(--gray-15)`,data:s[n].data.map(t=>typeof t==`number`?e-t:e-t.value),stack:Number(n+1),type:`bar`,itemStyle:{borderRadius:[100,100,0,0]},barMaxWidth:30,silent:!0})),n=[...s,...t],r={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},xAxis:{type:`category`,data:c,axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:n};o.current.setOption(r);let i=new ResizeObserver(()=>{o.current?.resize()});return i.observe(a.current),()=>{i.disconnect(),o.current?.dispose(),o.current=null}},[s,c]),(0,n.jsxs)(`div`,{className:`stacked-bar-chart-ctn`,children:[(()=>{if(!i||!l.length)return null;let e=l.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`stacked-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`stacked-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`stacked-bar-chart-label-text`,children:e})]},`stacked-bar-chart-label-${e}-${t}-${r}`));return(0,n.jsx)(`div`,{className:`stacked-bar-chart-labels`,children:e})})(),(0,n.jsx)(`div`,{ref:a,className:`bars-stacked-bar-chart`,style:{width:`100%`,aspectRatio:`1242 / 478`}})]})},PN=({data:e={}})=>{let{data:t={},metadata:{title:r=``,description:i=``,source:o=``}={},visualization:s={},visualization:{settings:{showTitle:c=!0,showDescription:l=!0,showImage:u=!0,showLegend:d=!0}={}}={}}=e||{};return(0,n.jsxs)(`div`,{className:`stacked-bar-chart`,children:[(0,n.jsx)(a,{title:r,showTitle:c,subtitle:i,showSubtitle:l,showLogo:u}),(0,n.jsx)(NN,{data:t,visualization:s,showLegend:d}),o?(0,n.jsxs)(`p`,{className:`stacked-bar-chart-font`,children:[`Fuente: `,(0,n.jsx)(`span`,{children:o})]}):null]})};exports.StackedBarChart=PN,exports.Title=a;
|
|
25
|
+
`:``,i=` {`+r,a=r+`}`,o=R(B(e),function(t){return t+i+R(B(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(B(t),function(e){return`@keyframes `+e+i+R(B(t[e]),function(n){return n+i+R(B(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function SM(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function CM(e,t,n,r){return _M(`svg`,`root`,{width:e,height:t,xmlns:dM,"xmlns:xlink":fM,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var wM=0;function TM(){return wM++}var EM={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},DM=`transform-origin`;function OM(e,t,n){var r=P({},e.shape);P(r,t),e.buildPath(n,r);var i=new rM;return i.reset(Jr(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function kM(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[DM]=n+`px `+r+`px`)}var AM={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function jM(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function MM(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=SM(n.zrId);t.animation=!0,PM(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=B(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=jM(i,n);return a.replace(o,s)}}function NM(e){return W(e)?EM[e]?`cubic-bezier(`+EM[e]+`)`:ir(e)?e:``:``}function PM(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Gf){var s=MM(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=NM(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=NM(d.easing),m=d.rawValue;(W(m)||ue(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};ra(g,e),P(g,s[h]);var _=Yr(g),v=s[h][u];l[h]=_?{transform:_}:{},kM(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new hl);var S=y.len();y.reset(),l[h].d=OM(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return AM[e]})}for(var w=B(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][DM]!==l[O][DM]){T=!1;break}E=l[D][DM]}if(T&&E){for(var h in l)l[h][DM]&&delete l[h][DM];t[DM]=E}if(oe(w,function(e){return B(l[e]).length>0}).length)return jM(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+TM();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function FM(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};IM(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=kr(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),IM(r,t,n,!0)}}}function IM(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+TM(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var LM=Math.round;function RM(e){return e&&W(e.src)}function zM(e){return e&&U(e.toDataURL)}function BM(e,t,n,r){uM(function(i,a){var o=i===`fill`||i===`stroke`;o&&Kr(a)?tN(t,e,i,r):o&&Ur(a)?nN(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),eN(n,e,r)}function VM(e,t){var n=Wa(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[hM+`silent`]=`true`))}function HM(e){return Nr(e[0]-1)&&Nr(e[1])&&Nr(e[2])&&Nr(e[3]-1)}function UM(e){return Nr(e[4])&&Nr(e[5])}function WM(e,t,n){if(t&&!(UM(t)&&HM(t))){var r=n?10:1e4;e.transform=HM(t)?`translate(`+LM(t[4]*r)/r+` `+LM(t[5]*r)/r+`)`:Ir(t)}}function GM(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(LM(r[a][0]*n)/n),i.push(LM(r[a][1]*n)/n);t.points=i.join(` `)}function KM(e){return!e.smooth}function qM(e){var t=R(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=LM(o*r)/r)}}}var JM={circle:[qM([`cx`,`cy`,`r`])],polyline:[GM,KM],polygon:[GM,KM]};function YM(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function XM(e,t){var n=e.style,r=e.shape,i=JM[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&Jr(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&YM(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new rM,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return WM(a,e.transform),BM(a,n,e,t),VM(a,e),t.animation&&PM(e,a,t),t.emphasis&&FM(e,a,t),_M(s,e.id+``,a)}function ZM(e,t){var n=e.style,r=n.image;if(r&&!W(r)&&(RM(r)?r=r.src:zM(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),WM(c,e.transform),BM(c,n,e,t),VM(c,e),t.animation&&PM(e,c,t),_M(`image`,e.id+``,c)}}function QM(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Rr(n.y||0,ha(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Lr[n.textAlign]||n.textAlign};if(du(n)){var c=``,l=n.fontStyle,u=lu(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),WM(s,e.transform),BM(s,n,e,t),VM(s,e),t.animation&&PM(e,s,t),_M(`text`,e.id+``,s,void 0,r)}}function $M(e,t){if(e instanceof Bl)return XM(e,t);if(e instanceof Kl)return ZM(e,t);if(e instanceof Hl)return QM(e,t)}function eN(e,t,n){var r=e.style;if(zr(r)){var i=Br(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=jr(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=_M(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[_M(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=qr(o)}}function tN(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(Wr(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Gr(i))a=`radialGradient`,o.cx=K(i.x,.5),o.cy=K(i.y,.5),o.r=K(i.r,.5);else{process.env.NODE_ENV!==`production`&&ee(`Illegal gradient type.`);return}for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=Fr(s[l].offset)*100+`%`,f=s[l].color,p=jr(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(_M(`stop`,l+``,g))}var _=bM(_M(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=_M(a,y,o,c)),t[n]=qr(y)}function nN(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(Vr(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(W(h)?m=h:RM(h)?m=h.src:zM(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;q(f,g),q(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rc(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=_M(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Yr(i);x&&(o.patternTransform=x);var S=_M(`pattern`,``,o,[d]),C=bM(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=_M(`pattern`,T,o,[d])),t[n]=qr(T)}}function rN(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=_M(`clipPath`,a,o,[XM(e,n)])}t[`clip-path`]=qr(a)}function iN(e){return document.createTextNode(e)}function aN(e,t,n){e.insertBefore(t,n)}function oN(e,t){e.removeChild(t)}function sN(e,t){e.appendChild(t)}function cN(e){return e.parentNode}function lN(e){return e.nextSibling}function uN(e,t){e.textContent=t}var dN=58,fN=120,pN=_M(``,``);function mN(e){return e===void 0}function hN(e){return e!==void 0}function gN(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!==`production`&&r[a]!=null&&console.error(`Duplicate key `+a),r[a]=i)}return r}function _N(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function vN(e){var t,n=e.children,r=e.tag;if(hN(r)){var i=e.elm=gM(r);if(xN(pN,e),H(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&sN(i,vN(a))}else hN(e.text)&&!G(e.text)&&sN(i,iN(e.text))}else e.elm=iN(e.text);return e.elm}function yN(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&aN(e,vN(a),t)}}function bN(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(hN(i.tag)?oN(cN(i.elm),i.elm):oN(e,i.elm))}}function xN(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===fN?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(pM,n,o):n.charCodeAt(3)===dN?r.setAttributeNS(mM,n,o):n.charCodeAt(5)===dN?r.setAttributeNS(fM,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function SN(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:_N(o,l)?(CN(o,l),o=t[++r],l=n[++i]):_N(s,u)?(CN(s,u),s=t[--a],u=n[--c]):_N(o,u)?(CN(o,u),aN(e,o.elm,lN(s.elm)),o=t[++r],u=n[--c]):_N(s,l)?(CN(s,l),aN(e,s.elm,o.elm),s=t[--a],l=n[++i]):(mN(d)&&(d=gN(t,r,a)),f=d[l.key],mN(f)?aN(e,vN(l),o.elm):(p=t[f],p.tag===l.tag?(CN(p,l),t[f]=void 0,aN(e,p.elm,o.elm)):aN(e,vN(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,yN(e,m,n,i,c)):bN(e,t,r,a))}function CN(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(xN(e,t),mN(t.text)?hN(r)&&hN(i)?r!==i&&SN(n,r,i):hN(i)?(hN(e.text)&&uN(n,``),yN(n,null,i,0,i.length-1)):hN(r)?bN(n,r,0,r.length-1):hN(e.text)&&uN(n,``):e.text!==t.text&&(hN(r)&&bN(n,r,0,r.length-1),uN(n,t.text)))}function wN(e,t){if(_N(e,t))CN(e,t);else{var n=e.elm,r=cN(n);vN(t),r!==null&&(aN(r,t.elm,lN(n)),bN(r,[e],0,0))}return t}var TN=0,EN=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=DN(`configLayer`),this.storage=t,this._opts=n=P({},n),this.root=e,this._id=`zr`+TN++,this._oldVNode=CM(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=gM(`svg`);xN(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,wN(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return $M(e,SM(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=SM(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=ON(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=_M(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(B(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(_M(`defs`,`defs`,{},c)),e.animation){var l=xM(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=_M(`style`,`stl`,{},[],l);a.push(u)}}return CM(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},bM(this.renderToVNode({animation:K(e.cssAnimation,!0),emphasis:K(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:K(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};rN(d[g],_,t);var v=_M(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=$M(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=ax(r,0,n),t=ax(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(Ur(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=Xr(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function DN(e){return function(){process.env.NODE_ENV!==`production`&&ee(`In SVG mode painter not support method "`+e+`"`)}}function ON(e,t,n,r){var i;if(n&&n!==`none`){if(i=_M(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),Kr(n))tN({fill:n},i.attrs,`fill`,r);else if(Ur(n))nN({style:{fill:n},dirty:Me,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=jr(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function kN(e){e.registerPainter(`svg`,EN)}var AN=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},jN=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},MN=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:100},barMaxWidth:30,emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}}}}),u=jN({visualization:e,data:t}),d=AN({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})};AE([oA,XA,Zj,kN]);var NN=({visualization:e={},data:t={},showLegend:i=!0})=>{let a=(0,r.useRef)(null),o=(0,r.useRef)(null),s=MN({visualization:e,data:t}),c=jN({visualization:e,data:t}),{series:l=[]}=e||{};return(0,r.useEffect)(()=>{if(!a.current)return;o.current||=sC(a.current,void 0,{renderer:`svg`});let e=s.reduce((e,t)=>{let n=t.data.map(e=>typeof e==`number`?e:e.value),r=Math.max(...n);return r>e?r:e},0),t=Array.from({length:s.length}).map((t,n)=>({color:`var(--gray-15)`,data:s[n].data.map(t=>typeof t==`number`?e-t:e-t.value),stack:Number(n+1),type:`bar`,itemStyle:{borderRadius:[100,100,0,0]},barMaxWidth:30,silent:!0})),n=[...s,...t],r={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},xAxis:{type:`category`,data:c,axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:n};o.current.setOption(r);let i=new ResizeObserver(()=>{o.current?.resize()});return i.observe(a.current),()=>{i.disconnect(),o.current?.dispose(),o.current=null}},[s,c]),(0,n.jsxs)(`div`,{className:`stacked-bar-chart-ctn`,children:[(()=>{if(!i||!l.length)return null;let e=l.map(({key:e,color:t},r)=>(0,n.jsxs)(`div`,{className:`stacked-bar-chart-label`,children:[(0,n.jsx)(`div`,{className:`stacked-bar-chart-label-icon`,style:{background:t||``}}),(0,n.jsx)(`p`,{className:`stacked-bar-chart-label-text`,children:e})]},`stacked-bar-chart-label-${e}-${t}-${r}`));return(0,n.jsx)(`div`,{className:`stacked-bar-chart-labels`,children:e})})(),(0,n.jsx)(`div`,{ref:a,className:`bars-stacked-bar-chart`,style:{width:`100%`,aspectRatio:`1242 / 478`}})]})},PN=({data:e={}})=>{let{data:t={},metadata:{title:r=``,description:i=``,source:o=``,image:s=``}={},visualization:c={},visualization:{settings:{showChart:l=!0,showDescription:u=!0,showImage:d=!0,showLegend:f=!0,showSource:p=!0,showTitle:m=!0}={}}={}}=e||{};return(0,n.jsxs)(`div`,{className:`stacked-bar-chart`,children:[(0,n.jsx)(a,{title:r,showTitle:m,subtitle:i,showSubtitle:u,showLogo:d,logoSrc:s}),l?(0,n.jsx)(NN,{data:t,visualization:c,showLegend:f}):null,!p||!o?null:(0,n.jsxs)(`p`,{className:`stacked-bar-chart-font`,children:[`Fuente: `,(0,n.jsx)(`span`,{children:o})]})]})};exports.StackedBarChart=PN,exports.Title=a;
|
package/dist/index.js
CHANGED
|
@@ -20995,26 +20995,27 @@ var FN = ({ visualization: i = {}, data: a = {}, showLegend: o = !0 }) => {
|
|
|
20995
20995
|
})]
|
|
20996
20996
|
});
|
|
20997
20997
|
}, IN = ({ data: n = {} }) => {
|
|
20998
|
-
let { data: r = {}, metadata: { title: i = "", description: a = "", source: o = "" } = {}, visualization:
|
|
20998
|
+
let { data: r = {}, metadata: { title: i = "", description: a = "", source: o = "", image: c = "" } = {}, visualization: l = {}, visualization: { settings: { showChart: u = !0, showDescription: d = !0, showImage: f = !0, showLegend: p = !0, showSource: m = !0, showTitle: h = !0 } = {} } = {} } = n || {};
|
|
20999
20999
|
return /* @__PURE__ */ t("div", {
|
|
21000
21000
|
className: "stacked-bar-chart",
|
|
21001
21001
|
children: [
|
|
21002
21002
|
/* @__PURE__ */ e(s, {
|
|
21003
21003
|
title: i,
|
|
21004
|
-
showTitle:
|
|
21004
|
+
showTitle: h,
|
|
21005
21005
|
subtitle: a,
|
|
21006
|
-
showSubtitle:
|
|
21007
|
-
showLogo:
|
|
21006
|
+
showSubtitle: d,
|
|
21007
|
+
showLogo: f,
|
|
21008
|
+
logoSrc: c
|
|
21008
21009
|
}),
|
|
21009
|
-
/* @__PURE__ */ e(FN, {
|
|
21010
|
+
u ? /* @__PURE__ */ e(FN, {
|
|
21010
21011
|
data: r,
|
|
21011
|
-
visualization:
|
|
21012
|
-
showLegend:
|
|
21013
|
-
}),
|
|
21014
|
-
o ? /* @__PURE__ */ t("p", {
|
|
21012
|
+
visualization: l,
|
|
21013
|
+
showLegend: p
|
|
21014
|
+
}) : null,
|
|
21015
|
+
!m || !o ? null : /* @__PURE__ */ t("p", {
|
|
21015
21016
|
className: "stacked-bar-chart-font",
|
|
21016
21017
|
children: ["Fuente: ", /* @__PURE__ */ e("span", { children: o })]
|
|
21017
|
-
})
|
|
21018
|
+
})
|
|
21018
21019
|
]
|
|
21019
21020
|
});
|
|
21020
21021
|
};
|