@ariestools/cli 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1471,10 +1471,10 @@ var $ZodRegistry = class {
1471
1471
  return this._map.has(schema);
1472
1472
  }
1473
1473
  };
1474
- function registry$1() {
1474
+ function registry$2() {
1475
1475
  return new $ZodRegistry();
1476
1476
  }
1477
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry$1());
1477
+ (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry$2());
1478
1478
  globalThis.__zod_globalRegistry;
1479
1479
  //#endregion
1480
1480
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
@@ -6118,13 +6118,13 @@ function algorithmFromAddress(address) {
6118
6118
  var JwtAlg = Enum({ ES256K: "ES256K" });
6119
6119
  var JwtTyp = Enum({ JWT: "JWT" });
6120
6120
  var JwtSchema = Enum({ Signin: "network.xyo.auth.signin" });
6121
- var registry = {};
6121
+ var registry$1 = {};
6122
6122
  function registerVerifier(algorithm, fn) {
6123
- registry[algorithm] = fn;
6123
+ registry$1[algorithm] = fn;
6124
6124
  }
6125
6125
  async function verifySignature(address, hash, signature) {
6126
6126
  const algorithm = algorithmFromAddress(address);
6127
- const fn = registry[algorithm];
6127
+ const fn = registry$1[algorithm];
6128
6128
  if (!fn) throw new Error(`No verifier registered for algorithm [${algorithm}]. Did you import the account package?`);
6129
6129
  return await fn(address, hash, signature);
6130
6130
  }
@@ -56402,7 +56402,7 @@ function multicast(coldObservable) {
56402
56402
  });
56403
56403
  }
56404
56404
  //#endregion
56405
- //#region ../../node_modules/.pnpm/@ariestools+threads@8.1.2_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@10.2.2_zod@4.4.3/node_modules/@ariestools/threads/dist/node/master/index-node.mjs
56405
+ //#region ../../node_modules/.pnpm/@ariestools+threads@8.1.3_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@10.2.2_zod@4.4.3/node_modules/@ariestools/threads/dist/node/master/index-node.mjs
56406
56406
  cpus().length;
56407
56407
  function resolveScriptPath(scriptPath, baseURL) {
56408
56408
  const makeAbsolute = (filePath) => {
@@ -56410,8 +56410,11 @@ function resolveScriptPath(scriptPath, baseURL) {
56410
56410
  };
56411
56411
  return makeAbsolute(scriptPath);
56412
56412
  }
56413
+ var registry = {
56414
+ allWorkers: [],
56415
+ signalHandlers: /* @__PURE__ */ new Map()
56416
+ };
56413
56417
  function initWorkerThreadsWorker() {
56414
- let allWorkers = [];
56415
56418
  class Worker3 extends Worker {
56416
56419
  mappedEventListeners;
56417
56420
  constructor(scriptPath, options) {
@@ -56422,7 +56425,10 @@ function initWorkerThreadsWorker() {
56422
56425
  });
56423
56426
  else super(resolvedScriptPath, options);
56424
56427
  this.mappedEventListeners = /* @__PURE__ */ new WeakMap();
56425
- allWorkers.push(this);
56428
+ registry.allWorkers.push(this);
56429
+ this.once("exit", () => {
56430
+ registry.allWorkers = registry.allWorkers.filter((worker) => worker !== this);
56431
+ });
56426
56432
  }
56427
56433
  addEventListener(eventName, rawListener) {
56428
56434
  const listener = (message) => {
@@ -56436,19 +56442,6 @@ function initWorkerThreadsWorker() {
56436
56442
  this.off(eventName, listener);
56437
56443
  }
56438
56444
  }
56439
- const terminateWorkersAndMaster = () => {
56440
- (async () => {
56441
- try {
56442
- await Promise.all(allWorkers.map((worker) => worker.terminate()));
56443
- process.exit(0);
56444
- } catch {
56445
- process.exit(1);
56446
- }
56447
- })();
56448
- allWorkers = [];
56449
- };
56450
- process.on("SIGINT", () => terminateWorkersAndMaster());
56451
- process.on("SIGTERM", () => terminateWorkersAndMaster());
56452
56445
  class BlobWorker2 extends Worker3 {
56453
56446
  constructor(blob, options) {
56454
56447
  super(Buffer.from(blob).toString("utf-8"), {
@@ -69483,8 +69476,8 @@ var require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69483
69476
  };
69484
69477
  }));
69485
69478
  //#endregion
69486
- //#region ../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/lib/utils.js
69487
- var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69479
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
69480
+ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69488
69481
  /** @type {(value: string) => boolean} */
69489
69482
  const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
69490
69483
  /** @type {(value: string) => boolean} */
@@ -69855,9 +69848,9 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69855
69848
  };
69856
69849
  }));
69857
69850
  //#endregion
69858
- //#region ../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/lib/schemes.js
69859
- var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69860
- const { isUUID } = require_utils$2();
69851
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
69852
+ var require_schemes$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
69853
+ const { isUUID } = require_utils$3();
69861
69854
  const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
69862
69855
  const supportedSchemeNames = [
69863
69856
  "http",
@@ -70038,10 +70031,10 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70038
70031
  };
70039
70032
  }));
70040
70033
  //#endregion
70041
- //#region ../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/index.js
70042
- var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70043
- const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils$2();
70044
- const { SCHEMES, getSchemeHandler } = require_schemes();
70034
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
70035
+ var require_fast_uri$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70036
+ const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils$3();
70037
+ const { SCHEMES, getSchemeHandler } = require_schemes$1();
70045
70038
  /**
70046
70039
  * @template {import('./types/index').URIComponent|string} T
70047
70040
  * @param {T} uri
@@ -70177,6 +70170,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70177
70170
  return uriTokens.join("");
70178
70171
  }
70179
70172
  const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
70173
+ const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
70180
70174
  /**
70181
70175
  * @param {import('./types/index').URIComponent} parsed
70182
70176
  * @param {RegExpMatchArray} matches
@@ -70207,6 +70201,11 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70207
70201
  let isIP = false;
70208
70202
  if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
70209
70203
  else uri = "//" + uri;
70204
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
70205
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
70206
+ parsed.error = "URI authority must not contain a literal backslash.";
70207
+ malformedAuthorityOrPort = true;
70208
+ }
70210
70209
  const matches = uri.match(URI_PARSE);
70211
70210
  if (matches) {
70212
70211
  parsed.scheme = matches[1];
@@ -70316,7 +70315,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70316
70315
  //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
70317
70316
  var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
70318
70317
  Object.defineProperty(exports, "__esModule", { value: true });
70319
- const uri = require_fast_uri();
70318
+ const uri = require_fast_uri$1();
70320
70319
  uri.code = "require(\"ajv/dist/runtime/uri\").default";
70321
70320
  exports.default = uri;
70322
70321
  }));
@@ -81353,7 +81352,7 @@ var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81353
81352
  module.exports.createError = createError;
81354
81353
  }));
81355
81354
  //#endregion
81356
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/errors.js
81355
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/errors.js
81357
81356
  var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81358
81357
  const { createError } = require_error$1();
81359
81358
  module.exports = {
@@ -81368,7 +81367,7 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81368
81367
  };
81369
81368
  }));
81370
81369
  //#endregion
81371
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/symbols.js
81370
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/symbols.js
81372
81371
  var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81373
81372
  module.exports = {
81374
81373
  kAvvio: Symbol("avvio.Boot"),
@@ -81383,7 +81382,7 @@ var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81383
81382
  };
81384
81383
  }));
81385
81384
  //#endregion
81386
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/time-tree.js
81385
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/time-tree.js
81387
81386
  var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81388
81387
  const { kUntrackNode, kTrackNode, kGetParent, kGetNode, kAddNode } = require_symbols$2();
81389
81388
  /**
@@ -81546,13 +81545,13 @@ var require_time_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81546
81545
  module.exports = { TimeTree };
81547
81546
  }));
81548
81547
  //#endregion
81549
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/debug.js
81548
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/debug.js
81550
81549
  var require_debug$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81551
81550
  const { debuglog } = __require$1("node:util");
81552
81551
  module.exports = { debug: debuglog("avvio") };
81553
81552
  }));
81554
81553
  //#endregion
81555
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/create-promise.js
81554
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/create-promise.js
81556
81555
  var require_create_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81557
81556
  /**
81558
81557
  * @callback PromiseResolve
@@ -81591,7 +81590,7 @@ var require_create_promise = /* @__PURE__ */ __commonJSMin(((exports, module) =>
81591
81590
  module.exports = { createPromise };
81592
81591
  }));
