forked from AkkomaGang/akkoma
2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
|
webpackJsonp([5],{155:function(t,e,n){function o(t){i.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 i=n(92),r=n(93);n(32).inherits(o,i.EventEmitter),o.prototype.failAfter=function(t){r.checkArgument(t>0,"Expected a maximum number of retry greater than 0 but got %s.",t),this.maxNumberOfRetry_=t},o.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))},o.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},o.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=o},156:function(t,e,n){function o(t){return void 0!==t&&null!==t}function i(t){if(t=t||{},o(t.initialDelay)&&t.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(o(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(o(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);i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var t=this.next_(),e=1+Math.random()*this.randomisationFactor_;return Math.round(t*e)},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=i},157:function(t,e,n){function o(t){r.call(this,t),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var i=n(32),r=n(156);i.inherits(o,r),o.prototype.next_=function(){var t=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=t,t},o.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=o},158:function(t,e,n){"use strict";var o=n(42),i=n.n(o),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 o=t.getIn(["regex","body"],"").trim(),i=null;try{i=o&&new RegExp(o,"i")}catch(t){}return e.filter(function(e){var o=n.get(e),r=!0;if(!1===t.getIn(["shows","reblog"])&&(r=r&&null===o.get("reblog")),!1===t.getIn(["shows","reply"])&&(r=r&&(null===o.get("in_reply_to_id")||o.get("in_reply_to_account_id")===u.e)),r&&i&&o.get("account")!==u.e){var s=o.get("reblog")?n.getIn([o.get("reblog"),"search_index"]):o.get("search_index");r=!i.test(s)}return r})})},h=function(){var t=f();return function(e,n){var o=n.timelineId;return{statusIds:t(e,{type:o}),isLoading:e.getIn(["timelines",o,"isLoading"],!0),hasMore:!!e.getIn(["timelines",o,"next"])}}},p=function(t,e){var n=e.timelineId,o=e.loadMore;return{onScrollToBottom:i()(function(){t(Object(a.B)(n,!1)),o()},300,{leading:!0}),onScrollToTop:i()(function(){t(Object(a.B)(n,!0))},100),onScroll:i()(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 g});var o,i,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=community_timeline-20bc8a94c08809c127d0.js.map
|