pleroma/priv/static/packs/application.js

2 lines
32 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[90],{373:function(t,e,o){"use strict";var n=function(){};t.exports=n},389:function(t,e,o){"use strict";o.r(e);var n=o(82),r=o(0),a=o.n(r),i=o(6),s=o.n(i),c=o(3),l=o.n(c),p=o(7),u=o.n(p),d=o(1),h=o.n(d),f=o(12),m=o(101),y=o(21),g=o(33);var v=o(373),b=o.n(v),w=o(2),S=o.n(w),T=o(54),k=o(43),O=o.n(k),C=o(24),E=o.n(C),_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t};function U(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var x=function(t){function e(){var o,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),i=0;i<r;i++)a[i]=arguments[i];return o=n=U(this,t.call.apply(t,[this].concat(a))),n.state={match:n.computeMatch(n.props.history.location.pathname)},U(n,o)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:_({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,o=e.children,n=e.history;E()(null==o||1===h.a.Children.count(o),"A <Router> may have only one child element"),this.unlisten=n.listen(function(){t.setState({match:t.computeMatch(n.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){O()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?h.a.Children.only(t):null},e}(h.a.Component);x.propTypes={history:S.a.object.isRequired,children:S.a.node},x.contextTypes={router:S.a.object},x.childContextTypes={router:S.a.object.isRequired};var j=x;function P(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var R=function(t){function e(){var o,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),i=0;i<r;i++)a[i]=arguments[i];return o=n=P(this,t.call.apply(t,[this].concat(a))),n.history=Object(T.createBrowserHistory)(n.props),P(n,o)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){b()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return h.a.createElement(j,{history:this.history,children:this.props.children})},e}(h.a.Component),M=o(811),N=o(123),L=o(38),H=o.n(L),D=o(14),I=o.n(D),q=o(118),A=o(4),W=o(145),G=o.n(W),B={},F=0,z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,o=B[e]||(B[e]={});if(o[t])return o[t];var n=G.a.compile(t);return F<1e4&&(o[t]=n,F++),n}(t)(e,{pretty:!0})},Y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t};var V=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){E()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=Object(T.createLocation)(t.to),o=Object(T.createLocation)(this.props.to);Object(T.locationsAreEqual)(e,o)?O()(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,o=t.to;return e?"string"==typeof o?z(o,e.params):Y({},o,{pathname:z(o.pathname,e.params)}):o},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,o=this.computeTo(this.props);e?t.push(o):t.replace(o)},e.prototype.render=function(){return null},e}(h.a.Component);V.propTypes={computedMatch:S.a.object,push:S.a.bool,from:S.a.string,to:S.a.oneOfType([S.a.string,S.a.object]).isRequired},V.defaultProps={push:!1},V.contextTypes={router:S.a.shape({history:S.a.shape({push:S.a.func.isRequired,replace:S.a.func.isRequired}).isRequired,staticContext:S.a.object}).isRequired};var J,K=V,X=o(812),Z=o(144),$=o(143),Q=o(813),tt=o(36),et=[a()(Q.a,{className:"tabs-bar__link primary",to:"/timelines/home","data-preview-title-id":"column.home","data-preview-icon":"home"},void 0,a()("i",{className:"fa fa-fw fa-home"}),a()(A.b,{id:"tabs_bar.home",defaultMessage:"Home"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/notifications","data-preview-title-id":"column.notifications","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-bell"}),a()(A.b,{id:"tabs_bar.notifications",defaultMessage:"Notifications"})),a()(Q.a,{className:"tabs-bar__link secondary",to:"/timelines/public/local","data-preview-title-id":"column.community","data-preview-icon":"users"},void 0,a()("i",{className:"fa fa-fw fa-users"}),a()(A.b,{id:"tabs_bar.local_timeline",defaultMessage:"Local"})),a()(Q.a,{className:"tabs-bar__link secondary",exact:!0,to:"/timelines/public","data-preview-title-id":"column.public","data-preview-icon":"globe"},void 0,a()("i",{className:"fa fa-fw fa-globe"}),a()(A.b,{id:"tabs_bar.federated_timeline",defaultMessage:"Federated"})),a()(Q.a,{className:"tabs-bar__link primary",to:"/search","data-preview-title-id":"tabs_bar.search","data-preview-icon":"bell"},void 0,a()("i",{className:"fa fa-fw fa-search"}),a()(A.b,{id:"tabs_bar.search",defaultMessage:"Search"})),a()(Q.a,{className:"tabs-bar__link primary",style:{flexGrow:"0",flexBasis:"30px"},to:"/getting-started","data-preview-title-id":"getting_started.heading","data-preview-icon":"bars"},void 0,a()("i",{className:"fa fa-fw fa-bars"}))];function ot(t){return et.findIndex(function(e){return e.props.to===t})}var nt=Object(A.g)(J=Object(X.a)(J=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return o=n=l()(this,t.call.apply(t,[this].concat(i))),n.setRef=function(t){n.node=t},n.handleClick=function(t){Object(tt.c)()&&(t.preventDefault(),t.persist(),requestAnimationFrame(function(){var e=Array.apply(void 0,n.node.querySelectorAll(".tabs-bar__link")),o=e.find(function(t){return t.classList.contains("active")}),r=e.find(function(e){return e.contains(t.target)}),a=et[Array.apply(void 0,n.node.childNodes).indexOf(r)].props.to;if(o!==r){o&&o.classList.remove("active");var i=H()(function(){r.removeEventListener("transitionend",i),n.props.history.push(a)},50);r.addEventListener("transitionend",i),r.classList.add("active")}}))},r=o,l()(n,r)}return u()(e,t),e.prototype.render=function(){var t=this,e=this.props.intl.formatMessage;return h.a.createElement("nav",{className:"tabs-bar",ref:this.setRef},et.map(function(o){return h.a.cloneElement(o,{key:o.props.to,onClick:t.handleClick,"aria-label":e({id:o.props["data-preview-title-id"]})})}))},e}(h.a.PureComponent))||J)||J,rt=o(99),at=o(11),it=o(19),st=o(46),ct=o(105),lt=o(84),pt=o(53),ut=o.n(pt),dt=o(34),ht=o.n(dt),ft=o(146);var mt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){E()(this.context.router,"You should not use <Switch> outside a <Router>")},e.prototype.componentWillReceiveProps=function(t){O()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),O()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,o=this.props.location||t.location,n=void 0,r=void 0;return h.a.Children.forEach(e,function(e){if(null==n&&h.a.isValidElement(e)){var a=e.props,i=a.path,s=a.exact,c=a.strict,l=a.sensitive,p=a.from,u=i||p;r=e,n=Object(ft.a)(o.pathname,{path:u,exact:s,strict:c,sensitive:l},t.match)}}),n?h.a.cloneElement(r,{location:o,computedMatch:n}):null},e}(h.a.Component);mt.contextTypes={router:S.a.shape({route:S.a.object.isRequired}).isRequired};var yt,gt,vt,bt,wt,St,Tt,kt,Ot,Ct,Et=mt,_t=o(62),Ut=o(60),xt=o(18),jt=(gt=yt=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.render=function(){var t=this.props,e=t.title,o=t.icon;return a()(_t.a,{},void 0,a()(Ut.a,{icon:o,title:e,multiColumn:!1,focusable:!1}),a()("div",{className:"scrollable"}))},e}(xt.a),yt.propTypes={title:S.a.oneOfType([S.a.node,S.a.string]),icon:S.a.string},yt.defaultProps={title:"",icon:""},gt),Pt=o(193),Rt=o(135),Mt=o(197),Nt=o(20),Lt=Object(A.f)({title:{id:"bundle_column_error.title",defaultMessage:"Network error"},body:{id:"bundle_column_error.body",defaultMessage:"Something went wrong while loading this component."},retry:{id:"bundle_column_error.retry",defaultMessage:"Try again"}}),Ht=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return o=n=l()(this,t.call.apply(t,[this].concat(i))),n.handleRetry=function(){n.props.onRetry()},r=o,l()(n,r)}return u()(e,t),e.prototype.render=function(){var t=this.props.intl.formatMessage;return a()(Pt.a,{},void 0,a()(Rt.a,{icon:"exclamation-circle",type:t(Lt.title)}),a()(Mt.a,{}),a()("div",{className:"error-column"},void 0,a()(Nt.a,{title:t(Lt.retry),icon:"refresh",onClick:this.handleRetry,size:64}),t(Lt.body)))},e}(h.a.PureComponent),Dt=Object(A.g)(Ht),It=o(98),qt=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.render=function(){var t=this.props,e=t.multiColumn,o=t.children;return a()(Et,{},void 0,h.a.Children.map(o,function(t){return h.a.cloneElement(t,{multiColumn:e})}))},e}(h.a.PureComponent),At=(bt=vt=function(t){function e(){var o,n,r;s()(this,e);for(var i=arguments.length,c=Array(i),p=0;p<i;p++)c[p]=arguments[p];return o=n=l()(this,t.call.apply(t,[this].concat(c))),n.renderComponent=function(t){var e=t.match,o=n.props,r=o.component,i=o.content,s=o.multiColumn,c=o.componentParams;return a()(It.a,{fetchComponent:r,loading:n.renderLoading,error:n.renderError},void 0,function(t){return h.a.createElement(t,ht()({params:e.params,multiColumn:s},c),i)})},n.renderLoading=function(){return a()(jt,{})},n.renderError=function(t){return h.a.createElement(Dt,t)},r=o,l()(n,r)}return u()(e,t),e.prototype.render=function(){var t=this.props,e=(t.component,t.content,ut()(t,["component","content"]));return h.a.createElement(M.a,ht()({},e,{render:this.renderComponent}))},e}(h.a.Component),vt.defaultProps={componentParams:{}},bt),Wt=o(25),Gt=o(22),Bt=o.n(Gt),Ft=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return o=n=l()(this,t.call.apply(t,[this].concat(i))),n.handleKeyUp=function(t){var e=t.keyCode;if(n.props.active)switch(e){case 27:t.preventDefault(),t.stopPropagation(),n.props.onClose()}},r=o,l()(n,r)}return u()(e,t),e.prototype.componentDidMount=function(){window.addEventListener("keyup",this.handleKeyUp,!1)},e.prototype.componentWillUnmount=function(){window.removeEventListener("keyup",this.handleKeyUp)},e.prototype.render=function(){var t=this.props.active;return a()(Wt.a,{defaultStyle:{backgroundOpacity:0,backgroundScale:.95},style:{backgroundOpacity:Bt()(t?1:0,{stiffness:150,damping:15}),backgroundScale:Bt()(t?1:.95,{stiffness:200,damping:3})}},void 0,function(e){var o=e.backgroundOpacity,n=e.backgroundScale;return a()("div",{className:"upload-area",style:{visibility:t?"visible":"hidden",opacity:o}},void 0,a()("div",{className:"upload-area__drop"},void 0,a()("div",{className:"upload-area__background",style:{transform:"scale("+n+")"}}),a()("div",{className:"upload-area__content"},void 0,a()(A.b,{id:"upload_area.title",defaultMessage:"Drag & drop to upload"}))))})},e}(h.a.PureComponent),zt=o(17),Yt=o.n(zt),Vt=o(136),Jt=o.n(Vt),Kt=o(810),Xt=function(){return a()("div",{className:"drawer"},void 0,a()("div",{className:"drawer__pager"},void 0,a()("div",{className:"drawer__inner"})))},Zt=o(16),$t=o(41),Qt=o.n($t),te=o(83),ee={COMPOSE:Zt.e,HOME:Zt.r,NOTIFICATIONS:Zt.z,PUBLIC:Zt.C,COMMUNITY:Zt.d,HASHTAG:Zt.q,DIRECT:Zt.f,FAVOURITES:Zt.j,LIST:Zt.u},oe=Object(A.f)({publish:{id:"compose_form.publish",defaultMessage:"Toot"}}),ne=function(t){return Object(A.g)(t,{withRef:!0})}((Tt=St=function(t){function e(){var o,n,r;s()(this,e);for(var i=arguments.length,c=Array(i),p=0;p<i;p++)c[p]=arguments[p];return o=n=l()(this,t.call.apply(t,[this].concat(c))),n.state={shouldAnimate:!1},n.handleSwipe=function(t){n.pendingIndex=t;var e='.tabs-bar__link[data-preview-title-id="'+et[t].props["data-preview-title-id"]+'"]';document.querySelector(".tabs-bar__link.active").classList.remove("active"),document.querySelector(e).classList.add("active")},n.handleAnimationEnd=function(){var t;"number"==typeof n.pendingIndex&&(n.context.router.history.push((t=n.pendingIndex,et[t].props.to)),n.pendingIndex=null)},n.handleWheel=function(){"function"==typeof n._interruptScrollAnimation&&n._interruptScrollAnimation()},n.setRef=function(t){n.node=t},n.renderView=function(t,e){var o=ot(n.context.router.history.location.pathname),r=n.props.intl.formatMessage({id:t.props["data-preview-title-id"]}),i=t.props["data-preview-icon"],s=e===o?h.a.cloneElement(n.props.children):a()(jt,{title:r,icon:i});return a()("div",{className:"columns-area"},e,s)},n.renderLoading=function(t){return function(){return"COMPOSE"===t?a()(Xt,{}):a()(jt,{})}},n.renderError=function(t){return h.a.createElement(Dt,t)},r=o,l()(n,r)}return u()(e,t),e.prototype.componentWillReceiveProps=function(){this.setState({shouldAnimate:!1})},e.prototype.componentDidMount=function(){this.props.singleColumn||this.node.addEventListener("wheel",this.handleWheel,!!Qt.a.hasSupport&&{passive:!0}),this.lastIndex=ot(this.context.router.history.location.pathname),this.isRtlLayout=document.getElementsByTagName("body")[0].classList.contains("rtl"),this.setState({shouldAnimate:!0})},e.prototype.componentWillUpdate=function(t){this.props.singleColumn!==t.singleColumn&&t.singleColumn&&this.node.removeEventListener("wheel",this.handleWheel)},e.prototype.componentDidUpdate=function(t){this.props.singleColumn===t.singleColumn||this.props.singleColumn||this.node.addEventListener("wheel",this.handleWheel,!!Qt.a.hasSupport&&{passive:!0}),this.lastIndex=ot(this.context.router.history.location.pathname),this.setState({shouldAnimate:!0})},e.prototype.componentWillUnmount=function(){this.props.singleColumn||this.node.removeEventListener("wheel",this.handleWheel)},e.prototype.handleChildrenContentChange=function(){if(!this.props.singleColumn){var t=this.isRtlLayout?-1:1;this._interruptScrollAnimation=Object(te.a)(this.node,(this.node.scrollWidth-window.innerWidth)*t)}},e.prototype.render=function(){var t=this,e=this.props,o=e.columns,n=e.children,r=e.singleColumn,i=e.isModalOpen,s=e.intl,c=this.state.shouldAnimate,l=ot(this.context.router.history.location.pathname);if(this.pendingIndex=null,r){var p=this.context.router.history.location.pathname.match(/^\/statuses\//)?null:a()(Kt.a,{to:"/statuses/new",className:"floating-action-button","aria-label":s.formatMessage(oe.publish)},"floating-action-button",a()("i",{className:"fa fa-pencil"}));return-1!==l?[a()(Jt.a,{index:l,onChangeIndex:this.handleSwipe,onTransitionEnd:this.handleAnimationEnd,animateTransitions:c,springConfig:{duration:"400ms",delay:"0s",easeFunction:"ease"},style:{height:"100%"}},"content",et.map(this.renderView)),p]:[a()("div",{className:"columns-area"},void 0,n),p]}return h.a.createElement("div",{className:"columns-area "+(i?"unscrollable":""),ref:this.setRef},o.map(function(e){var o=null===e.get("params",null)?null:e.get("params").toJS(),n=o&&o.other?o.other:{};return a()(It.a,{fetchComponent:ee[e.get("id")],loading:t.renderLoading(e.get("id")),error:t.renderError},e.get("uuid"),function(t){return h.a.createElement(t,ht()({columnId:e.get("uuid"),params:o,multiColumn:!0},n))})}),h.a.Children.map(n,function(t){return h.a.cloneElement(t,{multiColumn:!0})}))},e}(xt.a),St.contextTypes={router:S.a.object.isRequired},St.propTypes={intl:S.a.object.isRequired,columns:Yt.a.list.isRequired,isModalOpen:S.a.bool.isRequired,singleColumn:S.a.bool,children:S.a.node},wt=Tt))||wt,re=Object(f.connect)(function(t){return{columns:t.getIn(["settings","columns"]),isModalOpen:!!t.get("modal").modalType}},null,null,{withRef:!0})(ne),ae=o(10),ie=o(134),se=(o(157),Object(A.f)({beforeUnload:{id:"ui.beforeunload",defaultMessage:"Your draft will be lost if you leave Mastodon."}})),ce={help:"?",new:"n",search:"s",forceNew:"option+n",focusColumn:["1","2","3","4","5","6","7","8","9"],reply:"r",favourite:"f",boost:"b",mention:"m",open:["enter","o"],openProfile:"p",moveDown:["down","j"],moveUp:["up","k"],back:"backspace",goToHome:"g h",goToNotifications:"g n",goToLocal:"g l",goToFederated:"g t",goToDirect:"g d",goToStart:"g s",goToFavourites:"g f",goToPinned:"g p",goToProfile:"g u",goToBlocked:"g b",goToMuted:"g m",goToRequests:"g r",toggleHidden:"x"},le=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return o=n=l()(this,t.call.apply(t,[this].concat(i))),n.state={mobile:Object(tt.b)(window.innerWidth)},n.handleResize=H()(function(){n.props.onLayoutChange(),n.setState({mobile:Object(tt.b)(window.innerWidth)})},500,{trailing:!0}),n.setRef=function(t){n.node=t.getWrappedInstance().getWrappedInstance()},r=o,l()(n,r)}return u()(e,t),e.prototype.componentWillMount=function(){window.addEventListener("resize",this.handleResize,{passive:!0})},e.prototype.componentDidUpdate=function(t){[this.props.location.pathname,"/"].includes(t.location.pathname)||this.node.handleChildrenContentChange()},e.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize)},e.prototype.shouldUpdateScroll=function(t,e){return e.location.state!==ie.b},e.prototype.render=function(){var t=this.props.children,e=this.state.mobile,o=e?a()(K,{from:"/",to:"/timelines/home",exact:!0}):a()(K,{from:"/",to:"/getting-started",exact:!0});return h.a.createElement(re,{ref:this.setRef,singleColumn:e},a()(qt,{},void 0,o,a()(At,{path:"/getting-started",component:Zt.p,content:t}),a()(At,{path:"/keyboard-shortcuts",component:Zt.s,content:t}),a()(At,{path:"/timelines/home",component:Zt.r,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/timelines/public",exact:!0,component:Zt.C,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/timelines/public/media",component:Zt.C,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll,onlyMedia:!0}}),a()(At,{path:"/timelines/public/local",exact:!0,component:Zt.d,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/timelines/public/local/media",component:Zt.d,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll,onlyMedia:!0}}),a()(At,{path:"/timelines/direct",component:Zt.f,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/timelines/tag/:id",component:Zt.q,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/timelines/list/:id",component:Zt.u,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/notifications",component:Zt.z,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/favourites",component:Zt.j,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/pinned",component:Zt.B,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/search",component:Zt.e,content:t,componentParams:{isSearchPage:!0}}),a()(At,{path:"/statuses/new",component:Zt.e,content:t}),a()(At,{path:"/statuses/:statusId",exact:!0,component:Zt.F,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/statuses/:statusId/reblogs",component:Zt.D,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/statuses/:statusId/favourites",component:Zt.k,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/accounts/:accountId",exact:!0,component:Zt.b,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/accounts/:accountId/with_replies",component:Zt.b,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll,withReplies:!0}}),a()(At,{path:"/accounts/:accountId/followers",component:Zt.m,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/accounts/:accountId/following",component:Zt.n,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/accounts/:accountId/media",component:Zt.a,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/follow_requests",component:Zt.l,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/blocks",component:Zt.c,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/domain_blocks",component:Zt.g,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/mutes",component:Zt.y,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{path:"/lists",component:Zt.v,content:t,componentParams:{shouldUpdateScroll:this.shouldUpdateScroll}}),a()(At,{component:Zt.o,content:t})))},e}(h.a.PureComponent),pe=Object(f.connect)(function(t){return{isComposing:t.getIn(["compose","is_composing"]),hasComposingText:""!==t.getIn(["compose","text"]),dropdownMenuIsOpen:null!==t.getIn(["dropdown_menu","openId"])}})(kt=Object(A.g)(kt=Object(X.a)((Ct=Ot=function(t){function e(){var o,n,r;s()(this,e);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return o=n=l()(this,t.call.apply(t,[this].concat(i))),n.state={draggingOver:!1},n.handleBeforeUnload=function(t){var e=n.props,o=e.intl,r=e.isComposing,a=e.hasComposingText;r&&a&&(t.returnValue=o.formatMessage(se.beforeUnload))},n.handleLayoutChange=function(){n.props.dispatch(Object(lt.c)())},n.handleDragEnter=function(t){t.preventDefault(),n.dragTargets||(n.dragTargets=[]),-1===n.dragTargets.indexOf(t.target)&&n.dragTargets.push(t.target),t.dataTransfer&&Array.from(t.dataTransfer.types).includes("Files")&&n.setState({draggingOver:!0})},n.handleDragOver=function(t){t.preventDefault(),t.stopPropagation();try{t.dataTransfer.dropEffect="copy"}catch(t){}return!1},n.handleDrop=function(t){t.preventDefault(),n.setState({draggingOver:!1}),t.dataTransfer&&1===t.dataTransfer.files.length&&n.props.dispatch(Object(at.Z)(t.dataTransfer.files))},n.handleDragLeave=function(t){t.preventDefault(),t.stopPropagation(),n.dragTargets=n.dragTargets.filter(function(e){return e!==t.target&&n.node.contains(e)}),n.dragTargets.length>0||n.setState({draggingOver:!1})},n.closeUploadModal=function(){n.setState({draggingOver:!1})},n.handleServiceWorkerPostMessage=function(t){var e=t.data;"navigate"===e.type?n.context.router.history.push(e.path):console.warn("Unknown message type:",e.type)},n.setRef=function(t){n.node=t},n.handleHotkeyNew=function(t){t.preventDefault();var e=n.node.querySelector(".compose-form__autosuggest-wrapper textarea");e&&e.focus()},n.handleHotkeySearch=function(t){t.preventDefault();var e=n.node.querySelector(".search__input");e&&e.focus()},n.handleHotkeyForceNew=function(t){n.handleHotkeyNew(t),n.props.dispatch(Object(at.U)())},n.handleHotkeyFocusColumn=function(t){var e=1*t.key+1,o=n.node.querySelector(".column:nth-child("+e+")");if(o){var r=o.querySelector(".focusable");r&&r.focus()}},n.handleHotkeyBack=function(){window.history&&1===window.history.length?n.context.router.history.push("/"):n.context.router.history.goBack()},n.setHotkeysRef=function(t){n.hotkeys=t},n.handleHotkeyToggleHelp=function(){"/keyboard-shortcuts"===n.props.location.pathname?n.context.router.history.goBack():n.context.router.history.push("/keyboard-shortcuts")},n.handleHotkeyGoToHome=function(){n.context.router.history.push("/timelines/home")},n.handleHotkeyGoToNotifications=function(){n.context.router.history.push("/notifications")},n.handleHotkeyGoToLocal=function(){n.context.router.history.push("/timelines/public/local")},n.handleHotkeyGoToFederated=function(){n.context.router.history.push("/timelines/public")},n.handleHotkeyGoToDirect=function(){n.context.router.history.push("/timelines/direct")},n.handleHotkeyGoToStart=function(){n.context.router.history.push("/getting-started")},n.handleHotkeyGoToFavourites=function(){n.context.router.history.push("/favourites")},n.handleHotkeyGoToPinned=function(){n.context.router.history.push("/pinned")},n.handleHotkeyGoToProfile=function(){n.context.router.history.push("/accounts/"+ae.i)},n.handleHotkeyGoToBlocked=function(){n.context.router.history.push("/blocks")},n.handleHotkeyGoToMuted=function(){n.context.router.history.push("/mutes")},n.handleHotkeyGoToRequests=function(){n.context.router.history.push("/follow_requests")},r=o,l()(n,r)}return u()(e,t),e.prototype.componentWillMount=function(){var t=this;window.addEventListener("beforeunload",this.handleBeforeUnload,!1),document.addEventListener("dragenter",this.handleDragEnter,!1),document.addEventListener("dragover",this.handleDragOver,!1),document.addEventListener("drop",this.handleDrop,!1),document.addEventListener("dragleave",this.handleDragLeave,!1),document.addEventListener("dragend",this.handleDragEnd,!1),"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",this.handleServiceWorkerPostMessage),this.props.dispatch(Object(it.p)()),this.props.dispatch(Object(st.h)()),setTimeout(function(){return t.props.dispatch(Object(ct.b)())},500)},e.prototype.componentDidMount=function(){this.hotkeys.__mousetrap__.stopCallback=function(t,e){return["TEXTAREA","SELECT","INPUT"].includes(e.tagName)}},e.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragover",this.handleDragOver),document.removeEventListener("drop",this.handleDrop),document.removeEventListener("dragleave",this.handleDragLeave),document.removeEventListener("dragend",this.handleDragEnd)},e.prototype.render=function(){var t=this.state.draggingOver,e=this.props,o=e.children,n=e.isComposing,r=e.location,i=e.dropdownMenuIsOpen,s={help:this.handleHotkeyToggleHelp,new:this.handleHotkeyNew,search:this.handleHotkeySearch,forceNew:this.handleHotkeyForceNew,focusColumn:this.handleHotkeyFocusColumn,back:this.handleHotkeyBack,goToHome:this.handleHotkeyGoToHome,goToNotifications:this.handleHotkeyGoToNotifications,goToLocal:this.handleHotkeyGoToLocal,goToFederated:this.handleHotkeyGoToFederated,goToDirect:this.handleHotkeyGoToDirect,goToStart:this.handleHotkeyGoToStart,goToFavourites:this.handleHotkeyGoToFavourites,goToPinned:this.handleHotkeyGoToPinned,goToProfile:this.handleHotkeyGoToProfile,goToBlocked:this.handleHotkeyGoToBlocked,goToMuted:this.handleHotkeyGoToMuted,goToRequests:this.handleHotkeyGoToRequests};return h.a.createElement(q.HotKeys,{keyMap:ce,handlers:s,ref:this.setHotkeysRef},h.a.createElement("div",{className:I()("ui",{"is-composing":n}),ref:this.setRef,style:{pointerEvents:i?"none":null}},a()(nt,{}),a()(le,{location:r,onLayoutChange:this.handleLayoutChange},void 0,o),a()(Z.a,{}),a()($.a,{className:"loading-bar"}),a()(rt.a,{}),a()(Ft,{active:t,onClose:this.closeUploadModal})))},e}(h.a.PureComponent),Ot.contextTypes={router:S.a.object.isRequired},kt=Ct))||kt)||kt)||kt,ue=o(150),de=o(29),he=o(63),fe=o(8),me=Object(fe.getLocale)(),ye=me.localeData,ge=me.messages;Object(A.e)(ye);var ve=Object(m.a)(),be=Object(de.b)(ae.c);ve.dispatch(be),ve.dispatch(Object(ue.b)());var we=function(t){function e(){return s()(this,e),l()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.componentDidMount=function(){this.disconnect=ve.dispatch(Object(he.f)()),void 0!==window.Notification&&"default"===Notification.permission&&window.setTimeout(function(){return Notification.requestPermission()},6e4),ve.dispatch(function(t,e){e().getIn(["settings","onboarded"])||(t(Object(y.d)("ONBOARDING")),t(Object(g.c)(["onboarded"],!0)),t(Object(g.d)()))})},e.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},e.prototype.render=function(){var t=this.props.locale;return a()(A.d,{locale:t,messages:ge},void 0,a()(f.Provider,{store:ve},void 0,a()(R,{basename:"/web"},void 0,a()(N.b,{},void 0,a()(M.a,{path:"/",component:pe})))))},e}(h.a.PureComponent),Se=o(28),Te=o.n(Se),ke=o(80),Oe=o(454);e.default=function(){if(Oe.start("main()"),window.history&&history.replaceState){var t=window.location,e=t.pathname+t.search+t.hash;/^\/web($|\/)/.test(e)||history.replaceState(null,document.title,"/web"+e)}Object(ke.default)(function(){var t=document.getElementById("mastodon"),e=JSON.parse(t.getAttribute("data-props"));Te.a.render(h.a.createElement(we,e),t),o(453).install(),ve.dispatch(n.f()),Oe.stop("main()")})}},453:function(t,e){function o(){return"serviceWorker"in navigator&&("https:"===window.location.protocol||"localhost"===window.location.hostname||0===window.location.hostname.indexOf("127."))}e.install=function(t){t||(t={}),o()&&navigator.serviceWorker.register("/sw.js",{})},e.applyUpdate=function(t,e){},e.update=function(){o()&&navigator.serviceWorker.getRegistration().then(function(t){if(t)return t.update()})}},454:function(t,e,o){"use strict";o.r(e),o.d(e,"start",function(){return n}),o.d(e,"stop",function(){return r});function n(t){0}function r(t){0}},457:function(t,e,o){"use strict";o.r(e);var n=o(67),r=o(66);Object(r.a)(),Object(n.a)().then(function(){o(389).default()}).catch(function(t){console.error(t)})}},[[457,0]]]);
//# sourceMappingURL=application.js.map