@psiclawops/hypermem 0.9.0 → 0.9.1

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 (926) hide show
  1. package/ARCHITECTURE.md +2 -2
  2. package/CHANGELOG.md +10 -1
  3. package/docs/ROADMAP.md +12 -3
  4. package/memory-plugin/package.json +3 -3
  5. package/package.json +2 -1
  6. package/plugin/package.json +4 -4
  7. package/dist/adaptive-lifecycle.d.ts +0 -81
  8. package/dist/adaptive-lifecycle.d.ts.map +0 -1
  9. package/dist/adaptive-lifecycle.js +0 -190
  10. package/dist/background-indexer.d.ts +0 -161
  11. package/dist/background-indexer.d.ts.map +0 -1
  12. package/dist/background-indexer.js +0 -1263
  13. package/dist/budget-policy.d.ts +0 -22
  14. package/dist/budget-policy.d.ts.map +0 -1
  15. package/dist/budget-policy.js +0 -32
  16. package/dist/cache.d.ts +0 -148
  17. package/dist/cache.d.ts.map +0 -1
  18. package/dist/cache.js +0 -571
  19. package/dist/compaction-fence.d.ts +0 -97
  20. package/dist/compaction-fence.d.ts.map +0 -1
  21. package/dist/compaction-fence.js +0 -174
  22. package/dist/composition-snapshot-integrity.d.ts +0 -36
  23. package/dist/composition-snapshot-integrity.d.ts.map +0 -1
  24. package/dist/composition-snapshot-integrity.js +0 -131
  25. package/dist/composition-snapshot-runtime.d.ts +0 -59
  26. package/dist/composition-snapshot-runtime.d.ts.map +0 -1
  27. package/dist/composition-snapshot-runtime.js +0 -250
  28. package/dist/composition-snapshot-store.d.ts +0 -44
  29. package/dist/composition-snapshot-store.d.ts.map +0 -1
  30. package/dist/composition-snapshot-store.js +0 -117
  31. package/dist/compositor-utils.d.ts +0 -31
  32. package/dist/compositor-utils.d.ts.map +0 -1
  33. package/dist/compositor-utils.js +0 -47
  34. package/dist/compositor.d.ts +0 -518
  35. package/dist/compositor.d.ts.map +0 -1
  36. package/dist/compositor.js +0 -4280
  37. package/dist/content-hash.d.ts +0 -43
  38. package/dist/content-hash.d.ts.map +0 -1
  39. package/dist/content-hash.js +0 -75
  40. package/dist/content-type-classifier.d.ts +0 -41
  41. package/dist/content-type-classifier.d.ts.map +0 -1
  42. package/dist/content-type-classifier.js +0 -181
  43. package/dist/context-backfill.d.ts +0 -46
  44. package/dist/context-backfill.d.ts.map +0 -1
  45. package/dist/context-backfill.js +0 -113
  46. package/dist/context-store.d.ts +0 -131
  47. package/dist/context-store.d.ts.map +0 -1
  48. package/dist/context-store.js +0 -279
  49. package/dist/contradiction-audit-store.d.ts +0 -54
  50. package/dist/contradiction-audit-store.d.ts.map +0 -1
  51. package/dist/contradiction-audit-store.js +0 -88
  52. package/dist/contradiction-detector.d.ts +0 -78
  53. package/dist/contradiction-detector.d.ts.map +0 -1
  54. package/dist/contradiction-detector.js +0 -362
  55. package/dist/contradiction-resolution-policy.d.ts +0 -21
  56. package/dist/contradiction-resolution-policy.d.ts.map +0 -1
  57. package/dist/contradiction-resolution-policy.js +0 -17
  58. package/dist/cross-agent.d.ts +0 -74
  59. package/dist/cross-agent.d.ts.map +0 -1
  60. package/dist/cross-agent.js +0 -271
  61. package/dist/db.d.ts +0 -131
  62. package/dist/db.d.ts.map +0 -1
  63. package/dist/db.js +0 -410
  64. package/dist/degradation.d.ts +0 -102
  65. package/dist/degradation.d.ts.map +0 -1
  66. package/dist/degradation.js +0 -141
  67. package/dist/desired-state-store.d.ts +0 -100
  68. package/dist/desired-state-store.d.ts.map +0 -1
  69. package/dist/desired-state-store.js +0 -222
  70. package/dist/doc-chunk-store.d.ts +0 -159
  71. package/dist/doc-chunk-store.d.ts.map +0 -1
  72. package/dist/doc-chunk-store.js +0 -441
  73. package/dist/doc-chunker.d.ts +0 -99
  74. package/dist/doc-chunker.d.ts.map +0 -1
  75. package/dist/doc-chunker.js +0 -324
  76. package/dist/dreaming-promoter.d.ts +0 -124
  77. package/dist/dreaming-promoter.d.ts.map +0 -1
  78. package/dist/dreaming-promoter.js +0 -447
  79. package/dist/episode-store.d.ts +0 -49
  80. package/dist/episode-store.d.ts.map +0 -1
  81. package/dist/episode-store.js +0 -135
  82. package/dist/expertise-store.d.ts +0 -129
  83. package/dist/expertise-store.d.ts.map +0 -1
  84. package/dist/expertise-store.js +0 -342
  85. package/dist/fact-store.d.ts +0 -90
  86. package/dist/fact-store.d.ts.map +0 -1
  87. package/dist/fact-store.js +0 -283
  88. package/dist/fleet-store.d.ts +0 -144
  89. package/dist/fleet-store.d.ts.map +0 -1
  90. package/dist/fleet-store.js +0 -276
  91. package/dist/fos-mod.d.ts +0 -178
  92. package/dist/fos-mod.d.ts.map +0 -1
  93. package/dist/fos-mod.js +0 -416
  94. package/dist/hybrid-retrieval.d.ts +0 -102
  95. package/dist/hybrid-retrieval.d.ts.map +0 -1
  96. package/dist/hybrid-retrieval.js +0 -429
  97. package/dist/image-eviction.d.ts +0 -49
  98. package/dist/image-eviction.d.ts.map +0 -1
  99. package/dist/image-eviction.js +0 -251
  100. package/dist/index.d.ts +0 -727
  101. package/dist/index.d.ts.map +0 -1
  102. package/dist/index.js +0 -1495
  103. package/dist/keystone-scorer.d.ts +0 -51
  104. package/dist/keystone-scorer.d.ts.map +0 -1
  105. package/dist/keystone-scorer.js +0 -52
  106. package/dist/knowledge-graph.d.ts +0 -110
  107. package/dist/knowledge-graph.d.ts.map +0 -1
  108. package/dist/knowledge-graph.js +0 -305
  109. package/dist/knowledge-lint.d.ts +0 -31
  110. package/dist/knowledge-lint.d.ts.map +0 -1
  111. package/dist/knowledge-lint.js +0 -155
  112. package/dist/knowledge-store.d.ts +0 -75
  113. package/dist/knowledge-store.d.ts.map +0 -1
  114. package/dist/knowledge-store.js +0 -270
  115. package/dist/library-schema.d.ts +0 -31
  116. package/dist/library-schema.d.ts.map +0 -1
  117. package/dist/library-schema.js +0 -1357
  118. package/dist/message-store.d.ts +0 -181
  119. package/dist/message-store.d.ts.map +0 -1
  120. package/dist/message-store.js +0 -577
  121. package/dist/metrics-dashboard.d.ts +0 -131
  122. package/dist/metrics-dashboard.d.ts.map +0 -1
  123. package/dist/metrics-dashboard.js +0 -298
  124. package/dist/obsidian-exporter.d.ts +0 -57
  125. package/dist/obsidian-exporter.d.ts.map +0 -1
  126. package/dist/obsidian-exporter.js +0 -274
  127. package/dist/obsidian-watcher.d.ts +0 -147
  128. package/dist/obsidian-watcher.d.ts.map +0 -1
  129. package/dist/obsidian-watcher.js +0 -403
  130. package/dist/open-domain.d.ts +0 -46
  131. package/dist/open-domain.d.ts.map +0 -1
  132. package/dist/open-domain.js +0 -125
  133. package/dist/preference-store.d.ts +0 -54
  134. package/dist/preference-store.d.ts.map +0 -1
  135. package/dist/preference-store.js +0 -109
  136. package/dist/preservation-gate.d.ts +0 -82
  137. package/dist/preservation-gate.d.ts.map +0 -1
  138. package/dist/preservation-gate.js +0 -150
  139. package/dist/proactive-pass.d.ts +0 -63
  140. package/dist/proactive-pass.d.ts.map +0 -1
  141. package/dist/proactive-pass.js +0 -293
  142. package/dist/profiles.d.ts +0 -46
  143. package/dist/profiles.d.ts.map +0 -1
  144. package/dist/profiles.js +0 -262
  145. package/dist/provider-translator.d.ts +0 -50
  146. package/dist/provider-translator.d.ts.map +0 -1
  147. package/dist/provider-translator.js +0 -403
  148. package/dist/rate-limiter.d.ts +0 -76
  149. package/dist/rate-limiter.d.ts.map +0 -1
  150. package/dist/rate-limiter.js +0 -179
  151. package/dist/repair-tool-pairs.d.ts +0 -38
  152. package/dist/repair-tool-pairs.d.ts.map +0 -1
  153. package/dist/repair-tool-pairs.js +0 -209
  154. package/dist/replay-recovery.d.ts +0 -29
  155. package/dist/replay-recovery.d.ts.map +0 -1
  156. package/dist/replay-recovery.js +0 -82
  157. package/dist/reranker.d.ts +0 -95
  158. package/dist/reranker.d.ts.map +0 -1
  159. package/dist/reranker.js +0 -308
  160. package/dist/retrieval-policy.d.ts +0 -51
  161. package/dist/retrieval-policy.d.ts.map +0 -1
  162. package/dist/retrieval-policy.js +0 -77
  163. package/dist/schema.d.ts +0 -15
  164. package/dist/schema.d.ts.map +0 -1
  165. package/dist/schema.js +0 -327
  166. package/dist/secret-scanner.d.ts +0 -51
  167. package/dist/secret-scanner.d.ts.map +0 -1
  168. package/dist/secret-scanner.js +0 -248
  169. package/dist/seed.d.ts +0 -108
  170. package/dist/seed.d.ts.map +0 -1
  171. package/dist/seed.js +0 -179
  172. package/dist/session-flusher.d.ts +0 -53
  173. package/dist/session-flusher.d.ts.map +0 -1
  174. package/dist/session-flusher.js +0 -69
  175. package/dist/session-topic-map.d.ts +0 -41
  176. package/dist/session-topic-map.d.ts.map +0 -1
  177. package/dist/session-topic-map.js +0 -77
  178. package/dist/spawn-context.d.ts +0 -54
  179. package/dist/spawn-context.d.ts.map +0 -1
  180. package/dist/spawn-context.js +0 -159
  181. package/dist/system-store.d.ts +0 -73
  182. package/dist/system-store.d.ts.map +0 -1
  183. package/dist/system-store.js +0 -182
  184. package/dist/temporal-store.d.ts +0 -81
  185. package/dist/temporal-store.d.ts.map +0 -1
  186. package/dist/temporal-store.js +0 -149
  187. package/dist/tool-artifact-store.d.ts +0 -98
  188. package/dist/tool-artifact-store.d.ts.map +0 -1
  189. package/dist/tool-artifact-store.js +0 -244
  190. package/dist/topic-detector.d.ts +0 -35
  191. package/dist/topic-detector.d.ts.map +0 -1
  192. package/dist/topic-detector.js +0 -249
  193. package/dist/topic-store.d.ts +0 -51
  194. package/dist/topic-store.d.ts.map +0 -1
  195. package/dist/topic-store.js +0 -175
  196. package/dist/topic-synthesizer.d.ts +0 -71
  197. package/dist/topic-synthesizer.d.ts.map +0 -1
  198. package/dist/topic-synthesizer.js +0 -426
  199. package/dist/trigger-registry.d.ts +0 -63
  200. package/dist/trigger-registry.d.ts.map +0 -1
  201. package/dist/trigger-registry.js +0 -171
  202. package/dist/types.d.ts +0 -1085
  203. package/dist/types.d.ts.map +0 -1
  204. package/dist/types.js +0 -9
  205. package/dist/vector-store.d.ts +0 -180
  206. package/dist/vector-store.d.ts.map +0 -1
  207. package/dist/vector-store.js +0 -1041
  208. package/dist/version.d.ts +0 -34
  209. package/dist/version.d.ts.map +0 -1
  210. package/dist/version.js +0 -44
  211. package/dist/wiki-page-emitter.d.ts +0 -65
  212. package/dist/wiki-page-emitter.d.ts.map +0 -1
  213. package/dist/wiki-page-emitter.js +0 -258
  214. package/dist/work-store.d.ts +0 -112
  215. package/dist/work-store.d.ts.map +0 -1
  216. package/dist/work-store.js +0 -273
  217. package/memory-plugin/dist/index.d.ts +0 -24
  218. package/memory-plugin/dist/index.d.ts.map +0 -1
  219. package/memory-plugin/dist/index.js +0 -350
  220. package/memory-plugin/dist/index.js.map +0 -1
  221. package/node_modules/sqlite-vec/README.md +0 -1
  222. package/node_modules/sqlite-vec/index.cjs +0 -46
  223. package/node_modules/sqlite-vec/index.d.ts +0 -17
  224. package/node_modules/sqlite-vec/index.mjs +0 -47
  225. package/node_modules/sqlite-vec/package.json +0 -1
  226. package/node_modules/sqlite-vec-linux-x64/README.md +0 -1
  227. package/node_modules/sqlite-vec-linux-x64/package.json +0 -1
  228. package/node_modules/sqlite-vec-linux-x64/vec0.so +0 -0
  229. package/node_modules/zod/LICENSE +0 -21
  230. package/node_modules/zod/README.md +0 -208
  231. package/node_modules/zod/index.cjs +0 -33
  232. package/node_modules/zod/index.d.cts +0 -4
  233. package/node_modules/zod/index.d.ts +0 -4
  234. package/node_modules/zod/index.js +0 -4
  235. package/node_modules/zod/locales/index.cjs +0 -17
  236. package/node_modules/zod/locales/index.d.cts +0 -1
  237. package/node_modules/zod/locales/index.d.ts +0 -1
  238. package/node_modules/zod/locales/index.js +0 -1
  239. package/node_modules/zod/locales/package.json +0 -6
  240. package/node_modules/zod/mini/index.cjs +0 -32
  241. package/node_modules/zod/mini/index.d.cts +0 -3
  242. package/node_modules/zod/mini/index.d.ts +0 -3
  243. package/node_modules/zod/mini/index.js +0 -3
  244. package/node_modules/zod/mini/package.json +0 -6
  245. package/node_modules/zod/package.json +0 -135
  246. package/node_modules/zod/src/index.ts +0 -4
  247. package/node_modules/zod/src/locales/index.ts +0 -1
  248. package/node_modules/zod/src/mini/index.ts +0 -3
  249. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  250. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  251. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  252. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  253. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  254. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  255. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  256. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  257. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  258. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  259. package/node_modules/zod/src/v3/errors.ts +0 -13
  260. package/node_modules/zod/src/v3/external.ts +0 -6
  261. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  262. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  263. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  264. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  265. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  266. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  267. package/node_modules/zod/src/v3/index.ts +0 -4
  268. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  269. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  270. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  271. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  272. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  273. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  274. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  275. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  276. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  277. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  278. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  279. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  280. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  281. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  282. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  283. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  284. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  285. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  286. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  287. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  288. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  289. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  290. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  291. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  292. package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  293. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  294. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  295. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  296. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  297. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  298. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  299. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  300. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  301. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  302. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  303. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  304. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  305. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  306. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  307. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  308. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  309. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  310. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  311. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  312. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  313. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  314. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  315. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  316. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  317. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  318. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  319. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  320. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  321. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  322. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  323. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  324. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  325. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  326. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  327. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  328. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  329. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  330. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  331. package/node_modules/zod/src/v3/types.ts +0 -5138
  332. package/node_modules/zod/src/v4/classic/checks.ts +0 -32
  333. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  334. package/node_modules/zod/src/v4/classic/compat.ts +0 -70
  335. package/node_modules/zod/src/v4/classic/errors.ts +0 -82
  336. package/node_modules/zod/src/v4/classic/external.ts +0 -51
  337. package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -643
  338. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  339. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  340. package/node_modules/zod/src/v4/classic/parse.ts +0 -82
  341. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2409
  342. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  343. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
  344. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  345. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  346. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  347. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  348. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  349. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  350. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  351. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -276
  352. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  353. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
  354. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
  355. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  356. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  357. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  358. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
  359. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
  360. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -365
  361. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  362. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  363. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -661
  364. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  365. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -595
  366. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  367. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  368. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  369. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  370. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -734
  371. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
  372. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  373. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
  374. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
  375. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
  376. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
  377. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  378. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  379. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
  380. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
  381. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  382. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  383. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  384. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  385. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -270
  386. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -640
  387. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -223
  388. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -427
  389. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  390. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  391. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  392. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -282
  393. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  394. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  395. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  396. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  397. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -632
  398. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
  399. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -570
  400. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  401. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
  402. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  403. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  404. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1175
  405. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
  406. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
  407. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  408. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2990
  409. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -361
  410. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -183
  411. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -219
  412. package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  413. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  414. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  415. package/node_modules/zod/src/v4/core/api.ts +0 -1798
  416. package/node_modules/zod/src/v4/core/checks.ts +0 -1293
  417. package/node_modules/zod/src/v4/core/config.ts +0 -15
  418. package/node_modules/zod/src/v4/core/core.ts +0 -138
  419. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  420. package/node_modules/zod/src/v4/core/errors.ts +0 -448
  421. package/node_modules/zod/src/v4/core/index.ts +0 -16
  422. package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
  423. package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -667
  424. package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
  425. package/node_modules/zod/src/v4/core/parse.ts +0 -195
  426. package/node_modules/zod/src/v4/core/regexes.ts +0 -183
  427. package/node_modules/zod/src/v4/core/registries.ts +0 -105
  428. package/node_modules/zod/src/v4/core/schemas.ts +0 -4538
  429. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  430. package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  431. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  432. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  433. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  434. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
  435. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  436. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  437. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  438. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  439. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -83
  440. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -67
  441. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  442. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -613
  443. package/node_modules/zod/src/v4/core/util.ts +0 -966
  444. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  445. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  446. package/node_modules/zod/src/v4/index.ts +0 -4
  447. package/node_modules/zod/src/v4/locales/ar.ts +0 -115
  448. package/node_modules/zod/src/v4/locales/az.ts +0 -111
  449. package/node_modules/zod/src/v4/locales/be.ts +0 -176
  450. package/node_modules/zod/src/v4/locales/bg.ts +0 -128
  451. package/node_modules/zod/src/v4/locales/ca.ts +0 -116
  452. package/node_modules/zod/src/v4/locales/cs.ts +0 -118
  453. package/node_modules/zod/src/v4/locales/da.ts +0 -123
  454. package/node_modules/zod/src/v4/locales/de.ts +0 -116
  455. package/node_modules/zod/src/v4/locales/en.ts +0 -119
  456. package/node_modules/zod/src/v4/locales/eo.ts +0 -118
  457. package/node_modules/zod/src/v4/locales/es.ts +0 -141
  458. package/node_modules/zod/src/v4/locales/fa.ts +0 -126
  459. package/node_modules/zod/src/v4/locales/fi.ts +0 -121
  460. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
  461. package/node_modules/zod/src/v4/locales/fr.ts +0 -116
  462. package/node_modules/zod/src/v4/locales/he.ts +0 -246
  463. package/node_modules/zod/src/v4/locales/hu.ts +0 -117
  464. package/node_modules/zod/src/v4/locales/hy.ts +0 -164
  465. package/node_modules/zod/src/v4/locales/id.ts +0 -115
  466. package/node_modules/zod/src/v4/locales/index.ts +0 -49
  467. package/node_modules/zod/src/v4/locales/is.ts +0 -119
  468. package/node_modules/zod/src/v4/locales/it.ts +0 -116
  469. package/node_modules/zod/src/v4/locales/ja.ts +0 -114
  470. package/node_modules/zod/src/v4/locales/ka.ts +0 -123
  471. package/node_modules/zod/src/v4/locales/kh.ts +0 -7
  472. package/node_modules/zod/src/v4/locales/km.ts +0 -119
  473. package/node_modules/zod/src/v4/locales/ko.ts +0 -121
  474. package/node_modules/zod/src/v4/locales/lt.ts +0 -239
  475. package/node_modules/zod/src/v4/locales/mk.ts +0 -118
  476. package/node_modules/zod/src/v4/locales/ms.ts +0 -115
  477. package/node_modules/zod/src/v4/locales/nl.ts +0 -121
  478. package/node_modules/zod/src/v4/locales/no.ts +0 -116
  479. package/node_modules/zod/src/v4/locales/ota.ts +0 -117
  480. package/node_modules/zod/src/v4/locales/pl.ts +0 -118
  481. package/node_modules/zod/src/v4/locales/ps.ts +0 -126
  482. package/node_modules/zod/src/v4/locales/pt.ts +0 -116
  483. package/node_modules/zod/src/v4/locales/ru.ts +0 -176
  484. package/node_modules/zod/src/v4/locales/sl.ts +0 -118
  485. package/node_modules/zod/src/v4/locales/sv.ts +0 -119
  486. package/node_modules/zod/src/v4/locales/ta.ts +0 -118
  487. package/node_modules/zod/src/v4/locales/th.ts +0 -119
  488. package/node_modules/zod/src/v4/locales/tr.ts +0 -111
  489. package/node_modules/zod/src/v4/locales/ua.ts +0 -7
  490. package/node_modules/zod/src/v4/locales/uk.ts +0 -117
  491. package/node_modules/zod/src/v4/locales/ur.ts +0 -119
  492. package/node_modules/zod/src/v4/locales/uz.ts +0 -116
  493. package/node_modules/zod/src/v4/locales/vi.ts +0 -117
  494. package/node_modules/zod/src/v4/locales/yo.ts +0 -124
  495. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
  496. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
  497. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  498. package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  499. package/node_modules/zod/src/v4/mini/external.ts +0 -40
  500. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  501. package/node_modules/zod/src/v4/mini/iso.ts +0 -66
  502. package/node_modules/zod/src/v4/mini/parse.ts +0 -14
  503. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1916
  504. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
  505. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  506. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  507. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  508. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -529
  509. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  510. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  511. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
  512. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -963
  513. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  514. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
  515. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  516. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  517. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  518. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -347
  519. package/node_modules/zod/src/v4-mini/index.ts +0 -3
  520. package/node_modules/zod/v3/ZodError.cjs +0 -138
  521. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  522. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  523. package/node_modules/zod/v3/ZodError.js +0 -133
  524. package/node_modules/zod/v3/errors.cjs +0 -17
  525. package/node_modules/zod/v3/errors.d.cts +0 -5
  526. package/node_modules/zod/v3/errors.d.ts +0 -5
  527. package/node_modules/zod/v3/errors.js +0 -9
  528. package/node_modules/zod/v3/external.cjs +0 -22
  529. package/node_modules/zod/v3/external.d.cts +0 -6
  530. package/node_modules/zod/v3/external.d.ts +0 -6
  531. package/node_modules/zod/v3/external.js +0 -6
  532. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  533. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  534. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  535. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  536. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  537. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  538. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  539. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  540. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  541. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  542. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  543. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  544. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  545. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  546. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  547. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  548. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  549. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  550. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  551. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  552. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  553. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  554. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  555. package/node_modules/zod/v3/helpers/util.js +0 -133
  556. package/node_modules/zod/v3/index.cjs +0 -33
  557. package/node_modules/zod/v3/index.d.cts +0 -4
  558. package/node_modules/zod/v3/index.d.ts +0 -4
  559. package/node_modules/zod/v3/index.js +0 -4
  560. package/node_modules/zod/v3/locales/en.cjs +0 -112
  561. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  562. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  563. package/node_modules/zod/v3/locales/en.js +0 -109
  564. package/node_modules/zod/v3/package.json +0 -6
  565. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  566. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  567. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  568. package/node_modules/zod/v3/standard-schema.js +0 -1
  569. package/node_modules/zod/v3/types.cjs +0 -3777
  570. package/node_modules/zod/v3/types.d.cts +0 -1034
  571. package/node_modules/zod/v3/types.d.ts +0 -1034
  572. package/node_modules/zod/v3/types.js +0 -3695
  573. package/node_modules/zod/v4/classic/checks.cjs +0 -33
  574. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  575. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  576. package/node_modules/zod/v4/classic/checks.js +0 -1
  577. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  578. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  579. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  580. package/node_modules/zod/v4/classic/coerce.js +0 -17
  581. package/node_modules/zod/v4/classic/compat.cjs +0 -61
  582. package/node_modules/zod/v4/classic/compat.d.cts +0 -50
  583. package/node_modules/zod/v4/classic/compat.d.ts +0 -50
  584. package/node_modules/zod/v4/classic/compat.js +0 -31
  585. package/node_modules/zod/v4/classic/errors.cjs +0 -74
  586. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  587. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  588. package/node_modules/zod/v4/classic/errors.js +0 -48
  589. package/node_modules/zod/v4/classic/external.cjs +0 -73
  590. package/node_modules/zod/v4/classic/external.d.cts +0 -15
  591. package/node_modules/zod/v4/classic/external.d.ts +0 -15
  592. package/node_modules/zod/v4/classic/external.js +0 -20
  593. package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -610
  594. package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  595. package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  596. package/node_modules/zod/v4/classic/from-json-schema.js +0 -584
  597. package/node_modules/zod/v4/classic/index.cjs +0 -33
  598. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  599. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  600. package/node_modules/zod/v4/classic/index.js +0 -4
  601. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  602. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  603. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  604. package/node_modules/zod/v4/classic/iso.js +0 -30
  605. package/node_modules/zod/v4/classic/package.json +0 -6
  606. package/node_modules/zod/v4/classic/parse.cjs +0 -41
  607. package/node_modules/zod/v4/classic/parse.d.cts +0 -31
  608. package/node_modules/zod/v4/classic/parse.d.ts +0 -31
  609. package/node_modules/zod/v4/classic/parse.js +0 -15
  610. package/node_modules/zod/v4/classic/schemas.cjs +0 -1272
  611. package/node_modules/zod/v4/classic/schemas.d.cts +0 -739
  612. package/node_modules/zod/v4/classic/schemas.d.ts +0 -739
  613. package/node_modules/zod/v4/classic/schemas.js +0 -1157
  614. package/node_modules/zod/v4/core/api.cjs +0 -1222
  615. package/node_modules/zod/v4/core/api.d.cts +0 -304
  616. package/node_modules/zod/v4/core/api.d.ts +0 -304
  617. package/node_modules/zod/v4/core/api.js +0 -1082
  618. package/node_modules/zod/v4/core/checks.cjs +0 -601
  619. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  620. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  621. package/node_modules/zod/v4/core/checks.js +0 -575
  622. package/node_modules/zod/v4/core/core.cjs +0 -83
  623. package/node_modules/zod/v4/core/core.d.cts +0 -70
  624. package/node_modules/zod/v4/core/core.d.ts +0 -70
  625. package/node_modules/zod/v4/core/core.js +0 -76
  626. package/node_modules/zod/v4/core/doc.cjs +0 -39
  627. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  628. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  629. package/node_modules/zod/v4/core/doc.js +0 -35
  630. package/node_modules/zod/v4/core/errors.cjs +0 -213
  631. package/node_modules/zod/v4/core/errors.d.cts +0 -220
  632. package/node_modules/zod/v4/core/errors.d.ts +0 -220
  633. package/node_modules/zod/v4/core/errors.js +0 -182
  634. package/node_modules/zod/v4/core/index.cjs +0 -47
  635. package/node_modules/zod/v4/core/index.d.cts +0 -16
  636. package/node_modules/zod/v4/core/index.d.ts +0 -16
  637. package/node_modules/zod/v4/core/index.js +0 -16
  638. package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
  639. package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  640. package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  641. package/node_modules/zod/v4/core/json-schema-generator.js +0 -95
  642. package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -648
  643. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
  644. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
  645. package/node_modules/zod/v4/core/json-schema-processors.js +0 -605
  646. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  647. package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
  648. package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
  649. package/node_modules/zod/v4/core/json-schema.js +0 -1
  650. package/node_modules/zod/v4/core/package.json +0 -6
  651. package/node_modules/zod/v4/core/parse.cjs +0 -131
  652. package/node_modules/zod/v4/core/parse.d.cts +0 -49
  653. package/node_modules/zod/v4/core/parse.d.ts +0 -49
  654. package/node_modules/zod/v4/core/parse.js +0 -93
  655. package/node_modules/zod/v4/core/regexes.cjs +0 -166
  656. package/node_modules/zod/v4/core/regexes.d.cts +0 -79
  657. package/node_modules/zod/v4/core/regexes.d.ts +0 -79
  658. package/node_modules/zod/v4/core/regexes.js +0 -133
  659. package/node_modules/zod/v4/core/registries.cjs +0 -56
  660. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  661. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  662. package/node_modules/zod/v4/core/registries.js +0 -51
  663. package/node_modules/zod/v4/core/schemas.cjs +0 -2124
  664. package/node_modules/zod/v4/core/schemas.d.cts +0 -1146
  665. package/node_modules/zod/v4/core/schemas.d.ts +0 -1146
  666. package/node_modules/zod/v4/core/schemas.js +0 -2093
  667. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  668. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  669. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  670. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  671. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -446
  672. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
  673. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
  674. package/node_modules/zod/v4/core/to-json-schema.js +0 -437
  675. package/node_modules/zod/v4/core/util.cjs +0 -710
  676. package/node_modules/zod/v4/core/util.d.cts +0 -199
  677. package/node_modules/zod/v4/core/util.d.ts +0 -199
  678. package/node_modules/zod/v4/core/util.js +0 -651
  679. package/node_modules/zod/v4/core/versions.cjs +0 -8
  680. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  681. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  682. package/node_modules/zod/v4/core/versions.js +0 -5
  683. package/node_modules/zod/v4/index.cjs +0 -22
  684. package/node_modules/zod/v4/index.d.cts +0 -3
  685. package/node_modules/zod/v4/index.d.ts +0 -3
  686. package/node_modules/zod/v4/index.js +0 -3
  687. package/node_modules/zod/v4/locales/ar.cjs +0 -133
  688. package/node_modules/zod/v4/locales/ar.d.cts +0 -5
  689. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  690. package/node_modules/zod/v4/locales/ar.js +0 -106
  691. package/node_modules/zod/v4/locales/az.cjs +0 -132
  692. package/node_modules/zod/v4/locales/az.d.cts +0 -5
  693. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  694. package/node_modules/zod/v4/locales/az.js +0 -105
  695. package/node_modules/zod/v4/locales/be.cjs +0 -183
  696. package/node_modules/zod/v4/locales/be.d.cts +0 -5
  697. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  698. package/node_modules/zod/v4/locales/be.js +0 -156
  699. package/node_modules/zod/v4/locales/bg.cjs +0 -147
  700. package/node_modules/zod/v4/locales/bg.d.cts +0 -5
  701. package/node_modules/zod/v4/locales/bg.d.ts +0 -4
  702. package/node_modules/zod/v4/locales/bg.js +0 -120
  703. package/node_modules/zod/v4/locales/ca.cjs +0 -134
  704. package/node_modules/zod/v4/locales/ca.d.cts +0 -5
  705. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  706. package/node_modules/zod/v4/locales/ca.js +0 -107
  707. package/node_modules/zod/v4/locales/cs.cjs +0 -138
  708. package/node_modules/zod/v4/locales/cs.d.cts +0 -5
  709. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  710. package/node_modules/zod/v4/locales/cs.js +0 -111
  711. package/node_modules/zod/v4/locales/da.cjs +0 -142
  712. package/node_modules/zod/v4/locales/da.d.cts +0 -5
  713. package/node_modules/zod/v4/locales/da.d.ts +0 -4
  714. package/node_modules/zod/v4/locales/da.js +0 -115
  715. package/node_modules/zod/v4/locales/de.cjs +0 -135
  716. package/node_modules/zod/v4/locales/de.d.cts +0 -5
  717. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  718. package/node_modules/zod/v4/locales/de.js +0 -108
  719. package/node_modules/zod/v4/locales/en.cjs +0 -136
  720. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  721. package/node_modules/zod/v4/locales/en.d.ts +0 -4
  722. package/node_modules/zod/v4/locales/en.js +0 -109
  723. package/node_modules/zod/v4/locales/eo.cjs +0 -136
  724. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  725. package/node_modules/zod/v4/locales/eo.d.ts +0 -4
  726. package/node_modules/zod/v4/locales/eo.js +0 -109
  727. package/node_modules/zod/v4/locales/es.cjs +0 -159
  728. package/node_modules/zod/v4/locales/es.d.cts +0 -5
  729. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  730. package/node_modules/zod/v4/locales/es.js +0 -132
  731. package/node_modules/zod/v4/locales/fa.cjs +0 -141
  732. package/node_modules/zod/v4/locales/fa.d.cts +0 -5
  733. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  734. package/node_modules/zod/v4/locales/fa.js +0 -114
  735. package/node_modules/zod/v4/locales/fi.cjs +0 -139
  736. package/node_modules/zod/v4/locales/fi.d.cts +0 -5
  737. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  738. package/node_modules/zod/v4/locales/fi.js +0 -112
  739. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
  740. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  741. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  742. package/node_modules/zod/v4/locales/fr-CA.js +0 -107
  743. package/node_modules/zod/v4/locales/fr.cjs +0 -135
  744. package/node_modules/zod/v4/locales/fr.d.cts +0 -5
  745. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  746. package/node_modules/zod/v4/locales/fr.js +0 -108
  747. package/node_modules/zod/v4/locales/he.cjs +0 -241
  748. package/node_modules/zod/v4/locales/he.d.cts +0 -5
  749. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  750. package/node_modules/zod/v4/locales/he.js +0 -214
  751. package/node_modules/zod/v4/locales/hu.cjs +0 -135
  752. package/node_modules/zod/v4/locales/hu.d.cts +0 -5
  753. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  754. package/node_modules/zod/v4/locales/hu.js +0 -108
  755. package/node_modules/zod/v4/locales/hy.cjs +0 -174
  756. package/node_modules/zod/v4/locales/hy.d.cts +0 -5
  757. package/node_modules/zod/v4/locales/hy.d.ts +0 -4
  758. package/node_modules/zod/v4/locales/hy.js +0 -147
  759. package/node_modules/zod/v4/locales/id.cjs +0 -133
  760. package/node_modules/zod/v4/locales/id.d.cts +0 -5
  761. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  762. package/node_modules/zod/v4/locales/id.js +0 -106
  763. package/node_modules/zod/v4/locales/index.cjs +0 -104
  764. package/node_modules/zod/v4/locales/index.d.cts +0 -49
  765. package/node_modules/zod/v4/locales/index.d.ts +0 -49
  766. package/node_modules/zod/v4/locales/index.js +0 -49
  767. package/node_modules/zod/v4/locales/is.cjs +0 -136
  768. package/node_modules/zod/v4/locales/is.d.cts +0 -5
  769. package/node_modules/zod/v4/locales/is.d.ts +0 -4
  770. package/node_modules/zod/v4/locales/is.js +0 -109
  771. package/node_modules/zod/v4/locales/it.cjs +0 -135
  772. package/node_modules/zod/v4/locales/it.d.cts +0 -5
  773. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  774. package/node_modules/zod/v4/locales/it.js +0 -108
  775. package/node_modules/zod/v4/locales/ja.cjs +0 -134
  776. package/node_modules/zod/v4/locales/ja.d.cts +0 -5
  777. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  778. package/node_modules/zod/v4/locales/ja.js +0 -107
  779. package/node_modules/zod/v4/locales/ka.cjs +0 -139
  780. package/node_modules/zod/v4/locales/ka.d.cts +0 -5
  781. package/node_modules/zod/v4/locales/ka.d.ts +0 -4
  782. package/node_modules/zod/v4/locales/ka.js +0 -112
  783. package/node_modules/zod/v4/locales/kh.cjs +0 -12
  784. package/node_modules/zod/v4/locales/kh.d.cts +0 -5
  785. package/node_modules/zod/v4/locales/kh.d.ts +0 -5
  786. package/node_modules/zod/v4/locales/kh.js +0 -5
  787. package/node_modules/zod/v4/locales/km.cjs +0 -137
  788. package/node_modules/zod/v4/locales/km.d.cts +0 -5
  789. package/node_modules/zod/v4/locales/km.d.ts +0 -4
  790. package/node_modules/zod/v4/locales/km.js +0 -110
  791. package/node_modules/zod/v4/locales/ko.cjs +0 -138
  792. package/node_modules/zod/v4/locales/ko.d.cts +0 -5
  793. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  794. package/node_modules/zod/v4/locales/ko.js +0 -111
  795. package/node_modules/zod/v4/locales/lt.cjs +0 -230
  796. package/node_modules/zod/v4/locales/lt.d.cts +0 -5
  797. package/node_modules/zod/v4/locales/lt.d.ts +0 -4
  798. package/node_modules/zod/v4/locales/lt.js +0 -203
  799. package/node_modules/zod/v4/locales/mk.cjs +0 -136
  800. package/node_modules/zod/v4/locales/mk.d.cts +0 -5
  801. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  802. package/node_modules/zod/v4/locales/mk.js +0 -109
  803. package/node_modules/zod/v4/locales/ms.cjs +0 -134
  804. package/node_modules/zod/v4/locales/ms.d.cts +0 -5
  805. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  806. package/node_modules/zod/v4/locales/ms.js +0 -107
  807. package/node_modules/zod/v4/locales/nl.cjs +0 -137
  808. package/node_modules/zod/v4/locales/nl.d.cts +0 -5
  809. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  810. package/node_modules/zod/v4/locales/nl.js +0 -110
  811. package/node_modules/zod/v4/locales/no.cjs +0 -135
  812. package/node_modules/zod/v4/locales/no.d.cts +0 -5
  813. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  814. package/node_modules/zod/v4/locales/no.js +0 -108
  815. package/node_modules/zod/v4/locales/ota.cjs +0 -136
  816. package/node_modules/zod/v4/locales/ota.d.cts +0 -5
  817. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  818. package/node_modules/zod/v4/locales/ota.js +0 -109
  819. package/node_modules/zod/v4/locales/package.json +0 -6
  820. package/node_modules/zod/v4/locales/pl.cjs +0 -136
  821. package/node_modules/zod/v4/locales/pl.d.cts +0 -5
  822. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  823. package/node_modules/zod/v4/locales/pl.js +0 -109
  824. package/node_modules/zod/v4/locales/ps.cjs +0 -141
  825. package/node_modules/zod/v4/locales/ps.d.cts +0 -5
  826. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  827. package/node_modules/zod/v4/locales/ps.js +0 -114
  828. package/node_modules/zod/v4/locales/pt.cjs +0 -135
  829. package/node_modules/zod/v4/locales/pt.d.cts +0 -5
  830. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  831. package/node_modules/zod/v4/locales/pt.js +0 -108
  832. package/node_modules/zod/v4/locales/ru.cjs +0 -183
  833. package/node_modules/zod/v4/locales/ru.d.cts +0 -5
  834. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  835. package/node_modules/zod/v4/locales/ru.js +0 -156
  836. package/node_modules/zod/v4/locales/sl.cjs +0 -136
  837. package/node_modules/zod/v4/locales/sl.d.cts +0 -5
  838. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  839. package/node_modules/zod/v4/locales/sl.js +0 -109
  840. package/node_modules/zod/v4/locales/sv.cjs +0 -137
  841. package/node_modules/zod/v4/locales/sv.d.cts +0 -5
  842. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  843. package/node_modules/zod/v4/locales/sv.js +0 -110
  844. package/node_modules/zod/v4/locales/ta.cjs +0 -137
  845. package/node_modules/zod/v4/locales/ta.d.cts +0 -5
  846. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  847. package/node_modules/zod/v4/locales/ta.js +0 -110
  848. package/node_modules/zod/v4/locales/th.cjs +0 -137
  849. package/node_modules/zod/v4/locales/th.d.cts +0 -5
  850. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  851. package/node_modules/zod/v4/locales/th.js +0 -110
  852. package/node_modules/zod/v4/locales/tr.cjs +0 -132
  853. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  854. package/node_modules/zod/v4/locales/tr.d.ts +0 -4
  855. package/node_modules/zod/v4/locales/tr.js +0 -105
  856. package/node_modules/zod/v4/locales/ua.cjs +0 -12
  857. package/node_modules/zod/v4/locales/ua.d.cts +0 -5
  858. package/node_modules/zod/v4/locales/ua.d.ts +0 -5
  859. package/node_modules/zod/v4/locales/ua.js +0 -5
  860. package/node_modules/zod/v4/locales/uk.cjs +0 -135
  861. package/node_modules/zod/v4/locales/uk.d.cts +0 -5
  862. package/node_modules/zod/v4/locales/uk.d.ts +0 -4
  863. package/node_modules/zod/v4/locales/uk.js +0 -108
  864. package/node_modules/zod/v4/locales/ur.cjs +0 -137
  865. package/node_modules/zod/v4/locales/ur.d.cts +0 -5
  866. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  867. package/node_modules/zod/v4/locales/ur.js +0 -110
  868. package/node_modules/zod/v4/locales/uz.cjs +0 -136
  869. package/node_modules/zod/v4/locales/uz.d.cts +0 -5
  870. package/node_modules/zod/v4/locales/uz.d.ts +0 -4
  871. package/node_modules/zod/v4/locales/uz.js +0 -109
  872. package/node_modules/zod/v4/locales/vi.cjs +0 -135
  873. package/node_modules/zod/v4/locales/vi.d.cts +0 -5
  874. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  875. package/node_modules/zod/v4/locales/vi.js +0 -108
  876. package/node_modules/zod/v4/locales/yo.cjs +0 -134
  877. package/node_modules/zod/v4/locales/yo.d.cts +0 -5
  878. package/node_modules/zod/v4/locales/yo.d.ts +0 -4
  879. package/node_modules/zod/v4/locales/yo.js +0 -107
  880. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
  881. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  882. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  883. package/node_modules/zod/v4/locales/zh-CN.js +0 -109
  884. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
  885. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  886. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  887. package/node_modules/zod/v4/locales/zh-TW.js +0 -107
  888. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  889. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  890. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  891. package/node_modules/zod/v4/mini/checks.js +0 -1
  892. package/node_modules/zod/v4/mini/coerce.cjs +0 -52
  893. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  894. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  895. package/node_modules/zod/v4/mini/coerce.js +0 -22
  896. package/node_modules/zod/v4/mini/external.cjs +0 -63
  897. package/node_modules/zod/v4/mini/external.d.cts +0 -12
  898. package/node_modules/zod/v4/mini/external.d.ts +0 -12
  899. package/node_modules/zod/v4/mini/external.js +0 -14
  900. package/node_modules/zod/v4/mini/index.cjs +0 -32
  901. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  902. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  903. package/node_modules/zod/v4/mini/index.js +0 -3
  904. package/node_modules/zod/v4/mini/iso.cjs +0 -64
  905. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  906. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  907. package/node_modules/zod/v4/mini/iso.js +0 -34
  908. package/node_modules/zod/v4/mini/package.json +0 -6
  909. package/node_modules/zod/v4/mini/parse.cjs +0 -16
  910. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  911. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  912. package/node_modules/zod/v4/mini/parse.js +0 -1
  913. package/node_modules/zod/v4/mini/schemas.cjs +0 -1046
  914. package/node_modules/zod/v4/mini/schemas.d.cts +0 -427
  915. package/node_modules/zod/v4/mini/schemas.d.ts +0 -427
  916. package/node_modules/zod/v4/mini/schemas.js +0 -925
  917. package/node_modules/zod/v4/package.json +0 -6
  918. package/node_modules/zod/v4-mini/index.cjs +0 -32
  919. package/node_modules/zod/v4-mini/index.d.cts +0 -3
  920. package/node_modules/zod/v4-mini/index.d.ts +0 -3
  921. package/node_modules/zod/v4-mini/index.js +0 -3
  922. package/node_modules/zod/v4-mini/package.json +0 -6
  923. package/plugin/dist/index.d.ts +0 -208
  924. package/plugin/dist/index.d.ts.map +0 -1
  925. package/plugin/dist/index.js +0 -3474
  926. package/plugin/dist/index.js.map +0 -1
