(window.webpackJsonp=window.webpackJsonp||[]).push([[251],{Dfuf:function(e,t,a){"use strict";var o=a("ERkP"),r=a.n(o),n=a("t62R"),i=a("IJsT"),c=a("WtWS"),l=a("I4+6"),s=a("cm6r"),d=a("rHpw"),p=a("MWbm");const u=d.a.create((e=>({base:{flexGrow:1,backgroundColor:e.colors.cellBackground,justifyContent:"space-between"},icon:{alignSelf:"flex-end",color:e.colors.white,marginRight:e.spaces.space12,paddingTop:e.spaces.space12,width:e.spaces.space20,height:e.spaces.space20},border:{flexGrow:1,borderColor:e.colors.borderColor,borderRadius:e.borderRadii.large,borderWidth:e.borderWidths.medium},containerClicked:{backgroundColor:e.colors.primary,borderColor:e.colors.primary,borderWidth:e.borderWidths.medium},containerUnclicked:{flexDirection:"column-reverse"},text:{alignSelf:"flex-start",bottom:0,marginBottom:e.spaces.space12,marginHorizontal:e.spaces.space12,position:"absolute"},mainContainer:{padding:0},wrapper:{padding:e.spaces.space4}})));t.a=({accessibilityLabel:e,isSelected:t,link:a,onClick:o,text:b})=>{const m=t?u.containerClicked:u.containerUnclicked,y=l.a.generate({backgroundColor:t?d.a.theme.colors.primary:"transparent",color:t?d.a.theme.colors.white:d.a.theme.colors.primary}),w=r.a.createElement(p.a,{style:u.base},r.a.createElement(s.a,{accessibilityLabel:e,interactiveStyles:y,style:[u.border,m]},t?r.a.createElement(c.a,{style:u.icon}):null,r.a.createElement(n.b,{color:t?"whiteOnColor":"text",numberOfLines:2,style:u.text,weight:"bold"},b)));return r.a.createElement(p.a,{style:u.wrapper},r.a.createElement(i.a,{accessibilityLabel:e,containerStyle:u.mainContainer,link:a,onClick:o,upper:w,withInteractiveStyling:!0}))}},IJsT:function(e,t,a){"use strict";var o=a("ERkP"),r=a.n(o),n=a("I4+6"),i=a("cm6r"),c=a("rHpw"),l=a("MWbm");const s=e=>{const{accessibilityLabel:t,containerStyle:a,isCompact:o,link:s,lower:p,onClick:u,stackLayoutLowerStyle:b,stackLayoutUpperStyle:m,upper:y,withInsetFocusRing:w,withInteractiveStyling:f}=e,g=n.a.generate({backgroundColor:c.a.theme.colors.transparent,color:c.a.theme.colors.primary,insetFocusRing:w}),h=r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{style:[d.defaultUpperContainerStyle,m,o&&{height:"auto"}]},y),p?r.a.createElement(l.a,{style:[d.defaultLowerContainerStyle,b]},p):null);return r.a.createElement(i.a,{accessibilityLabel:t,interactive:f,interactiveStyles:f?g:void 0,link:s,onClick:u,style:[d.root,a]},h)};s.defaultProps={withInsetFocusRing:!0,withInteractiveStyling:!1};const d=c.a.create((e=>({root:{padding:e.spaces.space12,borderRadius:e.borderRadii.large},defaultLowerContainerStyle:{marginTop:e.spaces.space12,justifyContent:"flex-end"},defaultUpperContainerStyle:{height:`calc(${e.spaces.space48}*2)`,overflow:"hidden",borderRadius:e.borderRadii.large}})));t.a=s},bXO0:function(e,t,a){"use strict";a.r(t);var o=a("ezF+"),r=a("VPAj"),n=a("Rp9C"),i=a("ERkP"),c=a.n(i),l=a("Zejx"),s=a("rxPX");const d=(e,t)=>{var a;if(t.entry.content.content.topicTile)return l.a.select(e,null==(a=t.entry.content.content)?void 0:a.topicTile.topicId)};var p=Object(s.a)().propsFromState((()=>({topic:d}))).withAnalytics(),u=a("97Jx"),b=a.n(u),m=a("0KEI");var y=Object(s.a)().propsFromActions((()=>({createLocalApiErrorHandler:Object(m.createLocalApiErrorHandlerWithContextFactory)("TOPIC_TILE_CONTEXT"),follow:l.a.follow,unfollow:l.a.unfollow}))).withAnalytics(),w=a("3XMw"),f=a.n(w),g=a("Tp1h"),h=a("Jkc4"),k=a("gwY8"),C=a("zF9o"),E=a("Dfuf"),v=a("gaoh");const R=f.a.je808a17,S=f.a.ge8f3043,I=f.a.aa576cbf;var L=y((e=>{const{analytics:t,createLocalApiErrorHandler:a,follow:o,isRecommended:r,style:n,topic:i,unfollow:l,url:s}=e,{following:d,id:p,name:u}=i,m=d?I({topicName:u}):S({topicName:u}),y=c.a.useRef(!1),w=(e,t,a)=>i.following?e(L(a)):e(f(t)),f=e=>r=>{o(i.id).catch(a()).then(e&&e(i.id)),t.scribeAction("follow")},L=e=>o=>{l(i.id).catch(a()).then(e&&e(i.id)),t.scribeAction("unfollow")},x=e=>{t.scribeAction("click")};return c.a.createElement(h.a,{customText:u,displayMode:g.a.topic},(e=>c.a.createElement(k.a.Consumer,null,(({onFollow:t,onInitialize:a,onUnfollow:o})=>{a&&!y.current&&(a(p,d),y.current=!0);const i=r?((e,t,a)=>({accessibilityLabel:m,onClick:w(e,t,a),text:u}))(e,t,o):(e=>{return{accessibilityLabel:R({topicName:u}),onClick:e(x),link:(null==s?void 0:s.url)||(t=p,`/i/topics/${t}`),text:u};var t})(e);return c.a.createElement(c.a.Fragment,null,n===C.a.DoubleStateDefault?c.a.createElement(E.a,b()({},i,{isSelected:d})):c.a.createElement(v.a,i))}))))})),x=a("Irs7");const T=({entry:e,feedbackItems:t,module:a,topic:o})=>{const r=Object(x.b)(),{functionalityType:n,style:i,url:l}=e.content.content.topicTile,s=n===C.b.Recommendation;return c.a.useEffect((()=>{r.scribe({action:"impression"})}),[]),o?c.a.createElement(L,{isRecommended:s,style:i,topic:o,url:l}):null};var F=p(c.a.memo(T));const O=o.b({component:F,shouldDisplayBorder:Object(r.a)(!1),isFocusable:Object(r.a)(!0),getScribeDataItem(e){const{topicId:t}=e.content.content.topicTile;return n.a.forTopic(t,e.itemMetadata.clientEventInfo)}}).getHandler();t.default=O},gaoh:function(e,t,a){"use strict";var o=a("ERkP"),r=a.n(o),n=a("t62R"),i=a("IJsT"),c=a("I4+6"),l=a("cm6r"),s=a("rHpw"),d=a("MWbm");const p=s.a.create((e=>({base:{flexGrow:1,backgroundColor:e.colors.primary,justifyContent:"center"},centerTile:{margin:e.spaces.space8},container:{padding:0,borderRadius:e.borderRadii.large},wrapper:{padding:e.spaces.space4,borderRadius:e.borderRadii.large}})));t.a=({accessibilityLabel:e,link:t,onClick:a,text:o})=>{const u=c.a.generate({backgroundColor:s.a.theme.colors.primary,color:s.a.theme.colors.white}),b=r.a.createElement(l.a,{accessibilityLabel:e,interactiveStyles:u,style:p.base},r.a.createElement(n.b,{align:"center",color:"whiteOnColor",numberOfLines:3,size:"headline2",style:p.centerTile,weight:"bold"},o));return r.a.createElement(d.a,{style:p.wrapper},r.a.createElement(i.a,{accessibilityLabel:e,containerStyle:p.container,link:t,onClick:a,upper:b,withInteractiveStyling:!0}))}},gwY8:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var o=a("ERkP");const r=a.n(o).a.createContext({onFollow:void 0,onInitialize:void 0,onUnfollow:void 0})}}]);
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/ondemand.VerticalGridItemHandler.5dea98b6.js.map