local function E(E,T,B,u)return function(...)local v,S,Z=runExecutor(E,T,...)if v then B(unpack(Z,1,S))else u(Z[1])end end end local function T(E)return next(E)==nil end local B={Error=Error;Status=makeEnum("\080\114\111\109\105\115\101\046\083\116\097\116\117\115",{"\083\116\097\114\116\101\100","\082\101\115\111\108\118\101\100";"\082\101\106\101\099\116\101\100","\067\097\110\099\101\108\108\101\100"}),_getTime=os.clock,_timeEvent=(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Heartbeat,_unhandledRejectionCallbacks={}}B.prototype={}B.__index=B.prototype

local function createAdvancer(traceback, callback, resolve, reject)
	return function(...)
		local ok, resultLength, result = runExecutor(traceback, callback, ...)

		if ok then
			resolve(unpack(result, 1, resultLength))
		else
			reject(result[1])
		end
	end
end

local function isEmpty(t)
	return next(t) == nil
end

local Promise = {
	Error = Error,
	Status = makeEnum("Promise.Status", {"Started", "Resolved", "Rejected", "Cancelled"}),
	_getTime = os.clock,
	_timeEvent = game:GetService("RunService").Heartbeat,
	_unhandledRejectionCallbacks = {},
}
Promise.prototype = {}
Promise.__index = Promise.prototype
