@undp/data-viz 2.3.1 → 2.3.3

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.
Files changed (154) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.js +1 -1
  3. package/dist/BarGraph.cjs +1 -1
  4. package/dist/BarGraph.js +2 -2
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.js +15 -15
  7. package/dist/BeeSwarmChart.cjs +1 -1
  8. package/dist/BeeSwarmChart.js +2 -2
  9. package/dist/BiVariateChoroplethMap.cjs +1 -1
  10. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  11. package/dist/BiVariateChoroplethMap.js +202 -202
  12. package/dist/BiVariateChoroplethMap.js.map +1 -1
  13. package/dist/BulletChart.cjs +1 -1
  14. package/dist/BulletChart.js +2 -2
  15. package/dist/ButterflyChart.cjs +1 -1
  16. package/dist/ButterflyChart.js +2 -2
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +33 -33
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +2 -2
  23. package/dist/ColorLegend.cjs +1 -1
  24. package/dist/ColorLegend.js +7 -7
  25. package/dist/ColorLegendWithMouseOver.cjs +1 -1
  26. package/dist/ColorLegendWithMouseOver.js +1 -1
  27. package/dist/CopyTextButton.cjs +1 -1
  28. package/dist/CopyTextButton.js +1 -1
  29. package/dist/CsvDownloadButton.cjs +2 -2
  30. package/dist/CsvDownloadButton.js +1 -1
  31. package/dist/DataCards.cjs +1 -1
  32. package/dist/DataCards.js +3 -3
  33. package/dist/DataCards.js.map +1 -1
  34. package/dist/DataTable.cjs +1 -1
  35. package/dist/DataTable.js +2 -2
  36. package/dist/DifferenceLineChart.cjs +1 -1
  37. package/dist/DifferenceLineChart.js +1 -1
  38. package/dist/DonutChart.cjs +1 -1
  39. package/dist/DonutChart.js +20 -20
  40. package/dist/DotDensityMap.cjs +1 -1
  41. package/dist/DotDensityMap.cjs.map +1 -1
  42. package/dist/DotDensityMap.js +46 -46
  43. package/dist/DotDensityMap.js.map +1 -1
  44. package/dist/DualAxisLineChart.cjs +1 -1
  45. package/dist/DualAxisLineChart.js +1 -1
  46. package/dist/DumbbellChart.cjs +1 -1
  47. package/dist/DumbbellChart.js +2 -2
  48. package/dist/{EmptyState-CGeBqbmR.cjs → EmptyState-DX0t62iF.cjs} +2 -2
  49. package/dist/{EmptyState-CGeBqbmR.cjs.map → EmptyState-DX0t62iF.cjs.map} +1 -1
  50. package/dist/{EmptyState-tZBErBKF.js → EmptyState-Pj-emXt5.js} +3 -3
  51. package/dist/{EmptyState-tZBErBKF.js.map → EmptyState-Pj-emXt5.js.map} +1 -1
  52. package/dist/ExcelDownloadButton.cjs +1 -1
  53. package/dist/ExcelDownloadButton.js +7 -7
  54. package/dist/FootNote.cjs +1 -1
  55. package/dist/FootNote.js +1 -1
  56. package/dist/GeoHubCompareMaps.cjs +1 -1
  57. package/dist/GeoHubCompareMaps.js +1 -1
  58. package/dist/GeoHubMap.cjs +1 -1
  59. package/dist/GeoHubMap.js +1 -1
  60. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  61. package/dist/GeoHubMapWithLayerSelection.js +2 -2
  62. package/dist/GraphDescription.cjs +1 -1
  63. package/dist/GraphDescription.js +1 -1
  64. package/dist/{GraphEl-ic8C5Ksc.cjs → GraphEl-CWjTuiYd.cjs} +2 -2
  65. package/dist/{GraphEl-ic8C5Ksc.cjs.map → GraphEl-CWjTuiYd.cjs.map} +1 -1
  66. package/dist/{GraphEl-L5hNe7wJ.js → GraphEl-DDXkYObU.js} +7 -7
  67. package/dist/{GraphEl-L5hNe7wJ.js.map → GraphEl-DDXkYObU.js.map} +1 -1
  68. package/dist/GraphFooter.cjs +1 -1
  69. package/dist/GraphFooter.js +1 -1
  70. package/dist/GraphTitle.cjs +1 -1
  71. package/dist/GraphTitle.js +1 -1
  72. package/dist/GriddedGraphs.cjs +1 -1
  73. package/dist/GriddedGraphs.js +1 -1
  74. package/dist/HeatMap.cjs +1 -1
  75. package/dist/HeatMap.js +1 -1
  76. package/dist/Histogram.cjs +1 -1
  77. package/dist/Histogram.js +1 -1
  78. package/dist/HybridMap.cjs +1 -1
  79. package/dist/HybridMap.cjs.map +1 -1
  80. package/dist/HybridMap.js +42 -42
  81. package/dist/HybridMap.js.map +1 -1
  82. package/dist/ImageDownloadButton.cjs +1 -1
  83. package/dist/ImageDownloadButton.js +1 -1
  84. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  85. package/dist/LineChartWithConfidenceInterval.js +1 -1
  86. package/dist/LinearColorLegend.cjs +1 -1
  87. package/dist/LinearColorLegend.js +1 -1
  88. package/dist/MultiLineAltChart.cjs +1 -1
  89. package/dist/MultiLineAltChart.js +1 -1
  90. package/dist/MultiLineChart.cjs +1 -1
  91. package/dist/MultiLineChart.js +1 -1
  92. package/dist/ParetoChart.cjs +1 -1
  93. package/dist/ParetoChart.js +1 -1
  94. package/dist/RadarChart.cjs +1 -1
  95. package/dist/RadarChart.js +1 -1
  96. package/dist/SVGDownloadButton.cjs +1 -1
  97. package/dist/SVGDownloadButton.js +8 -8
  98. package/dist/SankeyChart.cjs +1 -1
  99. package/dist/SankeyChart.js +80 -80
  100. package/dist/ScatterPlot.cjs +1 -1
  101. package/dist/ScatterPlot.js +2 -2
  102. package/dist/SimpleLineChart.cjs +1 -1
  103. package/dist/SimpleLineChart.js +1 -1
  104. package/dist/SingleGraphDashboard.cjs +1 -1
  105. package/dist/SingleGraphDashboard.js +1 -1
  106. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  107. package/dist/SingleGraphDashboardGeoHubMaps.js +10 -10
  108. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  109. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  110. package/dist/SlopeChart.cjs +1 -1
  111. package/dist/SlopeChart.js +1 -1
  112. package/dist/{Source-B5AoSlsi.cjs → Source-B3i0Bx2R.cjs} +2 -2
  113. package/dist/{Source-B5AoSlsi.cjs.map → Source-B3i0Bx2R.cjs.map} +1 -1
  114. package/dist/{Source-F8EYCYkV.js → Source-_STIejqs.js} +14 -14
  115. package/dist/{Source-F8EYCYkV.js.map → Source-_STIejqs.js.map} +1 -1
  116. package/dist/Source.cjs +1 -1
  117. package/dist/Source.js +2 -2
  118. package/dist/StatCardFromData.cjs +1 -1
  119. package/dist/StatCardFromData.js +12 -12
  120. package/dist/StripChart.cjs +1 -1
  121. package/dist/StripChart.js +1 -1
  122. package/dist/ThreeDGlobe.cjs +1 -1
  123. package/dist/ThreeDGlobe.js +2 -2
  124. package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
  125. package/dist/ThresholdColorLegendWithMouseOver.js +10 -10
  126. package/dist/TreeMapGraph.cjs +1 -1
  127. package/dist/TreeMapGraph.js +29 -29
  128. package/dist/Typography-DrJ7IOdw.cjs +2 -0
  129. package/dist/Typography-DrJ7IOdw.cjs.map +1 -0
  130. package/dist/Typography-iR8PEgdt.js +263 -0
  131. package/dist/Typography-iR8PEgdt.js.map +1 -0
  132. package/dist/UnitChart.cjs +1 -1
  133. package/dist/UnitChart.js +25 -25
  134. package/dist/WaterfallChart.cjs +1 -1
  135. package/dist/WaterfallChart.js +1 -1
  136. package/dist/{index-BQYOuXdl.js → index-B-4y_iGB.js} +19 -17
  137. package/dist/index-B-4y_iGB.js.map +1 -0
  138. package/dist/{index-D5ihtaJJ.js → index-BE-lvE4c.js} +3 -3
  139. package/dist/{index-D5ihtaJJ.js.map → index-BE-lvE4c.js.map} +1 -1
  140. package/dist/{index-Dgjq6aZ2.cjs → index-DlrGwLQA.cjs} +2 -2
  141. package/dist/{index-Dgjq6aZ2.cjs.map → index-DlrGwLQA.cjs.map} +1 -1
  142. package/dist/index-sbKVyHS2.cjs +2 -0
  143. package/dist/index-sbKVyHS2.cjs.map +1 -0
  144. package/dist/index.cjs +1 -1
  145. package/dist/index.js +2 -2
  146. package/dist/style.css +1 -1
  147. package/package.json +3 -3
  148. package/dist/Typography-hWfh3H0J.js +0 -142
  149. package/dist/Typography-hWfh3H0J.js.map +0 -1
  150. package/dist/Typography-sa1UE0oF.cjs +0 -2
  151. package/dist/Typography-sa1UE0oF.cjs.map +0 -1
  152. package/dist/index-BQYOuXdl.js.map +0 -1
  153. package/dist/index-C6er0ety.cjs +0 -2
  154. package/dist/index-C6er0ety.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-C6er0ety.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-CGeBqbmR.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),Me=require("./index-Cno4Q0YE.cjs"),Ee=require("./parse-xYI9yrvL.cjs"),T=require("react"),Ie=require("./getSliderMarks-CIuSoedo.cjs"),Ne=require("./index-DQA8q5sC.cjs"),Ce=require("./numberFormattingFunction-02t-wJta.cjs"),Ve=require("./Tooltip-BLa2EfMs.cjs"),Ft=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./AxisTitle-DV4n0RxE.cjs"),Ye=require("./Axis-Jt_tmhxS.cjs"),Xe=require("./XAxesLabels-C6o9jJal.cjs"),Se=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Te=require("./ReferenceLine-M9aP3dj-.cjs"),He=require("./XTicksAndGridLines-CekrPykD.cjs"),Ue=require("./YAxesLabels-BQ2aCazV.cjs"),qe=require("./DetailsModal-DHttOA80.cjs"),Fe=require("./linear-CgUCbw9F.cjs"),Pe=require("./band-VYfcZeJ2.cjs"),qt=require("./proxy-C4-uo6nS.cjs"),We=require("./use-in-view-C3o_ntMv.cjs"),Ge=require("./index-CoobIWNj.cjs"),Oe=require("./ensureCompleteData-D9bQTiVS.cjs"),Le=require("./GraphContainer-B1EDxJ0S.cjs"),ze=require("./GraphHeader.cjs"),$e=require("./index-sbKVyHS2.cjs"),Je=require("./GraphFooter.cjs"),Ke=require("./ColorLegendWithMouseOver.cjs"),Qe=require("./EmptyState-DX0t62iF.cjs"),Ze=require("./Colors.cjs");function _e(e){const t=i.compilerRuntimeExports.c(148),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,barPadding:Pt,showTicks:ut,truncateBy:Ct,width:bt,height:vt,radius:pt,showLabels:wt,tooltip:b,onSeriesMouseOver:rt,maxValue:Rt,minValue:A,onSeriesMouseClick:xt,showValues:Kt,suffix:ht,prefix:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,animate:p,precision:m,customLayers:X,highlightedDataPoints:W,dimmedOpacity:dt,hideAxisLine:H}=e,U=Ut===void 0?20:Ut,Bt=se===void 0?20:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?25:Jt,ie=T.useRef(null);let Nt;t[0]!==p.amount||t[1]!==p.once?(Nt={once:p.once,amount:p.amount},t[0]=p.amount,t[1]=p.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?U+30:U;let f;t[3]!==Yt||t[4]!==Bt||t[5]!==Zt||t[6]!==$t?(f={top:$t,bottom:Yt,left:Zt,right:Bt},t[3]=Yt,t[4]=Bt,t[5]=Zt,t[6]=$t,t[7]=f):f=t[7];const s=f,$=bt-s.left-s.right,z=vt-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ui),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==p||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Pt||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.axis||t[24]!==n?.xAxis?.labels||t[25]!==n?.yAxis?.gridLines||t[26]!==n?.yAxis?.labels||t[27]!==n?.yAxis?.title||t[28]!==Wt||t[29]!==X||t[30]!==O||t[31]!==I||t[32]!==dt||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==vt||t[37]!==H||t[38]!==W||t[39]!==v||t[40]!==U||t[41]!==s.bottom||t[42]!==s.left||t[43]!==s.right||t[44]!==s.top||t[45]!==jt||t[46]!==Rt||t[47]!==Mt||t[48]!==A||t[49]!==G||t[50]!==Gt||t[51]!==xt||t[52]!==rt||t[53]!==m||t[54]!==q||t[55]!==pt||t[56]!==Lt||t[57]!==Qt||t[58]!==F||t[59]!==wt||t[60]!==ut||t[61]!==Kt||t[62]!==o?.dataConnectors||t[63]!==o?.graphObjectValues||t[64]!==o?.xAxis?.axis||t[65]!==o?.xAxis?.labels||t[66]!==o?.yAxis?.gridLines||t[67]!==o?.yAxis?.labels||t[68]!==o?.yAxis?.title||t[69]!==ht||t[70]!==Ct||t[71]!==It||t[72]!==bt){const x=Fe.linear().domain([A,Rt]).range([z,0]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max($,Mt*O.length):jt?Math.min($,jt*O.length):$]).paddingInner(Pt),gt=x.ticks(Gt);K=qt.motion.svg,B=`${bt}px`,tt=`${vt}px`,et=`0 0 ${bt} ${vt}`,it="ltr",C=ie,t[88]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[88]=L,t[89]=R):R=t[89],Z=`translate(${s.left},${s.top})`;let E;t[90]!==A||t[91]!==m||t[92]!==q||t[93]!==ut||t[94]!==ht?(E=ut?Ce.numberFormattingFunction(A<0?0:A,"NA",m,q,ht):void 0,t[90]=A,t[91]=m,t[92]=q,t[93]=ut,t[94]=ht,t[95]=E):E=t[95];const h=n?.xAxis?.axis,ct=n?.yAxis?.labels;let a;t[96]!==h||t[97]!==ct?(a={axis:h,label:ct},t[96]=h,t[97]=ct,t[98]=a):a=t[98];const Ht=o?.xAxis?.axis,kt=o?.yAxis?.labels;let ee;t[99]!==Ht||t[100]!==kt?(ee={axis:Ht,label:kt},t[99]=Ht,t[100]=kt,t[101]=ee):ee=t[101],_=i.jsxRuntimeExports.jsx(Ye.Axis,{hideAxisLine:H,y1:x(A<0?0:A),y2:x(A<0?0:A),x1:0-U,x2:$+s.right,label:E,labelPos:{x:0-U,dx:0,dy:Rt<0?"1em":-5,y:x(A<0?0:A)},classNames:a,styles:ee}),N=ut?i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{values:gt.filter(ci),y:gt.filter(li).map(r=>x(r)),x1:0-U,x2:$+s.right,styles:{gridLines:o?.yAxis?.gridLines,labels:o?.yAxis?.labels},classNames:{gridLines:n?.yAxis?.gridLines,labels:n?.yAxis?.labels},suffix:ht,prefix:q,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:m}):null;const Et=0-U-15,l=z/2,j=o?.yAxis?.title,S=n?.yAxis?.title;t[102]!==P||t[103]!==Et||t[104]!==l||t[105]!==j||t[106]!==S?(V=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:Et,y:l,style:j,className:S,text:P,rotate90:!0}),t[102]=P,t[103]=Et,t[104]=l,t[105]=j,t[106]=S,t[107]=V):V=t[107],t[108]!==X?(k=X.filter(ri).map(ai),t[108]=X,t[109]=k):k=t[109],J=Ge.AnimatePresence,nt=O.map(r=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85},whileInView:{x:w(`${r.id}`)+w.bandwidth()/2,y:0,opacity:W.length!==0?W.indexOf(r.label)!==-1?.85:dt:.85,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:p.duration}},children:[wt?i.jsxRuntimeExports.jsx(Xe.XAxesLabels,{value:`${r.label}`.length<Ct?`${r.label}`:`${`${r.label}`.substring(0,Ct)}...`,y:z+5,x:0-w.bandwidth()/2,width:w.bandwidth(),height:s.bottom,style:o?.xAxis?.labels,className:n?.xAxis?.labels,alignment:"top",animate:p,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{x1:0,x2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&r.x.indexOf(Math.min(...r.x.filter(oi)))===0?"url(#arrow)":"",markerStart:L&&r.x.indexOf(Math.min(...r.x.filter(si)))===r.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y1:0,y2:0},whileInView:{y1:x(Math.min(...r.x.filter(ni)))+pt,y2:x(Math.max(...r.x.filter(ii)))-pt,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),r.x.map((d,g)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX),rt?.({...r,xIndex:g})},onClick:()=>{(xt||I)&&(Ne.isEqual(G,{...r,xIndex:g})&&Qt?(te(void 0),xt?.(void 0)):(te({...r,xIndex:g}),xt&&xt({...r,xIndex:g})))},onMouseMove:ne=>{_t({...r,xIndex:g}),Tt(ne.clientY),Dt(ne.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),rt?.(void 0)},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{opacity:F?M[g]===F?1:.3:1},whileInView:{opacity:F?M[g]===F?1:.3:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(d)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cx:0,r:pt,style:{fill:M[g],fillOpacity:.85,stroke:M[g],strokeWidth:1},exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{cy:x(0),opacity:0},whileInView:{cy:x(d||0),opacity:Ft.checkIfNullOrUndefined(d)?0:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),Kt?i.jsxRuntimeExports.jsx(qt.motion.text,{x:0,style:{textAnchor:"start",...o?.graphObjectValues||{}},className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(d)?"opacity-0":"opacity-100",n?.graphObjectValues),dx:pt+3,dy:"0.33em",exit:{opacity:0,transition:{duration:p.duration}},variants:{initial:{y:x(0),opacity:0,fill:It||M[g]},whileInView:{y:x(d||0),fill:It||M[g],opacity:1,transition:{duration:p.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(d,"NA",m,q,ht)}):null]})},g))]},r.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((r,d)=>i.jsxRuntimeExports.jsx(Te.RefLineY,{text:r.text,color:r.color,y:x(r.value),x1:0-U,x2:$+s.right,classNames:r.classNames,styles:r.styles,animate:p,isInView:v},d))}):null,t[16]=p,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Pt,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.axis,t[24]=n?.xAxis?.labels,t[25]=n?.yAxis?.gridLines,t[26]=n?.yAxis?.labels,t[27]=n?.yAxis?.title,t[28]=Wt,t[29]=X,t[30]=O,t[31]=I,t[32]=dt,t[33]=M,t[34]=z,t[35]=$,t[36]=vt,t[37]=H,t[38]=W,t[39]=v,t[40]=U,t[41]=s.bottom,t[42]=s.left,t[43]=s.right,t[44]=s.top,t[45]=jt,t[46]=Rt,t[47]=Mt,t[48]=A,t[49]=G,t[50]=Gt,t[51]=xt,t[52]=rt,t[53]=m,t[54]=q,t[55]=pt,t[56]=Lt,t[57]=Qt,t[58]=F,t[59]=wt,t[60]=ut,t[61]=Kt,t[62]=o?.dataConnectors,t[63]=o?.graphObjectValues,t[64]=o?.xAxis?.axis,t[65]=o?.xAxis?.labels,t[66]=o?.yAxis?.gridLines,t[67]=o?.yAxis?.labels,t[68]=o?.yAxis?.title,t[69]=ht,t[70]=Ct,t[71]=It,t[72]=bt,t[73]=J,t[74]=K,t[75]=Q,t[76]=Z,t[77]=_,t[78]=N,t[79]=V,t[80]=k,t[81]=B,t[82]=tt,t[83]=et,t[84]=it,t[85]=C,t[86]=R,t[87]=nt}else J=t[73],K=t[74],Q=t[75],Z=t[76],_=t[77],N=t[78],V=t[79],k=t[80],B=t[81],tt=t[82],et=t[83],it=t[84],C=t[85],R=t[86],nt=t[87];let st;t[110]!==J||t[111]!==Q||t[112]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[110]=J,t[111]=Q,t[112]=nt,t[113]=st):st=t[113];let ot;t[114]!==X?(ot=X.filter(ei).map(ti),t[114]=X,t[115]=ot):ot=t[115];let mt;t[116]!==Z||t[117]!==_||t[118]!==N||t[119]!==V||t[120]!==k||t[121]!==st||t[122]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[116]=Z,t[117]=_,t[118]=N,t[119]=V,t[120]=k,t[121]=st,t[122]=ot,t[123]=mt):mt=t[123];let D;t[124]!==K||t[125]!==B||t[126]!==tt||t[127]!==et||t[128]!==it||t[129]!==C||t[130]!==R||t[131]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[124]=K,t[125]=B,t[126]=tt,t[127]=et,t[128]=it,t[129]=C,t[130]=R,t[131]=mt,t[132]=D):D=t[132];let Y;t[133]!==n?.tooltip||t[134]!==ft||t[135]!==St||t[136]!==Vt||t[137]!==o?.tooltip||t[138]!==b?(Y=Vt&&b&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:b,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[133]=n?.tooltip,t[134]=ft,t[135]=St,t[136]=Vt,t[137]=o?.tooltip,t[138]=b,t[139]=Y):Y=t[139];let at;t[140]!==n?.modal||t[141]!==I||t[142]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[140]=n?.modal,t[141]=I,t[142]=G,t[143]=at):at=t[143];let At;return t[144]!==D||t[145]!==Y||t[146]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[144]=D,t[145]=Y,t[146]=at,t[147]=At):At=t[147],At}function ti(e){return e.layer}function ei(e){return e.position==="after"}function ii(e){return e!==null}function ni(e){return e!==null}function si(e){return e!==null}function oi(e){return e!==null}function ai(e){return e.layer}function ri(e){return e.position==="before"}function li(e){return e!==0}function ci(e){return e!==0}function ui(e){return`${e.id}`}function xi(e){const t=i.compilerRuntimeExports.c(139),{data:c,leftMargin:Ut,rightMargin:se,topMargin:zt,bottomMargin:Jt,dotColors:M,suffix:Pt,prefix:ut,barPadding:Ct,showValues:bt,showTicks:vt,truncateBy:pt,width:wt,height:b,radius:rt,showLabels:Rt,tooltip:A,onSeriesMouseOver:xt,maxValue:Kt,minValue:ht,onSeriesMouseClick:q,selectedColor:F,arrowConnector:L,connectorStrokeWidth:Wt,maxBarThickness:jt,minBarThickness:Mt,resetSelectionOnDoubleClick:Qt,detailsOnClick:I,axisTitle:P,noOfTicks:Gt,valueColor:It,styles:o,classNames:n,labelOrder:y,refValues:Lt,rtl:p,animate:m,precision:X,customLayers:W,highlightedDataPoints:dt,dimmedOpacity:H}=e,U=Ut===void 0?100:Ut,Bt=se===void 0?40:se,$t=zt===void 0?20:zt,Yt=Jt===void 0?10:Jt,ie=T.useRef(null);let Nt;t[0]!==m.amount||t[1]!==m.once?(Nt={once:m.once,amount:m.amount},t[0]=m.amount,t[1]=m.once,t[2]=Nt):Nt=t[2];const v=We.useInView(ie,Nt),Zt=P?$t+25:$t;let f;t[3]!==Yt||t[4]!==U||t[5]!==Bt||t[6]!==Zt?(f={top:Zt,bottom:Yt,left:U,right:Bt},t[3]=Yt,t[4]=U,t[5]=Bt,t[6]=Zt,t[7]=f):f=t[7];const s=f,$=wt-s.left-s.right,z=b-s.top-s.bottom,[Vt,_t]=T.useState(void 0),[G,te]=T.useState(void 0),[ft,Dt]=T.useState(void 0),[St,Tt]=T.useState(void 0);let yt;if(t[8]!==c||t[9]!==y){const x=new Set,w=c.map((h,ct)=>{const a=y?`${h.label}`:`${ct}`;return x.add(a),{...h,id:a}}),gt=y?y.filter(h=>!x.has(h)):[];let E;t[11]!==c[0]?(E=h=>({id:h,label:h,x:Array(c[0].x.length).fill(null)}),t[11]=c[0],t[12]=E):E=t[12],yt=[...w,...gt.map(E)],t[8]=c,t[9]=y,t[10]=yt}else yt=t[10];const O=yt;let lt;t[13]!==O||t[14]!==y?(lt=y??O.map(ji),t[13]=O,t[14]=y,t[15]=lt):lt=t[15];const Xt=lt;let J,K,Q,Z,_,N,V,k,B,tt,et,it,C,R,nt;if(t[16]!==m||t[17]!==L||t[18]!==P||t[19]!==Xt||t[20]!==Ct||t[21]!==n?.dataConnectors||t[22]!==n?.graphObjectValues||t[23]!==n?.xAxis?.gridLines||t[24]!==n?.xAxis?.labels||t[25]!==n?.xAxis?.title||t[26]!==n?.yAxis?.gridLines||t[27]!==n?.yAxis?.labels||t[28]!==Wt||t[29]!==W||t[30]!==O||t[31]!==I||t[32]!==H||t[33]!==M||t[34]!==z||t[35]!==$||t[36]!==b||t[37]!==dt||t[38]!==v||t[39]!==s.bottom||t[40]!==s.left||t[41]!==s.top||t[42]!==jt||t[43]!==Kt||t[44]!==Mt||t[45]!==ht||t[46]!==G||t[47]!==Gt||t[48]!==q||t[49]!==xt||t[50]!==X||t[51]!==ut||t[52]!==rt||t[53]!==Lt||t[54]!==Qt||t[55]!==p||t[56]!==F||t[57]!==Rt||t[58]!==vt||t[59]!==bt||t[60]!==o?.dataConnectors||t[61]!==o?.graphObjectValues||t[62]!==o?.xAxis?.gridLines||t[63]!==o?.xAxis?.labels||t[64]!==o?.xAxis?.title||t[65]!==o?.yAxis?.gridLines||t[66]!==o?.yAxis?.labels||t[67]!==Pt||t[68]!==$t||t[69]!==pt||t[70]!==It||t[71]!==wt){const x=Fe.linear().domain([ht,Kt]).range([0,$]).nice(),w=Pe.band().domain(Xt).range([0,Mt?Math.max(z,Mt*O.length):jt?Math.min(z,jt*O.length):z]).paddingInner(Ct),gt=x.ticks(Gt);K=qt.motion.svg,B=`${wt}px`,tt=`${b}px`,et=`0 0 ${wt} ${b}`,it="ltr",C=ie,t[87]!==L?(R=L?i.jsxRuntimeExports.jsx("defs",{children:i.jsxRuntimeExports.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:i.jsxRuntimeExports.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:"fill-primary-gray-600 dark:fill-primary-gray-300"})})}):null,t[87]=L,t[88]=R):R=t[88],Z=`translate(${s.left},${s.top})`,_=vt?i.jsxRuntimeExports.jsx(He.XTicksAndGridLines,{values:gt.filter(wi),x:gt.filter(vi).map(l=>x(l)),y1:0-$t,y2:z+s.bottom,styles:{gridLines:o?.xAxis?.gridLines,labels:o?.xAxis?.labels},classNames:{gridLines:n?.xAxis?.gridLines,labels:n?.xAxis?.labels},suffix:Pt,prefix:ut,labelType:"secondary",showGridLines:!0,precision:X}):null;const E=$/2,h=0-s.top+15,ct=o?.xAxis?.title,a=n?.xAxis?.title;t[89]!==P||t[90]!==E||t[91]!==h||t[92]!==ct||t[93]!==a?(N=i.jsxRuntimeExports.jsx(De.AxisTitle,{x:E,y:h,style:ct,className:a,text:P}),t[89]=P,t[90]=E,t[91]=h,t[92]=ct,t[93]=a,t[94]=N):N=t[94];const Ht=o?.yAxis?.gridLines;let kt;t[95]!==Ht?(kt={gridLines:Ht},t[95]=Ht,t[96]=kt):kt=t[96];const ee=n?.yAxis?.gridLines;let Et;t[97]!==ee?(Et={gridLines:ee},t[97]=ee,t[98]=Et):Et=t[98],V=i.jsxRuntimeExports.jsx(Se.YTicksAndGridLines,{y:O.map(l=>w(`${l.id}`)+w.bandwidth()/2),x1:0,x2:$,styles:kt,classNames:Et,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:X}),t[99]!==W?(k=W.filter(bi).map(gi),t[99]=W,t[100]=k):k=t[100],J=Ge.AnimatePresence,nt=O.map(l=>i.jsxRuntimeExports.jsxs(qt.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85},whileInView:{x:0,y:w(`${l.id}`)+w.bandwidth()/2,opacity:dt.length!==0?dt.indexOf(l.label)!==-1?.85:H:.85,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",exit:{opacity:0,transition:{duration:m.duration}},children:[Rt?i.jsxRuntimeExports.jsx(Ue.YAxesLabels,{value:`${l.label}`.length<pt?`${l.label}`:`${`${l.label}`.substring(0,pt)}...`,y:0-w.bandwidth()/2,x:0-s.left,width:s.left,height:w.bandwidth(),alignment:"right",style:o?.yAxis?.labels,className:n?.yAxis?.labels,animate:m,isInView:v}):null,i.jsxRuntimeExports.jsx(qt.motion.line,{y1:0,y2:0,style:{strokeWidth:Wt,...o?.dataConnectors||{},opacity:F?.3:1},className:i.mo("stroke-primary-gray-600 dark:stroke-primary-gray-300",n?.dataConnectors),markerEnd:L&&l.x.indexOf(Math.min(...l.x.filter(yi)))===0?"url(#arrow)":"",markerStart:L&&l.x.indexOf(Math.min(...l.x.filter(fi)))===l.x.length-1?"url(#arrow)":"",exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x1:0,x2:0},whileInView:{x1:x(Math.min(...l.x.filter(hi)))+rt,x2:x(Math.max(...l.x.filter(pi)))-rt,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),l.x.map((j,S)=>i.jsxRuntimeExports.jsx(qt.motion.g,{onMouseEnter:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX),xt?.({...l,xIndex:S})},onClick:()=>{(q||I)&&(Ne.isEqual(G,{...l,xIndex:S})&&Qt?(te(void 0),q?.(void 0)):(te({...l,xIndex:S}),q&&q({...l,xIndex:S})))},onMouseMove:r=>{_t({...l,xIndex:S}),Tt(r.clientY),Dt(r.clientX)},onMouseLeave:()=>{_t(void 0),Dt(void 0),Tt(void 0),xt?.(void 0)},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{opacity:F?M[S]===F?1:.3:1},whileInView:{opacity:F?M[S]===F?1:.3:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ft.checkIfNullOrUndefined(j)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(qt.motion.circle,{cy:0,r:rt,style:{fill:M[S],fillOpacity:.85,stroke:M[S],strokeWidth:1,opacity:Ft.checkIfNullOrUndefined(j)?0:1},exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{cx:x(0),opacity:0},whileInView:{cx:x(j||0),opacity:Ft.checkIfNullOrUndefined(j)?0:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial"}),bt?i.jsxRuntimeExports.jsx(qt.motion.text,{y:0,style:{textAnchor:"middle",...o?.graphObjectValues||{}},dx:0,dy:0-rt-3,className:i.mo("graph-value text-sm font-bold",Ft.checkIfNullOrUndefined(j)?"0opacity-0":"opacity-100",n?.graphObjectValues),exit:{opacity:0,transition:{duration:m.duration}},variants:{initial:{x:x(0),opacity:0,fill:It||M[S]},whileInView:{x:x(j||0),fill:It||M[S],opacity:1,transition:{duration:m.duration}}},initial:"initial",animate:v?"whileInView":"initial",children:Ce.numberFormattingFunction(j,"NA",X,ut,Pt)}):null]})},S))]},l.label)),Q=Lt?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Lt.map((l,j)=>i.jsxRuntimeExports.jsx(Te.RefLineX,{text:l.text,color:l.color,x:x(l.value),y1:0-s.top,y2:z+s.bottom,textSide:x(l.value)>$*.75||p?"left":"right",classNames:l.classNames,styles:l.styles,animate:m,isInView:v},j))}):null,t[16]=m,t[17]=L,t[18]=P,t[19]=Xt,t[20]=Ct,t[21]=n?.dataConnectors,t[22]=n?.graphObjectValues,t[23]=n?.xAxis?.gridLines,t[24]=n?.xAxis?.labels,t[25]=n?.xAxis?.title,t[26]=n?.yAxis?.gridLines,t[27]=n?.yAxis?.labels,t[28]=Wt,t[29]=W,t[30]=O,t[31]=I,t[32]=H,t[33]=M,t[34]=z,t[35]=$,t[36]=b,t[37]=dt,t[38]=v,t[39]=s.bottom,t[40]=s.left,t[41]=s.top,t[42]=jt,t[43]=Kt,t[44]=Mt,t[45]=ht,t[46]=G,t[47]=Gt,t[48]=q,t[49]=xt,t[50]=X,t[51]=ut,t[52]=rt,t[53]=Lt,t[54]=Qt,t[55]=p,t[56]=F,t[57]=Rt,t[58]=vt,t[59]=bt,t[60]=o?.dataConnectors,t[61]=o?.graphObjectValues,t[62]=o?.xAxis?.gridLines,t[63]=o?.xAxis?.labels,t[64]=o?.xAxis?.title,t[65]=o?.yAxis?.gridLines,t[66]=o?.yAxis?.labels,t[67]=Pt,t[68]=$t,t[69]=pt,t[70]=It,t[71]=wt,t[72]=J,t[73]=K,t[74]=Q,t[75]=Z,t[76]=_,t[77]=N,t[78]=V,t[79]=k,t[80]=B,t[81]=tt,t[82]=et,t[83]=it,t[84]=C,t[85]=R,t[86]=nt}else J=t[72],K=t[73],Q=t[74],Z=t[75],_=t[76],N=t[77],V=t[78],k=t[79],B=t[80],tt=t[81],et=t[82],it=t[83],C=t[84],R=t[85],nt=t[86];let st;t[101]!==J||t[102]!==Q||t[103]!==nt?(st=i.jsxRuntimeExports.jsxs(J,{children:[nt,Q]}),t[101]=J,t[102]=Q,t[103]=nt,t[104]=st):st=t[104];let ot;t[105]!==W?(ot=W.filter(mi).map(di),t[105]=W,t[106]=ot):ot=t[106];let mt;t[107]!==Z||t[108]!==_||t[109]!==N||t[110]!==V||t[111]!==k||t[112]!==st||t[113]!==ot?(mt=i.jsxRuntimeExports.jsxs("g",{transform:Z,children:[_,N,V,k,st,ot]}),t[107]=Z,t[108]=_,t[109]=N,t[110]=V,t[111]=k,t[112]=st,t[113]=ot,t[114]=mt):mt=t[114];let D;t[115]!==K||t[116]!==B||t[117]!==tt||t[118]!==et||t[119]!==it||t[120]!==C||t[121]!==R||t[122]!==mt?(D=i.jsxRuntimeExports.jsxs(K,{width:B,height:tt,viewBox:et,direction:it,ref:C,children:[R,mt]}),t[115]=K,t[116]=B,t[117]=tt,t[118]=et,t[119]=it,t[120]=C,t[121]=R,t[122]=mt,t[123]=D):D=t[123];let Y;t[124]!==n?.tooltip||t[125]!==ft||t[126]!==St||t[127]!==Vt||t[128]!==o?.tooltip||t[129]!==A?(Y=Vt&&A&&ft&&St?i.jsxRuntimeExports.jsx(Ve.Tooltip,{data:Vt,body:A,xPos:ft,yPos:St,backgroundStyle:o?.tooltip,className:n?.tooltip}):null,t[124]=n?.tooltip,t[125]=ft,t[126]=St,t[127]=Vt,t[128]=o?.tooltip,t[129]=A,t[130]=Y):Y=t[130];let at;t[131]!==n?.modal||t[132]!==I||t[133]!==G?(at=I&&G!==void 0?i.jsxRuntimeExports.jsx(qe.DetailsModal,{body:I,data:G,setData:te,className:n?.modal}):null,t[131]=n?.modal,t[132]=I,t[133]=G,t[134]=at):at=t[134];let At;return t[135]!==D||t[136]!==Y||t[137]!==at?(At=i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[D,Y,at]}),t[135]=D,t[136]=Y,t[137]=at,t[138]=At):At=t[138],At}function di(e){return e.layer}function mi(e){return e.position==="after"}function pi(e){return e!==null}function hi(e){return e!==null}function fi(e){return e!==null}function yi(e){return e!==null}function gi(e){return e.layer}function bi(e){return e.position==="before"}function vi(e,t){return t!==0}function wi(e,t){return t!==0}function ji(e){return`${e.id}`}function Ai(e){const t=i.compilerRuntimeExports.c(131),{data:c,graphTitle:Ut,colors:se,sources:zt,graphDescription:Jt,barPadding:M,showTicks:Pt,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:pt,height:wt,width:b,footNote:rt,colorDomain:Rt,colorLegendTitle:A,padding:xt,backgroundColor:Kt,radius:ht,tooltip:q,showLabels:F,relativeHeight:L,onSeriesMouseOver:Wt,graphID:jt,suffix:Mt,prefix:Qt,maxValue:I,minValue:P,onSeriesMouseClick:Gt,graphDownload:It,dataDownload:o,showValues:n,sortParameter:y,arrowConnector:Lt,connectorStrokeWidth:p,language:m,minHeight:X,theme:W,maxBarThickness:dt,maxNumberOfBars:H,minBarThickness:U,ariaLabel:Bt,resetSelectionOnDoubleClick:$t,detailsOnClick:Yt,axisTitle:ie,noOfTicks:Nt,valueColor:v,orientation:Zt,styles:f,classNames:s,labelOrder:$,refValues:z,filterNA:Vt,animate:_t,precision:G,showColorScale:te,customLayers:ft,highlightedDataPoints:Dt,dimmedOpacity:St,timeline:Tt,sortData:yt,hideAxisLine:O}=e,lt=se===void 0?Ze.Colors.light.categoricalColors.colors:se,Xt=M===void 0?.25:M,J=Pt===void 0?!0:Pt,K=pt===void 0?999:pt,Q=Kt===void 0?!0:Kt,Z=ht===void 0?3:ht,_=F===void 0?!0:F,N=Mt===void 0?"":Mt,V=Qt===void 0?"":Qt,k=It===void 0?!1:It,B=o===void 0?!1:o,tt=n===void 0?!0:n,et=Lt===void 0?!1:Lt,it=p===void 0?2:p,C=m===void 0?"en":m,R=X===void 0?0:X,nt=W===void 0?"light":W,st=$t===void 0?!0:$t,ot=Nt===void 0?5:Nt,mt=Zt===void 0?"vertical":Zt,D=Vt===void 0?!0:Vt,Y=_t===void 0?!1:_t,at=G===void 0?2:G,At=te===void 0?!0:te;let x;t[0]!==ft?(x=ft===void 0?[]:ft,t[0]=ft,t[1]=x):x=t[1];const w=x;let gt;t[2]!==Dt?(gt=Dt===void 0?[]:Dt,t[2]=Dt,t[3]=gt):gt=t[3];const E=gt,h=St===void 0?.3:St;let ct;t[4]!==Tt?(ct=Tt===void 0?{enabled:!1,autoplay:!1,showOnlyActiveDate:!0}:Tt,t[4]=Tt,t[5]=ct):ct=t[5];const a=ct,Ht=O===void 0?!1:O,[kt,ee]=T.useState(0),[Et,l]=T.useState(0),[j,S]=T.useState(a.autoplay);let r;if(t[6]!==c||t[7]!==a.dateFormat){let u;t[9]!==a.dateFormat?(u=Ot=>Ee.parse(`${Ot.date}`,a.dateFormat||"yyyy",new Date).getTime(),t[9]=a.dateFormat,t[10]=u):u=t[10],r=[...new Set(c.filter(Gi).map(u))],r.sort(Wi),t[6]=c,t[7]=a.dateFormat,t[8]=r}else r=t[8];const d=r,[g,ne]=T.useState(a.autoplay?0:d.length-1),[be,Be]=T.useState(void 0),ve=T.useRef(null),Re=T.useRef(null);let de,me;t[11]===Symbol.for("react.memo_cache_sentinel")?(de=()=>{const u=new ResizeObserver(Ot=>{ee(Ot[0].target.clientWidth||620),l(Ot[0].target.clientHeight||480)});return ve.current&&u.observe(ve.current),()=>u.disconnect()},me=[],t[11]=de,t[12]=me):(de=t[11],me=t[12]),T.useEffect(de,me);let pe,he;t[13]!==j||t[14]!==a.speed||t[15]!==d?(pe=()=>{const u=setInterval(()=>{ne(Ot=>Ot<d.length-1?Ot+1:0)},(a.speed||2)*1e3);return j||clearInterval(u),()=>clearInterval(u)},he=[d,j,a.speed],t[13]=j,t[14]=a.speed,t[15]=d,t[16]=pe,t[17]=he):(pe=t[16],he=t[17]),T.useEffect(pe,he);const we=a.dateFormat||"yyyy";let fe;t[18]!==g||t[19]!==we||t[20]!==a.showOnlyActiveDate||t[21]!==d?(fe=Ie.getSliderMarks(d,g,a.showOnlyActiveDate,we),t[18]=g,t[19]=we,t[20]=a.showOnlyActiveDate,t[21]=d,t[22]=fe):fe=t[22];const ye=fe,je=mt==="horizontal"?xi:_e,Ae=s?.graphContainer,ke=f?.graphContainer;let oe;t[23]!==s?.description||t[24]!==s?.title||t[25]!==c||t[26]!==B||t[27]!==Jt||t[28]!==k||t[29]!==Ut||t[30]!==f?.description||t[31]!==f?.title||t[32]!==b?(oe=Ut||Jt||k||B?i.jsxRuntimeExports.jsx(ze.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:s?.title,description:s?.description},graphTitle:Ut,graphDescription:Jt,width:b,graphDownload:k?Re:void 0,dataDownload:B?c.map(Pi).filter(Fi).length>0?c.map(qi).filter(Ti):c.filter(Si):null}):null,t[23]=s?.description,t[24]=s?.title,t[25]=c,t[26]=B,t[27]=Jt,t[28]=k,t[29]=Ut,t[30]=f?.description,t[31]=f?.title,t[32]=b,t[33]=oe):oe=t[33];let ae;t[34]!==g||t[35]!==ye||t[36]!==j||t[37]!==a.enabled||t[38]!==d?(ae=a.enabled&&d.length>0&&ye?i.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[i.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{S(!j)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":j?"Click to pause animation":"Click to play animation",children:j?i.jsxRuntimeExports.jsx($e.Pause,{}):i.jsxRuntimeExports.jsx($e.Play,{})}),i.jsxRuntimeExports.jsx(Ie.Nr,{min:d[0],max:d[d.length-1],marks:ye,step:null,defaultValue:d[d.length-1],value:d[g],onChangeComplete:u=>{ne(d.indexOf(u))},onChange:u=>{ne(d.indexOf(u))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t[34]=g,t[35]=ye,t[36]=j,t[37]=a.enabled,t[38]=d,t[39]=ae):ae=t[39];let re;t[40]!==s?.colorLegend||t[41]!==Rt||t[42]!==A||t[43]!==lt||t[44]!==c.length||t[45]!==At||t[46]!==b?(re=At&&c.length>0?i.jsxRuntimeExports.jsx(Ke.ColorLegendWithMouseOver,{width:b,colorDomain:Rt,colors:lt,colorLegendTitle:A,setSelectedColor:Be,showNAColor:!1,className:s?.colorLegend}):null,t[40]=s?.colorLegend,t[41]=Rt,t[42]=A,t[43]=lt,t[44]=c.length,t[45]=At,t[46]=b,t[47]=re):re=t[47];let le;t[48]!==c.length?(le=c.length===0&&i.jsxRuntimeExports.jsx(Qe.EmptyState,{}),t[48]=c.length,t[49]=le):le=t[49];let ce;t[50]!==je||t[51]!==Y||t[52]!==et||t[53]!==ie||t[54]!==Xt||t[55]!==vt||t[56]!==s||t[57]!==lt||t[58]!==it||t[59]!==w||t[60]!==c||t[61]!==Yt||t[62]!==h||t[63]!==D||t[64]!==Ht||t[65]!==E||t[66]!==g||t[67]!==$||t[68]!==C||t[69]!==ut||t[70]!==dt||t[71]!==H||t[72]!==I||t[73]!==U||t[74]!==P||t[75]!==ot||t[76]!==Gt||t[77]!==Wt||t[78]!==at||t[79]!==V||t[80]!==Z||t[81]!==z||t[82]!==st||t[83]!==Ct||t[84]!==be||t[85]!==_||t[86]!==J||t[87]!==tt||t[88]!==yt||t[89]!==y||t[90]!==f||t[91]!==N||t[92]!==Et||t[93]!==kt||t[94]!==a.dateFormat||t[95]!==a.enabled||t[96]!==q||t[97]!==bt||t[98]!==K||t[99]!==d||t[100]!==v?(ce=kt&&Et&&c.length>0?i.jsxRuntimeExports.jsx(je,{hideAxisLine:Ht,data:y!==void 0?y==="diff"?Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Di):u),Vi,[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Me.orderBy(Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>a.enabled?u.date===Ee.format(new Date(d[g]),a.dateFormat||"yyyy"):u).filter(u=>D?!u.x.every(Ni):u),u=>Ft.checkIfNullOrUndefined(u.x[y])?-1/0:u.x[y],[yt||"asc"]).filter((u,Ot)=>H?Ot<H:!0):Oe.ensureCompleteDataForDumbbellChart(c,a.dateFormat||"yyyy").filter(u=>D?!u.x.every($i):u).filter((u,Ot)=>H?Ot<H:!0),dotColors:lt,width:kt,height:Et,radius:Z,barPadding:Xt,showTicks:J,leftMargin:ut,rightMargin:Ct,topMargin:bt,bottomMargin:vt,truncateBy:K,showLabels:_,showValues:tt,tooltip:q,suffix:N,prefix:V,onSeriesMouseOver:Wt,maxValue:Ft.checkIfNullOrUndefined(I)?Math.max(...c.map(Ii))<0?0:Math.max(...c.map(Ri)):I,minValue:Ft.checkIfNullOrUndefined(P)?Math.min(...c.map(Oi))>0?0:Math.min(...c.map(ki)):P,onSeriesMouseClick:Gt,selectedColor:be,arrowConnector:et,connectorStrokeWidth:it,maxBarThickness:dt,minBarThickness:U,resetSelectionOnDoubleClick:st,detailsOnClick:Yt,axisTitle:ie,noOfTicks:ot,valueColor:v,styles:f,classNames:s,labelOrder:$,refValues:z,animate:Y===!0?{duration:.5,once:!0,amount:.5}:Y||{duration:0,once:!0,amount:0},precision:at,customLayers:w,highlightedDataPoints:E,dimmedOpacity:h,rtl:C==="ar"||C==="he"}):null,t[50]=je,t[51]=Y,t[52]=et,t[53]=ie,t[54]=Xt,t[55]=vt,t[56]=s,t[57]=lt,t[58]=it,t[59]=w,t[60]=c,t[61]=Yt,t[62]=h,t[63]=D,t[64]=Ht,t[65]=E,t[66]=g,t[67]=$,t[68]=C,t[69]=ut,t[70]=dt,t[71]=H,t[72]=I,t[73]=U,t[74]=P,t[75]=ot,t[76]=Gt,t[77]=Wt,t[78]=at,t[79]=V,t[80]=Z,t[81]=z,t[82]=st,t[83]=Ct,t[84]=be,t[85]=_,t[86]=J,t[87]=tt,t[88]=yt,t[89]=y,t[90]=f,t[91]=N,t[92]=Et,t[93]=kt,t[94]=a.dateFormat,t[95]=a.enabled,t[96]=q,t[97]=bt,t[98]=K,t[99]=d,t[100]=v,t[101]=ce):ce=t[101];let ue;t[102]!==le||t[103]!==ce?(ue=i.jsxRuntimeExports.jsxs(Le.GraphArea,{ref:ve,children:[le,ce]}),t[102]=le,t[103]=ce,t[104]=ue):ue=t[104];let xe;t[105]!==s?.footnote||t[106]!==s?.source||t[107]!==rt||t[108]!==zt||t[109]!==f?.footnote||t[110]!==f?.source||t[111]!==b?(xe=zt||rt?i.jsxRuntimeExports.jsx(Je.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:zt,footNote:rt,width:b}):null,t[105]=s?.footnote,t[106]=s?.source,t[107]=rt,t[108]=zt,t[109]=f?.footnote,t[110]=f?.source,t[111]=b,t[112]=xe):xe=t[112];let ge;return t[113]!==Bt||t[114]!==Q||t[115]!==jt||t[116]!==wt||t[117]!==C||t[118]!==R||t[119]!==xt||t[120]!==L||t[121]!==Ae||t[122]!==ke||t[123]!==oe||t[124]!==ae||t[125]!==re||t[126]!==ue||t[127]!==xe||t[128]!==nt||t[129]!==b?(ge=i.jsxRuntimeExports.jsxs(Le.GraphContainer,{className:Ae,style:ke,id:jt,ref:Re,"aria-label":Bt,backgroundColor:Q,theme:nt,language:C,minHeight:R,width:b,height:wt,relativeHeight:L,padding:xt,children:[oe,ae,re,ue,xe]}),t[113]=Bt,t[114]=Q,t[115]=jt,t[116]=wt,t[117]=C,t[118]=R,t[119]=xt,t[120]=L,t[121]=Ae,t[122]=ke,t[123]=oe,t[124]=ae,t[125]=re,t[126]=ue,t[127]=xe,t[128]=nt,t[129]=b,t[130]=ge):ge=t[130],ge}function ki(e){return Math.min(...e.x.filter(Ei))}function Ei(e){return e!==null}function Oi(e){return Math.min(...e.x.filter(Ci))}function Ci(e){return e!==null}function Ri(e){return Math.max(...e.x.filter(Mi))}function Mi(e){return e!==null}function Ii(e){return Math.max(...e.x.filter(Li))}function Li(e){return e!==null}function $i(e){return e==null}function Ni(e){return e==null}function Vi(e){return Ft.checkIfNullOrUndefined(e.x[e.x.length-1])||Ft.checkIfNullOrUndefined(e.x[0])?-1/0:e.x[e.x.length-1]-e.x[0]}function Di(e){return e==null}function Si(e){return e!==void 0}function Ti(e){return e!==void 0}function qi(e){return e.data}function Fi(e){return e!==void 0}function Pi(e){return e.data}function Wi(e,t){return e-t}function Gi(e){return e.date}exports.DumbbellChart=Ai;
2
2
  //# sourceMappingURL=DumbbellChart.cjs.map
@@ -23,10 +23,10 @@ import { A as Ee } from "./index-CtMBjvtq.js";
23
23
  import { e as Le } from "./ensureCompleteData-CDIukSG6.js";
24
24
  import { a as _e, G as ti } from "./GraphContainer-CF6ws3pd.js";
25
25
  import { GraphHeader as ei } from "./GraphHeader.js";
26
- import { P as ii, e as ni } from "./index-BQYOuXdl.js";
26
+ import { P as ii, e as ni } from "./index-B-4y_iGB.js";
27
27
  import { GraphFooter as ai } from "./GraphFooter.js";
28
28
  import { ColorLegendWithMouseOver as oi } from "./ColorLegendWithMouseOver.js";
29
- import { E as si } from "./EmptyState-tZBErBKF.js";
29
+ import { E as si } from "./EmptyState-Pj-emXt5.js";
30
30
  import { Colors as li } from "./Colors.js";
31
31
  function ri(e) {
32
32
  const t = Ie.c(148), {
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("./Typography-sa1UE0oF.cjs"),i=require("./index-C6er0ety.cjs");function n(){const r=t.compilerRuntimeExports.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full",children:[t.jsxRuntimeExports.jsx(i.Alert,{}),t.jsxRuntimeExports.jsx(s.j,{marginBottom:"none",leading:"none",size:"lg",className:"text-primary-gray-550 dark:text-primary-gray-550",children:"No data available"})]}),r[0]=e):e=r[0],e}exports.EmptyState=n;
2
- //# sourceMappingURL=EmptyState-CGeBqbmR.cjs.map
1
+ "use strict";const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),s=require("./Typography-DrJ7IOdw.cjs"),i=require("./index-sbKVyHS2.cjs");function n(){const r=t.compilerRuntimeExports.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full",children:[t.jsxRuntimeExports.jsx(i.Alert,{}),t.jsxRuntimeExports.jsx(s._,{marginBottom:"none",leading:"none",size:"lg",className:"text-primary-gray-550 dark:text-primary-gray-550",children:"No data available"})]}),r[0]=e):e=r[0],e}exports.EmptyState=n;
2
+ //# sourceMappingURL=EmptyState-DX0t62iF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-CGeBqbmR.cjs","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":"uIAIO,SAAAA,GAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,CAAA,EAAA,IAAAC,EAAA,OAAAF,EAAA,CAAA,IAAAG,OAAAC,IAAA,2BAAA,GAEHF,EAAAG,EAAAA,kBAAAA,KAAA,MAAA,CAAe,UAAA,yEACb,SAAA,CAAAC,EAAAA,kBAAAA,IAACC,EAAAA,MAAA,EAAK,EACND,EAAAA,kBAAAA,IAACE,EAAAA,EAAA,CACc,aAAA,OACL,QAAA,OACH,KAAA,KACK,UAAA,mDACX,SAAA,mBAAA,CAED,CAAA,EACF,EAAMR,KAAAE,GAAAA,EAAAF,EAAA,CAAA,EAVNE,CAUM"}
1
+ {"version":3,"file":"EmptyState-DX0t62iF.cjs","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":"uIAIO,SAAAA,GAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,CAAA,EAAA,IAAAC,EAAA,OAAAF,EAAA,CAAA,IAAAG,OAAAC,IAAA,2BAAA,GAEHF,EAAAG,EAAAA,kBAAAA,KAAA,MAAA,CAAe,UAAA,yEACb,SAAA,CAAAC,EAAAA,kBAAAA,IAACC,EAAAA,MAAA,EAAK,EACND,EAAAA,kBAAAA,IAACE,EAAAA,EAAA,CACc,aAAA,OACL,QAAA,OACH,KAAA,KACK,UAAA,mDACX,SAAA,mBAAA,CAED,CAAA,EACF,EAAMR,KAAAE,GAAAA,EAAAF,EAAA,CAAA,EAVNE,CAUM"}
@@ -1,6 +1,6 @@
1
1
  import { c as a, j as r } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { j as o } from "./Typography-hWfh3H0J.js";
3
- import { A as l } from "./index-BQYOuXdl.js";
2
+ import { _ as o } from "./Typography-iR8PEgdt.js";
3
+ import { A as l } from "./index-B-4y_iGB.js";
4
4
  function n() {
5
5
  const t = a.c(1);
6
6
  let e;
@@ -12,4 +12,4 @@ function n() {
12
12
  export {
13
13
  n as E
14
14
  };
15
- //# sourceMappingURL=EmptyState-tZBErBKF.js.map
15
+ //# sourceMappingURL=EmptyState-Pj-emXt5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState-tZBErBKF.js","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":";;;AAIO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAG,uBAAAC,IAAA,2BAAA,KAEHF,IAAAG,gBAAAA,EAAAA,KAAA,OAAA,EAAe,WAAA,0EACb,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,GAAA,EAAK;AAAA,IACND,gBAAAA,EAAAA,IAACE,GAAA,EACc,cAAA,QACL,SAAA,QACH,MAAA,MACK,WAAA,oDACX,UAAA,oBAAA,CAED;AAAA,EAAA,GACF,GAAMR,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAVNE;AAUM;"}
1
+ {"version":3,"file":"EmptyState-Pj-emXt5.js","sources":["../src/Components/Elements/EmptyState.tsx"],"sourcesContent":["import { P } from '@undp/design-system-react/Typography';\r\n\r\nimport { Alert } from '@/Components/Icons';\r\n\r\nexport function EmptyState() {\r\n return (\r\n <div className='flex w-full flex-col justify-center grow items-center gap-2 p-6 h-full'>\r\n <Alert />\r\n <P\r\n marginBottom='none'\r\n leading='none'\r\n size='lg'\r\n className='text-primary-gray-550 dark:text-primary-gray-550'\r\n >\r\n No data available\r\n </P>\r\n </div>\r\n );\r\n}\r\n"],"names":["EmptyState","$","_c","t0","Symbol","for","jsxs","jsx","Alert","P"],"mappings":";;;AAIO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAG,uBAAAC,IAAA,2BAAA,KAEHF,IAAAG,gBAAAA,EAAAA,KAAA,OAAA,EAAe,WAAA,0EACb,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,GAAA,EAAK;AAAA,IACND,gBAAAA,EAAAA,IAACE,GAAA,EACc,cAAA,QACL,SAAA,QACH,MAAA,MACK,WAAA,oDACX,UAAA,oBAAA,CAED;AAAA,EAAA,GACF,GAAMR,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAVNE;AAUM;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("./index-C6er0ety.cjs"),y=require("./excelDownload-BQpsCa62.cjs");function D(f){const e=u.compilerRuntimeExports.c(13),{buttonContent:n,buttonType:m,csvData:s,fileName:p,headers:a,xlsxHeader:i,wscols:c,buttonSmall:v,className:w}=f,r=m===void 0?"tertiary":m,x=p===void 0?"data":p,d=`${v?"p-2":"py-4 px-6"} ${w===void 0?"":w}`;let t;e[0]!==s||e[1]!==x||e[2]!==a||e[3]!==c||e[4]!==i?(t=()=>y.excelDownload(s,x,a,i,c),e[0]=s,e[1]=x,e[2]=a,e[3]=c,e[4]=i,e[5]=t):t=e[5];let o;e[6]!==n?(o=n||u.jsxRuntimeExports.jsx(b.FileDown,{}),e[6]=n,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==d||e[10]!==t||e[11]!==o?(l=u.jsxRuntimeExports.jsx(b.x,{variant:r,className:d,onClick:t,"aria-label":"Click to download the data as xlsx",children:o}),e[8]=r,e[9]=d,e[10]=t,e[11]=o,e[12]=l):l=e[12],l}exports.ExcelDownloadButton=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-CHPV5EwG-6v2a2njQ.cjs"),b=require("./index-sbKVyHS2.cjs"),y=require("./excelDownload-BQpsCa62.cjs");function D(f){const e=x.compilerRuntimeExports.c(13),{buttonContent:n,buttonType:m,csvData:s,fileName:p,headers:a,xlsxHeader:i,wscols:c,buttonSmall:v,className:w}=f,r=m===void 0?"tertiary":m,d=p===void 0?"data":p,u=`${v?"p-2":"py-4 px-6"} ${w===void 0?"":w}`;let t;e[0]!==s||e[1]!==d||e[2]!==a||e[3]!==c||e[4]!==i?(t=()=>y.excelDownload(s,d,a,i,c),e[0]=s,e[1]=d,e[2]=a,e[3]=c,e[4]=i,e[5]=t):t=e[5];let o;e[6]!==n?(o=n||x.jsxRuntimeExports.jsx(b.FileDown,{}),e[6]=n,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==u||e[10]!==t||e[11]!==o?(l=x.jsxRuntimeExports.jsx(b.u,{variant:r,className:u,onClick:t,"aria-label":"Click to download the data as xlsx",children:o}),e[8]=r,e[9]=u,e[10]=t,e[11]=o,e[12]=l):l=e[12],l}exports.ExcelDownloadButton=D;
2
2
  //# sourceMappingURL=ExcelDownloadButton.cjs.map
@@ -1,24 +1,24 @@
1
- import { c as v, j as u } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { d as w, x as j } from "./index-BQYOuXdl.js";
1
+ import { c as v, j as f } from "./index-CHPV5EwG-DecW7_qr.js";
2
+ import { d as w, u as j } from "./index-B-4y_iGB.js";
3
3
  import { e as y } from "./excelDownload-BEC1AyQW.js";
4
4
  function $(N) {
5
5
  const t = v.c(13), {
6
6
  buttonContent: s,
7
- buttonType: d,
7
+ buttonType: x,
8
8
  csvData: l,
9
9
  fileName: p,
10
10
  headers: n,
11
11
  xlsxHeader: i,
12
12
  wscols: c,
13
13
  buttonSmall: b,
14
- className: f
15
- } = N, r = d === void 0 ? "tertiary" : d, m = p === void 0 ? "data" : p, x = `${b ? "p-2" : "py-4 px-6"} ${f === void 0 ? "" : f}`;
14
+ className: u
15
+ } = N, r = x === void 0 ? "tertiary" : x, m = p === void 0 ? "data" : p, d = `${b ? "p-2" : "py-4 px-6"} ${u === void 0 ? "" : u}`;
16
16
  let e;
17
17
  t[0] !== l || t[1] !== m || t[2] !== n || t[3] !== c || t[4] !== i ? (e = () => y(l, m, n, i, c), t[0] = l, t[1] = m, t[2] = n, t[3] = c, t[4] = i, t[5] = e) : e = t[5];
18
18
  let o;
19
- t[6] !== s ? (o = s || /* @__PURE__ */ u.jsx(w, {}), t[6] = s, t[7] = o) : o = t[7];
19
+ t[6] !== s ? (o = s || /* @__PURE__ */ f.jsx(w, {}), t[6] = s, t[7] = o) : o = t[7];
20
20
  let a;
21
- return t[8] !== r || t[9] !== x || t[10] !== e || t[11] !== o ? (a = /* @__PURE__ */ u.jsx(j, { variant: r, className: x, onClick: e, "aria-label": "Click to download the data as xlsx", children: o }), t[8] = r, t[9] = x, t[10] = e, t[11] = o, t[12] = a) : a = t[12], a;
21
+ return t[8] !== r || t[9] !== d || t[10] !== e || t[11] !== o ? (a = /* @__PURE__ */ f.jsx(j, { variant: r, className: d, onClick: e, "aria-label": "Click to download the data as xlsx", children: o }), t[8] = r, t[9] = d, t[10] = e, t[11] = o, t[12] = a) : a = t[12], a;
22
22
  }
23
23
  export {
24
24
  $ as ExcelDownloadButton
package/dist/FootNote.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),m=require("./Typography-sa1UE0oF.cjs"),u=require("react");function p(c){const e=a.compilerRuntimeExports.c(12),{text:r,style:n,className:o}=c;let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const i=s;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[2]!==o?(t=a.mo("text-primary-gray-550 dark:text-primary-gray-40",o),e[2]=o,e[3]=t):t=e[3];let l;return e[4]!==i||e[5]!==t||e[6]!==r?(l=a.jsxRuntimeExports.jsx(m.j,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph footnote",style:i,children:r}),e[4]=i,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}if(u.isValidElement(r)){let t;return e[8]!==o||e[9]!==i||e[10]!==r?(t=a.jsxRuntimeExports.jsx("div",{className:o,style:i,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=t):t=e[11],t}return console.error("FootNote: Invalid text type. Expected string or React element."),null}exports.FootNote=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CHPV5EwG-6v2a2njQ.cjs"),m=require("./Typography-DrJ7IOdw.cjs"),u=require("react");function p(c){const e=a.compilerRuntimeExports.c(12),{text:r,style:n,className:o}=c;let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const i=s;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[2]!==o?(t=a.mo("text-primary-gray-550 dark:text-primary-gray-40",o),e[2]=o,e[3]=t):t=e[3];let l;return e[4]!==i||e[5]!==t||e[6]!==r?(l=a.jsxRuntimeExports.jsx(m._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph footnote",style:i,children:r}),e[4]=i,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}if(u.isValidElement(r)){let t;return e[8]!==o||e[9]!==i||e[10]!==r?(t=a.jsxRuntimeExports.jsx("div",{className:o,style:i,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=t):t=e[11],t}return console.error("FootNote: Invalid text type. Expected string or React element."),null}exports.FootNote=p;
2
2
  //# sourceMappingURL=FootNote.cjs.map
package/dist/FootNote.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c, m as f, j as a } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { j as p } from "./Typography-hWfh3H0J.js";
2
+ import { _ as p } from "./Typography-iR8PEgdt.js";
3
3
  import x from "react";
4
4
  function g(m) {
5
5
  const t = c.c(12), {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("react"),ce=require("maplibre-gl"),ae=require("pmtiles");;/* empty css */const Q=require("@dnd-kit/core"),ue=require("@dnd-kit/modifiers"),ie=require("./index-C6er0ety.cjs"),me=require("./string2HTML-xx9MzTtY.cjs"),se=require("./select-Bnfk0lJx.cjs"),fe=require("./GraphHeader.cjs"),pe=require("./GraphFooter.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs");function le(m){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const n in m)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(m,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>m[n]})}}return e.default=m,Object.freeze(e)}const T=le(ce),de=le(ae);function ge(m,e){let n=!1;function r(o,f){if(!n){n=!0;const u=o.getCenter(),i=o.getZoom(),s=o.getBearing(),p=o.getPitch();f.jumpTo({center:u,zoom:i,bearing:s,pitch:p}),n=!1}}m.on("move",()=>{r(m,e)}),e.on("move",()=>{r(e,m)})}function he(m){const e=t.compilerRuntimeExports.c(47),{height:n,width:r,mapStyles:o,center:f,zoomLevel:u,mapLegend:i}=m,[s,p]=a.useState(50),[x,b]=a.useState(!1),y=a.useRef(null),[N,W]=a.useState(!0),B=a.useRef(50),$=a.useRef(0);let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q={activationConstraint:{distance:0}},e[0]=q):q=e[0];const G=Q.useSensors(Q.useSensor(Q.PointerSensor,q));let l;e[1]!==s?(l=()=>{b(!0),B.current=s,y.current&&($.current=y.current.getBoundingClientRect().width)},e[1]=s,e[2]=l):l=e[2];const c=l;let z;e[3]===Symbol.for("react.memo_cache_sentinel")?(z=Y=>{if(!y.current||$.current===0)return;const K=Y.delta.x/$.current*100,ee=Math.max(0,Math.min(100,B.current+K));p(ee)},e[3]=z):z=e[3];const F=z;let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{b(!1)},e[4]=S):S=e[4];const Z=S;let P;e[5]!==x?(P=Y=>{if(x||!y.current)return;const K=y.current.getBoundingClientRect(),te=(Y.clientX-K.left)/K.width*100;p(Math.max(0,Math.min(100,te)))},e[5]=x,e[6]=P):P=e[6];const L=P,V=a.useRef(null),k=a.useRef(null),E=a.useRef(null),J=a.useRef(null);let C,A;e[7]!==f||e[8]!==o||e[9]!==r||e[10]!==u?(C=()=>{if(J.current&&k.current&&E.current&&r){se.select(J.current).selectAll(".maplibregl-compare").remove(),se.select(k.current).selectAll("div").remove(),se.select(E.current).selectAll("div").remove();const te=new de.Protocol;T.addProtocol("pmtiles",te.tile);const re=new T.Map({container:k.current,style:o[0],center:f||[0,0],zoom:u||4}),oe=new T.Map({container:E.current,style:o[1],center:f||[0,0],zoom:u||4});oe.addControl(new T.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),re.addControl(new T.ScaleControl,"bottom-left"),re.addControl(new T.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),oe.addControl(new T.ScaleControl,"bottom-left"),ge(re,oe)}},A=[r,o,f,u],e[7]=f,e[8]=o,e[9]=r,e[10]=u,e[11]=C,e[12]=A):(C=e[11],A=e[12]),a.useEffect(C,A);let j;e[13]!==n||e[14]!==r?(j={width:r,height:n},e[13]=n,e[14]=r,e[15]=j):j=e[15];let I;e[16]===Symbol.for("react.memo_cache_sentinel")?(I={inset:0},e[16]=I):I=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=[ue.restrictToHorizontalAxis],e[17]=_):_=e[17];const H=x?"grabbing":"col-resize";let R;e[18]!==n||e[19]!==H||e[20]!==r?(R={position:"relative",width:r,height:n,overflow:"hidden",cursor:H,userSelect:"none"},e[18]=n,e[19]=H,e[20]=r,e[21]=R):R=e[21];const O=`polygon(${s}% 0%, ${s}% 100%, 100% 100%, 100% 0%)`;let d;e[22]!==O?(d=t.jsxRuntimeExports.jsx("div",{ref:E,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:O}}),e[22]=O,e[23]=d):d=e[23];const w=`polygon(0% 0%, ${s}% 0%, ${s}% 100%, 0% 100%)`;let g;e[24]!==w?(g=t.jsxRuntimeExports.jsx("div",{ref:k,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:w}}),e[24]=w,e[25]=g):g=e[25];let h;e[26]!==s?(h=t.jsxRuntimeExports.jsx(xe,{position:s}),e[26]=s,e[27]=h):h=e[27];let v;e[28]!==L||e[29]!==R||e[30]!==d||e[31]!==g||e[32]!==h?(v=t.jsxRuntimeExports.jsxs("div",{ref:y,style:R,onClick:L,children:[d,g,h]}),e[28]=L,e[29]=R,e[30]=d,e[31]=g,e[32]=h,e[33]=v):v=e[33];let M;e[34]!==c||e[35]!==G||e[36]!==v?(M=t.jsxRuntimeExports.jsx("div",{ref:J,className:"map maplibre-show-control relative w-full h-full",style:I,children:t.jsxRuntimeExports.jsx(Q.DndContext,{sensors:G,modifiers:_,onDragStart:c,onDragMove:F,onDragEnd:Z,children:v})}),e[34]=c,e[35]=G,e[36]=v,e[37]=M):M=e[37];let D;e[38]!==M||e[39]!==j?(D=t.jsxRuntimeExports.jsx("div",{style:j,children:M}),e[38]=M,e[39]=j,e[40]=D):D=e[40];let X;e[41]!==i||e[42]!==N?(X=i?t.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.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:()=>{W(!1)},children:t.jsxRuntimeExports.jsx(ie.X,{})}),t.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof i=="string"?{__html:me.string2HTML(i)}:void 0,children:a.isValidElement(i)?i:null})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{W(!0)},children:t.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"})})}):null,e[41]=i,e[42]=N,e[43]=X):X=e[43];let U;return e[44]!==D||e[45]!==X?(U=t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col grow justify-center leading-0",ref:V,"aria-label":"Map area",children:[D,X]}),e[44]=D,e[45]=X,e[46]=U):U=e[46],U}function xe(m){const e=t.compilerRuntimeExports.c(10),{position:n}=m;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={id:"slider-handle"},e[0]=r):r=e[0];const{attributes:o,listeners:f,setNodeRef:u}=Q.useDraggable(r),i=`${n}%`;let s;e[1]!==i?(s={position:"absolute",left:i,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},e[1]=i,e[2]=s):s=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxRuntimeExports.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsxRuntimeExports.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:t.jsxRuntimeExports.jsx(ie.ChevronLeftRight,{})}),e[4]=x):x=e[4];let b;return e[5]!==o||e[6]!==f||e[7]!==u||e[8]!==s?(b=t.jsxRuntimeExports.jsxs("div",{ref:u,style:s,...f,...o,children:[p,x]}),e[5]=o,e[6]=f,e[7]=u,e[8]=s,e[9]=b):b=e[9],b}function be(m){const e=t.compilerRuntimeExports.c(45),{graphTitle:n,height:r,width:o,relativeHeight:f,sources:u,graphDescription:i,footNote:s,padding:p,backgroundColor:x,graphID:b,mapStyles:y,center:N,zoomLevel:W,language:B,minHeight:$,theme:q,ariaLabel:G,styles:l,classNames:c,mapLegend:z}=m,F=x===void 0?!1:x;let S;e[0]!==N?(S=N===void 0?[0,0]:N,e[0]=N,e[1]=S):S=e[1];const Z=S,P=W===void 0?3:W,L=B===void 0?"en":B,V=$===void 0?0:$,k=q===void 0?"light":q,[E,J]=a.useState(0),[C,A]=a.useState(0),j=a.useRef(null),I=a.useRef(null);let _,H;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{const M=new ResizeObserver(D=>{J(D[0].target.clientWidth||620),A(D[0].target.clientHeight||480)});return j.current&&M.observe(j.current),()=>M.disconnect()},H=[],e[2]=_,e[3]=H):(_=e[2],H=e[3]),a.useEffect(_,H);const R=c?.graphContainer,O=l?.graphContainer;let d;e[4]!==c?.description||e[5]!==c?.title||e[6]!==i||e[7]!==n||e[8]!==l?.description||e[9]!==l?.title||e[10]!==o?(d=n||i?t.jsxRuntimeExports.jsx(fe.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:c?.title,description:c?.description},graphTitle:n,graphDescription:i,width:o}):null,e[4]=c?.description,e[5]=c?.title,e[6]=i,e[7]=n,e[8]=l?.description,e[9]=l?.title,e[10]=o,e[11]=d):d=e[11];let w;e[12]!==Z||e[13]!==z||e[14]!==y||e[15]!==C||e[16]!==E||e[17]!==P?(w=E&&C?t.jsxRuntimeExports.jsx(he,{width:E,height:C,mapStyles:y,center:Z,zoomLevel:P,mapLegend:z}):null,e[12]=Z,e[13]=z,e[14]=y,e[15]=C,e[16]=E,e[17]=P,e[18]=w):w=e[18];let g;e[19]!==w?(g=t.jsxRuntimeExports.jsx(ne.GraphArea,{ref:j,children:w}),e[19]=w,e[20]=g):g=e[20];let h;e[21]!==c?.footnote||e[22]!==c?.source||e[23]!==s||e[24]!==u||e[25]!==l?.footnote||e[26]!==l?.source||e[27]!==o?(h=u||s?t.jsxRuntimeExports.jsx(pe.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:u,footNote:s,width:o}):null,e[21]=c?.footnote,e[22]=c?.source,e[23]=s,e[24]=u,e[25]=l?.footnote,e[26]=l?.source,e[27]=o,e[28]=h):h=e[28];let v;return e[29]!==G||e[30]!==F||e[31]!==b||e[32]!==r||e[33]!==L||e[34]!==V||e[35]!==p||e[36]!==f||e[37]!==O||e[38]!==d||e[39]!==g||e[40]!==h||e[41]!==R||e[42]!==k||e[43]!==o?(v=t.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:R,style:O,id:b,ref:I,"aria-label":G,backgroundColor:F,theme:k,language:L,minHeight:V,width:o,height:r,relativeHeight:f,padding:p,children:[d,g,h]}),e[29]=G,e[30]=F,e[31]=b,e[32]=r,e[33]=L,e[34]=V,e[35]=p,e[36]=f,e[37]=O,e[38]=d,e[39]=g,e[40]=h,e[41]=R,e[42]=k,e[43]=o,e[44]=v):v=e[44],v}exports.GeoHubCompareMaps=be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("react"),ce=require("maplibre-gl"),ae=require("pmtiles");;/* empty css */const Q=require("@dnd-kit/core"),ue=require("@dnd-kit/modifiers"),ie=require("./index-sbKVyHS2.cjs"),me=require("./string2HTML-xx9MzTtY.cjs"),se=require("./select-Bnfk0lJx.cjs"),fe=require("./GraphHeader.cjs"),pe=require("./GraphFooter.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs");function le(m){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const n in m)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(m,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>m[n]})}}return e.default=m,Object.freeze(e)}const T=le(ce),de=le(ae);function ge(m,e){let n=!1;function r(o,f){if(!n){n=!0;const u=o.getCenter(),i=o.getZoom(),s=o.getBearing(),p=o.getPitch();f.jumpTo({center:u,zoom:i,bearing:s,pitch:p}),n=!1}}m.on("move",()=>{r(m,e)}),e.on("move",()=>{r(e,m)})}function he(m){const e=t.compilerRuntimeExports.c(47),{height:n,width:r,mapStyles:o,center:f,zoomLevel:u,mapLegend:i}=m,[s,p]=a.useState(50),[x,b]=a.useState(!1),y=a.useRef(null),[N,W]=a.useState(!0),B=a.useRef(50),$=a.useRef(0);let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q={activationConstraint:{distance:0}},e[0]=q):q=e[0];const G=Q.useSensors(Q.useSensor(Q.PointerSensor,q));let l;e[1]!==s?(l=()=>{b(!0),B.current=s,y.current&&($.current=y.current.getBoundingClientRect().width)},e[1]=s,e[2]=l):l=e[2];const c=l;let z;e[3]===Symbol.for("react.memo_cache_sentinel")?(z=Y=>{if(!y.current||$.current===0)return;const K=Y.delta.x/$.current*100,ee=Math.max(0,Math.min(100,B.current+K));p(ee)},e[3]=z):z=e[3];const F=z;let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{b(!1)},e[4]=S):S=e[4];const Z=S;let P;e[5]!==x?(P=Y=>{if(x||!y.current)return;const K=y.current.getBoundingClientRect(),te=(Y.clientX-K.left)/K.width*100;p(Math.max(0,Math.min(100,te)))},e[5]=x,e[6]=P):P=e[6];const L=P,V=a.useRef(null),k=a.useRef(null),E=a.useRef(null),J=a.useRef(null);let C,A;e[7]!==f||e[8]!==o||e[9]!==r||e[10]!==u?(C=()=>{if(J.current&&k.current&&E.current&&r){se.select(J.current).selectAll(".maplibregl-compare").remove(),se.select(k.current).selectAll("div").remove(),se.select(E.current).selectAll("div").remove();const te=new de.Protocol;T.addProtocol("pmtiles",te.tile);const re=new T.Map({container:k.current,style:o[0],center:f||[0,0],zoom:u||4}),oe=new T.Map({container:E.current,style:o[1],center:f||[0,0],zoom:u||4});oe.addControl(new T.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),re.addControl(new T.ScaleControl,"bottom-left"),re.addControl(new T.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),oe.addControl(new T.ScaleControl,"bottom-left"),ge(re,oe)}},A=[r,o,f,u],e[7]=f,e[8]=o,e[9]=r,e[10]=u,e[11]=C,e[12]=A):(C=e[11],A=e[12]),a.useEffect(C,A);let j;e[13]!==n||e[14]!==r?(j={width:r,height:n},e[13]=n,e[14]=r,e[15]=j):j=e[15];let I;e[16]===Symbol.for("react.memo_cache_sentinel")?(I={inset:0},e[16]=I):I=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=[ue.restrictToHorizontalAxis],e[17]=_):_=e[17];const H=x?"grabbing":"col-resize";let R;e[18]!==n||e[19]!==H||e[20]!==r?(R={position:"relative",width:r,height:n,overflow:"hidden",cursor:H,userSelect:"none"},e[18]=n,e[19]=H,e[20]=r,e[21]=R):R=e[21];const O=`polygon(${s}% 0%, ${s}% 100%, 100% 100%, 100% 0%)`;let d;e[22]!==O?(d=t.jsxRuntimeExports.jsx("div",{ref:E,className:"absolute h-full rightMap w-full",style:{position:"absolute",top:0,left:0,clipPath:O}}),e[22]=O,e[23]=d):d=e[23];const w=`polygon(0% 0%, ${s}% 0%, ${s}% 100%, 0% 100%)`;let g;e[24]!==w?(g=t.jsxRuntimeExports.jsx("div",{ref:k,className:"absolute h-full leftMap w-full",style:{position:"absolute",top:0,left:0,inset:0,clipPath:w}}),e[24]=w,e[25]=g):g=e[25];let h;e[26]!==s?(h=t.jsxRuntimeExports.jsx(xe,{position:s}),e[26]=s,e[27]=h):h=e[27];let v;e[28]!==L||e[29]!==R||e[30]!==d||e[31]!==g||e[32]!==h?(v=t.jsxRuntimeExports.jsxs("div",{ref:y,style:R,onClick:L,children:[d,g,h]}),e[28]=L,e[29]=R,e[30]=d,e[31]=g,e[32]=h,e[33]=v):v=e[33];let M;e[34]!==c||e[35]!==G||e[36]!==v?(M=t.jsxRuntimeExports.jsx("div",{ref:J,className:"map maplibre-show-control relative w-full h-full",style:I,children:t.jsxRuntimeExports.jsx(Q.DndContext,{sensors:G,modifiers:_,onDragStart:c,onDragMove:F,onDragEnd:Z,children:v})}),e[34]=c,e[35]=G,e[36]=v,e[37]=M):M=e[37];let D;e[38]!==M||e[39]!==j?(D=t.jsxRuntimeExports.jsx("div",{style:j,children:M}),e[38]=M,e[39]=j,e[40]=D):D=e[40];let X;e[41]!==i||e[42]!==N?(X=i?t.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:N?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.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:()=>{W(!1)},children:t.jsxRuntimeExports.jsx(ie.X,{})}),t.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof i=="string"?{__html:me.string2HTML(i)}:void 0,children:a.isValidElement(i)?i:null})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{W(!0)},children:t.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"})})}):null,e[41]=i,e[42]=N,e[43]=X):X=e[43];let U;return e[44]!==D||e[45]!==X?(U=t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col grow justify-center leading-0",ref:V,"aria-label":"Map area",children:[D,X]}),e[44]=D,e[45]=X,e[46]=U):U=e[46],U}function xe(m){const e=t.compilerRuntimeExports.c(10),{position:n}=m;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={id:"slider-handle"},e[0]=r):r=e[0];const{attributes:o,listeners:f,setNodeRef:u}=Q.useDraggable(r),i=`${n}%`;let s;e[1]!==i?(s={position:"absolute",left:i,top:0,bottom:0,width:"40px",transform:"translateX(-50%)",cursor:"col-resize",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,touchAction:"none"},e[1]=i,e[2]=s):s=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxRuntimeExports.jsx("div",{className:"h-full bg-primary-blue-600 dark:bg-primary-blue-400",style:{width:"2px"}}),e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsxRuntimeExports.jsx("div",{className:"flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white",style:{boxShadow:"inset 0 0 0 1px #fff",width:"42px",height:"42px",top:"calc(50% - 21px)",left:"0",cursor:"col-resize"},children:t.jsxRuntimeExports.jsx(ie.ChevronLeftRight,{})}),e[4]=x):x=e[4];let b;return e[5]!==o||e[6]!==f||e[7]!==u||e[8]!==s?(b=t.jsxRuntimeExports.jsxs("div",{ref:u,style:s,...f,...o,children:[p,x]}),e[5]=o,e[6]=f,e[7]=u,e[8]=s,e[9]=b):b=e[9],b}function be(m){const e=t.compilerRuntimeExports.c(45),{graphTitle:n,height:r,width:o,relativeHeight:f,sources:u,graphDescription:i,footNote:s,padding:p,backgroundColor:x,graphID:b,mapStyles:y,center:N,zoomLevel:W,language:B,minHeight:$,theme:q,ariaLabel:G,styles:l,classNames:c,mapLegend:z}=m,F=x===void 0?!1:x;let S;e[0]!==N?(S=N===void 0?[0,0]:N,e[0]=N,e[1]=S):S=e[1];const Z=S,P=W===void 0?3:W,L=B===void 0?"en":B,V=$===void 0?0:$,k=q===void 0?"light":q,[E,J]=a.useState(0),[C,A]=a.useState(0),j=a.useRef(null),I=a.useRef(null);let _,H;e[2]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{const M=new ResizeObserver(D=>{J(D[0].target.clientWidth||620),A(D[0].target.clientHeight||480)});return j.current&&M.observe(j.current),()=>M.disconnect()},H=[],e[2]=_,e[3]=H):(_=e[2],H=e[3]),a.useEffect(_,H);const R=c?.graphContainer,O=l?.graphContainer;let d;e[4]!==c?.description||e[5]!==c?.title||e[6]!==i||e[7]!==n||e[8]!==l?.description||e[9]!==l?.title||e[10]!==o?(d=n||i?t.jsxRuntimeExports.jsx(fe.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:c?.title,description:c?.description},graphTitle:n,graphDescription:i,width:o}):null,e[4]=c?.description,e[5]=c?.title,e[6]=i,e[7]=n,e[8]=l?.description,e[9]=l?.title,e[10]=o,e[11]=d):d=e[11];let w;e[12]!==Z||e[13]!==z||e[14]!==y||e[15]!==C||e[16]!==E||e[17]!==P?(w=E&&C?t.jsxRuntimeExports.jsx(he,{width:E,height:C,mapStyles:y,center:Z,zoomLevel:P,mapLegend:z}):null,e[12]=Z,e[13]=z,e[14]=y,e[15]=C,e[16]=E,e[17]=P,e[18]=w):w=e[18];let g;e[19]!==w?(g=t.jsxRuntimeExports.jsx(ne.GraphArea,{ref:j,children:w}),e[19]=w,e[20]=g):g=e[20];let h;e[21]!==c?.footnote||e[22]!==c?.source||e[23]!==s||e[24]!==u||e[25]!==l?.footnote||e[26]!==l?.source||e[27]!==o?(h=u||s?t.jsxRuntimeExports.jsx(pe.GraphFooter,{styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:c?.footnote,source:c?.source},sources:u,footNote:s,width:o}):null,e[21]=c?.footnote,e[22]=c?.source,e[23]=s,e[24]=u,e[25]=l?.footnote,e[26]=l?.source,e[27]=o,e[28]=h):h=e[28];let v;return e[29]!==G||e[30]!==F||e[31]!==b||e[32]!==r||e[33]!==L||e[34]!==V||e[35]!==p||e[36]!==f||e[37]!==O||e[38]!==d||e[39]!==g||e[40]!==h||e[41]!==R||e[42]!==k||e[43]!==o?(v=t.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:R,style:O,id:b,ref:I,"aria-label":G,backgroundColor:F,theme:k,language:L,minHeight:V,width:o,height:r,relativeHeight:f,padding:p,children:[d,g,h]}),e[29]=G,e[30]=F,e[31]=b,e[32]=r,e[33]=L,e[34]=V,e[35]=p,e[36]=f,e[37]=O,e[38]=d,e[39]=g,e[40]=h,e[41]=R,e[42]=k,e[43]=o,e[44]=v):v=e[44],v}exports.GeoHubCompareMaps=be;