81593
81592
  //#endregion
81594
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/get-plugin-name.js
81593
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/get-plugin-name.js
81595
81594
  var require_get_plugin_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81596
81595
  const { kPluginMeta } = require_symbols$2();
81597
81596
  /**
@@ -81609,7 +81608,7 @@ var require_get_plugin_name = /* @__PURE__ */ __commonJSMin(((exports, module) =
81609
81608
  module.exports = { getPluginName };
81610
81609
  }));
81611
81610
  //#endregion
81612
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/is-promise-like.js
81611
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/is-promise-like.js
81613
81612
  var require_is_promise_like = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81614
81613
  /**
81615
81614
  * @param {any} maybePromiseLike
@@ -81621,7 +81620,7 @@ var require_is_promise_like = /* @__PURE__ */ __commonJSMin(((exports, module) =
81621
81620
  module.exports = { isPromiseLike };
81622
81621
  }));
81623
81622
  //#endregion
81624
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/plugin.js
81623
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/plugin.js
81625
81624
  var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81626
81625
  const { EventEmitter: EventEmitter$10 } = __require$1("node:events");
81627
81626
  const { inherits: inherits$2 } = __require$1("node:util");
@@ -81826,7 +81825,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81826
81825
  module.exports = { Plugin };
81827
81826
  }));
81828
81827
  //#endregion
81829
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/validate-plugin.js
81828
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/validate-plugin.js
81830
81829
  var require_validate_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81831
81830
  const { AVV_ERR_PLUGIN_NOT_VALID } = require_errors$2();
81832
81831
  /**
@@ -81843,7 +81842,7 @@ var require_validate_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) =
81843
81842
  module.exports = { validatePlugin };
81844
81843
  }));
81845
81844
  //#endregion
81846
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/is-bundled-or-typescript-plugin.js
81845
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/is-bundled-or-typescript-plugin.js
81847
81846
  var require_is_bundled_or_typescript_plugin = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81848
81847
  /**
81849
81848
  * bundled or typescript plugin
@@ -81860,7 +81859,7 @@ var require_is_bundled_or_typescript_plugin = /* @__PURE__ */ __commonJSMin(((ex
81860
81859
  module.exports = { isBundledOrTypescriptPlugin };
81861
81860
  }));
81862
81861
  //#endregion
81863
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/thenify.js
81862
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/thenify.js
81864
81863
  var require_thenify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81865
81864
  const { debug } = require_debug$1();
81866
81865
  const { kThenifyDoNotWrap } = require_symbols$2();
@@ -81903,7 +81902,7 @@ var require_thenify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81903
81902
  module.exports = { thenify };
81904
81903
  }));
81905
81904
  //#endregion
81906
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/lib/execute-with-thenable.js
81905
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/lib/execute-with-thenable.js
81907
81906
  var require_execute_with_thenable = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81908
81907
  const { isPromiseLike } = require_is_promise_like();
81909
81908
  const { kAvvio } = require_symbols$2();
@@ -81931,8 +81930,8 @@ var require_execute_with_thenable = /* @__PURE__ */ __commonJSMin(((exports, mod
81931
81930
  module.exports = { executeWithThenable };
81932
81931
  }));
81933
81932
  //#endregion
