storybook 10.0.0-beta.0 → 10.0.0-beta.10

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 (126) hide show
  1. package/assets/server/openBrowser.applescript +94 -0
  2. package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
  3. package/dist/_browser-chunks/{WithTooltip-2E62HIBN.js → WithTooltip-SK46ZJ2J.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
  5. package/dist/_browser-chunks/{chunk-FWKO3E35.js → chunk-BOOOPFZF.js} +10 -3
  6. package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
  7. package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
  8. package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-HMIIJ6UD.js} +6 -6
  9. package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
  10. package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
  11. package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
  12. package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-PS3AOQI4.js} +48 -25
  13. package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
  14. package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
  15. package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
  16. package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
  17. package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
  18. package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-R46XOLMC.js} +1 -1
  19. package/dist/_node-chunks/{builder-manager-OW6YGKXV.js → builder-manager-SJGIDEN6.js} +45 -155
  20. package/dist/_node-chunks/camelcase-VZHWABQV.js +18 -0
  21. package/dist/_node-chunks/{chunk-6JSVPEAU.js → chunk-6CZW7AGN.js} +7 -7
  22. package/dist/_node-chunks/{chunk-CD3IP6HA.js → chunk-6XT5OLNL.js} +12 -12
  23. package/dist/_node-chunks/{chunk-2H7LZ2SD.js → chunk-AHRH5RPR.js} +7 -7
  24. package/dist/_node-chunks/{chunk-5HLANIBM.js → chunk-AOH6ABSV.js} +7 -7
  25. package/dist/_node-chunks/chunk-C5V22GP7.js +79 -0
  26. package/dist/_node-chunks/{chunk-IBXERYDG.js → chunk-FIROF4DV.js} +7 -7
  27. package/dist/_node-chunks/{chunk-I3YCPGZJ.js → chunk-GUJVZUYI.js} +7 -7
  28. package/dist/_node-chunks/chunk-IHPLRRAR.js +4741 -0
  29. package/dist/_node-chunks/{chunk-7TISOZS6.js → chunk-JMXKCRWR.js} +30 -21
  30. package/dist/_node-chunks/{chunk-YWGNEBRO.js → chunk-JUMUXWEV.js} +162 -103
  31. package/dist/_node-chunks/{chunk-UIREEOC7.js → chunk-KGX33KXX.js} +7 -7
  32. package/dist/_node-chunks/{chunk-3QB3ZG6H.js → chunk-KLVABNEU.js} +7 -7
  33. package/dist/_node-chunks/{chunk-H5LTFJHQ.js → chunk-OL6DY6BT.js} +631 -752
  34. package/dist/_node-chunks/{chunk-X5GAZ3EW.js → chunk-ONJV3K2L.js} +399 -116
  35. package/dist/_node-chunks/{chunk-LKB7KRSV.js → chunk-PTHTD4RO.js} +223 -243
  36. package/dist/_node-chunks/{chunk-UHHZPSP7.js → chunk-QQ3Z5KGJ.js} +6 -6
  37. package/dist/_node-chunks/{chunk-MUD3GH3L.js → chunk-QRTDDTZJ.js} +9 -9
  38. package/dist/_node-chunks/chunk-R54K4KSM.js +1540 -0
  39. package/dist/_node-chunks/{chunk-IQAUGVYR.js → chunk-S2LZC6JK.js} +8 -8
  40. package/dist/_node-chunks/chunk-SFJFSPRT.js +62 -0
  41. package/dist/_node-chunks/{chunk-LH3BEEIR.js → chunk-SSN5PKIY.js} +6 -6
  42. package/dist/_node-chunks/{chunk-NOQITS3C.js → chunk-SXR2DITB.js} +7 -7
  43. package/dist/_node-chunks/{chunk-FWUE7SRE.js → chunk-TH5QVQRL.js} +7 -7
  44. package/dist/_node-chunks/chunk-U34NWAU2.js +18 -0
  45. package/dist/_node-chunks/{chunk-FBMMEEO4.js → chunk-UV3CZ3KS.js} +7 -7
  46. package/dist/_node-chunks/{chunk-NZGJJABJ.js → chunk-UVUGJDAI.js} +60 -102
  47. package/dist/_node-chunks/{chunk-GZUNYRFU.js → chunk-VOUNSD2E.js} +7 -7
  48. package/dist/_node-chunks/chunk-WFCPBKQJ.js +64656 -0
  49. package/dist/_node-chunks/{chunk-BFXER3XW.js → chunk-XHF3WWNP.js} +623 -750
  50. package/dist/_node-chunks/{chunk-ANEKBWDX.js → chunk-XU45KXNQ.js} +16 -25
  51. package/dist/_node-chunks/{camelcase-2K3EMR6G.js → chunk-YHO6XR7U.js} +9 -8
  52. package/dist/_node-chunks/{dist-465RSKRC.js → dist-IIC5PBL7.js} +9 -9
  53. package/dist/_node-chunks/{globby-LJ3MVB6M.js → globby-CJACC3HJ.js} +17 -13
  54. package/dist/_node-chunks/{lib-OW3DENXB.js → lib-ZY4TKSOR.js} +40 -16
  55. package/dist/_node-chunks/{mdx-N42X6CFJ-PYX2IFUO.js → mdx-N42X6CFJ-3XNW3DFO.js} +8 -8
  56. package/dist/_node-chunks/{p-limit-X4OG45RB.js → p-limit-R2OFT5HE.js} +76 -10
  57. package/dist/_node-chunks/{plugin-ALTIQMDE.js → plugin-5XD5R2KD.js} +10 -10
  58. package/dist/_node-chunks/{plugin-GE36R32R.js → plugin-WAWVQMVR.js} +10 -12
  59. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-NLCAF7S6.js → webpack-inject-mocker-runtime-plugin-SCRGJLIS.js} +1307 -847
  60. package/dist/_node-chunks/{webpack-mock-plugin-BRYODMCC.js → webpack-mock-plugin-3VAXEGG2.js} +9 -11
  61. package/dist/babel/index.d.ts +1 -1
  62. package/dist/babel/index.js +11 -12
  63. package/dist/bin/core.js +638 -187
  64. package/dist/bin/dispatcher.js +11 -11
  65. package/dist/bin/loader.js +8 -8
  66. package/dist/cli/index.d.ts +62 -75
  67. package/dist/cli/index.js +66 -56
  68. package/dist/common/index.d.ts +3 -1
  69. package/dist/common/index.js +22 -22
  70. package/dist/components/index.d.ts +234 -2
  71. package/dist/components/index.js +74 -5741
  72. package/dist/core-events/index.d.ts +18 -2
  73. package/dist/core-events/index.js +7 -1
  74. package/dist/core-server/index.d.ts +540 -39
  75. package/dist/core-server/index.js +4647 -4182
  76. package/dist/core-server/presets/common-manager.js +1570 -1272
  77. package/dist/core-server/presets/common-override-preset.js +9 -9
  78. package/dist/core-server/presets/common-preset.js +691 -38
  79. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -11
  80. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -12
  81. package/dist/csf/index.d.ts +9 -4
  82. package/dist/csf/index.js +50 -15
  83. package/dist/csf-tools/index.d.ts +47 -6
  84. package/dist/csf-tools/index.js +9 -9
  85. package/dist/docs-tools/index.js +4 -4
  86. package/dist/instrumenter/index.js +1 -1
  87. package/dist/manager/globals-runtime.js +9233 -18113
  88. package/dist/manager/globals.d.ts +0 -4
  89. package/dist/manager/globals.js +1 -6
  90. package/dist/manager/runtime.js +13396 -11518
  91. package/dist/manager-api/index.d.ts +540 -32
  92. package/dist/manager-api/index.js +364 -90
  93. package/dist/manager-errors.d.ts +527 -0
  94. package/dist/node-logger/index.d.ts +1 -1
  95. package/dist/node-logger/index.js +1136 -662
  96. package/dist/preview/globals.js +1 -1
  97. package/dist/preview/runtime.js +12103 -21579
  98. package/dist/preview-api/index.d.ts +3 -3
  99. package/dist/preview-api/index.js +10 -10
  100. package/dist/preview-errors.d.ts +527 -0
  101. package/dist/router/index.d.ts +668 -10
  102. package/dist/router/index.js +2 -2
  103. package/dist/server-errors.d.ts +527 -0
  104. package/dist/server-errors.js +10 -10
  105. package/dist/telemetry/index.d.ts +1 -1
  106. package/dist/telemetry/index.js +23 -25
  107. package/dist/test/index.js +1874 -4024
  108. package/dist/theming/index.d.ts +2 -2
  109. package/dist/theming/index.js +6 -6
  110. package/dist/types/index.d.ts +553 -16
  111. package/dist/viewport/index.d.ts +36 -4
  112. package/dist/viewport/index.js +1 -1
  113. package/package.json +9 -46
  114. package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
  115. package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
  116. package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
  117. package/dist/_node-chunks/chunk-27W2Z6VL.js +0 -28502
  118. package/dist/_node-chunks/chunk-G46DWX7Z.js +0 -266
  119. package/dist/_node-chunks/chunk-GZZDIJIB.js +0 -80
  120. package/dist/_node-chunks/chunk-JDKH3XYB.js +0 -9845
  121. package/dist/_node-chunks/chunk-R7RKO2DC.js +0 -35783
  122. package/dist/_node-chunks/chunk-T23YQHYB.js +0 -62
  123. package/dist/_node-chunks/chunk-VKKLKNFC.js +0 -2377
  124. package/dist/_node-chunks/chunk-W6GKFQ7F.js +0 -87
  125. package/dist/_node-chunks/chunk-YUYBO6S7.js +0 -18
  126. package/dist/_node-chunks/default-browser-id-Z6WQ7DZA.js +0 -1719