2
2
  //# sourceMappingURL=GeoHubCompareMaps.cjs.map
@@ -5,7 +5,7 @@ import * as ae from "pmtiles";
5
5
  /* empty css */
6
6
  import { useSensors as ce, useSensor as me, PointerSensor as fe, DndContext as de, useDraggable as ue } from "@dnd-kit/core";
7
7
  import { restrictToHorizontalAxis as pe } from "@dnd-kit/modifiers";
8
- import { X as he, C as ge } from "./index-BQYOuXdl.js";
8
+ import { X as he, C as ge } from "./index-B-4y_iGB.js";
9
9
  import { s as be } from "./string2HTML-DUYZT1L9.js";
10
10
  import { s as le } from "./select-DKy99ogv.js";
11
11
  import { GraphHeader as ve } from "./GraphHeader.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),ce=require("./DropdownSelect-NNpOs7DX.cjs"),H=require("maplibre-gl"),fe=require("pmtiles");;/* empty css */const le=require("./fetchAndParseData-QTF6tjij.cjs"),ie=require("./filterData-T5DQBE9b.cjs"),ue=require("./index-C6er0ety.cjs"),de=require("./string2HTML-xx9MzTtY.cjs"),ae=require("./GraphContainer-B1EDxJ0S.cjs"),pe=require("./select-Bnfk0lJx.cjs"),xe=require("./GraphHeader.cjs"),be=require("./GraphFooter.cjs");function ye(g){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const t in g)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(g,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>g[t]})}}return e.default=g,Object.freeze(e)}const me=ye(fe);function je(g){const e=s.compilerRuntimeExports.c(22),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null),h=c.useRef(null);let S,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{const d=new ResizeObserver(b=>{L(b[0].target.clientWidth||620),D(b[0].target.clientHeight||480)});return E.current&&d.observe(E.current),()=>d.disconnect()},f=[],e[0]=S,e[1]=f):(S=e[0],f=e[1]),c.useEffect(S,f);let x,m;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(x=()=>{v.current&&l&&!h.current&&le.fetchAndParseJSON(t).then(d=>{pe.select(v.current).selectAll("div").remove();const Q=new me.Protocol;H.addProtocol("pmtiles",Q.tile);const k={container:v.current,style:n.length===0&&u.length===0?d:{...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(k.center=i),p&&(k.zoom=p),h.current=new H.Map(k),h.current.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),h.current.addControl(new H.ScaleControl,"bottom-left")})},m=[l,i,p,n,u,t],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=x,e[9]=m):(x=e[8],m=e[9]),c.useEffect(x,m);let R,r;e[10]!==u||e[11]!==n||e[12]!==t?(R=()=>{h.current&&le.fetchAndParseJSON(t).then(d=>{const b={...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])};h.current.setStyle(b)})},r=[u,n,t],e[10]=u,e[11]=n,e[12]=t,e[13]=R,e[14]=r):(R=e[13],r=e[14]),c.useEffect(R,r);let o;e[15]!==a||e[16]!==j||e[17]!==y||e[18]!==l?(o=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.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"})})}):null]}):null,e[15]=a,e[16]=j,e[17]=y,e[18]=l,e[19]=o):o=e[19];let w;return e[20]!==o?(w=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:o}),e[20]=o,e[21]=w):w=e[21],w}function ve(g){const e=s.compilerRuntimeExports.c(17),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null);let h,S;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const r=new ResizeObserver(o=>{L(o[0].target.clientWidth||620),D(o[0].target.clientHeight||480)});return E.current&&r.observe(E.current),()=>r.disconnect()},S=[],e[0]=h,e[1]=S):(h=e[0],S=e[1]),c.useEffect(h,S);let f,x;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(f=()=>{v.current&&l&&le.fetchAndParseJSON(t).then(r=>{pe.select(v.current).selectAll("div").remove();const w=new me.Protocol;H.addProtocol("pmtiles",w.tile);const d={container:v.current,style:n.length===0&&u.length===0?r:{...r,layers:ie.filterData(r.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(d.center=i),p&&(d.zoom=p);const b=new H.Map(d);b.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.addControl(new H.ScaleControl,"bottom-left")})},x=[l,t,i,p,n,u],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=f,e[9]=x):(f=e[8],x=e[9]),c.useEffect(f,x);let m;e[10]!==a||e[11]!==j||e[12]!==y||e[13]!==l?(m=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.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"})})}):null]}):null,e[10]=a,e[11]=j,e[12]=y,e[13]=l,e[14]=m):m=e[14];let R;return e[15]!==m?(R=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:m}),e[15]=m,e[16]=R):R=e[16],R}function Se(g){const e=s.compilerRuntimeExports.c(85),{mapStyle:t,graphTitle:i,height:p,width:n,relativeHeight:u,sources:a,graphDescription:l,footNote:L,padding:y,backgroundColor:D,center:j,zoomLevel:C,graphID:E,language:v,minHeight:h,theme:S,includeLayers:f,excludeLayers:x,ariaLabel:m,uiMode:R,styles:r,classNames:o,mapLegend:w}=g,d=D===void 0?!1:D,b=v===void 0?"en":v,Q=h===void 0?0:h,k=S===void 0?"light":S;let U;e[0]!==f?(U=f===void 0?[]:f,e[0]=f,e[1]=U):U=e[1];const Y=U;let ee;e[2]!==x?(ee=x===void 0?[]:x,e[2]=x,e[3]=ee):ee=e[3];const te=ee,oe=R===void 0?"normal":R,[re,ge]=c.useState(void 0),he=c.useRef(null),M=typeof t=="string"?t:t[0].style;let O,z,P,q,G,V,_,A,T,W,F,I,J,N,$,X;if(e[4]!==m||e[5]!==d||e[6]!==o?.description||e[7]!==o?.graphContainer||e[8]!==o?.title||e[9]!==M||e[10]!==l||e[11]!==E||e[12]!==i||e[13]!==p||e[14]!==b||e[15]!==t||e[16]!==Q||e[17]!==y||e[18]!==u||e[19]!==r?.description||e[20]!==r?.graphContainer||e[21]!==r?.title||e[22]!==k||e[23]!==oe||e[24]!==n){const ne={ignoreCase:!0,ignoreAccents:!0,trim:!0};O=ae.GraphContainer,X=o?.graphContainer,z=r?.graphContainer,P=E,q=he,G=m,V=d,_=k,A=b,T=Q,W=n,F=p,I=u,J=y,e[41]!==o?.description||e[42]!==o?.title||e[43]!==l||e[44]!==i||e[45]!==r?.description||e[46]!==r?.title||e[47]!==n?(N=i||l?s.jsxRuntimeExports.jsx(xe.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:o?.title,description:o?.description},graphTitle:i,graphDescription:l,width:n}):null,e[41]=o?.description,e[42]=o?.title,e[43]=l,e[44]=i,e[45]=r?.description,e[46]=r?.title,e[47]=n,e[48]=N):N=e[48],$=typeof t=="string"?null:s.jsxRuntimeExports.jsx(ce.ja,{options:t.map(Re),isClearable:!1,size:"sm",variant:oe,isRtl:b==="he"||b==="ar",isSearchable:!0,filterOption:ce.Du(ne),defaultValue:t.find(K=>K.style===M),controlShouldRenderValue:!0,onChange:K=>{K&&ge(K.value)}}),e[4]=m,e[5]=d,e[6]=o?.description,e[7]=o?.graphContainer,e[8]=o?.title,e[9]=M,e[10]=l,e[11]=E,e[12]=i,e[13]=p,e[14]=b,e[15]=t,e[16]=Q,e[17]=y,e[18]=u,e[19]=r?.description,e[20]=r?.graphContainer,e[21]=r?.title,e[22]=k,e[23]=oe,e[24]=n,e[25]=O,e[26]=z,e[27]=P,e[28]=q,e[29]=G,e[30]=V,e[31]=_,e[32]=A,e[33]=T,e[34]=W,e[35]=F,e[36]=I,e[37]=J,e[38]=N,e[39]=$,e[40]=X}else O=e[25],z=e[26],P=e[27],q=e[28],G=e[29],V=e[30],_=e[31],A=e[32],T=e[33],W=e[34],F=e[35],I=e[36],J=e[37],N=e[38],$=e[39],X=e[40];let Z;e[49]!==j||e[50]!==M||e[51]!==te||e[52]!==Y||e[53]!==w||e[54]!==t||e[55]!==re||e[56]!==C?(Z=typeof t=="string"?s.jsxRuntimeExports.jsx(ve,{mapStyle:t,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:w}):s.jsxRuntimeExports.jsx(je,{mapStyle:re||M,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:(w||[]).find(ne=>ne.mapStyleName===t.find(K=>K.style===(re||M))?.name)?.legend}),e[49]=j,e[50]=M,e[51]=te,e[52]=Y,e[53]=w,e[54]=t,e[55]=re,e[56]=C,e[57]=Z):Z=e[57];let B;e[58]!==o?.footnote||e[59]!==o?.source||e[60]!==L||e[61]!==a||e[62]!==r?.footnote||e[63]!==r?.source||e[64]!==n?(B=a||L?s.jsxRuntimeExports.jsx(be.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:a,footNote:L,width:n}):null,e[58]=o?.footnote,e[59]=o?.source,e[60]=L,e[61]=a,e[62]=r?.footnote,e[63]=r?.source,e[64]=n,e[65]=B):B=e[65];let se;return e[66]!==O||e[67]!==z||e[68]!==P||e[69]!==q||e[70]!==G||e[71]!==V||e[72]!==_||e[73]!==A||e[74]!==T||e[75]!==W||e[76]!==F||e[77]!==I||e[78]!==J||e[79]!==N||e[80]!==$||e[81]!==Z||e[82]!==B||e[83]!==X?(se=s.jsxRuntimeExports.jsxs(O,{className:X,style:z,id:P,ref:q,"aria-label":G,backgroundColor:V,theme:_,language:A,minHeight:T,width:W,height:F,relativeHeight:I,padding:J,children:[N,$,Z,B]}),e[66]=O,e[67]=z,e[68]=P,e[69]=q,e[70]=G,e[71]=V,e[72]=_,e[73]=A,e[74]=T,e[75]=W,e[76]=F,e[77]=I,e[78]=J,e[79]=N,e[80]=$,e[81]=Z,e[82]=B,e[83]=X,e[84]=se):se=e[84],se}function Re(g){return{label:g.name,value:g.style}}exports.GeoHubMap=Se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),ce=require("./DropdownSelect-NNpOs7DX.cjs"),H=require("maplibre-gl"),fe=require("pmtiles");;/* empty css */const le=require("./fetchAndParseData-QTF6tjij.cjs"),ie=require("./filterData-T5DQBE9b.cjs"),ue=require("./index-sbKVyHS2.cjs"),de=require("./string2HTML-xx9MzTtY.cjs"),ae=require("./GraphContainer-B1EDxJ0S.cjs"),pe=require("./select-Bnfk0lJx.cjs"),xe=require("./GraphHeader.cjs"),be=require("./GraphFooter.cjs");function ye(g){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const t in g)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(g,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>g[t]})}}return e.default=g,Object.freeze(e)}const me=ye(fe);function je(g){const e=s.compilerRuntimeExports.c(22),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null),h=c.useRef(null);let S,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{const d=new ResizeObserver(b=>{L(b[0].target.clientWidth||620),D(b[0].target.clientHeight||480)});return E.current&&d.observe(E.current),()=>d.disconnect()},f=[],e[0]=S,e[1]=f):(S=e[0],f=e[1]),c.useEffect(S,f);let x,m;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(x=()=>{v.current&&l&&!h.current&&le.fetchAndParseJSON(t).then(d=>{pe.select(v.current).selectAll("div").remove();const Q=new me.Protocol;H.addProtocol("pmtiles",Q.tile);const k={container:v.current,style:n.length===0&&u.length===0?d:{...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(k.center=i),p&&(k.zoom=p),h.current=new H.Map(k),h.current.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),h.current.addControl(new H.ScaleControl,"bottom-left")})},m=[l,i,p,n,u,t],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=x,e[9]=m):(x=e[8],m=e[9]),c.useEffect(x,m);let R,r;e[10]!==u||e[11]!==n||e[12]!==t?(R=()=>{h.current&&le.fetchAndParseJSON(t).then(d=>{const b={...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])};h.current.setStyle(b)})},r=[u,n,t],e[10]=u,e[11]=n,e[12]=t,e[13]=R,e[14]=r):(R=e[13],r=e[14]),c.useEffect(R,r);let o;e[15]!==a||e[16]!==j||e[17]!==y||e[18]!==l?(o=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.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"})})}):null]}):null,e[15]=a,e[16]=j,e[17]=y,e[18]=l,e[19]=o):o=e[19];let w;return e[20]!==o?(w=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:o}),e[20]=o,e[21]=w):w=e[21],w}function ve(g){const e=s.compilerRuntimeExports.c(17),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null);let h,S;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const r=new ResizeObserver(o=>{L(o[0].target.clientWidth||620),D(o[0].target.clientHeight||480)});return E.current&&r.observe(E.current),()=>r.disconnect()},S=[],e[0]=h,e[1]=S):(h=e[0],S=e[1]),c.useEffect(h,S);let f,x;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(f=()=>{v.current&&l&&le.fetchAndParseJSON(t).then(r=>{pe.select(v.current).selectAll("div").remove();const w=new me.Protocol;H.addProtocol("pmtiles",w.tile);const d={container:v.current,style:n.length===0&&u.length===0?r:{...r,layers:ie.filterData(r.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(d.center=i),p&&(d.zoom=p);const b=new H.Map(d);b.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.addControl(new H.ScaleControl,"bottom-left")})},x=[l,t,i,p,n,u],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=f,e[9]=x):(f=e[8],x=e[9]),c.useEffect(f,x);let m;e[10]!==a||e[11]!==j||e[12]!==y||e[13]!==l?(m=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.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"})})}):null]}):null,e[10]=a,e[11]=j,e[12]=y,e[13]=l,e[14]=m):m=e[14];let R;return e[15]!==m?(R=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:m}),e[15]=m,e[16]=R):R=e[16],R}function Se(g){const e=s.compilerRuntimeExports.c(85),{mapStyle:t,graphTitle:i,height:p,width:n,relativeHeight:u,sources:a,graphDescription:l,footNote:L,padding:y,backgroundColor:D,center:j,zoomLevel:C,graphID:E,language:v,minHeight:h,theme:S,includeLayers:f,excludeLayers:x,ariaLabel:m,uiMode:R,styles:r,classNames:o,mapLegend:w}=g,d=D===void 0?!1:D,b=v===void 0?"en":v,Q=h===void 0?0:h,k=S===void 0?"light":S;let U;e[0]!==f?(U=f===void 0?[]:f,e[0]=f,e[1]=U):U=e[1];const Y=U;let ee;e[2]!==x?(ee=x===void 0?[]:x,e[2]=x,e[3]=ee):ee=e[3];const te=ee,oe=R===void 0?"normal":R,[re,ge]=c.useState(void 0),he=c.useRef(null),M=typeof t=="string"?t:t[0].style;let O,z,P,q,G,V,_,A,T,W,F,I,J,N,$,X;if(e[4]!==m||e[5]!==d||e[6]!==o?.description||e[7]!==o?.graphContainer||e[8]!==o?.title||e[9]!==M||e[10]!==l||e[11]!==E||e[12]!==i||e[13]!==p||e[14]!==b||e[15]!==t||e[16]!==Q||e[17]!==y||e[18]!==u||e[19]!==r?.description||e[20]!==r?.graphContainer||e[21]!==r?.title||e[22]!==k||e[23]!==oe||e[24]!==n){const ne={ignoreCase:!0,ignoreAccents:!0,trim:!0};O=ae.GraphContainer,X=o?.graphContainer,z=r?.graphContainer,P=E,q=he,G=m,V=d,_=k,A=b,T=Q,W=n,F=p,I=u,J=y,e[41]!==o?.description||e[42]!==o?.title||e[43]!==l||e[44]!==i||e[45]!==r?.description||e[46]!==r?.title||e[47]!==n?(N=i||l?s.jsxRuntimeExports.jsx(xe.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:o?.title,description:o?.description},graphTitle:i,graphDescription:l,width:n}):null,e[41]=o?.description,e[42]=o?.title,e[43]=l,e[44]=i,e[45]=r?.description,e[46]=r?.title,e[47]=n,e[48]=N):N=e[48],$=typeof t=="string"?null:s.jsxRuntimeExports.jsx(ce.ja,{options:t.map(Re),isClearable:!1,size:"sm",variant:oe,isRtl:b==="he"||b==="ar",isSearchable:!0,filterOption:ce.Du(ne),defaultValue:t.find(K=>K.style===M),controlShouldRenderValue:!0,onChange:K=>{K&&ge(K.value)}}),e[4]=m,e[5]=d,e[6]=o?.description,e[7]=o?.graphContainer,e[8]=o?.title,e[9]=M,e[10]=l,e[11]=E,e[12]=i,e[13]=p,e[14]=b,e[15]=t,e[16]=Q,e[17]=y,e[18]=u,e[19]=r?.description,e[20]=r?.graphContainer,e[21]=r?.title,e[22]=k,e[23]=oe,e[24]=n,e[25]=O,e[26]=z,e[27]=P,e[28]=q,e[29]=G,e[30]=V,e[31]=_,e[32]=A,e[33]=T,e[34]=W,e[35]=F,e[36]=I,e[37]=J,e[38]=N,e[39]=$,e[40]=X}else O=e[25],z=e[26],P=e[27],q=e[28],G=e[29],V=e[30],_=e[31],A=e[32],T=e[33],W=e[34],F=e[35],I=e[36],J=e[37],N=e[38],$=e[39],X=e[40];let Z;e[49]!==j||e[50]!==M||e[51]!==te||e[52]!==Y||e[53]!==w||e[54]!==t||e[55]!==re||e[56]!==C?(Z=typeof t=="string"?s.jsxRuntimeExports.jsx(ve,{mapStyle:t,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:w}):s.jsxRuntimeExports.jsx(je,{mapStyle:re||M,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:(w||[]).find(ne=>ne.mapStyleName===t.find(K=>K.style===(re||M))?.name)?.legend}),e[49]=j,e[50]=M,e[51]=te,e[52]=Y,e[53]=w,e[54]=t,e[55]=re,e[56]=C,e[57]=Z):Z=e[57];let B;e[58]!==o?.footnote||e[59]!==o?.source||e[60]!==L||e[61]!==a||e[62]!==r?.footnote||e[63]!==r?.source||e[64]!==n?(B=a||L?s.jsxRuntimeExports.jsx(be.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:a,footNote:L,width:n}):null,e[58]=o?.footnote,e[59]=o?.source,e[60]=L,e[61]=a,e[62]=r?.footnote,e[63]=r?.source,e[64]=n,e[65]=B):B=e[65];let se;return e[66]!==O||e[67]!==z||e[68]!==P||e[69]!==q||e[70]!==G||e[71]!==V||e[72]!==_||e[73]!==A||e[74]!==T||e[75]!==W||e[76]!==F||e[77]!==I||e[78]!==J||e[79]!==N||e[80]!==$||e[81]!==Z||e[82]!==B||e[83]!==X?(se=s.jsxRuntimeExports.jsxs(O,{className:X,style:z,id:P,ref:q,"aria-label":G,backgroundColor:V,theme:_,language:A,minHeight:T,width:W,height:F,relativeHeight:I,padding:J,children:[N,$,Z,B]}),e[66]=O,e[67]=z,e[68]=P,e[69]=q,e[70]=G,e[71]=V,e[72]=_,e[73]=A,e[74]=T,e[75]=W,e[76]=F,e[77]=I,e[78]=J,e[79]=N,e[80]=$,e[81]=Z,e[82]=B,e[83]=X,e[84]=se):se=e[84],se}function Re(g){return{label:g.name,value:g.style}}exports.GeoHubMap=Se;
2
2
  //# sourceMappingURL=GeoHubMap.cjs.map
package/dist/GeoHubMap.js CHANGED
@@ -6,7 +6,7 @@ import * as ue from "pmtiles";
6
6
  /* empty css */
7
7
  import { f as ae } from "./fetchAndParseData-BAXhgTDM.js";
8
8
  import { f as ce } from "./filterData-DsAiFzKY.js";
9
- import { X as pe } from "./index-BQYOuXdl.js";
9
+ import { X as pe } from "./index-B-4y_iGB.js";
10
10
  import { s as ge } from "./string2HTML-DUYZT1L9.js";
11
11
  import { a as he, G as je } from "./GraphContainer-CF6ws3pd.js";
12
12
  import { s as fe } from "./select-DKy99ogv.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),me=require("./index-BS2TADPj.cjs"),le=require("./DropdownSelect-NNpOs7DX.cjs"),de=require("./Source-B5AoSlsi.cjs"),U=require("maplibre-gl"),pe=require("pmtiles");;/* empty css */const ne=require("./fetchAndParseData-QTF6tjij.cjs"),se=require("./filterData-T5DQBE9b.cjs"),fe=require("./string2HTML-xx9MzTtY.cjs"),ge=require("./index-C6er0ety.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),xe=require("./select-Bnfk0lJx.cjs"),he=require("./GraphHeader.cjs"),ye=require("./GraphFooter.cjs");function be(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const m=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,m.get?m:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const je=be(pe);function ve(a){const e=s.compilerRuntimeExports.c(25),{mapStyle:n,center:m,zoomLevel:y,selectedLayer:r,layerIdList:d,excludeLayers:c,mapLegend:f}=a,[p,A]=u.useState(0),[R,T]=u.useState(0),[E,O]=u.useState(!0),[b,W]=u.useState(void 0),_=u.useRef(null),t=u.useRef(null),g=u.useRef(null);let v,L;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const i=new ResizeObserver(h=>{A(h[0].target.clientWidth||620),T(h[0].target.clientHeight||480)});return _.current&&i.observe(_.current),()=>i.disconnect()},L=[],e[0]=v,e[1]=L):(v=e[0],L=e[1]),u.useEffect(v,L);let o,l;e[2]!==m||e[3]!==c||e[4]!==d||e[5]!==n||e[6]!==r||e[7]!==p||e[8]!==y?(o=()=>{t.current&&p&&!g.current&&ne.fetchAndParseJSON(n).then(i=>{W(i),xe.select(t.current).selectAll("div").remove();const C=new je.Protocol;U.addProtocol("pmtiles",C.tile);const w={container:t.current,style:{...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(q=>r.indexOf(q)===-1)]}])},attributionControl:!0};m&&(w.center=m),y&&(w.zoom=y),g.current=new U.Map(w),g.current.addControl(new U.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),g.current.addControl(new U.ScaleControl,"bottom-left")})},l=[p,m,y,d,n,c,r],e[2]=m,e[3]=c,e[4]=d,e[5]=n,e[6]=r,e[7]=p,e[8]=y,e[9]=o,e[10]=l):(o=e[9],l=e[10]),u.useEffect(o,l);let j,S;e[11]!==c||e[12]!==d||e[13]!==n||e[14]!==b||e[15]!==r?(j=()=>{if(g.current)if(b){const i={...b,layers:se.filterData(b.layers,[{column:"id",excludeValues:[...c,...d.filter(h=>r.indexOf(h)===-1)]}])};g.current.setStyle(i)}else ne.fetchAndParseJSON(n).then(i=>{const h={...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(C=>r.indexOf(C)===-1)]}])};g.current.setStyle(h)})},S=[c,d,n,b,r],e[11]=c,e[12]=d,e[13]=n,e[14]=b,e[15]=r,e[16]=j,e[17]=S):(j=e[16],S=e[17]),u.useEffect(j,S);let x;e[18]!==f||e[19]!==E||e[20]!==R||e[21]!==p?(x=p&&R?s.jsxRuntimeExports.jsxs("div",{style:{width:p,height:R},children:[s.jsxRuntimeExports.jsx("div",{ref:t,className:"map maplibre-show-control w-full h-full"}),f?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:E?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{O(!1)},children:s.jsxRuntimeExports.jsx(ge.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof f=="string"?{__html:fe.string2HTML(f)}:void 0,children:u.isValidElement(f)?f:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{O(!0)},children:s.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"})})}):null]}):null,e[18]=f,e[19]=E,e[20]=R,e[21]=p,e[22]=x):x=e[22];let D;return e[23]!==x?(D=s.jsxRuntimeExports.jsx(ie.GraphArea,{ref:_,children:x}),e[23]=x,e[24]=D):D=e[24],D}function Se(a){const e=s.compilerRuntimeExports.c(69),{mapStyle:n,graphTitle:m,height:y,width:r,relativeHeight:d,sources:c,graphDescription:f,footNote:p,padding:A,backgroundColor:R,center:T,zoomLevel:E,graphID:O,language:b,minHeight:W,theme:_,layerSelection:t,excludeLayers:g,ariaLabel:v,uiMode:L,styles:o,classNames:l,mapLegend:j}=a,S=R===void 0?!1:R,x=b===void 0?"en":b,D=W===void 0?0:W,i=_===void 0?"light":_;let h;e[0]!==g?(h=g===void 0?[]:g,e[0]=g,e[1]=h):h=e[1];const C=h,w=L===void 0?"normal":L;let q;e[2]!==j?(q=j===void 0?[]:j,e[2]=j,e[3]=q):q=e[3];const Y=q,[N,oe]=u.useState(t[0].layerID),ae=u.useRef(null);let F;e[4]!==t[0].layerID?(F=()=>{oe(t[0].layerID)},e[4]=t[0].layerID,e[5]=F):F=e[5];let $;e[6]!==t?($=[t],e[6]=t,e[7]=$):$=e[7],u.useEffect(F,$);let J;e[8]===Symbol.for("react.memo_cache_sentinel")?(J={ignoreCase:!0,ignoreAccents:!0,trim:!0},e[8]=J):J=e[8];const ce=J,ee=l?.graphContainer,te=o?.graphContainer;let H;e[9]!==l?.description||e[10]!==l?.title||e[11]!==f||e[12]!==m||e[13]!==o?.description||e[14]!==o?.title||e[15]!==r?(H=m||f?s.jsxRuntimeExports.jsx(he.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:l?.title,description:l?.description},graphTitle:m,graphDescription:f,width:r}):null,e[9]=l?.description,e[10]=l?.title,e[11]=f,e[12]=m,e[13]=o?.description,e[14]=o?.title,e[15]=r,e[16]=H):H=e[16];let I;e[17]!==t?(I=t.map(Re),e[17]=t,e[18]=I):I=e[18];const re=x==="he"||x==="ar";let X;e[19]===Symbol.for("react.memo_cache_sentinel")?(X=le.Du(ce),e[19]=X):X=e[19];let M;e[20]!==t[0].layerID||e[21]!==t[0].name?(M={label:t[0].name,value:t[0].layerID},e[20]=t[0].layerID,e[21]=t[0].name,e[22]=M):M=e[22];let Z;e[23]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{Q&&oe(Q.value)},e[23]=Z):Z=e[23];let k;e[24]!==I||e[25]!==re||e[26]!==M||e[27]!==w?(k=s.jsxRuntimeExports.jsx(le.ja,{options:I,size:"sm",isClearable:!1,variant:w,isRtl:re,isSearchable:!0,filterOption:X,defaultValue:M,controlShouldRenderValue:!0,onChange:Z}),e[24]=I,e[25]=re,e[26]=M,e[27]=w,e[28]=k):k=e[28];let B;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxRuntimeExports.jsx(de.n,{size:"lg"}),e[29]=B):B=e[29];let G;e[30]!==t?(G=me.flattenDeep(t.map(De)),e[30]=t,e[31]=G):G=e[31];let P;e[32]!==t||e[33]!==Y||e[34]!==N?(P=Y.find(Q=>Q.mapStyleName===t.find(ue=>ue.layerID===N)?.name)?.legend,e[32]=t,e[33]=Y,e[34]=N,e[35]=P):P=e[35];let z;e[36]!==T||e[37]!==C||e[38]!==n||e[39]!==N||e[40]!==G||e[41]!==P||e[42]!==E?(z=s.jsxRuntimeExports.jsx(ve,{mapStyle:n,center:T,zoomLevel:E,selectedLayer:N,layerIdList:G,excludeLayers:C,mapLegend:P}),e[36]=T,e[37]=C,e[38]=n,e[39]=N,e[40]=G,e[41]=P,e[42]=E,e[43]=z):z=e[43];let V;e[44]!==l?.footnote||e[45]!==l?.source||e[46]!==p||e[47]!==c||e[48]!==o?.footnote||e[49]!==o?.source||e[50]!==r?(V=c||p?s.jsxRuntimeExports.jsx(ye.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:c,footNote:p,width:r}):null,e[44]=l?.footnote,e[45]=l?.source,e[46]=p,e[47]=c,e[48]=o?.footnote,e[49]=o?.source,e[50]=r,e[51]=V):V=e[51];let K;return e[52]!==v||e[53]!==S||e[54]!==O||e[55]!==y||e[56]!==x||e[57]!==D||e[58]!==A||e[59]!==d||e[60]!==ee||e[61]!==te||e[62]!==H||e[63]!==k||e[64]!==z||e[65]!==V||e[66]!==i||e[67]!==r?(K=s.jsxRuntimeExports.jsxs(ie.GraphContainer,{className:ee,style:te,id:O,ref:ae,"aria-label":v,backgroundColor:S,theme:i,language:x,minHeight:D,width:r,height:y,relativeHeight:d,padding:A,children:[H,k,B,z,V]}),e[52]=v,e[53]=S,e[54]=O,e[55]=y,e[56]=x,e[57]=D,e[58]=A,e[59]=d,e[60]=ee,e[61]=te,e[62]=H,e[63]=k,e[64]=z,e[65]=V,e[66]=i,e[67]=r,e[68]=K):K=e[68],K}function De(a){return a.layerID}function Re(a){return{label:a.name,value:a.layerID}}exports.GeoHubMapWithLayerSelection=Se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),u=require("react"),me=require("./index-BS2TADPj.cjs"),le=require("./DropdownSelect-NNpOs7DX.cjs"),de=require("./Source-B3i0Bx2R.cjs"),U=require("maplibre-gl"),pe=require("pmtiles");;/* empty css */const ne=require("./fetchAndParseData-QTF6tjij.cjs"),se=require("./filterData-T5DQBE9b.cjs"),fe=require("./string2HTML-xx9MzTtY.cjs"),ge=require("./index-sbKVyHS2.cjs"),ie=require("./GraphContainer-B1EDxJ0S.cjs"),xe=require("./select-Bnfk0lJx.cjs"),he=require("./GraphHeader.cjs"),ye=require("./GraphFooter.cjs");function be(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const m=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,m.get?m:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const je=be(pe);function ve(a){const e=s.compilerRuntimeExports.c(25),{mapStyle:n,center:m,zoomLevel:y,selectedLayer:r,layerIdList:d,excludeLayers:c,mapLegend:f}=a,[p,A]=u.useState(0),[R,T]=u.useState(0),[E,O]=u.useState(!0),[b,W]=u.useState(void 0),_=u.useRef(null),t=u.useRef(null),g=u.useRef(null);let v,L;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const i=new ResizeObserver(h=>{A(h[0].target.clientWidth||620),T(h[0].target.clientHeight||480)});return _.current&&i.observe(_.current),()=>i.disconnect()},L=[],e[0]=v,e[1]=L):(v=e[0],L=e[1]),u.useEffect(v,L);let o,l;e[2]!==m||e[3]!==c||e[4]!==d||e[5]!==n||e[6]!==r||e[7]!==p||e[8]!==y?(o=()=>{t.current&&p&&!g.current&&ne.fetchAndParseJSON(n).then(i=>{W(i),xe.select(t.current).selectAll("div").remove();const C=new je.Protocol;U.addProtocol("pmtiles",C.tile);const w={container:t.current,style:{...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(q=>r.indexOf(q)===-1)]}])},attributionControl:!0};m&&(w.center=m),y&&(w.zoom=y),g.current=new U.Map(w),g.current.addControl(new U.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),g.current.addControl(new U.ScaleControl,"bottom-left")})},l=[p,m,y,d,n,c,r],e[2]=m,e[3]=c,e[4]=d,e[5]=n,e[6]=r,e[7]=p,e[8]=y,e[9]=o,e[10]=l):(o=e[9],l=e[10]),u.useEffect(o,l);let j,S;e[11]!==c||e[12]!==d||e[13]!==n||e[14]!==b||e[15]!==r?(j=()=>{if(g.current)if(b){const i={...b,layers:se.filterData(b.layers,[{column:"id",excludeValues:[...c,...d.filter(h=>r.indexOf(h)===-1)]}])};g.current.setStyle(i)}else ne.fetchAndParseJSON(n).then(i=>{const h={...i,layers:se.filterData(i.layers,[{column:"id",excludeValues:[...c,...d.filter(C=>r.indexOf(C)===-1)]}])};g.current.setStyle(h)})},S=[c,d,n,b,r],e[11]=c,e[12]=d,e[13]=n,e[14]=b,e[15]=r,e[16]=j,e[17]=S):(j=e[16],S=e[17]),u.useEffect(j,S);let x;e[18]!==f||e[19]!==E||e[20]!==R||e[21]!==p?(x=p&&R?s.jsxRuntimeExports.jsxs("div",{style:{width:p,height:R},children:[s.jsxRuntimeExports.jsx("div",{ref:t,className:"map maplibre-show-control w-full h-full"}),f?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:E?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.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:()=>{O(!1)},children:s.jsxRuntimeExports.jsx(ge.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof f=="string"?{__html:fe.string2HTML(f)}:void 0,children:u.isValidElement(f)?f:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{O(!0)},children:s.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"})})}):null]}):null,e[18]=f,e[19]=E,e[20]=R,e[21]=p,e[22]=x):x=e[22];let D;return e[23]!==x?(D=s.jsxRuntimeExports.jsx(ie.GraphArea,{ref:_,children:x}),e[23]=x,e[24]=D):D=e[24],D}function Se(a){const e=s.compilerRuntimeExports.c(69),{mapStyle:n,graphTitle:m,height:y,width:r,relativeHeight:d,sources:c,graphDescription:f,footNote:p,padding:A,backgroundColor:R,center:T,zoomLevel:E,graphID:O,language:b,minHeight:W,theme:_,layerSelection:t,excludeLayers:g,ariaLabel:v,uiMode:L,styles:o,classNames:l,mapLegend:j}=a,S=R===void 0?!1:R,x=b===void 0?"en":b,D=W===void 0?0:W,i=_===void 0?"light":_;let h;e[0]!==g?(h=g===void 0?[]:g,e[0]=g,e[1]=h):h=e[1];const C=h,w=L===void 0?"normal":L;let q;e[2]!==j?(q=j===void 0?[]:j,e[2]=j,e[3]=q):q=e[3];const Y=q,[N,oe]=u.useState(t[0].layerID),ae=u.useRef(null);let F;e[4]!==t[0].layerID?(F=()=>{oe(t[0].layerID)},e[4]=t[0].layerID,e[5]=F):F=e[5];let $;e[6]!==t?($=[t],e[6]=t,e[7]=$):$=e[7],u.useEffect(F,$);let J;e[8]===Symbol.for("react.memo_cache_sentinel")?(J={ignoreCase:!0,ignoreAccents:!0,trim:!0},e[8]=J):J=e[8];const ce=J,ee=l?.graphContainer,te=o?.graphContainer;let H;e[9]!==l?.description||e[10]!==l?.title||e[11]!==f||e[12]!==m||e[13]!==o?.description||e[14]!==o?.title||e[15]!==r?(H=m||f?s.jsxRuntimeExports.jsx(he.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:l?.title,description:l?.description},graphTitle:m,graphDescription:f,width:r}):null,e[9]=l?.description,e[10]=l?.title,e[11]=f,e[12]=m,e[13]=o?.description,e[14]=o?.title,e[15]=r,e[16]=H):H=e[16];let I;e[17]!==t?(I=t.map(Re),e[17]=t,e[18]=I):I=e[18];const re=x==="he"||x==="ar";let X;e[19]===Symbol.for("react.memo_cache_sentinel")?(X=le.Du(ce),e[19]=X):X=e[19];let M;e[20]!==t[0].layerID||e[21]!==t[0].name?(M={label:t[0].name,value:t[0].layerID},e[20]=t[0].layerID,e[21]=t[0].name,e[22]=M):M=e[22];let Z;e[23]===Symbol.for("react.memo_cache_sentinel")?(Z=Q=>{Q&&oe(Q.value)},e[23]=Z):Z=e[23];let k;e[24]!==I||e[25]!==re||e[26]!==M||e[27]!==w?(k=s.jsxRuntimeExports.jsx(le.ja,{options:I,size:"sm",isClearable:!1,variant:w,isRtl:re,isSearchable:!0,filterOption:X,defaultValue:M,controlShouldRenderValue:!0,onChange:Z}),e[24]=I,e[25]=re,e[26]=M,e[27]=w,e[28]=k):k=e[28];let B;e[29]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxRuntimeExports.jsx(de.n,{size:"lg"}),e[29]=B):B=e[29];let G;e[30]!==t?(G=me.flattenDeep(t.map(De)),e[30]=t,e[31]=G):G=e[31];let P;e[32]!==t||e[33]!==Y||e[34]!==N?(P=Y.find(Q=>Q.mapStyleName===t.find(ue=>ue.layerID===N)?.name)?.legend,e[32]=t,e[33]=Y,e[34]=N,e[35]=P):P=e[35];let z;e[36]!==T||e[37]!==C||e[38]!==n||e[39]!==N||e[40]!==G||e[41]!==P||e[42]!==E?(z=s.jsxRuntimeExports.jsx(ve,{mapStyle:n,center:T,zoomLevel:E,selectedLayer:N,layerIdList:G,excludeLayers:C,mapLegend:P}),e[36]=T,e[37]=C,e[38]=n,e[39]=N,e[40]=G,e[41]=P,e[42]=E,e[43]=z):z=e[43];let V;e[44]!==l?.footnote||e[45]!==l?.source||e[46]!==p||e[47]!==c||e[48]!==o?.footnote||e[49]!==o?.source||e[50]!==r?(V=c||p?s.jsxRuntimeExports.jsx(ye.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},classNames:{footnote:l?.footnote,source:l?.source},sources:c,footNote:p,width:r}):null,e[44]=l?.footnote,e[45]=l?.source,e[46]=p,e[47]=c,e[48]=o?.footnote,e[49]=o?.source,e[50]=r,e[51]=V):V=e[51];let K;return e[52]!==v||e[53]!==S||e[54]!==O||e[55]!==y||e[56]!==x||e[57]!==D||e[58]!==A||e[59]!==d||e[60]!==ee||e[61]!==te||e[62]!==H||e[63]!==k||e[64]!==z||e[65]!==V||e[66]!==i||e[67]!==r?(K=s.jsxRuntimeExports.jsxs(ie.GraphContainer,{className:ee,style:te,id:O,ref:ae,"aria-label":v,backgroundColor:S,theme:i,language:x,minHeight:D,width:r,height:y,relativeHeight:d,padding:A,children:[H,k,B,z,V]}),e[52]=v,e[53]=S,e[54]=O,e[55]=y,e[56]=x,e[57]=D,e[58]=A,e[59]=d,e[60]=ee,e[61]=te,e[62]=H,e[63]=k,e[64]=z,e[65]=V,e[66]=i,e[67]=r,e[68]=K):K=e[68],K}function De(a){return a.layerID}function Re(a){return{label:a.name,value:a.layerID}}exports.GeoHubMapWithLayerSelection=Se;
