@fern-api/java-dynamic-snippets 0.0.2 → 0.0.4

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 (76) hide show
  1. package/cjs/Config.cjs +1 -0
  2. package/cjs/Config.cjs.map +1 -0
  3. package/cjs/DynamicSnippetsGenerator.cjs +16 -11
  4. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -0
  5. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  6. package/cjs/{DynamicSnippetsGeneratorContext-D5kyHx_O.d.cts → DynamicSnippetsGeneratorContext-FbVOZ8Go.d.cts} +9 -7
  7. package/cjs/EndpointSnippetGenerator.cjs +12 -7
  8. package/cjs/EndpointSnippetGenerator.cjs.map +1 -0
  9. package/cjs/EndpointSnippetGenerator.d.cts +4 -1
  10. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +16 -11
  11. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -0
  12. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  13. package/cjs/context/DynamicTypeLiteralMapper.cjs +12 -7
  14. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -0
  15. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  16. package/cjs/context/DynamicTypeMapper.cjs +12 -7
  17. package/cjs/context/DynamicTypeMapper.cjs.map +1 -0
  18. package/cjs/context/DynamicTypeMapper.d.cts +1 -1
  19. package/cjs/context/FilePropertyMapper.cjs +12 -7
  20. package/cjs/context/FilePropertyMapper.cjs.map +1 -0
  21. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  22. package/cjs/index.cjs +26 -21
  23. package/cjs/index.cjs.map +1 -0
  24. package/cjs/index.d.cts +2 -2
  25. package/esm/Config.js +2 -1
  26. package/esm/Config.js.map +1 -0
  27. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  28. package/esm/DynamicSnippetsGenerator.js +2 -1
  29. package/esm/DynamicSnippetsGenerator.js.map +1 -0
  30. package/esm/{DynamicSnippetsGeneratorContext-D5kyHx_O.d.ts → DynamicSnippetsGeneratorContext-FbVOZ8Go.d.ts} +9 -7
  31. package/esm/EndpointSnippetGenerator.d.ts +4 -1
  32. package/esm/EndpointSnippetGenerator.js +2 -1
  33. package/esm/EndpointSnippetGenerator.js.map +1 -0
  34. package/esm/chunk-3JSOCWNQ.js +20 -0
  35. package/esm/chunk-3JSOCWNQ.js.map +1 -0
  36. package/esm/chunk-3LOINSB3.js +2 -0
  37. package/esm/chunk-3LOINSB3.js.map +1 -0
  38. package/esm/chunk-6YM2QG7U.js +2 -0
  39. package/esm/chunk-6YM2QG7U.js.map +1 -0
  40. package/esm/{chunk-2AZXIWKY.js → chunk-E6GFFTKW.js} +2 -1
  41. package/esm/chunk-E6GFFTKW.js.map +1 -0
  42. package/esm/chunk-JZ2FDMYI.js +15 -0
  43. package/esm/chunk-JZ2FDMYI.js.map +1 -0
  44. package/esm/{chunk-452HWDL4.js → chunk-JZBCQWQN.js} +2 -1
  45. package/esm/chunk-JZBCQWQN.js.map +1 -0
  46. package/esm/{chunk-7CY27UU7.js → chunk-PUPEW5QI.js} +2 -1
  47. package/esm/chunk-PUPEW5QI.js.map +1 -0
  48. package/esm/chunk-SQKACQJK.js +2 -0
  49. package/esm/chunk-SQKACQJK.js.map +1 -0
  50. package/esm/chunk-WBGWLNLI.js +2 -0
  51. package/esm/chunk-WBGWLNLI.js.map +1 -0
  52. package/esm/chunk-ZYVZJBJN.js +2 -0
  53. package/esm/chunk-ZYVZJBJN.js.map +1 -0
  54. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  55. package/esm/context/DynamicSnippetsGeneratorContext.js +2 -1
  56. package/esm/context/DynamicSnippetsGeneratorContext.js.map +1 -0
  57. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  58. package/esm/context/DynamicTypeLiteralMapper.js +2 -1
  59. package/esm/context/DynamicTypeLiteralMapper.js.map +1 -0
  60. package/esm/context/DynamicTypeMapper.d.ts +1 -1
  61. package/esm/context/DynamicTypeMapper.js +2 -1
  62. package/esm/context/DynamicTypeMapper.js.map +1 -0
  63. package/esm/context/FilePropertyMapper.d.ts +1 -1
  64. package/esm/context/FilePropertyMapper.js +2 -1
  65. package/esm/context/FilePropertyMapper.js.map +1 -0
  66. package/esm/index.d.ts +2 -2
  67. package/esm/index.js +12 -11
  68. package/esm/index.js.map +1 -0
  69. package/package.json +1 -1
  70. package/esm/chunk-AASPH6YC.js +0 -15
  71. package/esm/chunk-BECJPKDE.js +0 -1
  72. package/esm/chunk-HN67B7VQ.js +0 -1
  73. package/esm/chunk-IBCUQF6Z.js +0 -14
  74. package/esm/chunk-JSEUWNSK.js +0 -1
  75. package/esm/chunk-TTNRR5YY.js +0 -1
  76. package/esm/chunk-WFKWXM7L.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/commons/core-utils/src/assertNever.ts","../../../../../packages/commons/core-utils/src/index.ts","../../../../../packages/commons/core-utils/src/objects/keys.ts","../../../ast/src/custom-config/BaseJavaCustomConfigSchema.ts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js","../../../ast/src/custom-config/CustomReadmeSectionSchema.ts","../../../ast/src/java.ts","../../../ast/src/ast/index.ts","../../../ast/src/ast/Access.ts","../../../ast/src/ast/Class.ts","../../../ast/src/ast/core/AstNode.ts","../../../../browser-compatible-base/src/ast/index.ts","../../../../browser-compatible-base/src/ast/AbstractAstNode.ts","../../../../browser-compatible-base/src/ast/AbstractFormatter.ts","../../../../browser-compatible-base/src/ast/AbstractWriter.ts","../../../../browser-compatible-base/src/ast/CodeBlock.ts","../../../../browser-compatible-base/src/ast/Argument.ts","../../../ast/src/ast/core/JavaFile.ts","../../../ast/src/ast/core/Writer.ts","../../../ast/src/ast/ClassInstantiation.ts","../../../ast/src/ast/utils/writeArguments.ts","../../../ast/src/ast/TypeLiteral.ts","../../../ast/src/index.ts","../../../ast/src/ast/ClassReference.ts","../../../ast/src/ast/Type.ts","../../../ast/src/ast/CodeBlock.ts","../../../ast/src/ast/Method.ts","../../../ast/src/ast/MethodInvocation.ts","../../../ast/src/ast/Parameter.ts"],"sourcesContent":["export function assertNever(x: never): never {\n throw new Error(\"Unexpected value: \" + JSON.stringify(x));\n}\n\n// biome-ignore lint/suspicious/noEmptyBlockStatements: allow\nexport function assertNeverNoThrow(_: never): void {}\n","export { addPrefixToString } from \"./addPrefixToString\";\nexport { assertDefined } from \"./assertDefined\";\nexport { assertNever, assertNeverNoThrow } from \"./assertNever\";\nexport { assertVoidNoThrow } from \"./assertVoidNoThrow\";\nexport { delay } from \"./delay/delay\";\nexport { withMinimumTime } from \"./delay/withMinimumTime\";\nexport { EMPTY_ARRAY, EMPTY_OBJECT } from \"./empty\";\nexport * as Examples from \"./examples\";\nexport { extractErrorMessage } from \"./extractErrorMessage\";\nexport { getDuplicates } from \"./getDuplicates\";\nexport { identity } from \"./identity\";\nexport { isNonNullish } from \"./isNonNullish\";\nexport { MediaType } from \"./mediaType\";\nexport { mergeWithOverrides } from \"./mergeWithOverrides\";\nexport { noop } from \"./noop\";\nexport {\n haveSameNullishness,\n nullIfNullish,\n nullIfSomeNullish,\n undefinedIfNullish,\n undefinedIfSomeNullish\n} from \"./nullishUtils\";\nexport { type ObjectPropertiesVisitor, visitObject, visitObjectAsync } from \"./ObjectPropertiesVisitor\";\nexport { type Entries, entries } from \"./objects/entries\";\nexport { isPlainObject } from \"./objects/isPlainObject\";\nexport { keys } from \"./objects/keys\";\nexport { mapValues } from \"./objects/mapValues\";\nexport { type Values, values } from \"./objects/values\";\nexport { parseEndpointLocator } from \"./parseEndpointLocator\";\nexport { PLATFORM, type Platform } from \"./platform\";\nexport { removeSuffix } from \"./removeSuffix\";\nexport { replaceEnvVariables } from \"./replaceEnvVars\";\nexport { SymbolRegistry, type SymbolRegistryOptions } from \"./SymbolRegistry\";\nexport { diffSemverOrThrow, parseSemverOrThrow } from \"./semverUtils\";\nexport { type SetRequired } from \"./setRequired\";\nexport { stripLeadingSlash } from \"./stripLeadingSlash\";\nexport { titleCase } from \"./titleCase\";\nexport type { ContainerRunner, Digit, Letter, LowercaseLetter, UppercaseLetter } from \"./types\";\nexport { validateAgainstJsonSchema } from \"./validateAgainstJsonSchema\";\nexport { visitDiscriminatedUnion } from \"./visitDiscriminatedUnion\";\nexport type { WithoutQuestionMarks } from \"./withoutQuestionMarks\";\n","export function keys<T extends object>(object: T): (keyof T)[] {\n return Object.keys(object) as (keyof T)[];\n}\n","import { z } from \"zod\";\nimport { CustomReadmeSectionSchema } from \"./CustomReadmeSectionSchema\";\n\nexport const BaseJavaCustomConfigSchema = z.object({\n // Influences dynamic snippets.\n \"base-api-exception-class-name\": z.string().optional(),\n \"base-exception-class-name\": z.string().optional(),\n \"client-class-name\": z.string().optional(),\n \"inline-file-properties\": z.boolean().optional(),\n \"inline-path-parameters\": z.boolean().optional(),\n \"package-layout\": z.enum([\"flat\", \"nested\"]).optional(),\n \"package-prefix\": z.string().optional(),\n\n // General options.\n \"custom-dependencies\": z.array(z.string()).optional(),\n \"disable-required-property-builder-checks\": z.boolean().optional(),\n \"enable-forward-compatible-enums\": z.boolean().optional(),\n \"enable-inline-types\": z.boolean().optional(),\n \"enable-public-constructors\": z.boolean().optional(),\n \"generate-unknown-as-json-node\": z.boolean().optional(),\n \"json-include\": z.enum([\"non-absent\", \"non-empty\"]).optional(),\n \"enable-extensible-builders\": z.boolean().optional(),\n \"use-default-request-parameter-values\": z.boolean().optional(),\n \"enable-wire-tests\": z.boolean().default(true),\n \"custom-readme-sections\": z.array(CustomReadmeSectionSchema).optional(),\n\n // Deprecated.\n \"wrapped-aliases\": z.boolean().optional()\n});\n\nexport type BaseJavaCustomConfigSchema = z.infer<typeof BaseJavaCustomConfigSchema>;\n","import * as z from \"./v3/external.js\";\nexport * from \"./v3/external.js\";\nexport { z };\nexport default z;\n","export * from \"./errors.js\";\nexport * from \"./helpers/parseUtil.js\";\nexport * from \"./helpers/typeAliases.js\";\nexport * from \"./helpers/util.js\";\nexport * from \"./types.js\";\nexport * from \"./ZodError.js\";\n","import defaultErrorMap from \"./locales/en.js\";\nlet overrideErrorMap = defaultErrorMap;\nexport { defaultErrorMap };\nexport function setErrorMap(map) {\n overrideErrorMap = map;\n}\nexport function getErrorMap() {\n return overrideErrorMap;\n}\n","import { ZodIssueCode } from \"../ZodError.js\";\nimport { util, ZodParsedType } from \"../helpers/util.js\";\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"bigint\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\nexport default errorMap;\n","import { util } from \"./helpers/util.js\";\nexport const ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nexport const quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexport class ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n const firstEl = sub.path[0];\n fieldErrors[firstEl] = fieldErrors[firstEl] || [];\n fieldErrors[firstEl].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n","export var util;\n(function (util) {\n util.assertEqual = (_) => { };\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => (typeof val === \"string\" ? `'${val}'` : val)).join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nexport var objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nexport const ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n","import { getErrorMap } from \"../errors.js\";\nimport defaultErrorMap from \"../locales/en.js\";\nexport const makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexport const EMPTY_PATH = [];\nexport function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap, // contextual error map is first priority\n ctx.schemaErrorMap, // then schema-bound map if available\n overrideMap, // then global override map\n overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexport class ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexport const INVALID = Object.freeze({\n status: \"aborted\",\n});\nexport const DIRTY = (value) => ({ status: \"dirty\", value });\nexport const OK = (value) => ({ status: \"valid\", value });\nexport const isAborted = (x) => x.status === \"aborted\";\nexport const isDirty = (x) => x.status === \"dirty\";\nexport const isValid = (x) => x.status === \"valid\";\nexport const isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n","import { ZodError, ZodIssueCode, } from \"./ZodError.js\";\nimport { defaultErrorMap, getErrorMap } from \"./errors.js\";\nimport { errorUtil } from \"./helpers/errorUtil.js\";\nimport { DIRTY, INVALID, OK, ParseStatus, addIssueToContext, isAborted, isAsync, isDirty, isValid, makeIssue, } from \"./helpers/parseUtil.js\";\nimport { util, ZodParsedType, getParsedType } from \"./helpers/util.js\";\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nexport class ZodType {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap,\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async,\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n };\n }\n catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true,\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true,\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data),\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n// const ipv6Regex =\n// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\nconst ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\nconst ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// https://base64.guru/standards/base64url\nconst base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\"; // require seconds if precision is nonzero\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nfunction isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n if (!header)\n return false;\n // Convert base64url to base64\n const base64 = header\n .replace(/-/g, \"+\")\n .replace(/_/g, \"/\")\n .padEnd(header.length + ((4 - (header.length % 4)) % 4), \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isValidCidr(ip, version) {\n if ((version === \"v4\" || !version) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n}\nexport class ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n base64url(message) {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message),\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nexport class ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params),\n });\n};\nexport class ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n }\n catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params),\n });\n};\nexport class ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params),\n });\n};\nexport class ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nexport class ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nexport class ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nexport class ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nexport class ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nexport class ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nexport class ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nexport class ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nexport class ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nexport class ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<T, Augmentation>,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n this._cached = { shape, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") {\n }\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message).message ?? defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // <Def extends ZodObjectDef>(def: Def) =>\n // <Augmentation extends ZodRawShape>(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge<Incoming extends AnyZodObject>(\n // merging: Incoming\n // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n // ZodObject<\n // extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nexport class ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nexport class ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nexport class ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\n// type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];\nexport class ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nexport class ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nexport class ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nexport class ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nexport class ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nexport class ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nexport class ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nexport class ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\nZodEnum.create = createZodEnum;\nexport class ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nexport class ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nexport class ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return INVALID;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {\n if (!isValid(base))\n return INVALID;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result,\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nexport { ZodEffects as ZodTransformer };\nexport class ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nexport class ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nexport class ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params),\n });\n};\nexport class ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nexport class ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nexport const BRAND = Symbol(\"zod_brand\");\nexport class ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nexport class ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nexport class ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\n////////////////////////////////////////\n////////////////////////////////////////\n////////// //////////\n////////// z.custom //////////\n////////// //////////\n////////////////////////////////////////\n////////////////////////////////////////\nfunction cleanParams(params, data) {\n const p = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n return p2;\n}\nexport function custom(check, _params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n const r = check(data);\n if (r instanceof Promise) {\n return r.then((r) => {\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n}\nexport { ZodType as Schema, ZodType as ZodSchema };\nexport const late = {\n object: ZodObject.lazycreate,\n};\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nexport const coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexport { anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, dateType as date, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, instanceOfType as instanceof, intersectionType as intersection, lazyType as lazy, literalType as literal, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, recordType as record, setType as set, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, voidType as void, };\nexport const NEVER = INVALID;\n","export var errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n // biome-ignore lint:\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message?.message;\n})(errorUtil || (errorUtil = {}));\n","import { z } from \"zod\";\n\nexport const CustomReadmeSectionSchema = z.strictObject({\n title: z.string(),\n content: z.string()\n});\n\nexport type CustomReadmeSectionSchema = z.infer<typeof CustomReadmeSectionSchema>;\n","import { ClassInstantiation, ClassReference, CodeBlock, MethodInvocation } from \"./ast\";\nimport { Class } from \"./ast/Class\";\nimport { Method } from \"./ast/Method\";\nimport { Parameter } from \"./ast/Parameter\";\n\nexport function codeblock(arg: CodeBlock.Arg): CodeBlock {\n return new CodeBlock(arg);\n}\n\nexport function class_(args: Class.Args): Class {\n return new Class(args);\n}\n\nexport function classReference(args: ClassReference.Args): ClassReference {\n return new ClassReference(args);\n}\n\nexport function instantiateClass(args: ClassInstantiation.Args): ClassInstantiation {\n return new ClassInstantiation(args);\n}\n\nexport function invokeMethod(args: MethodInvocation.Args): MethodInvocation {\n return new MethodInvocation(args);\n}\n\nexport function method(args: Method.Args): Method {\n return new Method(args);\n}\n\nexport function parameter(args: Parameter.Args): Parameter {\n return new Parameter(args);\n}\n\nexport {\n Access,\n type BuilderParameter,\n Class,\n ClassInstantiation,\n ClassReference,\n CodeBlock,\n type ConstructorParameter,\n Method,\n MethodInvocation,\n Parameter,\n Type,\n TypeLiteral,\n Writer\n} from \"./ast\";\nexport { AstNode } from \"./ast/core/AstNode\";\n","export { Access } from \"./Access\";\nexport { Class } from \"./Class\";\nexport { ClassInstantiation } from \"./ClassInstantiation\";\nexport { ClassReference } from \"./ClassReference\";\nexport { CodeBlock } from \"./CodeBlock\";\nexport { AstNode } from \"./core/AstNode\";\nexport { Writer } from \"./core/Writer\";\nexport { Method } from \"./Method\";\nexport { MethodInvocation } from \"./MethodInvocation\";\nexport { Parameter } from \"./Parameter\";\nexport { Type } from \"./Type\";\nexport { type BuilderParameter, type ConstructorParameter, TypeLiteral } from \"./TypeLiteral\";\n","export const Access = {\n Public: \"public\",\n Protected: \"protected\",\n Private: \"private\"\n} as const;\n\nexport type Access = (typeof Access)[keyof typeof Access];\n","import { Access } from \"./Access\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Method } from \"./Method\";\n\nexport declare namespace Class {\n interface Args {\n /* The name of the class */\n name: string;\n /* The access level of the class */\n access: Access;\n }\n}\n\nexport class Class extends AstNode {\n public readonly name: string;\n public readonly access: Access;\n\n private methods: Method[] = [];\n\n constructor({ name, access }: Class.Args) {\n super();\n\n this.name = name;\n this.access = access;\n }\n\n public write(writer: Writer): void {\n writer.write(`${this.access} class ${this.name}`);\n if (this.isEmpty()) {\n writer.writeLine(\" {}\");\n return;\n }\n writer.writeLine(\" {\");\n writer.indent();\n for (const method of this.methods) {\n writer.writeNode(method);\n writer.newLine();\n }\n writer.dedent();\n writer.write(\"}\");\n }\n\n public addMethod(method: Method): void {\n this.methods.push(method);\n }\n\n private isEmpty(): boolean {\n return this.methods.length === 0;\n }\n}\n","import { AbstractAstNode, AbstractFormatter } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { BaseJavaCustomConfigSchema } from \"../../custom-config/BaseJavaCustomConfigSchema\";\nimport { JavaFile } from \"./JavaFile\";\n\nexport abstract class AstNode extends AbstractAstNode {\n /**\n * Writes the node to a string.\n */\n public async toStringAsync({\n packageName,\n customConfig,\n formatter\n }: {\n packageName: string;\n customConfig: BaseJavaCustomConfigSchema;\n formatter?: AbstractFormatter;\n }): Promise<string> {\n const file = new JavaFile({\n packageName,\n customConfig,\n formatter\n });\n this.write(file);\n return file.toStringAsync();\n }\n\n /**\n * Writes the node to a string.\n */\n public toString({\n packageName,\n customConfig,\n formatter\n }: {\n packageName: string;\n customConfig: BaseJavaCustomConfigSchema;\n formatter?: AbstractFormatter;\n }): string {\n const file = new JavaFile({\n packageName,\n customConfig,\n formatter\n });\n this.write(file);\n return file.toString();\n }\n}\n","export { AbstractAstNode } from \"./AbstractAstNode\";\nexport { AbstractFormatter, NopFormatter } from \"./AbstractFormatter\";\nexport { AbstractWriter } from \"./AbstractWriter\";\nexport {\n type Argument,\n type Arguments,\n hasNamedArgument,\n isNamedArgument,\n type NamedArgument,\n type UnnamedArgument\n} from \"./Argument\";\nexport { CodeBlock } from \"./CodeBlock\";\nexport { Ternary } from \"./Ternary\";\n","import { AbstractWriter } from \"./AbstractWriter\";\n\nexport abstract class AbstractAstNode {\n /**\n * Every AST node knows how to write itself to a string.\n */\n public abstract write(writer: AbstractWriter): void;\n}\n","export abstract class AbstractFormatter {\n abstract format(content: string): Promise<string>;\n abstract formatSync(content: string): string;\n formatMultiple(contents: string[]): Promise<string[]> {\n return Promise.all(contents.map((content) => this.format(content)));\n }\n formatMultipleSync(contents: string[]): string[] {\n return contents.map((content) => this.formatSync(content));\n }\n}\n\nexport class NopFormatter extends AbstractFormatter {\n public async format(content: string): Promise<string> {\n return content;\n }\n\n public formatSync(content: string): string {\n return content;\n }\n}\n","import { AbstractAstNode } from \"./AbstractAstNode\";\nimport { CodeBlock } from \"./CodeBlock\";\n\nconst TAB_SIZE = 4;\n\nconst enableStackTracking = !!process.env[\"FERN_STACK_TRACK\"];\n\nif (enableStackTracking) {\n // let it get more frames, we like to trim out a bunch.\n Error.stackTraceLimit = 50;\n}\n\nexport class AbstractWriter {\n /* The contents being written */\n public buffer = \"\";\n /* Indentation level (multiple of 4) */\n private indentLevel = 0;\n /* Whether anything has been written to the buffer */\n private hasWrittenAnything = false;\n /* Whether the last character written was a semi colon */\n private lastCharacterIsSemicolon = false;\n /* Whether the last character written was a newline */\n private lastCharacterIsNewline = false;\n\n /**\n * Writes arbitrary text and nodes\n * @param text\n */\n public write(...parts: (string | AbstractAstNode | undefined)[]): void {\n for (const text of parts) {\n if (text != null) {\n if (typeof text === \"string\") {\n const textEndsInNewline = text.length > 0 && text.endsWith(\"\\n\");\n // temporarily remove the trailing newline, since we don't want to add the indent prefix after it\n const textWithoutNewline = textEndsInNewline ? text.substring(0, text.length - 1) : text;\n\n const indent = this.getIndentString();\n let indentedText = textWithoutNewline.replaceAll(\"\\n\", `\\n${indent}`);\n if (this.isAtStartOfLine()) {\n indentedText = indent + indentedText;\n }\n if (textEndsInNewline) {\n indentedText += \"\\n\";\n }\n this.writeInternal(indentedText);\n } else {\n this.writeNode(text);\n }\n }\n }\n }\n\n public writeStatement(...parts: (string | AbstractAstNode | undefined)[]): void {\n this.write(...parts);\n this.write(\";\");\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Writes arbitrary text without indentation\n * @param text\n */\n public writeNoIndent(text: string): void {\n const currIndentLevel = this.indentLevel;\n this.indentLevel = 0;\n this.write(text);\n this.indentLevel = currIndentLevel;\n }\n\n /**\n * Writes a node\n * @param node\n */\n public writeNode(node: AbstractAstNode): void {\n node.write(this);\n }\n\n /**\n * Writes a node or string\n * @param input\n */\n public writeNodeOrString(input: AbstractAstNode | string): void {\n if (typeof input === \"string\") {\n this.write(input);\n return;\n }\n\n this.writeNode(input);\n }\n\n /**\n * Writes a node but then suffixes with a `;` and new line\n * @param node\n */\n public writeNodeStatement(node: AbstractAstNode): void {\n node.write(this);\n this.write(\";\");\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Writes text but then suffixes with a `;`\n * @param node\n */\n public writeTextStatement(text: string): void {\n const codeBlock = new CodeBlock(text);\n codeBlock.write(this);\n if (!text.endsWith(\";\")) {\n this.write(\";\");\n }\n this.writeNewLineIfLastLineNot();\n }\n\n /**\n * Starts a control flow block\n * @param prefix\n * @param statement\n */\n public controlFlow(prefix: string, statement: AbstractAstNode): void {\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.write(\" (\", statement, \")\");\n this.pushScope();\n }\n\n /**\n * Starts a control flow block\n * @param prefix\n * @param statement\n */\n public controlFlowWithoutStatement(prefix: string): void {\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.pushScope();\n }\n\n /**\n * Ends a control flow block\n */\n public endControlFlow(): void {\n this.popScope();\n }\n\n /**\n * Starts a control flow without a newline from the previous control flow block\n * @param prefix\n * @param statement\n */\n public contiguousControlFlow(prefix: string, statement: AbstractAstNode): void {\n this.dedent();\n this.write(\"} \");\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.write(\" (\", statement, \")\");\n this.pushScope();\n }\n\n /**\n * Starts a control flow alternative block\n * @param prefix\n */\n public alternativeControlFlow(prefix: string): void {\n this.dedent();\n this.write(\"} \");\n const codeBlock = new CodeBlock(prefix);\n codeBlock.write(this);\n this.pushScope();\n }\n\n public pushScope() {\n this.writeLine(\"{\");\n this.indent();\n }\n\n public popScope(withNewline = true) {\n this.dedent();\n this.writeNewLineIfLastLineNot();\n if (withNewline) {\n this.writeLine(\"}\");\n } else {\n this.write(\"}\");\n }\n }\n\n /* Only writes a newline if last line in the buffer is not a newline */\n public writeLine(text = \"\"): void {\n this.write(text);\n this.writeNewLineIfLastLineNot();\n }\n\n /* Always writes newline */\n public newLine(): void {\n this.writeInternal(\"\\n\");\n }\n\n public writeSemicolonIfLastCharacterIsNot(): void {\n if (!this.lastCharacterIsSemicolon) {\n this.writeInternal(\";\");\n }\n }\n\n public writeNewLineIfLastLineNot(): void {\n if (!this.lastCharacterIsNewline) {\n this.writeInternal(\"\\n\");\n }\n }\n\n public indent(): void {\n this.indentLevel++;\n }\n\n public dedent(): void {\n this.indentLevel--;\n }\n\n public delimit<T extends AbstractAstNode>({\n nodes,\n delimiter,\n writeFunction\n }: {\n nodes: T[];\n delimiter: string;\n writeFunction: (node: T) => void;\n }): void {\n if (nodes.length > 0) {\n const firstNode = nodes[0];\n if (firstNode != null) {\n writeFunction(firstNode);\n }\n for (let i = 1; i < nodes.length; i++) {\n this.write(delimiter);\n const node = nodes[i];\n if (node != null) {\n writeFunction(node);\n }\n }\n }\n }\n\n public toString(): string {\n return this.buffer;\n }\n\n /*******************************\n * Helper Methods\n *******************************/\n\n private writeInternal(text: string): string {\n if (text.length > 0) {\n this.hasWrittenAnything = true;\n this.lastCharacterIsNewline = text.endsWith(\"\\n\");\n this.lastCharacterIsSemicolon = text.endsWith(\";\");\n }\n this.buffer += text;\n\n if (enableStackTracking && this.buffer.endsWith(\"\\n\") && !this.buffer.endsWith('\"\"\"\\n')) {\n const stackLine = this.stacktrace(15)\n .map((each) => `${each.fn} - ${each.path}:${each.position}`)\n .join(\" \");\n if (stackLine) {\n this.buffer = this.buffer.slice(0, -1);\n // this marker is used to easily identify stack traces in the generated code\n // (it also makes it easy to grep for them in a diff to make sure you're not commiting them)\n // use ` git diff | grep -i \"//@@\" ` to check\n this.buffer += `//` + `@@ ${stackLine}\\n`;\n }\n }\n\n return this.buffer;\n }\n\n private isAtStartOfLine(): boolean {\n return this.lastCharacterIsNewline || !this.hasWrittenAnything;\n }\n\n private getIndentString(): string {\n return \" \".repeat(this.indentLevel * this.getTabSize());\n }\n\n protected getTabSize(): number {\n return TAB_SIZE;\n }\n\n /**\n * This function is used to get the stack trace of the current code execution point.$\n * It cleans up the stack trace to remove unnecessary frames and return a list of frames.\n * (Used for debugging purposes)\n *\n * @returns A list of frames with the function name, path, and position.\n */\n private stacktrace(maxFrames: number = 50): { fn: string; path: string; position: string }[] {\n let stop = false;\n return (\n (new Error().stack ?? \"\")\n .split(\"\\n\")\n .map((line) => {\n const match = line.match(/at\\s+(.*)\\s+\\((.*):(\\d+):(\\d+)\\)/);\n if (match && match.length === 5) {\n let [, fn, path, line, column] = match;\n if (stop || fn?.includes(\"runInteractiveTask\")) {\n stop = true;\n return undefined;\n }\n switch (fn) {\n case \"Object.<anonymous>\":\n fn = \"\";\n break;\n case \"Object.object\":\n case \"Object.alias\":\n case \"Object.union\":\n case \"Object.enum\":\n case \"Object.undiscriminatedUnion\":\n fn = `${fn.substring(fn.indexOf(\".\") + 1)}()=> { ... }`;\n break;\n }\n return { fn, path: path?.replace(/^.*?fern.*?\\//, \"\") ?? \"\", position: `${line}:${column}` };\n }\n return undefined;\n })\n .filter(\n (each) =>\n each &&\n !each.path?.startsWith(\"node:\") &&\n !each.path?.endsWith(\".js\") &&\n !each.path?.includes(\"AbstractWriter\") &&\n !each.fn?.includes(\"stacktrace\") &&\n !each.fn?.includes(\"stackLine\") &&\n !each.fn?.includes(\"SdkGeneratorCLI\") &&\n !each.fn?.includes(\"runCli\")\n ) as {\n fn: string;\n path: string;\n position: string;\n }[]\n ).slice(0, maxFrames);\n }\n}\n","import { AbstractAstNode } from \"./AbstractAstNode\";\nimport { AbstractWriter } from \"./AbstractWriter\";\n\nexport declare namespace CodeBlock {\n /* Write arbitrary code */\n type Arg<T extends AbstractWriter> = string | AbstractAstNode | ((writer: T) => void);\n}\n\nexport class CodeBlock<T extends AbstractWriter> extends AbstractAstNode {\n private value: CodeBlock.Arg<T>;\n\n constructor(value: CodeBlock.Arg<T>) {\n super();\n this.value = value;\n }\n\n public write(writer: T): void {\n if (typeof this.value === \"string\") {\n writer.write(this.value);\n // if function\n } else if (typeof this.value === \"function\") {\n this.value(writer);\n } else {\n this.value.write(writer);\n }\n }\n}\n","import { AbstractAstNode } from \"./AbstractAstNode\";\n\nexport type Argument = NamedArgument | UnnamedArgument;\n\nexport type Arguments = NamedArgument[] | UnnamedArgument[];\n\nexport interface NamedArgument {\n name: string;\n assignment: AbstractAstNode | string;\n docs?: string;\n}\n\nexport type UnnamedArgument = AbstractAstNode;\n\nexport function isNamedArgument(argument: NamedArgument | UnnamedArgument): argument is NamedArgument {\n return (argument as NamedArgument)?.name != null;\n}\n\nexport function hasNamedArgument(arguments_: Arguments): boolean {\n return arguments_.length > 0 && arguments_[0] != null && isNamedArgument(arguments_[0]);\n}\n","import { Writer } from \"./Writer\";\n\nexport declare namespace JavaFile {\n interface Args extends Writer.Args {}\n}\n\nexport class JavaFile extends Writer {\n constructor({ packageName, customConfig, formatter }: JavaFile.Args) {\n super({ packageName, customConfig, formatter });\n }\n\n public async toStringAsync(): Promise<string> {\n const content = this.getContent();\n if (this.formatter != null) {\n try {\n return this.formatter.format(content);\n } catch (error) {\n throw new Error(`Failed to format Java file: ${error}\\n${content}`);\n }\n }\n return content;\n }\n\n public toString(): string {\n const content = this.getContent();\n if (this.formatter != null) {\n try {\n return this.formatter.formatSync(content);\n } catch (error) {\n throw new Error(`Failed to format Java file: ${error}\\n${content}`);\n }\n }\n return content;\n }\n\n private getContent(): string {\n const packageStatement = `package ${this.packageName};\\n\\n`;\n const imports = this.stringifyImports();\n return imports.length > 0\n ? `${packageStatement}${imports}\n\n${this.buffer}`\n : packageStatement + this.buffer;\n }\n\n private stringifyImports(): string {\n return Array.from(this.imports)\n .filter((packageName) => packageName !== this.packageName) // Skip the target package\n .map((packageName) => `import ${packageName};`)\n .sort()\n .join(\"\\n\");\n }\n}\n","import { AbstractFormatter, AbstractWriter, NopFormatter } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { BaseJavaCustomConfigSchema } from \"../../custom-config/BaseJavaCustomConfigSchema\";\n\ntype PackageName = string;\n\nexport declare namespace Writer {\n interface Args {\n /* The package name of the file */\n packageName: string;\n /* Custom generator config */\n customConfig: BaseJavaCustomConfigSchema;\n /* Formatter used to format Java source files */\n formatter?: AbstractFormatter;\n }\n}\n\nexport class Writer extends AbstractWriter {\n /* The package name that is being written to */\n public packageName: string;\n /* Custom generator config */\n public customConfig: BaseJavaCustomConfigSchema;\n /* Formatter used to format Java source files */\n public formatter: AbstractFormatter;\n\n /* Import statements */\n protected imports: Set<PackageName> = new Set();\n\n constructor({ packageName, customConfig, formatter }: Writer.Args) {\n super();\n this.packageName = packageName;\n this.customConfig = customConfig;\n this.formatter = formatter ?? new NopFormatter();\n }\n\n /**\n * Adds the given package name to the rolling set.\n */\n public addImport(packageName: string): void {\n this.imports.add(packageName);\n }\n\n /**\n * Gets the current set of imports.\n */\n public getImports(): Set<PackageName> {\n return new Set(this.imports);\n }\n}\n","import { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { writeArguments } from \"./utils/writeArguments\";\n\nexport declare namespace ClassInstantiation {\n interface Args {\n /* The class to instantiate */\n classReference: ClassReference;\n /* The arguments passed to the constructor */\n arguments_: AstNode[];\n }\n}\n\nexport class ClassInstantiation extends AstNode {\n private classReference: ClassReference;\n private arguments_: AstNode[];\n\n constructor({ classReference, arguments_ }: ClassInstantiation.Args) {\n super();\n\n this.classReference = classReference;\n this.arguments_ = arguments_;\n }\n\n public write(writer: Writer): void {\n writer.writeNode(this.classReference);\n writeArguments({ writer, arguments_: this.arguments_ });\n }\n}\n","import { Argument, Arguments, isNamedArgument } from \"@fern-api/browser-compatible-base-generator\";\nimport { Writer } from \"../core/Writer\";\nimport { TypeLiteral } from \"../TypeLiteral\";\n\nexport function writeArguments({ writer, arguments_ }: { writer: Writer; arguments_: Arguments }): void {\n const filteredArguments = filterNopArguments(arguments_);\n if (filteredArguments.length === 0) {\n writer.write(\"()\");\n return;\n }\n const shouldWriteMultiline = filteredArguments.some((arg) => {\n return arg instanceof TypeLiteral && !arg.shouldWriteInLine();\n });\n if (shouldWriteMultiline) {\n writeMultilineArguments({ writer, arguments_: filteredArguments });\n return;\n }\n writer.write(\"(\");\n filteredArguments.forEach((argument, index) => {\n if (index > 0) {\n writer.write(\", \");\n }\n writeArgument({ writer, argument });\n });\n writer.write(\")\");\n}\n\nfunction writeMultilineArguments({ writer, arguments_ }: { writer: Writer; arguments_: Argument[] }): void {\n writer.writeLine(\"(\");\n writer.indent();\n arguments_.forEach((argument, index) => {\n if (index > 0) {\n writer.writeLine(\",\");\n }\n writeArgument({ writer, argument });\n });\n writer.dedent();\n if (arguments_.length > 0) {\n writer.newLine();\n }\n writer.write(\")\");\n}\n\nfunction writeArgument({ writer, argument }: { writer: Writer; argument: Argument }): void {\n if (isNamedArgument(argument)) {\n writer.writeNodeOrString(argument.assignment);\n } else {\n argument.write(writer);\n }\n}\n\nfunction filterNopArguments(arguments_: Argument[]): Argument[] {\n return arguments_.filter((argument) => !(argument instanceof TypeLiteral && TypeLiteral.isNop(argument)));\n}\n","import { assertNever } from \"@fern-api/core-utils\";\n\nimport { java } from \"..\";\nimport { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { ArraysClassReference, OptionalClassReference, Type } from \"./Type\";\n\ntype InternalTypeLiteral =\n | BigInteger\n | Boolean_\n | Builder\n | Bytes\n | Class_\n | Date\n | DateTime\n | Double\n | Enum\n | Float\n | Integer\n | List\n | Long\n | Map\n | Optional\n | Raw\n | Reference\n | Set\n | String_\n | Unknown\n | UUID\n | Nop;\n\ninterface BigInteger {\n type: \"bigInteger\";\n value: string;\n}\n\ninterface Boolean_ {\n type: \"boolean\";\n value: boolean;\n}\n\ninterface Builder {\n type: \"builder\";\n classReference: ClassReference;\n parameters: BuilderParameter[];\n}\n\nexport interface BuilderParameter {\n name: string;\n value: TypeLiteral;\n}\n\ninterface Bytes {\n type: \"bytes\";\n value: string;\n}\n\ninterface Class_ {\n type: \"class\";\n reference: ClassReference;\n parameters: ConstructorParameter[];\n}\n\nexport interface ConstructorParameter {\n name: string;\n value: TypeLiteral;\n}\n\ninterface Float {\n type: \"float\";\n value: number;\n}\n\ninterface Date {\n type: \"date\";\n value: string;\n}\n\ninterface DateTime {\n type: \"dateTime\";\n value: string;\n}\n\ninterface Double {\n type: \"double\";\n value: number;\n}\n\ninterface Enum {\n type: \"enum\";\n classReference: ClassReference;\n value: string;\n}\n\ninterface Integer {\n type: \"integer\";\n value: number;\n}\n\ninterface List {\n type: \"list\";\n valueType: Type;\n values: TypeLiteral[];\n isParameter?: boolean; // If true, generates Arrays.asList() directly for method parameters instead of wrapping with new ArrayList()\n}\n\ninterface Long {\n type: \"long\";\n value: number;\n}\n\ninterface Map {\n type: \"map\";\n keyType: Type;\n valueType: Type;\n entries: MapEntry[];\n}\n\ninterface MapEntry {\n key: TypeLiteral;\n value: TypeLiteral;\n}\n\ninterface Optional {\n type: \"optional\";\n value: TypeLiteral;\n useOf?: boolean;\n}\n\ninterface Raw {\n type: \"raw\";\n value: string | AstNode;\n}\n\ninterface Reference {\n type: \"reference\";\n value: AstNode;\n}\n\ninterface Set {\n type: \"set\";\n valueType: Type;\n values: TypeLiteral[];\n}\n\ninterface String_ {\n type: \"string\";\n value: string;\n}\n\ninterface Unknown {\n type: \"unknown\";\n value: unknown;\n}\n\ninterface UUID {\n type: \"uuid\";\n value: string;\n}\n\ninterface Nop {\n type: \"nop\";\n}\n\nexport class TypeLiteral extends AstNode {\n private constructor(public readonly internalType: InternalTypeLiteral) {\n super();\n }\n\n public write(writer: Writer): void {\n switch (this.internalType.type) {\n case \"bigInteger\":\n this.writeBigInteger({ writer, bigInteger: this.internalType });\n break;\n case \"boolean\":\n writer.write(this.internalType.value.toString());\n break;\n case \"builder\":\n this.writeBuilder({ writer, builder: this.internalType });\n break;\n case \"bytes\":\n writer.write(`\"${this.internalType.value}\".getBytes()`);\n break;\n case \"class\": {\n this.writeClass({ writer, class_: this.internalType });\n break;\n }\n case \"date\":\n writer.write(`\"${this.internalType.value}\"`);\n break;\n case \"dateTime\":\n this.writeDateTime({ writer, dateTime: this.internalType });\n break;\n case \"double\": {\n const valueStr = this.internalType.value.toString();\n if (!valueStr.includes(\".\") && !valueStr.includes(\"e\") && !valueStr.includes(\"E\")) {\n writer.write(`${valueStr}.0`);\n } else {\n writer.write(valueStr);\n }\n break;\n }\n case \"enum\":\n this.writeEnum({ writer, enum_: this.internalType });\n break;\n case \"float\":\n writer.write(`${this.internalType.value}f`);\n break;\n case \"integer\":\n writer.write(Math.floor(this.internalType.value).toString());\n break;\n case \"list\": {\n this.writeList({ writer, list: this.internalType });\n break;\n }\n case \"long\": {\n writer.write(`${Math.floor(this.internalType.value)}L`);\n break;\n }\n case \"map\": {\n this.writeMap({ writer, map: this.internalType });\n break;\n }\n case \"optional\": {\n this.writeOptional({ writer, optional: this.internalType });\n break;\n }\n case \"raw\": {\n if (this.internalType.value instanceof AstNode) {\n writer.writeNode(this.internalType.value);\n } else {\n writer.write(this.internalType.value);\n }\n break;\n }\n case \"reference\":\n writer.writeNode(this.internalType.value);\n break;\n case \"set\": {\n this.writeSet({ writer, set: this.internalType });\n break;\n }\n case \"string\":\n writer.write(`\"${this.escapeString(this.internalType.value)}\"`);\n break;\n case \"unknown\":\n this.writeUnknown({ writer, value: this.internalType.value });\n break;\n case \"uuid\":\n this.writeUUID({ writer, uuid: this.internalType });\n break;\n case \"nop\":\n break;\n default:\n assertNever(this.internalType);\n }\n }\n\n public isOptional(): boolean {\n return this.internalType.type === \"optional\";\n }\n\n /* Static factory methods for creating a Type */\n public static bigInteger(value: string): TypeLiteral {\n return new this({\n type: \"bigInteger\",\n value\n });\n }\n\n public static boolean(value: boolean): TypeLiteral {\n return new this({\n type: \"boolean\",\n value\n });\n }\n\n public static builder({\n classReference,\n parameters\n }: {\n classReference: ClassReference;\n parameters: BuilderParameter[];\n }): TypeLiteral {\n return new this({ type: \"builder\", classReference, parameters });\n }\n\n public static bytes(value: string): TypeLiteral {\n return new this({\n type: \"bytes\",\n value\n });\n }\n\n public static class_({\n reference,\n parameters\n }: {\n reference: ClassReference;\n parameters: ConstructorParameter[];\n }): TypeLiteral {\n return new this({ type: \"class\", reference, parameters });\n }\n\n public static date(value: string): TypeLiteral {\n return new this({\n type: \"date\",\n value\n });\n }\n\n public static dateTime(value: string): TypeLiteral {\n return new this({\n type: \"dateTime\",\n value\n });\n }\n\n public static double(value: number): TypeLiteral {\n return new this({\n type: \"double\",\n value\n });\n }\n\n public static enum_({ classReference, value }: { classReference: ClassReference; value: string }): TypeLiteral {\n return new this({\n type: \"enum\",\n classReference,\n value\n });\n }\n\n public static float(value: number): TypeLiteral {\n return new this({\n type: \"float\",\n value\n });\n }\n\n public static integer(value: number): TypeLiteral {\n return new this({\n type: \"integer\",\n value\n });\n }\n\n public static list({\n valueType,\n values,\n isParameter\n }: {\n valueType: Type;\n values: TypeLiteral[];\n isParameter?: boolean;\n }): TypeLiteral {\n return new this({\n type: \"list\",\n valueType,\n values,\n isParameter\n });\n }\n\n public static long(value: number): TypeLiteral {\n return new this({\n type: \"long\",\n value\n });\n }\n\n public static map({\n keyType,\n valueType,\n entries\n }: {\n keyType: Type;\n valueType: Type;\n entries: MapEntry[];\n }): TypeLiteral {\n return new this({\n type: \"map\",\n keyType,\n valueType,\n entries\n });\n }\n\n public static optional({ value, useOf }: { value: TypeLiteral; useOf?: boolean }): TypeLiteral {\n // Avoids double optional.\n if (this.isAlreadyOptional(value)) {\n return value;\n }\n return new this({\n type: \"optional\",\n value,\n useOf\n });\n }\n\n public static raw(value: string | AstNode): TypeLiteral {\n return new this({\n type: \"raw\",\n value\n });\n }\n\n public static reference(value: AstNode): TypeLiteral {\n return new this({\n type: \"reference\",\n value\n });\n }\n\n public static set({ valueType, values }: { valueType: Type; values: TypeLiteral[] }): TypeLiteral {\n return new this({\n type: \"set\",\n valueType,\n values\n });\n }\n\n public static string(value: string): TypeLiteral {\n return new this({\n type: \"string\",\n value\n });\n }\n\n public static unknown(value: unknown): TypeLiteral {\n return new this({\n type: \"unknown\",\n value\n });\n }\n\n public static uuid(value: string): TypeLiteral {\n return new this({\n type: \"uuid\",\n value\n });\n }\n\n public static nop(): TypeLiteral {\n return new this({\n type: \"nop\"\n });\n }\n\n public static isNop(typeLiteral: TypeLiteral): boolean {\n return typeLiteral.internalType.type === \"nop\";\n }\n\n /* Returns true if the type literal should be written on a single line. */\n public shouldWriteInLine(): boolean {\n switch (this.internalType.type) {\n case \"bigInteger\":\n case \"boolean\":\n case \"bytes\":\n case \"date\":\n case \"dateTime\":\n case \"double\":\n case \"enum\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"nop\":\n case \"raw\":\n case \"string\":\n case \"unknown\":\n case \"uuid\":\n return true;\n case \"optional\":\n return this.internalType.value.shouldWriteInLine();\n case \"builder\":\n case \"class\":\n case \"list\":\n case \"map\":\n case \"reference\":\n case \"set\":\n return false;\n default:\n assertNever(this.internalType);\n }\n }\n\n private writeBigInteger({ writer, bigInteger }: { writer: Writer; bigInteger: BigInteger }): void {\n writer.write(\"new \");\n writer.writeNode(\n java.instantiateClass({\n classReference: BigIntegerClassReference,\n arguments_: [TypeLiteral.string(bigInteger.value)]\n })\n );\n }\n\n private writeBuilder({ writer, builder }: { writer: Writer; builder: Builder }): void {\n writer.writeNode(builder.classReference);\n writer.writeNewLineIfLastLineNot();\n writer.indent();\n this.writeBuilderParameters({\n writer,\n parameters: this.orderBuilderParameters(filterNopBuilderParameters({ parameters: builder.parameters }))\n });\n writer.dedent();\n }\n\n private writeBuilderParameters({ writer, parameters }: { writer: Writer; parameters: BuilderParameter[] }): void {\n writer.writeLine(\".builder()\");\n for (const parameter of parameters) {\n writer.write(`.${parameter.name}(`);\n if (!parameter.value.shouldWriteInLine()) {\n writer.newLine();\n }\n writer.indent();\n writer.writeNode(parameter.value);\n writer.dedent();\n if (!parameter.value.shouldWriteInLine()) {\n writer.newLine();\n }\n writer.writeLine(\")\");\n }\n writer.writeNewLineIfLastLineNot();\n writer.write(\".build()\");\n }\n\n public orderBuilderParameters(parameters: java.BuilderParameter[]): java.BuilderParameter[] {\n return parameters.sort((a, b) => {\n if (a.value.isOptional() && !b.value.isOptional()) {\n return 1;\n }\n if (!a.value.isOptional() && b.value.isOptional()) {\n return -1;\n }\n return 0;\n });\n }\n\n private writeClass({ writer, class_: class_ }: { writer: Writer; class_: Class_ }): void {\n const parameters = filterNopConstructorParameters({ parameters: class_.parameters });\n writer.writeNode(\n java.instantiateClass({\n classReference: class_.reference,\n arguments_: parameters.map((parameter) => parameter.value)\n })\n );\n }\n\n private writeDateTime({ writer, dateTime }: { writer: Writer; dateTime: DateTime }): void {\n writer.writeNode(\n java.invokeMethod({\n on: OffsetDateTimeClassReference,\n method: \"parse\",\n arguments_: [TypeLiteral.string(dateTime.value)]\n })\n );\n }\n\n private writeEnum({ writer, enum_: enum_ }: { writer: Writer; enum_: Enum }): void {\n writer.writeNode(enum_.classReference);\n writer.write(\".\" + enum_.value);\n }\n\n private writeList({ writer, list }: { writer: Writer; list: List }): void {\n this.writeIterable({ writer, iterable: list });\n }\n\n private writeMap({ writer, map }: { writer: Writer; map: Map }): void {\n const entries = filterNopMapEntries({ entries: map.entries });\n if (entries.length === 0) {\n writer.write(\"new \");\n writer.writeNode(HashMapClassReference);\n writer.write(\"<\");\n writer.writeNode(map.keyType);\n writer.write(\", \");\n writer.writeNode(map.valueType);\n writer.write(\">()\");\n return;\n }\n\n writer.write(\"new \");\n writer.writeNode(HashMapClassReference);\n writer.write(\"<\");\n writer.writeNode(map.keyType);\n writer.write(\", \");\n writer.writeNode(map.valueType);\n writer.writeLine(\">() {{\");\n writer.indent();\n for (const entry of entries) {\n writer.write(\"put(\");\n writer.writeNode(entry.key);\n writer.write(\", \");\n writer.writeNode(entry.value);\n writer.writeLine(\");\");\n }\n writer.dedent();\n writer.write(\"}}\");\n }\n\n private writeOptional({ writer, optional }: { writer: Writer; optional: Optional }): void {\n if (!optional.useOf) {\n writer.writeNode(optional.value);\n return;\n }\n writer.writeNode(\n java.invokeMethod({\n on: OptionalClassReference,\n method: \"of\",\n arguments_: [optional.value]\n })\n );\n }\n\n private writeSet({ writer, set }: { writer: Writer; set: Set }): void {\n this.writeIterable({ writer, iterable: set });\n }\n\n private writeIterable({ writer, iterable }: { writer: Writer; iterable: List | Set }): void {\n const classReference = iterable.type === \"list\" ? ArrayListClassReference : HashSetClassReference;\n const values = filterNopValues({ values: iterable.values });\n\n if (iterable.type === \"list\" && iterable.isParameter && values.length > 0) {\n writer.writeNode(\n java.invokeMethod({\n on: ArraysClassReference,\n method: \"asList\",\n arguments_: values\n })\n );\n return;\n }\n\n if (values.length === 0) {\n writer.write(`new ${classReference.name}<`);\n writer.writeNode(iterable.valueType);\n writer.write(\">()\");\n return;\n }\n\n writer.write(\"new \");\n writer.writeNode(classReference);\n writer.write(\"<\");\n writer.writeNode(iterable.valueType);\n writer.writeLine(\">(\");\n writer.indent();\n writer.writeNode(\n java.invokeMethod({\n on: ArraysClassReference,\n method: \"asList\",\n arguments_: values\n })\n );\n writer.writeNewLineIfLastLineNot();\n writer.dedent();\n writer.write(\")\");\n }\n\n private writeUnknown({ writer, value }: { writer: Writer; value: unknown }): void {\n switch (typeof value) {\n case \"boolean\":\n writer.write(value.toString());\n return;\n case \"string\":\n writer.write(`\"${this.escapeString(value)}\"`);\n return;\n case \"number\":\n writer.write(value.toString());\n return;\n case \"object\":\n if (value == null) {\n writer.write(\"null\");\n return;\n }\n if (Array.isArray(value)) {\n this.writeUnknownArray({ writer, value });\n return;\n }\n this.writeUnknownMap({ writer, value });\n return;\n default:\n throw new Error(`Internal error; unsupported unknown type: ${typeof value}`);\n }\n }\n\n private writeUnknownArray({\n writer,\n value\n }: {\n writer: Writer;\n // biome-ignore lint/suspicious/noExplicitAny: allow\n value: any[];\n }): void {\n if (value.length === 0) {\n writer.write(\"new \");\n writer.writeNode(ArrayListClassReference);\n writer.write(\"<Object>()\");\n return;\n }\n writer.write(\"new \");\n writer.writeNode(ArrayListClassReference);\n writer.write(\"<Object>(\");\n writer.writeNode(\n java.invokeMethod({\n on: ArraysClassReference,\n method: \"asList\",\n arguments_: value.map((element) => TypeLiteral.unknown(element))\n })\n );\n writer.write(\")\");\n }\n\n private writeUnknownMap({ writer, value }: { writer: Writer; value: object }): void {\n const entries = Object.entries(value);\n if (entries.length === 0) {\n writer.write(\"new \");\n writer.writeNode(HashMapClassReference);\n writer.write(\"<String, Object>()\");\n return;\n }\n writer.writeLine(\"new \");\n writer.writeNode(HashMapClassReference);\n writer.write(\"<String, Object>() {{\");\n writer.indent();\n for (const [key, val] of entries) {\n writer.write(`put(\"${key}\", `);\n writer.writeNode(TypeLiteral.unknown(val));\n writer.writeLine(\");\");\n }\n writer.dedent();\n writer.write(\"}}\");\n }\n\n private writeUUID({ writer, uuid }: { writer: Writer; uuid: UUID }): void {\n writer.writeNode(\n java.invokeMethod({\n on: UUIDClassReference,\n method: \"fromString\",\n arguments_: [TypeLiteral.string(uuid.value)]\n })\n );\n }\n\n private escapeString(input: string): string {\n return input\n .replace(/\\\\/g, \"\\\\\\\\\") // Escape backslashes\n .replace(/\"/g, '\\\\\"') // Escape double quotes\n .replace(/\\n/g, \"\\\\n\") // Escape newlines\n .replace(/\\r/g, \"\\\\r\") // Escape carriage returns\n .replace(/\\t/g, \"\\\\t\"); // Escape tabs\n }\n\n private static isAlreadyOptional(value: TypeLiteral) {\n return value.internalType.type === \"optional\";\n }\n}\n\nexport const ArrayListClassReference = new ClassReference({\n name: \"ArrayList\",\n packageName: \"java.util\"\n});\n\nexport const BigIntegerClassReference = new ClassReference({\n name: \"BigInteger\",\n packageName: \"java.math\"\n});\n\nexport const HashMapClassReference = new ClassReference({\n name: \"HashMap\",\n packageName: \"java.util\"\n});\n\nexport const HashSetClassReference = new ClassReference({\n name: \"HashSet\",\n packageName: \"java.util\"\n});\n\nexport const ListClassReference = new ClassReference({\n name: \"List\",\n packageName: \"java.util\"\n});\n\nexport const MapClassReference = new ClassReference({\n name: \"Map\",\n packageName: \"java.util\"\n});\n\nexport const OffsetDateTimeClassReference = new ClassReference({\n name: \"OffsetDateTime\",\n packageName: \"java.time\"\n});\n\nexport const SetClassReference = new ClassReference({\n name: \"Set\",\n packageName: \"java.util\"\n});\n\nexport const UUIDClassReference = new ClassReference({\n name: \"UUID\",\n packageName: \"java.util\"\n});\n\nfunction filterNopConstructorParameters({\n parameters\n}: {\n parameters: ConstructorParameter[];\n}): ConstructorParameter[] {\n return parameters.filter((parameter) => !TypeLiteral.isNop(parameter.value));\n}\n\nfunction filterNopBuilderParameters({ parameters }: { parameters: BuilderParameter[] }): BuilderParameter[] {\n return parameters.filter((parameter) => !TypeLiteral.isNop(parameter.value));\n}\n\nfunction filterNopMapEntries({ entries }: { entries: MapEntry[] }): MapEntry[] {\n return entries.filter((entry) => !TypeLiteral.isNop(entry.key) && !TypeLiteral.isNop(entry.value));\n}\n\nfunction filterNopValues({ values }: { values: TypeLiteral[] }): TypeLiteral[] {\n return values.filter((value) => !TypeLiteral.isNop(value));\n}\n","export { JavaFile } from \"./ast/core/JavaFile\";\nexport { BaseJavaCustomConfigSchema } from \"./custom-config/BaseJavaCustomConfigSchema\";\nexport * as java from \"./java\";\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace ClassReference {\n interface Args {\n /* The name of the Java class */\n name: string;\n /* The package name of the Java class */\n packageName: string;\n /* Force the class reference to be fully qualified */\n fullyQualified?: boolean;\n }\n}\n\nexport class ClassReference extends AstNode {\n public readonly name: string;\n public readonly packageName: string;\n public readonly fullyQualified: boolean;\n\n constructor({ name, packageName, fullyQualified }: ClassReference.Args) {\n super();\n this.name = name;\n this.packageName = packageName;\n this.fullyQualified = fullyQualified ?? false;\n }\n\n public write(writer: Writer): void {\n writer.addImport(`${this.packageName}.${this.name}`);\n if (this.fullyQualified) {\n writer.write(`${this.packageName}.${this.name}`);\n return;\n }\n writer.write(this.name);\n }\n}\n","import { assertNever } from \"@fern-api/core-utils\";\n\nimport { ClassReference } from \"./ClassReference\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\ntype InternalType =\n | Array\n | BigInteger\n | Boolean_\n | Bytes\n | Date\n | DateTime\n | Double\n | Float\n | Generic\n | InputStream\n | Integer\n | Iterable\n | List\n | Long\n | Map\n | Object_\n | Optional\n | Reference\n | Set\n | String_\n | UUID\n | Void;\n\ninterface Array {\n type: \"array\";\n value: Type;\n}\n\ninterface BigInteger {\n type: \"bigInteger\";\n}\n\ninterface Boolean_ {\n type: \"boolean\";\n}\n\ninterface Bytes {\n type: \"bytes\";\n}\n\ninterface Date {\n type: \"date\";\n}\n\ninterface DateTime {\n type: \"dateTime\";\n}\n\ninterface Double {\n type: \"double\";\n}\n\ninterface Float {\n type: \"float\";\n}\n\ninterface Generic {\n type: \"generic\";\n value: ClassReference;\n parameters: Type[];\n}\n\ninterface InputStream {\n type: \"inputStream\";\n}\n\ninterface Integer {\n type: \"integer\";\n}\n\ninterface Iterable {\n type: \"iterable\";\n value: Type;\n}\n\ninterface List {\n type: \"list\";\n value: Type;\n}\n\ninterface Long {\n type: \"long\";\n}\n\ninterface Map {\n type: \"map\";\n keyType: Type;\n valueType: Type;\n}\n\ninterface Object_ {\n type: \"object\";\n}\n\ninterface Optional {\n type: \"optional\";\n value: Type;\n}\n\ninterface Reference {\n type: \"reference\";\n value: ClassReference;\n}\n\ninterface Set {\n type: \"set\";\n value: Type;\n}\n\ninterface String_ {\n type: \"string\";\n}\n\ninterface UUID {\n type: \"uuid\";\n}\n\ninterface Void {\n type: \"void\";\n}\n\nexport class Type extends AstNode {\n private constructor(public readonly internalType: InternalType) {\n super();\n }\n\n // TODO: Add unboxed variants for primitive types\n public write(writer: Writer): void {\n switch (this.internalType.type) {\n case \"array\":\n writer.writeNode(this.internalType.value);\n writer.write(\"[]\");\n break;\n case \"bigInteger\":\n writer.writeNode(BigIntegerClassReference);\n break;\n case \"boolean\":\n writer.write(\"Boolean\");\n break;\n case \"bytes\":\n writer.write(\"byte[]\");\n break;\n case \"date\":\n writer.write(\"String\");\n break;\n case \"dateTime\":\n writer.writeNode(OffsetDateTimeClassReference);\n break;\n case \"double\":\n writer.write(\"Double\");\n break;\n case \"float\":\n writer.write(\"Float\");\n break;\n case \"generic\":\n writer.writeNode(this.internalType.value);\n writer.write(\"<\");\n for (const [index, parameter] of this.internalType.parameters.entries()) {\n writer.writeNode(parameter);\n if (index < this.internalType.parameters.length - 1) {\n writer.write(\", \");\n }\n }\n writer.write(\">\");\n break;\n case \"inputStream\":\n writer.writeNode(InputStreamClassReference);\n break;\n case \"integer\":\n writer.write(\"Integer\");\n break;\n case \"iterable\":\n this.writeIterable({ writer, iterable: this.internalType });\n break;\n case \"list\": {\n this.writeList({ writer, list: this.internalType });\n break;\n }\n case \"long\": {\n writer.write(\"Long\");\n break;\n }\n case \"map\": {\n this.writeMap({ writer, map: this.internalType });\n break;\n }\n case \"object\": {\n writer.write(\"Object\");\n break;\n }\n case \"optional\": {\n this.writeOptional({ writer, optional: this.internalType });\n break;\n }\n case \"reference\":\n writer.writeNode(this.internalType.value);\n break;\n case \"set\": {\n this.writeSet({ writer, set: this.internalType });\n break;\n }\n case \"string\":\n writer.write(\"String\");\n break;\n case \"uuid\":\n writer.writeNode(UUIDClassReference);\n break;\n case \"void\":\n writer.write(\"Void\");\n break;\n default:\n assertNever(this.internalType);\n }\n }\n\n public isOptional(): boolean {\n return this.internalType.type === \"optional\";\n }\n\n /* Static factory methods for creating a Type */\n public static array(value: Type): Type {\n return new this({\n type: \"array\",\n value\n });\n }\n\n public static bigInteger(): Type {\n return new this({\n type: \"bigInteger\"\n });\n }\n\n public static boolean(): Type {\n return new this({\n type: \"boolean\"\n });\n }\n\n public static bytes(): Type {\n return new this({\n type: \"bytes\"\n });\n }\n\n public static date(): Type {\n return new this({\n type: \"date\"\n });\n }\n\n public static dateTime(): Type {\n return new this({\n type: \"dateTime\"\n });\n }\n\n public static double(): Type {\n return new this({\n type: \"double\"\n });\n }\n\n public static float(): Type {\n return new this({\n type: \"float\"\n });\n }\n\n public static integer(): Type {\n return new this({\n type: \"integer\"\n });\n }\n\n public static list(value: Type): Type {\n return new this({\n type: \"list\",\n value\n });\n }\n\n public static long(): Type {\n return new this({\n type: \"long\"\n });\n }\n\n public static map(keyType: Type, valueType: Type): Type {\n return new this({\n type: \"map\",\n keyType,\n valueType\n });\n }\n\n public static object(): Type {\n return new this({\n type: \"object\"\n });\n }\n\n public static optional(value: Type): Type {\n // Avoids double optional.\n if (this.isAlreadyOptional(value)) {\n return value;\n }\n return new this({\n type: \"optional\",\n value\n });\n }\n\n public static reference(value: ClassReference): Type {\n return new this({\n type: \"reference\",\n value\n });\n }\n\n public static generic(value: ClassReference, parameters: Type[]): Type {\n return new this({\n type: \"generic\",\n value,\n parameters\n });\n }\n\n public static set(value: Type): Type {\n return new this({\n type: \"set\",\n value\n });\n }\n\n public static string(): Type {\n return new this({\n type: \"string\"\n });\n }\n\n public static uuid(): Type {\n return new this({\n type: \"uuid\"\n });\n }\n\n public static void(): Type {\n return new this({\n type: \"void\"\n });\n }\n\n public static iterable(value: Type): Type {\n return new this({\n type: \"iterable\",\n value\n });\n }\n\n public static inputStream(): Type {\n return new this({\n type: \"inputStream\"\n });\n }\n\n private writeList({ writer, list }: { writer: Writer; list: List }): void {\n writer.writeNode(ListClassReference);\n writer.write(\"<\");\n list.value.write(writer);\n writer.write(\">\");\n }\n\n private writeMap({ writer, map }: { writer: Writer; map: Map }): void {\n writer.writeNode(MapClassReference);\n writer.write(\"<\");\n map.keyType.write(writer);\n writer.write(\", \");\n map.valueType.write(writer);\n writer.write(\">\");\n }\n\n private writeOptional({ writer, optional }: { writer: Writer; optional: Optional }): void {\n writer.writeNode(OptionalClassReference);\n writer.write(\"<\");\n optional.value.write(writer);\n writer.write(\">\");\n }\n\n private writeIterable({ writer, iterable }: { writer: Writer; iterable: Iterable }): void {\n writer.writeNode(OptionalClassReference);\n writer.write(\"<\");\n iterable.value.write(writer);\n writer.write(\">\");\n }\n\n private writeSet({ writer, set }: { writer: Writer; set: Set }): void {\n writer.writeNode(SetClassReference);\n writer.write(\"<\");\n set.value.write(writer);\n writer.write(\">\");\n }\n\n private static isAlreadyOptional(value: Type) {\n return value.internalType.type === \"optional\";\n }\n}\n\nexport const ArraysClassReference = new ClassReference({\n name: \"Arrays\",\n packageName: \"java.util\"\n});\n\nexport const BigIntegerClassReference = new ClassReference({\n name: \"BigInteger\",\n packageName: \"java.math\"\n});\n\nexport const HashMapClassReference = new ClassReference({\n name: \"HashMap\",\n packageName: \"java.util\"\n});\n\nexport const ListClassReference = new ClassReference({\n name: \"List\",\n packageName: \"java.util\"\n});\n\nexport const MapClassReference = new ClassReference({\n name: \"Map\",\n packageName: \"java.util\"\n});\n\nexport const OffsetDateTimeClassReference = new ClassReference({\n name: \"OffsetDateTime\",\n packageName: \"java.time\"\n});\n\nexport const OptionalClassReference = new ClassReference({\n name: \"Optional\",\n packageName: \"java.util\"\n});\n\nexport const SetClassReference = new ClassReference({\n name: \"Set\",\n packageName: \"java.util\"\n});\n\nexport const UUIDClassReference = new ClassReference({\n name: \"UUID\",\n packageName: \"java.util\"\n});\n\nexport const InputStreamClassReference = new ClassReference({\n name: \"InputStream\",\n packageName: \"java.io\"\n});\n","import { CodeBlock as CommonCodeBlock } from \"@fern-api/browser-compatible-base-generator\";\n\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\n\nexport declare namespace CodeBlock {\n /* Write arbitrary code */\n type Arg = CommonCodeBlock.Arg<Writer>;\n}\n\nexport class CodeBlock extends AstNode {\n private arg: CodeBlock.Arg;\n\n public constructor(arg: CodeBlock.Arg) {\n super();\n this.arg = arg;\n }\n\n public write(writer: Writer): void {\n const commonCodeBlock = new CommonCodeBlock(this.arg);\n return commonCodeBlock.write(writer);\n }\n}\n","import { Access } from \"./Access\";\nimport { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Parameter } from \"./Parameter\";\nimport { Type } from \"./Type\";\n\nexport declare namespace Method {\n interface Args {\n /* The name of the method */\n name: string;\n /* The access level of the method */\n access: Access;\n /* The parameters of the method */\n parameters: Parameter[];\n /* The body of the method */\n body?: AstNode;\n /* The return type of the method */\n return_?: Type;\n /* Whether the method is static */\n static_?: boolean;\n }\n}\n\nexport class Method extends AstNode {\n private name: string;\n private access: Access;\n private parameters: Parameter[];\n private body: AstNode | undefined;\n private return_: Type | undefined;\n private static_: boolean;\n\n constructor({ name, access, parameters, body, static_, return_ }: Method.Args) {\n super();\n\n this.name = name;\n this.access = access;\n this.parameters = parameters;\n this.body = body;\n this.return_ = return_;\n this.static_ = static_ ?? false;\n }\n\n public write(writer: Writer): void {\n writer.write(`${this.access} `);\n if (this.static_) {\n writer.write(\"static \");\n }\n\n if (this.return_ != null) {\n writer.writeNode(this.return_);\n } else {\n writer.write(\"void\");\n }\n\n writer.write(` ${this.name}`);\n\n if (this.parameters.length === 0) {\n writer.write(\"()\");\n } else if (this.parameters.length === 1) {\n writer.write(\"(\");\n if (this.parameters[0] == null) {\n throw new Error(\"Cannot render parameter \" + this.parameters[0]);\n }\n writer.writeNode(this.parameters[0]);\n writer.write(\")\");\n } else {\n writer.writeLine(\"(\");\n writer.indent();\n this.parameters.forEach((parameter, index) => {\n if (index > 0) {\n writer.writeLine(\", \");\n }\n writer.writeNode(parameter);\n });\n writer.dedent();\n writer.write(\")\");\n }\n\n if (this.body == null) {\n writer.write(\";\");\n return;\n }\n\n writer.writeLine(\" {\");\n writer.indent();\n writer.writeNode(this.body);\n writer.writeNewLineIfLastLineNot();\n writer.dedent();\n writer.write(\"}\");\n }\n}\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { writeArguments } from \"./utils/writeArguments\";\n\nexport declare namespace MethodInvocation {\n interface Args {\n /* The instance to invoke the method on */\n on: AstNode;\n /* The method to invoke */\n method: string;\n /* The arguments passed to the method */\n arguments_: AstNode[];\n }\n}\n\nexport class MethodInvocation extends AstNode {\n private on: AstNode;\n private method: string;\n private arguments_: AstNode[];\n\n constructor({ method, arguments_, on }: MethodInvocation.Args) {\n super();\n\n this.on = on;\n this.method = method;\n this.arguments_ = arguments_;\n }\n\n public write(writer: Writer): void {\n this.on.write(writer);\n writer.write(\".\");\n writer.write(this.method);\n writeArguments({ writer, arguments_: this.arguments_ });\n }\n}\n","import { AstNode } from \"./core/AstNode\";\nimport { Writer } from \"./core/Writer\";\nimport { Type } from \"./Type\";\n\nexport declare namespace Parameter {\n interface Args {\n /* The name of the parameter */\n name: string;\n /* The type of the parameter */\n type: Type;\n }\n}\n\nexport class Parameter extends AstNode {\n public readonly name: string;\n public readonly type: Type;\n\n constructor({ name, type }: Parameter.Args) {\n super();\n this.name = name;\n this.type = type;\n }\n\n public write(writer: Writer): void {\n writer.writeNode(this.type);\n writer.write(` ${this.name}`);\n }\n}\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,CAKzC,YAAY,CAAE,OAAAC,EAAQ,WAAAC,EAAY,GAAAC,CAAE,EAAyB,CACzD,MAAK,EALDC,EAAA,WACAA,EAAA,eACAA,EAAA,mBAKJ,KAAK,GAAKD,EACV,KAAK,OAASF,EACd,KAAK,WAAaC,CACtB,CAEO,MAAMG,EAAc,CACvB,KAAK,GAAG,MAAMA,CAAM,EACpBA,EAAO,MAAM,GAAG,EAChBA,EAAO,MAAM,KAAK,MAAM,EACxBC,GAAe,CAAE,OAAAD,EAAQ,WAAY,KAAK,UAAU,CAAE,CAC1D,GCjCJE,IAAAC,IAaM,IAAOC,GAAP,cAAyBC,CAAO,CAIlC,YAAY,CAAE,KAAAC,EAAM,KAAAC,CAAI,EAAkB,CACtC,MAAK,EAJOC,EAAA,aACAA,EAAA,aAIZ,KAAK,KAAOF,EACZ,KAAK,KAAOC,CAChB,CAEO,MAAME,EAAc,CACvBA,EAAO,UAAU,KAAK,IAAI,EAC1BA,EAAO,MAAM,IAAI,KAAK,IAAI,EAAE,CAChC,GtBrBE,SAAUC,GAAUC,EAAkB,CACxC,OAAO,IAAIC,GAAUD,CAAG,CAC5B,CAEM,SAAUE,GAAOC,EAAgB,CACnC,OAAO,IAAIC,GAAMD,CAAI,CACzB,CAEM,SAAUE,GAAeF,EAAyB,CACpD,OAAO,IAAIG,EAAeH,CAAI,CAClC,CAEM,SAAUI,GAAiBJ,EAA6B,CAC1D,OAAO,IAAIK,GAAmBL,CAAI,CACtC,CAEM,SAAUM,GAAaN,EAA2B,CACpD,OAAO,IAAIO,GAAiBP,CAAI,CACpC,CAEM,SAAUQ,GAAOR,EAAiB,CACpC,OAAO,IAAIS,GAAOT,CAAI,CAC1B,CAEM,SAAUU,GAAUV,EAAoB,CAC1C,OAAO,IAAIW,GAAUX,CAAI,CAC7B","names":["init_process","init_buffer","assertNever","x","init_process","init_buffer","init_process","init_buffer","keys","object","init_process","init_buffer","init_process","init_buffer","external_exports","__export","BRAND","DIRTY","EMPTY_PATH","INVALID","NEVER","OK","ParseStatus","ZodType","ZodAny","ZodArray","ZodBigInt","ZodBoolean","ZodBranded","ZodCatch","ZodDate","ZodDefault","ZodDiscriminatedUnion","ZodEffects","ZodEnum","ZodError","ZodFirstPartyTypeKind","ZodFunction","ZodIntersection","ZodIssueCode","ZodLazy","ZodLiteral","ZodMap","ZodNaN","ZodNativeEnum","ZodNever","ZodNull","ZodNullable","ZodNumber","ZodObject","ZodOptional","ZodParsedType","ZodPipeline","ZodPromise","ZodReadonly","ZodRecord","ZodSet","ZodString","ZodSymbol","ZodTuple","ZodUndefined","ZodUnion","ZodUnknown","ZodVoid","addIssueToContext","anyType","arrayType","bigIntType","booleanType","coerce","custom","dateType","datetimeRegex","en_default","discriminatedUnionType","effectsType","enumType","functionType","getErrorMap","getParsedType","instanceOfType","intersectionType","isAborted","isAsync","isDirty","isValid","late","lazyType","literalType","makeIssue","mapType","nanType","nativeEnumType","neverType","nullType","nullableType","numberType","objectType","objectUtil","oboolean","onumber","optionalType","ostring","pipelineType","preprocessType","promiseType","quotelessJson","recordType","setType","setErrorMap","strictObjectType","stringType","symbolType","tupleType","undefinedType","unionType","unknownType","util","voidType","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","util","_","assertIs","_arg","assertNever","_x","items","obj","item","validKeys","k","filtered","e","object","keys","key","arr","checker","val","joinValues","array","separator","value","objectUtil","first","second","__spreadValues","ZodParsedType","getParsedType","data","ZodIssueCode","util","quotelessJson","obj","ZodError","_ZodError","issues","sub","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","error","curr","i","el","value","formErrors","firstEl","errorMap","issue","_ctx","message","ZodIssueCode","ZodParsedType","util","en_default","overrideErrorMap","en_default","setErrorMap","map","overrideErrorMap","getErrorMap","init_process","init_buffer","makeIssue","params","data","path","errorMaps","issueData","fullPath","fullIssue","__spreadProps","__spreadValues","errorMessage","maps","m","map","EMPTY_PATH","addIssueToContext","ctx","overrideMap","getErrorMap","issue","en_default","x","ParseStatus","_ParseStatus","status","results","arrayValue","s","INVALID","pairs","syncPairs","pair","key","value","finalObject","DIRTY","OK","isAborted","isDirty","isValid","isAsync","init_process","init_buffer","init_process","init_buffer","errorUtil","message","ParseInputLazyPath","parent","value","path","key","handleResult","ctx","result","isValid","error","ZodError","processCreateParams","params","errorMap","invalid_type_error","required_error","description","iss","_a","_b","message","ZodType","input","getParsedType","ParseStatus","isAsync","data","err","maybeAsyncResult","check","getIssueProperties","val","setError","__spreadValues","ZodIssueCode","refinementData","refinement","ZodEffects","ZodFirstPartyTypeKind","def","ZodOptional","ZodNullable","ZodArray","ZodPromise","option","ZodUnion","incoming","ZodIntersection","transform","__spreadProps","defaultValueFunc","ZodDefault","ZodBranded","catchValueFunc","ZodCatch","This","target","ZodPipeline","ZodReadonly","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","nanoidRegex","jwtRegex","durationRegex","emailRegex","_emojiRegex","emojiRegex","ipv4Regex","ipv4CidrRegex","ipv6Regex","ipv6CidrRegex","base64Regex","base64urlRegex","dateRegexSource","dateRegex","timeRegexSource","args","secondsRegexSource","secondsQuantifier","timeRegex","datetimeRegex","regex","opts","isValidIP","ip","version","isValidJWT","jwt","alg","header","base64","decoded","isValidCidr","ZodString","_ZodString","ZodParsedType","addIssueToContext","INVALID","status","tooBig","tooSmall","e","util","validation","errorUtil","options","minLength","maxLength","len","ch","min","max","floatSafeRemainder","step","valDecCount","stepDecCount","decCount","valInt","stepInt","ZodNumber","_ZodNumber","kind","inclusive","ZodBigInt","_ZodBigInt","ZodBoolean","OK","ZodDate","_ZodDate","minDate","maxDate","ZodSymbol","ZodUndefined","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodVoid","_ZodArray","item","i","schema","deepPartialify","ZodObject","newShape","fieldSchema","ZodTuple","_ZodObject","shape","keys","shapeKeys","extraKeys","pairs","keyValidator","unknownKeys","catchall","syncPairs","pair","issue","_c","_d","defaultError","augmentation","merging","index","mask","newField","createZodEnum","handleResults","results","unionErrors","childCtx","dirty","issues","types","getDiscriminator","type","ZodLazy","ZodLiteral","ZodEnum","ZodNativeEnum","ZodDiscriminatedUnion","_ZodDiscriminatedUnion","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","a","b","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","isAborted","merged","isDirty","left","right","_ZodTuple","items","itemIndex","x","rest","schemas","ZodRecord","_ZodRecord","keyType","valueType","first","second","third","ZodMap","finalMap","ZodSet","_ZodSet","finalizeSet","elements","parsedSet","element","minSize","maxSize","size","ZodFunction","_ZodFunction","makeArgsIssue","makeIssue","getErrorMap","en_default","makeReturnsIssue","returns","fn","me","parsedArgs","parsedReturns","returnType","func","getter","values","_ZodEnum","expectedValues","enumValues","newDef","opt","nativeEnumValues","promisified","effect","checkCtx","arg","processed","DIRTY","executeRefinement","acc","inner","base","preprocess","ZodOptional","ZodType","input","ZodParsedType","OK","type","params","__spreadValues","ZodFirstPartyTypeKind","processCreateParams","ZodNullable","ZodDefault","ctx","data","ZodCatch","newCtx","__spreadProps","result","isAsync","ZodError","ZodNaN","addIssueToContext","ZodIssueCode","INVALID","BRAND","ZodBranded","ZodPipeline","_ZodPipeline","status","inResult","DIRTY","a","b","ZodReadonly","freeze","isValid","cleanParams","p","custom","check","_params","fatal","ZodAny","_a","_b","r","_fatal","late","ZodObject","ZodFirstPartyTypeKind","instanceOfType","cls","params","custom","data","stringType","ZodString","numberType","ZodNumber","nanType","ZodNaN","bigIntType","ZodBigInt","booleanType","ZodBoolean","dateType","ZodDate","symbolType","ZodSymbol","undefinedType","ZodUndefined","nullType","ZodNull","anyType","ZodAny","unknownType","ZodUnknown","neverType","ZodNever","voidType","ZodVoid","arrayType","ZodArray","objectType","ZodObject","strictObjectType","unionType","ZodUnion","discriminatedUnionType","ZodDiscriminatedUnion","intersectionType","ZodIntersection","tupleType","ZodTuple","recordType","ZodRecord","mapType","ZodMap","setType","ZodSet","functionType","ZodFunction","lazyType","ZodLazy","literalType","ZodLiteral","enumType","ZodEnum","nativeEnumType","ZodNativeEnum","promiseType","ZodPromise","effectsType","ZodEffects","optionalType","ZodOptional","nullableType","ZodNullable","preprocessType","pipelineType","ZodPipeline","ostring","onumber","oboolean","coerce","arg","__spreadProps","__spreadValues","NEVER","INVALID","init_process","init_buffer","CustomReadmeSectionSchema","external_exports","BaseJavaCustomConfigSchema","external_exports","CustomReadmeSectionSchema","java_exports","__export","Access","AstNode","Class","ClassInstantiation","ClassReference","CodeBlock","Method","MethodInvocation","Parameter","Type","TypeLiteral","Writer","classReference","class_","codeblock","instantiateClass","invokeMethod","method","parameter","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","Access","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","AbstractAstNode","init_process","init_buffer","AbstractFormatter","contents","content","NopFormatter","init_process","init_buffer","init_process","init_buffer","CodeBlock","AbstractAstNode","value","__publicField","writer","TAB_SIZE","enableStackTracking","process","AbstractWriter","__publicField","parts","text","textEndsInNewline","textWithoutNewline","indent","indentedText","currIndentLevel","node","input","CodeBlock","prefix","statement","withNewline","nodes","delimiter","writeFunction","firstNode","i","stackLine","each","maxFrames","_a","stop","line","match","fn","path","column","_b","_c","_d","_e","_f","_g","init_process","init_buffer","isNamedArgument","argument","init_process","init_buffer","init_process","init_buffer","Writer","AbstractWriter","packageName","customConfig","formatter","__publicField","NopFormatter","JavaFile","Writer","packageName","customConfig","formatter","content","error","packageStatement","imports","AstNode","AbstractAstNode","packageName","customConfig","formatter","file","JavaFile","Class","AstNode","name","access","__publicField","writer","method","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","ClassReference","AstNode","name","packageName","fullyQualified","__publicField","writer","init_process","init_buffer","Type","AstNode","internalType","__publicField","writer","BigIntegerClassReference","OffsetDateTimeClassReference","index","parameter","InputStreamClassReference","UUIDClassReference","assertNever","value","keyType","valueType","parameters","list","ListClassReference","map","MapClassReference","optional","OptionalClassReference","iterable","set","SetClassReference","ArraysClassReference","ClassReference","HashMapClassReference","TypeLiteral","_TypeLiteral","AstNode","internalType","__publicField","writer","valueStr","assertNever","value","classReference","parameters","reference","valueType","values","isParameter","keyType","entries","useOf","typeLiteral","bigInteger","java_exports","BigIntegerClassReference","builder","filterNopBuilderParameters","parameter","a","b","class_","filterNopConstructorParameters","dateTime","OffsetDateTimeClassReference","enum_","list","map","filterNopMapEntries","HashMapClassReference","entry","optional","OptionalClassReference","set","iterable","ArrayListClassReference","HashSetClassReference","filterNopValues","ArraysClassReference","element","key","val","uuid","UUIDClassReference","input","ClassReference","ListClassReference","MapClassReference","SetClassReference","writeArguments","writer","arguments_","filteredArguments","filterNopArguments","arg","TypeLiteral","writeMultilineArguments","argument","index","writeArgument","isNamedArgument","ClassInstantiation","AstNode","classReference","arguments_","__publicField","writer","writeArguments","init_process","init_buffer","CodeBlock","AstNode","arg","__publicField","writer","init_process","init_buffer","Method","AstNode","name","access","parameters","body","static_","return_","__publicField","writer","parameter","index","init_process","init_buffer","MethodInvocation","AstNode","method","arguments_","on","__publicField","writer","writeArguments","init_process","init_buffer","Parameter","AstNode","name","type","__publicField","writer","codeblock","arg","CodeBlock","class_","args","Class","classReference","ClassReference","instantiateClass","ClassInstantiation","invokeMethod","MethodInvocation","method","Method","parameter","Parameter"]}