!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../deps/bluebird_fork"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,n,r,u,d,f,s=e("tslib").__importDefault(e("../deps/bluebird_fork"));function c(){var e;(u=void 0)===d&&(e=i,i=void 0,e())}Object.defineProperty(p.prototype,"cancellationToken",{get:function(){return o!==this?f=void 0===f?s.default.resolve():f:r=void 0===r?new s.default(function(e){return n=e}):r},enumerable:!0,configurable:!0}),p.prototype.start=function(e,t){o!==this&&"function"==typeof t&&(void 0!==o&&o.reset(),o=this,i=t,u=setTimeout(c,e))},p.prototype.reset=function(){o===this&&((o=i=void 0)!==u&&(clearTimeout(u),u=void 0),void 0!==d&&(clearTimeout(d),d=void 0),void 0!==n&&(n(),r=n=void 0))},p.prototype.resume=function(e){o===this&&(void 0!==i&&("function"==typeof e&&(i=e),void 0===u&&(u=setTimeout(c))),void 0!==d&&(clearTimeout(d),d=void 0))},p.prototype.suspend=function(){var e=this;o===this&&void 0===d&&(d=setTimeout(function(){return e.reset()}))},e=p;function p(){}t.ExclusiveTimer=e});