(window.webpackJsonp=window.webpackJsonp||[]).push([[163],{jRFH:function(e,t,r){"use strict";r.r(t),r.d(t,"CarouselScroller",(function(){return m})),r.d(t,"CarouselItems",(function(){return T}));r("kYxP");var i=r("ERkP"),o=r("8UdT"),n=r("fs1G"),a=r("b1wW"),s=r("IRWI"),c=r("Irs7"),l=r("aITJ"),d=r("MWbm"),h=r("uavX"),u=r("rHpw");const m=i.forwardRef(({assumedItemHeight:e=T.Tile.childHeight,anchoring:t=s.a,identityFunction:r,items:o,minimumOffscreenToViewportRatio:l=0,nearEndProximityRatio:u=0,nearStartProximityRatio:m=0,noItemsRenderer:S=p,preferredOffscreenToViewportRatio:y=0,onAtEnd:R=n.a,onAtStart:H=n.a,onNearEnd:E=n.a,onNearStart:I=n.a,onPositionRestored:k=n.a,renderer:v,scrollerDisplayType:x=a.a.Carousel},W)=>{const A=w(),C=g(o.length,x),O=Object(c.b)(),[P,j]=i.useState(0),F=i.useRef(0);i.useImperativeHandle(W,()=>({isAtTop:()=>0===P,scrollToTop:()=>{j(0)},adjustFocusBy:e=>{j(P+e)}}));const J=i.useCallback(e=>{P!==e&&(e>P?O.scribeAction("scroll_right"):e
{const e=[],t=e=>()=>J(e);for(let n=0,a=0;ni.createElement(i.Fragment,{key:r(e)},v(e))));e.push(c)}return F.current=e.length,e},[J,r,o,C,v]);if(!o.length)return S();const{childWidth:M,childHeight:N,slidesToShow:V}=f(o[0]);return i.createElement(d.a,{style:b.root},i.createElement(d.a,{style:{height:N*C*A}},i.createElement(h.a,{childWidth:M?M*A:void 0,currentSlide:P,onChange:J,showNavButtonsOnHover:!0,slidesToShow:V},L)))}),p=()=>null,T=Object.freeze({Tile:{childWidth:178,childHeight:168},Topic:{childHeight:50,slidesToShow:l.a.isMobileOS()?1.4:1.8},TwitterList:{childWidth:105,childHeight:105}}),w=()=>{const{theme:{scale:e,scales:t}}=u.a;return t[e]},f=e=>{switch(e.type){case o.b.TwitterList:return T.TwitterList;case o.b.Topic:return T.Topic;case o.b.Tile:default:return T.Tile}},g=(e,t)=>t===a.a.GridCarousel&&e>=8?e<12?2:3:1,b=u.a.create(e=>({root:{overflow:"hidden",marginStart:e.spaces.xxSmall,marginVertical:e.spaces.xxSmall}}));t.default=m}}]);
//# sourceMappingURL=https://ton.twitter.com/responsive-web-internal/sourcemaps/client-web/ondemand.CarouselScroller.44206ae5.js.map