81934
- //#region ../../node_modules/.pnpm/avvio@9.2.0/node_modules/avvio/boot.js
81935
- var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81933
+ //#region ../../node_modules/.pnpm/avvio@9.3.0/node_modules/avvio/index.js
81934
+ var require_avvio = /* @__PURE__ */ __commonJSMin(((exports, module) => {
81936
81935
  const fastq = require_queue();
81937
81936
  const EE = __require$1("node:events").EventEmitter;
81938
81937
  const inherits$1 = __require$1("node:util").inherits;
@@ -82231,9 +82230,12 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
82231
82230
  executeWithThenable(func, [], cb);
82232
82231
  } else if (func.length === 1) executeWithThenable(func, [err], cb);
82233
82232
  else if (this._opts.timeout === 0) {
82233
+ let completed = false;
82234
82234
  const wrapCb = (err) => {
82235
+ if (completed) return;
82236
+ completed = true;
82235
82237
  this._error = err;
82236
- cb(this._error);
82238
+ process.nextTick(cb, this._error);
82237
82239
  };
82238
82240
  if (func.length === 2) func(err, wrapCb);
82239
82241
  else func(err, context, wrapCb);
@@ -82255,8 +82257,9 @@ var require_boot = /* @__PURE__ */ __commonJSMin(((exports, module) => {
82255
82257
  function timeoutCb(err) {
82256
82258
  if (timer) {
82257
82259
  clearTimeout(timer);
82260
+ timer = null;
82258
82261
  this._error = err;
82259
- cb(this._error);
82262
+ process.nextTick(cb, this._error);
82260
82263
  }
82261
82264
  }
82262
82265
  }
@@ -89871,7 +89874,7 @@ var require_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
89871
89874
  };
89872
89875
  }));
89873
89876
  //#endregion
89874
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/serializer.js
89877
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/serializer.js
89875
89878
  var require_serializer$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
89876
89879
  const STR_ESCAPE = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
89877
89880
  module.exports = class Serializer {
@@ -94414,7 +94417,7 @@ var require_jtd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
94414
94417
  //#endregion
94415
94418
  //#region ../../node_modules/.pnpm/@fastify+ajv-compiler@4.0.5/node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js
94416
94419
  var require_default_ajv_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
94417
- const fastUri = require_fast_uri();
94420
+ const fastUri = require_fast_uri$1();
94418
94421
  module.exports = Object.freeze({
94419
94422
  coerceTypes: "array",
94420
94423
  useDefaults: true,
@@ -95171,7 +95174,934 @@ var require_json_schema_ref_resolver = /* @__PURE__ */ __commonJSMin(((exports,
95171
95174
  module.exports = { RefResolver };
95172
95175
  }));
95173
95176
  //#endregion
95174
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/validator.js
95177
+ //#region ../../node_modules/.pnpm/fast-uri@4.1.1/node_modules/fast-uri/lib/utils.js
95178
+ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95179
+ /** @type {(value: string) => boolean} */
95180
+ const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
95181
+ /** @type {(value: string) => boolean} */
95182
+ const isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
95183
+ /** @type {(value: string) => boolean} */
95184
+ const isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
95185
+ /** @type {(value: string) => boolean} */
95186
+ const isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
95187
+ /** @type {(value: string) => boolean} */
95188
+ const isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
95189
+ /** @type {(value: string) => boolean} */
95190
+ const isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);
95191
+ /**
95192
+ * @param {Array<string>} input
95193
+ * @returns {string}
95194
+ */
95195
+ function stringArrayToHexStripped(input) {
95196
+ let acc = "";
95197
+ let code = 0;
95198
+ let i = 0;
95199
+ for (i = 0; i < input.length; i++) {
95200
+ code = input[i].charCodeAt(0);
95201
+ if (code === 48) continue;
95202
+ if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return "";
95203
+ acc += input[i];
95204
+ break;
95205
+ }
95206
+ for (i += 1; i < input.length; i++) {
95207
+ code = input[i].charCodeAt(0);
95208
+ if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return "";
95209
+ acc += input[i];
95210
+ }
95211
+ return acc;
95212
+ }
95213
+ /**
95214
+ * @typedef {Object} GetIPV6Result
95215
+ * @property {boolean} error - Indicates if there was an error parsing the IPv6 address.
95216
+ * @property {string} address - The parsed IPv6 address.
95217
+ * @property {string} [zone] - The zone identifier, if present.
95218
+ */
95219
+ /**
95220
+ * @param {string} value
95221
+ * @returns {boolean}
95222
+ */
95223
+ const nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
95224
+ /**
95225
+ * @param {Array<string>} buffer
95226
+ * @returns {boolean}
95227
+ */
95228
+ function consumeIsZone(buffer) {
95229
+ buffer.length = 0;
95230
+ return true;
95231
+ }
95232
+ /**
95233
+ * @param {Array<string>} buffer
95234
+ * @param {Array<string>} address
95235
+ * @param {GetIPV6Result} output
95236
+ * @returns {boolean}
95237
+ */
95238
+ function consumeHextets(buffer, address, output) {
95239
+ if (buffer.length) {
95240
+ const hex = stringArrayToHexStripped(buffer);
95241
+ if (hex !== "") address.push(hex);
95242
+ else {
95243
+ output.error = true;
95244
+ return false;
95245
+ }
95246
+ buffer.length = 0;
95247
+ }
95248
+ return true;
95249
+ }
95250
+ /**
95251
+ * @param {string} input
95252
+ * @returns {GetIPV6Result}
95253
+ */
95254
+ function getIPV6(input) {
95255
+ let tokenCount = 0;
95256
+ const output = {
95257
+ error: false,
95258
+ address: "",
95259
+ zone: ""
95260
+ };
95261
+ /** @type {Array<string>} */
95262
+ const address = [];
95263
+ /** @type {Array<string>} */
95264
+ const buffer = [];
95265
+ let endipv6Encountered = false;
95266
+ let endIpv6 = false;
95267
+ let consume = consumeHextets;
95268
+ for (let i = 0; i < input.length; i++) {
95269
+ const cursor = input[i];
95270
+ if (cursor === "[" || cursor === "]") continue;
95271
+ if (cursor === ":") {
95272
+ if (endipv6Encountered === true) endIpv6 = true;
95273
+ if (!consume(buffer, address, output)) break;
95274
+ if (++tokenCount > 7) {
95275
+ output.error = true;
95276
+ break;
95277
+ }
95278
+ if (i > 0 && input[i - 1] === ":") endipv6Encountered = true;
95279
+ address.push(":");
95280
+ continue;
95281
+ } else if (cursor === "%") {
95282
+ if (!consume(buffer, address, output)) break;
95283
+ consume = consumeIsZone;
95284
+ } else {
95285
+ buffer.push(cursor);
95286
+ continue;
95287
+ }
95288
+ }
95289
+ if (buffer.length) if (consume === consumeIsZone) output.zone = buffer.join("");
95290
+ else if (endIpv6) address.push(buffer.join(""));
95291
+ else address.push(stringArrayToHexStripped(buffer));
95292
+ output.address = address.join("");
95293
+ return output;
95294
+ }
95295
+ /**
95296
+ * @typedef {Object} NormalizeIPv6Result
95297
+ * @property {string} host - The normalized host.
95298
+ * @property {string} [escapedHost] - The escaped host.
95299
+ * @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.
95300
+ */
95301
+ /**
95302
+ * @param {string} host
95303
+ * @returns {NormalizeIPv6Result}
95304
+ */
95305
+ function normalizeIPv6(host) {
95306
+ if (findToken(host, ":") < 2) return {
95307
+ host,
95308
+ isIPV6: false
95309
+ };
95310
+ const ipv6 = getIPV6(host);
95311
+ if (!ipv6.error) {
95312
+ let newHost = ipv6.address;
95313
+ let escapedHost = ipv6.address;
95314
+ if (ipv6.zone) {
95315
+ newHost += "%" + ipv6.zone;
95316
+ escapedHost += "%25" + ipv6.zone;
95317
+ }
95318
+ return {
95319
+ host: newHost,
95320
+ isIPV6: true,
95321
+ escapedHost
95322
+ };
95323
+ } else return {
95324
+ host,
95325
+ isIPV6: false
95326
+ };
95327
+ }
95328
+ /**
95329
+ * @param {string} str
95330
+ * @param {string} token
95331
+ * @returns {number}
95332
+ */
95333
+ function findToken(str, token) {
95334
+ let ind = 0;
95335
+ for (let i = 0; i < str.length; i++) if (str[i] === token) ind++;
95336
+ return ind;
95337
+ }
95338
+ /**
95339
+ * @param {string} path
95340
+ * @returns {string}
95341
+ *
95342
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4
95343
+ */
95344
+ function removeDotSegments(path) {
95345
+ let input = path;
95346
+ const output = [];
95347
+ let nextSlash = -1;
95348
+ let len = 0;
95349
+ while (len = input.length) {
95350
+ if (len === 1) if (input === ".") break;
95351
+ else if (input === "/") {
95352
+ output.push("/");
95353
+ break;
95354
+ } else {
95355
+ output.push(input);
95356
+ break;
95357
+ }
95358
+ else if (len === 2) {
95359
+ if (input[0] === ".") {
95360
+ if (input[1] === ".") break;
95361
+ else if (input[1] === "/") {
95362
+ input = input.slice(2);
95363
+ continue;
95364
+ }
95365
+ } else if (input[0] === "/") {
95366
+ if (input[1] === ".") {
95367
+ output.push("/");
95368
+ break;
95369
+ }
95370
+ }
95371
+ } else if (len === 3) {
95372
+ if (input === "/..") {
95373
+ if (output.length !== 0) output.pop();
95374
+ output.push("/");
95375
+ break;
95376
+ }
95377
+ }
95378
+ if (input[0] === ".") {
95379
+ if (input[1] === ".") {
95380
+ if (input[2] === "/") {
95381
+ input = input.slice(3);
95382
+ continue;
95383
+ }
95384
+ } else if (input[1] === "/") {
95385
+ input = input.slice(2);
95386
+ continue;
95387
+ }
95388
+ } else if (input[0] === "/") {
95389
+ if (input[1] === ".") {
95390
+ if (input[2] === "/") {
95391
+ input = input.slice(2);
95392
+ continue;
95393
+ } else if (input[2] === ".") {
95394
+ if (input[3] === "/") {
95395
+ input = input.slice(3);
95396
+ if (output.length !== 0) output.pop();
95397
+ continue;
95398
+ }
95399
+ }
95400
+ }
95401
+ }
95402
+ if ((nextSlash = input.indexOf("/", 1)) === -1) {
95403
+ output.push(input);
95404
+ break;
95405
+ } else {
95406
+ output.push(input.slice(0, nextSlash));
95407
+ input = input.slice(nextSlash);
95408
+ }
95409
+ }
95410
+ return output.join("");
95411
+ }
95412
+ /**
95413
+ * Re-escape RFC 3986 gen-delims that must not appear literally in the host.
95414
+ * After the URI regex parses, these characters cannot be literal in the host
95415
+ * field, so any that appear after decoding came from percent-encoding and
95416
+ * must be restored to prevent authority structure changes.
95417
+ *
95418
+ * @param {string} host
95419
+ * @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)
95420
+ * @returns {string}
95421
+ */
95422
+ const HOST_DELIMS = {
95423
+ "@": "%40",
95424
+ "/": "%2F",
95425
+ "?": "%3F",
95426
+ "#": "%23",
95427
+ ":": "%3A"
95428
+ };
95429
+ const HOST_DELIM_RE = /[@/?#:]/g;
95430
+ const HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
95431
+ function reescapeHostDelimiters(host, isIP) {
95432
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
95433
+ re.lastIndex = 0;
95434
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
95435
+ }
95436
+ /**
95437
+ * Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.
95438
+ * Reserved delimiters such as `%2F` and `%2E` stay escaped.
95439
+ *
95440
+ * @param {string} input
95441
+ * @param {boolean} [decodeUnreserved=false]
95442
+ * @returns {string}
95443
+ */
95444
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
95445
+ if (input.indexOf("%") === -1) return input;
95446
+ let output = "";
95447
+ for (let i = 0; i < input.length; i++) {
95448
+ if (input[i] === "%" && i + 2 < input.length) {
95449
+ const hex = input.slice(i + 1, i + 3);
95450
+ if (isHexPair(hex)) {
95451
+ const normalizedHex = hex.toUpperCase();
95452
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
95453
+ if (decodeUnreserved && isUnreserved(decoded)) output += decoded;
95454
+ else output += "%" + normalizedHex;
95455
+ i += 2;
95456
+ continue;
95457
+ }
95458
+ }
95459
+ output += input[i];
95460
+ }
95461
+ return output;
95462
+ }
95463
+ /** Pre-built `%XX` strings for every byte. Avoids per-call hex math/concat. */
95464
+ const BYTE_HEX = new Array(256);
95465
+ {
95466
+ const HEX_DIGITS = "0123456789ABCDEF";
95467
+ for (let i = 0; i < 256; i++) BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
95468
+ }
95469
+ /**
95470
+ * Mirrors the pass-through set of the deprecated `escape()` global:
95471
+ * `A-Z a-z 0-9 * + - . / @ _`. Keeps drop-in semantics for ASCII input.
95472
+ *
95473
+ * @param {number} cp
95474
+ * @returns {boolean}
95475
+ */
95476
+ function isEscapeSafe(cp) {
95477
+ return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
95478
+ }
95479
+ /**
95480
+ * RFC 3986 percent-encode a non-ASCII Unicode code point as UTF-8 bytes.
95481
+ * Caller handles the ASCII branch inline for speed.
95482
+ *
95483
+ * @param {number} cp - Unicode code point (>= 0x80, <= 0x10FFFF)
95484
+ * @returns {string}
95485
+ */
95486
+ function percentEncodeNonAscii(cp) {
95487
+ if (cp < 2048) return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
95488
+ if (cp < 65536) return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
95489
+ return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
95490
+ }
95491
+ /**
95492
+ * Normalizes path data without turning reserved escapes into live path syntax.
95493
+ * Valid escapes are uppercased, raw unsafe characters are escaped, and only
95494
+ * unreserved bytes that are not `.` are decoded.
95495
+ *
95496
+ * @param {string} input
95497
+ * @returns {string}
95498
+ */
95499
+ function normalizePathEncoding(input) {
95500
+ let output = "";
95501
+ for (let i = 0; i < input.length; i++) {
95502
+ const ch = input[i];
95503
+ if (ch === "%" && i + 2 < input.length) {
95504
+ const hex = input.slice(i + 1, i + 3);
95505
+ if (isHexPair(hex)) {
95506
+ const normalizedHex = hex.toUpperCase();
95507
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
95508
+ if (decoded !== "." && isUnreserved(decoded)) output += decoded;
95509
+ else output += "%" + normalizedHex;
95510
+ i += 2;
95511
+ continue;
95512
+ }
95513
+ }
95514
+ if (isPathCharacter(ch)) output += ch;
95515
+ else {
95516
+ const code = input.charCodeAt(i);
95517
+ if (code < 128) output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
95518
+ else if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);
95519
+ else if (code <= 56319 && i + 1 < input.length) {
95520
+ const low = input.charCodeAt(i + 1);
95521
+ if (low >= 56320 && low <= 57343) {
95522
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
95523
+ i++;
95524
+ } else output += percentEncodeNonAscii(65533);
95525
+ } else output += percentEncodeNonAscii(65533);
95526
+ }
95527
+ }
95528
+ return output;
95529
+ }
95530
+ /**
95531
+ * Normalizes the percent-encoding of a query or fragment component.
95532
+ *
95533
+ * Like `normalizePathEncoding`, but uses the query/fragment character set
95534
+ * (which additionally allows `?`) and decodes `.` since it has no dot-segment
95535
+ * meaning outside of a path.
95536
+ *
95537
+ * @param {string} input
95538
+ * @returns {string}
95539
+ */
95540
+ function normalizeQueryFragmentEncoding(input) {
95541
+ let output = "";
95542
+ for (let i = 0; i < input.length; i++) {
95543
+ const ch = input[i];
95544
+ if (ch === "%" && i + 2 < input.length) {
95545
+ const hex = input.slice(i + 1, i + 3);
95546
+ if (isHexPair(hex)) {
95547
+ const normalizedHex = hex.toUpperCase();
95548
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
95549
+ if (isUnreserved(decoded)) output += decoded;
95550
+ else output += "%" + normalizedHex;
95551
+ i += 2;
95552
+ continue;
95553
+ }
95554
+ }
95555
+ if (isQueryFragmentCharacter(ch)) output += ch;
95556
+ else {
95557
+ const code = input.charCodeAt(i);
95558
+ if (code < 128) output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
95559
+ else if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);
95560
+ else if (code <= 56319 && i + 1 < input.length) {
95561
+ const low = input.charCodeAt(i + 1);
95562
+ if (low >= 56320 && low <= 57343) {
95563
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
95564
+ i++;
95565
+ } else output += percentEncodeNonAscii(65533);
95566
+ } else output += percentEncodeNonAscii(65533);
95567
+ }
95568
+ }
95569
+ return output;
95570
+ }
95571
+ /**
95572
+ * Escapes a component while preserving existing valid percent escapes.
95573
+ *
95574
+ * @param {string} input
95575
+ * @returns {string}
95576
+ */
95577
+ function escapePreservingEscapes(input) {
95578
+ let output = "";
95579
+ for (let i = 0; i < input.length; i++) {
95580
+ const ch = input[i];
95581
+ if (ch === "%" && i + 2 < input.length) {
95582
+ const hex = input.slice(i + 1, i + 3);
95583
+ if (isHexPair(hex)) {
95584
+ output += "%" + hex.toUpperCase();
95585
+ i += 2;
95586
+ continue;
95587
+ }
95588
+ }
95589
+ const code = input.charCodeAt(i);
95590
+ if (code < 128) output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
95591
+ else if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);
95592
+ else if (code <= 56319 && i + 1 < input.length) {
95593
+ const low = input.charCodeAt(i + 1);
95594
+ if (low >= 56320 && low <= 57343) {
95595
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
95596
+ i++;
95597
+ } else output += percentEncodeNonAscii(65533);
95598
+ } else output += percentEncodeNonAscii(65533);
95599
+ }
95600
+ return output;
95601
+ }
95602
+ /**
95603
+ * @param {import('../types/index').URIComponent} component
95604
+ * @returns {string|undefined}
95605
+ */
95606
+ function recomposeAuthority(component) {
95607
+ const uriTokens = [];
95608
+ if (component.userinfo !== void 0) {
95609
+ uriTokens.push(component.userinfo);
95610
+ uriTokens.push("@");
95611
+ }
95612
+ if (component.host !== void 0) {
95613
+ let host = unescape(component.host);
95614
+ if (!isIPv4(host)) {
95615
+ const ipV6res = normalizeIPv6(host);
95616
+ if (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;
95617
+ else host = reescapeHostDelimiters(host, false);
95618
+ }
95619
+ uriTokens.push(host);
95620
+ }
95621
+ if (typeof component.port === "number" || typeof component.port === "string") {
95622
+ uriTokens.push(":");
95623
+ uriTokens.push(String(component.port));
95624
+ }
95625
+ return uriTokens.length ? uriTokens.join("") : void 0;
95626
+ }
95627
+ module.exports = {
95628
+ nonSimpleDomain,
95629
+ recomposeAuthority,
95630
+ reescapeHostDelimiters,
95631
+ normalizePercentEncoding,
95632
+ normalizePathEncoding,
95633
+ normalizeQueryFragmentEncoding,
95634
+ escapePreservingEscapes,
95635
+ removeDotSegments,
95636
+ isIPv4,
95637
+ isUUID,
95638
+ normalizeIPv6,
95639
+ stringArrayToHexStripped
95640
+ };
95641
+ }));
95642
+ //#endregion
95643
+ //#region ../../node_modules/.pnpm/fast-uri@4.1.1/node_modules/fast-uri/lib/schemes.js
95644
+ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95645
+ const { isUUID } = require_utils$2();
95646
+ const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
95647
+ const supportedSchemeNames = [
95648
+ "http",
95649
+ "https",
95650
+ "ws",
95651
+ "wss",
95652
+ "urn",
95653
+ "urn:uuid"
95654
+ ];
95655
+ /** @typedef {supportedSchemeNames[number]} SchemeName */
95656
+ /**
95657
+ * @param {string} name
95658
+ * @returns {name is SchemeName}
95659
+ */
95660
+ function isValidSchemeName(name) {
95661
+ return supportedSchemeNames.indexOf(name) !== -1;
95662
+ }
95663
+ /**
95664
+ * @callback SchemeFn
95665
+ * @param {import('../types/index').URIComponent} component
95666
+ * @param {import('../types/index').Options} options
95667
+ * @returns {import('../types/index').URIComponent}
95668
+ */
95669
+ /**
95670
+ * @typedef {Object} SchemeHandler
95671
+ * @property {SchemeName} scheme - The scheme name.
95672
+ * @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.
95673
+ * @property {SchemeFn} parse - Function to parse the URI component for this scheme.
95674
+ * @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.
95675
+ * @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.
95676
+ * @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.
95677
+ * @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.
95678
+ */
95679
+ /**
95680
+ * @param {import('../types/index').URIComponent} wsComponent
95681
+ * @returns {boolean}
95682
+ */
95683
+ function wsIsSecure(wsComponent) {
95684
+ if (wsComponent.secure === true) return true;
95685
+ else if (wsComponent.secure === false) return false;
95686
+ else if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
95687
+ else return false;
95688
+ }
95689
+ /** @type {SchemeFn} */
95690
+ function httpParse(component) {
95691
+ if (!component.host) component.error = component.error || "HTTP URIs must have a host.";
95692
+ return component;
95693
+ }
95694
+ /** @type {SchemeFn} */
95695
+ function httpSerialize(component) {
95696
+ const secure = String(component.scheme).toLowerCase() === "https";
95697
+ if (component.port === (secure ? 443 : 80) || component.port === "") component.port = void 0;
95698
+ if (!component.path) component.path = "/";
95699
+ return component;
95700
+ }
95701
+ /** @type {SchemeFn} */
95702
+ function wsParse(wsComponent) {
95703
+ wsComponent.secure = wsIsSecure(wsComponent);
95704
+ wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : "");
95705
+ wsComponent.path = void 0;
95706
+ wsComponent.query = void 0;
95707
+ return wsComponent;
95708
+ }
95709
+ /** @type {SchemeFn} */
95710
+ function wsSerialize(wsComponent) {
95711
+ if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") wsComponent.port = void 0;
95712
+ if (typeof wsComponent.secure === "boolean") {
95713
+ wsComponent.scheme = wsComponent.secure ? "wss" : "ws";
95714
+ wsComponent.secure = void 0;
95715
+ }
95716
+ if (wsComponent.resourceName) {
95717
+ const [path, query] = wsComponent.resourceName.split("?");
95718
+ wsComponent.path = path && path !== "/" ? path : void 0;
95719
+ wsComponent.query = query;
95720
+ wsComponent.resourceName = void 0;
95721
+ }
95722
+ wsComponent.fragment = void 0;
95723
+ return wsComponent;
95724
+ }
95725
+ /** @type {SchemeFn} */
95726
+ function urnParse(urnComponent, options) {
95727
+ if (!urnComponent.path) {
95728
+ urnComponent.error = "URN can not be parsed";
95729
+ return urnComponent;
95730
+ }
95731
+ const matches = urnComponent.path.match(URN_REG);
95732
+ if (matches) {
95733
+ const scheme = options.scheme || urnComponent.scheme || "urn";
95734
+ urnComponent.nid = matches[1].toLowerCase();
95735
+ urnComponent.nss = matches[2];
95736
+ const schemeHandler = getSchemeHandler(`${scheme}:${options.nid || urnComponent.nid}`);
95737
+ urnComponent.path = void 0;
95738
+ if (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options);
95739
+ } else urnComponent.error = urnComponent.error || "URN can not be parsed.";
95740
+ return urnComponent;
95741
+ }
95742
+ /** @type {SchemeFn} */
95743
+ function urnSerialize(urnComponent, options) {
95744
+ if (urnComponent.nid === void 0) throw new Error("URN without nid cannot be serialized");
95745
+ const scheme = options.scheme || urnComponent.scheme || "urn";
95746
+ const nid = urnComponent.nid.toLowerCase();
95747
+ const schemeHandler = getSchemeHandler(`${scheme}:${options.nid || nid}`);
95748
+ if (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options);
95749
+ const uriComponent = urnComponent;
95750
+ const nss = urnComponent.nss;
95751
+ uriComponent.path = `${nid || options.nid}:${nss}`;
95752
+ options.skipEscape = true;
95753
+ return uriComponent;
95754
+ }
95755
+ /** @type {SchemeFn} */
95756
+ function urnuuidParse(urnComponent, options) {
95757
+ const uuidComponent = urnComponent;
95758
+ uuidComponent.uuid = uuidComponent.nss;
95759
+ uuidComponent.nss = void 0;
95760
+ if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || "UUID is not valid.";
95761
+ return uuidComponent;
95762
+ }
95763
+ /** @type {SchemeFn} */
95764
+ function urnuuidSerialize(uuidComponent) {
95765
+ const urnComponent = uuidComponent;
95766
+ urnComponent.nss = (uuidComponent.uuid || "").toLowerCase();
95767
+ return urnComponent;
95768
+ }
95769
+ const http = {
95770
+ scheme: "http",
95771
+ domainHost: true,
95772
+ parse: httpParse,
95773
+ serialize: httpSerialize
95774
+ };
95775
+ const https = {
95776
+ scheme: "https",
95777
+ domainHost: http.domainHost,
95778
+ parse: httpParse,
95779
+ serialize: httpSerialize
95780
+ };
95781
+ const ws = {
95782
+ scheme: "ws",
95783
+ domainHost: true,
95784
+ parse: wsParse,
95785
+ serialize: wsSerialize
95786
+ };
95787
+ const SCHEMES = {
95788
+ http,
95789
+ https,
95790
+ ws,
95791
+ wss: {
95792
+ scheme: "wss",
95793
+ domainHost: ws.domainHost,
95794
+ parse: ws.parse,
95795
+ serialize: ws.serialize
95796
+ },
95797
+ urn: {
95798
+ scheme: "urn",
95799
+ parse: urnParse,
95800
+ serialize: urnSerialize,
95801
+ skipNormalize: true
95802
+ },
95803
+ "urn:uuid": {
95804
+ scheme: "urn:uuid",
95805
+ parse: urnuuidParse,
95806
+ serialize: urnuuidSerialize,
95807
+ skipNormalize: true
95808
+ }
95809
+ };
95810
+ Object.setPrototypeOf(SCHEMES, null);
95811
+ /**
95812
+ * @param {string|undefined} scheme
95813
+ * @returns {SchemeHandler|undefined}
95814
+ */
95815
+ function getSchemeHandler(scheme) {
95816
+ return scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;
95817
+ }
95818
+ module.exports = {
95819
+ wsIsSecure,
95820
+ SCHEMES,
95821
+ isValidSchemeName,
95822
+ getSchemeHandler
95823
+ };
95824
+ }));
95825
+ //#endregion
95826
+ //#region ../../node_modules/.pnpm/fast-uri@4.1.1/node_modules/fast-uri/index.js
95827
+ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95828
+ const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, normalizeQueryFragmentEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils$2();
95829
+ const { SCHEMES, getSchemeHandler } = require_schemes();
95830
+ /**
95831
+ * @template {import('./types/index').URIComponent|string} T
95832
+ * @param {T} uri
95833
+ * @param {import('./types/index').Options} [options]
95834
+ * @returns {T}
95835
+ */
95836
+ function normalize(uri, options) {
95837
+ if (typeof uri === "string") uri = normalizeString(uri, options);
95838
+ else if (typeof uri === "object") uri = parse(serialize(uri, options), options);
95839
+ return uri;
95840
+ }
95841
+ /**
95842
+ * @param {string} baseURI
95843
+ * @param {string} relativeURI
95844
+ * @param {import('./types/index').Options} [options]
95845
+ * @returns {string}
95846
+ */
95847
+ function resolve(baseURI, relativeURI, options) {
95848
+ const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
95849
+ const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
95850
+ schemelessOptions.skipEscape = true;
95851
+ return serialize(resolved, schemelessOptions);
95852
+ }
95853
+ /**
95854
+ * @param {import ('./types/index').URIComponent} base
95855
+ * @param {import ('./types/index').URIComponent} relative
95856
+ * @param {import('./types/index').Options} [options]
95857
+ * @param {boolean} [skipNormalization=false]
95858
+ * @returns {import ('./types/index').URIComponent}
95859
+ */
95860
+ function resolveComponent(base, relative, options, skipNormalization) {
95861
+ /** @type {import('./types/index').URIComponent} */
95862
+ const target = {};
95863
+ if (!skipNormalization) {
95864
+ base = parse(serialize(base, options), options);
95865
+ relative = parse(serialize(relative, options), options);
95866
+ }
95867
+ options = options || {};
95868
+ if (!options.tolerant && relative.scheme) {
95869
+ target.scheme = relative.scheme;
95870
+ target.userinfo = relative.userinfo;
95871
+ target.host = relative.host;
95872
+ target.port = relative.port;
95873
+ target.path = removeDotSegments(relative.path || "");
95874
+ target.query = relative.query;
95875
+ } else {
95876
+ if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
95877
+ target.userinfo = relative.userinfo;
95878
+ target.host = relative.host;
95879
+ target.port = relative.port;
95880
+ target.path = removeDotSegments(relative.path || "");
95881
+ target.query = relative.query;
95882
+ } else {
95883
+ if (!relative.path) {
95884
+ target.path = base.path;
95885
+ if (relative.query !== void 0) target.query = relative.query;
95886
+ else target.query = base.query;
95887
+ } else {
95888
+ if (relative.path[0] === "/") target.path = removeDotSegments(relative.path);
95889
+ else {
95890
+ if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative.path;
95891
+ else if (!base.path) target.path = relative.path;
95892
+ else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
95893
+ target.path = removeDotSegments(target.path);
95894
+ }
95895
+ target.query = relative.query;
95896
+ }
95897
+ target.userinfo = base.userinfo;
95898
+ target.host = base.host;
95899
+ target.port = base.port;
95900
+ }
95901
+ target.scheme = base.scheme;
95902
+ }
95903
+ target.fragment = relative.fragment;
95904
+ return target;
95905
+ }
95906
+ /**
95907
+ * @param {import ('./types/index').URIComponent|string} uriA
95908
+ * @param {import ('./types/index').URIComponent|string} uriB
95909
+ * @param {import ('./types/index').Options} options
95910
+ * @returns {boolean}
95911
+ */
95912
+ function equal(uriA, uriB, options) {
95913
+ const normalizedA = normalizeComparableURI(uriA, options);
95914
+ const normalizedB = normalizeComparableURI(uriB, options);
95915
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
95916
+ }
95917
+ /**
95918
+ * @param {Readonly<import('./types/index').URIComponent>} cmpts
95919
+ * @param {import('./types/index').Options} [opts]
95920
+ * @returns {string}
95921
+ */
95922
+ function serialize(cmpts, opts) {
95923
+ const component = {
95924
+ host: cmpts.host,
95925
+ scheme: cmpts.scheme,
95926
+ userinfo: cmpts.userinfo,
95927
+ port: cmpts.port,
95928
+ path: cmpts.path,
95929
+ query: cmpts.query,
95930
+ nid: cmpts.nid,
95931
+ nss: cmpts.nss,
95932
+ uuid: cmpts.uuid,
95933
+ fragment: cmpts.fragment,
95934
+ reference: cmpts.reference,
95935
+ resourceName: cmpts.resourceName,
95936
+ secure: cmpts.secure,
95937
+ error: ""
95938
+ };
95939
+ const options = Object.assign({}, opts);
95940
+ const uriTokens = [];
95941
+ const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
95942
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
95943
+ if (component.path !== void 0) if (!options.skipEscape) {
95944
+ component.path = escapePreservingEscapes(component.path);
95945
+ if (component.scheme !== void 0) component.path = component.path.split("%3A").join(":");
95946
+ } else component.path = normalizePercentEncoding(component.path);
95947
+ if (options.reference !== "suffix" && component.scheme) uriTokens.push(component.scheme, ":");
95948
+ const authority = recomposeAuthority(component);
95949
+ if (authority !== void 0) {
95950
+ if (options.reference !== "suffix") uriTokens.push("//");
95951
+ uriTokens.push(authority);
95952
+ if (component.path && component.path[0] !== "/") uriTokens.push("/");
95953
+ }
95954
+ if (component.path !== void 0) {
95955
+ let s = component.path;
95956
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);
95957
+ if (authority === void 0 && s[0] === "/" && s[1] === "/") s = "/%2F" + s.slice(2);
95958
+ uriTokens.push(s);
95959
+ }
95960
+ if (component.query !== void 0) uriTokens.push("?", component.query);
95961
+ if (component.fragment !== void 0) uriTokens.push("#", component.fragment);
95962
+ return uriTokens.join("");
95963
+ }
95964
+ const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
95965
+ const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
95966
+ /**
95967
+ * @param {import('./types/index').URIComponent} parsed
95968
+ * @param {RegExpMatchArray} matches
95969
+ * @returns {string|undefined}
95970
+ */
95971
+ function getParseError(parsed, matches) {
95972
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") return "URI path must start with \"/\" when authority is present.";
95973
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) return "URI port is malformed.";
95974
+ }
95975
+ /**
95976
+ * @param {string} uri
95977
+ * @param {import('./types/index').Options} [opts]
95978
+ * @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}
95979
+ */
95980
+ function parseWithStatus(uri, opts) {
95981
+ const options = Object.assign({}, opts);
95982
+ /** @type {import('./types/index').URIComponent} */
95983
+ const parsed = {
95984
+ scheme: void 0,
95985
+ userinfo: void 0,
95986
+ host: "",
95987
+ port: void 0,
95988
+ path: "",
95989
+ query: void 0,
95990
+ fragment: void 0
95991
+ };
95992
+ let malformedAuthorityOrPort = false;
95993
+ let isIP = false;
95994
+ if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
95995
+ else uri = "//" + uri;
95996
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
95997
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
95998
+ parsed.error = "URI authority must not contain a literal backslash.";
95999
+ malformedAuthorityOrPort = true;
96000
+ }
96001
+ const matches = uri.match(URI_PARSE);
96002
+ if (matches) {
96003
+ parsed.scheme = matches[1] === void 0 ? void 0 : matches[1].toLowerCase();
96004
+ parsed.userinfo = matches[3];
96005
+ parsed.host = matches[4];
96006
+ parsed.port = parseInt(matches[5], 10);
96007
+ parsed.path = matches[6] || "";
96008
+ parsed.query = matches[7];
96009
+ parsed.fragment = matches[8];
96010
+ if (isNaN(parsed.port)) parsed.port = matches[5];
96011
+ const parseError = getParseError(parsed, matches);
96012
+ if (parseError !== void 0) {
96013
+ parsed.error = parsed.error || parseError;
96014
+ malformedAuthorityOrPort = true;
96015
+ }
96016
+ if (parsed.host) if (isIPv4(parsed.host) === false) {
96017
+ const ipv6result = normalizeIPv6(parsed.host);
96018
+ parsed.host = ipv6result.host.toLowerCase();
96019
+ isIP = ipv6result.isIPV6;
96020
+ } else isIP = true;
96021
+ if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = "same-document";
96022
+ else if (parsed.scheme === void 0) parsed.reference = "relative";
96023
+ else if (parsed.fragment === void 0) parsed.reference = "absolute";
96024
+ else parsed.reference = "uri";
96025
+ if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
96026
+ const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
96027
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
96028
+ if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {
96029
+ parsed.host = new URL("http://" + parsed.host).hostname;
96030
+ } catch (e) {
96031
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
96032
+ }
96033
+ }
96034
+ if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
96035
+ if (uri.indexOf("%") !== -1) {
96036
+ if (parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);
96037
+ if (parsed.host !== void 0) parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
96038
+ }
96039
+ if (parsed.path) parsed.path = normalizePathEncoding(parsed.path);
96040
+ if (parsed.query) parsed.query = normalizeQueryFragmentEncoding(parsed.query);
96041
+ if (parsed.fragment) parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
96042
+ }
96043
+ if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);
96044
+ } else parsed.error = parsed.error || "URI can not be parsed.";
96045
+ return {
96046
+ parsed,
96047
+ malformedAuthorityOrPort
96048
+ };
96049
+ }
96050
+ /**
96051
+ * @param {string} uri
96052
+ * @param {import('./types/index').Options} [opts]
96053
+ * @returns
96054
+ */
96055
+ function parse(uri, opts) {
96056
+ return parseWithStatus(uri, opts).parsed;
96057
+ }
96058
+ /**
96059
+ * @param {string} uri
96060
+ * @param {import('./types/index').Options} [opts]
96061
+ * @returns {string}
96062
+ */
96063
+ function normalizeString(uri, opts) {
96064
+ return normalizeStringWithStatus(uri, opts).normalized;
96065
+ }
96066
+ /**
96067
+ * @param {string} uri
96068
+ * @param {import('./types/index').Options} [opts]
96069
+ * @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}
96070
+ */
96071
+ function normalizeStringWithStatus(uri, opts) {
96072
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
96073
+ return {
96074
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
96075
+ malformedAuthorityOrPort
96076
+ };
96077
+ }
96078
+ /**
96079
+ * @param {import ('./types/index').URIComponent|string} uri
96080
+ * @param {import('./types/index').Options} [opts]
96081
+ * @returns {string|undefined}
96082
+ */
96083
+ function normalizeComparableURI(uri, opts) {
96084
+ if (typeof uri === "string") {
96085
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
96086
+ return malformedAuthorityOrPort ? void 0 : normalized;
96087
+ }
96088
+ if (typeof uri === "object") return serialize(uri, opts);
96089
+ }
96090
+ const fastUri = {
96091
+ SCHEMES,
96092
+ normalize,
96093
+ resolve,
96094
+ resolveComponent,
96095
+ equal,
96096
+ serialize,
96097
+ parse
96098
+ };
96099
+ module.exports = fastUri;
96100
+ module.exports.default = fastUri;
96101
+ module.exports.fastUri = fastUri;
96102
+ }));
96103
+ //#endregion
96104
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/validator.js
95175
96105
  var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95176