@@ -1,2093 +0,0 @@
1
- import * as checks from "./checks.js";
2
- import * as core from "./core.js";
3
- import { Doc } from "./doc.js";
4
- import { parse, parseAsync, safeParse, safeParseAsync } from "./parse.js";
5
- import * as regexes from "./regexes.js";
6
- import * as util from "./util.js";
7
- import { version } from "./versions.js";
8
- export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
9
- var _a;
10
- inst ?? (inst = {});
11
- inst._zod.def = def; // set _def property
12
- inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
13
- inst._zod.version = version;
14
- const checks = [...(inst._zod.def.checks ?? [])];
15
- // if inst is itself a checks.$ZodCheck, run it as a check
16
- if (inst._zod.traits.has("$ZodCheck")) {
17
- checks.unshift(inst);
18
- }
19
- for (const ch of checks) {
20
- for (const fn of ch._zod.onattach) {
21
- fn(inst);
22
- }
23
- }
24
- if (checks.length === 0) {
25
- // deferred initializer
26
- // inst._zod.parse is not yet defined
27
- (_a = inst._zod).deferred ?? (_a.deferred = []);
28
- inst._zod.deferred?.push(() => {
29
- inst._zod.run = inst._zod.parse;
30
- });
31
- }
32
- else {
33
- const runChecks = (payload, checks, ctx) => {
34
- let isAborted = util.aborted(payload);
35
- let asyncResult;
36
- for (const ch of checks) {
37
- if (ch._zod.def.when) {
38
- const shouldRun = ch._zod.def.when(payload);
39
- if (!shouldRun)
40
- continue;
41
- }
42
- else if (isAborted) {
43
- continue;
44
- }
45
- const currLen = payload.issues.length;
46
- const _ = ch._zod.check(payload);
47
- if (_ instanceof Promise && ctx?.async === false) {
48
- throw new core.$ZodAsyncError();
49
- }
50
- if (asyncResult || _ instanceof Promise) {
51
- asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
52
- await _;
53
- const nextLen = payload.issues.length;
54
- if (nextLen === currLen)
55
- return;
56
- if (!isAborted)
57
- isAborted = util.aborted(payload, currLen);
58
- });
59
- }
60
- else {
61
- const nextLen = payload.issues.length;
62
- if (nextLen === currLen)
63
- continue;
64
- if (!isAborted)
65
- isAborted = util.aborted(payload, currLen);
66
- }
67
- }
68
- if (asyncResult) {
69
- return asyncResult.then(() => {
70
- return payload;
71
- });
72
- }
73
- return payload;
74
- };
75
- const handleCanaryResult = (canary, payload, ctx) => {
76
- // abort if the canary is aborted
77
- if (util.aborted(canary)) {
78
- canary.aborted = true;
79
- return canary;
80
- }
81
- // run checks first, then
82
- const checkResult = runChecks(payload, checks, ctx);
83
- if (checkResult instanceof Promise) {
84
- if (ctx.async === false)
85
- throw new core.$ZodAsyncError();
86
- return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
87
- }
88
- return inst._zod.parse(checkResult, ctx);
89
- };
90
- inst._zod.run = (payload, ctx) => {
91
- if (ctx.skipChecks) {
92
- return inst._zod.parse(payload, ctx);
93
- }
94
- if (ctx.direction === "backward") {
95
- // run canary
96
- // initial pass (no checks)
97
- const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
98
- if (canary instanceof Promise) {
99
- return canary.then((canary) => {
100
- return handleCanaryResult(canary, payload, ctx);
101
- });
102
- }
103
- return handleCanaryResult(canary, payload, ctx);
104
- }
105
- // forward
106
- const result = inst._zod.parse(payload, ctx);
107
- if (result instanceof Promise) {
108
- if (ctx.async === false)
109
- throw new core.$ZodAsyncError();
110
- return result.then((result) => runChecks(result, checks, ctx));
111
- }
112
- return runChecks(result, checks, ctx);
113
- };
114
- }
115
- // Lazy initialize ~standard to avoid creating objects for every schema
116
- util.defineLazy(inst, "~standard", () => ({
117
- validate: (value) => {
118
- try {
119
- const r = safeParse(inst, value);
120
- return r.success ? { value: r.data } : { issues: r.error?.issues };
121
- }
122
- catch (_) {
123
- return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));
124
- }
125
- },
126
- vendor: "zod",
127
- version: 1,
128
- }));
129
- });
130
- export { clone } from "./util.js";
131
- export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
132
- $ZodType.init(inst, def);
133
- inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);
134
- inst._zod.parse = (payload, _) => {
135
- if (def.coerce)
136
- try {
137
- payload.value = String(payload.value);
138
- }
139
- catch (_) { }
140
- if (typeof payload.value === "string")
141
- return payload;
142
- payload.issues.push({
143
- expected: "string",
144
- code: "invalid_type",
145
- input: payload.value,
146
- inst,
147
- });
148
- return payload;
149
- };
150
- });
151
- export const $ZodStringFormat = /*@__PURE__*/ core.$constructor("$ZodStringFormat", (inst, def) => {
152
- // check initialization must come first
153
- checks.$ZodCheckStringFormat.init(inst, def);
154
- $ZodString.init(inst, def);
155
- });
156
- export const $ZodGUID = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def) => {
157
- def.pattern ?? (def.pattern = regexes.guid);
158
- $ZodStringFormat.init(inst, def);
159
- });
160
- export const $ZodUUID = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def) => {
161
- if (def.version) {
162
- const versionMap = {
163
- v1: 1,
164
- v2: 2,
165
- v3: 3,
166
- v4: 4,
167
- v5: 5,
168
- v6: 6,
169
- v7: 7,
170
- v8: 8,
171
- };
172
- const v = versionMap[def.version];
173
- if (v === undefined)
174
- throw new Error(`Invalid UUID version: "${def.version}"`);
175
- def.pattern ?? (def.pattern = regexes.uuid(v));
176
- }
177
- else
178
- def.pattern ?? (def.pattern = regexes.uuid());
179
- $ZodStringFormat.init(inst, def);
180
- });
181
- export const $ZodEmail = /*@__PURE__*/ core.$constructor("$ZodEmail", (inst, def) => {
182
- def.pattern ?? (def.pattern = regexes.email);
183
- $ZodStringFormat.init(inst, def);
184
- });
185
- export const $ZodURL = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
186
- $ZodStringFormat.init(inst, def);
187
- inst._zod.check = (payload) => {
188
- try {
189
- // Trim whitespace from input
190
- const trimmed = payload.value.trim();
191
- // @ts-ignore
192
- const url = new URL(trimmed);
193
- if (def.hostname) {
194
- def.hostname.lastIndex = 0;
195
- if (!def.hostname.test(url.hostname)) {
196
- payload.issues.push({
197
- code: "invalid_format",
198
- format: "url",
199
- note: "Invalid hostname",
200
- pattern: def.hostname.source,
201
- input: payload.value,
202
- inst,
203
- continue: !def.abort,
204
- });
205
- }
206
- }
207
- if (def.protocol) {
208
- def.protocol.lastIndex = 0;
209
- if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
210
- payload.issues.push({
211
- code: "invalid_format",
212
- format: "url",
213
- note: "Invalid protocol",
214
- pattern: def.protocol.source,
215
- input: payload.value,
216
- inst,
217
- continue: !def.abort,
218
- });
219
- }
220
- }
221
- // Set the output value based on normalize flag
222
- if (def.normalize) {
223
- // Use normalized URL
224
- payload.value = url.href;
225
- }
226
- else {
227
- // Preserve the original input (trimmed)
228
- payload.value = trimmed;
229
- }
230
- return;
231
- }
232
- catch (_) {
233
- payload.issues.push({
234
- code: "invalid_format",
235
- format: "url",
236
- input: payload.value,
237
- inst,
238
- continue: !def.abort,
239
- });
240
- }
241
- };
242
- });
243
- export const $ZodEmoji = /*@__PURE__*/ core.$constructor("$ZodEmoji", (inst, def) => {
244
- def.pattern ?? (def.pattern = regexes.emoji());
245
- $ZodStringFormat.init(inst, def);
246
- });
247
- export const $ZodNanoID = /*@__PURE__*/ core.$constructor("$ZodNanoID", (inst, def) => {
248
- def.pattern ?? (def.pattern = regexes.nanoid);
249
- $ZodStringFormat.init(inst, def);
250
- });
251
- export const $ZodCUID = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def) => {
252
- def.pattern ?? (def.pattern = regexes.cuid);
253
- $ZodStringFormat.init(inst, def);
254
- });
255
- export const $ZodCUID2 = /*@__PURE__*/ core.$constructor("$ZodCUID2", (inst, def) => {
256
- def.pattern ?? (def.pattern = regexes.cuid2);
257
- $ZodStringFormat.init(inst, def);
258
- });
259
- export const $ZodULID = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def) => {
260
- def.pattern ?? (def.pattern = regexes.ulid);
261
- $ZodStringFormat.init(inst, def);
262
- });
263
- export const $ZodXID = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def) => {
264
- def.pattern ?? (def.pattern = regexes.xid);
265
- $ZodStringFormat.init(inst, def);
266
- });
267
- export const $ZodKSUID = /*@__PURE__*/ core.$constructor("$ZodKSUID", (inst, def) => {
268
- def.pattern ?? (def.pattern = regexes.ksuid);
269
- $ZodStringFormat.init(inst, def);
270
- });
271
- export const $ZodISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
272
- def.pattern ?? (def.pattern = regexes.datetime(def));
273
- $ZodStringFormat.init(inst, def);
274
- });
275
- export const $ZodISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
276
- def.pattern ?? (def.pattern = regexes.date);
277
- $ZodStringFormat.init(inst, def);
278
- });
279
- export const $ZodISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
280
- def.pattern ?? (def.pattern = regexes.time(def));
281
- $ZodStringFormat.init(inst, def);
282
- });
283
- export const $ZodISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
284
- def.pattern ?? (def.pattern = regexes.duration);
285
- $ZodStringFormat.init(inst, def);
286
- });
287
- export const $ZodIPv4 = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def) => {
288
- def.pattern ?? (def.pattern = regexes.ipv4);
289
- $ZodStringFormat.init(inst, def);
290
- inst._zod.bag.format = `ipv4`;
291
- });
292
- export const $ZodIPv6 = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def) => {
293
- def.pattern ?? (def.pattern = regexes.ipv6);
294
- $ZodStringFormat.init(inst, def);
295
- inst._zod.bag.format = `ipv6`;
296
- inst._zod.check = (payload) => {
297
- try {
298
- // @ts-ignore
299
- new URL(`http://[${payload.value}]`);
300
- // return;
301
- }
302
- catch {
303
- payload.issues.push({
304
- code: "invalid_format",
305
- format: "ipv6",
306
- input: payload.value,
307
- inst,
308
- continue: !def.abort,
309
- });
310
- }
311
- };
312
- });
313
- export const $ZodMAC = /*@__PURE__*/ core.$constructor("$ZodMAC", (inst, def) => {
314
- def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
315
- $ZodStringFormat.init(inst, def);
316
- inst._zod.bag.format = `mac`;
317
- });
318
- export const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor("$ZodCIDRv4", (inst, def) => {
319
- def.pattern ?? (def.pattern = regexes.cidrv4);
320
- $ZodStringFormat.init(inst, def);
321
- });
322
- export const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor("$ZodCIDRv6", (inst, def) => {
323
- def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
324
- $ZodStringFormat.init(inst, def);
325
- inst._zod.check = (payload) => {
326
- const parts = payload.value.split("/");
327
- try {
328
- if (parts.length !== 2)
329
- throw new Error();
330
- const [address, prefix] = parts;
331
- if (!prefix)
332
- throw new Error();
333
- const prefixNum = Number(prefix);
334
- if (`${prefixNum}` !== prefix)
335
- throw new Error();
336
- if (prefixNum < 0 || prefixNum > 128)
337
- throw new Error();
338
- // @ts-ignore
339
- new URL(`http://[${address}]`);
340
- }
341
- catch {
342
- payload.issues.push({
343
- code: "invalid_format",
344
- format: "cidrv6",
345
- input: payload.value,
346
- inst,
347
- continue: !def.abort,
348
- });
349
- }
350
- };
351
- });
352
- ////////////////////////////// ZodBase64 //////////////////////////////
353
- export function isValidBase64(data) {
354
- if (data === "")
355
- return true;
356
- if (data.length % 4 !== 0)
357
- return false;
358
- try {
359
- // @ts-ignore
360
- atob(data);
361
- return true;
362
- }
363
- catch {
364
- return false;
365
- }
366
- }
367
- export const $ZodBase64 = /*@__PURE__*/ core.$constructor("$ZodBase64", (inst, def) => {
368
- def.pattern ?? (def.pattern = regexes.base64);
369
- $ZodStringFormat.init(inst, def);
370
- inst._zod.bag.contentEncoding = "base64";
371
- inst._zod.check = (payload) => {
372
- if (isValidBase64(payload.value))
373
- return;
374
- payload.issues.push({
375
- code: "invalid_format",
376
- format: "base64",
377
- input: payload.value,
378
- inst,
379
- continue: !def.abort,
380
- });
381
- };
382
- });
383
- ////////////////////////////// ZodBase64 //////////////////////////////
384
- export function isValidBase64URL(data) {
385
- if (!regexes.base64url.test(data))
386
- return false;
387
- const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
388
- const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
389
- return isValidBase64(padded);
390
- }
391
- export const $ZodBase64URL = /*@__PURE__*/ core.$constructor("$ZodBase64URL", (inst, def) => {
392
- def.pattern ?? (def.pattern = regexes.base64url);
393
- $ZodStringFormat.init(inst, def);
394
- inst._zod.bag.contentEncoding = "base64url";
395
- inst._zod.check = (payload) => {
396
- if (isValidBase64URL(payload.value))
397
- return;
398
- payload.issues.push({
399
- code: "invalid_format",
400
- format: "base64url",
401
- input: payload.value,
402
- inst,
403
- continue: !def.abort,
404
- });
405
- };
406
- });
407
- export const $ZodE164 = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def) => {
408
- def.pattern ?? (def.pattern = regexes.e164);
409
- $ZodStringFormat.init(inst, def);
410
- });
411
- ////////////////////////////// ZodJWT //////////////////////////////
412
- export function isValidJWT(token, algorithm = null) {
413
- try {
414
- const tokensParts = token.split(".");
415
- if (tokensParts.length !== 3)
416
- return false;
417
- const [header] = tokensParts;
418
- if (!header)
419
- return false;
420
- // @ts-ignore
421
- const parsedHeader = JSON.parse(atob(header));
422
- if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
423
- return false;
424
- if (!parsedHeader.alg)
425
- return false;
426
- if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
427
- return false;
428
- return true;
429
- }
430
- catch {
431
- return false;
432
- }
433
- }
434
- export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) => {
435
- $ZodStringFormat.init(inst, def);
436
- inst._zod.check = (payload) => {
437
- if (isValidJWT(payload.value, def.alg))
438
- return;
439
- payload.issues.push({
440
- code: "invalid_format",
441
- format: "jwt",
442
- input: payload.value,
443
- inst,
444
- continue: !def.abort,
445
- });
446
- };
447
- });
448
- export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
449
- $ZodStringFormat.init(inst, def);
450
- inst._zod.check = (payload) => {
451
- if (def.fn(payload.value))
452
- return;
453
- payload.issues.push({
454
- code: "invalid_format",
455
- format: def.format,
456
- input: payload.value,
457
- inst,
458
- continue: !def.abort,
459
- });
460
- };
461
- });
462
- export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
463
- $ZodType.init(inst, def);
464
- inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
465
- inst._zod.parse = (payload, _ctx) => {
466
- if (def.coerce)
467
- try {
468
- payload.value = Number(payload.value);
469
- }
470
- catch (_) { }
471
- const input = payload.value;
472
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
473
- return payload;
474
- }
475
- const received = typeof input === "number"
476
- ? Number.isNaN(input)
477
- ? "NaN"
478
- : !Number.isFinite(input)
479
- ? "Infinity"
480
- : undefined
481
- : undefined;
482
- payload.issues.push({
483
- expected: "number",
484
- code: "invalid_type",
485
- input,
486
- inst,
487
- ...(received ? { received } : {}),
488
- });
489
- return payload;
490
- };
491
- });
492
- export const $ZodNumberFormat = /*@__PURE__*/ core.$constructor("$ZodNumberFormat", (inst, def) => {
493
- checks.$ZodCheckNumberFormat.init(inst, def);
494
- $ZodNumber.init(inst, def); // no format checks
495
- });
496
- export const $ZodBoolean = /*@__PURE__*/ core.$constructor("$ZodBoolean", (inst, def) => {
497
- $ZodType.init(inst, def);
498
- inst._zod.pattern = regexes.boolean;
499
- inst._zod.parse = (payload, _ctx) => {
500
- if (def.coerce)
501
- try {
502
- payload.value = Boolean(payload.value);
503
- }
504
- catch (_) { }
505
- const input = payload.value;
506
- if (typeof input === "boolean")
507
- return payload;
508
- payload.issues.push({
509
- expected: "boolean",
510
- code: "invalid_type",
511
- input,
512
- inst,
513
- });
514
- return payload;
515
- };
516
- });
517
- export const $ZodBigInt = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
518
- $ZodType.init(inst, def);
519
- inst._zod.pattern = regexes.bigint;
520
- inst._zod.parse = (payload, _ctx) => {
521
- if (def.coerce)
522
- try {
523
- payload.value = BigInt(payload.value);
524
- }
525
- catch (_) { }
526
- if (typeof payload.value === "bigint")
527
- return payload;
528
- payload.issues.push({
529
- expected: "bigint",
530
- code: "invalid_type",
531
- input: payload.value,
532
- inst,
533
- });
534
- return payload;
535
- };
536
- });
537
- export const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodBigIntFormat", (inst, def) => {
538
- checks.$ZodCheckBigIntFormat.init(inst, def);
539
- $ZodBigInt.init(inst, def); // no format checks
540
- });
541
- export const $ZodSymbol = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
542
- $ZodType.init(inst, def);
543
- inst._zod.parse = (payload, _ctx) => {
544
- const input = payload.value;
545
- if (typeof input === "symbol")
546
- return payload;
547
- payload.issues.push({
548
- expected: "symbol",
549
- code: "invalid_type",
550
- input,
551
- inst,
552
- });
553
- return payload;
554
- };
555
- });
556
- export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (inst, def) => {
557
- $ZodType.init(inst, def);
558
- inst._zod.pattern = regexes.undefined;
559
- inst._zod.values = new Set([undefined]);
560
- inst._zod.optin = "optional";
561
- inst._zod.optout = "optional";
562
- inst._zod.parse = (payload, _ctx) => {
563
- const input = payload.value;
564
- if (typeof input === "undefined")
565
- return payload;
566
- payload.issues.push({
567
- expected: "undefined",
568
- code: "invalid_type",
569
- input,
570
- inst,
571
- });
572
- return payload;
573
- };
574
- });
575
- export const $ZodNull = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
576
- $ZodType.init(inst, def);
577
- inst._zod.pattern = regexes.null;
578
- inst._zod.values = new Set([null]);
579
- inst._zod.parse = (payload, _ctx) => {
580
- const input = payload.value;
581
- if (input === null)
582
- return payload;
583
- payload.issues.push({
584
- expected: "null",
585
- code: "invalid_type",
586
- input,
587
- inst,
588
- });
589
- return payload;
590
- };
591
- });
592
- export const $ZodAny = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
593
- $ZodType.init(inst, def);
594
- inst._zod.parse = (payload) => payload;
595
- });
596
- export const $ZodUnknown = /*@__PURE__*/ core.$constructor("$ZodUnknown", (inst, def) => {
597
- $ZodType.init(inst, def);
598
- inst._zod.parse = (payload) => payload;
599
- });
600
- export const $ZodNever = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
601
- $ZodType.init(inst, def);
602
- inst._zod.parse = (payload, _ctx) => {
603
- payload.issues.push({
604
- expected: "never",
605
- code: "invalid_type",
606
- input: payload.value,
607
- inst,
608
- });
609
- return payload;
610
- };
611
- });
612
- export const $ZodVoid = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
613
- $ZodType.init(inst, def);
614
- inst._zod.parse = (payload, _ctx) => {
615
- const input = payload.value;
616
- if (typeof input === "undefined")
617
- return payload;
618
- payload.issues.push({
619
- expected: "void",
620
- code: "invalid_type",
621
- input,
622
- inst,
623
- });
624
- return payload;
625
- };
626
- });
627
- export const $ZodDate = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
628
- $ZodType.init(inst, def);
629
- inst._zod.parse = (payload, _ctx) => {
630
- if (def.coerce) {
631
- try {
632
- payload.value = new Date(payload.value);
633
- }
634
- catch (_err) { }
635
- }
636
- const input = payload.value;
637
- const isDate = input instanceof Date;
638
- const isValidDate = isDate && !Number.isNaN(input.getTime());
639
- if (isValidDate)
640
- return payload;
641
- payload.issues.push({
642
- expected: "date",
643
- code: "invalid_type",
644
- input,
645
- ...(isDate ? { received: "Invalid Date" } : {}),
646
- inst,
647
- });
648
- return payload;
649
- };
650
- });
651
- function handleArrayResult(result, final, index) {
652
- if (result.issues.length) {
653
- final.issues.push(...util.prefixIssues(index, result.issues));
654
- }
655
- final.value[index] = result.value;
656
- }
657
- export const $ZodArray = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
658
- $ZodType.init(inst, def);
659
- inst._zod.parse = (payload, ctx) => {
660
- const input = payload.value;
661
- if (!Array.isArray(input)) {
662
- payload.issues.push({
663
- expected: "array",
664
- code: "invalid_type",
665
- input,
666
- inst,
667
- });
668
- return payload;
669
- }
670
- payload.value = Array(input.length);
671
- const proms = [];
672
- for (let i = 0; i < input.length; i++) {
673
- const item = input[i];
674
- const result = def.element._zod.run({
675
- value: item,
676
- issues: [],
677
- }, ctx);
678
- if (result instanceof Promise) {
679
- proms.push(result.then((result) => handleArrayResult(result, payload, i)));
680
- }
681
- else {
682
- handleArrayResult(result, payload, i);
683
- }
684
- }
685
- if (proms.length) {
686
- return Promise.all(proms).then(() => payload);
687
- }
688
- return payload; //handleArrayResultsAsync(parseResults, final);
689
- };
690
- });
691
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
692
- if (result.issues.length) {
693
- // For optional-out schemas, ignore errors on absent keys
694
- if (isOptionalOut && !(key in input)) {
695
- return;
696
- }
697
- final.issues.push(...util.prefixIssues(key, result.issues));
698
- }
699
- if (result.value === undefined) {
700
- if (key in input) {
701
- final.value[key] = undefined;
702
- }
703
- }
704
- else {
705
- final.value[key] = result.value;
706
- }
707
- }
708
- function normalizeDef(def) {
709
- const keys = Object.keys(def.shape);
710
- for (const k of keys) {
711
- if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
712
- throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
713
- }
714
- }
715
- const okeys = util.optionalKeys(def.shape);
716
- return {
717
- ...def,
718
- keys,
719
- keySet: new Set(keys),
720
- numKeys: keys.length,
721
- optionalKeys: new Set(okeys),
722
- };
723
- }
724
- function handleCatchall(proms, input, payload, ctx, def, inst) {
725
- const unrecognized = [];
726
- // iterate over input keys
727
- const keySet = def.keySet;
728
- const _catchall = def.catchall._zod;
729
- const t = _catchall.def.type;
730
- const isOptionalOut = _catchall.optout === "optional";
731
- for (const key in input) {
732
- if (keySet.has(key))
733
- continue;
734
- if (t === "never") {
735
- unrecognized.push(key);
736
- continue;
737
- }
738
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
739
- if (r instanceof Promise) {
740
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
741
- }
742
- else {
743
- handlePropertyResult(r, payload, key, input, isOptionalOut);
744
- }
745
- }
746
- if (unrecognized.length) {
747
- payload.issues.push({
748
- code: "unrecognized_keys",
749
- keys: unrecognized,
750
- input,
751
- inst,
752
- });
753
- }
754
- if (!proms.length)
755
- return payload;
756
- return Promise.all(proms).then(() => {
757
- return payload;
758
- });
759
- }
760
- export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
761
- // requires cast because technically $ZodObject doesn't extend
762
- $ZodType.init(inst, def);
763
- // const sh = def.shape;
764
- const desc = Object.getOwnPropertyDescriptor(def, "shape");
765
- if (!desc?.get) {
766
- const sh = def.shape;
767
- Object.defineProperty(def, "shape", {
768
- get: () => {
769
- const newSh = { ...sh };
770
- Object.defineProperty(def, "shape", {
771
- value: newSh,
772
- });
773
- return newSh;
774
- },
775
- });
776
- }
777
- const _normalized = util.cached(() => normalizeDef(def));
778
- util.defineLazy(inst._zod, "propValues", () => {
779
- const shape = def.shape;
780
- const propValues = {};
781
- for (const key in shape) {
782
- const field = shape[key]._zod;
783
- if (field.values) {
784
- propValues[key] ?? (propValues[key] = new Set());
785
- for (const v of field.values)
786
- propValues[key].add(v);
787
- }
788
- }
789
- return propValues;
790
- });
791
- const isObject = util.isObject;
792
- const catchall = def.catchall;
793
- let value;
794
- inst._zod.parse = (payload, ctx) => {
795
- value ?? (value = _normalized.value);
796
- const input = payload.value;
797
- if (!isObject(input)) {
798
- payload.issues.push({
799
- expected: "object",
800
- code: "invalid_type",
801
- input,
802
- inst,
803
- });
804
- return payload;
805
- }
806
- payload.value = {};
807
- const proms = [];
808
- const shape = value.shape;
809
- for (const key of value.keys) {
810
- const el = shape[key];
811
- const isOptionalOut = el._zod.optout === "optional";
812
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
813
- if (r instanceof Promise) {
814
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
815
- }
816
- else {
817
- handlePropertyResult(r, payload, key, input, isOptionalOut);
818
- }
819
- }
820
- if (!catchall) {
821
- return proms.length ? Promise.all(proms).then(() => payload) : payload;
822
- }
823
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
824
- };
825
- });
826
- export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (inst, def) => {
827
- // requires cast because technically $ZodObject doesn't extend
828
- $ZodObject.init(inst, def);
829
- const superParse = inst._zod.parse;
830
- const _normalized = util.cached(() => normalizeDef(def));
831
- const generateFastpass = (shape) => {
832
- const doc = new Doc(["shape", "payload", "ctx"]);
833
- const normalized = _normalized.value;
834
- const parseStr = (key) => {
835
- const k = util.esc(key);
836
- return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
837
- };
838
- doc.write(`const input = payload.value;`);
839
- const ids = Object.create(null);
840
- let counter = 0;
841
- for (const key of normalized.keys) {
842
- ids[key] = `key_${counter++}`;
843
- }
844
- // A: preserve key order {
845
- doc.write(`const newResult = {};`);
846
- for (const key of normalized.keys) {
847
- const id = ids[key];
848
- const k = util.esc(key);
849
- const schema = shape[key];
850
- const isOptionalOut = schema?._zod?.optout === "optional";
851
- doc.write(`const ${id} = ${parseStr(key)};`);
852
- if (isOptionalOut) {
853
- // For optional-out schemas, ignore errors on absent keys
854
- doc.write(`
855
- if (${id}.issues.length) {
856
- if (${k} in input) {
857
- payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
858
- ...iss,
859
- path: iss.path ? [${k}, ...iss.path] : [${k}]
860
- })));
861
- }
862
- }
863
-
864
- if (${id}.value === undefined) {
865
- if (${k} in input) {
866
- newResult[${k}] = undefined;
867
- }
868
- } else {
869
- newResult[${k}] = ${id}.value;
870
- }
871
-
872
- `);
873
- }
874
- else {
875
- doc.write(`
876
- if (${id}.issues.length) {
877
- payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
878
- ...iss,
879
- path: iss.path ? [${k}, ...iss.path] : [${k}]
880
- })));
881
- }
882
-
883
- if (${id}.value === undefined) {
884
- if (${k} in input) {
885
- newResult[${k}] = undefined;
886
- }
887
- } else {
888
- newResult[${k}] = ${id}.value;
889
- }
890
-
891
- `);
892
- }
893
- }
894
- doc.write(`payload.value = newResult;`);
895
- doc.write(`return payload;`);
896
- const fn = doc.compile();
897
- return (payload, ctx) => fn(shape, payload, ctx);
898
- };
899
- let fastpass;
900
- const isObject = util.isObject;
901
- const jit = !core.globalConfig.jitless;
902
- const allowsEval = util.allowsEval;
903
- const fastEnabled = jit && allowsEval.value; // && !def.catchall;
904
- const catchall = def.catchall;
905
- let value;
906
- inst._zod.parse = (payload, ctx) => {
907
- value ?? (value = _normalized.value);
908
- const input = payload.value;
909
- if (!isObject(input)) {
910
- payload.issues.push({
911
- expected: "object",
912
- code: "invalid_type",
913
- input,
914
- inst,
915
- });
916
- return payload;
917
- }
918
- if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
919
- // always synchronous
920
- if (!fastpass)
921
- fastpass = generateFastpass(def.shape);
922
- payload = fastpass(payload, ctx);
923
- if (!catchall)
924
- return payload;
925
- return handleCatchall([], input, payload, ctx, value, inst);
926
- }
927
- return superParse(payload, ctx);
928
- };
929
- });
930
- function handleUnionResults(results, final, inst, ctx) {
931
- for (const result of results) {
932
- if (result.issues.length === 0) {
933
- final.value = result.value;
934
- return final;
935
- }
936
- }
937
- const nonaborted = results.filter((r) => !util.aborted(r));
938
- if (nonaborted.length === 1) {
939
- final.value = nonaborted[0].value;
940
- return nonaborted[0];
941
- }
942
- final.issues.push({
943
- code: "invalid_union",
944
- input: final.value,
945
- inst,
946
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
947
- });
948
- return final;
949
- }
950
- export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
951
- $ZodType.init(inst, def);
952
- util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
953
- util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
954
- util.defineLazy(inst._zod, "values", () => {
955
- if (def.options.every((o) => o._zod.values)) {
956
- return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
957
- }
958
- return undefined;
959
- });
960
- util.defineLazy(inst._zod, "pattern", () => {
961
- if (def.options.every((o) => o._zod.pattern)) {
962
- const patterns = def.options.map((o) => o._zod.pattern);
963
- return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
964
- }
965
- return undefined;
966
- });
967
- const single = def.options.length === 1;
968
- const first = def.options[0]._zod.run;
969
- inst._zod.parse = (payload, ctx) => {
970
- if (single) {
971
- return first(payload, ctx);
972
- }
973
- let async = false;
974
- const results = [];
975
- for (const option of def.options) {
976
- const result = option._zod.run({
977
- value: payload.value,
978
- issues: [],
979
- }, ctx);
980
- if (result instanceof Promise) {
981
- results.push(result);
982
- async = true;
983
- }
984
- else {
985
- if (result.issues.length === 0)
986
- return result;
987
- results.push(result);
988
- }
989
- }
990
- if (!async)
991
- return handleUnionResults(results, payload, inst, ctx);
992
- return Promise.all(results).then((results) => {
993
- return handleUnionResults(results, payload, inst, ctx);
994
- });
995
- };
996
- });
997
- function handleExclusiveUnionResults(results, final, inst, ctx) {
998
- const successes = results.filter((r) => r.issues.length === 0);
999
- if (successes.length === 1) {
1000
- final.value = successes[0].value;
1001
- return final;
1002
- }
1003
- if (successes.length === 0) {
1004
- // No matches - same as regular union
1005
- final.issues.push({
1006
- code: "invalid_union",
1007
- input: final.value,
1008
- inst,
1009
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1010
- });
1011
- }
1012
- else {
1013
- // Multiple matches - exclusive union failure
1014
- final.issues.push({
1015
- code: "invalid_union",
1016
- input: final.value,
1017
- inst,
1018
- errors: [],
1019
- inclusive: false,
1020
- });
1021
- }
1022
- return final;
1023
- }
1024
- export const $ZodXor = /*@__PURE__*/ core.$constructor("$ZodXor", (inst, def) => {
1025
- $ZodUnion.init(inst, def);
1026
- def.inclusive = false;
1027
- const single = def.options.length === 1;
1028
- const first = def.options[0]._zod.run;
1029
- inst._zod.parse = (payload, ctx) => {
1030
- if (single) {
1031
- return first(payload, ctx);
1032
- }
1033
- let async = false;
1034
- const results = [];
1035
- for (const option of def.options) {
1036
- const result = option._zod.run({
1037
- value: payload.value,
1038
- issues: [],
1039
- }, ctx);
1040
- if (result instanceof Promise) {
1041
- results.push(result);
1042
- async = true;
1043
- }
1044
- else {
1045
- results.push(result);
1046
- }
1047
- }
1048
- if (!async)
1049
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1050
- return Promise.all(results).then((results) => {
1051
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1052
- });
1053
- };
1054
- });
1055
- export const $ZodDiscriminatedUnion =
1056
- /*@__PURE__*/
1057
- core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
1058
- def.inclusive = false;
1059
- $ZodUnion.init(inst, def);
1060
- const _super = inst._zod.parse;
1061
- util.defineLazy(inst._zod, "propValues", () => {
1062
- const propValues = {};
1063
- for (const option of def.options) {
1064
- const pv = option._zod.propValues;
1065
- if (!pv || Object.keys(pv).length === 0)
1066
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
1067
- for (const [k, v] of Object.entries(pv)) {
1068
- if (!propValues[k])
1069
- propValues[k] = new Set();
1070
- for (const val of v) {
1071
- propValues[k].add(val);
1072
- }
1073
- }
1074
- }
1075
- return propValues;
1076
- });
1077
- const disc = util.cached(() => {
1078
- const opts = def.options;
1079
- const map = new Map();
1080
- for (const o of opts) {
1081
- const values = o._zod.propValues?.[def.discriminator];
1082
- if (!values || values.size === 0)
1083
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
1084
- for (const v of values) {
1085
- if (map.has(v)) {
1086
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
1087
- }
1088
- map.set(v, o);
1089
- }
1090
- }
1091
- return map;
1092
- });
1093
- inst._zod.parse = (payload, ctx) => {
1094
- const input = payload.value;
1095
- if (!util.isObject(input)) {
1096
- payload.issues.push({
1097
- code: "invalid_type",
1098
- expected: "object",
1099
- input,
1100
- inst,
1101
- });
1102
- return payload;
1103
- }
1104
- const opt = disc.value.get(input?.[def.discriminator]);
1105
- if (opt) {
1106
- return opt._zod.run(payload, ctx);
1107
- }
1108
- if (def.unionFallback) {
1109
- return _super(payload, ctx);
1110
- }
1111
- // no matching discriminator
1112
- payload.issues.push({
1113
- code: "invalid_union",
1114
- errors: [],
1115
- note: "No matching discriminator",
1116
- discriminator: def.discriminator,
1117
- input,
1118
- path: [def.discriminator],
1119
- inst,
1120
- });
1121
- return payload;
1122
- };
1123
- });
1124
- export const $ZodIntersection = /*@__PURE__*/ core.$constructor("$ZodIntersection", (inst, def) => {
1125
- $ZodType.init(inst, def);
1126
- inst._zod.parse = (payload, ctx) => {
1127
- const input = payload.value;
1128
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
1129
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
1130
- const async = left instanceof Promise || right instanceof Promise;
1131
- if (async) {
1132
- return Promise.all([left, right]).then(([left, right]) => {
1133
- return handleIntersectionResults(payload, left, right);
1134
- });
1135
- }
1136
- return handleIntersectionResults(payload, left, right);
1137
- };
1138
- });
1139
- function mergeValues(a, b) {
1140
- // const aType = parse.t(a);
1141
- // const bType = parse.t(b);
1142
- if (a === b) {
1143
- return { valid: true, data: a };
1144
- }
1145
- if (a instanceof Date && b instanceof Date && +a === +b) {
1146
- return { valid: true, data: a };
1147
- }
1148
- if (util.isPlainObject(a) && util.isPlainObject(b)) {
1149
- const bKeys = Object.keys(b);
1150
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1151
- const newObj = { ...a, ...b };
1152
- for (const key of sharedKeys) {
1153
- const sharedValue = mergeValues(a[key], b[key]);
1154
- if (!sharedValue.valid) {
1155
- return {
1156
- valid: false,
1157
- mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
1158
- };
1159
- }
1160
- newObj[key] = sharedValue.data;
1161
- }
1162
- return { valid: true, data: newObj };
1163
- }
1164
- if (Array.isArray(a) && Array.isArray(b)) {
1165
- if (a.length !== b.length) {
1166
- return { valid: false, mergeErrorPath: [] };
1167
- }
1168
- const newArray = [];
1169
- for (let index = 0; index < a.length; index++) {
1170
- const itemA = a[index];
1171
- const itemB = b[index];
1172
- const sharedValue = mergeValues(itemA, itemB);
1173
- if (!sharedValue.valid) {
1174
- return {
1175
- valid: false,
1176
- mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
1177
- };
1178
- }
1179
- newArray.push(sharedValue.data);
1180
- }
1181
- return { valid: true, data: newArray };
1182
- }
1183
- return { valid: false, mergeErrorPath: [] };
1184
- }
1185
- function handleIntersectionResults(result, left, right) {
1186
- // Track which side(s) report each key as unrecognized
1187
- const unrecKeys = new Map();
1188
- let unrecIssue;
1189
- for (const iss of left.issues) {
1190
- if (iss.code === "unrecognized_keys") {
1191
- unrecIssue ?? (unrecIssue = iss);
1192
- for (const k of iss.keys) {
1193
- if (!unrecKeys.has(k))
1194
- unrecKeys.set(k, {});
1195
- unrecKeys.get(k).l = true;
1196
- }
1197
- }
1198
- else {
1199
- result.issues.push(iss);
1200
- }
1201
- }
1202
- for (const iss of right.issues) {
1203
- if (iss.code === "unrecognized_keys") {
1204
- for (const k of iss.keys) {
1205
- if (!unrecKeys.has(k))
1206
- unrecKeys.set(k, {});
1207
- unrecKeys.get(k).r = true;
1208
- }
1209
- }
1210
- else {
1211
- result.issues.push(iss);
1212
- }
1213
- }
1214
- // Report only keys unrecognized by BOTH sides
1215
- const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1216
- if (bothKeys.length && unrecIssue) {
1217
- result.issues.push({ ...unrecIssue, keys: bothKeys });
1218
- }
1219
- if (util.aborted(result))
1220
- return result;
1221
- const merged = mergeValues(left.value, right.value);
1222
- if (!merged.valid) {
1223
- throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
1224
- }
1225
- result.value = merged.data;
1226
- return result;
1227
- }
1228
- export const $ZodTuple = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
1229
- $ZodType.init(inst, def);
1230
- const items = def.items;
1231
- inst._zod.parse = (payload, ctx) => {
1232
- const input = payload.value;
1233
- if (!Array.isArray(input)) {
1234
- payload.issues.push({
1235
- input,
1236
- inst,
1237
- expected: "tuple",
1238
- code: "invalid_type",
1239
- });
1240
- return payload;
1241
- }
1242
- payload.value = [];
1243
- const proms = [];
1244
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
1245
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
1246
- if (!def.rest) {
1247
- const tooBig = input.length > items.length;
1248
- const tooSmall = input.length < optStart - 1;
1249
- if (tooBig || tooSmall) {
1250
- payload.issues.push({
1251
- ...(tooBig
1252
- ? { code: "too_big", maximum: items.length, inclusive: true }
1253
- : { code: "too_small", minimum: items.length }),
1254
- input,
1255
- inst,
1256
- origin: "array",
1257
- });
1258
- return payload;
1259
- }
1260
- }
1261
- let i = -1;
1262
- for (const item of items) {
1263
- i++;
1264
- if (i >= input.length)
1265
- if (i >= optStart)
1266
- continue;
1267
- const result = item._zod.run({
1268
- value: input[i],
1269
- issues: [],
1270
- }, ctx);
1271
- if (result instanceof Promise) {
1272
- proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1273
- }
1274
- else {
1275
- handleTupleResult(result, payload, i);
1276
- }
1277
- }
1278
- if (def.rest) {
1279
- const rest = input.slice(items.length);
1280
- for (const el of rest) {
1281
- i++;
1282
- const result = def.rest._zod.run({
1283
- value: el,
1284
- issues: [],
1285
- }, ctx);
1286
- if (result instanceof Promise) {
1287
- proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1288
- }
1289
- else {
1290
- handleTupleResult(result, payload, i);
1291
- }
1292
- }
1293
- }
1294
- if (proms.length)
1295
- return Promise.all(proms).then(() => payload);
1296
- return payload;
1297
- };
1298
- });
1299
- function handleTupleResult(result, final, index) {
1300
- if (result.issues.length) {
1301
- final.issues.push(...util.prefixIssues(index, result.issues));
1302
- }
1303
- final.value[index] = result.value;
1304
- }
1305
- export const $ZodRecord = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
1306
- $ZodType.init(inst, def);
1307
- inst._zod.parse = (payload, ctx) => {
1308
- const input = payload.value;
1309
- if (!util.isPlainObject(input)) {
1310
- payload.issues.push({
1311
- expected: "record",
1312
- code: "invalid_type",
1313
- input,
1314
- inst,
1315
- });
1316
- return payload;
1317
- }
1318
- const proms = [];
1319
- const values = def.keyType._zod.values;
1320
- if (values) {
1321
- payload.value = {};
1322
- const recordKeys = new Set();
1323
- for (const key of values) {
1324
- if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1325
- recordKeys.add(typeof key === "number" ? key.toString() : key);
1326
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1327
- if (result instanceof Promise) {
1328
- proms.push(result.then((result) => {
1329
- if (result.issues.length) {
1330
- payload.issues.push(...util.prefixIssues(key, result.issues));
1331
- }
1332
- payload.value[key] = result.value;
1333
- }));
1334
- }
1335
- else {
1336
- if (result.issues.length) {
1337
- payload.issues.push(...util.prefixIssues(key, result.issues));
1338
- }
1339
- payload.value[key] = result.value;
1340
- }
1341
- }
1342
- }
1343
- let unrecognized;
1344
- for (const key in input) {
1345
- if (!recordKeys.has(key)) {
1346
- unrecognized = unrecognized ?? [];
1347
- unrecognized.push(key);
1348
- }
1349
- }
1350
- if (unrecognized && unrecognized.length > 0) {
1351
- payload.issues.push({
1352
- code: "unrecognized_keys",
1353
- input,
1354
- inst,
1355
- keys: unrecognized,
1356
- });
1357
- }
1358
- }
1359
- else {
1360
- payload.value = {};
1361
- for (const key of Reflect.ownKeys(input)) {
1362
- if (key === "__proto__")
1363
- continue;
1364
- let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1365
- if (keyResult instanceof Promise) {
1366
- throw new Error("Async schemas not supported in object keys currently");
1367
- }
1368
- // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)
1369
- // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
1370
- const checkNumericKey = typeof key === "string" && regexes.number.test(key) && keyResult.issues.length;
1371
- if (checkNumericKey) {
1372
- const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
1373
- if (retryResult instanceof Promise) {
1374
- throw new Error("Async schemas not supported in object keys currently");
1375
- }
1376
- if (retryResult.issues.length === 0) {
1377
- keyResult = retryResult;
1378
- }
1379
- }
1380
- if (keyResult.issues.length) {
1381
- if (def.mode === "loose") {
1382
- // Pass through unchanged
1383
- payload.value[key] = input[key];
1384
- }
1385
- else {
1386
- // Default "strict" behavior: error on invalid key
1387
- payload.issues.push({
1388
- code: "invalid_key",
1389
- origin: "record",
1390
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1391
- input: key,
1392
- path: [key],
1393
- inst,
1394
- });
1395
- }
1396
- continue;
1397
- }
1398
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1399
- if (result instanceof Promise) {
1400
- proms.push(result.then((result) => {
1401
- if (result.issues.length) {
1402
- payload.issues.push(...util.prefixIssues(key, result.issues));
1403
- }
1404
- payload.value[keyResult.value] = result.value;
1405
- }));
1406
- }
1407
- else {
1408
- if (result.issues.length) {
1409
- payload.issues.push(...util.prefixIssues(key, result.issues));
1410
- }
1411
- payload.value[keyResult.value] = result.value;
1412
- }
1413
- }
1414
- }
1415
- if (proms.length) {
1416
- return Promise.all(proms).then(() => payload);
1417
- }
1418
- return payload;
1419
- };
1420
- });
1421
- export const $ZodMap = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
1422
- $ZodType.init(inst, def);
1423
- inst._zod.parse = (payload, ctx) => {
1424
- const input = payload.value;
1425
- if (!(input instanceof Map)) {
1426
- payload.issues.push({
1427
- expected: "map",
1428
- code: "invalid_type",
1429
- input,
1430
- inst,
1431
- });
1432
- return payload;
1433
- }
1434
- const proms = [];
1435
- payload.value = new Map();
1436
- for (const [key, value] of input) {
1437
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1438
- const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
1439
- if (keyResult instanceof Promise || valueResult instanceof Promise) {
1440
- proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
1441
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1442
- }));
1443
- }
1444
- else {
1445
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1446
- }
1447
- }
1448
- if (proms.length)
1449
- return Promise.all(proms).then(() => payload);
1450
- return payload;
1451
- };
1452
- });
1453
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1454
- if (keyResult.issues.length) {
1455
- if (util.propertyKeyTypes.has(typeof key)) {
1456
- final.issues.push(...util.prefixIssues(key, keyResult.issues));
1457
- }
1458
- else {
1459
- final.issues.push({
1460
- code: "invalid_key",
1461
- origin: "map",
1462
- input,
1463
- inst,
1464
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1465
- });
1466
- }
1467
- }
1468
- if (valueResult.issues.length) {
1469
- if (util.propertyKeyTypes.has(typeof key)) {
1470
- final.issues.push(...util.prefixIssues(key, valueResult.issues));
1471
- }
1472
- else {
1473
- final.issues.push({
1474
- origin: "map",
1475
- code: "invalid_element",
1476
- input,
1477
- inst,
1478
- key: key,
1479
- issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1480
- });
1481
- }
1482
- }
1483
- final.value.set(keyResult.value, valueResult.value);
1484
- }
1485
- export const $ZodSet = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
1486
- $ZodType.init(inst, def);
1487
- inst._zod.parse = (payload, ctx) => {
1488
- const input = payload.value;
1489
- if (!(input instanceof Set)) {
1490
- payload.issues.push({
1491
- input,
1492
- inst,
1493
- expected: "set",
1494
- code: "invalid_type",
1495
- });
1496
- return payload;
1497
- }
1498
- const proms = [];
1499
- payload.value = new Set();
1500
- for (const item of input) {
1501
- const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
1502
- if (result instanceof Promise) {
1503
- proms.push(result.then((result) => handleSetResult(result, payload)));
1504
- }
1505
- else
1506
- handleSetResult(result, payload);
1507
- }
1508
- if (proms.length)
1509
- return Promise.all(proms).then(() => payload);
1510
- return payload;
1511
- };
1512
- });
1513
- function handleSetResult(result, final) {
1514
- if (result.issues.length) {
1515
- final.issues.push(...result.issues);
1516
- }
1517
- final.value.add(result.value);
1518
- }
1519
- export const $ZodEnum = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
1520
- $ZodType.init(inst, def);
1521
- const values = util.getEnumValues(def.entries);
1522
- const valuesSet = new Set(values);
1523
- inst._zod.values = valuesSet;
1524
- inst._zod.pattern = new RegExp(`^(${values
1525
- .filter((k) => util.propertyKeyTypes.has(typeof k))
1526
- .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o.toString()))
1527
- .join("|")})$`);
1528
- inst._zod.parse = (payload, _ctx) => {
1529
- const input = payload.value;
1530
- if (valuesSet.has(input)) {
1531
- return payload;
1532
- }
1533
- payload.issues.push({
1534
- code: "invalid_value",
1535
- values,
1536
- input,
1537
- inst,
1538
- });
1539
- return payload;
1540
- };
1541
- });
1542
- export const $ZodLiteral = /*@__PURE__*/ core.$constructor("$ZodLiteral", (inst, def) => {
1543
- $ZodType.init(inst, def);
1544
- if (def.values.length === 0) {
1545
- throw new Error("Cannot create literal schema with no valid values");
1546
- }
1547
- const values = new Set(def.values);
1548
- inst._zod.values = values;
1549
- inst._zod.pattern = new RegExp(`^(${def.values
1550
- .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))
1551
- .join("|")})$`);
1552
- inst._zod.parse = (payload, _ctx) => {
1553
- const input = payload.value;
1554
- if (values.has(input)) {
1555
- return payload;
1556
- }
1557
- payload.issues.push({
1558
- code: "invalid_value",
1559
- values: def.values,
1560
- input,
1561
- inst,
1562
- });
1563
- return payload;
1564
- };
1565
- });
1566
- export const $ZodFile = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
1567
- $ZodType.init(inst, def);
1568
- inst._zod.parse = (payload, _ctx) => {
1569
- const input = payload.value;
1570
- // @ts-ignore
1571
- if (input instanceof File)
1572
- return payload;
1573
- payload.issues.push({
1574
- expected: "file",
1575
- code: "invalid_type",
1576
- input,
1577
- inst,
1578
- });
1579
- return payload;
1580
- };
1581
- });
1582
- export const $ZodTransform = /*@__PURE__*/ core.$constructor("$ZodTransform", (inst, def) => {
1583
- $ZodType.init(inst, def);
1584
- inst._zod.parse = (payload, ctx) => {
1585
- if (ctx.direction === "backward") {
1586
- throw new core.$ZodEncodeError(inst.constructor.name);
1587
- }
1588
- const _out = def.transform(payload.value, payload);
1589
- if (ctx.async) {
1590
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
1591
- return output.then((output) => {
1592
- payload.value = output;
1593
- return payload;
1594
- });
1595
- }
1596
- if (_out instanceof Promise) {
1597
- throw new core.$ZodAsyncError();
1598
- }
1599
- payload.value = _out;
1600
- return payload;
1601
- };
1602
- });
1603
- function handleOptionalResult(result, input) {
1604
- if (result.issues.length && input === undefined) {
1605
- return { issues: [], value: undefined };
1606
- }
1607
- return result;
1608
- }
1609
- export const $ZodOptional = /*@__PURE__*/ core.$constructor("$ZodOptional", (inst, def) => {
1610
- $ZodType.init(inst, def);
1611
- inst._zod.optin = "optional";
1612
- inst._zod.optout = "optional";
1613
- util.defineLazy(inst._zod, "values", () => {
1614
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;
1615
- });
1616
- util.defineLazy(inst._zod, "pattern", () => {
1617
- const pattern = def.innerType._zod.pattern;
1618
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
1619
- });
1620
- inst._zod.parse = (payload, ctx) => {
1621
- if (def.innerType._zod.optin === "optional") {
1622
- const result = def.innerType._zod.run(payload, ctx);
1623
- if (result instanceof Promise)
1624
- return result.then((r) => handleOptionalResult(r, payload.value));
1625
- return handleOptionalResult(result, payload.value);
1626
- }
1627
- if (payload.value === undefined) {
1628
- return payload;
1629
- }
1630
- return def.innerType._zod.run(payload, ctx);
1631
- };
1632
- });
1633
- export const $ZodExactOptional = /*@__PURE__*/ core.$constructor("$ZodExactOptional", (inst, def) => {
1634
- // Call parent init - inherits optin/optout = "optional"
1635
- $ZodOptional.init(inst, def);
1636
- // Override values/pattern to NOT add undefined
1637
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1638
- util.defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
1639
- // Override parse to just delegate (no undefined handling)
1640
- inst._zod.parse = (payload, ctx) => {
1641
- return def.innerType._zod.run(payload, ctx);
1642
- };
1643
- });
1644
- export const $ZodNullable = /*@__PURE__*/ core.$constructor("$ZodNullable", (inst, def) => {
1645
- $ZodType.init(inst, def);
1646
- util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1647
- util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1648
- util.defineLazy(inst._zod, "pattern", () => {
1649
- const pattern = def.innerType._zod.pattern;
1650
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
1651
- });
1652
- util.defineLazy(inst._zod, "values", () => {
1653
- return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
1654
- });
1655
- inst._zod.parse = (payload, ctx) => {
1656
- // Forward direction (decode): allow null to pass through
1657
- if (payload.value === null)
1658
- return payload;
1659
- return def.innerType._zod.run(payload, ctx);
1660
- };
1661
- });
1662
- export const $ZodDefault = /*@__PURE__*/ core.$constructor("$ZodDefault", (inst, def) => {
1663
- $ZodType.init(inst, def);
1664
- // inst._zod.qin = "true";
1665
- inst._zod.optin = "optional";
1666
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1667
- inst._zod.parse = (payload, ctx) => {
1668
- if (ctx.direction === "backward") {
1669
- return def.innerType._zod.run(payload, ctx);
1670
- }
1671
- // Forward direction (decode): apply defaults for undefined input
1672
- if (payload.value === undefined) {
1673
- payload.value = def.defaultValue;
1674
- /**
1675
- * $ZodDefault returns the default value immediately in forward direction.
1676
- * 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. */
1677
- return payload;
1678
- }
1679
- // Forward direction: continue with default handling
1680
- const result = def.innerType._zod.run(payload, ctx);
1681
- if (result instanceof Promise) {
1682
- return result.then((result) => handleDefaultResult(result, def));
1683
- }
1684
- return handleDefaultResult(result, def);
1685
- };
1686
- });
1687
- function handleDefaultResult(payload, def) {
1688
- if (payload.value === undefined) {
1689
- payload.value = def.defaultValue;
1690
- }
1691
- return payload;
1692
- }
1693
- export const $ZodPrefault = /*@__PURE__*/ core.$constructor("$ZodPrefault", (inst, def) => {
1694
- $ZodType.init(inst, def);
1695
- inst._zod.optin = "optional";
1696
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1697
- inst._zod.parse = (payload, ctx) => {
1698
- if (ctx.direction === "backward") {
1699
- return def.innerType._zod.run(payload, ctx);
1700
- }
1701
- // Forward direction (decode): apply prefault for undefined input
1702
- if (payload.value === undefined) {
1703
- payload.value = def.defaultValue;
1704
- }
1705
- return def.innerType._zod.run(payload, ctx);
1706
- };
1707
- });
1708
- export const $ZodNonOptional = /*@__PURE__*/ core.$constructor("$ZodNonOptional", (inst, def) => {
1709
- $ZodType.init(inst, def);
1710
- util.defineLazy(inst._zod, "values", () => {
1711
- const v = def.innerType._zod.values;
1712
- return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
1713
- });
1714
- inst._zod.parse = (payload, ctx) => {
1715
- const result = def.innerType._zod.run(payload, ctx);
1716
- if (result instanceof Promise) {
1717
- return result.then((result) => handleNonOptionalResult(result, inst));
1718
- }
1719
- return handleNonOptionalResult(result, inst);
1720
- };
1721
- });
1722
- function handleNonOptionalResult(payload, inst) {
1723
- if (!payload.issues.length && payload.value === undefined) {
1724
- payload.issues.push({
1725
- code: "invalid_type",
1726
- expected: "nonoptional",
1727
- input: payload.value,
1728
- inst,
1729
- });
1730
- }
1731
- return payload;
1732
- }
1733
- export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst, def) => {
1734
- $ZodType.init(inst, def);
1735
- inst._zod.parse = (payload, ctx) => {
1736
- if (ctx.direction === "backward") {
1737
- throw new core.$ZodEncodeError("ZodSuccess");
1738
- }
1739
- const result = def.innerType._zod.run(payload, ctx);
1740
- if (result instanceof Promise) {
1741
- return result.then((result) => {
1742
- payload.value = result.issues.length === 0;
1743
- return payload;
1744
- });
1745
- }
1746
- payload.value = result.issues.length === 0;
1747
- return payload;
1748
- };
1749
- });
1750
- export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
1751
- $ZodType.init(inst, def);
1752
- util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1753
- util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1754
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1755
- inst._zod.parse = (payload, ctx) => {
1756
- if (ctx.direction === "backward") {
1757
- return def.innerType._zod.run(payload, ctx);
1758
- }
1759
- // Forward direction (decode): apply catch logic
1760
- const result = def.innerType._zod.run(payload, ctx);
1761
- if (result instanceof Promise) {
1762
- return result.then((result) => {
1763
- payload.value = result.value;
1764
- if (result.issues.length) {
1765
- payload.value = def.catchValue({
1766
- ...payload,
1767
- error: {
1768
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1769
- },
1770
- input: payload.value,
1771
- });
1772
- payload.issues = [];
1773
- }
1774
- return payload;
1775
- });
1776
- }
1777
- payload.value = result.value;
1778
- if (result.issues.length) {
1779
- payload.value = def.catchValue({
1780
- ...payload,
1781
- error: {
1782
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1783
- },
1784
- input: payload.value,
1785
- });
1786
- payload.issues = [];
1787
- }
1788
- return payload;
1789
- };
1790
- });
1791
- export const $ZodNaN = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
1792
- $ZodType.init(inst, def);
1793
- inst._zod.parse = (payload, _ctx) => {
1794
- if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
1795
- payload.issues.push({
1796
- input: payload.value,
1797
- inst,
1798
- expected: "nan",
1799
- code: "invalid_type",
1800
- });
1801
- return payload;
1802
- }
1803
- return payload;
1804
- };
1805
- });
1806
- export const $ZodPipe = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
1807
- $ZodType.init(inst, def);
1808
- util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1809
- util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1810
- util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1811
- util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1812
- inst._zod.parse = (payload, ctx) => {
1813
- if (ctx.direction === "backward") {
1814
- const right = def.out._zod.run(payload, ctx);
1815
- if (right instanceof Promise) {
1816
- return right.then((right) => handlePipeResult(right, def.in, ctx));
1817
- }
1818
- return handlePipeResult(right, def.in, ctx);
1819
- }
1820
- const left = def.in._zod.run(payload, ctx);
1821
- if (left instanceof Promise) {
1822
- return left.then((left) => handlePipeResult(left, def.out, ctx));
1823
- }
1824
- return handlePipeResult(left, def.out, ctx);
1825
- };
1826
- });
1827
- function handlePipeResult(left, next, ctx) {
1828
- if (left.issues.length) {
1829
- // prevent further checks
1830
- left.aborted = true;
1831
- return left;
1832
- }
1833
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
1834
- }
1835
- export const $ZodCodec = /*@__PURE__*/ core.$constructor("$ZodCodec", (inst, def) => {
1836
- $ZodType.init(inst, def);
1837
- util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1838
- util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1839
- util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1840
- util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1841
- inst._zod.parse = (payload, ctx) => {
1842
- const direction = ctx.direction || "forward";
1843
- if (direction === "forward") {
1844
- const left = def.in._zod.run(payload, ctx);
1845
- if (left instanceof Promise) {
1846
- return left.then((left) => handleCodecAResult(left, def, ctx));
1847
- }
1848
- return handleCodecAResult(left, def, ctx);
1849
- }
1850
- else {
1851
- const right = def.out._zod.run(payload, ctx);
1852
- if (right instanceof Promise) {
1853
- return right.then((right) => handleCodecAResult(right, def, ctx));
1854
- }
1855
- return handleCodecAResult(right, def, ctx);
1856
- }
1857
- };
1858
- });
1859
- function handleCodecAResult(result, def, ctx) {
1860
- if (result.issues.length) {
1861
- // prevent further checks
1862
- result.aborted = true;
1863
- return result;
1864
- }
1865
- const direction = ctx.direction || "forward";
1866
- if (direction === "forward") {
1867
- const transformed = def.transform(result.value, result);
1868
- if (transformed instanceof Promise) {
1869
- return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
1870
- }
1871
- return handleCodecTxResult(result, transformed, def.out, ctx);
1872
- }
1873
- else {
1874
- const transformed = def.reverseTransform(result.value, result);
1875
- if (transformed instanceof Promise) {
1876
- return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
1877
- }
1878
- return handleCodecTxResult(result, transformed, def.in, ctx);
1879
- }
1880
- }
1881
- function handleCodecTxResult(left, value, nextSchema, ctx) {
1882
- // Check if transform added any issues
1883
- if (left.issues.length) {
1884
- left.aborted = true;
1885
- return left;
1886
- }
1887
- return nextSchema._zod.run({ value, issues: left.issues }, ctx);
1888
- }
1889
- export const $ZodReadonly = /*@__PURE__*/ core.$constructor("$ZodReadonly", (inst, def) => {
1890
- $ZodType.init(inst, def);
1891
- util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1892
- util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1893
- util.defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
1894
- util.defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
1895
- inst._zod.parse = (payload, ctx) => {
1896
- if (ctx.direction === "backward") {
1897
- return def.innerType._zod.run(payload, ctx);
1898
- }
1899
- const result = def.innerType._zod.run(payload, ctx);
1900
- if (result instanceof Promise) {
1901
- return result.then(handleReadonlyResult);
1902
- }
1903
- return handleReadonlyResult(result);
1904
- };
1905
- });
1906
- function handleReadonlyResult(payload) {
1907
- payload.value = Object.freeze(payload.value);
1908
- return payload;
1909
- }
1910
- export const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("$ZodTemplateLiteral", (inst, def) => {
1911
- $ZodType.init(inst, def);
1912
- const regexParts = [];
1913
- for (const part of def.parts) {
1914
- if (typeof part === "object" && part !== null) {
1915
- // is Zod schema
1916
- if (!part._zod.pattern) {
1917
- // if (!source)
1918
- throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
1919
- }
1920
- const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
1921
- if (!source)
1922
- throw new Error(`Invalid template literal part: ${part._zod.traits}`);
1923
- const start = source.startsWith("^") ? 1 : 0;
1924
- const end = source.endsWith("$") ? source.length - 1 : source.length;
1925
- regexParts.push(source.slice(start, end));
1926
- }
1927
- else if (part === null || util.primitiveTypes.has(typeof part)) {
1928
- regexParts.push(util.escapeRegex(`${part}`));
1929
- }
1930
- else {
1931
- throw new Error(`Invalid template literal part: ${part}`);
1932
- }
1933
- }
1934
- inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
1935
- inst._zod.parse = (payload, _ctx) => {
1936
- if (typeof payload.value !== "string") {
1937
- payload.issues.push({
1938
- input: payload.value,
1939
- inst,
1940
- expected: "string",
1941
- code: "invalid_type",
1942
- });
1943
- return payload;
1944
- }
1945
- inst._zod.pattern.lastIndex = 0;
1946
- if (!inst._zod.pattern.test(payload.value)) {
1947
- payload.issues.push({
1948
- input: payload.value,
1949
- inst,
1950
- code: "invalid_format",
1951
- format: def.format ?? "template_literal",
1952
- pattern: inst._zod.pattern.source,
1953
- });
1954
- return payload;
1955
- }
1956
- return payload;
1957
- };
1958
- });
1959
- export const $ZodFunction = /*@__PURE__*/ core.$constructor("$ZodFunction", (inst, def) => {
1960
- $ZodType.init(inst, def);
1961
- inst._def = def;
1962
- inst._zod.def = def;
1963
- inst.implement = (func) => {
1964
- if (typeof func !== "function") {
1965
- throw new Error("implement() must be called with a function");
1966
- }
1967
- return function (...args) {
1968
- const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
1969
- const result = Reflect.apply(func, this, parsedArgs);
1970
- if (inst._def.output) {
1971
- return parse(inst._def.output, result);
1972
- }
1973
- return result;
1974
- };
1975
- };
1976
- inst.implementAsync = (func) => {
1977
- if (typeof func !== "function") {
1978
- throw new Error("implementAsync() must be called with a function");
1979
- }
1980
- return async function (...args) {
1981
- const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
1982
- const result = await Reflect.apply(func, this, parsedArgs);
1983
- if (inst._def.output) {
1984
- return await parseAsync(inst._def.output, result);
1985
- }
1986
- return result;
1987
- };
1988
- };
1989
- inst._zod.parse = (payload, _ctx) => {
1990
- if (typeof payload.value !== "function") {
1991
- payload.issues.push({
1992
- code: "invalid_type",
1993
- expected: "function",
1994
- input: payload.value,
1995
- inst,
1996
- });
1997
- return payload;
1998
- }
1999
- // Check if output is a promise type to determine if we should use async implementation
2000
- const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
2001
- if (hasPromiseOutput) {
2002
- payload.value = inst.implementAsync(payload.value);
2003
- }
2004
- else {
2005
- payload.value = inst.implement(payload.value);
2006
- }
2007
- return payload;
2008
- };
2009
- inst.input = (...args) => {
2010
- const F = inst.constructor;
2011
- if (Array.isArray(args[0])) {
2012
- return new F({
2013
- type: "function",
2014
- input: new $ZodTuple({
2015
- type: "tuple",
2016
- items: args[0],
2017
- rest: args[1],
2018
- }),
2019
- output: inst._def.output,
2020
- });
2021
- }
2022
- return new F({
2023
- type: "function",
2024
- input: args[0],
2025
- output: inst._def.output,
2026
- });
2027
- };
2028
- inst.output = (output) => {
2029
- const F = inst.constructor;
2030
- return new F({
2031
- type: "function",
2032
- input: inst._def.input,
2033
- output,
2034
- });
2035
- };
2036
- return inst;
2037
- });
2038
- export const $ZodPromise = /*@__PURE__*/ core.$constructor("$ZodPromise", (inst, def) => {
2039
- $ZodType.init(inst, def);
2040
- inst._zod.parse = (payload, ctx) => {
2041
- return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
2042
- };
2043
- });
2044
- export const $ZodLazy = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
2045
- $ZodType.init(inst, def);
2046
- // let _innerType!: any;
2047
- // util.defineLazy(def, "getter", () => {
2048
- // if (!_innerType) {
2049
- // _innerType = def.getter();
2050
- // }
2051
- // return () => _innerType;
2052
- // });
2053
- util.defineLazy(inst._zod, "innerType", () => def.getter());
2054
- util.defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
2055
- util.defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
2056
- util.defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
2057
- util.defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
2058
- inst._zod.parse = (payload, ctx) => {
2059
- const inner = inst._zod.innerType;
2060
- return inner._zod.run(payload, ctx);
2061
- };
2062
- });
2063
- export const $ZodCustom = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
2064
- checks.$ZodCheck.init(inst, def);
2065
- $ZodType.init(inst, def);
2066
- inst._zod.parse = (payload, _) => {
2067
- return payload;
2068
- };
2069
- inst._zod.check = (payload) => {
2070
- const input = payload.value;
2071
- const r = def.fn(input);
2072
- if (r instanceof Promise) {
2073
- return r.then((r) => handleRefineResult(r, payload, input, inst));
2074
- }
2075
- handleRefineResult(r, payload, input, inst);
2076
- return;
2077
- };
2078
- });
2079
- function handleRefineResult(result, payload, input, inst) {
2080
- if (!result) {
2081
- const _iss = {
2082
- code: "custom",
2083
- input,
2084
- inst, // incorporates params.error into issue reporting
2085
- path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
2086
- continue: !inst._zod.def.abort,
2087
- // params: inst._zod.def.params,
2088
- };
2089
- if (inst._zod.def.params)
2090
- _iss.params = inst._zod.def.params;
2091
- payload.issues.push(util.issue(_iss));
2092
- }
2093
- }