@btc-embedded/cdk-extensions 0.10.1 → 0.10.3

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 (386) hide show
  1. package/.jsii +5 -5
  2. package/CHANGELOG.md +9 -0
  3. package/lib/constructs/EventPipe.js +1 -1
  4. package/lib/constructs/S3Bucket.js +1 -1
  5. package/lib/constructs/SecureRestApi.js +1 -1
  6. package/lib/constructs/SecureRestApiV2.js +1 -1
  7. package/lib/extensions/ApiGatewayExtension.js +1 -1
  8. package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
  9. package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
  10. package/lib/extensions/CloudMapExtension.js +1 -1
  11. package/lib/extensions/DeactivatableServiceExtension.js +1 -1
  12. package/lib/extensions/DocumentDbAccessExtension.js +1 -1
  13. package/lib/extensions/DomainEventMessagingExtension.js +1 -1
  14. package/lib/extensions/ExtraContainerExtension.js +1 -1
  15. package/lib/extensions/HTTPApiExtension.js +1 -1
  16. package/lib/extensions/LogExtension.js +1 -1
  17. package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
  18. package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
  19. package/lib/extensions/OpenTelemetryExtension.js +1 -1
  20. package/lib/extensions/PostgresDbAccessExtension.js +1 -1
  21. package/lib/extensions/SharedVolumeExtension.js +1 -1
  22. package/lib/extensions/TcpKeepAliveExtension.js +1 -1
  23. package/lib/platform/ApiGateway.js +1 -1
  24. package/lib/platform/ApiGatewayV2.js +2 -2
  25. package/lib/platform/ApplicationLoadBalancer.js +1 -1
  26. package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
  27. package/lib/platform/CognitoUserPool.js +2 -2
  28. package/lib/platform/DefaultUserPoolClients.js +1 -1
  29. package/lib/platform/DocumentDB.js +2 -2
  30. package/lib/platform/PrivateDnsNamespace.js +1 -1
  31. package/lib/platform/ResourceServer.js +1 -1
  32. package/lib/platform/Vpc.js +1 -1
  33. package/lib/utils/StackParameter.js +1 -1
  34. package/node_modules/yaml/README.md +2 -0
  35. package/node_modules/yaml/browser/dist/compose/compose-collection.js +2 -2
  36. package/node_modules/yaml/browser/dist/compose/resolve-props.js +2 -4
  37. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -2
  38. package/node_modules/yaml/browser/dist/doc/anchors.js +1 -2
  39. package/node_modules/yaml/browser/dist/doc/createNode.js +1 -2
  40. package/node_modules/yaml/browser/dist/nodes/Alias.js +24 -11
  41. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
  42. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -0
  43. package/node_modules/yaml/browser/dist/parse/parser.js +14 -1
  44. package/node_modules/yaml/browser/dist/schema/tags.js +3 -3
  45. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +3 -2
  46. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
  47. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
  48. package/node_modules/yaml/browser/dist/stringify/stringify.js +3 -4
  49. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +3 -4
  50. package/node_modules/yaml/dist/cli.d.ts +1 -1
  51. package/node_modules/yaml/dist/cli.mjs +5 -3
  52. package/node_modules/yaml/dist/compose/compose-collection.js +2 -2
  53. package/node_modules/yaml/dist/compose/composer.js +1 -1
  54. package/node_modules/yaml/dist/compose/resolve-props.js +2 -4
  55. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +1 -2
  56. package/node_modules/yaml/dist/doc/anchors.js +1 -2
  57. package/node_modules/yaml/dist/doc/createNode.js +1 -2
  58. package/node_modules/yaml/dist/log.js +1 -1
  59. package/node_modules/yaml/dist/nodes/Alias.d.ts +1 -1
  60. package/node_modules/yaml/dist/nodes/Alias.js +23 -10
  61. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +1 -0
  62. package/node_modules/yaml/dist/nodes/toJS.d.ts +2 -0
  63. package/node_modules/yaml/dist/parse/parser.js +15 -2
  64. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +4 -3
  65. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
  66. package/node_modules/yaml/dist/stringify/stringify.js +3 -4
  67. package/node_modules/yaml/dist/stringify/stringifyString.js +2 -3
  68. package/node_modules/yaml/package.json +2 -2
  69. package/node_modules/zod/LICENSE +1 -1
  70. package/node_modules/zod/README.md +105 -2971
  71. package/node_modules/zod/{lib/external.js → dist/cjs/index.js} +6 -6
  72. package/node_modules/zod/dist/cjs/package.json +3 -0
  73. package/node_modules/zod/{lib → dist/cjs/v3}/ZodError.js +3 -3
  74. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/datetime.js +1 -1
  75. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/discriminatedUnion.js +15 -15
  76. package/node_modules/zod/dist/cjs/v3/benchmarks/index.js +59 -0
  77. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/object.js +11 -11
  78. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/primitives.js +22 -33
  79. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/realworld.js +12 -12
  80. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/string.js +5 -5
  81. package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/union.js +15 -15
  82. package/node_modules/zod/{lib → dist/cjs/v3}/errors.js +6 -6
  83. package/node_modules/zod/dist/cjs/v3/external.js +22 -0
  84. package/node_modules/zod/{lib → dist/cjs/v3}/helpers/errorUtil.js +2 -1
  85. package/node_modules/zod/{lib → dist/cjs/v3}/helpers/parseUtil.js +7 -8
  86. package/node_modules/zod/{lib → dist/cjs/v3}/helpers/util.js +5 -10
  87. package/node_modules/zod/{lib → dist/cjs/v3}/index.js +2 -2
  88. package/node_modules/zod/{lib → dist/cjs/v3}/locales/en.js +30 -50
  89. package/node_modules/zod/{lib → dist/cjs/v3}/types.js +466 -539
  90. package/node_modules/zod/dist/cjs/v4/classic/checks.js +32 -0
  91. package/node_modules/zod/dist/cjs/v4/classic/coerce.js +47 -0
  92. package/node_modules/zod/dist/cjs/v4/classic/compat.js +63 -0
  93. package/node_modules/zod/dist/cjs/v4/classic/errors.js +67 -0
  94. package/node_modules/zod/dist/cjs/v4/classic/external.js +69 -0
  95. package/node_modules/zod/dist/cjs/v4/classic/index.js +33 -0
  96. package/node_modules/zod/dist/cjs/v4/classic/iso.js +60 -0
  97. package/node_modules/zod/dist/cjs/v4/classic/parse.js +32 -0
  98. package/node_modules/zod/dist/cjs/v4/classic/schemas.js +1100 -0
  99. package/node_modules/zod/dist/cjs/v4/core/api.js +1021 -0
  100. package/node_modules/zod/dist/cjs/v4/core/checks.js +580 -0
  101. package/node_modules/zod/dist/cjs/v4/core/config.js +10 -0
  102. package/node_modules/zod/dist/cjs/v4/core/core.js +63 -0
  103. package/node_modules/zod/dist/cjs/v4/core/doc.js +39 -0
  104. package/node_modules/zod/dist/cjs/v4/core/errors.js +222 -0
  105. package/node_modules/zod/dist/cjs/v4/core/function.js +102 -0
  106. package/node_modules/zod/dist/cjs/v4/core/index.js +44 -0
  107. package/node_modules/zod/dist/cjs/v4/core/json-schema.js +2 -0
  108. package/node_modules/zod/dist/cjs/v4/core/parse.js +87 -0
  109. package/node_modules/zod/dist/cjs/v4/core/regexes.js +103 -0
  110. package/node_modules/zod/dist/cjs/v4/core/registries.js +47 -0
  111. package/node_modules/zod/dist/cjs/v4/core/schemas.js +1719 -0
  112. package/node_modules/zod/dist/cjs/v4/core/standard-schema.js +2 -0
  113. package/node_modules/zod/dist/cjs/v4/core/to-json-schema.js +833 -0
  114. package/node_modules/zod/dist/cjs/v4/core/util.js +537 -0
  115. package/node_modules/zod/dist/cjs/v4/core/versions.js +8 -0
  116. package/node_modules/zod/dist/cjs/v4/core/zsf.js +172 -0
  117. package/node_modules/zod/dist/cjs/v4/index.js +22 -0
  118. package/node_modules/zod/dist/cjs/v4/locales/ar.js +142 -0
  119. package/node_modules/zod/dist/cjs/v4/locales/az.js +141 -0
  120. package/node_modules/zod/dist/cjs/v4/locales/be.js +190 -0
  121. package/node_modules/zod/dist/cjs/v4/locales/ca.js +144 -0
  122. package/node_modules/zod/dist/cjs/v4/locales/cs.js +161 -0
  123. package/node_modules/zod/dist/cjs/v4/locales/de.js +142 -0
  124. package/node_modules/zod/dist/cjs/v4/locales/en.js +145 -0
  125. package/node_modules/zod/dist/cjs/v4/locales/es.js +143 -0
  126. package/node_modules/zod/dist/cjs/v4/locales/fa.js +148 -0
  127. package/node_modules/zod/dist/cjs/v4/locales/fi.js +148 -0
  128. package/node_modules/zod/dist/cjs/v4/locales/fr-CA.js +143 -0
  129. package/node_modules/zod/dist/cjs/v4/locales/fr.js +142 -0
  130. package/node_modules/zod/dist/cjs/v4/locales/he.js +143 -0
  131. package/node_modules/zod/dist/cjs/v4/locales/hu.js +143 -0
  132. package/node_modules/zod/dist/cjs/v4/locales/id.js +142 -0
  133. package/node_modules/zod/dist/cjs/v4/locales/index.js +82 -0
  134. package/node_modules/zod/dist/cjs/v4/locales/it.js +143 -0
  135. package/node_modules/zod/dist/cjs/v4/locales/ja.js +141 -0
  136. package/node_modules/zod/dist/cjs/v4/locales/kh.js +143 -0
  137. package/node_modules/zod/dist/cjs/v4/locales/ko.js +147 -0
  138. package/node_modules/zod/dist/cjs/v4/locales/mk.js +144 -0
  139. package/node_modules/zod/dist/cjs/v4/locales/ms.js +142 -0
  140. package/node_modules/zod/dist/cjs/v4/locales/nl.js +143 -0
  141. package/node_modules/zod/dist/cjs/v4/locales/no.js +142 -0
  142. package/node_modules/zod/dist/cjs/v4/locales/ota.js +143 -0
  143. package/node_modules/zod/dist/cjs/v4/locales/pl.js +143 -0
  144. package/node_modules/zod/dist/cjs/v4/locales/ps.js +148 -0
  145. package/node_modules/zod/dist/cjs/v4/locales/pt.js +142 -0
  146. package/node_modules/zod/dist/cjs/v4/locales/ru.js +190 -0
  147. package/node_modules/zod/dist/cjs/v4/locales/sl.js +143 -0
  148. package/node_modules/zod/dist/cjs/v4/locales/sv.js +144 -0
  149. package/node_modules/zod/dist/cjs/v4/locales/ta.js +143 -0
  150. package/node_modules/zod/dist/cjs/v4/locales/th.js +143 -0
  151. package/node_modules/zod/dist/cjs/v4/locales/tr.js +143 -0
  152. package/node_modules/zod/dist/cjs/v4/locales/ua.js +143 -0
  153. package/node_modules/zod/dist/cjs/v4/locales/ur.js +143 -0
  154. package/node_modules/zod/dist/cjs/v4/locales/vi.js +142 -0
  155. package/node_modules/zod/dist/cjs/v4/locales/zh-CN.js +142 -0
  156. package/node_modules/zod/dist/cjs/v4/locales/zh-TW.js +143 -0
  157. package/node_modules/zod/dist/cjs/v4/mini/checks.js +34 -0
  158. package/node_modules/zod/dist/cjs/v4/mini/coerce.js +47 -0
  159. package/node_modules/zod/dist/cjs/v4/mini/external.js +61 -0
  160. package/node_modules/zod/dist/cjs/v4/mini/index.js +32 -0
  161. package/node_modules/zod/dist/cjs/v4/mini/iso.js +60 -0
  162. package/node_modules/zod/dist/cjs/v4/mini/parse.js +8 -0
  163. package/node_modules/zod/dist/cjs/v4/mini/schemas.js +831 -0
  164. package/node_modules/zod/dist/esm/index.js +3 -0
  165. package/node_modules/zod/dist/esm/package.json +3 -0
  166. package/node_modules/zod/dist/esm/v3/ZodError.js +132 -0
  167. package/node_modules/zod/dist/esm/v3/benchmarks/datetime.js +49 -0
  168. package/node_modules/zod/dist/esm/v3/benchmarks/discriminatedUnion.js +74 -0
  169. package/node_modules/zod/dist/esm/v3/benchmarks/index.js +54 -0
  170. package/node_modules/zod/dist/esm/v3/benchmarks/ipv4.js +49 -0
  171. package/node_modules/zod/dist/esm/v3/benchmarks/object.js +65 -0
  172. package/node_modules/zod/dist/esm/v3/benchmarks/primitives.js +154 -0
  173. package/node_modules/zod/dist/esm/v3/benchmarks/realworld.js +51 -0
  174. package/node_modules/zod/dist/esm/v3/benchmarks/string.js +50 -0
  175. package/node_modules/zod/dist/esm/v3/benchmarks/union.js +74 -0
  176. package/node_modules/zod/dist/esm/v3/errors.js +9 -0
  177. package/node_modules/zod/dist/esm/v3/external.js +6 -0
  178. package/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +6 -0
  179. package/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +109 -0
  180. package/node_modules/zod/dist/esm/v3/helpers/partialUtil.js +1 -0
  181. package/node_modules/zod/dist/esm/v3/helpers/typeAliases.js +1 -0
  182. package/node_modules/zod/dist/esm/v3/helpers/util.js +133 -0
  183. package/node_modules/zod/dist/esm/v3/index.js +4 -0
  184. package/node_modules/zod/dist/esm/v3/locales/en.js +107 -0
  185. package/node_modules/zod/dist/esm/v3/standard-schema.js +1 -0
  186. package/node_modules/zod/dist/esm/v3/tests/Mocker.js +53 -0
  187. package/node_modules/zod/{lib/index.mjs → dist/esm/v3/types.js} +148 -862
  188. package/node_modules/zod/dist/esm/v4/classic/checks.js +1 -0
  189. package/node_modules/zod/dist/esm/v4/classic/coerce.js +17 -0
  190. package/node_modules/zod/dist/esm/v4/classic/compat.js +33 -0
  191. package/node_modules/zod/dist/esm/v4/classic/errors.js +41 -0
  192. package/node_modules/zod/dist/esm/v4/classic/external.js +18 -0
  193. package/node_modules/zod/dist/esm/v4/classic/index.js +4 -0
  194. package/node_modules/zod/dist/esm/v4/classic/iso.js +30 -0
  195. package/node_modules/zod/dist/esm/v4/classic/parse.js +6 -0
  196. package/node_modules/zod/dist/esm/v4/classic/schemas.js +998 -0
  197. package/node_modules/zod/dist/esm/v4/core/api.js +889 -0
  198. package/node_modules/zod/dist/esm/v4/core/checks.js +554 -0
  199. package/node_modules/zod/dist/esm/v4/core/config.js +6 -0
  200. package/node_modules/zod/dist/esm/v4/core/core.js +57 -0
  201. package/node_modules/zod/dist/esm/v4/core/doc.js +35 -0
  202. package/node_modules/zod/dist/esm/v4/core/errors.js +191 -0
  203. package/node_modules/zod/dist/esm/v4/core/function.js +75 -0
  204. package/node_modules/zod/dist/esm/v4/core/index.js +15 -0
  205. package/node_modules/zod/dist/esm/v4/core/json-schema.js +1 -0
  206. package/node_modules/zod/dist/esm/v4/core/parse.js +57 -0
  207. package/node_modules/zod/dist/esm/v4/core/regexes.js +95 -0
  208. package/node_modules/zod/dist/esm/v4/core/registries.js +42 -0
  209. package/node_modules/zod/dist/esm/v4/core/schemas.js +1688 -0
  210. package/node_modules/zod/dist/esm/v4/core/standard-schema.js +1 -0
  211. package/node_modules/zod/dist/esm/v4/core/to-json-schema.js +828 -0
  212. package/node_modules/zod/dist/esm/v4/core/util.js +491 -0
  213. package/node_modules/zod/dist/esm/v4/core/versions.js +5 -0
  214. package/node_modules/zod/dist/esm/v4/core/zsf.js +171 -0
  215. package/node_modules/zod/dist/esm/v4/index.js +3 -0
  216. package/node_modules/zod/dist/esm/v4/locales/ar.js +116 -0
  217. package/node_modules/zod/dist/esm/v4/locales/az.js +115 -0
  218. package/node_modules/zod/dist/esm/v4/locales/be.js +164 -0
  219. package/node_modules/zod/dist/esm/v4/locales/ca.js +118 -0
  220. package/node_modules/zod/dist/esm/v4/locales/cs.js +135 -0
  221. package/node_modules/zod/dist/esm/v4/locales/de.js +116 -0
  222. package/node_modules/zod/dist/esm/v4/locales/en.js +117 -0
  223. package/node_modules/zod/dist/esm/v4/locales/es.js +117 -0
  224. package/node_modules/zod/dist/esm/v4/locales/fa.js +122 -0
  225. package/node_modules/zod/dist/esm/v4/locales/fi.js +122 -0
  226. package/node_modules/zod/dist/esm/v4/locales/fr-CA.js +117 -0
  227. package/node_modules/zod/dist/esm/v4/locales/fr.js +116 -0
  228. package/node_modules/zod/dist/esm/v4/locales/he.js +117 -0
  229. package/node_modules/zod/dist/esm/v4/locales/hu.js +117 -0
  230. package/node_modules/zod/dist/esm/v4/locales/id.js +116 -0
  231. package/node_modules/zod/dist/esm/v4/locales/index.js +38 -0
  232. package/node_modules/zod/dist/esm/v4/locales/it.js +117 -0
  233. package/node_modules/zod/dist/esm/v4/locales/ja.js +115 -0
  234. package/node_modules/zod/dist/esm/v4/locales/kh.js +117 -0
  235. package/node_modules/zod/dist/esm/v4/locales/ko.js +121 -0
  236. package/node_modules/zod/dist/esm/v4/locales/mk.js +118 -0
  237. package/node_modules/zod/dist/esm/v4/locales/ms.js +116 -0
  238. package/node_modules/zod/dist/esm/v4/locales/nl.js +117 -0
  239. package/node_modules/zod/dist/esm/v4/locales/no.js +116 -0
  240. package/node_modules/zod/dist/esm/v4/locales/ota.js +117 -0
  241. package/node_modules/zod/dist/esm/v4/locales/pl.js +117 -0
  242. package/node_modules/zod/dist/esm/v4/locales/ps.js +122 -0
  243. package/node_modules/zod/dist/esm/v4/locales/pt.js +116 -0
  244. package/node_modules/zod/dist/esm/v4/locales/ru.js +164 -0
  245. package/node_modules/zod/dist/esm/v4/locales/sl.js +117 -0
  246. package/node_modules/zod/dist/esm/v4/locales/sv.js +118 -0
  247. package/node_modules/zod/dist/esm/v4/locales/ta.js +117 -0
  248. package/node_modules/zod/dist/esm/v4/locales/th.js +117 -0
  249. package/node_modules/zod/dist/esm/v4/locales/tr.js +115 -0
  250. package/node_modules/zod/dist/esm/v4/locales/ua.js +117 -0
  251. package/node_modules/zod/dist/esm/v4/locales/ur.js +117 -0
  252. package/node_modules/zod/dist/esm/v4/locales/vi.js +116 -0
  253. package/node_modules/zod/dist/esm/v4/locales/zh-CN.js +116 -0
  254. package/node_modules/zod/dist/esm/v4/locales/zh-TW.js +117 -0
  255. package/node_modules/zod/dist/esm/v4/mini/checks.js +1 -0
  256. package/node_modules/zod/dist/esm/v4/mini/coerce.js +17 -0
  257. package/node_modules/zod/dist/esm/v4/mini/external.js +13 -0
  258. package/node_modules/zod/dist/esm/v4/mini/index.js +3 -0
  259. package/node_modules/zod/dist/esm/v4/mini/iso.js +30 -0
  260. package/node_modules/zod/dist/esm/v4/mini/parse.js +1 -0
  261. package/node_modules/zod/dist/esm/v4/mini/schemas.js +725 -0
  262. package/node_modules/zod/dist/types/index.d.ts +3 -0
  263. package/node_modules/zod/dist/types/package.json +3 -0
  264. package/node_modules/zod/{lib → dist/types/v3}/ZodError.d.ts +7 -7
  265. package/node_modules/zod/dist/types/v3/benchmarks/index.d.ts +1 -0
  266. package/node_modules/zod/{lib → dist/types/v3}/errors.d.ts +2 -2
  267. package/node_modules/zod/dist/types/v3/external.d.ts +6 -0
  268. package/node_modules/zod/{lib → dist/types/v3}/helpers/errorUtil.d.ts +1 -1
  269. package/node_modules/zod/{lib → dist/types/v3}/helpers/parseUtil.d.ts +4 -4
  270. package/node_modules/zod/{lib → dist/types/v3}/helpers/partialUtil.d.ts +1 -1
  271. package/node_modules/zod/{lib → dist/types/v3}/helpers/util.d.ts +14 -11
  272. package/node_modules/zod/dist/types/v3/index.d.ts +4 -0
  273. package/node_modules/zod/{lib → dist/types/v3}/locales/en.d.ts +1 -1
  274. package/node_modules/zod/{lib/__tests__ → dist/types/v3/tests}/Mocker.d.ts +6 -6
  275. package/node_modules/zod/{lib → dist/types/v3}/types.d.ts +120 -151
  276. package/node_modules/zod/dist/types/v4/classic/checks.d.ts +1 -0
  277. package/node_modules/zod/dist/types/v4/classic/coerce.d.ts +17 -0
  278. package/node_modules/zod/dist/types/v4/classic/compat.d.ts +48 -0
  279. package/node_modules/zod/dist/types/v4/classic/errors.d.ts +30 -0
  280. package/node_modules/zod/dist/types/v4/classic/external.d.ts +13 -0
  281. package/node_modules/zod/dist/types/v4/classic/index.d.ts +4 -0
  282. package/node_modules/zod/dist/types/v4/classic/iso.d.ts +22 -0
  283. package/node_modules/zod/dist/types/v4/classic/parse.d.ts +23 -0
  284. package/node_modules/zod/dist/types/v4/classic/schemas.d.ts +624 -0
  285. package/node_modules/zod/dist/types/v4/core/api.d.ts +281 -0
  286. package/node_modules/zod/dist/types/v4/core/checks.d.ts +277 -0
  287. package/node_modules/zod/dist/types/v4/core/config.d.ts +9 -0
  288. package/node_modules/zod/dist/types/v4/core/core.d.ts +47 -0
  289. package/node_modules/zod/dist/types/v4/core/doc.d.ts +14 -0
  290. package/node_modules/zod/dist/types/v4/core/errors.d.ts +204 -0
  291. package/node_modules/zod/dist/types/v4/core/function.d.ts +52 -0
  292. package/node_modules/zod/dist/types/v4/core/index.d.ts +15 -0
  293. package/node_modules/zod/dist/types/v4/core/json-schema.d.ts +87 -0
  294. package/node_modules/zod/dist/types/v4/core/parse.d.ts +25 -0
  295. package/node_modules/zod/dist/types/v4/core/regexes.d.ts +62 -0
  296. package/node_modules/zod/dist/types/v4/core/registries.d.ts +39 -0
  297. package/node_modules/zod/dist/types/v4/core/schemas.d.ts +1005 -0
  298. package/node_modules/zod/dist/types/v4/core/standard-schema.d.ts +55 -0
  299. package/node_modules/zod/dist/types/v4/core/to-json-schema.d.ts +84 -0
  300. package/node_modules/zod/dist/types/v4/core/util.d.ts +183 -0
  301. package/node_modules/zod/dist/types/v4/core/versions.d.ts +5 -0
  302. package/node_modules/zod/dist/types/v4/core/zsf.d.ts +91 -0
  303. package/node_modules/zod/dist/types/v4/index.d.ts +3 -0
  304. package/node_modules/zod/dist/types/v4/locales/ar.d.ts +4 -0
  305. package/node_modules/zod/dist/types/v4/locales/az.d.ts +4 -0
  306. package/node_modules/zod/dist/types/v4/locales/be.d.ts +4 -0
  307. package/node_modules/zod/dist/types/v4/locales/ca.d.ts +4 -0
  308. package/node_modules/zod/dist/types/v4/locales/cs.d.ts +4 -0
  309. package/node_modules/zod/dist/types/v4/locales/de.d.ts +4 -0
  310. package/node_modules/zod/dist/types/v4/locales/en.d.ts +5 -0
  311. package/node_modules/zod/dist/types/v4/locales/es.d.ts +4 -0
  312. package/node_modules/zod/dist/types/v4/locales/fa.d.ts +4 -0
  313. package/node_modules/zod/dist/types/v4/locales/fi.d.ts +4 -0
  314. package/node_modules/zod/dist/types/v4/locales/fr-CA.d.ts +4 -0
  315. package/node_modules/zod/dist/types/v4/locales/fr.d.ts +4 -0
  316. package/node_modules/zod/dist/types/v4/locales/he.d.ts +4 -0
  317. package/node_modules/zod/dist/types/v4/locales/hu.d.ts +4 -0
  318. package/node_modules/zod/dist/types/v4/locales/id.d.ts +4 -0
  319. package/node_modules/zod/dist/types/v4/locales/index.d.ts +38 -0
  320. package/node_modules/zod/dist/types/v4/locales/it.d.ts +4 -0
  321. package/node_modules/zod/dist/types/v4/locales/ja.d.ts +4 -0
  322. package/node_modules/zod/dist/types/v4/locales/kh.d.ts +4 -0
  323. package/node_modules/zod/dist/types/v4/locales/ko.d.ts +4 -0
  324. package/node_modules/zod/dist/types/v4/locales/mk.d.ts +4 -0
  325. package/node_modules/zod/dist/types/v4/locales/ms.d.ts +4 -0
  326. package/node_modules/zod/dist/types/v4/locales/nl.d.ts +4 -0
  327. package/node_modules/zod/dist/types/v4/locales/no.d.ts +4 -0
  328. package/node_modules/zod/dist/types/v4/locales/ota.d.ts +4 -0
  329. package/node_modules/zod/dist/types/v4/locales/pl.d.ts +4 -0
  330. package/node_modules/zod/dist/types/v4/locales/ps.d.ts +4 -0
  331. package/node_modules/zod/dist/types/v4/locales/pt.d.ts +4 -0
  332. package/node_modules/zod/dist/types/v4/locales/ru.d.ts +4 -0
  333. package/node_modules/zod/dist/types/v4/locales/sl.d.ts +4 -0
  334. package/node_modules/zod/dist/types/v4/locales/sv.d.ts +4 -0
  335. package/node_modules/zod/dist/types/v4/locales/ta.d.ts +4 -0
  336. package/node_modules/zod/dist/types/v4/locales/th.d.ts +4 -0
  337. package/node_modules/zod/dist/types/v4/locales/tr.d.ts +5 -0
  338. package/node_modules/zod/dist/types/v4/locales/ua.d.ts +4 -0
  339. package/node_modules/zod/dist/types/v4/locales/ur.d.ts +4 -0
  340. package/node_modules/zod/dist/types/v4/locales/vi.d.ts +4 -0
  341. package/node_modules/zod/dist/types/v4/locales/zh-CN.d.ts +4 -0
  342. package/node_modules/zod/dist/types/v4/locales/zh-TW.d.ts +4 -0
  343. package/node_modules/zod/dist/types/v4/mini/checks.d.ts +1 -0
  344. package/node_modules/zod/dist/types/v4/mini/coerce.d.ts +7 -0
  345. package/node_modules/zod/dist/types/v4/mini/external.d.ts +11 -0
  346. package/node_modules/zod/dist/types/v4/mini/index.d.ts +3 -0
  347. package/node_modules/zod/dist/types/v4/mini/iso.d.ts +22 -0
  348. package/node_modules/zod/dist/types/v4/mini/parse.d.ts +1 -0
  349. package/node_modules/zod/dist/types/v4/mini/schemas.d.ts +351 -0
  350. package/node_modules/zod/package.json +105 -107
  351. package/node_modules/zod/v3/index.d.ts +3 -0
  352. package/node_modules/zod/v3/index.js +1 -0
  353. package/node_modules/zod/v4/core/index.d.ts +1 -0
  354. package/node_modules/zod/v4/core/index.js +1 -0
  355. package/node_modules/zod/v4/index.d.ts +3 -0
  356. package/node_modules/zod/v4/index.js +1 -0
  357. package/node_modules/zod/v4/locales/en.d.ts +2 -0
  358. package/node_modules/zod/v4/locales/en.js +2 -0
  359. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  360. package/node_modules/zod/v4/locales/index.js +1 -0
  361. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  362. package/node_modules/zod/v4-mini/index.js +1 -0
  363. package/package.json +16 -16
  364. package/node_modules/zod/index.d.ts +0 -2
  365. package/node_modules/zod/lib/benchmarks/index.js +0 -59
  366. package/node_modules/zod/lib/external.d.ts +0 -6
  367. package/node_modules/zod/lib/index.d.ts +0 -4
  368. package/node_modules/zod/lib/index.umd.js +0 -4520
  369. /package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/ipv4.js +0 -0
  370. /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/enumUtil.js +0 -0
  371. /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/partialUtil.js +0 -0
  372. /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/typeAliases.js +0 -0
  373. /package/node_modules/zod/{lib → dist/cjs/v3}/standard-schema.js +0 -0
  374. /package/node_modules/zod/{lib/__tests__ → dist/cjs/v3/tests}/Mocker.js +0 -0
  375. /package/node_modules/zod/{lib/benchmarks/index.d.ts → dist/esm/v3/helpers/enumUtil.js} +0 -0
  376. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/datetime.d.ts +0 -0
  377. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/discriminatedUnion.d.ts +0 -0
  378. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/ipv4.d.ts +0 -0
  379. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/object.d.ts +0 -0
  380. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/primitives.d.ts +0 -0
  381. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/realworld.d.ts +0 -0
  382. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/string.d.ts +0 -0
  383. /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/union.d.ts +0 -0
  384. /package/node_modules/zod/{lib → dist/types/v3}/helpers/enumUtil.d.ts +0 -0
  385. /package/node_modules/zod/{lib → dist/types/v3}/helpers/typeAliases.d.ts +0 -0
  386. /package/node_modules/zod/{lib → dist/types/v3}/standard-schema.d.ts +0 -0
