scordi-extension 1.14.4 → 1.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/sdk/index.js +605 -587
  2. package/package.json +2 -2
  3. package/dist/.vite/manifest.json +0 -67
  4. package/dist/assets/DataExtractBlock-B7AuVonx.js +0 -6
  5. package/dist/assets/index-B9PKMhAi.js +0 -6
  6. package/dist/assets/index-BAWpTgrx.js +0 -4
  7. package/dist/assets/index-CMlx_xZE.css +0 -1
  8. package/dist/assets/index-CZjAbH8z.js +0 -1
  9. package/dist/assets/index-DkFIvNAm.css +0 -1
  10. package/dist/assets/index-r5QRyJ4m.js +0 -1
  11. package/dist/assets/index.html-BIbPySIb.js +0 -74
  12. package/dist/assets/index.html-cr-_Qdxq.js +0 -49
  13. package/dist/assets/index.ts-BqxJYCmp.js +0 -160
  14. package/dist/assets/index.ts-Yg98L0Rk.js +0 -158
  15. package/dist/assets/internal-messages-Drf0Gb9U.js +0 -1
  16. package/dist/assets/loading-page-1924caaa.js +0 -51
  17. package/dist/assets/main.tsx-BEyI95mZ.js +0 -2
  18. package/dist/assets/main.tsx-BKzdlur-.js +0 -2
  19. package/dist/assets/main.tsx-CiPjkJNz.js +0 -2
  20. package/dist/assets/main.tsx-loader-BYP9L25W.js +0 -13
  21. package/dist/assets/main.tsx-loader-CRGmwXNh.js +0 -13
  22. package/dist/assets/main.tsx-loader-FYb0LhDu.js +0 -13
  23. package/dist/assets/schemas-C8r0jYHO.js +0 -21
  24. package/dist/assets/types-oHwqLVs0.js +0 -1
  25. package/dist/logo.png +0 -0
  26. package/dist/manifest.json +0 -58
  27. package/dist/public/logo.png +0 -0
  28. package/dist/service-worker-loader.js +0 -1
  29. package/dist/src/blocks/AiParseDataBlock.ts.js +0 -101
  30. package/dist/src/blocks/ClearValueFormBlock.ts.js +0 -55
  31. package/dist/src/blocks/DataExtractBlock.ts.js +0 -28
  32. package/dist/src/blocks/ElementExistsBlock.ts.js +0 -26
  33. package/dist/src/blocks/EventClickBlock.ts.js +0 -143
  34. package/dist/src/blocks/FetchApiBlock.ts.js +0 -50
  35. package/dist/src/blocks/GetAttributeValueBlock.ts.js +0 -33
  36. package/dist/src/blocks/GetElementDataBlock.ts.js +0 -114
  37. package/dist/src/blocks/GetTextBlock.ts.js +0 -152
  38. package/dist/src/blocks/GetValueFormBlock.ts.js +0 -52
  39. package/dist/src/blocks/KeypressBlock.ts.js +0 -89
  40. package/dist/src/blocks/SaveAssetsBlock.ts.js +0 -35
  41. package/dist/src/blocks/ScrollBlock.ts.js +0 -111
  42. package/dist/src/blocks/SetValueFormBlock.ts.js +0 -56
  43. package/dist/src/blocks/WaitBlock.ts.js +0 -24
  44. package/dist/src/blocks/index.ts.js +0 -163
  45. package/dist/src/blocks/types.ts.js +0 -11
  46. package/dist/src/content/elements/finders/CssSelector.ts.js +0 -51
  47. package/dist/src/content/elements/finders/ElementSelector.ts.js +0 -20
  48. package/dist/src/content/elements/finders/IframeSelector.ts.js +0 -32
  49. package/dist/src/content/elements/finders/ShadowDOMSelector.ts.js +0 -38
  50. package/dist/src/content/elements/finders/XPathFinder.ts.js +0 -32
  51. package/dist/src/content/elements/index.ts.js +0 -26
  52. package/dist/src/content/elements/utils/CSSSelectorGenerator.ts.js +0 -72
  53. package/dist/src/content/elements/utils/XPathGenerator.ts.js +0 -62
  54. package/dist/src/content/handler/ExternalMessageHandler.ts.js +0 -78
  55. package/dist/src/content/handler/InternalMessageHandler.ts.js +0 -18
  56. package/dist/src/content/kernel/MessageKernel.ts.js +0 -83
  57. package/dist/src/content/main.tsx-loader.js +0 -22
  58. package/dist/src/content/main.tsx.js +0 -13
  59. package/dist/src/content/utils/index.ts.js +0 -1
  60. package/dist/src/content/utils/synchronizedLock.ts.js +0 -35
  61. package/dist/src/popup/index.html +0 -11
  62. package/dist/src/types/internal-messages.ts.js +0 -15
  63. package/dist/vendor/.vite-deps-chunk-PR4QN5HX.js__v--57e88532.js +0 -42
  64. package/dist/vendor/.vite-deps-chunk-PR4QN5HX.js__v--ba9031c0.js +0 -42
  65. package/dist/vendor/.vite-deps-chunk-VBBIEGWT.js__v--57e88532.js +0 -4156
  66. package/dist/vendor/.vite-deps-jsonata.js__v--5da6ca24.js +0 -5761
  67. package/dist/vendor/.vite-deps-jsonata.js__v--ba9031c0.js +0 -5761
  68. package/dist/vendor/.vite-deps-zod.js__v--13965f26.js +0 -219
  69. package/dist/vendor/.vite-deps-zod.js__v--ba9031c0.js +0 -12651
  70. package/dist/vendor/crx-client-port.js +0 -66
  71. package/dist/vendor/crx-client-preamble.js +0 -4
  72. package/dist/vendor/react-refresh.js +0 -670
  73. package/dist/vendor/vite-client.js +0 -1098
  74. package/dist/vendor/vite-dist-client-env.mjs.js +0 -19
  75. package/dist/vendor/webcomponents-custom-elements.js +0 -47
