){return this.min(1,e)}}we.create=(e,t)=>new we({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...N(t)});class Ze extends A{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return _(t,{code:o.invalid_type,expected:s.function,received:t.parsedType}),g;function n(e,n){return f({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,p(),c].filter(e=>!!e),issueData:{code:o.invalid_arguments,argumentsError:n}})}function r(e,n){return f({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,p(),c].filter(e=>!!e),issueData:{code:o.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Se){const e=this;return k(async function(...t){const s=new u([]),o=await e._def.args.parseAsync(t,a).catch(e=>{throw s.addIssue(n(t,e)),s}),d=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(d,a).catch(e=>{throw s.addIssue(r(d,e)),s})})}{const e=this;return k(function(...t){const s=e._def.args.safeParse(t,a);if(!s.success)throw new u([n(t,s.error)]);const o=Reflect.apply(i,this,s.data),d=e._def.returns.safeParse(o,a);if(!d.success)throw new u([r(o,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ze({...this._def,args:ke.create(e).rest(ue.create())})}returns(e){return new Ze({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ze({args:e||ke.create([]).rest(ue.create()),returns:t||ue.create(),typeName:Ke.ZodFunction,...N(n)})}}class Te extends A{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Te.create=(e,t)=>new Te({getter:e,typeName:Ke.ZodLazy,...N(t)});class Oe extends A{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return _(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ce(e,t){return new Ne({values:e,typeName:Ke.ZodEnum,...N(t)})}Oe.create=(e,t)=>new Oe({value:e,typeName:Ke.ZodLiteral,...N(t)});class Ne extends A{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return _(t,{expected:n.joinValues(r),received:t.parsedType,code:o.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return _(t,{received:t.data,code:o.invalid_enum_value,options:n}),g}r