96106
  const Ajv = require_ajv();
95177
96107
  const fastUri = require_fast_uri();
@@ -95236,7 +96166,7 @@ var require_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95236
96166
  };
95237
96167
  }));
95238
96168
  //#endregion
95239
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/location.js
96169
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/location.js
95240
96170
  var require_location = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95241
96171
  module.exports = class Location {
95242
96172
  constructor(schema, schemaId, jsonPointer = "#") {
@@ -95253,7 +96183,7 @@ var require_location = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95253
96183
  };
95254
96184
  }));
95255
96185
  //#endregion
95256
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/schema-validator.js
96186
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/schema-validator.js
95257
96187
  var require_schema_validator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
95258
96188
  module.exports = validate10;
95259
96189
  module.exports.default = validate10;
@@ -97046,7 +97976,7 @@ var require_merge_json_schemas = /* @__PURE__ */ __commonJSMin(((exports, module
97046
97976
  };
97047
97977
  }));
97048
97978
  //#endregion
97049
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/merge-schemas.js
97979
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/merge-schemas.js
97050
97980
  var require_merge_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97051
97981
  const { mergeSchemas: _mergeSchemas } = require_merge_json_schemas();
97052
97982
  function mergeSchemas(schemas) {
@@ -97055,7 +97985,7 @@ var require_merge_schemas = /* @__PURE__ */ __commonJSMin(((exports, module) =>
97055
97985
  module.exports = mergeSchemas;
97056
97986
  }));
