(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{1101:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return U}));var o,a,c=s(0),n=s(29),i=s.n(n),d=s(1),r=s.n(d),u=s(12),l=s(3),p=s.n(l),b=s(16),h=s.n(b),m=s(371),g=s(19),I=s(4),j=s(959),O=s(1292),f=s(1343),w=s(1346),M=s(18),_=s(1310),L=s(1295),y=s(1371),C=s(1372),k=s(143);const A=e=>{let{url:t}=e;return Object(c.a)(y.a,{url:t,resource:Object(c.a)(I.b,{id:"timeline_hint.resources.followers",defaultMessage:"Followers"})})};let U=Object(u.connect)(((e,t)=>{let{params:{acct:s,id:o}}=t;const a=o||e.getIn(["accounts_map",s]);return a?{accountId:a,remote:!(e.getIn(["accounts",a,"acct"])===e.getIn(["accounts",a,"username"])),remoteUrl:e.getIn(["accounts",a,"url"]),isAccount:!!e.getIn(["accounts",a]),accountIds:e.getIn(["user_lists","followers",a,"items"]),hasMore:!!e.getIn(["user_lists","followers",a,"next"]),isLoading:e.getIn(["user_lists","followers",a,"isLoading"],!0),suspended:e.getIn(["accounts",a,"suspended"],!1),hidden:Object(k.b)(e,a)}:{isLoading:!0}}))(((a=class extends M.a{constructor(){super(...arguments),this.handleLoadMore=i()((()=>{this.props.dispatch(Object(g.U)(this.props.accountId))}),300,{leading:!0}),this.setRef=e=>{this.column=e},this.handleHeaderClick=()=>{this.column.scrollTop()}}_load(){const{accountId:e,isAccount:t,dispatch:s}=this.props;t||s(Object(g.W)(e)),s(Object(g.Y)(e))}componentDidMount(){const{params:{acct:e},accountId:t,dispatch:s}=this.props;t?this._load():s(Object(g.eb)(e))}componentDidUpdate(e){const{params:{acct:t},accountId:s,dispatch:o}=this.props;e.accountId!==s&&s?this._load():e.params.acct!==t&&o(Object(g.eb)(t))}render(){const{accountId:e,accountIds:t,hasMore:s,isAccount:o,multiColumn:a,isLoading:n,suspended:i,hidden:d,remote:u,remoteUrl:l}=this.props;if(!o)return Object(c.a)(O.a,{},void 0,Object(c.a)(_.a,{}));if(!t)return Object(c.a)(O.a,{},void 0,Object(c.a)(m.b,{}));let p;const b=i||d;p=i?Object(c.a)(I.b,{id:"empty_column.account_suspended",defaultMessage:"Account suspended"}):d?Object(c.a)(C.a,{accountId:e}):u&&t.isEmpty()?Object(c.a)(A,{url:l}):Object(c.a)(I.b,{id:"account.followers.empty",defaultMessage:"No one follows this user yet."});const h=u?Object(c.a)(A,{url:l}):null;return r.a.createElement(O.a,{ref:this.setRef},Object(c.a)(f.a,{onClick:this.handleHeaderClick,multiColumn:a}),Object(c.a)(L.a,{scrollKey:"followers",hasMore:!b&&s,isLoading:n,onLoadMore:this.handleLoadMore,prepend:Object(c.a)(w.a,{accountId:this.props.accountId,hideTabs:!0}),alwaysPrepend:!0,append:h,emptyMessage:p,bindToDocument:!a},void 0,t.map((e=>Object(c.a)(j.a,{id:e,withNote:!1},e)))))}}).propTypes={params:p.a.shape({acct:p.a.string,id:p.a.string}).isRequired,accountId:p.a.string,dispatch:p.a.func.isRequired,accountIds:h.a.list,hasMore:p.a.bool,isLoading:p.a.bool,isAccount:p.a.bool,suspended:p.a.bool,hidden:p.a.bool,remote:p.a.bool,remoteUrl:p.a.string,multiColumn:p.a.bool},o=a))||o}}]);
//# sourceMappingURL=followers-0df2a4d9194480586d07.chunk.js.map