@loomhelm/multi-task-flow 0.2.7 → 0.2.8

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 (1005) hide show
  1. package/README.md +12 -8
  2. package/package.json +2 -12
  3. package/src/build-info.ts +4 -2
  4. package/src/cli/release.ts +4 -40
  5. package/src/release-tarball.ts +1 -1
  6. package/src/release.ts +7 -1
  7. package/src/runtime-identity.ts +4 -2
  8. package/src/toolkit.ts +71 -15
  9. package/toolkit/artifact-manifest.json +297 -4200
  10. package/toolkit/package.json +1 -1
  11. package/toolkit/skills/docs/vendor/dot-codex/design/multi-task-flow/data-and-scripts.md +77 -23
  12. package/toolkit/skills/multi-task-flow/dist/app.css +1 -1
  13. package/toolkit/skills/multi-task-flow/dist/app.js +64 -64
  14. package/toolkit/skills/multi-task-flow/lib/atomic-orchestration.ts +25 -3
  15. package/toolkit/skills/multi-task-flow/lib/engine.ts +71 -10
  16. package/toolkit/skills/multi-task-flow/lib/view.ts +109 -11
  17. package/toolkit/skills/multi-task-flow/scripts/package-client-skills.ts +24 -153
  18. package/toolkit/skills/multi-task-flow/scripts/preview-source.ts +3 -0
  19. package/toolkit/skills/multi-task-flow/tests/atomic-orchestration-schema.test.ts +35 -0
  20. package/toolkit/skills/multi-task-flow/tests/engine.test.ts +339 -0
  21. package/toolkit/skills/multi-task-flow/tests/source-preview.test.ts +29 -0
  22. package/toolkit/skills/multi-task-flow/tests/ui/details-content.test.ts +22 -0
  23. package/toolkit/skills/multi-task-flow/tests/view.test.ts +149 -0
  24. package/toolkit/skills/multi-task-flow/web/app.css +4 -0
  25. package/toolkit/skills/multi-task-flow/web/app.ts +9 -1
  26. package/toolkit/skills/multi-task-flow/web/atomic-graph-view.tsx +1 -1
  27. package/toolkit/skills/multi-task-flow/web/details-content.ts +7 -2
  28. package/toolkit/skills/source-manifest.json +17 -17
  29. package/toolkit/skills/multi-task-flow/node_modules/zod/LICENSE +0 -21
  30. package/toolkit/skills/multi-task-flow/node_modules/zod/README.md +0 -218
  31. package/toolkit/skills/multi-task-flow/node_modules/zod/compile.cjs +0 -96
  32. package/toolkit/skills/multi-task-flow/node_modules/zod/compile.d.cts +0 -1
  33. package/toolkit/skills/multi-task-flow/node_modules/zod/compile.d.ts +0 -1
  34. package/toolkit/skills/multi-task-flow/node_modules/zod/compile.js +0 -52
  35. package/toolkit/skills/multi-task-flow/node_modules/zod/index.cjs +0 -52
  36. package/toolkit/skills/multi-task-flow/node_modules/zod/index.d.cts +0 -3
  37. package/toolkit/skills/multi-task-flow/node_modules/zod/index.d.ts +0 -3
  38. package/toolkit/skills/multi-task-flow/node_modules/zod/index.js +0 -7
  39. package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.cjs +0 -36
  40. package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.d.cts +0 -1
  41. package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.d.ts +0 -1
  42. package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.js +0 -1
  43. package/toolkit/skills/multi-task-flow/node_modules/zod/locales/package.json +0 -7
  44. package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.cjs +0 -51
  45. package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.d.cts +0 -3
  46. package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.d.ts +0 -3
  47. package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.js +0 -3
  48. package/toolkit/skills/multi-task-flow/node_modules/zod/mini/package.json +0 -7
  49. package/toolkit/skills/multi-task-flow/node_modules/zod/package.json +0 -147
  50. package/toolkit/skills/multi-task-flow/node_modules/zod/src/compile.ts +0 -56
  51. package/toolkit/skills/multi-task-flow/node_modules/zod/src/index.ts +0 -7
  52. package/toolkit/skills/multi-task-flow/node_modules/zod/src/locales/index.ts +0 -1
  53. package/toolkit/skills/multi-task-flow/node_modules/zod/src/mini/index.ts +0 -3
  54. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/ZodError.ts +0 -340
  55. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  56. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  57. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  58. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  59. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  60. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  61. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  62. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  63. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  64. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/errors.ts +0 -13
  65. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/external.ts +0 -6
  66. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  67. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  68. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  69. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  70. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  71. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/util.ts +0 -224
  72. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/index.ts +0 -4
  73. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/locales/en.ts +0 -124
  74. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/standard-schema.ts +0 -113
  75. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  76. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  77. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  78. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  79. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  80. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  81. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  82. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  83. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  84. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  85. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  86. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  87. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  88. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  89. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  90. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  91. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  92. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  93. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  94. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/error.test.ts +0 -586
  95. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  96. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  97. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  98. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  99. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  100. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/intersection.test.ts +0 -128
  101. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  102. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/language-server.test.ts +0 -206
  103. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  104. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  105. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  106. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  107. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  108. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  109. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  110. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  111. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  112. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  113. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object.test.ts +0 -431
  114. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  115. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  116. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  117. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  118. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  119. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  120. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  121. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  122. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  123. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/readonly.test.ts +0 -114
  124. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  125. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  126. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  127. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  128. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  129. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  130. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/string.test.ts +0 -922
  131. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  132. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  133. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  134. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  135. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  136. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/types.ts +0 -5138
  137. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/checks.ts +0 -33
  138. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  139. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/compat.ts +0 -78
  140. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/deep-partial.ts +0 -76
  141. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/errors.ts +0 -97
  142. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/external.ts +0 -57
  143. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -944
  144. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/in-out.ts +0 -45
  145. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/index.ts +0 -5
  146. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/iso.ts +0 -20
  147. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/parse.ts +0 -88
  148. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/schemas.ts +0 -2937
  149. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  150. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -86
  151. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -291
  152. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -402
  153. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  154. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  155. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  156. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -89
  157. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  158. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -604
  159. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  160. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -572
  161. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -704
  162. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  163. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  164. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +0 -76
  165. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  166. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +0 -985
  167. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -92
  168. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -316
  169. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +0 -380
  170. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +0 -32
  171. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -455
  172. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  173. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  174. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -221
  175. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -942
  176. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -305
  177. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -917
  178. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -1108
  179. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  180. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  181. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  182. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -1467
  183. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -391
  184. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  185. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -32
  186. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -67
  187. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/iban.test.ts +0 -81
  188. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/in-out.test.ts +0 -159
  189. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -958
  190. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +0 -319
  191. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -127
  192. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -334
  193. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +0 -215
  194. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -39
  195. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  196. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -262
  197. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -128
  198. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  199. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  200. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -349
  201. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  202. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  203. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  204. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  205. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -401
  206. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -1006
  207. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +0 -235
  208. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -366
  209. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -497
  210. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  211. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  212. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -144
  213. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -44
  214. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  215. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  216. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  217. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/properties.test.ts +0 -141
  218. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  219. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -184
  220. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -885
  221. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -707
  222. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/redos.test.ts +0 -68
  223. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -693
  224. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  225. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -196
  226. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -153
  227. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  228. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1440
  229. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -124
  230. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -812
  231. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  232. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -4733
  233. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  234. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -511
  235. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -310
  236. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  237. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/validate.test.ts +0 -645
  238. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  239. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  240. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/api.ts +0 -1875
  241. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/checks.ts +0 -1266
  242. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/compile.ts +0 -2322
  243. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/core.ts +0 -230
  244. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/doc.ts +0 -52
  245. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/errors.ts +0 -543
  246. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/index.ts +0 -19
  247. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -131
  248. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -934
  249. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema.ts +0 -148
  250. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/memoizer.ts +0 -331
  251. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/parse.ts +0 -309
  252. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/regexes.ts +0 -217
  253. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/registries.ts +0 -105
  254. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/schemas.ts +0 -5226
  255. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  256. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/cached.test.ts +0 -54
  257. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +0 -1004
  258. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +0 -445
  259. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-global.test.ts +0 -89
  260. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +0 -26
  261. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +0 -34
  262. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile.test.ts +0 -2036
  263. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/email-regex.test.ts +0 -140
  264. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  265. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  266. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  267. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -214
  268. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  269. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -180
  270. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  271. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  272. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  273. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  274. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +0 -42
  275. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  276. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +0 -85
  277. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +0 -69
  278. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  279. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  280. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +0 -46
  281. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  282. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  283. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/treeshake.test.ts +0 -51
  284. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +0 -133
  285. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/to-json-schema.ts +0 -857
  286. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/util.ts +0 -1293
  287. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/versions.ts +0 -5
  288. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/visit.ts +0 -193
  289. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/zsf.ts +0 -323
  290. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/index.ts +0 -4
  291. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ar.ts +0 -120
  292. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/az.ts +0 -116
  293. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/be.ts +0 -188
  294. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/bg.ts +0 -133
  295. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/bn.ts +0 -123
  296. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ca.ts +0 -121
  297. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ckb.ts +0 -140
  298. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/cs.ts +0 -123
  299. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/da.ts +0 -128
  300. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/de.ts +0 -121
  301. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/el.ts +0 -124
  302. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/en.ts +0 -136
  303. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/eo.ts +0 -123
  304. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/es.ts +0 -145
  305. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fa.ts +0 -131
  306. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fi.ts +0 -126
  307. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fr-CA.ts +0 -121
  308. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fr.ts +0 -139
  309. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/gu.ts +0 -123
  310. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/he.ts +0 -253
  311. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hi.ts +0 -126
  312. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hr.ts +0 -135
  313. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hu.ts +0 -122
  314. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hy.ts +0 -175
  315. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/id.ts +0 -120
  316. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/index.ts +0 -63
  317. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/is.ts +0 -124
  318. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/it.ts +0 -121
  319. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ja.ts +0 -119
  320. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ka.ts +0 -128
  321. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/kh.ts +0 -7
  322. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/km.ts +0 -124
  323. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/kn.ts +0 -126
  324. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ko.ts +0 -126
  325. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/lt.ts +0 -243
  326. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/mk.ts +0 -123
  327. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ms.ts +0 -120
  328. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ne.ts +0 -128
  329. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/nl.ts +0 -126
  330. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/nn.ts +0 -121
  331. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/no.ts +0 -121
  332. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ota.ts +0 -122
  333. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pl.ts +0 -123
  334. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ps.ts +0 -131
  335. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pt-BR.ts +0 -161
  336. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pt.ts +0 -159
  337. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ro.ts +0 -132
  338. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ru.ts +0 -188
  339. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sk.ts +0 -123
  340. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sl.ts +0 -123
  341. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sv.ts +0 -124
  342. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ta.ts +0 -123
  343. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tg.ts +0 -135
  344. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/th.ts +0 -124
  345. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tk.ts +0 -113
  346. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tr.ts +0 -116
  347. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ua.ts +0 -7
  348. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/uk.ts +0 -122
  349. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ur.ts +0 -124
  350. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/uz.ts +0 -120
  351. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/vi.ts +0 -122
  352. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/yo.ts +0 -129
  353. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/zh-CN.ts +0 -121
  354. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/zh-TW.ts +0 -120
  355. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/checks.ts +0 -33
  356. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  357. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/deep-partial.ts +0 -73
  358. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/external.ts +0 -52
  359. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/in-out.ts +0 -45
  360. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/index.ts +0 -3
  361. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/iso.ts +0 -66
  362. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/parse.ts +0 -16
  363. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/schemas.ts +0 -2051
  364. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -57
  365. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -190
  366. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  367. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -158
  368. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -582
  369. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -30
  370. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +0 -84
  371. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +0 -54
  372. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -41
  373. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -14
  374. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -1146
  375. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -109
  376. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -292
  377. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  378. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -341
  379. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  380. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -396
  381. package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4-mini/index.ts +0 -3
  382. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.cjs +0 -167
  383. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.d.cts +0 -164
  384. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.d.ts +0 -164
  385. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.js +0 -143
  386. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.cjs +0 -36
  387. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.d.cts +0 -5
  388. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.d.ts +0 -5
  389. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.js +0 -9
  390. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.cjs +0 -41
  391. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.d.cts +0 -6
  392. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.d.ts +0 -6
  393. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.js +0 -6
  394. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.cjs +0 -21
  395. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  396. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  397. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  398. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.cjs +0 -28
  399. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  400. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  401. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  402. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.cjs +0 -143
  403. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  404. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  405. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  406. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.cjs +0 -21
  407. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  408. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  409. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  410. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.cjs +0 -21
  411. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  412. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  413. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  414. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.cjs +0 -156
  415. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.d.cts +0 -85
  416. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.d.ts +0 -85
  417. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.js +0 -133
  418. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.cjs +0 -52
  419. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.d.cts +0 -4
  420. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.d.ts +0 -4
  421. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.js +0 -4
  422. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.cjs +0 -112
  423. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.d.cts +0 -3
  424. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.d.ts +0 -3
  425. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.js +0 -109
  426. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/package.json +0 -7
  427. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.cjs +0 -21
  428. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.d.cts +0 -102
  429. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.d.ts +0 -102
  430. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.js +0 -1
  431. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.cjs +0 -3798
  432. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.d.cts +0 -1034
  433. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.d.ts +0 -1034
  434. package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.js +0 -3697
  435. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.cjs +0 -53
  436. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.d.cts +0 -1
  437. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.d.ts +0 -1
  438. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.js +0 -1
  439. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.cjs +0 -66
  440. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  441. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  442. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.js +0 -17
  443. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.cjs +0 -80
  444. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.d.cts +0 -48
  445. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.d.ts +0 -48
  446. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.js +0 -31
  447. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.cjs +0 -58
  448. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.d.cts +0 -14
  449. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.d.ts +0 -14
  450. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.js +0 -13
  451. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.cjs +0 -102
  452. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.d.cts +0 -29
  453. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.d.ts +0 -29
  454. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.js +0 -57
  455. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.cjs +0 -97
  456. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.d.cts +0 -19
  457. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.d.ts +0 -19
  458. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.js +0 -17
  459. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.cjs +0 -926
  460. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  461. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  462. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.js +0 -881
  463. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.cjs +0 -82
  464. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.d.cts +0 -8
  465. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.d.ts +0 -8
  466. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.js +0 -36
  467. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.cjs +0 -52
  468. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.d.cts +0 -3
  469. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.d.ts +0 -3
  470. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.js +0 -4
  471. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.cjs +0 -68
  472. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.d.cts +0 -7
  473. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.d.ts +0 -7
  474. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.js +0 -15
  475. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/package.json +0 -7
  476. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.cjs +0 -63
  477. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.d.cts +0 -44
  478. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.d.ts +0 -44
  479. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.js +0 -16
  480. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.cjs +0 -1676
  481. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.d.cts +0 -816
  482. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.d.ts +0 -816
  483. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.js +0 -1535
  484. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.cjs +0 -1269
  485. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.d.cts +0 -335
  486. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.d.ts +0 -335
  487. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.js +0 -1107
  488. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.cjs +0 -561
  489. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.d.cts +0 -294
  490. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.d.ts +0 -294
  491. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.js +0 -516
  492. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.cjs +0 -1916
  493. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.d.cts +0 -65
  494. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.d.ts +0 -65
  495. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.js +0 -1866
  496. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.cjs +0 -167
  497. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.d.cts +0 -82
  498. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.d.ts +0 -82
  499. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.js +0 -141
  500. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.cjs +0 -61
  501. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.d.cts +0 -16
  502. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.d.ts +0 -16
  503. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.js +0 -38
  504. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.cjs +0 -317
  505. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.d.cts +0 -225
  506. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.d.ts +0 -225
  507. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.js +0 -267
  508. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.cjs +0 -70
  509. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.d.cts +0 -19
  510. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.d.ts +0 -19
  511. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.js +0 -19
  512. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.cjs +0 -122
  513. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  514. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  515. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.js +0 -99
  516. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.cjs +0 -929
  517. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -65
  518. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -65
  519. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.js +0 -843
  520. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.cjs +0 -21
  521. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.d.cts +0 -89
  522. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.d.ts +0 -89
  523. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.js +0 -1
  524. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.cjs +0 -360
  525. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.d.cts +0 -15
  526. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.d.ts +0 -15
  527. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.js +0 -311
  528. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/package.json +0 -7
  529. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.cjs +0 -233
  530. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.d.cts +0 -52
  531. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.d.ts +0 -52
  532. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.js +0 -175
  533. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.cjs +0 -209
  534. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.d.cts +0 -90
  535. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.d.ts +0 -90
  536. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.js +0 -156
  537. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.cjs +0 -75
  538. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.d.cts +0 -35
  539. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.d.ts +0 -35
  540. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.js +0 -51
  541. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.cjs +0 -2699
  542. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.d.cts +0 -1275
  543. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.d.ts +0 -1275
  544. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.js +0 -2636
  545. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.cjs +0 -21
  546. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  547. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  548. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.js +0 -1
  549. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.cjs +0 -681
  550. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.d.cts +0 -154
  551. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.d.ts +0 -154
  552. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.js +0 -651
  553. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.cjs +0 -964
  554. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.d.cts +0 -280
  555. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.d.ts +0 -280
  556. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.js +0 -873
  557. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.cjs +0 -27
  558. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.d.cts +0 -5
  559. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.d.ts +0 -5
  560. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.js +0 -5
  561. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.cjs +0 -214
  562. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.d.cts +0 -30
  563. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.d.ts +0 -30
  564. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.js +0 -169
  565. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.cjs +0 -51
  566. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.d.cts +0 -3
  567. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.d.ts +0 -3
  568. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.js +0 -4
  569. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.cjs +0 -138
  570. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.d.cts +0 -5
  571. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.d.ts +0 -4
  572. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.js +0 -111
  573. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.cjs +0 -137
  574. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.d.cts +0 -5
  575. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.d.ts +0 -4
  576. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.js +0 -110
  577. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.cjs +0 -195
  578. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.d.cts +0 -5
  579. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.d.ts +0 -4
  580. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.js +0 -168
  581. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.cjs +0 -152
  582. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.d.cts +0 -5
  583. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.d.ts +0 -4
  584. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.js +0 -125
  585. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.cjs +0 -140
  586. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.d.cts +0 -5
  587. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.d.ts +0 -4
  588. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.js +0 -113
  589. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.cjs +0 -139
  590. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.d.cts +0 -5
  591. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.d.ts +0 -4
  592. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.js +0 -112
  593. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.cjs +0 -160
  594. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.d.cts +0 -5
  595. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.d.ts +0 -4
  596. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.js +0 -133
  597. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.cjs +0 -143
  598. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.d.cts +0 -5
  599. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.d.ts +0 -4
  600. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.js +0 -116
  601. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.cjs +0 -147
  602. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.d.cts +0 -5
  603. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.d.ts +0 -4
  604. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.js +0 -120
  605. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.cjs +0 -140
  606. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.d.cts +0 -5
  607. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.d.ts +0 -4
  608. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.js +0 -113
  609. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.cjs +0 -139
  610. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.d.cts +0 -5
  611. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.d.ts +0 -4
  612. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.js +0 -112
  613. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.cjs +0 -152
  614. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.d.cts +0 -5
  615. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.d.ts +0 -4
  616. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.js +0 -125
  617. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.cjs +0 -141
  618. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.d.cts +0 -5
  619. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.d.ts +0 -4
  620. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.js +0 -114
  621. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.cjs +0 -163
  622. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.d.cts +0 -5
  623. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.d.ts +0 -4
  624. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.js +0 -136
  625. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.cjs +0 -146
  626. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.d.cts +0 -5
  627. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.d.ts +0 -4
  628. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.js +0 -119
  629. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.cjs +0 -144
  630. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.d.cts +0 -5
  631. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.d.ts +0 -4
  632. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.js +0 -117
  633. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.cjs +0 -139
  634. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  635. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  636. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.js +0 -112
  637. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.cjs +0 -156
  638. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.d.cts +0 -5
  639. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.d.ts +0 -4
  640. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.js +0 -129
  641. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.cjs +0 -140
  642. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.d.cts +0 -5
  643. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.d.ts +0 -4
  644. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.js +0 -113
  645. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.cjs +0 -248
  646. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.d.cts +0 -5
  647. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.d.ts +0 -4
  648. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.js +0 -221
  649. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.cjs +0 -138
  650. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.d.cts +0 -5
  651. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.d.ts +0 -4
  652. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.js +0 -111
  653. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.cjs +0 -153
  654. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.d.cts +0 -5
  655. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.d.ts +0 -4
  656. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.js +0 -126
  657. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.cjs +0 -140
  658. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.d.cts +0 -5
  659. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.d.ts +0 -4
  660. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.js +0 -113
  661. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.cjs +0 -185
  662. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.d.cts +0 -5
  663. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.d.ts +0 -4
  664. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.js +0 -158
  665. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.cjs +0 -138
  666. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.d.cts +0 -5
  667. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.d.ts +0 -4
  668. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.js +0 -111
  669. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.cjs +0 -152
  670. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.d.cts +0 -63
  671. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.d.ts +0 -63
  672. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.js +0 -63
  673. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.cjs +0 -141
  674. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.d.cts +0 -5
  675. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.d.ts +0 -4
  676. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.js +0 -114
  677. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.cjs +0 -140
  678. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.d.cts +0 -5
  679. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.d.ts +0 -4
  680. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.js +0 -113
  681. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.cjs +0 -139
  682. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.d.cts +0 -5
  683. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.d.ts +0 -4
  684. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.js +0 -112
  685. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.cjs +0 -144
  686. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.d.cts +0 -5
  687. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.d.ts +0 -4
  688. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.js +0 -117
  689. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.cjs +0 -12
  690. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.d.cts +0 -5
  691. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.d.ts +0 -5
  692. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.js +0 -5
  693. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.cjs +0 -142
  694. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.d.cts +0 -5
  695. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.d.ts +0 -4
  696. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.js +0 -115
  697. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.cjs +0 -143
  698. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.d.cts +0 -5
  699. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.d.ts +0 -4
  700. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.js +0 -116
  701. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.cjs +0 -143
  702. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.d.cts +0 -5
  703. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.d.ts +0 -4
  704. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.js +0 -116
  705. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.cjs +0 -234
  706. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.d.cts +0 -5
  707. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.d.ts +0 -4
  708. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.js +0 -207
  709. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.cjs +0 -141
  710. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.d.cts +0 -5
  711. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.d.ts +0 -4
  712. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.js +0 -114
  713. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.cjs +0 -139
  714. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.d.cts +0 -5
  715. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.d.ts +0 -4
  716. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.js +0 -112
  717. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.cjs +0 -138
  718. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.d.cts +0 -5
  719. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.d.ts +0 -4
  720. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.js +0 -111
  721. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.cjs +0 -142
  722. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.d.cts +0 -5
  723. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.d.ts +0 -4
  724. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.js +0 -115
  725. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.cjs +0 -140
  726. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.d.cts +0 -5
  727. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.d.ts +0 -4
  728. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.js +0 -113
  729. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.cjs +0 -140
  730. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.d.cts +0 -5
  731. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.d.ts +0 -4
  732. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.js +0 -113
  733. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.cjs +0 -141
  734. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.d.cts +0 -5
  735. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.d.ts +0 -4
  736. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.js +0 -114
  737. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/package.json +0 -7
  738. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.cjs +0 -141
  739. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.d.cts +0 -5
  740. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.d.ts +0 -4
  741. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.js +0 -114
  742. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.cjs +0 -146
  743. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.d.cts +0 -5
  744. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.d.ts +0 -4
  745. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.js +0 -119
  746. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.cjs +0 -170
  747. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.d.cts +0 -5
  748. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.d.ts +0 -4
  749. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.js +0 -143
  750. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.cjs +0 -169
  751. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.d.cts +0 -5
  752. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.d.ts +0 -4
  753. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.js +0 -142
  754. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.cjs +0 -149
  755. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.d.cts +0 -5
  756. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.d.ts +0 -4
  757. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.js +0 -122
  758. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.cjs +0 -195
  759. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.d.cts +0 -5
  760. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.d.ts +0 -4
  761. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.js +0 -168
  762. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.cjs +0 -143
  763. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.d.cts +0 -5
  764. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.d.ts +0 -4
  765. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.js +0 -116
  766. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.cjs +0 -141
  767. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.d.cts +0 -5
  768. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.d.ts +0 -4
  769. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.js +0 -114
  770. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.cjs +0 -142
  771. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.d.cts +0 -5
  772. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.d.ts +0 -4
  773. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.js +0 -115
  774. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.cjs +0 -142
  775. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.d.cts +0 -5
  776. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.d.ts +0 -4
  777. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.js +0 -115
  778. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.cjs +0 -144
  779. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.d.cts +0 -5
  780. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.d.ts +0 -4
  781. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.js +0 -117
  782. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.cjs +0 -142
  783. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.d.cts +0 -5
  784. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.d.ts +0 -4
  785. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.js +0 -115
  786. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.cjs +0 -134
  787. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.d.cts +0 -5
  788. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.d.ts +0 -4
  789. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.js +0 -107
  790. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.cjs +0 -137
  791. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.d.cts +0 -5
  792. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.d.ts +0 -4
  793. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.js +0 -110
  794. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.cjs +0 -12
  795. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.d.cts +0 -5
  796. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.d.ts +0 -5
  797. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.js +0 -5
  798. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.cjs +0 -140
  799. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.d.cts +0 -5
  800. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.d.ts +0 -4
  801. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.js +0 -113
  802. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.cjs +0 -142
  803. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.d.cts +0 -5
  804. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.d.ts +0 -4
  805. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.js +0 -115
  806. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.cjs +0 -140
  807. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.d.cts +0 -5
  808. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.d.ts +0 -4
  809. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.js +0 -113
  810. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.cjs +0 -140
  811. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.d.cts +0 -5
  812. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.d.ts +0 -4
  813. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.js +0 -113
  814. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.cjs +0 -139
  815. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.d.cts +0 -5
  816. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.d.ts +0 -4
  817. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.js +0 -112
  818. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.cjs +0 -141
  819. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  820. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  821. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.js +0 -114
  822. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.cjs +0 -139
  823. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  824. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  825. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.js +0 -112
  826. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.cjs +0 -54
  827. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.d.cts +0 -1
  828. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.d.ts +0 -1
  829. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.js +0 -1
  830. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.cjs +0 -71
  831. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  832. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  833. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.js +0 -22
  834. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.cjs +0 -58
  835. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.d.cts +0 -14
  836. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.d.ts +0 -14
  837. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.js +0 -13
  838. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.cjs +0 -95
  839. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.d.cts +0 -16
  840. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.d.ts +0 -16
  841. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.js +0 -16
  842. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.cjs +0 -82
  843. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.d.cts +0 -8
  844. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.d.ts +0 -8
  845. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.js +0 -36
  846. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.cjs +0 -51
  847. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.d.cts +0 -3
  848. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.d.ts +0 -3
  849. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.js +0 -3
  850. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.cjs +0 -83
  851. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.d.cts +0 -22
  852. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.d.ts +0 -22
  853. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.js +0 -34
  854. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/package.json +0 -7
  855. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.cjs +0 -37
  856. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.d.cts +0 -1
  857. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.d.ts +0 -1
  858. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.js +0 -1
  859. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.cjs +0 -1147
  860. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.d.cts +0 -480
  861. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.d.ts +0 -480
  862. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.js +0 -1002
  863. package/toolkit/skills/multi-task-flow/node_modules/zod/v4/package.json +0 -7
  864. package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.cjs +0 -51
  865. package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.d.cts +0 -3
  866. package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.d.ts +0 -3
  867. package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.js +0 -3
  868. package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/package.json +0 -7
  869. package/toolkit/skills/node_modules/@img/colour/LICENSE.md +0 -82
  870. package/toolkit/skills/node_modules/@img/colour/README.md +0 -15
  871. package/toolkit/skills/node_modules/@img/colour/color.cjs +0 -1596
  872. package/toolkit/skills/node_modules/@img/colour/index.cjs +0 -1
  873. package/toolkit/skills/node_modules/@img/colour/index.d.ts +0 -929
  874. package/toolkit/skills/node_modules/@img/colour/package.json +0 -58
  875. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
  876. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -219
  877. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
  878. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.18.7 +0 -0
  879. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -43
  880. package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
  881. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
  882. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -219
  883. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
  884. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.18.7 +0 -0
  885. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -43
  886. package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
  887. package/toolkit/skills/node_modules/@img/sharp-linux-x64/LICENSE +0 -191
  888. package/toolkit/skills/node_modules/@img/sharp-linux-x64/README.md +0 -18
  889. package/toolkit/skills/node_modules/@img/sharp-linux-x64/index.cjs +0 -2
  890. package/toolkit/skills/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64-0.35.5.node +0 -0
  891. package/toolkit/skills/node_modules/@img/sharp-linux-x64/package.json +0 -47
  892. package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/LICENSE +0 -191
  893. package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/README.md +0 -18
  894. package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/index.cjs +0 -2
  895. package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64-0.35.5.node +0 -0
  896. package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -47
  897. package/toolkit/skills/node_modules/detect-libc/LICENSE +0 -201
  898. package/toolkit/skills/node_modules/detect-libc/README.md +0 -163
  899. package/toolkit/skills/node_modules/detect-libc/index.d.ts +0 -14
  900. package/toolkit/skills/node_modules/detect-libc/lib/detect-libc.js +0 -313
  901. package/toolkit/skills/node_modules/detect-libc/lib/elf.js +0 -39
  902. package/toolkit/skills/node_modules/detect-libc/lib/filesystem.js +0 -51
  903. package/toolkit/skills/node_modules/detect-libc/lib/process.js +0 -24
  904. package/toolkit/skills/node_modules/detect-libc/package.json +0 -44
  905. package/toolkit/skills/node_modules/semver/LICENSE +0 -15
  906. package/toolkit/skills/node_modules/semver/README.md +0 -680
  907. package/toolkit/skills/node_modules/semver/bin/semver.js +0 -195
  908. package/toolkit/skills/node_modules/semver/classes/comparator.js +0 -143
  909. package/toolkit/skills/node_modules/semver/classes/index.js +0 -7
  910. package/toolkit/skills/node_modules/semver/classes/range.js +0 -577
  911. package/toolkit/skills/node_modules/semver/classes/semver.js +0 -350
  912. package/toolkit/skills/node_modules/semver/functions/clean.js +0 -8
  913. package/toolkit/skills/node_modules/semver/functions/cmp.js +0 -54
  914. package/toolkit/skills/node_modules/semver/functions/coerce.js +0 -62
  915. package/toolkit/skills/node_modules/semver/functions/compare-build.js +0 -9
  916. package/toolkit/skills/node_modules/semver/functions/compare-loose.js +0 -5
  917. package/toolkit/skills/node_modules/semver/functions/compare.js +0 -7
  918. package/toolkit/skills/node_modules/semver/functions/diff.js +0 -60
  919. package/toolkit/skills/node_modules/semver/functions/eq.js +0 -5
  920. package/toolkit/skills/node_modules/semver/functions/gt.js +0 -5
  921. package/toolkit/skills/node_modules/semver/functions/gte.js +0 -5
  922. package/toolkit/skills/node_modules/semver/functions/inc.js +0 -21
  923. package/toolkit/skills/node_modules/semver/functions/lt.js +0 -5
  924. package/toolkit/skills/node_modules/semver/functions/lte.js +0 -5
  925. package/toolkit/skills/node_modules/semver/functions/major.js +0 -5
  926. package/toolkit/skills/node_modules/semver/functions/minor.js +0 -5
  927. package/toolkit/skills/node_modules/semver/functions/neq.js +0 -5
  928. package/toolkit/skills/node_modules/semver/functions/parse.js +0 -18
  929. package/toolkit/skills/node_modules/semver/functions/patch.js +0 -5
  930. package/toolkit/skills/node_modules/semver/functions/prerelease.js +0 -8
  931. package/toolkit/skills/node_modules/semver/functions/rcompare.js +0 -5
  932. package/toolkit/skills/node_modules/semver/functions/rsort.js +0 -5
  933. package/toolkit/skills/node_modules/semver/functions/satisfies.js +0 -12
  934. package/toolkit/skills/node_modules/semver/functions/sort.js +0 -5
  935. package/toolkit/skills/node_modules/semver/functions/truncate.js +0 -48
  936. package/toolkit/skills/node_modules/semver/functions/valid.js +0 -8
  937. package/toolkit/skills/node_modules/semver/index.js +0 -93
  938. package/toolkit/skills/node_modules/semver/internal/constants.js +0 -67
  939. package/toolkit/skills/node_modules/semver/internal/debug.js +0 -11
  940. package/toolkit/skills/node_modules/semver/internal/identifiers.js +0 -29
  941. package/toolkit/skills/node_modules/semver/internal/lrucache.js +0 -42
  942. package/toolkit/skills/node_modules/semver/internal/parse-options.js +0 -17
  943. package/toolkit/skills/node_modules/semver/internal/re.js +0 -223
  944. package/toolkit/skills/node_modules/semver/internal/trim-comparator-whitespace.js +0 -438
  945. package/toolkit/skills/node_modules/semver/package.json +0 -78
  946. package/toolkit/skills/node_modules/semver/preload.js +0 -4
  947. package/toolkit/skills/node_modules/semver/range.bnf +0 -17
  948. package/toolkit/skills/node_modules/semver/ranges/gtr.js +0 -6
  949. package/toolkit/skills/node_modules/semver/ranges/intersects.js +0 -9
  950. package/toolkit/skills/node_modules/semver/ranges/ltr.js +0 -6
  951. package/toolkit/skills/node_modules/semver/ranges/max-satisfying.js +0 -27
  952. package/toolkit/skills/node_modules/semver/ranges/min-satisfying.js +0 -26
  953. package/toolkit/skills/node_modules/semver/ranges/min-version.js +0 -63
  954. package/toolkit/skills/node_modules/semver/ranges/outside.js +0 -82
  955. package/toolkit/skills/node_modules/semver/ranges/simplify.js +0 -49
  956. package/toolkit/skills/node_modules/semver/ranges/subset.js +0 -249
  957. package/toolkit/skills/node_modules/semver/ranges/to-comparators.js +0 -10
  958. package/toolkit/skills/node_modules/semver/ranges/valid.js +0 -13
  959. package/toolkit/skills/node_modules/sharp/LICENSE +0 -191
  960. package/toolkit/skills/node_modules/sharp/README.md +0 -112
  961. package/toolkit/skills/node_modules/sharp/dist/channel.cjs +0 -177
  962. package/toolkit/skills/node_modules/sharp/dist/channel.mjs +0 -177
  963. package/toolkit/skills/node_modules/sharp/dist/colour.cjs +0 -199
  964. package/toolkit/skills/node_modules/sharp/dist/colour.mjs +0 -199
  965. package/toolkit/skills/node_modules/sharp/dist/composite.cjs +0 -213
  966. package/toolkit/skills/node_modules/sharp/dist/composite.mjs +0 -213
  967. package/toolkit/skills/node_modules/sharp/dist/constructor.cjs +0 -511
  968. package/toolkit/skills/node_modules/sharp/dist/constructor.mjs +0 -511
  969. package/toolkit/skills/node_modules/sharp/dist/index.cjs +0 -25
  970. package/toolkit/skills/node_modules/sharp/dist/index.d.cts +0 -1999
  971. package/toolkit/skills/node_modules/sharp/dist/index.d.mts +0 -2046
  972. package/toolkit/skills/node_modules/sharp/dist/index.mjs +0 -25
  973. package/toolkit/skills/node_modules/sharp/dist/input.cjs +0 -819
  974. package/toolkit/skills/node_modules/sharp/dist/input.mjs +0 -819
  975. package/toolkit/skills/node_modules/sharp/dist/is.cjs +0 -149
  976. package/toolkit/skills/node_modules/sharp/dist/is.mjs +0 -149
  977. package/toolkit/skills/node_modules/sharp/dist/libvips.cjs +0 -212
  978. package/toolkit/skills/node_modules/sharp/dist/libvips.mjs +0 -212
  979. package/toolkit/skills/node_modules/sharp/dist/operation.cjs +0 -1002
  980. package/toolkit/skills/node_modules/sharp/dist/operation.mjs +0 -1002
  981. package/toolkit/skills/node_modules/sharp/dist/output.cjs +0 -1786
  982. package/toolkit/skills/node_modules/sharp/dist/output.mjs +0 -1786
  983. package/toolkit/skills/node_modules/sharp/dist/resize.cjs +0 -617
  984. package/toolkit/skills/node_modules/sharp/dist/resize.mjs +0 -617
  985. package/toolkit/skills/node_modules/sharp/dist/sharp.cjs +0 -174
  986. package/toolkit/skills/node_modules/sharp/dist/sharp.mjs +0 -174
  987. package/toolkit/skills/node_modules/sharp/dist/utility.cjs +0 -301
  988. package/toolkit/skills/node_modules/sharp/dist/utility.mjs +0 -301
  989. package/toolkit/skills/node_modules/sharp/install/build.js +0 -38
  990. package/toolkit/skills/node_modules/sharp/lib/index.d.ts +0 -1999
  991. package/toolkit/skills/node_modules/sharp/package.json +0 -227
  992. package/toolkit/skills/node_modules/sharp/src/binding.gyp +0 -303
  993. package/toolkit/skills/node_modules/sharp/src/common.cc +0 -1186
  994. package/toolkit/skills/node_modules/sharp/src/common.h +0 -421
  995. package/toolkit/skills/node_modules/sharp/src/metadata.cc +0 -404
  996. package/toolkit/skills/node_modules/sharp/src/metadata.h +0 -95
  997. package/toolkit/skills/node_modules/sharp/src/operations.cc +0 -516
  998. package/toolkit/skills/node_modules/sharp/src/operations.h +0 -137
  999. package/toolkit/skills/node_modules/sharp/src/pipeline.cc +0 -1973
  1000. package/toolkit/skills/node_modules/sharp/src/pipeline.h +0 -422
  1001. package/toolkit/skills/node_modules/sharp/src/sharp.cc +0 -43
  1002. package/toolkit/skills/node_modules/sharp/src/stats.cc +0 -186
  1003. package/toolkit/skills/node_modules/sharp/src/stats.h +0 -62
  1004. package/toolkit/skills/node_modules/sharp/src/utilities.cc +0 -289
  1005. package/toolkit/skills/node_modules/sharp/src/utilities.h +0 -22