97057
97987
  //#endregion
97058
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/lib/standalone.js
97988
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/lib/standalone.js
97059
97989
  var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97060
97990
  function buildStandaloneCode(contextFunc, context, serializer, validator) {
97061
97991
  let ajvDependencyCode = "";
@@ -97083,7 +98013,7 @@ var require_standalone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97083
98013
  };
97084
98014
  }));
97085
98015
  //#endregion
97086
- //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.0/node_modules/fast-json-stringify/index.js
98016
+ //#region ../../node_modules/.pnpm/fast-json-stringify@7.0.1/node_modules/fast-json-stringify/index.js
97087
98017
  var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97088
98018
  const { RefResolver } = require_json_schema_ref_resolver();
97089
98019
  const Serializer = require_serializer$1();
@@ -97091,7 +98021,6 @@ var require_fast_json_stringify = /* @__PURE__ */ __commonJSMin(((exports, modul
97091
98021
  const Location = require_location();
97092
98022
  const validate = require_schema_validator();
97093
98023
  const mergeSchemas = require_merge_schemas();
97094
- const SINGLE_TICK = /'/g;
97095
98024
  let largeArraySize = 2e4;
97096
98025
  let largeArrayMechanism = "default";
97097
98026
  const serializerFns = `
@@ -97340,7 +98269,7 @@ const asInteger = serializer.asInteger.bind(serializer)
97340
98269
  code += "json += JSON_STR_BEGIN_OBJECT\n";
97341
98270
  const localUid = context.uid++;
97342
98271
  let addComma = "";
97343
- if (requiredProperties.length > 0) {
98272
+ if (propertiesKeys.length > 0 && requiredProperties.includes(propertiesKeys[0])) {
97344
98273
  for (let i = 0; i < propertiesKeys.length; i++) {
97345
98274
  const key = propertiesKeys[i];
97346
98275
  const propertyLocation = propertiesLocation.getPropertyLocation(key);
@@ -97832,7 +98761,7 @@ const asInteger = serializer.asInteger.bind(serializer)
97832
98761
  json += JSON_STR_NULL
97833
98762
  } else {
97834
98763
  `;
97835
- code += `json += '${JSON.stringify(schema.const).replace(SINGLE_TICK, "\\'")}'`;
98764
+ code += `json += ${JSON.stringify(JSON.stringify(schema.const))}`;
97836
98765
  if (hasNullType) code += `
97837
98766
  }
97838
98767
  `;
@@ -105177,7 +106106,7 @@ var require_light_my_request = /* @__PURE__ */ __commonJSMin(((exports, module)
105177
106106
  //#region ../../node_modules/.pnpm/fastify@5.10.0/node_modules/fastify/fastify.js
105178
106107
  var require_fastify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
105179
106108
  const VERSION = "5.10.0";
105180
- const Avvio = require_boot();
106109
+ const Avvio = require_avvio();
105181
106110
  const http$1 = __require$1("node:http");
105182
106111
  const diagnostics = __require$1("node:diagnostics_channel");
105183
106112
  let lightMyRequest;