(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{760:function(e,t,a){"use strict";a.d(t,"a",(function(){return I}));var n=a(0),i=a(2),o=a(7),s=a(1),c=a(3),l=a.n(c),r=a(5),d=a.n(r),u=a(14),p=a.n(u),h=a(111),b=a(118),g=a(229),f=a(533),m=a(316),O=a(6),j=a(534),v=a(18),k=a(84),M=a(224),y=a(752),_=a(12),C=a.n(_),w=a(26),I=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),o=0;o0)if("audio"===e.getIn(["media_attachments",0,"type"])){var d=e.getIn(["media_attachments",0]);i=Object(n.a)(M.default,{src:d.get("url"),alt:d.get("description"),duration:d.getIn(["meta","original","duration"],0),height:110,preload:!0})}else if("video"===e.getIn(["media_attachments",0,"type"])){var u=e.getIn(["media_attachments",0]);i=Object(n.a)(k.default,{preview:u.get("preview_url"),blurhash:u.get("blurhash"),src:u.get("url"),alt:u.get("description"),width:300,height:150,inline:!0,onOpenVideo:this.handleOpenVideo,sensitive:e.get("sensitive"),visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility})}else i=Object(n.a)(f.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),height:300,onOpenMedia:this.props.onOpenMedia,visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility});else 0===e.get("spoiler_text").length&&(i=Object(n.a)(j.a,{onOpenMedia:this.props.onOpenMedia,card:e.get("card",null)}));return e.get("application")&&(o=Object(n.a)("span",{},void 0," · ",Object(n.a)("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blank",rel:"noopener noreferrer"},void 0,e.getIn(["application","name"])))),"direct"===e.get("visibility")?c="envelope":"private"===e.get("visibility")&&(c="lock"),s="private"===e.get("visibility")?Object(n.a)(w.a,{id:c}):this.context.router?Object(n.a)(m.a,{to:"/statuses/"+e.get("id")+"/reblogs",className:"detailed-status__link"},void 0,Object(n.a)(w.a,{id:c}),Object(n.a)("span",{className:"detailed-status__reblogs"},void 0,Object(n.a)(O.c,{value:e.get("reblogs_count")}))):Object(n.a)("a",{href:"/interact/"+e.get("id")+"?type=reblog",className:"detailed-status__link",onClick:this.handleModalLink},void 0,Object(n.a)(w.a,{id:c}),Object(n.a)("span",{className:"detailed-status__reblogs"},void 0,Object(n.a)(O.c,{value:e.get("reblogs_count")}))),r=this.context.router?Object(n.a)(m.a,{to:"/statuses/"+e.get("id")+"/favourites",className:"detailed-status__link"},void 0,Object(n.a)(w.a,{id:"star"}),Object(n.a)("span",{className:"detailed-status__favorites"},void 0,Object(n.a)(O.c,{value:e.get("favourites_count")}))):Object(n.a)("a",{href:"/interact/"+e.get("id")+"?type=favourite",className:"detailed-status__link",onClick:this.handleModalLink},void 0,Object(n.a)(w.a,{id:"star"}),Object(n.a)("span",{className:"detailed-status__favorites"},void 0,Object(n.a)(O.c,{value:e.get("favourites_count")}))),Object(n.a)("div",{style:t},void 0,l.a.createElement("div",{ref:this.setRef,className:C()("detailed-status",{compact:a})},Object(n.a)("a",{href:e.getIn(["account","url"]),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,Object(n.a)("div",{className:"detailed-status__display-avatar"},void 0,Object(n.a)(h.a,{account:e.get("account"),size:48})),Object(n.a)(b.a,{account:e.get("account"),localDomain:this.props.domain})),Object(n.a)(g.a,{status:e,expanded:!e.get("hidden"),onExpandedToggle:this.handleExpandedToggle}),i,Object(n.a)("div",{className:"detailed-status__meta"},void 0,Object(n.a)("a",{className:"detailed-status__datetime",href:e.get("url"),target:"_blank",rel:"noopener noreferrer"},void 0,Object(n.a)(O.a,{value:new Date(e.get("created_at")),hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})),o," · ",s," · ",r)))},t}(v.a);Object(s.a)(I,"contextTypes",{router:d.a.object}),Object(s.a)(I,"propTypes",{status:p.a.map,onOpenMedia:d.a.func.isRequired,onOpenVideo:d.a.func.isRequired,onToggleHidden:d.a.func.isRequired,measureHeight:d.a.bool,onHeightChange:d.a.func,domain:d.a.string.isRequired,compact:d.a.bool,showMedia:d.a.bool,onToggleMediaVisibility:d.a.func})},836:function(e,t,a){"use strict";a.r(t);var n,i,o,s,c,l,r,d=a(0),u=a(2),p=a(7),h=a(1),b=a(4),g=a.n(b),f=a(3),m=a.n(f),O=a(13),j=a(5),v=a.n(j),k=a(12),M=a.n(k),y=a(14),_=a.n(y),C=a(54),w=a(85),I=a(1030),x=a(760),D=a(50),R=a(710),H=a(6),T=a(20),U=Object(H.f)({delete:{id:"status.delete",defaultMessage:"Delete"},redraft:{id:"status.redraft",defaultMessage:"Delete & re-draft"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},reply:{id:"status.reply",defaultMessage:"Reply"},reblog:{id:"status.reblog",defaultMessage:"Boost"},reblog_private:{id:"status.reblog_private",defaultMessage:"Boost to original audience"},cancel_reblog_private:{id:"status.cancel_reblog_private",defaultMessage:"Unboost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be boosted"},favourite:{id:"status.favourite",defaultMessage:"Favourite"},bookmark:{id:"status.bookmark",defaultMessage:"Bookmark"},mute:{id:"status.mute",defaultMessage:"Mute @{name}"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"},block:{id:"status.block",defaultMessage:"Block @{name}"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},embed:{id:"status.embed",defaultMessage:"Embed"},admin_account:{id:"status.admin_account",defaultMessage:"Open moderation interface for @{name}"},admin_status:{id:"status.admin_status",defaultMessage:"Open this status in the moderation interface"},copy:{id:"status.copy",defaultMessage:"Copy link to status"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"}}),N=Object(O.connect)((function(e,t){var a=t.status;return{relationship:e.getIn(["relationships",a.getIn(["account","id"])])}}))(n=Object(H.g)((o=i=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),i=0;i0;){var o=i.shift(),s=t.get(o);e!==o&&n.push(o),s&&s.reverse().forEach((function(e){i.unshift(e)}))}var c=n.findIndex((function(e){return a.get(e).get("in_reply_to_account_id")!==a.get(e).get("account")}));return-1!==c&&n.forEach((function(e,t){t>c&&a.get(e).get("in_reply_to_account_id")===a.get(e).get("account")&&(n.splice(t,1),n.splice(c,0,e),c+=1)})),g.a.List(n)}));return function(n,i){var o=e(n,{id:i.params.statusId}),s=g.a.List(),c=g.a.List();return o&&(s=t(n,{id:o.get("in_reply_to_id")}),c=a(n,{id:o.get("id")})),{status:o,ancestorsIds:s,descendantsIds:c,askReplyConfirmation:0!==n.getIn(["compose","text"]).trim().length,domain:n.getIn(["meta","domain"])}}})),Object(H.g)(c=s((r=l=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),i=0;i0&&("audio"===a.getIn(["media_attachments",0,"type"])||("video"===a.getIn(["media_attachments",0,"type"])?t.handleOpenVideo(a.getIn(["media_attachments",0]),0):t.handleOpenMedia(a.get("media_attachments"),0)))})),Object(h.a)(Object(u.a)(t),"handleMuteClick",(function(e){t.props.dispatch(Object(F.g)(e))})),Object(h.a)(Object(u.a)(t),"handleConversationMuteClick",(function(e){e.get("muted")?t.props.dispatch(Object(w.n)(e.get("id"))):t.props.dispatch(Object(w.k)(e.get("id")))})),Object(h.a)(Object(u.a)(t),"handleToggleHidden",(function(e){e.get("hidden")?t.props.dispatch(Object(w.l)(e.get("id"))):t.props.dispatch(Object(w.j)(e.get("id")))})),Object(h.a)(Object(u.a)(t),"handleToggleAll",(function(){var e=t.props,a=e.status,n=e.ancestorsIds,i=e.descendantsIds,o=[a.get("id")].concat(n.toJS(),i.toJS());a.get("hidden")?t.props.dispatch(Object(w.l)(o)):t.props.dispatch(Object(w.j)(o))})),Object(h.a)(Object(u.a)(t),"handleBlockClick",(function(e){var a=t.props.dispatch,n=e.get("account");a(Object(z.f)(n))})),Object(h.a)(Object(u.a)(t),"handleReport",(function(e){t.props.dispatch(Object(P.k)(e.get("account"),e))})),Object(h.a)(Object(u.a)(t),"handleEmbed",(function(e){t.props.dispatch(Object(Y.d)("EMBED",{url:e.get("url")}))})),Object(h.a)(Object(u.a)(t),"handleUnmuteClick",(function(e){t.props.dispatch(Object(A.L)(e.get("id")))})),Object(h.a)(Object(u.a)(t),"handleUnblockClick",(function(e){t.props.dispatch(Object(A.J)(e.get("id")))})),Object(h.a)(Object(u.a)(t),"handleBlockDomainClick",(function(e){t.props.dispatch(Object(Y.d)("CONFIRM",{message:Object(d.a)(H.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",values:{domain:Object(d.a)("strong",{},void 0,e)}}),confirm:t.props.intl.formatMessage(ee.blockDomainConfirm),onConfirm:function(){return t.props.dispatch(Object(E.e)(e))}}))})),Object(h.a)(Object(u.a)(t),"handleUnblockDomainClick",(function(e){t.props.dispatch(Object(E.h)(e))})),Object(h.a)(Object(u.a)(t),"handleHotkeyMoveUp",(function(){t.handleMoveUp(t.props.status.get("id"))})),Object(h.a)(Object(u.a)(t),"handleHotkeyMoveDown",(function(){t.handleMoveDown(t.props.status.get("id"))})),Object(h.a)(Object(u.a)(t),"handleHotkeyReply",(function(e){e.preventDefault(),t.handleReplyClick(t.props.status)})),Object(h.a)(Object(u.a)(t),"handleHotkeyFavourite",(function(){t.handleFavouriteClick(t.props.status)})),Object(h.a)(Object(u.a)(t),"handleHotkeyBoost",(function(){t.handleReblogClick(t.props.status)})),Object(h.a)(Object(u.a)(t),"handleHotkeyMention",(function(e){e.preventDefault(),t.handleMentionClick(t.props.status.get("account"))})),Object(h.a)(Object(u.a)(t),"handleHotkeyOpenProfile",(function(){t.context.router.history.push("/accounts/"+t.props.status.getIn(["account","id"]))})),Object(h.a)(Object(u.a)(t),"handleHotkeyToggleHidden",(function(){t.handleToggleHidden(t.props.status)})),Object(h.a)(Object(u.a)(t),"handleHotkeyToggleSensitive",(function(){t.handleToggleMediaVisibility()})),Object(h.a)(Object(u.a)(t),"handleMoveUp",(function(e){var a=t.props,n=a.status,i=a.ancestorsIds,o=a.descendantsIds;if(e===n.get("id"))t._selectChild(i.size-1,!0);else{var s=i.indexOf(e);-1===s?(s=o.indexOf(e),t._selectChild(i.size+s,!0)):t._selectChild(s-1,!0)}})),Object(h.a)(Object(u.a)(t),"handleMoveDown",(function(e){var a=t.props,n=a.status,i=a.ancestorsIds,o=a.descendantsIds;if(e===n.get("id"))t._selectChild(i.size+1,!1);else{var s=i.indexOf(e);-1===s?(s=o.indexOf(e),t._selectChild(i.size+s+2,!1)):t._selectChild(s+1,!1)}})),Object(h.a)(Object(u.a)(t),"setRef",(function(e){t.node=e})),Object(h.a)(Object(u.a)(t),"onFullScreenChange",(function(){t.setState({fullscreen:Object(Q.d)()})})),t}Object(p.a)(t,e);var a=t.prototype;return a.componentWillMount=function(){this.props.dispatch(Object(w.i)(this.props.params.statusId))},a.componentDidMount=function(){Object(Q.a)(this.onFullScreenChange)},a.componentWillReceiveProps=function(e){e.params.statusId!==this.props.params.statusId&&e.params.statusId&&(this._scrolledIntoView=!1,this.props.dispatch(Object(w.i)(e.params.statusId))),e.status&&e.status.get("id")!==this.state.loadedStatusId&&this.setState({showMedia:Object(Z.b)(e.status),loadedStatusId:e.status.get("id")})},a._selectChild=function(e,t){var a=this.node,n=a.querySelectorAll(".focusable")[e];n&&(t&&a.scrollTop>n.offsetTop?n.scrollIntoView(!0):!t&&a.scrollTop+a.clientHeight0){var n=this.node.querySelectorAll(".focusable")[a.size-1];window.requestAnimationFrame((function(){n.scrollIntoView(!0)})),this._scrolledIntoView=!0}}},a.componentWillUnmount=function(){Object(Q.b)(this.onFullScreenChange)},a.render=function(){var e,t,a=this.props,n=a.shouldUpdateScroll,i=a.status,o=a.ancestorsIds,s=a.descendantsIds,c=a.intl,l=a.domain,r=a.multiColumn,u=this.state.fullscreen;if(null===i)return Object(d.a)(B.a,{},void 0,Object(d.a)(J.a,{multiColumn:r}),Object(d.a)(I.a,{}));o&&o.size>0&&(e=Object(d.a)("div",{},void 0,this.renderChildren(o))),s&&s.size>0&&(t=Object(d.a)("div",{},void 0,this.renderChildren(s)));var p={moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown,reply:this.handleHotkeyReply,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleHotkeyMention,openProfile:this.handleHotkeyOpenProfile,toggleHidden:this.handleHotkeyToggleHidden,toggleSensitive:this.handleHotkeyToggleSensitive,openMedia:this.handleHotkeyOpenMedia};return Object(d.a)(B.a,{bindToDocument:!r,label:c.formatMessage(ee.detailedStatus)},void 0,Object(d.a)(K.a,{showBackButton:!0,multiColumn:r,extraButton:Object(d.a)("button",{className:"column-header__button",title:c.formatMessage(i.get("hidden")?ee.revealAll:ee.hideAll),"aria-label":c.formatMessage(i.get("hidden")?ee.revealAll:ee.hideAll),onClick:this.handleToggleAll,"aria-pressed":i.get("hidden")?"false":"true"},void 0,Object(d.a)($.a,{id:i.get("hidden")?"eye-slash":"eye"}))}),Object(d.a)(L.a,{scrollKey:"thread",shouldUpdateScroll:n},void 0,m.a.createElement("div",{className:M()("scrollable",{fullscreen:u}),ref:this.setRef},e,Object(d.a)(G.HotKeys,{handlers:p},void 0,Object(d.a)("div",{className:M()("focusable","detailed-status__wrapper"),tabIndex:"0","aria-label":Object(Z.c)(c,i,!1)},void 0,Object(d.a)(x.a,{status:i,onOpenVideo:this.handleOpenVideo,onOpenMedia:this.handleOpenMedia,onToggleHidden:this.handleToggleHidden,domain:l,showMedia:this.state.showMedia,onToggleMediaVisibility:this.handleToggleMediaVisibility},"details-"+i.get("id")),Object(d.a)(N,{status:i,onReply:this.handleReplyClick,onFavourite:this.handleFavouriteClick,onReblog:this.handleReblogClick,onBookmark:this.handleBookmarkClick,onDelete:this.handleDeleteClick,onDirect:this.handleDirectClick,onMention:this.handleMentionClick,onMute:this.handleMuteClick,onUnmute:this.handleUnmuteClick,onMuteConversation:this.handleConversationMuteClick,onBlock:this.handleBlockClick,onUnblock:this.handleUnblockClick,onBlockDomain:this.handleBlockDomainClick,onUnblockDomain:this.handleUnblockDomainClick,onReport:this.handleReport,onPin:this.handlePin,onEmbed:this.handleEmbed},"action-bar-"+i.get("id")))),t)))},t}(X.a),Object(h.a)(l,"contextTypes",{router:v.a.object}),Object(h.a)(l,"propTypes",{params:v.a.object.isRequired,dispatch:v.a.func.isRequired,status:_.a.map,ancestorsIds:_.a.list,descendantsIds:_.a.list,intl:v.a.object.isRequired,askReplyConfirmation:v.a.bool,multiColumn:v.a.bool,domain:v.a.string.isRequired}),c=r))||c)||c)}}]);
//# sourceMappingURL=status.js.map