@@ -0,0 +1,1100 @@
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.ZodOptional = exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = 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.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
27
+ exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = void 0;
28
+ exports.string = string;
29
+ exports.email = email;
30
+ exports.guid = guid;
31
+ exports.uuid = uuid;
32
+ exports.uuidv4 = uuidv4;
33
+ exports.uuidv6 = uuidv6;
34
+ exports.uuidv7 = uuidv7;
35
+ exports.url = url;
36
+ exports.emoji = emoji;
37
+ exports.nanoid = nanoid;
38
+ exports.cuid = cuid;
39
+ exports.cuid2 = cuid2;
40
+ exports.ulid = ulid;
41
+ exports.xid = xid;
42
+ exports.ksuid = ksuid;
43
+ exports.ipv4 = ipv4;
44
+ exports.ipv6 = ipv6;
45
+ exports.cidrv4 = cidrv4;
46
+ exports.cidrv6 = cidrv6;
47
+ exports.base64 = base64;
48
+ exports.base64url = base64url;
49
+ exports.e164 = e164;
50
+ exports.jwt = jwt;
51
+ exports.number = number;
52
+ exports.int = int;
53
+ exports.float32 = float32;
54
+ exports.float64 = float64;
55
+ exports.int32 = int32;
56
+ exports.uint32 = uint32;
57
+ exports.boolean = boolean;
58
+ exports.bigint = bigint;
59
+ exports.int64 = int64;
60
+ exports.uint64 = uint64;
61
+ exports.symbol = symbol;
62
+ exports.undefined = _undefined;
63
+ exports.null = _null;
64
+ exports.any = any;
65
+ exports.unknown = unknown;
66
+ exports.never = never;
67
+ exports.void = _void;
68
+ exports.date = date;
69
+ exports.array = array;
70
+ exports.keyof = keyof;
71
+ exports.object = object;
72
+ exports.strictObject = strictObject;
73
+ exports.looseObject = looseObject;
74
+ exports.union = union;
75
+ exports.discriminatedUnion = discriminatedUnion;
76
+ exports.intersection = intersection;
77
+ exports.tuple = tuple;
78
+ exports.record = record;
79
+ exports.partialRecord = partialRecord;
80
+ exports.map = map;
81
+ exports.set = set;
82
+ exports.enum = _enum;
83
+ exports.nativeEnum = nativeEnum;
84
+ exports.literal = literal;
85
+ exports.file = file;
86
+ exports.transform = transform;
87
+ exports.optional = optional;
88
+ exports.nullable = nullable;
89
+ exports.nullish = nullish;
90
+ exports._default = _default;
91
+ exports.prefault = prefault;
92
+ exports.nonoptional = nonoptional;
93
+ exports.success = success;
94
+ exports.catch = _catch;
95
+ exports.nan = nan;
96
+ exports.pipe = pipe;
97
+ exports.readonly = readonly;
98
+ exports.templateLiteral = templateLiteral;
99
+ exports.lazy = lazy;
100
+ exports.promise = promise;
101
+ exports.check = check;
102
+ exports.custom = custom;
103
+ exports.refine = refine;
104
+ exports.superRefine = superRefine;
105
+ exports.instanceof = _instanceof;
106
+ exports.json = json;
107
+ exports.preprocess = preprocess;
108
+ const core = __importStar(require("zod/v4/core"));
109
+ const core_1 = require("zod/v4/core");
110
+ const checks = __importStar(require("./checks.js"));
111
+ const iso = __importStar(require("./iso.js"));
112
+ const parse = __importStar(require("./parse.js"));
113
+ exports.ZodType = core.$constructor("ZodType", (inst, def) => {
114
+ core.$ZodType.init(inst, def);
115
+ inst.def = def;
116
+ Object.defineProperty(inst, "_def", { value: def });
117
+ // base methods
118
+ inst.check = (...checks) => {
119
+ return inst.clone({
120
+ ...def,
121
+ checks: [
122
+ ...(def.checks ?? []),
123
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
124
+ ],
125
+ }
126
+ // { parent: true }
127
+ );
128
+ };
129
+ inst.clone = (def, params) => core.clone(inst, def, params);
130
+ inst.brand = () => inst;
131
+ inst.register = ((reg, meta) => {
132
+ reg.add(inst, meta);
133
+ return inst;
134
+ });
135
+ // parsing
136
+ inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
137
+ inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
138
+ inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
139
+ inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
140
+ inst.spa = inst.safeParseAsync;
141
+ // refinements
142
+ inst.refine = (check, params) => inst.check(refine(check, params));
143
+ inst.superRefine = (refinement) => inst.check(superRefine(refinement));
144
+ inst.overwrite = (fn) => inst.check(checks.overwrite(fn));
145
+ // wrappers
146
+ inst.optional = () => optional(inst);
147
+ inst.nullable = () => nullable(inst);
148
+ inst.nullish = () => optional(nullable(inst));
149
+ inst.nonoptional = (params) => nonoptional(inst, params);
150
+ inst.array = () => array(inst);
151
+ inst.or = (arg) => union([inst, arg]);
152
+ inst.and = (arg) => intersection(inst, arg);
153
+ inst.transform = (tx) => pipe(inst, transform(tx));
154
+ inst.default = (def) => _default(inst, def);
155
+ inst.prefault = (def) => prefault(inst, def);
156
+ // inst.coalesce = (def, params) => coalesce(inst, def, params);
157
+ inst.catch = (params) => _catch(inst, params);
158
+ inst.pipe = (target) => pipe(inst, target);
159
+ inst.readonly = () => readonly(inst);
160
+ // meta
161
+ inst.describe = (description) => {
162
+ const cl = inst.clone();
163
+ core.globalRegistry.add(cl, { description });
164
+ return cl;
165
+ };
166
+ Object.defineProperty(inst, "description", {
167
+ get() {
168
+ return core.globalRegistry.get(inst)?.description;
169
+ },
170
+ configurable: true,
171
+ });
172
+ inst.meta = (...args) => {
173
+ if (args.length === 0) {
174
+ return core.globalRegistry.get(inst);
175
+ }
176
+ const cl = inst.clone();
177
+ core.globalRegistry.add(cl, args[0]);
178
+ return cl;
179
+ };
180
+ // helpers
181
+ inst.isOptional = () => inst.safeParse(undefined).success;
182
+ inst.isNullable = () => inst.safeParse(null).success;
183
+ return inst;
184
+ });
185
+ /** @internal */
186
+ exports._ZodString = core.$constructor("_ZodString", (inst, def) => {
187
+ core.$ZodString.init(inst, def);
188
+ exports.ZodType.init(inst, def);
189
+ const bag = inst._zod.bag;
190
+ inst.format = bag.format ?? null;
191
+ inst.minLength = bag.minimum ?? null;
192
+ inst.maxLength = bag.maximum ?? null;
193
+ // validations
194
+ inst.regex = (...args) => inst.check(checks.regex(...args));
195
+ inst.includes = (...args) => inst.check(checks.includes(...args));
196
+ inst.startsWith = (...args) => inst.check(checks.startsWith(...args));
197
+ inst.endsWith = (...args) => inst.check(checks.endsWith(...args));
198
+ inst.min = (...args) => inst.check(checks.minLength(...args));
199
+ inst.max = (...args) => inst.check(checks.maxLength(...args));
200
+ inst.length = (...args) => inst.check(checks.length(...args));
201
+ inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));
202
+ inst.lowercase = (params) => inst.check(checks.lowercase(params));
203
+ inst.uppercase = (params) => inst.check(checks.uppercase(params));
204
+ // transforms
205
+ inst.trim = () => inst.check(checks.trim());
206
+ inst.normalize = (...args) => inst.check(checks.normalize(...args));
207
+ inst.toLowerCase = () => inst.check(checks.toLowerCase());
208
+ inst.toUpperCase = () => inst.check(checks.toUpperCase());
209
+ });
210
+ exports.ZodString = core.$constructor("ZodString", (inst, def) => {
211
+ core.$ZodString.init(inst, def);
212
+ exports._ZodString.init(inst, def);
213
+ inst.email = (params) => inst.check(core._email(exports.ZodEmail, params));
214
+ inst.url = (params) => inst.check(core._url(exports.ZodURL, params));
215
+ inst.jwt = (params) => inst.check(core._jwt(exports.ZodJWT, params));
216
+ inst.emoji = (params) => inst.check(core._emoji(exports.ZodEmoji, params));
217
+ inst.guid = (params) => inst.check(core._guid(exports.ZodGUID, params));
218
+ inst.uuid = (params) => inst.check(core._uuid(exports.ZodUUID, params));
219
+ inst.uuidv4 = (params) => inst.check(core._uuidv4(exports.ZodUUID, params));
220
+ inst.uuidv6 = (params) => inst.check(core._uuidv6(exports.ZodUUID, params));
221
+ inst.uuidv7 = (params) => inst.check(core._uuidv7(exports.ZodUUID, params));
222
+ inst.nanoid = (params) => inst.check(core._nanoid(exports.ZodNanoID, params));
223
+ inst.guid = (params) => inst.check(core._guid(exports.ZodGUID, params));
224
+ inst.cuid = (params) => inst.check(core._cuid(exports.ZodCUID, params));
225
+ inst.cuid2 = (params) => inst.check(core._cuid2(exports.ZodCUID2, params));
226
+ inst.ulid = (params) => inst.check(core._ulid(exports.ZodULID, params));
227
+ inst.base64 = (params) => inst.check(core._base64(exports.ZodBase64, params));
228
+ inst.base64url = (params) => inst.check(core._base64url(exports.ZodBase64URL, params));
229
+ inst.xid = (params) => inst.check(core._xid(exports.ZodXID, params));
230
+ inst.ksuid = (params) => inst.check(core._ksuid(exports.ZodKSUID, params));
231
+ inst.ipv4 = (params) => inst.check(core._ipv4(exports.ZodIPv4, params));
232
+ inst.ipv6 = (params) => inst.check(core._ipv6(exports.ZodIPv6, params));
233
+ inst.cidrv4 = (params) => inst.check(core._cidrv4(exports.ZodCIDRv4, params));
234
+ inst.cidrv6 = (params) => inst.check(core._cidrv6(exports.ZodCIDRv6, params));
235
+ inst.e164 = (params) => inst.check(core._e164(exports.ZodE164, params));
236
+ // iso
237
+ inst.datetime = (params) => inst.check(iso.datetime(params));
238
+ inst.date = (params) => inst.check(iso.date(params));
239
+ inst.time = (params) => inst.check(iso.time(params));
240
+ inst.duration = (params) => inst.check(iso.duration(params));
241
+ });
242
+ function string(params) {
243
+ return core._string(exports.ZodString, params);
244
+ }
245
+ exports.ZodStringFormat = core.$constructor("ZodStringFormat", (inst, def) => {
246
+ core.$ZodStringFormat.init(inst, def);
247
+ exports._ZodString.init(inst, def);
248
+ });
249
+ exports.ZodEmail = core.$constructor("ZodEmail", (inst, def) => {
250
+ // ZodStringFormat.init(inst, def);
251
+ core.$ZodEmail.init(inst, def);
252
+ exports.ZodStringFormat.init(inst, def);
253
+ });
254
+ function email(params) {
255
+ return core._email(exports.ZodEmail, params);
256
+ }
257
+ exports.ZodGUID = core.$constructor("ZodGUID", (inst, def) => {
258
+ // ZodStringFormat.init(inst, def);
259
+ core.$ZodGUID.init(inst, def);
260
+ exports.ZodStringFormat.init(inst, def);
261
+ });
262
+ function guid(params) {
263
+ return core._guid(exports.ZodGUID, params);
264
+ }
265
+ exports.ZodUUID = core.$constructor("ZodUUID", (inst, def) => {
266
+ // ZodStringFormat.init(inst, def);
267
+ core.$ZodUUID.init(inst, def);
268
+ exports.ZodStringFormat.init(inst, def);
269
+ });
270
+ function uuid(params) {
271
+ return core._uuid(exports.ZodUUID, params);
272
+ }
273
+ function uuidv4(params) {
274
+ return core._uuidv4(exports.ZodUUID, params);
275
+ }
276
+ // ZodUUIDv6
277
+ function uuidv6(params) {
278
+ return core._uuidv6(exports.ZodUUID, params);
279
+ }
280
+ // ZodUUIDv7
281
+ function uuidv7(params) {
282
+ return core._uuidv7(exports.ZodUUID, params);
283
+ }
284
+ exports.ZodURL = core.$constructor("ZodURL", (inst, def) => {
285
+ // ZodStringFormat.init(inst, def);
286
+ core.$ZodURL.init(inst, def);
287
+ exports.ZodStringFormat.init(inst, def);
288
+ });
289
+ function url(params) {
290
+ return core._url(exports.ZodURL, params);
291
+ }
292
+ exports.ZodEmoji = core.$constructor("ZodEmoji", (inst, def) => {
293
+ // ZodStringFormat.init(inst, def);
294
+ core.$ZodEmoji.init(inst, def);
295
+ exports.ZodStringFormat.init(inst, def);
296
+ });
297
+ function emoji(params) {
298
+ return core._emoji(exports.ZodEmoji, params);
299
+ }
300
+ exports.ZodNanoID = core.$constructor("ZodNanoID", (inst, def) => {
301
+ // ZodStringFormat.init(inst, def);
302
+ core.$ZodNanoID.init(inst, def);
303
+ exports.ZodStringFormat.init(inst, def);
304
+ });
305
+ function nanoid(params) {
306
+ return core._nanoid(exports.ZodNanoID, params);
307
+ }
308
+ exports.ZodCUID = core.$constructor("ZodCUID", (inst, def) => {
309
+ // ZodStringFormat.init(inst, def);
310
+ core.$ZodCUID.init(inst, def);
311
+ exports.ZodStringFormat.init(inst, def);
312
+ });
313
+ function cuid(params) {
314
+ return core._cuid(exports.ZodCUID, params);
315
+ }
316
+ exports.ZodCUID2 = core.$constructor("ZodCUID2", (inst, def) => {
317
+ // ZodStringFormat.init(inst, def);
318
+ core.$ZodCUID2.init(inst, def);
319
+ exports.ZodStringFormat.init(inst, def);
320
+ });
321
+ function cuid2(params) {
322
+ return core._cuid2(exports.ZodCUID2, params);
323
+ }
324
+ exports.ZodULID = core.$constructor("ZodULID", (inst, def) => {
325
+ // ZodStringFormat.init(inst, def);
326
+ core.$ZodULID.init(inst, def);
327
+ exports.ZodStringFormat.init(inst, def);
328
+ });
329
+ function ulid(params) {
330
+ return core._ulid(exports.ZodULID, params);
331
+ }
332
+ exports.ZodXID = core.$constructor("ZodXID", (inst, def) => {
333
+ // ZodStringFormat.init(inst, def);
334
+ core.$ZodXID.init(inst, def);
335
+ exports.ZodStringFormat.init(inst, def);
336
+ });
337
+ function xid(params) {
338
+ return core._xid(exports.ZodXID, params);
339
+ }
340
+ exports.ZodKSUID = core.$constructor("ZodKSUID", (inst, def) => {
341
+ // ZodStringFormat.init(inst, def);
342
+ core.$ZodKSUID.init(inst, def);
343
+ exports.ZodStringFormat.init(inst, def);
344
+ });
345
+ function ksuid(params) {
346
+ return core._ksuid(exports.ZodKSUID, params);
347
+ }
348
+ exports.ZodIPv4 = core.$constructor("ZodIPv4", (inst, def) => {
349
+ // ZodStringFormat.init(inst, def);
350
+ core.$ZodIPv4.init(inst, def);
351
+ exports.ZodStringFormat.init(inst, def);
352
+ });
353
+ function ipv4(params) {
354
+ return core._ipv4(exports.ZodIPv4, params);
355
+ }
356
+ exports.ZodIPv6 = core.$constructor("ZodIPv6", (inst, def) => {
357
+ // ZodStringFormat.init(inst, def);
358
+ core.$ZodIPv6.init(inst, def);
359
+ exports.ZodStringFormat.init(inst, def);
360
+ });
361
+ function ipv6(params) {
362
+ return core._ipv6(exports.ZodIPv6, params);
363
+ }
364
+ exports.ZodCIDRv4 = core.$constructor("ZodCIDRv4", (inst, def) => {
365
+ core.$ZodCIDRv4.init(inst, def);
366
+ exports.ZodStringFormat.init(inst, def);
367
+ });
368
+ function cidrv4(params) {
369
+ return core._cidrv4(exports.ZodCIDRv4, params);
370
+ }
371
+ exports.ZodCIDRv6 = core.$constructor("ZodCIDRv6", (inst, def) => {
372
+ core.$ZodCIDRv6.init(inst, def);
373
+ exports.ZodStringFormat.init(inst, def);
374
+ });
375
+ function cidrv6(params) {
376
+ return core._cidrv6(exports.ZodCIDRv6, params);
377
+ }
378
+ exports.ZodBase64 = core.$constructor("ZodBase64", (inst, def) => {
379
+ // ZodStringFormat.init(inst, def);
380
+ core.$ZodBase64.init(inst, def);
381
+ exports.ZodStringFormat.init(inst, def);
382
+ });
383
+ function base64(params) {
384
+ return core._base64(exports.ZodBase64, params);
385
+ }
386
+ exports.ZodBase64URL = core.$constructor("ZodBase64URL", (inst, def) => {
387
+ // ZodStringFormat.init(inst, def);
388
+ core.$ZodBase64URL.init(inst, def);
389
+ exports.ZodStringFormat.init(inst, def);
390
+ });
391
+ function base64url(params) {
392
+ return core._base64url(exports.ZodBase64URL, params);
393
+ }
394
+ exports.ZodE164 = core.$constructor("ZodE164", (inst, def) => {
395
+ // ZodStringFormat.init(inst, def);
396
+ core.$ZodE164.init(inst, def);
397
+ exports.ZodStringFormat.init(inst, def);
398
+ });
399
+ function e164(params) {
400
+ return core._e164(exports.ZodE164, params);
401
+ }
402
+ exports.ZodJWT = core.$constructor("ZodJWT", (inst, def) => {
403
+ // ZodStringFormat.init(inst, def);
404
+ core.$ZodJWT.init(inst, def);
405
+ exports.ZodStringFormat.init(inst, def);
406
+ });
407
+ function jwt(params) {
408
+ return core._jwt(exports.ZodJWT, params);
409
+ }
410
+ exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
411
+ core.$ZodNumber.init(inst, def);
412
+ exports.ZodType.init(inst, def);
413
+ inst.gt = (value, params) => inst.check(checks.gt(value, params));
414
+ inst.gte = (value, params) => inst.check(checks.gte(value, params));
415
+ inst.min = (value, params) => inst.check(checks.gte(value, params));
416
+ inst.lt = (value, params) => inst.check(checks.lt(value, params));
417
+ inst.lte = (value, params) => inst.check(checks.lte(value, params));
418
+ inst.max = (value, params) => inst.check(checks.lte(value, params));
419
+ inst.int = (params) => inst.check(int(params));
420
+ inst.safe = (params) => inst.check(int(params));
421
+ inst.positive = (params) => inst.check(checks.gt(0, params));
422
+ inst.nonnegative = (params) => inst.check(checks.gte(0, params));
423
+ inst.negative = (params) => inst.check(checks.lt(0, params));
424
+ inst.nonpositive = (params) => inst.check(checks.lte(0, params));
425
+ inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
426
+ inst.step = (value, params) => inst.check(checks.multipleOf(value, params));
427
+ // inst.finite = (params) => inst.check(core.finite(params));
428
+ inst.finite = () => inst;
429
+ const bag = inst._zod.bag;
430
+ inst.minValue =
431
+ Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
432
+ inst.maxValue =
433
+ Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
434
+ inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
435
+ inst.isFinite = true;
436
+ inst.format = bag.format ?? null;
437
+ });
438
+ function number(params) {
439
+ return core._number(exports.ZodNumber, params);
440
+ }
441
+ exports.ZodNumberFormat = core.$constructor("ZodNumberFormat", (inst, def) => {
442
+ core.$ZodNumberFormat.init(inst, def);
443
+ exports.ZodNumber.init(inst, def);
444
+ });
445
+ function int(params) {
446
+ return core._int(exports.ZodNumberFormat, params);
447
+ }
448
+ function float32(params) {
449
+ return core._float32(exports.ZodNumberFormat, params);
450
+ }
451
+ function float64(params) {
452
+ return core._float64(exports.ZodNumberFormat, params);
453
+ }
454
+ function int32(params) {
455
+ return core._int32(exports.ZodNumberFormat, params);
456
+ }
457
+ function uint32(params) {
458
+ return core._uint32(exports.ZodNumberFormat, params);
459
+ }
460
+ exports.ZodBoolean = core.$constructor("ZodBoolean", (inst, def) => {
461
+ core.$ZodBoolean.init(inst, def);
462
+ exports.ZodType.init(inst, def);
463
+ });
464
+ function boolean(params) {
465
+ return core._boolean(exports.ZodBoolean, params);
466
+ }
467
+ exports.ZodBigInt = core.$constructor("ZodBigInt", (inst, def) => {
468
+ core.$ZodBigInt.init(inst, def);
469
+ exports.ZodType.init(inst, def);
470
+ inst.gte = (value, params) => inst.check(checks.gte(value, params));
471
+ inst.min = (value, params) => inst.check(checks.gte(value, params));
472
+ inst.gt = (value, params) => inst.check(checks.gt(value, params));
473
+ inst.gte = (value, params) => inst.check(checks.gte(value, params));
474
+ inst.min = (value, params) => inst.check(checks.gte(value, params));
475
+ inst.lt = (value, params) => inst.check(checks.lt(value, params));
476
+ inst.lte = (value, params) => inst.check(checks.lte(value, params));
477
+ inst.max = (value, params) => inst.check(checks.lte(value, params));
478
+ inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));
479
+ inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));
480
+ inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));
481
+ inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));
482
+ inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
483
+ const bag = inst._zod.bag;
484
+ inst.minValue = bag.minimum ?? null;
485
+ inst.maxValue = bag.maximum ?? null;
486
+ inst.format = bag.format ?? null;
487
+ });
488
+ function bigint(params) {
489
+ return core._bigint(exports.ZodBigInt, params);
490
+ }
491
+ exports.ZodBigIntFormat = core.$constructor("ZodBigIntFormat", (inst, def) => {
492
+ core.$ZodBigIntFormat.init(inst, def);
493
+ exports.ZodBigInt.init(inst, def);
494
+ });
495
+ // int64
496
+ function int64(params) {
497
+ return core._int64(exports.ZodBigIntFormat, params);
498
+ }
499
+ // uint64
500
+ function uint64(params) {
501
+ return core._uint64(exports.ZodBigIntFormat, params);
502
+ }
503
+ exports.ZodSymbol = core.$constructor("ZodSymbol", (inst, def) => {
504
+ core.$ZodSymbol.init(inst, def);
505
+ exports.ZodType.init(inst, def);
506
+ });
507
+ function symbol(params) {
508
+ return core._symbol(exports.ZodSymbol, params);
509
+ }
510
+ exports.ZodUndefined = core.$constructor("ZodUndefined", (inst, def) => {
511
+ core.$ZodUndefined.init(inst, def);
512
+ exports.ZodType.init(inst, def);
513
+ });
514
+ function _undefined(params) {
515
+ return core._undefined(exports.ZodUndefined, params);
516
+ }
517
+ exports.ZodNull = core.$constructor("ZodNull", (inst, def) => {
518
+ core.$ZodNull.init(inst, def);
519
+ exports.ZodType.init(inst, def);
520
+ });
521
+ function _null(params) {
522
+ return core._null(exports.ZodNull, params);
523
+ }
524
+ exports.ZodAny = core.$constructor("ZodAny", (inst, def) => {
525
+ core.$ZodAny.init(inst, def);
526
+ exports.ZodType.init(inst, def);
527
+ });
528
+ function any() {
529
+ return core._any(exports.ZodAny);
530
+ }
531
+ exports.ZodUnknown = core.$constructor("ZodUnknown", (inst, def) => {
532
+ core.$ZodUnknown.init(inst, def);
533
+ exports.ZodType.init(inst, def);
534
+ });
535
+ function unknown() {
536
+ return core._unknown(exports.ZodUnknown);
537
+ }
538
+ exports.ZodNever = core.$constructor("ZodNever", (inst, def) => {
539
+ core.$ZodNever.init(inst, def);
540
+ exports.ZodType.init(inst, def);
541
+ });
542
+ function never(params) {
543
+ return core._never(exports.ZodNever, params);
544
+ }
545
+ exports.ZodVoid = core.$constructor("ZodVoid", (inst, def) => {
546
+ core.$ZodVoid.init(inst, def);
547
+ exports.ZodType.init(inst, def);
548
+ });
549
+ function _void(params) {
550
+ return core._void(exports.ZodVoid, params);
551
+ }
552
+ exports.ZodDate = core.$constructor("ZodDate", (inst, def) => {
553
+ core.$ZodDate.init(inst, def);
554
+ exports.ZodType.init(inst, def);
555
+ inst.min = (value, params) => inst.check(checks.gte(value, params));
556
+ inst.max = (value, params) => inst.check(checks.lte(value, params));
557
+ const c = inst._zod.bag;
558
+ inst.minDate = c.minimum ? new Date(c.minimum) : null;
559
+ inst.maxDate = c.maximum ? new Date(c.maximum) : null;
560
+ });
561
+ function date(params) {
562
+ return core._date(exports.ZodDate, params);
563
+ }
564
+ exports.ZodArray = core.$constructor("ZodArray", (inst, def) => {
565
+ core.$ZodArray.init(inst, def);
566
+ exports.ZodType.init(inst, def);
567
+ inst.element = def.element;
568
+ inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));
569
+ inst.nonempty = (params) => inst.check(checks.minLength(1, params));
570
+ inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));
571
+ inst.length = (len, params) => inst.check(checks.length(len, params));
572
+ inst.unwrap = () => inst.element;
573
+ });
574
+ function array(element, params) {
575
+ return core._array(exports.ZodArray, element, params);
576
+ }
577
+ // .keyof
578
+ function keyof(schema) {
579
+ const shape = schema._zod.def.shape;
580
+ return literal(Object.keys(shape));
581
+ }
582
+ exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
583
+ core.$ZodObject.init(inst, def);
584
+ exports.ZodType.init(inst, def);
585
+ core_1.util.defineLazy(inst, "shape", () => def.shape);
586
+ inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
587
+ inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
588
+ inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
589
+ // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
590
+ inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
591
+ inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
592
+ inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
593
+ inst.extend = (incoming) => {
594
+ return core_1.util.extend(inst, incoming);
595
+ };
596
+ inst.merge = (other) => core_1.util.merge(inst, other);
597
+ inst.pick = (mask) => core_1.util.pick(inst, mask);
598
+ inst.omit = (mask) => core_1.util.omit(inst, mask);
599
+ inst.partial = (...args) => core_1.util.partial(exports.ZodOptional, inst, args[0]);
600
+ inst.required = (...args) => core_1.util.required(exports.ZodNonOptional, inst, args[0]);
601
+ });
602
+ function object(shape, params) {
603
+ const def = {
604
+ type: "object",
605
+ get shape() {
606
+ core_1.util.assignProp(this, "shape", { ...shape });
607
+ return this.shape;
608
+ },
609
+ ...core_1.util.normalizeParams(params),
610
+ };
611
+ return new exports.ZodObject(def);
612
+ }
613
+ // strictObject
614
+ function strictObject(shape, params) {
615
+ return new exports.ZodObject({
616
+ type: "object",
617
+ get shape() {
618
+ core_1.util.assignProp(this, "shape", { ...shape });
619
+ return this.shape;
620
+ },
621
+ catchall: never(),
622
+ ...core_1.util.normalizeParams(params),
623
+ });
624
+ }
625
+ // looseObject
626
+ function looseObject(shape, params) {
627
+ return new exports.ZodObject({
628
+ type: "object",
629
+ get shape() {
630
+ core_1.util.assignProp(this, "shape", { ...shape });
631
+ return this.shape;
632
+ },
633
+ catchall: unknown(),
634
+ ...core_1.util.normalizeParams(params),
635
+ });
636
+ }
637
+ exports.ZodUnion = core.$constructor("ZodUnion", (inst, def) => {
638
+ core.$ZodUnion.init(inst, def);
639
+ exports.ZodType.init(inst, def);
640
+ inst.options = def.options;
641
+ });
642
+ function union(options, params) {
643
+ return new exports.ZodUnion({
644
+ type: "union",
645
+ options: options,
646
+ ...core_1.util.normalizeParams(params),
647
+ });
648
+ }
649
+ exports.ZodDiscriminatedUnion = core.$constructor("ZodDiscriminatedUnion", (inst, def) => {
650
+ exports.ZodUnion.init(inst, def);
651
+ core.$ZodDiscriminatedUnion.init(inst, def);
652
+ });
653
+ function discriminatedUnion(discriminator, options, params) {
654
+ // const [options, params] = args;
655
+ return new exports.ZodDiscriminatedUnion({
656
+ type: "union",
657
+ options,
658
+ discriminator,
659
+ ...core_1.util.normalizeParams(params),
660
+ });
661
+ }
662
+ exports.ZodIntersection = core.$constructor("ZodIntersection", (inst, def) => {
663
+ core.$ZodIntersection.init(inst, def);
664
+ exports.ZodType.init(inst, def);
665
+ });
666
+ function intersection(left, right) {
667
+ return new exports.ZodIntersection({
668
+ type: "intersection",
669
+ left: left,
670
+ right: right,
671
+ });
672
+ }
673
+ exports.ZodTuple = core.$constructor("ZodTuple", (inst, def) => {
674
+ core.$ZodTuple.init(inst, def);
675
+ exports.ZodType.init(inst, def);
676
+ inst.rest = (rest) => inst.clone({
677
+ ...inst._zod.def,
678
+ rest: rest,
679
+ });
680
+ });
681
+ function tuple(items, _paramsOrRest, _params) {
682
+ const hasRest = _paramsOrRest instanceof core.$ZodType;
683
+ const params = hasRest ? _params : _paramsOrRest;
684
+ const rest = hasRest ? _paramsOrRest : null;
685
+ return new exports.ZodTuple({
686
+ type: "tuple",
687
+ items: items,
688
+ rest,
689
+ ...core_1.util.normalizeParams(params),
690
+ });
691
+ }
692
+ exports.ZodRecord = core.$constructor("ZodRecord", (inst, def) => {
693
+ core.$ZodRecord.init(inst, def);
694
+ exports.ZodType.init(inst, def);
695
+ inst.keyType = def.keyType;
696
+ inst.valueType = def.valueType;
697
+ });
698
+ function record(keyType, valueType, params) {
699
+ return new exports.ZodRecord({
700
+ type: "record",
701
+ keyType,
702
+ valueType: valueType,
703
+ ...core_1.util.normalizeParams(params),
704
+ });
705
+ }
706
+ // type alksjf = core.output<core.$ZodRecordKey>;
707
+ function partialRecord(keyType, valueType, params) {
708
+ return new exports.ZodRecord({
709
+ type: "record",
710
+ keyType: union([keyType, never()]),
711
+ valueType: valueType,
712
+ ...core_1.util.normalizeParams(params),
713
+ });
714
+ }
715
+ exports.ZodMap = core.$constructor("ZodMap", (inst, def) => {
716
+ core.$ZodMap.init(inst, def);
717
+ exports.ZodType.init(inst, def);
718
+ inst.keyType = def.keyType;
719
+ inst.valueType = def.valueType;
720
+ });
721
+ function map(keyType, valueType, params) {
722
+ return new exports.ZodMap({
723
+ type: "map",
724
+ keyType: keyType,
725
+ valueType: valueType,
726
+ ...core_1.util.normalizeParams(params),
727
+ });
728
+ }
729
+ exports.ZodSet = core.$constructor("ZodSet", (inst, def) => {
730
+ core.$ZodSet.init(inst, def);
731
+ exports.ZodType.init(inst, def);
732
+ inst.min = (...args) => inst.check(core._minSize(...args));
733
+ inst.nonempty = (params) => inst.check(core._minSize(1, params));
734
+ inst.max = (...args) => inst.check(core._maxSize(...args));
735
+ inst.size = (...args) => inst.check(core._size(...args));
736
+ });
737
+ function set(valueType, params) {
738
+ return new exports.ZodSet({
739
+ type: "set",
740
+ valueType: valueType,
741
+ ...core_1.util.normalizeParams(params),
742
+ });
743
+ }
744
+ exports.ZodEnum = core.$constructor("ZodEnum", (inst, def) => {
745
+ core.$ZodEnum.init(inst, def);
746
+ exports.ZodType.init(inst, def);
747
+ inst.enum = def.entries;
748
+ inst.options = Object.values(def.entries);
749
+ const keys = new Set(Object.keys(def.entries));
750
+ inst.extract = (values, params) => {
751
+ const newEntries = {};
752
+ for (const value of values) {
753
+ if (keys.has(value)) {
754
+ newEntries[value] = def.entries[value];
755
+ }
756
+ else
757
+ throw new Error(`Key ${value} not found in enum`);
758
+ }
759
+ return new exports.ZodEnum({
760
+ ...def,
761
+ checks: [],
762
+ ...core_1.util.normalizeParams(params),
763
+ entries: newEntries,
764
+ });
765
+ };
766
+ inst.exclude = (values, params) => {
767
+ const newEntries = { ...def.entries };
768
+ for (const value of values) {
769
+ if (keys.has(value)) {
770
+ delete newEntries[value];
771
+ }
772
+ else
773
+ throw new Error(`Key ${value} not found in enum`);
774
+ }
775
+ return new exports.ZodEnum({
776
+ ...def,
777
+ checks: [],
778
+ ...core_1.util.normalizeParams(params),
779
+ entries: newEntries,
780
+ });
781
+ };
782
+ });
783
+ function _enum(values, params) {
784
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
785
+ return new exports.ZodEnum({
786
+ type: "enum",
787
+ entries,
788
+ ...core_1.util.normalizeParams(params),
789
+ });
790
+ }
791
+ /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
792
+ *
793
+ * ```ts
794
+ * enum Colors { red, green, blue }
795
+ * z.enum(Colors);
796
+ * ```
797
+ */
798
+ function nativeEnum(entries, params) {
799
+ return new exports.ZodEnum({
800
+ type: "enum",
801
+ entries,
802
+ ...core_1.util.normalizeParams(params),
803
+ });
804
+ }
805
+ exports.ZodLiteral = core.$constructor("ZodLiteral", (inst, def) => {
806
+ core.$ZodLiteral.init(inst, def);
807
+ exports.ZodType.init(inst, def);
808
+ inst.values = new Set(def.values);
809
+ Object.defineProperty(inst, "value", {
810
+ get() {
811
+ if (def.values.length > 1) {
812
+ throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
813
+ }
814
+ return def.values[0];
815
+ },
816
+ });
817
+ });
818
+ function literal(value, params) {
819
+ return new exports.ZodLiteral({
820
+ type: "literal",
821
+ values: Array.isArray(value) ? value : [value],
822
+ ...core_1.util.normalizeParams(params),
823
+ });
824
+ }
825
+ exports.ZodFile = core.$constructor("ZodFile", (inst, def) => {
826
+ core.$ZodFile.init(inst, def);
827
+ exports.ZodType.init(inst, def);
828
+ inst.min = (size, params) => inst.check(core._minSize(size, params));
829
+ inst.max = (size, params) => inst.check(core._maxSize(size, params));
830
+ inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));
831
+ });
832
+ function file(params) {
833
+ return core._file(exports.ZodFile, params);
834
+ }
835
+ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
836
+ core.$ZodTransform.init(inst, def);
837
+ exports.ZodType.init(inst, def);
838
+ inst._zod.parse = (payload, _ctx) => {
839
+ payload.addIssue = (issue) => {
840
+ if (typeof issue === "string") {
841
+ payload.issues.push(core_1.util.issue(issue, payload.value, def));
842
+ }
843
+ else {
844
+ // for Zod 3 backwards compatibility
845
+ const _issue = issue;
846
+ if (_issue.fatal)
847
+ _issue.continue = false;
848
+ _issue.code ?? (_issue.code = "custom");
849
+ _issue.input ?? (_issue.input = payload.value);
850
+ _issue.inst ?? (_issue.inst = inst);
851
+ _issue.continue ?? (_issue.continue = true);
852
+ payload.issues.push(core_1.util.issue(_issue));
853
+ }
854
+ };
855
+ const output = def.transform(payload.value, payload);
856
+ if (output instanceof Promise) {
857
+ return output.then((output) => {
858
+ payload.value = output;
859
+ return payload;
860
+ });
861
+ }
862
+ payload.value = output;
863
+ return payload;
864
+ };
865
+ });
866
+ function transform(fn) {
867
+ return new exports.ZodTransform({
868
+ type: "transform",
869
+ transform: fn,
870
+ });
871
+ }
872
+ exports.ZodOptional = core.$constructor("ZodOptional", (inst, def) => {
873
+ core.$ZodOptional.init(inst, def);
874
+ exports.ZodType.init(inst, def);
875
+ inst.unwrap = () => inst._zod.def.innerType;
876
+ });
877
+ function optional(innerType) {
878
+ return new exports.ZodOptional({
879
+ type: "optional",
880
+ innerType: innerType,
881
+ });
882
+ }
883
+ exports.ZodNullable = core.$constructor("ZodNullable", (inst, def) => {
884
+ core.$ZodNullable.init(inst, def);
885
+ exports.ZodType.init(inst, def);
886
+ inst.unwrap = () => inst._zod.def.innerType;
887
+ });
888
+ function nullable(innerType) {
889
+ return new exports.ZodNullable({
890
+ type: "nullable",
891
+ innerType: innerType,
892
+ });
893
+ }
894
+ // nullish
895
+ function nullish(innerType) {
896
+ return optional(nullable(innerType));
897
+ }
898
+ exports.ZodDefault = core.$constructor("ZodDefault", (inst, def) => {
899
+ core.$ZodDefault.init(inst, def);
900
+ exports.ZodType.init(inst, def);
901
+ inst.unwrap = () => inst._zod.def.innerType;
902
+ inst.removeDefault = inst.unwrap;
903
+ });
904
+ function _default(innerType, defaultValue) {
905
+ return new exports.ZodDefault({
906
+ type: "default",
907
+ innerType: innerType,
908
+ get defaultValue() {
909
+ return typeof defaultValue === "function" ? defaultValue() : defaultValue;
910
+ },
911
+ });
912
+ }
913
+ exports.ZodPrefault = core.$constructor("ZodPrefault", (inst, def) => {
914
+ core.$ZodPrefault.init(inst, def);
915
+ exports.ZodType.init(inst, def);
916
+ inst.unwrap = () => inst._zod.def.innerType;
917
+ });
918
+ function prefault(innerType, defaultValue) {
919
+ return new exports.ZodPrefault({
920
+ type: "prefault",
921
+ innerType: innerType,
922
+ get defaultValue() {
923
+ return typeof defaultValue === "function" ? defaultValue() : defaultValue;
924
+ },
925
+ });
926
+ }
927
+ exports.ZodNonOptional = core.$constructor("ZodNonOptional", (inst, def) => {
928
+ core.$ZodNonOptional.init(inst, def);
929
+ exports.ZodType.init(inst, def);
930
+ inst.unwrap = () => inst._zod.def.innerType;
931
+ });
932
+ function nonoptional(innerType, params) {
933
+ return new exports.ZodNonOptional({
934
+ type: "nonoptional",
935
+ innerType: innerType,
936
+ ...core_1.util.normalizeParams(params),
937
+ });
938
+ }
939
+ exports.ZodSuccess = core.$constructor("ZodSuccess", (inst, def) => {
940
+ core.$ZodSuccess.init(inst, def);
941
+ exports.ZodType.init(inst, def);
942
+ inst.unwrap = () => inst._zod.def.innerType;
943
+ });
944
+ function success(innerType) {
945
+ return new exports.ZodSuccess({
946
+ type: "success",
947
+ innerType: innerType,
948
+ });
949
+ }
950
+ exports.ZodCatch = core.$constructor("ZodCatch", (inst, def) => {
951
+ core.$ZodCatch.init(inst, def);
952
+ exports.ZodType.init(inst, def);
953
+ inst.unwrap = () => inst._zod.def.innerType;
954
+ inst.removeCatch = inst.unwrap;
955
+ });
956
+ function _catch(innerType, catchValue) {
957
+ return new exports.ZodCatch({
958
+ type: "catch",
959
+ innerType: innerType,
960
+ catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue),
961
+ });
962
+ }
963
+ exports.ZodNaN = core.$constructor("ZodNaN", (inst, def) => {
964
+ core.$ZodNaN.init(inst, def);
965
+ exports.ZodType.init(inst, def);
966
+ });
967
+ function nan(params) {
968
+ return core._nan(exports.ZodNaN, params);
969
+ }
970
+ exports.ZodPipe = core.$constructor("ZodPipe", (inst, def) => {
971
+ core.$ZodPipe.init(inst, def);
972
+ exports.ZodType.init(inst, def);
973
+ inst.in = def.in;
974
+ inst.out = def.out;
975
+ });
976
+ function pipe(in_, out) {
977
+ return new exports.ZodPipe({
978
+ type: "pipe",
979
+ in: in_,
980
+ out: out,
981
+ // ...util.normalizeParams(params),
982
+ });
983
+ }
984
+ exports.ZodReadonly = core.$constructor("ZodReadonly", (inst, def) => {
985
+ core.$ZodReadonly.init(inst, def);
986
+ exports.ZodType.init(inst, def);
987
+ });
988
+ function readonly(innerType) {
989
+ return new exports.ZodReadonly({
990
+ type: "readonly",
991
+ innerType: innerType,
992
+ });
993
+ }
994
+ exports.ZodTemplateLiteral = core.$constructor("ZodTemplateLiteral", (inst, def) => {
995
+ core.$ZodTemplateLiteral.init(inst, def);
996
+ exports.ZodType.init(inst, def);
997
+ });
998
+ function templateLiteral(parts, params) {
999
+ return new exports.ZodTemplateLiteral({
1000
+ type: "template_literal",
1001
+ parts,
1002
+ ...core_1.util.normalizeParams(params),
1003
+ });
1004
+ }
1005
+ exports.ZodLazy = core.$constructor("ZodLazy", (inst, def) => {
1006
+ core.$ZodLazy.init(inst, def);
1007
+ exports.ZodType.init(inst, def);
1008
+ inst.unwrap = () => inst._zod.def.getter();
1009
+ });
1010
+ function lazy(getter) {
1011
+ return new exports.ZodLazy({
1012
+ type: "lazy",
1013
+ getter: getter,
1014
+ });
1015
+ }
1016
+ exports.ZodPromise = core.$constructor("ZodPromise", (inst, def) => {
1017
+ core.$ZodPromise.init(inst, def);
1018
+ exports.ZodType.init(inst, def);
1019
+ inst.unwrap = () => inst._zod.def.innerType;
1020
+ });
1021
+ function promise(innerType) {
1022
+ return new exports.ZodPromise({
1023
+ type: "promise",
1024
+ innerType: innerType,
1025
+ });
1026
+ }
1027
+ exports.ZodCustom = core.$constructor("ZodCustom", (inst, def) => {
1028
+ core.$ZodCustom.init(inst, def);
1029
+ exports.ZodType.init(inst, def);
1030
+ });
1031
+ // custom checks
1032
+ function check(fn, params) {
1033
+ const ch = new core.$ZodCheck({
1034
+ check: "custom",
1035
+ ...core_1.util.normalizeParams(params),
1036
+ });
1037
+ ch._zod.check = fn;
1038
+ return ch;
1039
+ }
1040
+ function custom(fn, _params) {
1041
+ return core._custom(exports.ZodCustom, fn ?? (() => true), _params);
1042
+ }
1043
+ function refine(fn, _params = {}) {
1044
+ return core._refine(exports.ZodCustom, fn, _params);
1045
+ }
1046
+ // superRefine
1047
+ function superRefine(fn, params) {
1048
+ const ch = check((payload) => {
1049
+ payload.addIssue = (issue) => {
1050
+ if (typeof issue === "string") {
1051
+ payload.issues.push(core_1.util.issue(issue, payload.value, ch._zod.def));
1052
+ }
1053
+ else {
1054
+ // for Zod 3 backwards compatibility
1055
+ const _issue = issue;
1056
+ if (_issue.fatal)
1057
+ _issue.continue = false;
1058
+ _issue.code ?? (_issue.code = "custom");
1059
+ _issue.input ?? (_issue.input = payload.value);
1060
+ _issue.inst ?? (_issue.inst = ch);
1061
+ _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
1062
+ payload.issues.push(core_1.util.issue(_issue));
1063
+ }
1064
+ };
1065
+ return fn(payload.value, payload);
1066
+ }, params);
1067
+ return ch;
1068
+ }
1069
+ function _instanceof(cls, params = {
1070
+ error: `Input not instance of ${cls.name}`,
1071
+ }) {
1072
+ const inst = new exports.ZodCustom({
1073
+ type: "custom",
1074
+ check: "custom",
1075
+ fn: (data) => data instanceof cls,
1076
+ abort: true,
1077
+ ...core_1.util.normalizeParams(params),
1078
+ });
1079
+ inst._zod.bag.Class = cls;
1080
+ return inst;
1081
+ }
1082
+ // stringbool
1083
+ const stringbool = (...args) => core._stringbool({
1084
+ Pipe: exports.ZodPipe,
1085
+ Boolean: exports.ZodBoolean,
1086
+ String: exports.ZodString,
1087
+ Transform: exports.ZodTransform,
1088
+ }, ...args);
1089
+ exports.stringbool = stringbool;
1090
+ function json(params) {
1091
+ const jsonSchema = lazy(() => {
1092
+ return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);
1093
+ });
1094
+ return jsonSchema;
1095
+ }
1096
+ // preprocess
1097
+ // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
1098
+ function preprocess(fn, schema) {
1099
+ return pipe(transform(fn), schema);
1100
+ }