{"version":3,"file":"index.js","sources":["../index.js"],"sourcesContent":["/* eslint-disable unicorn/custom-error-definition, promise/always-return */\n/* global setImmediate:false, clearImmediate:false */\n\nconst symbolAsyncIterator =\n\tSymbol?.asyncIterator ?? Symbol?.iterator ?? '@@asyncIterator';\n\nclass ERR_INVALID_ARG_TYPE extends Error {\n\tconstructor(name, expected, actual) {\n\t\tsuper(`${name} must be ${expected}, ${typeof actual} given`);\n\t\tthis.code = 'ERR_INVALID_ARG_TYPE';\n\t}\n}\n\nclass AbortError extends Error {\n\tconstructor() {\n\t\tsuper('The operation was aborted');\n\t\tthis.code = 'ABORT_ERR';\n\t}\n}\n\nfunction validateObject(object, name) {\n\tif (object === null || typeof object !== 'object') {\n\t\tthrow new ERR_INVALID_ARG_TYPE(name, 'Object', object);\n\t}\n}\n\nfunction validateBoolean(value, name) {\n\tif (typeof value !== 'boolean') {\n\t\tthrow new ERR_INVALID_ARG_TYPE(name, 'boolean', value);\n\t}\n}\n\nfunction validateAbortSignal(signal, name) {\n\tif (\n\t\ttypeof signal !== 'undefined' &&\n\t\t(signal === null ||\n\t\t\ttypeof signal !== 'object' ||\n\t\t\t!('aborted' in signal))\n\t) {\n\t\tthrow new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal);\n\t}\n}\n\nfunction asyncIterator({ next: nextFunction, return: returnFunction }) {\n\tconst result = {};\n\tif (typeof nextFunction === 'function') {\n\t\tresult.next = nextFunction;\n\t}\n\tif (typeof returnFunction === 'function') {\n\t\tresult.return = returnFunction;\n\t}\n\tresult[symbolAsyncIterator] = function () {\n\t\treturn this;\n\t};\n\n\treturn result;\n}\n\nfunction setTimeoutPromise(after = 1, value, options = {}) {\n\tconst arguments_ = [].concat(value ?? []);\n\ttry {\n\t\tvalidateObject(options, 'options');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\tconst { signal, ref: reference = true } = options;\n\ttry {\n\t\tvalidateAbortSignal(signal, 'options.signal');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\ttry {\n\t\tvalidateBoolean(reference, 'options.ref');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\tif (signal?.aborted) {\n\t\treturn Promise.reject(new AbortError());\n\t}\n\tlet onCancel;\n\tconst returnValue = new Promise((resolve, reject) => {\n\t\tconst timeout = setTimeout(() => resolve(value), after, ...arguments_);\n\t\tif (!reference) {\n\t\t\ttimeout?.unref?.();\n\t\t}\n\t\tif (signal) {\n\t\t\tonCancel = () => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\treject(new AbortError());\n\t\t\t};\n\t\t\tsignal.addEventListener('abort', onCancel);\n\t\t}\n\t});\n\tif (typeof onCancel !== 'undefined') {\n\t\treturnValue.finally(() =>\n\t\t\tsignal.removeEventListener('abort', onCancel)\n\t\t);\n\t}\n\treturn returnValue;\n}\n\nfunction setImmediatePromise(value, options = {}) {\n\ttry {\n\t\tvalidateObject(options, 'options');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\tconst { signal, ref: reference = true } = options;\n\ttry {\n\t\tvalidateAbortSignal(signal, 'options.signal');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\ttry {\n\t\tvalidateBoolean(reference, 'options.ref');\n\t} catch (error) {\n\t\treturn Promise.reject(error);\n\t}\n\tif (signal?.aborted) {\n\t\treturn Promise.reject(new AbortError());\n\t}\n\tlet onCancel;\n\tconst returnValue = new Promise((resolve, reject) => {\n\t\tconst immediate = setImmediate(() => resolve(value));\n\t\tif (!reference) {\n\t\t\timmediate?.unref?.();\n\t\t}\n\t\tif (signal) {\n\t\t\tonCancel = () => {\n\t\t\t\tclearImmediate(immediate);\n\t\t\t\treject(new AbortError());\n\t\t\t};\n\t\t\tsignal.addEventListener('abort', onCancel);\n\t\t}\n\t});\n\tif (typeof onCancel !== 'undefined') {\n\t\treturnValue.finally(() =>\n\t\t\tsignal.removeEventListener('abort', onCancel)\n\t\t);\n\t}\n\treturn returnValue;\n}\n\nfunction setIntervalPromise(after = 1, value, options = {}) {\n\t/* eslint-disable no-undefined, no-unreachable-loop, no-loop-func */\n\ttry {\n\t\tvalidateObject(options, 'options');\n\t} catch (error) {\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t});\n\t}\n\tconst { signal, ref: reference = true } = options;\n\ttry {\n\t\tvalidateAbortSignal(signal, 'options.signal');\n\t} catch (error) {\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t});\n\t}\n\ttry {\n\t\tvalidateBoolean(reference, 'options.ref');\n\t} catch (error) {\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\treturn Promise.reject(error);\n\t\t\t}\n\t\t});\n\t}\n\tif (signal?.aborted) {\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\treturn Promise.reject(new AbortError());\n\t\t\t}\n\t\t});\n\t}\n\n\tlet onCancel, interval;\n\n\ttry {\n\t\tlet notYielded = 0;\n\t\tlet callback;\n\t\tinterval = setInterval(() => {\n\t\t\tnotYielded++;\n\t\t\tif (callback) {\n\t\t\t\tcallback();\n\t\t\t\tcallback = undefined;\n\t\t\t}\n\t\t}, after);\n\t\tif (!reference) {\n\t\t\tinterval?.unref?.();\n\t\t}\n\t\tif (signal) {\n\t\t\tonCancel = () => {\n\t\t\t\tclearInterval(interval);\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback();\n\t\t\t\t\tcallback = undefined;\n\t\t\t\t}\n\t\t\t};\n\t\t\tsignal.addEventListener('abort', onCancel);\n\t\t}\n\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\t\tif (!signal?.aborted) {\n\t\t\t\t\t\tif (notYielded === 0) {\n\t\t\t\t\t\t\tcallback = resolve;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (notYielded === 0) {\n\t\t\t\t\t\treject(new AbortError());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\n\t\t\t\t}).then(() => {\n\t\t\t\t\tif (notYielded > 0) {\n\t\t\t\t\t\tnotYielded = notYielded - 1;\n\t\t\t\t\t\treturn { done: false, value: value };\n\t\t\t\t\t}\n\t\t\t\t\treturn { done: true };\n\t\t\t\t});\n\t\t\t},\n\t\t\treturn: function () {\n\t\t\t\tclearInterval(interval);\n\t\t\t\tsignal?.removeEventListener('abort', onCancel);\n\t\t\t\treturn Promise.resolve({});\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\treturn asyncIterator({\n\t\t\tnext: function () {\n\t\t\t\tclearInterval(interval);\n\t\t\t\tsignal?.removeEventListener('abort', onCancel);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tsetTimeoutPromise as setTimeout,\n\tsetImmediatePromise as setImmediate,\n\tsetIntervalPromise as setInterval\n};\n"],"names":["symbolAsyncIterator","Symbol","asyncIterator","iterator","ERR_INVALID_ARG_TYPE","name","expected","actual","code","Error","AbortError","validateObject","object","validateBoolean","value","validateAbortSignal","signal","nextFunction","next","returnFunction","result","setTimeoutPromise","after","options","arguments_","concat","error","Promise","reject","ref","reference","aborted","onCancel","returnValue","resolve","timeout","setTimeout","unref","clearTimeout","addEventListener","removeEventListener","setImmediatePromise","immediate","setImmediate","clearImmediate","setIntervalPromise","interval","notYielded","callback","setInterval","undefined","clearInterval","then","done"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAEA,IAAMA,mBAAmB,oCACxBC,MADwB,oBACxBA,MAAM,CAAEC,aADgB,oCACCD,MADD,oBACCA,MAAM,CAAEE,QADT,mBACqB,iBAD9C;;IAGMC;;;AACL,gC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