@oneclick.dev/cms-core-modules 0.0.124 → 0.0.126

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 (149) hide show
  1. package/dist/AppointmentListTable-CWzbwqR-.js +1 -0
  2. package/dist/AppointmentListTable-DoZuBstk.mjs +270 -0
  3. package/dist/ContentEditor-BlNbqkAz.js +324 -0
  4. package/dist/{ContentEditor-DX1bTQKs.mjs → ContentEditor-D754iLJS.mjs} +8074 -27026
  5. package/dist/{Detail-B7pe808q.mjs → Detail-BOxWQ1QQ.mjs} +2 -2
  6. package/dist/{Detail-B_Q7Qkuz.mjs → Detail-BfKW0uZE.mjs} +2 -2
  7. package/dist/Detail-DFVu2F38.mjs +11 -0
  8. package/dist/{Detail-t3tOcy3X.js → Detail-DJea_fCd.js} +1 -1
  9. package/dist/{Detail-CNiLIEh9.js → Detail-DPJacXfm.js} +1 -1
  10. package/dist/Detail-DSLZ7_bM.js +1 -0
  11. package/dist/{Detail-BESGmY7z.js → Detail-DUGThL9Y.js} +1 -1
  12. package/dist/{Detail-DNxAzeCs.mjs → Detail-D_LlEeHu.mjs} +2 -2
  13. package/dist/Overview-0hFXiuYo.js +1 -0
  14. package/dist/Overview-BTx5LF4J.js +1 -0
  15. package/dist/Overview-CCu2PHai.mjs +289 -0
  16. package/dist/Overview-D2u-leeO.js +1 -0
  17. package/dist/Overview-D_2wozCG.mjs +1733 -0
  18. package/dist/Overview-Dffo-zH4.mjs +11 -0
  19. package/dist/{TableCalculationWidget-CrqcLGfU.mjs → TableCalculationWidget-B_LFoOYm.mjs} +3 -3
  20. package/dist/{TableCalculationWidget-CkQPrVUd.js → TableCalculationWidget-CahOIcbk.js} +1 -1
  21. package/dist/TableDataWidget-BwqWFH4A.js +1 -0
  22. package/dist/TableDataWidget-RsVxcDsL.mjs +112 -0
  23. package/dist/TableOverviewCard-BPWCqo56.js +1 -0
  24. package/dist/{TableOverviewCard-Ci0d4o4w.mjs → TableOverviewCard-D667DDag.mjs} +113 -127
  25. package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C3XiOXgb.js +1 -0
  26. package/dist/TableResultView.vue_vue_type_script_setup_true_lang-sp0TLio0.mjs +547 -0
  27. package/dist/{TableRowActionCard-BhdnnPaq.mjs → TableRowActionCard-BPYJ-Kjy.mjs} +95 -101
  28. package/dist/TableRowActionCard-Bnqj1YIe.js +1 -0
  29. package/dist/TableView-CwhZ9YN2.js +4 -0
  30. package/dist/TableView-DX9PKS8N.mjs +9673 -0
  31. package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-BgDdzbLe.js +1 -0
  32. package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-D85V4nrQ.mjs +2886 -0
  33. package/dist/cms-core-modules.css +1 -1
  34. package/dist/dateRangePresets-CaPVagHY.mjs +453 -0
  35. package/dist/dateRangePresets-gxQCiZ6c.js +1 -0
  36. package/dist/index-6hZ6MYY6.js +1 -0
  37. package/dist/index-BVmmicu3.mjs +14 -0
  38. package/dist/index-ChHD_1Cf.js +144 -0
  39. package/dist/index-CvV4nVWI.js +1 -0
  40. package/dist/index-DH2z0W_w.mjs +19012 -0
  41. package/dist/index-DZKzj48V.mjs +17 -0
  42. package/dist/index.cjs.js +1 -1
  43. package/dist/index.mjs +237 -103
  44. package/dist/orders-C_sz8J9b.js +1 -0
  45. package/dist/{orders-BfTLIm7U.mjs → orders-Cgdggzvx.mjs} +84 -84
  46. package/dist/server-handlers.cjs.js +1 -1
  47. package/dist/server-handlers.mjs +2055 -1123
  48. package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +3 -0
  49. package/dist/src/appointments/index.d.ts +93 -3
  50. package/dist/src/appointments/reservation-summary.d.ts +48 -0
  51. package/dist/src/appointments/server.d.ts +1 -0
  52. package/dist/src/appointments/tools.d.ts +93 -3
  53. package/dist/src/filezone/config.d.ts +31 -0
  54. package/dist/src/filezone/index.d.ts +43 -0
  55. package/dist/src/filezone/index.vue.d.ts +2 -0
  56. package/dist/src/filezone/metadata.d.ts +2 -0
  57. package/dist/src/filezone/pages/Overview.vue.d.ts +4 -0
  58. package/dist/src/filezone/permissions.d.ts +5 -0
  59. package/dist/src/filezone/routes.d.ts +5 -0
  60. package/dist/src/filezone/server.d.ts +36 -0
  61. package/dist/src/index.d.ts +2 -0
  62. package/dist/src/mailTemplates/builder-types.d.ts +40 -0
  63. package/dist/src/mailTemplates/components/BlockRenderer.vue.d.ts +24 -0
  64. package/dist/src/mailTemplates/components/DesignPanel.vue.d.ts +13 -0
  65. package/dist/src/mailTemplates/components/EmailCanvas.vue.d.ts +44 -0
  66. package/dist/src/mailTemplates/components/RichTextEditor.vue.d.ts +10 -0
  67. package/dist/src/mailTemplates/components/RightSidebar.vue.d.ts +18 -0
  68. package/dist/src/mailTemplates/components/SettingsPanel.vue.d.ts +15 -0
  69. package/dist/src/mailTemplates/components/TemplateBuilder.vue.d.ts +2 -0
  70. package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +19 -1
  71. package/dist/src/mailTemplates/components/rich-text.d.ts +6 -0
  72. package/dist/src/mailTemplates/config.d.ts +10 -4
  73. package/dist/src/mailTemplates/defaults.d.ts +10 -0
  74. package/dist/src/mailTemplates/editor-state.d.ts +21 -0
  75. package/dist/src/mailTemplates/index.d.ts +11 -5
  76. package/dist/src/mailTemplates/index.vue.d.ts +2 -4
  77. package/dist/src/mailTemplates/metadata.d.ts +1 -1
  78. package/dist/src/mailTemplates/pages/Detail.vue.d.ts +1 -13
  79. package/dist/src/mailTemplates/pages/Overview.vue.d.ts +1 -13
  80. package/dist/src/mailTemplates/server.d.ts +23 -0
  81. package/dist/src/server-handlers.d.ts +4 -0
  82. package/dist/src/table/badge-filter-utils.d.ts +8 -0
  83. package/dist/src/table/chat-components/TableOverviewCard.vue.d.ts +2 -7
  84. package/dist/src/table/chat-components/TableResultView.vue.d.ts +3 -7
  85. package/dist/src/table/components/TableDisplayCell.vue.d.ts +8 -0
  86. package/dist/src/table/components/columns/BadgeColumnSettings.vue.d.ts +9 -0
  87. package/dist/src/table/components/columns/ColumnColorSelect.vue.d.ts +11 -0
  88. package/dist/src/table/components/columns/ColumnDisplaySettings.vue.d.ts +9 -0
  89. package/dist/src/table/components/columns/ColumnTypeSelect.vue.d.ts +11 -0
  90. package/dist/src/table/components/columns/ColumnValueSourceInput.vue.d.ts +15 -0
  91. package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +8 -11
  92. package/dist/src/table/components/columns/ProgressColumnSettings.vue.d.ts +8 -0
  93. package/dist/src/table/components/stats/StatDialog.vue.d.ts +6 -10
  94. package/dist/src/table/components/stats/Stats.vue.d.ts +9 -15
  95. package/dist/src/table/composables/useTableClock.d.ts +4 -0
  96. package/dist/src/table/display-utils.d.ts +35 -0
  97. package/dist/src/table/row-value.d.ts +1 -0
  98. package/dist/src/table/stat-utils.d.ts +9 -0
  99. package/dist/src/table/tool-utils.d.ts +1 -1
  100. package/dist/src/table/types.d.ts +54 -1
  101. package/dist/src/whatsappBusiness/analytics.d.ts +4 -0
  102. package/dist/src/whatsappBusiness/components/AccountPanel.vue.d.ts +2 -0
  103. package/dist/src/whatsappBusiness/components/InsightsPanel.vue.d.ts +5 -0
  104. package/dist/src/whatsappBusiness/components/TemplateDialog.vue.d.ts +14 -0
  105. package/dist/src/whatsappBusiness/components/TemplatesPanel.vue.d.ts +5 -0
  106. package/dist/src/whatsappBusiness/components/presentation.d.ts +4 -0
  107. package/dist/src/whatsappBusiness/config.d.ts +51 -0
  108. package/dist/src/whatsappBusiness/connection.d.ts +77 -0
  109. package/dist/src/whatsappBusiness/index.d.ts +63 -0
  110. package/dist/src/whatsappBusiness/index.vue.d.ts +5 -0
  111. package/dist/src/whatsappBusiness/metadata.d.ts +2 -0
  112. package/dist/src/whatsappBusiness/pages/Overview.vue.d.ts +2 -0
  113. package/dist/src/whatsappBusiness/permissions.d.ts +5 -0
  114. package/dist/src/whatsappBusiness/provider.d.ts +21 -0
  115. package/dist/src/whatsappBusiness/routes.d.ts +5 -0
  116. package/dist/src/whatsappBusiness/server.d.ts +14 -0
  117. package/dist/src/whatsappBusiness/templates.d.ts +94 -0
  118. package/dist/src/whatsappBusiness/types.d.ts +162 -0
  119. package/dist/{tool-sandbox-DoF1PsyS.js → tool-sandbox-BSkKdH7V.js} +1 -1
  120. package/dist/{tool-sandbox-DdkMLkDK.mjs → tool-sandbox-DU9b1B7v.mjs} +1 -1
  121. package/dist/{types-ibC3-e1N.mjs → types-B5MifmeF.mjs} +339 -273
  122. package/dist/types-D5dgTskW.js +1 -0
  123. package/dist/{useTableAgentTools-D5mzGf3A.js → useTableAgentTools-BrUot49I.js} +1 -1
  124. package/dist/{useTableAgentTools-DcN3kYRL.mjs → useTableAgentTools-r5InEI4p.mjs} +8 -8
  125. package/dist/{vee-validate-zod-BQElPD0m.js → vee-validate-zod-CWZwNTWE.js} +1 -1
  126. package/dist/{vee-validate-zod-CN16K2x9.mjs → vee-validate-zod-D0WaDgDZ.mjs} +1 -1
  127. package/package.json +2 -2
  128. package/src/appointments/tools.ts +52 -2
  129. package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
  130. package/dist/AppointmentListTable-Dieu9US_.js +0 -1
  131. package/dist/ContentEditor-BcIUumah.js +0 -467
  132. package/dist/Detail-Byk781b4.mjs +0 -26
  133. package/dist/Detail-mvSGbnFU.js +0 -1
  134. package/dist/Overview-BDlBCUI_.js +0 -1
  135. package/dist/Overview-Su8ZUbMs.mjs +0 -26
  136. package/dist/TableDataWidget-7qvC3Egd.js +0 -1
  137. package/dist/TableDataWidget-DMTSoGRO.mjs +0 -121
  138. package/dist/TableOverviewCard-AFq-puJs.js +0 -1
  139. package/dist/TableResultView.vue_vue_type_script_setup_true_lang-CBn-Oxl9.mjs +0 -534
  140. package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C_Lv-SmJ.js +0 -1
  141. package/dist/TableRowActionCard-IzB6tNN-.js +0 -1
  142. package/dist/TableView-6mdrL3zx.js +0 -4
  143. package/dist/TableView-Du5nOE6R.mjs +0 -8228
  144. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
  145. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
  146. package/dist/dateRangePresets-B-l5b_wR.mjs +0 -48
  147. package/dist/dateRangePresets-CPWqst_x.js +0 -1
  148. package/dist/orders-DUa2PVoa.js +0 -1
  149. package/dist/types-BMraG1kN.js +0 -1
