define(['exports', 'preact/jsx-runtime', './BarGroup-d6909cb1', './useUser-797287de', './layoutUtils-4304ffe4', './dataStyleUtils-a0ecedd5', './Chart-79cfc878'], (function(e,t,r,n,i,o,s){"use strict";function d(e,t,r,n){const i=o.getNextItemInGroup(e,r,n);if(i)return i;if(e.groupIndex<t){let i={seriesIndex:0,groupIndex:e.groupIndex+1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=d(i,t,r,n),i)return i}return e}function a(e,t,r,n){const i=o.getPrevItemInGroup(e,n);if(i)return i;if(e.groupIndex>t){let i={groupIndex:e.groupIndex-1,seriesIndex:r-1};if(n(i.seriesIndex,i.groupIndex))return i;if(i=a(i,t,r,n),i)return i}return e}function I(e){return t.jsx(u,{datatip:()=>({content:""}),zoomAndScroll:"off",plotArea:{yMajorTick:{isRendered:!1},xMajorTick:{}},xAxis:{tickLabel:{autoRotate:!1,isRendered:!!e.xAxis?.timeAxisType}},series:e.series,groups:e.groups,getDataItem:e.getDataItem,yAxis:{tickLabel:{isRendered:!1}},overview:"off"})}const g=.5;function u({width:e,height:u,selectedIds:l=[],hiddenIds:c=[],highlightedIds:x,hideAndShowBehavior:p="none",orientation:f="vertical",yAxis:h,series:m,groups:S,isStacked:A=!1,getDataItem:w,selectionMode:v="none",drilling:y="off",dataItemGaps:D=.5,...R}){const{direction:G}=n.useUser(),k="rtl"===G,B=new Set(c),P="horizontal"===f,b=R.xAxis?.timeAxisType,j=new Set(l),L=new Set(x);return t.jsx(s.Chart,{width:e,height:u,selectedIds:j,hiddenIds:c,hideAndShowBehavior:p,orientation:f,yAxis:h,series:m,groups:S,isStacked:A,getDataItem:w,selectionMode:v,drilling:y,renderGridLinesInFront:!1,findNearest:(e,t,n,o)=>{const s=r.getSeriesOffsetAndWidth(n,o,m.length,D,A,k);return i.findNearestDataPoint(m,S,e,t,w,A,s,r.getBarCenterCoordinate,"log"===h?.scale,D,B,b)},getDataItemPos:(e,t,n,i)=>r.getBarPosition(m,S,w,e,t,B,D,n,i,"log"===h?.scale,A,k,P,b),getNavUtil:(e,t)=>function(e,t,r,n,i,s){const I=(t,r)=>{const n=e(t,r);return Boolean(n)};return(e,g)=>{if(!i&&("ArrowDown"===g||"ArrowUp"===g))return e;let u;const l={groupIndex:e.groupIndex,seriesIndex:e.seriesIndex};return l.groupIndex<r?(l.groupIndex=r,l):l.groupIndex>n?(l.groupIndex=n,l):(i?u="ArrowLeft"===g?s?o.getNextItemInSeries(l,n,I):o.getPrevItemInSeries(l,r,I):"ArrowRight"===g?s?o.getPrevItemInSeries(l,r,I):o.getNextItemInSeries(l,n,I):"ArrowDown"===g?o.getPrevItemInGroup(l,I):o.getNextItemInGroup(l,t,I):"ArrowRight"===g?u=s?a(l,r,t,I):d(l,n,t,I):"ArrowLeft"===g&&(u=s?d(l,n,t,I):a(l,r,t,I)),u||l)}}(w,m.length,e,t,A,k),getGapRatio:(e,t)=>r.getBarGapRatio(A,e,t),getMarkerInfo:(e,t)=>({color:o.getItemColor(e,t,m,w),type:"circle"}),isRtl:k,offset:g,defaultOverviewContentRenderer:()=>t.jsx(I,{series:m,groups:S,getDataItem:w}),...R,children:({xStartIndex:e,xEndIndex:n,xScale:i,yScale:o,gapRatio:s,activeId:d,focusedItemInfo:a,hoveredItemInfo:I,groupWidth:g,isPointInsideMarquee:u,getTextDimensions:l,defaultFontSize:c,colors:p})=>t.jsx(t.Fragment,{children:S.slice(e,n+1).map(((n,G)=>t.jsx(r.BarGroup,{yScale:o,xScale:i,groupIndex:G+e,selectedIds:j,hiddenIds:B,highlightedIds:x?L:x,isDrillEnabled:"on"===y,series:m,barGapRatio:s,dataItemGaps:D,isPointInsideMarquee:u,isStacked:A,groupWidth:g,group:S[G],timeAxisType:R.xAxis?.timeAxisType,colors:p,activeId:d,isLog:"log"===h?.scale,orientation:f,getDataItem:w,isSelectionEnabled:"none"!=v,isRtl:k,focusedItemInfo:a,hoveredItemInfo:I,getTextDimensions:l,defaultFontSize:c,getStackLabel:R.getStackLabel})))})})}e.BarChart=u}));
//# sourceMappingURL=BarChart-0ad4ca6d.js.map
