Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import * as checks from "./checks.js";2import type * as core from "./core.js";3import type * as errors from "./errors.js";4import * as registries from "./registries.js";5import * as schemas from "./schemas.js";6import * as util from "./util.js";7 8export type Params<9 T extends schemas.$ZodType | checks.$ZodCheck,10 IssueTypes extends errors.$ZodIssueBase,11 OmitKeys extends keyof T["_zod"]["def"] = never,12> = util.Flatten<13 Partial<14 util.EmptyToNever<15 Omit<T["_zod"]["def"], OmitKeys> &16 ([IssueTypes] extends [never]17 ? {} // unknown18 : {19 error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;20 /** @deprecated This parameter is deprecated. Use `error` instead. */21 message?: string | undefined; // supported in Zod 322 })23 >24 >25>;26 27export type TypeParams<28 T extends schemas.$ZodType = schemas.$ZodType & { _isst: never },29 AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never,30> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;31 32// strips types that are not exposed in the public factory33// incl. `error`, `check`34export type CheckParams<35 T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },36 AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never,37> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;38 39// strips types that are not exposed in the public factory40// incl. `type`, `checks`, `error`, `check`, `format`41export type StringFormatParams<42 T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,43 AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never,44> = Params<45 T,46 NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>,47 "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit48>;49 50export type CheckStringFormatParams<51 T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,52 AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never,53> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;54 55export type CheckTypeParams<56 T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck,57 AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never,58> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;59 60// String61export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;62// @__NO_SIDE_EFFECTS__63export function _string<T extends schemas.$ZodString>(64 Class: util.SchemaClass<T>,65 params?: string | $ZodStringParams66): T {67 return new Class({68 type: "string",69 ...util.normalizeParams(params),70 });71}72 73// @__NO_SIDE_EFFECTS__74export function _coercedString<T extends schemas.$ZodString>(75 Class: util.SchemaClass<T>,76 params?: string | $ZodStringParams77): T {78 return new Class({79 type: "string",80 coerce: true,81 ...util.normalizeParams(params),82 });83}84 85export type $ZodStringFormatParams = CheckTypeParams<86 schemas.$ZodStringFormat,87 "format" | "coerce" | "when" | "pattern"88>;89export type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, "format">;90// custom format91 92// Email93export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, "when">;94export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, "when">;95// @__NO_SIDE_EFFECTS__96export function _email<T extends schemas.$ZodEmail>(97 Class: util.SchemaClass<T>,98 params?: string | $ZodEmailParams | $ZodCheckEmailParams99): T {100 return new Class({101 type: "string",102 format: "email",103 check: "string_format",104 abort: false,105 ...util.normalizeParams(params),106 });107}108 109// GUID110export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern" | "when">;111export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern" | "when">;112// @__NO_SIDE_EFFECTS__113export function _guid<T extends schemas.$ZodGUID>(114 Class: util.SchemaClass<T>,115 params?: string | $ZodGUIDParams | $ZodCheckGUIDParams116): T {117 return new Class({118 type: "string",119 format: "guid",120 check: "string_format",121 abort: false,122 ...util.normalizeParams(params),123 });124}125 126// UUID127export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;128export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;129// @__NO_SIDE_EFFECTS__130export function _uuid<T extends schemas.$ZodUUID>(131 Class: util.SchemaClass<T>,132 params?: string | $ZodUUIDParams | $ZodCheckUUIDParams133): T {134 return new Class({135 type: "string",136 format: "uuid",137 check: "string_format",138 abort: false,139 ...util.normalizeParams(params),140 });141}142 143// UUIDv4144export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;145export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;146// @__NO_SIDE_EFFECTS__147export function _uuidv4<T extends schemas.$ZodUUID>(148 Class: util.SchemaClass<T>,149 params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params150): T {151 return new Class({152 type: "string",153 format: "uuid",154 check: "string_format",155 abort: false,156 version: "v4",157 ...util.normalizeParams(params),158 });159}160 161// UUIDv6162export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;163export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;164// @__NO_SIDE_EFFECTS__165export function _uuidv6<T extends schemas.$ZodUUID>(166 Class: util.SchemaClass<T>,167 params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params168): T {169 return new Class({170 type: "string",171 format: "uuid",172 check: "string_format",173 abort: false,174 version: "v6",175 ...util.normalizeParams(params),176 });177}178 179// UUIDv7180export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;181export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;182// @__NO_SIDE_EFFECTS__183export function _uuidv7<T extends schemas.$ZodUUID>(184 Class: util.SchemaClass<T>,185 params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params186): T {187 return new Class({188 type: "string",189 format: "uuid",190 check: "string_format",191 abort: false,192 version: "v7",193 ...util.normalizeParams(params),194 });195}196 197// URL198export type $ZodURLParams = StringFormatParams<schemas.$ZodURL, "when">;199export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, "when">;200// @__NO_SIDE_EFFECTS__201export function _url<T extends schemas.$ZodURL>(202 Class: util.SchemaClass<T>,203 params?: string | $ZodURLParams | $ZodCheckURLParams204): T {205 return new Class({206 type: "string",207 format: "url",208 check: "string_format",209 abort: false,210 ...util.normalizeParams(params),211 });212}213 214// Emoji215export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, "when">;216export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, "when">;217// @__NO_SIDE_EFFECTS__218export function _emoji<T extends schemas.$ZodEmoji>(219 Class: util.SchemaClass<T>,220 params?: string | $ZodEmojiParams | $ZodCheckEmojiParams221): T {222 return new Class({223 type: "string",224 format: "emoji",225 check: "string_format",226 abort: false,227 ...util.normalizeParams(params),228 });229}230 231// NanoID232export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, "when">;233export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, "when">;234// @__NO_SIDE_EFFECTS__235export function _nanoid<T extends schemas.$ZodNanoID>(236 Class: util.SchemaClass<T>,237 params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams238): T {239 return new Class({240 type: "string",241 format: "nanoid",242 check: "string_format",243 abort: false,244 ...util.normalizeParams(params),245 });246}247 248// CUID249/**250 * @deprecated CUID v1 is deprecated by its authors due to information leakage251 * (timestamps embedded in the id). Use {@link _cuid2} instead.252 * See https://github.com/paralleldrive/cuid.253 */254export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, "when">;255/**256 * @deprecated CUID v1 is deprecated by its authors due to information leakage257 * (timestamps embedded in the id). Use {@link _cuid2} instead.258 * See https://github.com/paralleldrive/cuid.259 */260export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, "when">;261/**262 * @deprecated CUID v1 is deprecated by its authors due to information leakage263 * (timestamps embedded in the id). Use {@link _cuid2} instead.264 * See https://github.com/paralleldrive/cuid.265 */266// @__NO_SIDE_EFFECTS__267export function _cuid<T extends schemas.$ZodCUID>(268 Class: util.SchemaClass<T>,269 params?: string | $ZodCUIDParams | $ZodCheckCUIDParams270): T {271 return new Class({272 type: "string",273 format: "cuid",274 check: "string_format",275 abort: false,276 ...util.normalizeParams(params),277 });278}279 280// CUID2281export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, "when">;282export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, "when">;283// @__NO_SIDE_EFFECTS__284export function _cuid2<T extends schemas.$ZodCUID2>(285 Class: util.SchemaClass<T>,286 params?: string | $ZodCUID2Params | $ZodCheckCUID2Params287): T {288 return new Class({289 type: "string",290 format: "cuid2",291 check: "string_format",292 abort: false,293 ...util.normalizeParams(params),294 });295}296 297// ULID298export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, "when">;299export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, "when">;300// @__NO_SIDE_EFFECTS__301export function _ulid<T extends schemas.$ZodULID>(302 Class: util.SchemaClass<T>,303 params?: string | $ZodULIDParams | $ZodCheckULIDParams304): T {305 return new Class({306 type: "string",307 format: "ulid",308 check: "string_format",309 abort: false,310 ...util.normalizeParams(params),311 });312}313 314// XID315export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, "when">;316export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, "when">;317// @__NO_SIDE_EFFECTS__318export function _xid<T extends schemas.$ZodXID>(319 Class: util.SchemaClass<T>,320 params?: string | $ZodXIDParams | $ZodCheckXIDParams321): T {322 return new Class({323 type: "string",324 format: "xid",325 check: "string_format",326 abort: false,327 ...util.normalizeParams(params),328 });329}330 331// KSUID332export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, "when">;333export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, "when">;334// @__NO_SIDE_EFFECTS__335export function _ksuid<T extends schemas.$ZodKSUID>(336 Class: util.SchemaClass<T>,337 params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams338): T {339 return new Class({340 type: "string",341 format: "ksuid",342 check: "string_format",343 abort: false,344 ...util.normalizeParams(params),345 });346}347 348// IPv4349export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;350export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;351// @__NO_SIDE_EFFECTS__352export function _ipv4<T extends schemas.$ZodIPv4>(353 Class: util.SchemaClass<T>,354 params?: string | $ZodIPv4Params | $ZodCheckIPv4Params355): T {356 return new Class({357 type: "string",358 format: "ipv4",359 check: "string_format",360 abort: false,361 ...util.normalizeParams(params),362 });363}364 365// IPv6366export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;367export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;368// @__NO_SIDE_EFFECTS__369export function _ipv6<T extends schemas.$ZodIPv6>(370 Class: util.SchemaClass<T>,371 params?: string | $ZodIPv6Params | $ZodCheckIPv6Params372): T {373 return new Class({374 type: "string",375 format: "ipv6",376 check: "string_format",377 abort: false,378 ...util.normalizeParams(params),379 });380}381 382// MAC383export type $ZodMACParams = StringFormatParams<schemas.$ZodMAC, "pattern" | "when">;384export type $ZodCheckMACParams = CheckStringFormatParams<schemas.$ZodMAC, "pattern" | "when">;385// @__NO_SIDE_EFFECTS__386export function _mac<T extends schemas.$ZodMAC>(387 Class: util.SchemaClass<T>,388 params?: string | $ZodMACParams | $ZodCheckMACParams389): T {390 return new Class({391 type: "string",392 format: "mac",393 check: "string_format",394 abort: false,395 ...util.normalizeParams(params),396 });397}398 399// CIDRv4400export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;401export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;402// @__NO_SIDE_EFFECTS__403export function _cidrv4<T extends schemas.$ZodCIDRv4>(404 Class: util.SchemaClass<T>,405 params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params406): T {407 return new Class({408 type: "string",409 format: "cidrv4",410 check: "string_format",411 abort: false,412 ...util.normalizeParams(params),413 });414}415 416// CIDRv6417export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;418export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;419// @__NO_SIDE_EFFECTS__420export function _cidrv6<T extends schemas.$ZodCIDRv6>(421 Class: util.SchemaClass<T>,422 params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params423): T {424 return new Class({425 type: "string",426 format: "cidrv6",427 check: "string_format",428 abort: false,429 ...util.normalizeParams(params),430 });431}432 433// Base64434export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern" | "when">;435export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern" | "when">;436// @__NO_SIDE_EFFECTS__437export function _base64<T extends schemas.$ZodBase64>(438 Class: util.SchemaClass<T>,439 params?: string | $ZodBase64Params | $ZodCheckBase64Params440): T {441 return new Class({442 type: "string",443 format: "base64",444 check: "string_format",445 abort: false,446 ...util.normalizeParams(params),447 });448}449 450// base64url451export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;452export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;453// @__NO_SIDE_EFFECTS__454export function _base64url<T extends schemas.$ZodBase64URL>(455 Class: util.SchemaClass<T>,456 params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams457): T {458 return new Class({459 type: "string",460 format: "base64url",461 check: "string_format",462 abort: false,463 ...util.normalizeParams(params),464 });465}466 467// E164468export type $ZodE164Params = StringFormatParams<schemas.$ZodE164, "when">;469export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, "when">;470// @__NO_SIDE_EFFECTS__471export function _e164<T extends schemas.$ZodE164>(472 Class: util.SchemaClass<T>,473 params?: string | $ZodE164Params | $ZodCheckE164Params474): T {475 return new Class({476 type: "string",477 format: "e164",478 check: "string_format",479 abort: false,480 ...util.normalizeParams(params),481 });482}483 484// JWT485export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern" | "when">;486export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern" | "when">;487// @__NO_SIDE_EFFECTS__488export function _jwt<T extends schemas.$ZodJWT>(489 Class: util.SchemaClass<T>,490 params?: string | $ZodJWTParams | $ZodCheckJWTParams491): T {492 return new Class({493 type: "string",494 format: "jwt",495 check: "string_format",496 abort: false,497 ...util.normalizeParams(params),498 });499}500 501export const TimePrecision = {502 Any: null,503 Minute: -1,504 Second: 0,505 Millisecond: 3,506 Microsecond: 6,507} as const;508// ISODateTime509export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;510export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;511// @__NO_SIDE_EFFECTS__512export function _isoDateTime<T extends schemas.$ZodISODateTime>(513 Class: util.SchemaClass<T>,514 params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams515): T {516 return new Class({517 type: "string",518 format: "datetime",519 check: "string_format",520 offset: false,521 local: false,522 precision: null,523 ...util.normalizeParams(params),524 });525}526 527// ISODate528export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern" | "when">;529export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern" | "when">;530// @__NO_SIDE_EFFECTS__531export function _isoDate<T extends schemas.$ZodISODate>(532 Class: util.SchemaClass<T>,533 params?: string | $ZodISODateParams | $ZodCheckISODateParams534): T {535 return new Class({536 type: "string",537 format: "date",538 check: "string_format",539 ...util.normalizeParams(params),540 });541}542 543// ISOTime544export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;545export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;546// @__NO_SIDE_EFFECTS__547export function _isoTime<T extends schemas.$ZodISOTime>(548 Class: util.SchemaClass<T>,549 params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams550): T {551 return new Class({552 type: "string",553 format: "time",554 check: "string_format",555 precision: null,556 ...util.normalizeParams(params),557 });558}559 560// ISODuration561export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, "when">;562export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, "when">;563// @__NO_SIDE_EFFECTS__564export function _isoDuration<T extends schemas.$ZodISODuration>(565 Class: util.SchemaClass<T>,566 params?: string | $ZodISODurationParams | $ZodCheckISODurationParams567): T {568 return new Class({569 type: "string",570 format: "duration",571 check: "string_format",572 ...util.normalizeParams(params),573 });574}575 576// Number577export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce">;578export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;579export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format" | "when">;580// @__NO_SIDE_EFFECTS__581export function _number<T extends schemas.$ZodNumber>(582 Class: util.SchemaClass<T>,583 params?: string | $ZodNumberParams584): T {585 return new Class({586 type: "number",587 checks: [],588 ...util.normalizeParams(params),589 });590}591 592// @__NO_SIDE_EFFECTS__593export function _coercedNumber<T extends schemas.$ZodNumber>(594 Class: util.SchemaClass<T>,595 params?: string | $ZodNumberParams596): T {597 return new Class({598 type: "number",599 coerce: true,600 checks: [],601 ...util.normalizeParams(params),602 });603}604 605// @__NO_SIDE_EFFECTS__606export function _int<T extends schemas.$ZodNumberFormat>(607 Class: util.SchemaClass<T>,608 params?: string | $ZodCheckNumberFormatParams609): T {610 return new Class({611 type: "number",612 check: "number_format",613 abort: false,614 format: "safeint",615 ...util.normalizeParams(params),616 });617}618// @__NO_SIDE_EFFECTS__619export function _float32<T extends schemas.$ZodNumberFormat>(620 Class: util.SchemaClass<T>,621 params?: string | $ZodCheckNumberFormatParams622): T {623 return new Class({624 type: "number",625 check: "number_format",626 abort: false,627 format: "float32",628 ...util.normalizeParams(params),629 });630}631// @__NO_SIDE_EFFECTS__632export function _float64<T extends schemas.$ZodNumberFormat>(633 Class: util.SchemaClass<T>,634 params?: string | $ZodCheckNumberFormatParams635): T {636 return new Class({637 type: "number",638 check: "number_format",639 abort: false,640 format: "float64",641 ...util.normalizeParams(params),642 });643}644// @__NO_SIDE_EFFECTS__645export function _int32<T extends schemas.$ZodNumberFormat>(646 Class: util.SchemaClass<T>,647 params?: string | $ZodCheckNumberFormatParams648): T {649 return new Class({650 type: "number",651 check: "number_format",652 abort: false,653 format: "int32",654 ...util.normalizeParams(params),655 });656}657// @__NO_SIDE_EFFECTS__658export function _uint32<T extends schemas.$ZodNumberFormat>(659 Class: util.SchemaClass<T>,660 params?: string | $ZodCheckNumberFormatParams661): T {662 return new Class({663 type: "number",664 check: "number_format",665 abort: false,666 format: "uint32",667 ...util.normalizeParams(params),668 });669}670 671// Boolean672export type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, "coerce">;673// @__NO_SIDE_EFFECTS__674export function _boolean<T extends schemas.$ZodBoolean>(675 Class: util.SchemaClass<T>,676 params?: string | $ZodBooleanParams677): T {678 return new Class({679 type: "boolean",680 ...util.normalizeParams(params),681 });682}683// @__NO_SIDE_EFFECTS__684export function _coercedBoolean<T extends schemas.$ZodBoolean>(685 Class: util.SchemaClass<T>,686 params?: string | $ZodBooleanParams687): T {688 return new Class({689 type: "boolean",690 coerce: true,691 ...util.normalizeParams(params),692 });693}694 695// BigInt696export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;697export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;698export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format" | "when">;699// @__NO_SIDE_EFFECTS__700export function _bigint<T extends schemas.$ZodBigInt>(701 Class: util.SchemaClass<T>,702 params?: string | $ZodBigIntParams703): T {704 return new Class({705 type: "bigint",706 ...util.normalizeParams(params),707 });708}709// @__NO_SIDE_EFFECTS__710export function _coercedBigint<T extends schemas.$ZodBigInt>(711 Class: util.SchemaClass<T>,712 params?: string | $ZodBigIntParams713): T {714 return new Class({715 type: "bigint",716 coerce: true,717 ...util.normalizeParams(params),718 });719}720 721// @__NO_SIDE_EFFECTS__722export function _int64<T extends schemas.$ZodBigIntFormat>(723 Class: util.SchemaClass<T>,724 params?: string | $ZodBigIntFormatParams725): T {726 return new Class({727 type: "bigint",728 check: "bigint_format",729 abort: false,730 format: "int64",731 ...util.normalizeParams(params),732 });733}734// @__NO_SIDE_EFFECTS__735export function _uint64<T extends schemas.$ZodBigIntFormat>(736 Class: util.SchemaClass<T>,737 params?: string | $ZodBigIntFormatParams738): T {739 return new Class({740 type: "bigint",741 check: "bigint_format",742 abort: false,743 format: "uint64",744 ...util.normalizeParams(params),745 });746}747 748// Symbol749export type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;750// @__NO_SIDE_EFFECTS__751export function _symbol<T extends schemas.$ZodSymbol>(752 Class: util.SchemaClass<T>,753 params?: string | $ZodSymbolParams754): T {755 return new Class({756 type: "symbol",757 ...util.normalizeParams(params),758 });759}760 761// Undefined762export type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;763// @__NO_SIDE_EFFECTS__764export function _undefined<T extends schemas.$ZodUndefined>(765 Class: util.SchemaClass<T>,766 params?: string | $ZodUndefinedParams767): T {768 return new Class({769 type: "undefined",770 ...util.normalizeParams(params),771 });772}773 774// Null775export type $ZodNullParams = TypeParams<schemas.$ZodNull>;776// @__NO_SIDE_EFFECTS__777export function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T {778 return new Class({779 type: "null",780 ...util.normalizeParams(params),781 });782}783 784// Any785export type $ZodAnyParams = TypeParams<schemas.$ZodAny>;786// @__NO_SIDE_EFFECTS__787export function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T {788 return new Class({789 type: "any",790 });791}792 793// Unknown794export type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;795// @__NO_SIDE_EFFECTS__796export function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T {797 return new Class({798 type: "unknown",799 });800}801 802// Never803export type $ZodNeverParams = TypeParams<schemas.$ZodNever>;804// @__NO_SIDE_EFFECTS__805export function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T {806 return new Class({807 type: "never",808 ...util.normalizeParams(params),809 });810}811 812// Void813export type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;814// @__NO_SIDE_EFFECTS__815export function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T {816 return new Class({817 type: "void",818 ...util.normalizeParams(params),819 });820}821 822// Date823export type $ZodDateParams = TypeParams<schemas.$ZodDate, "coerce">;824// @__NO_SIDE_EFFECTS__825export function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T {826 return new Class({827 type: "date",828 ...util.normalizeParams(params),829 });830}831// @__NO_SIDE_EFFECTS__832export function _coercedDate<T extends schemas.$ZodDate>(833 Class: util.SchemaClass<T>,834 params?: string | $ZodDateParams835): T {836 return new Class({837 type: "date",838 coerce: true,839 ...util.normalizeParams(params),840 });841}842 843// NaN844export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;845// @__NO_SIDE_EFFECTS__846export function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T {847 return new Class({848 type: "nan",849 ...util.normalizeParams(params),850 });851}852 853// export type $ZodCheckParams = CheckParams<checks.$ZodCheck, "abort" | "when">;854 855export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value" | "when">;856// @__NO_SIDE_EFFECTS__857export function _lt(858 value: util.Numeric,859 params?: string | $ZodCheckLessThanParams860): checks.$ZodCheckLessThan<util.Numeric> {861 return new checks.$ZodCheckLessThan({862 check: "less_than",863 ...util.normalizeParams(params),864 value,865 inclusive: false,866 });867}868 869// @__NO_SIDE_EFFECTS__870export function _lte(871 value: util.Numeric,872 params?: string | $ZodCheckLessThanParams873): checks.$ZodCheckLessThan<util.Numeric> {874 return new checks.$ZodCheckLessThan({875 check: "less_than",876 877 ...util.normalizeParams(params),878 value,879 inclusive: true,880 });881}882export {883 /** @deprecated Use `z.lte()` instead. */884 _lte as _max,885};886 887// ZodCheckGreaterThan888export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value" | "when">;889// @__NO_SIDE_EFFECTS__890export function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {891 return new checks.$ZodCheckGreaterThan({892 check: "greater_than",893 894 ...util.normalizeParams(params),895 value,896 inclusive: false,897 });898}899 900// @__NO_SIDE_EFFECTS__901export function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {902 return new checks.$ZodCheckGreaterThan({903 check: "greater_than",904 ...util.normalizeParams(params),905 value,906 inclusive: true,907 });908}909 910export {911 /** @deprecated Use `z.gte()` instead. */912 _gte as _min,913};914 915// @__NO_SIDE_EFFECTS__916export function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {917 return _gt(0, params);918}919 920// negative921// @__NO_SIDE_EFFECTS__922export function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan {923 return _lt(0, params);924}925 926// nonpositive927// @__NO_SIDE_EFFECTS__928export function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan {929 return _lte(0, params);930}931 932// nonnegative933// @__NO_SIDE_EFFECTS__934export function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {935 return _gte(0, params);936}937 938export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value" | "when">;939// @__NO_SIDE_EFFECTS__940export function _multipleOf(941 value: number | bigint,942 params?: string | $ZodCheckMultipleOfParams943): checks.$ZodCheckMultipleOf {944 return new checks.$ZodCheckMultipleOf({945 check: "multiple_of",946 ...util.normalizeParams(params),947 value,948 });949}950 951export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum" | "when">;952// @__NO_SIDE_EFFECTS__953export function _maxSize(954 maximum: number,955 params?: string | $ZodCheckMaxSizeParams956): checks.$ZodCheckMaxSize<util.HasSize> {957 return new checks.$ZodCheckMaxSize({958 check: "max_size",959 ...util.normalizeParams(params),960 maximum,961 });962}963 964export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum" | "when">;965// @__NO_SIDE_EFFECTS__966export function _minSize(967 minimum: number,968 params?: string | $ZodCheckMinSizeParams969): checks.$ZodCheckMinSize<util.HasSize> {970 return new checks.$ZodCheckMinSize({971 check: "min_size",972 ...util.normalizeParams(params),973 minimum,974 });975}976 977export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size" | "when">;978// @__NO_SIDE_EFFECTS__979export function _size(980 size: number,981 params?: string | $ZodCheckSizeEqualsParams982): checks.$ZodCheckSizeEquals<util.HasSize> {983 return new checks.$ZodCheckSizeEquals({984 check: "size_equals",985 ...util.normalizeParams(params),986 size,987 });988}989 990export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum" | "when">;991// @__NO_SIDE_EFFECTS__992export function _maxLength(993 maximum: number,994 params?: string | $ZodCheckMaxLengthParams995): checks.$ZodCheckMaxLength<util.HasLength> {996 const ch = new checks.$ZodCheckMaxLength({997 check: "max_length",998 ...util.normalizeParams(params),999 maximum,1000 });1001 return ch;1002}1003 1004export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum" | "when">;1005// @__NO_SIDE_EFFECTS__1006export function _minLength(1007 minimum: number,1008 params?: string | $ZodCheckMinLengthParams1009): checks.$ZodCheckMinLength<util.HasLength> {1010 return new checks.$ZodCheckMinLength({1011 check: "min_length",1012 ...util.normalizeParams(params),1013 minimum,1014 });1015}1016 1017export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length" | "when">;1018// @__NO_SIDE_EFFECTS__1019export function _length(1020 length: number,1021 params?: string | $ZodCheckLengthEqualsParams1022): checks.$ZodCheckLengthEquals<util.HasLength> {1023 return new checks.$ZodCheckLengthEquals({1024 check: "length_equals",1025 ...util.normalizeParams(params),1026 length,1027 });1028}1029 1030export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern" | "when">;1031// @__NO_SIDE_EFFECTS__1032export function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex {1033 return new checks.$ZodCheckRegex({1034 check: "string_format",1035 format: "regex",1036 ...util.normalizeParams(params),1037 pattern,1038 });1039}1040 1041export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format" | "when">;1042// @__NO_SIDE_EFFECTS__1043export function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase {1044 return new checks.$ZodCheckLowerCase({1045 check: "string_format",1046 format: "lowercase",1047 ...util.normalizeParams(params),1048 });1049}1050 1051export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format" | "when">;1052 1053// @__NO_SIDE_EFFECTS__1054export function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase {1055 return new checks.$ZodCheckUpperCase({1056 check: "string_format",1057 format: "uppercase",1058 ...util.normalizeParams(params),1059 });1060}1061 1062export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;1063// @__NO_SIDE_EFFECTS__1064export function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes {1065 return new checks.$ZodCheckIncludes({1066 check: "string_format",1067 format: "includes",1068 ...util.normalizeParams(params),1069 includes,1070 });1071}1072export type $ZodCheckStartsWithParams = CheckParams<1073 checks.$ZodCheckStartsWith,1074 "prefix" | "format" | "when" | "pattern"1075>;1076// @__NO_SIDE_EFFECTS__1077export function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith {1078 return new checks.$ZodCheckStartsWith({1079 check: "string_format",1080 format: "starts_with",1081 ...util.normalizeParams(params),1082 prefix,1083 });1084}1085 1086export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;1087 1088// @__NO_SIDE_EFFECTS__1089export function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith {1090 return new checks.$ZodCheckEndsWith({1091 check: "string_format",1092 format: "ends_with",1093 ...util.normalizeParams(params),1094 suffix,1095 });1096}1097 1098export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema" | "when">;1099// @__NO_SIDE_EFFECTS__1100export function _property<K extends string, T extends schemas.$ZodType>(1101 property: K,1102 schema: T,1103 params?: string | $ZodCheckPropertyParams1104): checks.$ZodCheckProperty<{ [k in K]: core.output<T> }> {1105 return new checks.$ZodCheckProperty({1106 check: "property",1107 property,1108 schema,1109 ...util.normalizeParams(params),1110 });1111}1112 1113export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime" | "when">;1114// @__NO_SIDE_EFFECTS__1115export function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType {1116 return new checks.$ZodCheckMimeType({1117 check: "mime_type",1118 mime: types,1119 ...util.normalizeParams(params),1120 });1121}1122 1123// @__NO_SIDE_EFFECTS__1124export function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T> {1125 return new checks.$ZodCheckOverwrite({1126 check: "overwrite",1127 tx,1128 }) as checks.$ZodCheckOverwrite<T>;1129}1130// normalize1131// @__NO_SIDE_EFFECTS__1132export function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): checks.$ZodCheckOverwrite<string> {1133 return _overwrite((input) => input.normalize(form));1134}1135 1136// trim1137// @__NO_SIDE_EFFECTS__1138export function _trim(): checks.$ZodCheckOverwrite<string> {1139 return _overwrite((input) => input.trim());1140}1141// toLowerCase1142// @__NO_SIDE_EFFECTS__1143export function _toLowerCase(): checks.$ZodCheckOverwrite<string> {1144 return _overwrite((input) => input.toLowerCase());1145}1146// toUpperCase1147// @__NO_SIDE_EFFECTS__1148export function _toUpperCase(): checks.$ZodCheckOverwrite<string> {1149 return _overwrite((input) => input.toUpperCase());1150}1151// slugify1152// @__NO_SIDE_EFFECTS__1153export function _slugify(): checks.$ZodCheckOverwrite<string> {1154 return _overwrite((input) => util.slugify(input));1155}1156 1157/////// collections ///////1158 1159// Array1160export type $ZodArrayParams = TypeParams<schemas.$ZodArray, "element">;1161// @__NO_SIDE_EFFECTS__1162export function _array<T extends schemas.$ZodType>(1163 Class: util.SchemaClass<schemas.$ZodArray>,1164 element: T,1165 params?: string | $ZodArrayParams1166): schemas.$ZodArray<T> {1167 return new Class({1168 type: "array",1169 element,1170 // get element() {1171 // return element;1172 // },1173 ...util.normalizeParams(params),1174 }) as any;1175}1176 1177export type $ZodObjectParams = TypeParams<schemas.$ZodObject, "shape" | "catchall">;1178 1179// ZodUnion1180export type $ZodUnionParams = TypeParams<schemas.$ZodUnion, "options">;1181// @__NO_SIDE_EFFECTS__1182export function _union<const T extends readonly schemas.$ZodObject[]>(1183 Class: util.SchemaClass<schemas.$ZodUnion>,1184 options: T,1185 params?: string | $ZodUnionParams1186): schemas.$ZodUnion<T> {1187 return new Class({1188 type: "union",1189 options,1190 ...util.normalizeParams(params),1191 }) as any;1192}1193 1194// ZodXor1195export type $ZodXorParams = TypeParams<schemas.$ZodXor, "options">;1196export function _xor<const T extends readonly schemas.$ZodObject[]>(1197 Class: util.SchemaClass<schemas.$ZodXor>,1198 options: T,1199 params?: string | $ZodXorParams1200): schemas.$ZodXor<T> {