@continuous-excellence/ze-great-dashboard-aws 0.27.7 → 0.27.9

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 (2) hide show
  1. package/dist/lambda.mjs +1333 -650
  2. package/package.json +2 -2
package/dist/lambda.mjs CHANGED
@@ -5655,7 +5655,7 @@ var init_getEndpointProperties = __esm({
5655
5655
  "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js"() {
5656
5656
  init_types2();
5657
5657
  init_evaluateTemplate();
5658
- getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => {
5658
+ getEndpointProperties = (properties2, options) => Object.entries(properties2).reduce((acc, [propertyKey, propertyVal]) => {
5659
5659
  acc[propertyKey] = group2.getEndpointProperty(propertyVal, options);
5660
5660
  return acc;
5661
5661
  }, {});
@@ -5742,10 +5742,10 @@ var init_decideEndpoint = __esm({
5742
5742
  const [, errorExpression] = result;
5743
5743
  throw new EndpointError(evaluateExpression(errorExpression, "Error", closure));
5744
5744
  }
5745
- const [url2, properties, headers] = result;
5745
+ const [url2, properties2, headers] = result;
5746
5746
  return {
5747
5747
  url: getEndpointUrl(url2, closure),
5748
- properties: getEndpointProperties(properties, closure),
5748
+ properties: getEndpointProperties(properties2, closure),
5749
5749
  headers: getEndpointHeaders(headers ?? {}, closure)
5750
5750
  };
5751
5751
  }
@@ -5806,14 +5806,14 @@ var init_evaluateEndpointRule = __esm({
5806
5806
  ...options,
5807
5807
  referenceRecord: { ...options.referenceRecord, ...referenceRecord }
5808
5808
  } : options;
5809
- const { url: url2, properties, headers } = endpoint;
5809
+ const { url: url2, properties: properties2, headers } = endpoint;
5810
5810
  options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
5811
5811
  const endpointToReturn = { url: getEndpointUrl(url2, endpointRuleOptions) };
5812
5812
  if (headers != null) {
5813
5813
  endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions);
5814
5814
  }
5815
- if (properties != null) {
5816
- endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions);
5815
+ if (properties2 != null) {
5816
+ endpointToReturn.properties = getEndpointProperties(properties2, endpointRuleOptions);
5817
5817
  }
5818
5818
  return endpointToReturn;
5819
5819
  };
@@ -15998,7 +15998,7 @@ var init_package = __esm({
15998
15998
  "node_modules/@aws-sdk/nested-clients/package.json"() {
15999
15999
  package_default = {
16000
16000
  name: "@aws-sdk/nested-clients",
16001
- version: "3.997.44",
16001
+ version: "3.997.45",
16002
16002
  description: "Nested clients for AWS SDK packages.",
16003
16003
  homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
16004
16004
  license: "Apache-2.0",
@@ -16098,7 +16098,7 @@ var init_package = __esm({
16098
16098
  "test:watch": "yarn g:vitest watch"
16099
16099
  },
16100
16100
  dependencies: {
16101
- "@aws-sdk/core": "^3.977.9",
16101
+ "@aws-sdk/core": "^3.978.0",
16102
16102
  "@aws-sdk/signature-v4-multi-region": "^3.996.46",
16103
16103
  "@aws-sdk/types": "^3.974.5",
16104
16104
  "@smithy/core": "^3.33.3",
@@ -23336,7 +23336,7 @@ var init_httpAuthSchemeProvider3 = __esm({
23336
23336
  }
23337
23337
  const options = [];
23338
23338
  for (const scheme of authSchemes) {
23339
- const { name: resolvedName, properties = {}, ...rest } = scheme;
23339
+ const { name: resolvedName, properties: properties2 = {}, ...rest } = scheme;
23340
23340
  const name = resolvedName.toLowerCase();
23341
23341
  if (resolvedName !== name) {
23342
23342
  console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
@@ -23362,7 +23362,7 @@ var init_httpAuthSchemeProvider3 = __esm({
23362
23362
  }
23363
23363
  const option = createOption(authParameters);
23364
23364
  option.schemeId = schemeId;
23365
- option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
23365
+ option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties2 };
23366
23366
  options.push(option);
23367
23367
  }
23368
23368
  return options;
@@ -26039,7 +26039,7 @@ var require_dist_cjs16 = __commonJS({
26039
26039
  Region: { type: "builtInParams", name: "region" },
26040
26040
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
26041
26041
  };
26042
- var version2 = "3.1127.0";
26042
+ var version2 = "3.1128.0";
26043
26043
  var packageInfo = {
26044
26044
  version: version2
26045
26045
  };
@@ -27817,7 +27817,7 @@ var require_dist_cjs17 = __commonJS({
27817
27817
  Region: { type: "builtInParams", name: "region" },
27818
27818
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
27819
27819
  };
27820
- var version2 = "3.1127.0";
27820
+ var version2 = "3.1128.0";
27821
27821
  var packageInfo = {
27822
27822
  version: version2
27823
27823
  };
@@ -49427,6 +49427,7 @@ __export(external_exports, {
49427
49427
  $brand: () => $brand,
49428
49428
  $input: () => $input,
49429
49429
  $output: () => $output,
49430
+ INVALID: () => INVALID,
49430
49431
  NEVER: () => NEVER,
49431
49432
  TimePrecision: () => TimePrecision,
49432
49433
  ZodAny: () => ZodAny,
@@ -49460,12 +49461,14 @@ __export(external_exports, {
49460
49461
  ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
49461
49462
  ZodFunction: () => ZodFunction,
49462
49463
  ZodGUID: () => ZodGUID,
49464
+ ZodIBAN: () => ZodIBAN,
49463
49465
  ZodIPv4: () => ZodIPv4,
49464
49466
  ZodIPv6: () => ZodIPv6,
49465
49467
  ZodISODate: () => ZodISODate,
49466
49468
  ZodISODateTime: () => ZodISODateTime,
49467
49469
  ZodISODuration: () => ZodISODuration,
49468
49470
  ZodISOTime: () => ZodISOTime,
49471
+ ZodInstanceOf: () => ZodInstanceOf,
49469
49472
  ZodIntersection: () => ZodIntersection,
49470
49473
  ZodIssueCode: () => ZodIssueCode,
49471
49474
  ZodJWT: () => ZodJWT,
@@ -49488,6 +49491,7 @@ __export(external_exports, {
49488
49491
  ZodPrefault: () => ZodPrefault,
49489
49492
  ZodPreprocess: () => ZodPreprocess,
49490
49493
  ZodPromise: () => ZodPromise,
49494
+ ZodProperties: () => ZodProperties,
49491
49495
  ZodReadonly: () => ZodReadonly,
49492
49496
  ZodRealError: () => ZodRealError,
49493
49497
  ZodRecord: () => ZodRecord,
@@ -49563,6 +49567,7 @@ __export(external_exports, {
49563
49567
  hex: () => hex2,
49564
49568
  hostname: () => hostname2,
49565
49569
  httpUrl: () => httpUrl,
49570
+ iban: () => iban2,
49566
49571
  includes: () => _includes,
49567
49572
  input: () => input,
49568
49573
  instanceof: () => _instanceof,
@@ -49623,7 +49628,7 @@ __export(external_exports, {
49623
49628
  preprocess: () => preprocess,
49624
49629
  prettifyError: () => prettifyError,
49625
49630
  promise: () => promise,
49626
- properties: () => _properties,
49631
+ properties: () => properties,
49627
49632
  property: () => _property,
49628
49633
  readonly: () => readonly,
49629
49634
  record: () => record,
@@ -49674,6 +49679,7 @@ __export(external_exports, {
49674
49679
  validate: () => validate,
49675
49680
  validateAsync: () => validateAsync,
49676
49681
  void: () => _void2,
49682
+ withParser: () => withParser,
49677
49683
  xid: () => xid2,
49678
49684
  xor: () => xor
49679
49685
  });
@@ -49734,6 +49740,7 @@ __export(core_exports2, {
49734
49740
  $ZodFile: () => $ZodFile,
49735
49741
  $ZodFunction: () => $ZodFunction,
49736
49742
  $ZodGUID: () => $ZodGUID,
49743
+ $ZodIBAN: () => $ZodIBAN,
49737
49744
  $ZodIPv4: () => $ZodIPv4,
49738
49745
  $ZodIPv6: () => $ZodIPv6,
49739
49746
  $ZodISODate: () => $ZodISODate,
@@ -49762,6 +49769,7 @@ __export(core_exports2, {
49762
49769
  $ZodPrefault: () => $ZodPrefault,
49763
49770
  $ZodPreprocess: () => $ZodPreprocess,
49764
49771
  $ZodPromise: () => $ZodPromise,
49772
+ $ZodProperties: () => $ZodProperties,
49765
49773
  $ZodReadonly: () => $ZodReadonly,
49766
49774
  $ZodRealError: () => $ZodRealError,
49767
49775
  $ZodRecord: () => $ZodRecord,
@@ -49835,6 +49843,7 @@ __export(core_exports2, {
49835
49843
  _gt: () => _gt,
49836
49844
  _gte: () => _gte,
49837
49845
  _guid: () => _guid,
49846
+ _iban: () => _iban,
49838
49847
  _includes: () => _includes,
49839
49848
  _int: () => _int,
49840
49849
  _int32: () => _int32,
@@ -49926,6 +49935,8 @@ __export(core_exports2, {
49926
49935
  _void: () => _void,
49927
49936
  _xid: () => _xid,
49928
49937
  _xor: () => _xor,
49938
+ base64Charset: () => base64Charset,
49939
+ base64urlCharset: () => base64urlCharset,
49929
49940
  clone: () => clone,
49930
49941
  compile: () => compile,
49931
49942
  compileFn: () => compileFn,
@@ -49948,10 +49959,12 @@ __export(core_exports2, {
49948
49959
  initializeContext: () => initializeContext,
49949
49960
  isBackEdge: () => isBackEdge,
49950
49961
  isRecursiveSchema: () => isRecursiveSchema,
49962
+ isTransforming: () => isTransforming,
49951
49963
  isValidBase64: () => isValidBase64,
49952
49964
  isValidBase64URL: () => isValidBase64URL,
49953
49965
  isValidCIDRv6: () => isValidCIDRv6,
49954
49966
  isValidCreditCard: () => isValidCreditCard,
49967
+ isValidIBAN: () => isValidIBAN,
49955
49968
  isValidIPv6: () => isValidIPv6,
49956
49969
  isValidJWT: () => isValidJWT,
49957
49970
  locales: () => locales_exports,
@@ -49962,7 +49975,8 @@ __export(core_exports2, {
49962
49975
  parseAsync: () => parseAsync,
49963
49976
  parseURLObject: () => parseURLObject,
49964
49977
  prettifyError: () => prettifyError,
49965
- process: () => process2,
49978
+ process: () => processSchema,
49979
+ processSchema: () => processSchema,
49966
49980
  regexes: () => regexes_exports,
49967
49981
  registry: () => registry,
49968
49982
  safeDecode: () => safeDecode,
@@ -49982,7 +49996,8 @@ __export(core_exports2, {
49982
49996
  util: () => util_exports,
49983
49997
  validate: () => validate,
49984
49998
  validateAsync: () => validateAsync,
49985
- version: () => version
49999
+ version: () => version,
50000
+ withParser: () => withParser
49986
50001
  });
49987
50002
 
49988
50003
  // node_modules/zod/v4/core/util.js
@@ -50014,6 +50029,7 @@ __export(util_exports, {
50014
50029
  createTransparentProxy: () => createTransparentProxy,
50015
50030
  defineLazy: () => defineLazy,
50016
50031
  defineLazyInternal: () => defineLazyInternal,
50032
+ derived: () => derived,
50017
50033
  esc: () => esc,
50018
50034
  escapeRegex: () => escapeRegex,
50019
50035
  explicitlyAborted: () => explicitlyAborted,
@@ -50051,6 +50067,7 @@ __export(util_exports, {
50051
50067
  promiseAllObject: () => promiseAllObject,
50052
50068
  propertyKeyTypes: () => propertyKeyTypes,
50053
50069
  randomString: () => randomString,
50070
+ rawShape: () => rawShape,
50054
50071
  required: () => required,
50055
50072
  safeExtend: () => safeExtend,
50056
50073
  shallowClone: () => shallowClone,
@@ -50091,18 +50108,22 @@ function jsonStringifyReplacer(_, value) {
50091
50108
  return value.toString();
50092
50109
  return value;
50093
50110
  }
50094
- function cached(getter) {
50095
- const set2 = false;
50096
- return {
50097
- get value() {
50098
- if (!set2) {
50099
- const value = getter();
50100
- Object.defineProperty(this, "value", { value });
50101
- return value;
50102
- }
50103
- throw new Error("cached value already set");
50111
+ var Cached = class {
50112
+ constructor(getter) {
50113
+ this._getter = getter;
50114
+ this._value = void 0;
50115
+ }
50116
+ get value() {
50117
+ const getter = this._getter;
50118
+ if (getter !== void 0) {
50119
+ this._value = getter();
50120
+ this._getter = void 0;
50104
50121
  }
50105
- };
50122
+ return this._value;
50123
+ }
50124
+ };
50125
+ function cached(getter) {
50126
+ return new Cached(getter);
50106
50127
  }
50107
50128
  function nullish(input2) {
50108
50129
  return input2 === null || input2 === void 0;
@@ -50154,6 +50175,56 @@ function assignProp(target, prop, value) {
50154
50175
  configurable: true
50155
50176
  });
50156
50177
  }
50178
+ function rawShape(def) {
50179
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
50180
+ return desc?.get ? desc.get.raw : desc?.value;
50181
+ }
50182
+ function sourceShape(schema) {
50183
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape;
50184
+ }
50185
+ function deferProp(target, key, getter) {
50186
+ Object.defineProperty(target, key, {
50187
+ get() {
50188
+ const value = getter();
50189
+ assignProp(this, key, value);
50190
+ return value;
50191
+ },
50192
+ enumerable: true,
50193
+ configurable: true
50194
+ });
50195
+ }
50196
+ function putProp(target, key, value) {
50197
+ if (key in target)
50198
+ assignProp(target, key, value);
50199
+ else
50200
+ target[key] = value;
50201
+ }
50202
+ function mirrorShape(target, source, keys, wrap) {
50203
+ const raw2 = sourceShape(source);
50204
+ for (const key of keys) {
50205
+ const desc = Object.getOwnPropertyDescriptor(raw2, key);
50206
+ if (!desc.enumerable)
50207
+ continue;
50208
+ if (desc.get) {
50209
+ deferProp(target, key, () => {
50210
+ const value = source._zod.def.shape[key];
50211
+ return wrap ? wrap(value, key) : value;
50212
+ });
50213
+ } else
50214
+ putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
50215
+ }
50216
+ }
50217
+ function mirrorProps(target, source) {
50218
+ for (const key of Reflect.ownKeys(source)) {
50219
+ const desc = Object.getOwnPropertyDescriptor(source, key);
50220
+ if (!desc.enumerable)
50221
+ continue;
50222
+ if (desc.get)
50223
+ deferProp(target, key, () => source[key]);
50224
+ else
50225
+ putProp(target, key, desc.value);
50226
+ }
50227
+ }
50157
50228
  function mergeDefs(...defs) {
50158
50229
  const mergedDescriptors = {};
50159
50230
  for (const def of defs) {
@@ -50392,23 +50463,21 @@ function pick(schema, mask) {
50392
50463
  if (hasChecks) {
50393
50464
  throw new Error(".pick() cannot be used on object schemas containing refinements");
50394
50465
  }
50395
- const def = mergeDefs(schema._zod.def, {
50396
- get shape() {
50397
- const newShape = {};
50398
- for (const key of Reflect.ownKeys(mask)) {
50399
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
50400
- throw new Error(`Unrecognized key: "${String(key)}"`);
50401
- }
50402
- if (!mask[key])
50403
- continue;
50404
- assignProp(newShape, key, currDef.shape[key]);
50405
- }
50406
- assignProp(this, "shape", newShape);
50407
- return newShape;
50408
- },
50409
- checks: []
50410
- });
50411
- return clone(schema, def);
50466
+ const newShape = {};
50467
+ mirrorShape(newShape, schema, maskedKeys(schema, mask));
50468
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
50469
+ }
50470
+ function maskedKeys(schema, mask) {
50471
+ const raw2 = sourceShape(schema);
50472
+ const keys = [];
50473
+ for (const key of Reflect.ownKeys(mask)) {
50474
+ if (!Object.getOwnPropertyDescriptor(raw2, key)?.enumerable) {
50475
+ throw new Error(`Unrecognized key: "${String(key)}"`);
50476
+ }
50477
+ if (mask[key])
50478
+ keys.push(key);
50479
+ }
50480
+ return keys;
50412
50481
  }
50413
50482
  function omit(schema, mask) {
50414
50483
  const currDef = schema._zod.def;
@@ -50417,23 +50486,10 @@ function omit(schema, mask) {
50417
50486
  if (hasChecks) {
50418
50487
  throw new Error(".omit() cannot be used on object schemas containing refinements");
50419
50488
  }
50420
- const def = mergeDefs(schema._zod.def, {
50421
- get shape() {
50422
- const newShape = { ...schema._zod.def.shape };
50423
- for (const key of Reflect.ownKeys(mask)) {
50424
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
50425
- throw new Error(`Unrecognized key: "${String(key)}"`);
50426
- }
50427
- if (!mask[key])
50428
- continue;
50429
- delete newShape[key];
50430
- }
50431
- assignProp(this, "shape", newShape);
50432
- return newShape;
50433
- },
50434
- checks: []
50435
- });
50436
- return clone(schema, def);
50489
+ const omitted = new Set(maskedKeys(schema, mask));
50490
+ const newShape = {};
50491
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
50492
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
50437
50493
  }
50438
50494
  function extend(schema, shape) {
50439
50495
  if (!isPlainObject(shape)) {
@@ -50442,34 +50498,26 @@ function extend(schema, shape) {
50442
50498
  const checks = schema._zod.def.checks;
50443
50499
  const hasChecks = checks && checks.length > 0;
50444
50500
  if (hasChecks) {
50445
- const existingShape = schema._zod.def.shape;
50501
+ const existingShape = sourceShape(schema);
50446
50502
  for (const key of Reflect.ownKeys(shape)) {
50447
50503
  if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
50448
50504
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
50449
50505
  }
50450
50506
  }
50451
50507
  }
50452
- const def = mergeDefs(schema._zod.def, {
50453
- get shape() {
50454
- const _shape = { ...schema._zod.def.shape, ...shape };
50455
- assignProp(this, "shape", _shape);
50456
- return _shape;
50457
- }
50458
- });
50459
- return clone(schema, def);
50508
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
50509
+ }
50510
+ function extended(schema, shape) {
50511
+ const newShape = {};
50512
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
50513
+ mirrorProps(newShape, shape);
50514
+ return newShape;
50460
50515
  }
50461
50516
  function safeExtend(schema, shape) {
50462
50517
  if (!isPlainObject(shape)) {
50463
50518
  throw new Error("Invalid input to safeExtend: expected a plain object");
50464
50519
  }
50465
- const def = mergeDefs(schema._zod.def, {
50466
- get shape() {
50467
- const _shape = { ...schema._zod.def.shape, ...shape };
50468
- assignProp(this, "shape", _shape);
50469
- return _shape;
50470
- }
50471
- });
50472
- return clone(schema, def);
50520
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
50473
50521
  }
50474
50522
  function merge(a5, b5) {
50475
50523
  if (!b5?._zod?.def) {
@@ -50478,12 +50526,11 @@ function merge(a5, b5) {
50478
50526
  if (a5._zod.def.checks?.length) {
50479
50527
  throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
50480
50528
  }
50529
+ const newShape = {};
50530
+ mirrorShape(newShape, a5, Reflect.ownKeys(sourceShape(a5)));
50531
+ mirrorShape(newShape, b5, Reflect.ownKeys(sourceShape(b5)));
50481
50532
  const def = mergeDefs(a5._zod.def, {
50482
- get shape() {
50483
- const _shape = { ...a5._zod.def.shape, ...b5._zod.def.shape };
50484
- assignProp(this, "shape", _shape);
50485
- return _shape;
50486
- },
50533
+ shape: newShape,
50487
50534
  get catchall() {
50488
50535
  return b5._zod.def.catchall;
50489
50536
  },
@@ -50498,67 +50545,19 @@ function partial(Class2, schema, mask, name = "partial") {
50498
50545
  if (hasChecks) {
50499
50546
  throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
50500
50547
  }
50501
- const def = mergeDefs(schema._zod.def, {
50502
- get shape() {
50503
- const oldShape = schema._zod.def.shape;
50504
- const shape = { ...oldShape };
50505
- if (mask) {
50506
- for (const key of Reflect.ownKeys(mask)) {
50507
- if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {
50508
- throw new Error(`Unrecognized key: "${String(key)}"`);
50509
- }
50510
- if (!mask[key])
50511
- continue;
50512
- shape[key] = Class2 ? new Class2({
50513
- type: "optional",
50514
- innerType: oldShape[key]
50515
- }) : oldShape[key];
50516
- }
50517
- } else {
50518
- for (const key of Reflect.ownKeys(oldShape)) {
50519
- shape[key] = Class2 ? new Class2({
50520
- type: "optional",
50521
- innerType: oldShape[key]
50522
- }) : oldShape[key];
50523
- }
50524
- }
50525
- assignProp(this, "shape", shape);
50526
- return shape;
50527
- },
50528
- checks: []
50529
- });
50530
- return clone(schema, def);
50548
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
50549
+ const newShape = {};
50550
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class2 && ((value, key) => selected && !selected.has(key) ? value : new Class2({ type: "optional", innerType: value })));
50551
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
50531
50552
  }
50532
50553
  function required(Class2, schema, mask) {
50533
- const def = mergeDefs(schema._zod.def, {
50534
- get shape() {
50535
- const oldShape = schema._zod.def.shape;
50536
- const shape = { ...oldShape };
50537
- if (mask) {
50538
- for (const key of Reflect.ownKeys(mask)) {
50539
- if (!Object.prototype.hasOwnProperty.call(shape, key)) {
50540
- throw new Error(`Unrecognized key: "${String(key)}"`);
50541
- }
50542
- if (!mask[key])
50543
- continue;
50544
- shape[key] = new Class2({
50545
- type: "nonoptional",
50546
- innerType: oldShape[key]
50547
- });
50548
- }
50549
- } else {
50550
- for (const key of Reflect.ownKeys(oldShape)) {
50551
- shape[key] = new Class2({
50552
- type: "nonoptional",
50553
- innerType: oldShape[key]
50554
- });
50555
- }
50556
- }
50557
- assignProp(this, "shape", shape);
50558
- return shape;
50559
- }
50560
- });
50561
- return clone(schema, def);
50554
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
50555
+ const newShape = {};
50556
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => (
50557
+ // overwrite with non-optional
50558
+ selected && !selected.has(key) ? value : new Class2({ type: "nonoptional", innerType: value })
50559
+ ));
50560
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
50562
50561
  }
50563
50562
  function aborted(x, startIndex = 0) {
50564
50563
  if (x.aborted === true)
@@ -50608,13 +50607,18 @@ function finalizeIssue(iss, ctx, config2) {
50608
50607
  }
50609
50608
  const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
50610
50609
  const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
50611
- const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;
50612
- rest.path ?? (rest.path = []);
50613
- rest.message = message;
50610
+ const full = {};
50611
+ for (const k5 of Object.keys(iss)) {
50612
+ if (k5 === "inst" || k5 === "schema" || k5 === "continue" || k5 === "input" || k5 === "__proto__")
50613
+ continue;
50614
+ full[k5] = iss[k5];
50615
+ }
50616
+ full.path ?? (full.path = []);
50617
+ full.message = message;
50614
50618
  if (ctx?.reportInput) {
50615
- rest.input = _input;
50619
+ full.input = iss.input;
50616
50620
  }
50617
- return rest;
50621
+ return full;
50618
50622
  }
50619
50623
  function getSizableOrigin(input2) {
50620
50624
  if (input2 instanceof Set)
@@ -50733,6 +50737,9 @@ function members(proto, table) {
50733
50737
  else
50734
50738
  defineBound(proto, key, desc.value);
50735
50739
  }
50740
+ for (const sym of Object.getOwnPropertySymbols(table)) {
50741
+ defineBound(proto, sym, table[sym]);
50742
+ }
50736
50743
  }
50737
50744
  function own(inst, key, value, enumerable = true) {
50738
50745
  Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
@@ -50741,6 +50748,23 @@ function own(inst, key, value, enumerable = true) {
50741
50748
  function hide(inst, key, value) {
50742
50749
  return own(inst, key, value, false);
50743
50750
  }
50751
+ // @__NO_SIDE_EFFECTS__
50752
+ function derived(computes, table) {
50753
+ for (const key in computes) {
50754
+ const compute = computes[key];
50755
+ Object.defineProperty(table, key, {
50756
+ configurable: true,
50757
+ enumerable: true,
50758
+ get() {
50759
+ return own(this, key, compute(this));
50760
+ },
50761
+ set(value) {
50762
+ own(this, key, value);
50763
+ }
50764
+ });
50765
+ }
50766
+ return table;
50767
+ }
50744
50768
  function defineBound(proto, key, fn) {
50745
50769
  Object.defineProperty(proto, key, {
50746
50770
  configurable: true,
@@ -50960,16 +50984,12 @@ var _messageDesc = {
50960
50984
  enumerable: true,
50961
50985
  configurable: true
50962
50986
  };
50963
- var _zodDesc2 = { value: void 0, enumerable: false };
50964
50987
  var _issuesDesc = { value: void 0, enumerable: false };
50965
50988
  var _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
50966
50989
  var initializer = (inst, def) => {
50967
50990
  inst.name = "$ZodError";
50968
- _zodDesc2.value = inst._zod;
50969
- Object.defineProperty(inst, "_zod", _zodDesc2);
50970
50991
  _issuesDesc.value = def;
50971
50992
  Object.defineProperty(inst, "issues", _issuesDesc);
50972
- _zodDesc2.value = void 0;
50973
50993
  _issuesDesc.value = void 0;
50974
50994
  Object.defineProperty(inst, "message", _messageDesc);
50975
50995
  const proto = Object.getPrototypeOf(inst);
@@ -51184,33 +51204,50 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
51184
51204
  if (result instanceof Promise) {
51185
51205
  throw new $ZodAsyncError();
51186
51206
  }
51187
- return result.issues.length ? {
51188
- success: false,
51189
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
51190
- } : { success: true, data: result.value };
51207
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
51191
51208
  };
51192
51209
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
51210
+ function failure(Err, issues, ctx) {
51211
+ let error62;
51212
+ return {
51213
+ success: false,
51214
+ get error() {
51215
+ if (!error62) {
51216
+ error62 = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
51217
+ issues = void 0;
51218
+ ctx = void 0;
51219
+ }
51220
+ return error62;
51221
+ },
51222
+ set error(e5) {
51223
+ error62 = e5;
51224
+ issues = void 0;
51225
+ ctx = void 0;
51226
+ }
51227
+ };
51228
+ }
51193
51229
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
51194
51230
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
51195
51231
  let result = schema._zod.run({ value, issues: [] }, ctx);
51196
51232
  if (result instanceof Promise)
51197
51233
  result = await result;
51198
- return result.issues.length ? {
51199
- success: false,
51200
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
51201
- } : { success: true, data: result.value };
51234
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
51202
51235
  };
51203
51236
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
51204
51237
  var COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
51205
51238
  var COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
51206
51239
  var validate = ((schema, value, _ctx) => {
51207
51240
  const validator = schema._zod.bag.validator;
51208
- if (validator !== void 0 && validator(value) !== COMPILE_INVALID)
51209
- return true;
51241
+ if (validator !== void 0) {
51242
+ if (validator(value) !== COMPILE_INVALID)
51243
+ return true;
51244
+ if (validator.definite === true && _ctx === void 0)
51245
+ return false;
51246
+ }
51210
51247
  return validateFallback(schema, value, _ctx);
51211
51248
  });
51212
51249
  function validateFallback(schema, value, _ctx) {
51213
- const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
51250
+ const ctx = _ctx ? { ..._ctx, async: false, abortEarly: true } : { async: false, abortEarly: true };
51214
51251
  const fallbackRun = schema._zod.bag.fallbackRun;
51215
51252
  let result;
51216
51253
  if (fallbackRun) {
@@ -51225,7 +51262,7 @@ function validateFallback(schema, value, _ctx) {
51225
51262
  return result.issues.length === 0;
51226
51263
  }
51227
51264
  var validateAsync = async (schema, value, _ctx) => {
51228
- const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
51265
+ const ctx = _ctx ? { ..._ctx, async: true, abortEarly: true } : { async: true, abortEarly: true };
51229
51266
  let result = schema._zod.run({ value, issues: [] }, ctx);
51230
51267
  if (result instanceof Promise)
51231
51268
  result = await result;
@@ -51287,6 +51324,7 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
51287
51324
  // node_modules/zod/v4/core/regexes.js
51288
51325
  var regexes_exports = {};
51289
51326
  __export(regexes_exports, {
51327
+ anyString: () => anyString,
51290
51328
  base64: () => base64,
51291
51329
  base64url: () => base64url,
51292
51330
  bigint: () => bigint,
@@ -51310,6 +51348,7 @@ __export(regexes_exports, {
51310
51348
  hostname: () => hostname,
51311
51349
  html5Email: () => html5Email,
51312
51350
  httpProtocol: () => httpProtocol,
51351
+ iban: () => iban,
51313
51352
  idnEmail: () => idnEmail,
51314
51353
  integer: () => integer,
51315
51354
  ipv4: () => ipv4,
@@ -51369,13 +51408,13 @@ var uuid = (version2) => {
51369
51408
  var uuid4 = /* @__PURE__ */ uuid(4);
51370
51409
  var uuid6 = /* @__PURE__ */ uuid(6);
51371
51410
  var uuid7 = /* @__PURE__ */ uuid(7);
51372
- var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
51411
+ var email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
51373
51412
  var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
51374
51413
  var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
51375
51414
  var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
51376
51415
  var idnEmail = unicodeEmail;
51377
51416
  var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
51378
- var _emoji = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
51417
+ var _emoji = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
51379
51418
  function emoji() {
51380
51419
  return new RegExp(_emoji, "u");
51381
51420
  }
@@ -51388,12 +51427,13 @@ var mac = (delimiter) => {
51388
51427
  var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
51389
51428
  var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
51390
51429
  var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
51391
- var base64url = /^[A-Za-z0-9_-]*$/;
51430
+ var base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
51392
51431
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
51393
51432
  var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/;
51394
51433
  var httpProtocol = /^https?$/;
51395
51434
  var e164 = /^\+[1-9]\d{6,14}$/;
51396
51435
  var creditCard = /^\d(?:[ -]?\d){11,18}$/;
51436
+ var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
51397
51437
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
51398
51438
  function anchor(source) {
51399
51439
  return new RegExp(`^${source}$`);
@@ -51415,6 +51455,7 @@ function datetime(args) {
51415
51455
  const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;
51416
51456
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
51417
51457
  }
51458
+ var anyString = /^[\s\S]{0,}$/;
51418
51459
  var string = (params) => {
51419
51460
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
51420
51461
  return new RegExp(`^${regex}$`);
@@ -51473,16 +51514,6 @@ var numericOriginMap = {
51473
51514
  var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
51474
51515
  $ZodCheck.init(inst, def);
51475
51516
  const origin = numericOriginMap[typeof def.value];
51476
- inst._zod.onattach.push((inst2) => {
51477
- const bag = inst2._zod.bag;
51478
- const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
51479
- if (def.value < curr) {
51480
- if (def.inclusive)
51481
- bag.maximum = def.value;
51482
- else
51483
- bag.exclusiveMaximum = def.value;
51484
- }
51485
- });
51486
51517
  inst._zod.check = (payload2) => {
51487
51518
  if (def.inclusive ? payload2.value <= def.value : payload2.value < def.value) {
51488
51519
  return;
@@ -51501,16 +51532,6 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst,
51501
51532
  var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
51502
51533
  $ZodCheck.init(inst, def);
51503
51534
  const origin = numericOriginMap[typeof def.value];
51504
- inst._zod.onattach.push((inst2) => {
51505
- const bag = inst2._zod.bag;
51506
- const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
51507
- if (def.value > curr) {
51508
- if (def.inclusive)
51509
- bag.minimum = def.value;
51510
- else
51511
- bag.exclusiveMinimum = def.value;
51512
- }
51513
- });
51514
51535
  inst._zod.check = (payload2) => {
51515
51536
  if (def.inclusive ? payload2.value >= def.value : payload2.value > def.value) {
51516
51537
  return;
@@ -51528,10 +51549,6 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
51528
51549
  });
51529
51550
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
51530
51551
  $ZodCheck.init(inst, def);
51531
- inst._zod.onattach.push((inst2) => {
51532
- var _a4;
51533
- (_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value);
51534
- });
51535
51552
  inst._zod.check = (payload2) => {
51536
51553
  if (typeof payload2.value !== typeof def.value)
51537
51554
  throw new Error("Cannot mix number and bigint in multiple_of check.");
@@ -51557,14 +51574,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
51557
51574
  const isInt = def.format?.includes("int");
51558
51575
  const origin = isInt ? "int" : "number";
51559
51576
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
51560
- inst._zod.onattach.push((inst2) => {
51561
- const bag = inst2._zod.bag;
51562
- bag.format = def.format;
51563
- bag.minimum = minimum;
51564
- bag.maximum = maximum;
51565
- if (isInt)
51566
- bag.pattern = integer;
51567
- });
51568
51577
  inst._zod.check = (payload2) => {
51569
51578
  const input2 = payload2.value;
51570
51579
  if (isInt) {
@@ -51633,12 +51642,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
51633
51642
  var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
51634
51643
  $ZodCheck.init(inst, def);
51635
51644
  const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
51636
- inst._zod.onattach.push((inst2) => {
51637
- const bag = inst2._zod.bag;
51638
- bag.format = def.format;
51639
- bag.minimum = minimum;
51640
- bag.maximum = maximum;
51641
- });
51642
51645
  inst._zod.check = (payload2) => {
51643
51646
  const input2 = payload2.value;
51644
51647
  if (input2 < minimum) {
@@ -51669,11 +51672,6 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
51669
51672
  var _a4;
51670
51673
  $ZodCheck.init(inst, def);
51671
51674
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasSize);
51672
- inst._zod.onattach.push((inst2) => {
51673
- const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
51674
- if (def.maximum < curr)
51675
- inst2._zod.bag.maximum = def.maximum;
51676
- });
51677
51675
  inst._zod.check = (payload2) => {
51678
51676
  const input2 = payload2.value;
51679
51677
  const size = input2.size;
@@ -51694,11 +51692,6 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
51694
51692
  var _a4;
51695
51693
  $ZodCheck.init(inst, def);
51696
51694
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasSize);
51697
- inst._zod.onattach.push((inst2) => {
51698
- const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
51699
- if (def.minimum > curr)
51700
- inst2._zod.bag.minimum = def.minimum;
51701
- });
51702
51695
  inst._zod.check = (payload2) => {
51703
51696
  const input2 = payload2.value;
51704
51697
  const size = input2.size;
@@ -51719,12 +51712,6 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
51719
51712
  var _a4;
51720
51713
  $ZodCheck.init(inst, def);
51721
51714
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasSize);
51722
- inst._zod.onattach.push((inst2) => {
51723
- const bag = inst2._zod.bag;
51724
- bag.minimum = def.size;
51725
- bag.maximum = def.size;
51726
- bag.size = def.size;
51727
- });
51728
51715
  inst._zod.check = (payload2) => {
51729
51716
  const input2 = payload2.value;
51730
51717
  const size = input2.size;
@@ -51746,11 +51733,6 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
51746
51733
  var _a4;
51747
51734
  $ZodCheck.init(inst, def);
51748
51735
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasLength);
51749
- inst._zod.onattach.push((inst2) => {
51750
- const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
51751
- if (def.maximum < curr)
51752
- inst2._zod.bag.maximum = def.maximum;
51753
- });
51754
51736
  inst._zod.check = (payload2) => {
51755
51737
  const input2 = payload2.value;
51756
51738
  const units = input2.length;
@@ -51773,11 +51755,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
51773
51755
  var _a4;
51774
51756
  $ZodCheck.init(inst, def);
51775
51757
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasLength);
51776
- inst._zod.onattach.push((inst2) => {
51777
- const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
51778
- if (def.minimum > curr)
51779
- inst2._zod.bag.minimum = def.minimum;
51780
- });
51781
51758
  inst._zod.check = (payload2) => {
51782
51759
  const input2 = payload2.value;
51783
51760
  const units = input2.length;
@@ -51800,12 +51777,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
51800
51777
  var _a4;
51801
51778
  $ZodCheck.init(inst, def);
51802
51779
  (_a4 = inst._zod.def).when ?? (_a4.when = _whenHasLength);
51803
- inst._zod.onattach.push((inst2) => {
51804
- const bag = inst2._zod.bag;
51805
- bag.minimum = def.length;
51806
- bag.maximum = def.length;
51807
- bag.length = def.length;
51808
- });
51809
51780
  inst._zod.check = (payload2) => {
51810
51781
  const input2 = payload2.value;
51811
51782
  const units = input2.length;
@@ -51828,14 +51799,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
51828
51799
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
51829
51800
  var _a4, _b;
51830
51801
  $ZodCheck.init(inst, def);
51831
- inst._zod.onattach.push((inst2) => {
51832
- const bag = inst2._zod.bag;
51833
- bag.format = def.format;
51834
- if (def.pattern) {
51835
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
51836
- bag.patterns.add(def.pattern);
51837
- }
51838
- });
51839
51802
  if (def.pattern)
51840
51803
  (_a4 = inst._zod).check ?? (_a4.check = (payload2) => {
51841
51804
  def.pattern.lastIndex = 0;
@@ -51885,11 +51848,6 @@ var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst,
51885
51848
  const escapedRegex = escapeRegex(def.includes);
51886
51849
  const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
51887
51850
  def.pattern = pattern;
51888
- inst._zod.onattach.push((inst2) => {
51889
- const bag = inst2._zod.bag;
51890
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
51891
- bag.patterns.add(pattern);
51892
- });
51893
51851
  inst._zod.check = (payload2) => {
51894
51852
  if (payload2.value.includes(def.includes, def.position))
51895
51853
  return;
@@ -51908,11 +51866,6 @@ var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (i
51908
51866
  $ZodCheck.init(inst, def);
51909
51867
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
51910
51868
  def.pattern ?? (def.pattern = pattern);
51911
- inst._zod.onattach.push((inst2) => {
51912
- const bag = inst2._zod.bag;
51913
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
51914
- bag.patterns.add(pattern);
51915
- });
51916
51869
  inst._zod.check = (payload2) => {
51917
51870
  if (payload2.value.startsWith(def.prefix))
51918
51871
  return;
@@ -51931,11 +51884,6 @@ var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst,
51931
51884
  $ZodCheck.init(inst, def);
51932
51885
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
51933
51886
  def.pattern ?? (def.pattern = pattern);
51934
- inst._zod.onattach.push((inst2) => {
51935
- const bag = inst2._zod.bag;
51936
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
51937
- bag.patterns.add(pattern);
51938
- });
51939
51887
  inst._zod.check = (payload2) => {
51940
51888
  if (payload2.value.endsWith(def.suffix))
51941
51889
  return;
@@ -51972,9 +51920,6 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
51972
51920
  var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
51973
51921
  $ZodCheck.init(inst, def);
51974
51922
  const mimeSet = new Set(def.mime);
51975
- inst._zod.onattach.push((inst2) => {
51976
- inst2._zod.bag.mime = def.mime;
51977
- });
51978
51923
  inst._zod.check = (payload2) => {
51979
51924
  if (mimeSet.has(payload2.value.type))
51980
51925
  return;
@@ -52002,10 +51947,14 @@ var Doc = class {
52002
51947
  this.args = args;
52003
51948
  this.closed = closed;
52004
51949
  }
51950
+ // the compiler catches a child's throw and keeps writing into this doc, so the indent has to unwind with it
52005
51951
  indented(fn) {
52006
51952
  this.indent += 1;
52007
- fn(this);
52008
- this.indent -= 1;
51953
+ try {
51954
+ fn(this);
51955
+ } finally {
51956
+ this.indent -= 1;
51957
+ }
52009
51958
  }
52010
51959
  write(arg) {
52011
51960
  if (typeof arg === "function") {
@@ -52034,8 +51983,8 @@ ${content.join("\n")}
52034
51983
  // node_modules/zod/v4/core/versions.js
52035
51984
  var version = {
52036
51985
  major: 4,
52037
- minor: 5,
52038
- patch: 4
51986
+ minor: 6,
51987
+ patch: 0
52039
51988
  };
52040
51989
 
52041
51990
  // node_modules/zod/v4/core/schemas.js
@@ -52148,15 +52097,22 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
52148
52097
  own(this, "~standard", value);
52149
52098
  }
52150
52099
  });
52151
- var toStandardResult = (r5) => r5.success ? { value: r5.data } : { issues: r5.error?.issues };
52100
+ var toStandardResult = (r5, ctx) => r5.issues.length ? { issues: r5.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r5.value };
52101
+ async function validateAsync2(inst, value) {
52102
+ const ctx = { async: true };
52103
+ return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
52104
+ }
52152
52105
  function standardProps(inst) {
52153
52106
  return {
52154
52107
  validate: (value) => {
52108
+ const ctx = { async: false };
52155
52109
  try {
52156
- return toStandardResult(safeParse(inst, value));
52110
+ const r5 = inst._zod.run({ value, issues: [] }, ctx);
52111
+ if (!(r5 instanceof Promise))
52112
+ return toStandardResult(r5, ctx);
52157
52113
  } catch (_) {
52158
- return safeParseAsync(inst, value).then(toStandardResult);
52159
52114
  }
52115
+ return validateAsync2(inst, value);
52160
52116
  },
52161
52117
  vendor: "zod",
52162
52118
  version: 1
@@ -52164,7 +52120,7 @@ function standardProps(inst) {
52164
52120
  }
52165
52121
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
52166
52122
  $ZodType.init(inst, def);
52167
- inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
52123
+ inst._zod.pattern = def.pattern ?? anyString;
52168
52124
  inst._zod.parse = (payload2, _) => {
52169
52125
  if (def.coerce)
52170
52126
  try {
@@ -52333,12 +52289,6 @@ var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
52333
52289
  var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
52334
52290
  def.pattern ?? (def.pattern = datetime(def));
52335
52291
  $ZodStringFormat.init(inst, def);
52336
- if (def.local || def.precision === -1) {
52337
- inst._zod.bag.laxFormat = true;
52338
- inst._zod.onattach.push((s2) => {
52339
- s2._zod.bag.laxFormat = true;
52340
- });
52341
- }
52342
52292
  });
52343
52293
  var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
52344
52294
  def.pattern ?? (def.pattern = date);
@@ -52355,7 +52305,6 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
52355
52305
  var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
52356
52306
  def.pattern ?? (def.pattern = ipv4);
52357
52307
  $ZodStringFormat.init(inst, def);
52358
- inst._zod.bag.format = `ipv4`;
52359
52308
  });
52360
52309
  var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
52361
52310
  function isValidIPv6(value) {
@@ -52371,7 +52320,6 @@ function isValidIPv6(value) {
52371
52320
  var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
52372
52321
  def.pattern ?? (def.pattern = ipv6);
52373
52322
  $ZodStringFormat.init(inst, def);
52374
- inst._zod.bag.format = `ipv6`;
52375
52323
  inst._zod.check = (payload2) => {
52376
52324
  if (!isValidIPv6(payload2.value)) {
52377
52325
  payload2.issues.push({
@@ -52387,7 +52335,6 @@ var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
52387
52335
  var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
52388
52336
  def.pattern ?? (def.pattern = mac(def.delimiter));
52389
52337
  $ZodStringFormat.init(inst, def);
52390
- inst._zod.bag.format = `mac`;
52391
52338
  });
52392
52339
  var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
52393
52340
  def.pattern ?? (def.pattern = cidrv4);
@@ -52436,10 +52383,10 @@ function isValidBase64(data) {
52436
52383
  return false;
52437
52384
  }
52438
52385
  }
52386
+ var base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
52439
52387
  var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
52440
- def.pattern ?? (def.pattern = base64);
52388
+ def.pattern ?? (def.pattern = base64Charset);
52441
52389
  $ZodStringFormat.init(inst, def);
52442
- inst._zod.bag.contentEncoding = "base64";
52443
52390
  inst._zod.check = (payload2) => {
52444
52391
  if (isValidBase64(payload2.value))
52445
52392
  return;
@@ -52452,17 +52399,17 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
52452
52399
  });
52453
52400
  };
52454
52401
  });
52402
+ var base64urlCharset = /^[A-Za-z0-9_-]*$/;
52455
52403
  function isValidBase64URL(data) {
52456
- if (!base64url.test(data))
52404
+ if (!base64urlCharset.test(data))
52457
52405
  return false;
52458
52406
  const base643 = data.replace(/[-_]/g, (c5) => c5 === "-" ? "+" : "/");
52459
52407
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
52460
52408
  return isValidBase64(padded);
52461
52409
  }
52462
52410
  var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
52463
- def.pattern ?? (def.pattern = base64url);
52411
+ def.pattern ?? (def.pattern = base64urlCharset);
52464
52412
  $ZodStringFormat.init(inst, def);
52465
- inst._zod.bag.contentEncoding = "base64url";
52466
52413
  inst._zod.check = (payload2) => {
52467
52414
  if (isValidBase64URL(payload2.value))
52468
52415
  return;
@@ -52485,7 +52432,7 @@ function isLuhnAlgo(digits) {
52485
52432
  let bit = 1;
52486
52433
  let sum = 0;
52487
52434
  while (length) {
52488
- const value = +digits[--length];
52435
+ const value = digits.charCodeAt(--length) - 48;
52489
52436
  bit ^= 1;
52490
52437
  sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
52491
52438
  }
@@ -52511,6 +52458,39 @@ var $ZodCreditCard = /* @__PURE__ */ $constructor("$ZodCreditCard", (inst, def)
52511
52458
  });
52512
52459
  };
52513
52460
  });
52461
+ function isIso7064Mod97(iban3) {
52462
+ let remainder = 0;
52463
+ const len = iban3.length;
52464
+ for (let i5 = 4; i5 < len; i5++) {
52465
+ const code = iban3.charCodeAt(i5);
52466
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
52467
+ }
52468
+ for (let i5 = 0; i5 < 4; i5++) {
52469
+ const code = iban3.charCodeAt(i5);
52470
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
52471
+ }
52472
+ return remainder === 1;
52473
+ }
52474
+ function isValidIBAN(input2) {
52475
+ if (!iban.test(input2))
52476
+ return false;
52477
+ return isIso7064Mod97(input2);
52478
+ }
52479
+ var $ZodIBAN = /* @__PURE__ */ $constructor("$ZodIBAN", (inst, def) => {
52480
+ def.pattern ?? (def.pattern = iban);
52481
+ $ZodStringFormat.init(inst, def);
52482
+ inst._zod.check = (payload2) => {
52483
+ if (isValidIBAN(payload2.value))
52484
+ return;
52485
+ payload2.issues.push({
52486
+ code: "invalid_format",
52487
+ format: "iban",
52488
+ input: payload2.value,
52489
+ inst,
52490
+ continue: !def.abort
52491
+ });
52492
+ };
52493
+ });
52514
52494
  function isValidJWT(token, algorithm = null) {
52515
52495
  try {
52516
52496
  const tokensParts = token.split(".");
@@ -52561,7 +52541,7 @@ var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringForma
52561
52541
  });
52562
52542
  var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
52563
52543
  $ZodType.init(inst, def);
52564
- inst._zod.pattern = inst._zod.bag.pattern ?? number;
52544
+ inst._zod.pattern = number;
52565
52545
  inst._zod.parse = (payload2, _ctx) => {
52566
52546
  if (def.coerce)
52567
52547
  try {
@@ -52763,6 +52743,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
52763
52743
  }
52764
52744
  payload2.value = memo2 ? memo2.alloc(inst, payload2, Array(input2.length), ctx) : Array(input2.length);
52765
52745
  const proms = [];
52746
+ const abortEarly = ctx?.abortEarly;
52766
52747
  for (let i5 = 0; i5 < input2.length; i5++) {
52767
52748
  const item = input2[i5];
52768
52749
  const result = def.element._zod.run({
@@ -52773,6 +52754,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
52773
52754
  proms.push(result.then((result2) => handleArrayResult(result2, payload2, i5)));
52774
52755
  } else {
52775
52756
  handleArrayResult(result, payload2, i5);
52757
+ if (abortEarly && result.issues.length !== 0 && aborted(result))
52758
+ break;
52776
52759
  }
52777
52760
  }
52778
52761
  if (proms.length) {
@@ -52834,14 +52817,20 @@ function normalizeDef(def) {
52834
52817
  optionalKeys: new Set(okeys)
52835
52818
  };
52836
52819
  }
52837
- function handleCatchall(proms, input2, payload2, ctx, def, inst) {
52820
+ function handleCatchall(proms, input2, payload2, ctx, def, inst, abortEarly) {
52838
52821
  const unrecognized = [];
52839
52822
  const keySet = def.keySet;
52840
52823
  const _catchall = def.catchall._zod;
52841
52824
  const t = _catchall.def.type;
52842
52825
  const optin = _catchall.optin;
52843
52826
  const optout = _catchall.optout;
52827
+ let seen = 0;
52844
52828
  for (const key in input2) {
52829
+ if (abortEarly && payload2.issues.length !== seen) {
52830
+ if (aborted(payload2, seen))
52831
+ break;
52832
+ seen = payload2.issues.length;
52833
+ }
52845
52834
  if (keySet.has(key))
52846
52835
  continue;
52847
52836
  if (key === "__proto__") {
@@ -52876,23 +52865,19 @@ function handleCatchall(proms, input2, payload2, ctx, def, inst) {
52876
52865
  return payload2;
52877
52866
  });
52878
52867
  }
52879
- var propShapes = /* @__PURE__ */ new WeakMap();
52880
52868
  var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
52881
52869
  $ZodType.init(inst, def);
52882
52870
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
52883
- if (!desc?.get) {
52884
- const sh = def.shape;
52885
- propShapes.set(def, sh);
52886
- Object.defineProperty(def, "shape", {
52887
- get: () => {
52888
- const newSh = { ...sh };
52889
- Object.defineProperty(def, "shape", {
52890
- value: newSh
52891
- });
52892
- propShapes.set(def, newSh);
52893
- return newSh;
52894
- }
52895
- });
52871
+ const sh = desc?.get ? desc.get.raw : def.shape ?? {};
52872
+ if (sh) {
52873
+ const get2 = () => {
52874
+ const newSh = { ...sh };
52875
+ Object.defineProperty(def, "shape", { value: newSh });
52876
+ get2.raw = newSh;
52877
+ return newSh;
52878
+ };
52879
+ get2.raw = sh;
52880
+ Object.defineProperty(def, "shape", { get: get2 });
52896
52881
  }
52897
52882
  const _normalized = cached(() => normalizeDef(def));
52898
52883
  defineLazyInternal(inst, "propValues", (zod) => {
@@ -52932,7 +52917,14 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
52932
52917
  payload2.value = memo2 ? memo2.alloc(inst, payload2, {}, ctx) : {};
52933
52918
  const proms = [];
52934
52919
  const shape = value.shape;
52920
+ const abortEarly = ctx?.abortEarly;
52921
+ let seen = payload2.issues.length;
52935
52922
  for (const key of value.allKeys) {
52923
+ if (abortEarly && payload2.issues.length !== seen) {
52924
+ if (aborted(payload2, seen))
52925
+ break;
52926
+ seen = payload2.issues.length;
52927
+ }
52936
52928
  if (key === "__proto__")
52937
52929
  continue;
52938
52930
  const el = shape[key];
@@ -52948,7 +52940,7 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
52948
52940
  if (!catchall) {
52949
52941
  return proms.length ? Promise.all(proms).then(() => payload2) : payload2;
52950
52942
  }
52951
- return handleCatchall(proms, input2, payload2, ctx, _normalized.value, inst);
52943
+ return handleCatchall(proms, input2, payload2, ctx, _normalized.value, inst, abortEarly === true);
52952
52944
  };
52953
52945
  });
52954
52946
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -52962,10 +52954,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
52962
52954
  const doc = new Doc(["payload", "ctx"], { shape, inst, memo: memo2, syms });
52963
52955
  const parseStr = (k5) => `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
52964
52956
  const prefixStr = (id, k5) => `
52957
+ let ${id}_ab = false;
52965
52958
  for (let i = 0; i < ${id}.issues.length; i++) {
52966
52959
  const iss = ${id}.issues[i];
52967
52960
  iss.path = iss.path ? [${k5}, ...iss.path] : [${k5}];
52968
52961
  payload.issues.push(iss);
52962
+ if (iss.continue !== true) ${id}_ab = true;
52963
+ }
52964
+ if (${id}_ab && ctx && ctx.abortEarly) {
52965
+ payload.value = newResult;
52966
+ return payload;
52969
52967
  }`;
52970
52968
  doc.write(`const input = payload.value;`);
52971
52969
  const ids = /* @__PURE__ */ Object.create(null);
@@ -53011,6 +53009,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
53011
53009
  input: undefined,
53012
53010
  path: [${k5}]
53013
53011
  });
53012
+ if (ctx && ctx.abortEarly) {
53013
+ payload.value = newResult;
53014
+ return payload;
53015
+ }
53014
53016
  }
53015
53017
 
53016
53018
  if (${id}_present) {
@@ -53063,7 +53065,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
53063
53065
  payload2 = fastpass(payload2, ctx);
53064
53066
  if (!catchall)
53065
53067
  return payload2;
53066
- return handleCatchall([], input2, payload2, ctx, value, inst);
53068
+ return handleCatchall([], input2, payload2, ctx, value, inst, ctx?.abortEarly === true);
53067
53069
  }
53068
53070
  return superParse(payload2, ctx);
53069
53071
  };
@@ -53228,7 +53230,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
53228
53230
  return propValues;
53229
53231
  });
53230
53232
  def.options.forEach((option, i5) => {
53231
- const propShape = propShapes.get(option._zod.def);
53233
+ const propShape = rawShape(option._zod.def);
53232
53234
  if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
53233
53235
  throw new Error(`Invalid discriminated union option at index "${i5}"`);
53234
53236
  }
@@ -53438,6 +53440,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
53438
53440
  }
53439
53441
  }
53440
53442
  const itemResults = new Array(items.length);
53443
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
53444
+ let itemAborted = false;
53441
53445
  for (let i5 = 0; i5 < items.length; i5++) {
53442
53446
  const r5 = items[i5]._zod.run({ value: input2[i5], issues: [] }, ctx);
53443
53447
  if (r5 instanceof Promise) {
@@ -53446,12 +53450,20 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
53446
53450
  }));
53447
53451
  } else {
53448
53452
  itemResults[i5] = r5;
53453
+ if (abortEarly && !itemAborted && r5.issues.length)
53454
+ itemAborted = aborted(r5);
53449
53455
  }
53450
53456
  }
53451
- if (def.rest) {
53457
+ if (def.rest && !itemAborted) {
53452
53458
  let i5 = items.length - 1;
53453
53459
  const rest = input2.slice(items.length);
53460
+ let seen = payload2.issues.length;
53454
53461
  for (const el of rest) {
53462
+ if (abortEarly && payload2.issues.length !== seen) {
53463
+ if (aborted(payload2, seen))
53464
+ break;
53465
+ seen = payload2.issues.length;
53466
+ }
53455
53467
  i5++;
53456
53468
  const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
53457
53469
  if (result instanceof Promise) {
@@ -53679,7 +53691,14 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
53679
53691
  }
53680
53692
  const proms = [];
53681
53693
  payload2.value = memo2 ? memo2.alloc(inst, payload2, /* @__PURE__ */ new Map(), ctx) : /* @__PURE__ */ new Map();
53694
+ const abortEarly = ctx?.abortEarly;
53695
+ let seen = payload2.issues.length;
53682
53696
  for (const [key, value] of input2) {
53697
+ if (abortEarly && payload2.issues.length !== seen) {
53698
+ if (aborted(payload2, seen))
53699
+ break;
53700
+ seen = payload2.issues.length;
53701
+ }
53683
53702
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
53684
53703
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
53685
53704
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
@@ -53742,7 +53761,14 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
53742
53761
  }
53743
53762
  const proms = [];
53744
53763
  payload2.value = memo2 ? memo2.alloc(inst, payload2, /* @__PURE__ */ new Set(), ctx) : /* @__PURE__ */ new Set();
53764
+ const abortEarly = ctx?.abortEarly;
53765
+ let seen = payload2.issues.length;
53745
53766
  for (const item of input2) {
53767
+ if (abortEarly && payload2.issues.length !== seen) {
53768
+ if (aborted(payload2, seen))
53769
+ break;
53770
+ seen = payload2.issues.length;
53771
+ }
53746
53772
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
53747
53773
  if (result instanceof Promise) {
53748
53774
  proms.push(result.then((result2) => handleSetResult(result2, payload2)));
@@ -53765,8 +53791,10 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
53765
53791
  const values = getEnumValues(def.entries);
53766
53792
  const valuesSet = new Set(values);
53767
53793
  inst._zod.values = valuesSet;
53768
- const patternValues = values.filter((k5) => propertyKeyTypes.has(typeof k5));
53769
- inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o3) => escapeRegex(o3.toString())).join("|")})$` : "^[^\\s\\S]$");
53794
+ defineLazyInternal(inst, "pattern", (zod) => {
53795
+ const patternValues = getEnumValues(zod.def.entries).filter((k5) => propertyKeyTypes.has(typeof k5));
53796
+ return new RegExp(patternValues.length ? `^(${patternValues.map((o3) => escapeRegex(o3.toString())).join("|")})$` : "^[^\\s\\S]$");
53797
+ });
53770
53798
  inst._zod.parse = (payload2, _ctx) => {
53771
53799
  const input2 = payload2.value;
53772
53800
  if (valuesSet.has(input2)) {
@@ -53785,7 +53813,10 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
53785
53813
  $ZodType.init(inst, def);
53786
53814
  const values = new Set(def.values);
53787
53815
  inst._zod.values = values;
53788
- inst._zod.pattern = new RegExp(def.values.length ? `^(${def.values.map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3 ? escapeRegex(o3.toString()) : String(o3)).join("|")})$` : "^[^\\s\\S]$");
53816
+ defineLazyInternal(inst, "pattern", (zod) => {
53817
+ const vals = zod.def.values;
53818
+ return new RegExp(vals.length ? `^(${vals.map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3 ? escapeRegex(o3.toString()) : String(o3)).join("|")})$` : "^[^\\s\\S]$");
53819
+ });
53789
53820
  inst._zod.parse = (payload2, _ctx) => {
53790
53821
  const input2 = payload2.value;
53791
53822
  if (values.has(input2)) {
@@ -54123,20 +54154,62 @@ function handleReadonlyResult(payload2) {
54123
54154
  payload2.value = Object.freeze(payload2.value);
54124
54155
  return payload2;
54125
54156
  }
54157
+ function leafPattern(schema) {
54158
+ const def = schema._zod.def;
54159
+ let pattern = def.pattern;
54160
+ let isInt = !!def.format?.includes("int");
54161
+ let minimum;
54162
+ let maximum;
54163
+ for (const ch of def.checks ?? []) {
54164
+ const d5 = ch._zod.def;
54165
+ if (d5.pattern)
54166
+ pattern = d5.pattern;
54167
+ isInt || (isInt = !!d5.format?.includes("int"));
54168
+ const lo = d5.minimum ?? d5.length;
54169
+ const hi = d5.maximum ?? d5.length;
54170
+ if (lo !== void 0 && (minimum === void 0 || lo > minimum))
54171
+ minimum = lo;
54172
+ if (hi !== void 0 && (maximum === void 0 || hi < maximum))
54173
+ maximum = hi;
54174
+ }
54175
+ if (pattern)
54176
+ return pattern.source;
54177
+ if (minimum !== void 0 && maximum !== void 0 && minimum > maximum)
54178
+ return "(?!)";
54179
+ if (minimum !== void 0 || maximum !== void 0)
54180
+ return string({ minimum, maximum }).source;
54181
+ const own2 = schema._zod.pattern;
54182
+ return (isInt && own2 === number ? integer : own2)?.source;
54183
+ }
54184
+ function partPattern(schema) {
54185
+ const def = schema._zod.def;
54186
+ const own2 = schema._zod.pattern?.source;
54187
+ const inner = def.innerType ?? schema._zod.innerType;
54188
+ if (inner) {
54189
+ const before = inner._zod.pattern?.source;
54190
+ const after = partPattern(inner);
54191
+ if (own2 && before && after && after !== before) {
54192
+ return own2.replace(cleanRegex(before), () => cleanRegex(after));
54193
+ }
54194
+ return own2;
54195
+ }
54196
+ if (def.options) {
54197
+ const sources = def.options.map(partPattern);
54198
+ if (sources.every(Boolean))
54199
+ return `^(${sources.map((s2) => cleanRegex(s2)).join("|")})$`;
54200
+ }
54201
+ return leafPattern(schema);
54202
+ }
54126
54203
  var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
54127
54204
  $ZodType.init(inst, def);
54128
54205
  const regexParts = [];
54129
54206
  for (const part of def.parts) {
54130
54207
  if (typeof part === "object" && part !== null) {
54131
- if (!part._zod.pattern) {
54208
+ const source = partPattern(part);
54209
+ if (!source) {
54132
54210
  throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
54133
54211
  }
54134
- const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
54135
- if (!source)
54136
- throw new Error(`Invalid template literal part: ${part._zod.traits}`);
54137
- const start = source.startsWith("^") ? 1 : 0;
54138
- const end2 = source.endsWith("$") ? source.length - 1 : source.length;
54139
- regexParts.push(source.slice(start, end2));
54212
+ regexParts.push(cleanRegex(source));
54140
54213
  } else if (part === null || primitiveTypes.has(typeof part)) {
54141
54214
  regexParts.push(escapeRegex(`${part}`));
54142
54215
  } else {
@@ -54301,6 +54374,59 @@ function handleRefineResult(result, payload2, input2, inst) {
54301
54374
  payload2.issues.push(issue(_iss));
54302
54375
  }
54303
54376
  }
54377
+ function handlePropertiesResult(result, payload2, key) {
54378
+ if (result.issues.length) {
54379
+ payload2.issues.push(...prefixIssues(key, result.issues));
54380
+ }
54381
+ }
54382
+ var $ZodProperties = /* @__PURE__ */ $constructor("$ZodProperties", (inst, def) => {
54383
+ $ZodType.init(inst, def);
54384
+ $ZodCheck.init(inst, def);
54385
+ const memo2 = globalConfig.memoizer;
54386
+ memo2?.attach(inst);
54387
+ let entries;
54388
+ const runShape = (payload2, ctx) => {
54389
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
54390
+ const input2 = payload2.value;
54391
+ let proms;
54392
+ for (const [key, schema] of entries) {
54393
+ const result = schema._zod.run({ value: input2[key], issues: [] }, ctx);
54394
+ if (result instanceof Promise) {
54395
+ proms ?? (proms = []);
54396
+ proms.push(result.then((result2) => handlePropertiesResult(result2, payload2, key)));
54397
+ } else {
54398
+ handlePropertiesResult(result, payload2, key);
54399
+ }
54400
+ }
54401
+ if (proms)
54402
+ return Promise.all(proms).then(() => void 0);
54403
+ return void 0;
54404
+ };
54405
+ inst._zod.parse = (payload2, ctx) => {
54406
+ const input2 = payload2.value;
54407
+ if (input2 === null || typeof input2 !== "object" && typeof input2 !== "function") {
54408
+ payload2.issues.push({ expected: "object", code: "invalid_type", input: input2, inst });
54409
+ return payload2;
54410
+ }
54411
+ if (ctx.direction === "backward")
54412
+ ctx = { ...ctx, direction: "forward" };
54413
+ if (memo2)
54414
+ memo2.alloc(inst, payload2, input2, ctx);
54415
+ const result = runShape(payload2, ctx);
54416
+ return result instanceof Promise ? result.then(() => payload2) : payload2;
54417
+ };
54418
+ inst._zod.check = (payload2) => {
54419
+ if (payload2.value == null) {
54420
+ payload2.issues.push({ expected: "object", code: "invalid_type", input: payload2.value, inst });
54421
+ return void 0;
54422
+ }
54423
+ return runShape(payload2, {});
54424
+ };
54425
+ }, {
54426
+ *[Symbol.iterator]() {
54427
+ yield this;
54428
+ }
54429
+ });
54304
54430
 
54305
54431
  // node_modules/zod/v4/core/memoizer.js
54306
54432
  var $ZodCyclicError = class extends Error {
@@ -54311,31 +54437,59 @@ var $ZodCyclicError = class extends Error {
54311
54437
  };
54312
54438
  var STATE = "~memo";
54313
54439
  var NO_ISSUES = [];
54440
+ function isRef(value) {
54441
+ return value !== null && (typeof value === "object" || typeof value === "function");
54442
+ }
54314
54443
  function cloneIssues(issues) {
54315
54444
  return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
54316
54445
  }
54317
54446
  var recursive = /* @__PURE__ */ new WeakMap();
54318
- function isRecursive(inst, stack) {
54447
+ var NONE = 0;
54448
+ var ASSUMED = 1;
54449
+ var PROVEN = 2;
54450
+ function isRecursive(inst, stack, resolve) {
54319
54451
  const cached2 = recursive.get(inst);
54320
54452
  if (cached2 !== void 0)
54321
- return cached2;
54453
+ return cached2 ? PROVEN : NONE;
54322
54454
  if (stack.has(inst))
54323
- return true;
54455
+ return PROVEN;
54324
54456
  stack.add(inst);
54325
- let result = false;
54457
+ let result = NONE;
54326
54458
  const check2 = (child) => {
54327
- if (!result && child?._zod && isRecursive(child, stack))
54328
- result = true;
54459
+ if (result !== PROVEN && child?._zod) {
54460
+ const answer = isRecursive(child, stack, resolve);
54461
+ if (answer > result)
54462
+ result = answer;
54463
+ }
54464
+ };
54465
+ const shape = (sh, spread) => {
54466
+ let answer = NONE;
54467
+ for (const key of Reflect.ownKeys(sh)) {
54468
+ const desc = Object.getOwnPropertyDescriptor(sh, key);
54469
+ if (spread && !desc.enumerable)
54470
+ continue;
54471
+ const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
54472
+ if (child > answer)
54473
+ answer = child;
54474
+ }
54475
+ return answer;
54476
+ };
54477
+ const merge3 = (answer) => {
54478
+ if (answer > result)
54479
+ result = answer;
54329
54480
  };
54330
54481
  const def = inst._zod.def;
54331
54482
  const kind = def.type;
54332
54483
  switch (kind) {
54333
54484
  case "object": {
54334
- for (const key of Reflect.ownKeys(def.shape))
54335
- check2(def.shape[key]);
54485
+ const raw2 = rawShape(def);
54486
+ merge3(raw2 ? shape(raw2, true) : ASSUMED);
54336
54487
  check2(def.catchall);
54337
54488
  break;
54338
54489
  }
54490
+ case "properties":
54491
+ merge3(shape(def.shape, false));
54492
+ break;
54339
54493
  case "array":
54340
54494
  check2(def.element);
54341
54495
  break;
@@ -54379,10 +54533,12 @@ function isRecursive(inst, stack) {
54379
54533
  check2(def.input);
54380
54534
  check2(def.output);
54381
54535
  break;
54382
- // reading `_zod.innerType` resolves the getter once and caches it
54383
- case "lazy":
54384
- check2(inst._zod.innerType);
54536
+ // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
54537
+ case "lazy": {
54538
+ const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
54539
+ merge3(inner ? isRecursive(inner, stack, false) : ASSUMED);
54385
54540
  break;
54541
+ }
54386
54542
  // a leaf by choice: `parts` are regex fragments, not data positions
54387
54543
  case "template_literal":
54388
54544
  // leaves
@@ -54424,16 +54580,20 @@ function isRecursive(inst, stack) {
54424
54580
  }
54425
54581
  }
54426
54582
  stack.delete(inst);
54427
- recursive.set(inst, result);
54428
- return result;
54583
+ return settle(inst, result);
54584
+ }
54585
+ function settle(inst, answer) {
54586
+ if (answer !== ASSUMED)
54587
+ recursive.set(inst, answer === PROVEN);
54588
+ return answer;
54429
54589
  }
54430
54590
  function isRecursiveSchema(inst) {
54431
- return isRecursive(inst, /* @__PURE__ */ new Set());
54591
+ return isRecursive(inst, /* @__PURE__ */ new Set(), true) !== NONE;
54432
54592
  }
54433
54593
  function bucketFor(state2, inst) {
54434
54594
  let bucket = state2.buckets.get(inst);
54435
54595
  if (!bucket) {
54436
- bucket = /* @__PURE__ */ new Map();
54596
+ bucket = /* @__PURE__ */ new WeakMap();
54437
54597
  state2.buckets.set(inst, bucket);
54438
54598
  }
54439
54599
  return bucket;
@@ -54469,6 +54629,7 @@ var memo = {
54469
54629
  attach(inst) {
54470
54630
  var _a4;
54471
54631
  let isRecursiveInst;
54632
+ let rechecked = false;
54472
54633
  let lastCtx;
54473
54634
  let lastBucket;
54474
54635
  (_a4 = inst._zod).deferred ?? (_a4.deferred = []);
@@ -54476,20 +54637,24 @@ var memo = {
54476
54637
  const base = inst._zod.parse;
54477
54638
  const wrapped = (payload2, ctx) => {
54478
54639
  if (isRecursiveInst === void 0) {
54479
- isRecursiveInst = isRecursive(inst, /* @__PURE__ */ new Set());
54480
- if (!isRecursiveInst) {
54640
+ const walked = isRecursive(inst, /* @__PURE__ */ new Set(), false);
54641
+ if (walked === NONE) {
54481
54642
  inst._zod.parse = base;
54482
54643
  if (inst._zod.run === wrapped)
54483
54644
  inst._zod.run = base;
54484
54645
  return base(payload2, ctx);
54485
54646
  }
54647
+ if (walked === PROVEN || rechecked)
54648
+ isRecursiveInst = true;
54649
+ else
54650
+ rechecked = true;
54486
54651
  }
54487
54652
  const input2 = payload2.value;
54488
- if (input2 === null || typeof input2 !== "object")
54653
+ if (!isRef(input2))
54489
54654
  return base(payload2, ctx);
54490
54655
  let state2 = ctx[STATE];
54491
54656
  if (!state2) {
54492
- state2 = { buckets: /* @__PURE__ */ new Map(), backEdges: void 0 };
54657
+ state2 = { buckets: /* @__PURE__ */ new WeakMap(), backEdges: void 0 };
54493
54658
  ctx[STATE] = state2;
54494
54659
  }
54495
54660
  let bucket;
@@ -54508,7 +54673,7 @@ var memo = {
54508
54673
  payload2.issues.push(...cloneIssues(hit.issues));
54509
54674
  } else {
54510
54675
  payload2.memo = true;
54511
- state2.backEdges ?? (state2.backEdges = /* @__PURE__ */ new Set());
54676
+ state2.backEdges ?? (state2.backEdges = /* @__PURE__ */ new WeakSet());
54512
54677
  state2.backEdges.add(hit.value);
54513
54678
  }
54514
54679
  return payload2;
@@ -54540,7 +54705,7 @@ function memoizer() {
54540
54705
  }
54541
54706
  function isBackEdge(ctx, value) {
54542
54707
  const backEdges = ctx[STATE]?.backEdges;
54543
- return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
54708
+ return backEdges !== void 0 && isRef(value) && backEdges.has(value);
54544
54709
  }
54545
54710
 
54546
54711
  // node_modules/zod/v4/locales/index.js
@@ -54651,6 +54816,7 @@ var error = () => {
54651
54816
  json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
54652
54817
  e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
54653
54818
  credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
54819
+ iban: "IBAN",
54654
54820
  jwt: "JWT",
54655
54821
  template_literal: "\u0645\u062F\u062E\u0644"
54656
54822
  };
@@ -54761,6 +54927,7 @@ var error2 = () => {
54761
54927
  json_string: "JSON string",
54762
54928
  e164: "E.164 number",
54763
54929
  credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
54930
+ iban: "IBAN",
54764
54931
  jwt: "JWT",
54765
54932
  template_literal: "input"
54766
54933
  };
@@ -54920,6 +55087,7 @@ var error3 = () => {
54920
55087
  json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
54921
55088
  e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
54922
55089
  credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
55090
+ iban: "IBAN",
54923
55091
  jwt: "JWT",
54924
55092
  template_literal: "\u0443\u0432\u043E\u0434"
54925
55093
  };
@@ -55037,6 +55205,7 @@ var error4 = () => {
55037
55205
  json_string: "JSON \u043D\u0438\u0437",
55038
55206
  e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
55039
55207
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
55208
+ iban: "IBAN",
55040
55209
  jwt: "JWT",
55041
55210
  template_literal: "\u0432\u0445\u043E\u0434"
55042
55211
  };
@@ -55161,6 +55330,7 @@ var error5 = () => {
55161
55330
  json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
55162
55331
  e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
55163
55332
  credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
55333
+ iban: "IBAN",
55164
55334
  jwt: "JWT",
55165
55335
  template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
55166
55336
  };
@@ -55273,6 +55443,7 @@ var error6 = () => {
55273
55443
  json_string: "cadena JSON",
55274
55444
  e164: "n\xFAmero E.164",
55275
55445
  credit_card: "n\xFAmero de targeta de cr\xE8dit",
55446
+ iban: "IBAN",
55276
55447
  jwt: "JWT",
55277
55448
  template_literal: "entrada"
55278
55449
  };
@@ -55385,6 +55556,7 @@ var error7 = () => {
55385
55556
  json_string: "\u062F\u06D5\u0642\u06CC JSON",
55386
55557
  e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
55387
55558
  credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
55559
+ iban: "IBAN",
55388
55560
  jwt: "JWT",
55389
55561
  template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
55390
55562
  };
@@ -55516,6 +55688,7 @@ var error8 = () => {
55516
55688
  json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
55517
55689
  e164: "\u010D\xEDslo E.164",
55518
55690
  credit_card: "\u010D\xEDslo kreditn\xED karty",
55691
+ iban: "IBAN",
55519
55692
  jwt: "JWT",
55520
55693
  template_literal: "vstup"
55521
55694
  };
@@ -55631,6 +55804,7 @@ var error9 = () => {
55631
55804
  json_string: "JSON-streng",
55632
55805
  e164: "E.164-nummer",
55633
55806
  credit_card: "kreditkortnummer",
55807
+ iban: "IBAN",
55634
55808
  jwt: "JWT",
55635
55809
  template_literal: "input"
55636
55810
  };
@@ -55750,6 +55924,7 @@ var error10 = () => {
55750
55924
  json_string: "JSON-String",
55751
55925
  e164: "E.164-Nummer",
55752
55926
  credit_card: "Kreditkartennummer",
55927
+ iban: "IBAN",
55753
55928
  jwt: "JWT",
55754
55929
  template_literal: "Eingabe"
55755
55930
  };
@@ -55862,6 +56037,7 @@ var error11 = () => {
55862
56037
  json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
55863
56038
  e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
55864
56039
  credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
56040
+ iban: "IBAN",
55865
56041
  jwt: "JWT",
55866
56042
  template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
55867
56043
  };
@@ -55973,6 +56149,7 @@ var error12 = () => {
55973
56149
  json_string: "JSON string",
55974
56150
  e164: "E.164 number",
55975
56151
  credit_card: "credit card number",
56152
+ iban: "IBAN",
55976
56153
  jwt: "JWT",
55977
56154
  template_literal: "input"
55978
56155
  };
@@ -56096,6 +56273,7 @@ var error13 = () => {
56096
56273
  json_string: "JSON-karaktraro",
56097
56274
  e164: "E.164-nombro",
56098
56275
  credit_card: "kreditkarta numero",
56276
+ iban: "IBAN",
56099
56277
  jwt: "JWT",
56100
56278
  template_literal: "enigo"
56101
56279
  };
@@ -56208,6 +56386,7 @@ var error14 = () => {
56208
56386
  json_string: "cadena JSON",
56209
56387
  e164: "n\xFAmero E.164",
56210
56388
  credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
56389
+ iban: "IBAN",
56211
56390
  jwt: "JWT",
56212
56391
  template_literal: "entrada"
56213
56392
  };
@@ -56344,6 +56523,7 @@ var error15 = () => {
56344
56523
  json_string: "JSON \u0631\u0634\u062A\u0647",
56345
56524
  e164: "E.164 \u0639\u062F\u062F",
56346
56525
  credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
56526
+ iban: "IBAN",
56347
56527
  jwt: "JWT",
56348
56528
  template_literal: "\u0648\u0631\u0648\u062F\u06CC"
56349
56529
  };
@@ -56466,6 +56646,7 @@ var error16 = () => {
56466
56646
  json_string: "JSON-merkkijono",
56467
56647
  e164: "E.164-luku",
56468
56648
  credit_card: "luottokortin numero",
56649
+ iban: "IBAN",
56469
56650
  jwt: "JWT",
56470
56651
  template_literal: "templaattimerkkijono"
56471
56652
  };
@@ -56577,6 +56758,7 @@ var error17 = () => {
56577
56758
  json_string: "cha\xEEne de caract\xE8res JSON",
56578
56759
  e164: "num\xE9ro au format E.164",
56579
56760
  credit_card: "num\xE9ro de carte de cr\xE9dit",
56761
+ iban: "IBAN",
56580
56762
  jwt: "JWT",
56581
56763
  template_literal: "entr\xE9e"
56582
56764
  };
@@ -56706,6 +56888,7 @@ var error18 = () => {
56706
56888
  json_string: "cha\xEEne JSON",
56707
56889
  e164: "num\xE9ro E.164",
56708
56890
  credit_card: "num\xE9ro de carte de cr\xE9dit",
56891
+ iban: "IBAN",
56709
56892
  jwt: "JWT",
56710
56893
  template_literal: "entr\xE9e"
56711
56894
  };
@@ -56817,6 +57000,7 @@ var error19 = () => {
56817
57000
  json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
56818
57001
  e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
56819
57002
  credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
57003
+ iban: "IBAN",
56820
57004
  jwt: "JWT",
56821
57005
  template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
56822
57006
  };
@@ -56965,6 +57149,7 @@ var error20 = () => {
56965
57149
  json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
56966
57150
  e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
56967
57151
  credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
57152
+ iban: { label: "IBAN", gender: "m" },
56968
57153
  jwt: { label: "JWT", gender: "m" },
56969
57154
  template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
56970
57155
  ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
@@ -57129,6 +57314,7 @@ var error21 = () => {
57129
57314
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
57130
57315
  e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
57131
57316
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
57317
+ iban: "IBAN",
57132
57318
  jwt: "JWT",
57133
57319
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
57134
57320
  };
@@ -57238,6 +57424,7 @@ var error22 = () => {
57238
57424
  json_string: "JSON tekst",
57239
57425
  e164: "E.164 broj",
57240
57426
  credit_card: "broj kreditne kartice",
57427
+ iban: "IBAN",
57241
57428
  jwt: "JWT",
57242
57429
  template_literal: "unos"
57243
57430
  };
@@ -57364,6 +57551,7 @@ var error23 = () => {
57364
57551
  json_string: "JSON string",
57365
57552
  e164: "E.164 sz\xE1m",
57366
57553
  credit_card: "hitelk\xE1rtyasz\xE1m",
57554
+ iban: "IBAN",
57367
57555
  jwt: "JWT",
57368
57556
  template_literal: "bemenet"
57369
57557
  };
@@ -57516,6 +57704,7 @@ var error24 = () => {
57516
57704
  json_string: "JSON \u057F\u0578\u0572",
57517
57705
  e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
57518
57706
  credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
57707
+ iban: "IBAN",
57519
57708
  jwt: "JWT",
57520
57709
  template_literal: "\u0574\u0578\u0582\u057F\u0584"
57521
57710
  };
@@ -57633,6 +57822,7 @@ var error25 = () => {
57633
57822
  json_string: "string JSON",
57634
57823
  e164: "angka E.164",
57635
57824
  credit_card: "nomor kartu kredit",
57825
+ iban: "IBAN",
57636
57826
  jwt: "JWT",
57637
57827
  template_literal: "input"
57638
57828
  };
@@ -57743,6 +57933,7 @@ var error26 = () => {
57743
57933
  json_string: "JSON strengur",
57744
57934
  e164: "E.164 t\xF6lugildi",
57745
57935
  credit_card: "kreditkortan\xFAmer",
57936
+ iban: "IBAN",
57746
57937
  jwt: "JWT",
57747
57938
  template_literal: "gildi"
57748
57939
  };
@@ -57856,6 +58047,7 @@ var error27 = () => {
57856
58047
  json_string: "stringa JSON",
57857
58048
  e164: "numero E.164",
57858
58049
  credit_card: "numero di carta di credito",
58050
+ iban: "IBAN",
57859
58051
  jwt: "JWT",
57860
58052
  template_literal: "input"
57861
58053
  };
@@ -57968,6 +58160,7 @@ var error28 = () => {
57968
58160
  json_string: "JSON\u6587\u5B57\u5217",
57969
58161
  e164: "E.164\u756A\u53F7",
57970
58162
  credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
58163
+ iban: "IBAN",
57971
58164
  jwt: "JWT",
57972
58165
  template_literal: "\u5165\u529B\u5024"
57973
58166
  };
@@ -58079,6 +58272,7 @@ var error29 = () => {
58079
58272
  json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
58080
58273
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
58081
58274
  credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
58275
+ iban: "IBAN",
58082
58276
  jwt: "JWT",
58083
58277
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
58084
58278
  };
@@ -58195,6 +58389,7 @@ var error30 = () => {
58195
58389
  json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
58196
58390
  e164: "\u179B\u17C1\u1781 E.164",
58197
58391
  credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
58392
+ iban: "IBAN",
58198
58393
  jwt: "JWT",
58199
58394
  template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
58200
58395
  };
@@ -58314,6 +58509,7 @@ var error31 = () => {
58314
58509
  json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
58315
58510
  e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
58316
58511
  credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
58512
+ iban: "IBAN",
58317
58513
  jwt: "JWT",
58318
58514
  template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
58319
58515
  };
@@ -58428,6 +58624,7 @@ var error32 = () => {
58428
58624
  json_string: "JSON \uBB38\uC790\uC5F4",
58429
58625
  e164: "E.164 \uBC88\uD638",
58430
58626
  credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
58627
+ iban: "IBAN",
58431
58628
  jwt: "JWT",
58432
58629
  template_literal: "\uC785\uB825"
58433
58630
  };
@@ -58625,6 +58822,7 @@ var error33 = () => {
58625
58822
  json_string: "JSON eilut\u0117",
58626
58823
  e164: "E.164 numeris",
58627
58824
  credit_card: "kredito kortel\u0117s numeris",
58825
+ iban: "IBAN",
58628
58826
  jwt: "JWT",
58629
58827
  template_literal: "\u012Fvestis"
58630
58828
  };
@@ -58749,6 +58947,7 @@ var error34 = () => {
58749
58947
  json_string: "JSON \u043D\u0438\u0437\u0430",
58750
58948
  e164: "E.164 \u0431\u0440\u043E\u0458",
58751
58949
  credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
58950
+ iban: "IBAN",
58752
58951
  jwt: "JWT",
58753
58952
  template_literal: "\u0432\u043D\u0435\u0441"
58754
58953
  };
@@ -58862,6 +59061,7 @@ var error35 = () => {
58862
59061
  json_string: "string JSON",
58863
59062
  e164: "nombor E.164",
58864
59063
  credit_card: "nombor kad kredit",
59064
+ iban: "IBAN",
58865
59065
  jwt: "JWT",
58866
59066
  template_literal: "input"
58867
59067
  };
@@ -58973,6 +59173,7 @@ var error36 = () => {
58973
59173
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
58974
59174
  e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
58975
59175
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
59176
+ iban: "IBAN",
58976
59177
  jwt: "JWT",
58977
59178
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
58978
59179
  };
@@ -59083,6 +59284,7 @@ var error37 = () => {
59083
59284
  json_string: "JSON string",
59084
59285
  e164: "E.164-nummer",
59085
59286
  credit_card: "creditcardnummer",
59287
+ iban: "IBAN",
59086
59288
  jwt: "JWT",
59087
59289
  template_literal: "invoer"
59088
59290
  };
@@ -59197,6 +59399,7 @@ var error38 = () => {
59197
59399
  json_string: "JSON-streng",
59198
59400
  e164: "E.164-nummer",
59199
59401
  credit_card: "kredittkortnummer",
59402
+ iban: "IBAN",
59200
59403
  jwt: "JWT",
59201
59404
  template_literal: "input"
59202
59405
  };
@@ -59309,6 +59512,7 @@ var error39 = () => {
59309
59512
  json_string: "JSON-streng",
59310
59513
  e164: "E.164-nummer",
59311
59514
  credit_card: "kredittkortnummer",
59515
+ iban: "IBAN",
59312
59516
  jwt: "JWT",
59313
59517
  template_literal: "input"
59314
59518
  };
@@ -59421,6 +59625,7 @@ var error40 = () => {
59421
59625
  json_string: "JSON metin",
59422
59626
  e164: "E.164 say\u0131s\u0131",
59423
59627
  credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
59628
+ iban: "IBAN",
59424
59629
  jwt: "JWT",
59425
59630
  template_literal: "giren"
59426
59631
  };
@@ -59534,6 +59739,7 @@ var error41 = () => {
59534
59739
  json_string: "JSON \u0645\u062A\u0646",
59535
59740
  e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
59536
59741
  credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
59742
+ iban: "IBAN",
59537
59743
  jwt: "JWT",
59538
59744
  template_literal: "\u0648\u0631\u0648\u062F\u064A"
59539
59745
  };
@@ -59652,6 +59858,7 @@ var error42 = () => {
59652
59858
  json_string: "ci\u0105g znak\xF3w w formacie JSON",
59653
59859
  e164: "liczba E.164",
59654
59860
  credit_card: "numer karty kredytowej",
59861
+ iban: "IBAN",
59655
59862
  jwt: "JWT",
59656
59863
  template_literal: "wej\u015Bcie"
59657
59864
  };
@@ -59765,6 +59972,7 @@ var error43 = () => {
59765
59972
  json_string: "o texto JSON",
59766
59973
  e164: "o n\xFAmero E.164",
59767
59974
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
59975
+ iban: "o IBAN",
59768
59976
  jwt: "o JWT",
59769
59977
  template_literal: "a entrada"
59770
59978
  };
@@ -59842,8 +60050,8 @@ var error43 = () => {
59842
60050
  case "not_multiple_of":
59843
60051
  return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
59844
60052
  case "unrecognized_keys": {
59845
- const plural = issue2.keys.length > 1 ? "s" : "";
59846
- return `Chave${plural} inv\xE1lida${plural}: ${joinValues(issue2.keys, ", ")}`;
60053
+ const plural2 = issue2.keys.length > 1 ? "s" : "";
60054
+ return `Chave${plural2} inv\xE1lida${plural2}: ${joinValues(issue2.keys, ", ")}`;
59847
60055
  }
59848
60056
  case "invalid_key":
59849
60057
  return `Entrada inv\xE1lida n${translateOriginWithArticle(issue2.origin, "definite")}`;
@@ -59907,6 +60115,7 @@ var error44 = () => {
59907
60115
  json_string: "o texto JSON",
59908
60116
  e164: "o n\xFAmero E.164",
59909
60117
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
60118
+ iban: "o IBAN",
59910
60119
  jwt: "o JWT",
59911
60120
  template_literal: "a entrada"
59912
60121
  };
@@ -59985,8 +60194,8 @@ var error44 = () => {
59985
60194
  case "not_multiple_of":
59986
60195
  return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
59987
60196
  case "unrecognized_keys": {
59988
- const plural = issue2.keys.length > 1 ? "s" : "";
59989
- return `Chave${plural} inv\xE1lida${plural}: ${joinValues(issue2.keys, ", ")}`;
60197
+ const plural2 = issue2.keys.length > 1 ? "s" : "";
60198
+ return `Chave${plural2} inv\xE1lida${plural2}: ${joinValues(issue2.keys, ", ")}`;
59990
60199
  }
59991
60200
  case "invalid_key":
59992
60201
  return `Entrada inv\xE1lida n${translateOriginWithArticle(issue2.origin, "definite")}`;
@@ -60050,6 +60259,7 @@ var error45 = () => {
60050
60259
  json_string: "\u0219ir JSON",
60051
60260
  e164: "num\u0103r E.164",
60052
60261
  credit_card: "num\u0103r de card de credit",
60262
+ iban: "IBAN",
60053
60263
  jwt: "JWT",
60054
60264
  template_literal: "intrare"
60055
60265
  };
@@ -60221,6 +60431,7 @@ var error46 = () => {
60221
60431
  json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
60222
60432
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
60223
60433
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
60434
+ iban: "IBAN",
60224
60435
  jwt: "JWT",
60225
60436
  template_literal: "\u0432\u0432\u043E\u0434"
60226
60437
  };
@@ -60338,6 +60549,7 @@ var error47 = () => {
60338
60549
  json_string: "re\u0165azec vo form\xE1te JSON",
60339
60550
  e164: "\u010D\xEDslo E.164",
60340
60551
  credit_card: "\u010D\xEDslo kreditnej karty",
60552
+ iban: "IBAN",
60341
60553
  jwt: "JWT",
60342
60554
  template_literal: "vstup"
60343
60555
  };
@@ -60453,6 +60665,7 @@ var error48 = () => {
60453
60665
  json_string: "JSON niz",
60454
60666
  e164: "E.164 \u0161tevilka",
60455
60667
  credit_card: "\u0161tevilka kreditne kartice",
60668
+ iban: "IBAN",
60456
60669
  jwt: "JWT",
60457
60670
  template_literal: "vnos"
60458
60671
  };
@@ -60566,6 +60779,7 @@ var error49 = () => {
60566
60779
  json_string: "JSON-str\xE4ng",
60567
60780
  e164: "E.164-nummer",
60568
60781
  credit_card: "kreditkortsnummer",
60782
+ iban: "IBAN",
60569
60783
  jwt: "JWT",
60570
60784
  template_literal: "mall-literal"
60571
60785
  };
@@ -60680,6 +60894,7 @@ var error50 = () => {
60680
60894
  json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
60681
60895
  e164: "E.164 \u0B8E\u0BA3\u0BCD",
60682
60896
  credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
60897
+ iban: "IBAN",
60683
60898
  jwt: "JWT",
60684
60899
  template_literal: "input"
60685
60900
  };
@@ -60794,6 +61009,7 @@ var error51 = () => {
60794
61009
  json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
60795
61010
  e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
60796
61011
  credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
61012
+ iban: "IBAN",
60797
61013
  jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
60798
61014
  template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
60799
61015
  };
@@ -60908,6 +61124,7 @@ var error52 = () => {
60908
61124
  json_string: "JSON setiri",
60909
61125
  e164: "E.164 nomeri",
60910
61126
  credit_card: "kredit kartyny\u0148 nomeri",
61127
+ iban: "IBAN",
60911
61128
  jwt: "JWT",
60912
61129
  template_literal: "\u015Fablon"
60913
61130
  };
@@ -61014,6 +61231,7 @@ var error53 = () => {
61014
61231
  json_string: "JSON dizesi",
61015
61232
  e164: "E.164 say\u0131s\u0131",
61016
61233
  credit_card: "kredi kart\u0131 numaras\u0131",
61234
+ iban: "IBAN",
61017
61235
  jwt: "JWT",
61018
61236
  template_literal: "\u015Eablon dizesi"
61019
61237
  };
@@ -61123,6 +61341,7 @@ var error54 = () => {
61123
61341
  json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
61124
61342
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
61125
61343
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
61344
+ iban: "IBAN",
61126
61345
  jwt: "JWT",
61127
61346
  template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
61128
61347
  };
@@ -61240,6 +61459,7 @@ var error55 = () => {
61240
61459
  json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
61241
61460
  e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
61242
61461
  credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
61462
+ iban: "IBAN",
61243
61463
  jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
61244
61464
  template_literal: "\u0627\u0646 \u067E\u0679"
61245
61465
  };
@@ -61354,6 +61574,7 @@ var error56 = () => {
61354
61574
  json_string: "JSON satr",
61355
61575
  e164: "E.164 raqam",
61356
61576
  credit_card: "kredit karta raqami",
61577
+ iban: "IBAN",
61357
61578
  jwt: "JWT",
61358
61579
  template_literal: "kirish"
61359
61580
  };
@@ -61466,6 +61687,7 @@ var error57 = () => {
61466
61687
  json_string: "chu\u1ED7i JSON",
61467
61688
  e164: "s\u1ED1 E.164",
61468
61689
  credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
61690
+ iban: "IBAN",
61469
61691
  jwt: "JWT",
61470
61692
  template_literal: "\u0111\u1EA7u v\xE0o"
61471
61693
  };
@@ -61578,6 +61800,7 @@ var error58 = () => {
61578
61800
  json_string: "JSON\u5B57\u7B26\u4E32",
61579
61801
  e164: "E.164\u53F7\u7801",
61580
61802
  credit_card: "\u4FE1\u7528\u5361\u53F7",
61803
+ iban: "IBAN",
61581
61804
  jwt: "JWT",
61582
61805
  template_literal: "\u8F93\u5165"
61583
61806
  };
@@ -61691,6 +61914,7 @@ var error59 = () => {
61691
61914
  json_string: "JSON \u5B57\u4E32",
61692
61915
  e164: "E.164 \u6578\u503C",
61693
61916
  credit_card: "\u4FE1\u7528\u5361\u865F",
61917
+ iban: "IBAN",
61694
61918
  jwt: "JWT",
61695
61919
  template_literal: "\u8F38\u5165"
61696
61920
  };
@@ -61802,6 +62026,7 @@ var error60 = () => {
61802
62026
  json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
61803
62027
  e164: "n\u1ECD\u0301mb\xE0 E.164",
61804
62028
  credit_card: "n\u1ECDmba kaadi gbese",
62029
+ iban: "IBAN",
61805
62030
  jwt: "JWT",
61806
62031
  template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
61807
62032
  };
@@ -61948,31 +62173,8 @@ function compileValidator(schema, parser) {
61948
62173
  function compile(schema, options) {
61949
62174
  try {
61950
62175
  const parser = compileFn(schema);
61951
- const clone2 = clone(schema);
61952
- const liveRun = schema._zod.run;
61953
- const originalRun = liveRun.__originalRun ?? liveRun;
61954
- const wrapped = (payload2, ctx) => {
61955
- if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
61956
- return originalRun(payload2, ctx);
61957
- }
61958
- if (ctx && isBackEdge(ctx, payload2.value)) {
61959
- return originalRun(payload2, ctx);
61960
- }
61961
- const out = parser(payload2.value);
61962
- if (out !== INVALID) {
61963
- payload2.value = out;
61964
- return payload2;
61965
- }
61966
- if (ctx)
61967
- ctx[FALLBACK_FLAG] = true;
61968
- return originalRun(payload2, ctx);
61969
- };
61970
- wrapped.__originalRun = originalRun;
61971
- clone2._zod.bag.fallbackRun = originalRun;
62176
+ const clone2 = withParser(schema, parser);
61972
62177
  clone2._zod.bag.validator = compileValidator(schema, parser);
61973
- clone2._zod.run = wrapped;
61974
- if (!liveRun.__originalRun)
61975
- installCompiledUserMethods(clone2, schema, parser);
61976
62178
  return clone2;
61977
62179
  } catch (err) {
61978
62180
  if (options?.strict)
@@ -61980,6 +62182,37 @@ function compile(schema, options) {
61980
62182
  return schema;
61981
62183
  }
61982
62184
  }
62185
+ function withParser(schema, parser) {
62186
+ if (isRecursiveSchema(schema)) {
62187
+ throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");
62188
+ }
62189
+ const clone2 = clone(schema);
62190
+ const liveRun = schema._zod.run;
62191
+ const originalRun = liveRun.__originalRun ?? liveRun;
62192
+ const wrapped = (payload2, ctx) => {
62193
+ if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
62194
+ return originalRun(payload2, ctx);
62195
+ }
62196
+ if (ctx && isBackEdge(ctx, payload2.value)) {
62197
+ return originalRun(payload2, ctx);
62198
+ }
62199
+ const out = parser(payload2.value);
62200
+ if (out !== INVALID) {
62201
+ payload2.value = out;
62202
+ return payload2;
62203
+ }
62204
+ if (ctx)
62205
+ ctx[FALLBACK_FLAG] = true;
62206
+ return originalRun(payload2, ctx);
62207
+ };
62208
+ wrapped.__originalRun = originalRun;
62209
+ clone2._zod.bag.fallbackRun = originalRun;
62210
+ clone2._zod.bag.validator = parser;
62211
+ clone2._zod.run = wrapped;
62212
+ if (!liveRun.__originalRun)
62213
+ installCompiledUserMethods(clone2, schema, parser);
62214
+ return clone2;
62215
+ }
61983
62216
  function installCompiledUserMethods(target, source, parser) {
61984
62217
  const targetAny = target;
61985
62218
  const sourceAny = source;
@@ -62016,7 +62249,8 @@ function compileFn(schema, options) {
62016
62249
  const ctx = {
62017
62250
  constants: /* @__PURE__ */ new Map(),
62018
62251
  constantCounter: 0,
62019
- varCounter: 0
62252
+ varCounter: 0,
62253
+ definite: true
62020
62254
  };
62021
62255
  const doc = new Doc(["input"]);
62022
62256
  const outputAccessor = generateCheck(doc, ctx, schema, "input", !options?.assertOnly);
@@ -62040,6 +62274,7 @@ ${code}
62040
62274
  if (options?.debug) {
62041
62275
  fn.code = fullCode;
62042
62276
  }
62277
+ fn.definite = ctx.definite;
62043
62278
  return fn;
62044
62279
  }
62045
62280
  function addConstant(ctx, value) {
@@ -62051,6 +62286,10 @@ function addConstant(ctx, value) {
62051
62286
  ctx.constants.set(name, value);
62052
62287
  return name;
62053
62288
  }
62289
+ function addUserConstant(ctx, fn) {
62290
+ ctx.definite = false;
62291
+ return addConstant(ctx, fn);
62292
+ }
62054
62293
  function newVar(ctx) {
62055
62294
  return `v${ctx.varCounter++}`;
62056
62295
  }
@@ -62083,6 +62322,7 @@ function compileChild(doc, ctx, schema, accessor, needsValue = true) {
62083
62322
  }
62084
62323
  }
62085
62324
  function emitRuntimeIsland(doc, ctx, schema, accessor) {
62325
+ ctx.definite = false;
62086
62326
  const schemaConst = addConstant(ctx, schema);
62087
62327
  const runConst = addConstant(ctx, runtimeRun);
62088
62328
  const outVar = newVar(ctx);
@@ -62163,6 +62403,9 @@ function generateChecks(doc, ctx, schema, accessor) {
62163
62403
  case "property":
62164
62404
  generatePropertyCheck(doc, ctx, def, currentAccessor);
62165
62405
  break;
62406
+ case "properties":
62407
+ generatePropertiesChecks(doc, ctx, def, currentAccessor, false);
62408
+ break;
62166
62409
  case "overwrite": {
62167
62410
  const newAccessor = newVar(ctx);
62168
62411
  generateOverwriteCheck(doc, ctx, check2, currentAccessor, newAccessor);
@@ -62271,6 +62514,19 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
62271
62514
  doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
62272
62515
  }
62273
62516
  }
62517
+ function generatePropertiesChecks(doc, ctx, def, accessor, schemaRole) {
62518
+ if (def.when) {
62519
+ throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
62520
+ }
62521
+ doc.write(schemaRole ? `if (${accessor} === null || (typeof ${accessor} !== "object" && typeof ${accessor} !== "function")) return INVALID;` : `if (${accessor} == null) return INVALID;`);
62522
+ const shape = def.shape;
62523
+ for (const key of Reflect.ownKeys(shape)) {
62524
+ const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
62525
+ const inputVar = newVar(ctx);
62526
+ doc.write(`const ${inputVar} = ${accessor}[${keyExpr}];`);
62527
+ compileChild(doc, ctx, shape[key], inputVar, false);
62528
+ }
62529
+ }
62274
62530
  function generatePropertyCheck(doc, ctx, def, accessor) {
62275
62531
  const propAccessor = `${accessor}[${JSON.stringify(def.property)}]`;
62276
62532
  generateCheck(doc, ctx, def.schema, propAccessor);
@@ -62298,7 +62554,7 @@ function generateCustomRefineCheck(doc, ctx, check2, accessor) {
62298
62554
  if (isAsyncFunction(def.fn)) {
62299
62555
  throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");
62300
62556
  }
62301
- const fnConst = addConstant(ctx, def.fn);
62557
+ const fnConst = addUserConstant(ctx, def.fn);
62302
62558
  const throwAsyncConst = addConstant(ctx, throwAsync);
62303
62559
  const resVar = newVar(ctx);
62304
62560
  doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
@@ -62318,7 +62574,7 @@ function generateCustomRefineCheck(doc, ctx, check2, accessor) {
62318
62574
  throwAsync();
62319
62575
  return fakePayload.issues.length === 0 ? fakePayload.value : INVALID;
62320
62576
  };
62321
- const helperConst = addConstant(ctx, helperFn);
62577
+ const helperConst = addUserConstant(ctx, helperFn);
62322
62578
  const outVar = newVar(ctx);
62323
62579
  doc.write(`const ${outVar} = ${helperConst}(${accessor});`);
62324
62580
  doc.write(`if (${outVar} === INVALID) return INVALID;`);
@@ -62385,6 +62641,11 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
62385
62641
  doc.write(`if (!${validator}(${accessor})) return INVALID;`);
62386
62642
  return accessor;
62387
62643
  }
62644
+ if (fmt === "iban") {
62645
+ const validator = addConstant(ctx, isValidIBAN);
62646
+ doc.write(`if (!${validator}(${accessor})) return INVALID;`);
62647
+ return accessor;
62648
+ }
62388
62649
  const formatDef = def;
62389
62650
  if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
62390
62651
  const parseConst = addConstant(ctx, parseURLObject);
@@ -62567,6 +62828,10 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
62567
62828
  case "custom":
62568
62829
  typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);
62569
62830
  break;
62831
+ case "properties":
62832
+ generatePropertiesChecks(doc, ctx, schema._zod.def, accessor, true);
62833
+ typeAccessor = accessor;
62834
+ break;
62570
62835
  case "transform":
62571
62836
  typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);
62572
62837
  break;
@@ -63207,6 +63472,7 @@ function literalEquality(ctx, accessor, value) {
63207
63472
  }
63208
63473
  function generateIntersectionCheck(doc, ctx, schema, accessor) {
63209
63474
  const def = schema._zod.def;
63475
+ ctx.definite = false;
63210
63476
  const leftOutput = compileChild(doc, ctx, def.left, accessor);
63211
63477
  const rightOutput = compileChild(doc, ctx, def.right, accessor);
63212
63478
  const mergeConst = addConstant(ctx, mergeValues);
@@ -63260,14 +63526,13 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
63260
63526
  const keyIsBareString = keyDef.type === "string" && keyDef.format === void 0 && !keyDef.coerce && (keyDef.checks?.length ?? 0) === 0;
63261
63527
  if (!keyIsBareString) {
63262
63528
  const isLoose = def.mode === "loose";
63263
- const keyFast = addConstant(ctx, compileFn(def.keyType));
63529
+ const keyFn = compileFn(def.keyType);
63530
+ if (keyFn.definite === false)
63531
+ ctx.definite = false;
63532
+ const keyFast = addConstant(ctx, keyFn);
63264
63533
  const numericConst = addConstant(ctx, number);
63265
- const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
63266
63534
  const outKeyVar = newVar(ctx);
63267
- doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);
63268
- doc.indented((d5) => {
63269
- d5.write(`if (${kVar} === "__proto__") continue;`);
63270
- d5.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
63535
+ emitOwnKeys(doc, ctx, accessor, kVar, (d5) => {
63271
63536
  d5.write(`let ${outKeyVar} = ${keyFast}(${kVar});`);
63272
63537
  d5.write(`if (${outKeyVar} === INVALID && typeof ${kVar} === "string" && ${numericConst}.test(${kVar})) ${outKeyVar} = ${keyFast}(Number(${kVar}));`);
63273
63538
  if (isLoose) {
@@ -63281,21 +63546,39 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
63281
63546
  const valOutput = compileChild(d5, ctx, def.valueType, valueVar);
63282
63547
  d5.write(`${outputVar}[${outKeyVar}] = ${valOutput};`);
63283
63548
  });
63284
- doc.write(`}`);
63285
63549
  return outputVar;
63286
63550
  }
63287
- const propIsEnumerable = addConstant(ctx, Object.prototype.propertyIsEnumerable);
63288
- doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);
63289
- doc.indented((d5) => {
63290
- d5.write(`if (${kVar} === "__proto__") continue;`);
63291
- d5.write(`if (!${propIsEnumerable}.call(${accessor}, ${kVar})) continue;`);
63292
- d5.write(`if (typeof ${kVar} !== "string") return INVALID;`);
63551
+ emitOwnKeys(doc, ctx, accessor, kVar, (d5) => {
63293
63552
  d5.write(`const ${valVar} = ${accessor}[${kVar}];`);
63294
63553
  const valOutput = compileChild(d5, ctx, def.valueType, valVar);
63295
63554
  d5.write(`${outputVar}[${kVar}] = ${valOutput};`);
63555
+ }, `return INVALID;`);
63556
+ return outputVar;
63557
+ }
63558
+ function emitOwnKeys(doc, ctx, accessor, kVar, body, onSymbol) {
63559
+ const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
63560
+ const symsVar = newVar(ctx);
63561
+ const keysVar = newVar(ctx);
63562
+ const iVar = newVar(ctx);
63563
+ doc.write(`const ${symsVar} = Object.getOwnPropertySymbols(${accessor});`);
63564
+ doc.write(`const ${keysVar} = Object.getOwnPropertyNames(${accessor});`);
63565
+ doc.write(`for (let ${iVar} = 0; ${iVar} < ${keysVar}.length; ${iVar}++) {`);
63566
+ doc.indented((d5) => {
63567
+ d5.write(`const ${kVar} = ${keysVar}[${iVar}];`);
63568
+ d5.write(`if (${kVar} === "__proto__" || !${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
63569
+ body(d5);
63570
+ });
63571
+ doc.write(`}`);
63572
+ doc.write(`for (let ${iVar} = 0; ${iVar} < ${symsVar}.length; ${iVar}++) {`);
63573
+ doc.indented((d5) => {
63574
+ d5.write(`const ${kVar} = ${symsVar}[${iVar}];`);
63575
+ d5.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
63576
+ if (onSymbol)
63577
+ d5.write(onSymbol);
63578
+ else
63579
+ body(d5);
63296
63580
  });
63297
63581
  doc.write(`}`);
63298
- return outputVar;
63299
63582
  }
63300
63583
  function literalPropertyKey(ctx, key) {
63301
63584
  if (typeof key === "string")
@@ -63348,7 +63631,7 @@ function generateTemplateLiteralCheck(doc, ctx, schema, accessor) {
63348
63631
  }
63349
63632
  function generateLazyCheck(doc, ctx, schema, accessor) {
63350
63633
  const def = schema._zod.def;
63351
- const getterConst = addConstant(ctx, def.getter);
63634
+ const getterConst = addUserConstant(ctx, def.getter);
63352
63635
  const cacheConst = addConstant(ctx, { parser: null });
63353
63636
  doc.write(`if (!${cacheConst}.parser) {`);
63354
63637
  doc.indented((d5) => {
@@ -63381,7 +63664,7 @@ function generatePipeCheck(doc, ctx, schema, accessor) {
63381
63664
  return INVALID;
63382
63665
  return fakePayload.issues.length === 0 ? result : INVALID;
63383
63666
  };
63384
- const helperConst = addConstant(ctx, helperFn);
63667
+ const helperConst = addUserConstant(ctx, helperFn);
63385
63668
  const transformedVar = newVar(ctx);
63386
63669
  doc.write(`const ${transformedVar} = ${helperConst}(${inputOutput});`);
63387
63670
  doc.write(`if (${transformedVar} === INVALID) return INVALID;`);
@@ -63399,7 +63682,7 @@ function generateCustomCheck(doc, ctx, schema, accessor) {
63399
63682
  if (isAsyncFunction(def.fn)) {
63400
63683
  throw new ZodCompileAsyncError("z.compile: async custom predicates are not supported");
63401
63684
  }
63402
- const fnConst = addConstant(ctx, def.fn);
63685
+ const fnConst = addUserConstant(ctx, def.fn);
63403
63686
  const throwAsyncConst = addConstant(ctx, throwAsync);
63404
63687
  const resVar = newVar(ctx);
63405
63688
  doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
@@ -63432,7 +63715,7 @@ function generateCatchCheck(doc, ctx, schema, accessor) {
63432
63715
  });
63433
63716
  doc.write(`})();`);
63434
63717
  const innerConst = addConstant(ctx, def.innerType);
63435
- const catchConst = addConstant(ctx, def.catchValue);
63718
+ const catchConst = addUserConstant(ctx, def.catchValue);
63436
63719
  const catchHelperConst = addConstant(ctx, runtimeCatch);
63437
63720
  doc.write(`if (${outputVar} === INVALID) {`);
63438
63721
  doc.indented((d5) => {
@@ -63456,7 +63739,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
63456
63739
  return INVALID;
63457
63740
  return fakePayload.issues.length === 0 ? result : INVALID;
63458
63741
  };
63459
- const helperConst = addConstant(ctx, helperFn);
63742
+ const helperConst = addUserConstant(ctx, helperFn);
63460
63743
  const outputVar = newVar(ctx);
63461
63744
  doc.write(`const ${outputVar} = ${helperConst}(${accessor});`);
63462
63745
  doc.write(`if (${outputVar} === INVALID) return INVALID;`);
@@ -63715,6 +63998,16 @@ function _creditCard(Class2, params) {
63715
63998
  });
63716
63999
  }
63717
64000
  // @__NO_SIDE_EFFECTS__
64001
+ function _iban(Class2, params) {
64002
+ return new Class2({
64003
+ type: "string",
64004
+ format: "iban",
64005
+ check: "string_format",
64006
+ abort: false,
64007
+ ...normalizeParams(params)
64008
+ });
64009
+ }
64010
+ // @__NO_SIDE_EFFECTS__
63718
64011
  function _jwt(Class2, params) {
63719
64012
  return new Class2({
63720
64013
  type: "string",
@@ -64128,8 +64421,13 @@ function _property(property, schema, params) {
64128
64421
  });
64129
64422
  }
64130
64423
  // @__NO_SIDE_EFFECTS__
64131
- function _properties(shape) {
64132
- return Object.entries(shape).map(([property, schema]) => new $ZodCheckProperty({ check: "property", property, schema }));
64424
+ function _properties(Class2, shape, params) {
64425
+ return new Class2({
64426
+ type: "properties",
64427
+ check: "properties",
64428
+ shape,
64429
+ ...normalizeParams(params)
64430
+ });
64133
64431
  }
64134
64432
  // @__NO_SIDE_EFFECTS__
64135
64433
  function _mime(types, params) {
@@ -64566,7 +64864,7 @@ function handleUnrepresentable(schema, ctx, json2, params, message) {
64566
64864
  Object.assign(json2, result);
64567
64865
  return true;
64568
64866
  }
64569
- function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
64867
+ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
64570
64868
  var _a4;
64571
64869
  const def = schema._zod.def;
64572
64870
  const seen = ctx.seen.get(schema);
@@ -64605,7 +64903,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
64605
64903
  if (parent) {
64606
64904
  if (!result.ref)
64607
64905
  result.ref = parent;
64608
- process2(parent, ctx, params);
64906
+ processSchema(parent, ctx, params);
64609
64907
  ctx.seen.get(parent).isParent = true;
64610
64908
  }
64611
64909
  }
@@ -64712,7 +65010,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
64712
65010
  if (seen.count > 1) {
64713
65011
  if (ctx.reused === "ref") {
64714
65012
  extractToDef(entry);
64715
- continue;
64716
65013
  }
64717
65014
  }
64718
65015
  }
@@ -64761,11 +65058,11 @@ function foldObjects(members2) {
64761
65058
  }
64762
65059
  objects.push(member2);
64763
65060
  }
64764
- const properties = {};
65061
+ const properties2 = {};
64765
65062
  const required2 = /* @__PURE__ */ new Set();
64766
65063
  for (const object2 of objects) {
64767
65064
  for (const key in object2.properties) {
64768
- if (Object.prototype.hasOwnProperty.call(properties, key))
65065
+ if (Object.prototype.hasOwnProperty.call(properties2, key))
64769
65066
  continue;
64770
65067
  const parts = [];
64771
65068
  for (const other of objects) {
@@ -64776,12 +65073,12 @@ function foldObjects(members2) {
64776
65073
  parts.push(part);
64777
65074
  }
64778
65075
  const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
64779
- assignProp(properties, key, merged);
65076
+ assignProp(properties2, key, merged);
64780
65077
  }
64781
65078
  for (const key of object2.required ?? [])
64782
65079
  required2.add(key);
64783
65080
  }
64784
- const folded = { type: "object", properties };
65081
+ const folded = { type: "object", properties: properties2 };
64785
65082
  if (required2.size)
64786
65083
  folded.required = [...required2];
64787
65084
  if (objects.every((object2) => object2.additionalProperties === false)) {
@@ -65040,19 +65337,107 @@ function isTransforming(_schema, _ctx) {
65040
65337
  }
65041
65338
  var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
65042
65339
  const ctx = initializeContext({ ...params, processors });
65043
- process2(schema, ctx);
65340
+ processSchema(schema, ctx);
65044
65341
  extractDefs(ctx, schema);
65045
65342
  return finalize(ctx, schema);
65046
65343
  };
65047
65344
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
65048
65345
  const { libraryOptions, target } = params ?? {};
65049
65346
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
65050
- process2(schema, ctx);
65347
+ processSchema(schema, ctx);
65051
65348
  extractDefs(ctx, schema);
65052
65349
  return finalize(ctx, schema);
65053
65350
  };
65054
65351
 
65055
65352
  // node_modules/zod/v4/core/json-schema-processors.js
65353
+ var narrowMin = (agg, key, value) => {
65354
+ if (agg[key] === void 0 || value > agg[key])
65355
+ agg[key] = value;
65356
+ };
65357
+ var narrowMax = (agg, key, value) => {
65358
+ if (agg[key] === void 0 || value < agg[key])
65359
+ agg[key] = value;
65360
+ };
65361
+ var narrowBoth = (agg, value) => {
65362
+ narrowMin(agg, "minimum", value);
65363
+ narrowMax(agg, "maximum", value);
65364
+ };
65365
+ var addDivisor = (agg, value) => {
65366
+ agg.multipleOf ?? (agg.multipleOf = []);
65367
+ if (!agg.multipleOf.includes(value))
65368
+ agg.multipleOf.push(value);
65369
+ };
65370
+ var addPattern = (agg, pattern) => {
65371
+ agg.patterns ?? (agg.patterns = /* @__PURE__ */ new Set());
65372
+ agg.patterns.add(pattern);
65373
+ };
65374
+ var intersectMime = (agg, mime) => {
65375
+ agg.mime = agg.mime ? agg.mime.filter((m3) => mime.includes(m3)) : [...mime];
65376
+ };
65377
+ var setFormat = (agg, format2) => {
65378
+ agg.format = format2;
65379
+ if (format2.includes("int"))
65380
+ agg.isInt = true;
65381
+ };
65382
+ var minContributor = (agg, def) => narrowMin(agg, "minimum", def.minimum);
65383
+ var maxContributor = (agg, def) => narrowMax(agg, "maximum", def.maximum);
65384
+ var formatContributor = (ranges) => (agg, def) => {
65385
+ setFormat(agg, def.format);
65386
+ const [minimum, maximum] = ranges[def.format];
65387
+ narrowMin(agg, "minimum", minimum);
65388
+ narrowMax(agg, "maximum", maximum);
65389
+ };
65390
+ var contributors = {
65391
+ greater_than: (agg, def) => narrowMin(agg, def.inclusive ? "minimum" : "exclusiveMinimum", def.value),
65392
+ less_than: (agg, def) => narrowMax(agg, def.inclusive ? "maximum" : "exclusiveMaximum", def.value),
65393
+ multiple_of: (agg, def) => addDivisor(agg, def.value),
65394
+ number_format: formatContributor(NUMBER_FORMAT_RANGES),
65395
+ bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
65396
+ min_length: minContributor,
65397
+ max_length: maxContributor,
65398
+ length_equals: (agg, def) => narrowBoth(agg, def.length),
65399
+ min_size: minContributor,
65400
+ max_size: maxContributor,
65401
+ size_equals: (agg, def) => narrowBoth(agg, def.size),
65402
+ string_format: (agg, def) => {
65403
+ setFormat(agg, def.format);
65404
+ if (def.pattern)
65405
+ addPattern(agg, def.pattern);
65406
+ if (def.format === "base64" || def.format === "base64url")
65407
+ agg.contentEncoding = def.format;
65408
+ if (def.local || def.precision === -1)
65409
+ agg.laxFormat = true;
65410
+ },
65411
+ mime_type: (agg, def) => intersectMime(agg, def.mime)
65412
+ };
65413
+ function aggregateChecks(schema) {
65414
+ const agg = {};
65415
+ const def = schema._zod.def;
65416
+ const list2 = schema._zod.traits.has("$ZodCheck") ? [schema, ...def.checks ?? []] : def.checks ?? [];
65417
+ for (const ch of list2)
65418
+ contributors[ch._zod.def.check]?.(agg, ch._zod.def);
65419
+ const bag = schema._zod.bag;
65420
+ if (bag.minimum !== void 0)
65421
+ narrowMin(agg, "minimum", bag.minimum);
65422
+ if (bag.exclusiveMinimum !== void 0)
65423
+ narrowMin(agg, "exclusiveMinimum", bag.exclusiveMinimum);
65424
+ if (bag.maximum !== void 0)
65425
+ narrowMax(agg, "maximum", bag.maximum);
65426
+ if (bag.exclusiveMaximum !== void 0)
65427
+ narrowMax(agg, "exclusiveMaximum", bag.exclusiveMaximum);
65428
+ if (bag.multipleOf !== void 0)
65429
+ addDivisor(agg, bag.multipleOf);
65430
+ if (bag.format !== void 0) {
65431
+ agg.format ?? (agg.format = bag.format);
65432
+ if (bag.format.includes("int"))
65433
+ agg.isInt = true;
65434
+ }
65435
+ if (bag.mime)
65436
+ intersectMime(agg, bag.mime);
65437
+ for (const pattern of bag.patterns ?? [])
65438
+ addPattern(agg, pattern);
65439
+ return agg;
65440
+ }
65056
65441
  var formatMap = {
65057
65442
  guid: "uuid",
65058
65443
  url: "uri",
@@ -65061,10 +65446,15 @@ var formatMap = {
65061
65446
  regex: ""
65062
65447
  // do not set
65063
65448
  };
65449
+ var exactPatterns = /* @__PURE__ */ new Map([
65450
+ [base64Charset, base64],
65451
+ [base64urlCharset, base64url]
65452
+ ]);
65453
+ var exactPattern = (p3) => exactPatterns.get(p3) ?? p3;
65064
65454
  var stringProcessor = (schema, ctx, _json2, _params) => {
65065
65455
  const json2 = _json2;
65066
65456
  json2.type = "string";
65067
- const { minimum, maximum, format: format2, patterns, contentEncoding, laxFormat } = schema._zod.bag;
65457
+ const { minimum, maximum, format: format2, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
65068
65458
  if (typeof minimum === "number")
65069
65459
  json2.minLength = minimum;
65070
65460
  if (typeof maximum === "number")
@@ -65080,7 +65470,7 @@ var stringProcessor = (schema, ctx, _json2, _params) => {
65080
65470
  if (contentEncoding)
65081
65471
  json2.contentEncoding = contentEncoding;
65082
65472
  if (patterns && patterns.size > 0) {
65083
- const patternList = [...patterns];
65473
+ const patternList = [...patterns].map(exactPattern);
65084
65474
  if (patternList.length === 1)
65085
65475
  json2.pattern = patternList[0].source;
65086
65476
  else if (patternList.length > 1) {
@@ -65095,11 +65485,8 @@ var stringProcessor = (schema, ctx, _json2, _params) => {
65095
65485
  };
65096
65486
  var numberProcessor = (schema, ctx, _json2, params) => {
65097
65487
  const json2 = _json2;
65098
- const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
65099
- if (typeof format2 === "string" && format2.includes("int"))
65100
- json2.type = "integer";
65101
- else
65102
- json2.type = "number";
65488
+ const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);
65489
+ json2.type = isInt ? "integer" : "number";
65103
65490
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
65104
65491
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
65105
65492
  const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
@@ -65123,11 +65510,19 @@ var numberProcessor = (schema, ctx, _json2, params) => {
65123
65510
  } else if (typeof maximum === "number") {
65124
65511
  json2.maximum = maximum;
65125
65512
  }
65126
- if (typeof multipleOf === "number") {
65127
- if (Number.isFinite(multipleOf) && multipleOf !== 0)
65128
- json2.multipleOf = Math.abs(multipleOf);
65129
- else
65130
- handleUnrepresentable(schema, ctx, json2, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);
65513
+ if (multipleOf) {
65514
+ const divisors = /* @__PURE__ */ new Set();
65515
+ for (const divisor of multipleOf) {
65516
+ if (Number.isFinite(divisor) && divisor !== 0)
65517
+ divisors.add(Math.abs(divisor));
65518
+ else
65519
+ handleUnrepresentable(schema, ctx, json2, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);
65520
+ }
65521
+ const [first, ...rest] = divisors;
65522
+ if (first !== void 0)
65523
+ json2.multipleOf = first;
65524
+ if (rest.length)
65525
+ json2.allOf = [...json2.allOf ?? [], ...rest.map((m3) => ({ multipleOf: m3 }))];
65131
65526
  }
65132
65527
  };
65133
65528
  var booleanProcessor = (_schema, _ctx, json2, _params) => {
@@ -65230,27 +65625,22 @@ var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
65230
65625
  };
65231
65626
  var fileProcessor = (schema, _ctx, json2, _params) => {
65232
65627
  const _json2 = json2;
65233
- const file2 = {
65234
- type: "string",
65235
- format: "binary",
65236
- contentEncoding: "binary"
65237
- };
65238
- const { minimum, maximum, mime } = schema._zod.bag;
65628
+ _json2.type = "string";
65629
+ _json2.format = "binary";
65630
+ _json2.contentEncoding = "binary";
65631
+ const { minimum, maximum, mime } = aggregateChecks(schema);
65239
65632
  if (minimum !== void 0)
65240
- file2.minLength = minimum;
65633
+ _json2.minLength = minimum;
65241
65634
  if (maximum !== void 0)
65242
- file2.maxLength = maximum;
65243
- if (mime) {
65244
- if (mime.length === 1) {
65245
- file2.contentMediaType = mime[0];
65246
- Object.assign(_json2, file2);
65247
- } else {
65248
- Object.assign(_json2, file2);
65249
- _json2.anyOf = mime.map((m3) => ({ contentMediaType: m3 }));
65250
- }
65251
- } else {
65252
- Object.assign(_json2, file2);
65253
- }
65635
+ _json2.maxLength = maximum;
65636
+ if (!mime)
65637
+ return;
65638
+ if (mime.length === 0)
65639
+ _json2.not = {};
65640
+ else if (mime.length === 1)
65641
+ _json2.contentMediaType = mime[0];
65642
+ else
65643
+ _json2.anyOf = mime.map((m3) => ({ contentMediaType: m3 }));
65254
65644
  };
65255
65645
  var successProcessor = (_schema, _ctx, json2, _params) => {
65256
65646
  json2.type = "boolean";
@@ -65273,13 +65663,13 @@ var setProcessor = (schema, ctx, json2, params) => {
65273
65663
  var arrayProcessor = (schema, ctx, _json2, params) => {
65274
65664
  const json2 = _json2;
65275
65665
  const def = schema._zod.def;
65276
- const { minimum, maximum } = schema._zod.bag;
65666
+ const { minimum, maximum } = aggregateChecks(schema);
65277
65667
  if (typeof minimum === "number")
65278
65668
  json2.minItems = minimum;
65279
65669
  if (typeof maximum === "number")
65280
65670
  json2.maxItems = maximum;
65281
65671
  json2.type = "array";
65282
- json2.items = process2(def.element, ctx, {
65672
+ json2.items = processSchema(def.element, ctx, {
65283
65673
  ...params,
65284
65674
  path: [...params.path, "items"]
65285
65675
  });
@@ -65305,7 +65695,7 @@ var objectProcessor = (schema, ctx, _json2, params) => {
65305
65695
  json2.type = "object";
65306
65696
  json2.properties = {};
65307
65697
  for (const key in shape) {
65308
- assignProp(json2.properties, key, process2(shape[key], ctx, {
65698
+ assignProp(json2.properties, key, processSchema(shape[key], ctx, {
65309
65699
  ...params,
65310
65700
  path: [...params.path, "properties", key]
65311
65701
  }));
@@ -65328,16 +65718,41 @@ var objectProcessor = (schema, ctx, _json2, params) => {
65328
65718
  if (ctx.io === "output")
65329
65719
  json2.additionalProperties = false;
65330
65720
  } else if (def.catchall) {
65331
- json2.additionalProperties = process2(def.catchall, ctx, {
65721
+ json2.additionalProperties = processSchema(def.catchall, ctx, {
65332
65722
  ...params,
65333
65723
  path: [...params.path, "additionalProperties"]
65334
65724
  });
65335
65725
  }
65336
65726
  };
65727
+ var propertiesProcessor = (schema, ctx, _json2, params) => {
65728
+ const json2 = _json2;
65729
+ const def = schema._zod.def;
65730
+ if (Object.getOwnPropertySymbols(def.shape).length && handleUnrepresentable(schema, ctx, json2, params, "Symbol keys cannot be represented in JSON Schema")) {
65731
+ return;
65732
+ }
65733
+ if (ctx.io === "output") {
65734
+ for (const key in def.shape) {
65735
+ if (isTransforming(def.shape[key]) && handleUnrepresentable(schema, ctx, json2, params, `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`)) {
65736
+ return;
65737
+ }
65738
+ }
65739
+ }
65740
+ json2.type = "object";
65741
+ json2.properties = {};
65742
+ for (const key in def.shape) {
65743
+ assignProp(json2.properties, key, processSchema(def.shape[key], ctx, {
65744
+ ...params,
65745
+ path: [...params.path, "properties", key]
65746
+ }));
65747
+ }
65748
+ const required2 = Object.keys(def.shape).filter((key) => inputOptin(def.shape[key]) === void 0);
65749
+ if (required2.length > 0)
65750
+ json2.required = required2;
65751
+ };
65337
65752
  var unionProcessor = (schema, ctx, json2, params) => {
65338
65753
  const def = schema._zod.def;
65339
65754
  const isExclusive = def.inclusive === false;
65340
- const options = def.options.map((x, i5) => process2(x, ctx, {
65755
+ const options = def.options.map((x, i5) => processSchema(x, ctx, {
65341
65756
  ...params,
65342
65757
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i5]
65343
65758
  }));
@@ -65349,11 +65764,11 @@ var unionProcessor = (schema, ctx, json2, params) => {
65349
65764
  };
65350
65765
  var intersectionProcessor = (schema, ctx, json2, params) => {
65351
65766
  const def = schema._zod.def;
65352
- const a5 = process2(def.left, ctx, {
65767
+ const a5 = processSchema(def.left, ctx, {
65353
65768
  ...params,
65354
65769
  path: [...params.path, "allOf", 0]
65355
65770
  });
65356
- const b5 = process2(def.right, ctx, {
65771
+ const b5 = processSchema(def.right, ctx, {
65357
65772
  ...params,
65358
65773
  path: [...params.path, "allOf", 1]
65359
65774
  });
@@ -65371,11 +65786,11 @@ var tupleProcessor = (schema, ctx, _json2, params) => {
65371
65786
  json2.type = "array";
65372
65787
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
65373
65788
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
65374
- const prefixItems = def.items.map((x, i5) => process2(x, ctx, {
65789
+ const prefixItems = def.items.map((x, i5) => processSchema(x, ctx, {
65375
65790
  ...params,
65376
65791
  path: [...params.path, prefixPath, i5]
65377
65792
  }));
65378
- const rest = def.rest ? process2(def.rest, ctx, {
65793
+ const rest = def.rest ? processSchema(def.rest, ctx, {
65379
65794
  ...params,
65380
65795
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
65381
65796
  }) : null;
@@ -65423,7 +65838,7 @@ var tupleProcessor = (schema, ctx, _json2, params) => {
65423
65838
  if (isClosed)
65424
65839
  json2.maxItems = maxItems;
65425
65840
  }
65426
- const { minimum, maximum } = schema._zod.bag;
65841
+ const { minimum, maximum } = aggregateChecks(schema);
65427
65842
  if (typeof minimum === "number")
65428
65843
  json2.minItems = minimum;
65429
65844
  if (typeof maximum === "number")
@@ -65497,20 +65912,19 @@ var recordProcessor = (schema, ctx, _json2, params) => {
65497
65912
  const def = schema._zod.def;
65498
65913
  json2.type = "object";
65499
65914
  const keyType = def.keyType;
65500
- const keyBag = keyType._zod.bag;
65501
- const patterns = keyBag?.patterns;
65915
+ const patterns = aggregateChecks(keyType).patterns;
65502
65916
  if (def.mode === "loose" && patterns && patterns.size > 0) {
65503
- const valueSchema = process2(def.valueType, ctx, {
65917
+ const valueSchema = processSchema(def.valueType, ctx, {
65504
65918
  ...params,
65505
65919
  path: [...params.path, "patternProperties", "*"]
65506
65920
  });
65507
65921
  json2.patternProperties = {};
65508
65922
  for (const pattern of patterns) {
65509
- assignProp(json2.patternProperties, pattern.source, valueSchema);
65923
+ assignProp(json2.patternProperties, exactPattern(pattern).source, valueSchema);
65510
65924
  }
65511
65925
  } else {
65512
65926
  if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
65513
- json2.propertyNames = process2(def.keyType, ctx, {
65927
+ json2.propertyNames = processSchema(def.keyType, ctx, {
65514
65928
  ...params,
65515
65929
  path: [...params.path, "propertyNames"]
65516
65930
  });
@@ -65522,7 +65936,7 @@ var recordProcessor = (schema, ctx, _json2, params) => {
65522
65936
  }
65523
65937
  pending2.push(schema);
65524
65938
  }
65525
- json2.additionalProperties = process2(def.valueType, ctx, {
65939
+ json2.additionalProperties = processSchema(def.valueType, ctx, {
65526
65940
  ...params,
65527
65941
  path: [...params.path, "additionalProperties"]
65528
65942
  });
@@ -65538,7 +65952,7 @@ var recordProcessor = (schema, ctx, _json2, params) => {
65538
65952
  };
65539
65953
  var nullableProcessor = (schema, ctx, json2, params) => {
65540
65954
  const def = schema._zod.def;
65541
- const inner = process2(def.innerType, ctx, params);
65955
+ const inner = processSchema(def.innerType, ctx, params);
65542
65956
  const seen = ctx.seen.get(schema);
65543
65957
  if (ctx.target === "openapi-3.0") {
65544
65958
  seen.ref = def.innerType;
@@ -65549,7 +65963,7 @@ var nullableProcessor = (schema, ctx, json2, params) => {
65549
65963
  };
65550
65964
  var nonoptionalProcessor = (schema, ctx, _json2, params) => {
65551
65965
  const def = schema._zod.def;
65552
- process2(def.innerType, ctx, params);
65966
+ processSchema(def.innerType, ctx, params);
65553
65967
  const seen = ctx.seen.get(schema);
65554
65968
  seen.ref = def.innerType;
65555
65969
  };
@@ -65569,7 +65983,7 @@ function serializeDefaultValue(value, schema, ctx, json2, params) {
65569
65983
  }
65570
65984
  var defaultProcessor = (schema, ctx, json2, params) => {
65571
65985
  const def = schema._zod.def;
65572
- process2(def.innerType, ctx, params);
65986
+ processSchema(def.innerType, ctx, params);
65573
65987
  const seen = ctx.seen.get(schema);
65574
65988
  seen.ref = def.innerType;
65575
65989
  const value = serializeDefaultValue(def.defaultValue, schema, ctx, json2, params);
@@ -65578,7 +65992,7 @@ var defaultProcessor = (schema, ctx, json2, params) => {
65578
65992
  };
65579
65993
  var prefaultProcessor = (schema, ctx, json2, params) => {
65580
65994
  const def = schema._zod.def;
65581
- process2(def.innerType, ctx, params);
65995
+ processSchema(def.innerType, ctx, params);
65582
65996
  const seen = ctx.seen.get(schema);
65583
65997
  seen.ref = def.innerType;
65584
65998
  if (ctx.io !== "input")
@@ -65589,7 +66003,7 @@ var prefaultProcessor = (schema, ctx, json2, params) => {
65589
66003
  };
65590
66004
  var catchProcessor = (schema, ctx, json2, params) => {
65591
66005
  const def = schema._zod.def;
65592
- process2(def.innerType, ctx, params);
66006
+ processSchema(def.innerType, ctx, params);
65593
66007
  const seen = ctx.seen.get(schema);
65594
66008
  seen.ref = def.innerType;
65595
66009
  let catchValue;
@@ -65605,32 +66019,32 @@ var pipeProcessor = (schema, ctx, _json2, params) => {
65605
66019
  const def = schema._zod.def;
65606
66020
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
65607
66021
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
65608
- process2(innerType, ctx, params);
66022
+ processSchema(innerType, ctx, params);
65609
66023
  const seen = ctx.seen.get(schema);
65610
66024
  seen.ref = innerType;
65611
66025
  };
65612
66026
  var readonlyProcessor = (schema, ctx, json2, params) => {
65613
66027
  const def = schema._zod.def;
65614
- process2(def.innerType, ctx, params);
66028
+ processSchema(def.innerType, ctx, params);
65615
66029
  const seen = ctx.seen.get(schema);
65616
66030
  seen.ref = def.innerType;
65617
66031
  json2.readOnly = true;
65618
66032
  };
65619
66033
  var promiseProcessor = (schema, ctx, _json2, params) => {
65620
66034
  const def = schema._zod.def;
65621
- process2(def.innerType, ctx, params);
66035
+ processSchema(def.innerType, ctx, params);
65622
66036
  const seen = ctx.seen.get(schema);
65623
66037
  seen.ref = def.innerType;
65624
66038
  };
65625
66039
  var optionalProcessor = (schema, ctx, _json2, params) => {
65626
66040
  const def = schema._zod.def;
65627
- process2(def.innerType, ctx, params);
66041
+ processSchema(def.innerType, ctx, params);
65628
66042
  const seen = ctx.seen.get(schema);
65629
66043
  seen.ref = def.innerType;
65630
66044
  };
65631
66045
  var lazyProcessor = (schema, ctx, _json2, params) => {
65632
66046
  const innerType = schema._zod.innerType;
65633
- process2(innerType, ctx, params);
66047
+ processSchema(innerType, ctx, params);
65634
66048
  const seen = ctx.seen.get(schema);
65635
66049
  seen.ref = innerType;
65636
66050
  };
@@ -65654,6 +66068,7 @@ var allProcessors = {
65654
66068
  file: fileProcessor,
65655
66069
  success: successProcessor,
65656
66070
  custom: customProcessor,
66071
+ properties: propertiesProcessor,
65657
66072
  function: functionProcessor,
65658
66073
  transform: transformProcessor,
65659
66074
  map: mapProcessor,
@@ -65682,7 +66097,7 @@ function toJSONSchema(input2, params) {
65682
66097
  const defs = {};
65683
66098
  for (const entry of registry2._idmap.entries()) {
65684
66099
  const [_, schema] = entry;
65685
- process2(schema, ctx2);
66100
+ processSchema(schema, ctx2);
65686
66101
  }
65687
66102
  const schemas = {};
65688
66103
  const external = {
@@ -65705,7 +66120,7 @@ function toJSONSchema(input2, params) {
65705
66120
  return { schemas };
65706
66121
  }
65707
66122
  const ctx = initializeContext({ ...params, processors: allProcessors });
65708
- process2(input2, ctx);
66123
+ processSchema(input2, ctx);
65709
66124
  extractDefs(ctx, input2);
65710
66125
  return finalize(ctx, input2);
65711
66126
  }
@@ -65764,7 +66179,7 @@ var JSONSchemaGenerator = class {
65764
66179
  * This must be called before emit().
65765
66180
  */
65766
66181
  process(schema, _params = { path: [], schemaPath: [] }) {
65767
- return process2(schema, this.ctx, _params);
66182
+ return processSchema(schema, this.ctx, _params);
65768
66183
  }
65769
66184
  /**
65770
66185
  * Emit the final JSON Schema after processing.
@@ -65821,12 +66236,14 @@ __export(schemas_exports2, {
65821
66236
  ZodFile: () => ZodFile,
65822
66237
  ZodFunction: () => ZodFunction,
65823
66238
  ZodGUID: () => ZodGUID,
66239
+ ZodIBAN: () => ZodIBAN,
65824
66240
  ZodIPv4: () => ZodIPv4,
65825
66241
  ZodIPv6: () => ZodIPv6,
65826
66242
  ZodISODate: () => ZodISODate,
65827
66243
  ZodISODateTime: () => ZodISODateTime,
65828
66244
  ZodISODuration: () => ZodISODuration,
65829
66245
  ZodISOTime: () => ZodISOTime,
66246
+ ZodInstanceOf: () => ZodInstanceOf,
65830
66247
  ZodIntersection: () => ZodIntersection,
65831
66248
  ZodJWT: () => ZodJWT,
65832
66249
  ZodKSUID: () => ZodKSUID,
@@ -65848,6 +66265,7 @@ __export(schemas_exports2, {
65848
66265
  ZodPrefault: () => ZodPrefault,
65849
66266
  ZodPreprocess: () => ZodPreprocess,
65850
66267
  ZodPromise: () => ZodPromise,
66268
+ ZodProperties: () => ZodProperties,
65851
66269
  ZodReadonly: () => ZodReadonly,
65852
66270
  ZodRecord: () => ZodRecord,
65853
66271
  ZodSet: () => ZodSet,
@@ -65903,6 +66321,7 @@ __export(schemas_exports2, {
65903
66321
  hex: () => hex2,
65904
66322
  hostname: () => hostname2,
65905
66323
  httpUrl: () => httpUrl,
66324
+ iban: () => iban2,
65906
66325
  instanceof: () => _instanceof,
65907
66326
  int: () => int,
65908
66327
  int32: () => int32,
@@ -65938,6 +66357,7 @@ __export(schemas_exports2, {
65938
66357
  prefault: () => prefault,
65939
66358
  preprocess: () => preprocess,
65940
66359
  promise: () => promise,
66360
+ properties: () => properties,
65941
66361
  readonly: () => readonly,
65942
66362
  record: () => record,
65943
66363
  refine: () => refine,
@@ -65991,7 +66411,6 @@ __export(checks_exports2, {
65991
66411
  normalize: () => _normalize,
65992
66412
  overwrite: () => _overwrite,
65993
66413
  positive: () => _positive,
65994
- properties: () => _properties,
65995
66414
  property: () => _property,
65996
66415
  regex: () => _regex,
65997
66416
  size: () => _size,
@@ -66205,6 +66624,12 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
66205
66624
  set spa(value) {
66206
66625
  util_exports.own(this, "spa", value);
66207
66626
  },
66627
+ validate(data, params) {
66628
+ return validate(this, data, params);
66629
+ },
66630
+ validateAsync(data, params) {
66631
+ return validateAsync(this, data, params);
66632
+ },
66208
66633
  encode: function _encode2(data, params) {
66209
66634
  return encode2(this, data, params, { callee: _encode2 });
66210
66635
  },
@@ -66241,61 +66666,65 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
66241
66666
  return this._zod.def;
66242
66667
  }
66243
66668
  });
66244
- var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
66245
- $ZodString.init(inst, def);
66246
- ZodType.init(inst, def);
66247
- inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
66248
- const bag = inst._zod.bag;
66249
- inst.format = bag.format ?? null;
66250
- inst.minLength = bag.minimum ?? null;
66251
- inst.maxLength = bag.maximum ?? null;
66252
- }, {
66253
- regex(...args) {
66254
- return this.check(_regex(...args));
66255
- },
66256
- includes(...args) {
66257
- return this.check(_includes(...args));
66669
+ var _ZodString = /* @__PURE__ */ $constructor(
66670
+ "_ZodString",
66671
+ (inst, def) => {
66672
+ $ZodString.init(inst, def);
66673
+ ZodType.init(inst, def);
66674
+ inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
66258
66675
  },
66259
- startsWith(...args) {
66260
- return this.check(_startsWith(...args));
66261
- },
66262
- endsWith(...args) {
66263
- return this.check(_endsWith(...args));
66264
- },
66265
- min(...args) {
66266
- return this.check(_minLength(...args));
66267
- },
66268
- max(...args) {
66269
- return this.check(_maxLength(...args));
66270
- },
66271
- length(...args) {
66272
- return this.check(_length(...args));
66273
- },
66274
- nonempty(...args) {
66275
- return this.check(_minLength(1, ...args));
66276
- },
66277
- lowercase(params) {
66278
- return this.check(_lowercase(params));
66279
- },
66280
- uppercase(params) {
66281
- return this.check(_uppercase(params));
66282
- },
66283
- trim() {
66284
- return this.check(_trim());
66285
- },
66286
- normalize(...args) {
66287
- return this.check(_normalize(...args));
66288
- },
66289
- toLowerCase() {
66290
- return this.check(_toLowerCase());
66291
- },
66292
- toUpperCase() {
66293
- return this.check(_toUpperCase());
66294
- },
66295
- slugify() {
66296
- return this.check(_slugify());
66297
- }
66298
- });
66676
+ /* @__PURE__ */ util_exports.derived({
66677
+ format: (inst) => aggregateChecks(inst).format ?? null,
66678
+ minLength: (inst) => aggregateChecks(inst).minimum ?? null,
66679
+ maxLength: (inst) => aggregateChecks(inst).maximum ?? null
66680
+ }, {
66681
+ regex(...args) {
66682
+ return this.check(_regex(...args));
66683
+ },
66684
+ includes(...args) {
66685
+ return this.check(_includes(...args));
66686
+ },
66687
+ startsWith(...args) {
66688
+ return this.check(_startsWith(...args));
66689
+ },
66690
+ endsWith(...args) {
66691
+ return this.check(_endsWith(...args));
66692
+ },
66693
+ min(...args) {
66694
+ return this.check(_minLength(...args));
66695
+ },
66696
+ max(...args) {
66697
+ return this.check(_maxLength(...args));
66698
+ },
66699
+ length(...args) {
66700
+ return this.check(_length(...args));
66701
+ },
66702
+ nonempty(...args) {
66703
+ return this.check(_minLength(1, ...args));
66704
+ },
66705
+ lowercase(params) {
66706
+ return this.check(_lowercase(params));
66707
+ },
66708
+ uppercase(params) {
66709
+ return this.check(_uppercase(params));
66710
+ },
66711
+ trim() {
66712
+ return this.check(_trim());
66713
+ },
66714
+ normalize(...args) {
66715
+ return this.check(_normalize(...args));
66716
+ },
66717
+ toLowerCase() {
66718
+ return this.check(_toLowerCase());
66719
+ },
66720
+ toUpperCase() {
66721
+ return this.check(_toUpperCase());
66722
+ },
66723
+ slugify() {
66724
+ return this.check(_slugify());
66725
+ }
66726
+ })
66727
+ );
66299
66728
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
66300
66729
  $ZodString.init(inst, def);
66301
66730
  _ZodString.init(inst, def);
@@ -66558,6 +66987,13 @@ var ZodCreditCard = /* @__PURE__ */ $constructor("ZodCreditCard", (inst, def) =>
66558
66987
  function creditCard2(params) {
66559
66988
  return _creditCard(ZodCreditCard, params);
66560
66989
  }
66990
+ var ZodIBAN = /* @__PURE__ */ $constructor("ZodIBAN", (inst, def) => {
66991
+ $ZodIBAN.init(inst, def);
66992
+ ZodStringFormat.init(inst, def);
66993
+ });
66994
+ function iban2(params) {
66995
+ return _iban(ZodIBAN, params);
66996
+ }
66561
66997
  var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
66562
66998
  $ZodJWT.init(inst, def);
66563
66999
  ZodStringFormat.init(inst, def);
@@ -66586,63 +67022,76 @@ function hash(alg, params) {
66586
67022
  throw new Error(`Unrecognized hash format: ${format2}`);
66587
67023
  return _stringFormat(ZodCustomStringFormat, format2, regex, params);
66588
67024
  }
66589
- var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
66590
- $ZodNumber.init(inst, def);
66591
- ZodType.init(inst, def);
66592
- inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
66593
- const bag = inst._zod.bag;
66594
- inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
66595
- inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
66596
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
66597
- inst.isFinite = true;
66598
- inst.format = bag.format ?? null;
66599
- }, {
66600
- gt(value, params) {
66601
- return this.check(_gt(value, params));
66602
- },
66603
- gte(value, params) {
66604
- return this.check(_gte(value, params));
66605
- },
66606
- min(value, params) {
66607
- return this.check(_gte(value, params));
66608
- },
66609
- lt(value, params) {
66610
- return this.check(_lt(value, params));
66611
- },
66612
- lte(value, params) {
66613
- return this.check(_lte(value, params));
66614
- },
66615
- max(value, params) {
66616
- return this.check(_lte(value, params));
66617
- },
66618
- int(params) {
66619
- return this.check(int(params));
66620
- },
66621
- safe(params) {
66622
- return this.check(int(params));
66623
- },
66624
- positive(params) {
66625
- return this.check(_gt(0, params));
66626
- },
66627
- nonnegative(params) {
66628
- return this.check(_gte(0, params));
66629
- },
66630
- negative(params) {
66631
- return this.check(_lt(0, params));
66632
- },
66633
- nonpositive(params) {
66634
- return this.check(_lte(0, params));
66635
- },
66636
- multipleOf(value, params) {
66637
- return this.check(_multipleOf(value, params));
67025
+ var ZodNumber = /* @__PURE__ */ $constructor(
67026
+ "ZodNumber",
67027
+ (inst, def) => {
67028
+ $ZodNumber.init(inst, def);
67029
+ ZodType.init(inst, def);
67030
+ inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
67031
+ inst.isFinite = true;
66638
67032
  },
66639
- step(value, params) {
66640
- return this.check(_multipleOf(value, params));
66641
- },
66642
- finite() {
66643
- return this;
66644
- }
66645
- });
67033
+ /* @__PURE__ */ util_exports.derived({
67034
+ minValue: (inst) => {
67035
+ const { minimum, exclusiveMinimum } = aggregateChecks(inst);
67036
+ return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
67037
+ },
67038
+ maxValue: (inst) => {
67039
+ const { maximum, exclusiveMaximum } = aggregateChecks(inst);
67040
+ return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
67041
+ },
67042
+ isInt: (inst) => {
67043
+ const { isInt, multipleOf } = aggregateChecks(inst);
67044
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
67045
+ },
67046
+ format: (inst) => aggregateChecks(inst).format ?? null
67047
+ }, {
67048
+ gt(value, params) {
67049
+ return this.check(_gt(value, params));
67050
+ },
67051
+ gte(value, params) {
67052
+ return this.check(_gte(value, params));
67053
+ },
67054
+ min(value, params) {
67055
+ return this.check(_gte(value, params));
67056
+ },
67057
+ lt(value, params) {
67058
+ return this.check(_lt(value, params));
67059
+ },
67060
+ lte(value, params) {
67061
+ return this.check(_lte(value, params));
67062
+ },
67063
+ max(value, params) {
67064
+ return this.check(_lte(value, params));
67065
+ },
67066
+ int(params) {
67067
+ return this.check(int(params));
67068
+ },
67069
+ safe(params) {
67070
+ return this.check(int(params));
67071
+ },
67072
+ positive(params) {
67073
+ return this.check(_gt(0, params));
67074
+ },
67075
+ nonnegative(params) {
67076
+ return this.check(_gte(0, params));
67077
+ },
67078
+ negative(params) {
67079
+ return this.check(_lt(0, params));
67080
+ },
67081
+ nonpositive(params) {
67082
+ return this.check(_lte(0, params));
67083
+ },
67084
+ multipleOf(value, params) {
67085
+ return this.check(_multipleOf(value, params));
67086
+ },
67087
+ step(value, params) {
67088
+ return this.check(_multipleOf(value, params));
67089
+ },
67090
+ finite() {
67091
+ return this;
67092
+ }
67093
+ })
67094
+ );
66646
67095
  function number2(params) {
66647
67096
  return _number(ZodNumber, params);
66648
67097
  }
@@ -66673,49 +67122,53 @@ var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
66673
67122
  function boolean2(params) {
66674
67123
  return _boolean(ZodBoolean, params);
66675
67124
  }
66676
- var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
66677
- $ZodBigInt.init(inst, def);
66678
- ZodType.init(inst, def);
66679
- inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
66680
- const bag = inst._zod.bag;
66681
- inst.minValue = bag.minimum ?? null;
66682
- inst.maxValue = bag.maximum ?? null;
66683
- inst.format = bag.format ?? null;
66684
- }, {
66685
- gte(value, params) {
66686
- return this.check(_gte(value, params));
66687
- },
66688
- min(value, params) {
66689
- return this.check(_gte(value, params));
66690
- },
66691
- gt(value, params) {
66692
- return this.check(_gt(value, params));
66693
- },
66694
- lt(value, params) {
66695
- return this.check(_lt(value, params));
66696
- },
66697
- lte(value, params) {
66698
- return this.check(_lte(value, params));
66699
- },
66700
- max(value, params) {
66701
- return this.check(_lte(value, params));
67125
+ var ZodBigInt = /* @__PURE__ */ $constructor(
67126
+ "ZodBigInt",
67127
+ (inst, def) => {
67128
+ $ZodBigInt.init(inst, def);
67129
+ ZodType.init(inst, def);
67130
+ inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
66702
67131
  },
66703
- positive(params) {
66704
- return this.check(_gt(BigInt(0), params));
66705
- },
66706
- negative(params) {
66707
- return this.check(_lt(BigInt(0), params));
66708
- },
66709
- nonpositive(params) {
66710
- return this.check(_lte(BigInt(0), params));
66711
- },
66712
- nonnegative(params) {
66713
- return this.check(_gte(BigInt(0), params));
66714
- },
66715
- multipleOf(value, params) {
66716
- return this.check(_multipleOf(value, params));
66717
- }
66718
- });
67132
+ /* @__PURE__ */ util_exports.derived({
67133
+ minValue: (inst) => aggregateChecks(inst).minimum ?? null,
67134
+ maxValue: (inst) => aggregateChecks(inst).maximum ?? null,
67135
+ format: (inst) => aggregateChecks(inst).format ?? null
67136
+ }, {
67137
+ gte(value, params) {
67138
+ return this.check(_gte(value, params));
67139
+ },
67140
+ min(value, params) {
67141
+ return this.check(_gte(value, params));
67142
+ },
67143
+ gt(value, params) {
67144
+ return this.check(_gt(value, params));
67145
+ },
67146
+ lt(value, params) {
67147
+ return this.check(_lt(value, params));
67148
+ },
67149
+ lte(value, params) {
67150
+ return this.check(_lte(value, params));
67151
+ },
67152
+ max(value, params) {
67153
+ return this.check(_lte(value, params));
67154
+ },
67155
+ positive(params) {
67156
+ return this.check(_gt(BigInt(0), params));
67157
+ },
67158
+ negative(params) {
67159
+ return this.check(_lt(BigInt(0), params));
67160
+ },
67161
+ nonpositive(params) {
67162
+ return this.check(_lte(BigInt(0), params));
67163
+ },
67164
+ nonnegative(params) {
67165
+ return this.check(_gte(BigInt(0), params));
67166
+ },
67167
+ multipleOf(value, params) {
67168
+ return this.check(_multipleOf(value, params));
67169
+ }
67170
+ })
67171
+ );
66719
67172
  function bigint2(params) {
66720
67173
  return _bigint(ZodBigInt, params);
66721
67174
  }
@@ -66785,16 +67238,26 @@ var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
66785
67238
  function _void2(params) {
66786
67239
  return _void(ZodVoid, params);
66787
67240
  }
66788
- var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
66789
- $ZodDate.init(inst, def);
66790
- ZodType.init(inst, def);
66791
- inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
66792
- inst.min = (value, params) => inst.check(_gte(value, params));
66793
- inst.max = (value, params) => inst.check(_lte(value, params));
66794
- const c5 = inst._zod.bag;
66795
- inst.minDate = c5.minimum ? new Date(c5.minimum) : null;
66796
- inst.maxDate = c5.maximum ? new Date(c5.maximum) : null;
66797
- });
67241
+ var ZodDate = /* @__PURE__ */ $constructor(
67242
+ "ZodDate",
67243
+ (inst, def) => {
67244
+ $ZodDate.init(inst, def);
67245
+ ZodType.init(inst, def);
67246
+ inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
67247
+ inst.min = (value, params) => inst.check(_gte(value, params));
67248
+ inst.max = (value, params) => inst.check(_lte(value, params));
67249
+ },
67250
+ /* @__PURE__ */ util_exports.derived({
67251
+ minDate: (inst) => {
67252
+ const { minimum } = aggregateChecks(inst);
67253
+ return minimum ? new Date(minimum) : null;
67254
+ },
67255
+ maxDate: (inst) => {
67256
+ const { maximum } = aggregateChecks(inst);
67257
+ return maximum ? new Date(maximum) : null;
67258
+ }
67259
+ }, {})
67260
+ );
66798
67261
  function date2(params) {
66799
67262
  return _date(ZodDate, params);
66800
67263
  }
@@ -66839,19 +67302,19 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
66839
67302
  return _enum2(Object.keys(this._zod.def.shape));
66840
67303
  },
66841
67304
  catchall(catchall) {
66842
- return this.clone({ ...this._zod.def, catchall });
67305
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall }));
66843
67306
  },
66844
67307
  passthrough() {
66845
- return this.clone({ ...this._zod.def, catchall: unknown() });
67308
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: unknown() }));
66846
67309
  },
66847
67310
  loose() {
66848
- return this.clone({ ...this._zod.def, catchall: unknown() });
67311
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: unknown() }));
66849
67312
  },
66850
67313
  strict() {
66851
- return this.clone({ ...this._zod.def, catchall: never() });
67314
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: never() }));
66852
67315
  },
66853
67316
  strip() {
66854
- return this.clone({ ...this._zod.def, catchall: void 0 });
67317
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: void 0 }));
66855
67318
  },
66856
67319
  extend(incoming) {
66857
67320
  return util_exports.extend(this, incoming);
@@ -67070,7 +67533,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
67070
67533
  ZodType.init(inst, def);
67071
67534
  inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params);
67072
67535
  inst.enum = def.entries;
67073
- inst.options = Object.values(def.entries);
67536
+ inst.options = [...inst._zod.values];
67074
67537
  const keys = new Set(Object.keys(def.entries));
67075
67538
  inst.extract = (values, params) => {
67076
67539
  const newEntries = {};
@@ -67414,6 +67877,14 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
67414
67877
  ZodType.init(inst, def);
67415
67878
  inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
67416
67879
  });
67880
+ var ZodProperties = /* @__PURE__ */ $constructor("ZodProperties", (inst, def) => {
67881
+ _ensureDefaultMemoizer();
67882
+ $ZodProperties.init(inst, def);
67883
+ ZodType.init(inst, def);
67884
+ });
67885
+ function properties(shape, params) {
67886
+ return _properties(ZodProperties, shape, params);
67887
+ }
67417
67888
  function check(fn) {
67418
67889
  const ch = new $ZodCheck({
67419
67890
  check: "custom"
@@ -67433,8 +67904,15 @@ function superRefine(fn, params) {
67433
67904
  }
67434
67905
  var describe2 = describe;
67435
67906
  var meta2 = meta;
67907
+ var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) => {
67908
+ ZodCustom.init(inst, def);
67909
+ }, {
67910
+ properties(shape, params) {
67911
+ return this.check(properties(shape, params));
67912
+ }
67913
+ });
67436
67914
  function _instanceof(cls, params = {}) {
67437
- const inst = new ZodCustom({
67915
+ const inst = new ZodInstanceOf({
67438
67916
  type: "custom",
67439
67917
  check: "custom",
67440
67918
  fn: (data) => data instanceof cls,
@@ -67639,27 +68117,188 @@ function resolveRef(ref, ctx) {
67639
68117
  }
67640
68118
  throw new Error(`Reference not found: ${ref}`);
67641
68119
  }
67642
- function checkPropertyNames(objectSchema, keySchema) {
68120
+ function checkObjectGuards(objectSchema, guards) {
67643
68121
  const guard = z.transform((value) => value).check((payload2) => {
67644
68122
  const value = payload2.value;
67645
68123
  if (typeof value !== "object" || value === null || Array.isArray(value))
67646
68124
  return;
67647
- for (const key of Object.getOwnPropertyNames(value)) {
67648
- const result = keySchema.safeParse(key);
67649
- if (result.success)
67650
- continue;
68125
+ const keys = Object.getOwnPropertyNames(value);
68126
+ if (guards.minProperties !== void 0 && keys.length < guards.minProperties) {
67651
68127
  payload2.issues.push({
67652
- code: "invalid_key",
67653
- origin: "record",
67654
- issues: result.error.issues,
67655
- input: key,
67656
- path: [key],
68128
+ origin: "object",
68129
+ code: "too_small",
68130
+ minimum: guards.minProperties,
68131
+ inclusive: true,
68132
+ message: `Too small: expected object to have >=${guards.minProperties} properties`,
68133
+ input: value,
68134
+ inst: objectSchema,
68135
+ continue: true
68136
+ });
68137
+ }
68138
+ if (guards.maxProperties !== void 0 && keys.length > guards.maxProperties) {
68139
+ payload2.issues.push({
68140
+ origin: "object",
68141
+ code: "too_big",
68142
+ maximum: guards.maxProperties,
68143
+ inclusive: true,
68144
+ message: `Too big: expected object to have <=${guards.maxProperties} properties`,
68145
+ input: value,
68146
+ inst: objectSchema,
67657
68147
  continue: true
67658
68148
  });
67659
68149
  }
68150
+ if (guards.keySchema) {
68151
+ for (const key of keys) {
68152
+ const result = guards.keySchema.safeParse(key);
68153
+ if (result.success)
68154
+ continue;
68155
+ payload2.issues.push({
68156
+ code: "invalid_key",
68157
+ origin: "record",
68158
+ issues: result.error.issues,
68159
+ input: key,
68160
+ path: [key],
68161
+ continue: true
68162
+ });
68163
+ }
68164
+ }
67660
68165
  });
67661
68166
  return guard.pipe(objectSchema);
67662
68167
  }
68168
+ function canonicalKey(value, seen) {
68169
+ if (value === null)
68170
+ return "z";
68171
+ const type = typeof value;
68172
+ if (type !== "object") {
68173
+ if (type === "number" && Number.isNaN(value))
68174
+ return null;
68175
+ const raw2 = String(value);
68176
+ return `${type[0]}${raw2.length}:${raw2}`;
68177
+ }
68178
+ if (seen.has(value))
68179
+ return null;
68180
+ seen.add(value);
68181
+ try {
68182
+ if (Array.isArray(value)) {
68183
+ const parts2 = [];
68184
+ for (const item of value) {
68185
+ const key = canonicalKey(item, seen);
68186
+ if (key === null)
68187
+ return null;
68188
+ parts2.push(key);
68189
+ }
68190
+ return `a${parts2.length}:[${parts2.join(",")}]`;
68191
+ }
68192
+ const keys = Object.keys(value).sort();
68193
+ const parts = [];
68194
+ for (const k5 of keys) {
68195
+ const key = canonicalKey(value[k5], seen);
68196
+ if (key === null)
68197
+ return null;
68198
+ parts.push(`${k5.length}:${k5}=${key}`);
68199
+ }
68200
+ return `o${parts.length}:{${parts.join(",")}}`;
68201
+ } finally {
68202
+ seen.delete(value);
68203
+ }
68204
+ }
68205
+ var SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
68206
+ "items",
68207
+ "prefixItems",
68208
+ "additionalItems",
68209
+ "additionalProperties",
68210
+ "contains",
68211
+ "propertyNames",
68212
+ "not",
68213
+ "if",
68214
+ "then",
68215
+ "else",
68216
+ "allOf",
68217
+ "anyOf",
68218
+ "oneOf",
68219
+ "unevaluatedItems",
68220
+ "unevaluatedProperties",
68221
+ "contentSchema"
68222
+ ]);
68223
+ var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
68224
+ "properties",
68225
+ "patternProperties",
68226
+ "dependentSchemas",
68227
+ "dependencies",
68228
+ "$defs",
68229
+ "definitions"
68230
+ ]);
68231
+ function containsRef(value) {
68232
+ if (typeof value !== "object" || value === null)
68233
+ return false;
68234
+ if (Array.isArray(value))
68235
+ return value.some(containsRef);
68236
+ if (typeof value.$ref === "string")
68237
+ return true;
68238
+ return Object.entries(value).some(([key, sub]) => {
68239
+ if (SCHEMA_KEYWORDS.has(key))
68240
+ return containsRef(sub);
68241
+ if (!SCHEMA_MAP_KEYWORDS.has(key) || typeof sub !== "object" || sub === null)
68242
+ return false;
68243
+ return Object.values(sub).some(containsRef);
68244
+ });
68245
+ }
68246
+ function plural(n3) {
68247
+ return n3 === 1 ? "element" : "elements";
68248
+ }
68249
+ function checkArrayGuards(arraySchema, guards) {
68250
+ const guard = z.transform((value) => value).check((payload2) => {
68251
+ const items = payload2.value;
68252
+ if (!Array.isArray(items))
68253
+ return;
68254
+ if (guards.uniqueItems === true) {
68255
+ const firstSeen = /* @__PURE__ */ new Map();
68256
+ for (let i5 = 0; i5 < items.length; i5++) {
68257
+ const key = canonicalKey(items[i5], /* @__PURE__ */ new Set());
68258
+ if (key === null)
68259
+ continue;
68260
+ const first = firstSeen.get(key);
68261
+ if (first === void 0) {
68262
+ firstSeen.set(key, i5);
68263
+ continue;
68264
+ }
68265
+ payload2.issues.push({
68266
+ code: "custom",
68267
+ message: `Array items must be unique: element at index ${i5} duplicates the one at index ${first}`,
68268
+ input: items,
68269
+ path: [i5],
68270
+ continue: true
68271
+ });
68272
+ }
68273
+ }
68274
+ if (guards.containsSchema) {
68275
+ const minContains = guards.minContains ?? 1;
68276
+ const ceiling = guards.maxContains !== void 0 ? guards.maxContains + 1 : Number.POSITIVE_INFINITY;
68277
+ let matches = 0;
68278
+ for (const item of items) {
68279
+ if (guards.containsSchema.safeParse(item).success && ++matches >= ceiling)
68280
+ break;
68281
+ }
68282
+ if (matches < minContains) {
68283
+ payload2.issues.push({
68284
+ code: "custom",
68285
+ message: `Array must contain at least ${minContains} matching ${plural(minContains)}; found ${matches}`,
68286
+ input: items,
68287
+ continue: true
68288
+ });
68289
+ }
68290
+ if (guards.maxContains !== void 0 && matches > guards.maxContains) {
68291
+ payload2.issues.push({
68292
+ code: "custom",
68293
+ message: `Array must contain at most ${guards.maxContains} matching ${plural(guards.maxContains)}`,
68294
+ input: items,
68295
+ continue: true
68296
+ });
68297
+ }
68298
+ }
68299
+ });
68300
+ return guard.pipe(arraySchema);
68301
+ }
67663
68302
  function getTupleRest(restSchema, ctx) {
67664
68303
  if (restSchema === false) {
67665
68304
  return void 0;
@@ -67789,6 +68428,8 @@ function convertBaseSchema(schema, ctx) {
67789
68428
  stringSchema = stringSchema.check(z.e164());
67790
68429
  } else if (format2 === "credit_card") {
67791
68430
  stringSchema = stringSchema.check(z.creditCard());
68431
+ } else if (format2 === "iban") {
68432
+ stringSchema = stringSchema.check(z.iban());
67792
68433
  } else if (format2 === "jwt") {
67793
68434
  stringSchema = stringSchema.check(z.jwt());
67794
68435
  } else if (format2 === "emoji") {
@@ -67854,10 +68495,10 @@ function convertBaseSchema(schema, ctx) {
67854
68495
  }
67855
68496
  case "object": {
67856
68497
  const shape = {};
67857
- const properties = schema.properties || {};
68498
+ const properties2 = schema.properties || {};
67858
68499
  const requiredSet = new Set(schema.required || []);
67859
68500
  const additionalSchema = typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : void 0;
67860
- for (const [key, propSchema] of Object.entries(properties)) {
68501
+ for (const [key, propSchema] of Object.entries(properties2)) {
67861
68502
  const propZodSchema = convertSchema(propSchema, ctx);
67862
68503
  assignProp(shape, key, requiredSet.has(key) ? propZodSchema : propZodSchema.optional());
67863
68504
  }
@@ -67921,9 +68562,16 @@ function convertBaseSchema(schema, ctx) {
67921
68562
  zodSchema = objectSchema.passthrough();
67922
68563
  }
67923
68564
  }
67924
- if (schema.propertyNames !== void 0 && schema.propertyNames !== true) {
67925
- const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === void 0 ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
67926
- zodSchema = checkPropertyNames(zodSchema, convertSchema(keyJSONSchema, ctx));
68565
+ const hasKeyGuard = schema.propertyNames !== void 0 && schema.propertyNames !== true;
68566
+ const minProperties = typeof schema.minProperties === "number" ? schema.minProperties : void 0;
68567
+ const maxProperties = typeof schema.maxProperties === "number" ? schema.maxProperties : void 0;
68568
+ if (hasKeyGuard || minProperties !== void 0 || maxProperties !== void 0) {
68569
+ let keySchema;
68570
+ if (hasKeyGuard) {
68571
+ const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === void 0 ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
68572
+ keySchema = convertSchema(keyJSONSchema, ctx);
68573
+ }
68574
+ zodSchema = checkObjectGuards(zodSchema, { keySchema, minProperties, maxProperties });
67927
68575
  }
67928
68576
  break;
67929
68577
  }
@@ -67969,6 +68617,14 @@ function convertBaseSchema(schema, ctx) {
67969
68617
  } else {
67970
68618
  zodSchema = z.array(z.any());
67971
68619
  }
68620
+ if (schema.uniqueItems === true || schema.contains !== void 0) {
68621
+ zodSchema = checkArrayGuards(zodSchema, {
68622
+ uniqueItems: schema.uniqueItems === true,
68623
+ containsSchema: schema.contains !== void 0 ? convertSchema(schema.contains, ctx) : void 0,
68624
+ minContains: typeof schema.minContains === "number" ? schema.minContains : void 0,
68625
+ maxContains: typeof schema.maxContains === "number" ? schema.maxContains : void 0
68626
+ });
68627
+ }
67972
68628
  break;
67973
68629
  }
67974
68630
  default:
@@ -68026,8 +68682,23 @@ function convertSchema(schema, ctx) {
68026
68682
  extraMeta[key] = schema[key];
68027
68683
  }
68028
68684
  }
68029
- if (schema.propertyNames !== void 0 && schema.type === "object" && schema.$ref === void 0) {
68030
- extraMeta.propertyNames = schema.propertyNames;
68685
+ if (schema.type === "object" && schema.$ref === void 0) {
68686
+ if (schema.propertyNames !== void 0 && !containsRef(schema.propertyNames)) {
68687
+ extraMeta.propertyNames = schema.propertyNames;
68688
+ }
68689
+ for (const key of ["minProperties", "maxProperties"]) {
68690
+ if (schema[key] !== void 0)
68691
+ extraMeta[key] = schema[key];
68692
+ }
68693
+ }
68694
+ if (schema.type === "array" && schema.$ref === void 0) {
68695
+ if (schema.contains !== void 0 && !containsRef(schema.contains)) {
68696
+ extraMeta.contains = schema.contains;
68697
+ }
68698
+ for (const key of ["uniqueItems", "minContains", "maxContains"]) {
68699
+ if (schema[key] !== void 0)
68700
+ extraMeta[key] = schema[key];
68701
+ }
68031
68702
  }
68032
68703
  for (const key of Object.keys(schema)) {
68033
68704
  if (!RECOGNIZED_KEYS.has(key)) {
@@ -68188,6 +68859,18 @@ function visit(schema, fnOrHandlers) {
68188
68859
  const { _cachedInner, ...rest } = def;
68189
68860
  return clone(s2, { ...rest, getter: () => run(original()) });
68190
68861
  }
68862
+ case "properties": {
68863
+ const oldShape = def.shape;
68864
+ let changed = false;
68865
+ const newShape = {};
68866
+ for (const k5 of Reflect.ownKeys(oldShape)) {
68867
+ const mapped = run(oldShape[k5]);
68868
+ if (mapped !== oldShape[k5])
68869
+ changed = true;
68870
+ newShape[k5] = mapped;
68871
+ }
68872
+ return changed ? clone(s2, { ...def, shape: newShape }) : s2;
68873
+ }
68191
68874
  // A leaf by choice: `parts` are regex fragments, not data positions.
68192
68875
  case "template_literal":
68193
68876
  // Leaves.
@@ -69744,7 +70427,7 @@ async function fetchGitlabCiPipeline(args) {
69744
70427
  const source = gitlabCiSourceSchema.parse(args.source);
69745
70428
  const token = args.credentials.get(source.token_env);
69746
70429
  if (!token)
69747
- return failure(
70430
+ return failure2(
69748
70431
  panel.id,
69749
70432
  "unauthorized",
69750
70433
  "GitLab credentials are not available.",
@@ -69757,7 +70440,7 @@ async function fetchGitlabCiPipeline(args) {
69757
70440
  try {
69758
70441
  upstream = await args.fetcher(call.url, { headers: call.headers });
69759
70442
  } catch (error62) {
69760
- return failure(panel.id, "unreachable", error62, sourceLink3(source), void 0, {
70443
+ return failure2(panel.id, "unreachable", error62, sourceLink3(source), void 0, {
69761
70444
  kind: "unreachable",
69762
70445
  ...safeNetworkCode(error62) ? { networkCode: safeNetworkCode(error62) } : {}
69763
70446
  });
@@ -69765,7 +70448,7 @@ async function fetchGitlabCiPipeline(args) {
69765
70448
  if (upstream.status === 304) return { response: upstream };
69766
70449
  if (!upstream.ok) {
69767
70450
  const kind = upstreamErrorKind(upstream.status);
69768
- return failure(
70451
+ return failure2(
69769
70452
  panel.id,
69770
70453
  kind,
69771
70454
  `${upstream.status} ${upstream.statusText}`,
@@ -69778,7 +70461,7 @@ async function fetchGitlabCiPipeline(args) {
69778
70461
  const pipeline = external_exports.array(pipelineSchema).parse(await upstream.json())[0];
69779
70462
  if (!pipeline) {
69780
70463
  const detail = source.branch ? `No pipelines found for ref "${source.branch}". Check the source's branch setting.` : "No pipelines found.";
69781
- return failure(
70464
+ return failure2(
69782
70465
  panel.id,
69783
70466
  "no-runs",
69784
70467
  detail,
@@ -69809,7 +70492,7 @@ async function fetchGitlabCiPipeline(args) {
69809
70492
  };
69810
70493
  return { envelope, response: upstream };
69811
70494
  } catch (error62) {
69812
- return failure(
70495
+ return failure2(
69813
70496
  panel.id,
69814
70497
  "upstream-error",
69815
70498
  error62,
@@ -69844,12 +70527,12 @@ function timestamp3(value) {
69844
70527
  if (!value || !external_exports.iso.datetime().safeParse(value).success) return void 0;
69845
70528
  return Number.isFinite(new Date(value).valueOf()) ? value : void 0;
69846
70529
  }
69847
- function failure(panelId, kind, error62, link, date6, failure2) {
70530
+ function failure2(panelId, kind, error62, link, date6, failure3) {
69848
70531
  return {
69849
70532
  response: upstreamErrorResponse(
69850
70533
  upstreamErrorEnvelope({ panelId, kind, error: error62, link, upstreamDate: date6 })
69851
70534
  ),
69852
- ...failure2 ? { failure: failure2 } : { failure: { kind } }
70535
+ ...failure3 ? { failure: failure3 } : { failure: { kind } }
69853
70536
  };
69854
70537
  }
69855
70538