1 line
51 KiB
JSON
1 line
51 KiB
JSON
{"id":"Yoo8","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throttle.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/throttle.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/package.json","includedInParent":true,"mtime":1545395355370},{"name":"tslib","loc":{"line":2,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throttle.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/tslib/tslib.es6.js"},{"name":"../OuterSubscriber","loc":{"line":3,"column":32},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throttle.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/OuterSubscriber.js"},{"name":"../util/subscribeToResult","loc":{"line":4,"column":34},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/throttle.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/subscribeToResult.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.throttle=o,exports.defaultThrottleConfig=void 0;var t=i(require(\"tslib\")),e=require(\"../OuterSubscriber\"),r=require(\"../util/subscribeToResult\");function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};i.get||i.set?Object.defineProperty(e,r,i):e[r]=t[r]}return e.default=t,e}var n={leading:!0,trailing:!1};function o(t,e){return void 0===e&&(e=n),function(r){return r.lift(new s(t,e.leading,e.trailing))}}exports.defaultThrottleConfig=n;var s=function(){function t(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.durationSelector,this.leading,this.trailing))},t}(),l=function(e){function i(t,r,i,n){var o=e.call(this,t)||this;return o.destination=t,o.durationSelector=r,o._leading=i,o._trailing=n,o._hasValue=!1,o}return t.__extends(i,e),i.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},i.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},i.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=(0,r.subscribeToResult)(this,e))},i.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},i.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},i.prototype.notifyNext=function(t,e,r,i,n){this.throttlingDone()},i.prototype.notifyComplete=function(){this.throttlingDone()},i}(e.OuterSubscriber);","map":{"mappings":[{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":0}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":13}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":20}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":35}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":43}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":56}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":57}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":64}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":68}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":76}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":85}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":87}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":95}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":122}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":1,"column":124}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":1,"column":128}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":1,"column":130}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":1,"column":132}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":6,"column":0},"generated":{"line":1,"column":140}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":1,"column":150}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":1,"column":152}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":8,"column":0},"generated":{"line":1,"column":160}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":17,"column":0},"generated":{"line":1,"column":182}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":17,"column":0},"generated":{"line":1,"column":184}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":17,"column":0},"generated":{"line":1,"column":192}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":221}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":230}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":232}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":235}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":238}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":241}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":243}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":254}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":261}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":263}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":267}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":269}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":272}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":275}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":281}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":283}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":287}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":291}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":296}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":298}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":301}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":308}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":318}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":333}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":338}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":340}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":343}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":344}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":348}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":350}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":357}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":373}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":380}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":405}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":412}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":437}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":439}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":442}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":445}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":447}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":452}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":454}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":458}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":465}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":480}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":482}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":484}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":487}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":489}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":492}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":494}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":497}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":504}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":506}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":514}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":516}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":18,"column":2},"generated":{"line":1,"column":518}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":18,"column":9},"generated":{"line":1,"column":522}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":18,"column":15},"generated":{"line":1,"column":524}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":19,"column":2},"generated":{"line":1,"column":525}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":19,"column":10},"generated":{"line":1,"column":534}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":20,"column":2},"generated":{"line":1,"column":536}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":20,"column":2},"generated":{"line":1,"column":546}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":66,"column":28},"generated":{"line":1,"column":549}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":66,"column":28},"generated":{"line":1,"column":558}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":66,"column":28},"generated":{"line":1,"column":560}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":66,"column":28},"generated":{"line":1,"column":562}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":2},"generated":{"line":1,"column":565}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":67,"column":9},"generated":{"line":1,"column":577}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":67,"column":2},"generated":{"line":1,"column":581}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":68,"column":1},"generated":{"line":1,"column":585}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":68,"column":1},"generated":{"line":1,"column":587}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":2},"generated":{"line":1,"column":590}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":2},"generated":{"line":1,"column":599}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":22},"generated":{"line":1,"column":602}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":22},"generated":{"line":1,"column":609}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":71,"column":22},"generated":{"line":1,"column":611}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":22},"generated":{"line":1,"column":616}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":22},"generated":{"line":1,"column":620}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":622}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":624}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":626}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":634}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":636}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":648}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":656}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":678}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":29},"generated":{"line":1,"column":680}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":29},"generated":{"line":1,"column":684}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":38},"generated":{"line":1,"column":686}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":22},"generated":{"line":1,"column":697}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":22},"generated":{"line":1,"column":706}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":22},"generated":{"line":1,"column":708}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":710}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":73,"column":39},"generated":{"line":1,"column":712}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":74,"column":3},"generated":{"line":1,"column":715}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":74,"column":3},"generated":{"line":1,"column":720}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":74,"column":3},"generated":{"line":1,"column":737}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":76,"column":2},"generated":{"line":1,"column":739}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":76,"column":2},"generated":{"line":1,"column":744}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":76,"column":2},"generated":{"line":1,"column":752}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":77,"column":4},"generated":{"line":1,"column":754}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":77,"column":4},"generated":{"line":1,"column":759}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":77,"column":18},"generated":{"line":1,"column":768}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":88,"column":39},"generated":{"line":1,"column":770}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":0},"generated":{"line":1,"column":777}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":0},"generated":{"line":1,"column":779}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":789}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":794}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":803}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":805}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":808}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":815}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":817}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":827}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":831}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":833}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":835}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":840}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":857}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":862}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":870}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":81,"column":1},"generated":{"line":1,"column":875}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":88,"column":39},"generated":{"line":1,"column":887}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":72,"column":38},"generated":{"line":1,"column":889}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":4},"generated":{"line":1,"column":892}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":894}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":22},"generated":{"line":1,"column":903}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":22},"generated":{"line":1,"column":906}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":22},"generated":{"line":1,"column":915}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":38},"generated":{"line":1,"column":917}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":22},"generated":{"line":1,"column":919}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":83},"generated":{"line":1,"column":921}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":94,"column":83},"generated":{"line":1,"column":923}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":22},"generated":{"line":1,"column":926}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":22},"generated":{"line":1,"column":930}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":22},"generated":{"line":1,"column":932}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":22},"generated":{"line":1,"column":934}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":22},"generated":{"line":1,"column":939}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":39},"generated":{"line":1,"column":944}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":95,"column":39},"generated":{"line":1,"column":948}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":101,"column":9},"generated":{"line":1,"column":953}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":96,"column":22},"generated":{"line":1,"column":960}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":96,"column":22},"generated":{"line":1,"column":962}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":96,"column":22},"generated":{"line":1,"column":974}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":91,"column":10},"generated":{"line":1,"column":976}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":91,"column":10},"generated":{"line":1,"column":978}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":91,"column":28},"generated":{"line":1,"column":995}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":997}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":999}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1008}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":98,"column":3},"generated":{"line":1,"column":1010}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":98,"column":3},"generated":{"line":1,"column":1012}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":98,"column":3},"generated":{"line":1,"column":1022}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":100,"column":12},"generated":{"line":1,"column":1024}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":100,"column":12},"generated":{"line":1,"column":1026}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":100,"column":12},"generated":{"line":1,"column":1037}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":101,"column":9},"generated":{"line":1,"column":1039}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1041}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":93,"column":24},"generated":{"line":1,"column":1048}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":93,"column":24},"generated":{"line":1,"column":1050}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":93,"column":24},"generated":{"line":1,"column":1060}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":93,"column":50},"generated":{"line":1,"column":1062}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":104,"column":14},"generated":{"line":1,"column":1065}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":104,"column":14},"generated":{"line":1,"column":1067}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":104,"column":26},"generated":{"line":1,"column":1077}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":104,"column":26},"generated":{"line":1,"column":1083}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":104,"column":26},"generated":{"line":1,"column":1092}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":105,"column":6},"generated":{"line":1,"column":1095}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":105,"column":6},"generated":{"line":1,"column":1100}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":105,"column":15},"generated":{"line":1,"column":1111}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":106,"column":17},"generated":{"line":1,"column":1113}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":106,"column":17},"generated":{"line":1,"column":1118}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":106,"column":17},"generated":{"line":1,"column":1129}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":107,"column":7},"generated":{"line":1,"column":1131}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":107,"column":7},"generated":{"line":1,"column":1136}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":107,"column":13},"generated":{"line":1,"column":1149}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":107,"column":13},"generated":{"line":1,"column":1154}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":108,"column":13},"generated":{"line":1,"column":1163}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":108,"column":13},"generated":{"line":1,"column":1168}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":111,"column":3},"generated":{"line":1,"column":1175}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":111,"column":3},"generated":{"line":1,"column":1180}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":111,"column":3},"generated":{"line":1,"column":1189}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":116,"column":11},"generated":{"line":1,"column":1194}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":116,"column":11},"generated":{"line":1,"column":1196}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":116,"column":27},"generated":{"line":1,"column":1206}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":116,"column":28},"generated":{"line":1,"column":1211}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":6},"generated":{"line":1,"column":1222}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":11},"generated":{"line":1,"column":1226}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":11},"generated":{"line":1,"column":1228}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":32},"generated":{"line":1,"column":1233}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":32},"generated":{"line":1,"column":1243}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":11},"generated":{"line":1,"column":1245}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":117,"column":32},"generated":{"line":1,"column":1250}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":118,"column":5},"generated":{"line":1,"column":1261}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":119,"column":9},"generated":{"line":1,"column":1265}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":119,"column":9},"generated":{"line":1,"column":1270}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":119,"column":21},"generated":{"line":1,"column":1282}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":119,"column":27},"generated":{"line":1,"column":1287}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":120,"column":9},"generated":{"line":1,"column":1290}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":120,"column":9},"generated":{"line":1,"column":1295}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":120,"column":22},"generated":{"line":1,"column":1304}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":123,"column":10},"generated":{"line":1,"column":1308}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":123,"column":10},"generated":{"line":1,"column":1313}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":123,"column":10},"generated":{"line":1,"column":1324}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":124,"column":10},"generated":{"line":1,"column":1326}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":124,"column":10},"generated":{"line":1,"column":1331}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":124,"column":21},"generated":{"line":1,"column":1342}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":126,"column":15},"generated":{"line":1,"column":1348}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":126,"column":15},"generated":{"line":1,"column":1350}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":126,"column":20},"generated":{"line":1,"column":1360}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":126,"column":33},"generated":{"line":1,"column":1369}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":126,"column":33},"generated":{"line":1,"column":1378}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":127,"column":5},"generated":{"line":1,"column":1381}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":127,"column":5},"generated":{"line":1,"column":1385}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":127,"column":5},"generated":{"line":1,"column":1387}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":127,"column":5},"generated":{"line":1,"column":1392}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":127,"column":5},"generated":{"line":1,"column":1412}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":128,"column":3},"generated":{"line":1,"column":1415}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":10},"generated":{"line":1,"column":1418}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":10},"generated":{"line":1,"column":1423}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":10},"generated":{"line":1,"column":1427}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":10},"generated":{"line":1,"column":1432}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":10},"generated":{"line":1,"column":1444}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":2},"generated":{"line":1,"column":1446}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":2},"generated":{"line":1,"column":1448}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":2},"generated":{"line":1,"column":1467}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":130,"column":2},"generated":{"line":1,"column":1472}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":5},"generated":{"line":1,"column":1477}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":5},"generated":{"line":1,"column":1479}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":5},"generated":{"line":1,"column":1489}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":5},"generated":{"line":1,"column":1509}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":5},"generated":{"line":1,"column":1518}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":133,"column":6},"generated":{"line":1,"column":1521}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":134,"column":11},"generated":{"line":1,"column":1525}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":134,"column":11},"generated":{"line":1,"column":1532}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":134,"column":11},"generated":{"line":1,"column":1537}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":134,"column":34},"generated":{"line":1,"column":1554}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":136,"column":5},"generated":{"line":1,"column":1557}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":136,"column":5},"generated":{"line":1,"column":1563}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":139,"column":10},"generated":{"line":1,"column":1566}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":137,"column":3},"generated":{"line":1,"column":1573}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":137,"column":3},"generated":{"line":1,"column":1578}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":137,"column":3},"generated":{"line":1,"column":1590}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":137,"column":3},"generated":{"line":1,"column":1596}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":139,"column":10},"generated":{"line":1,"column":1599}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":142,"column":16},"generated":{"line":1,"column":1606}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":142,"column":17},"generated":{"line":1,"column":1608}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":142,"column":17},"generated":{"line":1,"column":1618}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":142,"column":31},"generated":{"line":1,"column":1633}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1644}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1648}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1650}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1655}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1666}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1668}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":143,"column":5},"generated":{"line":1,"column":1673}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":144,"column":8},"generated":{"line":1,"column":1683}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":146,"column":8},"generated":{"line":1,"column":1686}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":146,"column":19},"generated":{"line":1,"column":1688}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":148,"column":5},"generated":{"line":1,"column":1702}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":148,"column":5},"generated":{"line":1,"column":1707}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":148,"column":5},"generated":{"line":1,"column":1718}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":149,"column":3},"generated":{"line":1,"column":1723}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":151,"column":2},"generated":{"line":1,"column":1726}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":151,"column":2},"generated":{"line":1,"column":1731}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1739}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1741}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1751}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1762}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1771}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1773}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1775}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1777}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":157,"column":2},"generated":{"line":1,"column":1779}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":158,"column":9},"generated":{"line":1,"column":1782}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":158,"column":9},"generated":{"line":1,"column":1787}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":160,"column":0},"generated":{"line":1,"column":1805}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":160,"column":0},"generated":{"line":1,"column":1807}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":160,"column":1},"generated":{"line":1,"column":1817}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":160,"column":1},"generated":{"line":1,"column":1832}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":88,"column":39},"generated":{"line":1,"column":1843}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":88,"column":39},"generated":{"line":1,"column":1848}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1866}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1868}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1869}},{"source":"../../../src/internal/operators/throttle.ts","name":null,"original":{"line":97,"column":10},"generated":{"line":1,"column":1871}}],"sources":{"../../../src/internal/operators/throttle.ts":"import { Operator } from '../Operator';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\n\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n\nimport { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types';\n\nexport interface ThrottleConfig {\n leading?: boolean;\n trailing?: boolean;\n}\n\nexport const defaultThrottleConfig: ThrottleConfig = {\n leading: true,\n trailing: false\n};\n\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for a duration determined by another Observable, then repeats this\n * process.\n *\n * <span class=\"informal\">It's like {@link throttleTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * ![](throttle.png)\n *\n * `throttle` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled by calling the `durationSelector` function with the source value,\n * which returns the \"duration\" Observable. When the duration Observable emits a\n * value or completes, the timer is disabled, and this process repeats for the\n * next source value.\n *\n * ## Example\n * Emit clicks at a rate of at most one click per second\n * ```javascript\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(throttle(ev => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration for each source value, returned as an Observable or a Promise.\n * @param {Object} config a configuration object to define `leading` and `trailing` behavior. Defaults\n * to `{ leading: true, trailing: false }`.\n * @return {Observable<T>} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttle\n * @owner Observable\n */\nexport function throttle<T>(durationSelector: (value: T) => SubscribableOrPromise<any>,\n config: ThrottleConfig = defaultThrottleConfig): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) => source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing));\n}\n\nclass ThrottleOperator<T> implements Operator<T, T> {\n constructor(private durationSelector: (value: T) => SubscribableOrPromise<any>,\n private leading: boolean,\n private trailing: boolean) {\n }\n\n call(subscriber: Subscriber<T>, source: any): TeardownLogic {\n return source.subscribe(\n new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)\n );\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc\n * @ignore\n * @extends {Ignored}\n */\nclass ThrottleSubscriber<T, R> extends OuterSubscriber<T, R> {\n private _throttled: Subscription;\n private _sendValue: T;\n private _hasValue = false;\n\n constructor(protected destination: Subscriber<T>,\n private durationSelector: (value: T) => SubscribableOrPromise<number>,\n private _leading: boolean,\n private _trailing: boolean) {\n super(destination);\n }\n\n protected _next(value: T): void {\n this._hasValue = true;\n this._sendValue = value;\n\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n } else {\n this.throttle(value);\n }\n }\n }\n\n private send() {\n const { _hasValue, _sendValue } = this;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = null;\n }\n\n private throttle(value: T): void {\n const duration = this.tryDurationSelector(value);\n if (duration) {\n this.add(this._throttled = subscribeToResult(this, duration));\n }\n }\n\n private tryDurationSelector(value: T): SubscribableOrPromise<any> {\n try {\n return this.durationSelector(value);\n } catch (err) {\n this.destination.error(err);\n return null;\n }\n }\n\n private throttlingDone() {\n const { _throttled, _trailing } = this;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = null;\n\n if (_trailing) {\n this.send();\n }\n }\n\n notifyNext(outerValue: T, innerValue: R,\n outerIndex: number, innerIndex: number,\n innerSub: InnerSubscriber<T, R>): void {\n this.throttlingDone();\n }\n\n notifyComplete(): void {\n this.throttlingDone();\n }\n}\n"},"lineCount":null}},"hash":"8ee47c4df99aeda51ff67d20a24cbab7","cacheData":{"env":{}}} |