2
2
  //# sourceMappingURL=GeoHubMapWithLayerSelection.cjs.map
@@ -2,14 +2,14 @@ import { c as ne, j as s } from "./index-CHPV5EwG-DecW7_qr.js";
2
2
  import de, { useState as T, useRef as Y, useEffect as ee } from "react";
3
3
  import { f as ue } from "./index-EArKRVKg.js";
4
4
  import { D as pe, j as ge } from "./DropdownSelect-D8rFbygC.js";
5
- import { n as he } from "./Source-F8EYCYkV.js";
5
+ import { n as he } from "./Source-_STIejqs.js";
6
6
  import U from "maplibre-gl";
7
7
  import * as ye from "pmtiles";
8
8
  /* empty css */
9
9
  import { f as ie } from "./fetchAndParseData-BAXhgTDM.js";
10
10
  import { f as se } from "./filterData-DsAiFzKY.js";
11
11
  import { s as be } from "./string2HTML-DUYZT1L9.js";
12
- import { X as ve } from "./index-BQYOuXdl.js";
12
+ import { X as ve } from "./index-B-4y_iGB.js";
13
13
  import { a as xe, G as Se } from "./GraphContainer-CF6ws3pd.js";
14
14
  import { s as je } from "./select-DKy99ogv.js";
