return"\108\111\099\097\108 \112\114\111\109\105\115\101 \061 \114\101\113\117\105\114\101\040\037\115\041\n\n\101\120\112\111\114\116 \116\121\112\101 \080\114\111\109\105\115\101\083\116\097\116\117\115 \061 \"\083\116\097\114\116\101\100\" \124 \"\082\101\115\111\108\118\101\100\" \124 \"\082\101\106\101\099\116\101\100\" \124 \"\067\097\110\099\101\108\108\101\100\"\n\n\101\120\112\111\114\116 \116\121\112\101 \065\110\121\080\114\111\109\105\115\101 \061 \123\n\t\097\110\100\084\104\101\110\058 \040\n\t\t\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044\n\t\t\115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\046\046\046\097\110\121\041 -\062 \097\110\121\044\n\t\t\102\097\105\108\117\114\101\072\097\110\100\108\101\114\058 \040\040\097\110\121\041 -\062 \097\110\121\041\063\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\097\110\100\084\104\101\110\067\097\108\108\058 \060\084\046\046\046\062\040\n\t\t\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044\n\t\t\115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\084\046\046\046\041 -\062 \097\110\121\044\n\t\t\084\046\046\046\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\097\110\100\084\104\101\110\082\101\116\117\114\110\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044 \118\097\108\117\101\058 \097\110\121\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\097\119\097\105\116\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\041 -\062 \040\098\111\111\108\101\097\110\044 \046\046\046\097\110\121\041\044\n\t\097\119\097\105\116\083\116\097\116\117\115\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\041 -\062 \040\080\114\111\109\105\115\101\083\116\097\116\117\115\044 \046\046\046\097\110\121\041\044\n\t\099\097\110\099\101\108\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\041 -\062 \040\041\044\n\t\099\097\116\099\104\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044 \102\097\105\108\117\114\101\072\097\110\100\108\101\114\058 \040\046\046\046\097\110\121\041 -\062 \097\110\121\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\101\120\112\101\099\116\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\041 -\062 \046\046\046\097\110\121\044\n\t\102\105\110\097\108\108\121\058 \040\n\t\t\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044\n\t\t\099\097\108\108\098\097\099\107\058 \040\115\116\097\116\117\115\058 \080\114\111\109\105\115\101\083\116\097\116\117\115\041 -\062 \097\110\121\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\102\105\110\097\108\108\121\067\097\108\108\058 \060\084\046\046\046\062\040\n\t\t\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044\n\t\t\099\097\108\108\098\097\099\107\058 \040\084\046\046\046\041 -\062 \097\110\121\044\n\t\t\084\046\046\046\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\102\105\110\097\108\108\121\082\101\116\117\114\110\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044 \118\097\108\117\101\058 \097\110\121\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\103\101\116\083\116\097\116\117\115\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\041 -\062 \080\114\111\109\105\115\101\083\116\097\116\117\115\044\n\t\110\111\119\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044 \114\101\106\101\099\116\105\111\110\086\097\108\117\101\058 \117\110\107\110\111\119\110\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\116\097\112\058 \040\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044 \115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\046\046\046\097\110\121\041 -\062 \040\041\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\116\105\109\101\111\117\116\058 \040\n\t\t\115\101\108\102\058 \065\110\121\080\114\111\109\105\115\101\044\n\t\t\115\101\099\111\110\100\115\058 \110\117\109\098\101\114\044\n\t\t\114\101\106\101\099\116\105\111\110\086\097\108\117\101\058 \117\110\107\110\111\119\110\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\125\n\n\101\120\112\111\114\116 \116\121\112\101 \080\114\111\109\105\115\101\060\084 \061 \097\110\121\062 \061 \123\n\t\097\110\100\084\104\101\110\058 \040\n\t\t\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044\n\t\t\115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\084\041 -\062 \097\110\121\044\n\t\t\102\097\105\108\117\114\101\072\097\110\100\108\101\114\058 \040\040\046\046\046\097\110\121\041 -\062 \097\110\121\041\063\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\097\110\100\084\104\101\110\067\097\108\108\058 \060\085\046\046\046\062\040\n\t\t\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044\n\t\t\115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\085\046\046\046\041 -\062 \097\110\121\044\n\t\t\085\046\046\046\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\097\110\100\084\104\101\110\082\101\116\117\114\110\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044 \118\097\108\117\101\058 \097\110\121\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\097\119\097\105\116\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\041 -\062 \040\098\111\111\108\101\097\110\044 \084 \124 \117\110\107\110\111\119\110\041\044\n\t\097\119\097\105\116\083\116\097\116\117\115\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\041 -\062 \040\080\114\111\109\105\115\101\083\116\097\116\117\115\044 \084\041\044\n\t\099\097\110\099\101\108\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\041 -\062 \040\041\044\n\t\099\097\116\099\104\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044 \102\097\105\108\117\114\101\072\097\110\100\108\101\114\058 \040\097\110\121\041 -\062 \097\110\121\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\101\120\112\101\099\116\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\041 -\062 \084\044\n\t\102\105\110\097\108\108\121\058 \040\n\t\t\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044\n\t\t\099\097\108\108\098\097\099\107\058 \040\115\116\097\116\117\115\058 \080\114\111\109\105\115\101\083\116\097\116\117\115\041 -\062 \097\110\121\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\102\105\110\097\108\108\121\067\097\108\108\058 \060\085\046\046\046\062\040\n\t\t\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044\n\t\t\099\097\108\108\098\097\099\107\058 \040\085\046\046\046\041 -\062 \097\110\121\044\n\t\t\085\046\046\046\n\t\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\102\105\110\097\108\108\121\082\101\116\117\114\110\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044 \118\097\108\117\101\058 \097\110\121\041 -\062 \065\110\121\080\114\111\109\105\115\101\044\n\t\103\101\116\083\116\097\116\117\115\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\041 -\062 \080\114\111\109\105\115\101\083\116\097\116\117\115\044\n\t\110\111\119\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044 \114\101\106\101\099\116\105\111\110\086\097\108\117\101\058 \117\110\107\110\111\119\110\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\116\097\112\058 \040\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044 \115\117\099\099\101\115\115\072\097\110\100\108\101\114\058 \040\084\041 -\062 \040\041\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\116\105\109\101\111\117\116\058 \040\n\t\t\115\101\108\102\058 \080\114\111\109\105\115\101\060\084\062\044\n\t\t\115\101\099\111\110\100\115\058 \110\117\109\098\101\114\044\n\t\t\114\101\106\101\099\116\105\111\110\086\097\108\117\101\058 \117\110\107\110\111\119\110\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\125\n\n\101\120\112\111\114\116 \116\121\112\101 \080\114\111\109\105\115\101\083\116\097\116\105\099 \061 \123\n\t\083\116\097\116\117\115\058 \123\n\t\t\083\116\097\114\116\101\100\058 \"\083\116\097\114\116\101\100\"\044\n\t\t\082\101\115\111\108\118\101\100\058 \"\082\101\115\111\108\118\101\100\"\044\n\t\t\082\101\106\101\099\116\101\100\058 \"\082\101\106\101\099\116\101\100\"\044\n\t\t\067\097\110\099\101\108\108\101\100\058 \"\067\097\110\099\101\108\108\101\100\"\044\n\t\125\044\n\t\097\108\108\058 \060\084\062\040\112\114\111\109\105\115\101\115\058 \123 \080\114\111\109\105\115\101\060\084\062 \125\041 -\062 \080\114\111\109\105\115\101\060\123 \084 \125\062\044\n\t\097\108\108\083\101\116\116\108\101\100\058 \040\112\114\111\109\105\115\101\115\058 \123 \080\114\111\109\105\115\101\060\097\110\121\062 \125\041 -\062 \080\114\111\109\105\115\101\060\123 \080\114\111\109\105\115\101\083\116\097\116\117\115 \125\062\044\n\t\097\110\121\058 \060\084\062\040\112\114\111\109\105\115\101\115\058 \123 \080\114\111\109\105\115\101\060\084\062 \125\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\100\101\102\101\114\058 \060\084\062\040\n\t\t\114\101\115\111\108\118\101\114\058 \040\114\101\115\111\108\118\101\058 \040\084 \124 \080\114\111\109\105\115\101\060\084\062\041 -\062 \040\041\044 \114\101\106\101\099\116\058 \040\097\110\121\041 -\062 \040\041\041 -\062 \040\041\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\100\101\108\097\121\058 \040\115\101\099\111\110\100\115\058 \110\117\109\098\101\114\041 -\062 \080\114\111\109\105\115\101\060\110\117\109\098\101\114\062\044\n\t\101\097\099\104\058 \060\084\044 \085\062\040\n\t\t\108\105\115\116\058 \123 \084 \124 \080\114\111\109\105\115\101\060\084\062 \125\044\n\t\t\112\114\101\100\105\099\097\116\101\058 \040\084\044 \110\117\109\098\101\114\041 -\062 \040\085 \124 \080\114\111\109\105\115\101\060\085\062\041\n\t\041 -\062 \080\114\111\109\105\115\101\060\123 \085 \125\062\044\n\t\102\111\108\100\058 \060\084\044 \085\062\040\n\t\t\112\114\111\109\105\115\101\115\058 \123 \084 \124 \080\114\111\109\105\115\101\060\084\062 \125\044\n\t\t\114\101\100\117\099\101\114\058 \040\085\044 \084\044 \110\117\109\098\101\114\041 -\062 \040\085 \124 \080\114\111\109\105\115\101\060\085\062\041\044\n\t\t\105\110\105\116\105\097\108\086\097\108\117\101\058 \085\n\t\041 -\062 \080\114\111\109\105\115\101\060\085\062\044\n\t\102\114\111\109\069\118\101\110\116\058 \060\065\046\046\046\062\040\n\t\t\101\118\101\110\116\058 \082\066\088\083\099\114\105\112\116\083\105\103\110\097\108\060\065\046\046\046\062\044\n\t\t\112\114\101\100\105\099\097\116\101\058 \040\065\046\046\046\041 -\062 \098\111\111\108\101\097\110\n\t\041 -\062 \080\114\111\109\105\115\101\044\n\t\105\115\058 \040\118\097\108\117\101\058 \097\110\121\041 -\062 \098\111\111\108\101\097\110\044\n\t\110\101\119\058 \060\084\062\040\n\t\t\114\101\115\111\108\118\101\114\058 \040\114\101\115\111\108\118\101\058 \040\084 \124 \080\114\111\109\105\115\101\060\084\062\041 -\062 \040\041\044 \114\101\106\101\099\116\058 \040\097\110\121\041 -\062 \040\041\041 -\062 \040\041\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\111\110\085\110\104\097\110\100\108\101\100\082\101\106\101\099\116\105\111\110\058 \040\n\t\t\060\084\044 \065\046\046\046\062\040\099\097\108\108\098\097\099\107\058 \040\112\114\111\109\105\115\101\058 \080\114\111\109\105\115\101\060\084\062\044 \065\046\046\046\041 -\062 \040\041\041 -\062 \040\041\n\t\041 -\062 \040\040\041 -\062 \040\041\041\044\n\t\112\114\111\109\105\115\105\102\121\058 \060\082\044 \065\046\046\046\062\040\102\110\058 \040\065\046\046\046\041 -\062 \082\041 -\062 \040\065\046\046\046\041 -\062 \080\114\111\109\105\115\101\060\082\062\044\n\t\114\097\099\101\058 \060\084\062\040\112\114\111\109\105\115\101\115\058 \123 \080\114\111\109\105\115\101\060\084\062 \125\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\114\101\106\101\099\116\058 \040\118\097\108\117\101\058 \097\110\121\041 -\062 \080\114\111\109\105\115\101\060\110\101\118\101\114\062\044\n\t\114\101\115\111\108\118\101\058 \060\084\062\040\118\097\108\117\101\058 \084 \124 \080\114\111\109\105\115\101\060\084\062\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\114\101\116\114\121\058 \060\084\044 \065\046\046\046\062\040\n\t\t\099\097\108\108\098\097\099\107\058 \040\040\065\046\046\046\041 -\062 \084\041\044\n\t\t\116\105\109\101\115\058 \110\117\109\098\101\114\044\n\t\t\065\046\046\046\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\114\101\116\114\121\087\105\116\104\068\101\108\097\121\058 \060\084\044 \065\046\046\046\062\040\n\t\t\099\097\108\108\098\097\099\107\058 \040\040\065\046\046\046\041 -\062 \084\041\044\n\t\t\116\105\109\101\115\058 \110\117\109\098\101\114\044\n\t\t\115\101\099\111\110\100\115\058 \110\117\109\098\101\114\044\n\t\t\065\046\046\046\n\t\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\t\115\111\109\101\058 \060\084\062\040\112\114\111\109\105\115\101\115\058 \123 \080\114\111\109\105\115\101\060\084\062 \125\044 \099\111\117\110\116\058 \110\117\109\098\101\114\041 -\062 \080\114\111\109\105\115\101\060\123 \084 \125\062\044\n\t\116\114\121\058 \060\084\044 \065\046\046\046\062\040\099\097\108\108\098\097\099\107\058 \040\040\065\046\046\046\041 -\062 \084\041\044 \065\046\046\046\041 -\062 \080\114\111\109\105\115\101\060\084\062\044\n\125\n\n\114\101\116\117\114\110 \040\112\114\111\109\105\115\101 \058\058 \097\110\121\041 \058\058 \080\114\111\109\105\115\101\083\116\097\116\105\099\n"
return [[
local promise = require(%s)

export type PromiseStatus = "Started" | "Resolved" | "Rejected" | "Cancelled"

export type AnyPromise = {
	andThen: (
		self: AnyPromise,
		successHandler: (...any) -> any,
		failureHandler: ((any) -> any)?
	) -> AnyPromise,
	andThenCall: <T...>(
		self: AnyPromise,
		successHandler: (T...) -> any,
		T...
	) -> AnyPromise,
	andThenReturn: (self: AnyPromise, value: any) -> AnyPromise,
	await: (self: AnyPromise) -> (boolean, ...any),
	awaitStatus: (self: AnyPromise) -> (PromiseStatus, ...any),
	cancel: (self: AnyPromise) -> (),
	catch: (self: AnyPromise, failureHandler: (...any) -> any) -> AnyPromise,
	expect: (self: AnyPromise) -> ...any,
	finally: (
		self: AnyPromise,
		callback: (status: PromiseStatus) -> any
	) -> AnyPromise,
	finallyCall: <T...>(
		self: AnyPromise,
		callback: (T...) -> any,
		T...
	) -> AnyPromise,
	finallyReturn: (self: AnyPromise, value: any) -> AnyPromise,
	getStatus: (self: AnyPromise) -> PromiseStatus,
	now: (self: AnyPromise, rejectionValue: unknown) -> AnyPromise,
	tap: (self: AnyPromise, successHandler: (...any) -> ()) -> AnyPromise,
	timeout: (
		self: AnyPromise,
		seconds: number,
		rejectionValue: unknown
	) -> AnyPromise,
}

export type Promise<T = any> = {
	andThen: (
		self: Promise<T>,
		successHandler: (T) -> any,
		failureHandler: ((...any) -> any)?
	) -> AnyPromise,
	andThenCall: <U...>(
		self: Promise<T>,
		successHandler: (U...) -> any,
		U...
	) -> Promise<T>,
	andThenReturn: (self: Promise<T>, value: any) -> AnyPromise,
	await: (self: Promise<T>) -> (boolean, T | unknown),
	awaitStatus: (self: Promise<T>) -> (PromiseStatus, T),
	cancel: (self: Promise<T>) -> (),
	catch: (self: Promise<T>, failureHandler: (any) -> any) -> Promise<T>,
	expect: (self: Promise<T>) -> T,
	finally: (
		self: Promise<T>,
		callback: (status: PromiseStatus) -> any
	) -> AnyPromise,
	finallyCall: <U...>(
		self: Promise<T>,
		callback: (U...) -> any,
		U...
	) -> AnyPromise,
	finallyReturn: (self: Promise<T>, value: any) -> AnyPromise,
	getStatus: (self: Promise<T>) -> PromiseStatus,
	now: (self: Promise<T>, rejectionValue: unknown) -> Promise<T>,
	tap: (self: Promise<T>, successHandler: (T) -> ()) -> Promise<T>,
	timeout: (
		self: Promise<T>,
		seconds: number,
		rejectionValue: unknown
	) -> Promise<T>,
}

export type PromiseStatic = {
	Status: {
		Started: "Started",
		Resolved: "Resolved",
		Rejected: "Rejected",
		Cancelled: "Cancelled",
	},
	all: <T>(promises: { Promise<T> }) -> Promise<{ T }>,
	allSettled: (promises: { Promise<any> }) -> Promise<{ PromiseStatus }>,
	any: <T>(promises: { Promise<T> }) -> Promise<T>,
	defer: <T>(
		resolver: (resolve: (T | Promise<T>) -> (), reject: (any) -> ()) -> ()
	) -> Promise<T>,
	delay: (seconds: number) -> Promise<number>,
	each: <T, U>(
		list: { T | Promise<T> },
		predicate: (T, number) -> (U | Promise<U>)
	) -> Promise<{ U }>,
	fold: <T, U>(
		promises: { T | Promise<T> },
		reducer: (U, T, number) -> (U | Promise<U>),
		initialValue: U
	) -> Promise<U>,
	fromEvent: <A...>(
		event: RBXScriptSignal<A...>,
		predicate: (A...) -> boolean
	) -> Promise,
	is: (value: any) -> boolean,
	new: <T>(
		resolver: (resolve: (T | Promise<T>) -> (), reject: (any) -> ()) -> ()
	) -> Promise<T>,
	onUnhandledRejection: (
		<T, A...>(callback: (promise: Promise<T>, A...) -> ()) -> ()
	) -> (() -> ()),
	promisify: <R, A...>(fn: (A...) -> R) -> (A...) -> Promise<R>,
	race: <T>(promises: { Promise<T> }) -> Promise<T>,
	reject: (value: any) -> Promise<never>,
	resolve: <T>(value: T | Promise<T>) -> Promise<T>,
	retry: <T, A...>(
		callback: ((A...) -> T),
		times: number,
		A...
	) -> Promise<T>,
	retryWithDelay: <T, A...>(
		callback: ((A...) -> T),
		times: number,
		seconds: number,
		A...
	) -> Promise<T>,
	some: <T>(promises: { Promise<T> }, count: number) -> Promise<{ T }>,
	try: <T, A...>(callback: ((A...) -> T), A...) -> Promise<T>,
}

return (promise :: any) :: PromiseStatic
]]
