@absolutejs/auth 0.56.18 → 0.57.0

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.
Files changed (54) hide show
  1. package/dist/agents/index.js +44 -37
  2. package/dist/agents/index.js.map +7 -7
  3. package/dist/audit/postgresAuditStore.d.ts +1 -1
  4. package/dist/audit/types.d.ts +2 -0
  5. package/dist/audit/wrap.d.ts +4 -2
  6. package/dist/cli/import/auth0.d.ts +1 -1
  7. package/dist/cli/import/clerk.d.ts +1 -1
  8. package/dist/cli/import/lucia.d.ts +1 -1
  9. package/dist/cli/import/nextauth.d.ts +1 -1
  10. package/dist/cli/import/types.d.ts +1 -0
  11. package/dist/cli/migrate.js +91 -47
  12. package/dist/cli/migrate.js.map +14 -13
  13. package/dist/client/createAuthClient.d.ts +3 -2
  14. package/dist/client/index.js +9 -498
  15. package/dist/client/index.js.map +5 -20
  16. package/dist/client/react.d.ts +21 -21
  17. package/dist/client/react.js +40 -531
  18. package/dist/client/react.js.map +8 -23
  19. package/dist/client/solid.d.ts +21 -21
  20. package/dist/client/solid.js +29 -518
  21. package/dist/client/solid.js.map +5 -20
  22. package/dist/client/svelte.d.ts +21 -21
  23. package/dist/client/svelte.js +30 -519
  24. package/dist/client/svelte.js.map +5 -20
  25. package/dist/client/vue.d.ts +21 -21
  26. package/dist/client/vue.js +37 -526
  27. package/dist/client/vue.js.map +5 -20
  28. package/dist/credentials/import.d.ts +16 -1
  29. package/dist/credentials/register.d.ts +1 -1
  30. package/dist/credentials/routes.d.ts +1 -1
  31. package/dist/fingerprint-client/index.js +4 -3
  32. package/dist/fingerprint-client/index.js.map +3 -3
  33. package/dist/index.d.ts +3 -3
  34. package/dist/index.js +6416 -262
  35. package/dist/index.js.map +166 -26
  36. package/dist/manifest.js +343 -2674
  37. package/dist/manifest.js.map +57 -31
  38. package/dist/manifest.json +3 -2
  39. package/dist/oidc/clientIdMetadata.d.ts +1 -5
  40. package/dist/oidc/index.js.map +2 -2
  41. package/dist/oidc/vci.d.ts +1 -1
  42. package/dist/routes/callback.d.ts +1 -1
  43. package/dist/server.js +6412 -261
  44. package/dist/server.js.map +166 -26
  45. package/dist/session/neonStore.d.ts +2 -2
  46. package/dist/session/redisStore.d.ts +2 -2
  47. package/dist/session/types.d.ts +2 -0
  48. package/dist/stores/postgres.d.ts +2 -2
  49. package/dist/types.d.ts +2 -1
  50. package/dist/vault/index.js.map +2 -2
  51. package/dist/webauthn.js +27 -1
  52. package/dist/webauthn.js.map +3 -3
  53. package/docs/MIGRATE-FROM-LUCIA.md +19 -2
  54. package/package.json +15 -6
package/dist/manifest.js CHANGED
@@ -45,39 +45,7 @@ var __export = (target, all) => {
45
45
  };
46
46
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
47
47
  var __require = import.meta.require;
48
-
49
- // node_modules/@absolutejs/manifest/dist/index.js
50
- var __defProp2 = Object.defineProperty;
51
- var __returnValue2 = (v) => v;
52
- function __exportSetter2(name, newValue) {
53
- this[name] = __returnValue2.bind(null, newValue);
54
- }
55
- var __export2 = (target, all) => {
56
- for (var name in all)
57
- __defProp2(target, name, {
58
- get: all[name],
59
- enumerable: true,
60
- configurable: true,
61
- set: __exportSetter2.bind(all, name)
62
- });
63
- };
64
- var defineImplementation = () => (implementation) => {
65
- const defined = implementation;
66
- return defined;
67
- };
68
- var defineManifest = () => (manifest) => manifest;
69
- var literal = (value) => value;
70
- var RUNTIME_KIND = literal("runtime");
71
- var WORKSPACE_KIND = literal("workspace");
72
- var toolFactory = () => {
73
- function runtime(definition) {
74
- return { kind: RUNTIME_KIND, ...definition };
75
- }
76
- function workspace(definition) {
77
- return { kind: WORKSPACE_KIND, ...definition };
78
- }
79
- return { runtime, workspace };
80
- };
48
+ // node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
81
49
  function IsAsyncIterator(value) {
82
50
  return IsObject(value) && globalThis.Symbol.asyncIterator in value;
83
51
  }
@@ -144,6 +112,7 @@ function IsSymbol(value) {
144
112
  function IsValueType(value) {
145
113
  return IsBigInt(value) || IsBoolean(value) || IsNull(value) || IsNumber(value) || IsString(value) || IsSymbol(value) || IsUndefined(value);
146
114
  }
115
+ // node_modules/@sinclair/typebox/build/esm/system/policy.mjs
147
116
  var TypeSystemPolicy;
148
117
  (function(TypeSystemPolicy2) {
149
118
  TypeSystemPolicy2.InstanceMode = "default";
@@ -174,8 +143,10 @@ var TypeSystemPolicy;
174
143
  }
175
144
  TypeSystemPolicy2.IsVoidLike = IsVoidLike;
176
145
  })(TypeSystemPolicy || (TypeSystemPolicy = {}));
146
+
147
+ // node_modules/@sinclair/typebox/build/esm/type/registry/format.mjs
177
148
  var exports_format = {};
