drizzle-kit 0.20.17-7f33638 → 0.20.17-9f0ea64

Sign up to get free protection for your applications and to get access to all the features.
package/payload.mjs CHANGED
@@ -40,7 +40,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  ));
41
41
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
42
 
43
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
43
+ // node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js
44
44
  function assembleStyles() {
45
45
  const codes = /* @__PURE__ */ new Map();
46
46
  for (const [groupName, group] of Object.entries(styles)) {
@@ -157,7 +157,7 @@ function assembleStyles() {
157
157
  }
158
158
  var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
159
159
  var init_ansi_styles = __esm({
160
- "node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
160
+ "node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
161
161
  ANSI_BACKGROUND_OFFSET = 10;
162
162
  wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
163
163
  wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -231,7 +231,7 @@ var init_ansi_styles = __esm({
231
231
  }
232
232
  });
233
233
 
234
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
234
+ // node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js
235
235
  import process2 from "node:process";
236
236
  import os from "node:os";
237
237
  import tty from "node:tty";
@@ -298,7 +298,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
298
298
  return 1;
299
299
  }
300
300
  if ("CI" in env) {
301
- if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
301
+ if ("GITHUB_ACTIONS" in env) {
302
302
  return 3;
303
303
  }
304
304
  if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
@@ -346,7 +346,7 @@ function createSupportsColor(stream, options = {}) {
346
346
  }
347
347
  var env, flagForceColor, supportsColor, supports_color_default;
348
348
  var init_supports_color = __esm({
349
- "node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js"() {
349
+ "node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js"() {
350
350
  ({ env } = process2);
351
351
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
352
352
  flagForceColor = 0;
@@ -361,7 +361,7 @@ var init_supports_color = __esm({
361
361
  }
362
362
  });
363
363
 
364
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
364
+ // node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js
365
365
  function stringReplaceAll(string, substring, replacer) {
366
366
  let index4 = string.indexOf(substring);
367
367
  if (index4 === -1) {
@@ -391,20 +391,21 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index4) {
391
391
  return returnValue;
392
392
  }
393
393
  var init_utilities = __esm({
394
- "node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js"() {
394
+ "node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js"() {
395
395
  }
396
396
  });
397
397
 
398
- // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
398
+ // node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
399
399
  function createChalk(options) {
400
400
  return chalkFactory(options);
401
401
  }
402
402
  var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default;
403
403
  var init_source = __esm({
404
- "node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js"() {
404
+ "node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js"() {
405
405
  init_ansi_styles();
406
406
  init_supports_color();
407
407
  init_utilities();
408
+ init_ansi_styles();
408
409
  ({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
409
410
  GENERATOR = Symbol("GENERATOR");
410
411
  STYLER = Symbol("STYLER");
@@ -1115,12 +1116,11 @@ var init_global = __esm({
1115
1116
  }
1116
1117
  });
1117
1118
 
1118
- // node_modules/.pnpm/zod@3.23.0/node_modules/zod/lib/index.mjs
1119
+ // node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs
1119
1120
  function getErrorMap() {
1120
1121
  return overrideErrorMap;
1121
1122
  }
1122
1123
  function addIssueToContext(ctx, issueData) {
1123
- const overrideMap = getErrorMap();
1124
1124
  const issue = makeIssue({
1125
1125
  issueData,
1126
1126
  data: ctx.data,
@@ -1128,29 +1128,13 @@ function addIssueToContext(ctx, issueData) {
1128
1128
  errorMaps: [
1129
1129
  ctx.common.contextualErrorMap,
1130
1130
  ctx.schemaErrorMap,
1131
- overrideMap,
1132
- overrideMap === errorMap ? void 0 : errorMap
1131
+ getErrorMap(),
1132
+ errorMap
1133
1133
  // then global default map
1134
1134
  ].filter((x) => !!x)
1135
1135
  });
1136
1136
  ctx.common.issues.push(issue);
1137
1137
  }
1138
- function __classPrivateFieldGet(receiver, state, kind, f) {
1139
- if (kind === "a" && !f)
1140
- throw new TypeError("Private accessor was defined without a getter");
1141
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1142
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
1143
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1144
- }
1145
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1146
- if (kind === "m")
1147
- throw new TypeError("Private method is not writable");
1148
- if (kind === "a" && !f)
1149
- throw new TypeError("Private accessor was defined without a setter");
1150
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1151
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
1152
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
1153
- }
1154
1138
  function processCreateParams(params) {
1155
1139
  if (!params)
1156
1140
  return {};
@@ -1161,50 +1145,15 @@ function processCreateParams(params) {
1161
1145
  if (errorMap2)
1162
1146
  return { errorMap: errorMap2, description };
1163
1147
  const customMap = (iss, ctx) => {
1164
- var _a, _b;
1165
- const { message } = params;
1166
- if (iss.code === "invalid_enum_value") {
1167
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
1168
- }
1169
- if (typeof ctx.data === "undefined") {
1170
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
1171
- }
1172
1148
  if (iss.code !== "invalid_type")
1173
1149
  return { message: ctx.defaultError };
1174
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
1150
+ if (typeof ctx.data === "undefined") {
1151
+ return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
1152
+ }
1153
+ return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
1175
1154
  };
1176
1155
  return { errorMap: customMap, description };
1177
1156
  }
1178
- function timeRegexSource(args) {
1179
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
1180
- if (args.precision) {
1181
- regex = `${regex}\\.\\d{${args.precision}}`;
1182
- } else if (args.precision == null) {
1183
- regex = `${regex}(\\.\\d+)?`;
1184
- }
1185
- return regex;
1186
- }
1187
- function timeRegex(args) {
1188
- return new RegExp(`^${timeRegexSource(args)}$`);
1189
- }
1190
- function datetimeRegex(args) {
1191
- let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
1192
- const opts = [];
1193
- opts.push(args.local ? `Z?` : `Z`);
1194
- if (args.offset)
1195
- opts.push(`([+-]\\d{2}:?\\d{2})`);
1196
- regex = `${regex}(${opts.join("|")})`;
1197
- return new RegExp(`^${regex}$`);
1198
- }
1199
- function isValidIP(ip, version) {
1200
- if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
1201
- return true;
1202
- }
1203
- if ((version === "v6" || !version) && ipv6Regex.test(ip)) {
1204
- return true;
1205
- }
1206
- return false;
1207
- }
1208
1157
  function floatSafeRemainder(val, step) {
1209
1158
  const valDecCount = (val.toString().split(".")[1] || "").length;
1210
1159
  const stepDecCount = (step.toString().split(".")[1] || "").length;
@@ -1225,10 +1174,7 @@ function deepPartialify(schema4) {
1225
1174
  shape: () => newShape
1226
1175
  });
1227
1176
  } else if (schema4 instanceof ZodArray) {
1228
- return new ZodArray({
1229
- ...schema4._def,
1230
- type: deepPartialify(schema4.element)
1231
- });
1177
+ return ZodArray.create(deepPartialify(schema4.element));
1232
1178
  } else if (schema4 instanceof ZodOptional) {
1233
1179
  return ZodOptional.create(deepPartialify(schema4.unwrap()));
1234
1180
  } else if (schema4 instanceof ZodNullable) {
@@ -1284,9 +1230,9 @@ function createZodEnum(values, params) {
1284
1230
  ...processCreateParams(params)
1285
1231
  });
1286
1232
  }
1287
- var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
1233
+ var util, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType, cuidRegex, uuidRegex, emailRegex, datetimeRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, objectUtil, AugmentFactory, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
1288
1234
  var init_lib = __esm({
1289
- "node_modules/.pnpm/zod@3.23.0/node_modules/zod/lib/index.mjs"() {
1235
+ "node_modules/.pnpm/zod@3.20.2/node_modules/zod/lib/index.mjs"() {
1290
1236
  (function(util2) {
1291
1237
  util2.assertEqual = (val) => val;
1292
1238
  function assertIs(_arg) {
@@ -1344,15 +1290,6 @@ var init_lib = __esm({
1344
1290
  return value;
1345
1291
  };
1346
1292
  })(util || (util = {}));
1347
- (function(objectUtil2) {
1348
- objectUtil2.mergeShapes = (first, second) => {
1349
- return {
1350
- ...first,
1351
- ...second
1352
- // second overwrites first
1353
- };
1354
- };
1355
- })(objectUtil || (objectUtil = {}));
1356
1293
  ZodParsedType = util.arrayToEnum([
1357
1294
  "string",
1358
1295
  "nan",
@@ -1434,7 +1371,7 @@ var init_lib = __esm({
1434
1371
  "not_multiple_of",
1435
1372
  "not_finite"
1436
1373
  ]);
1437
- ZodError = class _ZodError extends Error {
1374
+ ZodError = class extends Error {
1438
1375
  constructor(issues) {
1439
1376
  super();
1440
1377
  this.issues = [];
@@ -1492,11 +1429,6 @@ var init_lib = __esm({
1492
1429
  processError(this);
1493
1430
  return fieldErrors;
1494
1431
  }
1495
- static assert(value) {
1496
- if (!(value instanceof _ZodError)) {
1497
- throw new Error(`Not a ZodError: ${value}`);
1498
- }
1499
- }
1500
1432
  toString() {
1501
1433
  return this.message;
1502
1434
  }
@@ -1563,12 +1495,7 @@ var init_lib = __esm({
1563
1495
  break;
1564
1496
  case ZodIssueCode.invalid_string:
1565
1497
  if (typeof issue.validation === "object") {
1566
- if ("includes" in issue.validation) {
1567
- message = `Invalid input: must include "${issue.validation.includes}"`;
1568
- if (typeof issue.validation.position === "number") {
1569
- message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
1570
- }
1571
- } else if ("startsWith" in issue.validation) {
1498
+ if ("startsWith" in issue.validation) {
1572
1499
  message = `Invalid input: must start with "${issue.validation.startsWith}"`;
1573
1500
  } else if ("endsWith" in issue.validation) {
1574
1501
  message = `Invalid input: must end with "${issue.validation.endsWith}"`;
@@ -1589,7 +1516,7 @@ var init_lib = __esm({
1589
1516
  else if (issue.type === "number")
1590
1517
  message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
1591
1518
  else if (issue.type === "date")
1592
- message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
1519
+ message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(issue.minimum)}`;
1593
1520
  else
1594
1521
  message = "Invalid input";
1595
1522
  break;
@@ -1600,10 +1527,8 @@ var init_lib = __esm({
1600
1527
  message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
1601
1528
  else if (issue.type === "number")
1602
1529
  message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
1603
- else if (issue.type === "bigint")
1604
- message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
1605
1530
  else if (issue.type === "date")
1606
- message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
1531
+ message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(issue.maximum)}`;
1607
1532
  else
1608
1533
  message = "Invalid input";
1609
1534
  break;
@@ -1633,13 +1558,6 @@ var init_lib = __esm({
1633
1558
  ...issueData,
1634
1559
  path: fullPath
1635
1560
  };
1636
- if (issueData.message !== void 0) {
1637
- return {
1638
- ...issueData,
1639
- path: fullPath,
1640
- message: issueData.message
1641
- };
1642
- }
1643
1561
  let errorMessage = "";
1644
1562
  const maps = errorMaps.filter((m) => !!m).slice().reverse();
1645
1563
  for (const map of maps) {
@@ -1648,7 +1566,7 @@ var init_lib = __esm({
1648
1566
  return {
1649
1567
  ...issueData,
1650
1568
  path: fullPath,
1651
- message: errorMessage
1569
+ message: issueData.message || errorMessage
1652
1570
  };
1653
1571
  };
1654
1572
  ParseStatus = class _ParseStatus {
@@ -1677,11 +1595,9 @@ var init_lib = __esm({
1677
1595
  static async mergeObjectAsync(status, pairs) {
1678
1596
  const syncPairs = [];
1679
1597
  for (const pair of pairs) {
1680
- const key = await pair.key;
1681
- const value = await pair.value;
1682
1598
  syncPairs.push({
1683
- key,
1684
- value
1599
+ key: await pair.key,
1600
+ value: await pair.value
1685
1601
  });
1686
1602
  }
1687
1603
  return _ParseStatus.mergeObjectSync(status, syncPairs);
@@ -1698,7 +1614,7 @@ var init_lib = __esm({
1698
1614
  status.dirty();
1699
1615
  if (value.status === "dirty")
1700
1616
  status.dirty();
1701
- if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
1617
+ if (typeof value.value !== "undefined" || pair.alwaysSet) {
1702
1618
  finalObject[key.value] = value.value;
1703
1619
  }
1704
1620
  }
@@ -1713,28 +1629,20 @@ var init_lib = __esm({
1713
1629
  isAborted = (x) => x.status === "aborted";
1714
1630
  isDirty = (x) => x.status === "dirty";
1715
1631
  isValid = (x) => x.status === "valid";
1716
- isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
1632
+ isAsync = (x) => typeof Promise !== void 0 && x instanceof Promise;
1717
1633
  (function(errorUtil2) {
1718
1634
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
1719
1635
  errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
1720
1636
  })(errorUtil || (errorUtil = {}));
1721
1637
  ParseInputLazyPath = class {
1722
1638
  constructor(parent, value, path2, key) {
1723
- this._cachedPath = [];
1724
1639
  this.parent = parent;
1725
1640
  this.data = value;
1726
1641
  this._path = path2;
1727
1642
  this._key = key;
1728
1643
  }
1729
1644
  get path() {
1730
- if (!this._cachedPath.length) {
1731
- if (this._key instanceof Array) {
1732
- this._cachedPath.push(...this._path, ...this._key);
1733
- } else {
1734
- this._cachedPath.push(...this._path, this._key);
1735
- }
1736
- }
1737
- return this._cachedPath;
1645
+ return this._path.concat(this._key);
1738
1646
  }
1739
1647
  };
1740
1648
  handleResult = (ctx, result) => {
@@ -1744,16 +1652,8 @@ var init_lib = __esm({
1744
1652
  if (!ctx.common.issues.length) {
1745
1653
  throw new Error("Validation failed but no issues detected.");
1746
1654
  }
1747
- return {
1748
- success: false,
1749
- get error() {
1750
- if (this._error)
1751
- return this._error;
1752
- const error2 = new ZodError(ctx.common.issues);
1753
- this._error = error2;
1754
- return this._error;
1755
- }
1756
- };
1655
+ const error2 = new ZodError(ctx.common.issues);
1656
+ return { success: false, error: error2 };
1757
1657
  }
1758
1658
  };
1759
1659
  ZodType = class {
@@ -1781,7 +1681,6 @@ var init_lib = __esm({
1781
1681
  this.catch = this.catch.bind(this);
1782
1682
  this.describe = this.describe.bind(this);
1783
1683
  this.pipe = this.pipe.bind(this);
1784
- this.readonly = this.readonly.bind(this);
1785
1684
  this.isNullable = this.isNullable.bind(this);
1786
1685
  this.isOptional = this.isOptional.bind(this);
1787
1686
  }
@@ -1926,29 +1825,28 @@ var init_lib = __esm({
1926
1825
  return this._refinement(refinement);
1927
1826
  }
1928
1827
  optional() {
1929
- return ZodOptional.create(this, this._def);
1828
+ return ZodOptional.create(this);
1930
1829
  }
1931
1830
  nullable() {
1932
- return ZodNullable.create(this, this._def);
1831
+ return ZodNullable.create(this);
1933
1832
  }
1934
1833
  nullish() {
1935
- return this.nullable().optional();
1834
+ return this.optional().nullable();
1936
1835
  }
1937
1836
  array() {
1938
- return ZodArray.create(this, this._def);
1837
+ return ZodArray.create(this);
1939
1838
  }
1940
1839
  promise() {
1941
- return ZodPromise.create(this, this._def);
1840
+ return ZodPromise.create(this);
1942
1841
  }
1943
1842
  or(option) {
1944
- return ZodUnion.create([this, option], this._def);
1843
+ return ZodUnion.create([this, option]);
1945
1844
  }
1946
1845
  and(incoming) {
1947
- return ZodIntersection.create(this, incoming, this._def);
1846
+ return ZodIntersection.create(this, incoming);
1948
1847
  }
1949
1848
  transform(transform) {
1950
1849
  return new ZodEffects({
1951
- ...processCreateParams(this._def),
1952
1850
  schema: this,
1953
1851
  typeName: ZodFirstPartyTypeKind.ZodEffects,
1954
1852
  effect: { type: "transform", transform }
@@ -1957,7 +1855,6 @@ var init_lib = __esm({
1957
1855
  default(def) {
1958
1856
  const defaultValueFunc = typeof def === "function" ? def : () => def;
1959
1857
  return new ZodDefault({
1960
- ...processCreateParams(this._def),
1961
1858
  innerType: this,
1962
1859
  defaultValue: defaultValueFunc,
1963
1860
  typeName: ZodFirstPartyTypeKind.ZodDefault
@@ -1967,15 +1864,14 @@ var init_lib = __esm({
1967
1864
  return new ZodBranded({
1968
1865
  typeName: ZodFirstPartyTypeKind.ZodBranded,
1969
1866
  type: this,
1970
- ...processCreateParams(this._def)
1867
+ ...processCreateParams(void 0)
1971
1868
  });
1972
1869
  }
1973
1870
  catch(def) {
1974
- const catchValueFunc = typeof def === "function" ? def : () => def;
1871
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
1975
1872
  return new ZodCatch({
1976
- ...processCreateParams(this._def),
1977
1873
  innerType: this,
1978
- catchValue: catchValueFunc,
1874
+ defaultValue: defaultValueFunc,
1979
1875
  typeName: ZodFirstPartyTypeKind.ZodCatch
1980
1876
  });
1981
1877
  }
@@ -1989,9 +1885,6 @@ var init_lib = __esm({
1989
1885
  pipe(target) {
1990
1886
  return ZodPipeline.create(this, target);
1991
1887
  }
1992
- readonly() {
1993
- return ZodReadonly.create(this);
1994
- }
1995
1888
  isOptional() {
1996
1889
  return this.safeParse(void 0).success;
1997
1890
  }
@@ -2000,19 +1893,43 @@ var init_lib = __esm({
2000
1893
  }
2001
1894
  };
2002
1895
  cuidRegex = /^c[^\s-]{8,}$/i;
2003
- cuid2Regex = /^[0-9a-z]+$/;
2004
- ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
2005
- uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
2006
- nanoidRegex = /^[a-z0-9_-]{21}$/i;
2007
- durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
2008
- emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
2009
- _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
2010
- ipv4Regex = /^(?:(?: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])$/;
2011
- ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
2012
- base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
2013
- dateRegexSource = `((\\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])))`;
2014
- dateRegex = new RegExp(`^${dateRegexSource}$`);
1896
+ uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
1897
+ emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
1898
+ datetimeRegex = (args) => {
1899
+ if (args.precision) {
1900
+ if (args.offset) {
1901
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
1902
+ } else {
1903
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
1904
+ }
1905
+ } else if (args.precision === 0) {
1906
+ if (args.offset) {
1907
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
1908
+ } else {
1909
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
1910
+ }
1911
+ } else {
1912
+ if (args.offset) {
1913
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
1914
+ } else {
1915
+ return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
1916
+ }
1917
+ }
1918
+ };
2015
1919
  ZodString = class _ZodString extends ZodType {
1920
+ constructor() {
1921
+ super(...arguments);
1922
+ this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {
1923
+ validation,
1924
+ code: ZodIssueCode.invalid_string,
1925
+ ...errorUtil.errToObj(message)
1926
+ });
1927
+ this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));
1928
+ this.trim = () => new _ZodString({
1929
+ ...this._def,
1930
+ checks: [...this._def.checks, { kind: "trim" }]
1931
+ });
1932
+ }
2016
1933
  _parse(input) {
2017
1934
  if (this._def.coerce) {
2018
1935
  input.data = String(input.data);
@@ -2020,11 +1937,15 @@ var init_lib = __esm({
2020
1937
  const parsedType = this._getType(input);
2021
1938
  if (parsedType !== ZodParsedType.string) {
2022
1939
  const ctx2 = this._getOrReturnCtx(input);
2023
- addIssueToContext(ctx2, {
2024
- code: ZodIssueCode.invalid_type,
2025
- expected: ZodParsedType.string,
2026
- received: ctx2.parsedType
2027
- });
1940
+ addIssueToContext(
1941
+ ctx2,
1942
+ {
1943
+ code: ZodIssueCode.invalid_type,
1944
+ expected: ZodParsedType.string,
1945
+ received: ctx2.parsedType
1946
+ }
1947
+ //
1948
+ );
2028
1949
  return INVALID;
2029
1950
  }
2030
1951
  const status = new ParseStatus();
@@ -2092,19 +2013,6 @@ var init_lib = __esm({
2092
2013
  });
2093
2014
  status.dirty();
2094
2015
  }
2095
- } else if (check.kind === "emoji") {
2096
- if (!emojiRegex) {
2097
- emojiRegex = new RegExp(_emojiRegex, "u");
2098
- }
2099
- if (!emojiRegex.test(input.data)) {
2100
- ctx = this._getOrReturnCtx(input, ctx);
2101
- addIssueToContext(ctx, {
2102
- validation: "emoji",
2103
- code: ZodIssueCode.invalid_string,
2104
- message: check.message
2105
- });
2106
- status.dirty();
2107
- }
2108
2016
  } else if (check.kind === "uuid") {
2109
2017
  if (!uuidRegex.test(input.data)) {
2110
2018
  ctx = this._getOrReturnCtx(input, ctx);
@@ -2115,16 +2023,6 @@ var init_lib = __esm({
2115
2023
  });
2116
2024
  status.dirty();
2117
2025
  }
2118
- } else if (check.kind === "nanoid") {
2119
- if (!nanoidRegex.test(input.data)) {
2120
- ctx = this._getOrReturnCtx(input, ctx);
2121
- addIssueToContext(ctx, {
2122
- validation: "nanoid",
2123
- code: ZodIssueCode.invalid_string,
2124
- message: check.message
2125
- });
2126
- status.dirty();
2127
- }
2128
2026
  } else if (check.kind === "cuid") {
2129
2027
  if (!cuidRegex.test(input.data)) {
2130
2028
  ctx = this._getOrReturnCtx(input, ctx);
@@ -2135,26 +2033,6 @@ var init_lib = __esm({
2135
2033
  });
2136
2034
  status.dirty();
2137
2035
  }
2138
- } else if (check.kind === "cuid2") {
2139
- if (!cuid2Regex.test(input.data)) {
2140
- ctx = this._getOrReturnCtx(input, ctx);
2141
- addIssueToContext(ctx, {
2142
- validation: "cuid2",
2143
- code: ZodIssueCode.invalid_string,
2144
- message: check.message
2145
- });
2146
- status.dirty();
2147
- }
2148
- } else if (check.kind === "ulid") {
2149
- if (!ulidRegex.test(input.data)) {
2150
- ctx = this._getOrReturnCtx(input, ctx);
2151
- addIssueToContext(ctx, {
2152
- validation: "ulid",
2153
- code: ZodIssueCode.invalid_string,
2154
- message: check.message
2155
- });
2156
- status.dirty();
2157
- }
2158
2036
  } else if (check.kind === "url") {
2159
2037
  try {
2160
2038
  new URL(input.data);
@@ -2181,20 +2059,6 @@ var init_lib = __esm({
2181
2059
  }
2182
2060
  } else if (check.kind === "trim") {
2183
2061
  input.data = input.data.trim();
2184
- } else if (check.kind === "includes") {
2185
- if (!input.data.includes(check.value, check.position)) {
2186
- ctx = this._getOrReturnCtx(input, ctx);
2187
- addIssueToContext(ctx, {
2188
- code: ZodIssueCode.invalid_string,
2189
- validation: { includes: check.value, position: check.position },
2190
- message: check.message
2191
- });
2192
- status.dirty();
2193
- }
2194
- } else if (check.kind === "toLowerCase") {
2195
- input.data = input.data.toLowerCase();
2196
- } else if (check.kind === "toUpperCase") {
2197
- input.data = input.data.toUpperCase();
2198
2062
  } else if (check.kind === "startsWith") {
2199
2063
  if (!input.data.startsWith(check.value)) {
2200
2064
  ctx = this._getOrReturnCtx(input, ctx);
@@ -2226,71 +2090,12 @@ var init_lib = __esm({
2226
2090
  });
2227
2091
  status.dirty();
2228
2092
  }
2229
- } else if (check.kind === "date") {
2230
- const regex = dateRegex;
2231
- if (!regex.test(input.data)) {
2232
- ctx = this._getOrReturnCtx(input, ctx);
2233
- addIssueToContext(ctx, {
2234
- code: ZodIssueCode.invalid_string,
2235
- validation: "date",
2236
- message: check.message
2237
- });
2238
- status.dirty();
2239
- }
2240
- } else if (check.kind === "time") {
2241
- const regex = timeRegex(check);
2242
- if (!regex.test(input.data)) {
2243
- ctx = this._getOrReturnCtx(input, ctx);
2244
- addIssueToContext(ctx, {
2245
- code: ZodIssueCode.invalid_string,
2246
- validation: "time",
2247
- message: check.message
2248
- });
2249
- status.dirty();
2250
- }
2251
- } else if (check.kind === "duration") {
2252
- if (!durationRegex.test(input.data)) {
2253
- ctx = this._getOrReturnCtx(input, ctx);
2254
- addIssueToContext(ctx, {
2255
- validation: "duration",
2256
- code: ZodIssueCode.invalid_string,
2257
- message: check.message
2258
- });
2259
- status.dirty();
2260
- }
2261
- } else if (check.kind === "ip") {
2262
- if (!isValidIP(input.data, check.version)) {
2263
- ctx = this._getOrReturnCtx(input, ctx);
2264
- addIssueToContext(ctx, {
2265
- validation: "ip",
2266
- code: ZodIssueCode.invalid_string,
2267
- message: check.message
2268
- });
2269
- status.dirty();
2270
- }
2271
- } else if (check.kind === "base64") {
2272
- if (!base64Regex.test(input.data)) {
2273
- ctx = this._getOrReturnCtx(input, ctx);
2274
- addIssueToContext(ctx, {
2275
- validation: "base64",
2276
- code: ZodIssueCode.invalid_string,
2277
- message: check.message
2278
- });
2279
- status.dirty();
2280
- }
2281
2093
  } else {
2282
2094
  util.assertNever(check);
2283
2095
  }
2284
2096
  }
2285
2097
  return { status: status.value, value: input.data };
2286
2098
  }
2287
- _regex(regex, validation, message) {
2288
- return this.refinement((data) => regex.test(data), {
2289
- validation,
2290
- code: ZodIssueCode.invalid_string,
2291
- ...errorUtil.errToObj(message)
2292
- });
2293
- }
2294
2099
  _addCheck(check) {
2295
2100
  return new _ZodString({
2296
2101
  ...this._def,
@@ -2303,38 +2108,19 @@ var init_lib = __esm({
2303
2108
  url(message) {
2304
2109
  return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
2305
2110
  }
2306
- emoji(message) {
2307
- return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
2308
- }
2309
2111
  uuid(message) {
2310
2112
  return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
2311
2113
  }
2312
- nanoid(message) {
2313
- return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
2314
- }
2315
2114
  cuid(message) {
2316
2115
  return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
2317
2116
  }
2318
- cuid2(message) {
2319
- return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
2320
- }
2321
- ulid(message) {
2322
- return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
2323
- }
2324
- base64(message) {
2325
- return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
2326
- }
2327
- ip(options) {
2328
- return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
2329
- }
2330
2117
  datetime(options) {
2331
- var _a, _b;
2118
+ var _a;
2332
2119
  if (typeof options === "string") {
2333
2120
  return this._addCheck({
2334
2121
  kind: "datetime",
2335
2122
  precision: null,
2336
2123
  offset: false,
2337
- local: false,
2338
2124
  message: options
2339
2125
  });
2340
2126
  }
@@ -2342,30 +2128,9 @@ var init_lib = __esm({
2342
2128
  kind: "datetime",
2343
2129
  precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2344
2130
  offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
2345
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
2346
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2347
- });
2348
- }
2349
- date(message) {
2350
- return this._addCheck({ kind: "date", message });
2351
- }
2352
- time(options) {
2353
- if (typeof options === "string") {
2354
- return this._addCheck({
2355
- kind: "time",
2356
- precision: null,
2357
- message: options
2358
- });
2359
- }
2360
- return this._addCheck({
2361
- kind: "time",
2362
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2363
2131
  ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2364
2132
  });
2365
2133
  }
2366
- duration(message) {
2367
- return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
2368
- }
2369
2134
  regex(regex, message) {
2370
2135
  return this._addCheck({
2371
2136
  kind: "regex",
@@ -2373,14 +2138,6 @@ var init_lib = __esm({
2373
2138
  ...errorUtil.errToObj(message)
2374
2139
  });
2375
2140
  }
2376
- includes(value, options) {
2377
- return this._addCheck({
2378
- kind: "includes",
2379
- value,
2380
- position: options === null || options === void 0 ? void 0 : options.position,
2381
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
2382
- });
2383
- }
2384
2141
  startsWith(value, message) {
2385
2142
  return this._addCheck({
2386
2143
  kind: "startsWith",
@@ -2416,73 +2173,21 @@ var init_lib = __esm({
2416
2173
  ...errorUtil.errToObj(message)
2417
2174
  });
2418
2175
  }
2419
- /**
2420
- * @deprecated Use z.string().min(1) instead.
2421
- * @see {@link ZodString.min}
2422
- */
2423
- nonempty(message) {
2424
- return this.min(1, errorUtil.errToObj(message));
2425
- }
2426
- trim() {
2427
- return new _ZodString({
2428
- ...this._def,
2429
- checks: [...this._def.checks, { kind: "trim" }]
2430
- });
2431
- }
2432
- toLowerCase() {
2433
- return new _ZodString({
2434
- ...this._def,
2435
- checks: [...this._def.checks, { kind: "toLowerCase" }]
2436
- });
2437
- }
2438
- toUpperCase() {
2439
- return new _ZodString({
2440
- ...this._def,
2441
- checks: [...this._def.checks, { kind: "toUpperCase" }]
2442
- });
2443
- }
2444
2176
  get isDatetime() {
2445
2177
  return !!this._def.checks.find((ch) => ch.kind === "datetime");
2446
2178
  }
2447
- get isDate() {
2448
- return !!this._def.checks.find((ch) => ch.kind === "date");
2449
- }
2450
- get isTime() {
2451
- return !!this._def.checks.find((ch) => ch.kind === "time");
2452
- }
2453
- get isDuration() {
2454
- return !!this._def.checks.find((ch) => ch.kind === "duration");
2455
- }
2456
2179
  get isEmail() {
2457
2180
  return !!this._def.checks.find((ch) => ch.kind === "email");
2458
2181
  }
2459
2182
  get isURL() {
2460
2183
  return !!this._def.checks.find((ch) => ch.kind === "url");
2461
2184
  }
2462
- get isEmoji() {
2463
- return !!this._def.checks.find((ch) => ch.kind === "emoji");
2464
- }
2465
2185
  get isUUID() {
2466
2186
  return !!this._def.checks.find((ch) => ch.kind === "uuid");
2467
2187
  }
2468
- get isNANOID() {
2469
- return !!this._def.checks.find((ch) => ch.kind === "nanoid");
2470
- }
2471
2188
  get isCUID() {
2472
2189
  return !!this._def.checks.find((ch) => ch.kind === "cuid");
2473
2190
  }
2474
- get isCUID2() {
2475
- return !!this._def.checks.find((ch) => ch.kind === "cuid2");
2476
- }
2477
- get isULID() {
2478
- return !!this._def.checks.find((ch) => ch.kind === "ulid");
2479
- }
2480
- get isIP() {
2481
- return !!this._def.checks.find((ch) => ch.kind === "ip");
2482
- }
2483
- get isBase64() {
2484
- return !!this._def.checks.find((ch) => ch.kind === "base64");
2485
- }
2486
2191
  get minLength() {
2487
2192
  let min = null;
2488
2193
  for (const ch of this._def.checks) {
@@ -2684,19 +2389,6 @@ var init_lib = __esm({
2684
2389
  message: errorUtil.toString(message)
2685
2390
  });
2686
2391
  }
2687
- safe(message) {
2688
- return this._addCheck({
2689
- kind: "min",
2690
- inclusive: true,
2691
- value: Number.MIN_SAFE_INTEGER,
2692
- message: errorUtil.toString(message)
2693
- })._addCheck({
2694
- kind: "max",
2695
- inclusive: true,
2696
- value: Number.MAX_SAFE_INTEGER,
2697
- message: errorUtil.toString(message)
2698
- });
2699
- }
2700
2392
  get minValue() {
2701
2393
  let min = null;
2702
2394
  for (const ch of this._def.checks) {
@@ -2718,22 +2410,7 @@ var init_lib = __esm({
2718
2410
  return max;
2719
2411
  }
2720
2412
  get isInt() {
2721
- return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
2722
- }
2723
- get isFinite() {
2724
- let max = null, min = null;
2725
- for (const ch of this._def.checks) {
2726
- if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
2727
- return true;
2728
- } else if (ch.kind === "min") {
2729
- if (min === null || ch.value > min)
2730
- min = ch.value;
2731
- } else if (ch.kind === "max") {
2732
- if (max === null || ch.value < max)
2733
- max = ch.value;
2734
- }
2735
- }
2736
- return Number.isFinite(min) && Number.isFinite(max);
2413
+ return !!this._def.checks.find((ch) => ch.kind === "int");
2737
2414
  }
2738
2415
  };
2739
2416
  ZodNumber.create = (params) => {
@@ -2744,167 +2421,27 @@ var init_lib = __esm({
2744
2421
  ...processCreateParams(params)
2745
2422
  });
2746
2423
  };
2747
- ZodBigInt = class _ZodBigInt extends ZodType {
2748
- constructor() {
2749
- super(...arguments);
2750
- this.min = this.gte;
2751
- this.max = this.lte;
2752
- }
2424
+ ZodBigInt = class extends ZodType {
2753
2425
  _parse(input) {
2754
2426
  if (this._def.coerce) {
2755
2427
  input.data = BigInt(input.data);
2756
2428
  }
2757
2429
  const parsedType = this._getType(input);
2758
2430
  if (parsedType !== ZodParsedType.bigint) {
2759
- const ctx2 = this._getOrReturnCtx(input);
2760
- addIssueToContext(ctx2, {
2431
+ const ctx = this._getOrReturnCtx(input);
2432
+ addIssueToContext(ctx, {
2761
2433
  code: ZodIssueCode.invalid_type,
2762
2434
  expected: ZodParsedType.bigint,
2763
- received: ctx2.parsedType
2435
+ received: ctx.parsedType
2764
2436
  });
2765
2437
  return INVALID;
2766
2438
  }
2767
- let ctx = void 0;
2768
- const status = new ParseStatus();
2769
- for (const check of this._def.checks) {
2770
- if (check.kind === "min") {
2771
- const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
2772
- if (tooSmall) {
2773
- ctx = this._getOrReturnCtx(input, ctx);
2774
- addIssueToContext(ctx, {
2775
- code: ZodIssueCode.too_small,
2776
- type: "bigint",
2777
- minimum: check.value,
2778
- inclusive: check.inclusive,
2779
- message: check.message
2780
- });
2781
- status.dirty();
2782
- }
2783
- } else if (check.kind === "max") {
2784
- const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
2785
- if (tooBig) {
2786
- ctx = this._getOrReturnCtx(input, ctx);
2787
- addIssueToContext(ctx, {
2788
- code: ZodIssueCode.too_big,
2789
- type: "bigint",
2790
- maximum: check.value,
2791
- inclusive: check.inclusive,
2792
- message: check.message
2793
- });
2794
- status.dirty();
2795
- }
2796
- } else if (check.kind === "multipleOf") {
2797
- if (input.data % check.value !== BigInt(0)) {
2798
- ctx = this._getOrReturnCtx(input, ctx);
2799
- addIssueToContext(ctx, {
2800
- code: ZodIssueCode.not_multiple_of,
2801
- multipleOf: check.value,
2802
- message: check.message
2803
- });
2804
- status.dirty();
2805
- }
2806
- } else {
2807
- util.assertNever(check);
2808
- }
2809
- }
2810
- return { status: status.value, value: input.data };
2811
- }
2812
- gte(value, message) {
2813
- return this.setLimit("min", value, true, errorUtil.toString(message));
2814
- }
2815
- gt(value, message) {
2816
- return this.setLimit("min", value, false, errorUtil.toString(message));
2817
- }
2818
- lte(value, message) {
2819
- return this.setLimit("max", value, true, errorUtil.toString(message));
2820
- }
2821
- lt(value, message) {
2822
- return this.setLimit("max", value, false, errorUtil.toString(message));
2823
- }
2824
- setLimit(kind, value, inclusive, message) {
2825
- return new _ZodBigInt({
2826
- ...this._def,
2827
- checks: [
2828
- ...this._def.checks,
2829
- {
2830
- kind,
2831
- value,
2832
- inclusive,
2833
- message: errorUtil.toString(message)
2834
- }
2835
- ]
2836
- });
2837
- }
2838
- _addCheck(check) {
2839
- return new _ZodBigInt({
2840
- ...this._def,
2841
- checks: [...this._def.checks, check]
2842
- });
2843
- }
2844
- positive(message) {
2845
- return this._addCheck({
2846
- kind: "min",
2847
- value: BigInt(0),
2848
- inclusive: false,
2849
- message: errorUtil.toString(message)
2850
- });
2851
- }
2852
- negative(message) {
2853
- return this._addCheck({
2854
- kind: "max",
2855
- value: BigInt(0),
2856
- inclusive: false,
2857
- message: errorUtil.toString(message)
2858
- });
2859
- }
2860
- nonpositive(message) {
2861
- return this._addCheck({
2862
- kind: "max",
2863
- value: BigInt(0),
2864
- inclusive: true,
2865
- message: errorUtil.toString(message)
2866
- });
2867
- }
2868
- nonnegative(message) {
2869
- return this._addCheck({
2870
- kind: "min",
2871
- value: BigInt(0),
2872
- inclusive: true,
2873
- message: errorUtil.toString(message)
2874
- });
2875
- }
2876
- multipleOf(value, message) {
2877
- return this._addCheck({
2878
- kind: "multipleOf",
2879
- value,
2880
- message: errorUtil.toString(message)
2881
- });
2882
- }
2883
- get minValue() {
2884
- let min = null;
2885
- for (const ch of this._def.checks) {
2886
- if (ch.kind === "min") {
2887
- if (min === null || ch.value > min)
2888
- min = ch.value;
2889
- }
2890
- }
2891
- return min;
2892
- }
2893
- get maxValue() {
2894
- let max = null;
2895
- for (const ch of this._def.checks) {
2896
- if (ch.kind === "max") {
2897
- if (max === null || ch.value < max)
2898
- max = ch.value;
2899
- }
2900
- }
2901
- return max;
2439
+ return OK(input.data);
2902
2440
  }
2903
2441
  };
2904
2442
  ZodBigInt.create = (params) => {
2905
2443
  var _a;
2906
2444
  return new ZodBigInt({
2907
- checks: [],
2908
2445
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
2909
2446
  coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2910
2447
  ...processCreateParams(params)
@@ -3230,13 +2767,13 @@ var init_lib = __esm({
3230
2767
  }
3231
2768
  }
3232
2769
  if (ctx.common.async) {
3233
- return Promise.all([...ctx.data].map((item, i) => {
2770
+ return Promise.all(ctx.data.map((item, i) => {
3234
2771
  return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
3235
2772
  })).then((result2) => {
3236
2773
  return ParseStatus.mergeArray(status, result2);
3237
2774
  });
3238
2775
  }
3239
- const result = [...ctx.data].map((item, i) => {
2776
+ const result = ctx.data.map((item, i) => {
3240
2777
  return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
3241
2778
  });
3242
2779
  return ParseStatus.mergeArray(status, result);
@@ -3276,12 +2813,31 @@ var init_lib = __esm({
3276
2813
  ...processCreateParams(params)
3277
2814
  });
3278
2815
  };
2816
+ (function(objectUtil2) {
2817
+ objectUtil2.mergeShapes = (first, second) => {
2818
+ return {
2819
+ ...first,
2820
+ ...second
2821
+ // second overwrites first
2822
+ };
2823
+ };
2824
+ })(objectUtil || (objectUtil = {}));
2825
+ AugmentFactory = (def) => (augmentation) => {
2826
+ return new ZodObject({
2827
+ ...def,
2828
+ shape: () => ({
2829
+ ...def.shape(),
2830
+ ...augmentation
2831
+ })
2832
+ });
2833
+ };
3279
2834
  ZodObject = class _ZodObject extends ZodType {
3280
2835
  constructor() {
3281
2836
  super(...arguments);
3282
2837
  this._cached = null;
3283
2838
  this.nonstrict = this.passthrough;
3284
- this.augment = this.extend;
2839
+ this.augment = AugmentFactory(this._def);
2840
+ this.extend = AugmentFactory(this._def);
3285
2841
  }
3286
2842
  _getCached() {
3287
2843
  if (this._cached !== null)
@@ -3362,10 +2918,9 @@ var init_lib = __esm({
3362
2918
  const syncPairs = [];
3363
2919
  for (const pair of pairs) {
3364
2920
  const key = await pair.key;
3365
- const value = await pair.value;
3366
2921
  syncPairs.push({
3367
2922
  key,
3368
- value,
2923
+ value: await pair.value,
3369
2924
  alwaysSet: pair.alwaysSet
3370
2925
  });
3371
2926
  }
@@ -3412,31 +2967,8 @@ var init_lib = __esm({
3412
2967
  unknownKeys: "passthrough"
3413
2968
  });
3414
2969
  }
3415
- // const AugmentFactory =
3416
- // <Def extends ZodObjectDef>(def: Def) =>
3417
- // <Augmentation extends ZodRawShape>(
3418
- // augmentation: Augmentation
3419
- // ): ZodObject<
3420
- // extendShape<ReturnType<Def["shape"]>, Augmentation>,
3421
- // Def["unknownKeys"],
3422
- // Def["catchall"]
3423
- // > => {
3424
- // return new ZodObject({
3425
- // ...def,
3426
- // shape: () => ({
3427
- // ...def.shape(),
3428
- // ...augmentation,
3429
- // }),
3430
- // }) as any;
3431
- // };
3432
- extend(augmentation) {
3433
- return new _ZodObject({
3434
- ...this._def,
3435
- shape: () => ({
3436
- ...this._def.shape(),
3437
- ...augmentation
3438
- })
3439
- });
2970
+ setKey(key, schema4) {
2971
+ return this.augment({ [key]: schema4 });
3440
2972
  }
3441
2973
  /**
3442
2974
  * Prior to zod@1.0.12 there was a bug in the
@@ -3447,73 +2979,11 @@ var init_lib = __esm({
3447
2979
  const merged = new _ZodObject({
3448
2980
  unknownKeys: merging._def.unknownKeys,
3449
2981
  catchall: merging._def.catchall,
3450
- shape: () => ({
3451
- ...this._def.shape(),
3452
- ...merging._def.shape()
3453
- }),
2982
+ shape: () => objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
3454
2983
  typeName: ZodFirstPartyTypeKind.ZodObject
3455
2984
  });
3456
2985
  return merged;
3457
2986
  }
3458
- // merge<
3459
- // Incoming extends AnyZodObject,
3460
- // Augmentation extends Incoming["shape"],
3461
- // NewOutput extends {
3462
- // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
3463
- // ? Augmentation[k]["_output"]
3464
- // : k extends keyof Output
3465
- // ? Output[k]
3466
- // : never;
3467
- // },
3468
- // NewInput extends {
3469
- // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
3470
- // ? Augmentation[k]["_input"]
3471
- // : k extends keyof Input
3472
- // ? Input[k]
3473
- // : never;
3474
- // }
3475
- // >(
3476
- // merging: Incoming
3477
- // ): ZodObject<
3478
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
3479
- // Incoming["_def"]["unknownKeys"],
3480
- // Incoming["_def"]["catchall"],
3481
- // NewOutput,
3482
- // NewInput
3483
- // > {
3484
- // const merged: any = new ZodObject({
3485
- // unknownKeys: merging._def.unknownKeys,
3486
- // catchall: merging._def.catchall,
3487
- // shape: () =>
3488
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
3489
- // typeName: ZodFirstPartyTypeKind.ZodObject,
3490
- // }) as any;
3491
- // return merged;
3492
- // }
3493
- setKey(key, schema4) {
3494
- return this.augment({ [key]: schema4 });
3495
- }
3496
- // merge<Incoming extends AnyZodObject>(
3497
- // merging: Incoming
3498
- // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
3499
- // ZodObject<
3500
- // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
3501
- // Incoming["_def"]["unknownKeys"],
3502
- // Incoming["_def"]["catchall"]
3503
- // > {
3504
- // // const mergedShape = objectUtil.mergeShapes(
3505
- // // this._def.shape(),
3506
- // // merging._def.shape()
3507
- // // );
3508
- // const merged: any = new ZodObject({
3509
- // unknownKeys: merging._def.unknownKeys,
3510
- // catchall: merging._def.catchall,
3511
- // shape: () =>
3512
- // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
3513
- // typeName: ZodFirstPartyTypeKind.ZodObject,
3514
- // }) as any;
3515
- // return merged;
3516
- // }
3517
2987
  catchall(index4) {
3518
2988
  return new _ZodObject({
3519
2989
  ...this._def,
@@ -3522,10 +2992,9 @@ var init_lib = __esm({
3522
2992
  }
3523
2993
  pick(mask) {
3524
2994
  const shape = {};
3525
- util.objectKeys(mask).forEach((key) => {
3526
- if (mask[key] && this.shape[key]) {
2995
+ util.objectKeys(mask).map((key) => {
2996
+ if (this.shape[key])
3527
2997
  shape[key] = this.shape[key];
3528
- }
3529
2998
  });
3530
2999
  return new _ZodObject({
3531
3000
  ...this._def,
@@ -3534,8 +3003,8 @@ var init_lib = __esm({
3534
3003
  }
3535
3004
  omit(mask) {
3536
3005
  const shape = {};
3537
- util.objectKeys(this.shape).forEach((key) => {
3538
- if (!mask[key]) {
3006
+ util.objectKeys(this.shape).map((key) => {
3007
+ if (util.objectKeys(mask).indexOf(key) === -1) {
3539
3008
  shape[key] = this.shape[key];
3540
3009
  }
3541
3010
  });
@@ -3544,22 +3013,29 @@ var init_lib = __esm({
3544
3013
  shape: () => shape
3545
3014
  });
3546
3015
  }
3547
- /**
3548
- * @deprecated
3549
- */
3550
3016
  deepPartial() {
3551
3017
  return deepPartialify(this);
3552
3018
  }
3553
3019
  partial(mask) {
3554
3020
  const newShape = {};
3555
- util.objectKeys(this.shape).forEach((key) => {
3556
- const fieldSchema = this.shape[key];
3557
- if (mask && !mask[key]) {
3558
- newShape[key] = fieldSchema;
3559
- } else {
3021
+ if (mask) {
3022
+ util.objectKeys(this.shape).map((key) => {
3023
+ if (util.objectKeys(mask).indexOf(key) === -1) {
3024
+ newShape[key] = this.shape[key];
3025
+ } else {
3026
+ newShape[key] = this.shape[key].optional();
3027
+ }
3028
+ });
3029
+ return new _ZodObject({
3030
+ ...this._def,
3031
+ shape: () => newShape
3032
+ });
3033
+ } else {
3034
+ for (const key in this.shape) {
3035
+ const fieldSchema = this.shape[key];
3560
3036
  newShape[key] = fieldSchema.optional();
3561
3037
  }
3562
- });
3038
+ }
3563
3039
  return new _ZodObject({
3564
3040
  ...this._def,
3565
3041
  shape: () => newShape
@@ -3567,10 +3043,21 @@ var init_lib = __esm({
3567
3043
  }
3568
3044
  required(mask) {
3569
3045
  const newShape = {};
3570
- util.objectKeys(this.shape).forEach((key) => {
3571
- if (mask && !mask[key]) {
3572
- newShape[key] = this.shape[key];
3573
- } else {
3046
+ if (mask) {
3047
+ util.objectKeys(this.shape).map((key) => {
3048
+ if (util.objectKeys(mask).indexOf(key) === -1) {
3049
+ newShape[key] = this.shape[key];
3050
+ } else {
3051
+ const fieldSchema = this.shape[key];
3052
+ let newField = fieldSchema;
3053
+ while (newField instanceof ZodOptional) {
3054
+ newField = newField._def.innerType;
3055
+ }
3056
+ newShape[key] = newField;
3057
+ }
3058
+ });
3059
+ } else {
3060
+ for (const key in this.shape) {
3574
3061
  const fieldSchema = this.shape[key];
3575
3062
  let newField = fieldSchema;
3576
3063
  while (newField instanceof ZodOptional) {
@@ -3578,7 +3065,7 @@ var init_lib = __esm({
3578
3065
  }
3579
3066
  newShape[key] = newField;
3580
3067
  }
3581
- });
3068
+ }
3582
3069
  return new _ZodObject({
3583
3070
  ...this._def,
3584
3071
  shape: () => newShape
@@ -3716,25 +3203,15 @@ var init_lib = __esm({
3716
3203
  } else if (type instanceof ZodEnum) {
3717
3204
  return type.options;
3718
3205
  } else if (type instanceof ZodNativeEnum) {
3719
- return util.objectValues(type.enum);
3206
+ return Object.keys(type.enum);
3720
3207
  } else if (type instanceof ZodDefault) {
3721
3208
  return getDiscriminator(type._def.innerType);
3722
3209
  } else if (type instanceof ZodUndefined) {
3723
3210
  return [void 0];
3724
3211
  } else if (type instanceof ZodNull) {
3725
3212
  return [null];
3726
- } else if (type instanceof ZodOptional) {
3727
- return [void 0, ...getDiscriminator(type.unwrap())];
3728
- } else if (type instanceof ZodNullable) {
3729
- return [null, ...getDiscriminator(type.unwrap())];
3730
- } else if (type instanceof ZodBranded) {
3731
- return getDiscriminator(type.unwrap());
3732
- } else if (type instanceof ZodReadonly) {
3733
- return getDiscriminator(type.unwrap());
3734
- } else if (type instanceof ZodCatch) {
3735
- return getDiscriminator(type._def.innerType);
3736
3213
  } else {
3737
- return [];
3214
+ return null;
3738
3215
  }
3739
3216
  };
3740
3217
  ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
@@ -3794,7 +3271,7 @@ var init_lib = __esm({
3794
3271
  const optionsMap = /* @__PURE__ */ new Map();
3795
3272
  for (const type of options) {
3796
3273
  const discriminatorValues = getDiscriminator(type.shape[discriminator]);
3797
- if (!discriminatorValues.length) {
3274
+ if (!discriminatorValues) {
3798
3275
  throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
3799
3276
  }
3800
3277
  for (const value of discriminatorValues) {
@@ -3898,7 +3375,7 @@ var init_lib = __esm({
3898
3375
  });
3899
3376
  status.dirty();
3900
3377
  }
3901
- const items = [...ctx.data].map((item, itemIndex) => {
3378
+ const items = ctx.data.map((item, itemIndex) => {
3902
3379
  const schema4 = this._def.items[itemIndex] || this._def.rest;
3903
3380
  if (!schema4)
3904
3381
  return null;
@@ -3956,8 +3433,7 @@ var init_lib = __esm({
3956
3433
  for (const key in ctx.data) {
3957
3434
  pairs.push({
3958
3435
  key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
3959
- value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
3960
- alwaysSet: key in ctx.data
3436
+ value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
3961
3437
  });
3962
3438
  }
3963
3439
  if (ctx.common.async) {
@@ -3987,12 +3463,6 @@ var init_lib = __esm({
3987
3463
  }
3988
3464
  };
3989
3465
  ZodMap = class extends ZodType {
3990
- get keySchema() {
3991
- return this._def.keyType;
3992
- }
3993
- get valueSchema() {
3994
- return this._def.valueType;
3995
- }
3996
3466
  _parse(input) {
3997
3467
  const { status, ctx } = this._processInputParams(input);
3998
3468
  if (ctx.parsedType !== ZodParsedType.map) {
@@ -4187,29 +3657,27 @@ var init_lib = __esm({
4187
3657
  const params = { errorMap: ctx.common.contextualErrorMap };
4188
3658
  const fn = ctx.data;
4189
3659
  if (this._def.returns instanceof ZodPromise) {
4190
- const me = this;
4191
- return OK(async function(...args) {
3660
+ return OK(async (...args) => {
4192
3661
  const error2 = new ZodError([]);
4193
- const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
3662
+ const parsedArgs = await this._def.args.parseAsync(args, params).catch((e) => {
4194
3663
  error2.addIssue(makeArgsIssue(args, e));
4195
3664
  throw error2;
4196
3665
  });
4197
- const result = await Reflect.apply(fn, this, parsedArgs);
4198
- const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
3666
+ const result = await fn(...parsedArgs);
3667
+ const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e) => {
4199
3668
  error2.addIssue(makeReturnsIssue(result, e));
4200
3669
  throw error2;
4201
3670
  });
4202
3671
  return parsedReturns;
4203
3672
  });
4204
3673
  } else {
4205
- const me = this;
4206
- return OK(function(...args) {
4207
- const parsedArgs = me._def.args.safeParse(args, params);
3674
+ return OK((...args) => {
3675
+ const parsedArgs = this._def.args.safeParse(args, params);
4208
3676
  if (!parsedArgs.success) {
4209
3677
  throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
4210
3678
  }
4211
- const result = Reflect.apply(fn, this, parsedArgs.data);
4212
- const parsedReturns = me._def.returns.safeParse(result, params);
3679
+ const result = fn(...parsedArgs.data);
3680
+ const parsedReturns = this._def.returns.safeParse(result, params);
4213
3681
  if (!parsedReturns.success) {
4214
3682
  throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
4215
3683
  }
@@ -4274,7 +3742,6 @@ var init_lib = __esm({
4274
3742
  if (input.data !== this._def.value) {
4275
3743
  const ctx = this._getOrReturnCtx(input);
4276
3744
  addIssueToContext(ctx, {
4277
- received: ctx.data,
4278
3745
  code: ZodIssueCode.invalid_literal,
4279
3746
  expected: this._def.value
4280
3747
  });
@@ -4293,11 +3760,7 @@ var init_lib = __esm({
4293
3760
  ...processCreateParams(params)
4294
3761
  });
4295
3762
  };
4296
- ZodEnum = class _ZodEnum extends ZodType {
4297
- constructor() {
4298
- super(...arguments);
4299
- _ZodEnum_cache.set(this, void 0);
4300
- }
3763
+ ZodEnum = class extends ZodType {
4301
3764
  _parse(input) {
4302
3765
  if (typeof input.data !== "string") {
4303
3766
  const ctx = this._getOrReturnCtx(input);
@@ -4309,10 +3772,7 @@ var init_lib = __esm({
4309
3772
  });
4310
3773
  return INVALID;
4311
3774
  }
4312
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
4313
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
4314
- }
4315
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3775
+ if (this._def.values.indexOf(input.data) === -1) {
4316
3776
  const ctx = this._getOrReturnCtx(input);
4317
3777
  const expectedValues = this._def.values;
4318
3778
  addIssueToContext(ctx, {
@@ -4348,26 +3808,9 @@ var init_lib = __esm({
4348
3808
  }
4349
3809
  return enumValues;
4350
3810
  }
4351
- extract(values, newDef = this._def) {
4352
- return _ZodEnum.create(values, {
4353
- ...this._def,
4354
- ...newDef
4355
- });
4356
- }
4357
- exclude(values, newDef = this._def) {
4358
- return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
4359
- ...this._def,
4360
- ...newDef
4361
- });
4362
- }
4363
3811
  };
4364
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
4365
3812
  ZodEnum.create = createZodEnum;
4366
3813
  ZodNativeEnum = class extends ZodType {
4367
- constructor() {
4368
- super(...arguments);
4369
- _ZodNativeEnum_cache.set(this, void 0);
4370
- }
4371
3814
  _parse(input) {
4372
3815
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
4373
3816
  const ctx = this._getOrReturnCtx(input);
@@ -4380,10 +3823,7 @@ var init_lib = __esm({
4380
3823
  });
4381
3824
  return INVALID;
4382
3825
  }
4383
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
4384
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
4385
- }
4386
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3826
+ if (nativeEnumValues.indexOf(input.data) === -1) {
4387
3827
  const expectedValues = util.objectValues(nativeEnumValues);
4388
3828
  addIssueToContext(ctx, {
4389
3829
  received: ctx.data,
@@ -4398,7 +3838,6 @@ var init_lib = __esm({
4398
3838
  return this._def.values;
4399
3839
  }
4400
3840
  };
4401
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
4402
3841
  ZodNativeEnum.create = (values, params) => {
4403
3842
  return new ZodNativeEnum({
4404
3843
  values,
@@ -4407,9 +3846,6 @@ var init_lib = __esm({
4407
3846
  });
4408
3847
  };
4409
3848
  ZodPromise = class extends ZodType {
4410
- unwrap() {
4411
- return this._def.type;
4412
- }
4413
3849
  _parse(input) {
4414
3850
  const { ctx } = this._processInputParams(input);
4415
3851
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
@@ -4446,56 +3882,38 @@ var init_lib = __esm({
4446
3882
  _parse(input) {
4447
3883
  const { status, ctx } = this._processInputParams(input);
4448
3884
  const effect = this._def.effect || null;
4449
- const checkCtx = {
4450
- addIssue: (arg) => {
4451
- addIssueToContext(ctx, arg);
4452
- if (arg.fatal) {
4453
- status.abort();
4454
- } else {
4455
- status.dirty();
4456
- }
4457
- },
4458
- get path() {
4459
- return ctx.path;
4460
- }
4461
- };
4462
- checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
4463
3885
  if (effect.type === "preprocess") {
4464
- const processed = effect.transform(ctx.data, checkCtx);
3886
+ const processed = effect.transform(ctx.data);
4465
3887
  if (ctx.common.async) {
4466
- return Promise.resolve(processed).then(async (processed2) => {
4467
- if (status.value === "aborted")
4468
- return INVALID;
4469
- const result = await this._def.schema._parseAsync({
3888
+ return Promise.resolve(processed).then((processed2) => {
3889
+ return this._def.schema._parseAsync({
4470
3890
  data: processed2,
4471
3891
  path: ctx.path,
4472
3892
  parent: ctx
4473
3893
  });
4474
- if (result.status === "aborted")
4475
- return INVALID;
4476
- if (result.status === "dirty")
4477
- return DIRTY(result.value);
4478
- if (status.value === "dirty")
4479
- return DIRTY(result.value);
4480
- return result;
4481
3894
  });
4482
3895
  } else {
4483
- if (status.value === "aborted")
4484
- return INVALID;
4485
- const result = this._def.schema._parseSync({
3896
+ return this._def.schema._parseSync({
4486
3897
  data: processed,
4487
3898
  path: ctx.path,
4488
3899
  parent: ctx
4489
3900
  });
4490
- if (result.status === "aborted")
4491
- return INVALID;
4492
- if (result.status === "dirty")
4493
- return DIRTY(result.value);
4494
- if (status.value === "dirty")
4495
- return DIRTY(result.value);
4496
- return result;
4497
3901
  }
4498
3902
  }
3903
+ const checkCtx = {
3904
+ addIssue: (arg) => {
3905
+ addIssueToContext(ctx, arg);
3906
+ if (arg.fatal) {
3907
+ status.abort();
3908
+ } else {
3909
+ status.dirty();
3910
+ }
3911
+ },
3912
+ get path() {
3913
+ return ctx.path;
3914
+ }
3915
+ };
3916
+ checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
4499
3917
  if (effect.type === "refinement") {
4500
3918
  const executeRefinement = (acc) => {
4501
3919
  const result = effect.refinement(acc, checkCtx);
@@ -4638,45 +4056,26 @@ var init_lib = __esm({
4638
4056
  ZodCatch = class extends ZodType {
4639
4057
  _parse(input) {
4640
4058
  const { ctx } = this._processInputParams(input);
4641
- const newCtx = {
4642
- ...ctx,
4643
- common: {
4644
- ...ctx.common,
4645
- issues: []
4646
- }
4647
- };
4648
4059
  const result = this._def.innerType._parse({
4649
- data: newCtx.data,
4650
- path: newCtx.path,
4651
- parent: {
4652
- ...newCtx
4653
- }
4060
+ data: ctx.data,
4061
+ path: ctx.path,
4062
+ parent: ctx
4654
4063
  });
4655
4064
  if (isAsync(result)) {
4656
4065
  return result.then((result2) => {
4657
4066
  return {
4658
4067
  status: "valid",
4659
- value: result2.status === "valid" ? result2.value : this._def.catchValue({
4660
- get error() {
4661
- return new ZodError(newCtx.common.issues);
4662
- },
4663
- input: newCtx.data
4664
- })
4068
+ value: result2.status === "valid" ? result2.value : this._def.defaultValue()
4665
4069
  };
4666
4070
  });
4667
4071
  } else {
4668
4072
  return {
4669
4073
  status: "valid",
4670
- value: result.status === "valid" ? result.value : this._def.catchValue({
4671
- get error() {
4672
- return new ZodError(newCtx.common.issues);
4673
- },
4674
- input: newCtx.data
4675
- })
4074
+ value: result.status === "valid" ? result.value : this._def.defaultValue()
4676
4075
  };
4677
4076
  }
4678
4077
  }
4679
- removeCatch() {
4078
+ removeDefault() {
4680
4079
  return this._def.innerType;
4681
4080
  }
4682
4081
  };
@@ -4684,7 +4083,7 @@ var init_lib = __esm({
4684
4083
  return new ZodCatch({
4685
4084
  innerType: type,
4686
4085
  typeName: ZodFirstPartyTypeKind.ZodCatch,
4687
- catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
4086
+ defaultValue: typeof params.default === "function" ? params.default : () => params.default,
4688
4087
  ...processCreateParams(params)
4689
4088
  });
4690
4089
  };
@@ -4779,25 +4178,6 @@ var init_lib = __esm({
4779
4178
  });
4780
4179
  }
4781
4180
  };
4782
- ZodReadonly = class extends ZodType {
4783
- _parse(input) {
4784
- const result = this._def.innerType._parse(input);
4785
- if (isValid(result)) {
4786
- result.value = Object.freeze(result.value);
4787
- }
4788
- return result;
4789
- }
4790
- unwrap() {
4791
- return this._def.innerType;
4792
- }
4793
- };
4794
- ZodReadonly.create = (type, params) => {
4795
- return new ZodReadonly({
4796
- innerType: type,
4797
- typeName: ZodFirstPartyTypeKind.ZodReadonly,
4798
- ...processCreateParams(params)
4799
- });
4800
- };
4801
4181
  late = {
4802
4182
  object: ZodObject.lazycreate
4803
4183
  };
@@ -4837,7 +4217,6 @@ var init_lib = __esm({
4837
4217
  ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise";
4838
4218
  ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded";
4839
4219
  ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
4840
- ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
4841
4220
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
4842
4221
  stringType = ZodString.create;
4843
4222
  numberType = ZodNumber.create;
@@ -4876,10 +4255,7 @@ var init_lib = __esm({
4876
4255
  coerce = {
4877
4256
  string: (arg) => ZodString.create({ ...arg, coerce: true }),
4878
4257
  number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
4879
- boolean: (arg) => ZodBoolean.create({
4880
- ...arg,
4881
- coerce: true
4882
- }),
4258
+ boolean: (arg) => ZodBoolean.create({ ...arg, coerce: true }),
4883
4259
  bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
4884
4260
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
4885
4261
  };
@@ -4887,7 +4263,7 @@ var init_lib = __esm({
4887
4263
  });
4888
4264
 
4889
4265
  // src/serializer/mysqlSchema.ts
4890
- var index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternalV6, schemaInternal, schemaV3, schemaV4, schemaV5, schema, tableSquashedV4, tableSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql;
4266
+ var index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema, tableSquashedV4, tableSquashed, schemaSquashed, schemaSquashedV4, MySqlSquasher, squashMysqlScheme, mysqlSchema, mysqlSchemaV5, mysqlSchemaSquashed, backwardCompatibleMysqlSchema, dryMySql;
4891
4267
  var init_mysqlSchema = __esm({
4892
4268
  "src/serializer/mysqlSchema.ts"() {
4893
4269
  "use strict";
@@ -4987,18 +4363,8 @@ var init_mysqlSchema = __esm({
4987
4363
  }),
4988
4364
  internal: kitInternals
4989
4365
  }).strict();
4990
- schemaInternalV6 = objectType({
4991
- version: literalType("6"),
4992
- dialect,
4993
- tables: recordType(stringType(), table),
4994
- _meta: objectType({
4995
- tables: recordType(stringType(), stringType()),
4996
- columns: recordType(stringType(), stringType())
4997
- }),
4998
- internal: kitInternals
4999
- }).strict();
5000
4366
  schemaInternal = objectType({
5001
- version: literalType("6"),
4367
+ version: literalType("5"),
5002
4368
  dialect,
5003
4369
  tables: recordType(stringType(), table),
5004
4370
  _meta: objectType({
@@ -5027,7 +4393,7 @@ var init_mysqlSchema = __esm({
5027
4393
  uniqueConstraints: recordType(stringType(), stringType()).default({})
5028
4394
  }).strict();
5029
4395
  schemaSquashed = objectType({
5030
- version: literalType("6"),
4396
+ version: literalType("5"),
5031
4397
  dialect,
5032
4398
  tables: recordType(stringType(), tableSquashed)
5033
4399
  }).strict();
@@ -5125,7 +4491,7 @@ var init_mysqlSchema = __esm({
5125
4491
  })
5126
4492
  );
5127
4493
  return {
5128
- version: "6",
4494
+ version: "5",
5129
4495
  dialect: json.dialect,
5130
4496
  tables: mappedTables
5131
4497
  };
@@ -5135,7 +4501,7 @@ var init_mysqlSchema = __esm({
5135
4501
  mysqlSchemaSquashed = schemaSquashed;
5136
4502
  backwardCompatibleMysqlSchema = unionType([mysqlSchemaV5, schema]);
5137
4503
  dryMySql = mysqlSchema.parse({
5138
- version: snapshotVersion,
4504
+ version: "5",
5139
4505
  dialect: "mysql",
5140
4506
  id: originUUID,
5141
4507
  prevId: "",
@@ -5711,6 +5077,7 @@ var init_utils = __esm({
5711
5077
  init_mysqlSchema();
5712
5078
  init_pgSchema();
5713
5079
  init_sqliteSchema();
5080
+ init_source();
5714
5081
  init_global();
5715
5082
  copy = (it) => {
5716
5083
  return JSON.parse(JSON.stringify(it));
@@ -5918,6 +5285,7 @@ var sqlToStr;
5918
5285
  var init_serializer = __esm({
5919
5286
  "src/serializer/index.ts"() {
5920
5287
  "use strict";
5288
+ init_source();
5921
5289
  init_views();
5922
5290
  sqlToStr = (sql2) => {
5923
5291
  return sql2.toQuery({
@@ -5987,7 +5355,6 @@ var init_pg = __esm({
5987
5355
  init_outputs();
5988
5356
  postgresCredentials = unionType([
5989
5357
  objectType({
5990
- driver: literalType("pg"),
5991
5358
  host: stringType(),
5992
5359
  port: coerce.number().optional(),
5993
5360
  user: stringType().default("postgres"),
@@ -5996,7 +5363,6 @@ var init_pg = __esm({
5996
5363
  ssl: coerce.boolean().optional()
5997
5364
  }),
5998
5365
  objectType({
5999
- driver: literalType("pg"),
6000
5366
  connectionString: stringType()
6001
5367
  })
6002
5368
  ]);
@@ -6174,7 +5540,7 @@ var init_cli = __esm({
6174
5540
  authToken: stringType().optional(),
6175
5541
  verbose: booleanType().optional(),
6176
5542
  strict: booleanType().optional()
6177
- }).strict();
5543
+ });
6178
5544
  pullParams = objectType({
6179
5545
  config: stringType().optional(),
6180
5546
  dialect: dialect3.optional(),
@@ -6196,7 +5562,7 @@ var init_cli = __esm({
6196
5562
  authToken: stringType().optional(),
6197
5563
  "introspect-casing": casing,
6198
5564
  breakpoints: booleanType().optional().default(true)
6199
- }).strict();
5565
+ });
6200
5566
  configCheck = objectType({
6201
5567
  dialect: dialect3.optional(),
6202
5568
  out: stringType().optional()
@@ -6972,9 +6338,9 @@ var require_src2 = __commonJS({
6972
6338
  }
6973
6339
  });
6974
6340
 
6975
- // node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.12/node_modules/esbuild-register/dist/node.js
6341
+ // node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.7/node_modules/esbuild-register/dist/node.js
6976
6342
  var require_node2 = __commonJS({
6977
- "node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.12/node_modules/esbuild-register/dist/node.js"(exports) {
6343
+ "node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.19.7/node_modules/esbuild-register/dist/node.js"(exports) {
6978
6344
  "use strict";
6979
6345
  Object.defineProperty(exports, "__esModule", { value: true });
6980
6346
  function _interopRequireDefault2(obj) {
@@ -10147,15 +9513,15 @@ var require_node2 = __commonJS({
10147
9513
  return newToken("punctuator", read());
10148
9514
  case "n":
10149
9515
  read();
10150
- literal2("ull");
9516
+ literal3("ull");
10151
9517
  return newToken("null", null);
10152
9518
  case "t":
10153
9519
  read();
10154
- literal2("rue");
9520
+ literal3("rue");
10155
9521
  return newToken("boolean", true);
10156
9522
  case "f":
10157
9523
  read();
10158
- literal2("alse");
9524
+ literal3("alse");
10159
9525
  return newToken("boolean", false);
10160
9526
  case "-":
10161
9527
  case "+":
@@ -10186,11 +9552,11 @@ var require_node2 = __commonJS({
10186
9552
  return;
10187
9553
  case "I":
10188
9554
  read();
10189
- literal2("nfinity");
9555
+ literal3("nfinity");
10190
9556
  return newToken("numeric", Infinity);
10191
9557
  case "N":
10192
9558
  read();
10193
- literal2("aN");
9559
+ literal3("aN");
10194
9560
  return newToken("numeric", NaN);
10195
9561
  case '"':
10196
9562
  case "'":
@@ -10284,11 +9650,11 @@ var require_node2 = __commonJS({
10284
9650
  return;
10285
9651
  case "I":
10286
9652
  read();
10287
- literal2("nfinity");
9653
+ literal3("nfinity");
10288
9654
  return newToken("numeric", sign * Infinity);
10289
9655
  case "N":
10290
9656
  read();
10291
- literal2("aN");
9657
+ literal3("aN");
10292
9658
  return newToken("numeric", NaN);
10293
9659
  }
10294
9660
  throw invalidChar(read());
@@ -10521,7 +9887,7 @@ var require_node2 = __commonJS({
10521
9887
  column: column4
10522
9888
  };
10523
9889
  }
10524
- function literal2(s) {
9890
+ function literal3(s) {
10525
9891
  for (const c2 of s) {
10526
9892
  const p = peek();
10527
9893
  if (p !== c2) {
@@ -11835,6 +11201,7 @@ var init_utils2 = __esm({
11835
11201
  "src/cli/commands/utils.ts"() {
11836
11202
  "use strict";
11837
11203
  init_serializer();
11204
+ init_source();
11838
11205
  init_views();
11839
11206
  import_hanji2 = __toESM(require_hanji());
11840
11207
  init_global();
@@ -12811,10 +12178,10 @@ var require_brace_expansion = __commonJS({
12811
12178
  }
12812
12179
  });
12813
12180
 
12814
- // node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/brace-expressions.js
12181
+ // node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/brace-expressions.js
12815
12182
  var posixClasses, braceEscape, regexpEscape, rangesToString, parseClass;
12816
12183
  var init_brace_expressions = __esm({
12817
- "node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/brace-expressions.js"() {
12184
+ "node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/brace-expressions.js"() {
12818
12185
  posixClasses = {
12819
12186
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
12820
12187
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -12926,30 +12293,30 @@ var init_brace_expressions = __esm({
12926
12293
  }
12927
12294
  });
12928
12295
 
12929
- // node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/escape.js
12296
+ // node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/escape.js
12930
12297
  var escape;
12931
12298
  var init_escape = __esm({
12932
- "node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/escape.js"() {
12299
+ "node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/escape.js"() {
12933
12300
  escape = (s, { windowsPathsNoEscape = false } = {}) => {
12934
12301
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
12935
12302
  };
12936
12303
  }
12937
12304
  });
12938
12305
 
12939
- // node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/unescape.js
12306
+ // node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/unescape.js
12940
12307
  var unescape;
12941
12308
  var init_unescape = __esm({
12942
- "node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/unescape.js"() {
12309
+ "node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/unescape.js"() {
12943
12310
  unescape = (s, { windowsPathsNoEscape = false } = {}) => {
12944
12311
  return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
12945
12312
  };
12946
12313
  }
12947
12314
  });
12948
12315
 
12949
- // node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/index.js
12316
+ // node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/index.js
12950
12317
  var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match, globUnescape, globMagic, regExpEscape, Minimatch;
12951
12318
  var init_mjs = __esm({
12952
- "node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/index.js"() {
12319
+ "node_modules/.pnpm/minimatch@7.4.3/node_modules/minimatch/dist/mjs/index.js"() {
12953
12320
  import_brace_expansion = __toESM(require_brace_expansion(), 1);
12954
12321
  init_brace_expressions();
12955
12322
  init_escape();
@@ -17971,9 +17338,9 @@ var init_selector_ui = __esm({
17971
17338
  }
17972
17339
  });
17973
17340
 
17974
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js
17341
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
17975
17342
  var require_constants = __commonJS({
17976
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js"(exports, module) {
17343
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js"(exports, module) {
17977
17344
  var SEMVER_SPEC_VERSION = "2.0.0";
17978
17345
  var MAX_LENGTH = 256;
17979
17346
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
@@ -18002,18 +17369,18 @@ var require_constants = __commonJS({
18002
17369
  }
18003
17370
  });
18004
17371
 
18005
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js
17372
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js
18006
17373
  var require_debug = __commonJS({
18007
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js"(exports, module) {
17374
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/debug.js"(exports, module) {
18008
17375
  var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
18009
17376
  };
18010
17377
  module.exports = debug;
18011
17378
  }
18012
17379
  });
18013
17380
 
18014
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js
17381
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js
18015
17382
  var require_re = __commonJS({
18016
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js"(exports, module) {
17383
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/re.js"(exports, module) {
18017
17384
  var {
18018
17385
  MAX_SAFE_COMPONENT_LENGTH,
18019
17386
  MAX_SAFE_BUILD_LENGTH,
@@ -18069,11 +17436,8 @@ var require_re = __commonJS({
18069
17436
  createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
18070
17437
  createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
18071
17438
  createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
18072
- createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
18073
- createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
18074
- createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
17439
+ createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
18075
17440
  createToken("COERCERTL", src[t.COERCE], true);
18076
- createToken("COERCERTLFULL", src[t.COERCEFULL], true);
18077
17441
  createToken("LONETILDE", "(?:~>?)");
18078
17442
  createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
18079
17443
  exports.tildeTrimReplace = "$1~";
@@ -18096,9 +17460,9 @@ var require_re = __commonJS({
18096
17460
  }
18097
17461
  });
18098
17462
 
18099
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js
17463
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js
18100
17464
  var require_parse_options = __commonJS({
18101
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js"(exports, module) {
17465
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/parse-options.js"(exports, module) {
18102
17466
  var looseOption = Object.freeze({ loose: true });
18103
17467
  var emptyOpts = Object.freeze({});
18104
17468
  var parseOptions = (options) => {
@@ -18114,9 +17478,9 @@ var require_parse_options = __commonJS({
18114
17478
  }
18115
17479
  });
18116
17480
 
18117
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js
17481
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js
18118
17482
  var require_identifiers = __commonJS({
18119
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js"(exports, module) {
17483
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/identifiers.js"(exports, module) {
18120
17484
  var numeric = /^[0-9]+$/;
18121
17485
  var compareIdentifiers = (a, b) => {
18122
17486
  const anum = numeric.test(a);
@@ -18135,9 +17499,9 @@ var require_identifiers = __commonJS({
18135
17499
  }
18136
17500
  });
18137
17501
 
18138
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js
17502
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js
18139
17503
  var require_semver = __commonJS({
18140
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js"(exports, module) {
17504
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/semver.js"(exports, module) {
18141
17505
  var debug = require_debug();
18142
17506
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
18143
17507
  var { safeRe: re, t } = require_re();
@@ -18377,9 +17741,9 @@ var require_semver = __commonJS({
18377
17741
  }
18378
17742
  });
18379
17743
 
18380
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js
17744
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js
18381
17745
  var require_parse = __commonJS({
18382
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js"(exports, module) {
17746
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports, module) {
18383
17747
  var SemVer = require_semver();
18384
17748
  var parse = (version, options, throwErrors = false) => {
18385
17749
  if (version instanceof SemVer) {
@@ -18398,9 +17762,9 @@ var require_parse = __commonJS({
18398
17762
  }
18399
17763
  });
18400
17764
 
18401
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js
17765
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js
18402
17766
  var require_valid = __commonJS({
18403
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js"(exports, module) {
17767
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports, module) {
18404
17768
  var parse = require_parse();
18405
17769
  var valid = (version, options) => {
18406
17770
  const v = parse(version, options);
@@ -18410,9 +17774,9 @@ var require_valid = __commonJS({
18410
17774
  }
18411
17775
  });
18412
17776
 
18413
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js
17777
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js
18414
17778
  var require_clean = __commonJS({
18415
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js"(exports, module) {
17779
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports, module) {
18416
17780
  var parse = require_parse();
18417
17781
  var clean = (version, options) => {
18418
17782
  const s = parse(version.trim().replace(/^[=v]+/, ""), options);
@@ -18422,9 +17786,9 @@ var require_clean = __commonJS({
18422
17786
  }
18423
17787
  });
18424
17788
 
18425
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js
17789
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js
18426
17790
  var require_inc = __commonJS({
18427
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js"(exports, module) {
17791
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports, module) {
18428
17792
  var SemVer = require_semver();
18429
17793
  var inc = (version, release, options, identifier, identifierBase) => {
18430
17794
  if (typeof options === "string") {
@@ -18445,9 +17809,9 @@ var require_inc = __commonJS({
18445
17809
  }
18446
17810
  });
18447
17811
 
18448
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js
17812
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js
18449
17813
  var require_diff = __commonJS({
18450
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js"(exports, module) {
17814
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/diff.js"(exports, module) {
18451
17815
  var parse = require_parse();
18452
17816
  var diff2 = (version1, version2) => {
18453
17817
  const v1 = parse(version1, null, true);
@@ -18489,36 +17853,36 @@ var require_diff = __commonJS({
18489
17853
  }
18490
17854
  });
18491
17855
 
18492
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js
17856
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js
18493
17857
  var require_major = __commonJS({
18494
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js"(exports, module) {
17858
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/major.js"(exports, module) {
18495
17859
  var SemVer = require_semver();
18496
17860
  var major = (a, loose) => new SemVer(a, loose).major;
18497
17861
  module.exports = major;
18498
17862
  }
18499
17863
  });
18500
17864
 
18501
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js
17865
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js
18502
17866
  var require_minor = __commonJS({
18503
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js"(exports, module) {
17867
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/minor.js"(exports, module) {
18504
17868
  var SemVer = require_semver();
18505
17869
  var minor = (a, loose) => new SemVer(a, loose).minor;
18506
17870
  module.exports = minor;
18507
17871
  }
18508
17872
  });
18509
17873
 
18510
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js
17874
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js
18511
17875
  var require_patch = __commonJS({
18512
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js"(exports, module) {
17876
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/patch.js"(exports, module) {
18513
17877
  var SemVer = require_semver();
18514
17878
  var patch = (a, loose) => new SemVer(a, loose).patch;
18515
17879
  module.exports = patch;
18516
17880
  }
18517
17881
  });
18518
17882
 
18519
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js
17883
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js
18520
17884
  var require_prerelease = __commonJS({
18521
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js"(exports, module) {
17885
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports, module) {
18522
17886
  var parse = require_parse();
18523
17887
  var prerelease = (version, options) => {
18524
17888
  const parsed = parse(version, options);
@@ -18528,36 +17892,36 @@ var require_prerelease = __commonJS({
18528
17892
  }
18529
17893
  });
18530
17894
 
18531
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js
17895
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js
18532
17896
  var require_compare = __commonJS({
18533
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js"(exports, module) {
17897
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare.js"(exports, module) {
18534
17898
  var SemVer = require_semver();
18535
17899
  var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
18536
17900
  module.exports = compare;
18537
17901
  }
18538
17902
  });
18539
17903
 
18540
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js
17904
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js
18541
17905
  var require_rcompare = __commonJS({
18542
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js"(exports, module) {
17906
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rcompare.js"(exports, module) {
18543
17907
  var compare = require_compare();
18544
17908
  var rcompare = (a, b, loose) => compare(b, a, loose);
18545
17909
  module.exports = rcompare;
18546
17910
  }
18547
17911
  });
18548
17912
 
18549
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js
17913
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js
18550
17914
  var require_compare_loose = __commonJS({
18551
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js"(exports, module) {
17915
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-loose.js"(exports, module) {
18552
17916
  var compare = require_compare();
18553
17917
  var compareLoose = (a, b) => compare(a, b, true);
18554
17918
  module.exports = compareLoose;
18555
17919
  }
18556
17920
  });
18557
17921
 
18558
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js
17922
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js
18559
17923
  var require_compare_build = __commonJS({
18560
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js"(exports, module) {
17924
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/compare-build.js"(exports, module) {
18561
17925
  var SemVer = require_semver();
18562
17926
  var compareBuild = (a, b, loose) => {
18563
17927
  const versionA = new SemVer(a, loose);
@@ -18568,81 +17932,81 @@ var require_compare_build = __commonJS({
18568
17932
  }
18569
17933
  });
18570
17934
 
18571
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js
17935
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js
18572
17936
  var require_sort = __commonJS({
18573
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js"(exports, module) {
17937
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/sort.js"(exports, module) {
18574
17938
  var compareBuild = require_compare_build();
18575
17939
  var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
18576
17940
  module.exports = sort;
18577
17941
  }
18578
17942
  });
18579
17943
 
18580
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js
17944
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js
18581
17945
  var require_rsort = __commonJS({
18582
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js"(exports, module) {
17946
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/rsort.js"(exports, module) {
18583
17947
  var compareBuild = require_compare_build();
18584
17948
  var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
18585
17949
  module.exports = rsort;
18586
17950
  }
18587
17951
  });
18588
17952
 
18589
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js
17953
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js
18590
17954
  var require_gt = __commonJS({
18591
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js"(exports, module) {
17955
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gt.js"(exports, module) {
18592
17956
  var compare = require_compare();
18593
17957
  var gt = (a, b, loose) => compare(a, b, loose) > 0;
18594
17958
  module.exports = gt;
18595
17959
  }
18596
17960
  });
18597
17961
 
18598
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js
17962
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js
18599
17963
  var require_lt = __commonJS({
18600
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js"(exports, module) {
17964
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lt.js"(exports, module) {
18601
17965
  var compare = require_compare();
18602
17966
  var lt = (a, b, loose) => compare(a, b, loose) < 0;
18603
17967
  module.exports = lt;
18604
17968
  }
18605
17969
  });
18606
17970
 
18607
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js
17971
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js
18608
17972
  var require_eq = __commonJS({
18609
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js"(exports, module) {
17973
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/eq.js"(exports, module) {
18610
17974
  var compare = require_compare();
18611
17975
  var eq = (a, b, loose) => compare(a, b, loose) === 0;
18612
17976
  module.exports = eq;
18613
17977
  }
18614
17978
  });
18615
17979
 
18616
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js
17980
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js
18617
17981
  var require_neq = __commonJS({
18618
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js"(exports, module) {
17982
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/neq.js"(exports, module) {
18619
17983
  var compare = require_compare();
18620
17984
  var neq = (a, b, loose) => compare(a, b, loose) !== 0;
18621
17985
  module.exports = neq;
18622
17986
  }
18623
17987
  });
18624
17988
 
18625
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js
17989
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js
18626
17990
  var require_gte = __commonJS({
18627
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js"(exports, module) {
17991
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/gte.js"(exports, module) {
18628
17992
  var compare = require_compare();
18629
17993
  var gte = (a, b, loose) => compare(a, b, loose) >= 0;
18630
17994
  module.exports = gte;
18631
17995
  }
18632
17996
  });
18633
17997
 
18634
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js
17998
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js
18635
17999
  var require_lte = __commonJS({
18636
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js"(exports, module) {
18000
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/lte.js"(exports, module) {
18637
18001
  var compare = require_compare();
18638
18002
  var lte = (a, b, loose) => compare(a, b, loose) <= 0;
18639
18003
  module.exports = lte;
18640
18004
  }
18641
18005
  });
18642
18006
 
18643
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js
18007
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js
18644
18008
  var require_cmp = __commonJS({
18645
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js"(exports, module) {
18009
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/cmp.js"(exports, module) {
18646
18010
  var eq = require_eq();
18647
18011
  var neq = require_neq();
18648
18012
  var gt = require_gt();
@@ -18689,9 +18053,9 @@ var require_cmp = __commonJS({
18689
18053
  }
18690
18054
  });
18691
18055
 
18692
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js
18056
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js
18693
18057
  var require_coerce = __commonJS({
18694
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js"(exports, module) {
18058
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/coerce.js"(exports, module) {
18695
18059
  var SemVer = require_semver();
18696
18060
  var parse = require_parse();
18697
18061
  var { safeRe: re, t } = require_re();
@@ -18708,27 +18072,21 @@ var require_coerce = __commonJS({
18708
18072
  options = options || {};
18709
18073
  let match2 = null;
18710
18074
  if (!options.rtl) {
18711
- match2 = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
18075
+ match2 = version.match(re[t.COERCE]);
18712
18076
  } else {
18713
- const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
18714
18077
  let next;
18715
- while ((next = coerceRtlRegex.exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) {
18078
+ while ((next = re[t.COERCERTL].exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) {
18716
18079
  if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
18717
18080
  match2 = next;
18718
18081
  }
18719
- coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
18082
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
18720
18083
  }
18721
- coerceRtlRegex.lastIndex = -1;
18084
+ re[t.COERCERTL].lastIndex = -1;
18722
18085
  }
18723
18086
  if (match2 === null) {
18724
18087
  return null;
18725
18088
  }
18726
- const major = match2[2];
18727
- const minor = match2[3] || "0";
18728
- const patch = match2[4] || "0";
18729
- const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
18730
- const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
18731
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
18089
+ return parse(`${match2[2]}.${match2[3] || "0"}.${match2[4] || "0"}`, options);
18732
18090
  };
18733
18091
  module.exports = coerce2;
18734
18092
  }
@@ -19387,9 +18745,9 @@ var require_lru_cache = __commonJS({
19387
18745
  }
19388
18746
  });
19389
18747
 
19390
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js
18748
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js
19391
18749
  var require_range = __commonJS({
19392
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js"(exports, module) {
18750
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js"(exports, module) {
19393
18751
  var Range = class _Range {
19394
18752
  constructor(range, options) {
19395
18753
  options = parseOptions(options);
@@ -19744,9 +19102,9 @@ var require_range = __commonJS({
19744
19102
  }
19745
19103
  });
19746
19104
 
19747
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js
19105
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js
19748
19106
  var require_comparator = __commonJS({
19749
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js"(exports, module) {
19107
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"(exports, module) {
19750
19108
  var ANY = Symbol("SemVer ANY");
19751
19109
  var Comparator = class _Comparator {
19752
19110
  static get ANY() {
@@ -19856,9 +19214,9 @@ var require_comparator = __commonJS({
19856
19214
  }
19857
19215
  });
19858
19216
 
19859
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js
19217
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js
19860
19218
  var require_satisfies = __commonJS({
19861
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js"(exports, module) {
19219
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports, module) {
19862
19220
  var Range = require_range();
19863
19221
  var satisfies = (version, range, options) => {
19864
19222
  try {
@@ -19872,18 +19230,18 @@ var require_satisfies = __commonJS({
19872
19230
  }
19873
19231
  });
19874
19232
 
19875
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js
19233
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js
19876
19234
  var require_to_comparators = __commonJS({
19877
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js"(exports, module) {
19235
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/to-comparators.js"(exports, module) {
19878
19236
  var Range = require_range();
19879
19237
  var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
19880
19238
  module.exports = toComparators;
19881
19239
  }
19882
19240
  });
19883
19241
 
19884
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js
19242
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js
19885
19243
  var require_max_satisfying = __commonJS({
19886
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
19244
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
19887
19245
  var SemVer = require_semver();
19888
19246
  var Range = require_range();
19889
19247
  var maxSatisfying = (versions, range, options) => {
@@ -19909,9 +19267,9 @@ var require_max_satisfying = __commonJS({
19909
19267
  }
19910
19268
  });
19911
19269
 
19912
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js
19270
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js
19913
19271
  var require_min_satisfying = __commonJS({
19914
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
19272
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
19915
19273
  var SemVer = require_semver();
19916
19274
  var Range = require_range();
19917
19275
  var minSatisfying = (versions, range, options) => {
@@ -19937,9 +19295,9 @@ var require_min_satisfying = __commonJS({
19937
19295
  }
19938
19296
  });
19939
19297
 
19940
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js
19298
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js
19941
19299
  var require_min_version = __commonJS({
19942
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js"(exports, module) {
19300
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/min-version.js"(exports, module) {
19943
19301
  var SemVer = require_semver();
19944
19302
  var Range = require_range();
19945
19303
  var gt = require_gt();
@@ -19993,9 +19351,9 @@ var require_min_version = __commonJS({
19993
19351
  }
19994
19352
  });
19995
19353
 
19996
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js
19354
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js
19997
19355
  var require_valid2 = __commonJS({
19998
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js"(exports, module) {
19356
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/valid.js"(exports, module) {
19999
19357
  var Range = require_range();
20000
19358
  var validRange = (range, options) => {
20001
19359
  try {
@@ -20008,9 +19366,9 @@ var require_valid2 = __commonJS({
20008
19366
  }
20009
19367
  });
20010
19368
 
20011
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js
19369
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js
20012
19370
  var require_outside = __commonJS({
20013
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js"(exports, module) {
19371
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/outside.js"(exports, module) {
20014
19372
  var SemVer = require_semver();
20015
19373
  var Comparator = require_comparator();
20016
19374
  var { ANY } = Comparator;
@@ -20076,27 +19434,27 @@ var require_outside = __commonJS({
20076
19434
  }
20077
19435
  });
20078
19436
 
20079
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js
19437
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js
20080
19438
  var require_gtr = __commonJS({
20081
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js"(exports, module) {
19439
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports, module) {
20082
19440
  var outside = require_outside();
20083
19441
  var gtr = (version, range, options) => outside(version, range, ">", options);
20084
19442
  module.exports = gtr;
20085
19443
  }
20086
19444
  });
20087
19445
 
20088
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js
19446
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js
20089
19447
  var require_ltr = __commonJS({
20090
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js"(exports, module) {
19448
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports, module) {
20091
19449
  var outside = require_outside();
20092
19450
  var ltr = (version, range, options) => outside(version, range, "<", options);
20093
19451
  module.exports = ltr;
20094
19452
  }
20095
19453
  });
20096
19454
 
20097
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js
19455
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js
20098
19456
  var require_intersects = __commonJS({
20099
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js"(exports, module) {
19457
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/intersects.js"(exports, module) {
20100
19458
  var Range = require_range();
20101
19459
  var intersects = (r1, r2, options) => {
20102
19460
  r1 = new Range(r1, options);
@@ -20107,9 +19465,9 @@ var require_intersects = __commonJS({
20107
19465
  }
20108
19466
  });
20109
19467
 
20110
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/simplify.js
19468
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js
20111
19469
  var require_simplify = __commonJS({
20112
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/simplify.js"(exports, module) {
19470
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/simplify.js"(exports, module) {
20113
19471
  var satisfies = require_satisfies();
20114
19472
  var compare = require_compare();
20115
19473
  module.exports = (versions, range, options) => {
@@ -20156,9 +19514,9 @@ var require_simplify = __commonJS({
20156
19514
  }
20157
19515
  });
20158
19516
 
20159
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/subset.js
19517
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js
20160
19518
  var require_subset = __commonJS({
20161
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/subset.js"(exports, module) {
19519
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/subset.js"(exports, module) {
20162
19520
  var Range = require_range();
20163
19521
  var Comparator = require_comparator();
20164
19522
  var { ANY } = Comparator;
@@ -20318,9 +19676,9 @@ var require_subset = __commonJS({
20318
19676
  }
20319
19677
  });
20320
19678
 
20321
- // node_modules/.pnpm/semver@7.6.0/node_modules/semver/index.js
19679
+ // node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js
20322
19680
  var require_semver2 = __commonJS({
20323
- "node_modules/.pnpm/semver@7.6.0/node_modules/semver/index.js"(exports, module) {
19681
+ "node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js"(exports, module) {
20324
19682
  var internalRe = require_re();
20325
19683
  var constants = require_constants();
20326
19684
  var SemVer = require_semver();
@@ -21101,7 +20459,7 @@ We have encountered a collision between the index name on columns ${source_defau
21101
20459
  }
21102
20460
  }
21103
20461
  return {
21104
- version: "6",
20462
+ version: "5",
21105
20463
  dialect: "mysql",
21106
20464
  tables: result,
21107
20465
  _meta: {
@@ -21352,7 +20710,7 @@ We have encountered a collision between the index name on columns ${source_defau
21352
20710
  progressCallback("enums", 0, "done");
21353
20711
  }
21354
20712
  return {
21355
- version: "6",
20713
+ version: "5",
21356
20714
  dialect: "mysql",
21357
20715
  tables: result,
21358
20716
  _meta: {
@@ -25852,10 +25210,10 @@ var require_utf7 = __commonJS({
25852
25210
  this.inBase64 = false;
25853
25211
  this.base64Accum = "";
25854
25212
  }
25855
- var base64Regex2 = /[A-Za-z0-9\/+]/;
25213
+ var base64Regex = /[A-Za-z0-9\/+]/;
25856
25214
  var base64Chars = [];
25857
25215
  for (i = 0; i < 256; i++)
25858
- base64Chars[i] = base64Regex2.test(String.fromCharCode(i));
25216
+ base64Chars[i] = base64Regex.test(String.fromCharCode(i));
25859
25217
  var i;
25860
25218
  var plusChar = "+".charCodeAt(0);
25861
25219
  var minusChar = "-".charCodeAt(0);