15
15
  import { GraphHeader as De } from "./GraphHeader.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("./Typography-sa1UE0oF.cjs"),c=require("react");function p(l){const e=o.compilerRuntimeExports.c(10),{text:r,style:i,className:n}=l;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[0]!==n?(t=o.mo("text-primary-gray-550 dark:text-primary-gray-400",n),e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t||e[4]!==r?(s=o.jsxRuntimeExports.jsx(a.j,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph description",style:i,children:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=s):s=e[5],s}if(c.isValidElement(r)){let t;return e[6]!==n||e[7]!==i||e[8]!==r?(t=o.jsxRuntimeExports.jsx("div",{className:n,style:i,children:r}),e[6]=n,e[7]=i,e[8]=r,e[9]=t):t=e[9],t}return console.error("GraphDescription: Invalid text type. Expected string or React element."),null}exports.GraphDescription=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-6v2a2njQ.cjs"),a=require("./Typography-DrJ7IOdw.cjs"),c=require("react");function p(l){const e=o.compilerRuntimeExports.c(10),{text:r,style:i,className:n}=l;if(typeof r=="string"){if(r.trim()==="")return null;let t;e[0]!==n?(t=o.mo("text-primary-gray-550 dark:text-primary-gray-400",n),e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t||e[4]!==r?(s=o.jsxRuntimeExports.jsx(a._,{size:"sm",marginBottom:"none",className:t,"aria-label":"Graph description",style:i,children:r}),e[2]=i,e[3]=t,e[4]=r,e[5]=s):s=e[5],s}if(c.isValidElement(r)){let t;return e[6]!==n||e[7]!==i||e[8]!==r?(t=o.jsxRuntimeExports.jsx("div",{className:n,style:i,children:r}),e[6]=n,e[7]=i,e[8]=r,e[9]=t):t=e[9],t}return console.error("GraphDescription: Invalid text type. Expected string or React element."),null}exports.GraphDescription=p;
2
2
  //# sourceMappingURL=GraphDescription.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { c as a, m, j as l } from "./index-CHPV5EwG-DecW7_qr.js";
2
- import { j as p } from "./Typography-hWfh3H0J.js";
2
+ import { _ as p } from "./Typography-iR8PEgdt.js";
3
3
  import c from "react";
4
4
  function d(o) {
5
5
  const e = a.c(10), {