178
- __export2(exports_format, {
149
+ __export(exports_format, {
179
150
  Set: () => Set2,
180
151
  Has: () => Has,
181
152
  Get: () => Get,
@@ -202,8 +173,9 @@ function Set2(format, func) {
202
173
  function Get(format) {
203
174
  return map.get(format);
204
175
  }
176
+ // node_modules/@sinclair/typebox/build/esm/type/registry/type.mjs
205
177
  var exports_type = {};
206
- __export2(exports_type, {
178
+ __export(exports_type, {
207
179
  Set: () => Set3,
208
180
  Has: () => Has2,
209
181
  Get: () => Get2,
@@ -230,8 +202,9 @@ function Set3(kind, func) {
230
202
  function Get2(kind) {
231
203
  return map2.get(kind);
232
204
  }
205
+ // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
233
206
  var exports_value = {};
234
- __export2(exports_value, {
207
+ __export(exports_value, {
235
208
  IsUndefined: () => IsUndefined2,
236
209
  IsUint8Array: () => IsUint8Array2,
237
210
  IsSymbol: () => IsSymbol2,
@@ -297,6 +270,8 @@ function IsUint8Array2(value) {
297
270
  function IsUndefined2(value) {
298
271
  return value === undefined;
299
272
  }
273
+
274
+ // node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
300
275
  function ImmutableArray(value) {
301
276
  return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
302
277
  }
@@ -322,6 +297,8 @@ function ImmutableObject(value) {
322
297
  function Immutable(value) {
323
298
  return IsArray2(value) ? ImmutableArray(value) : IsDate2(value) ? ImmutableDate(value) : IsUint8Array2(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject2(value) ? ImmutableObject(value) : value;
324
299
  }
300
+
301
+ // node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
325
302
  function ArrayType(value) {
326
303
  return value.map((value2) => Visit(value2));
327
304
  }
@@ -350,6 +327,8 @@ function Visit(value) {
350
327
  function Clone(value) {
351
328
  return Visit(value);
352
329
  }
330
+
331
+ // node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
353
332
  function CreateType(schema, options) {
354
333
  const result = options !== undefined ? { ...options, ...schema } : schema;
355
334
  switch (TypeSystemPolicy.InstanceMode) {
@@ -361,26 +340,35 @@ function CreateType(schema, options) {
361
340
  return result;
362
341
  }
363
342
  }
343
+
344
+ // node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
364
345
  var TransformKind = Symbol.for("TypeBox.Transform");
365
346
  var ReadonlyKind = Symbol.for("TypeBox.Readonly");
366
347
  var OptionalKind = Symbol.for("TypeBox.Optional");
367
348
  var Hint = Symbol.for("TypeBox.Hint");
368
349
  var Kind = Symbol.for("TypeBox.Kind");
350
+
351
+ // node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
369
352
  function Unsafe(options = {}) {
370
353
  return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
371
354
  }
372
355
 
356
+ // node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
373
357
  class TypeBoxError extends Error {
374
358
  constructor(message) {
375
359
  super(message);
376
360
  }
377
361
  }
362
+
363
+ // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
378
364
  function MappedResult(properties) {
379
365
  return CreateType({
380
366
  [Kind]: "MappedResult",
381
367
  properties
382
368
  });
383
369
  }
370
+
371
+ // node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
384
372
  function DiscardKey(value, key) {
385
373
  const { [key]: _, ...rest } = value;
386
374
  return rest;
@@ -388,24 +376,38 @@ function DiscardKey(value, key) {
388
376
  function Discard(value, keys) {
389
377
  return keys.reduce((acc, key) => DiscardKey(acc, key), value);
390
378
  }
379
+
380
+ // node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
391
381
  function Array2(items, options) {
392
382
  return CreateType({ [Kind]: "Array", type: "array", items }, options);
393
383
  }
384
+
385
+ // node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
394
386
  function AsyncIterator(items, options) {
395
387
  return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
396
388
  }
389
+
390
+ // node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
397
391
  function Constructor(parameters, returns, options) {
398
392
  return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
399
393
  }
394
+
395
+ // node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
400
396
  function Function(parameters, returns, options) {
401
397
  return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
402
398
  }
399
+
400
+ // node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
403
401
  function Computed(target, parameters, options) {
404
402
  return CreateType({ [Kind]: "Computed", target, parameters }, options);
405
403
  }
404
+
405
+ // node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
406
406
  function Never(options) {
407
407
  return CreateType({ [Kind]: "Never", not: {} }, options);
408
408
  }
409
+
410
+ // node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
409
411
  function IsReadonly(value) {
410
412
  return IsObject2(value) && value[ReadonlyKind] === "Readonly";
411
413
  }
@@ -535,6 +537,8 @@ function IsKind(value) {
535
537
  function IsSchema(value) {
536
538
  return IsAny(value) || IsArgument(value) || IsArray3(value) || IsBoolean3(value) || IsBigInt3(value) || IsAsyncIterator3(value) || IsComputed(value) || IsConstructor(value) || IsDate3(value) || IsFunction3(value) || IsInteger2(value) || IsIntersect(value) || IsIterator3(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull3(value) || IsNumber3(value) || IsObject3(value) || IsPromise2(value) || IsRecord(value) || IsRef(value) || IsRegExp2(value) || IsString3(value) || IsSymbol3(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined3(value) || IsUnion(value) || IsUint8Array3(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
537
539
  }
540
+
541
+ // node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
538
542
  function RemoveOptional(schema) {
539
543
  return CreateType(Discard(schema, [OptionalKind]));
540
544
  }
@@ -548,6 +552,8 @@ function Optional(schema, enable) {
548
552
  const F = enable ?? true;
549
553
  return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
550
554
  }
555
+
556
+ // node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
551
557
  function FromProperties(P, F) {
552
558
  const Acc = {};
553
559
  for (const K2 of globalThis.Object.getOwnPropertyNames(P))
@@ -561,11 +567,15 @@ function OptionalFromMappedResult(R, F) {
561
567
  const P = FromMappedResult(R, F);
562
568
  return MappedResult(P);
563
569
  }
570
+
571
+ // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
564
572
  function IntersectCreate(T, options = {}) {
565
573
  const allObjects = T.every((schema) => IsObject3(schema));
566
574
  const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
567
575
  return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
568
576
  }
577
+
578
+ // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
569
579
  function IsIntersectOptional(types) {
570
580
  return types.every((left) => IsOptional(left));
571
581
  }
@@ -587,6 +597,8 @@ function IntersectEvaluated(types, options = {}) {
587
597
  throw new Error("Cannot intersect transform types");
588
598
  return ResolveIntersect(types, options);
589
599
  }
600
+
601
+ // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
590
602
  function Intersect(types, options) {
591
603
  if (types.length === 1)
592
604
  return CreateType(types[0], options);
@@ -596,9 +608,13 @@ function Intersect(types, options) {
596
608
  throw new Error("Cannot intersect transform types");
597
609
  return IntersectCreate(types, options);
598
610
  }
611
+
612
+ // node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
599
613
  function UnionCreate(T, options) {
600
614
  return CreateType({ [Kind]: "Union", anyOf: T }, options);
601
615
  }
616
+
617
+ // node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
602
618
  function IsUnionOptional(types) {
603
619
  return types.some((type) => IsOptional(type));
604
620
  }
@@ -615,10 +631,13 @@ function ResolveUnion(types, options) {
615
631
  function UnionEvaluated(T, options) {
616
632
  return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
617
633
  }
634
+
635
+ // node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
618
636
  function Union(types, options) {
619
637
  return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
620
638
  }
621
639
 
640
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
622
641
  class TemplateLiteralParserError extends TypeBoxError {
623
642
  }
624
643
  function Unescape(pattern) {
@@ -742,6 +761,7 @@ function TemplateLiteralParseExact(pattern) {
742
761
  return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
743
762
  }
744
763
 
764
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
745
765
  class TemplateLiteralFiniteError extends TypeBoxError {
746
766
  }
747
767
  function IsNumberExpression(expression) {
@@ -763,6 +783,7 @@ function IsTemplateLiteralFinite(schema) {
763
783
  return IsTemplateLiteralExpressionFinite(expression);
764
784
  }
765
785
 
786
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
766
787
  class TemplateLiteralGenerateError extends TypeBoxError {
767
788
  }
768
789
  function* GenerateReduce(buffer) {
@@ -793,6 +814,8 @@ function TemplateLiteralGenerate(schema) {
793
814
  const expression = TemplateLiteralParseExact(schema.pattern);
794
815
  return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
795
816
  }
817
+
818
+ // node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
796
819
  function Literal(value, options) {
797
820
  return CreateType({
798
821
  [Kind]: "Literal",
@@ -800,22 +823,32 @@ function Literal(value, options) {
800
823
  type: typeof value
801
824
  }, options);
802
825
  }
826
+
827
+ // node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
803
828
  function Boolean(options) {
804
829
  return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
805
830
  }
831
+
832
+ // node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
806
833
  function BigInt2(options) {
807
834
  return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
808
835
  }
836
+
837
+ // node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
809
838
  function Number2(options) {
810
839
  return CreateType({ [Kind]: "Number", type: "number" }, options);
811
840
  }
841
+
842
+ // node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
812
843
  function String2(options) {
813
844
  return CreateType({ [Kind]: "String", type: "string" }, options);
814
845
  }
846
+
847
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
815
848
  function* FromUnion(syntax) {
816
849
  const trim = syntax.trim().replace(/"|'/g, "");
817
850
  return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt2() : trim === "string" ? yield String2() : yield (() => {
818
- const literals = trim.split("|").map((literal2) => Literal(literal2.trim()));
851
+ const literals = trim.split("|").map((literal) => Literal(literal.trim()));
819
852
  return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
820
853
  })();
821
854
  }
@@ -847,6 +880,8 @@ function* FromSyntax(syntax) {
847
880
  function TemplateLiteralSyntax(syntax) {
848
881
  return [...FromSyntax(syntax)];
849
882
  }
883
+
884
+ // node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
850
885
  var PatternBoolean = "(true|false)";
851
886
  var PatternNumber = "(0|[1-9][0-9]*)";
852
887
  var PatternString = "(.*)";
@@ -856,6 +891,7 @@ var PatternNumberExact = `^${PatternNumber}$`;
856
891
  var PatternStringExact = `^${PatternString}$`;
857
892
  var PatternNeverExact = `^${PatternNever}$`;
858
893
 
894
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
859
895
  class TemplateLiteralPatternError extends TypeBoxError {
860
896
  }
861
897
  function Escape(value) {
@@ -869,15 +905,21 @@ function Visit2(schema, acc) {
869
905
  function TemplateLiteralPattern(kinds) {
870
906
  return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
871
907
  }
908
+
909
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
872
910
  function TemplateLiteralToUnion(schema) {
873
911
  const R = TemplateLiteralGenerate(schema);
874
912
  const L = R.map((S) => Literal(S));
875
913
  return UnionEvaluated(L);
876
914
  }
915
+
916
+ // node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
877
917
  function TemplateLiteral(unresolved, options) {
878
918
  const pattern = IsString2(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
879
919
  return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
880
920
  }
921
+
922
+ // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
881
923
  function FromTemplateLiteral(templateLiteral) {
882
924
  const keys = TemplateLiteralGenerate(templateLiteral);
883
925
  return keys.map((key) => key.toString());
@@ -894,6 +936,8 @@ function FromLiteral(literalValue) {
894
936
  function IndexPropertyKeys(type) {
895
937
  return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger2(type) ? ["[number]"] : [])];
896
938
  }
939
+
940
+ // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
897
941
  function FromProperties2(type, properties, options) {
898
942
  const result = {};
899
943
  for (const K2 of Object.getOwnPropertyNames(properties)) {
@@ -908,6 +952,8 @@ function IndexFromMappedResult(type, mappedResult, options) {
908
952
  const properties = FromMappedResult2(type, mappedResult, options);
909
953
  return MappedResult(properties);
910
954
  }
955
+
956
+ // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
911
957
  function FromRest(types, key) {
912
958
  return types.map((type) => IndexFromPropertyKey(type, key));
913
959
  }
@@ -954,6 +1000,8 @@ function Index(type, key, options) {
954
1000
  return IndexFromMappedKey(type, key, options);
955
1001
  return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
956
1002
  }
1003
+
1004
+ // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
957
1005
  function MappedIndexPropertyKey(type, key, options) {
958
1006
  return { [key]: Index(type, [key], Clone(options)) };
959
1007
  }
@@ -969,21 +1017,34 @@ function IndexFromMappedKey(type, mappedKey, options) {
969
1017
  const properties = MappedIndexProperties(type, mappedKey, options);
970
1018
  return MappedResult(properties);
971
1019
  }
1020
+
1021
+ // node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
972
1022
  function Iterator(items, options) {
973
1023
  return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
974
1024
  }
975
- function RequiredArray(properties) {
976
- return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
1025
+
1026
+ // node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
1027
+ function RequiredKeys(properties) {
1028
+ const keys = [];
1029
+ for (let key in properties) {
1030
+ if (!IsOptional(properties[key]))
1031
+ keys.push(key);
1032
+ }
1033
+ return keys;
977
1034
  }
978
- function _Object_(properties, options) {
979
- const required = RequiredArray(properties);
980
- const schema = required.length > 0 ? { [Kind]: "Object", type: "object", required, properties } : { [Kind]: "Object", type: "object", properties };
981
- return CreateType(schema, options);
1035
+ function _Object(properties, options) {
1036
+ const required = RequiredKeys(properties);
1037
+ const schematic = required.length > 0 ? { [Kind]: "Object", type: "object", properties, required } : { [Kind]: "Object", type: "object", properties };
1038
+ return CreateType(schematic, options);
982
1039
  }
983
- var Object2 = _Object_;
1040
+ var Object2 = _Object;
1041
+
1042
+ // node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
984
1043
  function Promise2(item, options) {
985
1044
  return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
986
1045
  }
1046
+
1047
+ // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
987
1048
  function RemoveReadonly(schema) {
988
1049
  return CreateType(Discard(schema, [ReadonlyKind]));
989
1050
  }
@@ -997,6 +1058,8 @@ function Readonly(schema, enable) {
997
1058
  const F = enable ?? true;
998
1059
  return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
999
1060
  }
1061
+
1062
+ // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
1000
1063
  function FromProperties3(K, F) {
1001
1064
  const Acc = {};
1002
1065
  for (const K2 of globalThis.Object.getOwnPropertyNames(K))
@@ -1010,9 +1073,13 @@ function ReadonlyFromMappedResult(R, F) {
1010
1073
  const P = FromMappedResult3(R, F);
1011
1074
  return MappedResult(P);
1012
1075
  }
1076
+
1077
+ // node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
1013
1078
  function Tuple(types, options) {
1014
1079
  return CreateType(types.length > 0 ? { [Kind]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options);
1015
1080
  }
1081
+
1082
+ // node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
1016
1083
  function SetIncludes(T, S) {
1017
1084
  return T.includes(S);
1018
1085
  }
@@ -1036,6 +1103,8 @@ function SetUnionMany(T) {
1036
1103
  Acc.push(...L);
1037
1104
  return Acc;
1038
1105
  }
1106
+
1107
+ // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
1039
1108
  function FromMappedResult4(K, P) {
1040
1109
  return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
1041
1110
  }
@@ -1080,12 +1149,16 @@ function Mapped(key, map3, options) {
1080
1149
  const R = MappedFunctionReturnType(K, RT);
1081
1150
  return Object2(R, options);
1082
1151
  }
1152
+
1153
+ // node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
1083
1154
  function Ref(...args) {
1084
1155
  const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
1085
1156
  if (typeof $ref !== "string")
1086
1157
  throw new TypeBoxError("Ref: $ref must be a string");
1087
1158
  return CreateType({ [Kind]: "Ref", $ref }, options);
1088
1159
  }
1160
+
1161
+ // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
1089
1162
  function FromRest3(types) {
1090
1163
  const result = [];
1091
1164
  for (const L of types)
@@ -1130,6 +1203,8 @@ function KeyOfPattern(schema) {
1130
1203
  const pattern = keys.map((key) => `(${key})`);
1131
1204
  return `^(${pattern.join("|")})$`;
1132
1205
  }
1206
+
1207
+ // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
1133
1208
  function FromComputed(target, parameters) {
1134
1209
  return Computed("KeyOf", [Computed(target, parameters)]);
1135
1210
  }
@@ -1148,6 +1223,8 @@ function KeyOfPropertyKeysToRest(propertyKeys) {
1148
1223
  function KeyOf(type, options) {
1149
1224
  return IsComputed(type) ? FromComputed(type.target, type.parameters) : IsRef(type) ? FromRef(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
1150
1225
  }
1226
+
1227
+ // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
1151
1228
  function FromProperties6(properties, options) {
1152
1229
  const result = {};
1153
1230
  for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
@@ -1161,11 +1238,15 @@ function KeyOfFromMappedResult(mappedResult, options) {
1161
1238
  const properties = FromMappedResult5(mappedResult, options);
1162
1239
  return MappedResult(properties);
1163
1240
  }
1241
+
1242
+ // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs
1164
1243
  function KeyOfPropertyEntries(schema) {
1165
1244
  const keys = KeyOfPropertyKeys(schema);
1166
1245
  const schemas = IndexFromPropertyKeys(schema, keys);
1167
1246
  return keys.map((_, index) => [keys[index], schemas[index]]);
1168
1247
  }
1248
+
1249
+ // node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs
1169
1250
  function Intersect2(schema) {
1170
1251
  return schema.allOf.every((schema2) => ExtendsUndefinedCheck(schema2));
1171
1252
  }
@@ -1178,6 +1259,8 @@ function Not(schema) {
1178
1259
  function ExtendsUndefinedCheck(schema) {
1179
1260
  return schema[Kind] === "Intersect" ? Intersect2(schema) : schema[Kind] === "Union" ? Union2(schema) : schema[Kind] === "Not" ? Not(schema) : schema[Kind] === "Undefined" ? true : false;
1180
1261
  }
1262
+
1263
+ // node_modules/@sinclair/typebox/build/esm/errors/function.mjs
1181
1264
  function DefaultErrorFunction(error) {
1182
1265
  switch (error.errorType) {
1183
1266
  case ValueErrorType.ArrayContains:
@@ -1317,6 +1400,7 @@ function GetErrorFunction() {
1317
1400
  return errorFunction;
1318
1401
  }
1319
1402
 
1403
+ // node_modules/@sinclair/typebox/build/esm/value/deref/deref.mjs
1320
1404
  class TypeDereferenceError extends TypeBoxError {
1321
1405
  constructor(schema) {
1322
1406
  super(`Unable to dereference schema with $id '${schema.$ref}'`);
@@ -1339,6 +1423,7 @@ function Deref(schema, references) {
1339
1423
  return schema[Kind] === "This" || schema[Kind] === "Ref" ? Resolve(schema, references) : schema;
1340
1424
  }
1341
1425
 
1426
+ // node_modules/@sinclair/typebox/build/esm/value/hash/hash.mjs
1342
1427
  class ValueHashError extends TypeBoxError {
1343
1428
  constructor(value) {
1344
1429
  super(`Unable to hash value`);
@@ -1464,14 +1549,19 @@ function Hash(value) {
1464
1549
  Visit3(value);
1465
1550
  return Accumulator;
1466
1551
  }
1552
+
1553
+ // node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
1467
1554
  function Any(options) {
1468
1555
  return CreateType({ [Kind]: "Any" }, options);
1469
1556
  }
1557
+
1558
+ // node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
1470
1559
  function Unknown(options) {
1471
1560
  return CreateType({ [Kind]: "Unknown" }, options);
1472
1561
  }
1562
+ // node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
1473
1563
  var exports_type2 = {};
1474
- __export2(exports_type2, {
1564
+ __export(exports_type2, {
1475
1565
  TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError,
1476
1566
  IsVoid: () => IsVoid2,
1477
1567
  IsUnsafe: () => IsUnsafe2,
@@ -1524,7 +1614,6 @@ __export2(exports_type2, {
1524
1614
  IsArgument: () => IsArgument2,
1525
1615
  IsAny: () => IsAny2
1526
1616
  });
1527
-
1528
1617
  class TypeGuardUnknownTypeError extends TypeBoxError {
1529
1618
  }
1530
1619
  var KnownTypes = [
@@ -1760,7 +1849,7 @@ function IsKind2(value) {
1760
1849
  function IsSchema2(value) {
1761
1850
  return IsObject2(value) && (IsAny2(value) || IsArgument2(value) || IsArray4(value) || IsBoolean4(value) || IsBigInt4(value) || IsAsyncIterator4(value) || IsComputed2(value) || IsConstructor2(value) || IsDate4(value) || IsFunction4(value) || IsInteger3(value) || IsIntersect2(value) || IsIterator4(value) || IsLiteral2(value) || IsMappedKey2(value) || IsMappedResult2(value) || IsNever2(value) || IsNot2(value) || IsNull4(value) || IsNumber4(value) || IsObject4(value) || IsPromise3(value) || IsRecord2(value) || IsRef2(value) || IsRegExp3(value) || IsString4(value) || IsSymbol4(value) || IsTemplateLiteral2(value) || IsThis2(value) || IsTuple2(value) || IsUndefined4(value) || IsUnion2(value) || IsUint8Array4(value) || IsUnknown2(value) || IsUnsafe2(value) || IsVoid2(value) || IsKind2(value));
1762
1851
  }
1763
-
1852
+ // node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
1764
1853
  class ExtendsResolverError extends TypeBoxError {
1765
1854
  }
1766
1855
  var ExtendsResult;
@@ -2004,6 +2093,8 @@ function Visit4(left, right) {
2004
2093
  function ExtendsCheck(left, right) {
2005
2094
  return Visit4(left, right);
2006
2095
  }
2096
+
2097
+ // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
2007
2098
  function FromProperties7(P, Right, True, False, options) {
2008
2099
  const Acc = {};
2009
2100
  for (const K2 of globalThis.Object.getOwnPropertyNames(P))
@@ -2017,6 +2108,8 @@ function ExtendsFromMappedResult(Left, Right, True, False, options) {
2017
2108
  const P = FromMappedResult6(Left, Right, True, False, options);
2018
2109
  return MappedResult(P);
2019
2110
  }
2111
+
2112
+ // node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
2020
2113
  function ExtendsResolve(left, right, trueType, falseType) {
2021
2114
  const R = ExtendsCheck(left, right);
2022
2115
  return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
@@ -2024,6 +2117,8 @@ function ExtendsResolve(left, right, trueType, falseType) {
2024
2117
  function Extends(L, R, T, F, options) {
2025
2118
  return IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) : IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R, T, F, options)) : CreateType(ExtendsResolve(L, R, T, F), options);
2026
2119
  }
2120
+
2121
+ // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
2027
2122
  function FromPropertyKey(K, U, L, R, options) {
2028
2123
  return {
2029
2124
  [K]: Extends(Literal(K), U, L, R, Clone(options))
@@ -2042,6 +2137,7 @@ function ExtendsFromMappedKey(T, U, L, R, options) {
2042
2137
  return MappedResult(P);
2043
2138
  }
2044
2139
 
2140
+ // node_modules/@sinclair/typebox/build/esm/value/check/check.mjs
2045
2141
  class ValueCheckUnknownTypeError extends TypeBoxError {
2046
2142
  constructor(schema) {
2047
2143
  super(`Unknown type`);
@@ -2069,9 +2165,8 @@ function FromArray4(schema, references, value) {
2069
2165
  if (IsDefined(schema.maxItems) && !(value.length <= schema.maxItems)) {
2070
2166
  return false;
2071
2167
  }
2072
- for (const element of value) {
2073
- if (!Visit5(schema.items, references, element))
2074
- return false;
2168
+ if (!value.every((value2) => Visit5(schema.items, references, value2))) {
2169
+ return false;
2075
2170
  }
2076
2171
  if (schema.uniqueItems === true && !function() {
2077
2172
  const set = new Set;
@@ -2472,6 +2567,8 @@ function Visit5(schema, references, value) {
2472
2567
  function Check(...args) {
2473
2568
  return args.length === 3 ? Visit5(args[0], args[1], args[2]) : Visit5(args[0], [], args[1]);
2474
2569
  }
2570
+
2571
+ // node_modules/@sinclair/typebox/build/esm/errors/errors.mjs
2475
2572
  var ValueErrorType;
2476
2573
  (function(ValueErrorType2) {
2477
2574
  ValueErrorType2[ValueErrorType2["ArrayContains"] = 0] = "ArrayContains";
@@ -3026,6 +3123,8 @@ function Errors(...args) {
3026
3123
  const iterator = args.length === 3 ? Visit6(args[0], args[1], "", args[2]) : Visit6(args[0], [], "", args[1]);
3027
3124
  return new ValueErrorIterator(iterator);
3028
3125
  }
3126
+
3127
+ // node_modules/@sinclair/typebox/build/esm/value/assert/assert.mjs
3029
3128
  var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
3030
3129
  if (kind === "m")
3031
3130
  throw new TypeError("Private method is not writable");
@@ -3072,6 +3171,7 @@ function AssertValue(schema, references, value) {
3072
3171
  function Assert(...args) {
3073
3172
  return args.length === 3 ? AssertValue(args[0], args[1], args[2]) : AssertValue(args[0], [], args[1]);
3074
3173
  }
3174
+ // node_modules/@sinclair/typebox/build/esm/value/clone/clone.mjs
3075
3175
  function FromObject4(value) {
3076
3176
  const Acc = {};
3077
3177
  for (const key of Object.getOwnPropertyNames(value)) {
@@ -3118,6 +3218,7 @@ function Clone2(value) {
3118
3218
  throw new Error("ValueClone: Unable to clone value");
3119
3219
  }
3120
3220
 
3221
+ // node_modules/@sinclair/typebox/build/esm/value/create/create.mjs
3121
3222
  class ValueCreateError extends TypeBoxError {
3122
3223
  constructor(schema, message) {
3123
3224
  super(message);
@@ -3302,8 +3403,15 @@ function FromPromise4(schema, references) {
3302
3403
  }
3303
3404
  }
3304
3405
  function FromRecord4(schema, references) {
3406
+ const [keyPattern, valueSchema] = Object.entries(schema.patternProperties)[0];
3305
3407
  if (HasPropertyKey(schema, "default")) {
3306
3408
  return FromDefault(schema.default);
3409
+ } else if (!(keyPattern === PatternStringExact || keyPattern === PatternNumberExact)) {
3410
+ const propertyKeys = keyPattern.slice(1, keyPattern.length - 1).split("|");
3411
+ const Acc = {};
3412
+ for (const key of propertyKeys)
3413
+ Acc[key] = Visit7(valueSchema, references);
3414
+ return Acc;
3307
3415
  } else {
3308
3416
  return {};
3309
3417
  }
@@ -3511,6 +3619,7 @@ function Create2(...args) {
3511
3619
  return args.length === 2 ? Visit7(args[0], args[1]) : Visit7(args[0], []);
3512
3620
  }
3513
3621
 
3622
+ // node_modules/@sinclair/typebox/build/esm/value/cast/cast.mjs
3514
3623
  class ValueCastError extends TypeBoxError {
3515
3624
  constructor(schema, message) {
3516
3625
  super(message);
@@ -3522,16 +3631,13 @@ function ScoreUnion(schema, references, value) {
3522
3631
  const object = schema;
3523
3632
  const keys = Object.getOwnPropertyNames(value);
3524
3633
  const entries = Object.entries(object.properties);
3634
+ const [point, max] = [1 / entries.length, entries.length];
3525
3635
  return entries.reduce((acc, [key, schema2]) => {
3526
- const literal2 = schema2[Kind] === "Literal" && schema2.const === value[key] ? 100 : 0;
3527
- const checks = Check(schema2, references, value[key]) ? 10 : 0;
3528
- const exists = keys.includes(key) ? 1 : 0;
3529
- return acc + (literal2 + checks + exists);
3636
+ const literal = schema2[Kind] === "Literal" && schema2.const === value[key] ? max : 0;
3637
+ const checks = Check(schema2, references, value[key]) ? point : 0;
3638
+ const exists = keys.includes(key) ? point : 0;
3639
+ return acc + (literal + checks + exists);
3530
3640
  }, 0);
3531
- } else if (schema[Kind] === "Union") {
3532
- const schemas = schema.anyOf.map((schema2) => Deref(schema2, references));
3533
- const scores = schemas.map((schema2) => ScoreUnion(schema2, references, value));
3534
- return Math.max(...scores);
3535
3641
  } else {
3536
3642
  return Check(schema, references, value) ? 1 : 0;
3537
3643
  }
@@ -3593,22 +3699,10 @@ function FromImport4(schema, references, value) {
3593
3699
  const target = schema.$defs[schema.$ref];
3594
3700
  return Visit8(target, [...references, ...definitions], value);
3595
3701
  }
3596
- function IntersectAssign(correct, value) {
3597
- if (IsObject(correct) && !IsObject(value) || !IsObject(correct) && IsObject(value))
3598
- return correct;
3599
- if (!IsObject(correct) || !IsObject(value))
3600
- return value;
3601
- return globalThis.Object.getOwnPropertyNames(correct).reduce((result, key) => {
3602
- const property = key in value ? IntersectAssign(correct[key], value[key]) : correct[key];
3603
- return { ...result, [key]: property };
3604
- }, {});
3605
- }
3606
3702
  function FromIntersect7(schema, references, value) {
3607
- if (Check(schema, references, value))
3608
- return value;
3609
- const correct = Create2(schema, references);
3610
- const assigned = IntersectAssign(correct, value);
3611
- return Check(schema, references, assigned) ? assigned : correct;
3703
+ const created = Create2(schema, references);
3704
+ const mapped = IsObject(created) && IsObject(value) ? { ...created, ...value } : value;
3705
+ return Check(schema, references, mapped) ? mapped : Create2(schema, references);
3612
3706
  }
3613
3707
  function FromNever5(schema, references, value) {
3614
3708
  throw new ValueCastError(schema, "Never types cannot be cast");
@@ -3703,6 +3797,7 @@ function Visit8(schema, references, value) {
3703
3797
  function Cast(...args) {
3704
3798
  return args.length === 3 ? Visit8(args[0], args[1], args[2]) : Visit8(args[0], [], args[1]);
3705
3799
  }
3800
+ // node_modules/@sinclair/typebox/build/esm/value/clean/clean.mjs
3706
3801
  function IsCheckable(schema) {
3707
3802
  return IsKind(schema) && schema[Kind] !== "Unsafe";
3708
3803
  }
@@ -3823,6 +3918,7 @@ function Visit9(schema, references, value) {
3823
3918
  function Clean(...args) {
3824
3919
  return args.length === 3 ? Visit9(args[0], args[1], args[2]) : Visit9(args[0], [], args[1]);
3825
3920
  }
3921
+ // node_modules/@sinclair/typebox/build/esm/value/convert/convert.mjs
3826
3922
  function IsStringNumeric(value) {
3827
3923
  return IsString(value) && !isNaN(value) && !isNaN(parseFloat(value));
3828
3924
  }
@@ -3927,7 +4023,7 @@ function FromNumber5(schema, references, value) {
3927
4023
  return TryConvertNumber(value);
3928
4024
  }
3929
4025
  function FromObject8(schema, references, value) {
3930
- if (!IsObject(value) || IsArray(value))
4026
+ if (!IsObject(value))
3931
4027
  return value;
3932
4028
  for (const propertyKey of Object.getOwnPropertyNames(schema.properties)) {
3933
4029
  if (!HasPropertyKey(value, propertyKey))
@@ -3937,7 +4033,7 @@ function FromObject8(schema, references, value) {
3937
4033
  return value;
3938
4034
  }
3939
4035
  function FromRecord7(schema, references, value) {
3940
- const isConvertable = IsObject(value) && !IsArray(value);
4036
+ const isConvertable = IsObject(value);
3941
4037
  if (!isConvertable)
3942
4038
  return value;
3943
4039
  const propertyKey = Object.getOwnPropertyNames(schema.patternProperties)[0];
@@ -3971,11 +4067,6 @@ function FromUndefined5(schema, references, value) {
3971
4067
  return TryConvertUndefined(value);
3972
4068
  }
3973
4069
  function FromUnion11(schema, references, value) {
3974
- for (const subschema of schema.anyOf) {
3975
- if (Check(subschema, references, value)) {
3976
- return value;
3977
- }
3978
- }
3979
4070
  for (const subschema of schema.anyOf) {
3980
4071
  const converted = Visit10(subschema, references, Clone2(value));
3981
4072
  if (!Check(subschema, references, converted))
@@ -4033,7 +4124,7 @@ function Visit10(schema, references, value) {
4033
4124
  function Convert(...args) {
4034
4125
  return args.length === 3 ? Visit10(args[0], args[1], args[2]) : Visit10(args[0], [], args[1]);
4035
4126
  }
4036
-
4127
+ // node_modules/@sinclair/typebox/build/esm/value/transform/decode.mjs
4037
4128
  class TransformDecodeCheckError extends TypeBoxError {
4038
4129
  constructor(schema, value, error) {
4039
4130
  super(`Unable to decode value as it does not match the expected schema`);
@@ -4193,6 +4284,7 @@ function TransformDecode(schema, references, value) {
4193
4284
  return Visit11(schema, references, "", value);
4194
4285
  }
4195
4286
 
4287
+ // node_modules/@sinclair/typebox/build/esm/value/transform/encode.mjs
4196
4288
  class TransformEncodeCheckError extends TypeBoxError {
4197
4289
  constructor(schema, value, error) {
4198
4290
  super(`The encoded value does not match the expected schema`);
@@ -4362,6 +4454,8 @@ function Visit12(schema, references, path, value) {
4362
4454
  function TransformEncode(schema, references, value) {
4363
4455
  return Visit12(schema, references, "", value);
4364
4456
  }
4457
+
4458
+ // node_modules/@sinclair/typebox/build/esm/value/transform/has.mjs
4365
4459
  function FromArray13(schema, references) {
4366
4460
  return IsTransform(schema) || Visit13(schema.items, references);
4367
4461
  }
@@ -4462,12 +4556,15 @@ function HasTransform(schema, references) {
4462
4556
  visited.clear();
4463
4557
  return Visit13(schema, references);
4464
4558
  }
4559
+
4560
+ // node_modules/@sinclair/typebox/build/esm/value/decode/decode.mjs
4465
4561
  function Decode(...args) {
4466
4562
  const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
4467
4563
  if (!Check(schema, references, value))
4468
4564
  throw new TransformDecodeCheckError(schema, value, Errors(schema, references, value).First());
4469
4565
  return HasTransform(schema, references) ? TransformDecode(schema, references, value) : value;
4470
4566
  }
4567
+ // node_modules/@sinclair/typebox/build/esm/value/default/default.mjs
4471
4568
  function ValueOrDefault(schema, value) {
4472
4569
  const defaultValue = HasPropertyKey(schema, "default") ? schema.default : undefined;
4473
4570
  const clone = IsFunction(defaultValue) ? defaultValue() : Clone2(defaultValue);
@@ -4605,8 +4702,9 @@ function Visit14(schema, references, value) {
4605
4702
  function Default5(...args) {
4606
4703
  return args.length === 3 ? Visit14(args[0], args[1], args[2]) : Visit14(args[0], [], args[1]);
4607
4704
  }
4705
+ // node_modules/@sinclair/typebox/build/esm/value/pointer/pointer.mjs
4608
4706
  var exports_pointer = {};
4609
- __export2(exports_pointer, {
4707
+ __export(exports_pointer, {
4610
4708
  ValuePointerRootSetError: () => ValuePointerRootSetError,
4611
4709
  ValuePointerRootDeleteError: () => ValuePointerRootDeleteError,
4612
4710
  Set: () => Set4,
@@ -4615,7 +4713,6 @@ __export2(exports_pointer, {
4615
4713
  Format: () => Format,
4616
4714
  Delete: () => Delete3
4617
4715
  });
4618
-
4619
4716
  class ValuePointerRootSetError extends TypeBoxError {
4620
4717
  constructor(value, path, update) {
4621
4718
  super("Cannot set root value");
@@ -4710,6 +4807,7 @@ function Get3(value, pointer) {
4710
4807
  }
4711
4808
  return current;
4712
4809
  }
4810
+ // node_modules/@sinclair/typebox/build/esm/value/equal/equal.mjs
4713
4811
  function ObjectType3(left, right) {
4714
4812
  if (!IsObject(right))
4715
4813
  return false;
@@ -4748,6 +4846,8 @@ function Equal(left, right) {
4748
4846
  return ValueType(left, right);
4749
4847
  throw new Error("ValueEquals: Unable to compare value");
4750
4848
  }
4849
+
4850
+ // node_modules/@sinclair/typebox/build/esm/value/delta/delta.mjs
4751
4851
  var Insert = Object2({
4752
4852
  type: Literal("insert"),
4753
4853
  path: String2(),
@@ -4883,6 +4983,7 @@ function Patch(current, edits) {
4883
4983
  }
4884
4984
  return clone;
4885
4985
  }
4986
+ // node_modules/@sinclair/typebox/build/esm/value/encode/encode.mjs
4886
4987
  function Encode(...args) {
4887
4988
  const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
4888
4989
  const encoded = HasTransform(schema, references) ? TransformEncode(schema, references, value) : value;
@@ -4890,6 +4991,7 @@ function Encode(...args) {
4890
4991
  throw new TransformEncodeCheckError(schema, encoded, Errors(schema, references, encoded).First());
4891
4992
  return encoded;
4892
4993
  }
4994
+ // node_modules/@sinclair/typebox/build/esm/value/mutate/mutate.mjs
4893
4995
  function IsStandardObject2(value) {
4894
4996
  return IsObject(value) && !IsArray(value);
4895
4997
  }
@@ -4967,7 +5069,7 @@ function Mutate(current, next) {
4967
5069
  throw new ValueMutateError("Cannot assign due type mismatch of assignable values");
4968
5070
  Visit16(current, "", current, next);
4969
5071
  }
4970
-
5072
+ // node_modules/@sinclair/typebox/build/esm/value/parse/parse.mjs
4971
5073
  class ParseError extends TypeBoxError {
4972
5074
  constructor(message) {
4973
5075
  super(message);
@@ -5023,8 +5125,9 @@ function Parse(...args) {
5023
5125
  })();
5024
5126
  return ParseValue(operations, schema, references, value);
5025
5127
  }
5128
+ // node_modules/@sinclair/typebox/build/esm/value/value/value.mjs
5026
5129
  var exports_value2 = {};
5027
- __export2(exports_value2, {
5130
+ __export(exports_value2, {
5028
5131
  ValueErrorIterator: () => ValueErrorIterator,
5029
5132
  Patch: () => Patch,
5030
5133
  Parse: () => Parse,
@@ -5045,12 +5148,17 @@ __export2(exports_value2, {
5045
5148
  Cast: () => Cast,
5046
5149
  Assert: () => Assert
5047
5150
  });
5151
+ // node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
5048
5152
  function CloneType(schema, options) {
5049
5153
  return options === undefined ? Clone(schema) : Clone({ ...options, ...schema });
5050
5154
  }
5155
+
5156
+ // node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
5051
5157
  function Argument(index) {
5052
5158
  return CreateType({ [Kind]: "Argument", index });
5053
5159
  }
5160
+
5161
+ // node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
5054
5162
  function FromComputed2(target, parameters) {
5055
5163
  return Computed("Awaited", [Computed(target, parameters)]);
5056
5164
  }
@@ -5072,6 +5180,8 @@ function FromRest4(types) {
5072
5180
  function Awaited(type, options) {
5073
5181
  return CreateType(IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsIntersect(type) ? FromIntersect14(type.allOf) : IsUnion(type) ? FromUnion16(type.anyOf) : IsPromise2(type) ? FromPromise6(type.item) : IsRef(type) ? FromRef12(type.$ref) : type, options);
5074
5182
  }
5183
+
5184
+ // node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
5075
5185
  function CompositeKeys(T) {
5076
5186
  const Acc = [];
5077
5187
  for (const L of T)
@@ -5100,21 +5210,33 @@ function Composite(T, options) {
5100
5210
  const R = Object2(P, options);
5101
5211
  return R;
5102
5212
  }
5213
+
5214
+ // node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
5103
5215
  function Date2(options) {
5104
5216
  return CreateType({ [Kind]: "Date", type: "Date" }, options);
5105
5217
  }
5218
+
5219
+ // node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
5106
5220
  function Null(options) {
5107
5221
  return CreateType({ [Kind]: "Null", type: "null" }, options);
5108
5222
  }
5223
+
5224
+ // node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
5109
5225
  function Symbol2(options) {
5110
5226
  return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
5111
5227
  }
5228
+
5229
+ // node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
5112
5230
  function Undefined(options) {
5113
5231
  return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
5114
5232
  }
5233
+
5234
+ // node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
5115
5235
  function Uint8Array2(options) {
5116
5236
  return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
5117
5237
  }
5238
+
5239
+ // node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
5118
5240
  function FromArray15(T) {
5119
5241
  return T.map((L) => FromValue2(L, false));
5120
5242
  }
@@ -5133,9 +5255,13 @@ function FromValue2(value, root) {
5133
5255
  function Const(T, options) {
5134
5256
  return CreateType(FromValue2(T, true), options);
5135
5257
  }
5258
+
5259
+ // node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
5136
5260
  function ConstructorParameters(schema, options) {
5137
5261
  return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
5138
5262
  }
5263
+
5264
+ // node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
5139
5265
  function Enum(item, options) {
5140
5266
  if (IsUndefined2(item))
5141
5267
  throw new Error("Enum undefined or empty");
@@ -5144,9 +5270,13 @@ function Enum(item, options) {
5144
5270
  const anyOf = values2.map((value) => Literal(value));
5145
5271
  return Union(anyOf, { ...options, [Hint]: "Enum" });
5146
5272
  }
5273
+
5274
+ // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
5147
5275
  function ExcludeFromTemplateLiteral(L, R) {
5148
5276
  return Exclude(TemplateLiteralToUnion(L), R);
5149
5277
  }
5278
+
5279
+ // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
5150
5280
  function ExcludeRest(L, R) {
5151
5281
  const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
5152
5282
  return excluded.length === 1 ? excluded[0] : Union(excluded);
@@ -5158,6 +5288,8 @@ function Exclude(L, R, options = {}) {
5158
5288
  return CreateType(ExcludeFromMappedResult(L, R), options);
5159
5289
  return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
5160
5290
  }
5291
+
5292
+ // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
5161
5293
  function FromProperties9(P, U) {
5162
5294
  const Acc = {};
5163
5295
  for (const K2 of globalThis.Object.getOwnPropertyNames(P))
@@ -5171,9 +5303,13 @@ function ExcludeFromMappedResult(R, T) {
5171
5303
  const P = FromMappedResult7(R, T);
5172
5304
  return MappedResult(P);
5173
5305
  }
5306
+
5307
+ // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
5174
5308
  function ExtractFromTemplateLiteral(L, R) {
5175
5309
  return Extract(TemplateLiteralToUnion(L), R);
5176
5310
  }
5311
+
5312
+ // node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
5177
5313
  function ExtractRest(L, R) {
5178
5314
  const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
5179
5315
  return extracted.length === 1 ? extracted[0] : Union(extracted);
@@ -5185,6 +5321,8 @@ function Extract(L, R, options) {
5185
5321
  return CreateType(ExtractFromMappedResult(L, R), options);
5186
5322
  return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
5187
5323
  }
5324
+
5325
+ // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
5188
5326
  function FromProperties10(P, T) {
5189
5327
  const Acc = {};
5190
5328
  for (const K2 of globalThis.Object.getOwnPropertyNames(P))
@@ -5198,12 +5336,18 @@ function ExtractFromMappedResult(R, T) {
5198
5336
  const P = FromMappedResult8(R, T);
5199
5337
  return MappedResult(P);
5200
5338
  }
5339
+
5340
+ // node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
5201
5341
  function InstanceType(schema, options) {
5202
5342
  return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
5203
5343
  }
5344
+
5345
+ // node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
5204
5346
  function ReadonlyOptional(schema) {
5205
5347
  return Readonly(Optional(schema));
5206
5348
  }
5349
+
5350
+ // node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
5207
5351
  function RecordCreateFromPattern(pattern, T, options) {
5208
5352
  return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
5209
5353
  }
@@ -5257,6 +5401,8 @@ function RecordKey2(type) {
5257
5401
  function RecordValue2(type) {
5258
5402
  return type.patternProperties[RecordPattern(type)];
5259
5403
  }
5404
+
5405
+ // node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
5260
5406
  function FromConstructor7(args, type) {
5261
5407
  type.parameters = FromTypes(args, type.parameters);
5262
5408
  type.returns = FromType(args, type.returns);
@@ -5330,9 +5476,13 @@ function FromType(args, type) {
5330
5476
  function Instantiate(type, args) {
5331
5477
  return FromType(args, CloneType(type));
5332
5478
  }
5479
+
5480
+ // node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
5333
5481
  function Integer(options) {
5334
5482
  return CreateType({ [Kind]: "Integer", type: "integer" }, options);
5335
5483
  }
5484
+
5485
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
5336
5486
  function MappedIntrinsicPropertyKey(K, M, options) {
5337
5487
  return {
5338
5488
  [K]: Intrinsic(Literal(K), M, Clone(options))
@@ -5351,6 +5501,8 @@ function IntrinsicFromMappedKey(T, M, options) {
5351
5501
  const P = MappedIntrinsicProperties(T, M, options);
5352
5502
  return MappedResult(P);
5353
5503
  }
5504
+
5505
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
5354
5506
  function ApplyUncapitalize(value) {
5355
5507
  const [first, rest] = [value.slice(0, 1), value.slice(1)];
5356
5508
  return [first.toLowerCase(), rest].join("");
@@ -5385,18 +5537,28 @@ function FromRest5(T, M) {
5385
5537
  function Intrinsic(schema, mode, options = {}) {
5386
5538
  return IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : IsTemplateLiteral(schema) ? FromTemplateLiteral6(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : CreateType(schema, options);
5387
5539
  }
5540
+
5541
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
5388
5542
  function Capitalize(T, options = {}) {
5389
5543
  return Intrinsic(T, "Capitalize", options);
5390
5544
  }
5545
+
5546
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
5391
5547
  function Lowercase(T, options = {}) {
5392
5548
  return Intrinsic(T, "Lowercase", options);
5393
5549
  }
5550
+
5551
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
5394
5552
  function Uncapitalize(T, options = {}) {
5395
5553
  return Intrinsic(T, "Uncapitalize", options);
5396
5554
  }
5555
+
5556
+ // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
5397
5557
  function Uppercase(T, options = {}) {
5398
5558
  return Intrinsic(T, "Uppercase", options);
5399
5559
  }
5560
+
5561
+ // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
5400
5562
  function FromProperties12(properties, propertyKeys, options) {
5401
5563
  const result = {};
5402
5564
  for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
@@ -5410,6 +5572,8 @@ function OmitFromMappedResult(mappedResult, propertyKeys, options) {
5410
5572
  const properties = FromMappedResult9(mappedResult, propertyKeys, options);
5411
5573
  return MappedResult(properties);
5412
5574
  }
5575
+
5576
+ // node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
5413
5577
  function FromIntersect16(types, propertyKeys) {
5414
5578
  return types.map((type) => OmitResolve(type, propertyKeys));
5415
5579
  }
@@ -5423,17 +5587,17 @@ function FromProperty3(properties, key) {
5423
5587
  function FromProperties13(properties, propertyKeys) {
5424
5588
  return propertyKeys.reduce((T, K2) => FromProperty3(T, K2), properties);
5425
5589
  }
5426
- function FromObject14(type, propertyKeys, properties) {
5427
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
5428
- const mappedProperties = FromProperties13(properties, propertyKeys);
5429
- return Object2(mappedProperties, options);
5590
+ function FromObject14(properties, propertyKeys) {
5591
+ const options = Discard(properties, [TransformKind, "$id", "required", "properties"]);
5592
+ const omittedProperties = FromProperties13(properties["properties"], propertyKeys);
5593
+ return Object2(omittedProperties, options);
5430
5594
  }
5431
5595
  function UnionFromPropertyKeys(propertyKeys) {
5432
5596
  const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
5433
5597
  return Union(result);
5434
5598
  }
5435
- function OmitResolve(type, propertyKeys) {
5436
- return IsIntersect(type) ? Intersect(FromIntersect16(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion18(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject14(type, propertyKeys, type.properties) : Object2({});
5599
+ function OmitResolve(properties, propertyKeys) {
5600
+ return IsIntersect(properties) ? Intersect(FromIntersect16(properties.allOf, propertyKeys)) : IsUnion(properties) ? Union(FromUnion18(properties.anyOf, propertyKeys)) : IsObject3(properties) ? FromObject14(properties, propertyKeys) : Object2({});
5437
5601
  }
5438
5602
  function Omit(type, key, options) {
5439
5603
  const typeKey = IsArray2(key) ? UnionFromPropertyKeys(key) : key;
@@ -5442,6 +5606,8 @@ function Omit(type, key, options) {
5442
5606
  const isKeyRef = IsRef(key);
5443
5607
  return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? OmitFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({ ...OmitResolve(type, propertyKeys), ...options });
5444
5608
  }
5609
+
5610
+ // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
5445
5611
  function FromPropertyKey2(type, key, options) {
5446
5612
  return { [key]: Omit(type, [key], Clone(options)) };
5447
5613
  }
@@ -5457,6 +5623,8 @@ function OmitFromMappedKey(type, mappedKey, options) {
5457
5623
  const properties = FromMappedKey3(type, mappedKey, options);
5458
5624
  return MappedResult(properties);
5459
5625
  }
5626
+
5627
+ // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
5460
5628
  function FromProperties14(properties, propertyKeys, options) {
5461
5629
  const result = {};
5462
5630
  for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
@@ -5470,6 +5638,8 @@ function PickFromMappedResult(mappedResult, propertyKeys, options) {
5470
5638
  const properties = FromMappedResult10(mappedResult, propertyKeys, options);
5471
5639
  return MappedResult(properties);
5472
5640
  }
5641
+
5642
+ // node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
5473
5643
  function FromIntersect17(types, propertyKeys) {
5474
5644
  return types.map((type) => PickResolve(type, propertyKeys));
5475
5645
  }
@@ -5483,17 +5653,17 @@ function FromProperties15(properties, propertyKeys) {
5483
5653
  result[K2] = properties[K2];
5484
5654
  return result;
5485
5655
  }
5486
- function FromObject15(Type, keys, properties) {
5487
- const options = Discard(Type, [TransformKind, "$id", "required", "properties"]);
5488
- const mappedProperties = FromProperties15(properties, keys);
5489
- return Object2(mappedProperties, options);
5656
+ function FromObject15(T, K) {
5657
+ const options = Discard(T, [TransformKind, "$id", "required", "properties"]);
5658
+ const properties = FromProperties15(T["properties"], K);
5659
+ return Object2(properties, options);
5490
5660
  }
5491
5661
  function UnionFromPropertyKeys2(propertyKeys) {
5492
5662
  const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
5493
5663
  return Union(result);
5494
5664
  }
5495
- function PickResolve(type, propertyKeys) {
5496
- return IsIntersect(type) ? Intersect(FromIntersect17(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion19(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject15(type, propertyKeys, type.properties) : Object2({});
5665
+ function PickResolve(properties, propertyKeys) {
5666
+ return IsIntersect(properties) ? Intersect(FromIntersect17(properties.allOf, propertyKeys)) : IsUnion(properties) ? Union(FromUnion19(properties.anyOf, propertyKeys)) : IsObject3(properties) ? FromObject15(properties, propertyKeys) : Object2({});
5497
5667
  }
5498
5668
  function Pick(type, key, options) {
5499
5669
  const typeKey = IsArray2(key) ? UnionFromPropertyKeys2(key) : key;
@@ -5502,6 +5672,8 @@ function Pick(type, key, options) {
5502
5672
  const isKeyRef = IsRef(key);
5503
5673
  return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? PickFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({ ...PickResolve(type, propertyKeys), ...options });
5504
5674
  }
5675
+
5676
+ // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
5505
5677
  function FromPropertyKey3(type, key, options) {
5506
5678
  return {
5507
5679
  [key]: Pick(type, [key], Clone(options))
@@ -5519,6 +5691,8 @@ function PickFromMappedKey(type, mappedKey, options) {
5519
5691
  const properties = FromMappedKey4(type, mappedKey, options);
5520
5692
  return MappedResult(properties);
5521
5693
  }
5694
+
5695
+ // node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
5522
5696
  function FromComputed3(target, parameters) {
5523
5697
  return Computed("Partial", [Computed(target, parameters)]);
5524
5698
  }
@@ -5531,16 +5705,16 @@ function FromProperties16(properties) {
5531
5705
  partialProperties[K] = Optional(properties[K]);
5532
5706
  return partialProperties;
5533
5707
  }
5534
- function FromObject16(type, properties) {
5708
+ function FromObject16(type) {
5535
5709
  const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
5536
- const mappedProperties = FromProperties16(properties);
5537
- return Object2(mappedProperties, options);
5710
+ const properties = FromProperties16(type["properties"]);
5711
+ return Object2(properties, options);
5538
5712
  }
5539
5713
  function FromRest6(types) {
5540
5714
  return types.map((type) => PartialResolve(type));
5541
5715
  }
5542
5716
  function PartialResolve(type) {
5543
- return IsComputed(type) ? FromComputed3(type.target, type.parameters) : IsRef(type) ? FromRef13(type.$ref) : IsIntersect(type) ? Intersect(FromRest6(type.allOf)) : IsUnion(type) ? Union(FromRest6(type.anyOf)) : IsObject3(type) ? FromObject16(type, type.properties) : IsBigInt3(type) ? type : IsBoolean3(type) ? type : IsInteger2(type) ? type : IsLiteral(type) ? type : IsNull3(type) ? type : IsNumber3(type) ? type : IsString3(type) ? type : IsSymbol3(type) ? type : IsUndefined3(type) ? type : Object2({});
5717
+ return IsComputed(type) ? FromComputed3(type.target, type.parameters) : IsRef(type) ? FromRef13(type.$ref) : IsIntersect(type) ? Intersect(FromRest6(type.allOf)) : IsUnion(type) ? Union(FromRest6(type.anyOf)) : IsObject3(type) ? FromObject16(type) : IsBigInt3(type) ? type : IsBoolean3(type) ? type : IsInteger2(type) ? type : IsLiteral(type) ? type : IsNull3(type) ? type : IsNumber3(type) ? type : IsString3(type) ? type : IsSymbol3(type) ? type : IsUndefined3(type) ? type : Object2({});
5544
5718
  }
5545
5719
  function Partial(type, options) {
5546
5720
  if (IsMappedResult(type)) {
@@ -5549,6 +5723,8 @@ function Partial(type, options) {
5549
5723
  return CreateType({ ...PartialResolve(type), ...options });
5550
5724
  }
5551
5725
  }
5726
+
5727
+ // node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
5552
5728
  function FromProperties17(K, options) {
5553
5729
  const Acc = {};
5554
5730
  for (const K2 of globalThis.Object.getOwnPropertyNames(K))
@@ -5562,6 +5738,8 @@ function PartialFromMappedResult(R, options) {
5562
5738
  const P = FromMappedResult11(R, options);
5563
5739
  return MappedResult(P);
5564
5740
  }
5741
+
5742
+ // node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
5565
5743
  function FromComputed4(target, parameters) {
5566
5744
  return Computed("Required", [Computed(target, parameters)]);
5567
5745
  }
@@ -5574,16 +5752,16 @@ function FromProperties18(properties) {
5574
5752
  requiredProperties[K] = Discard(properties[K], [OptionalKind]);
5575
5753
  return requiredProperties;
5576
5754
  }
5577
- function FromObject17(type, properties) {
5755
+ function FromObject17(type) {
5578
5756
  const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
5579
- const mappedProperties = FromProperties18(properties);
5580
- return Object2(mappedProperties, options);
5757
+ const properties = FromProperties18(type["properties"]);
5758
+ return Object2(properties, options);
5581
5759
  }
5582
5760
  function FromRest7(types) {
5583
5761
  return types.map((type) => RequiredResolve(type));
5584
5762
  }
5585
5763
  function RequiredResolve(type) {
5586
- return IsComputed(type) ? FromComputed4(type.target, type.parameters) : IsRef(type) ? FromRef14(type.$ref) : IsIntersect(type) ? Intersect(FromRest7(type.allOf)) : IsUnion(type) ? Union(FromRest7(type.anyOf)) : IsObject3(type) ? FromObject17(type, type.properties) : IsBigInt3(type) ? type : IsBoolean3(type) ? type : IsInteger2(type) ? type : IsLiteral(type) ? type : IsNull3(type) ? type : IsNumber3(type) ? type : IsString3(type) ? type : IsSymbol3(type) ? type : IsUndefined3(type) ? type : Object2({});
5764
+ return IsComputed(type) ? FromComputed4(type.target, type.parameters) : IsRef(type) ? FromRef14(type.$ref) : IsIntersect(type) ? Intersect(FromRest7(type.allOf)) : IsUnion(type) ? Union(FromRest7(type.anyOf)) : IsObject3(type) ? FromObject17(type) : IsBigInt3(type) ? type : IsBoolean3(type) ? type : IsInteger2(type) ? type : IsLiteral(type) ? type : IsNull3(type) ? type : IsNumber3(type) ? type : IsString3(type) ? type : IsSymbol3(type) ? type : IsUndefined3(type) ? type : Object2({});
5587
5765
  }
5588
5766
  function Required(type, options) {
5589
5767
  if (IsMappedResult(type)) {
@@ -5592,6 +5770,8 @@ function Required(type, options) {
5592
5770
  return CreateType({ ...RequiredResolve(type), ...options });
5593
5771
  }
5594
5772
  }
5773
+
5774
+ // node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
5595
5775
  function FromProperties19(P, options) {
5596
5776
  const Acc = {};
5597
5777
  for (const K2 of globalThis.Object.getOwnPropertyNames(P))
@@ -5605,7 +5785,9 @@ function RequiredFromMappedResult(R, options) {
5605
5785
  const P = FromMappedResult12(R, options);
5606
5786
  return MappedResult(P);
5607
5787
  }
5608
- function DereferenceParameters(moduleProperties, types) {
5788
+
5789
+ // node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
5790
+ function DereferenceParameters(moduleProperties, types) {
5609
5791
  return types.map((type) => {
5610
5792
  return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
5611
5793
  });
@@ -5691,6 +5873,7 @@ function ComputeModuleProperties(moduleProperties) {
5691
5873
  }, {});
5692
5874
  }
5693
5875
 
5876
+ // node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
5694
5877
  class TModule {
5695
5878
  constructor($defs) {
5696
5879
  const computed = ComputeModuleProperties($defs);
@@ -5710,12 +5893,18 @@ class TModule {
5710
5893
  function Module(properties) {
5711
5894
  return new TModule(properties);
5712
5895
  }
5896
+
5897
+ // node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
5713
5898
  function Not2(type, options) {
5714
5899
  return CreateType({ [Kind]: "Not", not: type }, options);
5715
5900
  }
5901
+
5902
+ // node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
5716
5903
  function Parameters(schema, options) {
5717
5904
  return IsFunction3(schema) ? Tuple(schema.parameters, options) : Never();
5718
5905
  }
5906
+
5907
+ // node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
5719
5908
  var Ordinal = 0;
5720
5909
  function Recursive(callback, options = {}) {
5721
5910
  if (IsUndefined2(options.$id))
@@ -5724,20 +5913,27 @@ function Recursive(callback, options = {}) {
5724
5913
  thisType.$id = options.$id;
5725
5914
  return CreateType({ [Hint]: "Recursive", ...thisType }, options);
5726
5915
  }
5916
+
5917
+ // node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
5727
5918
  function RegExp2(unresolved, options) {
5728
5919
  const expr = IsString2(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
5729
5920
  return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
5730
5921
  }
5922
+
5923
+ // node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
5731
5924
  function RestResolve(T) {
5732
5925
  return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
5733
5926
  }
5734
5927
  function Rest(T) {
5735
5928
  return RestResolve(T);
5736
5929
  }
5930
+
5931
+ // node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
5737
5932
  function ReturnType(schema, options) {
5738
5933
  return IsFunction3(schema) ? CreateType(schema.returns, options) : Never(options);
5739
5934
  }
5740
5935
 
5936
+ // node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
5741
5937
  class TransformDecodeBuilder {
5742
5938
  constructor(schema) {
5743
5939
  this.schema = schema;
@@ -5769,11 +5965,15 @@ class TransformEncodeBuilder {
5769
5965
  function Transform(schema) {
5770
5966
  return new TransformDecodeBuilder(schema);
5771
5967
  }
5968
+
5969
+ // node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
5772
5970
  function Void(options) {
5773
5971
  return CreateType({ [Kind]: "Void", type: "void" }, options);
5774
5972
  }
5973
+
5974
+ // node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
5775
5975
  var exports_type3 = {};
5776
- __export2(exports_type3, {
5976
+ __export(exports_type3, {
5777
5977
  Void: () => Void,
5778
5978
  Uppercase: () => Uppercase,
5779
5979
  Unsafe: () => Unsafe,
@@ -5837,7 +6037,28 @@ __export2(exports_type3, {
5837
6037
  Argument: () => Argument,
5838
6038
  Any: () => Any
5839
6039
  });
6040
+
6041
+ // node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
5840
6042
  var Type = exports_type3;
6043
+
6044
+ // node_modules/@absolutejs/manifest/dist/index.js
6045
+ var defineImplementation = () => (implementation) => {
6046
+ const defined = implementation;
6047
+ return defined;
6048
+ };
6049
+ var defineManifest = () => (manifest) => manifest;
6050
+ var literal = (value) => value;
6051
+ var RUNTIME_KIND = literal("runtime");
6052
+ var WORKSPACE_KIND = literal("workspace");
6053
+ var toolFactory = () => {
6054
+ function runtime(definition) {
6055
+ return { kind: RUNTIME_KIND, ...definition };
6056
+ }
6057
+ function workspace(definition) {
6058
+ return { kind: WORKSPACE_KIND, ...definition };
6059
+ }
6060
+ return { runtime, workspace };
6061
+ };
5841
6062
  var TOOL_NAME_PATTERN = /^[a-z][a-z0-9_]{0,63}$/;
5842
6063
  var envRequirement = Type.Object({
5843
6064
  description: Type.String(),
@@ -5859,6 +6080,7 @@ var wiringSnippet = Type.Object({
5859
6080
  placement: Type.Optional(Type.Union([
5860
6081
  Type.Literal("client-entry"),
5861
6082
  Type.Literal("module-scope"),
6083
+ Type.Literal("server-boundary"),
5862
6084
  Type.Literal("server-factory"),
5863
6085
  Type.Literal("server-plugin")
5864
6086
  ]))
@@ -6024,2562 +6246,6 @@ var manifestSchema = Type.Object({
6024
6246
  wiring: Type.Array(wiringRecipe)
6025
6247
  });
6026
6248
 
6027
- // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
6028
- var exports_value3 = {};
6029
- __export(exports_value3, {
6030
- IsUndefined: () => IsUndefined5,
6031
- IsUint8Array: () => IsUint8Array5,
6032
- IsSymbol: () => IsSymbol5,
6033
- IsString: () => IsString5,
6034
- IsRegExp: () => IsRegExp4,
6035
- IsObject: () => IsObject5,
6036
- IsNumber: () => IsNumber5,
6037
- IsNull: () => IsNull5,
6038
- IsIterator: () => IsIterator5,
6039
- IsFunction: () => IsFunction5,
6040
- IsDate: () => IsDate5,
6041
- IsBoolean: () => IsBoolean5,
6042
- IsBigInt: () => IsBigInt5,
6043
- IsAsyncIterator: () => IsAsyncIterator5,
6044
- IsArray: () => IsArray5,
6045
- HasPropertyKey: () => HasPropertyKey3
6046
- });
6047
- function HasPropertyKey3(value, key) {
6048
- return key in value;
6049
- }
6050
- function IsAsyncIterator5(value) {
6051
- return IsObject5(value) && !IsArray5(value) && !IsUint8Array5(value) && Symbol.asyncIterator in value;
6052
- }
6053
- function IsArray5(value) {
6054
- return Array.isArray(value);
6055
- }
6056
- function IsBigInt5(value) {
6057
- return typeof value === "bigint";
6058
- }
6059
- function IsBoolean5(value) {
6060
- return typeof value === "boolean";
6061
- }
6062
- function IsDate5(value) {
6063
- return value instanceof globalThis.Date;
6064
- }
6065
- function IsFunction5(value) {
6066
- return typeof value === "function";
6067
- }
6068
- function IsIterator5(value) {
6069
- return IsObject5(value) && !IsArray5(value) && !IsUint8Array5(value) && Symbol.iterator in value;
6070
- }
6071
- function IsNull5(value) {
6072
- return value === null;
6073
- }
6074
- function IsNumber5(value) {
6075
- return typeof value === "number";
6076
- }
6077
- function IsObject5(value) {
6078
- return typeof value === "object" && value !== null;
6079
- }
6080
- function IsRegExp4(value) {
6081
- return value instanceof globalThis.RegExp;
6082
- }
6083
- function IsString5(value) {
6084
- return typeof value === "string";
6085
- }
6086
- function IsSymbol5(value) {
6087
- return typeof value === "symbol";
6088
- }
6089
- function IsUint8Array5(value) {
6090
- return value instanceof globalThis.Uint8Array;
6091
- }
6092
- function IsUndefined5(value) {
6093
- return value === undefined;
6094
- }
6095
-
6096
- // node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
6097
- function ArrayType6(value) {
6098
- return value.map((value2) => Visit17(value2));
6099
- }
6100
- function DateType4(value) {
6101
- return new Date(value.getTime());
6102
- }
6103
- function Uint8ArrayType3(value) {
6104
- return new Uint8Array(value);
6105
- }
6106
- function RegExpType2(value) {
6107
- return new RegExp(value.source, value.flags);
6108
- }
6109
- function ObjectType6(value) {
6110
- const result = {};
6111
- for (const key of Object.getOwnPropertyNames(value)) {
6112
- result[key] = Visit17(value[key]);
6113
- }
6114
- for (const key of Object.getOwnPropertySymbols(value)) {
6115
- result[key] = Visit17(value[key]);
6116
- }
6117
- return result;
6118
- }
6119
- function Visit17(value) {
6120
- return IsArray5(value) ? ArrayType6(value) : IsDate5(value) ? DateType4(value) : IsUint8Array5(value) ? Uint8ArrayType3(value) : IsRegExp4(value) ? RegExpType2(value) : IsObject5(value) ? ObjectType6(value) : value;
6121
- }
6122
- function Clone3(value) {
6123
- return Visit17(value);
6124
- }
6125
-
6126
- // node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
6127
- function CloneType2(schema, options) {
6128
- return options === undefined ? Clone3(schema) : Clone3({ ...options, ...schema });
6129
- }
6130
-
6131
- // node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
6132
- function IsObject7(value) {
6133
- return value !== null && typeof value === "object";
6134
- }
6135
- function IsArray7(value) {
6136
- return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
6137
- }
6138
- function IsUndefined7(value) {
6139
- return value === undefined;
6140
- }
6141
- function IsNumber7(value) {
6142
- return typeof value === "number";
6143
- }
6144
-
6145
- // node_modules/@sinclair/typebox/build/esm/system/policy.mjs
6146
- var TypeSystemPolicy2;
6147
- (function(TypeSystemPolicy3) {
6148
- TypeSystemPolicy3.InstanceMode = "default";
6149
- TypeSystemPolicy3.ExactOptionalPropertyTypes = false;
6150
- TypeSystemPolicy3.AllowArrayObject = false;
6151
- TypeSystemPolicy3.AllowNaN = false;
6152
- TypeSystemPolicy3.AllowNullVoid = false;
6153
- function IsExactOptionalProperty(value, key) {
6154
- return TypeSystemPolicy3.ExactOptionalPropertyTypes ? key in value : value[key] !== undefined;
6155
- }
6156
- TypeSystemPolicy3.IsExactOptionalProperty = IsExactOptionalProperty;
6157
- function IsObjectLike(value) {
6158
- const isObject = IsObject7(value);
6159
- return TypeSystemPolicy3.AllowArrayObject ? isObject : isObject && !IsArray7(value);
6160
- }
6161
- TypeSystemPolicy3.IsObjectLike = IsObjectLike;
6162
- function IsRecordLike(value) {
6163
- return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
6164
- }
6165
- TypeSystemPolicy3.IsRecordLike = IsRecordLike;
6166
- function IsNumberLike(value) {
6167
- return TypeSystemPolicy3.AllowNaN ? IsNumber7(value) : Number.isFinite(value);
6168
- }
6169
- TypeSystemPolicy3.IsNumberLike = IsNumberLike;
6170
- function IsVoidLike(value) {
6171
- const isUndefined = IsUndefined7(value);
6172
- return TypeSystemPolicy3.AllowNullVoid ? isUndefined || value === null : isUndefined;
6173
- }
6174
- TypeSystemPolicy3.IsVoidLike = IsVoidLike;
6175
- })(TypeSystemPolicy2 || (TypeSystemPolicy2 = {}));
6176
-
6177
- // node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
6178
- function ImmutableArray2(value) {
6179
- return globalThis.Object.freeze(value).map((value2) => Immutable2(value2));
6180
- }
6181
- function ImmutableDate2(value) {
6182
- return value;
6183
- }
6184
- function ImmutableUint8Array2(value) {
6185
- return value;
6186
- }
6187
- function ImmutableRegExp2(value) {
6188
- return value;
6189
- }
6190
- function ImmutableObject2(value) {
6191
- const result = {};
6192
- for (const key of Object.getOwnPropertyNames(value)) {
6193
- result[key] = Immutable2(value[key]);
6194
- }
6195
- for (const key of Object.getOwnPropertySymbols(value)) {
6196
- result[key] = Immutable2(value[key]);
6197
- }
6198
- return globalThis.Object.freeze(result);
6199
- }
6200
- function Immutable2(value) {
6201
- return IsArray5(value) ? ImmutableArray2(value) : IsDate5(value) ? ImmutableDate2(value) : IsUint8Array5(value) ? ImmutableUint8Array2(value) : IsRegExp4(value) ? ImmutableRegExp2(value) : IsObject5(value) ? ImmutableObject2(value) : value;
6202
- }
6203
-
6204
- // node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
6205
- function CreateType2(schema, options) {
6206
- const result = options !== undefined ? { ...options, ...schema } : schema;
6207
- switch (TypeSystemPolicy2.InstanceMode) {
6208
- case "freeze":
6209
- return Immutable2(result);
6210
- case "clone":
6211
- return Clone3(result);
6212
- default:
6213
- return result;
6214
- }
6215
- }
6216
-
6217
- // node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
6218
- class TypeBoxError2 extends Error {
6219
- constructor(message) {
6220
- super(message);
6221
- }
6222
- }
6223
-
6224
- // node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
6225
- var TransformKind2 = Symbol.for("TypeBox.Transform");
6226
- var ReadonlyKind2 = Symbol.for("TypeBox.Readonly");
6227
- var OptionalKind2 = Symbol.for("TypeBox.Optional");
6228
- var Hint2 = Symbol.for("TypeBox.Hint");
6229
- var Kind2 = Symbol.for("TypeBox.Kind");
6230
-
6231
- // node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
6232
- function IsReadonly3(value) {
6233
- return IsObject5(value) && value[ReadonlyKind2] === "Readonly";
6234
- }
6235
- function IsOptional3(value) {
6236
- return IsObject5(value) && value[OptionalKind2] === "Optional";
6237
- }
6238
- function IsAny3(value) {
6239
- return IsKindOf3(value, "Any");
6240
- }
6241
- function IsArgument3(value) {
6242
- return IsKindOf3(value, "Argument");
6243
- }
6244
- function IsArray8(value) {
6245
- return IsKindOf3(value, "Array");
6246
- }
6247
- function IsAsyncIterator7(value) {
6248
- return IsKindOf3(value, "AsyncIterator");
6249
- }
6250
- function IsBigInt7(value) {
6251
- return IsKindOf3(value, "BigInt");
6252
- }
6253
- function IsBoolean7(value) {
6254
- return IsKindOf3(value, "Boolean");
6255
- }
6256
- function IsComputed3(value) {
6257
- return IsKindOf3(value, "Computed");
6258
- }
6259
- function IsConstructor3(value) {
6260
- return IsKindOf3(value, "Constructor");
6261
- }
6262
- function IsDate7(value) {
6263
- return IsKindOf3(value, "Date");
6264
- }
6265
- function IsFunction7(value) {
6266
- return IsKindOf3(value, "Function");
6267
- }
6268
- function IsInteger4(value) {
6269
- return IsKindOf3(value, "Integer");
6270
- }
6271
- function IsIntersect3(value) {
6272
- return IsKindOf3(value, "Intersect");
6273
- }
6274
- function IsIterator7(value) {
6275
- return IsKindOf3(value, "Iterator");
6276
- }
6277
- function IsKindOf3(value, kind) {
6278
- return IsObject5(value) && Kind2 in value && value[Kind2] === kind;
6279
- }
6280
- function IsLiteralValue3(value) {
6281
- return IsBoolean5(value) || IsNumber5(value) || IsString5(value);
6282
- }
6283
- function IsLiteral3(value) {
6284
- return IsKindOf3(value, "Literal");
6285
- }
6286
- function IsMappedKey3(value) {
6287
- return IsKindOf3(value, "MappedKey");
6288
- }
6289
- function IsMappedResult3(value) {
6290
- return IsKindOf3(value, "MappedResult");
6291
- }
6292
- function IsNever3(value) {
6293
- return IsKindOf3(value, "Never");
6294
- }
6295
- function IsNot3(value) {
6296
- return IsKindOf3(value, "Not");
6297
- }
6298
- function IsNull7(value) {
6299
- return IsKindOf3(value, "Null");
6300
- }
6301
- function IsNumber8(value) {
6302
- return IsKindOf3(value, "Number");
6303
- }
6304
- function IsObject8(value) {
6305
- return IsKindOf3(value, "Object");
6306
- }
6307
- function IsPromise4(value) {
6308
- return IsKindOf3(value, "Promise");
6309
- }
6310
- function IsRecord3(value) {
6311
- return IsKindOf3(value, "Record");
6312
- }
6313
- function IsRef3(value) {
6314
- return IsKindOf3(value, "Ref");
6315
- }
6316
- function IsRegExp6(value) {
6317
- return IsKindOf3(value, "RegExp");
6318
- }
6319
- function IsString7(value) {
6320
- return IsKindOf3(value, "String");
6321
- }
6322
- function IsSymbol7(value) {
6323
- return IsKindOf3(value, "Symbol");
6324
- }
6325
- function IsTemplateLiteral3(value) {
6326
- return IsKindOf3(value, "TemplateLiteral");
6327
- }
6328
- function IsThis3(value) {
6329
- return IsKindOf3(value, "This");
6330
- }
6331
- function IsTransform3(value) {
6332
- return IsObject5(value) && TransformKind2 in value;
6333
- }
6334
- function IsTuple3(value) {
6335
- return IsKindOf3(value, "Tuple");
6336
- }
6337
- function IsUndefined8(value) {
6338
- return IsKindOf3(value, "Undefined");
6339
- }
6340
- function IsUnion3(value) {
6341
- return IsKindOf3(value, "Union");
6342
- }
6343
- function IsUint8Array7(value) {
6344
- return IsKindOf3(value, "Uint8Array");
6345
- }
6346
- function IsUnknown3(value) {
6347
- return IsKindOf3(value, "Unknown");
6348
- }
6349
- function IsUnsafe3(value) {
6350
- return IsKindOf3(value, "Unsafe");
6351
- }
6352
- function IsVoid3(value) {
6353
- return IsKindOf3(value, "Void");
6354
- }
6355
- function IsKind3(value) {
6356
- return IsObject5(value) && Kind2 in value && IsString5(value[Kind2]);
6357
- }
6358
- function IsSchema3(value) {
6359
- return IsAny3(value) || IsArgument3(value) || IsArray8(value) || IsBoolean7(value) || IsBigInt7(value) || IsAsyncIterator7(value) || IsComputed3(value) || IsConstructor3(value) || IsDate7(value) || IsFunction7(value) || IsInteger4(value) || IsIntersect3(value) || IsIterator7(value) || IsLiteral3(value) || IsMappedKey3(value) || IsMappedResult3(value) || IsNever3(value) || IsNot3(value) || IsNull7(value) || IsNumber8(value) || IsObject8(value) || IsPromise4(value) || IsRecord3(value) || IsRef3(value) || IsRegExp6(value) || IsString7(value) || IsSymbol7(value) || IsTemplateLiteral3(value) || IsThis3(value) || IsTuple3(value) || IsUndefined8(value) || IsUnion3(value) || IsUint8Array7(value) || IsUnknown3(value) || IsUnsafe3(value) || IsVoid3(value) || IsKind3(value);
6360
- }
6361
- // node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
6362
- var exports_type4 = {};
6363
- __export(exports_type4, {
6364
- TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError2,
6365
- IsVoid: () => IsVoid5,
6366
- IsUnsafe: () => IsUnsafe5,
6367
- IsUnknown: () => IsUnknown5,
6368
- IsUnionLiteral: () => IsUnionLiteral2,
6369
- IsUnion: () => IsUnion5,
6370
- IsUndefined: () => IsUndefined9,
6371
- IsUint8Array: () => IsUint8Array8,
6372
- IsTuple: () => IsTuple5,
6373
- IsTransform: () => IsTransform5,
6374
- IsThis: () => IsThis5,
6375
- IsTemplateLiteral: () => IsTemplateLiteral5,
6376
- IsSymbol: () => IsSymbol8,
6377
- IsString: () => IsString8,
6378
- IsSchema: () => IsSchema5,
6379
- IsRegExp: () => IsRegExp7,
6380
- IsRef: () => IsRef5,
6381
- IsRecursive: () => IsRecursive2,
6382
- IsRecord: () => IsRecord5,
6383
- IsReadonly: () => IsReadonly5,
6384
- IsProperties: () => IsProperties2,
6385
- IsPromise: () => IsPromise6,
6386
- IsOptional: () => IsOptional5,
6387
- IsObject: () => IsObject9,
6388
- IsNumber: () => IsNumber9,
6389
- IsNull: () => IsNull8,
6390
- IsNot: () => IsNot5,
6391
- IsNever: () => IsNever5,
6392
- IsMappedResult: () => IsMappedResult5,
6393
- IsMappedKey: () => IsMappedKey5,
6394
- IsLiteralValue: () => IsLiteralValue5,
6395
- IsLiteralString: () => IsLiteralString2,
6396
- IsLiteralNumber: () => IsLiteralNumber2,
6397
- IsLiteralBoolean: () => IsLiteralBoolean2,
6398
- IsLiteral: () => IsLiteral5,
6399
- IsKindOf: () => IsKindOf5,
6400
- IsKind: () => IsKind5,
6401
- IsIterator: () => IsIterator8,
6402
- IsIntersect: () => IsIntersect5,
6403
- IsInteger: () => IsInteger6,
6404
- IsImport: () => IsImport2,
6405
- IsFunction: () => IsFunction8,
6406
- IsDate: () => IsDate8,
6407
- IsConstructor: () => IsConstructor5,
6408
- IsComputed: () => IsComputed5,
6409
- IsBoolean: () => IsBoolean8,
6410
- IsBigInt: () => IsBigInt8,
6411
- IsAsyncIterator: () => IsAsyncIterator8,
6412
- IsArray: () => IsArray9,
6413
- IsArgument: () => IsArgument5,
6414
- IsAny: () => IsAny5
6415
- });
6416
- class TypeGuardUnknownTypeError2 extends TypeBoxError2 {
6417
- }
6418
- var KnownTypes2 = [
6419
- "Argument",
6420
- "Any",
6421
- "Array",
6422
- "AsyncIterator",
6423
- "BigInt",
6424
- "Boolean",
6425
- "Computed",
6426
- "Constructor",
6427
- "Date",
6428
- "Enum",
6429
- "Function",
6430
- "Integer",
6431
- "Intersect",
6432
- "Iterator",
6433
- "Literal",
6434
- "MappedKey",
6435
- "MappedResult",
6436
- "Not",
6437
- "Null",
6438
- "Number",
6439
- "Object",
6440
- "Promise",
6441
- "Record",
6442
- "Ref",
6443
- "RegExp",
6444
- "String",
6445
- "Symbol",
6446
- "TemplateLiteral",
6447
- "This",
6448
- "Tuple",
6449
- "Undefined",
6450
- "Union",
6451
- "Uint8Array",
6452
- "Unknown",
6453
- "Void"
6454
- ];
6455
- function IsPattern2(value) {
6456
- try {
6457
- new RegExp(value);
6458
- return true;
6459
- } catch {
6460
- return false;
6461
- }
6462
- }
6463
- function IsControlCharacterFree2(value) {
6464
- if (!IsString5(value))
6465
- return false;
6466
- for (let i = 0;i < value.length; i++) {
6467
- const code = value.charCodeAt(i);
6468
- if (code >= 7 && code <= 13 || code === 27 || code === 127) {
6469
- return false;
6470
- }
6471
- }
6472
- return true;
6473
- }
6474
- function IsAdditionalProperties2(value) {
6475
- return IsOptionalBoolean2(value) || IsSchema5(value);
6476
- }
6477
- function IsOptionalBigInt2(value) {
6478
- return IsUndefined5(value) || IsBigInt5(value);
6479
- }
6480
- function IsOptionalNumber2(value) {
6481
- return IsUndefined5(value) || IsNumber5(value);
6482
- }
6483
- function IsOptionalBoolean2(value) {
6484
- return IsUndefined5(value) || IsBoolean5(value);
6485
- }
6486
- function IsOptionalString2(value) {
6487
- return IsUndefined5(value) || IsString5(value);
6488
- }
6489
- function IsOptionalPattern2(value) {
6490
- return IsUndefined5(value) || IsString5(value) && IsControlCharacterFree2(value) && IsPattern2(value);
6491
- }
6492
- function IsOptionalFormat2(value) {
6493
- return IsUndefined5(value) || IsString5(value) && IsControlCharacterFree2(value);
6494
- }
6495
- function IsOptionalSchema2(value) {
6496
- return IsUndefined5(value) || IsSchema5(value);
6497
- }
6498
- function IsReadonly5(value) {
6499
- return IsObject5(value) && value[ReadonlyKind2] === "Readonly";
6500
- }
6501
- function IsOptional5(value) {
6502
- return IsObject5(value) && value[OptionalKind2] === "Optional";
6503
- }
6504
- function IsAny5(value) {
6505
- return IsKindOf5(value, "Any") && IsOptionalString2(value.$id);
6506
- }
6507
- function IsArgument5(value) {
6508
- return IsKindOf5(value, "Argument") && IsNumber5(value.index);
6509
- }
6510
- function IsArray9(value) {
6511
- return IsKindOf5(value, "Array") && value.type === "array" && IsOptionalString2(value.$id) && IsSchema5(value.items) && IsOptionalNumber2(value.minItems) && IsOptionalNumber2(value.maxItems) && IsOptionalBoolean2(value.uniqueItems) && IsOptionalSchema2(value.contains) && IsOptionalNumber2(value.minContains) && IsOptionalNumber2(value.maxContains);
6512
- }
6513
- function IsAsyncIterator8(value) {
6514
- return IsKindOf5(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString2(value.$id) && IsSchema5(value.items);
6515
- }
6516
- function IsBigInt8(value) {
6517
- return IsKindOf5(value, "BigInt") && value.type === "bigint" && IsOptionalString2(value.$id) && IsOptionalBigInt2(value.exclusiveMaximum) && IsOptionalBigInt2(value.exclusiveMinimum) && IsOptionalBigInt2(value.maximum) && IsOptionalBigInt2(value.minimum) && IsOptionalBigInt2(value.multipleOf);
6518
- }
6519
- function IsBoolean8(value) {
6520
- return IsKindOf5(value, "Boolean") && value.type === "boolean" && IsOptionalString2(value.$id);
6521
- }
6522
- function IsComputed5(value) {
6523
- return IsKindOf5(value, "Computed") && IsString5(value.target) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema5(schema));
6524
- }
6525
- function IsConstructor5(value) {
6526
- return IsKindOf5(value, "Constructor") && value.type === "Constructor" && IsOptionalString2(value.$id) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema5(schema)) && IsSchema5(value.returns);
6527
- }
6528
- function IsDate8(value) {
6529
- return IsKindOf5(value, "Date") && value.type === "Date" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximumTimestamp) && IsOptionalNumber2(value.exclusiveMinimumTimestamp) && IsOptionalNumber2(value.maximumTimestamp) && IsOptionalNumber2(value.minimumTimestamp) && IsOptionalNumber2(value.multipleOfTimestamp);
6530
- }
6531
- function IsFunction8(value) {
6532
- return IsKindOf5(value, "Function") && value.type === "Function" && IsOptionalString2(value.$id) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema5(schema)) && IsSchema5(value.returns);
6533
- }
6534
- function IsImport2(value) {
6535
- return IsKindOf5(value, "Import") && HasPropertyKey3(value, "$defs") && IsObject5(value.$defs) && IsProperties2(value.$defs) && HasPropertyKey3(value, "$ref") && IsString5(value.$ref) && value.$ref in value.$defs;
6536
- }
6537
- function IsInteger6(value) {
6538
- return IsKindOf5(value, "Integer") && value.type === "integer" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximum) && IsOptionalNumber2(value.exclusiveMinimum) && IsOptionalNumber2(value.maximum) && IsOptionalNumber2(value.minimum) && IsOptionalNumber2(value.multipleOf);
6539
- }
6540
- function IsProperties2(value) {
6541
- return IsObject5(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree2(key) && IsSchema5(schema));
6542
- }
6543
- function IsIntersect5(value) {
6544
- return IsKindOf5(value, "Intersect") && (IsString5(value.type) && value.type !== "object" ? false : true) && IsArray5(value.allOf) && value.allOf.every((schema) => IsSchema5(schema) && !IsTransform5(schema)) && IsOptionalString2(value.type) && (IsOptionalBoolean2(value.unevaluatedProperties) || IsOptionalSchema2(value.unevaluatedProperties)) && IsOptionalString2(value.$id);
6545
- }
6546
- function IsIterator8(value) {
6547
- return IsKindOf5(value, "Iterator") && value.type === "Iterator" && IsOptionalString2(value.$id) && IsSchema5(value.items);
6548
- }
6549
- function IsKindOf5(value, kind) {
6550
- return IsObject5(value) && Kind2 in value && value[Kind2] === kind;
6551
- }
6552
- function IsLiteralString2(value) {
6553
- return IsLiteral5(value) && IsString5(value.const);
6554
- }
6555
- function IsLiteralNumber2(value) {
6556
- return IsLiteral5(value) && IsNumber5(value.const);
6557
- }
6558
- function IsLiteralBoolean2(value) {
6559
- return IsLiteral5(value) && IsBoolean5(value.const);
6560
- }
6561
- function IsLiteral5(value) {
6562
- return IsKindOf5(value, "Literal") && IsOptionalString2(value.$id) && IsLiteralValue5(value.const);
6563
- }
6564
- function IsLiteralValue5(value) {
6565
- return IsBoolean5(value) || IsNumber5(value) || IsString5(value);
6566
- }
6567
- function IsMappedKey5(value) {
6568
- return IsKindOf5(value, "MappedKey") && IsArray5(value.keys) && value.keys.every((key) => IsNumber5(key) || IsString5(key));
6569
- }
6570
- function IsMappedResult5(value) {
6571
- return IsKindOf5(value, "MappedResult") && IsProperties2(value.properties);
6572
- }
6573
- function IsNever5(value) {
6574
- return IsKindOf5(value, "Never") && IsObject5(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
6575
- }
6576
- function IsNot5(value) {
6577
- return IsKindOf5(value, "Not") && IsSchema5(value.not);
6578
- }
6579
- function IsNull8(value) {
6580
- return IsKindOf5(value, "Null") && value.type === "null" && IsOptionalString2(value.$id);
6581
- }
6582
- function IsNumber9(value) {
6583
- return IsKindOf5(value, "Number") && value.type === "number" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximum) && IsOptionalNumber2(value.exclusiveMinimum) && IsOptionalNumber2(value.maximum) && IsOptionalNumber2(value.minimum) && IsOptionalNumber2(value.multipleOf);
6584
- }
6585
- function IsObject9(value) {
6586
- return IsKindOf5(value, "Object") && value.type === "object" && IsOptionalString2(value.$id) && IsProperties2(value.properties) && IsAdditionalProperties2(value.additionalProperties) && IsOptionalNumber2(value.minProperties) && IsOptionalNumber2(value.maxProperties);
6587
- }
6588
- function IsPromise6(value) {
6589
- return IsKindOf5(value, "Promise") && value.type === "Promise" && IsOptionalString2(value.$id) && IsSchema5(value.item);
6590
- }
6591
- function IsRecord5(value) {
6592
- return IsKindOf5(value, "Record") && value.type === "object" && IsOptionalString2(value.$id) && IsAdditionalProperties2(value.additionalProperties) && IsObject5(value.patternProperties) && ((schema) => {
6593
- const keys = Object.getOwnPropertyNames(schema.patternProperties);
6594
- return keys.length === 1 && IsPattern2(keys[0]) && IsObject5(schema.patternProperties) && IsSchema5(schema.patternProperties[keys[0]]);
6595
- })(value);
6596
- }
6597
- function IsRecursive2(value) {
6598
- return IsObject5(value) && Hint2 in value && value[Hint2] === "Recursive";
6599
- }
6600
- function IsRef5(value) {
6601
- return IsKindOf5(value, "Ref") && IsOptionalString2(value.$id) && IsString5(value.$ref);
6602
- }
6603
- function IsRegExp7(value) {
6604
- return IsKindOf5(value, "RegExp") && IsOptionalString2(value.$id) && IsString5(value.source) && IsString5(value.flags) && IsOptionalNumber2(value.maxLength) && IsOptionalNumber2(value.minLength);
6605
- }
6606
- function IsString8(value) {
6607
- return IsKindOf5(value, "String") && value.type === "string" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.minLength) && IsOptionalNumber2(value.maxLength) && IsOptionalPattern2(value.pattern) && IsOptionalFormat2(value.format);
6608
- }
6609
- function IsSymbol8(value) {
6610
- return IsKindOf5(value, "Symbol") && value.type === "symbol" && IsOptionalString2(value.$id);
6611
- }
6612
- function IsTemplateLiteral5(value) {
6613
- return IsKindOf5(value, "TemplateLiteral") && value.type === "string" && IsString5(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
6614
- }
6615
- function IsThis5(value) {
6616
- return IsKindOf5(value, "This") && IsOptionalString2(value.$id) && IsString5(value.$ref);
6617
- }
6618
- function IsTransform5(value) {
6619
- return IsObject5(value) && TransformKind2 in value;
6620
- }
6621
- function IsTuple5(value) {
6622
- return IsKindOf5(value, "Tuple") && value.type === "array" && IsOptionalString2(value.$id) && IsNumber5(value.minItems) && IsNumber5(value.maxItems) && value.minItems === value.maxItems && (IsUndefined5(value.items) && IsUndefined5(value.additionalItems) && value.minItems === 0 || IsArray5(value.items) && value.items.every((schema) => IsSchema5(schema)));
6623
- }
6624
- function IsUndefined9(value) {
6625
- return IsKindOf5(value, "Undefined") && value.type === "undefined" && IsOptionalString2(value.$id);
6626
- }
6627
- function IsUnionLiteral2(value) {
6628
- return IsUnion5(value) && value.anyOf.every((schema) => IsLiteralString2(schema) || IsLiteralNumber2(schema));
6629
- }
6630
- function IsUnion5(value) {
6631
- return IsKindOf5(value, "Union") && IsOptionalString2(value.$id) && IsObject5(value) && IsArray5(value.anyOf) && value.anyOf.every((schema) => IsSchema5(schema));
6632
- }
6633
- function IsUint8Array8(value) {
6634
- return IsKindOf5(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.minByteLength) && IsOptionalNumber2(value.maxByteLength);
6635
- }
6636
- function IsUnknown5(value) {
6637
- return IsKindOf5(value, "Unknown") && IsOptionalString2(value.$id);
6638
- }
6639
- function IsUnsafe5(value) {
6640
- return IsKindOf5(value, "Unsafe");
6641
- }
6642
- function IsVoid5(value) {
6643
- return IsKindOf5(value, "Void") && value.type === "void" && IsOptionalString2(value.$id);
6644
- }
6645
- function IsKind5(value) {
6646
- return IsObject5(value) && Kind2 in value && IsString5(value[Kind2]) && !KnownTypes2.includes(value[Kind2]);
6647
- }
6648
- function IsSchema5(value) {
6649
- return IsObject5(value) && (IsAny5(value) || IsArgument5(value) || IsArray9(value) || IsBoolean8(value) || IsBigInt8(value) || IsAsyncIterator8(value) || IsComputed5(value) || IsConstructor5(value) || IsDate8(value) || IsFunction8(value) || IsInteger6(value) || IsIntersect5(value) || IsIterator8(value) || IsLiteral5(value) || IsMappedKey5(value) || IsMappedResult5(value) || IsNever5(value) || IsNot5(value) || IsNull8(value) || IsNumber9(value) || IsObject9(value) || IsPromise6(value) || IsRecord5(value) || IsRef5(value) || IsRegExp7(value) || IsString8(value) || IsSymbol8(value) || IsTemplateLiteral5(value) || IsThis5(value) || IsTuple5(value) || IsUndefined9(value) || IsUnion5(value) || IsUint8Array8(value) || IsUnknown5(value) || IsUnsafe5(value) || IsVoid5(value) || IsKind5(value));
6650
- }
6651
- // node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
6652
- var PatternBoolean2 = "(true|false)";
6653
- var PatternNumber2 = "(0|[1-9][0-9]*)";
6654
- var PatternString2 = "(.*)";
6655
- var PatternNever2 = "(?!.*)";
6656
- var PatternBooleanExact2 = `^${PatternBoolean2}$`;
6657
- var PatternNumberExact2 = `^${PatternNumber2}$`;
6658
- var PatternStringExact2 = `^${PatternString2}$`;
6659
- var PatternNeverExact2 = `^${PatternNever2}$`;
6660
-
6661
- // node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
6662
- function SetIncludes2(T, S) {
6663
- return T.includes(S);
6664
- }
6665
- function SetDistinct2(T) {
6666
- return [...new Set(T)];
6667
- }
6668
- function SetIntersect2(T, S) {
6669
- return T.filter((L) => S.includes(L));
6670
- }
6671
- function SetIntersectManyResolve2(T, Init) {
6672
- return T.reduce((Acc, L) => {
6673
- return SetIntersect2(Acc, L);
6674
- }, Init);
6675
- }
6676
- function SetIntersectMany2(T) {
6677
- return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve2(T.slice(1), T[0]) : [];
6678
- }
6679
- function SetUnionMany2(T) {
6680
- const Acc = [];
6681
- for (const L of T)
6682
- Acc.push(...L);
6683
- return Acc;
6684
- }
6685
-
6686
- // node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
6687
- function Any2(options) {
6688
- return CreateType2({ [Kind2]: "Any" }, options);
6689
- }
6690
-
6691
- // node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
6692
- function Array3(items, options) {
6693
- return CreateType2({ [Kind2]: "Array", type: "array", items }, options);
6694
- }
6695
-
6696
- // node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
6697
- function Argument2(index) {
6698
- return CreateType2({ [Kind2]: "Argument", index });
6699
- }
6700
-
6701
- // node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
6702
- function AsyncIterator2(items, options) {
6703
- return CreateType2({ [Kind2]: "AsyncIterator", type: "AsyncIterator", items }, options);
6704
- }
6705
-
6706
- // node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
6707
- function Computed2(target, parameters, options) {
6708
- return CreateType2({ [Kind2]: "Computed", target, parameters }, options);
6709
- }
6710
-
6711
- // node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
6712
- function DiscardKey2(value, key) {
6713
- const { [key]: _, ...rest } = value;
6714
- return rest;
6715
- }
6716
- function Discard2(value, keys) {
6717
- return keys.reduce((acc, key) => DiscardKey2(acc, key), value);
6718
- }
6719
-
6720
- // node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
6721
- function Never2(options) {
6722
- return CreateType2({ [Kind2]: "Never", not: {} }, options);
6723
- }
6724
-
6725
- // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
6726
- function MappedResult2(properties) {
6727
- return CreateType2({
6728
- [Kind2]: "MappedResult",
6729
- properties
6730
- });
6731
- }
6732
-
6733
- // node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
6734
- function Constructor2(parameters, returns, options) {
6735
- return CreateType2({ [Kind2]: "Constructor", type: "Constructor", parameters, returns }, options);
6736
- }
6737
-
6738
- // node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
6739
- function Function2(parameters, returns, options) {
6740
- return CreateType2({ [Kind2]: "Function", type: "Function", parameters, returns }, options);
6741
- }
6742
-
6743
- // node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
6744
- function UnionCreate2(T, options) {
6745
- return CreateType2({ [Kind2]: "Union", anyOf: T }, options);
6746
- }
6747
-
6748
- // node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
6749
- function IsUnionOptional2(types) {
6750
- return types.some((type) => IsOptional3(type));
6751
- }
6752
- function RemoveOptionalFromRest3(types) {
6753
- return types.map((left) => IsOptional3(left) ? RemoveOptionalFromType3(left) : left);
6754
- }
6755
- function RemoveOptionalFromType3(T) {
6756
- return Discard2(T, [OptionalKind2]);
6757
- }
6758
- function ResolveUnion2(types, options) {
6759
- const isOptional = IsUnionOptional2(types);
6760
- return isOptional ? Optional2(UnionCreate2(RemoveOptionalFromRest3(types), options)) : UnionCreate2(RemoveOptionalFromRest3(types), options);
6761
- }
6762
- function UnionEvaluated2(T, options) {
6763
- return T.length === 1 ? CreateType2(T[0], options) : T.length === 0 ? Never2(options) : ResolveUnion2(T, options);
6764
- }
6765
-
6766
- // node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
6767
- function Union3(types, options) {
6768
- return types.length === 0 ? Never2(options) : types.length === 1 ? CreateType2(types[0], options) : UnionCreate2(types, options);
6769
- }
6770
-
6771
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
6772
- class TemplateLiteralParserError2 extends TypeBoxError2 {
6773
- }
6774
- function Unescape2(pattern) {
6775
- return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
6776
- }
6777
- function IsNonEscaped2(pattern, index, char) {
6778
- return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
6779
- }
6780
- function IsOpenParen2(pattern, index) {
6781
- return IsNonEscaped2(pattern, index, "(");
6782
- }
6783
- function IsCloseParen2(pattern, index) {
6784
- return IsNonEscaped2(pattern, index, ")");
6785
- }
6786
- function IsSeparator2(pattern, index) {
6787
- return IsNonEscaped2(pattern, index, "|");
6788
- }
6789
- function IsGroup2(pattern) {
6790
- if (!(IsOpenParen2(pattern, 0) && IsCloseParen2(pattern, pattern.length - 1)))
6791
- return false;
6792
- let count = 0;
6793
- for (let index = 0;index < pattern.length; index++) {
6794
- if (IsOpenParen2(pattern, index))
6795
- count += 1;
6796
- if (IsCloseParen2(pattern, index))
6797
- count -= 1;
6798
- if (count === 0 && index !== pattern.length - 1)
6799
- return false;
6800
- }
6801
- return true;
6802
- }
6803
- function InGroup2(pattern) {
6804
- return pattern.slice(1, pattern.length - 1);
6805
- }
6806
- function IsPrecedenceOr2(pattern) {
6807
- let count = 0;
6808
- for (let index = 0;index < pattern.length; index++) {
6809
- if (IsOpenParen2(pattern, index))
6810
- count += 1;
6811
- if (IsCloseParen2(pattern, index))
6812
- count -= 1;
6813
- if (IsSeparator2(pattern, index) && count === 0)
6814
- return true;
6815
- }
6816
- return false;
6817
- }
6818
- function IsPrecedenceAnd2(pattern) {
6819
- for (let index = 0;index < pattern.length; index++) {
6820
- if (IsOpenParen2(pattern, index))
6821
- return true;
6822
- }
6823
- return false;
6824
- }
6825
- function Or2(pattern) {
6826
- let [count, start] = [0, 0];
6827
- const expressions = [];
6828
- for (let index = 0;index < pattern.length; index++) {
6829
- if (IsOpenParen2(pattern, index))
6830
- count += 1;
6831
- if (IsCloseParen2(pattern, index))
6832
- count -= 1;
6833
- if (IsSeparator2(pattern, index) && count === 0) {
6834
- const range2 = pattern.slice(start, index);
6835
- if (range2.length > 0)
6836
- expressions.push(TemplateLiteralParse2(range2));
6837
- start = index + 1;
6838
- }
6839
- }
6840
- const range = pattern.slice(start);
6841
- if (range.length > 0)
6842
- expressions.push(TemplateLiteralParse2(range));
6843
- if (expressions.length === 0)
6844
- return { type: "const", const: "" };
6845
- if (expressions.length === 1)
6846
- return expressions[0];
6847
- return { type: "or", expr: expressions };
6848
- }
6849
- function And2(pattern) {
6850
- function Group(value, index) {
6851
- if (!IsOpenParen2(value, index))
6852
- throw new TemplateLiteralParserError2(`TemplateLiteralParser: Index must point to open parens`);
6853
- let count = 0;
6854
- for (let scan = index;scan < value.length; scan++) {
6855
- if (IsOpenParen2(value, scan))
6856
- count += 1;
6857
- if (IsCloseParen2(value, scan))
6858
- count -= 1;
6859
- if (count === 0)
6860
- return [index, scan];
6861
- }
6862
- throw new TemplateLiteralParserError2(`TemplateLiteralParser: Unclosed group parens in expression`);
6863
- }
6864
- function Range(pattern2, index) {
6865
- for (let scan = index;scan < pattern2.length; scan++) {
6866
- if (IsOpenParen2(pattern2, scan))
6867
- return [index, scan];
6868
- }
6869
- return [index, pattern2.length];
6870
- }
6871
- const expressions = [];
6872
- for (let index = 0;index < pattern.length; index++) {
6873
- if (IsOpenParen2(pattern, index)) {
6874
- const [start, end] = Group(pattern, index);
6875
- const range = pattern.slice(start, end + 1);
6876
- expressions.push(TemplateLiteralParse2(range));
6877
- index = end;
6878
- } else {
6879
- const [start, end] = Range(pattern, index);
6880
- const range = pattern.slice(start, end);
6881
- if (range.length > 0)
6882
- expressions.push(TemplateLiteralParse2(range));
6883
- index = end - 1;
6884
- }
6885
- }
6886
- return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
6887
- }
6888
- function TemplateLiteralParse2(pattern) {
6889
- return IsGroup2(pattern) ? TemplateLiteralParse2(InGroup2(pattern)) : IsPrecedenceOr2(pattern) ? Or2(pattern) : IsPrecedenceAnd2(pattern) ? And2(pattern) : { type: "const", const: Unescape2(pattern) };
6890
- }
6891
- function TemplateLiteralParseExact2(pattern) {
6892
- return TemplateLiteralParse2(pattern.slice(1, pattern.length - 1));
6893
- }
6894
-
6895
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
6896
- class TemplateLiteralFiniteError2 extends TypeBoxError2 {
6897
- }
6898
- function IsNumberExpression2(expression) {
6899
- return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "0" && expression.expr[1].type === "const" && expression.expr[1].const === "[1-9][0-9]*";
6900
- }
6901
- function IsBooleanExpression2(expression) {
6902
- return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "true" && expression.expr[1].type === "const" && expression.expr[1].const === "false";
6903
- }
6904
- function IsStringExpression2(expression) {
6905
- return expression.type === "const" && expression.const === ".*";
6906
- }
6907
- function IsTemplateLiteralExpressionFinite2(expression) {
6908
- return IsNumberExpression2(expression) || IsStringExpression2(expression) ? false : IsBooleanExpression2(expression) ? true : expression.type === "and" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite2(expr)) : expression.type === "or" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite2(expr)) : expression.type === "const" ? true : (() => {
6909
- throw new TemplateLiteralFiniteError2(`Unknown expression type`);
6910
- })();
6911
- }
6912
- function IsTemplateLiteralFinite2(schema) {
6913
- const expression = TemplateLiteralParseExact2(schema.pattern);
6914
- return IsTemplateLiteralExpressionFinite2(expression);
6915
- }
6916
-
6917
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
6918
- class TemplateLiteralGenerateError2 extends TypeBoxError2 {
6919
- }
6920
- function* GenerateReduce2(buffer) {
6921
- if (buffer.length === 1)
6922
- return yield* buffer[0];
6923
- for (const left of buffer[0]) {
6924
- for (const right of GenerateReduce2(buffer.slice(1))) {
6925
- yield `${left}${right}`;
6926
- }
6927
- }
6928
- }
6929
- function* GenerateAnd2(expression) {
6930
- return yield* GenerateReduce2(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate2(expr)]));
6931
- }
6932
- function* GenerateOr2(expression) {
6933
- for (const expr of expression.expr)
6934
- yield* TemplateLiteralExpressionGenerate2(expr);
6935
- }
6936
- function* GenerateConst2(expression) {
6937
- return yield expression.const;
6938
- }
6939
- function* TemplateLiteralExpressionGenerate2(expression) {
6940
- return expression.type === "and" ? yield* GenerateAnd2(expression) : expression.type === "or" ? yield* GenerateOr2(expression) : expression.type === "const" ? yield* GenerateConst2(expression) : (() => {
6941
- throw new TemplateLiteralGenerateError2("Unknown expression");
6942
- })();
6943
- }
6944
- function TemplateLiteralGenerate2(schema) {
6945
- const expression = TemplateLiteralParseExact2(schema.pattern);
6946
- return IsTemplateLiteralExpressionFinite2(expression) ? [...TemplateLiteralExpressionGenerate2(expression)] : [];
6947
- }
6948
-
6949
- // node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
6950
- function Literal2(value, options) {
6951
- return CreateType2({
6952
- [Kind2]: "Literal",
6953
- const: value,
6954
- type: typeof value
6955
- }, options);
6956
- }
6957
-
6958
- // node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
6959
- function Boolean2(options) {
6960
- return CreateType2({ [Kind2]: "Boolean", type: "boolean" }, options);
6961
- }
6962
-
6963
- // node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
6964
- function BigInt3(options) {
6965
- return CreateType2({ [Kind2]: "BigInt", type: "bigint" }, options);
6966
- }
6967
-
6968
- // node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
6969
- function Number3(options) {
6970
- return CreateType2({ [Kind2]: "Number", type: "number" }, options);
6971
- }
6972
-
6973
- // node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
6974
- function String3(options) {
6975
- return CreateType2({ [Kind2]: "String", type: "string" }, options);
6976
- }
6977
-
6978
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
6979
- function* FromUnion21(syntax) {
6980
- const trim = syntax.trim().replace(/"|'/g, "");
6981
- return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number3() : trim === "bigint" ? yield BigInt3() : trim === "string" ? yield String3() : yield (() => {
6982
- const literals = trim.split("|").map((literal2) => Literal2(literal2.trim()));
6983
- return literals.length === 0 ? Never2() : literals.length === 1 ? literals[0] : UnionEvaluated2(literals);
6984
- })();
6985
- }
6986
- function* FromTerminal2(syntax) {
6987
- if (syntax[1] !== "{") {
6988
- const L = Literal2("$");
6989
- const R = FromSyntax2(syntax.slice(1));
6990
- return yield* [L, ...R];
6991
- }
6992
- for (let i = 2;i < syntax.length; i++) {
6993
- if (syntax[i] === "}") {
6994
- const L = FromUnion21(syntax.slice(2, i));
6995
- const R = FromSyntax2(syntax.slice(i + 1));
6996
- return yield* [...L, ...R];
6997
- }
6998
- }
6999
- yield Literal2(syntax);
7000
- }
7001
- function* FromSyntax2(syntax) {
7002
- for (let i = 0;i < syntax.length; i++) {
7003
- if (syntax[i] === "$") {
7004
- const L = Literal2(syntax.slice(0, i));
7005
- const R = FromTerminal2(syntax.slice(i));
7006
- return yield* [L, ...R];
7007
- }
7008
- }
7009
- yield Literal2(syntax);
7010
- }
7011
- function TemplateLiteralSyntax2(syntax) {
7012
- return [...FromSyntax2(syntax)];
7013
- }
7014
-
7015
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
7016
- class TemplateLiteralPatternError2 extends TypeBoxError2 {
7017
- }
7018
- function Escape3(value) {
7019
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7020
- }
7021
- function Visit19(schema, acc) {
7022
- return IsTemplateLiteral3(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion3(schema) ? `(${schema.anyOf.map((schema2) => Visit19(schema2, acc)).join("|")})` : IsNumber8(schema) ? `${acc}${PatternNumber2}` : IsInteger4(schema) ? `${acc}${PatternNumber2}` : IsBigInt7(schema) ? `${acc}${PatternNumber2}` : IsString7(schema) ? `${acc}${PatternString2}` : IsLiteral3(schema) ? `${acc}${Escape3(schema.const.toString())}` : IsBoolean7(schema) ? `${acc}${PatternBoolean2}` : (() => {
7023
- throw new TemplateLiteralPatternError2(`Unexpected Kind '${schema[Kind2]}'`);
7024
- })();
7025
- }
7026
- function TemplateLiteralPattern2(kinds) {
7027
- return `^${kinds.map((schema) => Visit19(schema, "")).join("")}$`;
7028
- }
7029
-
7030
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
7031
- function TemplateLiteralToUnion2(schema) {
7032
- const R = TemplateLiteralGenerate2(schema);
7033
- const L = R.map((S) => Literal2(S));
7034
- return UnionEvaluated2(L);
7035
- }
7036
-
7037
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
7038
- function TemplateLiteral2(unresolved, options) {
7039
- const pattern = IsString5(unresolved) ? TemplateLiteralPattern2(TemplateLiteralSyntax2(unresolved)) : TemplateLiteralPattern2(unresolved);
7040
- return CreateType2({ [Kind2]: "TemplateLiteral", type: "string", pattern }, options);
7041
- }
7042
-
7043
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
7044
- function FromTemplateLiteral7(templateLiteral) {
7045
- const keys = TemplateLiteralGenerate2(templateLiteral);
7046
- return keys.map((key) => key.toString());
7047
- }
7048
- function FromUnion23(types) {
7049
- const result = [];
7050
- for (const type of types)
7051
- result.push(...IndexPropertyKeys2(type));
7052
- return result;
7053
- }
7054
- function FromLiteral7(literalValue) {
7055
- return [literalValue.toString()];
7056
- }
7057
- function IndexPropertyKeys2(type) {
7058
- return [...new Set(IsTemplateLiteral3(type) ? FromTemplateLiteral7(type) : IsUnion3(type) ? FromUnion23(type.anyOf) : IsLiteral3(type) ? FromLiteral7(type.const) : IsNumber8(type) ? ["[number]"] : IsInteger4(type) ? ["[number]"] : [])];
7059
- }
7060
-
7061
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
7062
- function FromProperties20(type, properties, options) {
7063
- const result = {};
7064
- for (const K2 of Object.getOwnPropertyNames(properties)) {
7065
- result[K2] = Index2(type, IndexPropertyKeys2(properties[K2]), options);
7066
- }
7067
- return result;
7068
- }
7069
- function FromMappedResult13(type, mappedResult, options) {
7070
- return FromProperties20(type, mappedResult.properties, options);
7071
- }
7072
- function IndexFromMappedResult2(type, mappedResult, options) {
7073
- const properties = FromMappedResult13(type, mappedResult, options);
7074
- return MappedResult2(properties);
7075
- }
7076
-
7077
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
7078
- function FromRest8(types, key) {
7079
- return types.map((type) => IndexFromPropertyKey2(type, key));
7080
- }
7081
- function FromIntersectRest2(types) {
7082
- return types.filter((type) => !IsNever3(type));
7083
- }
7084
- function FromIntersect19(types, key) {
7085
- return IntersectEvaluated2(FromIntersectRest2(FromRest8(types, key)));
7086
- }
7087
- function FromUnionRest2(types) {
7088
- return types.some((L) => IsNever3(L)) ? [] : types;
7089
- }
7090
- function FromUnion24(types, key) {
7091
- return UnionEvaluated2(FromUnionRest2(FromRest8(types, key)));
7092
- }
7093
- function FromTuple16(types, key) {
7094
- return key in types ? types[key] : key === "[number]" ? UnionEvaluated2(types) : Never2();
7095
- }
7096
- function FromArray18(type, key) {
7097
- return key === "[number]" ? type : Never2();
7098
- }
7099
- function FromProperty4(properties, propertyKey) {
7100
- return propertyKey in properties ? properties[propertyKey] : Never2();
7101
- }
7102
- function IndexFromPropertyKey2(type, propertyKey) {
7103
- return IsIntersect3(type) ? FromIntersect19(type.allOf, propertyKey) : IsUnion3(type) ? FromUnion24(type.anyOf, propertyKey) : IsTuple3(type) ? FromTuple16(type.items ?? [], propertyKey) : IsArray8(type) ? FromArray18(type.items, propertyKey) : IsObject8(type) ? FromProperty4(type.properties, propertyKey) : Never2();
7104
- }
7105
- function IndexFromPropertyKeys2(type, propertyKeys) {
7106
- return propertyKeys.map((propertyKey) => IndexFromPropertyKey2(type, propertyKey));
7107
- }
7108
- function FromSchema2(type, propertyKeys) {
7109
- return UnionEvaluated2(IndexFromPropertyKeys2(type, propertyKeys));
7110
- }
7111
- function Index2(type, key, options) {
7112
- if (IsRef3(type) || IsRef3(key)) {
7113
- const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
7114
- if (!IsSchema3(type) || !IsSchema3(key))
7115
- throw new TypeBoxError2(error);
7116
- return Computed2("Index", [type, key]);
7117
- }
7118
- if (IsMappedResult3(key))
7119
- return IndexFromMappedResult2(type, key, options);
7120
- if (IsMappedKey3(key))
7121
- return IndexFromMappedKey2(type, key, options);
7122
- return CreateType2(IsSchema3(key) ? FromSchema2(type, IndexPropertyKeys2(key)) : FromSchema2(type, key), options);
7123
- }
7124
-
7125
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
7126
- function MappedIndexPropertyKey2(type, key, options) {
7127
- return { [key]: Index2(type, [key], Clone3(options)) };
7128
- }
7129
- function MappedIndexPropertyKeys2(type, propertyKeys, options) {
7130
- return propertyKeys.reduce((result, left) => {
7131
- return { ...result, ...MappedIndexPropertyKey2(type, left, options) };
7132
- }, {});
7133
- }
7134
- function MappedIndexProperties2(type, mappedKey, options) {
7135
- return MappedIndexPropertyKeys2(type, mappedKey.keys, options);
7136
- }
7137
- function IndexFromMappedKey2(type, mappedKey, options) {
7138
- const properties = MappedIndexProperties2(type, mappedKey, options);
7139
- return MappedResult2(properties);
7140
- }
7141
-
7142
- // node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
7143
- function Iterator2(items, options) {
7144
- return CreateType2({ [Kind2]: "Iterator", type: "Iterator", items }, options);
7145
- }
7146
-
7147
- // node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
7148
- function RequiredKeys(properties) {
7149
- const keys = [];
7150
- for (let key in properties) {
7151
- if (!IsOptional3(properties[key]))
7152
- keys.push(key);
7153
- }
7154
- return keys;
7155
- }
7156
- function _Object(properties, options) {
7157
- const required = RequiredKeys(properties);
7158
- const schematic = required.length > 0 ? { [Kind2]: "Object", type: "object", properties, required } : { [Kind2]: "Object", type: "object", properties };
7159
- return CreateType2(schematic, options);
7160
- }
7161
- var Object3 = _Object;
7162
-
7163
- // node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
7164
- function Promise3(item, options) {
7165
- return CreateType2({ [Kind2]: "Promise", type: "Promise", item }, options);
7166
- }
7167
-
7168
- // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
7169
- function RemoveReadonly2(schema) {
7170
- return CreateType2(Discard2(schema, [ReadonlyKind2]));
7171
- }
7172
- function AddReadonly2(schema) {
7173
- return CreateType2({ ...schema, [ReadonlyKind2]: "Readonly" });
7174
- }
7175
- function ReadonlyWithFlag2(schema, F) {
7176
- return F === false ? RemoveReadonly2(schema) : AddReadonly2(schema);
7177
- }
7178
- function Readonly2(schema, enable) {
7179
- const F = enable ?? true;
7180
- return IsMappedResult3(schema) ? ReadonlyFromMappedResult2(schema, F) : ReadonlyWithFlag2(schema, F);
7181
- }
7182
-
7183
- // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
7184
- function FromProperties22(K, F) {
7185
- const Acc = {};
7186
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
7187
- Acc[K2] = Readonly2(K[K2], F);
7188
- return Acc;
7189
- }
7190
- function FromMappedResult15(R, F) {
7191
- return FromProperties22(R.properties, F);
7192
- }
7193
- function ReadonlyFromMappedResult2(R, F) {
7194
- const P = FromMappedResult15(R, F);
7195
- return MappedResult2(P);
7196
- }
7197
-
7198
- // node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
7199
- function Tuple2(types, options) {
7200
- return CreateType2(types.length > 0 ? { [Kind2]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind2]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options);
7201
- }
7202
-
7203
- // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
7204
- function FromMappedResult16(K, P) {
7205
- return K in P ? FromSchemaType2(K, P[K]) : MappedResult2(P);
7206
- }
7207
- function MappedKeyToKnownMappedResultProperties2(K) {
7208
- return { [K]: Literal2(K) };
7209
- }
7210
- function MappedKeyToUnknownMappedResultProperties2(P) {
7211
- const Acc = {};
7212
- for (const L of P)
7213
- Acc[L] = Literal2(L);
7214
- return Acc;
7215
- }
7216
- function MappedKeyToMappedResultProperties2(K, P) {
7217
- return SetIncludes2(P, K) ? MappedKeyToKnownMappedResultProperties2(K) : MappedKeyToUnknownMappedResultProperties2(P);
7218
- }
7219
- function FromMappedKey5(K, P) {
7220
- const R = MappedKeyToMappedResultProperties2(K, P);
7221
- return FromMappedResult16(K, R);
7222
- }
7223
- function FromRest10(K, T) {
7224
- return T.map((L) => FromSchemaType2(K, L));
7225
- }
7226
- function FromProperties23(K, T) {
7227
- const Acc = {};
7228
- for (const K2 of globalThis.Object.getOwnPropertyNames(T))
7229
- Acc[K2] = FromSchemaType2(K, T[K2]);
7230
- return Acc;
7231
- }
7232
- function FromSchemaType2(K, T) {
7233
- const options = { ...T };
7234
- return IsOptional3(T) ? Optional2(FromSchemaType2(K, Discard2(T, [OptionalKind2]))) : IsReadonly3(T) ? Readonly2(FromSchemaType2(K, Discard2(T, [ReadonlyKind2]))) : IsMappedResult3(T) ? FromMappedResult16(K, T.properties) : IsMappedKey3(T) ? FromMappedKey5(K, T.keys) : IsConstructor3(T) ? Constructor2(FromRest10(K, T.parameters), FromSchemaType2(K, T.returns), options) : IsFunction7(T) ? Function2(FromRest10(K, T.parameters), FromSchemaType2(K, T.returns), options) : IsAsyncIterator7(T) ? AsyncIterator2(FromSchemaType2(K, T.items), options) : IsIterator7(T) ? Iterator2(FromSchemaType2(K, T.items), options) : IsIntersect3(T) ? Intersect3(FromRest10(K, T.allOf), options) : IsUnion3(T) ? Union3(FromRest10(K, T.anyOf), options) : IsTuple3(T) ? Tuple2(FromRest10(K, T.items ?? []), options) : IsObject8(T) ? Object3(FromProperties23(K, T.properties), options) : IsArray8(T) ? Array3(FromSchemaType2(K, T.items), options) : IsPromise4(T) ? Promise3(FromSchemaType2(K, T.item), options) : T;
7235
- }
7236
- function MappedFunctionReturnType2(K, T) {
7237
- const Acc = {};
7238
- for (const L of K)
7239
- Acc[L] = FromSchemaType2(L, T);
7240
- return Acc;
7241
- }
7242
- function Mapped2(key, map3, options) {
7243
- const K = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
7244
- const RT = map3({ [Kind2]: "MappedKey", keys: K });
7245
- const R = MappedFunctionReturnType2(K, RT);
7246
- return Object3(R, options);
7247
- }
7248
-
7249
- // node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
7250
- function RemoveOptional2(schema) {
7251
- return CreateType2(Discard2(schema, [OptionalKind2]));
7252
- }
7253
- function AddOptional2(schema) {
7254
- return CreateType2({ ...schema, [OptionalKind2]: "Optional" });
7255
- }
7256
- function OptionalWithFlag2(schema, F) {
7257
- return F === false ? RemoveOptional2(schema) : AddOptional2(schema);
7258
- }
7259
- function Optional2(schema, enable) {
7260
- const F = enable ?? true;
7261
- return IsMappedResult3(schema) ? OptionalFromMappedResult2(schema, F) : OptionalWithFlag2(schema, F);
7262
- }
7263
-
7264
- // node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
7265
- function FromProperties24(P, F) {
7266
- const Acc = {};
7267
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
7268
- Acc[K2] = Optional2(P[K2], F);
7269
- return Acc;
7270
- }
7271
- function FromMappedResult17(R, F) {
7272
- return FromProperties24(R.properties, F);
7273
- }
7274
- function OptionalFromMappedResult2(R, F) {
7275
- const P = FromMappedResult17(R, F);
7276
- return MappedResult2(P);
7277
- }
7278
-
7279
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
7280
- function IntersectCreate2(T, options = {}) {
7281
- const allObjects = T.every((schema) => IsObject8(schema));
7282
- const clonedUnevaluatedProperties = IsSchema3(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
7283
- return CreateType2(options.unevaluatedProperties === false || IsSchema3(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind2]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind2]: "Intersect", allOf: T }, options);
7284
- }
7285
-
7286
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
7287
- function IsIntersectOptional2(types) {
7288
- return types.every((left) => IsOptional3(left));
7289
- }
7290
- function RemoveOptionalFromType5(type) {
7291
- return Discard2(type, [OptionalKind2]);
7292
- }
7293
- function RemoveOptionalFromRest5(types) {
7294
- return types.map((left) => IsOptional3(left) ? RemoveOptionalFromType5(left) : left);
7295
- }
7296
- function ResolveIntersect2(types, options) {
7297
- return IsIntersectOptional2(types) ? Optional2(IntersectCreate2(RemoveOptionalFromRest5(types), options)) : IntersectCreate2(RemoveOptionalFromRest5(types), options);
7298
- }
7299
- function IntersectEvaluated2(types, options = {}) {
7300
- if (types.length === 1)
7301
- return CreateType2(types[0], options);
7302
- if (types.length === 0)
7303
- return Never2(options);
7304
- if (types.some((schema) => IsTransform3(schema)))
7305
- throw new Error("Cannot intersect transform types");
7306
- return ResolveIntersect2(types, options);
7307
- }
7308
-
7309
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
7310
- function Intersect3(types, options) {
7311
- if (types.length === 1)
7312
- return CreateType2(types[0], options);
7313
- if (types.length === 0)
7314
- return Never2(options);
7315
- if (types.some((schema) => IsTransform3(schema)))
7316
- throw new Error("Cannot intersect transform types");
7317
- return IntersectCreate2(types, options);
7318
- }
7319
-
7320
- // node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
7321
- function Ref2(...args) {
7322
- const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
7323
- if (typeof $ref !== "string")
7324
- throw new TypeBoxError2("Ref: $ref must be a string");
7325
- return CreateType2({ [Kind2]: "Ref", $ref }, options);
7326
- }
7327
-
7328
- // node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
7329
- function FromComputed6(target, parameters) {
7330
- return Computed2("Awaited", [Computed2(target, parameters)]);
7331
- }
7332
- function FromRef15($ref) {
7333
- return Computed2("Awaited", [Ref2($ref)]);
7334
- }
7335
- function FromIntersect21(types) {
7336
- return Intersect3(FromRest11(types));
7337
- }
7338
- function FromUnion25(types) {
7339
- return Union3(FromRest11(types));
7340
- }
7341
- function FromPromise8(type) {
7342
- return Awaited2(type);
7343
- }
7344
- function FromRest11(types) {
7345
- return types.map((type) => Awaited2(type));
7346
- }
7347
- function Awaited2(type, options) {
7348
- return CreateType2(IsComputed3(type) ? FromComputed6(type.target, type.parameters) : IsIntersect3(type) ? FromIntersect21(type.allOf) : IsUnion3(type) ? FromUnion25(type.anyOf) : IsPromise4(type) ? FromPromise8(type.item) : IsRef3(type) ? FromRef15(type.$ref) : type, options);
7349
- }
7350
-
7351
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
7352
- function FromRest12(types) {
7353
- const result = [];
7354
- for (const L of types)
7355
- result.push(KeyOfPropertyKeys2(L));
7356
- return result;
7357
- }
7358
- function FromIntersect22(types) {
7359
- const propertyKeysArray = FromRest12(types);
7360
- const propertyKeys = SetUnionMany2(propertyKeysArray);
7361
- return propertyKeys;
7362
- }
7363
- function FromUnion26(types) {
7364
- const propertyKeysArray = FromRest12(types);
7365
- const propertyKeys = SetIntersectMany2(propertyKeysArray);
7366
- return propertyKeys;
7367
- }
7368
- function FromTuple18(types) {
7369
- return types.map((_, indexer) => indexer.toString());
7370
- }
7371
- function FromArray20(_) {
7372
- return ["[number]"];
7373
- }
7374
- function FromProperties25(T) {
7375
- return globalThis.Object.getOwnPropertyNames(T);
7376
- }
7377
- function FromPatternProperties2(patternProperties) {
7378
- if (!includePatternProperties2)
7379
- return [];
7380
- const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
7381
- return patternPropertyKeys.map((key) => {
7382
- return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
7383
- });
7384
- }
7385
- function KeyOfPropertyKeys2(type) {
7386
- return IsIntersect3(type) ? FromIntersect22(type.allOf) : IsUnion3(type) ? FromUnion26(type.anyOf) : IsTuple3(type) ? FromTuple18(type.items ?? []) : IsArray8(type) ? FromArray20(type.items) : IsObject8(type) ? FromProperties25(type.properties) : IsRecord3(type) ? FromPatternProperties2(type.patternProperties) : [];
7387
- }
7388
- var includePatternProperties2 = false;
7389
-
7390
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
7391
- function FromComputed8(target, parameters) {
7392
- return Computed2("KeyOf", [Computed2(target, parameters)]);
7393
- }
7394
- function FromRef17($ref) {
7395
- return Computed2("KeyOf", [Ref2($ref)]);
7396
- }
7397
- function KeyOfFromType2(type, options) {
7398
- const propertyKeys = KeyOfPropertyKeys2(type);
7399
- const propertyKeyTypes = KeyOfPropertyKeysToRest2(propertyKeys);
7400
- const result = UnionEvaluated2(propertyKeyTypes);
7401
- return CreateType2(result, options);
7402
- }
7403
- function KeyOfPropertyKeysToRest2(propertyKeys) {
7404
- return propertyKeys.map((L) => L === "[number]" ? Number3() : Literal2(L));
7405
- }
7406
- function KeyOf2(type, options) {
7407
- return IsComputed3(type) ? FromComputed8(type.target, type.parameters) : IsRef3(type) ? FromRef17(type.$ref) : IsMappedResult3(type) ? KeyOfFromMappedResult2(type, options) : KeyOfFromType2(type, options);
7408
- }
7409
-
7410
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
7411
- function FromProperties26(properties, options) {
7412
- const result = {};
7413
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
7414
- result[K2] = KeyOf2(properties[K2], Clone3(options));
7415
- return result;
7416
- }
7417
- function FromMappedResult18(mappedResult, options) {
7418
- return FromProperties26(mappedResult.properties, options);
7419
- }
7420
- function KeyOfFromMappedResult2(mappedResult, options) {
7421
- const properties = FromMappedResult18(mappedResult, options);
7422
- return MappedResult2(properties);
7423
- }
7424
-
7425
- // node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
7426
- function CompositeKeys2(T) {
7427
- const Acc = [];
7428
- for (const L of T)
7429
- Acc.push(...KeyOfPropertyKeys2(L));
7430
- return SetDistinct2(Acc);
7431
- }
7432
- function FilterNever2(T) {
7433
- return T.filter((L) => !IsNever3(L));
7434
- }
7435
- function CompositeProperty2(T, K) {
7436
- const Acc = [];
7437
- for (const L of T)
7438
- Acc.push(...IndexFromPropertyKeys2(L, [K]));
7439
- return FilterNever2(Acc);
7440
- }
7441
- function CompositeProperties2(T, K) {
7442
- const Acc = {};
7443
- for (const L of K) {
7444
- Acc[L] = IntersectEvaluated2(CompositeProperty2(T, L));
7445
- }
7446
- return Acc;
7447
- }
7448
- function Composite2(T, options) {
7449
- const K = CompositeKeys2(T);
7450
- const P = CompositeProperties2(T, K);
7451
- const R = Object3(P, options);
7452
- return R;
7453
- }
7454
-
7455
- // node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
7456
- function Date3(options) {
7457
- return CreateType2({ [Kind2]: "Date", type: "Date" }, options);
7458
- }
7459
-
7460
- // node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
7461
- function Null2(options) {
7462
- return CreateType2({ [Kind2]: "Null", type: "null" }, options);
7463
- }
7464
-
7465
- // node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
7466
- function Symbol3(options) {
7467
- return CreateType2({ [Kind2]: "Symbol", type: "symbol" }, options);
7468
- }
7469
-
7470
- // node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
7471
- function Undefined2(options) {
7472
- return CreateType2({ [Kind2]: "Undefined", type: "undefined" }, options);
7473
- }
7474
-
7475
- // node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
7476
- function Uint8Array3(options) {
7477
- return CreateType2({ [Kind2]: "Uint8Array", type: "Uint8Array" }, options);
7478
- }
7479
-
7480
- // node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
7481
- function Unknown2(options) {
7482
- return CreateType2({ [Kind2]: "Unknown" }, options);
7483
- }
7484
-
7485
- // node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
7486
- function FromArray21(T) {
7487
- return T.map((L) => FromValue3(L, false));
7488
- }
7489
- function FromProperties27(value) {
7490
- const Acc = {};
7491
- for (const K of globalThis.Object.getOwnPropertyNames(value))
7492
- Acc[K] = Readonly2(FromValue3(value[K], false));
7493
- return Acc;
7494
- }
7495
- function ConditionalReadonly2(T, root) {
7496
- return root === true ? T : Readonly2(T);
7497
- }
7498
- function FromValue3(value, root) {
7499
- return IsAsyncIterator5(value) ? ConditionalReadonly2(Any2(), root) : IsIterator5(value) ? ConditionalReadonly2(Any2(), root) : IsArray5(value) ? Readonly2(Tuple2(FromArray21(value))) : IsUint8Array5(value) ? Uint8Array3() : IsDate5(value) ? Date3() : IsObject5(value) ? ConditionalReadonly2(Object3(FromProperties27(value)), root) : IsFunction5(value) ? ConditionalReadonly2(Function2([], Unknown2()), root) : IsUndefined5(value) ? Undefined2() : IsNull5(value) ? Null2() : IsSymbol5(value) ? Symbol3() : IsBigInt5(value) ? BigInt3() : IsNumber5(value) ? Literal2(value) : IsBoolean5(value) ? Literal2(value) : IsString5(value) ? Literal2(value) : Object3({});
7500
- }
7501
- function Const2(T, options) {
7502
- return CreateType2(FromValue3(T, true), options);
7503
- }
7504
-
7505
- // node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
7506
- function ConstructorParameters2(schema, options) {
7507
- return IsConstructor3(schema) ? Tuple2(schema.parameters, options) : Never2(options);
7508
- }
7509
-
7510
- // node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
7511
- function Enum2(item, options) {
7512
- if (IsUndefined5(item))
7513
- throw new Error("Enum undefined or empty");
7514
- const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
7515
- const values2 = [...new Set(values1)];
7516
- const anyOf = values2.map((value) => Literal2(value));
7517
- return Union3(anyOf, { ...options, [Hint2]: "Enum" });
7518
- }
7519
-
7520
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
7521
- class ExtendsResolverError2 extends TypeBoxError2 {
7522
- }
7523
- var ExtendsResult2;
7524
- (function(ExtendsResult3) {
7525
- ExtendsResult3[ExtendsResult3["Union"] = 0] = "Union";
7526
- ExtendsResult3[ExtendsResult3["True"] = 1] = "True";
7527
- ExtendsResult3[ExtendsResult3["False"] = 2] = "False";
7528
- })(ExtendsResult2 || (ExtendsResult2 = {}));
7529
- function IntoBooleanResult2(result) {
7530
- return result === ExtendsResult2.False ? result : ExtendsResult2.True;
7531
- }
7532
- function Throw2(message) {
7533
- throw new ExtendsResolverError2(message);
7534
- }
7535
- function IsStructuralRight2(right) {
7536
- return exports_type4.IsNever(right) || exports_type4.IsIntersect(right) || exports_type4.IsUnion(right) || exports_type4.IsUnknown(right) || exports_type4.IsAny(right);
7537
- }
7538
- function StructuralRight2(left, right) {
7539
- return exports_type4.IsNever(right) ? FromNeverRight2(left, right) : exports_type4.IsIntersect(right) ? FromIntersectRight2(left, right) : exports_type4.IsUnion(right) ? FromUnionRight2(left, right) : exports_type4.IsUnknown(right) ? FromUnknownRight2(left, right) : exports_type4.IsAny(right) ? FromAnyRight2(left, right) : Throw2("StructuralRight");
7540
- }
7541
- function FromAnyRight2(left, right) {
7542
- return ExtendsResult2.True;
7543
- }
7544
- function FromAny5(left, right) {
7545
- return exports_type4.IsIntersect(right) ? FromIntersectRight2(left, right) : exports_type4.IsUnion(right) && right.anyOf.some((schema) => exports_type4.IsAny(schema) || exports_type4.IsUnknown(schema)) ? ExtendsResult2.True : exports_type4.IsUnion(right) ? ExtendsResult2.Union : exports_type4.IsUnknown(right) ? ExtendsResult2.True : exports_type4.IsAny(right) ? ExtendsResult2.True : ExtendsResult2.Union;
7546
- }
7547
- function FromArrayRight2(left, right) {
7548
- return exports_type4.IsUnknown(left) ? ExtendsResult2.False : exports_type4.IsAny(left) ? ExtendsResult2.Union : exports_type4.IsNever(left) ? ExtendsResult2.True : ExtendsResult2.False;
7549
- }
7550
- function FromArray22(left, right) {
7551
- return exports_type4.IsObject(right) && IsObjectArrayLike2(right) ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : !exports_type4.IsArray(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.items, right.items));
7552
- }
7553
- function FromAsyncIterator8(left, right) {
7554
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : !exports_type4.IsAsyncIterator(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.items, right.items));
7555
- }
7556
- function FromBigInt6(left, right) {
7557
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsBigInt(right) ? ExtendsResult2.True : ExtendsResult2.False;
7558
- }
7559
- function FromBooleanRight2(left, right) {
7560
- return exports_type4.IsLiteralBoolean(left) ? ExtendsResult2.True : exports_type4.IsBoolean(left) ? ExtendsResult2.True : ExtendsResult2.False;
7561
- }
7562
- function FromBoolean6(left, right) {
7563
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsBoolean(right) ? ExtendsResult2.True : ExtendsResult2.False;
7564
- }
7565
- function FromConstructor9(left, right) {
7566
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : !exports_type4.IsConstructor(right) ? ExtendsResult2.False : left.parameters.length > right.parameters.length ? ExtendsResult2.False : !left.parameters.every((schema, index) => IntoBooleanResult2(Visit20(right.parameters[index], schema)) === ExtendsResult2.True) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.returns, right.returns));
7567
- }
7568
- function FromDate8(left, right) {
7569
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsDate(right) ? ExtendsResult2.True : ExtendsResult2.False;
7570
- }
7571
- function FromFunction8(left, right) {
7572
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : !exports_type4.IsFunction(right) ? ExtendsResult2.False : left.parameters.length > right.parameters.length ? ExtendsResult2.False : !left.parameters.every((schema, index) => IntoBooleanResult2(Visit20(right.parameters[index], schema)) === ExtendsResult2.True) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.returns, right.returns));
7573
- }
7574
- function FromIntegerRight2(left, right) {
7575
- return exports_type4.IsLiteral(left) && exports_value3.IsNumber(left.const) ? ExtendsResult2.True : exports_type4.IsNumber(left) || exports_type4.IsInteger(left) ? ExtendsResult2.True : ExtendsResult2.False;
7576
- }
7577
- function FromInteger6(left, right) {
7578
- return exports_type4.IsInteger(right) || exports_type4.IsNumber(right) ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : ExtendsResult2.False;
7579
- }
7580
- function FromIntersectRight2(left, right) {
7581
- return right.allOf.every((schema) => Visit20(left, schema) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
7582
- }
7583
- function FromIntersect23(left, right) {
7584
- return left.allOf.some((schema) => Visit20(schema, right) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
7585
- }
7586
- function FromIterator8(left, right) {
7587
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : !exports_type4.IsIterator(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.items, right.items));
7588
- }
7589
- function FromLiteral9(left, right) {
7590
- return exports_type4.IsLiteral(right) && right.const === left.const ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsString(right) ? FromStringRight2(left, right) : exports_type4.IsNumber(right) ? FromNumberRight2(left, right) : exports_type4.IsInteger(right) ? FromIntegerRight2(left, right) : exports_type4.IsBoolean(right) ? FromBooleanRight2(left, right) : ExtendsResult2.False;
7591
- }
7592
- function FromNeverRight2(left, right) {
7593
- return ExtendsResult2.False;
7594
- }
7595
- function FromNever6(left, right) {
7596
- return ExtendsResult2.True;
7597
- }
7598
- function UnwrapTNot2(schema) {
7599
- let [current, depth] = [schema, 0];
7600
- while (true) {
7601
- if (!exports_type4.IsNot(current))
7602
- break;
7603
- current = current.not;
7604
- depth += 1;
7605
- }
7606
- return depth % 2 === 0 ? current : Unknown2();
7607
- }
7608
- function FromNot8(left, right) {
7609
- return exports_type4.IsNot(left) ? Visit20(UnwrapTNot2(left), right) : exports_type4.IsNot(right) ? Visit20(left, UnwrapTNot2(right)) : Throw2("Invalid fallthrough for Not");
7610
- }
7611
- function FromNull6(left, right) {
7612
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsNull(right) ? ExtendsResult2.True : ExtendsResult2.False;
7613
- }
7614
- function FromNumberRight2(left, right) {
7615
- return exports_type4.IsLiteralNumber(left) ? ExtendsResult2.True : exports_type4.IsNumber(left) || exports_type4.IsInteger(left) ? ExtendsResult2.True : ExtendsResult2.False;
7616
- }
7617
- function FromNumber6(left, right) {
7618
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsInteger(right) || exports_type4.IsNumber(right) ? ExtendsResult2.True : ExtendsResult2.False;
7619
- }
7620
- function IsObjectPropertyCount2(schema, count) {
7621
- return Object.getOwnPropertyNames(schema.properties).length === count;
7622
- }
7623
- function IsObjectStringLike2(schema) {
7624
- return IsObjectArrayLike2(schema);
7625
- }
7626
- function IsObjectSymbolLike2(schema) {
7627
- return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "description" in schema.properties && exports_type4.IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (exports_type4.IsString(schema.properties.description.anyOf[0]) && exports_type4.IsUndefined(schema.properties.description.anyOf[1]) || exports_type4.IsString(schema.properties.description.anyOf[1]) && exports_type4.IsUndefined(schema.properties.description.anyOf[0]));
7628
- }
7629
- function IsObjectNumberLike2(schema) {
7630
- return IsObjectPropertyCount2(schema, 0);
7631
- }
7632
- function IsObjectBooleanLike2(schema) {
7633
- return IsObjectPropertyCount2(schema, 0);
7634
- }
7635
- function IsObjectBigIntLike2(schema) {
7636
- return IsObjectPropertyCount2(schema, 0);
7637
- }
7638
- function IsObjectDateLike2(schema) {
7639
- return IsObjectPropertyCount2(schema, 0);
7640
- }
7641
- function IsObjectUint8ArrayLike2(schema) {
7642
- return IsObjectArrayLike2(schema);
7643
- }
7644
- function IsObjectFunctionLike2(schema) {
7645
- const length = Number3();
7646
- return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "length" in schema.properties && IntoBooleanResult2(Visit20(schema.properties["length"], length)) === ExtendsResult2.True;
7647
- }
7648
- function IsObjectConstructorLike2(schema) {
7649
- return IsObjectPropertyCount2(schema, 0);
7650
- }
7651
- function IsObjectArrayLike2(schema) {
7652
- const length = Number3();
7653
- return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "length" in schema.properties && IntoBooleanResult2(Visit20(schema.properties["length"], length)) === ExtendsResult2.True;
7654
- }
7655
- function IsObjectPromiseLike2(schema) {
7656
- const then = Function2([Any2()], Any2());
7657
- return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "then" in schema.properties && IntoBooleanResult2(Visit20(schema.properties["then"], then)) === ExtendsResult2.True;
7658
- }
7659
- function Property2(left, right) {
7660
- return Visit20(left, right) === ExtendsResult2.False ? ExtendsResult2.False : exports_type4.IsOptional(left) && !exports_type4.IsOptional(right) ? ExtendsResult2.False : ExtendsResult2.True;
7661
- }
7662
- function FromObjectRight2(left, right) {
7663
- return exports_type4.IsUnknown(left) ? ExtendsResult2.False : exports_type4.IsAny(left) ? ExtendsResult2.Union : exports_type4.IsNever(left) || exports_type4.IsLiteralString(left) && IsObjectStringLike2(right) || exports_type4.IsLiteralNumber(left) && IsObjectNumberLike2(right) || exports_type4.IsLiteralBoolean(left) && IsObjectBooleanLike2(right) || exports_type4.IsSymbol(left) && IsObjectSymbolLike2(right) || exports_type4.IsBigInt(left) && IsObjectBigIntLike2(right) || exports_type4.IsString(left) && IsObjectStringLike2(right) || exports_type4.IsSymbol(left) && IsObjectSymbolLike2(right) || exports_type4.IsNumber(left) && IsObjectNumberLike2(right) || exports_type4.IsInteger(left) && IsObjectNumberLike2(right) || exports_type4.IsBoolean(left) && IsObjectBooleanLike2(right) || exports_type4.IsUint8Array(left) && IsObjectUint8ArrayLike2(right) || exports_type4.IsDate(left) && IsObjectDateLike2(right) || exports_type4.IsConstructor(left) && IsObjectConstructorLike2(right) || exports_type4.IsFunction(left) && IsObjectFunctionLike2(right) ? ExtendsResult2.True : exports_type4.IsRecord(left) && exports_type4.IsString(RecordKey3(left)) ? (() => {
7664
- return right[Hint2] === "Record" ? ExtendsResult2.True : ExtendsResult2.False;
7665
- })() : exports_type4.IsRecord(left) && exports_type4.IsNumber(RecordKey3(left)) ? (() => {
7666
- return IsObjectPropertyCount2(right, 0) ? ExtendsResult2.True : ExtendsResult2.False;
7667
- })() : ExtendsResult2.False;
7668
- }
7669
- function FromObject19(left, right) {
7670
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : !exports_type4.IsObject(right) ? ExtendsResult2.False : (() => {
7671
- for (const key of Object.getOwnPropertyNames(right.properties)) {
7672
- if (!(key in left.properties) && !exports_type4.IsOptional(right.properties[key])) {
7673
- return ExtendsResult2.False;
7674
- }
7675
- if (exports_type4.IsOptional(right.properties[key])) {
7676
- return ExtendsResult2.True;
7677
- }
7678
- if (Property2(left.properties[key], right.properties[key]) === ExtendsResult2.False) {
7679
- return ExtendsResult2.False;
7680
- }
7681
- }
7682
- return ExtendsResult2.True;
7683
- })();
7684
- }
7685
- function FromPromise10(left, right) {
7686
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) && IsObjectPromiseLike2(right) ? ExtendsResult2.True : !exports_type4.IsPromise(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit20(left.item, right.item));
7687
- }
7688
- function RecordKey3(schema) {
7689
- return PatternNumberExact2 in schema.patternProperties ? Number3() : (PatternStringExact2 in schema.patternProperties) ? String3() : Throw2("Unknown record key pattern");
7690
- }
7691
- function RecordValue3(schema) {
7692
- return PatternNumberExact2 in schema.patternProperties ? schema.patternProperties[PatternNumberExact2] : (PatternStringExact2 in schema.patternProperties) ? schema.patternProperties[PatternStringExact2] : Throw2("Unable to get record value schema");
7693
- }
7694
- function FromRecordRight2(left, right) {
7695
- const [Key, Value] = [RecordKey3(right), RecordValue3(right)];
7696
- return exports_type4.IsLiteralString(left) && exports_type4.IsNumber(Key) && IntoBooleanResult2(Visit20(left, Value)) === ExtendsResult2.True ? ExtendsResult2.True : exports_type4.IsUint8Array(left) && exports_type4.IsNumber(Key) ? Visit20(left, Value) : exports_type4.IsString(left) && exports_type4.IsNumber(Key) ? Visit20(left, Value) : exports_type4.IsArray(left) && exports_type4.IsNumber(Key) ? Visit20(left, Value) : exports_type4.IsObject(left) ? (() => {
7697
- for (const key of Object.getOwnPropertyNames(left.properties)) {
7698
- if (Property2(Value, left.properties[key]) === ExtendsResult2.False) {
7699
- return ExtendsResult2.False;
7700
- }
7701
- }
7702
- return ExtendsResult2.True;
7703
- })() : ExtendsResult2.False;
7704
- }
7705
- function FromRecord14(left, right) {
7706
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : !exports_type4.IsRecord(right) ? ExtendsResult2.False : Visit20(RecordValue3(left), RecordValue3(right));
7707
- }
7708
- function FromRegExp5(left, right) {
7709
- const L = exports_type4.IsRegExp(left) ? String3() : left;
7710
- const R = exports_type4.IsRegExp(right) ? String3() : right;
7711
- return Visit20(L, R);
7712
- }
7713
- function FromStringRight2(left, right) {
7714
- return exports_type4.IsLiteral(left) && exports_value3.IsString(left.const) ? ExtendsResult2.True : exports_type4.IsString(left) ? ExtendsResult2.True : ExtendsResult2.False;
7715
- }
7716
- function FromString6(left, right) {
7717
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsString(right) ? ExtendsResult2.True : ExtendsResult2.False;
7718
- }
7719
- function FromSymbol6(left, right) {
7720
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsSymbol(right) ? ExtendsResult2.True : ExtendsResult2.False;
7721
- }
7722
- function FromTemplateLiteral9(left, right) {
7723
- return exports_type4.IsTemplateLiteral(left) ? Visit20(TemplateLiteralToUnion2(left), right) : exports_type4.IsTemplateLiteral(right) ? Visit20(left, TemplateLiteralToUnion2(right)) : Throw2("Invalid fallthrough for TemplateLiteral");
7724
- }
7725
- function IsArrayOfTuple2(left, right) {
7726
- return exports_type4.IsArray(right) && left.items !== undefined && left.items.every((schema) => Visit20(schema, right.items) === ExtendsResult2.True);
7727
- }
7728
- function FromTupleRight2(left, right) {
7729
- return exports_type4.IsNever(left) ? ExtendsResult2.True : exports_type4.IsUnknown(left) ? ExtendsResult2.False : exports_type4.IsAny(left) ? ExtendsResult2.Union : ExtendsResult2.False;
7730
- }
7731
- function FromTuple19(left, right) {
7732
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) && IsObjectArrayLike2(right) ? ExtendsResult2.True : exports_type4.IsArray(right) && IsArrayOfTuple2(left, right) ? ExtendsResult2.True : !exports_type4.IsTuple(right) ? ExtendsResult2.False : exports_value3.IsUndefined(left.items) && !exports_value3.IsUndefined(right.items) || !exports_value3.IsUndefined(left.items) && exports_value3.IsUndefined(right.items) ? ExtendsResult2.False : exports_value3.IsUndefined(left.items) && !exports_value3.IsUndefined(right.items) ? ExtendsResult2.True : left.items.every((schema, index) => Visit20(schema, right.items[index]) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
7733
- }
7734
- function FromUint8Array5(left, right) {
7735
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsUint8Array(right) ? ExtendsResult2.True : ExtendsResult2.False;
7736
- }
7737
- function FromUndefined6(left, right) {
7738
- return IsStructuralRight2(right) ? StructuralRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsRecord(right) ? FromRecordRight2(left, right) : exports_type4.IsVoid(right) ? FromVoidRight2(left, right) : exports_type4.IsUndefined(right) ? ExtendsResult2.True : ExtendsResult2.False;
7739
- }
7740
- function FromUnionRight2(left, right) {
7741
- return right.anyOf.some((schema) => Visit20(left, schema) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
7742
- }
7743
- function FromUnion27(left, right) {
7744
- return left.anyOf.every((schema) => Visit20(schema, right) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
7745
- }
7746
- function FromUnknownRight2(left, right) {
7747
- return ExtendsResult2.True;
7748
- }
7749
- function FromUnknown5(left, right) {
7750
- return exports_type4.IsNever(right) ? FromNeverRight2(left, right) : exports_type4.IsIntersect(right) ? FromIntersectRight2(left, right) : exports_type4.IsUnion(right) ? FromUnionRight2(left, right) : exports_type4.IsAny(right) ? FromAnyRight2(left, right) : exports_type4.IsString(right) ? FromStringRight2(left, right) : exports_type4.IsNumber(right) ? FromNumberRight2(left, right) : exports_type4.IsInteger(right) ? FromIntegerRight2(left, right) : exports_type4.IsBoolean(right) ? FromBooleanRight2(left, right) : exports_type4.IsArray(right) ? FromArrayRight2(left, right) : exports_type4.IsTuple(right) ? FromTupleRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsUnknown(right) ? ExtendsResult2.True : ExtendsResult2.False;
7751
- }
7752
- function FromVoidRight2(left, right) {
7753
- return exports_type4.IsUndefined(left) ? ExtendsResult2.True : exports_type4.IsUndefined(left) ? ExtendsResult2.True : ExtendsResult2.False;
7754
- }
7755
- function FromVoid5(left, right) {
7756
- return exports_type4.IsIntersect(right) ? FromIntersectRight2(left, right) : exports_type4.IsUnion(right) ? FromUnionRight2(left, right) : exports_type4.IsUnknown(right) ? FromUnknownRight2(left, right) : exports_type4.IsAny(right) ? FromAnyRight2(left, right) : exports_type4.IsObject(right) ? FromObjectRight2(left, right) : exports_type4.IsVoid(right) ? ExtendsResult2.True : ExtendsResult2.False;
7757
- }
7758
- function Visit20(left, right) {
7759
- return exports_type4.IsTemplateLiteral(left) || exports_type4.IsTemplateLiteral(right) ? FromTemplateLiteral9(left, right) : exports_type4.IsRegExp(left) || exports_type4.IsRegExp(right) ? FromRegExp5(left, right) : exports_type4.IsNot(left) || exports_type4.IsNot(right) ? FromNot8(left, right) : exports_type4.IsAny(left) ? FromAny5(left, right) : exports_type4.IsArray(left) ? FromArray22(left, right) : exports_type4.IsBigInt(left) ? FromBigInt6(left, right) : exports_type4.IsBoolean(left) ? FromBoolean6(left, right) : exports_type4.IsAsyncIterator(left) ? FromAsyncIterator8(left, right) : exports_type4.IsConstructor(left) ? FromConstructor9(left, right) : exports_type4.IsDate(left) ? FromDate8(left, right) : exports_type4.IsFunction(left) ? FromFunction8(left, right) : exports_type4.IsInteger(left) ? FromInteger6(left, right) : exports_type4.IsIntersect(left) ? FromIntersect23(left, right) : exports_type4.IsIterator(left) ? FromIterator8(left, right) : exports_type4.IsLiteral(left) ? FromLiteral9(left, right) : exports_type4.IsNever(left) ? FromNever6(left, right) : exports_type4.IsNull(left) ? FromNull6(left, right) : exports_type4.IsNumber(left) ? FromNumber6(left, right) : exports_type4.IsObject(left) ? FromObject19(left, right) : exports_type4.IsRecord(left) ? FromRecord14(left, right) : exports_type4.IsString(left) ? FromString6(left, right) : exports_type4.IsSymbol(left) ? FromSymbol6(left, right) : exports_type4.IsTuple(left) ? FromTuple19(left, right) : exports_type4.IsPromise(left) ? FromPromise10(left, right) : exports_type4.IsUint8Array(left) ? FromUint8Array5(left, right) : exports_type4.IsUndefined(left) ? FromUndefined6(left, right) : exports_type4.IsUnion(left) ? FromUnion27(left, right) : exports_type4.IsUnknown(left) ? FromUnknown5(left, right) : exports_type4.IsVoid(left) ? FromVoid5(left, right) : Throw2(`Unknown left type operand '${left[Kind2]}'`);
7760
- }
7761
- function ExtendsCheck2(left, right) {
7762
- return Visit20(left, right);
7763
- }
7764
-
7765
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
7766
- function FromProperties28(P, Right, True, False, options) {
7767
- const Acc = {};
7768
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
7769
- Acc[K2] = Extends2(P[K2], Right, True, False, Clone3(options));
7770
- return Acc;
7771
- }
7772
- function FromMappedResult19(Left, Right, True, False, options) {
7773
- return FromProperties28(Left.properties, Right, True, False, options);
7774
- }
7775
- function ExtendsFromMappedResult2(Left, Right, True, False, options) {
7776
- const P = FromMappedResult19(Left, Right, True, False, options);
7777
- return MappedResult2(P);
7778
- }
7779
-
7780
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
7781
- function ExtendsResolve2(left, right, trueType, falseType) {
7782
- const R = ExtendsCheck2(left, right);
7783
- return R === ExtendsResult2.Union ? Union3([trueType, falseType]) : R === ExtendsResult2.True ? trueType : falseType;
7784
- }
7785
- function Extends2(L, R, T, F, options) {
7786
- return IsMappedResult3(L) ? ExtendsFromMappedResult2(L, R, T, F, options) : IsMappedKey3(L) ? CreateType2(ExtendsFromMappedKey2(L, R, T, F, options)) : CreateType2(ExtendsResolve2(L, R, T, F), options);
7787
- }
7788
-
7789
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
7790
- function FromPropertyKey4(K, U, L, R, options) {
7791
- return {
7792
- [K]: Extends2(Literal2(K), U, L, R, Clone3(options))
7793
- };
7794
- }
7795
- function FromPropertyKeys4(K, U, L, R, options) {
7796
- return K.reduce((Acc, LK) => {
7797
- return { ...Acc, ...FromPropertyKey4(LK, U, L, R, options) };
7798
- }, {});
7799
- }
7800
- function FromMappedKey7(K, U, L, R, options) {
7801
- return FromPropertyKeys4(K.keys, U, L, R, options);
7802
- }
7803
- function ExtendsFromMappedKey2(T, U, L, R, options) {
7804
- const P = FromMappedKey7(T, U, L, R, options);
7805
- return MappedResult2(P);
7806
- }
7807
-
7808
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
7809
- function ExcludeFromTemplateLiteral2(L, R) {
7810
- return Exclude2(TemplateLiteralToUnion2(L), R);
7811
- }
7812
-
7813
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
7814
- function ExcludeRest2(L, R) {
7815
- const excluded = L.filter((inner) => ExtendsCheck2(inner, R) === ExtendsResult2.False);
7816
- return excluded.length === 1 ? excluded[0] : Union3(excluded);
7817
- }
7818
- function Exclude2(L, R, options = {}) {
7819
- if (IsTemplateLiteral3(L))
7820
- return CreateType2(ExcludeFromTemplateLiteral2(L, R), options);
7821
- if (IsMappedResult3(L))
7822
- return CreateType2(ExcludeFromMappedResult2(L, R), options);
7823
- return CreateType2(IsUnion3(L) ? ExcludeRest2(L.anyOf, R) : ExtendsCheck2(L, R) !== ExtendsResult2.False ? Never2() : L, options);
7824
- }
7825
-
7826
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
7827
- function FromProperties29(P, U) {
7828
- const Acc = {};
7829
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
7830
- Acc[K2] = Exclude2(P[K2], U);
7831
- return Acc;
7832
- }
7833
- function FromMappedResult20(R, T) {
7834
- return FromProperties29(R.properties, T);
7835
- }
7836
- function ExcludeFromMappedResult2(R, T) {
7837
- const P = FromMappedResult20(R, T);
7838
- return MappedResult2(P);
7839
- }
7840
-
7841
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
7842
- function ExtractFromTemplateLiteral2(L, R) {
7843
- return Extract2(TemplateLiteralToUnion2(L), R);
7844
- }
7845
-
7846
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
7847
- function ExtractRest2(L, R) {
7848
- const extracted = L.filter((inner) => ExtendsCheck2(inner, R) !== ExtendsResult2.False);
7849
- return extracted.length === 1 ? extracted[0] : Union3(extracted);
7850
- }
7851
- function Extract2(L, R, options) {
7852
- if (IsTemplateLiteral3(L))
7853
- return CreateType2(ExtractFromTemplateLiteral2(L, R), options);
7854
- if (IsMappedResult3(L))
7855
- return CreateType2(ExtractFromMappedResult2(L, R), options);
7856
- return CreateType2(IsUnion3(L) ? ExtractRest2(L.anyOf, R) : ExtendsCheck2(L, R) !== ExtendsResult2.False ? L : Never2(), options);
7857
- }
7858
-
7859
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
7860
- function FromProperties30(P, T) {
7861
- const Acc = {};
7862
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
7863
- Acc[K2] = Extract2(P[K2], T);
7864
- return Acc;
7865
- }
7866
- function FromMappedResult21(R, T) {
7867
- return FromProperties30(R.properties, T);
7868
- }
7869
- function ExtractFromMappedResult2(R, T) {
7870
- const P = FromMappedResult21(R, T);
7871
- return MappedResult2(P);
7872
- }
7873
-
7874
- // node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
7875
- function InstanceType2(schema, options) {
7876
- return IsConstructor3(schema) ? CreateType2(schema.returns, options) : Never2(options);
7877
- }
7878
-
7879
- // node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
7880
- function ReadonlyOptional2(schema) {
7881
- return Readonly2(Optional2(schema));
7882
- }
7883
-
7884
- // node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
7885
- function RecordCreateFromPattern2(pattern, T, options) {
7886
- return CreateType2({ [Kind2]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
7887
- }
7888
- function RecordCreateFromKeys2(K, T, options) {
7889
- const result = {};
7890
- for (const K2 of K)
7891
- result[K2] = T;
7892
- return Object3(result, { ...options, [Hint2]: "Record" });
7893
- }
7894
- function FromTemplateLiteralKey2(K, T, options) {
7895
- return IsTemplateLiteralFinite2(K) ? RecordCreateFromKeys2(IndexPropertyKeys2(K), T, options) : RecordCreateFromPattern2(K.pattern, T, options);
7896
- }
7897
- function FromUnionKey2(key, type, options) {
7898
- return RecordCreateFromKeys2(IndexPropertyKeys2(Union3(key)), type, options);
7899
- }
7900
- function FromLiteralKey2(key, type, options) {
7901
- return RecordCreateFromKeys2([key.toString()], type, options);
7902
- }
7903
- function FromRegExpKey2(key, type, options) {
7904
- return RecordCreateFromPattern2(key.source, type, options);
7905
- }
7906
- function FromStringKey2(key, type, options) {
7907
- const pattern = IsUndefined5(key.pattern) ? PatternStringExact2 : key.pattern;
7908
- return RecordCreateFromPattern2(pattern, type, options);
7909
- }
7910
- function FromAnyKey2(_, type, options) {
7911
- return RecordCreateFromPattern2(PatternStringExact2, type, options);
7912
- }
7913
- function FromNeverKey2(_key, type, options) {
7914
- return RecordCreateFromPattern2(PatternNeverExact2, type, options);
7915
- }
7916
- function FromBooleanKey2(_key, type, options) {
7917
- return Object3({ true: type, false: type }, options);
7918
- }
7919
- function FromIntegerKey2(_key, type, options) {
7920
- return RecordCreateFromPattern2(PatternNumberExact2, type, options);
7921
- }
7922
- function FromNumberKey2(_, type, options) {
7923
- return RecordCreateFromPattern2(PatternNumberExact2, type, options);
7924
- }
7925
- function Record2(key, type, options = {}) {
7926
- return IsUnion3(key) ? FromUnionKey2(key.anyOf, type, options) : IsTemplateLiteral3(key) ? FromTemplateLiteralKey2(key, type, options) : IsLiteral3(key) ? FromLiteralKey2(key.const, type, options) : IsBoolean7(key) ? FromBooleanKey2(key, type, options) : IsInteger4(key) ? FromIntegerKey2(key, type, options) : IsNumber8(key) ? FromNumberKey2(key, type, options) : IsRegExp6(key) ? FromRegExpKey2(key, type, options) : IsString7(key) ? FromStringKey2(key, type, options) : IsAny3(key) ? FromAnyKey2(key, type, options) : IsNever3(key) ? FromNeverKey2(key, type, options) : Never2(options);
7927
- }
7928
- function RecordPattern2(record) {
7929
- return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
7930
- }
7931
- function RecordKey5(type) {
7932
- const pattern = RecordPattern2(type);
7933
- return pattern === PatternStringExact2 ? String3() : pattern === PatternNumberExact2 ? Number3() : String3({ pattern });
7934
- }
7935
- function RecordValue5(type) {
7936
- return type.patternProperties[RecordPattern2(type)];
7937
- }
7938
-
7939
- // node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
7940
- function FromConstructor11(args, type) {
7941
- type.parameters = FromTypes3(args, type.parameters);
7942
- type.returns = FromType3(args, type.returns);
7943
- return type;
7944
- }
7945
- function FromFunction10(args, type) {
7946
- type.parameters = FromTypes3(args, type.parameters);
7947
- type.returns = FromType3(args, type.returns);
7948
- return type;
7949
- }
7950
- function FromIntersect24(args, type) {
7951
- type.allOf = FromTypes3(args, type.allOf);
7952
- return type;
7953
- }
7954
- function FromUnion28(args, type) {
7955
- type.anyOf = FromTypes3(args, type.anyOf);
7956
- return type;
7957
- }
7958
- function FromTuple20(args, type) {
7959
- if (IsUndefined5(type.items))
7960
- return type;
7961
- type.items = FromTypes3(args, type.items);
7962
- return type;
7963
- }
7964
- function FromArray23(args, type) {
7965
- type.items = FromType3(args, type.items);
7966
- return type;
7967
- }
7968
- function FromAsyncIterator10(args, type) {
7969
- type.items = FromType3(args, type.items);
7970
- return type;
7971
- }
7972
- function FromIterator10(args, type) {
7973
- type.items = FromType3(args, type.items);
7974
- return type;
7975
- }
7976
- function FromPromise11(args, type) {
7977
- type.item = FromType3(args, type.item);
7978
- return type;
7979
- }
7980
- function FromObject21(args, type) {
7981
- const mappedProperties = FromProperties31(args, type.properties);
7982
- return { ...type, ...Object3(mappedProperties) };
7983
- }
7984
- function FromRecord16(args, type) {
7985
- const mappedKey = FromType3(args, RecordKey5(type));
7986
- const mappedValue = FromType3(args, RecordValue5(type));
7987
- const result = Record2(mappedKey, mappedValue);
7988
- return { ...type, ...result };
7989
- }
7990
- function FromArgument5(args, argument) {
7991
- return argument.index in args ? args[argument.index] : Unknown2();
7992
- }
7993
- function FromProperty6(args, type) {
7994
- const isReadonly = IsReadonly3(type);
7995
- const isOptional = IsOptional3(type);
7996
- const mapped = FromType3(args, type);
7997
- return isReadonly && isOptional ? ReadonlyOptional2(mapped) : isReadonly && !isOptional ? Readonly2(mapped) : !isReadonly && isOptional ? Optional2(mapped) : mapped;
7998
- }
7999
- function FromProperties31(args, properties) {
8000
- return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
8001
- return { ...result, [key]: FromProperty6(args, properties[key]) };
8002
- }, {});
8003
- }
8004
- function FromTypes3(args, types) {
8005
- return types.map((type) => FromType3(args, type));
8006
- }
8007
- function FromType3(args, type) {
8008
- return IsConstructor3(type) ? FromConstructor11(args, type) : IsFunction7(type) ? FromFunction10(args, type) : IsIntersect3(type) ? FromIntersect24(args, type) : IsUnion3(type) ? FromUnion28(args, type) : IsTuple3(type) ? FromTuple20(args, type) : IsArray8(type) ? FromArray23(args, type) : IsAsyncIterator7(type) ? FromAsyncIterator10(args, type) : IsIterator7(type) ? FromIterator10(args, type) : IsPromise4(type) ? FromPromise11(args, type) : IsObject8(type) ? FromObject21(args, type) : IsRecord3(type) ? FromRecord16(args, type) : IsArgument3(type) ? FromArgument5(args, type) : type;
8009
- }
8010
- function Instantiate2(type, args) {
8011
- return FromType3(args, CloneType2(type));
8012
- }
8013
-
8014
- // node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
8015
- function Integer2(options) {
8016
- return CreateType2({ [Kind2]: "Integer", type: "integer" }, options);
8017
- }
8018
-
8019
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
8020
- function MappedIntrinsicPropertyKey2(K, M, options) {
8021
- return {
8022
- [K]: Intrinsic2(Literal2(K), M, Clone3(options))
8023
- };
8024
- }
8025
- function MappedIntrinsicPropertyKeys2(K, M, options) {
8026
- const result = K.reduce((Acc, L) => {
8027
- return { ...Acc, ...MappedIntrinsicPropertyKey2(L, M, options) };
8028
- }, {});
8029
- return result;
8030
- }
8031
- function MappedIntrinsicProperties2(T, M, options) {
8032
- return MappedIntrinsicPropertyKeys2(T["keys"], M, options);
8033
- }
8034
- function IntrinsicFromMappedKey2(T, M, options) {
8035
- const P = MappedIntrinsicProperties2(T, M, options);
8036
- return MappedResult2(P);
8037
- }
8038
-
8039
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
8040
- function ApplyUncapitalize2(value) {
8041
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
8042
- return [first.toLowerCase(), rest].join("");
8043
- }
8044
- function ApplyCapitalize2(value) {
8045
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
8046
- return [first.toUpperCase(), rest].join("");
8047
- }
8048
- function ApplyUppercase2(value) {
8049
- return value.toUpperCase();
8050
- }
8051
- function ApplyLowercase2(value) {
8052
- return value.toLowerCase();
8053
- }
8054
- function FromTemplateLiteral10(schema, mode, options) {
8055
- const expression = TemplateLiteralParseExact2(schema.pattern);
8056
- const finite = IsTemplateLiteralExpressionFinite2(expression);
8057
- if (!finite)
8058
- return { ...schema, pattern: FromLiteralValue2(schema.pattern, mode) };
8059
- const strings = [...TemplateLiteralExpressionGenerate2(expression)];
8060
- const literals = strings.map((value) => Literal2(value));
8061
- const mapped = FromRest13(literals, mode);
8062
- const union = Union3(mapped);
8063
- return TemplateLiteral2([union], options);
8064
- }
8065
- function FromLiteralValue2(value, mode) {
8066
- return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize2(value) : mode === "Capitalize" ? ApplyCapitalize2(value) : mode === "Uppercase" ? ApplyUppercase2(value) : mode === "Lowercase" ? ApplyLowercase2(value) : value : value.toString();
8067
- }
8068
- function FromRest13(T, M) {
8069
- return T.map((L) => Intrinsic2(L, M));
8070
- }
8071
- function Intrinsic2(schema, mode, options = {}) {
8072
- return IsMappedKey3(schema) ? IntrinsicFromMappedKey2(schema, mode, options) : IsTemplateLiteral3(schema) ? FromTemplateLiteral10(schema, mode, options) : IsUnion3(schema) ? Union3(FromRest13(schema.anyOf, mode), options) : IsLiteral3(schema) ? Literal2(FromLiteralValue2(schema.const, mode), options) : CreateType2(schema, options);
8073
- }
8074
-
8075
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
8076
- function Capitalize2(T, options = {}) {
8077
- return Intrinsic2(T, "Capitalize", options);
8078
- }
8079
-
8080
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
8081
- function Lowercase2(T, options = {}) {
8082
- return Intrinsic2(T, "Lowercase", options);
8083
- }
8084
-
8085
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
8086
- function Uncapitalize2(T, options = {}) {
8087
- return Intrinsic2(T, "Uncapitalize", options);
8088
- }
8089
-
8090
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
8091
- function Uppercase2(T, options = {}) {
8092
- return Intrinsic2(T, "Uppercase", options);
8093
- }
8094
-
8095
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
8096
- function FromProperties32(properties, propertyKeys, options) {
8097
- const result = {};
8098
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
8099
- result[K2] = Omit2(properties[K2], propertyKeys, Clone3(options));
8100
- return result;
8101
- }
8102
- function FromMappedResult22(mappedResult, propertyKeys, options) {
8103
- return FromProperties32(mappedResult.properties, propertyKeys, options);
8104
- }
8105
- function OmitFromMappedResult2(mappedResult, propertyKeys, options) {
8106
- const properties = FromMappedResult22(mappedResult, propertyKeys, options);
8107
- return MappedResult2(properties);
8108
- }
8109
-
8110
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
8111
- function FromIntersect25(types, propertyKeys) {
8112
- return types.map((type) => OmitResolve2(type, propertyKeys));
8113
- }
8114
- function FromUnion29(types, propertyKeys) {
8115
- return types.map((type) => OmitResolve2(type, propertyKeys));
8116
- }
8117
- function FromProperty7(properties, key) {
8118
- const { [key]: _, ...R } = properties;
8119
- return R;
8120
- }
8121
- function FromProperties33(properties, propertyKeys) {
8122
- return propertyKeys.reduce((T, K2) => FromProperty7(T, K2), properties);
8123
- }
8124
- function FromObject22(properties, propertyKeys) {
8125
- const options = Discard2(properties, [TransformKind2, "$id", "required", "properties"]);
8126
- const omittedProperties = FromProperties33(properties["properties"], propertyKeys);
8127
- return Object3(omittedProperties, options);
8128
- }
8129
- function UnionFromPropertyKeys3(propertyKeys) {
8130
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue3(key) ? [...result2, Literal2(key)] : result2, []);
8131
- return Union3(result);
8132
- }
8133
- function OmitResolve2(properties, propertyKeys) {
8134
- return IsIntersect3(properties) ? Intersect3(FromIntersect25(properties.allOf, propertyKeys)) : IsUnion3(properties) ? Union3(FromUnion29(properties.anyOf, propertyKeys)) : IsObject8(properties) ? FromObject22(properties, propertyKeys) : Object3({});
8135
- }
8136
- function Omit2(type, key, options) {
8137
- const typeKey = IsArray5(key) ? UnionFromPropertyKeys3(key) : key;
8138
- const propertyKeys = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
8139
- const isTypeRef = IsRef3(type);
8140
- const isKeyRef = IsRef3(key);
8141
- return IsMappedResult3(type) ? OmitFromMappedResult2(type, propertyKeys, options) : IsMappedKey3(key) ? OmitFromMappedKey2(type, key, options) : isTypeRef && isKeyRef ? Computed2("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed2("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed2("Omit", [type, typeKey], options) : CreateType2({ ...OmitResolve2(type, propertyKeys), ...options });
8142
- }
8143
-
8144
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
8145
- function FromPropertyKey6(type, key, options) {
8146
- return { [key]: Omit2(type, [key], Clone3(options)) };
8147
- }
8148
- function FromPropertyKeys6(type, propertyKeys, options) {
8149
- return propertyKeys.reduce((Acc, LK) => {
8150
- return { ...Acc, ...FromPropertyKey6(type, LK, options) };
8151
- }, {});
8152
- }
8153
- function FromMappedKey8(type, mappedKey, options) {
8154
- return FromPropertyKeys6(type, mappedKey.keys, options);
8155
- }
8156
- function OmitFromMappedKey2(type, mappedKey, options) {
8157
- const properties = FromMappedKey8(type, mappedKey, options);
8158
- return MappedResult2(properties);
8159
- }
8160
-
8161
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
8162
- function FromProperties34(properties, propertyKeys, options) {
8163
- const result = {};
8164
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
8165
- result[K2] = Pick2(properties[K2], propertyKeys, Clone3(options));
8166
- return result;
8167
- }
8168
- function FromMappedResult23(mappedResult, propertyKeys, options) {
8169
- return FromProperties34(mappedResult.properties, propertyKeys, options);
8170
- }
8171
- function PickFromMappedResult2(mappedResult, propertyKeys, options) {
8172
- const properties = FromMappedResult23(mappedResult, propertyKeys, options);
8173
- return MappedResult2(properties);
8174
- }
8175
-
8176
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
8177
- function FromIntersect26(types, propertyKeys) {
8178
- return types.map((type) => PickResolve2(type, propertyKeys));
8179
- }
8180
- function FromUnion30(types, propertyKeys) {
8181
- return types.map((type) => PickResolve2(type, propertyKeys));
8182
- }
8183
- function FromProperties35(properties, propertyKeys) {
8184
- const result = {};
8185
- for (const K2 of propertyKeys)
8186
- if (K2 in properties)
8187
- result[K2] = properties[K2];
8188
- return result;
8189
- }
8190
- function FromObject23(T, K) {
8191
- const options = Discard2(T, [TransformKind2, "$id", "required", "properties"]);
8192
- const properties = FromProperties35(T["properties"], K);
8193
- return Object3(properties, options);
8194
- }
8195
- function UnionFromPropertyKeys5(propertyKeys) {
8196
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue3(key) ? [...result2, Literal2(key)] : result2, []);
8197
- return Union3(result);
8198
- }
8199
- function PickResolve2(properties, propertyKeys) {
8200
- return IsIntersect3(properties) ? Intersect3(FromIntersect26(properties.allOf, propertyKeys)) : IsUnion3(properties) ? Union3(FromUnion30(properties.anyOf, propertyKeys)) : IsObject8(properties) ? FromObject23(properties, propertyKeys) : Object3({});
8201
- }
8202
- function Pick2(type, key, options) {
8203
- const typeKey = IsArray5(key) ? UnionFromPropertyKeys5(key) : key;
8204
- const propertyKeys = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
8205
- const isTypeRef = IsRef3(type);
8206
- const isKeyRef = IsRef3(key);
8207
- return IsMappedResult3(type) ? PickFromMappedResult2(type, propertyKeys, options) : IsMappedKey3(key) ? PickFromMappedKey2(type, key, options) : isTypeRef && isKeyRef ? Computed2("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed2("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed2("Pick", [type, typeKey], options) : CreateType2({ ...PickResolve2(type, propertyKeys), ...options });
8208
- }
8209
-
8210
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
8211
- function FromPropertyKey7(type, key, options) {
8212
- return {
8213
- [key]: Pick2(type, [key], Clone3(options))
8214
- };
8215
- }
8216
- function FromPropertyKeys7(type, propertyKeys, options) {
8217
- return propertyKeys.reduce((result, leftKey) => {
8218
- return { ...result, ...FromPropertyKey7(type, leftKey, options) };
8219
- }, {});
8220
- }
8221
- function FromMappedKey9(type, mappedKey, options) {
8222
- return FromPropertyKeys7(type, mappedKey.keys, options);
8223
- }
8224
- function PickFromMappedKey2(type, mappedKey, options) {
8225
- const properties = FromMappedKey9(type, mappedKey, options);
8226
- return MappedResult2(properties);
8227
- }
8228
-
8229
- // node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
8230
- function FromComputed9(target, parameters) {
8231
- return Computed2("Partial", [Computed2(target, parameters)]);
8232
- }
8233
- function FromRef18($ref) {
8234
- return Computed2("Partial", [Ref2($ref)]);
8235
- }
8236
- function FromProperties36(properties) {
8237
- const partialProperties = {};
8238
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
8239
- partialProperties[K] = Optional2(properties[K]);
8240
- return partialProperties;
8241
- }
8242
- function FromObject24(type) {
8243
- const options = Discard2(type, [TransformKind2, "$id", "required", "properties"]);
8244
- const properties = FromProperties36(type["properties"]);
8245
- return Object3(properties, options);
8246
- }
8247
- function FromRest14(types) {
8248
- return types.map((type) => PartialResolve2(type));
8249
- }
8250
- function PartialResolve2(type) {
8251
- return IsComputed3(type) ? FromComputed9(type.target, type.parameters) : IsRef3(type) ? FromRef18(type.$ref) : IsIntersect3(type) ? Intersect3(FromRest14(type.allOf)) : IsUnion3(type) ? Union3(FromRest14(type.anyOf)) : IsObject8(type) ? FromObject24(type) : IsBigInt7(type) ? type : IsBoolean7(type) ? type : IsInteger4(type) ? type : IsLiteral3(type) ? type : IsNull7(type) ? type : IsNumber8(type) ? type : IsString7(type) ? type : IsSymbol7(type) ? type : IsUndefined8(type) ? type : Object3({});
8252
- }
8253
- function Partial2(type, options) {
8254
- if (IsMappedResult3(type)) {
8255
- return PartialFromMappedResult2(type, options);
8256
- } else {
8257
- return CreateType2({ ...PartialResolve2(type), ...options });
8258
- }
8259
- }
8260
-
8261
- // node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
8262
- function FromProperties37(K, options) {
8263
- const Acc = {};
8264
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
8265
- Acc[K2] = Partial2(K[K2], Clone3(options));
8266
- return Acc;
8267
- }
8268
- function FromMappedResult24(R, options) {
8269
- return FromProperties37(R.properties, options);
8270
- }
8271
- function PartialFromMappedResult2(R, options) {
8272
- const P = FromMappedResult24(R, options);
8273
- return MappedResult2(P);
8274
- }
8275
-
8276
- // node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
8277
- function FromComputed10(target, parameters) {
8278
- return Computed2("Required", [Computed2(target, parameters)]);
8279
- }
8280
- function FromRef19($ref) {
8281
- return Computed2("Required", [Ref2($ref)]);
8282
- }
8283
- function FromProperties38(properties) {
8284
- const requiredProperties = {};
8285
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
8286
- requiredProperties[K] = Discard2(properties[K], [OptionalKind2]);
8287
- return requiredProperties;
8288
- }
8289
- function FromObject25(type) {
8290
- const options = Discard2(type, [TransformKind2, "$id", "required", "properties"]);
8291
- const properties = FromProperties38(type["properties"]);
8292
- return Object3(properties, options);
8293
- }
8294
- function FromRest15(types) {
8295
- return types.map((type) => RequiredResolve2(type));
8296
- }
8297
- function RequiredResolve2(type) {
8298
- return IsComputed3(type) ? FromComputed10(type.target, type.parameters) : IsRef3(type) ? FromRef19(type.$ref) : IsIntersect3(type) ? Intersect3(FromRest15(type.allOf)) : IsUnion3(type) ? Union3(FromRest15(type.anyOf)) : IsObject8(type) ? FromObject25(type) : IsBigInt7(type) ? type : IsBoolean7(type) ? type : IsInteger4(type) ? type : IsLiteral3(type) ? type : IsNull7(type) ? type : IsNumber8(type) ? type : IsString7(type) ? type : IsSymbol7(type) ? type : IsUndefined8(type) ? type : Object3({});
8299
- }
8300
- function Required2(type, options) {
8301
- if (IsMappedResult3(type)) {
8302
- return RequiredFromMappedResult2(type, options);
8303
- } else {
8304
- return CreateType2({ ...RequiredResolve2(type), ...options });
8305
- }
8306
- }
8307
-
8308
- // node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
8309
- function FromProperties39(P, options) {
8310
- const Acc = {};
8311
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
8312
- Acc[K2] = Required2(P[K2], options);
8313
- return Acc;
8314
- }
8315
- function FromMappedResult25(R, options) {
8316
- return FromProperties39(R.properties, options);
8317
- }
8318
- function RequiredFromMappedResult2(R, options) {
8319
- const P = FromMappedResult25(R, options);
8320
- return MappedResult2(P);
8321
- }
8322
-
8323
- // node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
8324
- function DereferenceParameters2(moduleProperties, types) {
8325
- return types.map((type) => {
8326
- return IsRef3(type) ? Dereference2(moduleProperties, type.$ref) : FromType5(moduleProperties, type);
8327
- });
8328
- }
8329
- function Dereference2(moduleProperties, ref) {
8330
- return ref in moduleProperties ? IsRef3(moduleProperties[ref]) ? Dereference2(moduleProperties, moduleProperties[ref].$ref) : FromType5(moduleProperties, moduleProperties[ref]) : Never2();
8331
- }
8332
- function FromAwaited2(parameters) {
8333
- return Awaited2(parameters[0]);
8334
- }
8335
- function FromIndex2(parameters) {
8336
- return Index2(parameters[0], parameters[1]);
8337
- }
8338
- function FromKeyOf2(parameters) {
8339
- return KeyOf2(parameters[0]);
8340
- }
8341
- function FromPartial2(parameters) {
8342
- return Partial2(parameters[0]);
8343
- }
8344
- function FromOmit2(parameters) {
8345
- return Omit2(parameters[0], parameters[1]);
8346
- }
8347
- function FromPick2(parameters) {
8348
- return Pick2(parameters[0], parameters[1]);
8349
- }
8350
- function FromRequired2(parameters) {
8351
- return Required2(parameters[0]);
8352
- }
8353
- function FromComputed11(moduleProperties, target, parameters) {
8354
- const dereferenced = DereferenceParameters2(moduleProperties, parameters);
8355
- return target === "Awaited" ? FromAwaited2(dereferenced) : target === "Index" ? FromIndex2(dereferenced) : target === "KeyOf" ? FromKeyOf2(dereferenced) : target === "Partial" ? FromPartial2(dereferenced) : target === "Omit" ? FromOmit2(dereferenced) : target === "Pick" ? FromPick2(dereferenced) : target === "Required" ? FromRequired2(dereferenced) : Never2();
8356
- }
8357
- function FromArray24(moduleProperties, type) {
8358
- return Array3(FromType5(moduleProperties, type));
8359
- }
8360
- function FromAsyncIterator11(moduleProperties, type) {
8361
- return AsyncIterator2(FromType5(moduleProperties, type));
8362
- }
8363
- function FromConstructor12(moduleProperties, parameters, instanceType) {
8364
- return Constructor2(FromTypes5(moduleProperties, parameters), FromType5(moduleProperties, instanceType));
8365
- }
8366
- function FromFunction11(moduleProperties, parameters, returnType) {
8367
- return Function2(FromTypes5(moduleProperties, parameters), FromType5(moduleProperties, returnType));
8368
- }
8369
- function FromIntersect27(moduleProperties, types) {
8370
- return Intersect3(FromTypes5(moduleProperties, types));
8371
- }
8372
- function FromIterator11(moduleProperties, type) {
8373
- return Iterator2(FromType5(moduleProperties, type));
8374
- }
8375
- function FromObject26(moduleProperties, properties) {
8376
- return Object3(globalThis.Object.keys(properties).reduce((result, key) => {
8377
- return { ...result, [key]: FromType5(moduleProperties, properties[key]) };
8378
- }, {}));
8379
- }
8380
- function FromRecord17(moduleProperties, type) {
8381
- const [value, pattern] = [FromType5(moduleProperties, RecordValue5(type)), RecordPattern2(type)];
8382
- const result = CloneType2(type);
8383
- result.patternProperties[pattern] = value;
8384
- return result;
8385
- }
8386
- function FromTransform2(moduleProperties, transform) {
8387
- return IsRef3(transform) ? { ...Dereference2(moduleProperties, transform.$ref), [TransformKind2]: transform[TransformKind2] } : transform;
8388
- }
8389
- function FromTuple21(moduleProperties, types) {
8390
- return Tuple2(FromTypes5(moduleProperties, types));
8391
- }
8392
- function FromUnion31(moduleProperties, types) {
8393
- return Union3(FromTypes5(moduleProperties, types));
8394
- }
8395
- function FromTypes5(moduleProperties, types) {
8396
- return types.map((type) => FromType5(moduleProperties, type));
8397
- }
8398
- function FromType5(moduleProperties, type) {
8399
- return IsOptional3(type) ? CreateType2(FromType5(moduleProperties, Discard2(type, [OptionalKind2])), type) : IsReadonly3(type) ? CreateType2(FromType5(moduleProperties, Discard2(type, [ReadonlyKind2])), type) : IsTransform3(type) ? CreateType2(FromTransform2(moduleProperties, type), type) : IsArray8(type) ? CreateType2(FromArray24(moduleProperties, type.items), type) : IsAsyncIterator7(type) ? CreateType2(FromAsyncIterator11(moduleProperties, type.items), type) : IsComputed3(type) ? CreateType2(FromComputed11(moduleProperties, type.target, type.parameters)) : IsConstructor3(type) ? CreateType2(FromConstructor12(moduleProperties, type.parameters, type.returns), type) : IsFunction7(type) ? CreateType2(FromFunction11(moduleProperties, type.parameters, type.returns), type) : IsIntersect3(type) ? CreateType2(FromIntersect27(moduleProperties, type.allOf), type) : IsIterator7(type) ? CreateType2(FromIterator11(moduleProperties, type.items), type) : IsObject8(type) ? CreateType2(FromObject26(moduleProperties, type.properties), type) : IsRecord3(type) ? CreateType2(FromRecord17(moduleProperties, type)) : IsTuple3(type) ? CreateType2(FromTuple21(moduleProperties, type.items || []), type) : IsUnion3(type) ? CreateType2(FromUnion31(moduleProperties, type.anyOf), type) : type;
8400
- }
8401
- function ComputeType2(moduleProperties, key) {
8402
- return key in moduleProperties ? FromType5(moduleProperties, moduleProperties[key]) : Never2();
8403
- }
8404
- function ComputeModuleProperties2(moduleProperties) {
8405
- return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
8406
- return { ...result, [key]: ComputeType2(moduleProperties, key) };
8407
- }, {});
8408
- }
8409
-
8410
- // node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
8411
- class TModule2 {
8412
- constructor($defs) {
8413
- const computed = ComputeModuleProperties2($defs);
8414
- const identified = this.WithIdentifiers(computed);
8415
- this.$defs = identified;
8416
- }
8417
- Import(key, options) {
8418
- const $defs = { ...this.$defs, [key]: CreateType2(this.$defs[key], options) };
8419
- return CreateType2({ [Kind2]: "Import", $defs, $ref: key });
8420
- }
8421
- WithIdentifiers($defs) {
8422
- return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
8423
- return { ...result, [key]: { ...$defs[key], $id: key } };
8424
- }, {});
8425
- }
8426
- }
8427
- function Module2(properties) {
8428
- return new TModule2(properties);
8429
- }
8430
-
8431
- // node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
8432
- function Not3(type, options) {
8433
- return CreateType2({ [Kind2]: "Not", not: type }, options);
8434
- }
8435
-
8436
- // node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
8437
- function Parameters2(schema, options) {
8438
- return IsFunction7(schema) ? Tuple2(schema.parameters, options) : Never2();
8439
- }
8440
-
8441
- // node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
8442
- var Ordinal2 = 0;
8443
- function Recursive2(callback, options = {}) {
8444
- if (IsUndefined5(options.$id))
8445
- options.$id = `T${Ordinal2++}`;
8446
- const thisType = CloneType2(callback({ [Kind2]: "This", $ref: `${options.$id}` }));
8447
- thisType.$id = options.$id;
8448
- return CreateType2({ [Hint2]: "Recursive", ...thisType }, options);
8449
- }
8450
-
8451
- // node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
8452
- function RegExp3(unresolved, options) {
8453
- const expr = IsString5(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
8454
- return CreateType2({ [Kind2]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
8455
- }
8456
-
8457
- // node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
8458
- function RestResolve2(T) {
8459
- return IsIntersect3(T) ? T.allOf : IsUnion3(T) ? T.anyOf : IsTuple3(T) ? T.items ?? [] : [];
8460
- }
8461
- function Rest2(T) {
8462
- return RestResolve2(T);
8463
- }
8464
-
8465
- // node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
8466
- function ReturnType2(schema, options) {
8467
- return IsFunction7(schema) ? CreateType2(schema.returns, options) : Never2(options);
8468
- }
8469
-
8470
- // node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
8471
- class TransformDecodeBuilder2 {
8472
- constructor(schema) {
8473
- this.schema = schema;
8474
- }
8475
- Decode(decode) {
8476
- return new TransformEncodeBuilder2(this.schema, decode);
8477
- }
8478
- }
8479
-
8480
- class TransformEncodeBuilder2 {
8481
- constructor(schema, decode) {
8482
- this.schema = schema;
8483
- this.decode = decode;
8484
- }
8485
- EncodeTransform(encode, schema) {
8486
- const Encode2 = (value) => schema[TransformKind2].Encode(encode(value));
8487
- const Decode2 = (value) => this.decode(schema[TransformKind2].Decode(value));
8488
- const Codec = { Encode: Encode2, Decode: Decode2 };
8489
- return { ...schema, [TransformKind2]: Codec };
8490
- }
8491
- EncodeSchema(encode, schema) {
8492
- const Codec = { Decode: this.decode, Encode: encode };
8493
- return { ...schema, [TransformKind2]: Codec };
8494
- }
8495
- Encode(encode) {
8496
- return IsTransform3(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
8497
- }
8498
- }
8499
- function Transform2(schema) {
8500
- return new TransformDecodeBuilder2(schema);
8501
- }
8502
-
8503
- // node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
8504
- function Unsafe2(options = {}) {
8505
- return CreateType2({ [Kind2]: options[Kind2] ?? "Unsafe" }, options);
8506
- }
8507
-
8508
- // node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
8509
- function Void2(options) {
8510
- return CreateType2({ [Kind2]: "Void", type: "void" }, options);
8511
- }
8512
-
8513
- // node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
8514
- var exports_type6 = {};
8515
- __export(exports_type6, {
8516
- Void: () => Void2,
8517
- Uppercase: () => Uppercase2,
8518
- Unsafe: () => Unsafe2,
8519
- Unknown: () => Unknown2,
8520
- Union: () => Union3,
8521
- Undefined: () => Undefined2,
8522
- Uncapitalize: () => Uncapitalize2,
8523
- Uint8Array: () => Uint8Array3,
8524
- Tuple: () => Tuple2,
8525
- Transform: () => Transform2,
8526
- TemplateLiteral: () => TemplateLiteral2,
8527
- Symbol: () => Symbol3,
8528
- String: () => String3,
8529
- ReturnType: () => ReturnType2,
8530
- Rest: () => Rest2,
8531
- Required: () => Required2,
8532
- RegExp: () => RegExp3,
8533
- Ref: () => Ref2,
8534
- Recursive: () => Recursive2,
8535
- Record: () => Record2,
8536
- ReadonlyOptional: () => ReadonlyOptional2,
8537
- Readonly: () => Readonly2,
8538
- Promise: () => Promise3,
8539
- Pick: () => Pick2,
8540
- Partial: () => Partial2,
8541
- Parameters: () => Parameters2,
8542
- Optional: () => Optional2,
8543
- Omit: () => Omit2,
8544
- Object: () => Object3,
8545
- Number: () => Number3,
8546
- Null: () => Null2,
8547
- Not: () => Not3,
8548
- Never: () => Never2,
8549
- Module: () => Module2,
8550
- Mapped: () => Mapped2,
8551
- Lowercase: () => Lowercase2,
8552
- Literal: () => Literal2,
8553
- KeyOf: () => KeyOf2,
8554
- Iterator: () => Iterator2,
8555
- Intersect: () => Intersect3,
8556
- Integer: () => Integer2,
8557
- Instantiate: () => Instantiate2,
8558
- InstanceType: () => InstanceType2,
8559
- Index: () => Index2,
8560
- Function: () => Function2,
8561
- Extract: () => Extract2,
8562
- Extends: () => Extends2,
8563
- Exclude: () => Exclude2,
8564
- Enum: () => Enum2,
8565
- Date: () => Date3,
8566
- ConstructorParameters: () => ConstructorParameters2,
8567
- Constructor: () => Constructor2,
8568
- Const: () => Const2,
8569
- Composite: () => Composite2,
8570
- Capitalize: () => Capitalize2,
8571
- Boolean: () => Boolean2,
8572
- BigInt: () => BigInt3,
8573
- Awaited: () => Awaited2,
8574
- AsyncIterator: () => AsyncIterator2,
8575
- Array: () => Array3,
8576
- Argument: () => Argument2,
8577
- Any: () => Any2
8578
- });
8579
-
8580
- // node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
8581
- var Type2 = exports_type6;
8582
-
8583
6249
  // src/manifest.ts
8584
6250
  var tool = toolFactory();
8585
6251
  var COMMON_PROVIDERS = [
@@ -8623,26 +6289,26 @@ var providerEnv = COMMON_PROVIDERS.flatMap((provider) => {
8623
6289
  }
8624
6290
  ];
8625
6291
  });
8626
- var settings = Type2.Object({
8627
- cleanupIntervalMs: Type2.Optional(Type2.Number({
6292
+ var settings = Type.Object({
6293
+ cleanupIntervalMs: Type.Optional(Type.Number({
8628
6294
  description: "How often expired sessions are swept, in milliseconds.",
8629
6295
  minimum: 1000,
8630
6296
  title: "Session cleanup interval",
8631
6297
  "x-group": "advanced"
8632
6298
  })),
8633
- cookieSecure: Type2.Optional(Type2.Boolean({
6299
+ cookieSecure: Type.Optional(Type.Boolean({
8634
6300
  description: "Only send the sign-in cookie over HTTPS. Leave off in local development.",
8635
6301
  title: "HTTPS-only cookies",
8636
6302
  "x-group": "advanced"
8637
6303
  })),
8638
- maxSessions: Type2.Optional(Type2.Integer({
6304
+ maxSessions: Type.Optional(Type.Integer({
8639
6305
  description: "How many devices someone can stay signed in on at once.",
8640
6306
  minimum: 1,
8641
6307
  title: "Signed-in devices per person",
8642
6308
  "x-group": "sessions"
8643
6309
  })),
8644
- providersConfiguration: Type2.Optional(Type2.Record(Type2.String(), Type2.Object({
8645
- scope: Type2.Optional(Type2.Array(Type2.String(), {
6310
+ providersConfiguration: Type.Optional(Type.Record(Type.String(), Type.Object({
6311
+ scope: Type.Optional(Type.Array(Type.String(), {
8646
6312
  description: "Extra permissions to request from the provider.",
8647
6313
  title: "Permissions"
8648
6314
  }))
@@ -8651,7 +6317,7 @@ var settings = Type2.Object({
8651
6317
  title: "Sign-in providers",
8652
6318
  "x-group": "providers"
8653
6319
  })),
8654
- sessionDurationMs: Type2.Optional(Type2.Number({
6320
+ sessionDurationMs: Type.Optional(Type.Number({
8655
6321
  description: "How long someone stays signed in, in milliseconds. Default is 7 days.",
8656
6322
  minimum: 60000,
8657
6323
  title: "Stay signed in for",
@@ -8702,11 +6368,14 @@ var manifest = defineManifest()({
8702
6368
  },
8703
6369
  title: "Your Postgres database (recommended)",
8704
6370
  wiring: {
8705
- code: 'createNeonAuthSessionStore(${env.DATABASE_URL} ?? "")',
6371
+ code: 'createNeonAuthSessionStore(${env.DATABASE_URL} ?? "", decodeSessionUserRecord)',
8706
6372
  imports: [
8707
6373
  {
8708
6374
  from: "@absolutejs/auth",
8709
- names: ["createNeonAuthSessionStore"]
6375
+ names: [
6376
+ "createNeonAuthSessionStore",
6377
+ "decodeSessionUserRecord"
6378
+ ]
8710
6379
  }
8711
6380
  ]
8712
6381
  }
@@ -8793,7 +6462,7 @@ var manifest = defineManifest()({
8793
6462
  },
8794
6463
  capabilities: ["read", "glob"],
8795
6464
  description: "List which sign-in providers this project has configured, and which are missing credentials.",
8796
- input: Type2.Object({}),
6465
+ input: Type.Object({}),
8797
6466
  handler: async (_input, workspace) => {
8798
6467
  const files = await workspace.glob?.("**/auth.config.ts") ?? [];
8799
6468
  const [file] = files;
@@ -8840,5 +6509,5 @@ export {
8840
6509
  manifest
8841
6510
  };
8842
6511
 
8843
- //# debugId=50377C17887E5CEE64756E2164756E21
6512
+ //# debugId=47F3EB8A589F413264756E2164756E21
8844
6513
  //# sourceMappingURL=manifest.js.map