package/dist/sdk/index.js CHANGED
@@ -1,27 +1,30 @@
1
- class R extends Error {
1
+ var Ce = Object.defineProperty;
2
+ var Oe = (s, e, t) => e in s ? Ce(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var _ = (s, e, t) => Oe(s, typeof e != "symbol" ? e + "" : e, t);
4
+ class I extends Error {
2
5
  constructor(e, t, r) {
3
6
  super(e), this.code = t, this.details = r, this.name = "EightGError";
4
7
  }
5
8
  static extensionNotInstalled() {
6
- return new R(
9
+ return new I(
7
10
  "8G Extension is not installed or not responding",
8
11
  "EXTENSION_NOT_FOUND"
9
12
  );
10
13
  }
11
14
  static invalidRequest(e) {
12
- return new R(`Invalid request: ${e}`, "INVALID_REQUEST");
15
+ return new I(`Invalid request: ${e}`, "INVALID_REQUEST");
13
16
  }
14
17
  static collectionFailed(e) {
15
- return new R(`Data collection failed: ${e}`, "COLLECTION_FAILED");
18
+ return new I(`Data collection failed: ${e}`, "COLLECTION_FAILED");
16
19
  }
17
20
  static requestTimeout() {
18
- return new R("Request timeout - Extension did not respond within 30 seconds", "REQUEST_TIMEOUT");
21
+ return new I("Request timeout - Extension did not respond within 30 seconds", "REQUEST_TIMEOUT");
19
22
  }
20
23
  }
21
- function we(s) {
24
+ function Se(s) {
22
25
  return s && s.type === "8G_EXTENSION_RESPONSE";
23
26
  }
24
- class Qe {
27
+ class rt {
25
28
  constructor() {
26
29
  }
27
30
  /**
@@ -30,9 +33,9 @@ class Qe {
30
33
  async checkExtension() {
31
34
  return new Promise((e, t) => {
32
35
  const r = setTimeout(() => {
33
- t(R.extensionNotInstalled());
36
+ t(I.extensionNotInstalled());
34
37
  }, 5e3), a = (n) => {
35
- we(n.data) && (clearTimeout(r), window.removeEventListener("message", a), e(n.data));
38
+ Se(n.data) && (clearTimeout(r), window.removeEventListener("message", a), e(n.data));
36
39
  };
37
40
  window.addEventListener("message", a), window.postMessage({ type: "8G_EXTENSION_CHECK" }, "*");
38
41
  });
@@ -43,15 +46,16 @@ class Qe {
43
46
  async collectWorkflow(e) {
44
47
  return new Promise((t, r) => {
45
48
  const a = `8g_wf_${Date.now()}_${Math.random()}`, n = setTimeout(() => {
46
- r(R.requestTimeout());
47
- }, 6e4), i = (o) => {
48
- if (o.data?.type === "8G_COLLECT_RESPONSE" && o.data.requestId === a) {
49
+ r(I.requestTimeout());
50
+ }, 6e4), i = (d) => {
51
+ var f, h, y, S;
52
+ if (((f = d.data) == null ? void 0 : f.type) === "8G_COLLECT_RESPONSE" && d.data.requestId === a) {
49
53
  clearTimeout(n), window.removeEventListener("message", i);
50
- const f = o.data, h = f?.result?.steps ?? f?.result?.result?.steps ?? [];
54
+ const T = d.data, Te = ((h = T == null ? void 0 : T.result) == null ? void 0 : h.steps) ?? ((S = (y = T == null ? void 0 : T.result) == null ? void 0 : y.result) == null ? void 0 : S.steps) ?? [];
51
55
  t({
52
- success: f.success,
53
- steps: h,
54
- error: f.success ? void 0 : "Workflow failed",
56
+ success: T.success,
57
+ steps: Te,
58
+ error: T.success ? void 0 : "Workflow failed",
55
59
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
56
60
  targetUrl: e.targetUrl
57
61
  });
@@ -68,7 +72,7 @@ class Qe {
68
72
  });
69
73
  }
70
74
  }
71
- var y;
75
+ var x;
72
76
  (function(s) {
73
77
  s.assertEqual = (a) => {
74
78
  };
@@ -84,9 +88,9 @@ var y;
84
88
  n[i] = i;
85
89
  return n;
86
90
  }, s.getValidEnumValues = (a) => {
87
- const n = s.objectKeys(a).filter((o) => typeof a[a[o]] != "number"), i = {};
88
- for (const o of n)
89
- i[o] = a[o];
91
+ const n = s.objectKeys(a).filter((d) => typeof a[a[d]] != "number"), i = {};
92
+ for (const d of n)
93
+ i[d] = a[d];
90
94
  return s.objectValues(i);
91
95
  }, s.objectValues = (a) => s.objectKeys(a).map(function(n) {
92
96
  return a[n];
@@ -104,16 +108,16 @@ var y;
104
108
  return a.map((i) => typeof i == "string" ? `'${i}'` : i).join(n);
105
109
  }
106
110
  s.joinValues = r, s.jsonStringifyReplacer = (a, n) => typeof n == "bigint" ? n.toString() : n;
107
- })(y || (y = {}));
108
- var te;
111
+ })(x || (x = {}));
112
+ var re;
109
113
  (function(s) {
110
114
  s.mergeShapes = (e, t) => ({
111
115
  ...e,
112
116
  ...t
113
117
  // second overwrites first
114
118
  });
115
- })(te || (te = {}));
116
- const u = y.arrayToEnum([
119
+ })(re || (re = {}));
120
+ const u = x.arrayToEnum([
117
121
  "string",
118
122
  "nan",
119
123
  "number",
@@ -134,7 +138,7 @@ const u = y.arrayToEnum([
134
138
  "never",
135
139
  "map",
136
140
  "set"
137
- ]), C = (s) => {
141
+ ]), N = (s) => {
138
142
  switch (typeof s) {
139
143
  case "undefined":
140
144
  return u.undefined;
@@ -155,7 +159,7 @@ const u = y.arrayToEnum([
155
159
  default:
156
160
  return u.unknown;
157
161
  }
158
- }, d = y.arrayToEnum([
162
+ }, o = x.arrayToEnum([
159
163
  "invalid_type",
160
164
  "invalid_literal",
161
165
  "custom",
@@ -173,7 +177,7 @@ const u = y.arrayToEnum([
173
177
  "not_multiple_of",
174
178
  "not_finite"
175
179
  ]);
176
- class T extends Error {
180
+ class O extends Error {
177
181
  get errors() {
178
182
  return this.issues;
179
183
  }
@@ -200,24 +204,24 @@ class T extends Error {
200
204
  else if (i.path.length === 0)
201
205
  r._errors.push(t(i));
202
206
  else {
203
- let o = r, f = 0;
207
+ let d = r, f = 0;
204
208
  for (; f < i.path.length; ) {
205
209
  const h = i.path[f];
206
- f === i.path.length - 1 ? (o[h] = o[h] || { _errors: [] }, o[h]._errors.push(t(i))) : o[h] = o[h] || { _errors: [] }, o = o[h], f++;
210
+ f === i.path.length - 1 ? (d[h] = d[h] || { _errors: [] }, d[h]._errors.push(t(i))) : d[h] = d[h] || { _errors: [] }, d = d[h], f++;
207
211
  }
208
212
  }
209
213
  };
210
214
  return a(this), r;
211
215
  }
212
216
  static assert(e) {
213
- if (!(e instanceof T))
217
+ if (!(e instanceof O))
214
218
  throw new Error(`Not a ZodError: ${e}`);
215
219
  }
216
220
  toString() {
217
221
  return this.message;
218
222
  }
219
223
  get message() {
220
- return JSON.stringify(this.issues, y.jsonStringifyReplacer, 2);
224
+ return JSON.stringify(this.issues, x.jsonStringifyReplacer, 2);
221
225
  }
222
226
  get isEmpty() {
223
227
  return this.issues.length === 0;
@@ -236,68 +240,68 @@ class T extends Error {
236
240
  return this.flatten();
237
241
  }
238
242
  }
239
- T.create = (s) => new T(s);
240
- const J = (s, e) => {
243
+ O.create = (s) => new O(s);
244
+ const X = (s, e) => {
241
245
  let t;
242
246
  switch (s.code) {
243
- case d.invalid_type:
247
+ case o.invalid_type:
244
248
  s.received === u.undefined ? t = "Required" : t = `Expected ${s.expected}, received ${s.received}`;
245
249
  break;
246
- case d.invalid_literal:
247
- t = `Invalid literal value, expected ${JSON.stringify(s.expected, y.jsonStringifyReplacer)}`;
250
+ case o.invalid_literal:
251
+ t = `Invalid literal value, expected ${JSON.stringify(s.expected, x.jsonStringifyReplacer)}`;
248
252
  break;
249
- case d.unrecognized_keys:
250
- t = `Unrecognized key(s) in object: ${y.joinValues(s.keys, ", ")}`;
253
+ case o.unrecognized_keys:
254
+ t = `Unrecognized key(s) in object: ${x.joinValues(s.keys, ", ")}`;
251
255
  break;
252
- case d.invalid_union:
256
+ case o.invalid_union:
253
257
  t = "Invalid input";
254
258
  break;
255
- case d.invalid_union_discriminator:
256
- t = `Invalid discriminator value. Expected ${y.joinValues(s.options)}`;
259
+ case o.invalid_union_discriminator:
260
+ t = `Invalid discriminator value. Expected ${x.joinValues(s.options)}`;
257
261
  break;
258
- case d.invalid_enum_value:
259
- t = `Invalid enum value. Expected ${y.joinValues(s.options)}, received '${s.received}'`;
262
+ case o.invalid_enum_value:
263
+ t = `Invalid enum value. Expected ${x.joinValues(s.options)}, received '${s.received}'`;
260
264
  break;
261
- case d.invalid_arguments:
265
+ case o.invalid_arguments:
262
266
  t = "Invalid function arguments";
263
267
  break;
264
- case d.invalid_return_type:
268
+ case o.invalid_return_type:
265
269
  t = "Invalid function return type";
266
270
  break;
267
- case d.invalid_date:
271
+ case o.invalid_date:
268
272
  t = "Invalid date";
269
273
  break;
270
- case d.invalid_string:
271
- typeof s.validation == "object" ? "includes" in s.validation ? (t = `Invalid input: must include "${s.validation.includes}"`, typeof s.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${s.validation.position}`)) : "startsWith" in s.validation ? t = `Invalid input: must start with "${s.validation.startsWith}"` : "endsWith" in s.validation ? t = `Invalid input: must end with "${s.validation.endsWith}"` : y.assertNever(s.validation) : s.validation !== "regex" ? t = `Invalid ${s.validation}` : t = "Invalid";
274
+ case o.invalid_string:
275
+ typeof s.validation == "object" ? "includes" in s.validation ? (t = `Invalid input: must include "${s.validation.includes}"`, typeof s.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${s.validation.position}`)) : "startsWith" in s.validation ? t = `Invalid input: must start with "${s.validation.startsWith}"` : "endsWith" in s.validation ? t = `Invalid input: must end with "${s.validation.endsWith}"` : x.assertNever(s.validation) : s.validation !== "regex" ? t = `Invalid ${s.validation}` : t = "Invalid";
272
276
  break;
273
- case d.too_small:
277
+ case o.too_small:
274
278
  s.type === "array" ? t = `Array must contain ${s.exact ? "exactly" : s.inclusive ? "at least" : "more than"} ${s.minimum} element(s)` : s.type === "string" ? t = `String must contain ${s.exact ? "exactly" : s.inclusive ? "at least" : "over"} ${s.minimum} character(s)` : s.type === "number" ? t = `Number must be ${s.exact ? "exactly equal to " : s.inclusive ? "greater than or equal to " : "greater than "}${s.minimum}` : s.type === "bigint" ? t = `Number must be ${s.exact ? "exactly equal to " : s.inclusive ? "greater than or equal to " : "greater than "}${s.minimum}` : s.type === "date" ? t = `Date must be ${s.exact ? "exactly equal to " : s.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(s.minimum))}` : t = "Invalid input";
275
279
  break;
276
- case d.too_big:
280
+ case o.too_big:
277
281
  s.type === "array" ? t = `Array must contain ${s.exact ? "exactly" : s.inclusive ? "at most" : "less than"} ${s.maximum} element(s)` : s.type === "string" ? t = `String must contain ${s.exact ? "exactly" : s.inclusive ? "at most" : "under"} ${s.maximum} character(s)` : s.type === "number" ? t = `Number must be ${s.exact ? "exactly" : s.inclusive ? "less than or equal to" : "less than"} ${s.maximum}` : s.type === "bigint" ? t = `BigInt must be ${s.exact ? "exactly" : s.inclusive ? "less than or equal to" : "less than"} ${s.maximum}` : s.type === "date" ? t = `Date must be ${s.exact ? "exactly" : s.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(s.maximum))}` : t = "Invalid input";
278
282
  break;
279
- case d.custom:
283
+ case o.custom:
280
284
  t = "Invalid input";
281
285
  break;
282
- case d.invalid_intersection_types:
286
+ case o.invalid_intersection_types:
283
287
  t = "Intersection results could not be merged";
284
288
  break;
285
- case d.not_multiple_of:
289
+ case o.not_multiple_of:
286
290
  t = `Number must be a multiple of ${s.multipleOf}`;
287
291
  break;
288
- case d.not_finite:
292
+ case o.not_finite:
289
293
  t = "Number must be finite";
290
294
  break;
291
295
  default:
292
- t = e.defaultError, y.assertNever(s);
296
+ t = e.defaultError, x.assertNever(s);
293
297
  }
294
298
  return { message: t };
295
299
  };
296
- let Te = J;
297
- function Ce() {
298
- return Te;
300
+ let Ne = X;
301
+ function Ae() {
302
+ return Ne;
299
303
  }
300
- const Oe = (s) => {
304
+ const Re = (s) => {
301
305
  const { data: e, path: t, errorMaps: r, issueData: a } = s, n = [...t, ...a.path || []], i = {
302
306
  ...a,
303
307
  path: n
@@ -308,18 +312,18 @@ const Oe = (s) => {
308
312
  path: n,
309
313
  message: a.message
310
314
  };
311
- let o = "";
315
+ let d = "";
312
316
  const f = r.filter((h) => !!h).slice().reverse();
313
317
  for (const h of f)
314
- o = h(i, { data: e, defaultError: o }).message;
318
+ d = h(i, { data: e, defaultError: d }).message;
315
319
  return {
316
320
  ...a,
317
321
  path: n,
318
- message: o
322
+ message: d
319
323
  };
320
324
  };
321
325
  function c(s, e) {
322
- const t = Ce(), r = Oe({
326
+ const t = Ae(), r = Re({
323
327
  issueData: e,
324
328
  data: s.data,
325
329
  path: s.path,
@@ -330,13 +334,13 @@ function c(s, e) {
330
334
  // then schema-bound map if available
331
335
  t,
332
336
  // then global override map
333
- t === J ? void 0 : J
337
+ t === X ? void 0 : X
334
338
  // then global default map
335
339
  ].filter((a) => !!a)
336
340
  });
337
341
  s.common.issues.push(r);
338
342
  }
339
- class k {
343
+ class b {
340
344
  constructor() {
341
345
  this.value = "valid";
342
346
  }
@@ -364,7 +368,7 @@ class k {
364
368
  value: i
365
369
  });
366
370
  }
367
- return k.mergeObjectSync(e, r);
371
+ return b.mergeObjectSync(e, r);
368
372
  }
369
373
  static mergeObjectSync(e, t) {
370
374
  const r = {};
@@ -379,12 +383,12 @@ class k {
379
383
  }
380
384
  const m = Object.freeze({
381
385
  status: "aborted"
382
- }), P = (s) => ({ status: "dirty", value: s }), b = (s) => ({ status: "valid", value: s }), se = (s) => s.status === "aborted", re = (s) => s.status === "dirty", I = (s) => s.status === "valid", U = (s) => typeof Promise < "u" && s instanceof Promise;
386
+ }), D = (s) => ({ status: "dirty", value: s }), w = (s) => ({ status: "valid", value: s }), ae = (s) => s.status === "aborted", ne = (s) => s.status === "dirty", L = (s) => s.status === "valid", F = (s) => typeof Promise < "u" && s instanceof Promise;
383
387
  var l;
384
388
  (function(s) {
385
- s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e?.message;
389
+ s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
386
390
  })(l || (l = {}));
387
- class N {
391
+ class E {
388
392
  constructor(e, t, r, a) {
389
393
  this._cachedPath = [], this.parent = e, this.data = t, this._path = r, this._key = a;
390
394
  }
@@ -392,8 +396,8 @@ class N {
392
396
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
393
397
  }
394
398
  }
395
- const ae = (s, e) => {
396
- if (I(e))
399
+ const ie = (s, e) => {
400
+ if (L(e))
397
401
  return { success: !0, data: e.value };
398
402
  if (!s.common.issues.length)
399
403
  throw new Error("Validation failed but no issues detected.");
@@ -402,34 +406,34 @@ const ae = (s, e) => {
402
406
  get error() {
403
407
  if (this._error)
404
408
  return this._error;
405
- const t = new T(s.common.issues);
409
+ const t = new O(s.common.issues);
406
410
  return this._error = t, this._error;
407
411
  }
408
412
  };
409
413
  };
410
- function _(s) {
414
+ function g(s) {
411
415
  if (!s)
412
416
  return {};
413
417
  const { errorMap: e, invalid_type_error: t, required_error: r, description: a } = s;
414
418
  if (e && (t || r))
415
419
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
416
- return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
420
+ return e ? { errorMap: e, description: a } : { errorMap: (i, d) => {
417
421
  const { message: f } = s;
418
- return i.code === "invalid_enum_value" ? { message: f ?? o.defaultError } : typeof o.data > "u" ? { message: f ?? r ?? o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: f ?? t ?? o.defaultError };
422
+ return i.code === "invalid_enum_value" ? { message: f ?? d.defaultError } : typeof d.data > "u" ? { message: f ?? r ?? d.defaultError } : i.code !== "invalid_type" ? { message: d.defaultError } : { message: f ?? t ?? d.defaultError };
419
423
  }, description: a };
420
424
  }
421
- class g {
425
+ class v {
422
426
  get description() {
423
427
  return this._def.description;
424
428
  }
425
429
  _getType(e) {
426
- return C(e.data);
430
+ return N(e.data);
427
431
  }
428
432
  _getOrReturnCtx(e, t) {
429
433
  return t || {
430
434
  common: e.parent.common,
431
435
  data: e.data,
432
- parsedType: C(e.data),
436
+ parsedType: N(e.data),
433
437
  schemaErrorMap: this._def.errorMap,
434
438
  path: e.path,
435
439
  parent: e.parent
@@ -437,11 +441,11 @@ class g {
437
441
  }
438
442
  _processInputParams(e) {
439
443
  return {
440
- status: new k(),
444
+ status: new b(),
441
445
  ctx: {
442
446
  common: e.parent.common,
443
447
  data: e.data,
444
- parsedType: C(e.data),
448
+ parsedType: N(e.data),
445
449
  schemaErrorMap: this._def.errorMap,
446
450
  path: e.path,
447
451
  parent: e.parent
@@ -450,7 +454,7 @@ class g {
450
454
  }
451
455
  _parseSync(e) {
452
456
  const t = this._parse(e);
453
- if (U(t))
457
+ if (F(t))
454
458
  throw new Error("Synchronous parse encountered promise.");
455
459
  return t;
456
460
  }
@@ -468,18 +472,19 @@ class g {
468
472
  const r = {
469
473
  common: {
470
474
  issues: [],
471
- async: t?.async ?? !1,
472
- contextualErrorMap: t?.errorMap
475
+ async: (t == null ? void 0 : t.async) ?? !1,
476
+ contextualErrorMap: t == null ? void 0 : t.errorMap
473
477
  },
474
- path: t?.path || [],
478
+ path: (t == null ? void 0 : t.path) || [],
475
479
  schemaErrorMap: this._def.errorMap,
476
480
  parent: null,
477
481
  data: e,
478
- parsedType: C(e)
482
+ parsedType: N(e)
479
483
  }, a = this._parseSync({ data: e, path: r.path, parent: r });
480
- return ae(r, a);
484
+ return ie(r, a);
481
485
  }
482
486
  "~validate"(e) {
487
+ var r, a;
483
488
  const t = {
484
489
  common: {
485
490
  issues: [],
@@ -489,24 +494,24 @@ class g {
489
494
  schemaErrorMap: this._def.errorMap,
490
495
  parent: null,
491
496
  data: e,
492
- parsedType: C(e)
497
+ parsedType: N(e)
493
498
  };
494
499
  if (!this["~standard"].async)
495
500
  try {
496
- const r = this._parseSync({ data: e, path: [], parent: t });
497
- return I(r) ? {
498
- value: r.value
501
+ const n = this._parseSync({ data: e, path: [], parent: t });
502
+ return L(n) ? {
503
+ value: n.value
499
504
  } : {
500
505
  issues: t.common.issues
501
506
  };
502
- } catch (r) {
503
- r?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
507
+ } catch (n) {
508
+ (a = (r = n == null ? void 0 : n.message) == null ? void 0 : r.toLowerCase()) != null && a.includes("encountered") && (this["~standard"].async = !0), t.common = {
504
509
  issues: [],
505
510
  async: !0
506
511
  };
507
512
  }
508
- return this._parseAsync({ data: e, path: [], parent: t }).then((r) => I(r) ? {
509
- value: r.value
513
+ return this._parseAsync({ data: e, path: [], parent: t }).then((n) => L(n) ? {
514
+ value: n.value
510
515
  } : {
511
516
  issues: t.common.issues
512
517
  });
@@ -521,32 +526,32 @@ class g {
521
526
  const r = {
522
527
  common: {
523
528
  issues: [],
524
- contextualErrorMap: t?.errorMap,
529
+ contextualErrorMap: t == null ? void 0 : t.errorMap,
525
530
  async: !0
526
531
  },
527
- path: t?.path || [],
532
+ path: (t == null ? void 0 : t.path) || [],
528
533
  schemaErrorMap: this._def.errorMap,
529
534
  parent: null,
530
535
  data: e,
531
- parsedType: C(e)
532
- }, a = this._parse({ data: e, path: r.path, parent: r }), n = await (U(a) ? a : Promise.resolve(a));
533
- return ae(r, n);
536
+ parsedType: N(e)
537
+ }, a = this._parse({ data: e, path: r.path, parent: r }), n = await (F(a) ? a : Promise.resolve(a));
538
+ return ie(r, n);
534
539
  }
535
540
  refine(e, t) {
536
541
  const r = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
537
542
  return this._refinement((a, n) => {
538
- const i = e(a), o = () => n.addIssue({
539
- code: d.custom,
543
+ const i = e(a), d = () => n.addIssue({
544
+ code: o.custom,
540
545
  ...r(a)
541
546
  });
542
- return typeof Promise < "u" && i instanceof Promise ? i.then((f) => f ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
547
+ return typeof Promise < "u" && i instanceof Promise ? i.then((f) => f ? !0 : (d(), !1)) : i ? !0 : (d(), !1);
543
548
  });
544
549
  }
545
550
  refinement(e, t) {
546
551
  return this._refinement((r, a) => e(r) ? !0 : (a.addIssue(typeof t == "function" ? t(r, a) : t), !1));
547
552
  }
548
553
  _refinement(e) {
549
- return new L({
554
+ return new P({
550
555
  schema: this,
551
556
  typeName: p.ZodEffects,
552
557
  effect: { type: "refinement", refinement: e }
@@ -563,29 +568,29 @@ class g {
563
568
  };
564
569
  }
565
570
  optional() {
566
- return S.create(this, this._def);
571
+ return R.create(this, this._def);
567
572
  }
568
573
  nullable() {
569
- return M.create(this, this._def);
574
+ return z.create(this, this._def);
570
575
  }
571
576
  nullish() {
572
577
  return this.nullable().optional();
573
578
  }
574
579
  array() {
575
- return w.create(this);
580
+ return C.create(this);
576
581
  }
577
582
  promise() {
578
- return q.create(this, this._def);
583
+ return J.create(this, this._def);
579
584
  }
580
585
  or(e) {
581
- return F.create([this, e], this._def);
586
+ return q.create([this, e], this._def);
582
587
  }
583
588
  and(e) {
584
- return W.create(this, e, this._def);
589
+ return G.create(this, e, this._def);
585
590
  }
586
591
  transform(e) {
587
- return new L({
588
- ..._(this._def),
592
+ return new P({
593
+ ...g(this._def),
589
594
  schema: this,
590
595
  typeName: p.ZodEffects,
591
596
  effect: { type: "transform", transform: e }
@@ -593,24 +598,24 @@ class g {
593
598
  }
594
599
  default(e) {
595
600
  const t = typeof e == "function" ? e : () => e;
596
- return new Y({
597
- ..._(this._def),
601
+ return new K({
602
+ ...g(this._def),
598
603
  innerType: this,
599
604
  defaultValue: t,
600
605
  typeName: p.ZodDefault
601
606
  });
602
607
  }
603
608
  brand() {
604
- return new He({
609
+ return new Ke({
605
610
  typeName: p.ZodBranded,
606
611
  type: this,
607
- ..._(this._def)
612
+ ...g(this._def)
608
613
  });
609
614
  }
610
615
  catch(e) {
611
616
  const t = typeof e == "function" ? e : () => e;
612
- return new Q({
613
- ..._(this._def),
617
+ return new ee({
618
+ ...g(this._def),
614
619
  innerType: this,
615
620
  catchValue: t,
616
621
  typeName: p.ZodCatch
@@ -624,10 +629,10 @@ class g {
624
629
  });
625
630
  }
626
631
  pipe(e) {
627
- return ee.create(this, e);
632
+ return se.create(this, e);
628
633
  }
629
634
  readonly() {
630
- return K.create(this);
635
+ return te.create(this);
631
636
  }
632
637
  isOptional() {
633
638
  return this.safeParse(void 0).success;
@@ -636,58 +641,58 @@ class g {
636
641
  return this.safeParse(null).success;
637
642
  }
638
643
  }
639
- const Se = /^c[^\s-]{8,}$/i, Ne = /^[0-9a-z]+$/, Ae = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Re = /^[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, Ee = /^[a-z0-9_-]{21}$/i, Ze = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ie = /^[-+]?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)?)??$/, je = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, $e = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
640
- let G;
641
- const Le = /^(?:(?: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])$/, Me = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/, Ve = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Pe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ze = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, De = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ve = "((\\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])))", Ue = new RegExp(`^${ve}$`);
642
- function xe(s) {
644
+ const Ee = /^c[^\s-]{8,}$/i, Ze = /^[0-9a-z]+$/, Ie = /^[0-9A-HJKMNP-TV-Z]{26}$/i, je = /^[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, $e = /^[a-z0-9_-]{21}$/i, Le = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Me = /^[-+]?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)?)??$/, Ve = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
645
+ let H;
646
+ const ze = /^(?:(?: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])$/, De = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/, Ue = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Be = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Fe = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, We = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ke = "((\\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])))", qe = new RegExp(`^${ke}$`);
647
+ function be(s) {
643
648
  let e = "[0-5]\\d";
644
649
  s.precision ? e = `${e}\\.\\d{${s.precision}}` : s.precision == null && (e = `${e}(\\.\\d+)?`);
645
650
  const t = s.precision ? "+" : "?";
646
651
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
647
652
  }
648
- function Be(s) {
649
- return new RegExp(`^${xe(s)}$`);
653
+ function Ge(s) {
654
+ return new RegExp(`^${be(s)}$`);
650
655
  }
651
- function Fe(s) {
652
- let e = `${ve}T${xe(s)}`;
656
+ function Je(s) {
657
+ let e = `${ke}T${be(s)}`;
653
658
  const t = [];
654
659
  return t.push(s.local ? "Z?" : "Z"), s.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
655
660
  }
656
- function We(s, e) {
657
- return !!((e === "v4" || !e) && Le.test(s) || (e === "v6" || !e) && Ve.test(s));
661
+ function He(s, e) {
662
+ return !!((e === "v4" || !e) && ze.test(s) || (e === "v6" || !e) && Ue.test(s));
658
663
  }
659
- function qe(s, e) {
660
- if (!Ze.test(s))
664
+ function Xe(s, e) {
665
+ if (!Le.test(s))
661
666
  return !1;
662
667
  try {
663
668
  const [t] = s.split(".");
664
669
  if (!t)
665
670
  return !1;
666
671
  const r = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), a = JSON.parse(atob(r));
667
- return !(typeof a != "object" || a === null || "typ" in a && a?.typ !== "JWT" || !a.alg || e && a.alg !== e);
672
+ return !(typeof a != "object" || a === null || "typ" in a && (a == null ? void 0 : a.typ) !== "JWT" || !a.alg || e && a.alg !== e);
668
673
  } catch {
669
674
  return !1;
670
675
  }
671
676
  }
672
- function Ge(s, e) {
673
- return !!((e === "v4" || !e) && Me.test(s) || (e === "v6" || !e) && Pe.test(s));
677
+ function Ye(s, e) {
678
+ return !!((e === "v4" || !e) && De.test(s) || (e === "v6" || !e) && Be.test(s));
674
679
  }
675
- class O extends g {
680
+ class A extends v {
676
681
  _parse(e) {
677
682
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
678
683
  const n = this._getOrReturnCtx(e);
679
684
  return c(n, {
680
- code: d.invalid_type,
685
+ code: o.invalid_type,
681
686
  expected: u.string,
682
687
  received: n.parsedType
683
688
  }), m;
684
689
  }
685
- const r = new k();
690
+ const r = new b();
686
691
  let a;
687
692
  for (const n of this._def.checks)
688
693
  if (n.kind === "min")
689
694
  e.data.length < n.value && (a = this._getOrReturnCtx(e, a), c(a, {
690
- code: d.too_small,
695
+ code: o.too_small,
691
696
  minimum: n.value,
692
697
  type: "string",
693
698
  inclusive: !0,
@@ -696,7 +701,7 @@ class O extends g {
696
701
  }), r.dirty());
697
702
  else if (n.kind === "max")
698
703
  e.data.length > n.value && (a = this._getOrReturnCtx(e, a), c(a, {
699
- code: d.too_big,
704
+ code: o.too_big,
700
705
  maximum: n.value,
701
706
  type: "string",
702
707
  inclusive: !0,
@@ -704,16 +709,16 @@ class O extends g {
704
709
  message: n.message
705
710
  }), r.dirty());
706
711
  else if (n.kind === "length") {
707
- const i = e.data.length > n.value, o = e.data.length < n.value;
708
- (i || o) && (a = this._getOrReturnCtx(e, a), i ? c(a, {
709
- code: d.too_big,
712
+ const i = e.data.length > n.value, d = e.data.length < n.value;
713
+ (i || d) && (a = this._getOrReturnCtx(e, a), i ? c(a, {
714
+ code: o.too_big,
710
715
  maximum: n.value,
711
716
  type: "string",
712
717
  inclusive: !0,
713
718
  exact: !0,
714
719
  message: n.message
715
- }) : o && c(a, {
716
- code: d.too_small,
720
+ }) : d && c(a, {
721
+ code: o.too_small,
717
722
  minimum: n.value,
718
723
  type: "string",
719
724
  inclusive: !0,
@@ -721,45 +726,45 @@ class O extends g {
721
726
  message: n.message
722
727
  }), r.dirty());
723
728
  } else if (n.kind === "email")
724
- je.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
729
+ Ve.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
725
730
  validation: "email",
726
- code: d.invalid_string,
731
+ code: o.invalid_string,
727
732
  message: n.message
728
733
  }), r.dirty());
729
734
  else if (n.kind === "emoji")
730
- G || (G = new RegExp($e, "u")), G.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
735
+ H || (H = new RegExp(Pe, "u")), H.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
731
736
  validation: "emoji",
732
- code: d.invalid_string,
737
+ code: o.invalid_string,
733
738
  message: n.message
734
739
  }), r.dirty());
735
740
  else if (n.kind === "uuid")
736
- Re.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
741
+ je.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
737
742
  validation: "uuid",
738
- code: d.invalid_string,
743
+ code: o.invalid_string,
739
744
  message: n.message
740
745
  }), r.dirty());
741
746
  else if (n.kind === "nanoid")
742
- Ee.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
747
+ $e.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
743
748
  validation: "nanoid",
744
- code: d.invalid_string,
749
+ code: o.invalid_string,
745
750
  message: n.message
746
751
  }), r.dirty());
747
752
  else if (n.kind === "cuid")
748
- Se.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
753
+ Ee.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
749
754
  validation: "cuid",
750
- code: d.invalid_string,
755
+ code: o.invalid_string,
751
756
  message: n.message
752
757
  }), r.dirty());
753
758
  else if (n.kind === "cuid2")
754
- Ne.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
759
+ Ze.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
755
760
  validation: "cuid2",
756
- code: d.invalid_string,
761
+ code: o.invalid_string,
757
762
  message: n.message
758
763
  }), r.dirty());
759
764
  else if (n.kind === "ulid")
760
- Ae.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
765
+ Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
761
766
  validation: "ulid",
762
- code: d.invalid_string,
767
+ code: o.invalid_string,
763
768
  message: n.message
764
769
  }), r.dirty());
765
770
  else if (n.kind === "url")
@@ -768,74 +773,74 @@ class O extends g {
768
773
  } catch {
769
774
  a = this._getOrReturnCtx(e, a), c(a, {
770
775
  validation: "url",
771
- code: d.invalid_string,
776
+ code: o.invalid_string,
772
777
  message: n.message
773
778
  }), r.dirty();
774
779
  }
775
780
  else n.kind === "regex" ? (n.regex.lastIndex = 0, n.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
776
781
  validation: "regex",
777
- code: d.invalid_string,
782
+ code: o.invalid_string,
778
783
  message: n.message
779
784
  }), r.dirty())) : n.kind === "trim" ? e.data = e.data.trim() : n.kind === "includes" ? e.data.includes(n.value, n.position) || (a = this._getOrReturnCtx(e, a), c(a, {
780
- code: d.invalid_string,
785
+ code: o.invalid_string,
781
786
  validation: { includes: n.value, position: n.position },
782
787
  message: n.message
783
788
  }), r.dirty()) : n.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : n.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : n.kind === "startsWith" ? e.data.startsWith(n.value) || (a = this._getOrReturnCtx(e, a), c(a, {
784
- code: d.invalid_string,
789
+ code: o.invalid_string,
785
790
  validation: { startsWith: n.value },
786
791
  message: n.message
787
792
  }), r.dirty()) : n.kind === "endsWith" ? e.data.endsWith(n.value) || (a = this._getOrReturnCtx(e, a), c(a, {
788
- code: d.invalid_string,
793
+ code: o.invalid_string,
789
794
  validation: { endsWith: n.value },
790
795
  message: n.message
791
- }), r.dirty()) : n.kind === "datetime" ? Fe(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
792
- code: d.invalid_string,
796
+ }), r.dirty()) : n.kind === "datetime" ? Je(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
797
+ code: o.invalid_string,
793
798
  validation: "datetime",
794
799
  message: n.message
795
- }), r.dirty()) : n.kind === "date" ? Ue.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
796
- code: d.invalid_string,
800
+ }), r.dirty()) : n.kind === "date" ? qe.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
801
+ code: o.invalid_string,
797
802
  validation: "date",
798
803
  message: n.message
799
- }), r.dirty()) : n.kind === "time" ? Be(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
800
- code: d.invalid_string,
804
+ }), r.dirty()) : n.kind === "time" ? Ge(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
805
+ code: o.invalid_string,
801
806
  validation: "time",
802
807
  message: n.message
803
- }), r.dirty()) : n.kind === "duration" ? Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
808
+ }), r.dirty()) : n.kind === "duration" ? Me.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
804
809
  validation: "duration",
805
- code: d.invalid_string,
810
+ code: o.invalid_string,
806
811
  message: n.message
807
- }), r.dirty()) : n.kind === "ip" ? We(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
812
+ }), r.dirty()) : n.kind === "ip" ? He(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
808
813
  validation: "ip",
809
- code: d.invalid_string,
814
+ code: o.invalid_string,
810
815
  message: n.message
811
- }), r.dirty()) : n.kind === "jwt" ? qe(e.data, n.alg) || (a = this._getOrReturnCtx(e, a), c(a, {
816
+ }), r.dirty()) : n.kind === "jwt" ? Xe(e.data, n.alg) || (a = this._getOrReturnCtx(e, a), c(a, {
812
817
  validation: "jwt",
813
- code: d.invalid_string,
818
+ code: o.invalid_string,
814
819
  message: n.message
815
- }), r.dirty()) : n.kind === "cidr" ? Ge(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
820
+ }), r.dirty()) : n.kind === "cidr" ? Ye(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
816
821
  validation: "cidr",
817
- code: d.invalid_string,
822
+ code: o.invalid_string,
818
823
  message: n.message
819
- }), r.dirty()) : n.kind === "base64" ? ze.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
824
+ }), r.dirty()) : n.kind === "base64" ? Fe.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
820
825
  validation: "base64",
821
- code: d.invalid_string,
826
+ code: o.invalid_string,
822
827
  message: n.message
823
- }), r.dirty()) : n.kind === "base64url" ? De.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
828
+ }), r.dirty()) : n.kind === "base64url" ? We.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
824
829
  validation: "base64url",
825
- code: d.invalid_string,
830
+ code: o.invalid_string,
826
831
  message: n.message
827
- }), r.dirty()) : y.assertNever(n);
832
+ }), r.dirty()) : x.assertNever(n);
828
833
  return { status: r.value, value: e.data };
829
834
  }
830
835
  _regex(e, t, r) {
831
836
  return this.refinement((a) => e.test(a), {
832
837
  validation: t,
833
- code: d.invalid_string,
838
+ code: o.invalid_string,
834
839
  ...l.errToObj(r)
835
840
  });
836
841
  }
837
842
  _addCheck(e) {
838
- return new O({
843
+ return new A({
839
844
  ...this._def,
840
845
  checks: [...this._def.checks, e]
841
846
  });
@@ -891,10 +896,10 @@ class O extends g {
891
896
  message: e
892
897
  }) : this._addCheck({
893
898
  kind: "datetime",
894
- precision: typeof e?.precision > "u" ? null : e?.precision,
895
- offset: e?.offset ?? !1,
896
- local: e?.local ?? !1,
897
- ...l.errToObj(e?.message)
899
+ precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
900
+ offset: (e == null ? void 0 : e.offset) ?? !1,
901
+ local: (e == null ? void 0 : e.local) ?? !1,
902
+ ...l.errToObj(e == null ? void 0 : e.message)
898
903
  });
899
904
  }
900
905
  date(e) {
@@ -907,8 +912,8 @@ class O extends g {
907
912
  message: e
908
913
  }) : this._addCheck({
909
914
  kind: "time",
910
- precision: typeof e?.precision > "u" ? null : e?.precision,
911
- ...l.errToObj(e?.message)
915
+ precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
916
+ ...l.errToObj(e == null ? void 0 : e.message)
912
917
  });
913
918
  }
914
919
  duration(e) {
@@ -925,8 +930,8 @@ class O extends g {
925
930
  return this._addCheck({
926
931
  kind: "includes",
927
932
  value: e,
928
- position: t?.position,
929
- ...l.errToObj(t?.message)
933
+ position: t == null ? void 0 : t.position,
934
+ ...l.errToObj(t == null ? void 0 : t.message)
930
935
  });
931
936
  }
932
937
  startsWith(e, t) {
@@ -971,19 +976,19 @@ class O extends g {
971
976
  return this.min(1, l.errToObj(e));
972
977
  }
973
978
  trim() {
974
- return new O({
979
+ return new A({
975
980
  ...this._def,
976
981
  checks: [...this._def.checks, { kind: "trim" }]
977
982
  });
978
983
  }
979
984
  toLowerCase() {
980
- return new O({
985
+ return new A({
981
986
  ...this._def,
982
987
  checks: [...this._def.checks, { kind: "toLowerCase" }]
983
988
  });
984
989
  }
985
990
  toUpperCase() {
986
- return new O({
991
+ return new A({
987
992
  ...this._def,
988
993
  checks: [...this._def.checks, { kind: "toUpperCase" }]
989
994
  });
@@ -1049,17 +1054,17 @@ class O extends g {
1049
1054
  return e;
1050
1055
  }
1051
1056
  }
1052
- O.create = (s) => new O({
1057
+ A.create = (s) => new A({
1053
1058
  checks: [],
1054
1059
  typeName: p.ZodString,
1055
- coerce: s?.coerce ?? !1,
1056
- ..._(s)
1060
+ coerce: (s == null ? void 0 : s.coerce) ?? !1,
1061
+ ...g(s)
1057
1062
  });
1058
- function Je(s, e) {
1063
+ function Qe(s, e) {
1059
1064
  const t = (s.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, a = t > r ? t : r, n = Number.parseInt(s.toFixed(a).replace(".", "")), i = Number.parseInt(e.toFixed(a).replace(".", ""));
1060
1065
  return n % i / 10 ** a;
1061
1066
  }
1062
- class j extends g {
1067
+ class M extends v {
1063
1068
  constructor() {
1064
1069
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1065
1070
  }
@@ -1067,41 +1072,41 @@ class j extends g {
1067
1072
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== u.number) {
1068
1073
  const n = this._getOrReturnCtx(e);
1069
1074
  return c(n, {
1070
- code: d.invalid_type,
1075
+ code: o.invalid_type,
1071
1076
  expected: u.number,
1072
1077
  received: n.parsedType
1073
1078
  }), m;
1074
1079
  }
1075
1080
  let r;
1076
- const a = new k();
1081
+ const a = new b();
1077
1082
  for (const n of this._def.checks)
1078
- n.kind === "int" ? y.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
1079
- code: d.invalid_type,
1083
+ n.kind === "int" ? x.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
1084
+ code: o.invalid_type,
1080
1085
  expected: "integer",
1081
1086
  received: "float",
1082
1087
  message: n.message
1083
1088
  }), a.dirty()) : n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (r = this._getOrReturnCtx(e, r), c(r, {
1084
- code: d.too_small,
1089
+ code: o.too_small,
1085
1090
  minimum: n.value,
1086
1091
  type: "number",
1087
1092
  inclusive: n.inclusive,
1088
1093
  exact: !1,
1089
1094
  message: n.message
1090
1095
  }), a.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (r = this._getOrReturnCtx(e, r), c(r, {
1091
- code: d.too_big,
1096
+ code: o.too_big,
1092
1097
  maximum: n.value,
1093
1098
  type: "number",
1094
1099
  inclusive: n.inclusive,
1095
1100
  exact: !1,
1096
1101
  message: n.message
1097
- }), a.dirty()) : n.kind === "multipleOf" ? Je(e.data, n.value) !== 0 && (r = this._getOrReturnCtx(e, r), c(r, {
1098
- code: d.not_multiple_of,
1102
+ }), a.dirty()) : n.kind === "multipleOf" ? Qe(e.data, n.value) !== 0 && (r = this._getOrReturnCtx(e, r), c(r, {
1103
+ code: o.not_multiple_of,
1099
1104
  multipleOf: n.value,
1100
1105
  message: n.message
1101
1106
  }), a.dirty()) : n.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
1102
- code: d.not_finite,
1107
+ code: o.not_finite,
1103
1108
  message: n.message
1104
- }), a.dirty()) : y.assertNever(n);
1109
+ }), a.dirty()) : x.assertNever(n);
1105
1110
  return { status: a.value, value: e.data };
1106
1111
  }
1107
1112
  gte(e, t) {
@@ -1117,7 +1122,7 @@ class j extends g {
1117
1122
  return this.setLimit("max", e, !1, l.toString(t));
1118
1123
  }
1119
1124
  setLimit(e, t, r, a) {
1120
- return new j({
1125
+ return new M({
1121
1126
  ...this._def,
1122
1127
  checks: [
1123
1128
  ...this._def.checks,
@@ -1131,7 +1136,7 @@ class j extends g {
1131
1136
  });
1132
1137
  }
1133
1138
  _addCheck(e) {
1134
- return new j({
1139
+ return new M({
1135
1140
  ...this._def,
1136
1141
  checks: [...this._def.checks, e]
1137
1142
  });
@@ -1213,7 +1218,7 @@ class j extends g {
1213
1218
  return e;
1214
1219
  }
1215
1220
  get isInt() {
1216
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && y.isInteger(e.value));
1221
+ return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && x.isInteger(e.value));
1217
1222
  }
1218
1223
  get isFinite() {
1219
1224
  let e = null, t = null;
@@ -1225,13 +1230,13 @@ class j extends g {
1225
1230
  return Number.isFinite(t) && Number.isFinite(e);
1226
1231
  }
1227
1232
  }
1228
- j.create = (s) => new j({
1233
+ M.create = (s) => new M({
1229
1234
  checks: [],
1230
1235
  typeName: p.ZodNumber,
1231
- coerce: s?.coerce || !1,
1232
- ..._(s)
1236
+ coerce: (s == null ? void 0 : s.coerce) || !1,
1237
+ ...g(s)
1233
1238
  });
1234
- class z extends g {
1239
+ class U extends v {
1235
1240
  constructor() {
1236
1241
  super(...arguments), this.min = this.gte, this.max = this.lte;
1237
1242
  }
@@ -1245,31 +1250,31 @@ class z extends g {
1245
1250
  if (this._getType(e) !== u.bigint)
1246
1251
  return this._getInvalidInput(e);
1247
1252
  let r;
1248
- const a = new k();
1253
+ const a = new b();
1249
1254
  for (const n of this._def.checks)
1250
1255
  n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (r = this._getOrReturnCtx(e, r), c(r, {
1251
- code: d.too_small,
1256
+ code: o.too_small,
1252
1257
  type: "bigint",
1253
1258
  minimum: n.value,
1254
1259
  inclusive: n.inclusive,
1255
1260
  message: n.message
1256
1261
  }), a.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (r = this._getOrReturnCtx(e, r), c(r, {
1257
- code: d.too_big,
1262
+ code: o.too_big,
1258
1263
  type: "bigint",
1259
1264
  maximum: n.value,
1260
1265
  inclusive: n.inclusive,
1261
1266
  message: n.message
1262
1267
  }), a.dirty()) : n.kind === "multipleOf" ? e.data % n.value !== BigInt(0) && (r = this._getOrReturnCtx(e, r), c(r, {
1263
- code: d.not_multiple_of,
1268
+ code: o.not_multiple_of,
1264
1269
  multipleOf: n.value,
1265
1270
  message: n.message
1266
- }), a.dirty()) : y.assertNever(n);
1271
+ }), a.dirty()) : x.assertNever(n);
1267
1272
  return { status: a.value, value: e.data };
1268
1273
  }
1269
1274
  _getInvalidInput(e) {
1270
1275
  const t = this._getOrReturnCtx(e);
1271
1276
  return c(t, {
1272
- code: d.invalid_type,
1277
+ code: o.invalid_type,
1273
1278
  expected: u.bigint,
1274
1279
  received: t.parsedType
1275
1280
  }), m;
@@ -1287,7 +1292,7 @@ class z extends g {
1287
1292
  return this.setLimit("max", e, !1, l.toString(t));
1288
1293
  }
1289
1294
  setLimit(e, t, r, a) {
1290
- return new z({
1295
+ return new U({
1291
1296
  ...this._def,
1292
1297
  checks: [
1293
1298
  ...this._def.checks,
@@ -1301,7 +1306,7 @@ class z extends g {
1301
1306
  });
1302
1307
  }
1303
1308
  _addCheck(e) {
1304
- return new z({
1309
+ return new U({
1305
1310
  ...this._def,
1306
1311
  checks: [...this._def.checks, e]
1307
1312
  });
@@ -1358,36 +1363,36 @@ class z extends g {
1358
1363
  return e;
1359
1364
  }
1360
1365
  }
1361
- z.create = (s) => new z({
1366
+ U.create = (s) => new U({
1362
1367
  checks: [],
1363
1368
  typeName: p.ZodBigInt,
1364
- coerce: s?.coerce ?? !1,
1365
- ..._(s)
1369
+ coerce: (s == null ? void 0 : s.coerce) ?? !1,
1370
+ ...g(s)
1366
1371
  });
1367
- class H extends g {
1372
+ class Y extends v {
1368
1373
  _parse(e) {
1369
1374
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
1370
1375
  const r = this._getOrReturnCtx(e);
1371
1376
  return c(r, {
1372
- code: d.invalid_type,
1377
+ code: o.invalid_type,
1373
1378
  expected: u.boolean,
1374
1379
  received: r.parsedType
1375
1380
  }), m;
1376
1381
  }
1377
- return b(e.data);
1382
+ return w(e.data);
1378
1383
  }
1379
1384
  }
1380
- H.create = (s) => new H({
1385
+ Y.create = (s) => new Y({
1381
1386
  typeName: p.ZodBoolean,
1382
- coerce: s?.coerce || !1,
1383
- ..._(s)
1387
+ coerce: (s == null ? void 0 : s.coerce) || !1,
1388
+ ...g(s)
1384
1389
  });
1385
- class B extends g {
1390
+ class W extends v {
1386
1391
  _parse(e) {
1387
1392
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
1388
1393
  const n = this._getOrReturnCtx(e);
1389
1394
  return c(n, {
1390
- code: d.invalid_type,
1395
+ code: o.invalid_type,
1391
1396
  expected: u.date,
1392
1397
  received: n.parsedType
1393
1398
  }), m;
@@ -1395,34 +1400,34 @@ class B extends g {
1395
1400
  if (Number.isNaN(e.data.getTime())) {
1396
1401
  const n = this._getOrReturnCtx(e);
1397
1402
  return c(n, {
1398
- code: d.invalid_date
1403
+ code: o.invalid_date
1399
1404
  }), m;
1400
1405
  }
1401
- const r = new k();
1406
+ const r = new b();
1402
1407
  let a;
1403
1408
  for (const n of this._def.checks)
1404
1409
  n.kind === "min" ? e.data.getTime() < n.value && (a = this._getOrReturnCtx(e, a), c(a, {
1405
- code: d.too_small,
1410
+ code: o.too_small,
1406
1411
  message: n.message,
1407
1412
  inclusive: !0,
1408
1413
  exact: !1,
1409
1414
  minimum: n.value,
1410
1415
  type: "date"
1411
1416
  }), r.dirty()) : n.kind === "max" ? e.data.getTime() > n.value && (a = this._getOrReturnCtx(e, a), c(a, {
1412
- code: d.too_big,
1417
+ code: o.too_big,
1413
1418
  message: n.message,
1414
1419
  inclusive: !0,
1415
1420
  exact: !1,
1416
1421
  maximum: n.value,
1417
1422
  type: "date"
1418
- }), r.dirty()) : y.assertNever(n);
1423
+ }), r.dirty()) : x.assertNever(n);
1419
1424
  return {
1420
1425
  status: r.value,
1421
1426
  value: new Date(e.data.getTime())
1422
1427
  };
1423
1428
  }
1424
1429
  _addCheck(e) {
1425
- return new B({
1430
+ return new W({
1426
1431
  ...this._def,
1427
1432
  checks: [...this._def.checks, e]
1428
1433
  });
@@ -1454,132 +1459,132 @@ class B extends g {
1454
1459
  return e != null ? new Date(e) : null;
1455
1460
  }
1456
1461
  }
1457
- B.create = (s) => new B({
1462
+ W.create = (s) => new W({
1458
1463
  checks: [],
1459
- coerce: s?.coerce || !1,
1464
+ coerce: (s == null ? void 0 : s.coerce) || !1,
1460
1465
  typeName: p.ZodDate,
1461
- ..._(s)
1466
+ ...g(s)
1462
1467
  });
1463
- class ne extends g {
1468
+ class de extends v {
1464
1469
  _parse(e) {
1465
1470
  if (this._getType(e) !== u.symbol) {
1466
1471
  const r = this._getOrReturnCtx(e);
1467
1472
  return c(r, {
1468
- code: d.invalid_type,
1473
+ code: o.invalid_type,
1469
1474
  expected: u.symbol,
1470
1475
  received: r.parsedType
1471
1476
  }), m;
1472
1477
  }
1473
- return b(e.data);
1478
+ return w(e.data);
1474
1479
  }
1475
1480
  }
1476
- ne.create = (s) => new ne({
1481
+ de.create = (s) => new de({
1477
1482
  typeName: p.ZodSymbol,
1478
- ..._(s)
1483
+ ...g(s)
1479
1484
  });
1480
- class ie extends g {
1485
+ class oe extends v {
1481
1486
  _parse(e) {
1482
1487
  if (this._getType(e) !== u.undefined) {
1483
1488
  const r = this._getOrReturnCtx(e);
1484
1489
  return c(r, {
1485
- code: d.invalid_type,
1490
+ code: o.invalid_type,
1486
1491
  expected: u.undefined,
1487
1492
  received: r.parsedType
1488
1493
  }), m;
1489
1494
  }
1490
- return b(e.data);
1495
+ return w(e.data);
1491
1496
  }
1492
1497
  }
1493
- ie.create = (s) => new ie({
1498
+ oe.create = (s) => new oe({
1494
1499
  typeName: p.ZodUndefined,
1495
- ..._(s)
1500
+ ...g(s)
1496
1501
  });
1497
- class oe extends g {
1502
+ class ce extends v {
1498
1503
  _parse(e) {
1499
1504
  if (this._getType(e) !== u.null) {
1500
1505
  const r = this._getOrReturnCtx(e);
1501
1506
  return c(r, {
1502
- code: d.invalid_type,
1507
+ code: o.invalid_type,
1503
1508
  expected: u.null,
1504
1509
  received: r.parsedType
1505
1510
  }), m;
1506
1511
  }
1507
- return b(e.data);
1512
+ return w(e.data);
1508
1513
  }
1509
1514
  }
1510
- oe.create = (s) => new oe({
1515
+ ce.create = (s) => new ce({
1511
1516
  typeName: p.ZodNull,
1512
- ..._(s)
1517
+ ...g(s)
1513
1518
  });
1514
- class de extends g {
1519
+ class ue extends v {
1515
1520
  constructor() {
1516
1521
  super(...arguments), this._any = !0;
1517
1522
  }
1518
1523
  _parse(e) {
1519
- return b(e.data);
1524
+ return w(e.data);
1520
1525
  }
1521
1526
  }
1522
- de.create = (s) => new de({
1527
+ ue.create = (s) => new ue({
1523
1528
  typeName: p.ZodAny,
1524
- ..._(s)
1529
+ ...g(s)
1525
1530
  });
1526
- class ce extends g {
1531
+ class le extends v {
1527
1532
  constructor() {
1528
1533
  super(...arguments), this._unknown = !0;
1529
1534
  }
1530
1535
  _parse(e) {
1531
- return b(e.data);
1536
+ return w(e.data);
1532
1537
  }
1533
1538
  }
1534
- ce.create = (s) => new ce({
1539
+ le.create = (s) => new le({
1535
1540
  typeName: p.ZodUnknown,
1536
- ..._(s)
1541
+ ...g(s)
1537
1542
  });
1538
- class A extends g {
1543
+ class Z extends v {
1539
1544
  _parse(e) {
1540
1545
  const t = this._getOrReturnCtx(e);
1541
1546
  return c(t, {
1542
- code: d.invalid_type,
1547
+ code: o.invalid_type,
1543
1548
  expected: u.never,
1544
1549
  received: t.parsedType
1545
1550
  }), m;
1546
1551
  }
1547
1552
  }
1548
- A.create = (s) => new A({
1553
+ Z.create = (s) => new Z({
1549
1554
  typeName: p.ZodNever,
1550
- ..._(s)
1555
+ ...g(s)
1551
1556
  });
1552
- class ue extends g {
1557
+ class fe extends v {
1553
1558
  _parse(e) {
1554
1559
  if (this._getType(e) !== u.undefined) {
1555
1560
  const r = this._getOrReturnCtx(e);
1556
1561
  return c(r, {
1557
- code: d.invalid_type,
1562
+ code: o.invalid_type,
1558
1563
  expected: u.void,
1559
1564
  received: r.parsedType
1560
1565
  }), m;
1561
1566
  }
1562
- return b(e.data);
1567
+ return w(e.data);
1563
1568
  }
1564
1569
  }
1565
- ue.create = (s) => new ue({
1570
+ fe.create = (s) => new fe({
1566
1571
  typeName: p.ZodVoid,
1567
- ..._(s)
1572
+ ...g(s)
1568
1573
  });
1569
- class w extends g {
1574
+ class C extends v {
1570
1575
  _parse(e) {
1571
1576
  const { ctx: t, status: r } = this._processInputParams(e), a = this._def;
1572
1577
  if (t.parsedType !== u.array)
1573
1578
  return c(t, {
1574
- code: d.invalid_type,
1579
+ code: o.invalid_type,
1575
1580
  expected: u.array,
1576
1581
  received: t.parsedType
1577
1582
  }), m;
1578
1583
  if (a.exactLength !== null) {
1579
- const i = t.data.length > a.exactLength.value, o = t.data.length < a.exactLength.value;
1580
- (i || o) && (c(t, {
1581
- code: i ? d.too_big : d.too_small,
1582
- minimum: o ? a.exactLength.value : void 0,
1584
+ const i = t.data.length > a.exactLength.value, d = t.data.length < a.exactLength.value;
1585
+ (i || d) && (c(t, {
1586
+ code: i ? o.too_big : o.too_small,
1587
+ minimum: d ? a.exactLength.value : void 0,
1583
1588
  maximum: i ? a.exactLength.value : void 0,
1584
1589
  type: "array",
1585
1590
  inclusive: !0,
@@ -1588,41 +1593,41 @@ class w extends g {
1588
1593
  }), r.dirty());
1589
1594
  }
1590
1595
  if (a.minLength !== null && t.data.length < a.minLength.value && (c(t, {
1591
- code: d.too_small,
1596
+ code: o.too_small,
1592
1597
  minimum: a.minLength.value,
1593
1598
  type: "array",
1594
1599
  inclusive: !0,
1595
1600
  exact: !1,
1596
1601
  message: a.minLength.message
1597
1602
  }), r.dirty()), a.maxLength !== null && t.data.length > a.maxLength.value && (c(t, {
1598
- code: d.too_big,
1603
+ code: o.too_big,
1599
1604
  maximum: a.maxLength.value,
1600
1605
  type: "array",
1601
1606
  inclusive: !0,
1602
1607
  exact: !1,
1603
1608
  message: a.maxLength.message
1604
1609
  }), r.dirty()), t.common.async)
1605
- return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new N(t, i, t.path, o)))).then((i) => k.mergeArray(r, i));
1606
- const n = [...t.data].map((i, o) => a.type._parseSync(new N(t, i, t.path, o)));
1607
- return k.mergeArray(r, n);
1610
+ return Promise.all([...t.data].map((i, d) => a.type._parseAsync(new E(t, i, t.path, d)))).then((i) => b.mergeArray(r, i));
1611
+ const n = [...t.data].map((i, d) => a.type._parseSync(new E(t, i, t.path, d)));
1612
+ return b.mergeArray(r, n);
1608
1613
  }
1609
1614
  get element() {
1610
1615
  return this._def.type;
1611
1616
  }
1612
1617
  min(e, t) {
1613
- return new w({
1618
+ return new C({
1614
1619
  ...this._def,
1615
1620
  minLength: { value: e, message: l.toString(t) }
1616
1621
  });
1617
1622
  }
1618
1623
  max(e, t) {
1619
- return new w({
1624
+ return new C({
1620
1625
  ...this._def,
1621
1626
  maxLength: { value: e, message: l.toString(t) }
1622
1627
  });
1623
1628
  }
1624
1629
  length(e, t) {
1625
- return new w({
1630
+ return new C({
1626
1631
  ...this._def,
1627
1632
  exactLength: { value: e, message: l.toString(t) }
1628
1633
  });
@@ -1631,113 +1636,114 @@ class w extends g {
1631
1636
  return this.min(1, e);
1632
1637
  }
1633
1638
  }
1634
- w.create = (s, e) => new w({
1639
+ C.create = (s, e) => new C({
1635
1640
  type: s,
1636
1641
  minLength: null,
1637
1642
  maxLength: null,
1638
1643
  exactLength: null,
1639
1644
  typeName: p.ZodArray,
1640
- ..._(e)
1645
+ ...g(e)
1641
1646
  });
1642
- function Z(s) {
1643
- if (s instanceof x) {
1647
+ function $(s) {
1648
+ if (s instanceof k) {
1644
1649
  const e = {};
1645
1650
  for (const t in s.shape) {
1646
1651
  const r = s.shape[t];
1647
- e[t] = S.create(Z(r));
1652
+ e[t] = R.create($(r));
1648
1653
  }
1649
- return new x({
1654
+ return new k({
1650
1655
  ...s._def,
1651
1656
  shape: () => e
1652
1657
  });
1653
- } else return s instanceof w ? new w({
1658
+ } else return s instanceof C ? new C({
1654
1659
  ...s._def,
1655
- type: Z(s.element)
1656
- }) : s instanceof S ? S.create(Z(s.unwrap())) : s instanceof M ? M.create(Z(s.unwrap())) : s instanceof E ? E.create(s.items.map((e) => Z(e))) : s;
1660
+ type: $(s.element)
1661
+ }) : s instanceof R ? R.create($(s.unwrap())) : s instanceof z ? z.create($(s.unwrap())) : s instanceof j ? j.create(s.items.map((e) => $(e))) : s;
1657
1662
  }
1658
- class x extends g {
1663
+ class k extends v {
1659
1664
  constructor() {
1660
1665
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1661
1666
  }
1662
1667
  _getCached() {
1663
1668
  if (this._cached !== null)
1664
1669
  return this._cached;
1665
- const e = this._def.shape(), t = y.objectKeys(e);
1670
+ const e = this._def.shape(), t = x.objectKeys(e);
1666
1671
  return this._cached = { shape: e, keys: t }, this._cached;
1667
1672
  }
1668
1673
  _parse(e) {
1669
1674
  if (this._getType(e) !== u.object) {
1670
1675
  const h = this._getOrReturnCtx(e);
1671
1676
  return c(h, {
1672
- code: d.invalid_type,
1677
+ code: o.invalid_type,
1673
1678
  expected: u.object,
1674
1679
  received: h.parsedType
1675
1680
  }), m;
1676
1681
  }
1677
- const { status: r, ctx: a } = this._processInputParams(e), { shape: n, keys: i } = this._getCached(), o = [];
1678
- if (!(this._def.catchall instanceof A && this._def.unknownKeys === "strip"))
1682
+ const { status: r, ctx: a } = this._processInputParams(e), { shape: n, keys: i } = this._getCached(), d = [];
1683
+ if (!(this._def.catchall instanceof Z && this._def.unknownKeys === "strip"))
1679
1684
  for (const h in a.data)
1680
- i.includes(h) || o.push(h);
1685
+ i.includes(h) || d.push(h);
1681
1686
  const f = [];
1682
1687
  for (const h of i) {
1683
- const v = n[h], V = a.data[h];
1688
+ const y = n[h], S = a.data[h];
1684
1689
  f.push({
1685
1690
  key: { status: "valid", value: h },
1686
- value: v._parse(new N(a, V, a.path, h)),
1691
+ value: y._parse(new E(a, S, a.path, h)),
1687
1692
  alwaysSet: h in a.data
1688
1693
  });
1689
1694
  }
1690
- if (this._def.catchall instanceof A) {
1695
+ if (this._def.catchall instanceof Z) {
1691
1696
  const h = this._def.unknownKeys;
1692
1697
  if (h === "passthrough")
1693
- for (const v of o)
1698
+ for (const y of d)
1694
1699
  f.push({
1695
- key: { status: "valid", value: v },
1696
- value: { status: "valid", value: a.data[v] }
1700
+ key: { status: "valid", value: y },
1701
+ value: { status: "valid", value: a.data[y] }
1697
1702
  });
1698
1703
  else if (h === "strict")
1699
- o.length > 0 && (c(a, {
1700
- code: d.unrecognized_keys,
1701
- keys: o
1704
+ d.length > 0 && (c(a, {
1705
+ code: o.unrecognized_keys,
1706
+ keys: d
1702
1707
  }), r.dirty());
1703
1708
  else if (h !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1704
1709
  } else {
1705
1710
  const h = this._def.catchall;
1706
- for (const v of o) {
1707
- const V = a.data[v];
1711
+ for (const y of d) {
1712
+ const S = a.data[y];
1708
1713
  f.push({
1709
- key: { status: "valid", value: v },
1714
+ key: { status: "valid", value: y },
1710
1715
  value: h._parse(
1711
- new N(a, V, a.path, v)
1716
+ new E(a, S, a.path, y)
1712
1717
  //, ctx.child(key), value, getParsedType(value)
1713
1718
  ),
1714
- alwaysSet: v in a.data
1719
+ alwaysSet: y in a.data
1715
1720
  });
1716
1721
  }
1717
1722
  }
1718
1723
  return a.common.async ? Promise.resolve().then(async () => {
1719
1724
  const h = [];
1720
- for (const v of f) {
1721
- const V = await v.key, be = await v.value;
1725
+ for (const y of f) {
1726
+ const S = await y.key, T = await y.value;
1722
1727
  h.push({
1723
- key: V,
1724
- value: be,
1725
- alwaysSet: v.alwaysSet
1728
+ key: S,
1729
+ value: T,
1730
+ alwaysSet: y.alwaysSet
1726
1731
  });
1727
1732
  }
1728
1733
  return h;
1729
- }).then((h) => k.mergeObjectSync(r, h)) : k.mergeObjectSync(r, f);
1734
+ }).then((h) => b.mergeObjectSync(r, h)) : b.mergeObjectSync(r, f);
1730
1735
  }
1731
1736
  get shape() {
1732
1737
  return this._def.shape();
1733
1738
  }
1734
1739
  strict(e) {
1735
- return l.errToObj, new x({
1740
+ return l.errToObj, new k({
1736
1741
  ...this._def,
1737
1742
  unknownKeys: "strict",
1738
1743
  ...e !== void 0 ? {
1739
1744
  errorMap: (t, r) => {
1740
- const a = this._def.errorMap?.(t, r).message ?? r.defaultError;
1745
+ var n, i;
1746
+ const a = ((i = (n = this._def).errorMap) == null ? void 0 : i.call(n, t, r).message) ?? r.defaultError;
1741
1747
  return t.code === "unrecognized_keys" ? {
1742
1748
  message: l.errToObj(e).message ?? a
1743
1749
  } : {
@@ -1748,13 +1754,13 @@ class x extends g {
1748
1754
  });
1749
1755
  }
1750
1756
  strip() {
1751
- return new x({
1757
+ return new k({
1752
1758
  ...this._def,
1753
1759
  unknownKeys: "strip"
1754
1760
  });
1755
1761
  }
1756
1762
  passthrough() {
1757
- return new x({
1763
+ return new k({
1758
1764
  ...this._def,
1759
1765
  unknownKeys: "passthrough"
1760
1766
  });
@@ -1777,7 +1783,7 @@ class x extends g {
1777
1783
  // }) as any;
1778
1784
  // };
1779
1785
  extend(e) {
1780
- return new x({
1786
+ return new k({
1781
1787
  ...this._def,
1782
1788
  shape: () => ({
1783
1789
  ...this._def.shape(),
@@ -1791,7 +1797,7 @@ class x extends g {
1791
1797
  * upgrade if you are experiencing issues.
1792
1798
  */
1793
1799
  merge(e) {
1794
- return new x({
1800
+ return new k({
1795
1801
  unknownKeys: e._def.unknownKeys,
1796
1802
  catchall: e._def.catchall,
1797
1803
  shape: () => ({
@@ -1861,25 +1867,25 @@ class x extends g {
1861
1867
  // return merged;
1862
1868
  // }
1863
1869
  catchall(e) {
1864
- return new x({
1870
+ return new k({
1865
1871
  ...this._def,
1866
1872
  catchall: e
1867
1873
  });
1868
1874
  }
1869
1875
  pick(e) {
1870
1876
  const t = {};
1871
- for (const r of y.objectKeys(e))
1877
+ for (const r of x.objectKeys(e))
1872
1878
  e[r] && this.shape[r] && (t[r] = this.shape[r]);
1873
- return new x({
1879
+ return new k({
1874
1880
  ...this._def,
1875
1881
  shape: () => t
1876
1882
  });
1877
1883
  }
1878
1884
  omit(e) {
1879
1885
  const t = {};
1880
- for (const r of y.objectKeys(this.shape))
1886
+ for (const r of x.objectKeys(this.shape))
1881
1887
  e[r] || (t[r] = this.shape[r]);
1882
- return new x({
1888
+ return new k({
1883
1889
  ...this._def,
1884
1890
  shape: () => t
1885
1891
  });
@@ -1888,73 +1894,73 @@ class x extends g {
1888
1894
  * @deprecated
1889
1895
  */
1890
1896
  deepPartial() {
1891
- return Z(this);
1897
+ return $(this);
1892
1898
  }
1893
1899
  partial(e) {
1894
1900
  const t = {};
1895
- for (const r of y.objectKeys(this.shape)) {
1901
+ for (const r of x.objectKeys(this.shape)) {
1896
1902
  const a = this.shape[r];
1897
1903
  e && !e[r] ? t[r] = a : t[r] = a.optional();
1898
1904
  }
1899
- return new x({
1905
+ return new k({
1900
1906
  ...this._def,
1901
1907
  shape: () => t
1902
1908
  });
1903
1909
  }
1904
1910
  required(e) {
1905
1911
  const t = {};
1906
- for (const r of y.objectKeys(this.shape))
1912
+ for (const r of x.objectKeys(this.shape))
1907
1913
  if (e && !e[r])
1908
1914
  t[r] = this.shape[r];
1909
1915
  else {
1910
1916
  let n = this.shape[r];
1911
- for (; n instanceof S; )
1917
+ for (; n instanceof R; )
1912
1918
  n = n._def.innerType;
1913
1919
  t[r] = n;
1914
1920
  }
1915
- return new x({
1921
+ return new k({
1916
1922
  ...this._def,
1917
1923
  shape: () => t
1918
1924
  });
1919
1925
  }
1920
1926
  keyof() {
1921
- return ke(y.objectKeys(this.shape));
1927
+ return we(x.objectKeys(this.shape));
1922
1928
  }
1923
1929
  }
1924
- x.create = (s, e) => new x({
1930
+ k.create = (s, e) => new k({
1925
1931
  shape: () => s,
1926
1932
  unknownKeys: "strip",
1927
- catchall: A.create(),
1933
+ catchall: Z.create(),
1928
1934
  typeName: p.ZodObject,
1929
- ..._(e)
1935
+ ...g(e)
1930
1936
  });
1931
- x.strictCreate = (s, e) => new x({
1937
+ k.strictCreate = (s, e) => new k({
1932
1938
  shape: () => s,
1933
1939
  unknownKeys: "strict",
1934
- catchall: A.create(),
1940
+ catchall: Z.create(),
1935
1941
  typeName: p.ZodObject,
1936
- ..._(e)
1942
+ ...g(e)
1937
1943
  });
1938
- x.lazycreate = (s, e) => new x({
1944
+ k.lazycreate = (s, e) => new k({
1939
1945
  shape: s,
1940
1946
  unknownKeys: "strip",
1941
- catchall: A.create(),
1947
+ catchall: Z.create(),
1942
1948
  typeName: p.ZodObject,
1943
- ..._(e)
1949
+ ...g(e)
1944
1950
  });
1945
- class F extends g {
1951
+ class q extends v {
1946
1952
  _parse(e) {
1947
1953
  const { ctx: t } = this._processInputParams(e), r = this._def.options;
1948
1954
  function a(n) {
1949
- for (const o of n)
1950
- if (o.result.status === "valid")
1951
- return o.result;
1952
- for (const o of n)
1953
- if (o.result.status === "dirty")
1954
- return t.common.issues.push(...o.ctx.common.issues), o.result;
1955
- const i = n.map((o) => new T(o.ctx.common.issues));
1955
+ for (const d of n)
1956
+ if (d.result.status === "valid")
1957
+ return d.result;
1958
+ for (const d of n)
1959
+ if (d.result.status === "dirty")
1960
+ return t.common.issues.push(...d.ctx.common.issues), d.result;
1961
+ const i = n.map((d) => new O(d.ctx.common.issues));
1956
1962
  return c(t, {
1957
- code: d.invalid_union,
1963
+ code: o.invalid_union,
1958
1964
  unionErrors: i
1959
1965
  }), m;
1960
1966
  }
@@ -1988,21 +1994,21 @@ class F extends g {
1988
1994
  issues: []
1989
1995
  },
1990
1996
  parent: null
1991
- }, v = f._parseSync({
1997
+ }, y = f._parseSync({
1992
1998
  data: t.data,
1993
1999
  path: t.path,
1994
2000
  parent: h
1995
2001
  });
1996
- if (v.status === "valid")
1997
- return v;
1998
- v.status === "dirty" && !n && (n = { result: v, ctx: h }), h.common.issues.length && i.push(h.common.issues);
2002
+ if (y.status === "valid")
2003
+ return y;
2004
+ y.status === "dirty" && !n && (n = { result: y, ctx: h }), h.common.issues.length && i.push(h.common.issues);
1999
2005
  }
2000
2006
  if (n)
2001
2007
  return t.common.issues.push(...n.ctx.common.issues), n.result;
2002
- const o = i.map((f) => new T(f));
2008
+ const d = i.map((f) => new O(f));
2003
2009
  return c(t, {
2004
- code: d.invalid_union,
2005
- unionErrors: o
2010
+ code: o.invalid_union,
2011
+ unionErrors: d
2006
2012
  }), m;
2007
2013
  }
2008
2014
  }
@@ -2010,22 +2016,22 @@ class F extends g {
2010
2016
  return this._def.options;
2011
2017
  }
2012
2018
  }
2013
- F.create = (s, e) => new F({
2019
+ q.create = (s, e) => new q({
2014
2020
  options: s,
2015
2021
  typeName: p.ZodUnion,
2016
- ..._(e)
2022
+ ...g(e)
2017
2023
  });
2018
- function X(s, e) {
2019
- const t = C(s), r = C(e);
2024
+ function Q(s, e) {
2025
+ const t = N(s), r = N(e);
2020
2026
  if (s === e)
2021
2027
  return { valid: !0, data: s };
2022
2028
  if (t === u.object && r === u.object) {
2023
- const a = y.objectKeys(e), n = y.objectKeys(s).filter((o) => a.indexOf(o) !== -1), i = { ...s, ...e };
2024
- for (const o of n) {
2025
- const f = X(s[o], e[o]);
2029
+ const a = x.objectKeys(e), n = x.objectKeys(s).filter((d) => a.indexOf(d) !== -1), i = { ...s, ...e };
2030
+ for (const d of n) {
2031
+ const f = Q(s[d], e[d]);
2026
2032
  if (!f.valid)
2027
2033
  return { valid: !1 };
2028
- i[o] = f.data;
2034
+ i[d] = f.data;
2029
2035
  }
2030
2036
  return { valid: !0, data: i };
2031
2037
  } else if (t === u.array && r === u.array) {
@@ -2033,7 +2039,7 @@ function X(s, e) {
2033
2039
  return { valid: !1 };
2034
2040
  const a = [];
2035
2041
  for (let n = 0; n < s.length; n++) {
2036
- const i = s[n], o = e[n], f = X(i, o);
2042
+ const i = s[n], d = e[n], f = Q(i, d);
2037
2043
  if (!f.valid)
2038
2044
  return { valid: !1 };
2039
2045
  a.push(f.data);
@@ -2041,14 +2047,14 @@ function X(s, e) {
2041
2047
  return { valid: !0, data: a };
2042
2048
  } else return t === u.date && r === u.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
2043
2049
  }
2044
- class W extends g {
2050
+ class G extends v {
2045
2051
  _parse(e) {
2046
2052
  const { status: t, ctx: r } = this._processInputParams(e), a = (n, i) => {
2047
- if (se(n) || se(i))
2053
+ if (ae(n) || ae(i))
2048
2054
  return m;
2049
- const o = X(n.value, i.value);
2050
- return o.valid ? ((re(n) || re(i)) && t.dirty(), { status: t.value, value: o.data }) : (c(r, {
2051
- code: d.invalid_intersection_types
2055
+ const d = Q(n.value, i.value);
2056
+ return d.valid ? ((ne(n) || ne(i)) && t.dirty(), { status: t.value, value: d.data }) : (c(r, {
2057
+ code: o.invalid_intersection_types
2052
2058
  }), m);
2053
2059
  };
2054
2060
  return r.common.async ? Promise.all([
@@ -2073,63 +2079,63 @@ class W extends g {
2073
2079
  }));
2074
2080
  }
2075
2081
  }
2076
- W.create = (s, e, t) => new W({
2082
+ G.create = (s, e, t) => new G({
2077
2083
  left: s,
2078
2084
  right: e,
2079
2085
  typeName: p.ZodIntersection,
2080
- ..._(t)
2086
+ ...g(t)
2081
2087
  });
2082
- class E extends g {
2088
+ class j extends v {
2083
2089
  _parse(e) {
2084
2090
  const { status: t, ctx: r } = this._processInputParams(e);
2085
2091
  if (r.parsedType !== u.array)
2086
2092
  return c(r, {
2087
- code: d.invalid_type,
2093
+ code: o.invalid_type,
2088
2094
  expected: u.array,
2089
2095
  received: r.parsedType
2090
2096
  }), m;
2091
2097
  if (r.data.length < this._def.items.length)
2092
2098
  return c(r, {
2093
- code: d.too_small,
2099
+ code: o.too_small,
2094
2100
  minimum: this._def.items.length,
2095
2101
  inclusive: !0,
2096
2102
  exact: !1,
2097
2103
  type: "array"
2098
2104
  }), m;
2099
2105
  !this._def.rest && r.data.length > this._def.items.length && (c(r, {
2100
- code: d.too_big,
2106
+ code: o.too_big,
2101
2107
  maximum: this._def.items.length,
2102
2108
  inclusive: !0,
2103
2109
  exact: !1,
2104
2110
  type: "array"
2105
2111
  }), t.dirty());
2106
- const n = [...r.data].map((i, o) => {
2107
- const f = this._def.items[o] || this._def.rest;
2108
- return f ? f._parse(new N(r, i, r.path, o)) : null;
2112
+ const n = [...r.data].map((i, d) => {
2113
+ const f = this._def.items[d] || this._def.rest;
2114
+ return f ? f._parse(new E(r, i, r.path, d)) : null;
2109
2115
  }).filter((i) => !!i);
2110
- return r.common.async ? Promise.all(n).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, n);
2116
+ return r.common.async ? Promise.all(n).then((i) => b.mergeArray(t, i)) : b.mergeArray(t, n);
2111
2117
  }
2112
2118
  get items() {
2113
2119
  return this._def.items;
2114
2120
  }
2115
2121
  rest(e) {
2116
- return new E({
2122
+ return new j({
2117
2123
  ...this._def,
2118
2124
  rest: e
2119
2125
  });
2120
2126
  }
2121
2127
  }
2122
- E.create = (s, e) => {
2128
+ j.create = (s, e) => {
2123
2129
  if (!Array.isArray(s))
2124
2130
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2125
- return new E({
2131
+ return new j({
2126
2132
  items: s,
2127
2133
  typeName: p.ZodTuple,
2128
2134
  rest: null,
2129
- ..._(e)
2135
+ ...g(e)
2130
2136
  });
2131
2137
  };
2132
- class le extends g {
2138
+ class he extends v {
2133
2139
  get keySchema() {
2134
2140
  return this._def.keyType;
2135
2141
  }
@@ -2140,62 +2146,62 @@ class le extends g {
2140
2146
  const { status: t, ctx: r } = this._processInputParams(e);
2141
2147
  if (r.parsedType !== u.map)
2142
2148
  return c(r, {
2143
- code: d.invalid_type,
2149
+ code: o.invalid_type,
2144
2150
  expected: u.map,
2145
2151
  received: r.parsedType
2146
2152
  }), m;
2147
- const a = this._def.keyType, n = this._def.valueType, i = [...r.data.entries()].map(([o, f], h) => ({
2148
- key: a._parse(new N(r, o, r.path, [h, "key"])),
2149
- value: n._parse(new N(r, f, r.path, [h, "value"]))
2153
+ const a = this._def.keyType, n = this._def.valueType, i = [...r.data.entries()].map(([d, f], h) => ({
2154
+ key: a._parse(new E(r, d, r.path, [h, "key"])),
2155
+ value: n._parse(new E(r, f, r.path, [h, "value"]))
2150
2156
  }));
2151
2157
  if (r.common.async) {
2152
- const o = /* @__PURE__ */ new Map();
2158
+ const d = /* @__PURE__ */ new Map();
2153
2159
  return Promise.resolve().then(async () => {
2154
2160
  for (const f of i) {
2155
- const h = await f.key, v = await f.value;
2156
- if (h.status === "aborted" || v.status === "aborted")
2161
+ const h = await f.key, y = await f.value;
2162
+ if (h.status === "aborted" || y.status === "aborted")
2157
2163
  return m;
2158
- (h.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(h.value, v.value);
2164
+ (h.status === "dirty" || y.status === "dirty") && t.dirty(), d.set(h.value, y.value);
2159
2165
  }
2160
- return { status: t.value, value: o };
2166
+ return { status: t.value, value: d };
2161
2167
  });
2162
2168
  } else {
2163
- const o = /* @__PURE__ */ new Map();
2169
+ const d = /* @__PURE__ */ new Map();
2164
2170
  for (const f of i) {
2165
- const h = f.key, v = f.value;
2166
- if (h.status === "aborted" || v.status === "aborted")
2171
+ const h = f.key, y = f.value;
2172
+ if (h.status === "aborted" || y.status === "aborted")
2167
2173
  return m;
2168
- (h.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(h.value, v.value);
2174
+ (h.status === "dirty" || y.status === "dirty") && t.dirty(), d.set(h.value, y.value);
2169
2175
  }
2170
- return { status: t.value, value: o };
2176
+ return { status: t.value, value: d };
2171
2177
  }
2172
2178
  }
2173
2179
  }
2174
- le.create = (s, e, t) => new le({
2180
+ he.create = (s, e, t) => new he({
2175
2181
  valueType: e,
2176
2182
  keyType: s,
2177
2183
  typeName: p.ZodMap,
2178
- ..._(t)
2184
+ ...g(t)
2179
2185
  });
2180
- class D extends g {
2186
+ class B extends v {
2181
2187
  _parse(e) {
2182
2188
  const { status: t, ctx: r } = this._processInputParams(e);
2183
2189
  if (r.parsedType !== u.set)
2184
2190
  return c(r, {
2185
- code: d.invalid_type,
2191
+ code: o.invalid_type,
2186
2192
  expected: u.set,
2187
2193
  received: r.parsedType
2188
2194
  }), m;
2189
2195
  const a = this._def;
2190
2196
  a.minSize !== null && r.data.size < a.minSize.value && (c(r, {
2191
- code: d.too_small,
2197
+ code: o.too_small,
2192
2198
  minimum: a.minSize.value,
2193
2199
  type: "set",
2194
2200
  inclusive: !0,
2195
2201
  exact: !1,
2196
2202
  message: a.minSize.message
2197
2203
  }), t.dirty()), a.maxSize !== null && r.data.size > a.maxSize.value && (c(r, {
2198
- code: d.too_big,
2204
+ code: o.too_big,
2199
2205
  maximum: a.maxSize.value,
2200
2206
  type: "set",
2201
2207
  inclusive: !0,
@@ -2205,24 +2211,24 @@ class D extends g {
2205
2211
  const n = this._def.valueType;
2206
2212
  function i(f) {
2207
2213
  const h = /* @__PURE__ */ new Set();
2208
- for (const v of f) {
2209
- if (v.status === "aborted")
2214
+ for (const y of f) {
2215
+ if (y.status === "aborted")
2210
2216
  return m;
2211
- v.status === "dirty" && t.dirty(), h.add(v.value);
2217
+ y.status === "dirty" && t.dirty(), h.add(y.value);
2212
2218
  }
2213
2219
  return { status: t.value, value: h };
2214
2220
  }
2215
- const o = [...r.data.values()].map((f, h) => n._parse(new N(r, f, r.path, h)));
2216
- return r.common.async ? Promise.all(o).then((f) => i(f)) : i(o);
2221
+ const d = [...r.data.values()].map((f, h) => n._parse(new E(r, f, r.path, h)));
2222
+ return r.common.async ? Promise.all(d).then((f) => i(f)) : i(d);
2217
2223
  }
2218
2224
  min(e, t) {
2219
- return new D({
2225
+ return new B({
2220
2226
  ...this._def,
2221
2227
  minSize: { value: e, message: l.toString(t) }
2222
2228
  });
2223
2229
  }
2224
2230
  max(e, t) {
2225
- return new D({
2231
+ return new B({
2226
2232
  ...this._def,
2227
2233
  maxSize: { value: e, message: l.toString(t) }
2228
2234
  });
@@ -2234,14 +2240,14 @@ class D extends g {
2234
2240
  return this.min(1, e);
2235
2241
  }
2236
2242
  }
2237
- D.create = (s, e) => new D({
2243
+ B.create = (s, e) => new B({
2238
2244
  valueType: s,
2239
2245
  minSize: null,
2240
2246
  maxSize: null,
2241
2247
  typeName: p.ZodSet,
2242
- ..._(e)
2248
+ ...g(e)
2243
2249
  });
2244
- class fe extends g {
2250
+ class me extends v {
2245
2251
  get schema() {
2246
2252
  return this._def.getter();
2247
2253
  }
@@ -2250,18 +2256,18 @@ class fe extends g {
2250
2256
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2251
2257
  }
2252
2258
  }
2253
- fe.create = (s, e) => new fe({
2259
+ me.create = (s, e) => new me({
2254
2260
  getter: s,
2255
2261
  typeName: p.ZodLazy,
2256
- ..._(e)
2262
+ ...g(e)
2257
2263
  });
2258
- class he extends g {
2264
+ class pe extends v {
2259
2265
  _parse(e) {
2260
2266
  if (e.data !== this._def.value) {
2261
2267
  const t = this._getOrReturnCtx(e);
2262
2268
  return c(t, {
2263
2269
  received: t.data,
2264
- code: d.invalid_literal,
2270
+ code: o.invalid_literal,
2265
2271
  expected: this._def.value
2266
2272
  }), m;
2267
2273
  }
@@ -2271,37 +2277,37 @@ class he extends g {
2271
2277
  return this._def.value;
2272
2278
  }
2273
2279
  }
2274
- he.create = (s, e) => new he({
2280
+ pe.create = (s, e) => new pe({
2275
2281
  value: s,
2276
2282
  typeName: p.ZodLiteral,
2277
- ..._(e)
2283
+ ...g(e)
2278
2284
  });
2279
- function ke(s, e) {
2280
- return new $({
2285
+ function we(s, e) {
2286
+ return new V({
2281
2287
  values: s,
2282
2288
  typeName: p.ZodEnum,
2283
- ..._(e)
2289
+ ...g(e)
2284
2290
  });
2285
2291
  }
2286
- class $ extends g {
2292
+ class V extends v {
2287
2293
  _parse(e) {
2288
2294
  if (typeof e.data != "string") {
2289
2295
  const t = this._getOrReturnCtx(e), r = this._def.values;
2290
2296
  return c(t, {
2291
- expected: y.joinValues(r),
2297
+ expected: x.joinValues(r),
2292
2298
  received: t.parsedType,
2293
- code: d.invalid_type
2299
+ code: o.invalid_type
2294
2300
  }), m;
2295
2301
  }
2296
2302
  if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
2297
2303
  const t = this._getOrReturnCtx(e), r = this._def.values;
2298
2304
  return c(t, {
2299
2305
  received: t.data,
2300
- code: d.invalid_enum_value,
2306
+ code: o.invalid_enum_value,
2301
2307
  options: r
2302
2308
  }), m;
2303
2309
  }
2304
- return b(e.data);
2310
+ return w(e.data);
2305
2311
  }
2306
2312
  get options() {
2307
2313
  return this._def.values;
@@ -2325,50 +2331,50 @@ class $ extends g {
2325
2331
  return e;
2326
2332
  }
2327
2333
  extract(e, t = this._def) {
2328
- return $.create(e, {
2334
+ return V.create(e, {
2329
2335
  ...this._def,
2330
2336
  ...t
2331
2337
  });
2332
2338
  }
2333
2339
  exclude(e, t = this._def) {
2334
- return $.create(this.options.filter((r) => !e.includes(r)), {
2340
+ return V.create(this.options.filter((r) => !e.includes(r)), {
2335
2341
  ...this._def,
2336
2342
  ...t
2337
2343
  });
2338
2344
  }
2339
2345
  }
2340
- $.create = ke;
2341
- class me extends g {
2346
+ V.create = we;
2347
+ class _e extends v {
2342
2348
  _parse(e) {
2343
- const t = y.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2349
+ const t = x.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2344
2350
  if (r.parsedType !== u.string && r.parsedType !== u.number) {
2345
- const a = y.objectValues(t);
2351
+ const a = x.objectValues(t);
2346
2352
  return c(r, {
2347
- expected: y.joinValues(a),
2353
+ expected: x.joinValues(a),
2348
2354
  received: r.parsedType,
2349
- code: d.invalid_type
2355
+ code: o.invalid_type
2350
2356
  }), m;
2351
2357
  }
2352
- if (this._cache || (this._cache = new Set(y.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2353
- const a = y.objectValues(t);
2358
+ if (this._cache || (this._cache = new Set(x.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2359
+ const a = x.objectValues(t);
2354
2360
  return c(r, {
2355
2361
  received: r.data,
2356
- code: d.invalid_enum_value,
2362
+ code: o.invalid_enum_value,
2357
2363
  options: a
2358
2364
  }), m;
2359
2365
  }
2360
- return b(e.data);
2366
+ return w(e.data);
2361
2367
  }
2362
2368
  get enum() {
2363
2369
  return this._def.values;
2364
2370
  }
2365
2371
  }
2366
- me.create = (s, e) => new me({
2372
+ _e.create = (s, e) => new _e({
2367
2373
  values: s,
2368
2374
  typeName: p.ZodNativeEnum,
2369
- ..._(e)
2375
+ ...g(e)
2370
2376
  });
2371
- class q extends g {
2377
+ class J extends v {
2372
2378
  unwrap() {
2373
2379
  return this._def.type;
2374
2380
  }
@@ -2376,23 +2382,23 @@ class q extends g {
2376
2382
  const { ctx: t } = this._processInputParams(e);
2377
2383
  if (t.parsedType !== u.promise && t.common.async === !1)
2378
2384
  return c(t, {
2379
- code: d.invalid_type,
2385
+ code: o.invalid_type,
2380
2386
  expected: u.promise,
2381
2387
  received: t.parsedType
2382
2388
  }), m;
2383
2389
  const r = t.parsedType === u.promise ? t.data : Promise.resolve(t.data);
2384
- return b(r.then((a) => this._def.type.parseAsync(a, {
2390
+ return w(r.then((a) => this._def.type.parseAsync(a, {
2385
2391
  path: t.path,
2386
2392
  errorMap: t.common.contextualErrorMap
2387
2393
  })));
2388
2394
  }
2389
2395
  }
2390
- q.create = (s, e) => new q({
2396
+ J.create = (s, e) => new J({
2391
2397
  type: s,
2392
2398
  typeName: p.ZodPromise,
2393
- ..._(e)
2399
+ ...g(e)
2394
2400
  });
2395
- class L extends g {
2401
+ class P extends v {
2396
2402
  innerType() {
2397
2403
  return this._def.schema;
2398
2404
  }
@@ -2411,45 +2417,45 @@ class L extends g {
2411
2417
  if (n.addIssue = n.addIssue.bind(n), a.type === "preprocess") {
2412
2418
  const i = a.transform(r.data, n);
2413
2419
  if (r.common.async)
2414
- return Promise.resolve(i).then(async (o) => {
2420
+ return Promise.resolve(i).then(async (d) => {
2415
2421
  if (t.value === "aborted")
2416
2422
  return m;
2417
2423
  const f = await this._def.schema._parseAsync({
2418
- data: o,
2424
+ data: d,
2419
2425
  path: r.path,
2420
2426
  parent: r
2421
2427
  });
2422
- return f.status === "aborted" ? m : f.status === "dirty" || t.value === "dirty" ? P(f.value) : f;
2428
+ return f.status === "aborted" ? m : f.status === "dirty" || t.value === "dirty" ? D(f.value) : f;
2423
2429
  });
2424
2430
  {
2425
2431
  if (t.value === "aborted")
2426
2432
  return m;
2427
- const o = this._def.schema._parseSync({
2433
+ const d = this._def.schema._parseSync({
2428
2434
  data: i,
2429
2435
  path: r.path,
2430
2436
  parent: r
2431
2437
  });
2432
- return o.status === "aborted" ? m : o.status === "dirty" || t.value === "dirty" ? P(o.value) : o;
2438
+ return d.status === "aborted" ? m : d.status === "dirty" || t.value === "dirty" ? D(d.value) : d;
2433
2439
  }
2434
2440
  }
2435
2441
  if (a.type === "refinement") {
2436
- const i = (o) => {
2437
- const f = a.refinement(o, n);
2442
+ const i = (d) => {
2443
+ const f = a.refinement(d, n);
2438
2444
  if (r.common.async)
2439
2445
  return Promise.resolve(f);
2440
2446
  if (f instanceof Promise)
2441
2447
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2442
- return o;
2448
+ return d;
2443
2449
  };
2444
2450
  if (r.common.async === !1) {
2445
- const o = this._def.schema._parseSync({
2451
+ const d = this._def.schema._parseSync({
2446
2452
  data: r.data,
2447
2453
  path: r.path,
2448
2454
  parent: r
2449
2455
  });
2450
- return o.status === "aborted" ? m : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
2456
+ return d.status === "aborted" ? m : (d.status === "dirty" && t.dirty(), i(d.value), { status: t.value, value: d.value });
2451
2457
  } else
2452
- return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => o.status === "aborted" ? m : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
2458
+ return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((d) => d.status === "aborted" ? m : (d.status === "dirty" && t.dirty(), i(d.value).then(() => ({ status: t.value, value: d.value }))));
2453
2459
  }
2454
2460
  if (a.type === "transform")
2455
2461
  if (r.common.async === !1) {
@@ -2458,59 +2464,59 @@ class L extends g {
2458
2464
  path: r.path,
2459
2465
  parent: r
2460
2466
  });
2461
- if (!I(i))
2467
+ if (!L(i))
2462
2468
  return m;
2463
- const o = a.transform(i.value, n);
2464
- if (o instanceof Promise)
2469
+ const d = a.transform(i.value, n);
2470
+ if (d instanceof Promise)
2465
2471
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2466
- return { status: t.value, value: o };
2472
+ return { status: t.value, value: d };
2467
2473
  } else
2468
- return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((i) => I(i) ? Promise.resolve(a.transform(i.value, n)).then((o) => ({
2474
+ return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((i) => L(i) ? Promise.resolve(a.transform(i.value, n)).then((d) => ({
2469
2475
  status: t.value,
2470
- value: o
2476
+ value: d
2471
2477
  })) : m);
2472
- y.assertNever(a);
2478
+ x.assertNever(a);
2473
2479
  }
2474
2480
  }
2475
- L.create = (s, e, t) => new L({
2481
+ P.create = (s, e, t) => new P({
2476
2482
  schema: s,
2477
2483
  typeName: p.ZodEffects,
2478
2484
  effect: e,
2479
- ..._(t)
2485
+ ...g(t)
2480
2486
  });
2481
- L.createWithPreprocess = (s, e, t) => new L({
2487
+ P.createWithPreprocess = (s, e, t) => new P({
2482
2488
  schema: e,
2483
2489
  effect: { type: "preprocess", transform: s },
2484
2490
  typeName: p.ZodEffects,
2485
- ..._(t)
2491
+ ...g(t)
2486
2492
  });
2487
- class S extends g {
2493
+ class R extends v {
2488
2494
  _parse(e) {
2489
- return this._getType(e) === u.undefined ? b(void 0) : this._def.innerType._parse(e);
2495
+ return this._getType(e) === u.undefined ? w(void 0) : this._def.innerType._parse(e);
2490
2496
  }
2491
2497
  unwrap() {
2492
2498
  return this._def.innerType;
2493
2499
  }
2494
2500
  }
2495
- S.create = (s, e) => new S({
2501
+ R.create = (s, e) => new R({
2496
2502
  innerType: s,
2497
2503
  typeName: p.ZodOptional,
2498
- ..._(e)
2504
+ ...g(e)
2499
2505
  });
2500
- class M extends g {
2506
+ class z extends v {
2501
2507
  _parse(e) {
2502
- return this._getType(e) === u.null ? b(null) : this._def.innerType._parse(e);
2508
+ return this._getType(e) === u.null ? w(null) : this._def.innerType._parse(e);
2503
2509
  }
2504
2510
  unwrap() {
2505
2511
  return this._def.innerType;
2506
2512
  }
2507
2513
  }
2508
- M.create = (s, e) => new M({
2514
+ z.create = (s, e) => new z({
2509
2515
  innerType: s,
2510
2516
  typeName: p.ZodNullable,
2511
- ..._(e)
2517
+ ...g(e)
2512
2518
  });
2513
- class Y extends g {
2519
+ class K extends v {
2514
2520
  _parse(e) {
2515
2521
  const { ctx: t } = this._processInputParams(e);
2516
2522
  let r = t.data;
@@ -2524,13 +2530,13 @@ class Y extends g {
2524
2530
  return this._def.innerType;
2525
2531
  }
2526
2532
  }
2527
- Y.create = (s, e) => new Y({
2533
+ K.create = (s, e) => new K({
2528
2534
  innerType: s,
2529
2535
  typeName: p.ZodDefault,
2530
2536
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2531
- ..._(e)
2537
+ ...g(e)
2532
2538
  });
2533
- class Q extends g {
2539
+ class ee extends v {
2534
2540
  _parse(e) {
2535
2541
  const { ctx: t } = this._processInputParams(e), r = {
2536
2542
  ...t,
@@ -2545,11 +2551,11 @@ class Q extends g {
2545
2551
  ...r
2546
2552
  }
2547
2553
  });
2548
- return U(a) ? a.then((n) => ({
2554
+ return F(a) ? a.then((n) => ({
2549
2555
  status: "valid",
2550
2556
  value: n.status === "valid" ? n.value : this._def.catchValue({
2551
2557
  get error() {
2552
- return new T(r.common.issues);
2558
+ return new O(r.common.issues);
2553
2559
  },
2554
2560
  input: r.data
2555
2561
  })
@@ -2557,7 +2563,7 @@ class Q extends g {
2557
2563
  status: "valid",
2558
2564
  value: a.status === "valid" ? a.value : this._def.catchValue({
2559
2565
  get error() {
2560
- return new T(r.common.issues);
2566
+ return new O(r.common.issues);
2561
2567
  },
2562
2568
  input: r.data
2563
2569
  })
@@ -2567,18 +2573,18 @@ class Q extends g {
2567
2573
  return this._def.innerType;
2568
2574
  }
2569
2575
  }
2570
- Q.create = (s, e) => new Q({
2576
+ ee.create = (s, e) => new ee({
2571
2577
  innerType: s,
2572
2578
  typeName: p.ZodCatch,
2573
2579
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2574
- ..._(e)
2580
+ ...g(e)
2575
2581
  });
2576
- class pe extends g {
2582
+ class ge extends v {
2577
2583
  _parse(e) {
2578
2584
  if (this._getType(e) !== u.nan) {
2579
2585
  const r = this._getOrReturnCtx(e);
2580
2586
  return c(r, {
2581
- code: d.invalid_type,
2587
+ code: o.invalid_type,
2582
2588
  expected: u.nan,
2583
2589
  received: r.parsedType
2584
2590
  }), m;
@@ -2586,11 +2592,11 @@ class pe extends g {
2586
2592
  return { status: "valid", value: e.data };
2587
2593
  }
2588
2594
  }
2589
- pe.create = (s) => new pe({
2595
+ ge.create = (s) => new ge({
2590
2596
  typeName: p.ZodNaN,
2591
- ..._(s)
2597
+ ...g(s)
2592
2598
  });
2593
- class He extends g {
2599
+ class Ke extends v {
2594
2600
  _parse(e) {
2595
2601
  const { ctx: t } = this._processInputParams(e), r = t.data;
2596
2602
  return this._def.type._parse({
@@ -2603,7 +2609,7 @@ class He extends g {
2603
2609
  return this._def.type;
2604
2610
  }
2605
2611
  }
2606
- class ee extends g {
2612
+ class se extends v {
2607
2613
  _parse(e) {
2608
2614
  const { status: t, ctx: r } = this._processInputParams(e);
2609
2615
  if (r.common.async)
@@ -2613,7 +2619,7 @@ class ee extends g {
2613
2619
  path: r.path,
2614
2620
  parent: r
2615
2621
  });
2616
- return n.status === "aborted" ? m : n.status === "dirty" ? (t.dirty(), P(n.value)) : this._def.out._parseAsync({
2622
+ return n.status === "aborted" ? m : n.status === "dirty" ? (t.dirty(), D(n.value)) : this._def.out._parseAsync({
2617
2623
  data: n.value,
2618
2624
  path: r.path,
2619
2625
  parent: r
@@ -2636,112 +2642,124 @@ class ee extends g {
2636
2642
  }
2637
2643
  }
2638
2644
  static create(e, t) {
2639
- return new ee({
2645
+ return new se({
2640
2646
  in: e,
2641
2647
  out: t,
2642
2648
  typeName: p.ZodPipeline
2643
2649
  });
2644
2650
  }
2645
2651
  }
2646
- class K extends g {
2652
+ class te extends v {
2647
2653
  _parse(e) {
2648
- const t = this._def.innerType._parse(e), r = (a) => (I(a) && (a.value = Object.freeze(a.value)), a);
2649
- return U(t) ? t.then((a) => r(a)) : r(t);
2654
+ const t = this._def.innerType._parse(e), r = (a) => (L(a) && (a.value = Object.freeze(a.value)), a);
2655
+ return F(t) ? t.then((a) => r(a)) : r(t);
2650
2656
  }
2651
2657
  unwrap() {
2652
2658
  return this._def.innerType;
2653
2659
  }
2654
2660
  }
2655
- K.create = (s, e) => new K({
2661
+ te.create = (s, e) => new te({
2656
2662
  innerType: s,
2657
2663
  typeName: p.ZodReadonly,
2658
- ..._(e)
2664
+ ...g(e)
2659
2665
  });
2660
2666
  var p;
2661
2667
  (function(s) {
2662
2668
  s.ZodString = "ZodString", s.ZodNumber = "ZodNumber", s.ZodNaN = "ZodNaN", s.ZodBigInt = "ZodBigInt", s.ZodBoolean = "ZodBoolean", s.ZodDate = "ZodDate", s.ZodSymbol = "ZodSymbol", s.ZodUndefined = "ZodUndefined", s.ZodNull = "ZodNull", s.ZodAny = "ZodAny", s.ZodUnknown = "ZodUnknown", s.ZodNever = "ZodNever", s.ZodVoid = "ZodVoid", s.ZodArray = "ZodArray", s.ZodObject = "ZodObject", s.ZodUnion = "ZodUnion", s.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", s.ZodIntersection = "ZodIntersection", s.ZodTuple = "ZodTuple", s.ZodRecord = "ZodRecord", s.ZodMap = "ZodMap", s.ZodSet = "ZodSet", s.ZodFunction = "ZodFunction", s.ZodLazy = "ZodLazy", s.ZodLiteral = "ZodLiteral", s.ZodEnum = "ZodEnum", s.ZodEffects = "ZodEffects", s.ZodNativeEnum = "ZodNativeEnum", s.ZodOptional = "ZodOptional", s.ZodNullable = "ZodNullable", s.ZodDefault = "ZodDefault", s.ZodCatch = "ZodCatch", s.ZodPromise = "ZodPromise", s.ZodBranded = "ZodBranded", s.ZodPipeline = "ZodPipeline", s.ZodReadonly = "ZodReadonly";
2663
2669
  })(p || (p = {}));
2664
- const _e = O.create, Xe = j.create, ge = H.create;
2665
- A.create;
2666
- w.create;
2667
- const ye = x.create;
2668
- F.create;
2669
- W.create;
2670
- E.create;
2671
- const Ye = $.create;
2670
+ const ye = A.create, et = M.create, ve = Y.create;
2671
+ Z.create;
2672
+ C.create;
2673
+ const xe = k.create;
2672
2674
  q.create;
2673
- S.create;
2674
- M.create;
2675
- const Ke = ye({
2676
- name: _e(),
2677
- selector: _e(),
2678
- findBy: Ye(["cssSelector", "xpath"]),
2679
- option: ye({
2680
- waitForSelector: ge().optional(),
2681
- waitSelectorTimeout: Xe().optional(),
2682
- multiple: ge().optional()
2675
+ G.create;
2676
+ j.create;
2677
+ const tt = V.create;
2678
+ J.create;
2679
+ R.create;
2680
+ z.create;
2681
+ const at = xe({
2682
+ name: ye(),
2683
+ selector: ye(),
2684
+ findBy: tt(["cssSelector", "xpath"]),
2685
+ option: xe({
2686
+ waitForSelector: ve().optional(),
2687
+ waitSelectorTimeout: et().optional(),
2688
+ multiple: ve().optional()
2683
2689
  })
2684
2690
  });
2685
- class et {
2686
- expr;
2687
- json;
2691
+ class nt {
2692
+ constructor() {
2693
+ _(this, "expr");
2694
+ _(this, "json");
2695
+ }
2688
2696
  }
2689
- class tt {
2690
- template;
2691
- valueFrom;
2692
- default;
2697
+ class it {
2698
+ constructor() {
2699
+ _(this, "template");
2700
+ _(this, "valueFrom");
2701
+ _(this, "default");
2702
+ }
2693
2703
  }
2694
- class st {
2695
- id;
2696
- title;
2697
- when;
2698
- block;
2699
- // BlockBase 호환. 바인딩은 런타임에서 해석
2700
- repeat;
2701
- // 반복 설정 (forEach 또는 count)`
2702
- next;
2703
- onSuccess;
2704
- onFailure;
2705
- switch;
2706
- timeoutMs;
2707
- retry;
2708
- delayAfterMs;
2709
- setVars;
2704
+ class dt {
2705
+ constructor() {
2706
+ _(this, "id");
2707
+ _(this, "title");
2708
+ _(this, "when");
2709
+ _(this, "block");
2710
+ // BlockBase 호환. 바인딩은 런타임에서 해석
2711
+ _(this, "repeat");
2712
+ // 반복 설정 (forEach 또는 count)`
2713
+ _(this, "next");
2714
+ _(this, "onSuccess");
2715
+ _(this, "onFailure");
2716
+ _(this, "switch");
2717
+ _(this, "timeoutMs");
2718
+ _(this, "retry");
2719
+ _(this, "delayAfterMs");
2720
+ _(this, "setVars");
2721
+ }
2710
2722
  }
2711
- class rt {
2712
- version;
2713
- id;
2714
- title;
2715
- description;
2716
- start;
2717
- steps;
2718
- defaultDelayMs;
2723
+ class ot {
2724
+ constructor() {
2725
+ _(this, "version");
2726
+ _(this, "id");
2727
+ _(this, "title");
2728
+ _(this, "description");
2729
+ _(this, "start");
2730
+ _(this, "steps");
2731
+ _(this, "defaultDelayMs");
2732
+ }
2719
2733
  }
2720
- class at {
2721
- stepId;
2722
- skipped;
2723
- success;
2724
- message;
2725
- result;
2726
- startedAt;
2727
- finishedAt;
2728
- attempts;
2734
+ class ct {
2735
+ constructor() {
2736
+ _(this, "stepId");
2737
+ _(this, "skipped");
2738
+ _(this, "success");
2739
+ _(this, "message");
2740
+ _(this, "result");
2741
+ _(this, "startedAt");
2742
+ _(this, "finishedAt");
2743
+ _(this, "attempts");
2744
+ }
2729
2745
  }
2730
- class nt {
2731
- success;
2732
- steps;
2733
- targetUrl;
2734
- timestamp;
2735
- error;
2746
+ class ut {
2747
+ constructor() {
2748
+ _(this, "success");
2749
+ _(this, "steps");
2750
+ _(this, "targetUrl");
2751
+ _(this, "timestamp");
2752
+ _(this, "error");
2753
+ }
2736
2754
  }
2737
2755
  export {
2738
- Ke as BaseBlockSchema,
2739
- tt as Binding,
2740
- nt as CollectWorkflowResult,
2741
- et as Condition,
2742
- Qe as EightGClient,
2743
- R as EightGError,
2744
- rt as Workflow,
2745
- st as WorkflowStep,
2746
- at as WorkflowStepRunResult
2756
+ at as BaseBlockSchema,
2757
+ it as Binding,
2758
+ ut as CollectWorkflowResult,
2759
+ nt as Condition,
2760
+ rt as EightGClient,
2761
+ I as EightGError,
2762
+ ot as Workflow,
2763
+ dt as WorkflowStep,
2764
+ ct as WorkflowStepRunResult
2747
2765
  };