pleroma/priv/static/packs/features/account_timeline.js
lain 9d054d30bc Revert "Update Mastofe."
This reverts commit 726b131b0a.

Some things broke (threads).
2018-06-02 19:45:23 +02:00

2 lines
30 KiB
JavaScript

webpackJsonp([6],{149:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),h=n(0),f=n.n(h),g=n(6),v=(i=o=function(e){function t(){return c()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.visible;return s()("button",{className:"load-more",disabled:t||!n,style:{visibility:n?"visible":"hidden"},onClick:this.props.onClick},void 0,s()(g.b,{id:"status.load_more",defaultMessage:"Load more"}))},t}(f.a.PureComponent),o.defaultProps={visible:!0},i)},150:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o=n(2),i=n.n(o),a=n(1),s=n.n(a),r=n(3),c=n.n(r),l=n(4),u=n.n(l),d=n(0),p=n.n(d),h=n(10),f=n.n(h),g=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){o.props.onClick()},i=n,c()(o,i)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.type,o=e.active,a=e.columnHeaderId,s="";return t&&(s=i()("i",{className:"fa fa-fw fa-"+t+" column-header__icon"})),i()("h1",{className:f()("column-header",{active:o}),id:a||null},void 0,i()("button",{onClick:this.handleClick},void 0,s,n))},t}(p.a.PureComponent)},283:function(e,t,n){"use strict";function o(e){return function(t){t({type:a,account:e}),t(Object(i.d)("MUTE"))}}t.a=o;var i=(n(14),n(22),n(15),n(26)),a="MUTES_INIT_MODAL"},284:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o=n(2),i=n.n(o),a=n(1),s=n.n(a),r=n(3),c=n.n(r),l=n(4),u=n.n(l),d=n(34),p=n.n(d),h=n(0),f=n.n(h),g=n(150),v=n(91),m=n(35),b=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(r))),o.handleHeaderClick=function(){var e=o.node.querySelector(".scrollable");e&&(o._interruptScrollAnimation=Object(v.b)(e))},o.handleScroll=p()(function(){void 0!==o._interruptScrollAnimation&&o._interruptScrollAnimation()},200),o.setRef=function(e){o.node=e},i=n,c()(o,i)}return u()(t,e),t.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(v.b)(e))},t.prototype.render=function(){var e=this.props,t=e.heading,n=e.icon,o=e.children,a=e.active,s=e.hideHeadingOnMobile,r=t&&(!s||s&&!Object(m.b)(window.innerWidth)),c=r&&t.replace(/ /g,"-"),l=r&&i()(g.a,{icon:n,active:a,type:t,onClick:this.handleHeaderClick,columnHeaderId:c});return f.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":c,className:"column",onScroll:this.handleScroll},l,o)},t}(f.a.PureComponent)},285:function(e,t,n){"use strict";function o(e,t){return function(n){n({type:a,account:e,status:t}),n(Object(i.d)("REPORT"))}}t.a=o;var i=(n(14),n(26)),a="REPORT_INIT"},286:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(9)),r=n(152),c=n(67),l=n(18),u=n(68),d=n(22),p=n(92),h=n(283),f=n(285),g=n(26),v=n(6),m=n(12),b=(n(36),Object(v.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}})),M=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},y=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(l.T)(t,n))},onModalReblog:function(t){e(Object(u.l)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(u.n)(t)):n.shiftKey||!m.b?this.onModalReblog(t):e(Object(g.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(u.m)(t):Object(u.i)(t))},onDelete:function(t){e(m.e?Object(g.d)("CONFIRM",{message:n.formatMessage(b.deleteMessage),confirm:n.formatMessage(b.deleteConfirm),onConfirm:function(){return e(Object(p.f)(t.get("id")))}}):Object(p.f)(t.get("id")))},onDirect:function(t,n){e(Object(l.N)(t,n))},onMention:function(t,n){e(Object(l.R)(t,n))},onOpenMedia:function(t,n){e(Object(g.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(g.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(g.d)("CONFIRM",{message:i()(v.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(b.blockConfirm),onConfirm:function(){return e(Object(d.q)(t.get("id")))}}))},onReport:function(t){e(Object(f.a)(t.get("account"),t))},onMute:function(t){e(Object(h.a)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(p.k)(t.get("id")):Object(p.i)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(p.j)(t.get("id")):Object(p.h)(t.get("id")))}}};t.a=Object(v.g)(Object(s.connect)(M,y)(r.a))},287:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),h=n(0),f=n.n(h),g=n(6),v=n(5),m=n.n(v),b=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){return s()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,s()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),s()(g.b,{id:"column_back_button.label",defaultMessage:"Back"}))},t}(f.a.PureComponent),o.contextTypes={router:m.a.object},i)},288:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),h=n(94),f=n.n(h),g=n(0),v=n.n(g),m=n(151),b=n(5),M=n.n(b),y=n(289),_=n(149),k=n(294),O=n(8),w=(n.n(O),n(10)),I=n.n(w),j=n(153),C=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.state={lastMouseMove:null},o.intersectionObserverWrapper=new k.a,o.handleScroll=f()(function(){if(o.node){var e=o.node,t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight,a=n-t-i;o._oldScrollPosition=n-t,400>a&&o.props.onLoadMore&&!o.props.isLoading&&o.props.onLoadMore(),t<100&&o.props.onScrollToTop?o.props.onScrollToTop():o.props.onScroll&&o.props.onScroll()}},150,{trailing:!0}),o.handleMouseMove=f()(function(){o._lastMouseMove=new Date},300),o.handleMouseLeave=function(){o._lastMouseMove=null},o.onFullScreenChange=function(){o.setState({fullscreen:Object(j.d)()})},o.setRef=function(e){o.node=e},o.handleLoadMore=function(e){e.preventDefault(),o.props.onLoadMore()},i=n,u()(o,i)}return p()(t,e),t.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(j.a)(this.onFullScreenChange),this.handleScroll()},t.prototype.componentDidUpdate=function(e){if(v.a.Children.count(e.children)>0&&v.a.Children.count(e.children)<v.a.Children.count(this.props.children)&&this.getFirstChildKey(e)!==this.getFirstChildKey(this.props)&&this._oldScrollPosition&&this.node.scrollTop>0){var t=this.node.scrollHeight-this._oldScrollPosition;this.node.scrollTop!==t&&(this.node.scrollTop=t)}else this._oldScrollPosition=this.node.scrollHeight-this.node.scrollTop},t.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(j.b)(this.onFullScreenChange)},t.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},t.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},t.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},t.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},t.prototype.getFirstChildKey=function(e){var t=e.children,n=t;return t instanceof O.List?n=t.get(0):Array.isArray(t)&&(n=t[0]),n&&n.key},t.prototype._recentlyMoved=function(){return null!==this._lastMouseMove&&new Date-this._lastMouseMove<600},t.prototype.render=function(){var e=this,t=this.props,n=t.children,o=t.scrollKey,i=t.trackScroll,a=t.shouldUpdateScroll,r=t.isLoading,c=t.hasMore,l=t.prepend,u=t.emptyMessage,d=t.onLoadMore,p=this.state.fullscreen,h=v.a.Children.count(n),f=c&&h>0&&d?s()(_.a,{visible:!r,onClick:this.handleLoadMore}):null,g=null;return g=r||h>0||!u?v.a.createElement("div",{className:I()("scrollable",{fullscreen:p}),ref:this.setRef,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},s()("div",{role:"feed",className:"item-list"},void 0,l,v.a.Children.map(this.props.children,function(t,n){return s()(y.a,{id:t.key,index:n,listLength:h,intersectionObserverWrapper:e.intersectionObserverWrapper,saveHeightKey:i?e.context.router.route.location.key+":"+o:null},t.key,t)}),f)):v.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?s()(m.a,{scrollKey:o,shouldUpdateScroll:a},void 0,g):g},t}(g.PureComponent),o.contextTypes={router:M.a.object},o.defaultProps={trackScroll:!0},i)},289:function(e,t,n){"use strict";var o=n(9),i=n(290),a=n(95),s=function(e,t){return{cachedHeight:e.getIn(["height_cache",t.saveHeightKey,t.id])}},r=function(e){return{onHeightChange:function(t,n,o){e(Object(a.d)(t,n,o))}}};t.a=Object(o.connect)(s,r)(i.a)},290:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o=n(1),i=n.n(o),a=n(3),s=n.n(a),r=n(4),c=n.n(r),l=n(0),u=n.n(l),d=n(291),p=n(293),h=n(8),f=(n.n(h),["id","index","listLength"]),g=["id","index","listLength","cachedHeight"],v=function(e){function t(){var n,o,a;i()(this,t);for(var r=arguments.length,c=Array(r),l=0;l<r;l++)c[l]=arguments[l];return n=o=s()(this,e.call.apply(e,[this].concat(c))),o.state={isHidden:!1},o.handleIntersection=function(e){o.entry=e,Object(d.a)(o.calculateHeight),o.setState(o.updateStateAfterIntersection)},o.updateStateAfterIntersection=function(e){return e.isIntersecting&&!o.entry.isIntersecting&&Object(d.a)(o.hideIfNotIntersecting),{isIntersecting:o.entry.isIntersecting,isHidden:!1}},o.calculateHeight=function(){var e=o.props,t=e.onHeightChange,n=e.saveHeightKey,i=e.id;o.height=Object(p.a)(o.entry).height,t&&n&&t(n,i,o.height)},o.hideIfNotIntersecting=function(){o.componentMounted&&o.setState(function(e){return{isHidden:!e.isIntersecting}})},o.handleRef=function(e){o.node=e},a=n,s()(o,a)}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=this,o=!this.state.isIntersecting&&(this.state.isHidden||this.props.cachedHeight);return!!o!=!(t.isIntersecting||!t.isHidden&&!e.cachedHeight)||!(o?g:f).every(function(t){return Object(h.is)(e[t],n.props[t])})},t.prototype.componentDidMount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.observe(n,this.node,this.handleIntersection),this.componentMounted=!0},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.unobserve(n,this.node),this.componentMounted=!1},t.prototype.render=function(){var e=this.props,t=e.children,n=e.id,o=e.index,i=e.listLength,a=e.cachedHeight,s=this.state,r=s.isIntersecting,c=s.isHidden;return r||!c&&!a?u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!1})):u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,style:{height:(this.height||a)+"px",opacity:0,overflow:"hidden"},"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!0}))},t}(u.a.Component)},291:function(e,t,n){"use strict";function o(e){for(;r.length&&e.timeRemaining()>0;)r.shift()();r.length?requestIdleCallback(o):c=!1}function i(e){r.push(e),c||(c=!0,requestIdleCallback(o))}var a=n(292),s=n.n(a),r=new s.a,c=!1;t.a=i},292:function(e,t,n){"use strict";function o(){this.length=0}o.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},o.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},o.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],o=0,i=this.first;i&&!(--t<0);i=i.next)++o>e&&n.push(i.item);return n},e.exports=o},293:function(e,t,n){"use strict";function o(e){if("boolean"!=typeof i){var t=e.target.getBoundingClientRect(),n=e.boundingClientRect;i=t.height!==n.height||t.top!==n.top||t.width!==n.width||t.bottom!==n.bottom||t.left!==n.left||t.right!==n.right}return i?e.target.getBoundingClientRect():e.boundingClientRect}var i=void 0;t.a=o},294:function(e,t,n){"use strict";var o=n(1),i=n.n(o),a=function(){function e(){i()(this,e),this.callbacks={},this.observerBacklog=[],this.observer=null}return e.prototype.connect=function(e){var t=this,n=function(e){e.forEach(function(e){var n=e.target.getAttribute("data-id");t.callbacks[n]&&t.callbacks[n](e)})};this.observer=new IntersectionObserver(n,e),this.observerBacklog.forEach(function(e){var n=e[0],o=e[1],i=e[2];t.observe(n,o,i)}),this.observerBacklog=null},e.prototype.observe=function(e,t,n){this.observer?(this.callbacks[e]=n,this.observer.observe(t)):this.observerBacklog.push([e,t,n])},e.prototype.unobserve=function(e,t){this.observer&&(delete this.callbacks[e],this.observer.unobserve(t))},e.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},e}();t.a=a},295:function(e,t,n){"use strict";n.d(t,"a",function(){return H});var o,i,a,s,r=n(29),c=n.n(r),l=n(30),u=n.n(l),d=n(2),p=n.n(d),h=n(1),f=n.n(h),g=n(3),v=n.n(g),m=n(4),b=n.n(m),M=n(34),y=n.n(M),_=n(0),k=n.n(_),O=n(13),w=n.n(O),I=n(5),j=n.n(I),C=n(286),R=n(11),N=n.n(R),S=n(149),T=n(288),L=n(6),x=(i=o=function(e){function t(){var n,o,i;f()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=v()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(){o.props.onClick(o.props.maxId)},i=n,v()(o,i)}return b()(t,e),t.prototype.render=function(){return p()(S.a,{onClick:this.handleClick,disabled:this.props.disabled})},t}(N.a),o.propTypes={disabled:j.a.bool,maxId:j.a.string,onClick:j.a.func.isRequired},i),H=(s=a=function(e){function t(){var n,o,i;f()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=v()(this,e.call.apply(e,[this].concat(s))),o.handleMoveUp=function(e){var t=o.props.statusIds.indexOf(e)-1;o._selectChild(t)},o.handleMoveDown=function(e){var t=o.props.statusIds.indexOf(e)+1;o._selectChild(t)},o.handleLoadOlder=y()(function(){o.props.onLoadMore(o.props.statusIds.last())},300,{leading:!0}),o.setRef=function(e){o.node=e},i=n,v()(o,i)}return b()(t,e),t.prototype._selectChild=function(e){var t=this.node.node.querySelector("article:nth-of-type("+(e+1)+") .focusable");t&&t.focus()},t.prototype.render=function(){var e=this,t=this.props,n=t.statusIds,o=t.onLoadMore,i=u()(t,["statusIds","onLoadMore"]),a=i.isLoading;if(i.isPartial)return p()("div",{className:"regeneration-indicator"},void 0,p()("div",{},void 0,p()("div",{className:"regeneration-indicator__label"},void 0,p()(L.b,{id:"regeneration_indicator.label",tagName:"strong",defaultMessage:"Loading…"}),p()(L.b,{id:"regeneration_indicator.sublabel",defaultMessage:"Your home feed is being prepared!"}))));var s=a||n.size>0?n.map(function(t,i){return null===t?p()(x,{disabled:a,maxId:i>0?n.get(i-1):null,onClick:o},"gap:"+n.get(i+1)):p()(C.a,{id:t,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t)}):null;return k.a.createElement(T.a,c()({},i,{onLoadMore:o&&this.handleLoadOlder,ref:this.setRef}),s)},t}(N.a),a.propTypes={scrollKey:j.a.string.isRequired,statusIds:w.a.list.isRequired,onLoadMore:j.a.func,onScrollToTop:j.a.func,onScroll:j.a.func,trackScroll:j.a.bool,shouldUpdateScroll:j.a.func,isLoading:j.a.bool,isPartial:j.a.bool,hasMore:j.a.bool,prepend:j.a.node,emptyMessage:j.a.node},a.defaultProps={trackScroll:!0},s)},813:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return L});var o,i,a,s,r=n(2),c=n.n(r),l=n(1),u=n.n(l),d=n(3),p=n.n(d),h=n(4),f=n.n(h),g=n(0),v=(n.n(g),n(9)),m=n(13),b=n.n(m),M=n(5),y=n.n(M),_=n(22),k=n(19),O=n(295),w=n(297),I=n(284),j=n(844),C=n(287),R=n(8),N=(n.n(R),n(11)),S=n.n(N),T=function(e,t){var n=t.params.accountId,o=t.withReplies,i=void 0!==o&&o,a=i?n+":with_replies":n;return{statusIds:e.getIn(["timelines","account:"+a,"items"],Object(R.List)()),isLoading:e.getIn(["timelines","account:"+a,"isLoading"]),hasMore:e.getIn(["timelines","account:"+a,"hasMore"])}},L=(o=Object(v.connect)(T))((s=a=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=p()(this,e.call.apply(e,[this].concat(s))),o.handleLoadMore=function(e){o.props.dispatch(Object(k.l)(o.props.params.accountId,{maxId:e,withReplies:o.props.withReplies}))},i=n,p()(o,i)}return f()(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.params.accountId,n=e.withReplies;this.props.dispatch(Object(_.u)(t)),this.props.dispatch(Object(k.l)(t,{withReplies:n}))},t.prototype.componentWillReceiveProps=function(e){(e.params.accountId!==this.props.params.accountId&&e.params.accountId||e.withReplies!==this.props.withReplies)&&(this.props.dispatch(Object(_.u)(e.params.accountId)),this.props.dispatch(Object(k.l)(e.params.accountId,{withReplies:e.params.withReplies})))},t.prototype.render=function(){var e=this.props,t=e.statusIds,n=e.isLoading,o=e.hasMore;return!t&&n?c()(I.a,{},void 0,c()(w.a,{})):c()(I.a,{},void 0,c()(C.a,{}),c()(O.a,{prepend:c()(j.a,{accountId:this.props.params.accountId}),scrollKey:"account_timeline",statusIds:t,isLoading:n,hasMore:o,onLoadMore:this.handleLoadMore}))},t}(S.a),a.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,statusIds:b.a.list,isLoading:y.a.bool,hasMore:y.a.bool,withReplies:y.a.bool},i=s))||i},843:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(6)),r=function(){return i()("div",{className:"regeneration-indicator missing-indicator"},void 0,i()("div",{},void 0,i()("div",{className:"regeneration-indicator__label"},void 0,i()(s.b,{id:"missing_indicator.label",tagName:"strong",defaultMessage:"Not found"}),i()(s.b,{id:"missing_indicator.sublabel",defaultMessage:"This resource could not be found"}))))};t.a=r},844:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(9)),r=n(67),c=n(845),l=n(22),u=n(18),d=n(283),p=n(26),h=n(6),f=n(12),g=Object(h.f)({unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}}),v=function(){var e=Object(r.c)();return function(t,n){var o=n.accountId;return{account:e(t,o)}}},m=function(e,t){var n=t.intl;return{onFollow:function(t){e(t.getIn(["relationship","following"])||t.getIn(["relationship","requested"])?f.j?Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.unfollow.message",defaultMessage:"Are you sure you want to unfollow {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(g.unfollowConfirm),onConfirm:function(){return e(Object(l.D)(t.get("id")))}}):Object(l.D)(t.get("id")):Object(l.z)(t.get("id")))},onBlock:function(t){e(t.getIn(["relationship","blocking"])?Object(l.C)(t.get("id")):Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(g.blockConfirm),onConfirm:function(){return e(Object(l.q)(t.get("id")))}}))},onMention:function(t,n){e(Object(u.R)(t,n))},onDirect:function(t,n){e(Object(u.N)(t,n))},onReblogToggle:function(t){e(t.getIn(["relationship","showing_reblogs"])?Object(l.z)(t.get("id"),!1):Object(l.z)(t.get("id"),!0))},onMute:function(t){e(t.getIn(["relationship","muting"])?Object(l.E)(t.get("id")):Object(d.a)(t))}}};t.a=Object(h.g)(Object(s.connect)(v,m)(c.a))},845:function(e,t,n){"use strict";n.d(t,"a",function(){return j});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),h=n(0),f=(n.n(h),n(13)),g=n.n(f),v=n(5),m=n.n(v),b=n(846),M=n(847),y=n(843),_=n(11),k=n.n(_),O=n(848),w=n(6),I=n(45),j=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleFollow=function(){o.props.onFollow(o.props.account)},o.handleBlock=function(){o.props.onBlock(o.props.account)},o.handleMention=function(){o.props.onMention(o.props.account,o.context.router.history)},o.handleDirect=function(){o.props.onDirect(o.props.account,o.context.router.history)},o.handleReblogToggle=function(){o.props.onReblogToggle(o.props.account)},o.handleMute=function(){o.props.onMute(o.props.account)},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.hideTabs;return null===t?s()(y.a,{}):s()("div",{className:"account-timeline__header"},void 0,t.get("moved")&&s()(O.a,{from:t,to:t.get("moved")}),s()(b.a,{account:t,onFollow:this.handleFollow,onBlock:this.handleBlock}),s()(M.a,{account:t,onBlock:this.handleBlock,onMention:this.handleMention,onDirect:this.handleDirect,onReblogToggle:this.handleReblogToggle,onMute:this.handleMute}),!n&&s()("div",{className:"account__section-headline"},void 0,s()(I.c,{exact:!0,to:"/accounts/"+t.get("id")},void 0,s()(w.b,{id:"account.posts",defaultMessage:"Toots"})),s()(I.c,{exact:!0,to:"/accounts/"+t.get("id")+"/with_replies"},void 0,s()(w.b,{id:"account.posts_with_replies",defaultMessage:"Toots and replies"})),s()(I.c,{exact:!0,to:"/accounts/"+t.get("id")+"/media"},void 0,s()(w.b,{id:"account.media",defaultMessage:"Media"}))))},t}(k.a),o.propTypes={account:g.a.map,onFollow:m.a.func.isRequired,onBlock:m.a.func.isRequired,onMention:m.a.func.isRequired,onDirect:m.a.func.isRequired,onReblogToggle:m.a.func.isRequired,onMute:m.a.func.isRequired,hideTabs:m.a.bool},o.contextTypes={router:m.a.object},i)},846:function(e,t,n){"use strict";n.d(t,"a",function(){return T});var o,i,a,s,r,c=n(2),l=n.n(c),u=n(1),d=n.n(u),p=n(3),h=n.n(p),f=n(4),g=n.n(f),v=n(0),m=(n.n(v),n(13)),b=n.n(m),M=n(5),y=n.n(M),_=n(6),k=n(23),O=n(27),w=(n.n(O),n(11)),I=n.n(w),j=n(12),C=n(10),R=n.n(C),N=Object(_.f)({unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},follow:{id:"account.follow",defaultMessage:"Follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval. Click to cancel follow request"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"}}),S=(i=o=function(e){function t(){var n,o,i;d()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=h()(this,e.call.apply(e,[this].concat(s))),o.state={isHovered:!1},o.handleMouseOver=function(){o.state.isHovered||o.setState({isHovered:!0})},o.handleMouseOut=function(){o.state.isHovered&&o.setState({isHovered:!1})},i=n,h()(o,i)}return g()(t,e),t.prototype.render=function(){var e=this.props.account,t=this.state.isHovered;return l()("a",{href:e.get("url"),className:"account__header__avatar",role:"presentation",target:"_blank",rel:"noopener",style:{backgroundImage:"url("+(j.a||t?e.get("avatar"):e.get("avatar_static"))+")"},onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut,onFocus:this.handleMouseOver,onBlur:this.handleMouseOut},void 0,l()("span",{style:{display:"none"}},void 0,e.get("acct")))},t}(I.a),o.propTypes={account:b.a.map.isRequired},i),T=Object(_.g)((r=s=function(e){function t(){return d()(this,t),h()(this,e.apply(this,arguments))}return g()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl;if(!t)return null;var o="",i="",a="",s="";j.g!==t.get("id")&&t.getIn(["relationship","followed_by"])?o=l()("span",{className:"account--follows-info"},void 0,l()(_.b,{id:"account.follows_you",defaultMessage:"Follows you"})):j.g!==t.get("id")&&t.getIn(["relationship","blocking"])&&(o=l()("span",{className:"account--follows-info"},void 0,l()(_.b,{id:"account.blocked",defaultMessage:"Blocked"}))),j.g!==t.get("id")&&t.getIn(["relationship","muting"])?i=l()("span",{className:"account--muting-info"},void 0,l()(_.b,{id:"account.muted",defaultMessage:"Muted"})):j.g!==t.get("id")&&t.getIn(["relationship","domain_blocking"])&&(i=l()("span",{className:"account--muting-info"},void 0,l()(_.b,{id:"account.domain_blocked",defaultMessage:"Domain hidden"}))),j.g!==t.get("id")&&(t.getIn(["relationship","requested"])?a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,active:!0,icon:"hourglass",title:n.formatMessage(N.requested),onClick:this.props.onFollow})):t.getIn(["relationship","blocking"])?t.getIn(["relationship","blocking"])&&(a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,icon:"unlock-alt",title:n.formatMessage(N.unblock,{name:t.get("username")}),onClick:this.props.onBlock}))):a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,icon:t.getIn(["relationship","following"])?"user-times":"user-plus",active:t.getIn(["relationship","following"]),title:n.formatMessage(t.getIn(["relationship","following"])?N.unfollow:N.follow),onClick:this.props.onFollow}))),t.get("moved")&&!t.getIn(["relationship","following"])&&(a=""),t.get("locked")&&(s=l()("i",{className:"fa fa-lock"}));var r={__html:t.get("note_emojified")},c={__html:t.get("display_name_html")};return l()("div",{className:R()("account__header",{inactive:!!t.get("moved")}),style:{backgroundImage:"url("+t.get("header")+")"}},void 0,l()("div",{},void 0,l()(S,{account:t}),l()("span",{className:"account__header__display-name",dangerouslySetInnerHTML:c}),l()("span",{className:"account__header__username"},void 0,"@",t.get("acct")," ",s),l()("div",{className:"account__header__content",dangerouslySetInnerHTML:r}),o,i,a))},t}(I.a),s.propTypes={account:b.a.map,onFollow:y.a.func.isRequired,onBlock:y.a.func.isRequired,intl:y.a.object.isRequired},a=r))||a},847:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var o,i=n(2),a=n.n(i),s=n(1),r=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),p=n(0),h=n.n(p),f=n(300),g=n(45),v=n(6),m=n(12),b=Object(v.f)({mention:{id:"account.mention",defaultMessage:"Mention @{name}"},direct:{id:"account.direct",defaultMessage:"Direct message @{name}"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},block:{id:"account.block",defaultMessage:"Block @{name}"},follow:{id:"account.follow",defaultMessage:"Follow"},report:{id:"account.report",defaultMessage:"Report @{name}"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},hideReblogs:{id:"account.hide_reblogs",defaultMessage:"Hide boosts from @{name}"},showReblogs:{id:"account.show_reblogs",defaultMessage:"Show boosts from @{name}"}}),M=Object(v.g)(o=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=o=l()(this,e.call.apply(e,[this].concat(s))),o.handleShare=function(){navigator.share({url:o.props.account.get("url")})},i=n,l()(o,i)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl,o=[],i="";return o.push({text:n.formatMessage(b.mention,{name:t.get("username")}),action:this.props.onMention}),o.push({text:n.formatMessage(b.direct,{name:t.get("username")}),action:this.props.onDirect}),"share"in navigator&&o.push({text:n.formatMessage(b.share,{name:t.get("username")}),action:this.handleShare}),o.push(null),t.get("id")===m.g?o.push({text:n.formatMessage(b.edit_profile),href:"/settings/profile"}):(t.getIn(["relationship","following"])&&(t.getIn(["relationship","showing_reblogs"])?o.push({text:n.formatMessage(b.hideReblogs,{name:t.get("username")}),action:this.props.onReblogToggle}):o.push({text:n.formatMessage(b.showReblogs,{name:t.get("username")}),action:this.props.onReblogToggle})),t.getIn(["relationship","blocking"])?o.push({text:n.formatMessage(b.unblock,{name:t.get("username")}),action:this.props.onBlock}):o.push({text:n.formatMessage(b.block,{name:t.get("username")}),action:this.props.onBlock}),o.push({text:n.formatMessage(b.report,{name:t.get("username")}),action:this.props.onReport})),t.get("acct")!==t.get("username")&&(i=a()("div",{className:"account__disclaimer"},void 0,a()(v.b,{id:"account.disclaimer_full",defaultMessage:"Information below may reflect the user's profile incompletely."})," ",a()("a",{target:"_blank",rel:"noopener",href:t.get("url")},void 0,a()(v.b,{id:"account.view_full_profile",defaultMessage:"View full profile"}))),o.push(null)),a()("div",{},void 0,i,a()("div",{className:"account__action-bar"},void 0,a()("div",{className:"account__action-bar-dropdown"},void 0,a()(f.a,{items:o,icon:"bars",size:24,direction:"right"})),a()("div",{className:"account__action-bar-links"},void 0,a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")},void 0,a()("span",{},void 0,a()(v.b,{id:"account.posts",defaultMessage:"Toots"})),a()("strong",{},void 0,a()(v.c,{value:t.get("statuses_count")}))),a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/following"},void 0,a()("span",{},void 0,a()(v.b,{id:"account.follows",defaultMessage:"Follows"})),a()("strong",{},void 0,a()(v.c,{value:t.get("following_count")}))),a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/followers"},void 0,a()("span",{},void 0,a()(v.b,{id:"account.followers",defaultMessage:"Followers"})),a()("strong",{},void 0,a()(v.c,{value:t.get("followers_count")}))))))},t}(h.a.PureComponent))||o},848:function(e,t,n){"use strict";n.d(t,"a",function(){return O});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),h=n(0),f=(n.n(h),n(5)),g=n.n(f),v=n(13),m=n.n(v),b=n(6),M=n(11),y=n.n(M),_=n(302),k=n(56),O=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),o.context.router.history.push("/accounts/"+o.props.to.get("id"))),e.stopPropagation()},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.from,n=e.to,o={__html:t.get("display_name_html")};return s()("div",{className:"account__moved-note"},void 0,s()("div",{className:"account__moved-note__message"},void 0,s()("div",{className:"account__moved-note__icon-wrapper"},void 0,s()("i",{className:"fa fa-fw fa-suitcase account__moved-note__icon"})),s()(b.b,{id:"account.moved_to",defaultMessage:"{name} has moved to:",values:{name:s()("bdi",{},void 0,s()("strong",{dangerouslySetInnerHTML:o}))}})),s()("a",{href:n.get("url"),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,s()("div",{className:"detailed-status__display-avatar"},void 0,s()(_.a,{account:n,friend:t})),s()(k.a,{account:n})))},t}(y.a),o.contextTypes={router:g.a.object},o.propTypes={from:m.a.map.isRequired,to:m.a.map.isRequired},i)}});
//# sourceMappingURL=account_timeline.js.map