@@ -1,2699 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.$ZodObject = exports.$ZodArray = exports.$ZodDate = exports.$ZodVoid = exports.$ZodNever = exports.$ZodUnknown = exports.$ZodAny = exports.$ZodNull = exports.$ZodUndefined = exports.$ZodSymbol = exports.$ZodBigIntFormat = exports.$ZodBigInt = exports.$ZodBoolean = exports.$ZodNumberFormat = exports.$ZodNumber = exports.$ZodCustomStringFormat = exports.$ZodJWT = exports.$ZodIBAN = exports.$ZodCreditCard = exports.$ZodE164 = exports.$ZodBase64URL = exports.base64urlCharset = exports.$ZodBase64 = exports.base64Charset = exports.$ZodCIDRv6 = exports.$ZodCIDRv4 = exports.$ZodMAC = exports.$ZodIPv6 = exports.$ZodIPv4 = exports.$ZodISODuration = exports.$ZodISOTime = exports.$ZodISODate = exports.$ZodISODateTime = exports.$ZodKSUID = exports.$ZodXID = exports.$ZodULID = exports.$ZodCUID2 = exports.$ZodCUID = exports.$ZodNanoID = exports.$ZodEmoji = exports.$ZodURL = exports.URL_UNPARSEABLE = exports.URL_BAD_FORMAT = exports.$ZodEmail = exports.$ZodUUID = exports.$ZodGUID = exports.$ZodStringFormat = exports.$ZodString = exports.clone = exports.$ZodType = void 0;
27
- exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodFunction = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPreprocess = exports.$ZodCodec = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodExactOptional = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = exports.$ZodXor = exports.$ZodUnion = exports.$ZodObjectJIT = void 0;
28
- exports.standardProps = standardProps;
29
- exports.canParseURL = canParseURL;
30
- exports.validateURL = validateURL;
31
- exports.parseURLObject = parseURLObject;
32
- exports.stripTabAndNewline = stripTabAndNewline;
33
- exports.urlHostnameOk = urlHostnameOk;
34
- exports.urlProtocolOk = urlProtocolOk;
35
- exports.isValidIPv6 = isValidIPv6;
36
- exports.isValidCIDRv6 = isValidCIDRv6;
37
- exports.isValidBase64 = isValidBase64;
38
- exports.isValidBase64URL = isValidBase64URL;
39
- exports.isValidCreditCard = isValidCreditCard;
40
- exports.isValidIBAN = isValidIBAN;
41
- exports.isValidJWT = isValidJWT;
42
- exports.getDiscriminatedOption = getDiscriminatedOption;
43
- exports.mergeValues = mergeValues;
44
- const checks = __importStar(require("./checks.cjs"));
45
- const core = __importStar(require("./core.cjs"));
46
- const doc_js_1 = require("./doc.cjs");
47
- const parse_js_1 = require("./parse.cjs");
48
- const regexes = __importStar(require("./regexes.cjs"));
49
- const util = __importStar(require("./util.cjs"));
50
- const versions_js_1 = require("./versions.cjs");
51
- exports.$ZodType = core.$constructor("$ZodType", (inst, def) => {
52
- var _a;
53
- inst ?? (inst = {});
54
- inst._zod.def = def; // set _def property
55
- inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
56
- inst._zod.version = versions_js_1.version;
57
- const defChecks = inst._zod.def.checks;
58
- // if inst is itself a checks.$ZodCheck, run it as a check
59
- const checks = inst._zod.traits.has("$ZodCheck")
60
- ? [inst, ...(defChecks ?? [])]
61
- : defChecks?.length
62
- ? [...defChecks]
63
- : [];
64
- for (const ch of checks) {
65
- for (const fn of ch._zod.onattach) {
66
- fn(inst);
67
- }
68
- }
69
- if (checks.length === 0) {
70
- // deferred initializer inst._zod.parse is not yet defined
71
- (_a = inst._zod).deferred ?? (_a.deferred = []);
72
- inst._zod.deferred?.push(() => {
73
- inst._zod.run = inst._zod.parse;
74
- });
75
- }
76
- else {
77
- const runChecks = (payload, checks, ctx) => {
78
- if (payload.memo)
79
- return payload;
80
- let isAborted = util.aborted(payload);
81
- let asyncResult;
82
- for (const ch of checks) {
83
- if (ch._zod.def.when) {
84
- if (util.explicitlyAborted(payload))
85
- continue;
86
- const shouldRun = ch._zod.def.when(payload);
87
- if (!shouldRun)
88
- continue;
89
- }
90
- else if (isAborted) {
91
- continue;
92
- }
93
- const currLen = payload.issues.length;
94
- const _ = ch._zod.check(payload);
95
- if (_ instanceof Promise && ctx?.async === false) {
96
- throw new core.$ZodAsyncError();
97
- }
98
- if (asyncResult || _ instanceof Promise) {
99
- asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
100
- await _;
101
- const nextLen = payload.issues.length;
102
- if (nextLen === currLen)
103
- return;
104
- util.attachSchema(payload.issues, currLen, inst);
105
- if (!isAborted)
106
- isAborted = util.aborted(payload, currLen);
107
- });
108
- }
109
- else {
110
- const nextLen = payload.issues.length;
111
- if (nextLen === currLen)
112
- continue;
113
- util.attachSchema(payload.issues, currLen, inst);
114
- if (!isAborted)
115
- isAborted = util.aborted(payload, currLen);
116
- }
117
- }
118
- if (asyncResult) {
119
- return asyncResult.then(() => {
120
- return payload;
121
- });
122
- }
123
- return payload;
124
- };
125
- const handleCanaryResult = (canary, payload, ctx) => {
126
- // abort if the canary is aborted
127
- if (util.aborted(canary)) {
128
- canary.aborted = true;
129
- return canary;
130
- }
131
- // run checks first, then
132
- const checkResult = runChecks(payload, checks, ctx);
133
- if (checkResult instanceof Promise) {
134
- if (ctx.async === false)
135
- throw new core.$ZodAsyncError();
136
- return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
137
- }
138
- return inst._zod.parse(checkResult, ctx);
139
- };
140
- inst._zod.run = (payload, ctx) => {
141
- if (ctx.skipChecks) {
142
- return inst._zod.parse(payload, ctx);
143
- }
144
- if (ctx.direction === "backward") {
145
- // run canary initial pass (no checks)
146
- const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
147
- if (canary instanceof Promise) {
148
- return canary.then((canary) => {
149
- return handleCanaryResult(canary, payload, ctx);
150
- });
151
- }
152
- return handleCanaryResult(canary, payload, ctx);
153
- }
154
- // forward
155
- const result = inst._zod.parse(payload, ctx);
156
- if (result instanceof Promise) {
157
- if (ctx.async === false)
158
- throw new core.$ZodAsyncError();
159
- return result.then((result) => runChecks(result, checks, ctx));
160
- }
161
- return runChecks(result, checks, ctx);
162
- };
163
- }
164
- }, {
165
- // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
166
- get "~standard"() {
167
- return util.hide(this, "~standard", standardProps(this));
168
- },
169
- set "~standard"(value) {
170
- util.own(this, "~standard", value);
171
- },
172
- });
173
- /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
174
- // a Standard Schema result only reports issues, so a failure finalizes them straight off the raw payload: no ZodError, and no lazy result to read through
175
- const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())) } : { value: r.value };
176
- async function validateAsync(inst, value) {
177
- const ctx = { async: true };
178
- return toStandardResult((await inst._zod.run({ value, issues: [] }, ctx)), ctx);
179
- }
180
- function standardProps(inst) {
181
- return {
182
- validate: (value) => {
183
- const ctx = { async: false };
184
- try {
185
- const r = inst._zod.run({ value, issues: [] }, ctx);
186
- if (!(r instanceof Promise))
187
- return toStandardResult(r, ctx);
188
- }
189
- catch (_) { }
190
- // async function so a synchronously throwing check rejects instead of escaping validate
191
- return validateAsync(inst, value);
192
- },
193
- vendor: "zod",
194
- version: 1,
195
- };
196
- }
197
- var util_js_1 = require("./util.cjs");
198
- Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return util_js_1.clone; } });
199
- exports.$ZodString = core.$constructor("$ZodString", (inst, def) => {
200
- exports.$ZodType.init(inst, def);
201
- // a format's own pattern, else unbounded; a template literal derives the check-aware form itself
202
- inst._zod.pattern = def.pattern ?? regexes.anyString;
203
- inst._zod.parse = (payload, _) => {
204
- if (def.coerce)
205
- try {
206
- payload.value = String(payload.value);
207
- }
208
- catch (_) { }
209
- if (typeof payload.value === "string")
210
- return payload;
211
- payload.issues.push({
212
- expected: "string",
213
- code: "invalid_type",
214
- input: payload.value,
215
- inst,
216
- });
217
- return payload;
218
- };
219
- });
220
- exports.$ZodStringFormat = core.$constructor("$ZodStringFormat", (inst, def) => {
221
- // check initialization must come first
222
- checks.$ZodCheckStringFormat.init(inst, def);
223
- exports.$ZodString.init(inst, def);
224
- });
225
- exports.$ZodGUID = core.$constructor("$ZodGUID", (inst, def) => {
226
- def.pattern ?? (def.pattern = regexes.guid);
227
- exports.$ZodStringFormat.init(inst, def);
228
- });
229
- exports.$ZodUUID = core.$constructor("$ZodUUID", (inst, def) => {
230
- if (def.version) {
231
- const versionMap = {
232
- v1: 1,
233
- v2: 2,
234
- v3: 3,
235
- v4: 4,
236
- v5: 5,
237
- v6: 6,
238
- v7: 7,
239
- v8: 8,
240
- };
241
- const v = versionMap[def.version];
242
- if (v === undefined)
243
- throw new Error(`Invalid UUID version: "${def.version}"`);
244
- def.pattern ?? (def.pattern = regexes.uuid(v));
245
- }
246
- else
247
- def.pattern ?? (def.pattern = regexes.uuid());
248
- exports.$ZodStringFormat.init(inst, def);
249
- });
250
- exports.$ZodEmail = core.$constructor("$ZodEmail", (inst, def) => {
251
- def.pattern ?? (def.pattern = regexes.email);
252
- exports.$ZodStringFormat.init(inst, def);
253
- });
254
- /** The `://` guard rejected the input before the URL constructor saw it. */
255
- exports.URL_BAD_FORMAT = 1;
256
- /** The URL parser rejected the input. */
257
- exports.URL_UNPARSEABLE = 2;
258
- function canParseURL(input) {
259
- try {
260
- if (typeof URL !== "undefined" && typeof URL.canParse === "function")
261
- return URL.canParse(input);
262
- new URL(input);
263
- return true;
264
- }
265
- catch {
266
- return false;
267
- }
268
- }
269
- function validateURL(trimmed, def) {
270
- if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
271
- return canParseURL(trimmed) || exports.URL_UNPARSEABLE;
272
- }
273
- return parseURLObject(trimmed, def);
274
- }
275
- /** Parses a URL while preserving the non-normalizing HTTP guard. */
276
- function parseURLObject(trimmed, def) {
277
- // When normalize is off, require :// for http/https URLs. This prevents strings like "http:example.com" or "https:/path" from being silently accepted
278
- if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
279
- return exports.URL_BAD_FORMAT;
280
- }
281
- try {
282
- if (typeof URL !== "undefined") {
283
- const URLStatic = URL;
284
- if (typeof URLStatic.parse === "function")
285
- return URLStatic.parse(trimmed) ?? exports.URL_UNPARSEABLE;
286
- }
287
- // @ts-ignore
288
- return new URL(trimmed);
289
- }
290
- catch {
291
- return exports.URL_UNPARSEABLE;
292
- }
293
- }
294
- const asciiTabOrNewline = /[\t\n\r]/g;
295
- /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */
296
- function stripTabAndNewline(value) {
297
- return value.replace(asciiTabOrNewline, "");
298
- }
299
- function urlHostnameOk(url, hostname) {
300
- hostname.lastIndex = 0;
301
- return hostname.test(url.hostname);
302
- }
303
- function urlProtocolOk(url, protocol) {
304
- protocol.lastIndex = 0;
305
- return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
306
- }
307
- exports.$ZodURL = core.$constructor("$ZodURL", (inst, def) => {
308
- exports.$ZodStringFormat.init(inst, def);
309
- inst._zod.check = (payload) => {
310
- try {
311
- // Trim whitespace from input
312
- const trimmed = payload.value.trim();
313
- const url = validateURL(trimmed, def);
314
- if (url === exports.URL_BAD_FORMAT) {
315
- payload.issues.push({
316
- code: "invalid_format",
317
- format: "url",
318
- note: "Invalid URL format",
319
- input: payload.value,
320
- inst,
321
- continue: !def.abort,
322
- });
323
- return;
324
- }
325
- if (url === exports.URL_UNPARSEABLE) {
326
- payload.issues.push({
327
- code: "invalid_format",
328
- format: "url",
329
- input: payload.value,
330
- inst,
331
- continue: !def.abort,
332
- });
333
- return;
334
- }
335
- if (url === true) {
336
- payload.value = stripTabAndNewline(trimmed);
337
- return;
338
- }
339
- if (def.hostname && !urlHostnameOk(url, def.hostname)) {
340
- payload.issues.push({
341
- code: "invalid_format",
342
- format: "url",
343
- note: "Invalid hostname",
344
- pattern: def.hostname.source,
345
- input: payload.value,
346
- inst,
347
- continue: !def.abort,
348
- });
349
- }
350
- if (def.protocol && !urlProtocolOk(url, def.protocol)) {
351
- payload.issues.push({
352
- code: "invalid_format",
353
- format: "url",
354
- note: "Invalid protocol",
355
- pattern: def.protocol.source,
356
- input: payload.value,
357
- inst,
358
- continue: !def.abort,
359
- });
360
- }
361
- // Set the output value based on normalize flag
362
- payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
363
- return;
364
- }
365
- catch (_) {
366
- payload.issues.push({
367
- code: "invalid_format",
368
- format: "url",
369
- input: payload.value,
370
- inst,
371
- continue: !def.abort,
372
- });
373
- }
374
- };
375
- });
376
- exports.$ZodEmoji = core.$constructor("$ZodEmoji", (inst, def) => {
377
- def.pattern ?? (def.pattern = regexes.emoji());
378
- exports.$ZodStringFormat.init(inst, def);
379
- });
380
- exports.$ZodNanoID = core.$constructor("$ZodNanoID", (inst, def) => {
381
- if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))
382
- throw new Error(`Invalid nanoid length: ${def.length}`);
383
- def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));
384
- exports.$ZodStringFormat.init(inst, def);
385
- });
386
- /**
387
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
388
- * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
389
- * See https://github.com/paralleldrive/cuid.
390
- */
391
- exports.$ZodCUID = core.$constructor("$ZodCUID", (inst, def) => {
392
- def.pattern ?? (def.pattern = regexes.cuid);
393
- exports.$ZodStringFormat.init(inst, def);
394
- });
395
- exports.$ZodCUID2 = core.$constructor("$ZodCUID2", (inst, def) => {
396
- def.pattern ?? (def.pattern = regexes.cuid2);
397
- exports.$ZodStringFormat.init(inst, def);
398
- });
399
- exports.$ZodULID = core.$constructor("$ZodULID", (inst, def) => {
400
- def.pattern ?? (def.pattern = regexes.ulid);
401
- exports.$ZodStringFormat.init(inst, def);
402
- });
403
- exports.$ZodXID = core.$constructor("$ZodXID", (inst, def) => {
404
- def.pattern ?? (def.pattern = regexes.xid);
405
- exports.$ZodStringFormat.init(inst, def);
406
- });
407
- exports.$ZodKSUID = core.$constructor("$ZodKSUID", (inst, def) => {
408
- def.pattern ?? (def.pattern = regexes.ksuid);
409
- exports.$ZodStringFormat.init(inst, def);
410
- });
411
- exports.$ZodISODateTime = core.$constructor("$ZodISODateTime", (inst, def) => {
412
- def.pattern ?? (def.pattern = regexes.datetime(def));
413
- exports.$ZodStringFormat.init(inst, def);
414
- });
415
- exports.$ZodISODate = core.$constructor("$ZodISODate", (inst, def) => {
416
- def.pattern ?? (def.pattern = regexes.date);
417
- exports.$ZodStringFormat.init(inst, def);
418
- });
419
- exports.$ZodISOTime = core.$constructor("$ZodISOTime", (inst, def) => {
420
- def.pattern ?? (def.pattern = regexes.time(def));
421
- exports.$ZodStringFormat.init(inst, def);
422
- });
423
- exports.$ZodISODuration = core.$constructor("$ZodISODuration", (inst, def) => {
424
- def.pattern ?? (def.pattern = regexes.duration);
425
- exports.$ZodStringFormat.init(inst, def);
426
- });
427
- exports.$ZodIPv4 = core.$constructor("$ZodIPv4", (inst, def) => {
428
- def.pattern ?? (def.pattern = regexes.ipv4);
429
- exports.$ZodStringFormat.init(inst, def);
430
- });
431
- /** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL("http://[...]")` parses an authority, not an address, so `@` and `\` re-delimit it and `"::@1\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `"::1\n"` validated as `::1`. */
432
- const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
433
- function isValidIPv6(value) {
434
- if (!ipv6Alphabet.test(value))
435
- return false;
436
- return canParseURL(`http://[${value}]`);
437
- }
438
- exports.$ZodIPv6 = core.$constructor("$ZodIPv6", (inst, def) => {
439
- def.pattern ?? (def.pattern = regexes.ipv6);
440
- exports.$ZodStringFormat.init(inst, def);
441
- inst._zod.check = (payload) => {
442
- if (!isValidIPv6(payload.value)) {
443
- payload.issues.push({
444
- code: "invalid_format",
445
- format: "ipv6",
446
- input: payload.value,
447
- inst,
448
- continue: !def.abort,
449
- });
450
- }
451
- };
452
- });
453
- exports.$ZodMAC = core.$constructor("$ZodMAC", (inst, def) => {
454
- def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
455
- exports.$ZodStringFormat.init(inst, def);
456
- });
457
- exports.$ZodCIDRv4 = core.$constructor("$ZodCIDRv4", (inst, def) => {
458
- def.pattern ?? (def.pattern = regexes.cidrv4);
459
- exports.$ZodStringFormat.init(inst, def);
460
- });
461
- function isValidCIDRv6(value) {
462
- const parts = value.split("/");
463
- if (parts.length !== 2)
464
- return false;
465
- const [address, prefix] = parts;
466
- if (!prefix)
467
- return false;
468
- const prefixNum = Number(prefix);
469
- if (`${prefixNum}` !== prefix)
470
- return false;
471
- if (prefixNum < 0 || prefixNum > 128)
472
- return false;
473
- return isValidIPv6(address);
474
- }
475
- exports.$ZodCIDRv6 = core.$constructor("$ZodCIDRv6", (inst, def) => {
476
- def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
477
- exports.$ZodStringFormat.init(inst, def);
478
- inst._zod.check = (payload) => {
479
- if (!isValidCIDRv6(payload.value)) {
480
- payload.issues.push({
481
- code: "invalid_format",
482
- format: "cidrv6",
483
- input: payload.value,
484
- inst,
485
- continue: !def.abort,
486
- });
487
- }
488
- };
489
- });
490
- ////////////////////////////// ZodBase64 //////////////////////////////
491
- function isValidBase64(data) {
492
- if (data === "")
493
- return true;
494
- // atob ignores whitespace, so reject it up front.
495
- if (/\s/.test(data))
496
- return false;
497
- if (data.length % 4 !== 0)
498
- return false;
499
- try {
500
- // @ts-ignore
501
- atob(data);
502
- return true;
503
- }
504
- catch {
505
- return false;
506
- }
507
- }
508
- // lax on purpose: the quantified regexes.base64 overflows the regex stack on multi-MB input and its leading ^$| alternation leaks through template-literal composition; isValidBase64 enforces length and padding
509
- exports.base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
510
- exports.$ZodBase64 = core.$constructor("$ZodBase64", (inst, def) => {
511
- def.pattern ?? (def.pattern = exports.base64Charset);
512
- exports.$ZodStringFormat.init(inst, def);
513
- inst._zod.check = (payload) => {
514
- if (isValidBase64(payload.value))
515
- return;
516
- payload.issues.push({
517
- code: "invalid_format",
518
- format: "base64",
519
- input: payload.value,
520
- inst,
521
- continue: !def.abort,
522
- });
523
- };
524
- });
525
- ////////////////////////////// ZodBase64URL //////////////////////////////
526
- // lax on purpose: the quantified regexes.base64url overflows the regex stack on multi-MB input; isValidBase64 enforces length on the padded string
527
- exports.base64urlCharset = /^[A-Za-z0-9_-]*$/;
528
- function isValidBase64URL(data) {
529
- if (!exports.base64urlCharset.test(data))
530
- return false;
531
- const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
532
- const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
533
- return isValidBase64(padded);
534
- }
535
- exports.$ZodBase64URL = core.$constructor("$ZodBase64URL", (inst, def) => {
536
- def.pattern ?? (def.pattern = exports.base64urlCharset);
537
- exports.$ZodStringFormat.init(inst, def);
538
- inst._zod.check = (payload) => {
539
- if (isValidBase64URL(payload.value))
540
- return;
541
- payload.issues.push({
542
- code: "invalid_format",
543
- format: "base64url",
544
- input: payload.value,
545
- inst,
546
- continue: !def.abort,
547
- });
548
- };
549
- });
550
- exports.$ZodE164 = core.$constructor("$ZodE164", (inst, def) => {
551
- def.pattern ?? (def.pattern = regexes.e164);
552
- exports.$ZodStringFormat.init(inst, def);
553
- });
554
- ////////////////////////////// ZodCreditCard //////////////////////////////
555
- const CC_SANITIZE = /[- ]/g;
556
- /** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */
557
- function isLuhnAlgo(digits) {
558
- let length = digits.length;
559
- let bit = 1;
560
- let sum = 0;
561
- while (length) {
562
- const value = digits.charCodeAt(--length) - 48;
563
- bit ^= 1;
564
- sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
565
- }
566
- return sum % 10 === 0;
567
- }
568
- function isValidCreditCard(input) {
569
- if (!regexes.creditCard.test(input))
570
- return false;
571
- return isLuhnAlgo(input.replace(CC_SANITIZE, ""));
572
- }
573
- exports.$ZodCreditCard = core.$constructor("$ZodCreditCard", (inst, def) => {
574
- // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.
575
- def.pattern ?? (def.pattern = regexes.creditCard);
576
- exports.$ZodStringFormat.init(inst, def);
577
- inst._zod.check = (payload) => {
578
- if (isValidCreditCard(payload.value))
579
- return;
580
- payload.issues.push({
581
- code: "invalid_format",
582
- format: "credit_card",
583
- input: payload.value,
584
- inst,
585
- continue: !def.abort,
586
- });
587
- };
588
- });
589
- ////////////////////////////// ZodIBAN //////////////////////////////
590
- // iso 7064 mod 97-10 checksum without BigInt
591
- function isIso7064Mod97(iban) {
592
- let remainder = 0;
593
- const len = iban.length;
594
- for (let i = 4; i < len; i++) {
595
- const code = iban.charCodeAt(i);
596
- remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
597
- }
598
- for (let i = 0; i < 4; i++) {
599
- const code = iban.charCodeAt(i);
600
- remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
601
- }
602
- return remainder === 1;
603
- }
604
- function isValidIBAN(input) {
605
- if (!regexes.iban.test(input))
606
- return false;
607
- return isIso7064Mod97(input);
608
- }
609
- exports.$ZodIBAN = core.$constructor("$ZodIBAN", (inst, def) => {
610
- // shape only — checksum is not expressible as a pattern
611
- def.pattern ?? (def.pattern = regexes.iban);
612
- exports.$ZodStringFormat.init(inst, def);
613
- inst._zod.check = (payload) => {
614
- if (isValidIBAN(payload.value))
615
- return;
616
- payload.issues.push({
617
- code: "invalid_format",
618
- format: "iban",
619
- input: payload.value,
620
- inst,
621
- continue: !def.abort,
622
- });
623
- };
624
- });
625
- ////////////////////////////// ZodJWT //////////////////////////////
626
- function isValidJWT(token, algorithm = null) {
627
- try {
628
- const tokensParts = token.split(".");
629
- if (tokensParts.length !== 3)
630
- return false;
631
- const [header] = tokensParts;
632
- if (!header)
633
- return false;
634
- // @ts-ignore
635
- const parsedHeader = JSON.parse(atob(header));
636
- if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
637
- return false;
638
- if (!parsedHeader.alg)
639
- return false;
640
- if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
641
- return false;
642
- return true;
643
- }
644
- catch {
645
- return false;
646
- }
647
- }
648
- exports.$ZodJWT = core.$constructor("$ZodJWT", (inst, def) => {
649
- exports.$ZodStringFormat.init(inst, def);
650
- inst._zod.check = (payload) => {
651
- if (isValidJWT(payload.value, def.alg))
652
- return;
653
- payload.issues.push({
654
- code: "invalid_format",
655
- format: "jwt",
656
- input: payload.value,
657
- inst,
658
- continue: !def.abort,
659
- });
660
- };
661
- });
662
- exports.$ZodCustomStringFormat = core.$constructor("$ZodCustomStringFormat", (inst, def) => {
663
- exports.$ZodStringFormat.init(inst, def);
664
- inst._zod.check = (payload) => {
665
- if (def.fn(payload.value))
666
- return;
667
- payload.issues.push({
668
- code: "invalid_format",
669
- format: def.format,
670
- input: payload.value,
671
- inst,
672
- continue: !def.abort,
673
- });
674
- };
675
- });
676
- exports.$ZodNumber = core.$constructor("$ZodNumber", (inst, def) => {
677
- exports.$ZodType.init(inst, def);
678
- inst._zod.pattern = regexes.number;
679
- inst._zod.parse = (payload, _ctx) => {
680
- if (def.coerce)
681
- try {
682
- payload.value = Number(payload.value);
683
- }
684
- catch (_) { }
685
- const input = payload.value;
686
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
687
- return payload;
688
- }
689
- const received = typeof input === "number"
690
- ? Number.isNaN(input)
691
- ? "NaN"
692
- : !Number.isFinite(input)
693
- ? String(input)
694
- : undefined
695
- : undefined;
696
- payload.issues.push({
697
- expected: "number",
698
- code: "invalid_type",
699
- input,
700
- inst,
701
- ...(received ? { received } : {}),
702
- });
703
- return payload;
704
- };
705
- });
706
- exports.$ZodNumberFormat = core.$constructor("$ZodNumberFormat", (inst, def) => {
707
- checks.$ZodCheckNumberFormat.init(inst, def);
708
- exports.$ZodNumber.init(inst, def); // no format checks
709
- });
710
- exports.$ZodBoolean = core.$constructor("$ZodBoolean", (inst, def) => {
711
- exports.$ZodType.init(inst, def);
712
- inst._zod.pattern = regexes.boolean;
713
- inst._zod.parse = (payload, _ctx) => {
714
- if (def.coerce)
715
- try {
716
- payload.value = Boolean(payload.value);
717
- }
718
- catch (_) { }
719
- const input = payload.value;
720
- if (typeof input === "boolean")
721
- return payload;
722
- payload.issues.push({
723
- expected: "boolean",
724
- code: "invalid_type",
725
- input,
726
- inst,
727
- });
728
- return payload;
729
- };
730
- });
731
- exports.$ZodBigInt = core.$constructor("$ZodBigInt", (inst, def) => {
732
- exports.$ZodType.init(inst, def);
733
- inst._zod.pattern = regexes.bigint;
734
- inst._zod.parse = (payload, _ctx) => {
735
- if (def.coerce)
736
- try {
737
- payload.value = BigInt(payload.value);
738
- }
739
- catch (_) { }
740
- if (typeof payload.value === "bigint")
741
- return payload;
742
- payload.issues.push({
743
- expected: "bigint",
744
- code: "invalid_type",
745
- input: payload.value,
746
- inst,
747
- });
748
- return payload;
749
- };
750
- });
751
- exports.$ZodBigIntFormat = core.$constructor("$ZodBigIntFormat", (inst, def) => {
752
- checks.$ZodCheckBigIntFormat.init(inst, def);
753
- exports.$ZodBigInt.init(inst, def); // no format checks
754
- });
755
- exports.$ZodSymbol = core.$constructor("$ZodSymbol", (inst, def) => {
756
- exports.$ZodType.init(inst, def);
757
- inst._zod.parse = (payload, _ctx) => {
758
- const input = payload.value;
759
- if (typeof input === "symbol")
760
- return payload;
761
- payload.issues.push({
762
- expected: "symbol",
763
- code: "invalid_type",
764
- input,
765
- inst,
766
- });
767
- return payload;
768
- };
769
- });
770
- exports.$ZodUndefined = core.$constructor("$ZodUndefined", (inst, def) => {
771
- exports.$ZodType.init(inst, def);
772
- inst._zod.pattern = regexes.undefined;
773
- inst._zod.values = new Set([undefined]);
774
- inst._zod.parse = (payload, _ctx) => {
775
- const input = payload.value;
776
- if (typeof input === "undefined")
777
- return payload;
778
- payload.issues.push({
779
- expected: "undefined",
780
- code: "invalid_type",
781
- input,
782
- inst,
783
- });
784
- return payload;
785
- };
786
- });
787
- exports.$ZodNull = core.$constructor("$ZodNull", (inst, def) => {
788
- exports.$ZodType.init(inst, def);
789
- inst._zod.pattern = regexes.null;
790
- inst._zod.values = new Set([null]);
791
- inst._zod.parse = (payload, _ctx) => {
792
- const input = payload.value;
793
- if (input === null)
794
- return payload;
795
- payload.issues.push({
796
- expected: "null",
797
- code: "invalid_type",
798
- input,
799
- inst,
800
- });
801
- return payload;
802
- };
803
- });
804
- exports.$ZodAny = core.$constructor("$ZodAny", (inst, def) => {
805
- exports.$ZodType.init(inst, def);
806
- inst._zod.parse = (payload) => payload;
807
- });
808
- exports.$ZodUnknown = core.$constructor("$ZodUnknown", (inst, def) => {
809
- exports.$ZodType.init(inst, def);
810
- inst._zod.parse = (payload) => payload;
811
- });
812
- exports.$ZodNever = core.$constructor("$ZodNever", (inst, def) => {
813
- exports.$ZodType.init(inst, def);
814
- inst._zod.parse = (payload, _ctx) => {
815
- payload.issues.push({
816
- expected: "never",
817
- code: "invalid_type",
818
- input: payload.value,
819
- inst,
820
- });
821
- return payload;
822
- };
823
- });
824
- exports.$ZodVoid = core.$constructor("$ZodVoid", (inst, def) => {
825
- exports.$ZodType.init(inst, def);
826
- inst._zod.parse = (payload, _ctx) => {
827
- const input = payload.value;
828
- if (typeof input === "undefined")
829
- return payload;
830
- payload.issues.push({
831
- expected: "void",
832
- code: "invalid_type",
833
- input,
834
- inst,
835
- });
836
- return payload;
837
- };
838
- });
839
- exports.$ZodDate = core.$constructor("$ZodDate", (inst, def) => {
840
- exports.$ZodType.init(inst, def);
841
- inst._zod.parse = (payload, _ctx) => {
842
- if (def.coerce) {
843
- try {
844
- payload.value = new Date(payload.value);
845
- }
846
- catch (_err) { }
847
- }
848
- const input = payload.value;
849
- const isDate = input instanceof Date;
850
- const isValidDate = isDate && !Number.isNaN(input.getTime());
851
- if (isValidDate)
852
- return payload;
853
- payload.issues.push({
854
- expected: "date",
855
- code: "invalid_type",
856
- input,
857
- ...(isDate ? { received: "Invalid Date" } : {}),
858
- inst,
859
- });
860
- return payload;
861
- };
862
- });
863
- // an oversized container fails its leading size checks before any element is parsed
864
- function capSize(inst, size) {
865
- const caps = util.sizeCaps(inst._zod.def.checks);
866
- if (!caps.length)
867
- return;
868
- const cap = Math.min(...caps.map((c) => c[0]));
869
- const parse = inst._zod.parse;
870
- inst._zod.parse = (payload, ctx) => {
871
- const n = size(payload.value);
872
- if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
873
- for (const [max, ch] of util.sizeCaps(inst._zod.def.checks)) {
874
- if (n > max && ch._zod.def.when(payload)) {
875
- const start = payload.issues.length;
876
- ch._zod.check(payload);
877
- // the value is still the raw input, so no later check may read it
878
- payload.issues[start].continue = false;
879
- util.attachSchema(payload.issues, start, inst);
880
- return payload;
881
- }
882
- }
883
- }
884
- return parse(payload, ctx);
885
- };
886
- }
887
- const arraySize = (input) => (Array.isArray(input) ? input.length : -1);
888
- const mapSize = (input) => (input instanceof Map ? input.size : -1);
889
- const setSize = (input) => (input instanceof Set ? input.size : -1);
890
- function handleArrayResult(result, final, index) {
891
- if (result.issues.length) {
892
- final.issues.push(...util.prefixIssues(index, result.issues));
893
- }
894
- final.value[index] = result.value;
895
- }
896
- exports.$ZodArray = core.$constructor("$ZodArray", (inst, def) => {
897
- exports.$ZodType.init(inst, def);
898
- const memo = core.globalConfig.memoizer;
899
- memo?.attach(inst);
900
- inst._zod.parse = (payload, ctx) => {
901
- const input = payload.value;
902
- if (!Array.isArray(input)) {
903
- payload.issues.push({
904
- expected: "array",
905
- code: "invalid_type",
906
- input,
907
- inst,
908
- });
909
- return payload;
910
- }
911
- payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
912
- const proms = [];
913
- const abortEarly = ctx?.abortEarly;
914
- for (let i = 0; i < input.length; i++) {
915
- const item = input[i];
916
- const result = def.element._zod.run({
917
- value: item,
918
- issues: [],
919
- }, ctx);
920
- if (result instanceof Promise) {
921
- proms.push(result.then((result) => handleArrayResult(result, payload, i)));
922
- }
923
- else {
924
- handleArrayResult(result, payload, i);
925
- // the element's payload is authoritative here, since handleArrayResult forwards every issue; an object's is not, because it drops a failed absent optional
926
- if (abortEarly && result.issues.length !== 0 && util.aborted(result))
927
- break;
928
- }
929
- }
930
- if (proms.length) {
931
- return Promise.all(proms).then(() => payload);
932
- }
933
- return payload; //handleArrayResultsAsync(parseResults, final);
934
- };
935
- capSize(inst, arraySize);
936
- });
937
- function handlePropertyResult(result, final, key, input, optin, optout) {
938
- const isPresent = key in input;
939
- const isOptionalOut = optout === "optional";
940
- // The middle rung means "absence permitted, nothing supplied in its place", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.
941
- if (!isPresent && isOptionalOut && optin === "optional") {
942
- return;
943
- }
944
- if (result.issues.length) {
945
- // For optional-in/out schemas, ignore errors on absent keys.
946
- if (optin !== undefined && isOptionalOut && !isPresent) {
947
- return;
948
- }
949
- final.issues.push(...util.prefixIssues(key, result.issues));
950
- }
951
- if (!isPresent && optin === undefined) {
952
- if (!result.issues.length) {
953
- final.issues.push({
954
- code: "invalid_type",
955
- expected: "nonoptional",
956
- input: undefined,
957
- path: [key],
958
- });
959
- }
960
- return;
961
- }
962
- if (result.value === undefined) {
963
- if (isPresent || (optin === "defaulted" && !isOptionalOut)) {
964
- final.value[key] = undefined;
965
- }
966
- }
967
- else {
968
- final.value[key] = result.value;
969
- }
970
- }
971
- // one shared instance; a fresh [] per schema cost 56 bytes retained
972
- const NO_SYMBOL_KEYS = [];
973
- function normalizeDef(def) {
974
- const keys = Object.keys(def.shape);
975
- const ownSymbols = Object.getOwnPropertySymbols(def.shape);
976
- const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;
977
- // aliases `keys` when there are no symbols, so a string-only shape keeps one array
978
- const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;
979
- for (const k of allKeys) {
980
- if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
981
- throw new Error(`Invalid element at key "${String(k)}": expected a Zod schema`);
982
- }
983
- }
984
- const okeys = util.optionalKeys(def.shape);
985
- return {
986
- ...def,
987
- allKeys,
988
- symbolKeys,
989
- // string-only: handleCatchall matches it against `for...in`, which never yields a symbol
990
- keySet: new Set(keys),
991
- numKeys: keys.length,
992
- optionalKeys: new Set(okeys),
993
- };
994
- }
995
- function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
996
- const unrecognized = [];
997
- const keySet = def.keySet;
998
- const _catchall = def.catchall._zod;
999
- const t = _catchall.def.type;
1000
- const optin = _catchall.optin;
1001
- const optout = _catchall.optout;
1002
- // starts at 0, not the current length: the shape phase already ran and may have aborted
1003
- let seen = 0;
1004
- for (const key in input) {
1005
- if (abortEarly && payload.issues.length !== seen) {
1006
- if (util.aborted(payload, seen))
1007
- break;
1008
- seen = payload.issues.length;
1009
- }
1010
- // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.
1011
- if (keySet.has(key))
1012
- continue;
1013
- // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.
1014
- if (key === "__proto__") {
1015
- if (t === "never")
1016
- unrecognized.push(key);
1017
- continue;
1018
- }
1019
- if (t === "never") {
1020
- unrecognized.push(key);
1021
- continue;
1022
- }
1023
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
1024
- if (r instanceof Promise) {
1025
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
1026
- }
1027
- else {
1028
- handlePropertyResult(r, payload, key, input, optin, optout);
1029
- }
1030
- }
1031
- if (unrecognized.length) {
1032
- payload.issues.push({
1033
- code: "unrecognized_keys",
1034
- keys: unrecognized,
1035
- input,
1036
- inst,
1037
- // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
1038
- continue: true,
1039
- });
1040
- }
1041
- if (!proms.length)
1042
- return payload;
1043
- return Promise.all(proms).then(() => {
1044
- return payload;
1045
- });
1046
- }
1047
- exports.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
1048
- // requires cast because technically $ZodObject doesn't extend
1049
- exports.$ZodType.init(inst, def);
1050
- const desc = Object.getOwnPropertyDescriptor(def, "shape");
1051
- // a cloned def carries its source's accessor, which knows the shape it answers from; adopting that keeps the clone's keys readable without running it
1052
- const sh = desc?.get ? desc.get.raw : (def.shape ?? {});
1053
- if (sh) {
1054
- // Freezes the shape on first read, so its getters resolve once and every later read sees the same schemas.
1055
- const get = () => {
1056
- const newSh = { ...sh };
1057
- Object.defineProperty(def, "shape", { value: newSh });
1058
- get.raw = newSh;
1059
- return newSh;
1060
- };
1061
- get.raw = sh;
1062
- Object.defineProperty(def, "shape", { get });
1063
- }
1064
- const _normalized = util.cached(() => normalizeDef(def));
1065
- util.defineLazyInternal(inst, "propValues", (zod) => {
1066
- const shape = zod.def.shape;
1067
- const propValues = {};
1068
- for (const key in shape) {
1069
- const field = shape[key]._zod;
1070
- if (field.values) {
1071
- if (!Object.prototype.hasOwnProperty.call(propValues, key)) {
1072
- util.assignProp(propValues, key, new Set());
1073
- }
1074
- for (const v of field.values)
1075
- propValues[key].add(v);
1076
- // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.
1077
- if (field.optin !== undefined)
1078
- propValues[key].add(undefined);
1079
- }
1080
- }
1081
- return propValues;
1082
- });
1083
- const isObject = util.isObject;
1084
- const catchall = def.catchall;
1085
- let value;
1086
- const memo = core.globalConfig.memoizer;
1087
- memo?.attach(inst);
1088
- inst._zod.parse = (payload, ctx) => {
1089
- value ?? (value = _normalized.value);
1090
- const input = payload.value;
1091
- if (!isObject(input)) {
1092
- payload.issues.push({
1093
- expected: "object",
1094
- code: "invalid_type",
1095
- input,
1096
- inst,
1097
- });
1098
- return payload;
1099
- }
1100
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1101
- const proms = [];
1102
- const shape = value.shape;
1103
- const abortEarly = ctx?.abortEarly;
1104
- let seen = payload.issues.length;
1105
- for (const key of value.allKeys) {
1106
- if (abortEarly && payload.issues.length !== seen) {
1107
- if (util.aborted(payload, seen))
1108
- break;
1109
- seen = payload.issues.length;
1110
- }
1111
- if (key === "__proto__")
1112
- continue;
1113
- const el = shape[key];
1114
- const optin = el._zod.optin;
1115
- const optout = el._zod.optout;
1116
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
1117
- if (r instanceof Promise) {
1118
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
1119
- }
1120
- else {
1121
- handlePropertyResult(r, payload, key, input, optin, optout);
1122
- }
1123
- }
1124
- if (!catchall) {
1125
- return proms.length ? Promise.all(proms).then(() => payload) : payload;
1126
- }
1127
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
1128
- };
1129
- });
1130
- exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
1131
- // requires cast because technically $ZodObject doesn't extend
1132
- exports.$ZodObject.init(inst, def);
1133
- const superParse = inst._zod.parse;
1134
- const _normalized = util.cached(() => normalizeDef(def));
1135
- const memo = core.globalConfig.memoizer;
1136
- const generateFastpass = (shape) => {
1137
- const normalized = _normalized.value;
1138
- const syms = normalized.symbolKeys;
1139
- // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope
1140
- const doc = new doc_js_1.Doc(["payload", "ctx"], { shape, inst, memo, syms });
1141
- const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1142
- // prefixes in place, like util.prefixIssues. newResult must land before the early return: a catchall runs after this and would otherwise write onto the caller's input
1143
- const prefixStr = (id, k) => `
1144
- let ${id}_ab = false;
1145
- for (let i = 0; i < ${id}.issues.length; i++) {
1146
- const iss = ${id}.issues[i];
1147
- iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
1148
- payload.issues.push(iss);
1149
- if (iss.continue !== true) ${id}_ab = true;
1150
- }
1151
- if (${id}_ab && ctx && ctx.abortEarly) {
1152
- payload.value = newResult;
1153
- return payload;
1154
- }`;
1155
- doc.write(`const input = payload.value;`);
1156
- const ids = Object.create(null);
1157
- let counter = 0;
1158
- for (const key of normalized.allKeys) {
1159
- ids[key] = `key_${counter++}`;
1160
- }
1161
- // A: preserve key order {
1162
- doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
1163
- for (const key of normalized.allKeys) {
1164
- if (key === "__proto__")
1165
- continue;
1166
- const id = ids[key];
1167
- const k = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : util.esc(key);
1168
- const isPresent = `${k} in input`;
1169
- const schema = shape[key];
1170
- const optin = schema?._zod?.optin;
1171
- const isOptionalIn = optin !== undefined;
1172
- const isOptionalOut = schema?._zod?.optout === "optional";
1173
- doc.write(`const ${id} = ${parseStr(k)};`);
1174
- if (isOptionalIn && isOptionalOut) {
1175
- // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.
1176
- const assign = optin === "optional" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;
1177
- doc.write(`
1178
- const ${id}_present = ${isPresent};
1179
- if (!${id}.issues.length || ${id}_present) {
1180
- if (${id}.issues.length) {${prefixStr(id, k)}
1181
- }
1182
-
1183
- if (${assign}) {
1184
- newResult[${k}] = ${id}.value;
1185
- }
1186
- }
1187
-
1188
- `);
1189
- }
1190
- else if (!isOptionalIn) {
1191
- doc.write(`
1192
- const ${id}_present = ${isPresent};
1193
- if (${id}.issues.length) {${prefixStr(id, k)}
1194
- }
1195
- if (!${id}_present && !${id}.issues.length) {
1196
- payload.issues.push({
1197
- code: "invalid_type",
1198
- expected: "nonoptional",
1199
- input: undefined,
1200
- path: [${k}]
1201
- });
1202
- if (ctx && ctx.abortEarly) {
1203
- payload.value = newResult;
1204
- return payload;
1205
- }
1206
- }
1207
-
1208
- if (${id}_present) {
1209
- newResult[${k}] = ${id}.value;
1210
- }
1211
-
1212
- `);
1213
- }
1214
- else {
1215
- doc.write(`
1216
- if (${id}.issues.length) {${prefixStr(id, k)}
1217
- }
1218
- `);
1219
- if (optin === "defaulted") {
1220
- doc.write(`newResult[${k}] = ${id}.value;`);
1221
- }
1222
- else {
1223
- doc.write(`
1224
- if (${id}.value !== undefined || ${isPresent}) {
1225
- newResult[${k}] = ${id}.value;
1226
- }
1227
- `);
1228
- }
1229
- }
1230
- }
1231
- doc.write(`payload.value = newResult;`);
1232
- doc.write(`return payload;`);
1233
- // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone
1234
- return doc.compile();
1235
- };
1236
- let fastpass;
1237
- const isObject = util.isObject;
1238
- const jit = !core.globalConfig.jitless;
1239
- const allowsEval = util.allowsEval;
1240
- const fastEnabled = jit && allowsEval.value; // && !def.catchall;
1241
- const catchall = def.catchall;
1242
- let value;
1243
- inst._zod.parse = (payload, ctx) => {
1244
- value ?? (value = _normalized.value);
1245
- const input = payload.value;
1246
- if (!isObject(input)) {
1247
- payload.issues.push({
1248
- expected: "object",
1249
- code: "invalid_type",
1250
- input,
1251
- inst,
1252
- });
1253
- return payload;
1254
- }
1255
- if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
1256
- // always synchronous
1257
- if (!fastpass)
1258
- fastpass = generateFastpass(def.shape);
1259
- payload = fastpass(payload, ctx);
1260
- if (!catchall)
1261
- return payload;
1262
- return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);
1263
- }
1264
- return superParse(payload, ctx);
1265
- };
1266
- });
1267
- function handleUnionResults(results, final, inst, ctx) {
1268
- for (const result of results) {
1269
- if (result.issues.length === 0) {
1270
- final.value = result.value;
1271
- return final;
1272
- }
1273
- }
1274
- const nonaborted = results.filter((r) => !util.aborted(r));
1275
- if (nonaborted.length === 1) {
1276
- final.value = nonaborted[0].value;
1277
- return nonaborted[0];
1278
- }
1279
- final.issues.push({
1280
- code: "invalid_union",
1281
- input: final.value,
1282
- inst,
1283
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1284
- });
1285
- return final;
1286
- }
1287
- exports.$ZodUnion = core.$constructor("$ZodUnion", (inst, def) => {
1288
- exports.$ZodType.init(inst, def);
1289
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.options.some((o) => o._zod.optin === "defaulted")
1290
- ? "defaulted"
1291
- : zod.def.options.some((o) => o._zod.optin !== undefined)
1292
- ? "optional"
1293
- : undefined);
1294
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
1295
- util.defineLazyInternal(inst, "values", (zod) => {
1296
- if (zod.def.options.every((o) => o._zod.values)) {
1297
- return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));
1298
- }
1299
- return undefined;
1300
- });
1301
- util.defineLazyInternal(inst, "pattern", (zod) => {
1302
- if (zod.def.options.every((o) => o._zod.pattern)) {
1303
- const patterns = zod.def.options.map((o) => o._zod.pattern);
1304
- return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
1305
- }
1306
- return undefined;
1307
- });
1308
- const first = def.options.length === 1 ? def.options[0]._zod.run : null;
1309
- inst._zod.parse = (payload, ctx) => {
1310
- if (first) {
1311
- return first(payload, ctx);
1312
- }
1313
- let async = false;
1314
- const results = [];
1315
- for (const option of def.options) {
1316
- const result = option._zod.run({
1317
- value: payload.value,
1318
- issues: [],
1319
- }, ctx);
1320
- if (result instanceof Promise) {
1321
- results.push(result);
1322
- async = true;
1323
- }
1324
- else {
1325
- if (result.issues.length === 0)
1326
- return result;
1327
- results.push(result);
1328
- }
1329
- }
1330
- if (!async)
1331
- return handleUnionResults(results, payload, inst, ctx);
1332
- return Promise.all(results).then((results) => {
1333
- return handleUnionResults(results, payload, inst, ctx);
1334
- });
1335
- };
1336
- });
1337
- function handleExclusiveUnionResults(results, final, inst, ctx) {
1338
- const matches = [];
1339
- for (let i = 0; i < results.length; i++) {
1340
- if (results[i].issues.length === 0)
1341
- matches.push(i);
1342
- }
1343
- if (matches.length === 1) {
1344
- final.value = results[matches[0]].value;
1345
- return final;
1346
- }
1347
- if (matches.length === 0) {
1348
- // No matches - same as regular union
1349
- final.issues.push({
1350
- code: "invalid_union",
1351
- input: final.value,
1352
- inst,
1353
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1354
- });
1355
- }
1356
- else {
1357
- // Multiple matches - exclusive union failure
1358
- final.issues.push({
1359
- code: "invalid_union",
1360
- input: final.value,
1361
- inst,
1362
- errors: [],
1363
- inclusive: false,
1364
- matches,
1365
- });
1366
- }
1367
- return final;
1368
- }
1369
- exports.$ZodXor = core.$constructor("$ZodXor", (inst, def) => {
1370
- exports.$ZodUnion.init(inst, def);
1371
- def.inclusive = false;
1372
- const first = def.options.length === 1 ? def.options[0]._zod.run : null;
1373
- inst._zod.parse = (payload, ctx) => {
1374
- if (first) {
1375
- return first(payload, ctx);
1376
- }
1377
- let async = false;
1378
- const results = [];
1379
- for (const option of def.options) {
1380
- const result = option._zod.run({
1381
- value: payload.value,
1382
- issues: [],
1383
- }, ctx);
1384
- if (result instanceof Promise) {
1385
- results.push(result);
1386
- async = true;
1387
- }
1388
- else {
1389
- results.push(result);
1390
- }
1391
- }
1392
- if (!async)
1393
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1394
- return Promise.all(results).then((results) => {
1395
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1396
- });
1397
- };
1398
- });
1399
- /** Returns the option whose discriminator claims `value`, or throws if ambiguous. */
1400
- function getDiscriminatedOption(union, value) {
1401
- const internals = union._zod;
1402
- let map = internals.bag.optionsMap;
1403
- if (!map) {
1404
- map = discriminatorMap(internals.def);
1405
- internals.bag.optionsMap = map;
1406
- }
1407
- const option = map.get(value);
1408
- if (option === null)
1409
- throw new Error(`Ambiguous discriminator value "${String(value)}"`);
1410
- return option;
1411
- }
1412
- function discriminatorMap(def) {
1413
- const map = new Map();
1414
- for (const option of def.options) {
1415
- const values = option._zod.propValues?.[def.discriminator];
1416
- if (!values || values.size === 0)
1417
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
1418
- for (const value of values) {
1419
- if (map.has(value)) {
1420
- if (value !== undefined)
1421
- throw new Error(`Duplicate discriminator value "${String(value)}"`);
1422
- // keep the collision marked so a later member cannot reclaim it
1423
- map.set(value, null);
1424
- }
1425
- else {
1426
- map.set(value, option);
1427
- }
1428
- }
1429
- }
1430
- return map;
1431
- }
1432
- exports.$ZodDiscriminatedUnion =
1433
- /*@__PURE__*/
1434
- core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
1435
- def.inclusive = false;
1436
- exports.$ZodUnion.init(inst, def);
1437
- const _super = inst._zod.parse;
1438
- util.defineLazyInternal(inst, "propValues", (zod) => {
1439
- const propValues = {};
1440
- let undefinedCount = 0;
1441
- for (const option of zod.def.options) {
1442
- const pv = option._zod.propValues;
1443
- if (!pv || Object.keys(pv).length === 0)
1444
- throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
1445
- if (pv[zod.def.discriminator]?.has(undefined))
1446
- undefinedCount++;
1447
- for (const [k, v] of Object.entries(pv)) {
1448
- if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
1449
- util.assignProp(propValues, k, new Set());
1450
- }
1451
- for (const val of v) {
1452
- propValues[k].add(val);
1453
- }
1454
- }
1455
- }
1456
- if (!zod.def.unionFallback && undefinedCount > 1)
1457
- propValues[zod.def.discriminator]?.delete(undefined);
1458
- return propValues;
1459
- });
1460
- // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies — are left to the map.
1461
- def.options.forEach((option, i) => {
1462
- const propShape = util.rawShape(option._zod.def);
1463
- if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
1464
- throw new Error(`Invalid discriminated union option at index "${i}"`);
1465
- }
1466
- });
1467
- const disc = util.cached(() => discriminatorMap(def));
1468
- inst._zod.parse = (payload, ctx) => {
1469
- const input = payload.value;
1470
- if (!util.isObject(input)) {
1471
- payload.issues.push({
1472
- code: "invalid_type",
1473
- expected: "object",
1474
- input,
1475
- inst,
1476
- });
1477
- return payload;
1478
- }
1479
- const value = input?.[def.discriminator];
1480
- const opt = disc.value.get(value);
1481
- // forward metadata cannot choose an encoder for an absent tag
1482
- if (opt && (value !== undefined || ctx.direction !== "backward")) {
1483
- return opt._zod.run(payload, ctx);
1484
- }
1485
- // Fall back to union matching when the fast discriminator path fails:
1486
- // - explicitly enabled via unionFallback, or
1487
- // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions
1488
- if (def.unionFallback || ctx.direction === "backward") {
1489
- return _super(payload, ctx);
1490
- }
1491
- // no matching discriminator
1492
- payload.issues.push({
1493
- code: "invalid_union",
1494
- errors: [],
1495
- note: "No matching discriminator",
1496
- discriminator: def.discriminator,
1497
- options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
1498
- input,
1499
- path: [def.discriminator],
1500
- inst,
1501
- });
1502
- return payload;
1503
- };
1504
- });
1505
- exports.$ZodIntersection = core.$constructor("$ZodIntersection", (inst, def) => {
1506
- exports.$ZodType.init(inst, def);
1507
- inst._zod.parse = (payload, ctx) => {
1508
- const input = payload.value;
1509
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
1510
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
1511
- const async = left instanceof Promise || right instanceof Promise;
1512
- if (async) {
1513
- return Promise.all([left, right]).then(([left, right]) => {
1514
- return handleIntersectionResults(payload, left, right);
1515
- });
1516
- }
1517
- return handleIntersectionResults(payload, left, right);
1518
- };
1519
- });
1520
- function mergeValues(a, b) {
1521
- // const aType = parse.t(a);
1522
- // const bType = parse.t(b);
1523
- if (a === b) {
1524
- return { valid: true, data: a };
1525
- }
1526
- if (a instanceof Date && b instanceof Date && +a === +b) {
1527
- return { valid: true, data: a };
1528
- }
1529
- if (util.isPlainObject(a) && util.isPlainObject(b)) {
1530
- const bKeys = Object.keys(b);
1531
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1532
- const newObj = { ...a, ...b };
1533
- if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
1534
- delete newObj.__proto__;
1535
- for (const key of sharedKeys) {
1536
- if (key === "__proto__")
1537
- continue;
1538
- const sharedValue = mergeValues(a[key], b[key]);
1539
- if (!sharedValue.valid) {
1540
- return {
1541
- valid: false,
1542
- mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
1543
- };
1544
- }
1545
- newObj[key] = sharedValue.data;
1546
- }
1547
- return { valid: true, data: newObj };
1548
- }
1549
- if (Array.isArray(a) && Array.isArray(b)) {
1550
- if (a.length !== b.length) {
1551
- return { valid: false, mergeErrorPath: [] };
1552
- }
1553
- const newArray = [];
1554
- for (let index = 0; index < a.length; index++) {
1555
- const itemA = a[index];
1556
- const itemB = b[index];
1557
- const sharedValue = mergeValues(itemA, itemB);
1558
- if (!sharedValue.valid) {
1559
- return {
1560
- valid: false,
1561
- mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
1562
- };
1563
- }
1564
- newArray.push(sharedValue.data);
1565
- }
1566
- return { valid: true, data: newArray };
1567
- }
1568
- return { valid: false, mergeErrorPath: [] };
1569
- }
1570
- function handleIntersectionResults(result, left, right) {
1571
- // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.
1572
- const unrecKeys = new Map();
1573
- let unrecIssue;
1574
- const keyIssues = new Map();
1575
- const collect = (iss, side) => {
1576
- let keys;
1577
- if (iss.code === "unrecognized_keys" && !iss.path?.length) {
1578
- unrecIssue ?? (unrecIssue = iss);
1579
- keys = iss.keys;
1580
- }
1581
- else if (iss.code === "invalid_key" && iss.origin === "record" && iss.path?.length === 1) {
1582
- const k = String(iss.path[0]);
1583
- if (!keyIssues.has(k))
1584
- keyIssues.set(k, iss);
1585
- keys = [k];
1586
- }
1587
- else {
1588
- return false;
1589
- }
1590
- for (const k of keys) {
1591
- if (!unrecKeys.has(k))
1592
- unrecKeys.set(k, {});
1593
- unrecKeys.get(k)[side] = true;
1594
- }
1595
- return true;
1596
- };
1597
- for (const iss of left.issues) {
1598
- if (!collect(iss, "l"))
1599
- result.issues.push(iss);
1600
- }
1601
- for (const iss of right.issues) {
1602
- if (!collect(iss, "r"))
1603
- result.issues.push(iss);
1604
- }
1605
- // Report only keys rejected by BOTH sides
1606
- const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1607
- if (bothKeys.length) {
1608
- const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];
1609
- if (aggregated.length)
1610
- result.issues.push({ ...unrecIssue, keys: aggregated });
1611
- for (const k of bothKeys) {
1612
- if (!aggregated.includes(k) && keyIssues.has(k))
1613
- result.issues.push(keyIssues.get(k));
1614
- }
1615
- }
1616
- const merged = mergeValues(left.value, right.value);
1617
- if (!merged.valid) {
1618
- if (util.aborted(result))
1619
- return result;
1620
- throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
1621
- }
1622
- result.value = merged.data;
1623
- return result;
1624
- }
1625
- exports.$ZodTuple = core.$constructor("$ZodTuple", (inst, def) => {
1626
- exports.$ZodType.init(inst, def);
1627
- const items = def.items;
1628
- const memo = core.globalConfig.memoizer;
1629
- memo?.attach(inst);
1630
- inst._zod.parse = (payload, ctx) => {
1631
- const input = payload.value;
1632
- if (!Array.isArray(input)) {
1633
- payload.issues.push({
1634
- input,
1635
- inst,
1636
- expected: "tuple",
1637
- code: "invalid_type",
1638
- });
1639
- return payload;
1640
- }
1641
- payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
1642
- const proms = [];
1643
- const optinStart = getTupleOptStart(items, "optin");
1644
- const optoutStart = getTupleOptStart(items, "optout");
1645
- if (!def.rest) {
1646
- if (input.length < optinStart) {
1647
- payload.issues.push({
1648
- code: "too_small",
1649
- minimum: optinStart,
1650
- inclusive: true,
1651
- input,
1652
- inst,
1653
- origin: "array",
1654
- });
1655
- return payload;
1656
- }
1657
- if (input.length > items.length) {
1658
- payload.issues.push({
1659
- code: "too_big",
1660
- maximum: items.length,
1661
- inclusive: true,
1662
- input,
1663
- inst,
1664
- origin: "array",
1665
- });
1666
- }
1667
- }
1668
- // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.
1669
- const itemResults = new Array(items.length);
1670
- // only tracked when there is a rest loop to skip
1671
- const abortEarly = def.rest ? ctx?.abortEarly : undefined;
1672
- let itemAborted = false;
1673
- for (let i = 0; i < items.length; i++) {
1674
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
1675
- if (r instanceof Promise) {
1676
- proms.push(r.then((rr) => {
1677
- itemResults[i] = rr;
1678
- }));
1679
- }
1680
- else {
1681
- itemResults[i] = r;
1682
- if (abortEarly && !itemAborted && r.issues.length)
1683
- itemAborted = util.aborted(r);
1684
- }
1685
- }
1686
- // sound because rest is non-empty exactly when every fixed index is present, the one case handleTupleResults cannot discard an item's issues
1687
- if (def.rest && !itemAborted) {
1688
- let i = items.length - 1;
1689
- const rest = input.slice(items.length);
1690
- let seen = payload.issues.length;
1691
- for (const el of rest) {
1692
- if (abortEarly && payload.issues.length !== seen) {
1693
- if (util.aborted(payload, seen))
1694
- break;
1695
- seen = payload.issues.length;
1696
- }
1697
- i++;
1698
- const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
1699
- if (result instanceof Promise) {
1700
- proms.push(result.then((r) => handleTupleResult(r, payload, i)));
1701
- }
1702
- else {
1703
- handleTupleResult(result, payload, i);
1704
- }
1705
- }
1706
- }
1707
- if (proms.length) {
1708
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
1709
- }
1710
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
1711
- };
1712
- });
1713
- function getTupleOptStart(items, key) {
1714
- for (let i = items.length - 1; i >= 0; i--) {
1715
- // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.
1716
- const omittable = key === "optin" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === "optional";
1717
- if (!omittable)
1718
- return i + 1;
1719
- }
1720
- return 0;
1721
- }
1722
- function handleTupleResult(result, final, index) {
1723
- if (result.issues.length) {
1724
- final.issues.push(...util.prefixIssues(index, result.issues));
1725
- }
1726
- final.value[index] = result.value;
1727
- }
1728
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
1729
- // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.
1730
- for (let i = 0; i < items.length; i++) {
1731
- const r = itemResults[i];
1732
- const isPresent = i < input.length;
1733
- // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.
1734
- if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
1735
- final.value.length = i;
1736
- break;
1737
- }
1738
- if (r.issues.length) {
1739
- if (!isPresent && i >= optoutStart) {
1740
- final.value.length = i;
1741
- break;
1742
- }
1743
- final.issues.push(...util.prefixIssues(i, r.issues));
1744
- }
1745
- final.value[i] = r.value;
1746
- }
1747
- // Drop trailing slots that produced `undefined` for absent input
1748
- // (the array analog of an absent optional key on an object). The
1749
- // `i >= input.length` floor is critical: an explicit `undefined`
1750
- // *inside* the input must be preserved even when the schema is
1751
- // optional-out (e.g. `z.string().or(z.undefined())` accepting an
1752
- // explicit undefined value).
1753
- for (let i = final.value.length - 1; i >= input.length; i--) {
1754
- if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
1755
- final.value.length = i;
1756
- }
1757
- else {
1758
- break;
1759
- }
1760
- }
1761
- return final;
1762
- }
1763
- exports.$ZodRecord = core.$constructor("$ZodRecord", (inst, def) => {
1764
- exports.$ZodType.init(inst, def);
1765
- const memo = core.globalConfig.memoizer;
1766
- memo?.attach(inst);
1767
- inst._zod.parse = (payload, ctx) => {
1768
- const input = payload.value;
1769
- if (!util.isPlainObject(input)) {
1770
- payload.issues.push({
1771
- expected: "record",
1772
- code: "invalid_type",
1773
- input,
1774
- inst,
1775
- });
1776
- return payload;
1777
- }
1778
- // no guard in either loop below: a record's invalid_key aborts but an enclosing intersection can reconcile it, so a stopped loop hides keys the sibling does not own and the intersection then rejects nothing
1779
- const proms = [];
1780
- const values = def.keyType._zod.values;
1781
- if (values && !def.partial) {
1782
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1783
- const recordKeys = new Set();
1784
- for (const key of values) {
1785
- if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1786
- recordKeys.add(typeof key === "number" ? key.toString() : key);
1787
- // A declared __proto__ is stripped but is not an unrecognized key.
1788
- if (key === "__proto__")
1789
- continue;
1790
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1791
- if (keyResult instanceof Promise) {
1792
- throw new Error("Async schemas not supported in object keys currently");
1793
- }
1794
- if (keyResult.issues.length) {
1795
- payload.issues.push({
1796
- code: "invalid_key",
1797
- origin: "record",
1798
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1799
- input: key,
1800
- path: [key],
1801
- inst,
1802
- });
1803
- continue;
1804
- }
1805
- const outKey = keyResult.value;
1806
- if (outKey === "__proto__")
1807
- continue;
1808
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1809
- if (result instanceof Promise) {
1810
- proms.push(result.then((result) => {
1811
- if (result.issues.length) {
1812
- payload.issues.push(...util.prefixIssues(key, result.issues));
1813
- }
1814
- payload.value[outKey] = result.value;
1815
- }));
1816
- }
1817
- else {
1818
- if (result.issues.length) {
1819
- payload.issues.push(...util.prefixIssues(key, result.issues));
1820
- }
1821
- payload.value[outKey] = result.value;
1822
- }
1823
- }
1824
- }
1825
- let unrecognized;
1826
- for (const key in input) {
1827
- if (!recordKeys.has(key)) {
1828
- if (def.mode === "loose") {
1829
- // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into
1830
- if (key === "__proto__")
1831
- continue;
1832
- payload.value[key] = input[key];
1833
- }
1834
- else {
1835
- unrecognized = unrecognized ?? [];
1836
- unrecognized.push(key);
1837
- }
1838
- }
1839
- }
1840
- if (unrecognized && unrecognized.length > 0) {
1841
- payload.issues.push({
1842
- code: "unrecognized_keys",
1843
- input,
1844
- inst,
1845
- keys: unrecognized,
1846
- continue: true,
1847
- });
1848
- }
1849
- }
1850
- else {
1851
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1852
- // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.
1853
- let unrecognized;
1854
- // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()
1855
- for (const key of Reflect.ownKeys(input)) {
1856
- if (key === "__proto__")
1857
- continue;
1858
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
1859
- continue;
1860
- let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1861
- if (keyResult instanceof Promise) {
1862
- throw new Error("Async schemas not supported in object keys currently");
1863
- }
1864
- // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
1865
- const checkNumericKey = typeof key === "string" && regexes.number.test(key) && keyResult.issues.length;
1866
- if (checkNumericKey) {
1867
- const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
1868
- if (retryResult instanceof Promise) {
1869
- throw new Error("Async schemas not supported in object keys currently");
1870
- }
1871
- if (retryResult.issues.length === 0) {
1872
- keyResult = retryResult;
1873
- }
1874
- }
1875
- if (keyResult.issues.length) {
1876
- if (def.mode === "loose") {
1877
- // Pass through unchanged
1878
- payload.value[key] = input[key];
1879
- }
1880
- else if (values) {
1881
- unrecognized = unrecognized ?? [];
1882
- unrecognized.push(key);
1883
- }
1884
- else {
1885
- // Default "strict" behavior: error on invalid key
1886
- payload.issues.push({
1887
- code: "invalid_key",
1888
- origin: "record",
1889
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1890
- input: key,
1891
- path: [key],
1892
- inst,
1893
- });
1894
- }
1895
- continue;
1896
- }
1897
- // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under
1898
- const outKey = keyResult.value;
1899
- if (outKey === "__proto__")
1900
- continue;
1901
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1902
- if (result instanceof Promise) {
1903
- proms.push(result.then((result) => {
1904
- if (result.issues.length) {
1905
- payload.issues.push(...util.prefixIssues(key, result.issues));
1906
- }
1907
- payload.value[outKey] = result.value;
1908
- }));
1909
- }
1910
- else {
1911
- if (result.issues.length) {
1912
- payload.issues.push(...util.prefixIssues(key, result.issues));
1913
- }
1914
- payload.value[outKey] = result.value;
1915
- }
1916
- }
1917
- if (unrecognized && unrecognized.length > 0) {
1918
- payload.issues.push({
1919
- code: "unrecognized_keys",
1920
- input,
1921
- inst,
1922
- keys: unrecognized,
1923
- continue: true,
1924
- });
1925
- }
1926
- }
1927
- if (proms.length) {
1928
- return Promise.all(proms).then(() => payload);
1929
- }
1930
- return payload;
1931
- };
1932
- });
1933
- exports.$ZodMap = core.$constructor("$ZodMap", (inst, def) => {
1934
- exports.$ZodType.init(inst, def);
1935
- const memo = core.globalConfig.memoizer;
1936
- memo?.attach(inst);
1937
- inst._zod.parse = (payload, ctx) => {
1938
- const input = payload.value;
1939
- if (!(input instanceof Map)) {
1940
- payload.issues.push({
1941
- expected: "map",
1942
- code: "invalid_type",
1943
- input,
1944
- inst,
1945
- });
1946
- return payload;
1947
- }
1948
- const proms = [];
1949
- payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();
1950
- const abortEarly = ctx?.abortEarly;
1951
- let seen = payload.issues.length;
1952
- for (const [key, value] of input) {
1953
- if (abortEarly && payload.issues.length !== seen) {
1954
- if (util.aborted(payload, seen))
1955
- break;
1956
- seen = payload.issues.length;
1957
- }
1958
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1959
- const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
1960
- if (keyResult instanceof Promise || valueResult instanceof Promise) {
1961
- proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
1962
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1963
- }));
1964
- }
1965
- else {
1966
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1967
- }
1968
- }
1969
- if (proms.length)
1970
- return Promise.all(proms).then(() => payload);
1971
- return payload;
1972
- };
1973
- capSize(inst, mapSize);
1974
- });
1975
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1976
- if (keyResult.issues.length) {
1977
- if (util.propertyKeyTypes.has(typeof key)) {
1978
- final.issues.push(...util.prefixIssues(key, keyResult.issues));
1979
- }
1980
- else {
1981
- final.issues.push({
1982
- code: "invalid_key",
1983
- origin: "map",
1984
- input,
1985
- inst,
1986
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1987
- });
1988
- }
1989
- }
1990
- if (valueResult.issues.length) {
1991
- if (util.propertyKeyTypes.has(typeof key)) {
1992
- final.issues.push(...util.prefixIssues(key, valueResult.issues));
1993
- }
1994
- else {
1995
- final.issues.push({
1996
- origin: "map",
1997
- code: "invalid_element",
1998
- input,
1999
- inst,
2000
- key: key,
2001
- issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2002
- });
2003
- }
2004
- }
2005
- final.value.set(keyResult.value, valueResult.value);
2006
- }
2007
- exports.$ZodSet = core.$constructor("$ZodSet", (inst, def) => {
2008
- exports.$ZodType.init(inst, def);
2009
- const memo = core.globalConfig.memoizer;
2010
- memo?.attach(inst);
2011
- inst._zod.parse = (payload, ctx) => {
2012
- const input = payload.value;
2013
- if (!(input instanceof Set)) {
2014
- payload.issues.push({
2015
- input,
2016
- inst,
2017
- expected: "set",
2018
- code: "invalid_type",
2019
- });
2020
- return payload;
2021
- }
2022
- const proms = [];
2023
- payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();
2024
- const abortEarly = ctx?.abortEarly;
2025
- let seen = payload.issues.length;
2026
- for (const item of input) {
2027
- if (abortEarly && payload.issues.length !== seen) {
2028
- if (util.aborted(payload, seen))
2029
- break;
2030
- seen = payload.issues.length;
2031
- }
2032
- const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
2033
- if (result instanceof Promise) {
2034
- proms.push(result.then((result) => handleSetResult(result, payload)));
2035
- }
2036
- else
2037
- handleSetResult(result, payload);
2038
- }
2039
- if (proms.length)
2040
- return Promise.all(proms).then(() => payload);
2041
- return payload;
2042
- };
2043
- capSize(inst, setSize);
2044
- });
2045
- function handleSetResult(result, final) {
2046
- if (result.issues.length) {
2047
- final.issues.push(...result.issues);
2048
- }
2049
- final.value.add(result.value);
2050
- }
2051
- exports.$ZodEnum = core.$constructor("$ZodEnum", (inst, def) => {
2052
- exports.$ZodType.init(inst, def);
2053
- const values = util.getEnumValues(def.entries);
2054
- const valuesSet = new Set(values);
2055
- inst._zod.values = valuesSet;
2056
- util.defineLazyInternal(inst, "pattern", (zod) => {
2057
- const patternValues = util.getEnumValues(zod.def.entries).filter((k) => util.propertyKeyTypes.has(typeof k));
2058
- // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
2059
- return new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
2060
- });
2061
- inst._zod.parse = (payload, _ctx) => {
2062
- const input = payload.value;
2063
- if (valuesSet.has(input)) {
2064
- return payload;
2065
- }
2066
- payload.issues.push({
2067
- code: "invalid_value",
2068
- values,
2069
- input,
2070
- inst,
2071
- });
2072
- return payload;
2073
- };
2074
- });
2075
- exports.$ZodLiteral = core.$constructor("$ZodLiteral", (inst, def) => {
2076
- exports.$ZodType.init(inst, def);
2077
- const values = new Set(def.values);
2078
- inst._zod.values = values;
2079
- util.defineLazyInternal(inst, "pattern", (zod) => {
2080
- const vals = zod.def.values;
2081
- // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
2082
- return new RegExp(vals.length
2083
- ? `^(${vals
2084
- .map((o) => typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o))
2085
- .join("|")})$`
2086
- : "^[^\\s\\S]$");
2087
- });
2088
- inst._zod.parse = (payload, _ctx) => {
2089
- const input = payload.value;
2090
- if (values.has(input)) {
2091
- return payload;
2092
- }
2093
- payload.issues.push({
2094
- code: "invalid_value",
2095
- values: def.values,
2096
- input,
2097
- inst,
2098
- });
2099
- return payload;
2100
- };
2101
- });
2102
- exports.$ZodFile = core.$constructor("$ZodFile", (inst, def) => {
2103
- exports.$ZodType.init(inst, def);
2104
- inst._zod.parse = (payload, _ctx) => {
2105
- const input = payload.value;
2106
- // @ts-ignore
2107
- if (input instanceof File)
2108
- return payload;
2109
- payload.issues.push({
2110
- expected: "file",
2111
- code: "invalid_type",
2112
- input,
2113
- inst,
2114
- });
2115
- return payload;
2116
- };
2117
- });
2118
- exports.$ZodTransform = core.$constructor("$ZodTransform", (inst, def) => {
2119
- exports.$ZodType.init(inst, def);
2120
- inst._zod.optin = "optional";
2121
- core.globalConfig.memoizer?.guard(inst);
2122
- inst._zod.parse = (payload, ctx) => {
2123
- if (ctx.direction === "backward") {
2124
- throw new core.$ZodEncodeError(inst.constructor.name);
2125
- }
2126
- const _out = def.transform(payload.value, payload);
2127
- if (ctx.async) {
2128
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
2129
- return output.then((output) => {
2130
- payload.value = output;
2131
- return payload;
2132
- });
2133
- }
2134
- if (_out instanceof Promise) {
2135
- throw new core.$ZodAsyncError();
2136
- }
2137
- payload.value = _out;
2138
- return payload;
2139
- };
2140
- });
2141
- function handleOptionalResult(payload, result) {
2142
- // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.
2143
- payload.value = result.issues.length ? undefined : result.value;
2144
- return payload;
2145
- }
2146
- exports.$ZodOptional = core.$constructor("$ZodOptional", (inst, def) => {
2147
- exports.$ZodType.init(inst, def);
2148
- // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.
2149
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2150
- inst._zod.optout = "optional";
2151
- util.defineLazyInternal(inst, "values", (zod) => {
2152
- const values = zod.def.innerType._zod.values;
2153
- return values ? new Set([...values, undefined]) : undefined;
2154
- });
2155
- util.defineLazyInternal(inst, "pattern", (zod) => {
2156
- const pattern = zod.def.innerType._zod.pattern;
2157
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
2158
- });
2159
- inst._zod.parse = (payload, ctx) => {
2160
- if (payload.value === undefined) {
2161
- // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.
2162
- if (def.innerType._zod.optin !== "defaulted")
2163
- return payload;
2164
- // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.
2165
- const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
2166
- if (result instanceof Promise)
2167
- return result.then((result) => handleOptionalResult(payload, result));
2168
- return handleOptionalResult(payload, result);
2169
- }
2170
- return def.innerType._zod.run(payload, ctx);
2171
- };
2172
- });
2173
- exports.$ZodExactOptional = core.$constructor("$ZodExactOptional", (inst, def) => {
2174
- // Call parent init - inherits optin/optout = "optional"
2175
- exports.$ZodOptional.init(inst, def);
2176
- // Override values/pattern to NOT add undefined
2177
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2178
- util.defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
2179
- // Override parse to just delegate (no undefined handling)
2180
- inst._zod.parse = (payload, ctx) => {
2181
- return def.innerType._zod.run(payload, ctx);
2182
- };
2183
- });
2184
- exports.$ZodNullable = core.$constructor("$ZodNullable", (inst, def) => {
2185
- exports.$ZodType.init(inst, def);
2186
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
2187
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
2188
- util.defineLazyInternal(inst, "pattern", (zod) => {
2189
- const pattern = zod.def.innerType._zod.pattern;
2190
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
2191
- });
2192
- util.defineLazyInternal(inst, "values", (zod) => {
2193
- return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;
2194
- });
2195
- inst._zod.parse = (payload, ctx) => {
2196
- // Forward direction (decode): allow null to pass through
2197
- if (payload.value === null)
2198
- return payload;
2199
- return def.innerType._zod.run(payload, ctx);
2200
- };
2201
- });
2202
- exports.$ZodDefault = core.$constructor("$ZodDefault", (inst, def) => {
2203
- exports.$ZodType.init(inst, def);
2204
- // inst._zod.qin = "true";
2205
- inst._zod.optin = "defaulted";
2206
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2207
- inst._zod.parse = (payload, ctx) => {
2208
- if (ctx.direction === "backward") {
2209
- return def.innerType._zod.run(payload, ctx);
2210
- }
2211
- // Forward direction (decode): apply defaults for undefined input
2212
- if (payload.value === undefined) {
2213
- payload.value = def.defaultValue;
2214
- /**
2215
- * $ZodDefault returns the default value immediately in forward direction.
2216
- * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
2217
- return payload;
2218
- }
2219
- // Forward direction: continue with default handling
2220
- const result = def.innerType._zod.run(payload, ctx);
2221
- if (result instanceof Promise) {
2222
- return result.then((result) => handleDefaultResult(result, def));
2223
- }
2224
- return handleDefaultResult(result, def);
2225
- };
2226
- });
2227
- function handleDefaultResult(payload, def) {
2228
- if (payload.value === undefined) {
2229
- payload.value = def.defaultValue;
2230
- }
2231
- return payload;
2232
- }
2233
- exports.$ZodPrefault = core.$constructor("$ZodPrefault", (inst, def) => {
2234
- exports.$ZodType.init(inst, def);
2235
- inst._zod.optin = "defaulted";
2236
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2237
- inst._zod.parse = (payload, ctx) => {
2238
- if (ctx.direction === "backward") {
2239
- return def.innerType._zod.run(payload, ctx);
2240
- }
2241
- // Forward direction (decode): apply prefault for undefined input
2242
- if (payload.value === undefined) {
2243
- payload.value = def.defaultValue;
2244
- }
2245
- return def.innerType._zod.run(payload, ctx);
2246
- };
2247
- });
2248
- exports.$ZodNonOptional = core.$constructor("$ZodNonOptional", (inst, def) => {
2249
- exports.$ZodType.init(inst, def);
2250
- util.defineLazyInternal(inst, "values", (zod) => {
2251
- const v = zod.def.innerType._zod.values;
2252
- return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
2253
- });
2254
- inst._zod.parse = (payload, ctx) => {
2255
- const result = def.innerType._zod.run(payload, ctx);
2256
- if (result instanceof Promise) {
2257
- return result.then((result) => handleNonOptionalResult(result, inst));
2258
- }
2259
- return handleNonOptionalResult(result, inst);
2260
- };
2261
- });
2262
- function handleNonOptionalResult(payload, inst) {
2263
- if (!payload.issues.length && payload.value === undefined) {
2264
- payload.issues.push({
2265
- code: "invalid_type",
2266
- expected: "nonoptional",
2267
- input: payload.value,
2268
- inst,
2269
- });
2270
- }
2271
- return payload;
2272
- }
2273
- exports.$ZodSuccess = core.$constructor("$ZodSuccess", (inst, def) => {
2274
- exports.$ZodType.init(inst, def);
2275
- inst._zod.parse = (payload, ctx) => {
2276
- if (ctx.direction === "backward") {
2277
- throw new core.$ZodEncodeError("ZodSuccess");
2278
- }
2279
- const result = def.innerType._zod.run(payload, ctx);
2280
- if (result instanceof Promise) {
2281
- return result.then((result) => {
2282
- payload.value = result.issues.length === 0;
2283
- return payload;
2284
- });
2285
- }
2286
- payload.value = result.issues.length === 0;
2287
- return payload;
2288
- };
2289
- });
2290
- function handleCatchResult(payload, result, def, ctx) {
2291
- if (!result.issues.length) {
2292
- payload.value = result.value;
2293
- // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.
2294
- if (result.memo)
2295
- payload.memo = true;
2296
- return payload;
2297
- }
2298
- // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.
2299
- payload.value = def.catchValue({
2300
- ...result,
2301
- value: payload.value,
2302
- error: {
2303
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2304
- },
2305
- input: payload.value,
2306
- });
2307
- return payload;
2308
- }
2309
- exports.$ZodCatch = core.$constructor("$ZodCatch", (inst, def) => {
2310
- exports.$ZodType.init(inst, def);
2311
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2312
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
2313
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2314
- inst._zod.parse = (payload, ctx) => {
2315
- if (ctx.direction === "backward") {
2316
- return def.innerType._zod.run(payload, ctx);
2317
- }
2318
- // Forward direction (decode): apply catch logic
2319
- const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
2320
- if (result instanceof Promise) {
2321
- return result.then((result) => handleCatchResult(payload, result, def, ctx));
2322
- }
2323
- return handleCatchResult(payload, result, def, ctx);
2324
- };
2325
- });
2326
- exports.$ZodNaN = core.$constructor("$ZodNaN", (inst, def) => {
2327
- exports.$ZodType.init(inst, def);
2328
- inst._zod.parse = (payload, _ctx) => {
2329
- if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
2330
- payload.issues.push({
2331
- input: payload.value,
2332
- inst,
2333
- expected: "nan",
2334
- code: "invalid_type",
2335
- });
2336
- return payload;
2337
- }
2338
- return payload;
2339
- };
2340
- });
2341
- exports.$ZodPipe = core.$constructor("$ZodPipe", (inst, def) => {
2342
- exports.$ZodType.init(inst, def);
2343
- util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2344
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
2345
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
2346
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
2347
- inst._zod.parse = (payload, ctx) => {
2348
- if (ctx.direction === "backward") {
2349
- const right = def.out._zod.run(payload, ctx);
2350
- if (right instanceof Promise) {
2351
- return right.then((right) => handlePipeResult(right, def.in, ctx));
2352
- }
2353
- return handlePipeResult(right, def.in, ctx);
2354
- }
2355
- const left = def.in._zod.run(payload, ctx);
2356
- if (left instanceof Promise) {
2357
- return left.then((left) => handlePipeResult(left, def.out, ctx));
2358
- }
2359
- return handlePipeResult(left, def.out, ctx);
2360
- };
2361
- });
2362
- function handlePipeResult(left, next, ctx) {
2363
- // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.
2364
- if (left.issues.some((iss) => iss.code !== "unrecognized_keys")) {
2365
- // prevent further checks
2366
- left.aborted = true;
2367
- return left;
2368
- }
2369
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
2370
- }
2371
- exports.$ZodCodec = core.$constructor("$ZodCodec", (inst, def) => {
2372
- exports.$ZodType.init(inst, def);
2373
- util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2374
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
2375
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
2376
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
2377
- inst._zod.parse = (payload, ctx) => {
2378
- const direction = ctx.direction || "forward";
2379
- if (direction === "forward") {
2380
- const left = def.in._zod.run(payload, ctx);
2381
- if (left instanceof Promise) {
2382
- return left.then((left) => handleCodecAResult(left, def, ctx));
2383
- }
2384
- return handleCodecAResult(left, def, ctx);
2385
- }
2386
- else {
2387
- const right = def.out._zod.run(payload, ctx);
2388
- if (right instanceof Promise) {
2389
- return right.then((right) => handleCodecAResult(right, def, ctx));
2390
- }
2391
- return handleCodecAResult(right, def, ctx);
2392
- }
2393
- };
2394
- });
2395
- function handleCodecAResult(result, def, ctx) {
2396
- if (result.issues.length) {
2397
- // prevent further checks
2398
- result.aborted = true;
2399
- return result;
2400
- }
2401
- const direction = ctx.direction || "forward";
2402
- if (direction === "forward") {
2403
- const transformed = def.transform(result.value, result);
2404
- if (transformed instanceof Promise) {
2405
- return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
2406
- }
2407
- return handleCodecTxResult(result, transformed, def.out, ctx);
2408
- }
2409
- else {
2410
- const transformed = def.reverseTransform(result.value, result);
2411
- if (transformed instanceof Promise) {
2412
- return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
2413
- }
2414
- return handleCodecTxResult(result, transformed, def.in, ctx);
2415
- }
2416
- }
2417
- function handleCodecTxResult(left, value, nextSchema, ctx) {
2418
- // Check if transform added any issues
2419
- if (left.issues.length) {
2420
- left.aborted = true;
2421
- return left;
2422
- }
2423
- return nextSchema._zod.run({ value, issues: left.issues }, ctx);
2424
- }
2425
- exports.$ZodPreprocess = core.$constructor("$ZodPreprocess", (inst, def) => {
2426
- exports.$ZodPipe.init(inst, def);
2427
- });
2428
- exports.$ZodReadonly = core.$constructor("$ZodReadonly", (inst, def) => {
2429
- exports.$ZodType.init(inst, def);
2430
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
2431
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2432
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType?._zod?.optin);
2433
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType?._zod?.optout);
2434
- inst._zod.parse = (payload, ctx) => {
2435
- if (ctx.direction === "backward") {
2436
- return def.innerType._zod.run(payload, ctx);
2437
- }
2438
- const result = def.innerType._zod.run(payload, ctx);
2439
- if (result instanceof Promise) {
2440
- return result.then(handleReadonlyResult);
2441
- }
2442
- return handleReadonlyResult(result);
2443
- };
2444
- });
2445
- function handleReadonlyResult(payload) {
2446
- // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.
2447
- if (!payload.memo)
2448
- payload.value = Object.freeze(payload.value);
2449
- return payload;
2450
- }
2451
- // a leaf's pattern source with its own checks folded in: the last pattern-carrying check wins, else length bounds narrow the catch-all, else an integer format narrows the number form. the fold lives here instead of on `_zod.pattern` so a bundle without template literals never pays for it
2452
- function leafPattern(schema) {
2453
- const def = schema._zod.def;
2454
- let pattern = def.pattern;
2455
- let isInt = !!def.format?.includes("int");
2456
- let minimum;
2457
- let maximum;
2458
- for (const ch of def.checks ?? []) {
2459
- const d = ch._zod.def;
2460
- if (d.pattern)
2461
- pattern = d.pattern;
2462
- isInt || (isInt = !!d.format?.includes("int"));
2463
- const lo = d.minimum ?? d.length;
2464
- const hi = d.maximum ?? d.length;
2465
- if (lo !== undefined && (minimum === undefined || lo > minimum))
2466
- minimum = lo;
2467
- if (hi !== undefined && (maximum === undefined || hi < maximum))
2468
- maximum = hi;
2469
- }
2470
- if (pattern)
2471
- return pattern.source;
2472
- // an empty range matches nothing at runtime, and `{8,5}` is not a legal quantifier
2473
- if (minimum !== undefined && maximum !== undefined && minimum > maximum)
2474
- return "(?!)";
2475
- if (minimum !== undefined || maximum !== undefined)
2476
- return regexes.string({ minimum, maximum }).source;
2477
- const own = schema._zod.pattern;
2478
- return (isInt && own === regexes.number ? regexes.integer : own)?.source;
2479
- }
2480
- // a part's pattern source. a wrapper's pattern embeds its inner pattern's source verbatim, so the folded form is substituted in place without knowing the wrapper's own composition; a union's options are joined the way the union builds its own pattern
2481
- function partPattern(schema) {
2482
- const def = schema._zod.def;
2483
- const own = schema._zod.pattern?.source;
2484
- // lazy resolves its inner on the internals, not the def
2485
- const inner = def.innerType ?? schema._zod.innerType;
2486
- if (inner) {
2487
- const before = inner._zod.pattern?.source;
2488
- const after = partPattern(inner);
2489
- if (own && before && after && after !== before) {
2490
- return own.replace(util.cleanRegex(before), () => util.cleanRegex(after));
2491
- }
2492
- return own;
2493
- }
2494
- if (def.options) {
2495
- const sources = def.options.map(partPattern);
2496
- if (sources.every(Boolean))
2497
- return `^(${sources.map((s) => util.cleanRegex(s)).join("|")})$`;
2498
- }
2499
- return leafPattern(schema);
2500
- }
2501
- exports.$ZodTemplateLiteral = core.$constructor("$ZodTemplateLiteral", (inst, def) => {
2502
- exports.$ZodType.init(inst, def);
2503
- const regexParts = [];
2504
- for (const part of def.parts) {
2505
- if (typeof part === "object" && part !== null) {
2506
- // is Zod schema
2507
- const source = partPattern(part);
2508
- if (!source) {
2509
- throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
2510
- }
2511
- regexParts.push(util.cleanRegex(source));
2512
- }
2513
- else if (part === null || util.primitiveTypes.has(typeof part)) {
2514
- regexParts.push(util.escapeRegex(`${part}`));
2515
- }
2516
- else {
2517
- throw new Error(`Invalid template literal part: ${part}`);
2518
- }
2519
- }
2520
- inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
2521
- inst._zod.parse = (payload, _ctx) => {
2522
- if (typeof payload.value !== "string") {
2523
- payload.issues.push({
2524
- input: payload.value,
2525
- inst,
2526
- expected: "string",
2527
- code: "invalid_type",
2528
- });
2529
- return payload;
2530
- }
2531
- inst._zod.pattern.lastIndex = 0;
2532
- if (!inst._zod.pattern.test(payload.value)) {
2533
- payload.issues.push({
2534
- input: payload.value,
2535
- inst,
2536
- code: "invalid_format",
2537
- format: def.format ?? "template_literal",
2538
- pattern: inst._zod.pattern.source,
2539
- });
2540
- return payload;
2541
- }
2542
- return payload;
2543
- };
2544
- });
2545
- exports.$ZodFunction = core.$constructor("$ZodFunction", (inst, def) => {
2546
- exports.$ZodType.init(inst, def);
2547
- // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.
2548
- Object.defineProperty(inst, "_def", { value: def });
2549
- inst._zod.def = def;
2550
- inst.implement = (func) => {
2551
- if (typeof func !== "function") {
2552
- throw new Error("implement() must be called with a function");
2553
- }
2554
- // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.
2555
- return Object.defineProperty(function (...args) {
2556
- const parsedArgs = inst._def.input ? (0, parse_js_1.parse)(inst._def.input, args) : args;
2557
- const result = Reflect.apply(func, this, parsedArgs);
2558
- if (inst._def.output) {
2559
- return (0, parse_js_1.parse)(inst._def.output, result);
2560
- }
2561
- return result;
2562
- }, "_zod", { value: inst._zod, enumerable: false });
2563
- };
2564
- inst.implementAsync = (func) => {
2565
- if (typeof func !== "function") {
2566
- throw new Error("implementAsync() must be called with a function");
2567
- }
2568
- return Object.defineProperty(async function (...args) {
2569
- const parsedArgs = inst._def.input ? await (0, parse_js_1.parseAsync)(inst._def.input, args) : args;
2570
- const result = await Reflect.apply(func, this, parsedArgs);
2571
- if (inst._def.output) {
2572
- return await (0, parse_js_1.parseAsync)(inst._def.output, result);
2573
- }
2574
- return result;
2575
- }, "_zod", { value: inst._zod, enumerable: false });
2576
- };
2577
- inst._zod.parse = (payload, _ctx) => {
2578
- if (typeof payload.value !== "function") {
2579
- payload.issues.push({
2580
- code: "invalid_type",
2581
- expected: "function",
2582
- input: payload.value,
2583
- inst,
2584
- });
2585
- return payload;
2586
- }
2587
- // Check if output is a promise type to determine if we should use async implementation
2588
- const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
2589
- if (hasPromiseOutput) {
2590
- payload.value = inst.implementAsync(payload.value);
2591
- }
2592
- else {
2593
- payload.value = inst.implement(payload.value);
2594
- }
2595
- return payload;
2596
- };
2597
- inst.input = (...args) => {
2598
- const F = inst.constructor;
2599
- if (Array.isArray(args[0])) {
2600
- return new F({
2601
- type: "function",
2602
- input: new exports.$ZodTuple({
2603
- type: "tuple",
2604
- items: args[0],
2605
- rest: args[1],
2606
- }),
2607
- output: inst._def.output,
2608
- });
2609
- }
2610
- return new F({
2611
- type: "function",
2612
- input: args[0],
2613
- output: inst._def.output,
2614
- });
2615
- };
2616
- inst.output = (output) => {
2617
- const F = inst.constructor;
2618
- return new F({
2619
- type: "function",
2620
- input: inst._def.input,
2621
- output,
2622
- });
2623
- };
2624
- return inst;
2625
- });
2626
- exports.$ZodPromise = core.$constructor("$ZodPromise", (inst, def) => {
2627
- exports.$ZodType.init(inst, def);
2628
- inst._zod.parse = (payload, ctx) => {
2629
- return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
2630
- };
2631
- });
2632
- exports.$ZodLazy = core.$constructor("$ZodLazy", (inst, def) => {
2633
- exports.$ZodType.init(inst, def);
2634
- // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.
2635
- util.defineLazy(inst._zod, "innerType", () => {
2636
- const d = def;
2637
- if (!d._cachedInner)
2638
- d._cachedInner = def.getter();
2639
- return d._cachedInner;
2640
- });
2641
- util.defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
2642
- util.defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
2643
- util.defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? undefined);
2644
- util.defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? undefined);
2645
- inst._zod.parse = (payload, ctx) => {
2646
- const inner = inst._zod.innerType;
2647
- return inner._zod.run(payload, ctx);
2648
- };
2649
- });
2650
- exports.$ZodCustom = core.$constructor("$ZodCustom", (inst, def) => {
2651
- checks.$ZodCheck.init(inst, def);
2652
- exports.$ZodType.init(inst, def);
2653
- inst._zod.parse = (payload, _) => {
2654
- return payload;
2655
- };
2656
- inst._zod.check = (payload) => {
2657
- const input = payload.value;
2658
- const r = def.fn(input);
2659
- if (r instanceof Promise) {
2660
- return r.then((r) => handleRefineResult(r, payload, input, inst));
2661
- }
2662
- handleRefineResult(r, payload, input, inst);
2663
- return;
2664
- };
2665
- });
2666
- function handleRefineResult(result, payload, input, inst) {
2667
- if (!result) {
2668
- const _iss = {
2669
- code: "custom",
2670
- input,
2671
- inst, // incorporates params.error into issue reporting
2672
- path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
2673
- continue: !inst._zod.def.abort,
2674
- // params: inst._zod.def.params,
2675
- };
2676
- if (inst._zod.def.params)
2677
- _iss.params = inst._zod.def.params;
2678
- payload.issues.push(util.issue(_iss));
2679
- }
2680
- }
2681
-
2682
- // seal-cjs-exports
2683
- (function () {
2684
- var keys = Object.getOwnPropertyNames(exports);
2685
- for (var i = 0; i < keys.length; i++) {
2686
- var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
2687
- if (!desc || !desc.get || !desc.configurable) continue;
2688
- var value;
2689
- try {
2690
- value = desc.get();
2691
- } catch (e) {
2692
- continue;
2693
- }
2694
- // a circular require may not have settled this one yet, so leave it live
2695
- if (value === undefined) continue;
2696
- Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
2697
- }
2698
- Object.freeze(exports);
2699
- })();