@@ -1,21 +1,22 @@
1
- import CJS_COMPAT_NODE_URL_qlimw951jq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qlimw951jq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qlimw951jq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_kzg6jc8bd2 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_kzg6jc8bd2 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_kzg6jc8bd2 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qlimw951jq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qlimw951jq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qlimw951jq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_kzg6jc8bd2.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_kzg6jc8bd2.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_kzg6jc8bd2.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_dist
14
- } from "./chunk-I3YCPGZJ.js";
14
+ } from "./chunk-GUJVZUYI.js";
15
15
  import {
16
+ __export,
16
17
  __name,
17
18
  __toESM
18
- } from "./chunk-LH3BEEIR.js";
19
+ } from "./chunk-SSN5PKIY.js";
19
20
 
20
21
  // src/cli/globalSettings.ts
21
22
  var import_ts_dedent = __toESM(require_dist(), 1);
@@ -23,10 +24,123 @@ import fs from "node:fs/promises";
23
24
  import { homedir } from "node:os";
24
25
  import { dirname, join } from "node:path";
25
26
 
26
- // ../node_modules/zod/lib/index.mjs
27
+ // ../node_modules/zod/v3/external.js
28
+ var external_exports = {};
29
+ __export(external_exports, {
30
+ BRAND: () => BRAND,
31
+ DIRTY: () => DIRTY,
32
+ EMPTY_PATH: () => EMPTY_PATH,
33
+ INVALID: () => INVALID,
34
+ NEVER: () => NEVER,
35
+ OK: () => OK,
36
+ ParseStatus: () => ParseStatus,
37
+ Schema: () => ZodType,
38
+ ZodAny: () => ZodAny,
39
+ ZodArray: () => ZodArray,
40
+ ZodBigInt: () => ZodBigInt,
41
+ ZodBoolean: () => ZodBoolean,
42
+ ZodBranded: () => ZodBranded,
43
+ ZodCatch: () => ZodCatch,
44
+ ZodDate: () => ZodDate,
45
+ ZodDefault: () => ZodDefault,
46
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
47
+ ZodEffects: () => ZodEffects,
48
+ ZodEnum: () => ZodEnum,
49
+ ZodError: () => ZodError,
50
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
51
+ ZodFunction: () => ZodFunction,
52
+ ZodIntersection: () => ZodIntersection,
53
+ ZodIssueCode: () => ZodIssueCode,
54
+ ZodLazy: () => ZodLazy,
55
+ ZodLiteral: () => ZodLiteral,
56
+ ZodMap: () => ZodMap,
57
+ ZodNaN: () => ZodNaN,
58
+ ZodNativeEnum: () => ZodNativeEnum,
59
+ ZodNever: () => ZodNever,
60
+ ZodNull: () => ZodNull,
61
+ ZodNullable: () => ZodNullable,
62
+ ZodNumber: () => ZodNumber,
63
+ ZodObject: () => ZodObject,
64
+ ZodOptional: () => ZodOptional,
65
+ ZodParsedType: () => ZodParsedType,
66
+ ZodPipeline: () => ZodPipeline,
67
+ ZodPromise: () => ZodPromise,
68
+ ZodReadonly: () => ZodReadonly,
69
+ ZodRecord: () => ZodRecord,
70
+ ZodSchema: () => ZodType,
71
+ ZodSet: () => ZodSet,
72
+ ZodString: () => ZodString,
73
+ ZodSymbol: () => ZodSymbol,
74
+ ZodTransformer: () => ZodEffects,
75
+ ZodTuple: () => ZodTuple,
76
+ ZodType: () => ZodType,
77
+ ZodUndefined: () => ZodUndefined,
78
+ ZodUnion: () => ZodUnion,
79
+ ZodUnknown: () => ZodUnknown,
80
+ ZodVoid: () => ZodVoid,
81
+ addIssueToContext: () => addIssueToContext,
82
+ any: () => anyType,
83
+ array: () => arrayType,
84
+ bigint: () => bigIntType,
85
+ boolean: () => booleanType,
86
+ coerce: () => coerce,
87
+ custom: () => custom,
88
+ date: () => dateType,
89
+ datetimeRegex: () => datetimeRegex,
90
+ defaultErrorMap: () => en_default,
91
+ discriminatedUnion: () => discriminatedUnionType,
92
+ effect: () => effectsType,
93
+ enum: () => enumType,
94
+ function: () => functionType,
95
+ getErrorMap: () => getErrorMap,
96
+ getParsedType: () => getParsedType,
97
+ instanceof: () => instanceOfType,
98
+ intersection: () => intersectionType,
99
+ isAborted: () => isAborted,
100
+ isAsync: () => isAsync,
101
+ isDirty: () => isDirty,
102
+ isValid: () => isValid,
103
+ late: () => late,
104
+ lazy: () => lazyType,
105
+ literal: () => literalType,
106
+ makeIssue: () => makeIssue,
107
+ map: () => mapType,
108
+ nan: () => nanType,
109
+ nativeEnum: () => nativeEnumType,
110
+ never: () => neverType,
111
+ null: () => nullType,
112
+ nullable: () => nullableType,
113
+ number: () => numberType,
114
+ object: () => objectType,
115
+ objectUtil: () => objectUtil,
116
+ oboolean: () => oboolean,
117
+ onumber: () => onumber,
118
+ optional: () => optionalType,
119
+ ostring: () => ostring,
120
+ pipeline: () => pipelineType,
121
+ preprocess: () => preprocessType,
122
+ promise: () => promiseType,
123
+ quotelessJson: () => quotelessJson,
124
+ record: () => recordType,
125
+ set: () => setType,
126
+ setErrorMap: () => setErrorMap,
127
+ strictObject: () => strictObjectType,
128
+ string: () => stringType,
129
+ symbol: () => symbolType,
130
+ transformer: () => effectsType,
131
+ tuple: () => tupleType,
132
+ undefined: () => undefinedType,
133
+ union: () => unionType,
134
+ unknown: () => unknownType,
135
+ util: () => util,
136
+ void: () => voidType
137
+ });
138
+
139
+ // ../node_modules/zod/v3/helpers/util.js
27
140
  var util;