@@ -35,14 +35,14 @@ var y;
35
35
  }
36
36
  s.joinValues = r, s.jsonStringifyReplacer = (a, n) => typeof n == "bigint" ? n.toString() : n;
37
37
  })(y || (y = {}));
38
- var te;
38
+ var de;
39
39
  (function(s) {
40
40
  s.mergeShapes = (e, t) => ({
41
41
  ...e,
42
42
  ...t
43
43
  // second overwrites first
44
44
  });
45
- })(te || (te = {}));
45
+ })(de || (de = {}));
46
46
  const u = y.arrayToEnum([
47
47
  "string",
48
48
  "nan",
@@ -64,7 +64,7 @@ const u = y.arrayToEnum([
64
64
  "never",
65
65
  "map",
66
66
  "set"
67
- ]), O = (s) => {
67
+ ]), A = (s) => {
68
68
  switch (typeof s) {
69
69
  case "undefined":
70
70
  return u.undefined;
@@ -103,7 +103,7 @@ const u = y.arrayToEnum([
103
103
  "not_multiple_of",
104
104
  "not_finite"
105
105
  ]);
106
- class T extends Error {
106
+ class S extends Error {
107
107
  get errors() {
108
108
  return this.issues;
109
109
  }
@@ -130,17 +130,17 @@ class T extends Error {
130
130
  else if (i.path.length === 0)
131
131
  r._errors.push(t(i));
132
132
  else {
133
- let o = r, h = 0;
134
- for (; h < i.path.length; ) {
135
- const f = i.path[h];
136
- h === i.path.length - 1 ? (o[f] = o[f] || { _errors: [] }, o[f]._errors.push(t(i))) : o[f] = o[f] || { _errors: [] }, o = o[f], h++;
133
+ let o = r, f = 0;
134
+ for (; f < i.path.length; ) {
135
+ const h = i.path[f];
136
+ 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++;
137
137
  }
138
138
  }
139
139
  };
140
140
  return a(this), r;
141
141
  }
142
142
  static assert(e) {
143
- if (!(e instanceof T))
143
+ if (!(e instanceof S))
144
144
  throw new Error(`Not a ZodError: ${e}`);
145
145
  }
146
146
  toString() {
@@ -166,8 +166,8 @@ class T extends Error {
166
166
  return this.flatten();
167
167
  }
168
168
  }
169
- T.create = (s) => new T(s);
170
- const Y = (s, e) => {
169
+ S.create = (s) => new S(s);
170
+ const K = (s, e) => {
171
171
  let t;
172
172
  switch (s.code) {
173
173
  case d.invalid_type:
@@ -223,11 +223,11 @@ const Y = (s, e) => {
223
223
  }
224
224
  return { message: t };
225
225
  };
226
- let ve = Y;
227
- function xe() {
228
- return ve;
226
+ let be = K;
227
+ function we() {
228
+ return be;
229
229
  }
230
- const ke = (s) => {
230
+ const Te = (s) => {
231
231
  const { data: e, path: t, errorMaps: r, issueData: a } = s, n = [...t, ...a.path || []], i = {
232
232
  ...a,
233
233
  path: n
@@ -239,9 +239,9 @@ const ke = (s) => {
239
239
  message: a.message
240
240
  };
241
241
  let o = "";
242
- const h = r.filter((f) => !!f).slice().reverse();
243
- for (const f of h)
244
- o = f(i, { data: e, defaultError: o }).message;
242
+ const f = r.filter((h) => !!h).slice().reverse();
243
+ for (const h of f)
244
+ o = h(i, { data: e, defaultError: o }).message;
245
245
  return {
246
246
  ...a,
247
247
  path: n,
@@ -249,7 +249,7 @@ const ke = (s) => {
249
249
  };
250
250
  };
251
251
  function c(s, e) {
252
- const t = xe(), r = ke({
252
+ const t = we(), r = Te({
253
253
  issueData: e,
254
254
  data: s.data,
255
255
  path: s.path,
@@ -260,7 +260,7 @@ function c(s, e) {
260
260
  // then schema-bound map if available
261
261
  t,
262
262
  // then global override map
263
- t === Y ? void 0 : Y
263
+ t === K ? void 0 : K
264
264
  // then global default map
265
265
  ].filter((a) => !!a)
266
266
  });
@@ -309,7 +309,7 @@ class k {
309
309
  }
310
310
  const m = Object.freeze({
311
311
  status: "aborted"
312
- }), P = (s) => ({ status: "dirty", value: s }), b = (s) => ({ status: "valid", value: s }), se = (s) => s.status === "aborted", re = (s) => s.status === "dirty", $ = (s) => s.status === "valid", U = (s) => typeof Promise < "u" && s instanceof Promise;
312
+ }), D = (s) => ({ status: "dirty", value: s }), b = (s) => ({ status: "valid", value: s }), ce = (s) => s.status === "aborted", ue = (s) => s.status === "dirty", L = (s) => s.status === "valid", B = (s) => typeof Promise < "u" && s instanceof Promise;
313
313
  var l;
314
314
  (function(s) {
315
315
  s.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, s.toString = (e) => typeof e == "string" ? e : e?.message;
@@ -322,8 +322,8 @@ class N {
322
322
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
323
323
  }
324
324
  }
325
- const ae = (s, e) => {
326
- if ($(e))
325
+ const le = (s, e) => {
326
+ if (L(e))
327
327
  return { success: !0, data: e.value };
328
328
  if (!s.common.issues.length)
329
329
  throw new Error("Validation failed but no issues detected.");
@@ -332,7 +332,7 @@ const ae = (s, e) => {
332
332
  get error() {
333
333
  if (this._error)
334
334
  return this._error;
335
- const t = new T(s.common.issues);
335
+ const t = new S(s.common.issues);
336
336
  return this._error = t, this._error;
337
337
  }
338
338
  };
@@ -344,8 +344,8 @@ function _(s) {
344
344
  if (e && (t || r))
345
345
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
346
346
  return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
347
- const { message: h } = s;
348
- return i.code === "invalid_enum_value" ? { message: h ?? o.defaultError } : typeof o.data > "u" ? { message: h ?? r ?? o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: h ?? t ?? o.defaultError };
347
+ const { message: f } = s;
348
+ 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 };
349
349
  }, description: a };
350
350
  }
351
351
  class g {
@@ -353,13 +353,13 @@ class g {
353
353
  return this._def.description;
354
354
  }
355
355
  _getType(e) {
356
- return O(e.data);
356
+ return A(e.data);
357
357
  }
358
358
  _getOrReturnCtx(e, t) {
359
359
  return t || {
360
360
  common: e.parent.common,
361
361
  data: e.data,
362
- parsedType: O(e.data),
362
+ parsedType: A(e.data),
363
363
  schemaErrorMap: this._def.errorMap,
364
364
  path: e.path,
365
365
  parent: e.parent
@@ -371,7 +371,7 @@ class g {
371
371
  ctx: {
372
372
  common: e.parent.common,
373
373
  data: e.data,
374
- parsedType: O(e.data),
374
+ parsedType: A(e.data),
375
375
  schemaErrorMap: this._def.errorMap,
376
376
  path: e.path,
377
377
  parent: e.parent
@@ -380,7 +380,7 @@ class g {
380
380
  }
381
381
  _parseSync(e) {
382
382
  const t = this._parse(e);
383
- if (U(t))
383
+ if (B(t))
384
384
  throw new Error("Synchronous parse encountered promise.");
385
385
  return t;
386
386
  }
@@ -405,9 +405,9 @@ class g {
405
405
  schemaErrorMap: this._def.errorMap,
406
406
  parent: null,
407
407
  data: e,
408
- parsedType: O(e)
408
+ parsedType: A(e)
409
409
  }, a = this._parseSync({ data: e, path: r.path, parent: r });
410
- return ae(r, a);
410
+ return le(r, a);
411
411
  }
412
412
  "~validate"(e) {
413
413
  const t = {
@@ -419,12 +419,12 @@ class g {
419
419
  schemaErrorMap: this._def.errorMap,
420
420
  parent: null,
421
421
  data: e,
422
- parsedType: O(e)
422
+ parsedType: A(e)
423
423
  };
424
424
  if (!this["~standard"].async)
425
425
  try {
426
426
  const r = this._parseSync({ data: e, path: [], parent: t });
427
- return $(r) ? {
427
+ return L(r) ? {
428
428
  value: r.value
429
429
  } : {
430
430
  issues: t.common.issues
@@ -435,7 +435,7 @@ class g {
435
435
  async: !0
436
436
  };
437
437
  }
438
- return this._parseAsync({ data: e, path: [], parent: t }).then((r) => $(r) ? {
438
+ return this._parseAsync({ data: e, path: [], parent: t }).then((r) => L(r) ? {
439
439
  value: r.value
440
440
  } : {
441
441
  issues: t.common.issues
@@ -458,9 +458,9 @@ class g {
458
458
  schemaErrorMap: this._def.errorMap,
459
459
  parent: null,
460
460
  data: e,
461
- parsedType: O(e)
462
- }, a = this._parse({ data: e, path: r.path, parent: r }), n = await (U(a) ? a : Promise.resolve(a));
463
- return ae(r, n);
461
+ parsedType: A(e)
462
+ }, a = this._parse({ data: e, path: r.path, parent: r }), n = await (B(a) ? a : Promise.resolve(a));
463
+ return le(r, n);
464
464
  }
465
465
  refine(e, t) {
466
466
  const r = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
@@ -469,14 +469,14 @@ class g {
469
469
  code: d.custom,
470
470
  ...r(a)
471
471
  });
472
- return typeof Promise < "u" && i instanceof Promise ? i.then((h) => h ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
472
+ return typeof Promise < "u" && i instanceof Promise ? i.then((f) => f ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
473
473
  });
474
474
  }
475
475
  refinement(e, t) {
476
476
  return this._refinement((r, a) => e(r) ? !0 : (a.addIssue(typeof t == "function" ? t(r, a) : t), !1));
477
477
  }
478
478
  _refinement(e) {
479
- return new j({
479
+ return new R({
480
480
  schema: this,
481
481
  typeName: p.ZodEffects,
482
482
  effect: { type: "refinement", refinement: e }
@@ -493,10 +493,10 @@ class g {
493
493
  };
494
494
  }
495
495
  optional() {
496
- return S.create(this, this._def);
496
+ return O.create(this, this._def);
497
497
  }
498
498
  nullable() {
499
- return L.create(this, this._def);
499
+ return V.create(this, this._def);
500
500
  }
501
501
  nullish() {
502
502
  return this.nullable().optional();
@@ -505,16 +505,16 @@ class g {
505
505
  return w.create(this);
506
506
  }
507
507
  promise() {
508
- return q.create(this, this._def);
508
+ return Y.create(this, this._def);
509
509
  }
510
510
  or(e) {
511
- return F.create([this, e], this._def);
511
+ return W.create([this, e], this._def);
512
512
  }
513
513
  and(e) {
514
- return W.create(this, e, this._def);
514
+ return q.create(this, e, this._def);
515
515
  }
516
516
  transform(e) {
517
- return new j({
517
+ return new R({
518
518
  ..._(this._def),
519
519
  schema: this,
520
520
  typeName: p.ZodEffects,
@@ -523,7 +523,7 @@ class g {
523
523
  }
524
524
  default(e) {
525
525
  const t = typeof e == "function" ? e : () => e;
526
- return new Q({
526
+ return new H({
527
527
  ..._(this._def),
528
528
  innerType: this,
529
529
  defaultValue: t,
@@ -531,7 +531,7 @@ class g {
531
531
  });
532
532
  }
533
533
  brand() {
534
- return new Fe({
534
+ return new xe({
535
535
  typeName: p.ZodBranded,
536
536
  type: this,
537
537
  ..._(this._def)
@@ -539,7 +539,7 @@ class g {
539
539
  }
540
540
  catch(e) {
541
541
  const t = typeof e == "function" ? e : () => e;
542
- return new X({
542
+ return new G({
543
543
  ..._(this._def),
544
544
  innerType: this,
545
545
  catchValue: t,
@@ -554,10 +554,10 @@ class g {
554
554
  });
555
555
  }
556
556
  pipe(e) {
557
- return ee.create(this, e);
557
+ return oe.create(this, e);
558
558
  }
559
559
  readonly() {
560
- return K.create(this);
560
+ return Q.create(this);
561
561
  }
562
562
  isOptional() {
563
563
  return this.safeParse(void 0).success;
@@ -566,28 +566,28 @@ class g {
566
566
  return this.safeParse(null).success;
567
567
  }
568
568
  }
569
- const be = /^c[^\s-]{8,}$/i, we = /^[0-9a-z]+$/, Ce = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Te = /^[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, Oe = /^[a-z0-9_-]{21}$/i, Se = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ne = /^[-+]?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)?)??$/, Ae = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ze = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
570
- let J;
571
- const Re = /^(?:(?: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])$/, Ie = /^(?:(?: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])$/, je = /^(([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]))$/, Ee = /^(([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])$/, $e = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, pe = "((\\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])))", Me = new RegExp(`^${pe}$`);
572
- function _e(s) {
569
+ const Ce = /^c[^\s-]{8,}$/i, Oe = /^[0-9a-z]+$/, Se = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ae = /^[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, Ne = /^[a-z0-9_-]{21}$/i, Ze = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Re = /^[-+]?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, Ie = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
570
+ let X;
571
+ const Ee = /^(?:(?: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])$/, $e = /^(?:(?: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]))$/, Me = /^(([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])$/, Le = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Pe = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ge = "((\\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])))", ze = new RegExp(`^${ge}$`);
572
+ function ye(s) {
573
573
  let e = "[0-5]\\d";
574
574
  s.precision ? e = `${e}\\.\\d{${s.precision}}` : s.precision == null && (e = `${e}(\\.\\d+)?`);
575
575
  const t = s.precision ? "+" : "?";
576
576
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
577
577
  }
578
- function Le(s) {
579
- return new RegExp(`^${_e(s)}$`);
578
+ function De(s) {
579
+ return new RegExp(`^${ye(s)}$`);
580
580
  }
581
- function ze(s) {
582
- let e = `${pe}T${_e(s)}`;
581
+ function Ue(s) {
582
+ let e = `${ge}T${ye(s)}`;
583
583
  const t = [];
584
584
  return t.push(s.local ? "Z?" : "Z"), s.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
585
585
  }
586
- function Pe(s, e) {
587
- return !!((e === "v4" || !e) && Re.test(s) || (e === "v6" || !e) && je.test(s));
586
+ function Be(s, e) {
587
+ return !!((e === "v4" || !e) && Ee.test(s) || (e === "v6" || !e) && Ve.test(s));
588
588
  }
589
- function De(s, e) {
590
- if (!Se.test(s))
589
+ function Fe(s, e) {
590
+ if (!Ze.test(s))
591
591
  return !1;
592
592
  try {
593
593
  const [t] = s.split(".");
@@ -599,8 +599,8 @@ function De(s, e) {
599
599
  return !1;
600
600
  }
601
601
  }
602
- function Ue(s, e) {
603
- return !!((e === "v4" || !e) && Ie.test(s) || (e === "v6" || !e) && Ee.test(s));
602
+ function We(s, e) {
603
+ return !!((e === "v4" || !e) && $e.test(s) || (e === "v6" || !e) && Me.test(s));
604
604
  }
605
605
  class C extends g {
606
606
  _parse(e) {
@@ -651,43 +651,43 @@ class C extends g {
651
651
  message: n.message
652
652
  }), r.dirty());
653
653
  } else if (n.kind === "email")
654
- Ae.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
654
+ je.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
655
655
  validation: "email",
656
656
  code: d.invalid_string,
657
657
  message: n.message
658
658
  }), r.dirty());
659
659
  else if (n.kind === "emoji")
660
- J || (J = new RegExp(Ze, "u")), J.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
660
+ X || (X = new RegExp(Ie, "u")), X.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
661
661
  validation: "emoji",
662
662
  code: d.invalid_string,
663
663
  message: n.message
664
664
  }), r.dirty());
665
665
  else if (n.kind === "uuid")
666
- Te.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
666
+ Ae.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
667
667
  validation: "uuid",
668
668
  code: d.invalid_string,
669
669
  message: n.message
670
670
  }), r.dirty());
671
671
  else if (n.kind === "nanoid")
672
- Oe.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
672
+ Ne.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
673
673
  validation: "nanoid",
674
674
  code: d.invalid_string,
675
675
  message: n.message
676
676
  }), r.dirty());
677
677
  else if (n.kind === "cuid")
678
- be.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
678
+ Ce.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
679
679
  validation: "cuid",
680
680
  code: d.invalid_string,
681
681
  message: n.message
682
682
  }), r.dirty());
683
683
  else if (n.kind === "cuid2")
684
- we.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
684
+ Oe.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
685
685
  validation: "cuid2",
686
686
  code: d.invalid_string,
687
687
  message: n.message
688
688
  }), r.dirty());
689
689
  else if (n.kind === "ulid")
690
- Ce.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
690
+ Se.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
691
691
  validation: "ulid",
692
692
  code: d.invalid_string,
693
693
  message: n.message
@@ -718,39 +718,39 @@ class C extends g {
718
718
  code: d.invalid_string,
719
719
  validation: { endsWith: n.value },
720
720
  message: n.message
721
- }), r.dirty()) : n.kind === "datetime" ? ze(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
721
+ }), r.dirty()) : n.kind === "datetime" ? Ue(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
722
722
  code: d.invalid_string,
723
723
  validation: "datetime",
724
724
  message: n.message
725
- }), r.dirty()) : n.kind === "date" ? Me.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
725
+ }), r.dirty()) : n.kind === "date" ? ze.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
726
726
  code: d.invalid_string,
727
727
  validation: "date",
728
728
  message: n.message
729
- }), r.dirty()) : n.kind === "time" ? Le(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
729
+ }), r.dirty()) : n.kind === "time" ? De(n).test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
730
730
  code: d.invalid_string,
731
731
  validation: "time",
732
732
  message: n.message
733
- }), r.dirty()) : n.kind === "duration" ? Ne.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
733
+ }), r.dirty()) : n.kind === "duration" ? Re.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
734
734
  validation: "duration",
735
735
  code: d.invalid_string,
736
736
  message: n.message
737
- }), r.dirty()) : n.kind === "ip" ? Pe(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
737
+ }), r.dirty()) : n.kind === "ip" ? Be(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
738
738
  validation: "ip",
739
739
  code: d.invalid_string,
740
740
  message: n.message
741
- }), r.dirty()) : n.kind === "jwt" ? De(e.data, n.alg) || (a = this._getOrReturnCtx(e, a), c(a, {
741
+ }), r.dirty()) : n.kind === "jwt" ? Fe(e.data, n.alg) || (a = this._getOrReturnCtx(e, a), c(a, {
742
742
  validation: "jwt",
743
743
  code: d.invalid_string,
744
744
  message: n.message
745
- }), r.dirty()) : n.kind === "cidr" ? Ue(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
745
+ }), r.dirty()) : n.kind === "cidr" ? We(e.data, n.version) || (a = this._getOrReturnCtx(e, a), c(a, {
746
746
  validation: "cidr",
747
747
  code: d.invalid_string,
748
748
  message: n.message
749
- }), r.dirty()) : n.kind === "base64" ? $e.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
749
+ }), r.dirty()) : n.kind === "base64" ? Le.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
750
750
  validation: "base64",
