pleroma/priv/static/packs/features/public_timeline-d6e6bc704f49ebf922be.js

2 lines
39 KiB
JavaScript
Raw Normal View History

2017-11-12 05:23:05 -08:00
webpackJsonp([4],{155:function(t,e,n){function i(t){o.EventEmitter.call(this),this.backoffStrategy_=t,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var o=n(92),r=n(93);n(32).inherits(i,o.EventEmitter),i.prototype.failAfter=function(t){r.checkArgument(t>0,"Expected a maximum number of retry greater than 0 but got %s.",t),this.maxNumberOfRetry_=t},i.prototype.backoff=function(t){r.checkState(-1===this.timeoutID_,"Backoff in progress."),this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",t),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,t))},i.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},i.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=i},156:function(t,e,n){function i(t){return void 0!==t&&null!==t}function o(t){if(t=t||{},i(t.initialDelay)&&t.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(i(t.maxDelay)&&t.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=t.initialDelay||100,this.maxDelay_=t.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(i(t.randomisationFactor)&&(t.randomisationFactor<0||t.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=t.randomisationFactor||0}n(92),n(32);o.prototype.getMaxDelay=function(){return this.maxDelay_},o.prototype.getInitialDelay=function(){return this.initialDelay_},o.prototype.next=function(){var t=this.next_(),e=1+Math.random()*this.randomisationFactor_;return Math.round(t*e)},o.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},o.prototype.reset=function(){this.reset_()},o.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=o},157:function(t,e,n){function i(t){r.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var o=n(32),r=n(156);o.inherits(i,r),i.prototype.next_=function(){var t=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=t,t},i.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=i},158:function(t,e,n){"use strict";var i=n(42),o=n.n(i),r=n(9),s=n(269),a=n(16),c=n(8),l=(n.n(c),n(96)),u=(n.n(l),n(18)),f=function(){return Object(l.createSelector)([function(t,e){var n=e.type;return t.getIn(["settings",n],Object(c.Map)())},function(t,e){var n=e.type;return t.getIn(["timelines",n,"items"],Object(c.List)())},function(t){return t.get("statuses")}],function(t,e,n){var i=t.getIn(["regex","body"],"").trim(),o=null;try{o=i&&new RegExp(i,"i")}catch(t){}return e.filter(function(e){var i=n.get(e),r=!0;if(!1===t.getIn(["shows","reblog"])&&(r=r&&null===i.get("reblog")),!1===t.getIn(["shows","reply"])&&(r=r&&(null===i.get("in_reply_to_id")||i.get("in_reply_to_account_id")===u.e)),r&&o&&i.get("account")!==u.e){var s=i.get("reblog")?n.getIn([i.get("reblog"),"search_index"]):i.get("search_index");r=!o.test(s)}return r})})},h=function(){var t=f();return function(e,n){var i=n.timelineId;return{statusIds:t(e,{type:i}),isLoading:e.getIn(["timelines",i,"isLoading"],!0),hasMore:!!e.getIn(["timelines",i,"next"])}}},p=function(t,e){var n=e.timelineId,i=e.loadMore;return{onScrollToBottom:o()(function(){t(Object(a.B)(n,!1)),i()},300,{leading:!0}),onScrollToTop:o()(function(){t(Object(a.B)(n,!0))},100),onScroll:o()(function(){t(Object(a.B)(n,!1))},100)}};e.a=Object(r.connect)(h,p)(s.a)},260:function(t,e,n){"use strict";n.d(e,"a",function(){return y});var i,o,r=n(2),s=n.n(r),a=n(1),c=n.n(a),l=n(3),u=n.n(l),f=n(4),h=n.n(
//# sourceMappingURL=public_timeline-d6e6bc704f49ebf922be.js.map