@supacloud/compiler 0.51.0 → 0.51.2

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.
@@ -2727,8 +2727,15 @@ function IsIEEE754(value) {
2727
2727
  return typeof value === "number";
2728
2728
  }
2729
2729
  function FNV1A64_OP(byte) {
2730
- Accumulator = Accumulator ^ Bytes[byte];
2731
- Accumulator = Accumulator * Prime % Size;
2730
+ const L0 = A0 ^ byte;
2731
+ const T0 = L0 * 435;
2732
+ const T1 = A1 * 435 + (T0 >>> 16);
2733
+ const T2 = A2 * 435 + (T1 >>> 16) + (L0 << 8);
2734
+ const T3 = A3 * 435 + (T2 >>> 16) + (A1 << 8);
2735
+ A0 = T0 & 65535;
2736
+ A1 = T1 & 65535;
2737
+ A2 = T2 & 65535;
2738
+ A3 = T3 & 65535;
2732
2739
  }
2733
2740
  function FromArray(value) {
2734
2741
  FNV1A64_OP(ByteMarker.Array);
@@ -2782,8 +2789,15 @@ function FromRegExp(value) {
2782
2789
  }
2783
2790
  function FromString(value) {
2784
2791
  FNV1A64_OP(ByteMarker.String);
2785
- for (const byte of encoder.encode(value)) {
2786
- FNV1A64_OP(byte);
2792
+ for (let i = 0;i < value.length; i++) {
2793
+ const code = value.charCodeAt(i);
2794
+ if (code > 127) {
2795
+ for (const byte of encoder.encode(value.slice(i))) {
2796
+ FNV1A64_OP(byte);
2797
+ }
2798
+ return;
2799
+ }
2800
+ FNV1A64_OP(code);
2787
2801
  }
2788
2802
  }
2789
2803
  function FromSymbol(value) {
@@ -2803,15 +2817,15 @@ function FromUndefined(_value) {
2803
2817
  function FromValue(value) {
2804
2818
  return IsTypeArray(value) ? FromTypeArray(value) : IsDate(value) ? FromDate(value) : IsRegExp(value) ? FromRegExp(value) : IsBoolean2(value) ? FromBoolean(value.valueOf()) : IsString2(value) ? FromString(value.valueOf()) : IsNumber2(value) ? FromNumber(value.valueOf()) : IsIEEE754(value) ? FromNumber(value) : IsArray(value) ? FromArray(value) : IsBoolean(value) ? FromBoolean(value) : IsBigInt(value) ? FromBigInt(value) : IsConstructor(value) ? FromConstructor(value) : IsNull(value) ? FromNull(value) : IsObject(value) ? FromObject(value) : IsString(value) ? FromString(value) : IsSymbol(value) ? FromSymbol(value) : IsUndefined(value) ? FromUndefined(value) : IsFunction(value) ? FromFunction(value) : Unreachable();
2805
2819
  }
2806
- function HashCode(value) {
2807
- Accumulator = BigInt("14695981039346656037");
2808
- FromValue(value);
2809
- return Accumulator;
2820
+ function Hex(limb) {
2821
+ return limb.toString(16).padStart(4, "0");
2810
2822
  }
2811
2823
  function Hash(value) {
2812
- return HashCode(value).toString(16).padStart(16, "0");
2824
+ A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210;
2825
+ FromValue(value);
2826
+ return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;
2813
2827
  }
2814
- var ByteMarker, Accumulator, Prime, Size, Bytes, F64, F64In, F64Out, encoder;
2828
+ var ByteMarker, A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210, F64, F64In, F64Out, encoder;
2815
2829
  var init_hash = __esm(() => {
2816
2830
  init_unreachable();
2817
2831
  init_guard2();
@@ -2831,9 +2845,6 @@ var init_hash = __esm(() => {
2831
2845
  TypeArray: 12,
2832
2846
  Undefined: 13
2833
2847
  };
2834
- Accumulator = BigInt("14695981039346656037");
2835
- [Prime, Size] = [BigInt("1099511628211"), BigInt("18446744073709551616")];
2836
- Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
2837
2848
  F64 = new Float64Array(1);
2838
2849
  F64In = new DataView(F64.buffer);
2839
2850
  F64Out = new Uint8Array(F64.buffer);
@@ -3120,90 +3131,72 @@ var init_metrics = __esm(() => {
3120
3131
  };
3121
3132
  });
3122
3133
 
3123
- // node_modules/typebox/build/system/memory/freeze.mjs
3124
- function Freeze(value) {
3125
- return Get().immutableTypes ? Object.freeze(value) : value;
3134
+ // node_modules/typebox/build/system/memory/keys.mjs
3135
+ function Keys2(value) {
3136
+ return [...Keys(value), ...Symbols(value)];
3137
+ }
3138
+ var init_keys = __esm(() => {
3139
+ init_guard2();
3140
+ });
3141
+
3142
+ // node_modules/typebox/build/system/memory/finalize.mjs
3143
+ function Freeze(value, seen) {
3144
+ if (seen.has(value))
3145
+ return;
3146
+ seen.add(value);
3147
+ for (const key of Keys2(value)) {
3148
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
3149
+ if (!descriptor || !("value" in descriptor))
3150
+ continue;
3151
+ if (IsObject(descriptor.value))
3152
+ Freeze(descriptor.value, seen);
3153
+ }
3154
+ Object.freeze(value);
3155
+ }
3156
+ function Finalize(value) {
3157
+ if (!Get().immutableTypes)
3158
+ return value;
3159
+ Freeze(value, new WeakSet);
3160
+ return value;
3126
3161
  }
3127
- var init_freeze = __esm(() => {
3162
+ var init_finalize = __esm(() => {
3163
+ init_guard2();
3128
3164
  init_settings2();
3165
+ init_keys();
3129
3166
  });
3130
3167
 
3131
3168
  // node_modules/typebox/build/system/memory/assign.mjs
3132
3169
  function Assign(left, right) {
3133
3170
  Metrics.assign += 1;
3134
- return Freeze({ ...left, ...right });
3171
+ const result = {}, rightKeys = Keys2(right), leftKeys = Keys2(left);
3172
+ for (const key of leftKeys) {
3173
+ if (rightKeys.includes(key))
3174
+ continue;
3175
+ Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
3176
+ }
3177
+ for (const key of rightKeys) {
3178
+ Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
3179
+ }
3180
+ return Finalize(result);
3135
3181
  }
3136
3182
  var init_assign = __esm(() => {
3137
3183
  init_metrics();
3138
- init_freeze();
3184
+ init_finalize();
3185
+ init_keys();
3139
3186
  });
3140
3187
 
3141
3188
  // node_modules/typebox/build/system/memory/clone.mjs
3142
- function FromClassInstance(value) {
3143
- return value;
3144
- }
3145
- function IsSchemaObject2(value) {
3146
- return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
3147
- }
3148
- function FromSchemaObject(value) {
3149
- const result = {};
3150
- for (const key of Keys(value)) {
3151
- if (IsUnsafePropertyKey(key))
3152
- continue;
3153
- const descriptor = Object.getOwnPropertyDescriptor(value, key);
3154
- descriptor.value = FromValue2(descriptor.value);
3155
- if (IsEqual(descriptor.enumerable, true)) {
3156
- result[key] = descriptor.value;
3157
- } else {
3158
- Object.defineProperty(result, key, descriptor);
3159
- }
3160
- }
3161
- return result;
3162
- }
3163
- function FromPlainObject(value) {
3164
- const result = {};
3165
- for (const key of Keys(value)) {
3166
- if (IsUnsafePropertyKey(key))
3167
- continue;
3168
- result[key] = FromValue2(value[key]);
3169
- }
3170
- for (const key of Symbols(value)) {
3171
- result[key] = FromValue2(value[key]);
3172
- }
3173
- return result;
3174
- }
3175
- function FromObject2(value) {
3176
- return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject2(value) ? FromSchemaObject(value) : FromPlainObject(value);
3177
- }
3178
- function FromArray2(value) {
3179
- return value.map((element) => FromValue2(element));
3180
- }
3181
- function FromTypedArray(value) {
3182
- return value.slice();
3183
- }
3184
- function FromRegExp2(value) {
3185
- return new RegExp(value.source, value.flags);
3186
- }
3187
- function FromMap(value) {
3188
- return new Map(FromValue2([...value.entries()]));
3189
- }
3190
- function FromSet(value) {
3191
- return new Set(FromValue2([...value.values()]));
3192
- }
3193
- function FromValue2(value) {
3194
- return IsTypeArray(value) ? FromTypedArray(value) : IsRegExp(value) ? FromRegExp2(value) : IsMap(value) ? FromMap(value) : IsSet(value) ? FromSet(value) : IsArray(value) ? FromArray2(value) : IsObject(value) ? FromObject2(value) : value;
3195
- }
3196
- function Clone(value) {
3197
- Metrics.clone += 1;
3198
- return FromValue2(value);
3199
- }
3200
3189
  var init_clone = __esm(() => {
3201
3190
  init_guard2();
3202
3191
  init_metrics();
3192
+ init_keys();
3203
3193
  });
3204
3194
 
3205
3195
  // node_modules/typebox/build/system/memory/create.mjs
3206
- function MergeHidden(left, right) {
3196
+ function WithEnumerable(left, right) {
3197
+ return { ...left, ...right };
3198
+ }
3199
+ function WithHidden(left, right) {
3207
3200
  for (const key of Object.keys(right)) {
3208
3201
  Object.defineProperty(left, key, {
3209
3202
  configurable: true,
@@ -3214,55 +3207,62 @@ function MergeHidden(left, right) {
3214
3207
  }
3215
3208
  return left;
3216
3209
  }
3217
- function Merge(left, right) {
3218
- return { ...left, ...right };
3219
- }
3220
3210
  function Create(hidden, enumerable, options = {}) {
3221
3211
  Metrics.create += 1;
3222
- const withOptions = Merge(enumerable, options);
3223
- const withHidden = Get().enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
3224
- return Freeze(withHidden);
3212
+ const withEnumerable = WithEnumerable(enumerable, options);
3213
+ const withHidden = Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
3214
+ return Finalize(withHidden);
3225
3215
  }
3226
3216
  var init_create = __esm(() => {
3227
3217
  init_settings2();
3228
3218
  init_metrics();
3229
- init_freeze();
3219
+ init_finalize();
3230
3220
  });
3231
3221
 
3232
3222
  // node_modules/typebox/build/system/memory/discard.mjs
3233
3223
  function Discard(value, propertyKeys) {
3234
3224
  Metrics.discard += 1;
3235
3225
  const result = {};
3236
- for (const key of Keys(value)) {
3226
+ for (const key of Keys2(value)) {
3237
3227
  if (propertyKeys.includes(key))
3238
3228
  continue;
3239
3229
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
3240
- descriptor.value = Clone(descriptor.value);
3241
3230
  Object.defineProperty(result, key, descriptor);
3242
3231
  }
3243
- return Freeze(result);
3232
+ return Finalize(result);
3244
3233
  }
3245
3234
  var init_discard = __esm(() => {
3246
- init_guard2();
3247
3235
  init_metrics();
3248
- init_freeze();
3249
- init_clone();
3236
+ init_finalize();
3237
+ init_keys();
3250
3238
  });
3251
3239
 
3252
3240
  // node_modules/typebox/build/system/memory/update.mjs
3253
- function Update(current, hidden, enumerable) {
3254
- Metrics.update += 1;
3255
- const settings = Get();
3256
- const result = Clone(current);
3257
- for (const key of Object.keys(hidden)) {
3241
+ function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
3242
+ for (const key of Keys2(current)) {
3243
+ if (IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
3244
+ continue;
3245
+ const descriptor = Object.getOwnPropertyDescriptor(current, key);
3246
+ Object.defineProperty(result, key, descriptor);
3247
+ }
3248
+ }
3249
+ function WithHidden2(hidden, keys, result) {
3250
+ const enumerableKind = Get().enumerableKind;
3251
+ for (const key of keys) {
3252
+ if (IsUnsafePropertyKey(key))
3253
+ continue;
3258
3254
  Object.defineProperty(result, key, {
3259
3255
  configurable: true,
3260
3256
  writable: true,
3261
- enumerable: settings.enumerableKind,
3257
+ enumerable: enumerableKind,
3262
3258
  value: hidden[key]
3263
3259
  });
3264
3260
  }
3265
- for (const key of Object.keys(enumerable)) {
3261
+ }
3262
+ function WithEnumerable2(enumerable, keys, result) {
3263
+ for (const key of keys) {
3264
+ if (IsUnsafePropertyKey(key))
3265
+ continue;
3266
3266
  Object.defineProperty(result, key, {
3267
3267
  configurable: true,
3268
3268
  enumerable: true,
@@ -3270,13 +3270,21 @@ function Update(current, hidden, enumerable) {
3270
3270
  value: enumerable[key]
3271
3271
  });
3272
3272
  }
3273
- return Freeze(result);
3273
+ }
3274
+ function Update(current, hidden, enumerable) {
3275
+ Metrics.update += 1;
3276
+ const result = {}, hiddenKeys = Keys2(hidden), enumerableKeys = Keys2(enumerable);
3277
+ WithCurrent(current, hiddenKeys, enumerableKeys, result);
3278
+ WithHidden2(hidden, hiddenKeys, result);
3279
+ WithEnumerable2(enumerable, enumerableKeys, result);
3280
+ return Finalize(result);
3274
3281
  }
3275
3282
  var init_update = __esm(() => {
3283
+ init_guard2();
3276
3284
  init_settings2();
3277
3285
  init_metrics();
3278
- init_freeze();
3279
- init_clone();
3286
+ init_finalize();
3287
+ init_keys();
3280
3288
  });
3281
3289
 
3282
3290
  // node_modules/typebox/build/system/memory/memory.mjs
@@ -3551,11 +3559,8 @@ var init_deferred = __esm(() => {
3551
3559
  });
3552
3560
 
3553
3561
  // node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
3554
- function AddReadonlyOperation(type) {
3555
- return Update(type, { "~readonly": true }, {});
3556
- }
3557
3562
  function AddReadonlyAction(type, options) {
3558
- const result = Update(AddReadonlyOperation(type), {}, options);
3563
+ const result = Update(type, { "~readonly": true }, options);
3559
3564
  return result;
3560
3565
  }
3561
3566
  function AddReadonlyInstantiate(context, state, type, options) {
@@ -3568,11 +3573,8 @@ var init_instantiate_add = __esm(() => {
3568
3573
  });
3569
3574
 
3570
3575
  // node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
3571
- function AddOptionalOperation(type) {
3572
- return Update(type, { "~optional": true }, {});
3573
- }
3574
3576
  function AddOptionalAction(type, options) {
3575
- const result = Update(AddOptionalOperation(type), {}, options);
3577
+ const result = Update(type, { "~optional": true }, options);
3576
3578
  return result;
3577
3579
  }
3578
3580
  function AddOptionalInstantiate(context, state, type, options) {
@@ -4185,30 +4187,20 @@ var init_tuple = __esm(() => {
4185
4187
  init_schema6();
4186
4188
  });
4187
4189
 
4188
- // node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
4189
- function RemoveReadonlyOperation(type) {
4190
- return Discard(type, ["~readonly"]);
4191
- }
4192
- function RemoveReadonlyAction(type, options) {
4193
- const result = Update(RemoveReadonlyOperation(type), {}, options);
4190
+ // node_modules/typebox/build/type/engine/tuple/to_object.mjs
4191
+ function TupleElementsToProperties(types) {
4192
+ const result = types.reduceRight((result, right, index) => {
4193
+ return { [index]: right, ...result };
4194
+ }, {});
4194
4195
  return result;
4195
4196
  }
4196
- function RemoveReadonlyInstantiate(context, state, type, options) {
4197
- const instantiatedType = InstantiateType(context, state, type);
4198
- return RemoveReadonlyAction(instantiatedType, options);
4199
- }
4200
- var init_instantiate_remove = __esm(() => {
4201
- init_memory2();
4202
- init_instantiate27();
4203
- });
4204
-
4205
- // node_modules/typebox/build/type/action/_remove_readonly.mjs
4206
- function RemoveReadonly(type, options = {}) {
4207
- return RemoveReadonlyAction(type, options);
4197
+ function TupleToObject(type) {
4198
+ const properties = TupleElementsToProperties(type.items);
4199
+ const result = _Object_(properties);
4200
+ return result;
4208
4201
  }
4209
- var init__remove_readonly = __esm(() => {
4210
- init_deferred();
4211
- init_instantiate_remove();
4202
+ var init_to_object = __esm(() => {
4203
+ init_object();
4212
4204
  });
4213
4205
 
4214
4206
  // node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
@@ -4223,55 +4215,57 @@ function RemoveOptionalInstantiate(context, state, type, options) {
4223
4215
  const instantiatedType = InstantiateType(context, state, type);
4224
4216
  return RemoveOptionalAction(instantiatedType, options);
4225
4217
  }
4226
- var init_instantiate_remove2 = __esm(() => {
4218
+ var init_instantiate_remove = __esm(() => {
4227
4219
  init_memory2();
4228
4220
  init_instantiate27();
4229
4221
  });
4230
4222
 
4231
- // node_modules/typebox/build/type/action/_remove_optional.mjs
4232
- function RemoveOptional(type, options = {}) {
4233
- return RemoveOptionalAction(type, options);
4223
+ // node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
4224
+ function RemoveReadonlyOperation(type) {
4225
+ return Discard(type, ["~readonly"]);
4234
4226
  }
4235
- var init__remove_optional = __esm(() => {
4236
- init_deferred();
4237
- init_instantiate_remove2();
4238
- });
4239
-
4240
- // node_modules/typebox/build/type/engine/tuple/to_object.mjs
4241
- function TupleElementsToProperties(types) {
4242
- const result = types.reduceRight((result, right, index) => {
4243
- return { [index]: right, ...result };
4244
- }, {});
4227
+ function RemoveReadonlyAction(type, options) {
4228
+ const result = Update(RemoveReadonlyOperation(type), {}, options);
4245
4229
  return result;
4246
4230
  }
4247
- function TupleToObject(type) {
4248
- const properties = TupleElementsToProperties(type.items);
4249
- const result = _Object_(properties);
4250
- return result;
4231
+ function RemoveReadonlyInstantiate(context, state, type, options) {
4232
+ const instantiatedType = InstantiateType(context, state, type);
4233
+ return RemoveReadonlyAction(instantiatedType, options);
4251
4234
  }
4252
- var init_to_object = __esm(() => {
4253
- init_object();
4235
+ var init_instantiate_remove2 = __esm(() => {
4236
+ init_memory2();
4237
+ init_instantiate27();
4254
4238
  });
4255
4239
 
4256
- // node_modules/typebox/build/type/engine/evaluate/composite.mjs
4257
- function CanComposite(type) {
4258
- return IsObject2(type) || IsTuple(type);
4259
- }
4260
- function IsReadonlyProperty(left, right) {
4261
- return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
4262
- }
4263
- function IsOptionalProperty(left, right) {
4264
- return IsOptional(left) ? IsOptional(right) ? true : false : false;
4265
- }
4266
- function CompositeProperty(left, right) {
4267
- const isReadonly = IsReadonlyProperty(left, right);
4268
- const isOptional = IsOptionalProperty(left, right);
4240
+ // node_modules/typebox/build/type/engine/evaluate/property.mjs
4241
+ function EvaluatePropertyIntersect(left, right) {
4242
+ const isReadonly = IsReadonly(left) && IsReadonly(right);
4243
+ const isOptional = IsOptional(left) && IsOptional(right);
4269
4244
  const evaluated = EvaluateIntersect([left, right]);
4270
- const property = RemoveReadonly(RemoveOptional(evaluated));
4271
- return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
4272
- }
4245
+ const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
4246
+ return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
4247
+ }
4248
+ function EvaluatePropertyUnion(left, right) {
4249
+ const isReadonly = IsReadonly(left) || IsReadonly(right);
4250
+ const isOptional = IsOptional(left) || IsOptional(right);
4251
+ const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
4252
+ const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
4253
+ const property = EvaluateUnion([leftProperty, rightProperty]);
4254
+ return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
4255
+ }
4256
+ var init_property = __esm(() => {
4257
+ init__optional();
4258
+ init__readonly();
4259
+ init_instantiate_add2();
4260
+ init_instantiate_add();
4261
+ init_instantiate_remove();
4262
+ init_instantiate_remove2();
4263
+ init_evaluate2();
4264
+ });
4265
+
4266
+ // node_modules/typebox/build/type/engine/evaluate/composite.mjs
4273
4267
  function CompositePropertyKey(left, right, key) {
4274
- return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
4268
+ return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
4275
4269
  }
4276
4270
  function CompositeProperties(left, right) {
4277
4271
  const keys = new Set([...Keys(left), ...Keys(right)]);
@@ -4293,17 +4287,11 @@ function Composite(left, right) {
4293
4287
  }
4294
4288
  var init_composite = __esm(() => {
4295
4289
  init_guard2();
4296
- init__readonly();
4297
- init__optional();
4298
4290
  init_object();
4299
4291
  init_never();
4300
4292
  init_tuple();
4301
- init__add_readonly();
4302
- init__add_optional();
4303
- init__remove_readonly();
4304
- init__remove_optional();
4305
4293
  init_to_object();
4306
- init_evaluate2();
4294
+ init_property();
4307
4295
  });
4308
4296
 
4309
4297
  // node_modules/typebox/build/type/engine/evaluate/narrow.mjs
@@ -4311,6 +4299,9 @@ function NarrowCompareRule(left, right) {
4311
4299
  const result = Compare(left, right);
4312
4300
  return IsEqual(result, CompareResultLeftInside) ? left : IsEqual(result, CompareResultRightInside) ? right : IsEqual(result, CompareResultEqual) ? right : Never();
4313
4301
  }
4302
+ function CanComposite(type) {
4303
+ return IsObject2(type) || IsTuple(type);
4304
+ }
4314
4305
  function NarrowCompositeRule(left, right) {
4315
4306
  const canCompositeLeft = CanComposite(left);
4316
4307
  const canCompositeRight = CanComposite(right);
@@ -4321,8 +4312,10 @@ function Narrow(left, right) {
4321
4312
  }
4322
4313
  var init_narrow = __esm(() => {
4323
4314
  init_guard2();
4315
+ init_object();
4324
4316
  init_any();
4325
4317
  init_never();
4318
+ init_tuple();
4326
4319
  init_unknown();
4327
4320
  init_compare();
4328
4321
  init_composite();
@@ -5487,14 +5480,14 @@ var init_object2 = __esm(() => {
5487
5480
  });
5488
5481
 
5489
5482
  // node_modules/typebox/build/type/extends/record.mjs
5490
- function FromObject3(inferred, properties) {
5483
+ function FromObject2(inferred, properties) {
5491
5484
  return IsEqual(Keys(properties).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
5492
5485
  }
5493
5486
  function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
5494
5487
  return ExtendsLeft(inferred, leftValue, rightValue);
5495
5488
  }
5496
5489
  function ExtendsRecord(inferred, leftPattern, leftValue, right) {
5497
- return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject3(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
5490
+ return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
5498
5491
  }
5499
5492
  var init_record2 = __esm(() => {
5500
5493
  init_guard2();
@@ -6052,6 +6045,7 @@ var init_evaluate3 = __esm(() => {
6052
6045
  init_flatten();
6053
6046
  init_instantiate5();
6054
6047
  init_narrow();
6048
+ init_property();
6055
6049
  });
6056
6050
 
6057
6051
  // node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
@@ -6580,7 +6574,7 @@ function CollapseIntersectProperties(left, right) {
6580
6574
  const sharedKeys = Keys(left).filter((key) => HasPropertyKey(right, key));
6581
6575
  const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
6582
6576
  const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
6583
- const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluateIntersect([left[key], right[key]]) }), {});
6577
+ const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
6584
6578
  const unique = Assign(leftProperties, rightProperties);
6585
6579
  const shared = Assign(unique, sharedProperties);
6586
6580
  return shared;
@@ -6594,11 +6588,11 @@ var init_from_intersect = __esm(() => {
6594
6588
  init_memory2();
6595
6589
  init_guard2();
6596
6590
  init_from_type2();
6597
- init_evaluate2();
6591
+ init_property();
6598
6592
  });
6599
6593
 
6600
6594
  // node_modules/typebox/build/type/engine/object/from_object.mjs
6601
- function FromObject4(properties) {
6595
+ function FromObject3(properties) {
6602
6596
  return properties;
6603
6597
  }
6604
6598
 
@@ -6618,7 +6612,7 @@ var init_from_tuple = __esm(() => {
6618
6612
  function CollapseUnionProperties(left, right) {
6619
6613
  const sharedKeys = Keys(left).filter((key) => (key in right));
6620
6614
  const result = sharedKeys.reduce((result, key) => {
6621
- return { ...result, [key]: EvaluateUnion([left[key], right[key]]) };
6615
+ return { ...result, [key]: EvaluatePropertyUnion(left[key], right[key]) };
6622
6616
  }, {});
6623
6617
  return result;
6624
6618
  }
@@ -6631,13 +6625,13 @@ function FromUnion3(types) {
6631
6625
  var init_from_union2 = __esm(() => {
6632
6626
  init_guard2();
6633
6627
  init_unreachable();
6634
- init_evaluate2();
6628
+ init_property();
6635
6629
  init_from_type2();
6636
6630
  });
6637
6631
 
6638
6632
  // node_modules/typebox/build/type/engine/object/from_type.mjs
6639
6633
  function FromType8(type) {
6640
- return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject4(type.properties) : {};
6634
+ return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject3(type.properties) : {};
6641
6635
  }
6642
6636
  var init_from_type2 = __esm(() => {
6643
6637
  init_cyclic();
@@ -6675,7 +6669,7 @@ function ConvertToIntegerKey(value) {
6675
6669
  return integerKeyPattern.test(normal) ? parseInt(normal) : value;
6676
6670
  }
6677
6671
  var integerKeyPattern;
6678
- var init_keys = __esm(() => {
6672
+ var init_keys2 = __esm(() => {
6679
6673
  integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
6680
6674
  });
6681
6675
 
@@ -6689,7 +6683,7 @@ function NormalizeIndexerTypes(types) {
6689
6683
  function NormalizeIndexer(type) {
6690
6684
  return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
6691
6685
  }
6692
- function FromArray3(type, indexer) {
6686
+ function FromArray2(type, indexer) {
6693
6687
  const normalizedIndexer = NormalizeIndexer(indexer);
6694
6688
  const check = Extends({}, normalizedIndexer, Number2());
6695
6689
  const result = IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Number2() : Never();
@@ -6703,7 +6697,7 @@ var init_from_array = __esm(() => {
6703
6697
  init_number();
6704
6698
  init_never();
6705
6699
  init_extends3();
6706
- init_keys();
6700
+ init_keys2();
6707
6701
  });
6708
6702
 
6709
6703
  // node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
@@ -6856,7 +6850,7 @@ function FromIndexerNumber(properties) {
6856
6850
  const result = EvaluateUnion(variants);
6857
6851
  return result;
6858
6852
  }
6859
- function FromObject5(properties, indexer) {
6853
+ function FromObject4(properties, indexer) {
6860
6854
  const result = IsNumber3(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
6861
6855
  return result;
6862
6856
  }
@@ -6886,7 +6880,7 @@ var init_array_indexer = __esm(() => {
6886
6880
  init_union();
6887
6881
  init_intersect();
6888
6882
  init_literal();
6889
- init_keys();
6883
+ init_keys2();
6890
6884
  });
6891
6885
 
6892
6886
  // node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
@@ -6919,7 +6913,7 @@ var init_from_tuple2 = __esm(() => {
6919
6913
 
6920
6914
  // node_modules/typebox/build/type/engine/indexed/from_type.mjs
6921
6915
  function FromType11(type, indexer) {
6922
- return IsArray2(type) ? FromArray3(type.items, indexer) : IsObject2(type) ? FromObject5(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
6916
+ return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
6923
6917
  }
6924
6918
  var init_from_type4 = __esm(() => {
6925
6919
  init_array();
@@ -7007,7 +7001,7 @@ var init_from_any = __esm(() => {
7007
7001
  });
7008
7002
 
7009
7003
  // node_modules/typebox/build/type/engine/keyof/from_array.mjs
7010
- function FromArray4(_type) {
7004
+ function FromArray3(_type) {
7011
7005
  return Number2();
7012
7006
  }
7013
7007
  var init_from_array2 = __esm(() => {
@@ -7021,7 +7015,7 @@ function FromPropertyKeys(keys) {
7021
7015
  }, []);
7022
7016
  return result;
7023
7017
  }
7024
- function FromObject6(properties) {
7018
+ function FromObject5(properties) {
7025
7019
  const propertyKeys = Keys(properties);
7026
7020
  const variants = FromPropertyKeys(propertyKeys);
7027
7021
  const result = EvaluateUnionFast(variants);
@@ -7031,7 +7025,7 @@ var init_from_object2 = __esm(() => {
7031
7025
  init_unreachable();
7032
7026
  init_guard2();
7033
7027
  init_literal();
7034
- init_keys();
7028
+ init_keys2();
7035
7029
  init_evaluate2();
7036
7030
  });
7037
7031
 
@@ -7055,7 +7049,7 @@ var init_from_tuple3 = __esm(() => {
7055
7049
 
7056
7050
  // node_modules/typebox/build/type/engine/keyof/from_type.mjs
7057
7051
  function FromType12(type) {
7058
- return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray4(type.items) : IsObject2(type) ? FromObject6(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
7052
+ return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
7059
7053
  }
7060
7054
  var init_from_type5 = __esm(() => {
7061
7055
  init_any();
@@ -7417,7 +7411,7 @@ var init_from_union4 = __esm(() => {
7417
7411
  });
7418
7412
 
7419
7413
  // node_modules/typebox/build/type/engine/partial/from_object.mjs
7420
- function FromObject7(properties) {
7414
+ function FromObject6(properties) {
7421
7415
  const mapped = Keys(properties).reduce((result, left) => {
7422
7416
  return { ...result, [left]: AddOptional(properties[left]) };
7423
7417
  }, {});
@@ -7432,7 +7426,7 @@ var init_from_object3 = __esm(() => {
7432
7426
 
7433
7427
  // node_modules/typebox/build/type/engine/partial/from_type.mjs
7434
7428
  function FromType15(type) {
7435
- return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject7(type.properties) : _Object_({});
7429
+ return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject6(type.properties) : _Object_({});
7436
7430
  }
7437
7431
  var init_from_type7 = __esm(() => {
7438
7432
  init_cyclic();
@@ -7523,7 +7517,7 @@ var init_readonly_object = __esm(() => {
7523
7517
  });
7524
7518
 
7525
7519
  // node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
7526
- function FromArray5(type) {
7520
+ function FromArray4(type) {
7527
7521
  const result = AddImmutable(_Array_(type));
7528
7522
  return result;
7529
7523
  }
@@ -7569,7 +7563,7 @@ var init_from_intersect4 = __esm(() => {
7569
7563
  });
7570
7564
 
7571
7565
  // node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
7572
- function FromObject8(properties) {
7566
+ function FromObject7(properties) {
7573
7567
  const mapped = Keys(properties).reduce((result, left) => {
7574
7568
  return { ...result, [left]: AddReadonly(properties[left]) };
7575
7569
  }, {});
@@ -7604,7 +7598,7 @@ var init_from_union5 = __esm(() => {
7604
7598
 
7605
7599
  // node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
7606
7600
  function FromType17(type) {
7607
- return IsArray2(type) ? FromArray5(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject8(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
7601
+ return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
7608
7602
  }
7609
7603
  var init_from_type9 = __esm(() => {
7610
7604
  init_array();
@@ -7694,8 +7688,17 @@ var init_from_union6 = __esm(() => {
7694
7688
  init_from_type10();
7695
7689
  });
7696
7690
 
7691
+ // node_modules/typebox/build/type/action/_remove_optional.mjs
7692
+ function RemoveOptional(type, options = {}) {
7693
+ return RemoveOptionalAction(type, options);
7694
+ }
7695
+ var init__remove_optional = __esm(() => {
7696
+ init_deferred();
7697
+ init_instantiate_remove();
7698
+ });
7699
+
7697
7700
  // node_modules/typebox/build/type/engine/required/from_object.mjs
7698
- function FromObject9(properties) {
7701
+ function FromObject8(properties) {
7699
7702
  const mapped = Keys(properties).reduce((result, left) => {
7700
7703
  return { ...result, [left]: RemoveOptional(properties[left]) };
7701
7704
  }, {});
@@ -7710,7 +7713,7 @@ var init_from_object5 = __esm(() => {
7710
7713
 
7711
7714
  // node_modules/typebox/build/type/engine/required/from_type.mjs
7712
7715
  function FromType18(type) {
7713
- return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject9(type.properties) : _Object_({});
7716
+ return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject8(type.properties) : _Object_({});
7714
7717
  }
7715
7718
  var init_from_type10 = __esm(() => {
7716
7719
  init_cyclic();
@@ -7892,9 +7895,9 @@ var init_instantiate27 = __esm(() => {
7892
7895
  init_instantiate_add3();
7893
7896
  init_instantiate_remove3();
7894
7897
  init_instantiate_add();
7895
- init_instantiate_remove();
7896
- init_instantiate_add2();
7897
7898
  init_instantiate_remove2();
7899
+ init_instantiate_add2();
7900
+ init_instantiate_remove();
7898
7901
  init__optional();
7899
7902
  init__immutable();
7900
7903
  init__readonly();
@@ -7930,11 +7933,8 @@ var init_instantiate27 = __esm(() => {
7930
7933
  });
7931
7934
 
7932
7935
  // node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
7933
- function AddImmutableOperation(type) {
7934
- return Update(type, { "~immutable": true }, {});
7935
- }
7936
7936
  function AddImmutableAction(type, options) {
7937
- const result = Update(AddImmutableOperation(type), {}, options);
7937
+ const result = Update(type, { "~immutable": true }, options);
7938
7938
  return result;
7939
7939
  }
7940
7940
  function AddImmutableInstantiate(context, state, type, options) {
@@ -7961,6 +7961,12 @@ var init__remove_immutable = __esm(() => {
7961
7961
  init_instantiate_remove3();
7962
7962
  });
7963
7963
 
7964
+ // node_modules/typebox/build/type/action/_remove_readonly.mjs
7965
+ var init__remove_readonly = __esm(() => {
7966
+ init_deferred();
7967
+ init_instantiate_remove2();
7968
+ });
7969
+
7964
7970
  // node_modules/typebox/build/type/action/evaluate.mjs
7965
7971
  function Evaluate(type, options = {}) {
7966
7972
  return EvaluateAction(type, options);
@@ -8037,7 +8043,7 @@ var init_union3 = () => {};
8037
8043
  // node_modules/typebox/build/type/engine/helpers/index.mjs
8038
8044
  var init_helpers = __esm(() => {
8039
8045
  init_keys_to_indexer();
8040
- init_keys();
8046
+ init_keys2();
8041
8047
  init_union3();
8042
8048
  });
8043
8049
 
@@ -8242,7 +8248,7 @@ var init_type3 = __esm(() => {
8242
8248
  });
8243
8249
 
8244
8250
  // node_modules/typebox/build/value/clean/from_array.mjs
8245
- function FromArray6(context, type, value) {
8251
+ function FromArray5(context, type, value) {
8246
8252
  if (!IsArray(value))
8247
8253
  return value;
8248
8254
  return value.map((value) => FromType19(context, type.items, value));
@@ -8288,7 +8294,7 @@ var init_additional = __esm(() => {
8288
8294
  });
8289
8295
 
8290
8296
  // node_modules/typebox/build/value/clean/from_object.mjs
8291
- function FromObject10(context, type, value) {
8297
+ function FromObject9(context, type, value) {
8292
8298
  if (!IsObject(value) || IsArray(value))
8293
8299
  return value;
8294
8300
  const additionalProperties = GetAdditionalProperties(type);
@@ -8366,12 +8372,74 @@ var init_from_tuple5 = __esm(() => {
8366
8372
  init_from_type11();
8367
8373
  });
8368
8374
 
8375
+ // node_modules/typebox/build/system/memory/deep.mjs
8376
+ function FromClassInstance(value) {
8377
+ return value;
8378
+ }
8379
+ function IsSchemaObject2(value) {
8380
+ return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
8381
+ }
8382
+ function FromSchemaObject(value) {
8383
+ const result = {};
8384
+ for (const key of Keys(value)) {
8385
+ if (IsUnsafePropertyKey(key))
8386
+ continue;
8387
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
8388
+ descriptor.value = FromValue2(descriptor.value);
8389
+ if (IsEqual(descriptor.enumerable, true)) {
8390
+ result[key] = descriptor.value;
8391
+ } else {
8392
+ Object.defineProperty(result, key, descriptor);
8393
+ }
8394
+ }
8395
+ return result;
8396
+ }
8397
+ function FromPlainObject(value) {
8398
+ const result = {};
8399
+ for (const key of Keys(value)) {
8400
+ if (IsUnsafePropertyKey(key))
8401
+ continue;
8402
+ result[key] = FromValue2(value[key]);
8403
+ }
8404
+ for (const key of Symbols(value)) {
8405
+ result[key] = FromValue2(value[key]);
8406
+ }
8407
+ return result;
8408
+ }
8409
+ function FromObject10(value) {
8410
+ return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject2(value) ? FromSchemaObject(value) : FromPlainObject(value);
8411
+ }
8412
+ function FromArray6(value) {
8413
+ return value.map((element) => FromValue2(element));
8414
+ }
8415
+ function FromTypedArray(value) {
8416
+ return value.slice();
8417
+ }
8418
+ function FromRegExp2(value) {
8419
+ return new RegExp(value.source, value.flags);
8420
+ }
8421
+ function FromMap(value) {
8422
+ return new Map(FromValue2([...value.entries()]));
8423
+ }
8424
+ function FromSet(value) {
8425
+ return new Set(FromValue2([...value.values()]));
8426
+ }
8427
+ function FromValue2(value) {
8428
+ return IsTypeArray(value) ? FromTypedArray(value) : IsRegExp(value) ? FromRegExp2(value) : IsMap(value) ? FromMap(value) : IsSet(value) ? FromSet(value) : IsArray(value) ? FromArray6(value) : IsObject(value) ? FromObject10(value) : value;
8429
+ }
8430
+ function Deep(value) {
8431
+ return FromValue2(value);
8432
+ }
8433
+ var init_deep = __esm(() => {
8434
+ init_guard2();
8435
+ });
8436
+
8369
8437
  // node_modules/typebox/build/value/clone/clone.mjs
8370
- function Clone2(value) {
8371
- return Clone(value);
8438
+ function Clone(value) {
8439
+ return Deep(value);
8372
8440
  }
8373
8441
  var init_clone2 = __esm(() => {
8374
- init_clone();
8442
+ init_deep();
8375
8443
  });
8376
8444
 
8377
8445
  // node_modules/typebox/build/value/clone/index.mjs
@@ -8382,7 +8450,7 @@ var init_clone3 = __esm(() => {
8382
8450
  // node_modules/typebox/build/value/clean/from_union.mjs
8383
8451
  function FromUnion9(context, type, value) {
8384
8452
  for (const schema of type.anyOf) {
8385
- const clean = FromType19(context, schema, Clone2(value));
8453
+ const clean = FromType19(context, schema, Clone(value));
8386
8454
  if (Check2(context, schema, clean))
8387
8455
  return clean;
8388
8456
  }
@@ -8396,7 +8464,7 @@ var init_from_union7 = __esm(() => {
8396
8464
 
8397
8465
  // node_modules/typebox/build/value/clean/from_type.mjs
8398
8466
  function FromType19(context, type, value) {
8399
- return IsArray2(type) ? FromArray6(context, type, value) : IsCyclic(type) ? FromCyclic6(context, type, value) : IsIntersect(type) ? FromIntersect6(context, type, value) : IsObject2(type) ? FromObject10(context, type, value) : IsRecord(type) ? FromRecord3(context, type, value) : IsRef2(type) ? FromRef5(context, type, value) : IsTuple(type) ? FromTuple5(context, type, value) : IsUnion(type) ? FromUnion9(context, type, value) : value;
8467
+ return IsArray2(type) ? FromArray5(context, type, value) : IsCyclic(type) ? FromCyclic6(context, type, value) : IsIntersect(type) ? FromIntersect6(context, type, value) : IsObject2(type) ? FromObject9(context, type, value) : IsRecord(type) ? FromRecord3(context, type, value) : IsRef2(type) ? FromRef5(context, type, value) : IsTuple(type) ? FromTuple5(context, type, value) : IsUnion(type) ? FromUnion9(context, type, value) : value;
8400
8468
  }
8401
8469
  var init_from_type11 = __esm(() => {
8402
8470
  init_type3();
@@ -8412,12 +8480,7 @@ var init_from_type11 = __esm(() => {
8412
8480
 
8413
8481
  // node_modules/typebox/build/value/shared/union_priority_sort.mjs
8414
8482
  function Modifiers(type, next) {
8415
- for (const key of Keys(type)) {
8416
- if (HasPropertyKey(next, key))
8417
- continue;
8418
- next[key] = type[key];
8419
- }
8420
- return next;
8483
+ return Assign(type, next);
8421
8484
  }
8422
8485
  function FromProperties4(properties) {
8423
8486
  const result = {};
@@ -8444,6 +8507,7 @@ function UnionPrioritySort(type) {
8444
8507
  }
8445
8508
  var init_union_priority_sort = __esm(() => {
8446
8509
  init_guard2();
8510
+ init_memory2();
8447
8511
  init_type3();
8448
8512
  init_type3();
8449
8513
  init_type3();
@@ -8888,7 +8952,7 @@ function FromUnion10(context, type, value) {
8888
8952
  const matched = type.anyOf.some((type) => Check2(context, type, value));
8889
8953
  if (matched)
8890
8954
  return value;
8891
- const candidates = type.anyOf.map((type) => FromType21(context, type, Clone2(value)));
8955
+ const candidates = type.anyOf.map((type) => FromType21(context, type, Clone(value)));
8892
8956
  const selected = candidates.find((value) => Check2(context, type, value));
8893
8957
  return IsUndefined(selected) ? value : selected;
8894
8958
  }
@@ -8980,7 +9044,7 @@ var init_from_cyclic8 = __esm(() => {
8980
9044
  function FromDefault(type, value) {
8981
9045
  if (!IsUndefined(value))
8982
9046
  return value;
8983
- return IsFunction(type.default) ? type.default() : Clone2(type.default);
9047
+ return IsFunction(type.default) ? type.default() : Clone(type.default);
8984
9048
  }
8985
9049
  var init_from_default = __esm(() => {
8986
9050
  init_guard2();
@@ -9080,7 +9144,7 @@ var init_from_tuple7 = __esm(() => {
9080
9144
  // node_modules/typebox/build/value/default/from_union.mjs
9081
9145
  function FromUnion11(context, schema, value) {
9082
9146
  for (const inner of schema.anyOf) {
9083
- const result = FromType22(context, inner, Clone2(value));
9147
+ const result = FromType22(context, inner, Clone(value));
9084
9148
  if (Check2(context, inner, result)) {
9085
9149
  return result;
9086
9150
  }
@@ -9217,7 +9281,7 @@ function NonMatchingInterior(value, interiors) {
9217
9281
  function Decode4(direction, context, type, value) {
9218
9282
  if (IsEqual(type.allOf.length, 0))
9219
9283
  return Callback(direction, context, type, value);
9220
- const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone2(value))));
9284
+ const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(value))));
9221
9285
  const structural = interiors.every((result) => IsObject(result));
9222
9286
  const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);
9223
9287
  return Callback(direction, context, type, exterior);
@@ -9226,7 +9290,7 @@ function Encode4(direction, context, type, value) {
9226
9290
  if (IsEqual(type.allOf.length, 0))
9227
9291
  return Callback(direction, context, type, value);
9228
9292
  const exterior = Callback(direction, context, type, value);
9229
- const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone2(exterior))));
9293
+ const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(exterior))));
9230
9294
  const structural = interiors.every((result) => IsObject(result));
9231
9295
  if (structural)
9232
9296
  return MergeInteriors(interiors);
@@ -9362,7 +9426,7 @@ function Decode8(direction, context, type, value) {
9362
9426
  function Encode8(direction, context, type, value) {
9363
9427
  const exterior = Callback(direction, context, type, value);
9364
9428
  for (const schema of type.anyOf) {
9365
- const variant = FromType23(direction, context, schema, Clone2(exterior));
9429
+ const variant = FromType23(direction, context, schema, Clone(exterior));
9366
9430
  if (!Check2(context, schema, variant))
9367
9431
  continue;
9368
9432
  return variant;
@@ -9426,7 +9490,7 @@ var init_decode2 = __esm(() => {
9426
9490
  }
9427
9491
  };
9428
9492
  Decoder = Pipeline([
9429
- (_context, _type, value) => Clone2(value),
9493
+ (_context, _type, value) => Clone(value),
9430
9494
  (context, type, value) => Default(context, type, value),
9431
9495
  (context, type, value) => Convert(context, type, value),
9432
9496
  (context, type, value) => Clean(context, type, value),
@@ -9464,7 +9528,7 @@ var init_encode2 = __esm(() => {
9464
9528
  }
9465
9529
  };
9466
9530
  Encoder = Pipeline([
9467
- (_context, _type, value) => Clone2(value),
9531
+ (_context, _type, value) => Clone(value),
9468
9532
  (context, type, value) => EncodeUnsafe(context, type, value),
9469
9533
  (context, type, value) => Default(context, type, value),
9470
9534
  (context, type, value) => Convert(context, type, value),
@@ -9683,7 +9747,7 @@ var init_parse2 = __esm(() => {
9683
9747
  }
9684
9748
  };
9685
9749
  Parser = Pipeline([
9686
- (_context, _type, value) => Clone2(value),
9750
+ (_context, _type, value) => Clone(value),
9687
9751
  (context, type, value) => Default(context, type, value),
9688
9752
  (context, type, value) => Convert(context, type, value),
9689
9753
  (context, type, value) => Clean(context, type, value),