751
751
  code: d.invalid_string,
752
752
  message: n.message
753
- }), r.dirty()) : n.kind === "base64url" ? Ve.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
753
+ }), r.dirty()) : n.kind === "base64url" ? Pe.test(e.data) || (a = this._getOrReturnCtx(e, a), c(a, {
754
754
  validation: "base64url",
755
755
  code: d.invalid_string,
756
756
  message: n.message
@@ -985,11 +985,11 @@ C.create = (s) => new C({
985
985
  coerce: s?.coerce ?? !1,
986
986
  ..._(s)
987
987
  });
988
- function Be(s, e) {
988
+ function qe(s, e) {
989
989
  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(".", ""));
990
990
  return n % i / 10 ** a;
991
991
  }
992
- class Z extends g {
992
+ class j extends g {
993
993
  constructor() {
994
994
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
995
995
  }
@@ -1024,7 +1024,7 @@ class Z extends g {
1024
1024
  inclusive: n.inclusive,
1025
1025
  exact: !1,
1026
1026
  message: n.message
1027
- }), a.dirty()) : n.kind === "multipleOf" ? Be(e.data, n.value) !== 0 && (r = this._getOrReturnCtx(e, r), c(r, {
1027
+ }), a.dirty()) : n.kind === "multipleOf" ? qe(e.data, n.value) !== 0 && (r = this._getOrReturnCtx(e, r), c(r, {
1028
1028
  code: d.not_multiple_of,
1029
1029
  multipleOf: n.value,
1030
1030
  message: n.message
@@ -1047,7 +1047,7 @@ class Z extends g {
1047
1047
  return this.setLimit("max", e, !1, l.toString(t));
1048
1048
  }
1049
1049
  setLimit(e, t, r, a) {
1050
- return new Z({
1050
+ return new j({
1051
1051
  ...this._def,
1052
1052
  checks: [
1053
1053
  ...this._def.checks,
@@ -1061,7 +1061,7 @@ class Z extends g {
1061
1061
  });
1062
1062
  }
1063
1063
  _addCheck(e) {
1064
- return new Z({
1064
+ return new j({
1065
1065
  ...this._def,
1066
1066
  checks: [...this._def.checks, e]
1067
1067
  });
@@ -1155,13 +1155,13 @@ class Z extends g {
1155
1155
  return Number.isFinite(t) && Number.isFinite(e);
1156
1156
  }
1157
1157
  }
1158
- Z.create = (s) => new Z({
1158
+ j.create = (s) => new j({
1159
1159
  checks: [],
1160
1160
  typeName: p.ZodNumber,
1161
1161
  coerce: s?.coerce || !1,
1162
1162
  ..._(s)
1163
1163
  });
1164
- class R extends g {
1164
+ class I extends g {
1165
1165
  constructor() {
1166
1166
  super(...arguments), this.min = this.gte, this.max = this.lte;
1167
1167
  }
@@ -1217,7 +1217,7 @@ class R extends g {
1217
1217
  return this.setLimit("max", e, !1, l.toString(t));
1218
1218
  }
1219
1219
  setLimit(e, t, r, a) {
1220
- return new R({
1220
+ return new I({
1221
1221
  ...this._def,
1222
1222
  checks: [
1223
1223
  ...this._def.checks,
@@ -1231,7 +1231,7 @@ class R extends g {
1231
1231
  });
1232
1232
  }
1233
1233
  _addCheck(e) {
1234
- return new R({
1234
+ return new I({
1235
1235
  ...this._def,
1236
1236
  checks: [...this._def.checks, e]
1237
1237
  });
@@ -1288,13 +1288,13 @@ class R extends g {
1288
1288
  return e;
1289
1289
  }
1290
1290
  }
1291
- R.create = (s) => new R({
1291
+ I.create = (s) => new I({
1292
1292
  checks: [],
1293
1293
  typeName: p.ZodBigInt,
1294
1294
  coerce: s?.coerce ?? !1,
1295
1295
  ..._(s)
1296
1296
  });
1297
- class B extends g {
1297
+ class F extends g {
1298
1298
  _parse(e) {
1299
1299
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
1300
1300
  const r = this._getOrReturnCtx(e);
@@ -1307,12 +1307,12 @@ class B extends g {
1307
1307
  return b(e.data);
1308
1308
  }
1309
1309
  }
1310
- B.create = (s) => new B({
1310
+ F.create = (s) => new F({
1311
1311
  typeName: p.ZodBoolean,
1312
1312
  coerce: s?.coerce || !1,
1313
1313
  ..._(s)
1314
1314
  });
1315
- class V extends g {
1315
+ class P extends g {
1316
1316
  _parse(e) {
1317
1317
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
1318
1318
  const n = this._getOrReturnCtx(e);
@@ -1352,7 +1352,7 @@ class V extends g {
1352
1352
  };
1353
1353
  }
1354
1354
  _addCheck(e) {
1355
- return new V({
1355
+ return new P({
1356
1356
  ...this._def,
1357
1357
  checks: [...this._def.checks, e]
1358
1358
  });
@@ -1384,13 +1384,13 @@ class V extends g {
1384
1384
  return e != null ? new Date(e) : null;
1385
1385
  }
1386
1386
  }
1387
- V.create = (s) => new V({
1387
+ P.create = (s) => new P({
1388
1388
  checks: [],
1389
1389
  coerce: s?.coerce || !1,
1390
1390
  typeName: p.ZodDate,
1391
1391
  ..._(s)
1392
1392
  });
1393
- class ne extends g {
1393
+ class fe extends g {
1394
1394
  _parse(e) {
1395
1395
  if (this._getType(e) !== u.symbol) {
1396
1396
  const r = this._getOrReturnCtx(e);
@@ -1403,11 +1403,11 @@ class ne extends g {
1403
1403
  return b(e.data);
1404
1404
  }
1405
1405
  }
1406
- ne.create = (s) => new ne({
1406
+ fe.create = (s) => new fe({
1407
1407
  typeName: p.ZodSymbol,
1408
1408
  ..._(s)
1409
1409
  });
1410
- class ie extends g {
1410
+ class ee extends g {
1411
1411
  _parse(e) {
1412
1412
  if (this._getType(e) !== u.undefined) {
1413
1413
  const r = this._getOrReturnCtx(e);
@@ -1420,11 +1420,11 @@ class ie extends g {
1420
1420
  return b(e.data);
1421
1421
  }
1422
1422
  }
1423
- ie.create = (s) => new ie({
1423
+ ee.create = (s) => new ee({
1424
1424
  typeName: p.ZodUndefined,
1425
1425
  ..._(s)
1426
1426
  });
1427
- class oe extends g {
1427
+ class te extends g {
1428
1428
  _parse(e) {
1429
1429
  if (this._getType(e) !== u.null) {
1430
1430
  const r = this._getOrReturnCtx(e);
@@ -1437,11 +1437,11 @@ class oe extends g {
1437
1437
  return b(e.data);
1438
1438
  }
1439
1439
  }
1440
- oe.create = (s) => new oe({
1440
+ te.create = (s) => new te({
1441
1441
  typeName: p.ZodNull,
1442
1442
  ..._(s)
1443
1443
  });
1444
- class H extends g {
1444
+ class se extends g {
1445
1445
  constructor() {
1446
1446
  super(...arguments), this._any = !0;
1447
1447
  }
@@ -1449,11 +1449,11 @@ class H extends g {
1449
1449
  return b(e.data);
1450
1450
  }
1451
1451
  }
1452
- H.create = (s) => new H({
1452
+ se.create = (s) => new se({
1453
1453
  typeName: p.ZodAny,
1454
1454
  ..._(s)
1455
1455
  });
1456
- class de extends g {
1456
+ class he extends g {
1457
1457
  constructor() {
1458
1458
  super(...arguments), this._unknown = !0;
1459
1459
  }
@@ -1461,11 +1461,11 @@ class de extends g {
1461
1461
  return b(e.data);
1462
1462
  }
1463
1463
  }
1464
- de.create = (s) => new de({
1464
+ he.create = (s) => new he({
1465
1465
  typeName: p.ZodUnknown,
1466
1466
  ..._(s)
1467
1467
  });
1468
- class A extends g {
1468
+ class Z extends g {
1469
1469
  _parse(e) {
1470
1470
  const t = this._getOrReturnCtx(e);
1471
1471
  return c(t, {
@@ -1475,11 +1475,11 @@ class A extends g {
1475
1475
  }), m;
1476
1476
  }
1477
1477
  }
1478
- A.create = (s) => new A({
1478
+ Z.create = (s) => new Z({
1479
1479
  typeName: p.ZodNever,
1480
1480
  ..._(s)
1481
1481
  });
1482
- class ce extends g {
1482
+ class me extends g {
1483
1483
  _parse(e) {
1484
1484
  if (this._getType(e) !== u.undefined) {
1485
1485
  const r = this._getOrReturnCtx(e);
@@ -1492,7 +1492,7 @@ class ce extends g {
1492
1492
  return b(e.data);
1493
1493
  }
1494
1494
  }
1495
- ce.create = (s) => new ce({
1495
+ me.create = (s) => new me({
1496
1496
  typeName: p.ZodVoid,
1497
1497
  ..._(s)
1498
1498
  });
@@ -1569,12 +1569,12 @@ w.create = (s, e) => new w({
1569
1569
  typeName: p.ZodArray,
1570
1570
  ..._(e)
1571
1571
  });
1572
- function E(s) {
1572
+ function M(s) {
1573
1573
  if (s instanceof x) {
1574
1574
  const e = {};
1575
1575
  for (const t in s.shape) {
1576
1576
  const r = s.shape[t];
1577
- e[t] = S.create(E(r));
1577
+ e[t] = O.create(M(r));
1578
1578
  }
1579
1579
  return new x({
1580
1580
  ...s._def,
@@ -1582,8 +1582,8 @@ function E(s) {
1582
1582
  });
1583
1583
  } else return s instanceof w ? new w({
1584
1584
  ...s._def,
1585
- type: E(s.element)
1586
- }) : s instanceof S ? S.create(E(s.unwrap())) : s instanceof L ? L.create(E(s.unwrap())) : s instanceof I ? I.create(s.items.map((e) => E(e))) : s;
1585
+ type: M(s.element)
1586
+ }) : s instanceof O ? O.create(M(s.unwrap())) : s instanceof V ? V.create(M(s.unwrap())) : s instanceof E ? E.create(s.items.map((e) => M(e))) : s;
1587
1587
  }
1588
1588
  class x extends g {
1589
1589
  constructor() {
@@ -1597,47 +1597,47 @@ class x extends g {
1597
1597
  }
1598
1598
  _parse(e) {
1599
1599
  if (this._getType(e) !== u.object) {
1600
- const f = this._getOrReturnCtx(e);
1601
- return c(f, {
1600
+ const h = this._getOrReturnCtx(e);
1601
+ return c(h, {
1602
1602
  code: d.invalid_type,
1603
1603
  expected: u.object,
1604
- received: f.parsedType
1604
+ received: h.parsedType
1605
1605
  }), m;
1606
1606
  }
1607
1607
  const { status: r, ctx: a } = this._processInputParams(e), { shape: n, keys: i } = this._getCached(), o = [];
1608
- if (!(this._def.catchall instanceof A && this._def.unknownKeys === "strip"))
1609
- for (const f in a.data)
1610
- i.includes(f) || o.push(f);
1611
- const h = [];
1612
- for (const f of i) {
1613
- const v = n[f], z = a.data[f];
1614
- h.push({
1615
- key: { status: "valid", value: f },
1616
- value: v._parse(new N(a, z, a.path, f)),
1617
- alwaysSet: f in a.data
1608
+ if (!(this._def.catchall instanceof Z && this._def.unknownKeys === "strip"))
1609
+ for (const h in a.data)
1610
+ i.includes(h) || o.push(h);
1611
+ const f = [];
1612
+ for (const h of i) {
1613
+ const v = n[h], z = a.data[h];
1614
+ f.push({
1615
+ key: { status: "valid", value: h },
1616
+ value: v._parse(new N(a, z, a.path, h)),
1617
+ alwaysSet: h in a.data
1618
1618
  });
1619
1619
  }
1620
- if (this._def.catchall instanceof A) {
1621
- const f = this._def.unknownKeys;
1622
- if (f === "passthrough")
1620
+ if (this._def.catchall instanceof Z) {
1621
+ const h = this._def.unknownKeys;
1622
+ if (h === "passthrough")
1623
1623
  for (const v of o)
1624
- h.push({
1624
+ f.push({
1625
1625
  key: { status: "valid", value: v },
1626
1626
  value: { status: "valid", value: a.data[v] }
1627
1627
  });
1628
- else if (f === "strict")
1628
+ else if (h === "strict")
1629
1629
  o.length > 0 && (c(a, {
1630
1630
  code: d.unrecognized_keys,
1631
1631
  keys: o
1632
1632
  }), r.dirty());
1633
- else if (f !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1633
+ else if (h !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1634
1634
  } else {
1635
- const f = this._def.catchall;
1635
+ const h = this._def.catchall;
1636
1636
  for (const v of o) {
1637
1637
  const z = a.data[v];
1638
- h.push({
1638
+ f.push({
1639
1639
  key: { status: "valid", value: v },
1640
- value: f._parse(
1640
+ value: h._parse(
1641
1641
  new N(a, z, a.path, v)
1642
1642
  //, ctx.child(key), value, getParsedType(value)
1643
1643
  ),
@@ -1646,17 +1646,17 @@ class x extends g {
1646
1646
  }
1647
1647
  }
1648
1648
  return a.common.async ? Promise.resolve().then(async () => {
1649
- const f = [];
1650
- for (const v of h) {
1651
- const z = await v.key, ye = await v.value;
1652
- f.push({
1649
+ const h = [];
1650
+ for (const v of f) {
1651
+ const z = await v.key, ke = await v.value;
1652
+ h.push({
1653
1653
  key: z,
1654
- value: ye,
1654
+ value: ke,
1655
1655
  alwaysSet: v.alwaysSet
1656
1656
  });
1657
1657
  }
1658
- return f;
1659
- }).then((f) => k.mergeObjectSync(r, f)) : k.mergeObjectSync(r, h);
1658
+ return h;
1659
+ }).then((h) => k.mergeObjectSync(r, h)) : k.mergeObjectSync(r, f);
1660
1660
  }
1661
1661
  get shape() {
1662
1662
  return this._def.shape();
@@ -1818,7 +1818,7 @@ class x extends g {
1818
1818
  * @deprecated
1819
1819
  */
1820
1820
  deepPartial() {
1821
- return E(this);
1821
+ return M(this);
1822
1822
  }
1823
1823
  partial(e) {
1824
1824
  const t = {};
@@ -1838,7 +1838,7 @@ class x extends g {
1838
1838
  t[r] = this.shape[r];
1839
1839
  else {
1840
1840
  let n = this.shape[r];
1841
- for (; n instanceof S; )
1841
+ for (; n instanceof O; )
1842
1842
  n = n._def.innerType;
1843
1843
  t[r] = n;
1844
1844
  }
@@ -1848,31 +1848,31 @@ class x extends g {
1848
1848
  });
1849
1849
  }
1850
1850
  keyof() {
1851
- return ge(y.objectKeys(this.shape));
1851
+ return ve(y.objectKeys(this.shape));
1852
1852
  }
1853
1853
  }
1854
1854
  x.create = (s, e) => new x({
1855
1855
  shape: () => s,
1856
1856
  unknownKeys: "strip",
1857
- catchall: A.create(),
1857
+ catchall: Z.create(),
1858
1858
  typeName: p.ZodObject,
1859
1859
  ..._(e)
1860
1860
  });
1861
1861
  x.strictCreate = (s, e) => new x({
1862
1862
  shape: () => s,
1863
1863
  unknownKeys: "strict",
1864
- catchall: A.create(),
1864
+ catchall: Z.create(),
1865
1865
  typeName: p.ZodObject,
1866
1866
  ..._(e)
1867
1867
  });
1868
1868
  x.lazycreate = (s, e) => new x({
1869
1869
  shape: s,
1870
1870
  unknownKeys: "strip",
1871
- catchall: A.create(),
1871
+ catchall: Z.create(),
1872
1872
  typeName: p.ZodObject,
1873
1873
  ..._(e)
1874
1874
  });
1875
- class F extends g {
1875
+ class W extends g {
1876
1876
  _parse(e) {
1877
1877
  const { ctx: t } = this._processInputParams(e), r = this._def.options;
1878
1878
  function a(n) {
@@ -1882,7 +1882,7 @@ class F extends g {
1882
1882
  for (const o of n)
1883
1883
  if (o.result.status === "dirty")
1884
1884
  return t.common.issues.push(...o.ctx.common.issues), o.result;
1885
- const i = n.map((o) => new T(o.ctx.common.issues));
1885
+ const i = n.map((o) => new S(o.ctx.common.issues));
1886
1886
  return c(t, {
1887
1887
  code: d.invalid_union,
1888
1888
  unionErrors: i
@@ -1910,26 +1910,26 @@ class F extends g {
1910
1910
  {
1911
1911
  let n;
1912
1912
  const i = [];
1913
- for (const h of r) {
1914
- const f = {
1913
+ for (const f of r) {
1914
+ const h = {
1915
1915
  ...t,
1916
1916
  common: {
1917
1917
  ...t.common,
1918
1918
  issues: []
1919
1919
  },
1920
1920
  parent: null
1921
- }, v = h._parseSync({
1921
+ }, v = f._parseSync({
1922
1922
  data: t.data,
1923
1923
  path: t.path,
1924
- parent: f
1924
+ parent: h
1925
1925
  });
1926
1926
  if (v.status === "valid")
1927
1927
  return v;
1928
- v.status === "dirty" && !n && (n = { result: v, ctx: f }), f.common.issues.length && i.push(f.common.issues);
1928
+ v.status === "dirty" && !n && (n = { result: v, ctx: h }), h.common.issues.length && i.push(h.common.issues);
1929
1929
  }
1930
1930
  if (n)
1931
1931
  return t.common.issues.push(...n.ctx.common.issues), n.result;
1932
- const o = i.map((h) => new T(h));
1932
+ const o = i.map((f) => new S(f));
1933
1933
  return c(t, {
1934
1934
  code: d.invalid_union,
1935
1935
  unionErrors: o
@@ -1940,22 +1940,85 @@ class F extends g {
1940
1940
  return this._def.options;
1941
1941
  }
1942
1942
  }
1943
- F.create = (s, e) => new F({
1943
+ W.create = (s, e) => new W({
1944
1944
  options: s,
1945
1945
  typeName: p.ZodUnion,
1946
1946
  ..._(e)
1947
1947
  });
1948
- function G(s, e) {
1949
- const t = O(s), r = O(e);
1948
+ const T = (s) => s instanceof ae ? T(s.schema) : s instanceof R ? T(s.innerType()) : s instanceof J ? [s.value] : s instanceof $ ? s.options : s instanceof ne ? y.objectValues(s.enum) : s instanceof H ? T(s._def.innerType) : s instanceof ee ? [void 0] : s instanceof te ? [null] : s instanceof O ? [void 0, ...T(s.unwrap())] : s instanceof V ? [null, ...T(s.unwrap())] : s instanceof xe || s instanceof Q ? T(s.unwrap()) : s instanceof G ? T(s._def.innerType) : [];
1949
+ class ie extends g {
1950
+ _parse(e) {
1951
+ const { ctx: t } = this._processInputParams(e);
1952
+ if (t.parsedType !== u.object)
1953
+ return c(t, {
1954
+ code: d.invalid_type,
1955
+ expected: u.object,
1956
+ received: t.parsedType
1957
+ }), m;
1958
+ const r = this.discriminator, a = t.data[r], n = this.optionsMap.get(a);
1959
+ return n ? t.common.async ? n._parseAsync({
1960
+ data: t.data,
1961
+ path: t.path,
1962
+ parent: t
1963
+ }) : n._parseSync({
1964
+ data: t.data,
1965
+ path: t.path,
1966
+ parent: t
1967
+ }) : (c(t, {
1968
+ code: d.invalid_union_discriminator,
1969
+ options: Array.from(this.optionsMap.keys()),
1970
+ path: [r]
1971
+ }), m);
1972
+ }
1973
+ get discriminator() {
1974
+ return this._def.discriminator;
1975
+ }
1976
+ get options() {
1977
+ return this._def.options;
1978
+ }
1979
+ get optionsMap() {
1980
+ return this._def.optionsMap;
1981
+ }
1982
+ /**
1983
+ * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
1984
+ * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
1985
+ * have a different value for each object in the union.
1986
+ * @param discriminator the name of the discriminator property
1987
+ * @param types an array of object schemas
1988
+ * @param params
1989
+ */
1990
+ static create(e, t, r) {
1991
+ const a = /* @__PURE__ */ new Map();
1992
+ for (const n of t) {
1993
+ const i = T(n.shape[e]);
1994
+ if (!i.length)
1995
+ throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
1996
+ for (const o of i) {
1997
+ if (a.has(o))
1998
+ throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
1999
+ a.set(o, n);
2000
+ }
2001
+ }
2002
+ return new ie({
2003
+ typeName: p.ZodDiscriminatedUnion,
2004
+ discriminator: e,
2005
+ options: t,
2006
+ optionsMap: a,
2007
+ ..._(r)
2008
+ });
2009
+ }
2010
+ }
2011
+ function re(s, e) {
2012
+ const t = A(s), r = A(e);
1950
2013
  if (s === e)
1951
2014
  return { valid: !0, data: s };
1952
2015
  if (t === u.object && r === u.object) {
1953
2016
  const a = y.objectKeys(e), n = y.objectKeys(s).filter((o) => a.indexOf(o) !== -1), i = { ...s, ...e };
1954
2017
  for (const o of n) {
1955
- const h = G(s[o], e[o]);
1956
- if (!h.valid)
2018
+ const f = re(s[o], e[o]);
2019
+ if (!f.valid)
1957
2020
  return { valid: !1 };
1958
- i[o] = h.data;
2021
+ i[o] = f.data;
1959
2022
  }
1960
2023
  return { valid: !0, data: i };
1961
2024
  } else if (t === u.array && r === u.array) {
@@ -1963,21 +2026,21 @@ function G(s, e) {
1963
2026
  return { valid: !1 };
1964
2027
  const a = [];
1965
2028
  for (let n = 0; n < s.length; n++) {
1966
- const i = s[n], o = e[n], h = G(i, o);
1967
- if (!h.valid)
2029
+ const i = s[n], o = e[n], f = re(i, o);
2030
+ if (!f.valid)
1968
2031
  return { valid: !1 };
1969
- a.push(h.data);
2032
+ a.push(f.data);
1970
2033
  }
1971
2034
  return { valid: !0, data: a };
1972
2035
  } else return t === u.date && r === u.date && +s == +e ? { valid: !0, data: s } : { valid: !1 };
1973
2036
  }
1974
- class W extends g {
2037
+ class q extends g {
1975
2038
  _parse(e) {
1976
2039
  const { status: t, ctx: r } = this._processInputParams(e), a = (n, i) => {
1977
- if (se(n) || se(i))
2040
+ if (ce(n) || ce(i))
1978
2041
  return m;
1979
- const o = G(n.value, i.value);
1980
- return o.valid ? ((re(n) || re(i)) && t.dirty(), { status: t.value, value: o.data }) : (c(r, {
2042
+ const o = re(n.value, i.value);
2043
+ return o.valid ? ((ue(n) || ue(i)) && t.dirty(), { status: t.value, value: o.data }) : (c(r, {
1981
2044
  code: d.invalid_intersection_types
1982
2045
  }), m);
1983
2046
  };
@@ -2003,13 +2066,13 @@ class W extends g {
2003
2066
  }));
2004
2067
  }
2005
2068
  }
2006
- W.create = (s, e, t) => new W({
2069
+ q.create = (s, e, t) => new q({
2007
2070
  left: s,
2008
2071
  right: e,
2009
2072
  typeName: p.ZodIntersection,
2010
2073
  ..._(t)
2011
2074
  });
2012
- class I extends g {
2075
+ class E extends g {
2013
2076
  _parse(e) {
2014
2077
  const { status: t, ctx: r } = this._processInputParams(e);
2015
2078
  if (r.parsedType !== u.array)
@@ -2034,8 +2097,8 @@ class I extends g {
2034
2097
  type: "array"
2035
2098
  }), t.dirty());
2036
2099
  const n = [...r.data].map((i, o) => {
2037
- const h = this._def.items[o] || this._def.rest;
2038
- return h ? h._parse(new N(r, i, r.path, o)) : null;
2100
+ const f = this._def.items[o] || this._def.rest;
2101
+ return f ? f._parse(new N(r, i, r.path, o)) : null;
2039
2102
  }).filter((i) => !!i);
2040
2103
  return r.common.async ? Promise.all(n).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, n);
2041
2104
  }
@@ -2043,23 +2106,23 @@ class I extends g {
2043
2106
  return this._def.items;
2044
2107
  }
2045
2108
  rest(e) {
2046
- return new I({
2109
+ return new E({
2047
2110
  ...this._def,
2048
2111
  rest: e
2049
2112
  });
2050
2113
  }
2051
2114
  }
2052
- I.create = (s, e) => {
2115
+ E.create = (s, e) => {
2053
2116
  if (!Array.isArray(s))
2054
2117
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2055
- return new I({
2118
+ return new E({
2056
2119
  items: s,
2057
2120
  typeName: p.ZodTuple,
2058
2121
  rest: null,
2059
2122
  ..._(e)
2060
2123
  });
2061
2124
  };
2062
- class ue extends g {
2125
+ class pe extends g {
2063
2126
  get keySchema() {
2064
2127
  return this._def.keyType;
2065
2128
  }
@@ -2074,40 +2137,40 @@ class ue extends g {
2074
2137
  expected: u.map,
2075
2138
  received: r.parsedType
2076
2139
  }), m;
2077
- const a = this._def.keyType, n = this._def.valueType, i = [...r.data.entries()].map(([o, h], f) => ({
2078
- key: a._parse(new N(r, o, r.path, [f, "key"])),
2079
- value: n._parse(new N(r, h, r.path, [f, "value"]))
2140
+ const a = this._def.keyType, n = this._def.valueType, i = [...r.data.entries()].map(([o, f], h) => ({
2141
+ key: a._parse(new N(r, o, r.path, [h, "key"])),
2142
+ value: n._parse(new N(r, f, r.path, [h, "value"]))
2080
2143
  }));
2081
2144
  if (r.common.async) {
2082
2145
  const o = /* @__PURE__ */ new Map();
2083
2146
  return Promise.resolve().then(async () => {
2084
- for (const h of i) {
2085
- const f = await h.key, v = await h.value;
2086
- if (f.status === "aborted" || v.status === "aborted")
2147
+ for (const f of i) {
2148
+ const h = await f.key, v = await f.value;
2149
+ if (h.status === "aborted" || v.status === "aborted")
2087
2150
  return m;
2088
- (f.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(f.value, v.value);
2151
+ (h.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(h.value, v.value);
2089
2152
  }
2090
2153
  return { status: t.value, value: o };
2091
2154
  });
2092
2155
  } else {
2093
2156
  const o = /* @__PURE__ */ new Map();
2094
- for (const h of i) {
2095
- const f = h.key, v = h.value;
2096
- if (f.status === "aborted" || v.status === "aborted")
2157
+ for (const f of i) {
2158
+ const h = f.key, v = f.value;
2159
+ if (h.status === "aborted" || v.status === "aborted")
2097
2160
  return m;
2098
- (f.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(f.value, v.value);
2161
+ (h.status === "dirty" || v.status === "dirty") && t.dirty(), o.set(h.value, v.value);
2099
2162
  }
2100
2163
  return { status: t.value, value: o };
2101
2164
  }
2102
2165
  }
2103
2166
  }
2104
- ue.create = (s, e, t) => new ue({
2167
+ pe.create = (s, e, t) => new pe({
2105
2168
  valueType: e,
2106
2169
  keyType: s,
2107
2170
  typeName: p.ZodMap,
2108
2171
  ..._(t)
2109
2172
  });
2110
- class D extends g {
2173
+ class U extends g {
2111
2174
  _parse(e) {
2112
2175
  const { status: t, ctx: r } = this._processInputParams(e);
2113
2176
  if (r.parsedType !== u.set)
@@ -2133,26 +2196,26 @@ class D extends g {
2133
2196
  message: a.maxSize.message
2134
2197
  }), t.dirty());
2135
2198
  const n = this._def.valueType;
2136
- function i(h) {
2137
- const f = /* @__PURE__ */ new Set();
2138
- for (const v of h) {
2199
+ function i(f) {
2200
+ const h = /* @__PURE__ */ new Set();
2201
+ for (const v of f) {
2139
2202
  if (v.status === "aborted")
2140
2203
  return m;
2141
- v.status === "dirty" && t.dirty(), f.add(v.value);
2204
+ v.status === "dirty" && t.dirty(), h.add(v.value);
2142
2205
  }
2143
- return { status: t.value, value: f };
2206
+ return { status: t.value, value: h };
2144
2207
  }
2145
- const o = [...r.data.values()].map((h, f) => n._parse(new N(r, h, r.path, f)));
2146
- return r.common.async ? Promise.all(o).then((h) => i(h)) : i(o);
2208
+ const o = [...r.data.values()].map((f, h) => n._parse(new N(r, f, r.path, h)));
2209
+ return r.common.async ? Promise.all(o).then((f) => i(f)) : i(o);
2147
2210
  }
2148
2211
  min(e, t) {
2149
- return new D({
2212
+ return new U({
2150
2213
  ...this._def,
2151
2214
  minSize: { value: e, message: l.toString(t) }
2152
2215
  });
2153
2216
  }
2154
2217
  max(e, t) {
2155
- return new D({
2218
+ return new U({
2156
2219
  ...this._def,
2157
2220
  maxSize: { value: e, message: l.toString(t) }
2158
2221
  });
@@ -2164,14 +2227,14 @@ class D extends g {
2164
2227
  return this.min(1, e);
2165
2228
  }
2166
2229
  }
2167
- D.create = (s, e) => new D({
2230
+ U.create = (s, e) => new U({
2168
2231
  valueType: s,
2169
2232
  minSize: null,
2170
2233
  maxSize: null,
2171
2234
  typeName: p.ZodSet,
2172
2235
  ..._(e)
2173
2236
  });
2174
- class le extends g {
2237
+ class ae extends g {
2175
2238
  get schema() {
2176
2239
  return this._def.getter();
2177
2240
  }
@@ -2180,12 +2243,12 @@ class le extends g {
2180
2243
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2181
2244
  }
2182
2245
  }
2183
- le.create = (s, e) => new le({
2246
+ ae.create = (s, e) => new ae({
2184
2247
  getter: s,
2185
2248
  typeName: p.ZodLazy,
2186
2249
  ..._(e)
2187
2250
  });
2188
- class he extends g {
2251
+ class J extends g {
2189
2252
  _parse(e) {
2190
2253
  if (e.data !== this._def.value) {
2191
2254
  const t = this._getOrReturnCtx(e);
@@ -2201,19 +2264,19 @@ class he extends g {
2201
2264
  return this._def.value;
2202
2265
  }
2203
2266
  }
2204
- he.create = (s, e) => new he({
2267
+ J.create = (s, e) => new J({
2205
2268
  value: s,
2206
2269
  typeName: p.ZodLiteral,
2207
2270
  ..._(e)
2208
2271
  });
2209
- function ge(s, e) {
2210
- return new M({
2272
+ function ve(s, e) {
2273
+ return new $({
2211
2274
  values: s,
2212
2275
  typeName: p.ZodEnum,
2213
2276
  ..._(e)
2214
2277
  });
2215
2278
  }
2216
- class M extends g {
2279
+ class $ extends g {
2217
2280
  _parse(e) {
2218
2281
  if (typeof e.data != "string") {
2219
2282
  const t = this._getOrReturnCtx(e), r = this._def.values;
@@ -2255,20 +2318,20 @@ class M extends g {
2255
2318
  return e;
2256
2319
  }
2257
2320
  extract(e, t = this._def) {
2258
- return M.create(e, {
2321
+ return $.create(e, {
2259
2322
  ...this._def,
2260
2323
  ...t
2261
2324
  });
2262
2325
  }
2263
2326
  exclude(e, t = this._def) {
2264
- return M.create(this.options.filter((r) => !e.includes(r)), {
2327
+ return $.create(this.options.filter((r) => !e.includes(r)), {
2265
2328
  ...this._def,
2266
2329
  ...t
2267
2330
  });
2268
2331
  }
2269
2332
  }
2270
- M.create = ge;
2271
- class fe extends g {
2333
+ $.create = ve;
2334
+ class ne extends g {
2272
2335
  _parse(e) {
2273
2336
  const t = y.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2274
2337
  if (r.parsedType !== u.string && r.parsedType !== u.number) {
@@ -2293,12 +2356,12 @@ class fe extends g {
2293
2356
  return this._def.values;
2294
2357
  }
2295
2358
  }
2296
- fe.create = (s, e) => new fe({
2359
+ ne.create = (s, e) => new ne({
2297
2360
  values: s,
2298
2361
  typeName: p.ZodNativeEnum,
2299
2362
  ..._(e)
2300
2363
  });
2301
- class q extends g {
2364
+ class Y extends g {
2302
2365
  unwrap() {
2303
2366
  return this._def.type;
2304
2367
  }
@@ -2317,12 +2380,12 @@ class q extends g {
2317
2380
  })));
2318
2381
  }
2319
2382
  }
2320
- q.create = (s, e) => new q({
2383
+ Y.create = (s, e) => new Y({
2321
2384
  type: s,
2322
2385
  typeName: p.ZodPromise,
2323
2386
  ..._(e)
2324
2387
  });
2325
- class j extends g {
2388
+ class R extends g {
2326
2389
  innerType() {
2327
2390
  return this._def.schema;
2328
2391
  }
@@ -2344,12 +2407,12 @@ class j extends g {
2344
2407
  return Promise.resolve(i).then(async (o) => {
2345
2408
  if (t.value === "aborted")
2346
2409
  return m;
2347
- const h = await this._def.schema._parseAsync({
2410
+ const f = await this._def.schema._parseAsync({
2348
2411
  data: o,
2349
2412
  path: r.path,
2350
2413
  parent: r
2351
2414
  });
2352
- return h.status === "aborted" ? m : h.status === "dirty" || t.value === "dirty" ? P(h.value) : h;
2415
+ return f.status === "aborted" ? m : f.status === "dirty" || t.value === "dirty" ? D(f.value) : f;
2353
2416
  });
2354
2417
  {
2355
2418
  if (t.value === "aborted")
@@ -2359,15 +2422,15 @@ class j extends g {
2359
2422
  path: r.path,
2360
2423
  parent: r
2361
2424
  });
2362
- return o.status === "aborted" ? m : o.status === "dirty" || t.value === "dirty" ? P(o.value) : o;
2425
+ return o.status === "aborted" ? m : o.status === "dirty" || t.value === "dirty" ? D(o.value) : o;
2363
2426
  }
2364
2427
  }
2365
2428
  if (a.type === "refinement") {
2366
2429
  const i = (o) => {
2367
- const h = a.refinement(o, n);
2430
+ const f = a.refinement(o, n);
2368
2431
  if (r.common.async)
2369
- return Promise.resolve(h);
2370
- if (h instanceof Promise)
2432
+ return Promise.resolve(f);
2433
+ if (f instanceof Promise)
2371
2434
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2372
2435
  return o;
2373
2436
  };
@@ -2388,33 +2451,33 @@ class j extends g {
2388
2451
  path: r.path,
2389
2452
  parent: r
2390
2453
  });
2391
- if (!$(i))
2454
+ if (!L(i))
2392
2455
  return m;
2393
2456
  const o = a.transform(i.value, n);
2394
2457
  if (o instanceof Promise)
2395
2458
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2396
2459
  return { status: t.value, value: o };
2397
2460
  } else
2398
- return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((i) => $(i) ? Promise.resolve(a.transform(i.value, n)).then((o) => ({
2461
+ 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((o) => ({
2399
2462
  status: t.value,
2400
2463
  value: o
2401
2464
  })) : m);
2402
2465
  y.assertNever(a);
2403
2466
  }
2404
2467
  }
2405
- j.create = (s, e, t) => new j({
2468
+ R.create = (s, e, t) => new R({
2406
2469
  schema: s,
2407
2470
  typeName: p.ZodEffects,
2408
2471
  effect: e,
2409
2472
  ..._(t)
2410
2473
  });
2411
- j.createWithPreprocess = (s, e, t) => new j({
2474
+ R.createWithPreprocess = (s, e, t) => new R({
2412
2475
  schema: e,
2413
2476
  effect: { type: "preprocess", transform: s },
2414
2477
  typeName: p.ZodEffects,
2415
2478
  ..._(t)
2416
2479
  });
2417
- class S extends g {
2480
+ class O extends g {
2418
2481
  _parse(e) {
2419
2482
  return this._getType(e) === u.undefined ? b(void 0) : this._def.innerType._parse(e);
2420
2483
  }
@@ -2422,12 +2485,12 @@ class S extends g {
2422
2485
  return this._def.innerType;
2423
2486
  }
2424
2487
  }
2425
- S.create = (s, e) => new S({
2488
+ O.create = (s, e) => new O({
2426
2489
  innerType: s,
2427
2490
  typeName: p.ZodOptional,
2428
2491
  ..._(e)
2429
2492
  });
2430
- class L extends g {
2493
+ class V extends g {
2431
2494
  _parse(e) {
2432
2495
  return this._getType(e) === u.null ? b(null) : this._def.innerType._parse(e);
2433
2496
  }
@@ -2435,12 +2498,12 @@ class L extends g {
2435
2498
  return this._def.innerType;
2436
2499
  }
2437
2500
  }
2438
- L.create = (s, e) => new L({
2501
+ V.create = (s, e) => new V({
2439
2502
  innerType: s,
2440
2503
  typeName: p.ZodNullable,
2441
2504
  ..._(e)
2442
2505
  });
2443
- class Q extends g {
2506
+ class H extends g {
2444
2507
  _parse(e) {
2445
2508
  const { ctx: t } = this._processInputParams(e);
2446
2509
  let r = t.data;
@@ -2454,13 +2517,13 @@ class Q extends g {
2454
2517
  return this._def.innerType;
2455
2518
  }
2456
2519
  }
2457
- Q.create = (s, e) => new Q({
2520
+ H.create = (s, e) => new H({
2458
2521
  innerType: s,
2459
2522
  typeName: p.ZodDefault,
2460
2523
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2461
2524
  ..._(e)
2462
2525
  });
2463
- class X extends g {
2526
+ class G extends g {
2464
2527
  _parse(e) {
2465
2528
  const { ctx: t } = this._processInputParams(e), r = {
2466
2529
  ...t,
@@ -2475,11 +2538,11 @@ class X extends g {
2475
2538
  ...r
2476
2539
  }
2477
2540
  });
2478
- return U(a) ? a.then((n) => ({
2541
+ return B(a) ? a.then((n) => ({
2479
2542
  status: "valid",
2480
2543
  value: n.status === "valid" ? n.value : this._def.catchValue({
2481
2544
  get error() {
2482
- return new T(r.common.issues);
2545
+ return new S(r.common.issues);
2483
2546
  },
2484
2547
  input: r.data
2485
2548
  })
@@ -2487,7 +2550,7 @@ class X extends g {
2487
2550
  status: "valid",
2488
2551
  value: a.status === "valid" ? a.value : this._def.catchValue({
2489
2552
  get error() {
2490
- return new T(r.common.issues);
2553
+ return new S(r.common.issues);
2491
2554
  },
2492
2555
  input: r.data
2493
2556
  })
@@ -2497,13 +2560,13 @@ class X extends g {
2497
2560
  return this._def.innerType;
2498
2561
  }
2499
2562
  }
2500
- X.create = (s, e) => new X({
2563
+ G.create = (s, e) => new G({
2501
2564
  innerType: s,
2502
2565
  typeName: p.ZodCatch,
2503
2566
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2504
2567
  ..._(e)
2505
2568
  });
2506
- class me extends g {
2569
+ class _e extends g {
2507
2570
  _parse(e) {
2508
2571
  if (this._getType(e) !== u.nan) {
2509
2572
  const r = this._getOrReturnCtx(e);
@@ -2516,11 +2579,11 @@ class me extends g {
2516
2579
  return { status: "valid", value: e.data };
2517
2580
  }
2518
2581
  }
2519
- me.create = (s) => new me({
2582
+ _e.create = (s) => new _e({
2520
2583
  typeName: p.ZodNaN,
2521
2584
  ..._(s)
2522
2585
  });
2523
- class Fe extends g {
2586
+ class xe extends g {
2524
2587
  _parse(e) {
2525
2588
  const { ctx: t } = this._processInputParams(e), r = t.data;
2526
2589
  return this._def.type._parse({
@@ -2533,7 +2596,7 @@ class Fe extends g {
2533
2596
  return this._def.type;
2534
2597
  }
2535
2598
  }
2536
- class ee extends g {
2599
+ class oe extends g {
2537
2600
  _parse(e) {
2538
2601
  const { status: t, ctx: r } = this._processInputParams(e);
2539
2602
  if (r.common.async)
@@ -2543,7 +2606,7 @@ class ee extends g {
2543
2606
  path: r.path,
2544
2607
  parent: r
2545
2608
  });
2546
- return n.status === "aborted" ? m : n.status === "dirty" ? (t.dirty(), P(n.value)) : this._def.out._parseAsync({
2609
+ return n.status === "aborted" ? m : n.status === "dirty" ? (t.dirty(), D(n.value)) : this._def.out._parseAsync({
2547
2610
  data: n.value,
2548
2611
  path: r.path,
2549
2612
  parent: r
@@ -2566,23 +2629,23 @@ class ee extends g {
2566
2629
  }
2567
2630
  }
2568
2631
  static create(e, t) {
2569
- return new ee({
2632
+ return new oe({
2570
2633
  in: e,
2571
2634
  out: t,
2572
2635
  typeName: p.ZodPipeline
2573
2636
  });
2574
2637
  }
2575
2638
  }
2576
- class K extends g {
2639
+ class Q extends g {
2577
2640
  _parse(e) {
2578
- const t = this._def.innerType._parse(e), r = (a) => ($(a) && (a.value = Object.freeze(a.value)), a);
2579
- return U(t) ? t.then((a) => r(a)) : r(t);
2641
+ const t = this._def.innerType._parse(e), r = (a) => (L(a) && (a.value = Object.freeze(a.value)), a);
2642
+ return B(t) ? t.then((a) => r(a)) : r(t);
2580
2643
  }
2581
2644
  unwrap() {
2582
2645
  return this._def.innerType;
2583
2646
  }
2584
2647
  }
2585
- K.create = (s, e) => new K({
2648
+ Q.create = (s, e) => new Q({
2586
2649
  innerType: s,
2587
2650
  typeName: p.ZodReadonly,
2588
2651
  ..._(e)
@@ -2591,40 +2654,43 @@ var p;
2591
2654
  (function(s) {
2592
2655
  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";
2593
2656
  })(p || (p = {}));
2594
- const We = C.create;
2657
+ const Je = C.create;
2658
+ j.create;
2659
+ I.create;
2660
+ const Ye = F.create, He = P.create, Ge = se.create;
2595
2661
  Z.create;
2596
- R.create;
2597
- const qe = B.create, Je = V.create, Ye = H.create;
2598
- A.create;
2599
- const He = w.create, Ge = x.create;
2600
- F.create;
2662
+ const Qe = w.create, Xe = x.create;
2601
2663
  W.create;
2602
- I.create;
2603
- const Qe = M.create;
2664
+ const Ke = ie.create;
2604
2665
  q.create;
2605
- S.create;
2606
- L.create;
2607
- const Xe = j.createWithPreprocess, Ke = {
2666
+ E.create;
2667
+ const et = J.create, tt = $.create;
2668
+ Y.create;
2669
+ O.create;
2670
+ V.create;
2671
+ const st = R.createWithPreprocess, rt = {
2608
2672
  string: ((s) => C.create({ ...s, coerce: !0 })),
2609
- number: ((s) => Z.create({ ...s, coerce: !0 })),
2610
- boolean: ((s) => B.create({
2673
+ number: ((s) => j.create({ ...s, coerce: !0 })),
2674
+ boolean: ((s) => F.create({
2611
2675
  ...s,
2612
2676
  coerce: !0
2613
2677
  })),
2614
- bigint: ((s) => R.create({ ...s, coerce: !0 })),
2615
- date: ((s) => V.create({ ...s, coerce: !0 }))
2678
+ bigint: ((s) => I.create({ ...s, coerce: !0 })),
2679
+ date: ((s) => P.create({ ...s, coerce: !0 }))
2616
2680
  };
2617
2681
  export {
2618
2682
  x as Z,
2619
- He as a,
2620
- qe as b,
2621
- Ke as c,
2622
- Je as d,
2623
- Q as e,
2624
- p as f,
2625
- Ye as g,
2626
- Qe as h,
2627
- Ge as o,
2628
- Xe as p,
2629
- We as s
2683
+ Qe as a,
2684
+ Ye as b,
2685
+ rt as c,
2686
+ Ke as d,
2687
+ tt as e,
2688
+ He as f,
2689
+ H as g,
2690
+ p as h,
2691
+ Ge as i,
2692
+ et as l,
2693
+ Xe as o,
2694
+ st as p,
2695
+ Je as s
2630
2696
  };