diff --git a/projects/core/logic/partials/constructors/_Version.ts b/projects/core/logic/api/constructors/_Version.ts similarity index 100% rename from projects/core/logic/partials/constructors/_Version.ts rename to projects/core/logic/api/constructors/_Version.ts diff --git a/projects/core/logic/partials/errors/InvalidArgumentError.ts b/projects/core/logic/api/errors/InvalidArgumentError.ts similarity index 100% rename from projects/core/logic/partials/errors/InvalidArgumentError.ts rename to projects/core/logic/api/errors/InvalidArgumentError.ts diff --git a/projects/core/logic/partials/modules/console/console-core.ts b/projects/core/logic/api/modules/console/console-core.ts similarity index 92% rename from projects/core/logic/partials/modules/console/console-core.ts rename to projects/core/logic/api/modules/console/console-core.ts index 2e310233..c0665777 100644 --- a/projects/core/logic/partials/modules/console/console-core.ts +++ b/projects/core/logic/api/modules/console/console-core.ts @@ -1,5 +1,5 @@ import { interopCache } from "logic/runtime/interop-cache-core"; -import { Result } from "logic/partials/modules/std/functional/Result"; +import { Result } from "logic/api/modules/std/functional/Result"; import { TableLike } from "types/internal/generic-types"; import { ConsoleColor } from "types/internal/console-types" @@ -284,21 +284,31 @@ function timeEnd( } function write(target: string, color: ConsoleColor): Result { - if(typeof target != "string") { - interopCache.clinet.write(toLoggableOutput(target), color); - return Result.right([]); + try { + if (typeof target != "string") { + interopCache.clinet.write(toLoggableOutput(target), color); + return Result.right([]); + } + + return Result.left(new Error("Invalid write value")); + } + catch (e) { + return Result.left(e); } - - return Result.left(new Error("Invalid write value")); } function writeLine(target: string, color: ConsoleColor): Result { - if(typeof target != "string") { - interopCache.clinet.writeLine(toLoggableOutput(target), color); - return Result.right([]); + try { + if (typeof target != "string") { + interopCache.clinet.writeLine(toLoggableOutput(target), color); + return Result.right([]); + } + + return Result.left(new Error("Invalid write value")); + } + catch (e) { + return Result.left(e); } - - return Result.left(new Error("Invalid write value")); } export { diff --git a/projects/core/logic/partials/modules/console/console.ts b/projects/core/logic/api/modules/console/console.ts similarity index 76% rename from projects/core/logic/partials/modules/console/console.ts rename to projects/core/logic/api/modules/console/console.ts index cbd83177..3721231c 100644 --- a/projects/core/logic/partials/modules/console/console.ts +++ b/projects/core/logic/api/modules/console/console.ts @@ -1,4 +1,4 @@ -import { clear, error, log, table, time, timeEnd, warn, write, writeLine } from "logic/partials/modules/console/console-core"; +import { clear, error, log, table, time, timeEnd, warn, write, writeLine } from "logic/api/modules/console/console-core"; const console = { time, diff --git a/projects/core/logic/partials/modules/data/_clone.ts b/projects/core/logic/api/modules/data/_clone.ts similarity index 100% rename from projects/core/logic/partials/modules/data/_clone.ts rename to projects/core/logic/api/modules/data/_clone.ts diff --git a/projects/core/logic/partials/modules/data/_compare.ts b/projects/core/logic/api/modules/data/_compare.ts similarity index 100% rename from projects/core/logic/partials/modules/data/_compare.ts rename to projects/core/logic/api/modules/data/_compare.ts diff --git a/projects/core/logic/partials/modules/data/_data.ts b/projects/core/logic/api/modules/data/_data.ts similarity index 100% rename from projects/core/logic/partials/modules/data/_data.ts rename to projects/core/logic/api/modules/data/_data.ts diff --git a/projects/core/logic/partials/modules/data/constructors/_MySqlClient.ts b/projects/core/logic/api/modules/data/constructors/_MySqlClient.ts similarity index 100% rename from projects/core/logic/partials/modules/data/constructors/_MySqlClient.ts rename to projects/core/logic/api/modules/data/constructors/_MySqlClient.ts diff --git a/projects/core/logic/partials/modules/data/constructors/_PgClient.ts b/projects/core/logic/api/modules/data/constructors/_PgClient.ts similarity index 100% rename from projects/core/logic/partials/modules/data/constructors/_PgClient.ts rename to projects/core/logic/api/modules/data/constructors/_PgClient.ts diff --git a/projects/core/logic/partials/modules/data/constructors/_PgDocumentClient.ts b/projects/core/logic/api/modules/data/constructors/_PgDocumentClient.ts similarity index 100% rename from projects/core/logic/partials/modules/data/constructors/_PgDocumentClient.ts rename to projects/core/logic/api/modules/data/constructors/_PgDocumentClient.ts diff --git a/projects/core/logic/partials/modules/data/constructors/_SqlServerClient.ts b/projects/core/logic/api/modules/data/constructors/_SqlServerClient.ts similarity index 100% rename from projects/core/logic/partials/modules/data/constructors/_SqlServerClient.ts rename to projects/core/logic/api/modules/data/constructors/_SqlServerClient.ts diff --git a/projects/core/logic/partials/modules/dotnet/dotnet-interop-core.ts b/projects/core/logic/api/modules/dotnet/dotnet-interop-core.ts similarity index 100% rename from projects/core/logic/partials/modules/dotnet/dotnet-interop-core.ts rename to projects/core/logic/api/modules/dotnet/dotnet-interop-core.ts diff --git a/projects/core/logic/partials/modules/dotnet/dotnet-realm-core.ts b/projects/core/logic/api/modules/dotnet/dotnet-realm-core.ts similarity index 100% rename from projects/core/logic/partials/modules/dotnet/dotnet-realm-core.ts rename to projects/core/logic/api/modules/dotnet/dotnet-realm-core.ts diff --git a/projects/core/logic/partials/modules/dotnet/dotnet-threading-core.ts b/projects/core/logic/api/modules/dotnet/dotnet-threading-core.ts similarity index 94% rename from projects/core/logic/partials/modules/dotnet/dotnet-threading-core.ts rename to projects/core/logic/api/modules/dotnet/dotnet-threading-core.ts index a76ea311..70fc566c 100644 --- a/projects/core/logic/partials/modules/dotnet/dotnet-threading-core.ts +++ b/projects/core/logic/api/modules/dotnet/dotnet-threading-core.ts @@ -1,6 +1,6 @@ -import { _crypto } from "logic/partials/statics/_Crypto"; -import { error } from "logic/partials/modules/console/console-core"; -import { _nextTick } from "logic/partials/modules/std/async/_nextTick"; +import { _crypto } from "logic/api/statics/_Crypto"; +import { error } from "logic/api/modules/console/console-core"; +import { _nextTick } from "logic/api/modules/std/async/_nextTick"; import { getStaticProperty } from "./dotnet-interop-core"; import { InteropMethod } from "types/internal/dotnet-interop-types"; diff --git a/projects/core/logic/partials/modules/dotnet/dotnet.ts b/projects/core/logic/api/modules/dotnet/dotnet.ts similarity index 100% rename from projects/core/logic/partials/modules/dotnet/dotnet.ts rename to projects/core/logic/api/modules/dotnet/dotnet.ts diff --git a/projects/core/logic/partials/modules/fs/fs-default-errors.ts b/projects/core/logic/api/modules/fs/fs-default-errors.ts similarity index 100% rename from projects/core/logic/partials/modules/fs/fs-default-errors.ts rename to projects/core/logic/api/modules/fs/fs-default-errors.ts diff --git a/projects/core/logic/partials/modules/fs/fs-raw-file-management.ts b/projects/core/logic/api/modules/fs/fs-raw-file-management.ts similarity index 100% rename from projects/core/logic/partials/modules/fs/fs-raw-file-management.ts rename to projects/core/logic/api/modules/fs/fs-raw-file-management.ts diff --git a/projects/core/logic/partials/modules/fs/fs.ts b/projects/core/logic/api/modules/fs/fs.ts similarity index 100% rename from projects/core/logic/partials/modules/fs/fs.ts rename to projects/core/logic/api/modules/fs/fs.ts diff --git a/projects/core/logic/partials/modules/guards/_guards.ts b/projects/core/logic/api/modules/guards/_guards.ts similarity index 100% rename from projects/core/logic/partials/modules/guards/_guards.ts rename to projects/core/logic/api/modules/guards/_guards.ts diff --git a/projects/core/logic/partials/modules/http/http-basic-core.ts b/projects/core/logic/api/modules/http/http-basic-core.ts similarity index 95% rename from projects/core/logic/partials/modules/http/http-basic-core.ts rename to projects/core/logic/api/modules/http/http-basic-core.ts index 3aecb972..394e01e1 100644 --- a/projects/core/logic/partials/modules/http/http-basic-core.ts +++ b/projects/core/logic/api/modules/http/http-basic-core.ts @@ -8,12 +8,12 @@ import { } from "types/internal/http-types"; //Logic imports -import { getStaticMethod } from "logic/partials/modules/dotnet/dotnet-interop-core"; -import { _tryStringify } from "logic/partials/modules/std/json/_tryStringify"; -import { _tryParse } from "logic/partials/modules/std/json/_tryParse"; -import { _nextTick } from "logic/partials/modules/std/async/_nextTick"; +import { getStaticMethod } from "logic/api/modules/dotnet/dotnet-interop-core"; +import { _tryStringify } from "logic/api/modules/std/json/_tryStringify"; +import { _tryParse } from "logic/api/modules/std/json/_tryParse"; +import { _nextTick } from "logic/api/modules/std/async/_nextTick"; import { Melon } from "logic/index"; -import { http } from "logic/partials/modules/http/http"; +import { http } from "logic/api/modules/http/http"; function $static(response: any, type: `${string}/${string}`, headers: Record = {}) { const serialize = getStaticMethod("Newtonsoft.Json:JsonConvert:SerializeObject"); diff --git a/projects/core/logic/partials/modules/http/http.ts b/projects/core/logic/api/modules/http/http.ts similarity index 81% rename from projects/core/logic/partials/modules/http/http.ts rename to projects/core/logic/api/modules/http/http.ts index ae84ec57..5008a11d 100644 --- a/projects/core/logic/partials/modules/http/http.ts +++ b/projects/core/logic/api/modules/http/http.ts @@ -1,5 +1,5 @@ //Logic imports -import { request, requestAsync, fetch, app, $static, result } from "logic/partials/modules/http/http-basic-core" +import { request, requestAsync, fetch, app, $static, result } from "logic/api/modules/http/http-basic-core" const http = { _apps: {}, diff --git a/projects/core/logic/partials/modules/internalConsts/_internalConsts.ts b/projects/core/logic/api/modules/internalConsts/_internalConsts.ts similarity index 100% rename from projects/core/logic/partials/modules/internalConsts/_internalConsts.ts rename to projects/core/logic/api/modules/internalConsts/_internalConsts.ts diff --git a/projects/core/logic/partials/modules/runtime/runtime-event.ts b/projects/core/logic/api/modules/runtime/runtime-event.ts similarity index 95% rename from projects/core/logic/partials/modules/runtime/runtime-event.ts rename to projects/core/logic/api/modules/runtime/runtime-event.ts index a028e333..ef1b0da3 100644 --- a/projects/core/logic/partials/modules/runtime/runtime-event.ts +++ b/projects/core/logic/api/modules/runtime/runtime-event.ts @@ -3,8 +3,8 @@ import type { OutputFriendly } from "types/internal/generic-types"; import type { EventType, EventCaller, EventAction } from "types/internal/runtime-types"; //Logic Imports -import { _crypto } from "logic/partials/statics/_Crypto"; -import { _log } from "logic/partials/modules/console/_log"; +import { _crypto } from "logic/api/statics/_Crypto"; +import { _log } from "logic/api/modules/console/_log"; class Event implements OutputFriendly { public name: string; diff --git a/projects/core/logic/partials/modules/runtime/runtime.ts b/projects/core/logic/api/modules/runtime/runtime.ts similarity index 60% rename from projects/core/logic/partials/modules/runtime/runtime.ts rename to projects/core/logic/api/modules/runtime/runtime.ts index f59ff059..1d96d4a3 100644 --- a/projects/core/logic/partials/modules/runtime/runtime.ts +++ b/projects/core/logic/api/modules/runtime/runtime.ts @@ -1,5 +1,5 @@ //Logic Imports -import { EventChain, Event } from "logic/partials/modules/runtime/runtime-event"; +import { EventChain, Event } from "logic/api/modules/runtime/runtime-event"; const eventChain = new EventChain(); diff --git a/projects/core/logic/partials/modules/std/SharedBag.ts b/projects/core/logic/api/modules/std/SharedBag.ts similarity index 100% rename from projects/core/logic/partials/modules/std/SharedBag.ts rename to projects/core/logic/api/modules/std/SharedBag.ts diff --git a/projects/core/logic/partials/modules/std/TextDecoder.ts b/projects/core/logic/api/modules/std/TextDecoder.ts similarity index 100% rename from projects/core/logic/partials/modules/std/TextDecoder.ts rename to projects/core/logic/api/modules/std/TextDecoder.ts diff --git a/projects/core/logic/partials/modules/std/TextEncoder.ts b/projects/core/logic/api/modules/std/TextEncoder.ts similarity index 100% rename from projects/core/logic/partials/modules/std/TextEncoder.ts rename to projects/core/logic/api/modules/std/TextEncoder.ts diff --git a/projects/core/logic/partials/modules/std/_std.ts b/projects/core/logic/api/modules/std/_std.ts similarity index 100% rename from projects/core/logic/partials/modules/std/_std.ts rename to projects/core/logic/api/modules/std/_std.ts diff --git a/projects/core/logic/partials/modules/std/async/_nextTick.ts b/projects/core/logic/api/modules/std/async/_nextTick.ts similarity index 100% rename from projects/core/logic/partials/modules/std/async/_nextTick.ts rename to projects/core/logic/api/modules/std/async/_nextTick.ts diff --git a/projects/core/logic/partials/modules/std/boolean/_checkAll.ts b/projects/core/logic/api/modules/std/boolean/_checkAll.ts similarity index 100% rename from projects/core/logic/partials/modules/std/boolean/_checkAll.ts rename to projects/core/logic/api/modules/std/boolean/_checkAll.ts diff --git a/projects/core/logic/partials/modules/std/boolean/_checkOne.ts b/projects/core/logic/api/modules/std/boolean/_checkOne.ts similarity index 100% rename from projects/core/logic/partials/modules/std/boolean/_checkOne.ts rename to projects/core/logic/api/modules/std/boolean/_checkOne.ts diff --git a/projects/core/logic/partials/modules/std/environment/_baseDirectory.ts b/projects/core/logic/api/modules/std/environment/_baseDirectory.ts similarity index 100% rename from projects/core/logic/partials/modules/std/environment/_baseDirectory.ts rename to projects/core/logic/api/modules/std/environment/_baseDirectory.ts diff --git a/projects/core/logic/partials/modules/std/environment/_clearLocalEnvironmentVariables.ts b/projects/core/logic/api/modules/std/environment/_clearLocalEnvironmentVariables.ts similarity index 100% rename from projects/core/logic/partials/modules/std/environment/_clearLocalEnvironmentVariables.ts rename to projects/core/logic/api/modules/std/environment/_clearLocalEnvironmentVariables.ts diff --git a/projects/core/logic/partials/modules/std/environment/_getEnvironmentVariables.ts b/projects/core/logic/api/modules/std/environment/_getEnvironmentVariables.ts similarity index 100% rename from projects/core/logic/partials/modules/std/environment/_getEnvironmentVariables.ts rename to projects/core/logic/api/modules/std/environment/_getEnvironmentVariables.ts diff --git a/projects/core/logic/partials/modules/std/environment/_setEnvironmentVariable.ts b/projects/core/logic/api/modules/std/environment/_setEnvironmentVariable.ts similarity index 100% rename from projects/core/logic/partials/modules/std/environment/_setEnvironmentVariable.ts rename to projects/core/logic/api/modules/std/environment/_setEnvironmentVariable.ts diff --git a/projects/core/logic/partials/modules/std/functional/Result.ts b/projects/core/logic/api/modules/std/functional/Result.ts similarity index 100% rename from projects/core/logic/partials/modules/std/functional/Result.ts rename to projects/core/logic/api/modules/std/functional/Result.ts diff --git a/projects/core/logic/partials/modules/std/json/_tryParse.ts b/projects/core/logic/api/modules/std/json/_tryParse.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/_tryParse.ts rename to projects/core/logic/api/modules/std/json/_tryParse.ts diff --git a/projects/core/logic/partials/modules/std/json/_tryStringify.ts b/projects/core/logic/api/modules/std/json/_tryStringify.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/_tryStringify.ts rename to projects/core/logic/api/modules/std/json/_tryStringify.ts diff --git a/projects/core/logic/partials/modules/std/json/deserialize.ts b/projects/core/logic/api/modules/std/json/deserialize.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/deserialize.ts rename to projects/core/logic/api/modules/std/json/deserialize.ts diff --git a/projects/core/logic/partials/modules/std/json/serialize.ts b/projects/core/logic/api/modules/std/json/serialize.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/serialize.ts rename to projects/core/logic/api/modules/std/json/serialize.ts diff --git a/projects/core/logic/partials/modules/std/json/tryDeserialize.ts b/projects/core/logic/api/modules/std/json/tryDeserialize.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/tryDeserialize.ts rename to projects/core/logic/api/modules/std/json/tryDeserialize.ts diff --git a/projects/core/logic/partials/modules/std/json/trySerialize.ts b/projects/core/logic/api/modules/std/json/trySerialize.ts similarity index 100% rename from projects/core/logic/partials/modules/std/json/trySerialize.ts rename to projects/core/logic/api/modules/std/json/trySerialize.ts diff --git a/projects/core/logic/partials/modules/std/process/_argv.ts b/projects/core/logic/api/modules/std/process/_argv.ts similarity index 100% rename from projects/core/logic/partials/modules/std/process/_argv.ts rename to projects/core/logic/api/modules/std/process/_argv.ts diff --git a/projects/core/logic/partials/modules/std/process/_env.ts b/projects/core/logic/api/modules/std/process/_env.ts similarity index 100% rename from projects/core/logic/partials/modules/std/process/_env.ts rename to projects/core/logic/api/modules/std/process/_env.ts diff --git a/projects/core/logic/partials/modules/std/process/_exit.ts b/projects/core/logic/api/modules/std/process/_exit.ts similarity index 100% rename from projects/core/logic/partials/modules/std/process/_exit.ts rename to projects/core/logic/api/modules/std/process/_exit.ts diff --git a/projects/core/logic/partials/modules/std/shift.ts b/projects/core/logic/api/modules/std/shift.ts similarity index 100% rename from projects/core/logic/partials/modules/std/shift.ts rename to projects/core/logic/api/modules/std/shift.ts diff --git a/projects/core/logic/partials/modules/std/std-time-core.ts b/projects/core/logic/api/modules/std/std-time-core.ts similarity index 100% rename from projects/core/logic/partials/modules/std/std-time-core.ts rename to projects/core/logic/api/modules/std/std-time-core.ts diff --git a/projects/core/logic/partials/modules/std/system/osInformation.ts b/projects/core/logic/api/modules/std/system/osInformation.ts similarity index 100% rename from projects/core/logic/partials/modules/std/system/osInformation.ts rename to projects/core/logic/api/modules/std/system/osInformation.ts diff --git a/projects/core/logic/partials/modules/std/time/Timer.ts b/projects/core/logic/api/modules/std/time/Timer.ts similarity index 100% rename from projects/core/logic/partials/modules/std/time/Timer.ts rename to projects/core/logic/api/modules/std/time/Timer.ts diff --git a/projects/core/logic/partials/modules/std/time/_clearInterval.ts b/projects/core/logic/api/modules/std/time/_clearInterval.ts similarity index 100% rename from projects/core/logic/partials/modules/std/time/_clearInterval.ts rename to projects/core/logic/api/modules/std/time/_clearInterval.ts diff --git a/projects/core/logic/partials/modules/std/time/_clearTimeout.ts b/projects/core/logic/api/modules/std/time/_clearTimeout.ts similarity index 100% rename from projects/core/logic/partials/modules/std/time/_clearTimeout.ts rename to projects/core/logic/api/modules/std/time/_clearTimeout.ts diff --git a/projects/core/logic/partials/modules/std/time/_setInterval.ts b/projects/core/logic/api/modules/std/time/_setInterval.ts similarity index 100% rename from projects/core/logic/partials/modules/std/time/_setInterval.ts rename to projects/core/logic/api/modules/std/time/_setInterval.ts diff --git a/projects/core/logic/partials/modules/testing/Assert.ts b/projects/core/logic/api/modules/testing/Assert.ts similarity index 94% rename from projects/core/logic/partials/modules/testing/Assert.ts rename to projects/core/logic/api/modules/testing/Assert.ts index 8b2730ca..fea813a3 100644 --- a/projects/core/logic/partials/modules/testing/Assert.ts +++ b/projects/core/logic/api/modules/testing/Assert.ts @@ -1,4 +1,4 @@ -import { _compare } from "logic/partials/modules/data/_compare"; +import { _compare } from "logic/api/modules/data/_compare"; class AssertHandler { static getProblems(assert: Assert) { diff --git a/projects/core/logic/partials/modules/testing/test.ts b/projects/core/logic/api/modules/testing/test.ts similarity index 90% rename from projects/core/logic/partials/modules/testing/test.ts rename to projects/core/logic/api/modules/testing/test.ts index e775ccbb..71bb83b2 100644 --- a/projects/core/logic/partials/modules/testing/test.ts +++ b/projects/core/logic/api/modules/testing/test.ts @@ -1,4 +1,4 @@ -import { write, writeLine } from "logic/partials/modules/console/console-core"; +import { write, writeLine } from "logic/api/modules/console/console-core"; import { Assert, AssertHandler } from "./Assert"; function test(description: string, handler: (assert: Assert) => void) { diff --git a/projects/core/logic/partials/modules/testing/testing.ts b/projects/core/logic/api/modules/testing/testing.ts similarity index 100% rename from projects/core/logic/partials/modules/testing/testing.ts rename to projects/core/logic/api/modules/testing/testing.ts diff --git a/projects/core/logic/partials/statics/_Crypto.ts b/projects/core/logic/api/statics/_Crypto.ts similarity index 100% rename from projects/core/logic/partials/statics/_Crypto.ts rename to projects/core/logic/api/statics/_Crypto.ts diff --git a/projects/core/logic/index.ts b/projects/core/logic/index.ts index 97ba96a3..803d0c28 100644 --- a/projects/core/logic/index.ts +++ b/projects/core/logic/index.ts @@ -1,23 +1,22 @@ // Utilitary imports import { setupEnvironmentVariables } from "logic/runtime/global-environment-core"; -import { addPrototypeExtension } from "./partials/utils/generic/addPrototypeExtension"; +import { addPrototypeExtension } from "./runtime/injections-core"; import { and } from "logic/runtime/global-extensions"; // Isolated imports -import { _Version } from "./partials/constructors/_Version" +import { _Version } from "./api/constructors/_Version" // Module imports -import { console as _console } from "logic/partials/modules/console/console" -import { dotnet } from "./partials/modules/dotnet/dotnet" -import { _crypto } from "./partials/statics/_Crypto" -import { _fs } from "./partials/modules/fs/fs" -import { _guards } from "./partials/modules/guards/_guards" -import { http } from "./partials/modules/http/http" -import { _std } from "./partials/modules/std/_std" -import { _data } from "./partials/modules/data/_data" -import { testing } from "./partials/modules/testing/testing" -import { runtime } from "./partials/modules/runtime/runtime" -import { interopCache } from "./runtime/interop-cache-core"; +import { console as _console } from "logic/api/modules/console/console" +import { dotnet } from "./api/modules/dotnet/dotnet" +import { _crypto } from "./api/statics/_Crypto" +import { _fs } from "./api/modules/fs/fs" +import { _guards } from "./api/modules/guards/_guards" +import { http } from "./api/modules/http/http" +import { _std } from "./api/modules/std/_std" +import { _data } from "./api/modules/data/_data" +import { testing } from "./api/modules/testing/testing" +import { runtime } from "./api/modules/runtime/runtime" setupEnvironmentVariables(); addPrototypeExtension(Object, "and", and); diff --git a/projects/core/logic/runtime/global-environment-core.ts b/projects/core/logic/runtime/global-environment-core.ts index 29d684c5..4b8b48c7 100644 --- a/projects/core/logic/runtime/global-environment-core.ts +++ b/projects/core/logic/runtime/global-environment-core.ts @@ -1,7 +1,7 @@ -import { readText } from "logic/partials/modules/fs/fs-raw-file-management"; -import { _setEnvironmentVariable } from "logic/partials/modules/std/environment/_setEnvironmentVariable"; +import { readText } from "logic/api/modules/fs/fs-raw-file-management"; +import { _setEnvironmentVariable } from "logic/api/modules/std/environment/_setEnvironmentVariable"; import { interopCache } from "logic/runtime/interop-cache-core"; -import { _guards } from "logic/partials/modules/guards/_guards"; +import { _guards } from "logic/api/modules/guards/_guards"; import { Primitive } from "types/internal/generic-types"; function setupEnvironmentVariables() { diff --git a/projects/core/logic/partials/utils/generic/addPrototypeExtension.ts b/projects/core/logic/runtime/injections-core.ts similarity index 68% rename from projects/core/logic/partials/utils/generic/addPrototypeExtension.ts rename to projects/core/logic/runtime/injections-core.ts index 7d0aceaf..cc1a1781 100644 --- a/projects/core/logic/partials/utils/generic/addPrototypeExtension.ts +++ b/projects/core/logic/runtime/injections-core.ts @@ -1,3 +1,5 @@ +// Unsafe: Can allow prototype pollution; Should not be exposed + function addPrototypeExtension(base: any, name: string, value: any) { base["prototype"][name] = value; } diff --git a/projects/core/logic/runtime/interop-cache-core.ts b/projects/core/logic/runtime/interop-cache-core.ts index 8f808cc3..19dc0f46 100644 --- a/projects/core/logic/runtime/interop-cache-core.ts +++ b/projects/core/logic/runtime/interop-cache-core.ts @@ -1,4 +1,4 @@ -import { getStaticMethod } from "logic/partials/modules/dotnet/dotnet-interop-core"; +import { getStaticMethod } from "logic/api/modules/dotnet/dotnet-interop-core"; const interopCache = { serialization: { diff --git a/projects/native/MelonRuntime.Core/Scripts/core.js b/projects/native/MelonRuntime.Core/Scripts/core.js index 53628bee..8c1d122e 100644 --- a/projects/native/MelonRuntime.Core/Scripts/core.js +++ b/projects/native/MelonRuntime.Core/Scripts/core.js @@ -1,2 +1,2 @@ /*! For license information please see core.js.LICENSE.txt */ -(()=>{"use strict";var t={998:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Melon=void 0;var n=r(2517),o=r(5650),i=r(5261),a=r(5409),u=r(698),c=r(8420),l=r(8932),s=r(3533),f=r(432),h=r(4847),p=r(1077),y=r(3182),v=r(4429),d=r(2251),m=r(8363);(0,n.setupEnvironmentVariables)(),(0,o.addPrototypeExtension)(Object,"and",i.and),globalThis.interopCache=m.interopCache;var b={console:u.console,testing:v.testing,std:p._std,data:y._data,guards:f._guards,fs:s._fs,http:h.http,dotnet:c.dotnet,crypto:l._crypto,runtime:d.runtime,Version:a._Version};e.Melon=b,globalThis.Melon=b},5409:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,"major",0),o(this,"minor",0),o(this,"patch",0),this.major=e,this.minor=r,this.patch=n}var e,r;return e=t,(r=[{key:"toString",value:function(){return"".concat(this.major,".").concat(this.minor,".").concat(this.patch)}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._Version=a},2267:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return o(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},n(t)}function o(t,e,r){return o=i()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},o.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidArgumentError=void 0;var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,t);var e,n,o,c=(n=l,o=i(),function(){var t,e=u(n);if(o){var i=u(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function l(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l);for(var e=arguments.length,r=new Array(e),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.clear=function(){try{return n.interopCache.console.clear(),o.Result.right([])}catch(t){return o.Result.left(t)}},e.error=function(){try{switch(arguments.length){case 0:return o.Result.right(0);case 1:return n.interopCache.clinet.writeLine(s(arguments[0]),"Red"),o.Result.right(1);default:for(var t=0;t1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"[%label] [%time]",i=f.timers[t].stop().match((function(t){return t}),(function(t){return t}));return i.constructor==Error?o.Result.left(i):(e&&n.interopCache.console.writeLine(r.replaceAll("%label",t).replaceAll("%time",i.toString())),o.Result.right(f.timers[t]))},e.warn=function(){try{switch(arguments.length){case 0:return o.Result.right(0);case 1:return n.interopCache.clinet.writeLine(s(arguments[0]),"Yellow"),o.Result.right(1);default:for(var t=0;t{Object.defineProperty(e,"__esModule",{value:!0}),e.console=void 0;var n=r(5189),o={time:n.time,timeEnd:n.timeEnd,log:n.log,write:n.write,writeLine:n.writeLine,error:n.error,warn:n.warn,clear:n.clear,table:n.table};e.console=o},7575:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clone=function(t){return _$internalBinding.DeepClone(t)}},2720:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._compare=function t(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,e){return t===e},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u={comment:"",equals:!1},c=function(e,r){var n=[];return e.forEach((function(e,o){var u=e,c=r[o],l=t(u,c,i,a).equals;n.push(l)})),n.every((function(t){return!0===t}))};switch(o(e)){case"string":case"number":case"boolean":return e.toString().length!=r.toString().length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):function(t,e){return i(t,e)}(e,r)?(u.equals=!0,u):(u.comment=n._internalConsts.COMPARATION_BASE_IS_DIFFERENT,u);case"object":if(Array.isArray(e))return e.length!=r.length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=c(e,r),u);if(e.constructor===Set)return e.size!=r.size?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Array.from(t),Array.from(e))}(e,r),u);if(e.constructor===Map)return e.size!=r.size?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Array.from(t.entries()),Array.from(e.entries()))}(e,r),u);if(e.constructor===Object)return Object.keys(e).length!=Object.keys(r).length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Object.entries(t),Object.entries(e))}(e,r),u)}if(a){var l=a(e,r);return t(l[0],l[1])}throw new TypeError(n._internalConsts.NO_SUPPORT_FOR_THE_OBJECT)};var n=r(3111);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}},3182:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._data=void 0;var n=r(9865),o=r(3425),i=r(5637),a=r(353),u=r(7575),c=r(2720),l={clone:u._clone,compare:c._compare,PgClient:o._PgClient,MySqlClient:n._MySqlClient,SqlServerClient:a._SqlServerClient,PgDocumentClient:i._PgDocumentClient};e._data=l},9865:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._MySqlClient=void 0;var o=r(2267);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.MySqlBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.MySqlBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._MySqlClient=p},3425:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._PgClient=void 0;var o=r(2267);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.PostgreSQLBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.PostgreSQLBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._PgClient=p},5637:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._PgDocumentClient=void 0;var n=r(2267),o=r(432),i=r(223),a=r(3425);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,c){var l=h(t[n],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function l(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,u,"next",t)}function u(t){l(i,n,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e,r){return f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&h(o,r.prototype),o},f.apply(null,arguments)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw f(n.InvalidArgumentError,function(t){if(Array.isArray(t))return p(t)}(u=c)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(u)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this._provider=new a._PgClient(e)}var e,r,o,u,l,h,b,g;return e=t,r=[{key:"createDictionaryAsync",value:(g=s(c().mark((function t(e){var r;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return r="\n CREATE TABLE ".concat(e," (\n name varchar(255) PRIMARY KEY,\n document JSONB\n );\n "),t.next=5,(0,i._nextTick)();case 5:this._provider.executeNonQuery(r);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"addDocumentAsync",value:(b=s(c().mark((function t(e,r,o){var a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return a=JSON.stringify(o),u="\n INSERT INTO ".concat(e," (name, document) \n VALUES ('").concat(r,"', '").concat(a,"')\n "),t.next=6,(0,i._nextTick)();case 6:this._provider.executeNonQuery(u);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return b.apply(this,arguments)})},{key:"updateDocumentAsync",value:(h=s(c().mark((function t(e,r,o){var a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return a=JSON.stringify(o),u="\n UPDATE ".concat(e," SET document = '").concat(a,"'\n WHERE name = '").concat(r,"'\n "),t.next=6,(0,i._nextTick)();case 6:this._provider.executeNonQuery(u);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return h.apply(this,arguments)})},{key:"getDocumentAsync",value:(l=s(c().mark((function t(e,r){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n SELECT document FROM ".concat(e," WHERE name = '").concat(r,"'\n "),t.next=5,(0,i._nextTick)();case 5:return t.abrupt("return",this._provider.executeQuery(o)[0].document);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return l.apply(this,arguments)})},{key:"getDocuments",value:(u=s(c().mark((function t(e,r){var o,a;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n SELECT * FROM ".concat(e,"\n "),t.next=5,(0,i._nextTick)();case 5:return a=this._provider.executeQuery(o).map((function(t){return JSON.parse(t.document)})),r&&(a=a.filter(r)),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"deleteDocumentAsync",value:(o=s(c().mark((function t(e,r){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n DELETE FROM ".concat(e," WHERE name = '").concat(r,"'\n "),t.next=5,(0,i._nextTick)();case 5:this._provider.executeNonQuery(o);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&y(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._PgDocumentClient=b},353:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._SqlServerClient=void 0;var o=r(2267);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.SqlServerBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.SqlServerBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._SqlServerClient=p},1006:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createList=function(t){return _$internalBinding.CreateList(t)},e.getFactories=function(t){var e=_$internalBinding.GetTypes(t),r=i("System:Activator:CreateInstance"),n={};return e.forEach((function(t){var e=t.name[0].toLowerCase()+t.name.slice(1);n[e]={new:function(){for(var e=arguments.length,n=new Array(e),o=0;o127||t<-128)throw new RangeError(r);return{type:"sbyte",value:Math.floor(t)}},byte:function(t){if(t>255||t<0)throw new RangeError(r);return{type:"byte",value:Math.floor(t)}},short:function(t){if(t>32767||t<-32768)throw new RangeError(r);return{type:"short",value:Math.floor(t)}},ushort:function(t){if(t>65535||t<0)throw new RangeError(r);return{type:"ushort",value:Math.floor(t)}},int:function(t){if(t>2147483647||t<-2147483648)throw new RangeError(r);return{type:"int",value:Math.floor(t)}},uint:function(t){if(t>4294967295||t<0)throw new RangeError(r);return{type:"uint",value:Math.floor(t)}},long:function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new RangeError(r);return{type:"long",value:Math.floor(t)}},ulong:function(t){if(t>0x10000000000000000||t<0)throw new RangeError(r);return{type:"ulong",value:Math.floor(t)}},float:function(t){return{type:"float",number:t}},double:function(t){return{type:"double",number:t}},decimal:function(t){return{type:"decimal",number:t}}};function o(t){return t.split(":")}function i(t){var e=o(t);return function(){for(var t=arguments.length,r=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.Realm=void 0;var n=r(8932),o=r(3356);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function l(t,e){for(var r=0;r0&&void 0!==r[0]?r[0]:0,t.next=3,Promise.resolve(_$internalBinding.DeleteRealm(this.name,e));case 3:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"setValue",value:(u=c(a().mark((function t(e,r){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.locked){t.next=3;break}return n=new Error("Can not interact with the realm while it is locked."),t.abrupt("return",o.Result.left(n));case 3:return this.locked=!0,t.next=6,Promise.resolve(_$internalBinding.SetRealmScriptProperty(this.name,e,r));case 6:return this.itemNames.push(e),this.locked=!1,t.abrupt("return",o.Result.right(!0));case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"setInstance",value:(i=c(a().mark((function t(e,r){var n,i,u,c,l,s,f,h=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.locked){t.next=3;break}return n=new Error("Can not interact with the realm while it is locked."),t.abrupt("return",o.Result.left(n));case 3:for(i=r.split(":"),u=i[0],c=i[1],this.locked=!0,l=h.length,s=new Array(l>2?l-2:0),f=2;f{Object.defineProperty(e,"__esModule",{value:!0}),e.Thread=e.Task=void 0,e.createTask=v,e.createThread=y;var n=r(8932),o=r(5189),i=r(1006);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(){u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,u,c){var l=h(t[n],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;this.interopThread.abort(t)}},{key:"suspend",value:function(){this.interopThread.suspend()}},{key:"resume",value:function(){this.interopThread.resume()}},{key:"join",value:function(){this.interopThread.join()}},{key:"yield",value:function(){this.interopThread.yield()}},{key:"memoryBarrier",value:function(){this.interopThread.memoryBarrier()}},{key:"beginCriticalRegion",value:function(){this.interopThread.beginCriticalRegion()}},{key:"endCriticalRegion",value:function(){this.interopThread.endCriticalRegion()}},{key:"unsafeGetInteropThread",value:function(){return this.interopThread}},{key:"unsafeGetInteropAction",value:function(){return this.interopAction}},{key:"unsafeSetInteropThread",value:function(t){this.interopThread=t}}],[{key:"currentThread",get:function(){var e=(0,i.getStaticProperty)("System.Threading:Thread:CurrentThread"),r=new t;return r.interopThread=e,r}},{key:"panic",value:function(e){(0,o.error)(null!=e?e:""),t.currentThread.abort(101)}}]),t}();e.Thread=d,h(d,"threads",{});var m=function(){function t(e){l(this,t),h(this,"interopTask",void 0),this.interopTask=v(e)}var e,r;return f(t,[{key:"isCanceled",get:function(){return this.interopTask.isCanceled}},{key:"isCompleted",get:function(){return this.interopTask.isCompleted}},{key:"isCompletedSuccessfully",get:function(){return this.interopTask.isCompletedSuccessfully}},{key:"isFaulted",get:function(){return this.interopTask.isFaulted}},{key:"result",get:function(){if(this.isCompleted)return this.interopTask.result;throw new Error("The task needs to be completed before getting it's result")}},{key:"start",value:function(){this.interopTask.start()}},{key:"wait",value:function(){this.interopTask.wait()}},{key:"resolve",value:(e=u().mark((function t(){var e,r,n=this,o=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:function(){return!1},r=new Promise((function(t){for(n.start(),n.wait();!n.isCompleted;)if(e())return null;t(n.result)})),t.abrupt("return",r);case 3:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"unsafeGetInteropTask",value:function(){return this.interopTask}}]),t}();e.Task=m},8420:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dotnet=void 0;var n=r(1006),o=r(1902),i=r(9009),a={getFactories:n.getFactories,getStaticMethod:n.getStaticMethod,getStaticProperty:n.getStaticProperty,loadAssembly:n.loadAssembly,removeAssembly:n.removeAssembly,getLoadedAssemblies:n.getLoadedAssemblies,loadAssemblyAsync:n.loadAssemblyAsync,threading:{createTask:i.createTask,createThread:i.createThread,Task:i.Task,Thread:i.Thread},createList:n.createList,types:n.types,Realm:o.Realm};e.dotnet=a},8596:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e.copyFile=c,e.copyFileAsync=function(t,e){return l.apply(this,arguments)},e.createDirectory=function(t){try{_$internalBinding.CreateDirectory(t)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.createDirectoryAsync=function(t){return m.apply(this,arguments)},e.deleteDirectory=function(t){try{_$internalBinding.DeleteDirectory(t)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.deleteDirectoryAsync=function(t){return b.apply(this,arguments)},e.deleteFile=function(t){try{_$internalBinding.DeleteFile(t)}catch(e){throw new n.ReadFileError(t,e)}},e.deleteFileAsync=function(t){return d.apply(this,arguments)},e.moveFile=function(t,e){try{_$internalBinding.MoveFile(t,e,!0)}catch(r){throw new n.TransactFileError(t,e,r)}},e.moveFileAsync=function(t,e){return p.apply(this,arguments)},e.readBytes=function(t){try{return _$internalBinding.ReadFileBytes(t)}catch(e){throw new n.ReadFileError(t,e)}},e.readBytesAsync=function(t){return y.apply(this,arguments)},e.readText=function(t){try{return _$internalBinding.ReadFileText(t)}catch(e){throw new n.ReadFileError(t,e)}},e.readTextAsync=function(t){return v.apply(this,arguments)},e.renameDirectory=function(t,e){try{_$internalBinding.RenameDirectory(t,e)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.renameDirectoryAsync=function(t,e){return g.apply(this,arguments)},e.renameFile=function(t,e){try{_$internalBinding.RenameFile(t,e)}catch(r){throw new n.TransactFileError(t,e,r)}},e.renameFileAsync=function(t,e){return h.apply(this,arguments)},e.writeBytes=function(t,e){try{_$internalBinding.WriteFileBytes(t,e)}catch(e){throw new n.WriteFileError(t,e)}},e.writeBytesAsync=function(t,e){return f.apply(this,arguments)},e.writeText=function(t,e){try{_$internalBinding.WriteFileText(t,e)}catch(e){throw new n.WriteFileError(t,e)}},e.writeTextAsync=function(t,e){return s.apply(this,arguments)};var n=r(8596);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}function c(t,e){try{_$internalBinding.CopyFile(t,e,!0)}catch(r){throw new n.TransactFileError(t,e,r)}}function l(){return(l=u(i().mark((function t(e,r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.resolve(c(e,r));case 3:t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(0),new n.TransactFileError(e,r,t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))).apply(this,arguments)}function s(){return(s=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.WriteFileText(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.WriteFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function f(){return(f=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=_$internalBinding.WriteFileBytesAsync(e,r),t.prev=1,t.next=4,Promise.resolve(o.result);case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.WriteFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function h(){return(h=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.RenameFile(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactFileError(e,r,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function p(){return(p=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.MoveFile(e,r,!0)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactFileError(e,r,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function y(){return(y=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_$internalBinding.ReadFileBytesAsync(e),t.prev=1,t.next=4,Promise.resolve(r.result);case 4:return t.abrupt("return",t.sent);case 7:throw t.prev=7,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function v(){return(v=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_$internalBinding.ReadFileTextAsync(e),t.prev=1,t.next=4,Promise.resolve(r.result);case 4:return t.abrupt("return",t.sent);case 7:throw t.prev=7,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function d(){return(d=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteFile(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function m(){return(m=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteFile(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function b(){return(b=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteDirectory(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function g(){return(g=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.RenameDirectory(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}},3533:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._fs=void 0;var n=r(5493),o={readText:n.readText,writeText:n.writeText,readBytes:n.readBytes,writeBytes:n.writeBytes,readTextAsync:n.readTextAsync,writeTextAsync:n.writeTextAsync,readBytesAsync:n.readBytesAsync,writeBytesAsync:n.writeBytesAsync,deleteFile:n.deleteFile,deleteFileAsync:n.deleteFileAsync,moveFile:n.moveFile,moveFileAsync:n.moveFileAsync,copyFile:n.copyFile,renameFile:n.renameFile,renameFileAsync:n.renameFileAsync,copyFileAsync:n.copyFileAsync,createDirectory:n.createDirectory,createDirectoryAsync:n.createDirectoryAsync,deleteDirectory:n.deleteDirectory,deleteDirectoryAsync:n.deleteDirectoryAsync,renameDirectory:n.renameDirectory,renameDirectoryAsync:n.renameDirectoryAsync};e._fs=o},432:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._guards=void 0;var r={number:{isEven:function(t){return t%2==0},isOdd:function(t){return!r.number.isEven(t)},isInteger:function(t){return Number.isInteger(t)},isFloat:function(t){return!(t%1==0)}},iterable:{isEmptyArray:function(t){return 0===t.length},isEmptyObject:function(t){return r.iterable.isEmptyArray(Object.keys(t))}},string:{isNullOrEmpty:function(t){return null===t||0===t.length},isNullOrWhiteSpace:function(t){return null===t||0===t.trim().length}}};e._guards=r},8997:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.$static=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{status:200,response:t,headers:(0,n.getStaticMethod)("Newtonsoft.Json:JsonConvert:SerializeObject")(_({"Content-Type":e},r))}},e.app=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"webapp",host:"localhost",port:80,enableHttps:!1},r=e.name,n=e.host,o=e.port,i=null!==(t=e.enableHttps)&&void 0!==t&&t;return u.Melon.http._apps[r]=new L(r,n,o,i),c.http._apps[r]},e.fetch=function(t,e){return j.apply(this,arguments)},e.request=x,e.requestAsync=function(t){return S.apply(this,arguments)},e.result=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=_({"Content-Type":"application/json"},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return new P(t,e,r)};var n=r(1006),o=r(9296),i=r(3904),a=r(223),u=r(998),c=r(4847);function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};c(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,u){var c=h(t[n],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function h(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,y(t,e,"get"))}function p(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,y(t,e,"set"),r),r}function y(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r1&&void 0!==n[1]?n[1]:"GET",n.length>2&&void 0!==n[2]?n[2]:{},n.length>3&&void 0!==n[3]?n[3]:{}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function x(t){var e,r,n,i,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s={body:(0,o._tryStringify)(c),headers:(0,o._tryStringify)(l)},f=_$internalBinding.HttpRequest(t,u,s.body,s.headers);return new A(null!==(e=f.Body)&&void 0!==e?e:"",null!==(r=f.Headers)&&void 0!==r?r:{},null!==(n=f.Latency)&&void 0!==n?n:0,null!==(i=f.StatusCode)&&void 0!==i?i:599,null!==(a=f.Ok)&&void 0!==a&&a)}function j(){return(j=g(l().mark((function t(e,r){var n,o,i,u,c,s,f,h;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=_$internalBinding.Fetch(e,r),s=(new Date).getTime();case 2:if(!(c.status<=4)){t.next=7;break}return t.next=5,(0,a._nextTick)(1);case 5:t.next=2;break;case 7:return f=(new Date).getTime(),h=c.result,t.abrupt("return",new A(null!==(n=h.body)&&void 0!==n?n:"",null!==(o=h.headers)&&void 0!==o?o:{},s-f,null!==(i=h.statusCode)&&void 0!==i?i:599,null!==(u=h.ok)&&void 0!==u&&u));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var P=function(){function t(e,r,o){v(this,t),E(this,"status",void 0),E(this,"response",void 0),E(this,"headers",void 0),E(this,"serialize",(0,n.getStaticMethod)("Newtonsoft.Json:JsonConvert:SerializeObject")),this.status=e,this.response=this.serialize(r),this.headers=this.serialize(o)}return m(t,[{key:"useCors",value:function(t){var e=JSON.parse(this.headers);e["Access-Control-Allow-Headers"]=t.headers?t.headers.toString():"*",e["Access-Control-Request-Methods"]=t.methods?t.methods.toString():"*",e["Access-Control-Allow-Origin"]=t.origin?t.origin:"*",this.headers=this.serialize(e)}}]),t}(),T=new WeakMap,k=new WeakMap,L=function(){function t(e,r,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];v(this,t),E(this,"name",void 0),E(this,"host",void 0),E(this,"port",void 0),E(this,"enableHttps",void 0),f(this,T,{writable:!0,value:void 0}),f(this,k,{writable:!0,value:void 0}),this.name=e,this.host=r,this.port=n,this.enableHttps=o,p(this,k,[]),p(this,T,[])}return m(t,[{key:"getEndpoints",value:function(){return h(this,T)}},{key:"get",value:function(t,e){var r=new R(t,"GET",e);h(this,T).push(r)}},{key:"post",value:function(t,e){var r=new R(t,"POST",e);h(this,T).push(r)}},{key:"delete",value:function(t,e){var r=new R(t,"DELETE",e);h(this,T).push(r)}},{key:"put",value:function(t,e){var r=new R(t,"PUT",e);h(this,T).push(r)}},{key:"patch",value:function(t,e){var r=new R(t,"PATCH",e);h(this,T).push(r)}},{key:"head",value:function(t,e){var r=new R(t,"HEAD",e);h(this,T).push(r)}},{key:"options",value:function(t,e){var r=new R(t,"OPTIONS",e);h(this,T).push(r)}},{key:"listen",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.host;h(this,k).push({host:e,port:t})}},{key:"run",value:function(){var t=JSON.stringify({Name:this.name,Host:this.host,Port:this.port,Routes:JSON.stringify(h(this,T)),Echoes:JSON.stringify(h(this,k)),EnableHttps:this.enableHttps});_$internalBinding.SetupWebApplication(t)}}]),t}(),A=function(){function t(e,r,n,o,i){v(this,t),E(this,"body",void 0),E(this,"headers",void 0),E(this,"latency",void 0),E(this,"statusCode",void 0),E(this,"ok",void 0),this.body=e,this.headers=r,this.latency=n,this.statusCode=o,this.ok=i}return m(t,[{key:"json",value:function(){return(0,i._tryParse)(this.body)}},{key:"text",value:function(){return this.body}}]),t}(),R=m((function t(e,r,n){v(this,t),E(this,"route",void 0),E(this,"method",void 0),E(this,"callback",void 0),this.route=e,this.method=r,this.callback=n}))},4847:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.http=void 0;var n=r(8997),o={_apps:{},request:n.request,requestAsync:n.requestAsync,app:n.app,result:n.result,static:n.$static,fetch:n.fetch};e.http=o},3111:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._internalConsts=void 0,e._internalConsts={INVALID_NUMBER_CAPACITY:"The number capacity is invalid for that type",COMPARATION_LENGTH_IS_DIFFERENT:"The lengths of the compared values are different",COMPARATION_BASE_IS_DIFFERENT:"The base values of the comparation are different",NO_SUPPORT_FOR_THE_OBJECT:"There is no support for the current object type. Did you miss a customModifier?"}},2447:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EventChain=e.Event=void 0;var n=r(8932);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;if(!t)return this.events;var e,r=new Map,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.events);try{for(n.s();!(e=n.n()).done;){var o=e.value;t(o[1])&&r.set(o[0],o[1])}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"toLoggableOutput",value:function(){var t={};return this.events.forEach((function(e,r){var n=e.toLoggableOutput();t[r]=n})),t}}]),t}();e.EventChain=y},2251:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runtime=void 0;var n=r(2447),o=new n.EventChain,i={Event:n.Event,EventChain:n.EventChain,eventChain:o};e.runtime=i},2088:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedBag=void 0;var n=r(8932);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r"),a(this,"TRANSACTION_ALREADY_RUNNING_ERROR","A SharedBag transaction is already running");for(var e=arguments.length,r=new Array(e),n=0;n{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0)for(var c=0;c{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r>c),c-=6;c>=0;)e.push(128|a>>c&63),c-=6;n+=a>=65536?2:1}return this._memo[t]=e,e}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.TextEncoder=a},1077:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._std=void 0;var n=r(5409),o=r(223),i=r(3400),a=r(4145),u=r(7925),c=r(9691),l=r(7238),s=r(2293),f=r(3904),h=r(9296),p=r(8138),y=r(1752),v=r(1750),d=r(2088),m=r(9508),b=r(7173),g=r(1125),w=r(8831),_=r(9049),E=r(3760),O=r(4224),S=r(2124),x=r(9871),j=r(4489),P=r(6668),T=r(4525),k=r(6546),L={SharedBag:d.SharedBag,TextDecoder:b.TextDecoder,TextEncoder:g.TextEncoder,shift:x.shift,async:{nextTick:o._nextTick},melon:{currentVersion:new n._Version},boolean:{checkAll:i._checkAll,checkOne:a._checkOne},json:{tryParse:f._tryParse,tryStringify:h._tryStringify,deserialize:j.deserialize,serialize:P.serialize,tryDeserialize:T.tryDeserialize,trySerialize:k.trySerialize},time:{_timers:new Array,setInterval:O._setInterval,setTimeout:S.setTimeout,clearTimeout:E._clearTimeout,clearInterval:_._clearInterval,Timer:w.Timer},system:{osInformation:m.osInformation},environment:{baseDirectory:u._baseDirectory,getEnvironmentVariables:l._getEnvironmentVariables,setEnvironmentVariable:s._setEnvironmentVariable,clearLocalEnvironmentVariables:c._clearLocalEnvironmentVariables},process:{argv:p._argv,env:y._env,exit:v._exit}};e._std=L},223:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new P(n||[]);return i(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&o.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,a,u,c){var l=h(t[i],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function o(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))}}function a(){return a=i(n().mark((function t(e){var r,o,a;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=i(n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),o=0,!e){t.next=11;break}a=(new Date).getTime();case 4:if(!(o{Object.defineProperty(e,"__esModule",{value:!0}),e._checkAll=function(t,e){return e.map((function(e){return t(e)})).every((function(t){return!0===t}))}},4145:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._checkOne=function(t,e){return null!==e.map((function(e){return t(e)})).find((function(t){return!0===t}))}},7925:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._baseDirectory=void 0;var n=(0,r(1006).getStaticProperty)("System:Environment:CurrentDirectory");e._baseDirectory=n},9691:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clearLocalEnvironmentVariables=function(){_$internalBinding.LocalEnvironmentVariables.clear(),n._std.process.env=_$internalBinding.ProcessEnvironmentVariables};var n=r(1077)},7238:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._getEnvironmentVariables=function(){var t=_$internalBinding.LocalEnvironmentVariables,e=(0,n.getStaticMethod)("System:Environment:GetEnvironmentVariables")();return Object.assign(t,e)};var n=r(1006)},2293:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._setEnvironmentVariable=function(t,e){_$internalBinding.LocalEnvironmentVariables[t]=e,n._std.process.env[t]=e};var n=r(1077)},3356:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e._tryParse=function(t){try{return JSON.parse(t)}catch(t){return{}}}},9296:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._tryStringify=function(t){try{return JSON.stringify(t)}catch(t){return""}}},4489:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.deserialize=function(t){return _$internalBinding.Deserialize(t)}},6668:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=function(t){return _$internalBinding.Serialize(t)}},4525:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDeserialize=function(t){try{var e=JSON.parse(t);return n.Result.right(e)}catch(t){return n.Result.left(t)}};var n=r(3356)},6546:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.trySerialize=function(t){try{var e=JSON.stringify(t);return n.Result.right(e)}catch(t){return n.Result.left(t)}};var n=r(3356)},8138:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._argv=void 0;var n=(0,r(1006).getStaticMethod)("System:Environment:GetCommandLineArgs")();e._argv=n},1752:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._env=void 0;var r=Object.assign(_$internalBinding.LocalEnvironmentVariables,_$internalBinding.ProcessEnvironmentVariables);e._env=r},1750:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._exit=void 0,e._exit=function(t){return _$internalBinding.ProcessExit(t)}},9871:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shift=function t(){return{option:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||r(),!n)return t()}}}},2124:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.setTimeout=function(t,e){var r=n._crypto.randomUUID();return f[r]=new s(t,e),f[r].fire(),r},e.timers=void 0;var n=r(8932);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t,e){for(var r=0;r=this.time)){t.next=4;break}return this.callback(),t.abrupt("return");case 4:if(this.cancelled){t.next=8;break}return t.next=7,this.fire();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))},function(){return o.apply(this,arguments)})}],r&&u(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),f={};e.timers=f},9508:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.osInformation=void 0;var n=r(1006);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e._clearInterval=function(t){n._std.time._timers[t].clear()};var n=r(1077)},3760:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clearTimeout=function(t){n._std.time._timers[t].clear()};var n=r(1077)},4224:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._setInterval=function(t,e){var r=n._crypto.randomUUID();return o._std.time._timers[r]=new i.Timer(t),a(r,e),r};var n=r(3901),o=r(1077),i=r(8831),a=_$internalBinding.DefineIntervalOf},9968:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e.test=function(t,e){var r=new o.Assert;e(r);var i=o.AssertHandler.getProblems(r);if((0,n.writeLine)(""),(0,n.write)("[Melon Test] ","DarkYellow"),(0,n.write)(t,"Cyan"),(0,n.writeLine)(""),i.length){(0,n.writeLine)("");var a=i.join("\n");throw new Error(a)}(0,n.write)("[Melon Test] ","DarkYellow"),(0,n.write)("Ran with success","Green"),(0,n.writeLine)("")};var n=r(5189),o=r(9968)},4429:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.testing=void 0;var n={test:r(5130).test};e.testing=n},8932:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._crypto=void 0;var r={randomUUID:function(){return _$internalBinding.CallStaticMethod("System","Guid","NewGuid",[]).toString()}};e._crypto=r},3901:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._crypto=void 0;var r={randomUUID:function(){return _$internalBinding.CallStaticMethod("System","Guid","NewGuid",[]).toString()}};e._crypto=r},5650:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addPrototypeExtension=function(t,e,r){t.prototype[e]=r}},2517:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.setupEnvironmentVariables=function(){if(0!==i.interopCache.io.getFiles("./","*.env").length){var t=(0,n.readText)("./.env");if(!a._guards.string.isNullOrWhiteSpace(t)){var e=function(t){var e=t.split("\n").map((function(t){return t.trim()})).filter((function(t){return!t.startsWith("#")})).map((function(t){return t.split("=")})).filter((function(t){return 2===t.length})).filter((function(t){return Boolean(t[0])&&Boolean(t[1])}));return Object.fromEntries(e)}(t);Object.entries(e).forEach((function(t){return(0,o._setEnvironmentVariable)(t[0],t[1])}))}}};var n=r(5493),o=r(2293),i=r(8363),a=r(432)},5261:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.and=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{Object.defineProperty(e,"__esModule",{value:!0}),e.interopCache=void 0;var n=r(1006),o={serialization:{serialize:(0,n.getStaticMethod)("System.Text.Json:JsonSerializer:Serialize")},console:{writeLine:(0,n.getStaticMethod)("System:Console:WriteLine"),write:(0,n.getStaticMethod)("System:Console:WriteLine"),clear:(0,n.getStaticMethod)("System:Console:Clear")},clinet:{writeLine:(0,n.getStaticMethod)("Cli.NET.Tools:CLNConsole:WriteLine"),write:(0,n.getStaticMethod)("Cli.NET.Tools:CLNConsole:Write")},io:{getFiles:(0,n.getStaticMethod)("System.IO:Directory:GetFiles")}};e.interopCache=o}},e={};!function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(998)})(); \ No newline at end of file +(()=>{"use strict";var t={9563:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,"major",0),o(this,"minor",0),o(this,"patch",0),this.major=e,this.minor=r,this.patch=n}var e,r;return e=t,(r=[{key:"toString",value:function(){return"".concat(this.major,".").concat(this.minor,".").concat(this.patch)}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._Version=a},7929:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return o(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},n(t)}function o(t,e,r){return o=i()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},o.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidArgumentError=void 0;var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,t);var e,n,o,c=(n=l,o=i(),function(){var t,e=u(n);if(o){var i=u(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function l(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l);for(var e=arguments.length,r=new Array(e),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.clear=function(){try{return n.interopCache.console.clear(),o.Result.right([])}catch(t){return o.Result.left(t)}},e.error=function(){try{switch(arguments.length){case 0:return o.Result.right(0);case 1:return n.interopCache.clinet.writeLine(s(arguments[0]),"Red"),o.Result.right(1);default:for(var t=0;t1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"[%label] [%time]",i=f.timers[t].stop().match((function(t){return t}),(function(t){return t}));return i.constructor==Error?o.Result.left(i):(e&&n.interopCache.console.writeLine(r.replaceAll("%label",t).replaceAll("%time",i.toString())),o.Result.right(f.timers[t]))},e.warn=function(){try{switch(arguments.length){case 0:return o.Result.right(0);case 1:return n.interopCache.clinet.writeLine(s(arguments[0]),"Yellow"),o.Result.right(1);default:for(var t=0;t{Object.defineProperty(e,"__esModule",{value:!0}),e.console=void 0;var n=r(6903),o={time:n.time,timeEnd:n.timeEnd,log:n.log,write:n.write,writeLine:n.writeLine,error:n.error,warn:n.warn,clear:n.clear,table:n.table};e.console=o},7674:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clone=function(t){return _$internalBinding.DeepClone(t)}},6117:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._compare=function t(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,e){return t===e},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,u={comment:"",equals:!1},c=function(e,r){var n=[];return e.forEach((function(e,o){var u=e,c=r[o],l=t(u,c,i,a).equals;n.push(l)})),n.every((function(t){return!0===t}))};switch(o(e)){case"string":case"number":case"boolean":return e.toString().length!=r.toString().length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):function(t,e){return i(t,e)}(e,r)?(u.equals=!0,u):(u.comment=n._internalConsts.COMPARATION_BASE_IS_DIFFERENT,u);case"object":if(Array.isArray(e))return e.length!=r.length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=c(e,r),u);if(e.constructor===Set)return e.size!=r.size?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Array.from(t),Array.from(e))}(e,r),u);if(e.constructor===Map)return e.size!=r.size?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Array.from(t.entries()),Array.from(e.entries()))}(e,r),u);if(e.constructor===Object)return Object.keys(e).length!=Object.keys(r).length?(u.comment=n._internalConsts.COMPARATION_LENGTH_IS_DIFFERENT,u):(u.equals=function(t,e){return c(Object.entries(t),Object.entries(e))}(e,r),u)}if(a){var l=a(e,r);return t(l[0],l[1])}throw new TypeError(n._internalConsts.NO_SUPPORT_FOR_THE_OBJECT)};var n=r(4084);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}},445:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._data=void 0;var n=r(5989),o=r(9719),i=r(1988),a=r(8161),u=r(7674),c=r(6117),l={clone:u._clone,compare:c._compare,PgClient:o._PgClient,MySqlClient:n._MySqlClient,SqlServerClient:a._SqlServerClient,PgDocumentClient:i._PgDocumentClient};e._data=l},5989:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._MySqlClient=void 0;var o=r(7929);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.MySqlBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.MySqlBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._MySqlClient=p},9719:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._PgClient=void 0;var o=r(7929);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.PostgreSQLBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.PostgreSQLBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._PgClient=p},1988:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._PgDocumentClient=void 0;var n=r(7929),o=r(2153),i=r(7032),a=r(9719);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,c){var l=h(t[n],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function l(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){l(i,n,o,a,u,"next",t)}function u(t){l(i,n,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e,r){return f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&h(o,r.prototype),o},f.apply(null,arguments)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw f(n.InvalidArgumentError,function(t){if(Array.isArray(t))return p(t)}(u=c)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(u)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this._provider=new a._PgClient(e)}var e,r,o,u,l,h,b,g;return e=t,r=[{key:"createDictionaryAsync",value:(g=s(c().mark((function t(e){var r;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return r="\n CREATE TABLE ".concat(e," (\n name varchar(255) PRIMARY KEY,\n document JSONB\n );\n "),t.next=5,(0,i._nextTick)();case 5:this._provider.executeNonQuery(r);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"addDocumentAsync",value:(b=s(c().mark((function t(e,r,o){var a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return a=JSON.stringify(o),u="\n INSERT INTO ".concat(e," (name, document) \n VALUES ('").concat(r,"', '").concat(a,"')\n "),t.next=6,(0,i._nextTick)();case 6:this._provider.executeNonQuery(u);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return b.apply(this,arguments)})},{key:"updateDocumentAsync",value:(h=s(c().mark((function t(e,r,o){var a,u;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return a=JSON.stringify(o),u="\n UPDATE ".concat(e," SET document = '").concat(a,"'\n WHERE name = '").concat(r,"'\n "),t.next=6,(0,i._nextTick)();case 6:this._provider.executeNonQuery(u);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return h.apply(this,arguments)})},{key:"getDocumentAsync",value:(l=s(c().mark((function t(e,r){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n SELECT document FROM ".concat(e," WHERE name = '").concat(r,"'\n "),t.next=5,(0,i._nextTick)();case 5:return t.abrupt("return",this._provider.executeQuery(o)[0].document);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return l.apply(this,arguments)})},{key:"getDocuments",value:(u=s(c().mark((function t(e,r){var o,a;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n SELECT * FROM ".concat(e,"\n "),t.next=5,(0,i._nextTick)();case 5:return a=this._provider.executeQuery(o).map((function(t){return JSON.parse(t.document)})),r&&(a=a.filter(r)),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"deleteDocumentAsync",value:(o=s(c().mark((function t(e,r){var o;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(e)&&m(r)){t.next=2;break}throw new n.InvalidArgumentError("The name is invalid, should contain only letters and numbers");case 2:return o="\n DELETE FROM ".concat(e," WHERE name = '").concat(r,"'\n "),t.next=5,(0,i._nextTick)();case 5:this._provider.executeNonQuery(o);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&y(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._PgDocumentClient=b},8161:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e._SqlServerClient=void 0;var o=r(7929);function i(t,e,r){return i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},i.apply(null,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0)throw i(o.InvalidArgumentError,function(t){if(Array.isArray(t))return u(t)}(c=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());!function(t,e,r){(function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}})(t,s(t,e,"set"),r)}(this,h,e)}var e,r;return e=t,(r=[{key:"executeNonQuery",value:function(t){return(0,_$internalBinding.SqlServerBindingNonQuery)(t,l(this,h))}},{key:"executeQuery",value:function(t){var e=(0,_$internalBinding.SqlServerBindingQuery)(t,l(this,h));return JSON.parse(e)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e._SqlServerClient=p},6281:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createList=function(t){return _$internalBinding.CreateList(t)},e.getFactories=function(t){var e=_$internalBinding.GetTypes(t),r=i("System:Activator:CreateInstance"),n={};return e.forEach((function(t){var e=t.name[0].toLowerCase()+t.name.slice(1);n[e]={new:function(){for(var e=arguments.length,n=new Array(e),o=0;o127||t<-128)throw new RangeError(r);return{type:"sbyte",value:Math.floor(t)}},byte:function(t){if(t>255||t<0)throw new RangeError(r);return{type:"byte",value:Math.floor(t)}},short:function(t){if(t>32767||t<-32768)throw new RangeError(r);return{type:"short",value:Math.floor(t)}},ushort:function(t){if(t>65535||t<0)throw new RangeError(r);return{type:"ushort",value:Math.floor(t)}},int:function(t){if(t>2147483647||t<-2147483648)throw new RangeError(r);return{type:"int",value:Math.floor(t)}},uint:function(t){if(t>4294967295||t<0)throw new RangeError(r);return{type:"uint",value:Math.floor(t)}},long:function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new RangeError(r);return{type:"long",value:Math.floor(t)}},ulong:function(t){if(t>0x10000000000000000||t<0)throw new RangeError(r);return{type:"ulong",value:Math.floor(t)}},float:function(t){return{type:"float",number:t}},double:function(t){return{type:"double",number:t}},decimal:function(t){return{type:"decimal",number:t}}};function o(t){return t.split(":")}function i(t){var e=o(t);return function(){for(var t=arguments.length,r=new Array(t),n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.Realm=void 0;var n=r(7163),o=r(136);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function l(t,e){for(var r=0;r0&&void 0!==r[0]?r[0]:0,t.next=3,Promise.resolve(_$internalBinding.DeleteRealm(this.name,e));case 3:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"setValue",value:(u=c(a().mark((function t(e,r){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.locked){t.next=3;break}return n=new Error("Can not interact with the realm while it is locked."),t.abrupt("return",o.Result.left(n));case 3:return this.locked=!0,t.next=6,Promise.resolve(_$internalBinding.SetRealmScriptProperty(this.name,e,r));case 6:return this.itemNames.push(e),this.locked=!1,t.abrupt("return",o.Result.right(!0));case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"setInstance",value:(i=c(a().mark((function t(e,r){var n,i,u,c,l,s,f,h=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.locked){t.next=3;break}return n=new Error("Can not interact with the realm while it is locked."),t.abrupt("return",o.Result.left(n));case 3:for(i=r.split(":"),u=i[0],c=i[1],this.locked=!0,l=h.length,s=new Array(l>2?l-2:0),f=2;f{Object.defineProperty(e,"__esModule",{value:!0}),e.Thread=e.Task=void 0,e.createTask=v,e.createThread=y;var n=r(7163),o=r(6903),i=r(6281);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(){u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,u,c){var l=h(t[n],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;this.interopThread.abort(t)}},{key:"suspend",value:function(){this.interopThread.suspend()}},{key:"resume",value:function(){this.interopThread.resume()}},{key:"join",value:function(){this.interopThread.join()}},{key:"yield",value:function(){this.interopThread.yield()}},{key:"memoryBarrier",value:function(){this.interopThread.memoryBarrier()}},{key:"beginCriticalRegion",value:function(){this.interopThread.beginCriticalRegion()}},{key:"endCriticalRegion",value:function(){this.interopThread.endCriticalRegion()}},{key:"unsafeGetInteropThread",value:function(){return this.interopThread}},{key:"unsafeGetInteropAction",value:function(){return this.interopAction}},{key:"unsafeSetInteropThread",value:function(t){this.interopThread=t}}],[{key:"currentThread",get:function(){var e=(0,i.getStaticProperty)("System.Threading:Thread:CurrentThread"),r=new t;return r.interopThread=e,r}},{key:"panic",value:function(e){(0,o.error)(null!=e?e:""),t.currentThread.abort(101)}}]),t}();e.Thread=d,h(d,"threads",{});var m=function(){function t(e){l(this,t),h(this,"interopTask",void 0),this.interopTask=v(e)}var e,r;return f(t,[{key:"isCanceled",get:function(){return this.interopTask.isCanceled}},{key:"isCompleted",get:function(){return this.interopTask.isCompleted}},{key:"isCompletedSuccessfully",get:function(){return this.interopTask.isCompletedSuccessfully}},{key:"isFaulted",get:function(){return this.interopTask.isFaulted}},{key:"result",get:function(){if(this.isCompleted)return this.interopTask.result;throw new Error("The task needs to be completed before getting it's result")}},{key:"start",value:function(){this.interopTask.start()}},{key:"wait",value:function(){this.interopTask.wait()}},{key:"resolve",value:(e=u().mark((function t(){var e,r,n=this,o=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:function(){return!1},r=new Promise((function(t){for(n.start(),n.wait();!n.isCompleted;)if(e())return null;t(n.result)})),t.abrupt("return",r);case 3:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"unsafeGetInteropTask",value:function(){return this.interopTask}}]),t}();e.Task=m},9016:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dotnet=void 0;var n=r(6281),o=r(8239),i=r(1247),a={getFactories:n.getFactories,getStaticMethod:n.getStaticMethod,getStaticProperty:n.getStaticProperty,loadAssembly:n.loadAssembly,removeAssembly:n.removeAssembly,getLoadedAssemblies:n.getLoadedAssemblies,loadAssemblyAsync:n.loadAssemblyAsync,threading:{createTask:i.createTask,createThread:i.createThread,Task:i.Task,Thread:i.Thread},createList:n.createList,types:n.types,Realm:o.Realm};e.dotnet=a},50:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e.copyFile=c,e.copyFileAsync=function(t,e){return l.apply(this,arguments)},e.createDirectory=function(t){try{_$internalBinding.CreateDirectory(t)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.createDirectoryAsync=function(t){return m.apply(this,arguments)},e.deleteDirectory=function(t){try{_$internalBinding.DeleteDirectory(t)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.deleteDirectoryAsync=function(t){return b.apply(this,arguments)},e.deleteFile=function(t){try{_$internalBinding.DeleteFile(t)}catch(e){throw new n.ReadFileError(t,e)}},e.deleteFileAsync=function(t){return d.apply(this,arguments)},e.moveFile=function(t,e){try{_$internalBinding.MoveFile(t,e,!0)}catch(r){throw new n.TransactFileError(t,e,r)}},e.moveFileAsync=function(t,e){return p.apply(this,arguments)},e.readBytes=function(t){try{return _$internalBinding.ReadFileBytes(t)}catch(e){throw new n.ReadFileError(t,e)}},e.readBytesAsync=function(t){return y.apply(this,arguments)},e.readText=function(t){try{return _$internalBinding.ReadFileText(t)}catch(e){throw new n.ReadFileError(t,e)}},e.readTextAsync=function(t){return v.apply(this,arguments)},e.renameDirectory=function(t,e){try{_$internalBinding.RenameDirectory(t,e)}catch(e){throw new n.TransactDirectoryError(t,e)}},e.renameDirectoryAsync=function(t,e){return g.apply(this,arguments)},e.renameFile=function(t,e){try{_$internalBinding.RenameFile(t,e)}catch(r){throw new n.TransactFileError(t,e,r)}},e.renameFileAsync=function(t,e){return h.apply(this,arguments)},e.writeBytes=function(t,e){try{_$internalBinding.WriteFileBytes(t,e)}catch(e){throw new n.WriteFileError(t,e)}},e.writeBytesAsync=function(t,e){return f.apply(this,arguments)},e.writeText=function(t,e){try{_$internalBinding.WriteFileText(t,e)}catch(e){throw new n.WriteFileError(t,e)}},e.writeTextAsync=function(t,e){return s.apply(this,arguments)};var n=r(50);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}function c(t,e){try{_$internalBinding.CopyFile(t,e,!0)}catch(r){throw new n.TransactFileError(t,e,r)}}function l(){return(l=u(i().mark((function t(e,r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.resolve(c(e,r));case 3:t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(0),new n.TransactFileError(e,r,t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))).apply(this,arguments)}function s(){return(s=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.WriteFileText(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.WriteFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function f(){return(f=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=_$internalBinding.WriteFileBytesAsync(e,r),t.prev=1,t.next=4,Promise.resolve(o.result);case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.WriteFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function h(){return(h=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.RenameFile(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactFileError(e,r,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function p(){return(p=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.MoveFile(e,r,!0)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactFileError(e,r,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function y(){return(y=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_$internalBinding.ReadFileBytesAsync(e),t.prev=1,t.next=4,Promise.resolve(r.result);case 4:return t.abrupt("return",t.sent);case 7:throw t.prev=7,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function v(){return(v=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=_$internalBinding.ReadFileTextAsync(e),t.prev=1,t.next=4,Promise.resolve(r.result);case 4:return t.abrupt("return",t.sent);case 7:throw t.prev=7,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 10:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function d(){return(d=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteFile(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.ReadFileError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function m(){return(m=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteFile(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function b(){return(b=u(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(){return _$internalBinding.DeleteDirectory(e)},t.prev=1,t.next=4,Promise.resolve(r());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function g(){return(g=u(i().mark((function t(e,r){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(){return _$internalBinding.RenameDirectory(e,r)},t.prev=1,t.next=4,Promise.resolve(o());case 4:t.next=9;break;case 6:throw t.prev=6,t.t0=t.catch(1),new n.TransactDirectoryError(e,t.t0);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}},7401:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._fs=void 0;var n=r(5173),o={readText:n.readText,writeText:n.writeText,readBytes:n.readBytes,writeBytes:n.writeBytes,readTextAsync:n.readTextAsync,writeTextAsync:n.writeTextAsync,readBytesAsync:n.readBytesAsync,writeBytesAsync:n.writeBytesAsync,deleteFile:n.deleteFile,deleteFileAsync:n.deleteFileAsync,moveFile:n.moveFile,moveFileAsync:n.moveFileAsync,copyFile:n.copyFile,renameFile:n.renameFile,renameFileAsync:n.renameFileAsync,copyFileAsync:n.copyFileAsync,createDirectory:n.createDirectory,createDirectoryAsync:n.createDirectoryAsync,deleteDirectory:n.deleteDirectory,deleteDirectoryAsync:n.deleteDirectoryAsync,renameDirectory:n.renameDirectory,renameDirectoryAsync:n.renameDirectoryAsync};e._fs=o},2153:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._guards=void 0;var r={number:{isEven:function(t){return t%2==0},isOdd:function(t){return!r.number.isEven(t)},isInteger:function(t){return Number.isInteger(t)},isFloat:function(t){return!(t%1==0)}},iterable:{isEmptyArray:function(t){return 0===t.length},isEmptyObject:function(t){return r.iterable.isEmptyArray(Object.keys(t))}},string:{isNullOrEmpty:function(t){return null===t||0===t.length},isNullOrWhiteSpace:function(t){return null===t||0===t.trim().length}}};e._guards=r},5350:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.$static=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{status:200,response:t,headers:(0,n.getStaticMethod)("Newtonsoft.Json:JsonConvert:SerializeObject")(_({"Content-Type":e},r))}},e.app=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"webapp",host:"localhost",port:80,enableHttps:!1},r=e.name,n=e.host,o=e.port,i=null!==(t=e.enableHttps)&&void 0!==t&&t;return u.Melon.http._apps[r]=new L(r,n,o,i),c.http._apps[r]},e.fetch=function(t,e){return j.apply(this,arguments)},e.request=x,e.requestAsync=function(t){return S.apply(this,arguments)},e.result=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=_({"Content-Type":"application/json"},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return new P(t,e,r)};var n=r(6281),o=r(5532),i=r(2331),a=r(7032),u=r(998),c=r(3225);function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};c(m,i,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,i)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,i,a,u){var c=h(t[n],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function h(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,y(t,e,"get"))}function p(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,y(t,e,"set"),r),r}function y(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r1&&void 0!==n[1]?n[1]:"GET",n.length>2&&void 0!==n[2]?n[2]:{},n.length>3&&void 0!==n[3]?n[3]:{}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function x(t){var e,r,n,i,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s={body:(0,o._tryStringify)(c),headers:(0,o._tryStringify)(l)},f=_$internalBinding.HttpRequest(t,u,s.body,s.headers);return new A(null!==(e=f.Body)&&void 0!==e?e:"",null!==(r=f.Headers)&&void 0!==r?r:{},null!==(n=f.Latency)&&void 0!==n?n:0,null!==(i=f.StatusCode)&&void 0!==i?i:599,null!==(a=f.Ok)&&void 0!==a&&a)}function j(){return(j=g(l().mark((function t(e,r){var n,o,i,u,c,s,f,h;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=_$internalBinding.Fetch(e,r),s=(new Date).getTime();case 2:if(!(c.status<=4)){t.next=7;break}return t.next=5,(0,a._nextTick)(1);case 5:t.next=2;break;case 7:return f=(new Date).getTime(),h=c.result,t.abrupt("return",new A(null!==(n=h.body)&&void 0!==n?n:"",null!==(o=h.headers)&&void 0!==o?o:{},s-f,null!==(i=h.statusCode)&&void 0!==i?i:599,null!==(u=h.ok)&&void 0!==u&&u));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var P=function(){function t(e,r,o){v(this,t),E(this,"status",void 0),E(this,"response",void 0),E(this,"headers",void 0),E(this,"serialize",(0,n.getStaticMethod)("Newtonsoft.Json:JsonConvert:SerializeObject")),this.status=e,this.response=this.serialize(r),this.headers=this.serialize(o)}return m(t,[{key:"useCors",value:function(t){var e=JSON.parse(this.headers);e["Access-Control-Allow-Headers"]=t.headers?t.headers.toString():"*",e["Access-Control-Request-Methods"]=t.methods?t.methods.toString():"*",e["Access-Control-Allow-Origin"]=t.origin?t.origin:"*",this.headers=this.serialize(e)}}]),t}(),T=new WeakMap,k=new WeakMap,L=function(){function t(e,r,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];v(this,t),E(this,"name",void 0),E(this,"host",void 0),E(this,"port",void 0),E(this,"enableHttps",void 0),f(this,T,{writable:!0,value:void 0}),f(this,k,{writable:!0,value:void 0}),this.name=e,this.host=r,this.port=n,this.enableHttps=o,p(this,k,[]),p(this,T,[])}return m(t,[{key:"getEndpoints",value:function(){return h(this,T)}},{key:"get",value:function(t,e){var r=new R(t,"GET",e);h(this,T).push(r)}},{key:"post",value:function(t,e){var r=new R(t,"POST",e);h(this,T).push(r)}},{key:"delete",value:function(t,e){var r=new R(t,"DELETE",e);h(this,T).push(r)}},{key:"put",value:function(t,e){var r=new R(t,"PUT",e);h(this,T).push(r)}},{key:"patch",value:function(t,e){var r=new R(t,"PATCH",e);h(this,T).push(r)}},{key:"head",value:function(t,e){var r=new R(t,"HEAD",e);h(this,T).push(r)}},{key:"options",value:function(t,e){var r=new R(t,"OPTIONS",e);h(this,T).push(r)}},{key:"listen",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.host;h(this,k).push({host:e,port:t})}},{key:"run",value:function(){var t=JSON.stringify({Name:this.name,Host:this.host,Port:this.port,Routes:JSON.stringify(h(this,T)),Echoes:JSON.stringify(h(this,k)),EnableHttps:this.enableHttps});_$internalBinding.SetupWebApplication(t)}}]),t}(),A=function(){function t(e,r,n,o,i){v(this,t),E(this,"body",void 0),E(this,"headers",void 0),E(this,"latency",void 0),E(this,"statusCode",void 0),E(this,"ok",void 0),this.body=e,this.headers=r,this.latency=n,this.statusCode=o,this.ok=i}return m(t,[{key:"json",value:function(){return(0,i._tryParse)(this.body)}},{key:"text",value:function(){return this.body}}]),t}(),R=m((function t(e,r,n){v(this,t),E(this,"route",void 0),E(this,"method",void 0),E(this,"callback",void 0),this.route=e,this.method=r,this.callback=n}))},3225:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.http=void 0;var n=r(5350),o={_apps:{},request:n.request,requestAsync:n.requestAsync,app:n.app,result:n.result,static:n.$static,fetch:n.fetch};e.http=o},4084:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._internalConsts=void 0,e._internalConsts={INVALID_NUMBER_CAPACITY:"The number capacity is invalid for that type",COMPARATION_LENGTH_IS_DIFFERENT:"The lengths of the compared values are different",COMPARATION_BASE_IS_DIFFERENT:"The base values of the comparation are different",NO_SUPPORT_FOR_THE_OBJECT:"There is no support for the current object type. Did you miss a customModifier?"}},9789:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EventChain=e.Event=void 0;var n=r(7163);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;if(!t)return this.events;var e,r=new Map,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.events);try{for(n.s();!(e=n.n()).done;){var o=e.value;t(o[1])&&r.set(o[0],o[1])}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"toLoggableOutput",value:function(){var t={};return this.events.forEach((function(e,r){var n=e.toLoggableOutput();t[r]=n})),t}}]),t}();e.EventChain=y},5952:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.runtime=void 0;var n=r(9789),o=new n.EventChain,i={Event:n.Event,EventChain:n.EventChain,eventChain:o};e.runtime=i},5131:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedBag=void 0;var n=r(7163);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r"),a(this,"TRANSACTION_ALREADY_RUNNING_ERROR","A SharedBag transaction is already running");for(var e=arguments.length,r=new Array(e),n=0;n{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0)for(var c=0;c{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r>c),c-=6;c>=0;)e.push(128|a>>c&63),c-=6;n+=a>=65536?2:1}return this._memo[t]=e,e}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.TextEncoder=a},3965:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._std=void 0;var n=r(9563),o=r(7032),i=r(8061),a=r(7226),u=r(5435),c=r(7045),l=r(6e3),s=r(7091),f=r(2331),h=r(5532),p=r(4145),y=r(4026),v=r(5644),d=r(5131),m=r(3847),b=r(1823),g=r(6906),w=r(9119),_=r(5009),E=r(8859),O=r(7029),S=r(7057),x=r(6792),j=r(4471),P=r(9848),T=r(5519),k=r(5040),L={SharedBag:d.SharedBag,TextDecoder:b.TextDecoder,TextEncoder:g.TextEncoder,shift:x.shift,async:{nextTick:o._nextTick},melon:{currentVersion:new n._Version},boolean:{checkAll:i._checkAll,checkOne:a._checkOne},json:{tryParse:f._tryParse,tryStringify:h._tryStringify,deserialize:j.deserialize,serialize:P.serialize,tryDeserialize:T.tryDeserialize,trySerialize:k.trySerialize},time:{_timers:new Array,setInterval:O._setInterval,setTimeout:S.setTimeout,clearTimeout:E._clearTimeout,clearInterval:_._clearInterval,Timer:w.Timer},system:{osInformation:m.osInformation},environment:{baseDirectory:u._baseDirectory,getEnvironmentVariables:l._getEnvironmentVariables,setEnvironmentVariable:s._setEnvironmentVariable,clearLocalEnvironmentVariables:c._clearLocalEnvironmentVariables},process:{argv:p._argv,env:y._env,exit:v._exit}};e._std=L},7032:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new P(n||[]);return i(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&o.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,a,u,c){var l=h(t[i],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function o(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))}}function a(){return a=i(n().mark((function t(e){var r,o,a;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=i(n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),o=0,!e){t.next=11;break}a=(new Date).getTime();case 4:if(!(o{Object.defineProperty(e,"__esModule",{value:!0}),e._checkAll=function(t,e){return e.map((function(e){return t(e)})).every((function(t){return!0===t}))}},7226:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._checkOne=function(t,e){return null!==e.map((function(e){return t(e)})).find((function(t){return!0===t}))}},5435:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._baseDirectory=void 0;var n=(0,r(6281).getStaticProperty)("System:Environment:CurrentDirectory");e._baseDirectory=n},7045:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clearLocalEnvironmentVariables=function(){_$internalBinding.LocalEnvironmentVariables.clear(),n._std.process.env=_$internalBinding.ProcessEnvironmentVariables};var n=r(3965)},6e3:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._getEnvironmentVariables=function(){var t=_$internalBinding.LocalEnvironmentVariables,e=(0,n.getStaticMethod)("System:Environment:GetEnvironmentVariables")();return Object.assign(t,e)};var n=r(6281)},7091:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._setEnvironmentVariable=function(t,e){_$internalBinding.LocalEnvironmentVariables[t]=e,n._std.process.env[t]=e};var n=r(3965)},136:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e._tryParse=function(t){try{return JSON.parse(t)}catch(t){return{}}}},5532:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._tryStringify=function(t){try{return JSON.stringify(t)}catch(t){return""}}},4471:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.deserialize=function(t){return _$internalBinding.Deserialize(t)}},9848:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=function(t){return _$internalBinding.Serialize(t)}},5519:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDeserialize=function(t){try{var e=JSON.parse(t);return n.Result.right(e)}catch(t){return n.Result.left(t)}};var n=r(136)},5040:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.trySerialize=function(t){try{var e=JSON.stringify(t);return n.Result.right(e)}catch(t){return n.Result.left(t)}};var n=r(136)},4145:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._argv=void 0;var n=(0,r(6281).getStaticMethod)("System:Environment:GetCommandLineArgs")();e._argv=n},4026:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._env=void 0;var r=Object.assign(_$internalBinding.LocalEnvironmentVariables,_$internalBinding.ProcessEnvironmentVariables);e._env=r},5644:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._exit=void 0,e._exit=function(t){return _$internalBinding.ProcessExit(t)}},6792:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shift=function t(){return{option:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||r(),!n)return t()}}}},7057:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.setTimeout=function(t,e){var r=n._crypto.randomUUID();return f[r]=new s(t,e),f[r].fire(),r},e.timers=void 0;var n=r(7163);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),u=new P(o||[]);return n(a,"_invoke",{value:O(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function y(){}function v(){}function d(){}var m={};s(m,u,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(T([])));g&&g!==e&&r.call(g,u)&&(m=g);var w=d.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,u,c){var l=h(t[n],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function u(t,e){for(var r=0;r=this.time)){t.next=4;break}return this.callback(),t.abrupt("return");case 4:if(this.cancelled){t.next=8;break}return t.next=7,this.fire();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))},function(){return o.apply(this,arguments)})}],r&&u(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),f={};e.timers=f},3847:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.osInformation=void 0;var n=r(6281);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e._clearInterval=function(t){n._std.time._timers[t].clear()};var n=r(3965)},8859:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._clearTimeout=function(t){n._std.time._timers[t].clear()};var n=r(3965)},7029:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._setInterval=function(t,e){var r=n._crypto.randomUUID();return o._std.time._timers[r]=new i.Timer(t),a(r,e),r};var n=r(3048),o=r(3965),i=r(9119),a=_$internalBinding.DefineIntervalOf},7565:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r{Object.defineProperty(e,"__esModule",{value:!0}),e.test=function(t,e){var r=new o.Assert;e(r);var i=o.AssertHandler.getProblems(r);if((0,n.writeLine)(""),(0,n.write)("[Melon Test] ","DarkYellow"),(0,n.write)(t,"Cyan"),(0,n.writeLine)(""),i.length){(0,n.writeLine)("");var a=i.join("\n");throw new Error(a)}(0,n.write)("[Melon Test] ","DarkYellow"),(0,n.write)("Ran with success","Green"),(0,n.writeLine)("")};var n=r(6903),o=r(7565)},6448:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.testing=void 0;var n={test:r(3073).test};e.testing=n},7163:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._crypto=void 0;var r={randomUUID:function(){return _$internalBinding.CallStaticMethod("System","Guid","NewGuid",[]).toString()}};e._crypto=r},3048:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e._crypto=void 0;var r={randomUUID:function(){return _$internalBinding.CallStaticMethod("System","Guid","NewGuid",[]).toString()}};e._crypto=r},998:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Melon=void 0;var n=r(2517),o=r(6232),i=r(5261),a=r(9563),u=r(1565),c=r(9016),l=r(7163),s=r(7401),f=r(2153),h=r(3225),p=r(3965),y=r(445),v=r(6448),d=r(5952);(0,n.setupEnvironmentVariables)(),(0,o.addPrototypeExtension)(Object,"and",i.and);var m={console:u.console,testing:v.testing,std:p._std,data:y._data,guards:f._guards,fs:s._fs,http:h.http,dotnet:c.dotnet,crypto:l._crypto,runtime:d.runtime,Version:a._Version};e.Melon=m,globalThis.Melon=m},2517:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.setupEnvironmentVariables=function(){if(0!==i.interopCache.io.getFiles("./","*.env").length){var t=(0,n.readText)("./.env");if(!a._guards.string.isNullOrWhiteSpace(t)){var e=function(t){var e=t.split("\n").map((function(t){return t.trim()})).filter((function(t){return!t.startsWith("#")})).map((function(t){return t.split("=")})).filter((function(t){return 2===t.length})).filter((function(t){return Boolean(t[0])&&Boolean(t[1])}));return Object.fromEntries(e)}(t);Object.entries(e).forEach((function(t){return(0,o._setEnvironmentVariable)(t[0],t[1])}))}}};var n=r(5173),o=r(7091),i=r(8363),a=r(2153)},5261:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.and=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{Object.defineProperty(e,"__esModule",{value:!0}),e.addPrototypeExtension=function(t,e,r){t.prototype[e]=r}},8363:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.interopCache=void 0;var n=r(6281),o={serialization:{serialize:(0,n.getStaticMethod)("System.Text.Json:JsonSerializer:Serialize")},console:{writeLine:(0,n.getStaticMethod)("System:Console:WriteLine"),write:(0,n.getStaticMethod)("System:Console:WriteLine"),clear:(0,n.getStaticMethod)("System:Console:Clear")},clinet:{writeLine:(0,n.getStaticMethod)("Cli.NET.Tools:CLNConsole:WriteLine"),write:(0,n.getStaticMethod)("Cli.NET.Tools:CLNConsole:Write")},io:{getFiles:(0,n.getStaticMethod)("System.IO:Directory:GetFiles")}};e.interopCache=o}},e={};!function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(998)})(); \ No newline at end of file