@undp/data-viz 2.3.3 → 2.3.5
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.js +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.js +2 -2
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.js +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +3 -3
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +1 -1
- package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
- package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
- package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
- package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +1 -1
- package/dist/{GraphEl-DDXkYObU.js → GraphEl-Bw-9MUym.js} +8 -7
- package/dist/GraphEl-Bw-9MUym.js.map +1 -0
- package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-DjElfY07.cjs} +2 -2
- package/dist/GraphEl-DjElfY07.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +2 -2
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
- package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
- package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
- package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +2 -2
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.js +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +2 -2
- package/dist/Types.d.ts +1 -0
- package/dist/Typography-Cc_iHQB-.cjs +2 -0
- package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
- package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
- package/dist/Typography-CdMGooqp.js.map +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.js +1 -1
- package/dist/index-BzNfurbO.js +378 -0
- package/dist/index-BzNfurbO.js.map +1 -0
- package/dist/index-CXobQn-E.cjs +2 -0
- package/dist/index-CXobQn-E.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/GraphEl-CWjTuiYd.cjs.map +0 -1
- package/dist/GraphEl-DDXkYObU.js.map +0 -1
- package/dist/Typography-DrJ7IOdw.cjs +0 -2
- package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
- package/dist/Typography-iR8PEgdt.js.map +0 -1
- package/dist/index-BE-lvE4c.js +0 -337
- package/dist/index-BE-lvE4c.js.map +0 -1
- package/dist/index-DlrGwLQA.cjs +0 -2
- package/dist/index-DlrGwLQA.cjs.map +0 -1
package/dist/BasicStatCard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as tt, m as et, j as r } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
-
import { R as U } from "./Typography-
|
|
2
|
+
import { R as U } from "./Typography-CdMGooqp.js";
|
|
3
3
|
import { GraphFooter as V } from "./GraphFooter.js";
|
|
4
4
|
import { GraphHeader as X } from "./GraphHeader.js";
|
|
5
5
|
import { n as Y } from "./numberFormattingFunction-14YCbkN2.js";
|
package/dist/BeeSwarmChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),p=require("react"),Ye=require("./index-DQA8q5sC.cjs"),He=require("./index-Cno4Q0YE.cjs"),ze=require("./Spinner-jTMOLuw_.cjs"),st=require("./Typography-DrJ7IOdw.cjs"),We=require("./numberFormattingFunction-02t-wJta.cjs"),Ze=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Je=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),ye=require("./Colors.cjs"),Ke=require("./Axis-Jt_tmhxS.cjs"),Qe=require("./ReferenceLine-M9aP3dj-.cjs"),rt=require("./YTicksAndGridLines-UzVC5eBM.cjs"),lt=require("./XTicksAndGridLines-CekrPykD.cjs"),_e=require("./DetailsModal-DHttOA80.cjs"),et=require("./pow-BnyPO-NX.cjs"),tt=require("./linear-CgUCbw9F.cjs"),le=require("./y-QcCbqrzx.cjs"),Pe=require("./uniqBy-O05lp2S5.cjs"),at=require("./GraphHeader.cjs"),Xe=require("./GraphContainer-B1EDxJ0S.cjs"),ct=require("./EmptyState-DX0t62iF.cjs"),ut=require("./ColorLegendWithMouseOver.cjs"),dt=require("./GraphFooter.cjs");function xt(t){const e=n.compilerRuntimeExports.c(28),{data:i,circleColors:j,showTicks:ae,width:S,height:w,colorDomain:P,topMargin:C,bottomMargin:ee,leftMargin:te,rightMargin:ce,suffix:h,prefix:A,showLabels:T,tooltip:X,onSeriesMouseOver:ue,refValues:D,selectedColor:g,startFromZero:L,radius:m,maxRadiusValue:Y,maxValue:H,minValue:z,highlightedDataPoints:ge,onSeriesMouseClick:me,resetSelectionOnDoubleClick:W,detailsOnClick:V,styles:R,classNames:a,noOfTicks:y,dimmedOpacity:de,precision:xe,customLayers:fe,hideAxisLine:ve}=t,pe=C===void 0?25:C,I=ee===void 0?10:ee,ie=te===void 0?100:te,oe=ce===void 0?40:ce,he=p.useRef(null),[ne,Z]=p.useState(void 0),[F,U]=p.useState(void 0),[u,c]=p.useState(null),[se,J]=p.useState(void 0),[K,$]=p.useState(void 0);let Q;e[0]!==I||e[1]!==ie||e[2]!==oe||e[3]!==pe?(Q={top:pe,bottom:I,left:ie,right:oe},e[0]=I,e[1]=ie,e[2]=oe,e[3]=pe,e[4]=Q):Q=e[4];const d=Q,x=S-d.left-d.right,re=w-d.top-d.bottom,q=i.filter(At).length===0?i:He.orderBy(i.filter(qt),"radius","desc");let _;e[5]!==i||e[6]!==H||e[7]!==L?(_=v.checkIfNullOrUndefined(H)?Math.max(...i.filter($t).map(Lt))<0&&!L?0:Math.max(...i.filter(Dt).map(wt)):H,e[5]=i,e[6]=H,e[7]=L,e[8]=_):_=e[8];const B=_;let G;e[9]!==i||e[10]!==z||e[11]!==L?(G=v.checkIfNullOrUndefined(z)?Math.min(...i.filter(St).map(Nt))>=0&&!L?0:Math.min(...i.filter(Ct).map(kt)):z,e[9]=i,e[10]=z,e[11]=L,e[12]=G):G=e[12];const f=G,r=i.filter(Ot).length!==i.length?et.sqrt().domain([0,v.checkIfNullOrUndefined(Y)?Math.max(...i.map(Rt).filter(Et)):Y]).range([.25,m]).nice():void 0,l=tt.linear().domain([f,B]).range([re,0]).nice(),b=l.ticks(y);p.useEffect(()=>{const s=q.map(Mt).filter(bt);le.forceSimulation(s).force("y",le.forceY(o=>l(o.position)).strength(5)).force("x",le.forceX(o=>x/2).strength(1)).force("collide",le.forceCollide(o=>r?r(o.radius||0)+1:m+1)).force("charge",le.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{c(s)}).on("end",()=>{c(s)})},[i,m,re,x,f,B,q,l,r]);const M=u?n.jsxRuntimeExports.jsx("svg",{width:`${S}px`,height:`${w}px`,viewBox:`0 0 ${S} ${w}`,direction:"ltr",ref:he,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[ae?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ke.Axis,{hideAxisLine:ve,y1:l(f<0?0:f),y2:l(f<0?0:f),x1:0-d.left,x2:x+d.right,label:ae?We.numberFormattingFunction(f<0?0:f,"NA",xe,A,h):void 0,labelPos:{x:0-d.left,y:l(f<0?0:f),dx:0,dy:B<0?"1em":-5},classNames:{axis:a?.xAxis?.axis,label:a?.yAxis?.labels},styles:{axis:R?.xAxis?.axis,label:R?.yAxis?.labels}}),n.jsxRuntimeExports.jsx(rt.YTicksAndGridLines,{values:b.filter(jt),y:b.filter(yt).map(s=>l(s)),x1:0-d.left,x2:x+d.right,styles:{gridLines:R?.yAxis?.gridLines,labels:R?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:h,prefix:A,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:xe})]}):null,fe.filter(vt).map(gt),u.map(s=>n.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${s.x},${s.y})`,opacity:g?s.color&&j[P.indexOf(s.color)]===g?1:de:ge.length!==0?ge.indexOf(s.label)!==-1?.85:de:.85,onMouseEnter:o=>{Z(s),$(o.clientY),J(o.clientX),ue?.(s)},onMouseMove:o=>{Z(s),$(o.clientY),J(o.clientX)},onClick:()=>{(me||V)&&(Ye.isEqual(F,s)&&W?(U(void 0),me?.(void 0)):(U(s),me?.(s)))},onMouseLeave:()=>{Z(void 0),J(void 0),$(void 0),ue?.(void 0)},children:[n.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:r?r(s.radius||0):m,fill:i.filter(ht).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ye.Colors.gray}),(r?r(s.radius||0):m)>10&&T?n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("foreignObject",{y:0-(r?r(s.radius||0):m),x:0-(r?r(s.radius||0):m),width:2*(r?r(s.radius||0):m),height:2*(r?r(s.radius||0):m),children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit py-0 px-1.5",children:T?n.jsxRuntimeExports.jsx("p",{className:n.mo("text-center leading-none m-0",a?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((r?r(s.radius||0):m)/4),10),Math.max(Math.round((r?r(s.radius||0):m)*12/`${s.label}`.length),10),20)}px`,hyphens:"auto",color:Je.getTextColorBasedOnBgColor(i.filter(pt).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ye.Colors.gray),...R?.graphObjectValues||{}},children:s.label}):null})})}):null]},s.label)),D?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:D.map((s,o)=>n.jsxRuntimeExports.jsx(Qe.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-d.left,x2:x+d.right,classNames:s.classNames,styles:s.styles,isInView:!0},o))}):null,fe.filter(ft).map(mt)]})}):n.jsxRuntimeExports.jsx("div",{style:{width:`${S}px`,height:`${w}px`},children:n.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:n.jsxRuntimeExports.jsx(ze.w,{})})});let N;e[13]!==a?.tooltip||e[14]!==se||e[15]!==K||e[16]!==ne||e[17]!==R?.tooltip||e[18]!==X?(N=ne&&X&&se&&K?n.jsxRuntimeExports.jsx(Ze.Tooltip,{data:ne,body:X,xPos:se,yPos:K,backgroundStyle:R?.tooltip,className:a?.tooltip}):null,e[13]=a?.tooltip,e[14]=se,e[15]=K,e[16]=ne,e[17]=R?.tooltip,e[18]=X,e[19]=N):N=e[19];let O;e[20]!==a?.modal||e[21]!==V||e[22]!==F?(O=V&&F!==void 0?n.jsxRuntimeExports.jsx(_e.DetailsModal,{body:V,data:F,setData:U,className:a?.modal}):null,e[20]=a?.modal,e[21]=V,e[22]=F,e[23]=O):O=e[23];let k;return e[24]!==M||e[25]!==N||e[26]!==O?(k=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M,N,O]}),e[24]=M,e[25]=N,e[26]=O,e[27]=k):k=e[27],k}function mt(t){return t.layer}function ft(t){return t.position==="after"}function pt(t){return t.color}function ht(t){return t.color}function gt(t){return t.layer}function vt(t){return t.position==="before"}function yt(t){return t!==0}function jt(t){return t!==0}function bt(t){return t.position}function Mt(t){return{...t,...t.data&&{data:{...t.data}}}}function Et(t){return t!=null}function Rt(t){return t.radius}function Ot(t){return t.radius===void 0||t.radius===null}function kt(t){return t.position}function Ct(t){return!v.checkIfNullOrUndefined(t.position)}function Nt(t){return t.position}function St(t){return!v.checkIfNullOrUndefined(t.position)}function wt(t){return t.position}function Dt(t){return!v.checkIfNullOrUndefined(t.position)}function Lt(t){return t.position}function $t(t){return!v.checkIfNullOrUndefined(t.position)}function qt(t){return!v.checkIfNullOrUndefined(t.radius)}function At(t){return!v.checkIfNullOrUndefined(t.radius)}function Tt(t){const e=n.compilerRuntimeExports.c(28),{data:i,circleColors:j,showTicks:ae,width:S,height:w,colorDomain:P,topMargin:C,bottomMargin:ee,leftMargin:te,rightMargin:ce,showLabels:h,tooltip:A,onSeriesMouseOver:T,refValues:X,selectedColor:ue,startFromZero:D,radius:g,maxRadiusValue:L,maxValue:m,minValue:Y,highlightedDataPoints:H,onSeriesMouseClick:z,rtl:ge,resetSelectionOnDoubleClick:me,detailsOnClick:W,suffix:V,prefix:R,styles:a,classNames:y,noOfTicks:de,dimmedOpacity:xe,precision:fe,customLayers:ve,hideAxisLine:pe}=t,I=C===void 0?25:C,ie=ee===void 0?10:ee,oe=te===void 0?10:te,he=ce===void 0?10:ce,ne=p.useRef(null),[Z,F]=p.useState(void 0),[U,u]=p.useState(void 0),[c,se]=p.useState(null),[J,K]=p.useState(void 0),[$,Q]=p.useState(void 0);let d;e[0]!==ie||e[1]!==oe||e[2]!==he||e[3]!==I?(d={top:I,bottom:ie,left:oe,right:he},e[0]=ie,e[1]=oe,e[2]=he,e[3]=I,e[4]=d):d=e[4];const x=d,re=S-x.left-x.right,q=w-x.top-x.bottom,_=i.filter(si).length===0?i:He.orderBy(i.filter(ni),"radius","desc");let B;e[5]!==i||e[6]!==m||e[7]!==D?(B=v.checkIfNullOrUndefined(m)?Math.max(...i.filter(oi).map(ii))<0&&!D?0:Math.max(...i.filter(ti).map(ei)):m,e[5]=i,e[6]=m,e[7]=D,e[8]=B):B=e[8];const G=B;let f;e[9]!==i||e[10]!==Y||e[11]!==D?(f=v.checkIfNullOrUndefined(Y)?Math.min(...i.filter(_t).map(Qt))>=0&&!D?0:Math.min(...i.filter(Kt).map(Jt)):Y,e[9]=i,e[10]=Y,e[11]=D,e[12]=f):f=e[12];const r=f,l=i.filter(Zt).length!==i.length?et.sqrt().domain([0,v.checkIfNullOrUndefined(L)?Math.max(...i.map(Wt).filter(zt)):L]).range([.25,g]).nice():void 0,b=tt.linear().domain([r,G]).range([0,re]).nice(),M=b.ticks(de);p.useEffect(()=>{const o=_.map(Ht).filter(Yt);le.forceSimulation(o).force("x",le.forceX(E=>b(E.position)).strength(5)).force("y",le.forceY(E=>q/2).strength(1)).force("collide",le.forceCollide(E=>l?l(E.radius||0)+1:g+1)).force("charge",le.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{se(o)}).on("end",()=>{se(o)})},[i,g,q,re,r,G,_,b,l]);const N=c?n.jsxRuntimeExports.jsx("svg",{width:`${S}px`,height:`${w}px`,viewBox:`0 0 ${S} ${w}`,direction:"ltr",ref:ne,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[ae?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ke.Axis,{hideAxisLine:pe,x1:b(r<0?0:r),x2:b(r<0?0:r),y1:0-x.top,y2:q+x.bottom,label:ae?We.numberFormattingFunction(r<0?0:r,"NA",fe,R,V):void 0,labelPos:{x:b(r<0?0:r),y:0-I,dy:"0.75em",dx:3},classNames:{axis:y?.xAxis?.axis,label:y?.yAxis?.labels},styles:{axis:a?.xAxis?.axis,label:a?.yAxis?.labels}}),n.jsxRuntimeExports.jsx(lt.XTicksAndGridLines,{values:M.filter(Xt),x:M.filter(Pt).map(o=>b(o)),y1:0-I,y2:q+x.bottom,styles:{gridLines:a?.xAxis?.gridLines,labels:a?.xAxis?.labels},classNames:{gridLines:y?.xAxis?.gridLines,labels:y?.xAxis?.labels},suffix:V,prefix:R,labelType:"secondary",showGridLines:!0,precision:fe})]}):null,ve.filter(Gt).map(Bt),c.map(o=>n.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${o.x},${o.y})`,opacity:ue?o.color&&j[P.indexOf(o.color)]===ue?1:xe:H.length!==0?H.indexOf(o.label)!==-1?.85:xe:.85,onMouseEnter:E=>{F(o),Q(E.clientY),K(E.clientX),T?.(o)},onMouseMove:E=>{F(o),Q(E.clientY),K(E.clientX)},onClick:()=>{(z||W)&&(Ye.isEqual(U,o)&&me?(u(void 0),z?.(void 0)):(u(o),z?.(o)))},onMouseLeave:()=>{F(void 0),K(void 0),Q(void 0),T?.(void 0)},children:[n.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,fill:i.filter(Ut).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ye.Colors.gray,radius:l?l(o.radius||0):g}),(l?l(o.radius||0):g)>10&&h?n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("foreignObject",{y:0-(l?l(o.radius||0):g),x:0-(l?l(o.radius||0):g),width:2*(l?l(o.radius||0):g),height:2*(l?l(o.radius||0):g),children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5",children:h?n.jsxRuntimeExports.jsx(st._,{className:n.mo("text-center leading-none m-0",y?.graphObjectValues),marginBottom:"none",style:{fontSize:`${Math.min(Math.max(Math.round((l?l(o.radius||0):g)/4),10),Math.max(Math.round((l?l(o.radius||0):g)*12/`${o.label}`.length),10),20)}px`,color:Je.getTextColorBasedOnBgColor(i.filter(Ft).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ye.Colors.gray),hyphens:"auto",...a?.graphObjectValues||{}},children:o.label}):null})})}):null]},o.label)),X?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:X.map((o,E)=>n.jsxRuntimeExports.jsx(Qe.RefLineX,{text:o.text,color:o.color,x:b(o.value),y1:0-x.top,y2:q+x.bottom,textSide:b(o.value)>re*.75||ge?"left":"right",classNames:o.classNames,styles:o.styles,isInView:!0},E))}):null,ve.filter(It).map(Vt)]})}):n.jsxRuntimeExports.jsx("div",{style:{width:`${S}px`,height:`${w}px`},children:n.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:n.jsxRuntimeExports.jsx(ze.w,{})})});let O;e[13]!==y?.tooltip||e[14]!==J||e[15]!==$||e[16]!==Z||e[17]!==a?.tooltip||e[18]!==A?(O=Z&&A&&J&&$?n.jsxRuntimeExports.jsx(Ze.Tooltip,{data:Z,body:A,xPos:J,yPos:$,backgroundStyle:a?.tooltip,className:y?.tooltip}):null,e[13]=y?.tooltip,e[14]=J,e[15]=$,e[16]=Z,e[17]=a?.tooltip,e[18]=A,e[19]=O):O=e[19];let k;e[20]!==y?.modal||e[21]!==W||e[22]!==U?(k=W&&U!==void 0?n.jsxRuntimeExports.jsx(_e.DetailsModal,{body:W,data:U,setData:u,className:y?.modal}):null,e[20]=y?.modal,e[21]=W,e[22]=U,e[23]=k):k=e[23];let s;return e[24]!==N||e[25]!==O||e[26]!==k?(s=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[N,O,k]}),e[24]=N,e[25]=O,e[26]=k,e[27]=s):s=e[27],s}function Vt(t){return t.layer}function It(t){return t.position==="after"}function Ft(t){return t.color}function Ut(t){return t.color}function Bt(t){return t.layer}function Gt(t){return t.position==="before"}function Pt(t){return t!==0}function Xt(t){return t!==0}function Yt(t){return t.position}function Ht(t){return{...t,...t.data&&{data:{...t.data}}}}function zt(t){return t!=null}function Wt(t){return t.radius}function Zt(t){return t.radius===void 0||t.radius===null}function Jt(t){return t.position}function Kt(t){return!v.checkIfNullOrUndefined(t.position)}function Qt(t){return t.position}function _t(t){return!v.checkIfNullOrUndefined(t.position)}function ei(t){return t.position}function ti(t){return!v.checkIfNullOrUndefined(t.position)}function ii(t){return t.position}function oi(t){return!v.checkIfNullOrUndefined(t.position)}function ni(t){return!v.checkIfNullOrUndefined(t.radius)}function si(t){return!v.checkIfNullOrUndefined(t.radius)}function ri(t){const e=n.compilerRuntimeExports.c(92),{data:i,graphTitle:j,topMargin:ae,bottomMargin:S,leftMargin:w,rightMargin:P,colors:C,sources:ee,graphDescription:te,height:ce,width:h,footNote:A,colorDomain:T,colorLegendTitle:X,padding:ue,relativeHeight:D,tooltip:g,onSeriesMouseOver:L,refValues:m,showColorScale:Y,graphID:H,radius:z,showLabels:ge,showTicks:me,maxRadiusValue:W,maxValue:V,minValue:R,highlightedDataPoints:a,onSeriesMouseClick:y,ariaLabel:de,backgroundColor:xe,graphDownload:fe,dataDownload:ve,language:pe,showNAColor:I,minHeight:ie,theme:oe,resetSelectionOnDoubleClick:he,detailsOnClick:ne,orientation:Z,suffix:F,prefix:U,styles:u,classNames:c,noOfTicks:se,dimmedOpacity:J,precision:K,customLayers:$,hideAxisLine:Q}=t,d=z===void 0?5:z,x=ge===void 0?!0:ge,re=me===void 0?!0:me;let q;e[0]!==a?(q=a===void 0?[]:a,e[0]=a,e[1]=q):q=e[1];const _=q,B=xe===void 0?!1:xe,G=fe===void 0?!1:fe,f=ve===void 0?!1:ve,r=pe===void 0?"en":pe,l=I===void 0?!0:I,b=ie===void 0?0:ie,M=oe===void 0?"light":oe,N=he===void 0?!0:he,O=Z===void 0?"vertical":Z,k=F===void 0?"":F,s=U===void 0?"":U,o=se===void 0?5:se,E=J===void 0?.3:J,Le=K===void 0?2:K;let ke;e[2]!==$?(ke=$===void 0?[]:$,e[2]=$,e[3]=ke):ke=e[3];const $e=ke,qe=Q===void 0?!1:Q,[Ce,it]=p.useState(0),[Ne,ot]=p.useState(0),[Ae,nt]=p.useState(void 0),Te=p.useRef(null),Ue=p.useRef(null),Ve=O==="horizontal"?Tt:xt;let Se,we;e[4]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{const Be=new ResizeObserver(Ge=>{it(Ge[0].target.clientWidth||620),ot(Ge[0].target.clientHeight||480)});return Te.current&&Be.observe(Te.current),()=>Be.disconnect()},we=[],e[4]=Se,e[5]=we):(Se=e[4],we=e[5]),p.useEffect(Se,we);const Ie=c?.graphContainer,Fe=u?.graphContainer;let je;e[6]!==c?.description||e[7]!==c?.title||e[8]!==i||e[9]!==f||e[10]!==te||e[11]!==G||e[12]!==j||e[13]!==u?.description||e[14]!==u?.title||e[15]!==h?(je=j||te||G||f?n.jsxRuntimeExports.jsx(at.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:c?.title,description:c?.description},graphTitle:j,graphDescription:te,width:h,graphDownload:G?Ue:void 0,dataDownload:f?i.map(fi).filter(mi).length>0?i.map(xi).filter(di):i.filter(ui):null}):null,e[6]=c?.description,e[7]=c?.title,e[8]=i,e[9]=f,e[10]=te,e[11]=G,e[12]=j,e[13]=u?.description,e[14]=u?.title,e[15]=h,e[16]=je):je=e[16];let be;e[17]!==c?.colorLegend||e[18]!==T||e[19]!==X||e[20]!==C||e[21]!==i||e[22]!==Y||e[23]!==l||e[24]!==M||e[25]!==h?(be=Y!==!1&&i.filter(ci).length!==0&&i.length>0?n.jsxRuntimeExports.jsx(ut.ColorLegendWithMouseOver,{width:h,colorLegendTitle:X,colors:C||ye.Colors[M].categoricalColors.colors,colorDomain:T||Pe.uniqBy(i,"color",!0),setSelectedColor:nt,showNAColor:l,className:c?.colorLegend}):null,e[17]=c?.colorLegend,e[18]=T,e[19]=X,e[20]=C,e[21]=i,e[22]=Y,e[23]=l,e[24]=M,e[25]=h,e[26]=be):be=e[26];let Me;e[27]!==i.length?(Me=i.length===0&&n.jsxRuntimeExports.jsx(ct.EmptyState,{}),e[27]=i.length,e[28]=Me):Me=e[28];let Ee;e[29]!==Ve||e[30]!==S||e[31]!==c||e[32]!==T||e[33]!==C||e[34]!==$e||e[35]!==i||e[36]!==ne||e[37]!==E||e[38]!==qe||e[39]!==_||e[40]!==w||e[41]!==W||e[42]!==V||e[43]!==R||e[44]!==o||e[45]!==y||e[46]!==L||e[47]!==Le||e[48]!==s||e[49]!==d||e[50]!==m||e[51]!==N||e[52]!==P||e[53]!==Ae||e[54]!==x||e[55]!==re||e[56]!==u||e[57]!==k||e[58]!==Ne||e[59]!==Ce||e[60]!==M||e[61]!==g||e[62]!==ae?(Ee=Ce&&Ne&&i.length>0?n.jsxRuntimeExports.jsx(Ve,{hideAxisLine:qe,data:i,circleColors:i.filter(ai).length===0?C?[C]:[ye.Colors.primaryColors["blue-600"]]:C||ye.Colors[M].categoricalColors.colors,colorDomain:i.filter(li).length===0?[]:T||Pe.uniqBy(i,"color",!0),width:Ce,selectedColor:Ae,height:Ne,showTicks:re,leftMargin:w,rightMargin:P,topMargin:ae,bottomMargin:S,showLabels:x,tooltip:g,onSeriesMouseOver:L,refValues:m,startFromZero:!1,radius:d,maxRadiusValue:W,maxValue:V,minValue:R,highlightedDataPoints:_,onSeriesMouseClick:y,resetSelectionOnDoubleClick:N,detailsOnClick:ne,styles:u,classNames:c,suffix:k,prefix:s,noOfTicks:o||5,dimmedOpacity:E,precision:Le,customLayers:$e}):null,e[29]=Ve,e[30]=S,e[31]=c,e[32]=T,e[33]=C,e[34]=$e,e[35]=i,e[36]=ne,e[37]=E,e[38]=qe,e[39]=_,e[40]=w,e[41]=W,e[42]=V,e[43]=R,e[44]=o,e[45]=y,e[46]=L,e[47]=Le,e[48]=s,e[49]=d,e[50]=m,e[51]=N,e[52]=P,e[53]=Ae,e[54]=x,e[55]=re,e[56]=u,e[57]=k,e[58]=Ne,e[59]=Ce,e[60]=M,e[61]=g,e[62]=ae,e[63]=Ee):Ee=e[63];let Re;e[64]!==Me||e[65]!==Ee?(Re=n.jsxRuntimeExports.jsxs(Xe.GraphArea,{ref:Te,children:[Me,Ee]}),e[64]=Me,e[65]=Ee,e[66]=Re):Re=e[66];let Oe;e[67]!==c?.footnote||e[68]!==c?.source||e[69]!==A||e[70]!==ee||e[71]!==u?.footnote||e[72]!==u?.source||e[73]!==h?(Oe=ee||A?n.jsxRuntimeExports.jsx(dt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:ee,footNote:A,width:h}):null,e[67]=c?.footnote,e[68]=c?.source,e[69]=A,e[70]=ee,e[71]=u?.footnote,e[72]=u?.source,e[73]=h,e[74]=Oe):Oe=e[74];let De;return e[75]!==de||e[76]!==B||e[77]!==H||e[78]!==ce||e[79]!==r||e[80]!==b||e[81]!==ue||e[82]!==D||e[83]!==Ie||e[84]!==Fe||e[85]!==je||e[86]!==be||e[87]!==Re||e[88]!==Oe||e[89]!==M||e[90]!==h?(De=n.jsxRuntimeExports.jsxs(Xe.GraphContainer,{className:Ie,style:Fe,id:H,ref:Ue,"aria-label":de,backgroundColor:B,theme:M,language:r,minHeight:b,width:h,height:ce,relativeHeight:D,padding:ue,children:[je,be,Re,Oe]}),e[75]=de,e[76]=B,e[77]=H,e[78]=ce,e[79]=r,e[80]=b,e[81]=ue,e[82]=D,e[83]=Ie,e[84]=Fe,e[85]=je,e[86]=be,e[87]=Re,e[88]=Oe,e[89]=M,e[90]=h,e[91]=De):De=e[91],De}function li(t){return t.color}function ai(t){return t.color}function ci(t){return t.color}function ui(t){return t!==void 0}function di(t){return t!==void 0}function xi(t){return t.data}function mi(t){return t!==void 0}function fi(t){return t.data}exports.BeeSwarmChart=ri;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-6v2a2njQ.cjs"),p=require("react"),Ye=require("./index-DQA8q5sC.cjs"),He=require("./index-Cno4Q0YE.cjs"),ze=require("./Spinner-jTMOLuw_.cjs"),st=require("./Typography-Cc_iHQB-.cjs"),We=require("./numberFormattingFunction-02t-wJta.cjs"),Ze=require("./Tooltip-BLa2EfMs.cjs"),v=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Je=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),ye=require("./Colors.cjs"),Ke=require("./Axis-Jt_tmhxS.cjs"),Qe=require("./ReferenceLine-M9aP3dj-.cjs"),rt=require("./YTicksAndGridLines-UzVC5eBM.cjs"),lt=require("./XTicksAndGridLines-CekrPykD.cjs"),_e=require("./DetailsModal-DHttOA80.cjs"),et=require("./pow-BnyPO-NX.cjs"),tt=require("./linear-CgUCbw9F.cjs"),le=require("./y-QcCbqrzx.cjs"),Pe=require("./uniqBy-O05lp2S5.cjs"),at=require("./GraphHeader.cjs"),Xe=require("./GraphContainer-B1EDxJ0S.cjs"),ct=require("./EmptyState-N1eHt3vq.cjs"),ut=require("./ColorLegendWithMouseOver.cjs"),dt=require("./GraphFooter.cjs");function xt(t){const e=n.compilerRuntimeExports.c(28),{data:i,circleColors:j,showTicks:ae,width:S,height:w,colorDomain:P,topMargin:C,bottomMargin:ee,leftMargin:te,rightMargin:ce,suffix:h,prefix:A,showLabels:T,tooltip:X,onSeriesMouseOver:ue,refValues:D,selectedColor:g,startFromZero:L,radius:m,maxRadiusValue:Y,maxValue:H,minValue:z,highlightedDataPoints:ge,onSeriesMouseClick:me,resetSelectionOnDoubleClick:W,detailsOnClick:V,styles:R,classNames:a,noOfTicks:y,dimmedOpacity:de,precision:xe,customLayers:fe,hideAxisLine:ve}=t,pe=C===void 0?25:C,I=ee===void 0?10:ee,ie=te===void 0?100:te,oe=ce===void 0?40:ce,he=p.useRef(null),[ne,Z]=p.useState(void 0),[F,U]=p.useState(void 0),[u,c]=p.useState(null),[se,J]=p.useState(void 0),[K,$]=p.useState(void 0);let Q;e[0]!==I||e[1]!==ie||e[2]!==oe||e[3]!==pe?(Q={top:pe,bottom:I,left:ie,right:oe},e[0]=I,e[1]=ie,e[2]=oe,e[3]=pe,e[4]=Q):Q=e[4];const d=Q,x=S-d.left-d.right,re=w-d.top-d.bottom,q=i.filter(At).length===0?i:He.orderBy(i.filter(qt),"radius","desc");let _;e[5]!==i||e[6]!==H||e[7]!==L?(_=v.checkIfNullOrUndefined(H)?Math.max(...i.filter($t).map(Lt))<0&&!L?0:Math.max(...i.filter(Dt).map(wt)):H,e[5]=i,e[6]=H,e[7]=L,e[8]=_):_=e[8];const B=_;let G;e[9]!==i||e[10]!==z||e[11]!==L?(G=v.checkIfNullOrUndefined(z)?Math.min(...i.filter(St).map(Nt))>=0&&!L?0:Math.min(...i.filter(Ct).map(kt)):z,e[9]=i,e[10]=z,e[11]=L,e[12]=G):G=e[12];const f=G,r=i.filter(Ot).length!==i.length?et.sqrt().domain([0,v.checkIfNullOrUndefined(Y)?Math.max(...i.map(Rt).filter(Et)):Y]).range([.25,m]).nice():void 0,l=tt.linear().domain([f,B]).range([re,0]).nice(),b=l.ticks(y);p.useEffect(()=>{const s=q.map(Mt).filter(bt);le.forceSimulation(s).force("y",le.forceY(o=>l(o.position)).strength(5)).force("x",le.forceX(o=>x/2).strength(1)).force("collide",le.forceCollide(o=>r?r(o.radius||0)+1:m+1)).force("charge",le.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{c(s)}).on("end",()=>{c(s)})},[i,m,re,x,f,B,q,l,r]);const M=u?n.jsxRuntimeExports.jsx("svg",{width:`${S}px`,height:`${w}px`,viewBox:`0 0 ${S} ${w}`,direction:"ltr",ref:he,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[ae?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ke.Axis,{hideAxisLine:ve,y1:l(f<0?0:f),y2:l(f<0?0:f),x1:0-d.left,x2:x+d.right,label:ae?We.numberFormattingFunction(f<0?0:f,"NA",xe,A,h):void 0,labelPos:{x:0-d.left,y:l(f<0?0:f),dx:0,dy:B<0?"1em":-5},classNames:{axis:a?.xAxis?.axis,label:a?.yAxis?.labels},styles:{axis:R?.xAxis?.axis,label:R?.yAxis?.labels}}),n.jsxRuntimeExports.jsx(rt.YTicksAndGridLines,{values:b.filter(jt),y:b.filter(yt).map(s=>l(s)),x1:0-d.left,x2:x+d.right,styles:{gridLines:R?.yAxis?.gridLines,labels:R?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:h,prefix:A,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:xe})]}):null,fe.filter(vt).map(gt),u.map(s=>n.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${s.x},${s.y})`,opacity:g?s.color&&j[P.indexOf(s.color)]===g?1:de:ge.length!==0?ge.indexOf(s.label)!==-1?.85:de:.85,onMouseEnter:o=>{Z(s),$(o.clientY),J(o.clientX),ue?.(s)},onMouseMove:o=>{Z(s),$(o.clientY),J(o.clientX)},onClick:()=>{(me||V)&&(Ye.isEqual(F,s)&&W?(U(void 0),me?.(void 0)):(U(s),me?.(s)))},onMouseLeave:()=>{Z(void 0),J(void 0),$(void 0),ue?.(void 0)},children:[n.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:r?r(s.radius||0):m,fill:i.filter(ht).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ye.Colors.gray}),(r?r(s.radius||0):m)>10&&T?n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("foreignObject",{y:0-(r?r(s.radius||0):m),x:0-(r?r(s.radius||0):m),width:2*(r?r(s.radius||0):m),height:2*(r?r(s.radius||0):m),children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit py-0 px-1.5",children:T?n.jsxRuntimeExports.jsx("p",{className:n.mo("text-center leading-none m-0",a?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((r?r(s.radius||0):m)/4),10),Math.max(Math.round((r?r(s.radius||0):m)*12/`${s.label}`.length),10),20)}px`,hyphens:"auto",color:Je.getTextColorBasedOnBgColor(i.filter(pt).length===0?j[0]:s.color?j[P.indexOf(s.color)]:ye.Colors.gray),...R?.graphObjectValues||{}},children:s.label}):null})})}):null]},s.label)),D?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:D.map((s,o)=>n.jsxRuntimeExports.jsx(Qe.RefLineY,{text:s.text,color:s.color,y:l(s.value),x1:0-d.left,x2:x+d.right,classNames:s.classNames,styles:s.styles,isInView:!0},o))}):null,fe.filter(ft).map(mt)]})}):n.jsxRuntimeExports.jsx("div",{style:{width:`${S}px`,height:`${w}px`},children:n.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:n.jsxRuntimeExports.jsx(ze.w,{})})});let N;e[13]!==a?.tooltip||e[14]!==se||e[15]!==K||e[16]!==ne||e[17]!==R?.tooltip||e[18]!==X?(N=ne&&X&&se&&K?n.jsxRuntimeExports.jsx(Ze.Tooltip,{data:ne,body:X,xPos:se,yPos:K,backgroundStyle:R?.tooltip,className:a?.tooltip}):null,e[13]=a?.tooltip,e[14]=se,e[15]=K,e[16]=ne,e[17]=R?.tooltip,e[18]=X,e[19]=N):N=e[19];let O;e[20]!==a?.modal||e[21]!==V||e[22]!==F?(O=V&&F!==void 0?n.jsxRuntimeExports.jsx(_e.DetailsModal,{body:V,data:F,setData:U,className:a?.modal}):null,e[20]=a?.modal,e[21]=V,e[22]=F,e[23]=O):O=e[23];let k;return e[24]!==M||e[25]!==N||e[26]!==O?(k=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[M,N,O]}),e[24]=M,e[25]=N,e[26]=O,e[27]=k):k=e[27],k}function mt(t){return t.layer}function ft(t){return t.position==="after"}function pt(t){return t.color}function ht(t){return t.color}function gt(t){return t.layer}function vt(t){return t.position==="before"}function yt(t){return t!==0}function jt(t){return t!==0}function bt(t){return t.position}function Mt(t){return{...t,...t.data&&{data:{...t.data}}}}function Et(t){return t!=null}function Rt(t){return t.radius}function Ot(t){return t.radius===void 0||t.radius===null}function kt(t){return t.position}function Ct(t){return!v.checkIfNullOrUndefined(t.position)}function Nt(t){return t.position}function St(t){return!v.checkIfNullOrUndefined(t.position)}function wt(t){return t.position}function Dt(t){return!v.checkIfNullOrUndefined(t.position)}function Lt(t){return t.position}function $t(t){return!v.checkIfNullOrUndefined(t.position)}function qt(t){return!v.checkIfNullOrUndefined(t.radius)}function At(t){return!v.checkIfNullOrUndefined(t.radius)}function Tt(t){const e=n.compilerRuntimeExports.c(28),{data:i,circleColors:j,showTicks:ae,width:S,height:w,colorDomain:P,topMargin:C,bottomMargin:ee,leftMargin:te,rightMargin:ce,showLabels:h,tooltip:A,onSeriesMouseOver:T,refValues:X,selectedColor:ue,startFromZero:D,radius:g,maxRadiusValue:L,maxValue:m,minValue:Y,highlightedDataPoints:H,onSeriesMouseClick:z,rtl:ge,resetSelectionOnDoubleClick:me,detailsOnClick:W,suffix:V,prefix:R,styles:a,classNames:y,noOfTicks:de,dimmedOpacity:xe,precision:fe,customLayers:ve,hideAxisLine:pe}=t,I=C===void 0?25:C,ie=ee===void 0?10:ee,oe=te===void 0?10:te,he=ce===void 0?10:ce,ne=p.useRef(null),[Z,F]=p.useState(void 0),[U,u]=p.useState(void 0),[c,se]=p.useState(null),[J,K]=p.useState(void 0),[$,Q]=p.useState(void 0);let d;e[0]!==ie||e[1]!==oe||e[2]!==he||e[3]!==I?(d={top:I,bottom:ie,left:oe,right:he},e[0]=ie,e[1]=oe,e[2]=he,e[3]=I,e[4]=d):d=e[4];const x=d,re=S-x.left-x.right,q=w-x.top-x.bottom,_=i.filter(si).length===0?i:He.orderBy(i.filter(ni),"radius","desc");let B;e[5]!==i||e[6]!==m||e[7]!==D?(B=v.checkIfNullOrUndefined(m)?Math.max(...i.filter(oi).map(ii))<0&&!D?0:Math.max(...i.filter(ti).map(ei)):m,e[5]=i,e[6]=m,e[7]=D,e[8]=B):B=e[8];const G=B;let f;e[9]!==i||e[10]!==Y||e[11]!==D?(f=v.checkIfNullOrUndefined(Y)?Math.min(...i.filter(_t).map(Qt))>=0&&!D?0:Math.min(...i.filter(Kt).map(Jt)):Y,e[9]=i,e[10]=Y,e[11]=D,e[12]=f):f=e[12];const r=f,l=i.filter(Zt).length!==i.length?et.sqrt().domain([0,v.checkIfNullOrUndefined(L)?Math.max(...i.map(Wt).filter(zt)):L]).range([.25,g]).nice():void 0,b=tt.linear().domain([r,G]).range([0,re]).nice(),M=b.ticks(de);p.useEffect(()=>{const o=_.map(Ht).filter(Yt);le.forceSimulation(o).force("x",le.forceX(E=>b(E.position)).strength(5)).force("y",le.forceY(E=>q/2).strength(1)).force("collide",le.forceCollide(E=>l?l(E.radius||0)+1:g+1)).force("charge",le.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{se(o)}).on("end",()=>{se(o)})},[i,g,q,re,r,G,_,b,l]);const N=c?n.jsxRuntimeExports.jsx("svg",{width:`${S}px`,height:`${w}px`,viewBox:`0 0 ${S} ${w}`,direction:"ltr",ref:ne,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[ae?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(Ke.Axis,{hideAxisLine:pe,x1:b(r<0?0:r),x2:b(r<0?0:r),y1:0-x.top,y2:q+x.bottom,label:ae?We.numberFormattingFunction(r<0?0:r,"NA",fe,R,V):void 0,labelPos:{x:b(r<0?0:r),y:0-I,dy:"0.75em",dx:3},classNames:{axis:y?.xAxis?.axis,label:y?.yAxis?.labels},styles:{axis:a?.xAxis?.axis,label:a?.yAxis?.labels}}),n.jsxRuntimeExports.jsx(lt.XTicksAndGridLines,{values:M.filter(Xt),x:M.filter(Pt).map(o=>b(o)),y1:0-I,y2:q+x.bottom,styles:{gridLines:a?.xAxis?.gridLines,labels:a?.xAxis?.labels},classNames:{gridLines:y?.xAxis?.gridLines,labels:y?.xAxis?.labels},suffix:V,prefix:R,labelType:"secondary",showGridLines:!0,precision:fe})]}):null,ve.filter(Gt).map(Bt),c.map(o=>n.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${o.x},${o.y})`,opacity:ue?o.color&&j[P.indexOf(o.color)]===ue?1:xe:H.length!==0?H.indexOf(o.label)!==-1?.85:xe:.85,onMouseEnter:E=>{F(o),Q(E.clientY),K(E.clientX),T?.(o)},onMouseMove:E=>{F(o),Q(E.clientY),K(E.clientX)},onClick:()=>{(z||W)&&(Ye.isEqual(U,o)&&me?(u(void 0),z?.(void 0)):(u(o),z?.(o)))},onMouseLeave:()=>{F(void 0),K(void 0),Q(void 0),T?.(void 0)},children:[n.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,fill:i.filter(Ut).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ye.Colors.gray,radius:l?l(o.radius||0):g}),(l?l(o.radius||0):g)>10&&h?n.jsxRuntimeExports.jsx("g",{children:n.jsxRuntimeExports.jsx("foreignObject",{y:0-(l?l(o.radius||0):g),x:0-(l?l(o.radius||0):g),width:2*(l?l(o.radius||0):g),height:2*(l?l(o.radius||0):g),children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5",children:h?n.jsxRuntimeExports.jsx(st._,{className:n.mo("text-center leading-none m-0",y?.graphObjectValues),marginBottom:"none",style:{fontSize:`${Math.min(Math.max(Math.round((l?l(o.radius||0):g)/4),10),Math.max(Math.round((l?l(o.radius||0):g)*12/`${o.label}`.length),10),20)}px`,color:Je.getTextColorBasedOnBgColor(i.filter(Ft).length===0?j[0]:o.color?j[P.indexOf(o.color)]:ye.Colors.gray),hyphens:"auto",...a?.graphObjectValues||{}},children:o.label}):null})})}):null]},o.label)),X?n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:X.map((o,E)=>n.jsxRuntimeExports.jsx(Qe.RefLineX,{text:o.text,color:o.color,x:b(o.value),y1:0-x.top,y2:q+x.bottom,textSide:b(o.value)>re*.75||ge?"left":"right",classNames:o.classNames,styles:o.styles,isInView:!0},E))}):null,ve.filter(It).map(Vt)]})}):n.jsxRuntimeExports.jsx("div",{style:{width:`${S}px`,height:`${w}px`},children:n.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:n.jsxRuntimeExports.jsx(ze.w,{})})});let O;e[13]!==y?.tooltip||e[14]!==J||e[15]!==$||e[16]!==Z||e[17]!==a?.tooltip||e[18]!==A?(O=Z&&A&&J&&$?n.jsxRuntimeExports.jsx(Ze.Tooltip,{data:Z,body:A,xPos:J,yPos:$,backgroundStyle:a?.tooltip,className:y?.tooltip}):null,e[13]=y?.tooltip,e[14]=J,e[15]=$,e[16]=Z,e[17]=a?.tooltip,e[18]=A,e[19]=O):O=e[19];let k;e[20]!==y?.modal||e[21]!==W||e[22]!==U?(k=W&&U!==void 0?n.jsxRuntimeExports.jsx(_e.DetailsModal,{body:W,data:U,setData:u,className:y?.modal}):null,e[20]=y?.modal,e[21]=W,e[22]=U,e[23]=k):k=e[23];let s;return e[24]!==N||e[25]!==O||e[26]!==k?(s=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[N,O,k]}),e[24]=N,e[25]=O,e[26]=k,e[27]=s):s=e[27],s}function Vt(t){return t.layer}function It(t){return t.position==="after"}function Ft(t){return t.color}function Ut(t){return t.color}function Bt(t){return t.layer}function Gt(t){return t.position==="before"}function Pt(t){return t!==0}function Xt(t){return t!==0}function Yt(t){return t.position}function Ht(t){return{...t,...t.data&&{data:{...t.data}}}}function zt(t){return t!=null}function Wt(t){return t.radius}function Zt(t){return t.radius===void 0||t.radius===null}function Jt(t){return t.position}function Kt(t){return!v.checkIfNullOrUndefined(t.position)}function Qt(t){return t.position}function _t(t){return!v.checkIfNullOrUndefined(t.position)}function ei(t){return t.position}function ti(t){return!v.checkIfNullOrUndefined(t.position)}function ii(t){return t.position}function oi(t){return!v.checkIfNullOrUndefined(t.position)}function ni(t){return!v.checkIfNullOrUndefined(t.radius)}function si(t){return!v.checkIfNullOrUndefined(t.radius)}function ri(t){const e=n.compilerRuntimeExports.c(92),{data:i,graphTitle:j,topMargin:ae,bottomMargin:S,leftMargin:w,rightMargin:P,colors:C,sources:ee,graphDescription:te,height:ce,width:h,footNote:A,colorDomain:T,colorLegendTitle:X,padding:ue,relativeHeight:D,tooltip:g,onSeriesMouseOver:L,refValues:m,showColorScale:Y,graphID:H,radius:z,showLabels:ge,showTicks:me,maxRadiusValue:W,maxValue:V,minValue:R,highlightedDataPoints:a,onSeriesMouseClick:y,ariaLabel:de,backgroundColor:xe,graphDownload:fe,dataDownload:ve,language:pe,showNAColor:I,minHeight:ie,theme:oe,resetSelectionOnDoubleClick:he,detailsOnClick:ne,orientation:Z,suffix:F,prefix:U,styles:u,classNames:c,noOfTicks:se,dimmedOpacity:J,precision:K,customLayers:$,hideAxisLine:Q}=t,d=z===void 0?5:z,x=ge===void 0?!0:ge,re=me===void 0?!0:me;let q;e[0]!==a?(q=a===void 0?[]:a,e[0]=a,e[1]=q):q=e[1];const _=q,B=xe===void 0?!1:xe,G=fe===void 0?!1:fe,f=ve===void 0?!1:ve,r=pe===void 0?"en":pe,l=I===void 0?!0:I,b=ie===void 0?0:ie,M=oe===void 0?"light":oe,N=he===void 0?!0:he,O=Z===void 0?"vertical":Z,k=F===void 0?"":F,s=U===void 0?"":U,o=se===void 0?5:se,E=J===void 0?.3:J,Le=K===void 0?2:K;let ke;e[2]!==$?(ke=$===void 0?[]:$,e[2]=$,e[3]=ke):ke=e[3];const $e=ke,qe=Q===void 0?!1:Q,[Ce,it]=p.useState(0),[Ne,ot]=p.useState(0),[Ae,nt]=p.useState(void 0),Te=p.useRef(null),Ue=p.useRef(null),Ve=O==="horizontal"?Tt:xt;let Se,we;e[4]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{const Be=new ResizeObserver(Ge=>{it(Ge[0].target.clientWidth||620),ot(Ge[0].target.clientHeight||480)});return Te.current&&Be.observe(Te.current),()=>Be.disconnect()},we=[],e[4]=Se,e[5]=we):(Se=e[4],we=e[5]),p.useEffect(Se,we);const Ie=c?.graphContainer,Fe=u?.graphContainer;let je;e[6]!==c?.description||e[7]!==c?.title||e[8]!==i||e[9]!==f||e[10]!==te||e[11]!==G||e[12]!==j||e[13]!==u?.description||e[14]!==u?.title||e[15]!==h?(je=j||te||G||f?n.jsxRuntimeExports.jsx(at.GraphHeader,{styles:{title:u?.title,description:u?.description},classNames:{title:c?.title,description:c?.description},graphTitle:j,graphDescription:te,width:h,graphDownload:G?Ue:void 0,dataDownload:f?i.map(fi).filter(mi).length>0?i.map(xi).filter(di):i.filter(ui):null}):null,e[6]=c?.description,e[7]=c?.title,e[8]=i,e[9]=f,e[10]=te,e[11]=G,e[12]=j,e[13]=u?.description,e[14]=u?.title,e[15]=h,e[16]=je):je=e[16];let be;e[17]!==c?.colorLegend||e[18]!==T||e[19]!==X||e[20]!==C||e[21]!==i||e[22]!==Y||e[23]!==l||e[24]!==M||e[25]!==h?(be=Y!==!1&&i.filter(ci).length!==0&&i.length>0?n.jsxRuntimeExports.jsx(ut.ColorLegendWithMouseOver,{width:h,colorLegendTitle:X,colors:C||ye.Colors[M].categoricalColors.colors,colorDomain:T||Pe.uniqBy(i,"color",!0),setSelectedColor:nt,showNAColor:l,className:c?.colorLegend}):null,e[17]=c?.colorLegend,e[18]=T,e[19]=X,e[20]=C,e[21]=i,e[22]=Y,e[23]=l,e[24]=M,e[25]=h,e[26]=be):be=e[26];let Me;e[27]!==i.length?(Me=i.length===0&&n.jsxRuntimeExports.jsx(ct.EmptyState,{}),e[27]=i.length,e[28]=Me):Me=e[28];let Ee;e[29]!==Ve||e[30]!==S||e[31]!==c||e[32]!==T||e[33]!==C||e[34]!==$e||e[35]!==i||e[36]!==ne||e[37]!==E||e[38]!==qe||e[39]!==_||e[40]!==w||e[41]!==W||e[42]!==V||e[43]!==R||e[44]!==o||e[45]!==y||e[46]!==L||e[47]!==Le||e[48]!==s||e[49]!==d||e[50]!==m||e[51]!==N||e[52]!==P||e[53]!==Ae||e[54]!==x||e[55]!==re||e[56]!==u||e[57]!==k||e[58]!==Ne||e[59]!==Ce||e[60]!==M||e[61]!==g||e[62]!==ae?(Ee=Ce&&Ne&&i.length>0?n.jsxRuntimeExports.jsx(Ve,{hideAxisLine:qe,data:i,circleColors:i.filter(ai).length===0?C?[C]:[ye.Colors.primaryColors["blue-600"]]:C||ye.Colors[M].categoricalColors.colors,colorDomain:i.filter(li).length===0?[]:T||Pe.uniqBy(i,"color",!0),width:Ce,selectedColor:Ae,height:Ne,showTicks:re,leftMargin:w,rightMargin:P,topMargin:ae,bottomMargin:S,showLabels:x,tooltip:g,onSeriesMouseOver:L,refValues:m,startFromZero:!1,radius:d,maxRadiusValue:W,maxValue:V,minValue:R,highlightedDataPoints:_,onSeriesMouseClick:y,resetSelectionOnDoubleClick:N,detailsOnClick:ne,styles:u,classNames:c,suffix:k,prefix:s,noOfTicks:o||5,dimmedOpacity:E,precision:Le,customLayers:$e}):null,e[29]=Ve,e[30]=S,e[31]=c,e[32]=T,e[33]=C,e[34]=$e,e[35]=i,e[36]=ne,e[37]=E,e[38]=qe,e[39]=_,e[40]=w,e[41]=W,e[42]=V,e[43]=R,e[44]=o,e[45]=y,e[46]=L,e[47]=Le,e[48]=s,e[49]=d,e[50]=m,e[51]=N,e[52]=P,e[53]=Ae,e[54]=x,e[55]=re,e[56]=u,e[57]=k,e[58]=Ne,e[59]=Ce,e[60]=M,e[61]=g,e[62]=ae,e[63]=Ee):Ee=e[63];let Re;e[64]!==Me||e[65]!==Ee?(Re=n.jsxRuntimeExports.jsxs(Xe.GraphArea,{ref:Te,children:[Me,Ee]}),e[64]=Me,e[65]=Ee,e[66]=Re):Re=e[66];let Oe;e[67]!==c?.footnote||e[68]!==c?.source||e[69]!==A||e[70]!==ee||e[71]!==u?.footnote||e[72]!==u?.source||e[73]!==h?(Oe=ee||A?n.jsxRuntimeExports.jsx(dt.GraphFooter,{styles:{footnote:u?.footnote,source:u?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:ee,footNote:A,width:h}):null,e[67]=c?.footnote,e[68]=c?.source,e[69]=A,e[70]=ee,e[71]=u?.footnote,e[72]=u?.source,e[73]=h,e[74]=Oe):Oe=e[74];let De;return e[75]!==de||e[76]!==B||e[77]!==H||e[78]!==ce||e[79]!==r||e[80]!==b||e[81]!==ue||e[82]!==D||e[83]!==Ie||e[84]!==Fe||e[85]!==je||e[86]!==be||e[87]!==Re||e[88]!==Oe||e[89]!==M||e[90]!==h?(De=n.jsxRuntimeExports.jsxs(Xe.GraphContainer,{className:Ie,style:Fe,id:H,ref:Ue,"aria-label":de,backgroundColor:B,theme:M,language:r,minHeight:b,width:h,height:ce,relativeHeight:D,padding:ue,children:[je,be,Re,Oe]}),e[75]=de,e[76]=B,e[77]=H,e[78]=ce,e[79]=r,e[80]=b,e[81]=ue,e[82]=D,e[83]=Ie,e[84]=Fe,e[85]=je,e[86]=be,e[87]=Re,e[88]=Oe,e[89]=M,e[90]=h,e[91]=De):De=e[91],De}function li(t){return t.color}function ai(t){return t.color}function ci(t){return t.color}function ui(t){return t!==void 0}function di(t){return t!==void 0}function xi(t){return t.data}function mi(t){return t!==void 0}function fi(t){return t.data}exports.BeeSwarmChart=ri;
|
|
2
2
|
//# sourceMappingURL=BeeSwarmChart.cjs.map
|
package/dist/BeeSwarmChart.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useRef as At, useState as T, useEffect as Gt } from "react";
|
|
|
3
3
|
import { i as qt } from "./index-Bwrro8-q.js";
|
|
4
4
|
import { o as Zt } from "./index-BZQYSqar.js";
|
|
5
5
|
import { w as Ut } from "./Spinner--r2RrJV8.js";
|
|
6
|
-
import { _ as me } from "./Typography-
|
|
6
|
+
import { _ as me } from "./Typography-CdMGooqp.js";
|
|
7
7
|
import { n as Jt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
8
8
|
import { T as Kt } from "./Tooltip-BRnAz2Gv.js";
|
|
9
9
|
import { c as x } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
@@ -20,7 +20,7 @@ import { f as ie, a as ne, b as re, c as se, d as le } from "./y-BqfogMAB.js";
|
|
|
20
20
|
import { u as Wt } from "./uniqBy-BHy4I8PK.js";
|
|
21
21
|
import { GraphHeader as ge } from "./GraphHeader.js";
|
|
22
22
|
import { a as xe, G as ve } from "./GraphContainer-CF6ws3pd.js";
|
|
23
|
-
import { E as ye } from "./EmptyState-
|
|
23
|
+
import { E as ye } from "./EmptyState-dScPFkLy.js";
|
|
24
24
|
import { ColorLegendWithMouseOver as be } from "./ColorLegendWithMouseOver.js";
|
|
25
25
|
import { GraphFooter as Me } from "./GraphFooter.js";
|
|
26
26
|
function je(e) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("react"),vt=require("./getSliderMarks-CIuSoedo.cjs"),Mt=require("./Spinner-jTMOLuw_.cjs"),jt=require("./parse-xYI9yrvL.cjs"),qt=require("./index-DQA8q5sC.cjs"),A=require("./index-DLFt97gy.cjs"),It=require("./index-C5K--w8d.cjs"),bt=require("./Typography-DrJ7IOdw.cjs"),Et=require("./numberFormattingFunction-02t-wJta.cjs"),zt=require("./Tooltip-BLa2EfMs.cjs"),kt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ft=require("./index-sbKVyHS2.cjs"),Pt=require("./DetailsModal-DHttOA80.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Ct=require("./threshold-DNsSUf8Q.cjs"),et=require("./proxy-C4-uo6nS.cjs"),At=require("./use-in-view-C3o_ntMv.cjs"),Bt=require("./index-CoobIWNj.cjs"),Ft=require("./GraphHeader.cjs"),_t=require("./GraphFooter.cjs"),gt=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),wt=require("./getJenks-BzJvhy_H.cjs"),Rt=require("./GraphContainer-B1EDxJ0S.cjs");function Wt(a){const{data:e,xDomain:u,mapData:B,xColorLegendTitle:ze,yDomain:Y,yColorLegendTitle:J,width:x,height:p,colors:h,scale:Pe,centerPoint:E,mapBorderWidth:F,mapNoDataColor:K,mapBorderColor:pe,tooltip:Z,onSeriesMouseOver:he,zoomScaleExtend:xe,zoomTranslateExtend:ge,highlightedIds:k,onSeriesMouseClick:Q,mapProperty:R,resetSelectionOnDoubleClick:Ae,detailsOnClick:y,showColorScale:fe,styles:Be,classNames:_,mapProjection:L,zoomInteraction:D,animate:S,dimmedOpacity:N,customLayers:ee,collapseColorScaleByDefault:ye,zoomAndCenterByHighlightedIds:ve,projectionRotate:W,rewindCoordinatesInMapData:je}=a,v=s.useMemo(()=>je?A.index_default(B,{reverse:!0}):B,[B,je]),[Fe,be]=s.useState(ye===void 0?!(x<680):!ye),[T,Ee]=s.useState(void 0),[H,c]=s.useState(void 0),[l,te]=s.useState(void 0),[ke,oe]=s.useState(void 0),[Ce,$]=s.useState(void 0),w=s.useRef(null),re=At.useInView(w,{once:S.once,amount:S.amount}),we=s.useRef(null),G=s.useRef(null);s.useEffect(()=>{const t=xt.select(we.current),r=xt.select(w.current),g=m=>{if(D==="noZoom")return!1;if(D==="button")return!m.type.includes("wheel");const C=m.type==="wheel",j=m.type.startsWith("touch"),Me=m.type==="mousedown"||m.type==="mousemove";return j?!0:C?D==="scroll"?!0:m.ctrlKey:Me&&!m.button&&!m.ctrlKey},b=A.zoom().scaleExtent(xe).translateExtent(ge||[[-20,-20],[x+20,p+20]]).filter(g).on("zoom",({transform:m})=>{t.attr("transform",m)});r.call(b),G.current=b},[p,x,D]);const V=A.index_default$1({...v,features:ve?v.features.filter(t=>(k||[]).length===0||k.indexOf(t.properties[R])!==-1):v.features}),f=It.index_default({...v,features:ve?v.features.filter(t=>(k||[]).length===0||k.indexOf(t.properties[R])!==-1):v.features}),O=(V[2]-V[0])*1.15,ne=(V[3]-V[1])*1.15,Re=x*190/960*360/O,De=p*190/678*180/ne,M=Pe*Math.min(Re,De),Se=L==="mercator"?A.geoMercator().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="equalEarth"?A.geoEqualEarth().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="naturalEarth"?A.geoNaturalEarth1().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="orthographic"?A.geoOrthographic().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):A.geoAlbersUsa().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M),U=A.geoPath().projection(Se),Ne=Array.from({length:u.length},(t,r)=>r),Oe=Array.from({length:Y.length},(t,r)=>r),ae=Ct.threshold().domain(u).range(Ne),ie=Ct.threshold().domain(Y).range(Oe),se=t=>{if(!w.current||!G.current)return;xt.select(w.current).call(G.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(et.motion.svg,{viewBox:`0 0 ${x} ${p}`,width:`${x}px`,height:`${p}px`,ref:w,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:we,children:[ee.filter(t=>t.position==="before").map(t=>t.layer),v.features.map((t,r)=>{if(!t.properties?.[R])return null;const g=U(t);return g?o.jsxRuntimeExports.jsx(et.motion.g,{opacity:T?N:k.length!==0?k.indexOf(t.properties[R])!==-1?1:N:1,children:o.jsxRuntimeExports.jsx("path",{d:g,style:{stroke:pe,strokeWidth:F,fill:K}})},r):null}),o.jsxRuntimeExports.jsx(Bt.AnimatePresence,{children:e.map(t=>{const r=v.features.findIndex(j=>t.id===j.properties[R]);if(r===-1)return null;const g=U(v.features[r]);if(!g)return null;const b=kt.checkIfNullOrUndefined(t.x)?void 0:ae(t.x),m=kt.checkIfNullOrUndefined(t.y)?void 0:ie(t.y),C=b!==void 0&&m!==void 0?h[m][b]:K;return o.jsxRuntimeExports.jsx(et.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:T?T===C?1:N:k.length!==0?k.indexOf(t.id)!==-1?1:N:1,transition:{duration:S.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:S.duration}},onMouseEnter:j=>{te(t),$(j.clientY),oe(j.clientX),he?.(t)},onClick:()=>{(Q||y)&&(qt.isEqual(H,t)&&Ae?(c(void 0),Q?.(void 0)):(c(t),Q?.(t)))},onMouseMove:j=>{te(t),$(j.clientY),oe(j.clientX)},onMouseLeave:()=>{te(void 0),oe(void 0),$(void 0),he?.(void 0)},children:o.jsxRuntimeExports.jsx(et.motion.path,{d:g,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:S.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:S.duration}},className:`${C===K?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{stroke:pe,strokeWidth:F}},`${t.id}`)},t.id)})}),l?v.features.filter(t=>t.properties[R]===l.id).map((t,r)=>o.jsxRuntimeExports.jsx("path",{d:U(t)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},r)):null,ee.filter(t=>t.position==="after").map(t=>t.layer)]})}),fe===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:Fe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{be(!1)},children:o.jsxRuntimeExports.jsx(ft.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:"175px"},children:[o.jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center",children:[o.jsxRuntimeExports.jsx("svg",{width:"136px",viewBox:"0 0 136 136",className:"shrink-0",children:o.jsxRuntimeExports.jsxs("g",{children:[h.map((t,r)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${100-r*25})`,children:t.map((g,b)=>o.jsxRuntimeExports.jsx("rect",{y:1,x:b*25+1,fill:g,width:23,height:23,strokeWidth:T===g?2:.25,style:{cursor:"pointer"},onMouseOver:()=>{Ee(g)},onMouseLeave:()=>{Ee(void 0)}},b))},r)),o.jsxRuntimeExports.jsx("g",{transform:"translate(0,125)",children:u.map((t,r)=>o.jsxRuntimeExports.jsx("text",{y:10,x:(r+1)*25,fontSize:10,textAnchor:"middle",children:typeof t=="string"||t<1?t:Et.numberFormattingFunction(t,"NA")},r))}),Y.map((t,r)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(${Math.max(Math.min(u.length+1,5),4)*25+10},${100-r*25})`,children:o.jsxRuntimeExports.jsx("text",{x:0,transform:"rotate(-90)",y:0,fontSize:10,textAnchor:"middle",children:typeof t=="string"||t<1?t:Et.numberFormattingFunction(t,"NA")})},r))]})}),o.jsxRuntimeExports.jsx(bt._,{marginBottom:"none",size:"xs",className:"leading-normal text-center shrink-0",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",writingMode:"vertical-rl",height:"8.5rem",transform:"rotate(180deg)"},children:J})]}),o.jsxRuntimeExports.jsx(bt._,{marginBottom:"none",size:"xs",className:"mt-1 leading-normal text-center",style:{display:"-webkit-box",WebkitLineClamp:"1",width:"8.5rem",WebkitBoxOrient:"vertical",overflow:"hidden"},children:ze})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{be(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),D==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>se("in"),className:"leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>se("out"),className:"leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),l&&Z&&ke&&Ce?o.jsxRuntimeExports.jsx(zt.Tooltip,{data:l,body:Z,xPos:ke,yPos:Ce,backgroundStyle:Be?.tooltip,className:_?.tooltip}):null,y&&H!==void 0?o.jsxRuntimeExports.jsx(Pt.DetailsModal,{body:y,data:H,setData:c,className:_?.modal}):null]})}function Tt(a){const e=o.compilerRuntimeExports.c(121),{data:u,graphTitle:B,mapData:ze,colors:Y,sources:J,graphDescription:x,height:p,width:h,footNote:Pe,xDomain:E,yDomain:F,xColorLegendTitle:K,yColorLegendTitle:pe,tooltip:Z,scale:he,centerPoint:xe,padding:ge,mapBorderWidth:k,mapNoDataColor:Q,backgroundColor:R,mapBorderColor:Ae,relativeHeight:y,onSeriesMouseOver:fe,isWorldMap:Be,zoomScaleExtend:_,zoomTranslateExtend:L,graphID:D,showColorScale:S,highlightedIds:N,onSeriesMouseClick:ee,mapProperty:ye,graphDownload:ve,dataDownload:W,showAntarctica:je,language:v,minHeight:Fe,theme:be,ariaLabel:T,resetSelectionOnDoubleClick:Ee,detailsOnClick:H,styles:c,classNames:l,mapProjection:te,zoomInteraction:ke,animate:oe,dimmedOpacity:Ce,customLayers:$,timeline:w,collapseColorScaleByDefault:re,zoomAndCenterByHighlightedIds:we,projectionRotate:G,rewindCoordinatesInMapData:V}=a,f=ze===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":ze,O=Y===void 0?gt.Colors.light.bivariateColors.colors05x05:Y,ne=Pe===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":Pe,Re=K===void 0?"X Color key":K,De=pe===void 0?"Y Color key":pe,M=he===void 0?.95:he,Se=k===void 0?.5:k,U=Q===void 0?gt.Colors.light.graphNoData:Q,Ne=R===void 0?!1:R,Oe=Ae===void 0?gt.Colors.light.grays["gray-500"]:Ae,ae=Be===void 0?!0:Be;let ie;e[0]!==_?(ie=_===void 0?[.8,6]:_,e[0]=_,e[1]=ie):ie=e[1];const se=ie,t=S===void 0?!0:S;let r;e[2]!==N?(r=N===void 0?[]:N,e[2]=N,e[3]=r):r=e[3];const g=r,b=ye===void 0?"ISO3":ye,m=ve===void 0?!1:ve,C=W===void 0?!1:W,j=je===void 0?!1:je,Me=v===void 0?"en":v,q=Fe===void 0?0:Fe,tt=be===void 0?"light":be,ot=Ee===void 0?!0:Ee,rt=te===void 0?"naturalEarth":te,nt=ke===void 0?"button":ke,_e=oe===void 0?!1:oe,at=Ce===void 0?.3:Ce;let Le;e[4]!==$?(Le=$===void 0?[]:$,e[4]=$,e[5]=Le):Le=e[5];const it=Le;let We;e[6]!==w?(We=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,e[6]=w,e[7]=We):We=e[7];const n=We,st=we===void 0?!1:we;let Te;e[8]!==G?(Te=G===void 0?[0,0]:G,e[8]=G,e[9]=Te):Te=e[9];const lt=Te,ct=V===void 0?!0:V,[X,Dt]=s.useState(0),[qe,St]=s.useState(0),[I,Nt]=s.useState(n.autoplay);let Ie;if(e[10]!==u||e[11]!==n.dateFormat){let d;e[13]!==n.dateFormat?(d=P=>jt.parse(`${P.date}`,n.dateFormat||"yyyy",new Date).getTime(),e[13]=n.dateFormat,e[14]=d):d=e[14],Ie=[...new Set(u.filter(Zt).map(d))],Ie.sort(Kt),e[10]=u,e[11]=n.dateFormat,e[12]=Ie}else Ie=e[12];const i=Ie,[z,dt]=s.useState(n.autoplay?0:i.length-1),[le,Ot]=s.useState(void 0),ut=s.useRef(null),yt=s.useRef(null);let $e,Ge;e[15]===Symbol.for("react.memo_cache_sentinel")?($e=()=>{const d=new ResizeObserver(P=>{Dt(P[0].target.clientWidth||620),St(P[0].target.clientHeight||480)});return ut.current&&d.observe(ut.current),()=>d.disconnect()},Ge=[],e[15]=$e,e[16]=Ge):($e=e[15],Ge=e[16]),s.useEffect($e,Ge);let He;e[17]===Symbol.for("react.memo_cache_sentinel")?(He=d=>{Ot(d)},e[17]=He):He=e[17];const Ve=s.useEffectEvent(He);let Ue;e[18]!==f||e[19]!==Ve?(Ue=()=>{typeof f=="string"?Lt.fetchAndParseJSON(f).then(P=>{Ve(P)}):Ve(f)},e[18]=f,e[19]=Ve,e[20]=Ue):Ue=e[20];let Xe;e[21]!==f?(Xe=[f],e[21]=f,e[22]=Xe):Xe=e[22],s.useEffect(Ue,Xe);let Ye,Je;e[23]!==I||e[24]!==n.speed||e[25]!==i?(Ye=()=>{const d=setInterval(()=>{dt(P=>P<i.length-1?P+1:0)},(n.speed||2)*1e3);return I||clearInterval(d),()=>clearInterval(d)},Je=[i,I,n.speed],e[23]=I,e[24]=n.speed,e[25]=i,e[26]=Ye,e[27]=Je):(Ye=e[26],Je=e[27]),s.useEffect(Ye,Je);const mt=n.dateFormat||"yyyy";let Ke;e[28]!==z||e[29]!==mt||e[30]!==n.showOnlyActiveDate||e[31]!==i?(Ke=vt.getSliderMarks(i,z,n.showOnlyActiveDate,mt),e[28]=z,e[29]=mt,e[30]=n.showOnlyActiveDate,e[31]=i,e[32]=Ke):Ke=e[32];const Ze=Ke;if(E&&F&&(E.length!==O[0].length-1||F.length!==O.length-1))return console.error("the xDomain and yDomain array length don't match to the color array length"),null;const pt=l?.graphContainer,ht=c?.graphContainer;let ce;e[33]!==l?.description||e[34]!==l?.title||e[35]!==u||e[36]!==C||e[37]!==x||e[38]!==m||e[39]!==B||e[40]!==c?.description||e[41]!==c?.title||e[42]!==h?(ce=B||x||m||C?o.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:l?.title,description:l?.description},graphTitle:B,graphDescription:x,width:h,graphDownload:m?yt:void 0,dataDownload:C?u.map(Jt).filter(Yt).length>0?u.map(Xt).filter(Ut):u.filter(Vt):null}):null,e[33]=l?.description,e[34]=l?.title,e[35]=u,e[36]=C,e[37]=x,e[38]=m,e[39]=B,e[40]=c?.description,e[41]=c?.title,e[42]=h,e[43]=ce):ce=e[43];let de;e[44]!==z||e[45]!==Ze||e[46]!==I||e[47]!==n.enabled||e[48]!==i?(de=n.enabled&&i.length>0&&Ze?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Nt(!I)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":I?"Click to pause animation":"Click to play animation",children:I?o.jsxRuntimeExports.jsx(ft.Pause,{}):o.jsxRuntimeExports.jsx(ft.Play,{})}),o.jsxRuntimeExports.jsx(vt.Nr,{min:i[0],max:i[i.length-1],marks:Ze,step:null,defaultValue:i[i.length-1],value:i[z],onChangeComplete:d=>{dt(i.indexOf(d))},onChange:d=>{dt(i.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=z,e[45]=Ze,e[46]=I,e[47]=n.enabled,e[48]=i,e[49]=de):de=e[49];let ue;e[50]!==_e||e[51]!==xe||e[52]!==l||e[53]!==re||e[54]!==O||e[55]!==it||e[56]!==u||e[57]!==H||e[58]!==at||e[59]!==p||e[60]!==g||e[61]!==z||e[62]!==ae||e[63]!==Oe||e[64]!==Se||e[65]!==U||e[66]!==rt||e[67]!==b||e[68]!==le||e[69]!==q||e[70]!==ee||e[71]!==fe||e[72]!==lt||e[73]!==y||e[74]!==ot||e[75]!==ct||e[76]!==M||e[77]!==j||e[78]!==t||e[79]!==c||e[80]!==qe||e[81]!==X||e[82]!==n.dateFormat||e[83]!==n.enabled||e[84]!==Z||e[85]!==i||e[86]!==h||e[87]!==Re||e[88]!==E||e[89]!==De||e[90]!==F||e[91]!==st||e[92]!==nt||e[93]!==se||e[94]!==L?(ue=o.jsxRuntimeExports.jsx(Rt.GraphArea,{ref:ut,children:X&&qe&&le?o.jsxRuntimeExports.jsx(Wt,{data:u.filter(d=>n.enabled?d.date===jt.format(new Date(i[z]),n.dateFormat||"yyyy"):d),mapData:j?le:{...le,features:le.features.filter(Ht)},xDomain:E||wt.getJenks(u.map(Gt),O[0].length),yDomain:F||wt.getJenks(u.map($t),O.length),width:X,height:qe,scale:M,centerPoint:xe,colors:O,xColorLegendTitle:Re,yColorLegendTitle:De,mapBorderWidth:Se,mapNoDataColor:U,mapBorderColor:Oe,tooltip:Z,onSeriesMouseOver:fe,isWorldMap:ae,zoomScaleExtend:se,zoomTranslateExtend:L,onSeriesMouseClick:ee,mapProperty:b,highlightedIds:g,resetSelectionOnDoubleClick:ot,styles:c,showColorScale:t,classNames:l,mapProjection:rt||(ae?"naturalEarth":"mercator"),detailsOnClick:H,zoomInteraction:nt,animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:at,customLayers:it,collapseColorScaleByDefault:re,zoomAndCenterByHighlightedIds:st,projectionRotate:lt,rewindCoordinatesInMapData:ct}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,p||(y?q?(h||X)*y>q?(h||X)*y:q:(h||X)*y:qe))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Mt.w,{"aria-label":"Loading graph"})})}),e[50]=_e,e[51]=xe,e[52]=l,e[53]=re,e[54]=O,e[55]=it,e[56]=u,e[57]=H,e[58]=at,e[59]=p,e[60]=g,e[61]=z,e[62]=ae,e[63]=Oe,e[64]=Se,e[65]=U,e[66]=rt,e[67]=b,e[68]=le,e[69]=q,e[70]=ee,e[71]=fe,e[72]=lt,e[73]=y,e[74]=ot,e[75]=ct,e[76]=M,e[77]=j,e[78]=t,e[79]=c,e[80]=qe,e[81]=X,e[82]=n.dateFormat,e[83]=n.enabled,e[84]=Z,e[85]=i,e[86]=h,e[87]=Re,e[88]=E,e[89]=De,e[90]=F,e[91]=st,e[92]=nt,e[93]=se,e[94]=L,e[95]=ue):ue=e[95];let me;e[96]!==l?.footnote||e[97]!==l?.source||e[98]!==ne||e[99]!==J||e[100]!==c?.footnote||e[101]!==c?.source||e[102]!==h?(me=J||ne?o.jsxRuntimeExports.jsx(_t.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:J,footNote:ne,width:h}):null,e[96]=l?.footnote,e[97]=l?.source,e[98]=ne,e[99]=J,e[100]=c?.footnote,e[101]=c?.source,e[102]=h,e[103]=me):me=e[103];let Qe;return e[104]!==T||e[105]!==Ne||e[106]!==D||e[107]!==p||e[108]!==Me||e[109]!==q||e[110]!==ge||e[111]!==y||e[112]!==pt||e[113]!==ht||e[114]!==ce||e[115]!==de||e[116]!==ue||e[117]!==me||e[118]!==tt||e[119]!==h?(Qe=o.jsxRuntimeExports.jsxs(Rt.GraphContainer,{className:pt,style:ht,id:D,ref:yt,"aria-label":T,backgroundColor:Ne,theme:tt,language:Me,minHeight:q,width:h,height:p,relativeHeight:y,padding:ge,children:[ce,de,ue,me]}),e[104]=T,e[105]=Ne,e[106]=D,e[107]=p,e[108]=Me,e[109]=q,e[110]=ge,e[111]=y,e[112]=pt,e[113]=ht,e[114]=ce,e[115]=de,e[116]=ue,e[117]=me,e[118]=tt,e[119]=h,e[120]=Qe):Qe=e[120],Qe}function $t(a){return a.y}function Gt(a){return a.x}function Ht(a){return a.properties.NAME!=="Antarctica"}function Vt(a){return a!==void 0}function Ut(a){return a!==void 0}function Xt(a){return a.data}function Yt(a){return a!==void 0}function Jt(a){return a.data}function Kt(a,e){return a-e}function Zt(a){return a.date}exports.BiVariateChoroplethMap=Tt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("react"),vt=require("./getSliderMarks-CIuSoedo.cjs"),Mt=require("./Spinner-jTMOLuw_.cjs"),jt=require("./parse-xYI9yrvL.cjs"),qt=require("./index-DQA8q5sC.cjs"),A=require("./index-DLFt97gy.cjs"),It=require("./index-C5K--w8d.cjs"),bt=require("./Typography-Cc_iHQB-.cjs"),Et=require("./numberFormattingFunction-02t-wJta.cjs"),zt=require("./Tooltip-BLa2EfMs.cjs"),kt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ft=require("./index-sbKVyHS2.cjs"),Pt=require("./DetailsModal-DHttOA80.cjs"),xt=require("./select-Bnfk0lJx.cjs"),Ct=require("./threshold-DNsSUf8Q.cjs"),et=require("./proxy-C4-uo6nS.cjs"),At=require("./use-in-view-C3o_ntMv.cjs"),Bt=require("./index-CoobIWNj.cjs"),Ft=require("./GraphHeader.cjs"),_t=require("./GraphFooter.cjs"),gt=require("./Colors.cjs"),Lt=require("./fetchAndParseData-QTF6tjij.cjs"),wt=require("./getJenks-BzJvhy_H.cjs"),Rt=require("./GraphContainer-B1EDxJ0S.cjs");function Wt(a){const{data:e,xDomain:u,mapData:B,xColorLegendTitle:ze,yDomain:Y,yColorLegendTitle:J,width:x,height:p,colors:h,scale:Pe,centerPoint:E,mapBorderWidth:F,mapNoDataColor:K,mapBorderColor:pe,tooltip:Z,onSeriesMouseOver:he,zoomScaleExtend:xe,zoomTranslateExtend:ge,highlightedIds:k,onSeriesMouseClick:Q,mapProperty:R,resetSelectionOnDoubleClick:Ae,detailsOnClick:y,showColorScale:fe,styles:Be,classNames:_,mapProjection:L,zoomInteraction:D,animate:S,dimmedOpacity:N,customLayers:ee,collapseColorScaleByDefault:ye,zoomAndCenterByHighlightedIds:ve,projectionRotate:W,rewindCoordinatesInMapData:je}=a,v=s.useMemo(()=>je?A.index_default(B,{reverse:!0}):B,[B,je]),[Fe,be]=s.useState(ye===void 0?!(x<680):!ye),[T,Ee]=s.useState(void 0),[H,c]=s.useState(void 0),[l,te]=s.useState(void 0),[ke,oe]=s.useState(void 0),[Ce,$]=s.useState(void 0),w=s.useRef(null),re=At.useInView(w,{once:S.once,amount:S.amount}),we=s.useRef(null),G=s.useRef(null);s.useEffect(()=>{const t=xt.select(we.current),r=xt.select(w.current),g=m=>{if(D==="noZoom")return!1;if(D==="button")return!m.type.includes("wheel");const C=m.type==="wheel",j=m.type.startsWith("touch"),Me=m.type==="mousedown"||m.type==="mousemove";return j?!0:C?D==="scroll"?!0:m.ctrlKey:Me&&!m.button&&!m.ctrlKey},b=A.zoom().scaleExtent(xe).translateExtent(ge||[[-20,-20],[x+20,p+20]]).filter(g).on("zoom",({transform:m})=>{t.attr("transform",m)});r.call(b),G.current=b},[p,x,D]);const V=A.index_default$1({...v,features:ve?v.features.filter(t=>(k||[]).length===0||k.indexOf(t.properties[R])!==-1):v.features}),f=It.index_default({...v,features:ve?v.features.filter(t=>(k||[]).length===0||k.indexOf(t.properties[R])!==-1):v.features}),O=(V[2]-V[0])*1.15,ne=(V[3]-V[1])*1.15,Re=x*190/960*360/O,De=p*190/678*180/ne,M=Pe*Math.min(Re,De),Se=L==="mercator"?A.geoMercator().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="equalEarth"?A.geoEqualEarth().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="naturalEarth"?A.geoNaturalEarth1().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):L==="orthographic"?A.geoOrthographic().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M):A.geoAlbersUsa().rotate(W).center(E||f.geometry.coordinates).translate([x/2,p/2]).scale(M),U=A.geoPath().projection(Se),Ne=Array.from({length:u.length},(t,r)=>r),Oe=Array.from({length:Y.length},(t,r)=>r),ae=Ct.threshold().domain(u).range(Ne),ie=Ct.threshold().domain(Y).range(Oe),se=t=>{if(!w.current||!G.current)return;xt.select(w.current).call(G.current.scaleBy,t==="in"?1.2:1/1.2)};return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:"relative",children:[o.jsxRuntimeExports.jsx(et.motion.svg,{viewBox:`0 0 ${x} ${p}`,width:`${x}px`,height:`${p}px`,ref:w,direction:"ltr",children:o.jsxRuntimeExports.jsxs("g",{ref:we,children:[ee.filter(t=>t.position==="before").map(t=>t.layer),v.features.map((t,r)=>{if(!t.properties?.[R])return null;const g=U(t);return g?o.jsxRuntimeExports.jsx(et.motion.g,{opacity:T?N:k.length!==0?k.indexOf(t.properties[R])!==-1?1:N:1,children:o.jsxRuntimeExports.jsx("path",{d:g,style:{stroke:pe,strokeWidth:F,fill:K}})},r):null}),o.jsxRuntimeExports.jsx(Bt.AnimatePresence,{children:e.map(t=>{const r=v.features.findIndex(j=>t.id===j.properties[R]);if(r===-1)return null;const g=U(v.features[r]);if(!g)return null;const b=kt.checkIfNullOrUndefined(t.x)?void 0:ae(t.x),m=kt.checkIfNullOrUndefined(t.y)?void 0:ie(t.y),C=b!==void 0&&m!==void 0?h[m][b]:K;return o.jsxRuntimeExports.jsx(et.motion.g,{className:"undp-map-shapes",variants:{initial:{opacity:0},whileInView:{opacity:T?T===C?1:N:k.length!==0?k.indexOf(t.id)!==-1?1:N:1,transition:{duration:S.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:S.duration}},onMouseEnter:j=>{te(t),$(j.clientY),oe(j.clientX),he?.(t)},onClick:()=>{(Q||y)&&(qt.isEqual(H,t)&&Ae?(c(void 0),Q?.(void 0)):(c(t),Q?.(t)))},onMouseMove:j=>{te(t),$(j.clientY),oe(j.clientX)},onMouseLeave:()=>{te(void 0),oe(void 0),$(void 0),he?.(void 0)},children:o.jsxRuntimeExports.jsx(et.motion.path,{d:g,variants:{initial:{fill:C,opacity:0},whileInView:{fill:C,opacity:1,transition:{duration:S.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:S.duration}},className:`${C===K?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"stroke-primary-white dark:stroke-primary-gray-650"}`,style:{stroke:pe,strokeWidth:F}},`${t.id}`)},t.id)})}),l?v.features.filter(t=>t.properties[R]===l.id).map((t,r)=>o.jsxRuntimeExports.jsx("path",{d:U(t)||"",className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},r)):null,ee.filter(t=>t.position==="after").map(t=>t.layer)]})}),fe===!1?null:o.jsxRuntimeExports.jsx("div",{className:o.mo("absolute left-4 bottom-4 map-color-legend",_?.colorLegend),children:Fe?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx("div",{className:"color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",onClick:()=>{be(!1)},children:o.jsxRuntimeExports.jsx(ft.X,{})}),o.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:"175px"},children:[o.jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center",children:[o.jsxRuntimeExports.jsx("svg",{width:"136px",viewBox:"0 0 136 136",className:"shrink-0",children:o.jsxRuntimeExports.jsxs("g",{children:[h.map((t,r)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(0,${100-r*25})`,children:t.map((g,b)=>o.jsxRuntimeExports.jsx("rect",{y:1,x:b*25+1,fill:g,width:23,height:23,strokeWidth:T===g?2:.25,style:{cursor:"pointer"},onMouseOver:()=>{Ee(g)},onMouseLeave:()=>{Ee(void 0)}},b))},r)),o.jsxRuntimeExports.jsx("g",{transform:"translate(0,125)",children:u.map((t,r)=>o.jsxRuntimeExports.jsx("text",{y:10,x:(r+1)*25,fontSize:10,textAnchor:"middle",children:typeof t=="string"||t<1?t:Et.numberFormattingFunction(t,"NA")},r))}),Y.map((t,r)=>o.jsxRuntimeExports.jsx("g",{transform:`translate(${Math.max(Math.min(u.length+1,5),4)*25+10},${100-r*25})`,children:o.jsxRuntimeExports.jsx("text",{x:0,transform:"rotate(-90)",y:0,fontSize:10,textAnchor:"middle",children:typeof t=="string"||t<1?t:Et.numberFormattingFunction(t,"NA")})},r))]})}),o.jsxRuntimeExports.jsx(bt._,{marginBottom:"none",size:"xs",className:"leading-normal text-center shrink-0",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",writingMode:"vertical-rl",height:"8.5rem",transform:"rotate(180deg)"},children:J})]}),o.jsxRuntimeExports.jsx(bt._,{marginBottom:"none",size:"xs",className:"mt-1 leading-normal text-center",style:{display:"-webkit-box",WebkitLineClamp:"1",width:"8.5rem",WebkitBoxOrient:"vertical",overflow:"hidden"},children:ze})]})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{be(!0)},children:o.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),D==="button"&&o.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col zoom-buttons",children:[o.jsxRuntimeExports.jsx("button",{onClick:()=>se("in"),className:"leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),o.jsxRuntimeExports.jsx("button",{onClick:()=>se("out"),className:"leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),l&&Z&&ke&&Ce?o.jsxRuntimeExports.jsx(zt.Tooltip,{data:l,body:Z,xPos:ke,yPos:Ce,backgroundStyle:Be?.tooltip,className:_?.tooltip}):null,y&&H!==void 0?o.jsxRuntimeExports.jsx(Pt.DetailsModal,{body:y,data:H,setData:c,className:_?.modal}):null]})}function Tt(a){const e=o.compilerRuntimeExports.c(121),{data:u,graphTitle:B,mapData:ze,colors:Y,sources:J,graphDescription:x,height:p,width:h,footNote:Pe,xDomain:E,yDomain:F,xColorLegendTitle:K,yColorLegendTitle:pe,tooltip:Z,scale:he,centerPoint:xe,padding:ge,mapBorderWidth:k,mapNoDataColor:Q,backgroundColor:R,mapBorderColor:Ae,relativeHeight:y,onSeriesMouseOver:fe,isWorldMap:Be,zoomScaleExtend:_,zoomTranslateExtend:L,graphID:D,showColorScale:S,highlightedIds:N,onSeriesMouseClick:ee,mapProperty:ye,graphDownload:ve,dataDownload:W,showAntarctica:je,language:v,minHeight:Fe,theme:be,ariaLabel:T,resetSelectionOnDoubleClick:Ee,detailsOnClick:H,styles:c,classNames:l,mapProjection:te,zoomInteraction:ke,animate:oe,dimmedOpacity:Ce,customLayers:$,timeline:w,collapseColorScaleByDefault:re,zoomAndCenterByHighlightedIds:we,projectionRotate:G,rewindCoordinatesInMapData:V}=a,f=ze===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json":ze,O=Y===void 0?gt.Colors.light.bivariateColors.colors05x05:Y,ne=Pe===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":Pe,Re=K===void 0?"X Color key":K,De=pe===void 0?"Y Color key":pe,M=he===void 0?.95:he,Se=k===void 0?.5:k,U=Q===void 0?gt.Colors.light.graphNoData:Q,Ne=R===void 0?!1:R,Oe=Ae===void 0?gt.Colors.light.grays["gray-500"]:Ae,ae=Be===void 0?!0:Be;let ie;e[0]!==_?(ie=_===void 0?[.8,6]:_,e[0]=_,e[1]=ie):ie=e[1];const se=ie,t=S===void 0?!0:S;let r;e[2]!==N?(r=N===void 0?[]:N,e[2]=N,e[3]=r):r=e[3];const g=r,b=ye===void 0?"ISO3":ye,m=ve===void 0?!1:ve,C=W===void 0?!1:W,j=je===void 0?!1:je,Me=v===void 0?"en":v,q=Fe===void 0?0:Fe,tt=be===void 0?"light":be,ot=Ee===void 0?!0:Ee,rt=te===void 0?"naturalEarth":te,nt=ke===void 0?"button":ke,_e=oe===void 0?!1:oe,at=Ce===void 0?.3:Ce;let Le;e[4]!==$?(Le=$===void 0?[]:$,e[4]=$,e[5]=Le):Le=e[5];const it=Le;let We;e[6]!==w?(We=w===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:w,e[6]=w,e[7]=We):We=e[7];const n=We,st=we===void 0?!1:we;let Te;e[8]!==G?(Te=G===void 0?[0,0]:G,e[8]=G,e[9]=Te):Te=e[9];const lt=Te,ct=V===void 0?!0:V,[X,Dt]=s.useState(0),[qe,St]=s.useState(0),[I,Nt]=s.useState(n.autoplay);let Ie;if(e[10]!==u||e[11]!==n.dateFormat){let d;e[13]!==n.dateFormat?(d=P=>jt.parse(`${P.date}`,n.dateFormat||"yyyy",new Date).getTime(),e[13]=n.dateFormat,e[14]=d):d=e[14],Ie=[...new Set(u.filter(Zt).map(d))],Ie.sort(Kt),e[10]=u,e[11]=n.dateFormat,e[12]=Ie}else Ie=e[12];const i=Ie,[z,dt]=s.useState(n.autoplay?0:i.length-1),[le,Ot]=s.useState(void 0),ut=s.useRef(null),yt=s.useRef(null);let $e,Ge;e[15]===Symbol.for("react.memo_cache_sentinel")?($e=()=>{const d=new ResizeObserver(P=>{Dt(P[0].target.clientWidth||620),St(P[0].target.clientHeight||480)});return ut.current&&d.observe(ut.current),()=>d.disconnect()},Ge=[],e[15]=$e,e[16]=Ge):($e=e[15],Ge=e[16]),s.useEffect($e,Ge);let He;e[17]===Symbol.for("react.memo_cache_sentinel")?(He=d=>{Ot(d)},e[17]=He):He=e[17];const Ve=s.useEffectEvent(He);let Ue;e[18]!==f||e[19]!==Ve?(Ue=()=>{typeof f=="string"?Lt.fetchAndParseJSON(f).then(P=>{Ve(P)}):Ve(f)},e[18]=f,e[19]=Ve,e[20]=Ue):Ue=e[20];let Xe;e[21]!==f?(Xe=[f],e[21]=f,e[22]=Xe):Xe=e[22],s.useEffect(Ue,Xe);let Ye,Je;e[23]!==I||e[24]!==n.speed||e[25]!==i?(Ye=()=>{const d=setInterval(()=>{dt(P=>P<i.length-1?P+1:0)},(n.speed||2)*1e3);return I||clearInterval(d),()=>clearInterval(d)},Je=[i,I,n.speed],e[23]=I,e[24]=n.speed,e[25]=i,e[26]=Ye,e[27]=Je):(Ye=e[26],Je=e[27]),s.useEffect(Ye,Je);const mt=n.dateFormat||"yyyy";let Ke;e[28]!==z||e[29]!==mt||e[30]!==n.showOnlyActiveDate||e[31]!==i?(Ke=vt.getSliderMarks(i,z,n.showOnlyActiveDate,mt),e[28]=z,e[29]=mt,e[30]=n.showOnlyActiveDate,e[31]=i,e[32]=Ke):Ke=e[32];const Ze=Ke;if(E&&F&&(E.length!==O[0].length-1||F.length!==O.length-1))return console.error("the xDomain and yDomain array length don't match to the color array length"),null;const pt=l?.graphContainer,ht=c?.graphContainer;let ce;e[33]!==l?.description||e[34]!==l?.title||e[35]!==u||e[36]!==C||e[37]!==x||e[38]!==m||e[39]!==B||e[40]!==c?.description||e[41]!==c?.title||e[42]!==h?(ce=B||x||m||C?o.jsxRuntimeExports.jsx(Ft.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:l?.title,description:l?.description},graphTitle:B,graphDescription:x,width:h,graphDownload:m?yt:void 0,dataDownload:C?u.map(Jt).filter(Yt).length>0?u.map(Xt).filter(Ut):u.filter(Vt):null}):null,e[33]=l?.description,e[34]=l?.title,e[35]=u,e[36]=C,e[37]=x,e[38]=m,e[39]=B,e[40]=c?.description,e[41]=c?.title,e[42]=h,e[43]=ce):ce=e[43];let de;e[44]!==z||e[45]!==Ze||e[46]!==I||e[47]!==n.enabled||e[48]!==i?(de=n.enabled&&i.length>0&&Ze?o.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[o.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Nt(!I)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":I?"Click to pause animation":"Click to play animation",children:I?o.jsxRuntimeExports.jsx(ft.Pause,{}):o.jsxRuntimeExports.jsx(ft.Play,{})}),o.jsxRuntimeExports.jsx(vt.Nr,{min:i[0],max:i[i.length-1],marks:Ze,step:null,defaultValue:i[i.length-1],value:i[z],onChangeComplete:d=>{dt(i.indexOf(d))},onChange:d=>{dt(i.indexOf(d))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,e[44]=z,e[45]=Ze,e[46]=I,e[47]=n.enabled,e[48]=i,e[49]=de):de=e[49];let ue;e[50]!==_e||e[51]!==xe||e[52]!==l||e[53]!==re||e[54]!==O||e[55]!==it||e[56]!==u||e[57]!==H||e[58]!==at||e[59]!==p||e[60]!==g||e[61]!==z||e[62]!==ae||e[63]!==Oe||e[64]!==Se||e[65]!==U||e[66]!==rt||e[67]!==b||e[68]!==le||e[69]!==q||e[70]!==ee||e[71]!==fe||e[72]!==lt||e[73]!==y||e[74]!==ot||e[75]!==ct||e[76]!==M||e[77]!==j||e[78]!==t||e[79]!==c||e[80]!==qe||e[81]!==X||e[82]!==n.dateFormat||e[83]!==n.enabled||e[84]!==Z||e[85]!==i||e[86]!==h||e[87]!==Re||e[88]!==E||e[89]!==De||e[90]!==F||e[91]!==st||e[92]!==nt||e[93]!==se||e[94]!==L?(ue=o.jsxRuntimeExports.jsx(Rt.GraphArea,{ref:ut,children:X&&qe&&le?o.jsxRuntimeExports.jsx(Wt,{data:u.filter(d=>n.enabled?d.date===jt.format(new Date(i[z]),n.dateFormat||"yyyy"):d),mapData:j?le:{...le,features:le.features.filter(Ht)},xDomain:E||wt.getJenks(u.map(Gt),O[0].length),yDomain:F||wt.getJenks(u.map($t),O.length),width:X,height:qe,scale:M,centerPoint:xe,colors:O,xColorLegendTitle:Re,yColorLegendTitle:De,mapBorderWidth:Se,mapNoDataColor:U,mapBorderColor:Oe,tooltip:Z,onSeriesMouseOver:fe,isWorldMap:ae,zoomScaleExtend:se,zoomTranslateExtend:L,onSeriesMouseClick:ee,mapProperty:b,highlightedIds:g,resetSelectionOnDoubleClick:ot,styles:c,showColorScale:t,classNames:l,mapProjection:rt||(ae?"naturalEarth":"mercator"),detailsOnClick:H,zoomInteraction:nt,animate:_e===!0?{duration:.5,once:!0,amount:.5}:_e||{duration:0,once:!0,amount:0},dimmedOpacity:at,customLayers:it,collapseColorScaleByDefault:re,zoomAndCenterByHighlightedIds:st,projectionRotate:lt,rewindCoordinatesInMapData:ct}):o.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(q,p||(y?q?(h||X)*y>q?(h||X)*y:q:(h||X)*y:qe))}px`},className:"flex items-center justify-center",children:o.jsxRuntimeExports.jsx(Mt.w,{"aria-label":"Loading graph"})})}),e[50]=_e,e[51]=xe,e[52]=l,e[53]=re,e[54]=O,e[55]=it,e[56]=u,e[57]=H,e[58]=at,e[59]=p,e[60]=g,e[61]=z,e[62]=ae,e[63]=Oe,e[64]=Se,e[65]=U,e[66]=rt,e[67]=b,e[68]=le,e[69]=q,e[70]=ee,e[71]=fe,e[72]=lt,e[73]=y,e[74]=ot,e[75]=ct,e[76]=M,e[77]=j,e[78]=t,e[79]=c,e[80]=qe,e[81]=X,e[82]=n.dateFormat,e[83]=n.enabled,e[84]=Z,e[85]=i,e[86]=h,e[87]=Re,e[88]=E,e[89]=De,e[90]=F,e[91]=st,e[92]=nt,e[93]=se,e[94]=L,e[95]=ue):ue=e[95];let me;e[96]!==l?.footnote||e[97]!==l?.source||e[98]!==ne||e[99]!==J||e[100]!==c?.footnote||e[101]!==c?.source||e[102]!==h?(me=J||ne?o.jsxRuntimeExports.jsx(_t.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:J,footNote:ne,width:h}):null,e[96]=l?.footnote,e[97]=l?.source,e[98]=ne,e[99]=J,e[100]=c?.footnote,e[101]=c?.source,e[102]=h,e[103]=me):me=e[103];let Qe;return e[104]!==T||e[105]!==Ne||e[106]!==D||e[107]!==p||e[108]!==Me||e[109]!==q||e[110]!==ge||e[111]!==y||e[112]!==pt||e[113]!==ht||e[114]!==ce||e[115]!==de||e[116]!==ue||e[117]!==me||e[118]!==tt||e[119]!==h?(Qe=o.jsxRuntimeExports.jsxs(Rt.GraphContainer,{className:pt,style:ht,id:D,ref:yt,"aria-label":T,backgroundColor:Ne,theme:tt,language:Me,minHeight:q,width:h,height:p,relativeHeight:y,padding:ge,children:[ce,de,ue,me]}),e[104]=T,e[105]=Ne,e[106]=D,e[107]=p,e[108]=Me,e[109]=q,e[110]=ge,e[111]=y,e[112]=pt,e[113]=ht,e[114]=ce,e[115]=de,e[116]=ue,e[117]=me,e[118]=tt,e[119]=h,e[120]=Qe):Qe=e[120],Qe}function $t(a){return a.y}function Gt(a){return a.x}function Ht(a){return a.properties.NAME!=="Antarctica"}function Vt(a){return a!==void 0}function Ut(a){return a!==void 0}function Xt(a){return a.data}function Yt(a){return a!==void 0}function Jt(a){return a.data}function Kt(a,e){return a-e}function Zt(a){return a.date}exports.BiVariateChoroplethMap=Tt;
|
|
2
2
|
//# sourceMappingURL=BiVariateChoroplethMap.cjs.map
|
|
@@ -6,7 +6,7 @@ import { f as Bt, p as Lt } from "./parse-Dv4of-PN.js";
|
|
|
6
6
|
import { i as _t } from "./index-Bwrro8-q.js";
|
|
7
7
|
import { i as Wt, z as Ft, a as Tt, g as $t, b as Ht, c as Rt, d as Gt, e as Vt, f as Ut } from "./index-Dp_SfsUA.js";
|
|
8
8
|
import { i as Xt } from "./index-DCsFBfJ_.js";
|
|
9
|
-
import { _ as vt } from "./Typography-
|
|
9
|
+
import { _ as vt } from "./Typography-CdMGooqp.js";
|
|
10
10
|
import { n as bt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
11
11
|
import { T as Yt } from "./Tooltip-BRnAz2Gv.js";
|
|
12
12
|
import { c as kt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
package/dist/BulletChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),B=require("react"),He=require("./index-Cno4Q0YE.cjs"),Ce=require("./parse-xYI9yrvL.cjs"),Le=require("./getSliderMarks-CIuSoedo.cjs"),De=require("./index-DQA8q5sC.cjs"),Ne=require("./index-CSNtgibC.cjs"),ze=require("./numberFormattingFunction-02t-wJta.cjs"),Te=require("./Tooltip-BLa2EfMs.cjs"),b=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./Axis-Jt_tmhxS.cjs"),Ue=require("./AxisTitle-DV4n0RxE.cjs"),Je=require("./XAxesLabels-C6o9jJal.cjs"),Be=require("./ReferenceLine-M9aP3dj-.cjs"),Ke=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Qe=require("./XTicksAndGridLines-CekrPykD.cjs"),Ze=require("./YAxesLabels-BQ2aCazV.cjs"),Pe=require("./DetailsModal-DHttOA80.cjs"),Ge=require("./linear-CgUCbw9F.cjs"),We=require("./band-VYfcZeJ2.cjs"),Mt=require("./proxy-C4-uo6nS.cjs"),Xe=require("./use-in-view-C3o_ntMv.cjs"),Ye=require("./index-CoobIWNj.cjs"),Ee=require("./Colors.cjs"),_e=require("./EmptyState-DX0t62iF.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ti=require("./GraphFooter.cjs"),ei=require("./GraphHeader.cjs"),ii=require("./ColorLegend.cjs"),Se=require("./ensureCompleteData-D9bQTiVS.cjs"),$e=require("./index-sbKVyHS2.cjs");function ni(e){const t=a.compilerRuntimeExports.c(162),{data:i,width:kt,height:ae,barColor:Wt,suffix:Rt,prefix:V,barPadding:Xt,showLabels:Yt,showValues:se,showTicks:Ot,truncateBy:le,leftMargin:de,rightMargin:Ht,topMargin:re,bottomMargin:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,maxValue:v,minValue:vt,highlightedDataPoints:it,onSeriesMouseClick:ct,labelOrder:R,maxBarThickness:Jt,minBarThickness:Nt,resetSelectionOnDoubleClick:Kt,detailsOnClick:xt,barAxisTitle:P,valueColor:nt,noOfTicks:Vt,styles:p,classNames:r,targetStyle:m,targetColor:G,qualitativeRangeColors:at,measureBarWidthFactor:g,animate:o,dimmedOpacity:x,precision:mt,customLayers:st,naLabel:E,targetLineThickness:oe,hideAxisLine:ue}=e,lt=de===void 0?20:de,Qt=Ht===void 0?20:Ht,Zt=re===void 0?20:re,fe=ge===void 0?25:ge,ye=B.useRef(null);let he;t[0]!==o.amount||t[1]!==o.once?(he={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=he):he=t[2];const C=Xe.useInView(ye,he),W=P?lt+30:lt;let dt;t[3]!==fe||t[4]!==Qt||t[5]!==W||t[6]!==Zt?(dt={top:Zt,bottom:fe,left:W,right:Qt},t[3]=fe,t[4]=Qt,t[5]=W,t[6]=Zt,t[7]=dt):dt=t[7];const y=dt,[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),[_t,te]=B.useState(void 0),d=kt-y.left-y.right,Ct=ae-y.top-y.bottom;let z;t[8]!==i?(z=Math.max(...i.filter(Ni).map(Ii))<0?0:Math.max(...i.filter(Oi).map(Ri)),t[8]=i,t[9]=z):z=t[9];const ee=z;let zt;t[10]!==i?(zt=Math.max(...i.filter(ki).map(Mi))<0?0:Math.max(...i.filter(Ai).map(ji)),t[10]=i,t[11]=zt):zt=t[11];const Lt=zt;let qt;t[12]!==i?(qt=Math.max(...i.map(vi)),t[12]=i,t[13]=qt):qt=t[13];const St=qt;let $t;t[14]!==ee||t[15]!==v||t[16]!==St||t[17]!==Lt?($t=b.checkIfNullOrUndefined(v)?Math.max(...[ee,Lt,St].filter(Number.isFinite))<0?0:Math.max(...[ee,Lt,St].filter(Number.isFinite)):v,t[14]=ee,t[15]=v,t[16]=St,t[17]=Lt,t[18]=$t):$t=t[18];const Dt=$t;let ie;t[19]!==i?(ie=Math.min(...i.filter(bi).map(yi))>=0?0:Math.min(...i.filter(gi).map(pi)),t[19]=i,t[20]=ie):ie=t[20];const Tt=ie;let Ft;t[21]!==i?(Ft=Math.min(...i.filter(hi).map(fi))>=0?0:Math.min(...i.filter(di).map(mi)),t[21]=i,t[22]=Ft):Ft=t[22];const Ut=Ft;let wt;t[23]!==Tt||t[24]!==vt||t[25]!==Ut?(wt=b.checkIfNullOrUndefined(vt)?Math.min(...[Tt,Ut].filter(Number.isFinite))>=0?0:Math.min(...[Tt,Ut].filter(Number.isFinite)):vt,t[23]=Tt,t[24]=vt,t[25]=Ut,t[26]=wt):wt=t[26];const M=wt;let L;if(t[27]!==i||t[28]!==R){const c=new Set,s=i.map((T,w)=>{const At=R?`${T.label}`:`${w}`;return c.add(At),{...T,id:At}}),I=R?R.filter(T=>!c.has(T)):[];L=[...s,...I.map(xi)],t[27]=i,t[28]=R,t[29]=L}else L=t[29];const ht=L;let rt;t[30]!==ht||t[31]!==R?(rt=R??ht.map(ci),t[30]=ht,t[31]=R,t[32]=rt):rt=t[32];const jt=rt;let ot,q,X,Y,S,H,J,k,O,j,A,K,Q,Z;if(t[33]!==o||t[34]!==P||t[35]!==Wt||t[36]!==jt||t[37]!==Xt||t[38]!==r?.graphObjectValues||t[39]!==r?.xAxis?.axis||t[40]!==r?.xAxis?.labels||t[41]!==r?.yAxis?.gridLines||t[42]!==r?.yAxis?.labels||t[43]!==r?.yAxis?.title||t[44]!==st||t[45]!==ht||t[46]!==xt||t[47]!==x||t[48]!==Ct||t[49]!==d||t[50]!==ae||t[51]!==ue||t[52]!==it||t[53]!==C||t[54]!==lt||t[55]!==y.bottom||t[56]!==y.left||t[57]!==y.right||t[58]!==y.top||t[59]!==Jt||t[60]!==g||t[61]!==Nt||t[62]!==N||t[63]!==E||t[64]!==Vt||t[65]!==ct||t[66]!==bt||t[67]!==mt||t[68]!==V||t[69]!==at||t[70]!==It||t[71]!==Kt||t[72]!==Yt||t[73]!==Ot||t[74]!==se||t[75]!==p?.graphObjectValues||t[76]!==p?.xAxis?.axis||t[77]!==p?.xAxis?.labels||t[78]!==p?.yAxis?.gridLines||t[79]!==p?.yAxis?.labels||t[80]!==p?.yAxis?.title||t[81]!==Rt||t[82]!==G||t[83]!==oe||t[84]!==m||t[85]!==le||t[86]!==nt||t[87]!==kt||t[88]!==Dt||t[89]!==M){const c=Ge.linear().domain([M,Dt]).range([Ct,0]).nice(),s=We.band().domain(jt).range([0,Nt?Math.max(d,Nt*jt.length):Jt?Math.min(d,Jt*jt.length):d]).paddingInner(Xt),I=c.ticks(Vt);q=Mt.motion.svg,j=`${kt}px`,A=`${ae}px`,K=`0 0 ${kt} ${ae}`,Q="ltr",Z=ye,S=`translate(${y.left},${y.top})`;let T;t[104]!==E||t[105]!==mt||t[106]!==V||t[107]!==Ot||t[108]!==Rt||t[109]!==M?(T=Ot?ze.numberFormattingFunction(M<0?0:M,E,mt,V,Rt):void 0,t[104]=E,t[105]=mt,t[106]=V,t[107]=Ot,t[108]=Rt,t[109]=M,t[110]=T):T=t[110];const w=r?.xAxis?.axis,At=r?.yAxis?.labels;let et;t[111]!==w||t[112]!==At?(et={axis:w,label:At},t[111]=w,t[112]=At,t[113]=et):et=t[113];const f=p?.xAxis?.axis,F=p?.yAxis?.labels;let Bt;t[114]!==f||t[115]!==F?(Bt={axis:f,label:F},t[114]=f,t[115]=F,t[116]=Bt):Bt=t[116],H=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:ue,y1:c(M<0?0:M),y2:c(M<0?0:M),x1:0-lt,x2:d+y.right,label:T,labelPos:{x:0-lt,dx:0,dy:Dt<0?"1em":-5,y:c(M<0?0:M)},classNames:et,styles:Bt}),J=Ot?a.jsxRuntimeExports.jsx(Ke.YTicksAndGridLines,{values:I.filter(ui),y:I.filter(oi).map(l=>c(l)),x1:0-lt,x2:d+y.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:r?.yAxis?.gridLines,labels:r?.yAxis?.labels},suffix:Rt,prefix:V,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:mt}):null;const ne=0-lt-15,Pt=Ct/2,n=p?.yAxis?.title,U=r?.yAxis?.title;t[117]!==P||t[118]!==ne||t[119]!==Pt||t[120]!==n||t[121]!==U?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:ne,y:Pt,style:n,className:U,text:P,rotate90:!0}),t[117]=P,t[118]=ne,t[119]=Pt,t[120]=n,t[121]=U,t[122]=k):k=t[122],t[123]!==st?(O=st.filter(ri).map(li),t[123]=st,t[124]=O):O=t[124],ot=Ye.AnimatePresence,X=ht.map(l=>b.checkIfNullOrUndefined(s(l.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:gt=>{ce(l),te(gt.clientY),pe(gt.clientX),bt?.(l)},onClick:()=>{(ct||xt)&&(De.isEqual(N,l)&&Kt?(xe(void 0),ct?.(void 0)):(xe(l),ct?.(l)))},onMouseMove:gt=>{ce(l),te(gt.clientY),pe(gt.clientX)},onMouseLeave:()=>{ce(void 0),pe(void 0),te(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85},whileInView:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:[l.qualitativeRange?l.qualitativeRange.map((gt,Gt)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0),fill:at[Gt]},whileInView:{height:Math.abs(c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be)))-c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<Gt&&be)))),y:c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be))),fill:at[Gt],transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",width:s.bandwidth()},Gt)):null,l.target&&m==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{height:0,y:c(0),fill:G,transition:{duration:o.duration}},variants:{initial:{height:0,fill:G,y:c(0)},whileInView:{height:Math.abs(c(l.target)-c(0)),fill:G,y:l.target>0?c(l.target):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:s.bandwidth()*((1-g)/2),width:s.bandwidth()*g,style:{fill:Wt},exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0)},whileInView:{height:Math.abs(c(l.size)-c(0)),y:l.size>0?c(l.size):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.target&&m==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{y:c(0),opacity:0,fill:G,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:G},whileInView:{y:c(l.target)-oe/2,opacity:1,fill:G,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",height:oe}):null,Yt?a.jsxRuntimeExports.jsx(Je.XAxesLabels,{value:`${l.label}`.length<le?`${l.label}`:`${`${l.label}`.substring(0,le)}...`,y:(l.size||0)<0?0:c(0)+5,x:0,width:s.bandwidth(),height:(l.size||0)<0?c(0)-5:y.bottom,style:p?.xAxis?.labels,className:r?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:o,isInView:C}):null,se?a.jsxRuntimeExports.jsx(Mt.motion.text,{x:s.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!nt&&Wt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",r?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:nt||Wt},whileInView:{y:c(l.size||0),opacity:1,fill:nt||Wt,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:ze.numberFormattingFunction(l.size,E,mt,V,Rt)}):null]},l.label)),Y=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((l,gt)=>a.jsxRuntimeExports.jsx(Be.RefLineY,{text:l.text,color:l.color,y:c(l.value),x1:0-lt,x2:d+y.right,classNames:l.classNames,styles:l.styles,animate:o,isInView:C},gt))}):null,t[33]=o,t[34]=P,t[35]=Wt,t[36]=jt,t[37]=Xt,t[38]=r?.graphObjectValues,t[39]=r?.xAxis?.axis,t[40]=r?.xAxis?.labels,t[41]=r?.yAxis?.gridLines,t[42]=r?.yAxis?.labels,t[43]=r?.yAxis?.title,t[44]=st,t[45]=ht,t[46]=xt,t[47]=x,t[48]=Ct,t[49]=d,t[50]=ae,t[51]=ue,t[52]=it,t[53]=C,t[54]=lt,t[55]=y.bottom,t[56]=y.left,t[57]=y.right,t[58]=y.top,t[59]=Jt,t[60]=g,t[61]=Nt,t[62]=N,t[63]=E,t[64]=Vt,t[65]=ct,t[66]=bt,t[67]=mt,t[68]=V,t[69]=at,t[70]=It,t[71]=Kt,t[72]=Yt,t[73]=Ot,t[74]=se,t[75]=p?.graphObjectValues,t[76]=p?.xAxis?.axis,t[77]=p?.xAxis?.labels,t[78]=p?.yAxis?.gridLines,t[79]=p?.yAxis?.labels,t[80]=p?.yAxis?.title,t[81]=Rt,t[82]=G,t[83]=oe,t[84]=m,t[85]=le,t[86]=nt,t[87]=kt,t[88]=Dt,t[89]=M,t[90]=ot,t[91]=q,t[92]=X,t[93]=Y,t[94]=S,t[95]=H,t[96]=J,t[97]=k,t[98]=O,t[99]=j,t[100]=A,t[101]=K,t[102]=Q,t[103]=Z}else ot=t[90],q=t[91],X=t[92],Y=t[93],S=t[94],H=t[95],J=t[96],k=t[97],O=t[98],j=t[99],A=t[100],K=t[101],Q=t[102],Z=t[103];let _;t[125]!==ot||t[126]!==X||t[127]!==Y?(_=a.jsxRuntimeExports.jsxs(ot,{children:[X,Y]}),t[125]=ot,t[126]=X,t[127]=Y,t[128]=_):_=t[128];let $;t[129]!==st?($=st.filter(si).map(ai),t[129]=st,t[130]=$):$=t[130];let u;t[131]!==S||t[132]!==H||t[133]!==J||t[134]!==k||t[135]!==O||t[136]!==_||t[137]!==$?(u=a.jsxRuntimeExports.jsxs("g",{transform:S,children:[H,J,k,O,_,$]}),t[131]=S,t[132]=H,t[133]=J,t[134]=k,t[135]=O,t[136]=_,t[137]=$,t[138]=u):u=t[138];let tt;t[139]!==q||t[140]!==j||t[141]!==A||t[142]!==K||t[143]!==Q||t[144]!==Z||t[145]!==u?(tt=a.jsxRuntimeExports.jsx(q,{width:j,height:A,viewBox:K,direction:Q,ref:Z,children:u}),t[139]=q,t[140]=j,t[141]=A,t[142]=K,t[143]=Q,t[144]=Z,t[145]=u,t[146]=tt):tt=t[146];let D;t[147]!==r?.tooltip||t[148]!==Et||t[149]!==_t||t[150]!==ft||t[151]!==p?.tooltip||t[152]!==yt?(D=ft&&yt&&Et&&_t?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:ft,body:yt,xPos:Et,yPos:_t,backgroundStyle:p?.tooltip,className:r?.tooltip}):null,t[147]=r?.tooltip,t[148]=Et,t[149]=_t,t[150]=ft,t[151]=p?.tooltip,t[152]=yt,t[153]=D):D=t[153];let pt;t[154]!==r?.modal||t[155]!==xt||t[156]!==N?(pt=xt&&N!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:xt,data:N,setData:xe,className:r?.modal}):null,t[154]=r?.modal,t[155]=xt,t[156]=N,t[157]=pt):pt=t[157];let ut;return t[158]!==tt||t[159]!==D||t[160]!==pt?(ut=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[tt,D,pt]}),t[158]=tt,t[159]=D,t[160]=pt,t[161]=ut):ut=t[161],ut}function ai(e){return e.layer}function si(e){return e.position==="after"}function li(e){return e.layer}function ri(e){return e.position==="before"}function oi(e){return e!==0}function ui(e){return e!==0}function ci(e){return`${e.id}`}function xi(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function mi(e){return e.target}function di(e){return!b.checkIfNullOrUndefined(e.target)}function fi(e){return e.target}function hi(e){return!b.checkIfNullOrUndefined(e.target)}function pi(e){return e.size}function gi(e){return!b.checkIfNullOrUndefined(e.size)}function yi(e){return e.size}function bi(e){return!b.checkIfNullOrUndefined(e.size)}function vi(e){return Ne.sum((e.qualitativeRange||[]).filter(wi))||0}function wi(e){return!b.checkIfNullOrUndefined(e)}function ji(e){return e.target}function Ai(e){return!b.checkIfNullOrUndefined(e.size)}function Mi(e){return e.target}function ki(e){return!b.checkIfNullOrUndefined(e.target)}function Ri(e){return e.size}function Oi(e){return!b.checkIfNullOrUndefined(e.size)}function Ii(e){return e.size}function Ni(e){return!b.checkIfNullOrUndefined(e.size)}function Vi(e){const t=a.compilerRuntimeExports.c(153),{data:i,topMargin:kt,bottomMargin:ae,leftMargin:Wt,rightMargin:Rt,barColor:V,suffix:Xt,prefix:Yt,barPadding:se,showValues:Ot,showTicks:le,truncateBy:de,width:Ht,height:re,showLabels:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,highlightedDataPoints:v,maxValue:vt,minValue:it,onSeriesMouseClick:ct,labelOrder:R,rtl:Jt,maxBarThickness:Nt,minBarThickness:Kt,resetSelectionOnDoubleClick:xt,detailsOnClick:P,barAxisTitle:nt,valueColor:Vt,noOfTicks:p,styles:r,classNames:m,targetStyle:G,targetColor:at,qualitativeRangeColors:g,measureBarWidthFactor:o,animate:x,dimmedOpacity:mt,precision:st,customLayers:E,naLabel:oe,targetLineThickness:ue,hideAxisLine:lt}=e,Qt=kt===void 0?25:kt,Zt=ae===void 0?10:ae,fe=Wt===void 0?100:Wt,ye=Rt===void 0?40:Rt,he=B.useRef(null);let C;t[0]!==x.amount||t[1]!==x.once?(C={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=C):C=t[2];const W=Xe.useInView(he,C),[dt,y]=B.useState(void 0),[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),_t=nt?Qt+25:Qt;let te;t[3]!==Zt||t[4]!==fe||t[5]!==ye||t[6]!==_t?(te={top:_t,bottom:Zt,left:fe,right:ye},t[3]=Zt,t[4]=fe,t[5]=ye,t[6]=_t,t[7]=te):te=t[7];const d=te,Ct=Ht-d.left-d.right,z=re-d.top-d.bottom;let ee;t[8]!==i?(ee=Math.max(...i.filter(nn).map(en))<0?0:Math.max(...i.filter(tn).map(_i)),t[8]=i,t[9]=ee):ee=t[9];const zt=ee;let Lt;t[10]!==i?(Lt=Math.max(...i.filter(Zi).map(Qi))<0?0:Math.max(...i.filter(Ki).map(Ji)),t[10]=i,t[11]=Lt):Lt=t[11];const qt=Lt;let St;t[12]!==i?(St=Math.max(...i.map(Yi)),t[12]=i,t[13]=St):St=t[13];const $t=St;let Dt;t[14]!==zt||t[15]!==vt||t[16]!==$t||t[17]!==qt?(Dt=b.checkIfNullOrUndefined(vt)?Math.max(...[zt,qt,$t].filter(Number.isFinite))<0?0:Math.max(...[zt,qt,$t].filter(Number.isFinite)):vt,t[14]=zt,t[15]=vt,t[16]=$t,t[17]=qt,t[18]=Dt):Dt=t[18];const ie=Dt;let Tt;t[19]!==i?(Tt=Math.min(...i.filter(Xi).map(Wi))>=0?0:Math.min(...i.filter(Gi).map(Pi)),t[19]=i,t[20]=Tt):Tt=t[20];const Ft=Tt;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(Bi).map(Ui))>=0?0:Math.min(...i.filter(Fi).map(Ti)),t[21]=i,t[22]=Ut):Ut=t[22];const wt=Ut;let M;t[23]!==Ft||t[24]!==it||t[25]!==wt?(M=b.checkIfNullOrUndefined(it)?Math.min(...[Ft,wt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,wt].filter(Number.isFinite)):it,t[23]=Ft,t[24]=it,t[25]=wt,t[26]=M):M=t[26];const L=M;let ht;if(t[27]!==i||t[28]!==R){const s=new Set,I=i.map((w,At)=>{const et=R?`${w.label}`:`${At}`;return s.add(et),{...w,id:et}}),T=R?R.filter(w=>!s.has(w)):[];ht=[...I,...T.map(Di)],t[27]=i,t[28]=R,t[29]=ht}else ht=t[29];const rt=ht;let jt;t[30]!==rt||t[31]!==R?(jt=R??rt.map($i),t[30]=rt,t[31]=R,t[32]=jt):jt=t[32];const ot=jt;let q,X,Y,S,H,J,k,O,j,A,K,Q,Z,_;if(t[33]!==x||t[34]!==nt||t[35]!==V||t[36]!==ot||t[37]!==se||t[38]!==m?.graphObjectValues||t[39]!==m?.xAxis?.gridLines||t[40]!==m?.xAxis?.labels||t[41]!==m?.xAxis?.title||t[42]!==m?.yAxis?.axis||t[43]!==m?.yAxis?.labels||t[44]!==E||t[45]!==rt||t[46]!==P||t[47]!==mt||t[48]!==z||t[49]!==Ct||t[50]!==re||t[51]!==lt||t[52]!==v||t[53]!==W||t[54]!==d.bottom||t[55]!==d.left||t[56]!==d.top||t[57]!==Nt||t[58]!==o||t[59]!==Kt||t[60]!==ft||t[61]!==oe||t[62]!==p||t[63]!==ct||t[64]!==bt||t[65]!==st||t[66]!==Yt||t[67]!==g||t[68]!==It||t[69]!==xt||t[70]!==Jt||t[71]!==ge||t[72]!==le||t[73]!==Ot||t[74]!==r?.graphObjectValues||t[75]!==r?.xAxis?.gridLines||t[76]!==r?.xAxis?.labels||t[77]!==r?.xAxis?.title||t[78]!==r?.yAxis?.axis||t[79]!==r?.yAxis?.labels||t[80]!==Xt||t[81]!==at||t[82]!==ue||t[83]!==G||t[84]!==Qt||t[85]!==de||t[86]!==Vt||t[87]!==Ht||t[88]!==ie||t[89]!==L){const s=Ge.linear().domain([L,ie]).range([0,Ct]).nice(),I=We.band().domain(ot).range([0,Kt?Math.max(z,Kt*ot.length):Nt?Math.min(z,Nt*ot.length):z]).paddingInner(se),T=s.ticks(p);X=Mt.motion.svg,A=`${Ht}px`,K=`${re}px`,Q=`0 0 ${Ht} ${re}`,Z="ltr",_=he,H=`translate(${d.left},${d.top})`,J=le?a.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:T.filter(Si),x:T.filter(qi).map(n=>s(n)),y1:0-Qt,y2:z+d.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:m?.xAxis?.gridLines,labels:m?.xAxis?.labels},suffix:Xt,prefix:Yt,labelType:"secondary",showGridLines:!0,precision:st}):null;const w=Ct/2,At=0-d.top+15,et=r?.xAxis?.title,f=m?.xAxis?.title;t[104]!==nt||t[105]!==w||t[106]!==At||t[107]!==et||t[108]!==f?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:w,y:At,style:et,className:f,text:nt}),t[104]=nt,t[105]=w,t[106]=At,t[107]=et,t[108]=f,t[109]=k):k=t[109];const F=m?.yAxis?.axis;let Bt;t[110]!==F?(Bt={axis:F},t[110]=F,t[111]=Bt):Bt=t[111];const ne=r?.yAxis?.axis;let Pt;t[112]!==ne?(Pt={axis:ne},t[112]=ne,t[113]=Pt):Pt=t[113],O=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:lt,x1:s(L<0?0:L),x2:s(L<0?0:L),y1:-2.5,y2:z+d.bottom,classNames:Bt,styles:Pt}),t[114]!==E?(j=E.filter(Li).map(zi),t[114]=E,t[115]=j):j=t[115],q=Ye.AnimatePresence,Y=rt.map(n=>b.checkIfNullOrUndefined(I(n.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:U=>{y(n),pe(U.clientY),xe(U.clientX),bt?.(n)},onClick:()=>{(ct||P)&&(De.isEqual(ft,n)&&xt?(ce(void 0),ct?.(void 0)):(ce(n),ct?.(n)))},onMouseMove:U=>{y(n),pe(U.clientY),xe(U.clientX)},onMouseLeave:()=>{y(void 0),xe(void 0),pe(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85},whileInView:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((U,l)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0,fill:g[l]},whileInView:{x:s(l===0?0:Ne.sum(n.qualitativeRange.filter((gt,Gt)=>Gt<l&>))),width:s(U),fill:g[l],transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",y:0,height:I.bandwidth()},l)):null,n.target&&G==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,x:n.target>=0?s(0):s(n.target),height:I.bandwidth(),exit:{width:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),fill:at,width:0},whileInView:{x:n.target>=0?s(0):s(n.target),fill:at,width:n.target>=0?s(n.target)-s(0):s(0)-s(n.target),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:I.bandwidth()*((1-o)/2),style:{fill:V},height:I.bandwidth()*o,exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0},whileInView:{x:n.size>=0?s(0):s(n.size),width:n.size>=0?s(n.size)-s(0):s(0)-s(n.size),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.target&&G==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,height:I.bandwidth(),width:ue,exit:{opacity:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:at},whileInView:{x:s(n.target)-ue/2,opacity:1,fill:at,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,ge?a.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${n.label}`.length<de?`${n.label}`:`${`${n.label}`.substring(0,de)}...`,y:0,x:(n.size||0)<0?s(0):0-d.left,width:(n.size||0)<0?Ht-s(0):s(0)+d.left,height:I.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:r?.yAxis?.labels,className:m?.yAxis?.labels,animate:x,isInView:W}):null,Ot?a.jsxRuntimeExports.jsx(Mt.motion.text,{y:I.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...r?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Vt&&V.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",m?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:Vt||V},whileInView:{x:n.size?s(n.size):s(0),opacity:1,fill:Vt||V,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:ze.numberFormattingFunction(n.size,oe,st,Yt,Xt)}):null]},n.label)),S=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((n,U)=>a.jsxRuntimeExports.jsx(Be.RefLineX,{text:n.text,color:n.color,x:s(n.value),y1:0-d.top,y2:z+d.bottom,textSide:s(n.value)>Ct*.75||Jt?"left":"right",classNames:n.classNames,styles:n.styles,animate:x,isInView:W},U))}):null,t[33]=x,t[34]=nt,t[35]=V,t[36]=ot,t[37]=se,t[38]=m?.graphObjectValues,t[39]=m?.xAxis?.gridLines,t[40]=m?.xAxis?.labels,t[41]=m?.xAxis?.title,t[42]=m?.yAxis?.axis,t[43]=m?.yAxis?.labels,t[44]=E,t[45]=rt,t[46]=P,t[47]=mt,t[48]=z,t[49]=Ct,t[50]=re,t[51]=lt,t[52]=v,t[53]=W,t[54]=d.bottom,t[55]=d.left,t[56]=d.top,t[57]=Nt,t[58]=o,t[59]=Kt,t[60]=ft,t[61]=oe,t[62]=p,t[63]=ct,t[64]=bt,t[65]=st,t[66]=Yt,t[67]=g,t[68]=It,t[69]=xt,t[70]=Jt,t[71]=ge,t[72]=le,t[73]=Ot,t[74]=r?.graphObjectValues,t[75]=r?.xAxis?.gridLines,t[76]=r?.xAxis?.labels,t[77]=r?.xAxis?.title,t[78]=r?.yAxis?.axis,t[79]=r?.yAxis?.labels,t[80]=Xt,t[81]=at,t[82]=ue,t[83]=G,t[84]=Qt,t[85]=de,t[86]=Vt,t[87]=Ht,t[88]=ie,t[89]=L,t[90]=q,t[91]=X,t[92]=Y,t[93]=S,t[94]=H,t[95]=J,t[96]=k,t[97]=O,t[98]=j,t[99]=A,t[100]=K,t[101]=Q,t[102]=Z,t[103]=_}else q=t[90],X=t[91],Y=t[92],S=t[93],H=t[94],J=t[95],k=t[96],O=t[97],j=t[98],A=t[99],K=t[100],Q=t[101],Z=t[102],_=t[103];let $;t[116]!==q||t[117]!==Y||t[118]!==S?($=a.jsxRuntimeExports.jsxs(q,{children:[Y,S]}),t[116]=q,t[117]=Y,t[118]=S,t[119]=$):$=t[119];let u;t[120]!==E?(u=E.filter(Ci).map(Ei),t[120]=E,t[121]=u):u=t[121];let tt;t[122]!==H||t[123]!==J||t[124]!==k||t[125]!==O||t[126]!==j||t[127]!==$||t[128]!==u?(tt=a.jsxRuntimeExports.jsxs("g",{transform:H,children:[J,k,O,j,$,u]}),t[122]=H,t[123]=J,t[124]=k,t[125]=O,t[126]=j,t[127]=$,t[128]=u,t[129]=tt):tt=t[129];let D;t[130]!==X||t[131]!==A||t[132]!==K||t[133]!==Q||t[134]!==Z||t[135]!==_||t[136]!==tt?(D=a.jsxRuntimeExports.jsx(X,{width:A,height:K,viewBox:Q,direction:Z,ref:_,children:tt}),t[130]=X,t[131]=A,t[132]=K,t[133]=Q,t[134]=Z,t[135]=_,t[136]=tt,t[137]=D):D=t[137];let pt;t[138]!==m?.tooltip||t[139]!==N||t[140]!==Et||t[141]!==dt||t[142]!==r?.tooltip||t[143]!==yt?(pt=dt&&yt&&N&&Et?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:dt,body:yt,xPos:N,yPos:Et,backgroundStyle:r?.tooltip,className:m?.tooltip}):null,t[138]=m?.tooltip,t[139]=N,t[140]=Et,t[141]=dt,t[142]=r?.tooltip,t[143]=yt,t[144]=pt):pt=t[144];let ut;t[145]!==m?.modal||t[146]!==P||t[147]!==ft?(ut=P&&ft!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:P,data:ft,setData:ce,className:m?.modal}):null,t[145]=m?.modal,t[146]=P,t[147]=ft,t[148]=ut):ut=t[148];let c;return t[149]!==D||t[150]!==pt||t[151]!==ut?(c=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[D,pt,ut]}),t[149]=D,t[150]=pt,t[151]=ut,t[152]=c):c=t[152],c}function Ei(e){return e.layer}function Ci(e){return e.position==="after"}function zi(e){return e.layer}function Li(e){return e.position==="before"}function qi(e){return e!==0}function Si(e){return e!==0}function $i(e){return`${e.id}`}function Di(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function Ti(e){return e.target}function Fi(e){return!b.checkIfNullOrUndefined(e.target)}function Ui(e){return e.target}function Bi(e){return!b.checkIfNullOrUndefined(e.target)}function Pi(e){return e.size}function Gi(e){return!b.checkIfNullOrUndefined(e.size)}function Wi(e){return e.size}function Xi(e){return!b.checkIfNullOrUndefined(e.size)}function Yi(e){return Ne.sum((e.qualitativeRange||[]).filter(Hi))||0}function Hi(e){return!b.checkIfNullOrUndefined(e)}function Ji(e){return e.target}function Ki(e){return!b.checkIfNullOrUndefined(e.target)}function Qi(e){return e.target}function Zi(e){return!b.checkIfNullOrUndefined(e.target)}function _i(e){return e.size}function tn(e){return!b.checkIfNullOrUndefined(e.size)}function en(e){return e.size}function nn(e){return!b.checkIfNullOrUndefined(e.size)}function an(e){const t=a.compilerRuntimeExports.c(137),{data:i,graphTitle:kt,barColor:ae,barPadding:Wt,showTicks:Rt,leftMargin:V,rightMargin:Xt,topMargin:Yt,bottomMargin:se,truncateBy:Ot,showLabels:le,showValues:de,backgroundColor:Ht,suffix:re,prefix:ge,sources:yt,graphDescription:bt,height:It,width:v,footNote:vt,colorDomain:it,colorLegendTitle:ct,padding:R,relativeHeight:Jt,tooltip:Nt,onSeriesMouseOver:Kt,refValues:xt,showColorScale:P,graphID:nt,maxValue:Vt,minValue:p,highlightedDataPoints:r,onSeriesMouseClick:m,valueColor:G,orientation:at,styles:g,classNames:o,qualitativeRangeColors:x,targetColor:mt,filterNA:st,targetStyle:E,measureBarWidthFactor:oe,animate:ue,dimmedOpacity:lt,precision:Qt,customLayers:Zt,naLabel:fe,graphDownload:ye,dataDownload:he,language:C,theme:W,sortData:dt,labelOrder:y,minHeight:ft,maxBarThickness:ce,maxNumberOfBars:N,minBarThickness:xe,ariaLabel:Et,resetSelectionOnDoubleClick:pe,detailsOnClick:_t,barAxisTitle:te,noOfTicks:d,targetLineThickness:Ct,timeline:z,hideAxisLine:ee}=e,zt=ae===void 0?Ee.Colors.primaryColors["blue-600"]:ae,Lt=Wt===void 0?.25:Wt,qt=Rt===void 0?!0:Rt,St=Ot===void 0?999:Ot,$t=le===void 0?!0:le,Dt=de===void 0?!0:de,ie=Ht===void 0?!1:Ht,Tt=re===void 0?"":re,Ft=ge===void 0?"":ge,Ut=P===void 0?!0:P;let wt;t[0]!==r?(wt=r===void 0?[]:r,t[0]=r,t[1]=wt):wt=t[1];const M=wt,L=at===void 0?"vertical":at,ht=mt===void 0?Ee.Colors.light.grays["gray-700"]:mt,rt=st===void 0?!0:st,jt=E===void 0?"line":E,ot=oe===void 0?.4:oe,q=ue===void 0?!1:ue,X=lt===void 0?.3:lt,Y=Qt===void 0?2:Qt;let S;t[2]!==Zt?(S=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=S):S=t[3];const H=S,J=fe===void 0?"NA":fe,k=ye===void 0?!1:ye,O=he===void 0?!1:he,j=C===void 0?"en":C,A=W===void 0?"light":W,K=ft===void 0?0:ft,Q=pe===void 0?!0:pe,Z=d===void 0?5:d,_=Ct===void 0?2:Ct;let $;t[4]!==z?($=z===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:z,t[4]=z,t[5]=$):$=t[5];const u=$,tt=ee===void 0?!1:ee,[D,pt]=B.useState(0),[ut,c]=B.useState(0),s=B.useRef(null),I=B.useRef(null),T=L==="horizontal"?Vi:ni,[w,At]=B.useState(u.autoplay);let et;if(t[6]!==i||t[7]!==u.dateFormat){let h;t[9]!==u.dateFormat?(h=me=>Ce.parse(`${me.date}`,u.dateFormat||"yyyy",new Date).getTime(),t[9]=u.dateFormat,t[10]=h):h=t[10],et=[...new Set(i.filter(mn).map(h))],et.sort(xn),t[6]=i,t[7]=u.dateFormat,t[8]=et}else et=t[8];const f=et,[F,Bt]=B.useState(u.autoplay?0:f.length-1);let ne,Pt;t[11]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>{const h=new ResizeObserver(me=>{pt(me[0].target.clientWidth||620),c(me[0].target.clientHeight||480)});return s.current&&h.observe(s.current),()=>h.disconnect()},Pt=[],t[11]=ne,t[12]=Pt):(ne=t[11],Pt=t[12]),B.useEffect(ne,Pt);let n,U;t[13]!==w||t[14]!==u.speed||t[15]!==f?(n=()=>{const h=setInterval(()=>{Bt(me=>me<f.length-1?me+1:0)},(u.speed||2)*1e3);return w||clearInterval(h),()=>clearInterval(h)},U=[f,w,u.speed],t[13]=w,t[14]=u.speed,t[15]=f,t[16]=n,t[17]=U):(n=t[16],U=t[17]),B.useEffect(n,U);const l=u.dateFormat||"yyyy";let gt;t[18]!==F||t[19]!==l||t[20]!==u.showOnlyActiveDate||t[21]!==f?(gt=Le.getSliderMarks(f,F,u.showOnlyActiveDate,l),t[18]=F,t[19]=l,t[20]=u.showOnlyActiveDate,t[21]=f,t[22]=gt):gt=t[22];const Gt=gt,be=o?.graphContainer,ve=g?.graphContainer;let we;t[23]!==o?.description||t[24]!==o?.title||t[25]!==i||t[26]!==O||t[27]!==bt||t[28]!==k||t[29]!==kt||t[30]!==g?.description||t[31]!==g?.title||t[32]!==v?(we=kt||bt||k||O?a.jsxRuntimeExports.jsx(ei.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:o?.title,description:o?.description},graphTitle:kt,graphDescription:bt,width:v,graphDownload:k?I:void 0,dataDownload:O?i.map(cn).filter(un).length>0?i.map(on).filter(rn):i.filter(ln):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=i,t[26]=O,t[27]=bt,t[28]=k,t[29]=kt,t[30]=g?.description,t[31]=g?.title,t[32]=v,t[33]=we):we=t[33];let je;t[34]!==F||t[35]!==Gt||t[36]!==w||t[37]!==u.enabled||t[38]!==f?(je=u.enabled&&f.length>0&&Gt?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{At(!w)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":w?"Click to pause animation":"Click to play animation",children:w?a.jsxRuntimeExports.jsx($e.Pause,{}):a.jsxRuntimeExports.jsx($e.Play,{})}),a.jsxRuntimeExports.jsx(Le.Nr,{min:f[0],max:f[f.length-1],marks:Gt,step:null,defaultValue:f[f.length-1],value:f[F],onChangeComplete:h=>{Bt(f.indexOf(h))},onChange:h=>{Bt(f.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=F,t[35]=Gt,t[36]=w,t[37]=u.enabled,t[38]=f,t[39]=je):je=t[39];let Ae;t[40]!==o?.colorLegend||t[41]!==it||t[42]!==ct||t[43]!==i||t[44]!==x||t[45]!==Ut||t[46]!==A||t[47]!==v?(Ae=Ut&&i.filter(sn).length!==0&&it&&i.length>0?a.jsxRuntimeExports.jsx(ii.ColorLegend,{width:v,colorLegendTitle:ct,colors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,colorDomain:it,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=it,t[42]=ct,t[43]=i,t[44]=x,t[45]=Ut,t[46]=A,t[47]=v,t[48]=Ae):Ae=t[48];let Me;t[49]!==i.length?(Me=i.length===0&&a.jsxRuntimeExports.jsx(_e.EmptyState,{}),t[49]=i.length,t[50]=Me):Me=t[50];let ke;t[51]!==T||t[52]!==q||t[53]!==te||t[54]!==zt||t[55]!==Lt||t[56]!==se||t[57]!==o||t[58]!==H||t[59]!==i||t[60]!==_t||t[61]!==X||t[62]!==rt||t[63]!==tt||t[64]!==M||t[65]!==F||t[66]!==y||t[67]!==j||t[68]!==V||t[69]!==ce||t[70]!==N||t[71]!==Vt||t[72]!==ot||t[73]!==xe||t[74]!==p||t[75]!==J||t[76]!==Z||t[77]!==m||t[78]!==Kt||t[79]!==L||t[80]!==Y||t[81]!==Ft||t[82]!==x||t[83]!==xt||t[84]!==Q||t[85]!==Xt||t[86]!==$t||t[87]!==qt||t[88]!==Dt||t[89]!==dt||t[90]!==g||t[91]!==Tt||t[92]!==ut||t[93]!==D||t[94]!==ht||t[95]!==_||t[96]!==jt||t[97]!==A||t[98]!==u.dateFormat||t[99]!==u.enabled||t[100]!==Nt||t[101]!==Yt||t[102]!==St||t[103]!==f||t[104]!==G?(ke=D&&ut&&i.length>0?a.jsxRuntimeExports.jsx(T,{hideAxisLine:tt,data:dt?He.orderBy(Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?dt==="asc"?(L==="horizontal"?1:-1)*(1/0):(L==="horizontal"?-1:1)*(1/0):h.size],[dt]).filter((h,me)=>N?me<N:!0):Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h).filter((h,me)=>N?me<N:!0),barColor:zt,targetColor:ht,width:D,refValues:xt,height:ut,suffix:Tt,prefix:Ft,barPadding:Lt,showLabels:$t,showValues:Dt,showTicks:qt,truncateBy:St,leftMargin:V,rightMargin:Xt,qualitativeRangeColors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,topMargin:Yt,bottomMargin:se,tooltip:Nt,onSeriesMouseOver:Kt,maxValue:Vt,minValue:p,highlightedDataPoints:M,onSeriesMouseClick:m,labelOrder:y,maxBarThickness:ce,minBarThickness:xe,resetSelectionOnDoubleClick:Q,detailsOnClick:_t,barAxisTitle:te,noOfTicks:Z,valueColor:G,styles:g,classNames:o,targetStyle:jt,dimmedOpacity:X,measureBarWidthFactor:ot,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},precision:Y,customLayers:H,naLabel:J,targetLineThickness:_,rtl:j==="ar"||j==="he"}):null,t[51]=T,t[52]=q,t[53]=te,t[54]=zt,t[55]=Lt,t[56]=se,t[57]=o,t[58]=H,t[59]=i,t[60]=_t,t[61]=X,t[62]=rt,t[63]=tt,t[64]=M,t[65]=F,t[66]=y,t[67]=j,t[68]=V,t[69]=ce,t[70]=N,t[71]=Vt,t[72]=ot,t[73]=xe,t[74]=p,t[75]=J,t[76]=Z,t[77]=m,t[78]=Kt,t[79]=L,t[80]=Y,t[81]=Ft,t[82]=x,t[83]=xt,t[84]=Q,t[85]=Xt,t[86]=$t,t[87]=qt,t[88]=Dt,t[89]=dt,t[90]=g,t[91]=Tt,t[92]=ut,t[93]=D,t[94]=ht,t[95]=_,t[96]=jt,t[97]=A,t[98]=u.dateFormat,t[99]=u.enabled,t[100]=Nt,t[101]=Yt,t[102]=St,t[103]=f,t[104]=G,t[105]=ke):ke=t[105];let Re;t[106]!==Me||t[107]!==ke?(Re=a.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:s,children:[Me,ke]}),t[106]=Me,t[107]=ke,t[108]=Re):Re=t[108];let Oe;t[109]!==Ae||t[110]!==Re?(Oe=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[Ae,Re]}),t[109]=Ae,t[110]=Re,t[111]=Oe):Oe=t[111];let Ie;t[112]!==o?.footnote||t[113]!==o?.source||t[114]!==vt||t[115]!==yt||t[116]!==g?.footnote||t[117]!==g?.source||t[118]!==v?(Ie=yt||vt?a.jsxRuntimeExports.jsx(ti.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:yt,footNote:vt,width:v}):null,t[112]=o?.footnote,t[113]=o?.source,t[114]=vt,t[115]=yt,t[116]=g?.footnote,t[117]=g?.source,t[118]=v,t[119]=Ie):Ie=t[119];let Ve;return t[120]!==Et||t[121]!==ie||t[122]!==nt||t[123]!==It||t[124]!==j||t[125]!==K||t[126]!==R||t[127]!==Jt||t[128]!==be||t[129]!==ve||t[130]!==we||t[131]!==je||t[132]!==Oe||t[133]!==Ie||t[134]!==A||t[135]!==v?(Ve=a.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:be,style:ve,id:nt,ref:I,"aria-label":Et,backgroundColor:ie,theme:A,language:j,minHeight:K,width:v,height:It,relativeHeight:Jt,padding:R,children:[we,je,Oe,Ie]}),t[120]=Et,t[121]=ie,t[122]=nt,t[123]=It,t[124]=j,t[125]=K,t[126]=R,t[127]=Jt,t[128]=be,t[129]=ve,t[130]=we,t[131]=je,t[132]=Oe,t[133]=Ie,t[134]=A,t[135]=v,t[136]=Ve):Ve=t[136],Ve}function sn(e){return e.qualitativeRange}function ln(e){return e!==void 0}function rn(e){return e!==void 0}function on(e){return e.data}function un(e){return e!==void 0}function cn(e){return e.data}function xn(e,t){return e-t}function mn(e){return e.date}exports.BulletChart=an;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),B=require("react"),He=require("./index-Cno4Q0YE.cjs"),Ce=require("./parse-xYI9yrvL.cjs"),Le=require("./getSliderMarks-CIuSoedo.cjs"),De=require("./index-DQA8q5sC.cjs"),Ne=require("./index-CSNtgibC.cjs"),ze=require("./numberFormattingFunction-02t-wJta.cjs"),Te=require("./Tooltip-BLa2EfMs.cjs"),b=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Fe=require("./Axis-Jt_tmhxS.cjs"),Ue=require("./AxisTitle-DV4n0RxE.cjs"),Je=require("./XAxesLabels-C6o9jJal.cjs"),Be=require("./ReferenceLine-M9aP3dj-.cjs"),Ke=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Qe=require("./XTicksAndGridLines-CekrPykD.cjs"),Ze=require("./YAxesLabels-BQ2aCazV.cjs"),Pe=require("./DetailsModal-DHttOA80.cjs"),Ge=require("./linear-CgUCbw9F.cjs"),We=require("./band-VYfcZeJ2.cjs"),Mt=require("./proxy-C4-uo6nS.cjs"),Xe=require("./use-in-view-C3o_ntMv.cjs"),Ye=require("./index-CoobIWNj.cjs"),Ee=require("./Colors.cjs"),_e=require("./EmptyState-N1eHt3vq.cjs"),qe=require("./GraphContainer-B1EDxJ0S.cjs"),ti=require("./GraphFooter.cjs"),ei=require("./GraphHeader.cjs"),ii=require("./ColorLegend.cjs"),Se=require("./ensureCompleteData-D9bQTiVS.cjs"),$e=require("./index-sbKVyHS2.cjs");function ni(e){const t=a.compilerRuntimeExports.c(162),{data:i,width:kt,height:ae,barColor:Wt,suffix:Rt,prefix:V,barPadding:Xt,showLabels:Yt,showValues:se,showTicks:Ot,truncateBy:le,leftMargin:de,rightMargin:Ht,topMargin:re,bottomMargin:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,maxValue:v,minValue:vt,highlightedDataPoints:it,onSeriesMouseClick:ct,labelOrder:R,maxBarThickness:Jt,minBarThickness:Nt,resetSelectionOnDoubleClick:Kt,detailsOnClick:xt,barAxisTitle:P,valueColor:nt,noOfTicks:Vt,styles:p,classNames:r,targetStyle:m,targetColor:G,qualitativeRangeColors:at,measureBarWidthFactor:g,animate:o,dimmedOpacity:x,precision:mt,customLayers:st,naLabel:E,targetLineThickness:oe,hideAxisLine:ue}=e,lt=de===void 0?20:de,Qt=Ht===void 0?20:Ht,Zt=re===void 0?20:re,fe=ge===void 0?25:ge,ye=B.useRef(null);let he;t[0]!==o.amount||t[1]!==o.once?(he={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=he):he=t[2];const C=Xe.useInView(ye,he),W=P?lt+30:lt;let dt;t[3]!==fe||t[4]!==Qt||t[5]!==W||t[6]!==Zt?(dt={top:Zt,bottom:fe,left:W,right:Qt},t[3]=fe,t[4]=Qt,t[5]=W,t[6]=Zt,t[7]=dt):dt=t[7];const y=dt,[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),[_t,te]=B.useState(void 0),d=kt-y.left-y.right,Ct=ae-y.top-y.bottom;let z;t[8]!==i?(z=Math.max(...i.filter(Ni).map(Ii))<0?0:Math.max(...i.filter(Oi).map(Ri)),t[8]=i,t[9]=z):z=t[9];const ee=z;let zt;t[10]!==i?(zt=Math.max(...i.filter(ki).map(Mi))<0?0:Math.max(...i.filter(Ai).map(ji)),t[10]=i,t[11]=zt):zt=t[11];const Lt=zt;let qt;t[12]!==i?(qt=Math.max(...i.map(vi)),t[12]=i,t[13]=qt):qt=t[13];const St=qt;let $t;t[14]!==ee||t[15]!==v||t[16]!==St||t[17]!==Lt?($t=b.checkIfNullOrUndefined(v)?Math.max(...[ee,Lt,St].filter(Number.isFinite))<0?0:Math.max(...[ee,Lt,St].filter(Number.isFinite)):v,t[14]=ee,t[15]=v,t[16]=St,t[17]=Lt,t[18]=$t):$t=t[18];const Dt=$t;let ie;t[19]!==i?(ie=Math.min(...i.filter(bi).map(yi))>=0?0:Math.min(...i.filter(gi).map(pi)),t[19]=i,t[20]=ie):ie=t[20];const Tt=ie;let Ft;t[21]!==i?(Ft=Math.min(...i.filter(hi).map(fi))>=0?0:Math.min(...i.filter(di).map(mi)),t[21]=i,t[22]=Ft):Ft=t[22];const Ut=Ft;let wt;t[23]!==Tt||t[24]!==vt||t[25]!==Ut?(wt=b.checkIfNullOrUndefined(vt)?Math.min(...[Tt,Ut].filter(Number.isFinite))>=0?0:Math.min(...[Tt,Ut].filter(Number.isFinite)):vt,t[23]=Tt,t[24]=vt,t[25]=Ut,t[26]=wt):wt=t[26];const M=wt;let L;if(t[27]!==i||t[28]!==R){const c=new Set,s=i.map((T,w)=>{const At=R?`${T.label}`:`${w}`;return c.add(At),{...T,id:At}}),I=R?R.filter(T=>!c.has(T)):[];L=[...s,...I.map(xi)],t[27]=i,t[28]=R,t[29]=L}else L=t[29];const ht=L;let rt;t[30]!==ht||t[31]!==R?(rt=R??ht.map(ci),t[30]=ht,t[31]=R,t[32]=rt):rt=t[32];const jt=rt;let ot,q,X,Y,S,H,J,k,O,j,A,K,Q,Z;if(t[33]!==o||t[34]!==P||t[35]!==Wt||t[36]!==jt||t[37]!==Xt||t[38]!==r?.graphObjectValues||t[39]!==r?.xAxis?.axis||t[40]!==r?.xAxis?.labels||t[41]!==r?.yAxis?.gridLines||t[42]!==r?.yAxis?.labels||t[43]!==r?.yAxis?.title||t[44]!==st||t[45]!==ht||t[46]!==xt||t[47]!==x||t[48]!==Ct||t[49]!==d||t[50]!==ae||t[51]!==ue||t[52]!==it||t[53]!==C||t[54]!==lt||t[55]!==y.bottom||t[56]!==y.left||t[57]!==y.right||t[58]!==y.top||t[59]!==Jt||t[60]!==g||t[61]!==Nt||t[62]!==N||t[63]!==E||t[64]!==Vt||t[65]!==ct||t[66]!==bt||t[67]!==mt||t[68]!==V||t[69]!==at||t[70]!==It||t[71]!==Kt||t[72]!==Yt||t[73]!==Ot||t[74]!==se||t[75]!==p?.graphObjectValues||t[76]!==p?.xAxis?.axis||t[77]!==p?.xAxis?.labels||t[78]!==p?.yAxis?.gridLines||t[79]!==p?.yAxis?.labels||t[80]!==p?.yAxis?.title||t[81]!==Rt||t[82]!==G||t[83]!==oe||t[84]!==m||t[85]!==le||t[86]!==nt||t[87]!==kt||t[88]!==Dt||t[89]!==M){const c=Ge.linear().domain([M,Dt]).range([Ct,0]).nice(),s=We.band().domain(jt).range([0,Nt?Math.max(d,Nt*jt.length):Jt?Math.min(d,Jt*jt.length):d]).paddingInner(Xt),I=c.ticks(Vt);q=Mt.motion.svg,j=`${kt}px`,A=`${ae}px`,K=`0 0 ${kt} ${ae}`,Q="ltr",Z=ye,S=`translate(${y.left},${y.top})`;let T;t[104]!==E||t[105]!==mt||t[106]!==V||t[107]!==Ot||t[108]!==Rt||t[109]!==M?(T=Ot?ze.numberFormattingFunction(M<0?0:M,E,mt,V,Rt):void 0,t[104]=E,t[105]=mt,t[106]=V,t[107]=Ot,t[108]=Rt,t[109]=M,t[110]=T):T=t[110];const w=r?.xAxis?.axis,At=r?.yAxis?.labels;let et;t[111]!==w||t[112]!==At?(et={axis:w,label:At},t[111]=w,t[112]=At,t[113]=et):et=t[113];const f=p?.xAxis?.axis,F=p?.yAxis?.labels;let Bt;t[114]!==f||t[115]!==F?(Bt={axis:f,label:F},t[114]=f,t[115]=F,t[116]=Bt):Bt=t[116],H=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:ue,y1:c(M<0?0:M),y2:c(M<0?0:M),x1:0-lt,x2:d+y.right,label:T,labelPos:{x:0-lt,dx:0,dy:Dt<0?"1em":-5,y:c(M<0?0:M)},classNames:et,styles:Bt}),J=Ot?a.jsxRuntimeExports.jsx(Ke.YTicksAndGridLines,{values:I.filter(ui),y:I.filter(oi).map(l=>c(l)),x1:0-lt,x2:d+y.right,styles:{gridLines:p?.yAxis?.gridLines,labels:p?.yAxis?.labels},classNames:{gridLines:r?.yAxis?.gridLines,labels:r?.yAxis?.labels},suffix:Rt,prefix:V,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:mt}):null;const ne=0-lt-15,Pt=Ct/2,n=p?.yAxis?.title,U=r?.yAxis?.title;t[117]!==P||t[118]!==ne||t[119]!==Pt||t[120]!==n||t[121]!==U?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:ne,y:Pt,style:n,className:U,text:P,rotate90:!0}),t[117]=P,t[118]=ne,t[119]=Pt,t[120]=n,t[121]=U,t[122]=k):k=t[122],t[123]!==st?(O=st.filter(ri).map(li),t[123]=st,t[124]=O):O=t[124],ot=Ye.AnimatePresence,X=ht.map(l=>b.checkIfNullOrUndefined(s(l.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:gt=>{ce(l),te(gt.clientY),pe(gt.clientX),bt?.(l)},onClick:()=>{(ct||xt)&&(De.isEqual(N,l)&&Kt?(xe(void 0),ct?.(void 0)):(xe(l),ct?.(l)))},onMouseMove:gt=>{ce(l),te(gt.clientY),pe(gt.clientX)},onMouseLeave:()=>{ce(void 0),pe(void 0),te(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85},whileInView:{x:s(`${l.id}`),y:0,opacity:it.length!==0?it.indexOf(l.label)!==-1?.85:x:.85,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:[l.qualitativeRange?l.qualitativeRange.map((gt,Gt)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0),fill:at[Gt]},whileInView:{height:Math.abs(c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be)))-c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<Gt&&be)))),y:c(Ne.sum(l.qualitativeRange.filter((be,ve)=>ve<=Gt&&be))),fill:at[Gt],transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",width:s.bandwidth()},Gt)):null,l.target&&m==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{height:0,y:c(0),fill:G,transition:{duration:o.duration}},variants:{initial:{height:0,fill:G,y:c(0)},whileInView:{height:Math.abs(c(l.target)-c(0)),fill:G,y:l.target>0?c(l.target):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:s.bandwidth()*((1-g)/2),width:s.bandwidth()*g,style:{fill:Wt},exit:{height:0,y:c(0),transition:{duration:o.duration}},variants:{initial:{height:0,y:c(0)},whileInView:{height:Math.abs(c(l.size)-c(0)),y:l.size>0?c(l.size):c(0),transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial"}):null,l.target&&m==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{x:0,width:s.bandwidth(),exit:{y:c(0),opacity:0,fill:G,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:G},whileInView:{y:c(l.target)-oe/2,opacity:1,fill:G,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",height:oe}):null,Yt?a.jsxRuntimeExports.jsx(Je.XAxesLabels,{value:`${l.label}`.length<le?`${l.label}`:`${`${l.label}`.substring(0,le)}...`,y:(l.size||0)<0?0:c(0)+5,x:0,width:s.bandwidth(),height:(l.size||0)<0?c(0)-5:y.bottom,style:p?.xAxis?.labels,className:r?.xAxis?.labels,alignment:(l.size||0)<0?"bottom":"top",animate:o,isInView:C}):null,se?a.jsxRuntimeExports.jsx(Mt.motion.text,{x:s.bandwidth()/2,style:{textAnchor:"middle",...p?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!nt&&Wt.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",r?.graphObjectValues),dy:l.size?l.size>=0?"-5px":"1em":"-5px",exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{y:c(0),opacity:0,fill:nt||Wt},whileInView:{y:c(l.size||0),opacity:1,fill:nt||Wt,transition:{duration:o.duration}}},initial:"initial",animate:C?"whileInView":"initial",children:ze.numberFormattingFunction(l.size,E,mt,V,Rt)}):null]},l.label)),Y=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((l,gt)=>a.jsxRuntimeExports.jsx(Be.RefLineY,{text:l.text,color:l.color,y:c(l.value),x1:0-lt,x2:d+y.right,classNames:l.classNames,styles:l.styles,animate:o,isInView:C},gt))}):null,t[33]=o,t[34]=P,t[35]=Wt,t[36]=jt,t[37]=Xt,t[38]=r?.graphObjectValues,t[39]=r?.xAxis?.axis,t[40]=r?.xAxis?.labels,t[41]=r?.yAxis?.gridLines,t[42]=r?.yAxis?.labels,t[43]=r?.yAxis?.title,t[44]=st,t[45]=ht,t[46]=xt,t[47]=x,t[48]=Ct,t[49]=d,t[50]=ae,t[51]=ue,t[52]=it,t[53]=C,t[54]=lt,t[55]=y.bottom,t[56]=y.left,t[57]=y.right,t[58]=y.top,t[59]=Jt,t[60]=g,t[61]=Nt,t[62]=N,t[63]=E,t[64]=Vt,t[65]=ct,t[66]=bt,t[67]=mt,t[68]=V,t[69]=at,t[70]=It,t[71]=Kt,t[72]=Yt,t[73]=Ot,t[74]=se,t[75]=p?.graphObjectValues,t[76]=p?.xAxis?.axis,t[77]=p?.xAxis?.labels,t[78]=p?.yAxis?.gridLines,t[79]=p?.yAxis?.labels,t[80]=p?.yAxis?.title,t[81]=Rt,t[82]=G,t[83]=oe,t[84]=m,t[85]=le,t[86]=nt,t[87]=kt,t[88]=Dt,t[89]=M,t[90]=ot,t[91]=q,t[92]=X,t[93]=Y,t[94]=S,t[95]=H,t[96]=J,t[97]=k,t[98]=O,t[99]=j,t[100]=A,t[101]=K,t[102]=Q,t[103]=Z}else ot=t[90],q=t[91],X=t[92],Y=t[93],S=t[94],H=t[95],J=t[96],k=t[97],O=t[98],j=t[99],A=t[100],K=t[101],Q=t[102],Z=t[103];let _;t[125]!==ot||t[126]!==X||t[127]!==Y?(_=a.jsxRuntimeExports.jsxs(ot,{children:[X,Y]}),t[125]=ot,t[126]=X,t[127]=Y,t[128]=_):_=t[128];let $;t[129]!==st?($=st.filter(si).map(ai),t[129]=st,t[130]=$):$=t[130];let u;t[131]!==S||t[132]!==H||t[133]!==J||t[134]!==k||t[135]!==O||t[136]!==_||t[137]!==$?(u=a.jsxRuntimeExports.jsxs("g",{transform:S,children:[H,J,k,O,_,$]}),t[131]=S,t[132]=H,t[133]=J,t[134]=k,t[135]=O,t[136]=_,t[137]=$,t[138]=u):u=t[138];let tt;t[139]!==q||t[140]!==j||t[141]!==A||t[142]!==K||t[143]!==Q||t[144]!==Z||t[145]!==u?(tt=a.jsxRuntimeExports.jsx(q,{width:j,height:A,viewBox:K,direction:Q,ref:Z,children:u}),t[139]=q,t[140]=j,t[141]=A,t[142]=K,t[143]=Q,t[144]=Z,t[145]=u,t[146]=tt):tt=t[146];let D;t[147]!==r?.tooltip||t[148]!==Et||t[149]!==_t||t[150]!==ft||t[151]!==p?.tooltip||t[152]!==yt?(D=ft&&yt&&Et&&_t?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:ft,body:yt,xPos:Et,yPos:_t,backgroundStyle:p?.tooltip,className:r?.tooltip}):null,t[147]=r?.tooltip,t[148]=Et,t[149]=_t,t[150]=ft,t[151]=p?.tooltip,t[152]=yt,t[153]=D):D=t[153];let pt;t[154]!==r?.modal||t[155]!==xt||t[156]!==N?(pt=xt&&N!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:xt,data:N,setData:xe,className:r?.modal}):null,t[154]=r?.modal,t[155]=xt,t[156]=N,t[157]=pt):pt=t[157];let ut;return t[158]!==tt||t[159]!==D||t[160]!==pt?(ut=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[tt,D,pt]}),t[158]=tt,t[159]=D,t[160]=pt,t[161]=ut):ut=t[161],ut}function ai(e){return e.layer}function si(e){return e.position==="after"}function li(e){return e.layer}function ri(e){return e.position==="before"}function oi(e){return e!==0}function ui(e){return e!==0}function ci(e){return`${e.id}`}function xi(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function mi(e){return e.target}function di(e){return!b.checkIfNullOrUndefined(e.target)}function fi(e){return e.target}function hi(e){return!b.checkIfNullOrUndefined(e.target)}function pi(e){return e.size}function gi(e){return!b.checkIfNullOrUndefined(e.size)}function yi(e){return e.size}function bi(e){return!b.checkIfNullOrUndefined(e.size)}function vi(e){return Ne.sum((e.qualitativeRange||[]).filter(wi))||0}function wi(e){return!b.checkIfNullOrUndefined(e)}function ji(e){return e.target}function Ai(e){return!b.checkIfNullOrUndefined(e.size)}function Mi(e){return e.target}function ki(e){return!b.checkIfNullOrUndefined(e.target)}function Ri(e){return e.size}function Oi(e){return!b.checkIfNullOrUndefined(e.size)}function Ii(e){return e.size}function Ni(e){return!b.checkIfNullOrUndefined(e.size)}function Vi(e){const t=a.compilerRuntimeExports.c(153),{data:i,topMargin:kt,bottomMargin:ae,leftMargin:Wt,rightMargin:Rt,barColor:V,suffix:Xt,prefix:Yt,barPadding:se,showValues:Ot,showTicks:le,truncateBy:de,width:Ht,height:re,showLabels:ge,tooltip:yt,onSeriesMouseOver:bt,refValues:It,highlightedDataPoints:v,maxValue:vt,minValue:it,onSeriesMouseClick:ct,labelOrder:R,rtl:Jt,maxBarThickness:Nt,minBarThickness:Kt,resetSelectionOnDoubleClick:xt,detailsOnClick:P,barAxisTitle:nt,valueColor:Vt,noOfTicks:p,styles:r,classNames:m,targetStyle:G,targetColor:at,qualitativeRangeColors:g,measureBarWidthFactor:o,animate:x,dimmedOpacity:mt,precision:st,customLayers:E,naLabel:oe,targetLineThickness:ue,hideAxisLine:lt}=e,Qt=kt===void 0?25:kt,Zt=ae===void 0?10:ae,fe=Wt===void 0?100:Wt,ye=Rt===void 0?40:Rt,he=B.useRef(null);let C;t[0]!==x.amount||t[1]!==x.once?(C={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=C):C=t[2];const W=Xe.useInView(he,C),[dt,y]=B.useState(void 0),[ft,ce]=B.useState(void 0),[N,xe]=B.useState(void 0),[Et,pe]=B.useState(void 0),_t=nt?Qt+25:Qt;let te;t[3]!==Zt||t[4]!==fe||t[5]!==ye||t[6]!==_t?(te={top:_t,bottom:Zt,left:fe,right:ye},t[3]=Zt,t[4]=fe,t[5]=ye,t[6]=_t,t[7]=te):te=t[7];const d=te,Ct=Ht-d.left-d.right,z=re-d.top-d.bottom;let ee;t[8]!==i?(ee=Math.max(...i.filter(nn).map(en))<0?0:Math.max(...i.filter(tn).map(_i)),t[8]=i,t[9]=ee):ee=t[9];const zt=ee;let Lt;t[10]!==i?(Lt=Math.max(...i.filter(Zi).map(Qi))<0?0:Math.max(...i.filter(Ki).map(Ji)),t[10]=i,t[11]=Lt):Lt=t[11];const qt=Lt;let St;t[12]!==i?(St=Math.max(...i.map(Yi)),t[12]=i,t[13]=St):St=t[13];const $t=St;let Dt;t[14]!==zt||t[15]!==vt||t[16]!==$t||t[17]!==qt?(Dt=b.checkIfNullOrUndefined(vt)?Math.max(...[zt,qt,$t].filter(Number.isFinite))<0?0:Math.max(...[zt,qt,$t].filter(Number.isFinite)):vt,t[14]=zt,t[15]=vt,t[16]=$t,t[17]=qt,t[18]=Dt):Dt=t[18];const ie=Dt;let Tt;t[19]!==i?(Tt=Math.min(...i.filter(Xi).map(Wi))>=0?0:Math.min(...i.filter(Gi).map(Pi)),t[19]=i,t[20]=Tt):Tt=t[20];const Ft=Tt;let Ut;t[21]!==i?(Ut=Math.min(...i.filter(Bi).map(Ui))>=0?0:Math.min(...i.filter(Fi).map(Ti)),t[21]=i,t[22]=Ut):Ut=t[22];const wt=Ut;let M;t[23]!==Ft||t[24]!==it||t[25]!==wt?(M=b.checkIfNullOrUndefined(it)?Math.min(...[Ft,wt].filter(Number.isFinite))>=0?0:Math.min(...[Ft,wt].filter(Number.isFinite)):it,t[23]=Ft,t[24]=it,t[25]=wt,t[26]=M):M=t[26];const L=M;let ht;if(t[27]!==i||t[28]!==R){const s=new Set,I=i.map((w,At)=>{const et=R?`${w.label}`:`${At}`;return s.add(et),{...w,id:et}}),T=R?R.filter(w=>!s.has(w)):[];ht=[...I,...T.map(Di)],t[27]=i,t[28]=R,t[29]=ht}else ht=t[29];const rt=ht;let jt;t[30]!==rt||t[31]!==R?(jt=R??rt.map($i),t[30]=rt,t[31]=R,t[32]=jt):jt=t[32];const ot=jt;let q,X,Y,S,H,J,k,O,j,A,K,Q,Z,_;if(t[33]!==x||t[34]!==nt||t[35]!==V||t[36]!==ot||t[37]!==se||t[38]!==m?.graphObjectValues||t[39]!==m?.xAxis?.gridLines||t[40]!==m?.xAxis?.labels||t[41]!==m?.xAxis?.title||t[42]!==m?.yAxis?.axis||t[43]!==m?.yAxis?.labels||t[44]!==E||t[45]!==rt||t[46]!==P||t[47]!==mt||t[48]!==z||t[49]!==Ct||t[50]!==re||t[51]!==lt||t[52]!==v||t[53]!==W||t[54]!==d.bottom||t[55]!==d.left||t[56]!==d.top||t[57]!==Nt||t[58]!==o||t[59]!==Kt||t[60]!==ft||t[61]!==oe||t[62]!==p||t[63]!==ct||t[64]!==bt||t[65]!==st||t[66]!==Yt||t[67]!==g||t[68]!==It||t[69]!==xt||t[70]!==Jt||t[71]!==ge||t[72]!==le||t[73]!==Ot||t[74]!==r?.graphObjectValues||t[75]!==r?.xAxis?.gridLines||t[76]!==r?.xAxis?.labels||t[77]!==r?.xAxis?.title||t[78]!==r?.yAxis?.axis||t[79]!==r?.yAxis?.labels||t[80]!==Xt||t[81]!==at||t[82]!==ue||t[83]!==G||t[84]!==Qt||t[85]!==de||t[86]!==Vt||t[87]!==Ht||t[88]!==ie||t[89]!==L){const s=Ge.linear().domain([L,ie]).range([0,Ct]).nice(),I=We.band().domain(ot).range([0,Kt?Math.max(z,Kt*ot.length):Nt?Math.min(z,Nt*ot.length):z]).paddingInner(se),T=s.ticks(p);X=Mt.motion.svg,A=`${Ht}px`,K=`${re}px`,Q=`0 0 ${Ht} ${re}`,Z="ltr",_=he,H=`translate(${d.left},${d.top})`,J=le?a.jsxRuntimeExports.jsx(Qe.XTicksAndGridLines,{values:T.filter(Si),x:T.filter(qi).map(n=>s(n)),y1:0-Qt,y2:z+d.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:m?.xAxis?.gridLines,labels:m?.xAxis?.labels},suffix:Xt,prefix:Yt,labelType:"secondary",showGridLines:!0,precision:st}):null;const w=Ct/2,At=0-d.top+15,et=r?.xAxis?.title,f=m?.xAxis?.title;t[104]!==nt||t[105]!==w||t[106]!==At||t[107]!==et||t[108]!==f?(k=a.jsxRuntimeExports.jsx(Ue.AxisTitle,{x:w,y:At,style:et,className:f,text:nt}),t[104]=nt,t[105]=w,t[106]=At,t[107]=et,t[108]=f,t[109]=k):k=t[109];const F=m?.yAxis?.axis;let Bt;t[110]!==F?(Bt={axis:F},t[110]=F,t[111]=Bt):Bt=t[111];const ne=r?.yAxis?.axis;let Pt;t[112]!==ne?(Pt={axis:ne},t[112]=ne,t[113]=Pt):Pt=t[113],O=a.jsxRuntimeExports.jsx(Fe.Axis,{hideAxisLine:lt,x1:s(L<0?0:L),x2:s(L<0?0:L),y1:-2.5,y2:z+d.bottom,classNames:Bt,styles:Pt}),t[114]!==E?(j=E.filter(Li).map(zi),t[114]=E,t[115]=j):j=t[115],q=Ye.AnimatePresence,Y=rt.map(n=>b.checkIfNullOrUndefined(I(n.id))?null:a.jsxRuntimeExports.jsxs(Mt.motion.g,{className:"undp-viz-g-with-hover",onMouseEnter:U=>{y(n),pe(U.clientY),xe(U.clientX),bt?.(n)},onClick:()=>{(ct||P)&&(De.isEqual(ft,n)&&xt?(ce(void 0),ct?.(void 0)):(ce(n),ct?.(n)))},onMouseMove:U=>{y(n),pe(U.clientY),xe(U.clientX)},onMouseLeave:()=>{y(void 0),xe(void 0),pe(void 0),bt?.(void 0)},exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85},whileInView:{x:0,y:I(`${n.id}`),opacity:v.length!==0?v.indexOf(n.label)!==-1?.85:mt:.85,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:[n.qualitativeRange?n.qualitativeRange.map((U,l)=>a.jsxRuntimeExports.jsx(Mt.motion.rect,{exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0,fill:g[l]},whileInView:{x:s(l===0?0:Ne.sum(n.qualitativeRange.filter((gt,Gt)=>Gt<l&>))),width:s(U),fill:g[l],transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",y:0,height:I.bandwidth()},l)):null,n.target&&G==="background"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,x:n.target>=0?s(0):s(n.target),height:I.bandwidth(),exit:{width:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),fill:at,width:0},whileInView:{x:n.target>=0?s(0):s(n.target),fill:at,width:n.target>=0?s(n.target)-s(0):s(0)-s(n.target),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.size?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:I.bandwidth()*((1-o)/2),style:{fill:V},height:I.bandwidth()*o,exit:{width:0,x:s(0),transition:{duration:x.duration}},variants:{initial:{x:s(0),width:0},whileInView:{x:n.size>=0?s(0):s(n.size),width:n.size>=0?s(n.size)-s(0):s(0)-s(n.size),transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,n.target&&G==="line"?a.jsxRuntimeExports.jsx(Mt.motion.rect,{y:0,height:I.bandwidth(),width:ue,exit:{opacity:0,x:s(0),fill:at,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:at},whileInView:{x:s(n.target)-ue/2,opacity:1,fill:at,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial"}):null,ge?a.jsxRuntimeExports.jsx(Ze.YAxesLabels,{value:`${n.label}`.length<de?`${n.label}`:`${`${n.label}`.substring(0,de)}...`,y:0,x:(n.size||0)<0?s(0):0-d.left,width:(n.size||0)<0?Ht-s(0):s(0)+d.left,height:I.bandwidth(),alignment:n.size&&n.size<0?"left":"right",style:r?.yAxis?.labels,className:m?.yAxis?.labels,animate:x,isInView:W}):null,Ot?a.jsxRuntimeExports.jsx(Mt.motion.text,{y:I.bandwidth()/2,style:{textAnchor:n.size&&n.size<0?"end":"start",...r?.graphObjectValues||{}},className:a.mo("graph-value text-sm",!Vt&&V.length>1?" fill-primary-gray-600 dark:fill-primary-gray-300":"",m?.graphObjectValues),dx:n.size&&n.size<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:s(0),opacity:0,fill:Vt||V},whileInView:{x:n.size?s(n.size):s(0),opacity:1,fill:Vt||V,transition:{duration:x.duration}}},initial:"initial",animate:W?"whileInView":"initial",children:ze.numberFormattingFunction(n.size,oe,st,Yt,Xt)}):null]},n.label)),S=It?a.jsxRuntimeExports.jsx(a.jsxRuntimeExports.Fragment,{children:It.map((n,U)=>a.jsxRuntimeExports.jsx(Be.RefLineX,{text:n.text,color:n.color,x:s(n.value),y1:0-d.top,y2:z+d.bottom,textSide:s(n.value)>Ct*.75||Jt?"left":"right",classNames:n.classNames,styles:n.styles,animate:x,isInView:W},U))}):null,t[33]=x,t[34]=nt,t[35]=V,t[36]=ot,t[37]=se,t[38]=m?.graphObjectValues,t[39]=m?.xAxis?.gridLines,t[40]=m?.xAxis?.labels,t[41]=m?.xAxis?.title,t[42]=m?.yAxis?.axis,t[43]=m?.yAxis?.labels,t[44]=E,t[45]=rt,t[46]=P,t[47]=mt,t[48]=z,t[49]=Ct,t[50]=re,t[51]=lt,t[52]=v,t[53]=W,t[54]=d.bottom,t[55]=d.left,t[56]=d.top,t[57]=Nt,t[58]=o,t[59]=Kt,t[60]=ft,t[61]=oe,t[62]=p,t[63]=ct,t[64]=bt,t[65]=st,t[66]=Yt,t[67]=g,t[68]=It,t[69]=xt,t[70]=Jt,t[71]=ge,t[72]=le,t[73]=Ot,t[74]=r?.graphObjectValues,t[75]=r?.xAxis?.gridLines,t[76]=r?.xAxis?.labels,t[77]=r?.xAxis?.title,t[78]=r?.yAxis?.axis,t[79]=r?.yAxis?.labels,t[80]=Xt,t[81]=at,t[82]=ue,t[83]=G,t[84]=Qt,t[85]=de,t[86]=Vt,t[87]=Ht,t[88]=ie,t[89]=L,t[90]=q,t[91]=X,t[92]=Y,t[93]=S,t[94]=H,t[95]=J,t[96]=k,t[97]=O,t[98]=j,t[99]=A,t[100]=K,t[101]=Q,t[102]=Z,t[103]=_}else q=t[90],X=t[91],Y=t[92],S=t[93],H=t[94],J=t[95],k=t[96],O=t[97],j=t[98],A=t[99],K=t[100],Q=t[101],Z=t[102],_=t[103];let $;t[116]!==q||t[117]!==Y||t[118]!==S?($=a.jsxRuntimeExports.jsxs(q,{children:[Y,S]}),t[116]=q,t[117]=Y,t[118]=S,t[119]=$):$=t[119];let u;t[120]!==E?(u=E.filter(Ci).map(Ei),t[120]=E,t[121]=u):u=t[121];let tt;t[122]!==H||t[123]!==J||t[124]!==k||t[125]!==O||t[126]!==j||t[127]!==$||t[128]!==u?(tt=a.jsxRuntimeExports.jsxs("g",{transform:H,children:[J,k,O,j,$,u]}),t[122]=H,t[123]=J,t[124]=k,t[125]=O,t[126]=j,t[127]=$,t[128]=u,t[129]=tt):tt=t[129];let D;t[130]!==X||t[131]!==A||t[132]!==K||t[133]!==Q||t[134]!==Z||t[135]!==_||t[136]!==tt?(D=a.jsxRuntimeExports.jsx(X,{width:A,height:K,viewBox:Q,direction:Z,ref:_,children:tt}),t[130]=X,t[131]=A,t[132]=K,t[133]=Q,t[134]=Z,t[135]=_,t[136]=tt,t[137]=D):D=t[137];let pt;t[138]!==m?.tooltip||t[139]!==N||t[140]!==Et||t[141]!==dt||t[142]!==r?.tooltip||t[143]!==yt?(pt=dt&&yt&&N&&Et?a.jsxRuntimeExports.jsx(Te.Tooltip,{data:dt,body:yt,xPos:N,yPos:Et,backgroundStyle:r?.tooltip,className:m?.tooltip}):null,t[138]=m?.tooltip,t[139]=N,t[140]=Et,t[141]=dt,t[142]=r?.tooltip,t[143]=yt,t[144]=pt):pt=t[144];let ut;t[145]!==m?.modal||t[146]!==P||t[147]!==ft?(ut=P&&ft!==void 0?a.jsxRuntimeExports.jsx(Pe.DetailsModal,{body:P,data:ft,setData:ce,className:m?.modal}):null,t[145]=m?.modal,t[146]=P,t[147]=ft,t[148]=ut):ut=t[148];let c;return t[149]!==D||t[150]!==pt||t[151]!==ut?(c=a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[D,pt,ut]}),t[149]=D,t[150]=pt,t[151]=ut,t[152]=c):c=t[152],c}function Ei(e){return e.layer}function Ci(e){return e.position==="after"}function zi(e){return e.layer}function Li(e){return e.position==="before"}function qi(e){return e!==0}function Si(e){return e!==0}function $i(e){return`${e.id}`}function Di(e){return{id:e,label:e,size:null,target:null,qualitativeRange:null}}function Ti(e){return e.target}function Fi(e){return!b.checkIfNullOrUndefined(e.target)}function Ui(e){return e.target}function Bi(e){return!b.checkIfNullOrUndefined(e.target)}function Pi(e){return e.size}function Gi(e){return!b.checkIfNullOrUndefined(e.size)}function Wi(e){return e.size}function Xi(e){return!b.checkIfNullOrUndefined(e.size)}function Yi(e){return Ne.sum((e.qualitativeRange||[]).filter(Hi))||0}function Hi(e){return!b.checkIfNullOrUndefined(e)}function Ji(e){return e.target}function Ki(e){return!b.checkIfNullOrUndefined(e.target)}function Qi(e){return e.target}function Zi(e){return!b.checkIfNullOrUndefined(e.target)}function _i(e){return e.size}function tn(e){return!b.checkIfNullOrUndefined(e.size)}function en(e){return e.size}function nn(e){return!b.checkIfNullOrUndefined(e.size)}function an(e){const t=a.compilerRuntimeExports.c(137),{data:i,graphTitle:kt,barColor:ae,barPadding:Wt,showTicks:Rt,leftMargin:V,rightMargin:Xt,topMargin:Yt,bottomMargin:se,truncateBy:Ot,showLabels:le,showValues:de,backgroundColor:Ht,suffix:re,prefix:ge,sources:yt,graphDescription:bt,height:It,width:v,footNote:vt,colorDomain:it,colorLegendTitle:ct,padding:R,relativeHeight:Jt,tooltip:Nt,onSeriesMouseOver:Kt,refValues:xt,showColorScale:P,graphID:nt,maxValue:Vt,minValue:p,highlightedDataPoints:r,onSeriesMouseClick:m,valueColor:G,orientation:at,styles:g,classNames:o,qualitativeRangeColors:x,targetColor:mt,filterNA:st,targetStyle:E,measureBarWidthFactor:oe,animate:ue,dimmedOpacity:lt,precision:Qt,customLayers:Zt,naLabel:fe,graphDownload:ye,dataDownload:he,language:C,theme:W,sortData:dt,labelOrder:y,minHeight:ft,maxBarThickness:ce,maxNumberOfBars:N,minBarThickness:xe,ariaLabel:Et,resetSelectionOnDoubleClick:pe,detailsOnClick:_t,barAxisTitle:te,noOfTicks:d,targetLineThickness:Ct,timeline:z,hideAxisLine:ee}=e,zt=ae===void 0?Ee.Colors.primaryColors["blue-600"]:ae,Lt=Wt===void 0?.25:Wt,qt=Rt===void 0?!0:Rt,St=Ot===void 0?999:Ot,$t=le===void 0?!0:le,Dt=de===void 0?!0:de,ie=Ht===void 0?!1:Ht,Tt=re===void 0?"":re,Ft=ge===void 0?"":ge,Ut=P===void 0?!0:P;let wt;t[0]!==r?(wt=r===void 0?[]:r,t[0]=r,t[1]=wt):wt=t[1];const M=wt,L=at===void 0?"vertical":at,ht=mt===void 0?Ee.Colors.light.grays["gray-700"]:mt,rt=st===void 0?!0:st,jt=E===void 0?"line":E,ot=oe===void 0?.4:oe,q=ue===void 0?!1:ue,X=lt===void 0?.3:lt,Y=Qt===void 0?2:Qt;let S;t[2]!==Zt?(S=Zt===void 0?[]:Zt,t[2]=Zt,t[3]=S):S=t[3];const H=S,J=fe===void 0?"NA":fe,k=ye===void 0?!1:ye,O=he===void 0?!1:he,j=C===void 0?"en":C,A=W===void 0?"light":W,K=ft===void 0?0:ft,Q=pe===void 0?!0:pe,Z=d===void 0?5:d,_=Ct===void 0?2:Ct;let $;t[4]!==z?($=z===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:z,t[4]=z,t[5]=$):$=t[5];const u=$,tt=ee===void 0?!1:ee,[D,pt]=B.useState(0),[ut,c]=B.useState(0),s=B.useRef(null),I=B.useRef(null),T=L==="horizontal"?Vi:ni,[w,At]=B.useState(u.autoplay);let et;if(t[6]!==i||t[7]!==u.dateFormat){let h;t[9]!==u.dateFormat?(h=me=>Ce.parse(`${me.date}`,u.dateFormat||"yyyy",new Date).getTime(),t[9]=u.dateFormat,t[10]=h):h=t[10],et=[...new Set(i.filter(mn).map(h))],et.sort(xn),t[6]=i,t[7]=u.dateFormat,t[8]=et}else et=t[8];const f=et,[F,Bt]=B.useState(u.autoplay?0:f.length-1);let ne,Pt;t[11]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>{const h=new ResizeObserver(me=>{pt(me[0].target.clientWidth||620),c(me[0].target.clientHeight||480)});return s.current&&h.observe(s.current),()=>h.disconnect()},Pt=[],t[11]=ne,t[12]=Pt):(ne=t[11],Pt=t[12]),B.useEffect(ne,Pt);let n,U;t[13]!==w||t[14]!==u.speed||t[15]!==f?(n=()=>{const h=setInterval(()=>{Bt(me=>me<f.length-1?me+1:0)},(u.speed||2)*1e3);return w||clearInterval(h),()=>clearInterval(h)},U=[f,w,u.speed],t[13]=w,t[14]=u.speed,t[15]=f,t[16]=n,t[17]=U):(n=t[16],U=t[17]),B.useEffect(n,U);const l=u.dateFormat||"yyyy";let gt;t[18]!==F||t[19]!==l||t[20]!==u.showOnlyActiveDate||t[21]!==f?(gt=Le.getSliderMarks(f,F,u.showOnlyActiveDate,l),t[18]=F,t[19]=l,t[20]=u.showOnlyActiveDate,t[21]=f,t[22]=gt):gt=t[22];const Gt=gt,be=o?.graphContainer,ve=g?.graphContainer;let we;t[23]!==o?.description||t[24]!==o?.title||t[25]!==i||t[26]!==O||t[27]!==bt||t[28]!==k||t[29]!==kt||t[30]!==g?.description||t[31]!==g?.title||t[32]!==v?(we=kt||bt||k||O?a.jsxRuntimeExports.jsx(ei.GraphHeader,{styles:{title:g?.title,description:g?.description},classNames:{title:o?.title,description:o?.description},graphTitle:kt,graphDescription:bt,width:v,graphDownload:k?I:void 0,dataDownload:O?i.map(cn).filter(un).length>0?i.map(on).filter(rn):i.filter(ln):null}):null,t[23]=o?.description,t[24]=o?.title,t[25]=i,t[26]=O,t[27]=bt,t[28]=k,t[29]=kt,t[30]=g?.description,t[31]=g?.title,t[32]=v,t[33]=we):we=t[33];let je;t[34]!==F||t[35]!==Gt||t[36]!==w||t[37]!==u.enabled||t[38]!==f?(je=u.enabled&&f.length>0&&Gt?a.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[a.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{At(!w)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":w?"Click to pause animation":"Click to play animation",children:w?a.jsxRuntimeExports.jsx($e.Pause,{}):a.jsxRuntimeExports.jsx($e.Play,{})}),a.jsxRuntimeExports.jsx(Le.Nr,{min:f[0],max:f[f.length-1],marks:Gt,step:null,defaultValue:f[f.length-1],value:f[F],onChangeComplete:h=>{Bt(f.indexOf(h))},onChange:h=>{Bt(f.indexOf(h))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=F,t[35]=Gt,t[36]=w,t[37]=u.enabled,t[38]=f,t[39]=je):je=t[39];let Ae;t[40]!==o?.colorLegend||t[41]!==it||t[42]!==ct||t[43]!==i||t[44]!==x||t[45]!==Ut||t[46]!==A||t[47]!==v?(Ae=Ut&&i.filter(sn).length!==0&&it&&i.length>0?a.jsxRuntimeExports.jsx(ii.ColorLegend,{width:v,colorLegendTitle:ct,colors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,colorDomain:it,showNAColor:!1,className:o?.colorLegend}):null,t[40]=o?.colorLegend,t[41]=it,t[42]=ct,t[43]=i,t[44]=x,t[45]=Ut,t[46]=A,t[47]=v,t[48]=Ae):Ae=t[48];let Me;t[49]!==i.length?(Me=i.length===0&&a.jsxRuntimeExports.jsx(_e.EmptyState,{}),t[49]=i.length,t[50]=Me):Me=t[50];let ke;t[51]!==T||t[52]!==q||t[53]!==te||t[54]!==zt||t[55]!==Lt||t[56]!==se||t[57]!==o||t[58]!==H||t[59]!==i||t[60]!==_t||t[61]!==X||t[62]!==rt||t[63]!==tt||t[64]!==M||t[65]!==F||t[66]!==y||t[67]!==j||t[68]!==V||t[69]!==ce||t[70]!==N||t[71]!==Vt||t[72]!==ot||t[73]!==xe||t[74]!==p||t[75]!==J||t[76]!==Z||t[77]!==m||t[78]!==Kt||t[79]!==L||t[80]!==Y||t[81]!==Ft||t[82]!==x||t[83]!==xt||t[84]!==Q||t[85]!==Xt||t[86]!==$t||t[87]!==qt||t[88]!==Dt||t[89]!==dt||t[90]!==g||t[91]!==Tt||t[92]!==ut||t[93]!==D||t[94]!==ht||t[95]!==_||t[96]!==jt||t[97]!==A||t[98]!==u.dateFormat||t[99]!==u.enabled||t[100]!==Nt||t[101]!==Yt||t[102]!==St||t[103]!==f||t[104]!==G?(ke=D&&ut&&i.length>0?a.jsxRuntimeExports.jsx(T,{hideAxisLine:tt,data:dt?He.orderBy(Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h),[h=>h.size===void 0?dt==="asc"?(L==="horizontal"?1:-1)*(1/0):(L==="horizontal"?-1:1)*(1/0):h.size],[dt]).filter((h,me)=>N?me<N:!0):Se.ensureCompleteDataForBulletChart(i,u.dateFormat||"yyyy").filter(h=>u.enabled?h.date===Ce.format(new Date(f[F]),u.dateFormat||"yyyy"):h).filter(h=>rt?!b.checkIfNullOrUndefined(h.size):h).filter((h,me)=>N?me<N:!0),barColor:zt,targetColor:ht,width:D,refValues:xt,height:ut,suffix:Tt,prefix:Ft,barPadding:Lt,showLabels:$t,showValues:Dt,showTicks:qt,truncateBy:St,leftMargin:V,rightMargin:Xt,qualitativeRangeColors:x||Ee.Colors[A].sequentialColors.positiveColorsx10,topMargin:Yt,bottomMargin:se,tooltip:Nt,onSeriesMouseOver:Kt,maxValue:Vt,minValue:p,highlightedDataPoints:M,onSeriesMouseClick:m,labelOrder:y,maxBarThickness:ce,minBarThickness:xe,resetSelectionOnDoubleClick:Q,detailsOnClick:_t,barAxisTitle:te,noOfTicks:Z,valueColor:G,styles:g,classNames:o,targetStyle:jt,dimmedOpacity:X,measureBarWidthFactor:ot,animate:q===!0?{duration:.5,once:!0,amount:.5}:q||{duration:0,once:!0,amount:0},precision:Y,customLayers:H,naLabel:J,targetLineThickness:_,rtl:j==="ar"||j==="he"}):null,t[51]=T,t[52]=q,t[53]=te,t[54]=zt,t[55]=Lt,t[56]=se,t[57]=o,t[58]=H,t[59]=i,t[60]=_t,t[61]=X,t[62]=rt,t[63]=tt,t[64]=M,t[65]=F,t[66]=y,t[67]=j,t[68]=V,t[69]=ce,t[70]=N,t[71]=Vt,t[72]=ot,t[73]=xe,t[74]=p,t[75]=J,t[76]=Z,t[77]=m,t[78]=Kt,t[79]=L,t[80]=Y,t[81]=Ft,t[82]=x,t[83]=xt,t[84]=Q,t[85]=Xt,t[86]=$t,t[87]=qt,t[88]=Dt,t[89]=dt,t[90]=g,t[91]=Tt,t[92]=ut,t[93]=D,t[94]=ht,t[95]=_,t[96]=jt,t[97]=A,t[98]=u.dateFormat,t[99]=u.enabled,t[100]=Nt,t[101]=Yt,t[102]=St,t[103]=f,t[104]=G,t[105]=ke):ke=t[105];let Re;t[106]!==Me||t[107]!==ke?(Re=a.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:s,children:[Me,ke]}),t[106]=Me,t[107]=ke,t[108]=Re):Re=t[108];let Oe;t[109]!==Ae||t[110]!==Re?(Oe=a.jsxRuntimeExports.jsxs("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:[Ae,Re]}),t[109]=Ae,t[110]=Re,t[111]=Oe):Oe=t[111];let Ie;t[112]!==o?.footnote||t[113]!==o?.source||t[114]!==vt||t[115]!==yt||t[116]!==g?.footnote||t[117]!==g?.source||t[118]!==v?(Ie=yt||vt?a.jsxRuntimeExports.jsx(ti.GraphFooter,{styles:{footnote:g?.footnote,source:g?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:yt,footNote:vt,width:v}):null,t[112]=o?.footnote,t[113]=o?.source,t[114]=vt,t[115]=yt,t[116]=g?.footnote,t[117]=g?.source,t[118]=v,t[119]=Ie):Ie=t[119];let Ve;return t[120]!==Et||t[121]!==ie||t[122]!==nt||t[123]!==It||t[124]!==j||t[125]!==K||t[126]!==R||t[127]!==Jt||t[128]!==be||t[129]!==ve||t[130]!==we||t[131]!==je||t[132]!==Oe||t[133]!==Ie||t[134]!==A||t[135]!==v?(Ve=a.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:be,style:ve,id:nt,ref:I,"aria-label":Et,backgroundColor:ie,theme:A,language:j,minHeight:K,width:v,height:It,relativeHeight:Jt,padding:R,children:[we,je,Oe,Ie]}),t[120]=Et,t[121]=ie,t[122]=nt,t[123]=It,t[124]=j,t[125]=K,t[126]=R,t[127]=Jt,t[128]=be,t[129]=ve,t[130]=we,t[131]=je,t[132]=Oe,t[133]=Ie,t[134]=A,t[135]=v,t[136]=Ve):Ve=t[136],Ve}function sn(e){return e.qualitativeRange}function ln(e){return e!==void 0}function rn(e){return e!==void 0}function on(e){return e.data}function un(e){return e!==void 0}function cn(e){return e.data}function xn(e,t){return e-t}function mn(e){return e.date}exports.BulletChart=an;
|
|
2
2
|
//# sourceMappingURL=BulletChart.cjs.map
|
package/dist/BulletChart.js
CHANGED
|
@@ -22,7 +22,7 @@ import { m as Mt } from "./proxy-DRuSUlPL.js";
|
|
|
22
22
|
import { u as Ge } from "./use-in-view-Dl5L8LtP.js";
|
|
23
23
|
import { A as He } from "./index-CtMBjvtq.js";
|
|
24
24
|
import { Colors as Ne } from "./Colors.js";
|
|
25
|
-
import { E as ni } from "./EmptyState-
|
|
25
|
+
import { E as ni } from "./EmptyState-dScPFkLy.js";
|
|
26
26
|
import { a as li, G as si } from "./GraphContainer-CF6ws3pd.js";
|
|
27
27
|
import { GraphFooter as oi } from "./GraphFooter.js";
|
|
28
28
|
import { GraphHeader as ri } from "./GraphHeader.js";
|
package/dist/ButterflyChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),V=require("react"),pe=require("./getSliderMarks-CIuSoedo.cjs"),fe=require("./parse-xYI9yrvL.cjs"),ge=require("./index-DQA8q5sC.cjs"),ye=require("./numberFormattingFunction-02t-wJta.cjs"),Be=require("./Tooltip-BLa2EfMs.cjs"),be=require("./XTicksAndGridLines-CekrPykD.cjs"),ve=require("./Axis-Jt_tmhxS.cjs"),Le=require("./YAxesLabels-BQ2aCazV.cjs"),je=require("./ReferenceLine-M9aP3dj-.cjs"),Ce=require("./DetailsModal-DHttOA80.cjs"),ke=require("./band-VYfcZeJ2.cjs"),we=require("./linear-CgUCbw9F.cjs"),Nt=require("./proxy-C4-uo6nS.cjs"),Me=require("./use-in-view-C3o_ntMv.cjs"),de=require("./index-CoobIWNj.cjs"),Ve=require("./GraphFooter.cjs"),$e=require("./GraphHeader.cjs"),Oe=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ne=require("./EmptyState-DX0t62iF.cjs"),Re=require("./index-sbKVyHS2.cjs"),he=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Se=require("./ensureCompleteData-D9bQTiVS.cjs"),Ee=require("./GraphContainer-B1EDxJ0S.cjs");function De(s){const t=i.compilerRuntimeExports.c(141),{data:a,width:E,height:v,barColors:m,centerGap:j,refValues:h,maxValue:xt,minValue:Rt,showValues:mt,axisTitles:dt,rightMargin:Jt,leftMargin:Kt,topMargin:Y,bottomMargin:Qt,tooltip:St,onSeriesMouseOver:ht,barPadding:Dt,truncateBy:Et,onSeriesMouseClick:$,showTicks:Bt,suffix:pt,prefix:ft,resetSelectionOnDoubleClick:Lt,detailsOnClick:S,styles:r,classNames:n,noOfTicks:B,animate:x,precision:gt,customLayers:D,minValueLeftBar:q,minValueRightBar:T,naLabel:qt,hideAxisLine:Tt}=s,le=V.useRef(null);let Ct;t[0]!==x.amount||t[1]!==x.once?(Ct={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=Ct):Ct=t[2];const O=Me.useInView(le,Ct),[Ft,U]=V.useState(void 0),[F,yt]=V.useState(void 0),[d,l]=V.useState(void 0),[It,bt]=V.useState(void 0);let Gt;t[3]!==Qt||t[4]!==Kt||t[5]!==Jt||t[6]!==Y?(Gt={top:Y,bottom:Qt,left:Kt,right:Jt},t[3]=Qt,t[4]=Kt,t[5]=Jt,t[6]=Y,t[7]=Gt):Gt=t[7];const u=Gt,L=E-u.left-u.right,C=v-u.top-u.bottom;let vt,I,k,W,z,J,K,Q,M,w,Z,_,tt,et;if(t[8]!==x||t[9]!==m[0]||t[10]!==m[1]||t[11]!==Dt||t[12]!==j||t[13]!==n?.graphObjectValues||t[14]!==n?.xAxis?.gridLines||t[15]!==n?.xAxis?.labels||t[16]!==n?.yAxis?.axis||t[17]!==n?.yAxis?.labels||t[18]!==D||t[19]!==a||t[20]!==S||t[21]!==C||t[22]!==L||t[23]!==v||t[24]!==Tt||t[25]!==O||t[26]!==u.bottom||t[27]!==u.left||t[28]!==u.top||t[29]!==xt||t[30]!==Rt||t[31]!==q||t[32]!==T||t[33]!==F||t[34]!==qt||t[35]!==B||t[36]!==$||t[37]!==ht||t[38]!==gt||t[39]!==ft||t[40]!==h||t[41]!==Lt||t[42]!==Bt||t[43]!==mt||t[44]!==r?.graphObjectValues||t[45]!==r?.xAxis?.gridLines||t[46]!==r?.xAxis?.labels||t[47]!==r?.yAxis?.axis||t[48]!==r?.yAxis?.labels||t[49]!==pt||t[50]!==Y||t[51]!==Et||t[52]!==E){const Zt=a.map(Ue),A=ke.band().domain(Zt.map(Ye)).range([C,0]).paddingInner(Dt),p=we.linear().domain([Rt,xt]).range([0,(L-j)/2]).nice(),N=p.ticks(B),f=we.linear().domain([Rt,xt]).range([(L-j)/2,0]).nice(),Vt=f.ticks(B);k=Nt.motion.svg,tt=`${E}px`,et=`${v}px`,W=`0 0 ${E} ${v}`,z="ltr",J=le,M=`translate(${u.left},${u.top})`,t[67]!==D?(w=D.filter(He).map(Xe),t[67]=D,t[68]=w):w=t[68];const c=n?.yAxis?.axis;let R;t[69]!==c?(R={axis:c},t[69]=c,t[70]=R):R=t[70];const Wt=r?.yAxis?.axis;let $t;t[71]!==Wt?($t={axis:Wt},t[71]=Wt,t[72]=$t):$t=t[72],Z=i.jsxRuntimeExports.jsxs("g",{transform:"translate(0,0)",children:[Bt?i.jsxRuntimeExports.jsx(be.XTicksAndGridLines,{values:Vt.filter(Pe),x:Vt.filter(Ge).map(e=>f(e)),y1:0-Y,y2:C+u.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:pt,prefix:ft,labelType:"secondary",showGridLines:!0,leftLabel:!0,precision:gt}):null,i.jsxRuntimeExports.jsxs(de.AnimatePresence,{children:[Zt.map((e,y)=>i.jsxRuntimeExports.jsxs(Nt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:b=>{U(e),bt(b.clientY),l(b.clientX),ht?.(e)},onClick:()=>{($||S)&&(ge.isEqual(F,e)&&Lt?(yt(void 0),$?.(void 0)):(yt(e),$?.(e)))},onMouseMove:b=>{U(e),bt(b.clientY),l(b.clientX)},onMouseLeave:()=>{U(void 0),l(void 0),bt(void 0),ht?.(void 0)},children:[e.leftBar?i.jsxRuntimeExports.jsx(Nt.motion.rect,{y:A(`${y}`),style:{fill:m[0]},height:A.bandwidth(),variants:{initial:{x:f(0),width:0},whileInView:{x:e.leftBar<0?f(0):f(e.leftBar),width:e.leftBar<0?f(e.leftBar)-f(0):f(0)-f(e.leftBar),transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",exit:{x:f(0),width:0,transition:{duration:x.duration}}}):null,mt?i.jsxRuntimeExports.jsx(Nt.motion.text,{y:A(`${y}`)+A.bandwidth()/2,style:{textAnchor:e.rightBar&&e.rightBar>0?"end":"start",...r?.graphObjectValues||{}},dx:e.rightBar&&e.rightBar>0?-5:5,dy:"0.33em",className:i.mo("graph-value text-sm",n?.graphObjectValues),exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:f(0),opacity:0,fill:m[0]},whileInView:{x:e.leftBar?f(e.leftBar):f(q<0?0:q),opacity:1,fill:m[0],transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:ye.numberFormattingFunction(e.rightBar,qt,gt,ft,pt)}):null]},e.label)),i.jsxRuntimeExports.jsx(ve.Axis,{hideAxisLine:Tt,y1:-2.5,y2:C+u.bottom,x1:f(q<0?0:q),x2:f(q<0?0:q),classNames:R,styles:$t}),h?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:h.map((e,y)=>i.jsxRuntimeExports.jsx(je.RefLineX,{text:e.text,color:e.color,x:f(e.value),y1:0-u.top,y2:C+u.bottom,textSide:"left",classNames:e.classNames,styles:e.styles,animate:x,isInView:O},y))}):null]})]});const _t=n?.yAxis?.axis;let wt;t[73]!==_t?(wt={axis:_t},t[73]=_t,t[74]=wt):wt=t[74];const Ot=r?.yAxis?.axis;let At;t[75]!==Ot?(At={axis:Ot},t[75]=Ot,t[76]=At):At=t[76],_=i.jsxRuntimeExports.jsxs("g",{transform:`translate(${(L+j)/2},0)`,children:[Bt?i.jsxRuntimeExports.jsx(be.XTicksAndGridLines,{values:N.filter(Ie),x:N.filter(Fe).map(e=>p(e)),y1:0-Y,y2:C+u.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:pt,prefix:ft,labelType:"secondary",showGridLines:!0,precision:gt}):null,i.jsxRuntimeExports.jsxs(de.AnimatePresence,{children:[Zt.map((e,y)=>i.jsxRuntimeExports.jsxs(Nt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:b=>{U(e),bt(b.clientY),l(b.clientX),ht?.(e)},onClick:()=>{($||S)&&(ge.isEqual(F,e)&&Lt?(yt(void 0),$?.(void 0)):(yt(e),$?.(e)))},onMouseMove:b=>{U(e),bt(b.clientY),l(b.clientX)},onMouseLeave:()=>{U(void 0),l(void 0),bt(void 0),ht?.(void 0)},children:[e.rightBar?i.jsxRuntimeExports.jsx(Nt.motion.rect,{y:A(`${y}`),style:{fill:m[1]},height:A.bandwidth(),exit:{x:p(0),width:0,transition:{duration:x.duration}},variants:{initial:{x:p(0),width:0},whileInView:{x:e.rightBar>=0?p(0):p(e.rightBar),width:e.rightBar>=0?p(e.rightBar)-p(0):p(0)-p(e.rightBar),transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial"}):null,mt?i.jsxRuntimeExports.jsx(Nt.motion.text,{y:A(`${y}`)+A.bandwidth()/2,style:{textAnchor:e.rightBar&&e.rightBar<0?"end":"start",...r?.graphObjectValues||{}},className:i.mo("graph-value text-sm",n?.graphObjectValues),dx:e.rightBar&&e.rightBar<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:p(0),opacity:0,fill:m[1]},whileInView:{x:e.rightBar?p(e.rightBar):p(T<0?0:T),opacity:1,fill:m[1],transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:ye.numberFormattingFunction(e.rightBar,qt,gt,ft,pt)}):null]},y)),i.jsxRuntimeExports.jsx(ve.Axis,{hideAxisLine:Tt,y1:-2.5,y2:C+u.bottom,x1:p(T<0?0:T),x2:p(T<0?0:T),classNames:wt,styles:At}),h?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:h.map((e,y)=>i.jsxRuntimeExports.jsx(je.RefLineX,{text:e.text,color:e.color,x:p(e.value),y1:0-u.top,y2:C+u.bottom,textSide:"right",classNames:e.classNames,styles:e.styles,animate:x,isInView:O},y))}):null]})]}),I=de.AnimatePresence,vt=Nt.motion.g,K=`translate(${L/2},0)`,Q=Zt.map((e,y)=>i.jsxRuntimeExports.jsx(Le.YAxesLabels,{value:`${e.label}`.length<Et?`${e.label}`:`${`${e.label}`.substring(0,Et)}...`,y:A(`${e.id}`),x:0-j/2,width:j,height:A.bandwidth(),alignment:"center",style:r?.yAxis?.labels,className:n?.yAxis?.labels,animate:x,isInView:O},y)),t[8]=x,t[9]=m[0],t[10]=m[1],t[11]=Dt,t[12]=j,t[13]=n?.graphObjectValues,t[14]=n?.xAxis?.gridLines,t[15]=n?.xAxis?.labels,t[16]=n?.yAxis?.axis,t[17]=n?.yAxis?.labels,t[18]=D,t[19]=a,t[20]=S,t[21]=C,t[22]=L,t[23]=v,t[24]=Tt,t[25]=O,t[26]=u.bottom,t[27]=u.left,t[28]=u.top,t[29]=xt,t[30]=Rt,t[31]=q,t[32]=T,t[33]=F,t[34]=qt,t[35]=B,t[36]=$,t[37]=ht,t[38]=gt,t[39]=ft,t[40]=h,t[41]=Lt,t[42]=Bt,t[43]=mt,t[44]=r?.graphObjectValues,t[45]=r?.xAxis?.gridLines,t[46]=r?.xAxis?.labels,t[47]=r?.yAxis?.axis,t[48]=r?.yAxis?.labels,t[49]=pt,t[50]=Y,t[51]=Et,t[52]=E,t[53]=vt,t[54]=I,t[55]=k,t[56]=W,t[57]=z,t[58]=J,t[59]=K,t[60]=Q,t[61]=M,t[62]=w,t[63]=Z,t[64]=_,t[65]=tt,t[66]=et}else vt=t[53],I=t[54],k=t[55],W=t[56],z=t[57],J=t[58],K=t[59],Q=t[60],M=t[61],w=t[62],Z=t[63],_=t[64],tt=t[65],et=t[66];let G;t[77]!==vt||t[78]!==K||t[79]!==Q?(G=i.jsxRuntimeExports.jsx(vt,{transform:K,children:Q}),t[77]=vt,t[78]=K,t[79]=Q,t[80]=G):G=t[80];let it;t[81]!==I||t[82]!==G?(it=i.jsxRuntimeExports.jsx(I,{children:G}),t[81]=I,t[82]=G,t[83]=it):it=t[83];const Pt=`translate(0,${C})`,Xt=r?.yAxis?.title;let st;t[84]!==m[0]||t[85]!==Xt?(st={fill:m[0],textAnchor:"end",...Xt},t[84]=m[0],t[85]=Xt,t[86]=st):st=t[86];const Ht=n?.yAxis?.title;let P;t[87]!==Ht?(P=i.mo("text-base",Ht),t[87]=Ht,t[88]=P):P=t[88];const kt=L/2-j/2;let nt;t[89]!==dt[0]||t[90]!==st||t[91]!==P||t[92]!==kt?(nt=i.jsxRuntimeExports.jsx("text",{style:st,className:P,x:kt,y:0,dx:-5,dy:20,children:dt[0]}),t[89]=dt[0],t[90]=st,t[91]=P,t[92]=kt,t[93]=nt):nt=t[93];const Yt=r?.yAxis?.title;let ot;t[94]!==m[1]||t[95]!==Yt?(ot={fill:m[1],textAnchor:"start",...Yt},t[94]=m[1],t[95]=Yt,t[96]=ot):ot=t[96];const Ut=n?.yAxis?.title;let at;t[97]!==Ut?(at=i.mo("text-base",Ut),t[97]=Ut,t[98]=at):at=t[98];const Mt=L/2+j/2;let rt;t[99]!==dt[1]||t[100]!==ot||t[101]!==at||t[102]!==Mt?(rt=i.jsxRuntimeExports.jsx("text",{style:ot,className:at,x:Mt,y:0,dx:5,dy:20,children:dt[1]}),t[99]=dt[1],t[100]=ot,t[101]=at,t[102]=Mt,t[103]=rt):rt=t[103];let X;t[104]!==Pt||t[105]!==nt||t[106]!==rt?(X=i.jsxRuntimeExports.jsxs("g",{transform:Pt,children:[nt,rt]}),t[104]=Pt,t[105]=nt,t[106]=rt,t[107]=X):X=t[107];let lt;t[108]!==D?(lt=D.filter(Te).map(qe),t[108]=D,t[109]=lt):lt=t[109];let H;t[110]!==it||t[111]!==X||t[112]!==lt||t[113]!==M||t[114]!==w||t[115]!==Z||t[116]!==_?(H=i.jsxRuntimeExports.jsxs("g",{transform:M,children:[w,Z,_,it,X,lt]}),t[110]=it,t[111]=X,t[112]=lt,t[113]=M,t[114]=w,t[115]=Z,t[116]=_,t[117]=H):H=t[117];let o;t[118]!==k||t[119]!==W||t[120]!==z||t[121]!==J||t[122]!==H||t[123]!==tt||t[124]!==et?(o=i.jsxRuntimeExports.jsx(k,{width:tt,height:et,viewBox:W,direction:z,ref:J,children:H}),t[118]=k,t[119]=W,t[120]=z,t[121]=J,t[122]=H,t[123]=tt,t[124]=et,t[125]=o):o=t[125];let ct;t[126]!==n?.tooltip||t[127]!==d||t[128]!==It||t[129]!==Ft||t[130]!==r?.tooltip||t[131]!==St?(ct=Ft&&St&&d&&It?i.jsxRuntimeExports.jsx(Be.Tooltip,{data:Ft,body:St,xPos:d,yPos:It,backgroundStyle:r?.tooltip,className:n?.tooltip}):null,t[126]=n?.tooltip,t[127]=d,t[128]=It,t[129]=Ft,t[130]=r?.tooltip,t[131]=St,t[132]=ct):ct=t[132];let ut;t[133]!==n?.modal||t[134]!==S||t[135]!==F?(ut=S&&F!==void 0?i.jsxRuntimeExports.jsx(Ce.DetailsModal,{body:S,data:F,setData:yt,className:n?.modal}):null,t[133]=n?.modal,t[134]=S,t[135]=F,t[136]=ut):ut=t[136];let jt;return t[137]!==o||t[138]!==ct||t[139]!==ut?(jt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[o,ct,ut]}),t[137]=o,t[138]=ct,t[139]=ut,t[140]=jt):jt=t[140],jt}function qe(s){return s.layer}function Te(s){return s.position==="after"}function Fe(s){return s!==0}function Ie(s){return s!==0}function Ge(s){return s!==0}function Pe(s){return s!==0}function Xe(s){return s.layer}function He(s){return s.position==="before"}function Ye(s){return`${s.id}`}function Ue(s,t){return{...s,id:`${t}`}}function re(s,t,a,E){const v=s.map(h=>h[t]).filter(h=>!he.checkIfNullOrUndefined(h)),m=he.checkIfNullOrUndefined(a)?Math.min(...v)>=0?0:Math.min(...v):a,j=he.checkIfNullOrUndefined(E)?Math.max(...v)<0?0:Math.max(...v):E;return{min:m,max:j}}function We(s){const t=i.compilerRuntimeExports.c(119),{data:a,graphTitle:E,sources:v,graphDescription:m,height:j,width:h,footNote:xt,padding:Rt,barColors:mt,backgroundColor:dt,leftMargin:Jt,rightMargin:Kt,topMargin:Y,bottomMargin:Qt,rightBarTitle:St,leftBarTitle:ht,tooltip:Dt,relativeHeight:Et,onSeriesMouseOver:$,graphID:Bt,barPadding:pt,truncateBy:ft,onSeriesMouseClick:Lt,centerGap:S,showValues:r,maxValue:n,minValue:B,refValues:x,suffix:gt,prefix:D,showTicks:q,showColorScale:T,graphDownload:qt,dataDownload:Tt,language:le,colorLegendTitle:Ct,minHeight:O,theme:Ft,ariaLabel:U,resetSelectionOnDoubleClick:F,detailsOnClick:yt,styles:d,classNames:l,noOfTicks:It,animate:bt,precision:Gt,customLayers:u,timeline:L,naLabel:C,hideAxisLine:vt}=s;let I;t[0]!==mt?(I=mt===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:mt,t[0]=mt,t[1]=I):I=t[1];const k=I,W=dt===void 0?!1:dt,z=Jt===void 0?20:Jt,J=Kt===void 0?20:Kt,K=Y===void 0?25:Y,Q=Qt===void 0?30:Qt,M=St===void 0?"Right bar graph":St,w=ht===void 0?"Left bar graph":ht,Z=pt===void 0?.25:pt,_=ft===void 0?999:ft,tt=S===void 0?100:S,et=r===void 0?!0:r;let G;t[2]!==x?(G=x===void 0?[]:x,t[2]=x,t[3]=G):G=t[3];const it=G,Pt=gt===void 0?"":gt,Xt=D===void 0?"":D,st=q===void 0?!0:q,Ht=T===void 0?!1:T,P=qt===void 0?!1:qt,kt=Tt===void 0?!1:Tt,nt=le===void 0?"en":le,Yt=O===void 0?0:O,ot=Ft===void 0?"light":Ft,Ut=F===void 0?!0:F,at=It===void 0?5:It,Mt=bt===void 0?!1:bt,rt=Gt===void 0?2:Gt;let X;t[4]!==u?(X=u===void 0?[]:u,t[4]=u,t[5]=X):X=t[5];const lt=X;let H;t[6]!==L?(H=L===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:L,t[6]=L,t[7]=H):H=t[7];const o=H,ct=C===void 0?"NA":C,ut=vt===void 0?!1:vt,[jt,Zt]=V.useState(0),[A,p]=V.useState(0),[N,f]=V.useState(o.autoplay);let Vt;if(t[8]!==a||t[9]!==o.dateFormat){let g;t[11]!==o.dateFormat?(g=zt=>fe.parse(`${zt.date}`,o.dateFormat||"yyyy",new Date).getTime(),t[11]=o.dateFormat,t[12]=g):g=t[12],Vt=[...new Set(a.filter(ti).map(g))],Vt.sort(_e),t[8]=a,t[9]=o.dateFormat,t[10]=Vt}else Vt=t[10];const c=Vt,[R,Wt]=V.useState(o.autoplay?0:c.length-1),$t=V.useRef(null),_t=V.useRef(null);let wt,Ot;t[13]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>{const g=new ResizeObserver(zt=>{Zt(zt[0].target.clientWidth||620),p(zt[0].target.clientHeight||480)});return $t.current&&g.observe($t.current),()=>g.disconnect()},Ot=[],t[13]=wt,t[14]=Ot):(wt=t[13],Ot=t[14]),V.useEffect(wt,Ot);let At,e;t[15]!==N||t[16]!==o.speed||t[17]!==c?(At=()=>{const g=setInterval(()=>{Wt(zt=>zt<c.length-1?zt+1:0)},(o.speed||2)*1e3);return N||clearInterval(g),()=>clearInterval(g)},e=[c,N,o.speed],t[15]=N,t[16]=o.speed,t[17]=c,t[18]=At,t[19]=e):(At=t[18],e=t[19]),V.useEffect(At,e);const y=o.dateFormat||"yyyy";let b;t[20]!==R||t[21]!==y||t[22]!==o.showOnlyActiveDate||t[23]!==c?(b=pe.getSliderMarks(c,R,o.showOnlyActiveDate,y),t[20]=R,t[21]=y,t[22]=o.showOnlyActiveDate,t[23]=c,t[24]=b):b=t[24];const ce=b,xe=l?.graphContainer,me=d?.graphContainer;let te;t[25]!==l?.description||t[26]!==l?.title||t[27]!==a||t[28]!==kt||t[29]!==m||t[30]!==P||t[31]!==E||t[32]!==d?.description||t[33]!==d?.title||t[34]!==h?(te=E||m||P||kt?i.jsxRuntimeExports.jsx($e.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:l?.title,description:l?.description},graphTitle:E,graphDescription:m,width:h,graphDownload:P?_t:void 0,dataDownload:kt?a.map(Ze).filter(Qe).length>0?a.map(Ke).filter(Je):a.filter(ze):null}):null,t[25]=l?.description,t[26]=l?.title,t[27]=a,t[28]=kt,t[29]=m,t[30]=P,t[31]=E,t[32]=d?.description,t[33]=d?.title,t[34]=h,t[35]=te):te=t[35];let ee;t[36]!==R||t[37]!==ce||t[38]!==N||t[39]!==o.enabled||t[40]!==c?(ee=o.enabled&&c.length>0&&ce?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{f(!N)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":N?"Click to pause animation":"Click to play animation",children:N?i.jsxRuntimeExports.jsx(Re.Pause,{}):i.jsxRuntimeExports.jsx(Re.Play,{})}),i.jsxRuntimeExports.jsx(pe.Nr,{min:c[0],max:c[c.length-1],marks:ce,step:null,defaultValue:c[c.length-1],value:c[R],onChangeComplete:g=>{Wt(c.indexOf(g))},onChange:g=>{Wt(c.indexOf(g))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[36]=R,t[37]=ce,t[38]=N,t[39]=o.enabled,t[40]=c,t[41]=ee):ee=t[41];let ie;t[42]!==k||t[43]!==l?.colorLegend||t[44]!==Ct||t[45]!==a.length||t[46]!==w||t[47]!==M||t[48]!==Ht?(ie=Ht&&a.length>0?i.jsxRuntimeExports.jsx(Oe.ColorLegend,{colorLegendTitle:Ct,colorDomain:[w,M],colors:k,showNAColor:!1,className:l?.colorLegend}):null,t[42]=k,t[43]=l?.colorLegend,t[44]=Ct,t[45]=a.length,t[46]=w,t[47]=M,t[48]=Ht,t[49]=ie):ie=t[49];let se;t[50]!==a.length?(se=a.length===0&&i.jsxRuntimeExports.jsx(Ne.EmptyState,{}),t[50]=a.length,t[51]=se):se=t[51];let ne;t[52]!==Mt||t[53]!==k||t[54]!==Z||t[55]!==Q||t[56]!==tt||t[57]!==l||t[58]!==lt||t[59]!==a||t[60]!==yt||t[61]!==ut||t[62]!==R||t[63]!==w||t[64]!==z||t[65]!==n||t[66]!==B||t[67]!==ct||t[68]!==at||t[69]!==Lt||t[70]!==$||t[71]!==rt||t[72]!==Xt||t[73]!==it||t[74]!==Ut||t[75]!==M||t[76]!==J||t[77]!==st||t[78]!==et||t[79]!==d||t[80]!==Pt||t[81]!==A||t[82]!==jt||t[83]!==o.dateFormat||t[84]!==o.enabled||t[85]!==Dt||t[86]!==K||t[87]!==_||t[88]!==c?(ne=jt&&A&&a.length>0?i.jsxRuntimeExports.jsx(De,{hideAxisLine:ut,data:Se.ensureCompleteDataForButterFlyChart(a,o.dateFormat||"yyyy").filter(g=>o.enabled?g.date===fe.format(new Date(c[R]),o.dateFormat||"yyyy"):g),barColors:k,width:jt,centerGap:tt,height:A,truncateBy:_,leftMargin:z,rightMargin:J,topMargin:K,bottomMargin:Q,axisTitles:[w,M],tooltip:Dt,onSeriesMouseOver:$,barPadding:Z,refValues:it,maxValue:Math.max(re(a,"leftBar",B,n).max,re(a,"rightBar",B,n).max),minValue:Math.min(re(a,"leftBar",B,n).min,re(a,"rightBar",B,n).min),minValueLeftBar:re(a,"leftBar",B,n).min,minValueRightBar:re(a,"rightBar",B,n).min,showValues:et,onSeriesMouseClick:Lt,showTicks:st,suffix:Pt,prefix:Xt,resetSelectionOnDoubleClick:Ut,detailsOnClick:yt,styles:d,classNames:l,noOfTicks:at,animate:Mt===!0?{duration:.5,once:!0,amount:.5}:Mt||{duration:0,once:!0,amount:0},precision:rt,customLayers:lt,naLabel:ct}):null,t[52]=Mt,t[53]=k,t[54]=Z,t[55]=Q,t[56]=tt,t[57]=l,t[58]=lt,t[59]=a,t[60]=yt,t[61]=ut,t[62]=R,t[63]=w,t[64]=z,t[65]=n,t[66]=B,t[67]=ct,t[68]=at,t[69]=Lt,t[70]=$,t[71]=rt,t[72]=Xt,t[73]=it,t[74]=Ut,t[75]=M,t[76]=J,t[77]=st,t[78]=et,t[79]=d,t[80]=Pt,t[81]=A,t[82]=jt,t[83]=o.dateFormat,t[84]=o.enabled,t[85]=Dt,t[86]=K,t[87]=_,t[88]=c,t[89]=ne):ne=t[89];let oe;t[90]!==se||t[91]!==ne?(oe=i.jsxRuntimeExports.jsxs(Ee.GraphArea,{ref:$t,children:[se,ne]}),t[90]=se,t[91]=ne,t[92]=oe):oe=t[92];let ae;t[93]!==l?.footnote||t[94]!==l?.source||t[95]!==xt||t[96]!==v||t[97]!==d?.footnote||t[98]!==d?.source||t[99]!==h?(ae=v||xt?i.jsxRuntimeExports.jsx(Ve.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:v,footNote:xt,width:h}):null,t[93]=l?.footnote,t[94]=l?.source,t[95]=xt,t[96]=v,t[97]=d?.footnote,t[98]=d?.source,t[99]=h,t[100]=ae):ae=t[100];let ue;return t[101]!==U||t[102]!==W||t[103]!==Bt||t[104]!==j||t[105]!==nt||t[106]!==Yt||t[107]!==Rt||t[108]!==Et||t[109]!==xe||t[110]!==me||t[111]!==te||t[112]!==ee||t[113]!==ie||t[114]!==oe||t[115]!==ae||t[116]!==ot||t[117]!==h?(ue=i.jsxRuntimeExports.jsxs(Ee.GraphContainer,{className:xe,style:me,id:Bt,ref:_t,"aria-label":U,backgroundColor:W,theme:ot,language:nt,minHeight:Yt,width:h,height:j,relativeHeight:Et,padding:Rt,children:[te,ee,ie,oe,ae]}),t[101]=U,t[102]=W,t[103]=Bt,t[104]=j,t[105]=nt,t[106]=Yt,t[107]=Rt,t[108]=Et,t[109]=xe,t[110]=me,t[111]=te,t[112]=ee,t[113]=ie,t[114]=oe,t[115]=ae,t[116]=ot,t[117]=h,t[118]=ue):ue=t[118],ue}function ze(s){return s!==void 0}function Je(s){return s!==void 0}function Ke(s){return s.data}function Qe(s){return s!==void 0}function Ze(s){return s.data}function _e(s,t){return s-t}function ti(s){return s.date}exports.ButterflyChart=We;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),V=require("react"),pe=require("./getSliderMarks-CIuSoedo.cjs"),fe=require("./parse-xYI9yrvL.cjs"),ge=require("./index-DQA8q5sC.cjs"),ye=require("./numberFormattingFunction-02t-wJta.cjs"),Be=require("./Tooltip-BLa2EfMs.cjs"),be=require("./XTicksAndGridLines-CekrPykD.cjs"),ve=require("./Axis-Jt_tmhxS.cjs"),Le=require("./YAxesLabels-BQ2aCazV.cjs"),je=require("./ReferenceLine-M9aP3dj-.cjs"),Ce=require("./DetailsModal-DHttOA80.cjs"),ke=require("./band-VYfcZeJ2.cjs"),we=require("./linear-CgUCbw9F.cjs"),Nt=require("./proxy-C4-uo6nS.cjs"),Me=require("./use-in-view-C3o_ntMv.cjs"),de=require("./index-CoobIWNj.cjs"),Ve=require("./GraphFooter.cjs"),$e=require("./GraphHeader.cjs"),Oe=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ne=require("./EmptyState-N1eHt3vq.cjs"),Re=require("./index-sbKVyHS2.cjs"),he=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Se=require("./ensureCompleteData-D9bQTiVS.cjs"),Ee=require("./GraphContainer-B1EDxJ0S.cjs");function De(s){const t=i.compilerRuntimeExports.c(141),{data:a,width:E,height:v,barColors:m,centerGap:j,refValues:h,maxValue:xt,minValue:Rt,showValues:mt,axisTitles:dt,rightMargin:Jt,leftMargin:Kt,topMargin:Y,bottomMargin:Qt,tooltip:St,onSeriesMouseOver:ht,barPadding:Dt,truncateBy:Et,onSeriesMouseClick:$,showTicks:Bt,suffix:pt,prefix:ft,resetSelectionOnDoubleClick:Lt,detailsOnClick:S,styles:r,classNames:n,noOfTicks:B,animate:x,precision:gt,customLayers:D,minValueLeftBar:q,minValueRightBar:T,naLabel:qt,hideAxisLine:Tt}=s,le=V.useRef(null);let Ct;t[0]!==x.amount||t[1]!==x.once?(Ct={once:x.once,amount:x.amount},t[0]=x.amount,t[1]=x.once,t[2]=Ct):Ct=t[2];const O=Me.useInView(le,Ct),[Ft,U]=V.useState(void 0),[F,yt]=V.useState(void 0),[d,l]=V.useState(void 0),[It,bt]=V.useState(void 0);let Gt;t[3]!==Qt||t[4]!==Kt||t[5]!==Jt||t[6]!==Y?(Gt={top:Y,bottom:Qt,left:Kt,right:Jt},t[3]=Qt,t[4]=Kt,t[5]=Jt,t[6]=Y,t[7]=Gt):Gt=t[7];const u=Gt,L=E-u.left-u.right,C=v-u.top-u.bottom;let vt,I,k,W,z,J,K,Q,M,w,Z,_,tt,et;if(t[8]!==x||t[9]!==m[0]||t[10]!==m[1]||t[11]!==Dt||t[12]!==j||t[13]!==n?.graphObjectValues||t[14]!==n?.xAxis?.gridLines||t[15]!==n?.xAxis?.labels||t[16]!==n?.yAxis?.axis||t[17]!==n?.yAxis?.labels||t[18]!==D||t[19]!==a||t[20]!==S||t[21]!==C||t[22]!==L||t[23]!==v||t[24]!==Tt||t[25]!==O||t[26]!==u.bottom||t[27]!==u.left||t[28]!==u.top||t[29]!==xt||t[30]!==Rt||t[31]!==q||t[32]!==T||t[33]!==F||t[34]!==qt||t[35]!==B||t[36]!==$||t[37]!==ht||t[38]!==gt||t[39]!==ft||t[40]!==h||t[41]!==Lt||t[42]!==Bt||t[43]!==mt||t[44]!==r?.graphObjectValues||t[45]!==r?.xAxis?.gridLines||t[46]!==r?.xAxis?.labels||t[47]!==r?.yAxis?.axis||t[48]!==r?.yAxis?.labels||t[49]!==pt||t[50]!==Y||t[51]!==Et||t[52]!==E){const Zt=a.map(Ue),A=ke.band().domain(Zt.map(Ye)).range([C,0]).paddingInner(Dt),p=we.linear().domain([Rt,xt]).range([0,(L-j)/2]).nice(),N=p.ticks(B),f=we.linear().domain([Rt,xt]).range([(L-j)/2,0]).nice(),Vt=f.ticks(B);k=Nt.motion.svg,tt=`${E}px`,et=`${v}px`,W=`0 0 ${E} ${v}`,z="ltr",J=le,M=`translate(${u.left},${u.top})`,t[67]!==D?(w=D.filter(He).map(Xe),t[67]=D,t[68]=w):w=t[68];const c=n?.yAxis?.axis;let R;t[69]!==c?(R={axis:c},t[69]=c,t[70]=R):R=t[70];const Wt=r?.yAxis?.axis;let $t;t[71]!==Wt?($t={axis:Wt},t[71]=Wt,t[72]=$t):$t=t[72],Z=i.jsxRuntimeExports.jsxs("g",{transform:"translate(0,0)",children:[Bt?i.jsxRuntimeExports.jsx(be.XTicksAndGridLines,{values:Vt.filter(Pe),x:Vt.filter(Ge).map(e=>f(e)),y1:0-Y,y2:C+u.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:pt,prefix:ft,labelType:"secondary",showGridLines:!0,leftLabel:!0,precision:gt}):null,i.jsxRuntimeExports.jsxs(de.AnimatePresence,{children:[Zt.map((e,y)=>i.jsxRuntimeExports.jsxs(Nt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:b=>{U(e),bt(b.clientY),l(b.clientX),ht?.(e)},onClick:()=>{($||S)&&(ge.isEqual(F,e)&&Lt?(yt(void 0),$?.(void 0)):(yt(e),$?.(e)))},onMouseMove:b=>{U(e),bt(b.clientY),l(b.clientX)},onMouseLeave:()=>{U(void 0),l(void 0),bt(void 0),ht?.(void 0)},children:[e.leftBar?i.jsxRuntimeExports.jsx(Nt.motion.rect,{y:A(`${y}`),style:{fill:m[0]},height:A.bandwidth(),variants:{initial:{x:f(0),width:0},whileInView:{x:e.leftBar<0?f(0):f(e.leftBar),width:e.leftBar<0?f(e.leftBar)-f(0):f(0)-f(e.leftBar),transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",exit:{x:f(0),width:0,transition:{duration:x.duration}}}):null,mt?i.jsxRuntimeExports.jsx(Nt.motion.text,{y:A(`${y}`)+A.bandwidth()/2,style:{textAnchor:e.rightBar&&e.rightBar>0?"end":"start",...r?.graphObjectValues||{}},dx:e.rightBar&&e.rightBar>0?-5:5,dy:"0.33em",className:i.mo("graph-value text-sm",n?.graphObjectValues),exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:f(0),opacity:0,fill:m[0]},whileInView:{x:e.leftBar?f(e.leftBar):f(q<0?0:q),opacity:1,fill:m[0],transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:ye.numberFormattingFunction(e.rightBar,qt,gt,ft,pt)}):null]},e.label)),i.jsxRuntimeExports.jsx(ve.Axis,{hideAxisLine:Tt,y1:-2.5,y2:C+u.bottom,x1:f(q<0?0:q),x2:f(q<0?0:q),classNames:R,styles:$t}),h?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:h.map((e,y)=>i.jsxRuntimeExports.jsx(je.RefLineX,{text:e.text,color:e.color,x:f(e.value),y1:0-u.top,y2:C+u.bottom,textSide:"left",classNames:e.classNames,styles:e.styles,animate:x,isInView:O},y))}):null]})]});const _t=n?.yAxis?.axis;let wt;t[73]!==_t?(wt={axis:_t},t[73]=_t,t[74]=wt):wt=t[74];const Ot=r?.yAxis?.axis;let At;t[75]!==Ot?(At={axis:Ot},t[75]=Ot,t[76]=At):At=t[76],_=i.jsxRuntimeExports.jsxs("g",{transform:`translate(${(L+j)/2},0)`,children:[Bt?i.jsxRuntimeExports.jsx(be.XTicksAndGridLines,{values:N.filter(Ie),x:N.filter(Fe).map(e=>p(e)),y1:0-Y,y2:C+u.bottom,styles:{gridLines:r?.xAxis?.gridLines,labels:r?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:pt,prefix:ft,labelType:"secondary",showGridLines:!0,precision:gt}):null,i.jsxRuntimeExports.jsxs(de.AnimatePresence,{children:[Zt.map((e,y)=>i.jsxRuntimeExports.jsxs(Nt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:b=>{U(e),bt(b.clientY),l(b.clientX),ht?.(e)},onClick:()=>{($||S)&&(ge.isEqual(F,e)&&Lt?(yt(void 0),$?.(void 0)):(yt(e),$?.(e)))},onMouseMove:b=>{U(e),bt(b.clientY),l(b.clientX)},onMouseLeave:()=>{U(void 0),l(void 0),bt(void 0),ht?.(void 0)},children:[e.rightBar?i.jsxRuntimeExports.jsx(Nt.motion.rect,{y:A(`${y}`),style:{fill:m[1]},height:A.bandwidth(),exit:{x:p(0),width:0,transition:{duration:x.duration}},variants:{initial:{x:p(0),width:0},whileInView:{x:e.rightBar>=0?p(0):p(e.rightBar),width:e.rightBar>=0?p(e.rightBar)-p(0):p(0)-p(e.rightBar),transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial"}):null,mt?i.jsxRuntimeExports.jsx(Nt.motion.text,{y:A(`${y}`)+A.bandwidth()/2,style:{textAnchor:e.rightBar&&e.rightBar<0?"end":"start",...r?.graphObjectValues||{}},className:i.mo("graph-value text-sm",n?.graphObjectValues),dx:e.rightBar&&e.rightBar<0?-5:5,dy:"0.33em",exit:{opacity:0,transition:{duration:x.duration}},variants:{initial:{x:p(0),opacity:0,fill:m[1]},whileInView:{x:e.rightBar?p(e.rightBar):p(T<0?0:T),opacity:1,fill:m[1],transition:{duration:x.duration}}},initial:"initial",animate:O?"whileInView":"initial",children:ye.numberFormattingFunction(e.rightBar,qt,gt,ft,pt)}):null]},y)),i.jsxRuntimeExports.jsx(ve.Axis,{hideAxisLine:Tt,y1:-2.5,y2:C+u.bottom,x1:p(T<0?0:T),x2:p(T<0?0:T),classNames:wt,styles:At}),h?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:h.map((e,y)=>i.jsxRuntimeExports.jsx(je.RefLineX,{text:e.text,color:e.color,x:p(e.value),y1:0-u.top,y2:C+u.bottom,textSide:"right",classNames:e.classNames,styles:e.styles,animate:x,isInView:O},y))}):null]})]}),I=de.AnimatePresence,vt=Nt.motion.g,K=`translate(${L/2},0)`,Q=Zt.map((e,y)=>i.jsxRuntimeExports.jsx(Le.YAxesLabels,{value:`${e.label}`.length<Et?`${e.label}`:`${`${e.label}`.substring(0,Et)}...`,y:A(`${e.id}`),x:0-j/2,width:j,height:A.bandwidth(),alignment:"center",style:r?.yAxis?.labels,className:n?.yAxis?.labels,animate:x,isInView:O},y)),t[8]=x,t[9]=m[0],t[10]=m[1],t[11]=Dt,t[12]=j,t[13]=n?.graphObjectValues,t[14]=n?.xAxis?.gridLines,t[15]=n?.xAxis?.labels,t[16]=n?.yAxis?.axis,t[17]=n?.yAxis?.labels,t[18]=D,t[19]=a,t[20]=S,t[21]=C,t[22]=L,t[23]=v,t[24]=Tt,t[25]=O,t[26]=u.bottom,t[27]=u.left,t[28]=u.top,t[29]=xt,t[30]=Rt,t[31]=q,t[32]=T,t[33]=F,t[34]=qt,t[35]=B,t[36]=$,t[37]=ht,t[38]=gt,t[39]=ft,t[40]=h,t[41]=Lt,t[42]=Bt,t[43]=mt,t[44]=r?.graphObjectValues,t[45]=r?.xAxis?.gridLines,t[46]=r?.xAxis?.labels,t[47]=r?.yAxis?.axis,t[48]=r?.yAxis?.labels,t[49]=pt,t[50]=Y,t[51]=Et,t[52]=E,t[53]=vt,t[54]=I,t[55]=k,t[56]=W,t[57]=z,t[58]=J,t[59]=K,t[60]=Q,t[61]=M,t[62]=w,t[63]=Z,t[64]=_,t[65]=tt,t[66]=et}else vt=t[53],I=t[54],k=t[55],W=t[56],z=t[57],J=t[58],K=t[59],Q=t[60],M=t[61],w=t[62],Z=t[63],_=t[64],tt=t[65],et=t[66];let G;t[77]!==vt||t[78]!==K||t[79]!==Q?(G=i.jsxRuntimeExports.jsx(vt,{transform:K,children:Q}),t[77]=vt,t[78]=K,t[79]=Q,t[80]=G):G=t[80];let it;t[81]!==I||t[82]!==G?(it=i.jsxRuntimeExports.jsx(I,{children:G}),t[81]=I,t[82]=G,t[83]=it):it=t[83];const Pt=`translate(0,${C})`,Xt=r?.yAxis?.title;let st;t[84]!==m[0]||t[85]!==Xt?(st={fill:m[0],textAnchor:"end",...Xt},t[84]=m[0],t[85]=Xt,t[86]=st):st=t[86];const Ht=n?.yAxis?.title;let P;t[87]!==Ht?(P=i.mo("text-base",Ht),t[87]=Ht,t[88]=P):P=t[88];const kt=L/2-j/2;let nt;t[89]!==dt[0]||t[90]!==st||t[91]!==P||t[92]!==kt?(nt=i.jsxRuntimeExports.jsx("text",{style:st,className:P,x:kt,y:0,dx:-5,dy:20,children:dt[0]}),t[89]=dt[0],t[90]=st,t[91]=P,t[92]=kt,t[93]=nt):nt=t[93];const Yt=r?.yAxis?.title;let ot;t[94]!==m[1]||t[95]!==Yt?(ot={fill:m[1],textAnchor:"start",...Yt},t[94]=m[1],t[95]=Yt,t[96]=ot):ot=t[96];const Ut=n?.yAxis?.title;let at;t[97]!==Ut?(at=i.mo("text-base",Ut),t[97]=Ut,t[98]=at):at=t[98];const Mt=L/2+j/2;let rt;t[99]!==dt[1]||t[100]!==ot||t[101]!==at||t[102]!==Mt?(rt=i.jsxRuntimeExports.jsx("text",{style:ot,className:at,x:Mt,y:0,dx:5,dy:20,children:dt[1]}),t[99]=dt[1],t[100]=ot,t[101]=at,t[102]=Mt,t[103]=rt):rt=t[103];let X;t[104]!==Pt||t[105]!==nt||t[106]!==rt?(X=i.jsxRuntimeExports.jsxs("g",{transform:Pt,children:[nt,rt]}),t[104]=Pt,t[105]=nt,t[106]=rt,t[107]=X):X=t[107];let lt;t[108]!==D?(lt=D.filter(Te).map(qe),t[108]=D,t[109]=lt):lt=t[109];let H;t[110]!==it||t[111]!==X||t[112]!==lt||t[113]!==M||t[114]!==w||t[115]!==Z||t[116]!==_?(H=i.jsxRuntimeExports.jsxs("g",{transform:M,children:[w,Z,_,it,X,lt]}),t[110]=it,t[111]=X,t[112]=lt,t[113]=M,t[114]=w,t[115]=Z,t[116]=_,t[117]=H):H=t[117];let o;t[118]!==k||t[119]!==W||t[120]!==z||t[121]!==J||t[122]!==H||t[123]!==tt||t[124]!==et?(o=i.jsxRuntimeExports.jsx(k,{width:tt,height:et,viewBox:W,direction:z,ref:J,children:H}),t[118]=k,t[119]=W,t[120]=z,t[121]=J,t[122]=H,t[123]=tt,t[124]=et,t[125]=o):o=t[125];let ct;t[126]!==n?.tooltip||t[127]!==d||t[128]!==It||t[129]!==Ft||t[130]!==r?.tooltip||t[131]!==St?(ct=Ft&&St&&d&&It?i.jsxRuntimeExports.jsx(Be.Tooltip,{data:Ft,body:St,xPos:d,yPos:It,backgroundStyle:r?.tooltip,className:n?.tooltip}):null,t[126]=n?.tooltip,t[127]=d,t[128]=It,t[129]=Ft,t[130]=r?.tooltip,t[131]=St,t[132]=ct):ct=t[132];let ut;t[133]!==n?.modal||t[134]!==S||t[135]!==F?(ut=S&&F!==void 0?i.jsxRuntimeExports.jsx(Ce.DetailsModal,{body:S,data:F,setData:yt,className:n?.modal}):null,t[133]=n?.modal,t[134]=S,t[135]=F,t[136]=ut):ut=t[136];let jt;return t[137]!==o||t[138]!==ct||t[139]!==ut?(jt=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[o,ct,ut]}),t[137]=o,t[138]=ct,t[139]=ut,t[140]=jt):jt=t[140],jt}function qe(s){return s.layer}function Te(s){return s.position==="after"}function Fe(s){return s!==0}function Ie(s){return s!==0}function Ge(s){return s!==0}function Pe(s){return s!==0}function Xe(s){return s.layer}function He(s){return s.position==="before"}function Ye(s){return`${s.id}`}function Ue(s,t){return{...s,id:`${t}`}}function re(s,t,a,E){const v=s.map(h=>h[t]).filter(h=>!he.checkIfNullOrUndefined(h)),m=he.checkIfNullOrUndefined(a)?Math.min(...v)>=0?0:Math.min(...v):a,j=he.checkIfNullOrUndefined(E)?Math.max(...v)<0?0:Math.max(...v):E;return{min:m,max:j}}function We(s){const t=i.compilerRuntimeExports.c(119),{data:a,graphTitle:E,sources:v,graphDescription:m,height:j,width:h,footNote:xt,padding:Rt,barColors:mt,backgroundColor:dt,leftMargin:Jt,rightMargin:Kt,topMargin:Y,bottomMargin:Qt,rightBarTitle:St,leftBarTitle:ht,tooltip:Dt,relativeHeight:Et,onSeriesMouseOver:$,graphID:Bt,barPadding:pt,truncateBy:ft,onSeriesMouseClick:Lt,centerGap:S,showValues:r,maxValue:n,minValue:B,refValues:x,suffix:gt,prefix:D,showTicks:q,showColorScale:T,graphDownload:qt,dataDownload:Tt,language:le,colorLegendTitle:Ct,minHeight:O,theme:Ft,ariaLabel:U,resetSelectionOnDoubleClick:F,detailsOnClick:yt,styles:d,classNames:l,noOfTicks:It,animate:bt,precision:Gt,customLayers:u,timeline:L,naLabel:C,hideAxisLine:vt}=s;let I;t[0]!==mt?(I=mt===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:mt,t[0]=mt,t[1]=I):I=t[1];const k=I,W=dt===void 0?!1:dt,z=Jt===void 0?20:Jt,J=Kt===void 0?20:Kt,K=Y===void 0?25:Y,Q=Qt===void 0?30:Qt,M=St===void 0?"Right bar graph":St,w=ht===void 0?"Left bar graph":ht,Z=pt===void 0?.25:pt,_=ft===void 0?999:ft,tt=S===void 0?100:S,et=r===void 0?!0:r;let G;t[2]!==x?(G=x===void 0?[]:x,t[2]=x,t[3]=G):G=t[3];const it=G,Pt=gt===void 0?"":gt,Xt=D===void 0?"":D,st=q===void 0?!0:q,Ht=T===void 0?!1:T,P=qt===void 0?!1:qt,kt=Tt===void 0?!1:Tt,nt=le===void 0?"en":le,Yt=O===void 0?0:O,ot=Ft===void 0?"light":Ft,Ut=F===void 0?!0:F,at=It===void 0?5:It,Mt=bt===void 0?!1:bt,rt=Gt===void 0?2:Gt;let X;t[4]!==u?(X=u===void 0?[]:u,t[4]=u,t[5]=X):X=t[5];const lt=X;let H;t[6]!==L?(H=L===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:L,t[6]=L,t[7]=H):H=t[7];const o=H,ct=C===void 0?"NA":C,ut=vt===void 0?!1:vt,[jt,Zt]=V.useState(0),[A,p]=V.useState(0),[N,f]=V.useState(o.autoplay);let Vt;if(t[8]!==a||t[9]!==o.dateFormat){let g;t[11]!==o.dateFormat?(g=zt=>fe.parse(`${zt.date}`,o.dateFormat||"yyyy",new Date).getTime(),t[11]=o.dateFormat,t[12]=g):g=t[12],Vt=[...new Set(a.filter(ti).map(g))],Vt.sort(_e),t[8]=a,t[9]=o.dateFormat,t[10]=Vt}else Vt=t[10];const c=Vt,[R,Wt]=V.useState(o.autoplay?0:c.length-1),$t=V.useRef(null),_t=V.useRef(null);let wt,Ot;t[13]===Symbol.for("react.memo_cache_sentinel")?(wt=()=>{const g=new ResizeObserver(zt=>{Zt(zt[0].target.clientWidth||620),p(zt[0].target.clientHeight||480)});return $t.current&&g.observe($t.current),()=>g.disconnect()},Ot=[],t[13]=wt,t[14]=Ot):(wt=t[13],Ot=t[14]),V.useEffect(wt,Ot);let At,e;t[15]!==N||t[16]!==o.speed||t[17]!==c?(At=()=>{const g=setInterval(()=>{Wt(zt=>zt<c.length-1?zt+1:0)},(o.speed||2)*1e3);return N||clearInterval(g),()=>clearInterval(g)},e=[c,N,o.speed],t[15]=N,t[16]=o.speed,t[17]=c,t[18]=At,t[19]=e):(At=t[18],e=t[19]),V.useEffect(At,e);const y=o.dateFormat||"yyyy";let b;t[20]!==R||t[21]!==y||t[22]!==o.showOnlyActiveDate||t[23]!==c?(b=pe.getSliderMarks(c,R,o.showOnlyActiveDate,y),t[20]=R,t[21]=y,t[22]=o.showOnlyActiveDate,t[23]=c,t[24]=b):b=t[24];const ce=b,xe=l?.graphContainer,me=d?.graphContainer;let te;t[25]!==l?.description||t[26]!==l?.title||t[27]!==a||t[28]!==kt||t[29]!==m||t[30]!==P||t[31]!==E||t[32]!==d?.description||t[33]!==d?.title||t[34]!==h?(te=E||m||P||kt?i.jsxRuntimeExports.jsx($e.GraphHeader,{styles:{title:d?.title,description:d?.description},classNames:{title:l?.title,description:l?.description},graphTitle:E,graphDescription:m,width:h,graphDownload:P?_t:void 0,dataDownload:kt?a.map(Ze).filter(Qe).length>0?a.map(Ke).filter(Je):a.filter(ze):null}):null,t[25]=l?.description,t[26]=l?.title,t[27]=a,t[28]=kt,t[29]=m,t[30]=P,t[31]=E,t[32]=d?.description,t[33]=d?.title,t[34]=h,t[35]=te):te=t[35];let ee;t[36]!==R||t[37]!==ce||t[38]!==N||t[39]!==o.enabled||t[40]!==c?(ee=o.enabled&&c.length>0&&ce?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{f(!N)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":N?"Click to pause animation":"Click to play animation",children:N?i.jsxRuntimeExports.jsx(Re.Pause,{}):i.jsxRuntimeExports.jsx(Re.Play,{})}),i.jsxRuntimeExports.jsx(pe.Nr,{min:c[0],max:c[c.length-1],marks:ce,step:null,defaultValue:c[c.length-1],value:c[R],onChangeComplete:g=>{Wt(c.indexOf(g))},onChange:g=>{Wt(c.indexOf(g))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[36]=R,t[37]=ce,t[38]=N,t[39]=o.enabled,t[40]=c,t[41]=ee):ee=t[41];let ie;t[42]!==k||t[43]!==l?.colorLegend||t[44]!==Ct||t[45]!==a.length||t[46]!==w||t[47]!==M||t[48]!==Ht?(ie=Ht&&a.length>0?i.jsxRuntimeExports.jsx(Oe.ColorLegend,{colorLegendTitle:Ct,colorDomain:[w,M],colors:k,showNAColor:!1,className:l?.colorLegend}):null,t[42]=k,t[43]=l?.colorLegend,t[44]=Ct,t[45]=a.length,t[46]=w,t[47]=M,t[48]=Ht,t[49]=ie):ie=t[49];let se;t[50]!==a.length?(se=a.length===0&&i.jsxRuntimeExports.jsx(Ne.EmptyState,{}),t[50]=a.length,t[51]=se):se=t[51];let ne;t[52]!==Mt||t[53]!==k||t[54]!==Z||t[55]!==Q||t[56]!==tt||t[57]!==l||t[58]!==lt||t[59]!==a||t[60]!==yt||t[61]!==ut||t[62]!==R||t[63]!==w||t[64]!==z||t[65]!==n||t[66]!==B||t[67]!==ct||t[68]!==at||t[69]!==Lt||t[70]!==$||t[71]!==rt||t[72]!==Xt||t[73]!==it||t[74]!==Ut||t[75]!==M||t[76]!==J||t[77]!==st||t[78]!==et||t[79]!==d||t[80]!==Pt||t[81]!==A||t[82]!==jt||t[83]!==o.dateFormat||t[84]!==o.enabled||t[85]!==Dt||t[86]!==K||t[87]!==_||t[88]!==c?(ne=jt&&A&&a.length>0?i.jsxRuntimeExports.jsx(De,{hideAxisLine:ut,data:Se.ensureCompleteDataForButterFlyChart(a,o.dateFormat||"yyyy").filter(g=>o.enabled?g.date===fe.format(new Date(c[R]),o.dateFormat||"yyyy"):g),barColors:k,width:jt,centerGap:tt,height:A,truncateBy:_,leftMargin:z,rightMargin:J,topMargin:K,bottomMargin:Q,axisTitles:[w,M],tooltip:Dt,onSeriesMouseOver:$,barPadding:Z,refValues:it,maxValue:Math.max(re(a,"leftBar",B,n).max,re(a,"rightBar",B,n).max),minValue:Math.min(re(a,"leftBar",B,n).min,re(a,"rightBar",B,n).min),minValueLeftBar:re(a,"leftBar",B,n).min,minValueRightBar:re(a,"rightBar",B,n).min,showValues:et,onSeriesMouseClick:Lt,showTicks:st,suffix:Pt,prefix:Xt,resetSelectionOnDoubleClick:Ut,detailsOnClick:yt,styles:d,classNames:l,noOfTicks:at,animate:Mt===!0?{duration:.5,once:!0,amount:.5}:Mt||{duration:0,once:!0,amount:0},precision:rt,customLayers:lt,naLabel:ct}):null,t[52]=Mt,t[53]=k,t[54]=Z,t[55]=Q,t[56]=tt,t[57]=l,t[58]=lt,t[59]=a,t[60]=yt,t[61]=ut,t[62]=R,t[63]=w,t[64]=z,t[65]=n,t[66]=B,t[67]=ct,t[68]=at,t[69]=Lt,t[70]=$,t[71]=rt,t[72]=Xt,t[73]=it,t[74]=Ut,t[75]=M,t[76]=J,t[77]=st,t[78]=et,t[79]=d,t[80]=Pt,t[81]=A,t[82]=jt,t[83]=o.dateFormat,t[84]=o.enabled,t[85]=Dt,t[86]=K,t[87]=_,t[88]=c,t[89]=ne):ne=t[89];let oe;t[90]!==se||t[91]!==ne?(oe=i.jsxRuntimeExports.jsxs(Ee.GraphArea,{ref:$t,children:[se,ne]}),t[90]=se,t[91]=ne,t[92]=oe):oe=t[92];let ae;t[93]!==l?.footnote||t[94]!==l?.source||t[95]!==xt||t[96]!==v||t[97]!==d?.footnote||t[98]!==d?.source||t[99]!==h?(ae=v||xt?i.jsxRuntimeExports.jsx(Ve.GraphFooter,{styles:{footnote:d?.footnote,source:d?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:v,footNote:xt,width:h}):null,t[93]=l?.footnote,t[94]=l?.source,t[95]=xt,t[96]=v,t[97]=d?.footnote,t[98]=d?.source,t[99]=h,t[100]=ae):ae=t[100];let ue;return t[101]!==U||t[102]!==W||t[103]!==Bt||t[104]!==j||t[105]!==nt||t[106]!==Yt||t[107]!==Rt||t[108]!==Et||t[109]!==xe||t[110]!==me||t[111]!==te||t[112]!==ee||t[113]!==ie||t[114]!==oe||t[115]!==ae||t[116]!==ot||t[117]!==h?(ue=i.jsxRuntimeExports.jsxs(Ee.GraphContainer,{className:xe,style:me,id:Bt,ref:_t,"aria-label":U,backgroundColor:W,theme:ot,language:nt,minHeight:Yt,width:h,height:j,relativeHeight:Et,padding:Rt,children:[te,ee,ie,oe,ae]}),t[101]=U,t[102]=W,t[103]=Bt,t[104]=j,t[105]=nt,t[106]=Yt,t[107]=Rt,t[108]=Et,t[109]=xe,t[110]=me,t[111]=te,t[112]=ee,t[113]=ie,t[114]=oe,t[115]=ae,t[116]=ot,t[117]=h,t[118]=ue):ue=t[118],ue}function ze(s){return s!==void 0}function Je(s){return s!==void 0}function Ke(s){return s.data}function Qe(s){return s!==void 0}function Ze(s){return s.data}function _e(s,t){return s-t}function ti(s){return s.date}exports.ButterflyChart=We;
|
|
2
2
|
//# sourceMappingURL=ButterflyChart.cjs.map
|
package/dist/ButterflyChart.js
CHANGED
|
@@ -19,7 +19,7 @@ import { GraphFooter as Se } from "./GraphFooter.js";
|
|
|
19
19
|
import { GraphHeader as Fe } from "./GraphHeader.js";
|
|
20
20
|
import { ColorLegend as Ie } from "./ColorLegend.js";
|
|
21
21
|
import { Colors as Be } from "./Colors.js";
|
|
22
|
-
import { E as Ge } from "./EmptyState-
|
|
22
|
+
import { E as Ge } from "./EmptyState-dScPFkLy.js";
|
|
23
23
|
import { P as Re, e as Pe } from "./index-B-4y_iGB.js";
|
|
24
24
|
import { c as xe } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
25
25
|
import { c as Ee } from "./ensureCompleteData-CDIukSG6.js";
|