define(["exports"],function(_exports){function AbortSignalPolyfill(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0}),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,AbortSignalPolyfill.prototype.addEventListener=function(type,callback,options){type in this.listeners||(this.listeners[type]=[]),this.listeners[type].push({callback:callback,options:options})},AbortSignalPolyfill.prototype.removeEventListener=function(type,callback){if(type in this.listeners)for(var stack=this.listeners[type],i=0,l=stack.length;i<l;i++)if(stack[i].callback===callback)return void stack.splice(i,1)},AbortSignalPolyfill.prototype.toString=function(){return"[object AbortSignal]"},AbortSignalPolyfill.prototype.dispatchEvent=function(event){var _this=this;if("abort"===event.type&&(this.aborted=!0,"function"==typeof this.onabort)&&this.onabort.call(this,event),event.type in this.listeners){for(var stackToCall=this.listeners[event.type].slice(),i=0,l=stackToCall.length;i<l;i++){listener=void 0;var listener=stackToCall[i];try{listener.callback.call(_this,event)}catch(e){Promise.resolve().then(function(){throw e})}listener.options&&listener.options.once&&_this.removeEventListener(event.type,listener.callback)}return!event.defaultPrevented}};var isMissingRequestSignalSupport="function"==typeof globalThis.Request&&!Object.prototype.hasOwnProperty.call(globalThis.Request.prototype,"signal");"undefined"!=typeof AbortSignal&&!isMissingRequestSignalSupport||(console.log("assigning AbortSignal to globalThis"),Object.defineProperty(globalThis,"AbortSignal",{writable:!0,enumerable:!1,configurable:!0,value:AbortSignalPolyfill})),AbortSignal.timeout||(AbortSignal.timeout=function(duration){var controller=new AbortController;return setTimeout(function(){controller.abort()},duration),controller.signal}),AbortSignal.any||(AbortSignal.any=function(signals){for(var controller=new AbortController,i=0,length=signals.length;i<length;i++){var signal=signals[i];if(signal.aborted)return controller.abort(signal.reason),controller.signal}function abort(){controller.abort(this.reason)}for(var _i=0,_length=signals.length;_i<_length;_i++)signals[_i].addEventListener("abort",abort);return controller.signal}),AbortSignal.prototype.throwIfAborted||(AbortSignal.prototype.throwIfAborted=function(){var reason;if(this.aborted)throw(reason=this.reason)||((reason=new Error("Aborted")).name="AbortError"),reason}),console.log("done loading AbortSignalPolyfill"),_exports.default=AbortSignalPolyfill});