28
141
  (function(util2) {
29
- util2.assertEqual = (val) => val;
142
+ util2.assertEqual = (_) => {
143
+ };
30
144
  function assertIs(_arg) {
31
145
  }
32
146
  __name(assertIs, "assertIs");
@@ -72,7 +186,7 @@ var util;
72
186
  }
73
187
  return void 0;
74
188
  };
75
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
189
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
76
190
  function joinValues(array, separator = " | ") {
77
191
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
78
192
  }
@@ -125,7 +239,7 @@ var getParsedType = /* @__PURE__ */ __name((data) => {
125
239
  case "string":
126
240
  return ZodParsedType.string;
127
241
  case "number":
128
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
242
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
129
243
  case "boolean":
130
244
  return ZodParsedType.boolean;
131
245
  case "function":
@@ -158,6 +272,8 @@ var getParsedType = /* @__PURE__ */ __name((data) => {
158
272
  return ZodParsedType.unknown;
159
273
  }
160
274
  }, "getParsedType");
275
+
276
+ // ../node_modules/zod/v3/ZodError.js
161
277
  var ZodIssueCode = util.arrayToEnum([
162
278
  "invalid_type",
163
279
  "invalid_literal",
@@ -260,8 +376,9 @@ var ZodError = class _ZodError extends Error {
260
376
  const formErrors = [];
261
377
  for (const sub of this.issues) {
262
378
  if (sub.path.length > 0) {
263
- fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
264
- fieldErrors[sub.path[0]].push(mapper(sub));
379
+ const firstEl = sub.path[0];
380
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
381
+ fieldErrors[firstEl].push(mapper(sub));
265
382
  } else {
266
383
  formErrors.push(mapper(sub));
267
384
  }
@@ -276,6 +393,8 @@ ZodError.create = (issues) => {
276
393
  const error = new ZodError(issues);
277
394
  return error;
278
395
  };
396
+
397
+ // ../node_modules/zod/v3/locales/en.js
279
398
  var errorMap = /* @__PURE__ */ __name((issue, _ctx) => {
280
399
  let message;
281
400
  switch (issue.code) {
@@ -337,6 +456,8 @@ var errorMap = /* @__PURE__ */ __name((issue, _ctx) => {
337
456
  message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
338
457
  else if (issue.type === "number")
339
458
  message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
459
+ else if (issue.type === "bigint")
460
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
340
461
  else if (issue.type === "date")
341
462
  message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
342
463
  else
@@ -374,7 +495,10 @@ var errorMap = /* @__PURE__ */ __name((issue, _ctx) => {
374
495
  }
375
496
  return { message };
376
497
  }, "errorMap");
377
- var overrideErrorMap = errorMap;
498
+ var en_default = errorMap;
499
+
500
+ // ../node_modules/zod/v3/errors.js
501
+ var overrideErrorMap = en_default;
378
502
  function setErrorMap(map) {
379
503
  overrideErrorMap = map;
380
504
  }
@@ -383,6 +507,8 @@ function getErrorMap() {
383
507
  return overrideErrorMap;
384
508
  }
385
509
  __name(getErrorMap, "getErrorMap");
510
+
511
+ // ../node_modules/zod/v3/helpers/parseUtil.js
386
512
  var makeIssue = /* @__PURE__ */ __name((params) => {
387
513
  const { data, path, errorMaps, issueData } = params;
388
514
  const fullPath = [...path, ...issueData.path || []];
@@ -422,7 +548,7 @@ function addIssueToContext(ctx, issueData) {
422
548
  // then schema-bound map if available
423
549
  overrideMap,
424
550
  // then global override map
425
- overrideMap === errorMap ? void 0 : errorMap
551
+ overrideMap === en_default ? void 0 : en_default
426
552
  // then global default map
427
553
  ].filter((x) => !!x)
428
554
  });
@@ -495,26 +621,15 @@ var isAborted = /* @__PURE__ */ __name((x) => x.status === "aborted", "isAborted
495
621
  var isDirty = /* @__PURE__ */ __name((x) => x.status === "dirty", "isDirty");
496
622
  var isValid = /* @__PURE__ */ __name((x) => x.status === "valid", "isValid");
497
623
  var isAsync = /* @__PURE__ */ __name((x) => typeof Promise !== "undefined" && x instanceof Promise, "isAsync");
498
- function __classPrivateFieldGet(receiver, state, kind, f) {
499
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
500
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
501
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
502
- }
503
- __name(__classPrivateFieldGet, "__classPrivateFieldGet");
504
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
505
- if (kind === "m") throw new TypeError("Private method is not writable");
506
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
507
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
508
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
509
- }
510
- __name(__classPrivateFieldSet, "__classPrivateFieldSet");
624
+
625
+ // ../node_modules/zod/v3/helpers/errorUtil.js
511
626
  var errorUtil;
512
627
  (function(errorUtil2) {
513
628
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
514
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
629
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
515
630
  })(errorUtil || (errorUtil = {}));
516
- var _ZodEnum_cache;
517
- var _ZodNativeEnum_cache;
631
+
632
+ // ../node_modules/zod/v3/types.js
518
633
  var ParseInputLazyPath = class {
519
634
  static {
520
635
  __name(this, "ParseInputLazyPath");
@@ -528,7 +643,7 @@ var ParseInputLazyPath = class {
528
643
  }
529
644
  get path() {
530
645
  if (!this._cachedPath.length) {
531
- if (this._key instanceof Array) {
646
+ if (Array.isArray(this._key)) {
532
647
  this._cachedPath.push(...this._path, ...this._key);
533
648
  } else {
534
649
  this._cachedPath.push(...this._path, this._key);
@@ -566,17 +681,16 @@ function processCreateParams(params) {
566
681
  if (errorMap2)
567
682
  return { errorMap: errorMap2, description };
568
683
  const customMap = /* @__PURE__ */ __name((iss, ctx) => {
569
- var _a, _b;
570
684
  const { message } = params;
571
685
  if (iss.code === "invalid_enum_value") {
572
- return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
686
+ return { message: message ?? ctx.defaultError };
573
687
  }
574
688
  if (typeof ctx.data === "undefined") {
575
- return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
689
+ return { message: message ?? required_error ?? ctx.defaultError };
576
690
  }
577
691
  if (iss.code !== "invalid_type")
578
692
  return { message: ctx.defaultError };
579
- return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
693
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
580
694
  }, "customMap");
581
695
  return { errorMap: customMap, description };
582
696
  }
@@ -632,14 +746,13 @@ var ZodType = class {
632
746
  throw result.error;
633
747
  }
634
748
  safeParse(data, params) {
635
- var _a;
636
749
  const ctx = {
637
750
  common: {
638
751
  issues: [],
639
- async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
640
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
752
+ async: params?.async ?? false,
753
+ contextualErrorMap: params?.errorMap
641
754
  },
642
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
755
+ path: params?.path || [],
643
756
  schemaErrorMap: this._def.errorMap,
644
757
  parent: null,
645
758
  data,
@@ -649,7 +762,6 @@ var ZodType = class {
649
762
  return handleResult(ctx, result);
650
763
  }
651
764
  "~validate"(data) {
652
- var _a, _b;
653
765
  const ctx = {
654
766
  common: {
655
767
  issues: [],
@@ -670,7 +782,7 @@ var ZodType = class {
670
782
  issues: ctx.common.issues
671
783
  };
672
784
  } catch (err) {
673
- if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
785
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
674
786
  this["~standard"].async = true;
675
787
  }
676
788
  ctx.common = {
@@ -695,10 +807,10 @@ var ZodType = class {
695
807
  const ctx = {
696
808
  common: {
697
809
  issues: [],
698
- contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
810
+ contextualErrorMap: params?.errorMap,
699
811
  async: true
700
812
  },
701
- path: (params === null || params === void 0 ? void 0 : params.path) || [],
813
+ path: params?.path || [],
702
814
  schemaErrorMap: this._def.errorMap,
703
815
  parent: null,
704
816
  data,
@@ -888,13 +1000,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
888
1000
  var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
889
1001
  var dateRegex = new RegExp(`^${dateRegexSource}$`);
890
1002
  function timeRegexSource(args) {
891
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
1003
+ let secondsRegexSource = `[0-5]\\d`;
892
1004
  if (args.precision) {
893
- regex = `${regex}\\.\\d{${args.precision}}`;
1005
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
894
1006
  } else if (args.precision == null) {
895
- regex = `${regex}(\\.\\d+)?`;
1007
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
896
1008
  }
897
- return regex;
1009
+ const secondsQuantifier = args.precision ? "+" : "?";
1010
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
898
1011
  }
899
1012
  __name(timeRegexSource, "timeRegexSource");
900
1013
  function timeRegex(args) {
@@ -926,16 +1039,20 @@ function isValidJWT(jwt, alg) {
926
1039
  return false;
927
1040
  try {
928
1041
  const [header] = jwt.split(".");
1042
+ if (!header)
1043
+ return false;
929
1044
  const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
930
1045
  const decoded = JSON.parse(atob(base64));
931
1046
  if (typeof decoded !== "object" || decoded === null)
932
1047
  return false;
933
- if (!decoded.typ || !decoded.alg)
1048
+ if ("typ" in decoded && decoded?.typ !== "JWT")
1049
+ return false;
1050
+ if (!decoded.alg)
934
1051
  return false;
935
1052
  if (alg && decoded.alg !== alg)
936
1053
  return false;
937
1054
  return true;
938
- } catch (_a) {
1055
+ } catch {
939
1056
  return false;
940
1057
  }
941
1058
  }
@@ -1099,7 +1216,7 @@ var ZodString = class _ZodString extends ZodType {
1099
1216
  } else if (check.kind === "url") {
1100
1217
  try {
1101
1218
  new URL(input.data);
1102
- } catch (_a) {
1219
+ } catch {
1103
1220
  ctx = this._getOrReturnCtx(input, ctx);
1104
1221
  addIssueToContext(ctx, {
1105
1222
  validation: "url",
@@ -1311,7 +1428,6 @@ var ZodString = class _ZodString extends ZodType {
1311
1428
  return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1312
1429
  }
1313
1430
  datetime(options) {
1314
- var _a, _b;
1315
1431
  if (typeof options === "string") {
1316
1432
  return this._addCheck({
1317
1433
  kind: "datetime",
@@ -1323,10 +1439,10 @@ var ZodString = class _ZodString extends ZodType {
1323
1439
  }
1324
1440
  return this._addCheck({
1325
1441
  kind: "datetime",
1326
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1327
- offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1328
- local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1329
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1442
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1443
+ offset: options?.offset ?? false,
1444
+ local: options?.local ?? false,
1445
+ ...errorUtil.errToObj(options?.message)
1330
1446
  });
1331
1447
  }
1332
1448
  date(message) {
@@ -1342,8 +1458,8 @@ var ZodString = class _ZodString extends ZodType {
1342
1458
  }
1343
1459
  return this._addCheck({
1344
1460
  kind: "time",
1345
- precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1346
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1461
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1462
+ ...errorUtil.errToObj(options?.message)
1347
1463
  });
1348
1464
  }
1349
1465
  duration(message) {
@@ -1360,8 +1476,8 @@ var ZodString = class _ZodString extends ZodType {
1360
1476
  return this._addCheck({
1361
1477
  kind: "includes",
1362
1478
  value,
1363
- position: options === null || options === void 0 ? void 0 : options.position,
1364
- ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
1479
+ position: options?.position,
1480
+ ...errorUtil.errToObj(options?.message)
1365
1481
  });
1366
1482
  }
1367
1483
  startsWith(value, message) {
@@ -1493,11 +1609,10 @@ var ZodString = class _ZodString extends ZodType {
1493
1609
  }
1494
1610
  };
1495
1611
  ZodString.create = (params) => {
1496
- var _a;
1497
1612
  return new ZodString({
1498
1613
  checks: [],
1499
1614
  typeName: ZodFirstPartyTypeKind.ZodString,
1500
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1615
+ coerce: params?.coerce ?? false,
1501
1616
  ...processCreateParams(params)
1502
1617
  });
1503
1618
  };
@@ -1505,9 +1620,9 @@ function floatSafeRemainder(val, step) {
1505
1620
  const valDecCount = (val.toString().split(".")[1] || "").length;
1506
1621
  const stepDecCount = (step.toString().split(".")[1] || "").length;
1507
1622
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1508
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1509
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1510
- return valInt % stepInt / Math.pow(10, decCount);
1623
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1624
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1625
+ return valInt % stepInt / 10 ** decCount;
1511
1626
  }
1512
1627
  __name(floatSafeRemainder, "floatSafeRemainder");
1513
1628
  var ZodNumber = class _ZodNumber extends ZodType {
@@ -1721,7 +1836,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
1721
1836
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1722
1837
  }
1723
1838
  get isFinite() {
1724
- let max = null, min = null;
1839
+ let max = null;
1840
+ let min = null;
1725
1841
  for (const ch of this._def.checks) {
1726
1842
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1727
1843
  return true;
@@ -1740,7 +1856,7 @@ ZodNumber.create = (params) => {
1740
1856
  return new ZodNumber({
1741
1857
  checks: [],
1742
1858
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1743
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1859
+ coerce: params?.coerce || false,
1744
1860
  ...processCreateParams(params)
1745
1861
  });
1746
1862
  };
@@ -1757,7 +1873,7 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1757
1873
  if (this._def.coerce) {
1758
1874
  try {
1759
1875
  input.data = BigInt(input.data);
1760
- } catch (_a) {
1876
+ } catch {
1761
1877
  return this._getInvalidInput(input);
1762
1878
  }
1763
1879
  }
@@ -1912,11 +2028,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
1912
2028
  }
1913
2029
  };
1914
2030
  ZodBigInt.create = (params) => {
1915
- var _a;
1916
2031
  return new ZodBigInt({
1917
2032
  checks: [],
1918
2033
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1919
- coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2034
+ coerce: params?.coerce ?? false,
1920
2035
  ...processCreateParams(params)
1921
2036
  });
1922
2037
  };
@@ -1944,7 +2059,7 @@ var ZodBoolean = class extends ZodType {
1944
2059
  ZodBoolean.create = (params) => {
1945
2060
  return new ZodBoolean({
1946
2061
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
1947
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2062
+ coerce: params?.coerce || false,
1948
2063
  ...processCreateParams(params)
1949
2064
  });
1950
2065
  };
@@ -1966,7 +2081,7 @@ var ZodDate = class _ZodDate extends ZodType {
1966
2081
  });
1967
2082
  return INVALID;
1968
2083
  }
1969
- if (isNaN(input.data.getTime())) {
2084
+ if (Number.isNaN(input.data.getTime())) {
1970
2085
  const ctx2 = this._getOrReturnCtx(input);
1971
2086
  addIssueToContext(ctx2, {
1972
2087
  code: ZodIssueCode.invalid_date
@@ -2055,7 +2170,7 @@ var ZodDate = class _ZodDate extends ZodType {
2055
2170
  ZodDate.create = (params) => {
2056
2171
  return new ZodDate({
2057
2172
  checks: [],
2058
- coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2173
+ coerce: params?.coerce || false,
2059
2174
  typeName: ZodFirstPartyTypeKind.ZodDate,
2060
2175
  ...processCreateParams(params)
2061
2176
  });
@@ -2358,7 +2473,8 @@ var ZodObject = class _ZodObject extends ZodType {
2358
2473
  return this._cached;
2359
2474
  const shape = this._def.shape();
2360
2475
  const keys = util.objectKeys(shape);
2361
- return this._cached = { shape, keys };
2476
+ this._cached = { shape, keys };
2477
+ return this._cached;
2362
2478
  }
2363
2479
  _parse(input) {
2364
2480
  const parsedType = this._getType(input);
@@ -2408,8 +2524,8 @@ var ZodObject = class _ZodObject extends ZodType {
2408
2524
  });
2409
2525
  status.dirty();
2410
2526
  }
2411
- } else if (unknownKeys === "strip") ;
2412
- else {
2527
+ } else if (unknownKeys === "strip") {
2528
+ } else {
2413
2529
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2414
2530
  }
2415
2531
  } else {
@@ -2456,11 +2572,10 @@ var ZodObject = class _ZodObject extends ZodType {
2456
2572
  unknownKeys: "strict",
2457
2573
  ...message !== void 0 ? {
2458
2574
  errorMap: /* @__PURE__ */ __name((issue, ctx) => {
2459
- var _a, _b, _c, _d;
2460
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
2575
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2461
2576
  if (issue.code === "unrecognized_keys")
2462
2577
  return {
2463
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
2578
+ message: errorUtil.errToObj(message).message ?? defaultError
2464
2579
  };
2465
2580
  return {
2466
2581
  message: defaultError
@@ -2591,11 +2706,11 @@ var ZodObject = class _ZodObject extends ZodType {
2591
2706
  }
2592
2707
  pick(mask) {
2593
2708
  const shape = {};
2594
- util.objectKeys(mask).forEach((key) => {
2709
+ for (const key of util.objectKeys(mask)) {
2595
2710
  if (mask[key] && this.shape[key]) {
2596
2711
  shape[key] = this.shape[key];
2597
2712
  }
2598
- });
2713
+ }
2599
2714
  return new _ZodObject({
2600
2715
  ...this._def,
2601
2716
  shape: /* @__PURE__ */ __name(() => shape, "shape")
@@ -2603,11 +2718,11 @@ var ZodObject = class _ZodObject extends ZodType {
2603
2718
  }
2604
2719
  omit(mask) {
2605
2720
  const shape = {};
2606
- util.objectKeys(this.shape).forEach((key) => {
2721
+ for (const key of util.objectKeys(this.shape)) {
2607
2722
  if (!mask[key]) {
2608
2723
  shape[key] = this.shape[key];
2609
2724
  }
2610
- });
2725
+ }
2611
2726
  return new _ZodObject({
2612
2727
  ...this._def,
2613
2728
  shape: /* @__PURE__ */ __name(() => shape, "shape")
@@ -2621,14 +2736,14 @@ var ZodObject = class _ZodObject extends ZodType {
2621
2736
  }
2622
2737
  partial(mask) {
2623
2738
  const newShape = {};
2624
- util.objectKeys(this.shape).forEach((key) => {
2739
+ for (const key of util.objectKeys(this.shape)) {
2625
2740
  const fieldSchema = this.shape[key];
2626
2741
  if (mask && !mask[key]) {
2627
2742
  newShape[key] = fieldSchema;
2628
2743
  } else {
2629
2744
  newShape[key] = fieldSchema.optional();
2630
2745
  }
2631
- });
2746
+ }
2632
2747
  return new _ZodObject({
2633
2748
  ...this._def,
2634
2749
  shape: /* @__PURE__ */ __name(() => newShape, "shape")
@@ -2636,7 +2751,7 @@ var ZodObject = class _ZodObject extends ZodType {
2636
2751
  }
2637
2752
  required(mask) {
2638
2753
  const newShape = {};
2639
- util.objectKeys(this.shape).forEach((key) => {
2754
+ for (const key of util.objectKeys(this.shape)) {
2640
2755
  if (mask && !mask[key]) {
2641
2756
  newShape[key] = this.shape[key];
2642
2757
  } else {
@@ -2647,7 +2762,7 @@ var ZodObject = class _ZodObject extends ZodType {
2647
2762
  }
2648
2763
  newShape[key] = newField;
2649
2764
  }
2650
- });
2765
+ }
2651
2766
  return new _ZodObject({
2652
2767
  ...this._def,
2653
2768
  shape: /* @__PURE__ */ __name(() => newShape, "shape")
@@ -3290,12 +3405,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3290
3405
  return makeIssue({
3291
3406
  data: args,
3292
3407
  path: ctx.path,
3293
- errorMaps: [
3294
- ctx.common.contextualErrorMap,
3295
- ctx.schemaErrorMap,
3296
- getErrorMap(),
3297
- errorMap
3298
- ].filter((x) => !!x),
3408
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3299
3409
  issueData: {
3300
3410
  code: ZodIssueCode.invalid_arguments,
3301
3411
  argumentsError: error
@@ -3307,12 +3417,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
3307
3417
  return makeIssue({
3308
3418
  data: returns,
3309
3419
  path: ctx.path,
3310
- errorMaps: [
3311
- ctx.common.contextualErrorMap,
3312
- ctx.schemaErrorMap,
3313
- getErrorMap(),
3314
- errorMap
3315
- ].filter((x) => !!x),
3420
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3316
3421
  issueData: {
3317
3422
  code: ZodIssueCode.invalid_return_type,
3318
3423
  returnTypeError: error
@@ -3447,10 +3552,6 @@ var ZodEnum = class _ZodEnum extends ZodType {
3447
3552
  static {
3448
3553
  __name(this, "ZodEnum");
3449
3554
  }
3450
- constructor() {
3451
- super(...arguments);
3452
- _ZodEnum_cache.set(this, void 0);
3453
- }
3454
3555
  _parse(input) {
3455
3556
  if (typeof input.data !== "string") {
3456
3557
  const ctx = this._getOrReturnCtx(input);
@@ -3462,10 +3563,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
3462
3563
  });
3463
3564
  return INVALID;
3464
3565
  }
3465
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
3466
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
3566
+ if (!this._cache) {
3567
+ this._cache = new Set(this._def.values);
3467
3568
  }
3468
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3569
+ if (!this._cache.has(input.data)) {
3469
3570
  const ctx = this._getOrReturnCtx(input);
3470
3571
  const expectedValues = this._def.values;
3471
3572
  addIssueToContext(ctx, {
@@ -3514,16 +3615,11 @@ var ZodEnum = class _ZodEnum extends ZodType {
3514
3615
  });
3515
3616
  }
3516
3617
  };
3517
- _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
3518
3618
  ZodEnum.create = createZodEnum;
3519
3619
  var ZodNativeEnum = class extends ZodType {
3520
3620
  static {
3521
3621
  __name(this, "ZodNativeEnum");
3522
3622
  }
3523
- constructor() {
3524
- super(...arguments);
3525
- _ZodNativeEnum_cache.set(this, void 0);
3526
- }
3527
3623
  _parse(input) {
3528
3624
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
3529
3625
  const ctx = this._getOrReturnCtx(input);
@@ -3536,10 +3632,10 @@ var ZodNativeEnum = class extends ZodType {
3536
3632
  });
3537
3633
  return INVALID;
3538
3634
  }
3539
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
3540
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
3635
+ if (!this._cache) {
3636
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
3541
3637
  }
3542
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3638
+ if (!this._cache.has(input.data)) {
3543
3639
  const expectedValues = util.objectValues(nativeEnumValues);
3544
3640
  addIssueToContext(ctx, {
3545
3641
  received: ctx.data,
@@ -3554,7 +3650,6 @@ var ZodNativeEnum = class extends ZodType {
3554
3650
  return this._def.values;
3555
3651
  }
3556
3652
  };
3557
- _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
3558
3653
  ZodNativeEnum.create = (values, params) => {
3559
3654
  return new ZodNativeEnum({
3560
3655
  values,
@@ -3701,7 +3796,7 @@ var ZodEffects = class extends ZodType {
3701
3796
  parent: ctx
3702
3797
  });
3703
3798
  if (!isValid(base))
3704
- return base;
3799
+ return INVALID;
3705
3800
  const result = effect.transform(base.value, checkCtx);
3706
3801
  if (result instanceof Promise) {
3707
3802
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -3710,8 +3805,11 @@ var ZodEffects = class extends ZodType {
3710
3805
  } else {
3711
3806
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3712
3807
  if (!isValid(base))
3713
- return base;
3714
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3808
+ return INVALID;
3809
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3810
+ status: status.value,
3811
+ value: result
3812
+ }));
3715
3813
  });
3716
3814
  }
3717
3815
  }
@@ -3996,21 +4094,19 @@ __name(cleanParams, "cleanParams");
3996
4094
  function custom(check, _params = {}, fatal) {
3997
4095
  if (check)
3998
4096
  return ZodAny.create().superRefine((data, ctx) => {
3999
- var _a, _b;
4000
4097
  const r = check(data);
4001
4098
  if (r instanceof Promise) {
4002
4099
  return r.then((r2) => {
4003
- var _a2, _b2;
4004
4100
  if (!r2) {
4005
4101
  const params = cleanParams(_params, data);
4006
- const _fatal = (_b2 = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
4102
+ const _fatal = params.fatal ?? fatal ?? true;
4007
4103
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4008
4104
  }
4009
4105
  });
4010
4106
  }
4011
4107
  if (!r) {
4012
4108
  const params = cleanParams(_params, data);
4013
- const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4109
+ const _fatal = params.fatal ?? fatal ?? true;
4014
4110
  ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4015
4111
  }
4016
4112
  return;
@@ -4111,132 +4207,16 @@ var coerce = {
4111
4207
  date: /* @__PURE__ */ __name((arg) => ZodDate.create({ ...arg, coerce: true }), "date")
4112
4208
  };
4113
4209
  var NEVER = INVALID;
4114
- var z = Object.freeze({
4115
- __proto__: null,
4116
- defaultErrorMap: errorMap,
4117
- setErrorMap,
4118
- getErrorMap,
4119
- makeIssue,
4120
- EMPTY_PATH,
4121
- addIssueToContext,
4122
- ParseStatus,
4123
- INVALID,
4124
- DIRTY,
4125
- OK,
4126
- isAborted,
4127
- isDirty,
4128
- isValid,
4129
- isAsync,
4130
- get util() {
4131
- return util;
4132
- },
4133
- get objectUtil() {
4134
- return objectUtil;
4135
- },
4136
- ZodParsedType,
4137
- getParsedType,
4138
- ZodType,
4139
- datetimeRegex,
4140
- ZodString,
4141
- ZodNumber,
4142
- ZodBigInt,
4143
- ZodBoolean,
4144
- ZodDate,
4145
- ZodSymbol,
4146
- ZodUndefined,
4147
- ZodNull,
4148
- ZodAny,
4149
- ZodUnknown,
4150
- ZodNever,
4151
- ZodVoid,
4152
- ZodArray,
4153
- ZodObject,
4154
- ZodUnion,
4155
- ZodDiscriminatedUnion,
4156
- ZodIntersection,
4157
- ZodTuple,
4158
- ZodRecord,
4159
- ZodMap,
4160
- ZodSet,
4161
- ZodFunction,
4162
- ZodLazy,
4163
- ZodLiteral,
4164
- ZodEnum,
4165
- ZodNativeEnum,
4166
- ZodPromise,
4167
- ZodEffects,
4168
- ZodTransformer: ZodEffects,
4169
- ZodOptional,
4170
- ZodNullable,
4171
- ZodDefault,
4172
- ZodCatch,
4173
- ZodNaN,
4174
- BRAND,
4175
- ZodBranded,
4176
- ZodPipeline,
4177
- ZodReadonly,
4178
- custom,
4179
- Schema: ZodType,
4180
- ZodSchema: ZodType,
4181
- late,
4182
- get ZodFirstPartyTypeKind() {
4183
- return ZodFirstPartyTypeKind;
4184
- },
4185
- coerce,
4186
- any: anyType,
4187
- array: arrayType,
4188
- bigint: bigIntType,
4189
- boolean: booleanType,
4190
- date: dateType,
4191
- discriminatedUnion: discriminatedUnionType,
4192
- effect: effectsType,
4193
- "enum": enumType,
4194
- "function": functionType,
4195
- "instanceof": instanceOfType,
4196
- intersection: intersectionType,
4197
- lazy: lazyType,
4198
- literal: literalType,
4199
- map: mapType,
4200
- nan: nanType,
4201
- nativeEnum: nativeEnumType,
4202
- never: neverType,
4203
- "null": nullType,
4204
- nullable: nullableType,
4205
- number: numberType,
4206
- object: objectType,
4207
- oboolean,
4208
- onumber,
4209
- optional: optionalType,
4210
- ostring,
4211
- pipeline: pipelineType,
4212
- preprocess: preprocessType,
4213
- promise: promiseType,
4214
- record: recordType,
4215
- set: setType,
4216
- strictObject: strictObjectType,
4217
- string: stringType,
4218
- symbol: symbolType,
4219
- transformer: effectsType,
4220
- tuple: tupleType,
4221
- "undefined": undefinedType,
4222
- union: unionType,
4223
- unknown: unknownType,
4224
- "void": voidType,
4225
- NEVER,
4226
- ZodIssueCode,
4227
- quotelessJson,
4228
- ZodError
4229
- });
4230
4210
 
4231
4211
  // src/cli/globalSettings.ts
4232
4212
  var DEFAULT_SETTINGS_PATH = join(homedir(), ".storybook", "settings.json");
4233
4213
  var VERSION = 1;
4234
- var userSettingSchema = z.object({
4235
- version: z.number(),
4214
+ var userSettingSchema = external_exports.object({
4215
+ version: external_exports.number(),
4236
4216
  // NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
4237
4217
  // (we can remove keys once they are deprecated)
4238
- userSince: z.number().optional(),
4239
- init: z.object({ skipOnboarding: z.boolean().optional() }).optional()
4218
+ userSince: external_exports.number().optional(),
4219
+ init: external_exports.object({ skipOnboarding: external_exports.boolean().optional() }).optional()
4240
4220
  });
4241
4221
  var settings;
4242
4222
  async function globalSettings(filePath = DEFAULT_SETTINGS_PATH) {