@authhero/adapter-interfaces 0.5.0 → 0.5.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
var adapterInterfaces=function(y){"use strict";function kt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}typeof SuppressedError=="function"&&SuppressedError;function xt(t,e){var n;return((n=t==null?void 0:t._def)===null||n===void 0?void 0:n.typeName)===e}function F(t,e){const n=t.ZodType.prototype[e];t.ZodType.prototype[e]=function(...r){const s=n.apply(this,r);return s._def.openapi=this._def.openapi,s}}function St(t){if(typeof t.ZodType.prototype.openapi<"u")return;t.ZodType.prototype.openapi=function(s,i){var o,c,u,l,m,w;const Y=typeof s=="string"?i:s,J=Y??{},{param:_t}=J,Yn=kt(J,["param"]),yt=Object.assign(Object.assign({},(o=this._def.openapi)===null||o===void 0?void 0:o._internal),typeof s=="string"?{refId:s}:void 0),vt=Object.assign(Object.assign(Object.assign({},(c=this._def.openapi)===null||c===void 0?void 0:c.metadata),Yn),!((l=(u=this._def.openapi)===null||u===void 0?void 0:u.metadata)===null||l===void 0)&&l.param||_t?{param:Object.assign(Object.assign({},(w=(m=this._def.openapi)===null||m===void 0?void 0:m.metadata)===null||w===void 0?void 0:w.param),_t)}:void 0),bt=new this.constructor(Object.assign(Object.assign({},this._def),{openapi:Object.assign(Object.assign({},Object.keys(yt).length>0?{_internal:yt}:void 0),Object.keys(vt).length>0?{metadata:vt}:void 0)}));if(xt(this,"ZodObject")){const Jn=this.extend;bt.extend=function(...Fn){var De,Ue,Ve,Le,ze,Be;const We=Jn.apply(this,Fn);return We._def.openapi={_internal:{extendedFrom:!((Ue=(De=this._def.openapi)===null||De===void 0?void 0:De._internal)===null||Ue===void 0)&&Ue.refId?{refId:(Le=(Ve=this._def.openapi)===null||Ve===void 0?void 0:Ve._internal)===null||Le===void 0?void 0:Le.refId,schema:this}:(ze=this._def.openapi)===null||ze===void 0?void 0:ze._internal.extendedFrom},metadata:(Be=We._def.openapi)===null||Be===void 0?void 0:Be.metadata},We}}return bt},F(t,"optional"),F(t,"nullable"),F(t,"default"),F(t,"transform"),F(t,"refine");const e=t.ZodObject.prototype.deepPartial;t.ZodObject.prototype.deepPartial=function(){const s=this._def.shape(),i=e.apply(this),o=i._def.shape();return Object.entries(o).forEach(([c,u])=>{var l,m;u._def.openapi=(m=(l=s[c])===null||l===void 0?void 0:l._def)===null||m===void 0?void 0:m.openapi}),i._def.openapi=void 0,i};const n=t.ZodObject.prototype.pick;t.ZodObject.prototype.pick=function(...s){const i=n.apply(this,s);return i._def.openapi=void 0,i};const r=t.ZodObject.prototype.omit;t.ZodObject.prototype.omit=function(...s){const i=r.apply(this,s);return i._def.openapi=void 0,i}}new Set(".\\+*[^]$()");var k;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),o={};for(const c of i)o[c]=s[c];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(k||(k={}));var we;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(we||(we={}));const h=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class C extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let c=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(n(o))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}};return s(this),r}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}C.create=t=>new C(t);const B=(t,e)=>{let n;switch(t.code){case d.invalid_type:t.received===h.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,k.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:n=`Unrecognized key(s) in object: ${k.joinValues(t.keys,", ")}`;break;case d.invalid_union:n="Invalid input";break;case d.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${k.joinValues(t.options)}`;break;case d.invalid_enum_value:n=`Invalid enum value. Expected ${k.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:n="Invalid function arguments";break;case d.invalid_return_type:n="Invalid function return type";break;case d.invalid_date:n="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:k.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case d.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case d.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case d.custom:n="Invalid input";break;case d.invalid_intersection_types:n="Intersection results could not be merged";break;case d.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:n="Number must be finite";break;default:n=e.defaultError,k.assertNever(t)}return{message:n}};let Ge=B;function Tt(t){Ge=t}function me(){return Ge}const ge=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)c=l(o,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},Ct=[];function p(t,e){const n=me(),r=ge({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===B?void 0:B].filter(s=>!!s)});t.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return _;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return S.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return _;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const _=Object.freeze({status:"aborted"}),W=t=>({status:"dirty",value:t}),T=t=>({status:"valid",value:t}),Te=t=>t.status==="aborted",Ce=t=>t.status==="dirty",X=t=>t.status==="valid",Q=t=>typeof Promise<"u"&&t instanceof Promise;function _e(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function qe(t,e,n,r,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var f;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));var ee,te;class Z{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const He=(t,e)=>{if(X(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new C(t.common.issues);return this._error=n,this._error}}};function v(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,c)=>{var u,l;const{message:m}=t;return o.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:(u=m??r)!==null&&u!==void 0?u:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(l=m??n)!==null&&l!==void 0?l:c.defaultError}},description:s}}class b{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Q(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},i=this._parseSync({data:e,path:s.path,parent:s});return He(s,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Q(s)?s:Promise.resolve(s));return He(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=e(s),c=()=>i.addIssue({code:d.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new j({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return I.create(this,this._def)}nullable(){return U.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return E.create(this,this._def)}promise(){return K.create(this,this._def)}or(e){return se.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ue({...v(this._def),innerType:this,defaultValue:n,typeName:g.ZodDefault})}brand(){return new je({typeName:g.ZodBranded,type:this,...v(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new pe({...v(this._def),innerType:this,catchValue:n,typeName:g.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return he.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ot=/^c[^\s-]{8,}$/i,Et=/^[0-9a-z]+$/,jt=/^[0-9A-HJKMNP-TV-Z]{26}$/,Zt=/^[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,Nt=/^[a-z0-9_-]{21}$/i,It=/^[-+]?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)?)??$/,Rt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,At="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oe;const Pt=/^(?:(?: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])$/,Mt=/^(([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})))$/,$t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ke="((\\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])))",Dt=new RegExp(`^${Ke}$`);function Ye(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ut(t){return new RegExp(`^${Ye(t)}$`)}function Je(t){let e=`${Ke}T${Ye(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Vt(t,e){return!!((e==="v4"||!e)&&Pt.test(t)||(e==="v6"||!e)&&Mt.test(t))}class O extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.string,received:i.parsedType}),_}const r=new S;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,c=e.data.length<i.value;(o||c)&&(s=this._getOrReturnCtx(e,s),o?p(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&p(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Rt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Oe||(Oe=new RegExp(At,"u")),Oe.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Zt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Nt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"nanoid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Ot.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Et.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")jt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:d.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:d.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Je(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Dt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Ut(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?It.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"duration",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Vt(e.data,i.version)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?$t.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"base64",code:d.invalid_string,message:i.message}),r.dirty()):k.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:d.invalid_string,...f.errToObj(r)})}_addCheck(e){return new O({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...f.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...f.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...f.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...f.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...f.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...f.errToObj(n)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new O({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}O.create=t=>{var e;return new O({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};function Lt(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(t.toFixed(s).replace(".","")),o=parseInt(e.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class M extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.number,received:i.parsedType}),_}let r;const s=new S;for(const i of this._def.checks)i.kind==="int"?k.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),p(r,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Lt(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_finite,message:i.message}),s.dirty()):k.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,r,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:f.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}M.create=t=>new M({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});class $ extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==h.bigint){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.bigint,received:i.parsedType}),_}let r;const s=new S;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):k.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,r,s){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:f.toString(s)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}$.create=t=>{var e;return new $({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};class ne extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.boolean,received:r.parsedType}),_}return T(e.data)}}ne.create=t=>new ne({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});class V extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.date,received:i.parsedType}),_}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_date}),_}const r=new S;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):k.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}V.create=t=>new V({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...v(t)});class ye extends b{_parse(e){if(this._getType(e)!==h.symbol){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.symbol,received:r.parsedType}),_}return T(e.data)}}ye.create=t=>new ye({typeName:g.ZodSymbol,...v(t)});class re extends b{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.undefined,received:r.parsedType}),_}return T(e.data)}}re.create=t=>new re({typeName:g.ZodUndefined,...v(t)});class ae extends b{_parse(e){if(this._getType(e)!==h.null){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.null,received:r.parsedType}),_}return T(e.data)}}ae.create=t=>new ae({typeName:g.ZodNull,...v(t)});class G extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}}G.create=t=>new G({typeName:g.ZodAny,...v(t)});class L extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}}L.create=t=>new L({typeName:g.ZodUnknown,...v(t)});class R extends b{_parse(e){const n=this._getOrReturnCtx(e);return p(n,{code:d.invalid_type,expected:h.never,received:n.parsedType}),_}}R.create=t=>new R({typeName:g.ZodNever,...v(t)});class ve extends b{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.void,received:r.parsedType}),_}return T(e.data)}}ve.create=t=>new ve({typeName:g.ZodVoid,...v(t)});class E extends b{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==h.array)return p(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),_;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(o||c)&&(p(n,{code:o?d.too_big:d.too_small,minimum:c?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(p(n,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(p(n,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,c)=>s.type._parseAsync(new Z(n,o,n.path,c)))).then(o=>S.mergeArray(r,o));const i=[...n.data].map((o,c)=>s.type._parseSync(new Z(n,o,n.path,c)));return S.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new E({...this._def,minLength:{value:e,message:f.toString(n)}})}max(e,n){return new E({...this._def,maxLength:{value:e,message:f.toString(n)}})}length(e,n){return new E({...this._def,exactLength:{value:e,message:f.toString(n)}})}nonempty(e){return this.min(1,e)}}E.create=(t,e)=>new E({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...v(e)});function q(t){if(t instanceof x){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=I.create(q(r))}return new x({...t._def,shape:()=>e})}else return t instanceof E?new E({...t._def,type:q(t.element)}):t instanceof I?I.create(q(t.unwrap())):t instanceof U?U.create(q(t.unwrap())):t instanceof N?N.create(t.items.map(e=>q(e))):t}class x extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=k.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==h.object){const l=this._getOrReturnCtx(e);return p(l,{code:d.invalid_type,expected:h.object,received:l.parsedType}),_}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof R&&this._def.unknownKeys==="strip"))for(const l in s.data)o.includes(l)||c.push(l);const u=[];for(const l of o){const m=i[l],w=s.data[l];u.push({key:{status:"valid",value:l},value:m._parse(new Z(s,w,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof R){const l=this._def.unknownKeys;if(l==="passthrough")for(const m of c)u.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(l==="strict")c.length>0&&(p(s,{code:d.unrecognized_keys,keys:c}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const m of c){const w=s.data[m];u.push({key:{status:"valid",value:m},value:l._parse(new Z(s,w,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const m of u){const w=await m.key,Y=await m.value;l.push({key:w,value:Y,alwaysSet:m.alwaysSet})}return l}).then(l=>S.mergeObjectSync(r,l)):S.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var s,i,o,c;const u=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=f.errToObj(e).message)!==null&&c!==void 0?c:u}:{message:u}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const n={};return k.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new x({...this._def,shape:()=>n})}omit(e){const n={};return k.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new x({...this._def,shape:()=>n})}deepPartial(){return q(this)}partial(e){const n={};return k.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}),new x({...this._def,shape:()=>n})}required(e){const n={};return k.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof I;)i=i._def.innerType;n[r]=i}}),new x({...this._def,shape:()=>n})}keyof(){return Fe(k.objectKeys(this.shape))}}x.create=(t,e)=>new x({shape:()=>t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...v(e)}),x.strictCreate=(t,e)=>new x({shape:()=>t,unknownKeys:"strict",catchall:R.create(),typeName:g.ZodObject,...v(e)}),x.lazycreate=(t,e)=>new x({shape:t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...v(e)});class se extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const o=i.map(c=>new C(c.ctx.common.issues));return p(n,{code:d.invalid_union,unionErrors:o}),_}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},m=u._parseSync({data:n.data,path:n.path,parent:l});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const c=o.map(u=>new C(u));return p(n,{code:d.invalid_union,unionErrors:c}),_}}get options(){return this._def.options}}se.create=(t,e)=>new se({options:t,typeName:g.ZodUnion,...v(e)});const A=t=>t instanceof ce?A(t.schema):t instanceof j?A(t.innerType()):t instanceof de?[t.value]:t instanceof D?t.options:t instanceof le?k.objectValues(t.enum):t instanceof ue?A(t._def.innerType):t instanceof re?[void 0]:t instanceof ae?[null]:t instanceof I?[void 0,...A(t.unwrap())]:t instanceof U?[null,...A(t.unwrap())]:t instanceof je||t instanceof fe?A(t.unwrap()):t instanceof pe?A(t._def.innerType):[];class be extends b{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.object)return p(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),_;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(p(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const s=new Map;for(const i of n){const o=A(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new be({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...v(r)})}}function Ee(t,e){const n=P(t),r=P(e);if(t===e)return{valid:!0,data:t};if(n===h.object&&r===h.object){const s=k.objectKeys(e),i=k.objectKeys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...e};for(const c of i){const u=Ee(t[c],e[c]);if(!u.valid)return{valid:!1};o[c]=u.data}return{valid:!0,data:o}}else if(n===h.array&&r===h.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],c=e[i],u=Ee(o,c);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return n===h.date&&r===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ie extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(Te(i)||Te(o))return _;const c=Ee(i.value,o.value);return c.valid?((Ce(i)||Ce(o))&&n.dirty(),{status:n.value,value:c.data}):(p(r,{code:d.invalid_intersection_types}),_)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ie.create=(t,e,n)=>new ie({left:t,right:e,typeName:g.ZodIntersection,...v(n)});class N extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.array)return p(r,{code:d.invalid_type,expected:h.array,received:r.parsedType}),_;if(r.data.length<this._def.items.length)return p(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&r.data.length>this._def.items.length&&(p(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new Z(r,o,r.path,c)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>S.mergeArray(n,o)):S.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new N({...this._def,rest:e})}}N.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:t,typeName:g.ZodTuple,rest:null,...v(e)})};class oe extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.object)return p(r,{code:d.invalid_type,expected:h.object,received:r.parsedType}),_;const s=[],i=this._def.keyType,o=this._def.valueType;for(const c in r.data)s.push({key:i._parse(new Z(r,c,r.path,c)),value:o._parse(new Z(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?S.mergeObjectAsync(n,s):S.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof b?new oe({keyType:e,valueType:n,typeName:g.ZodRecord,...v(r)}):new oe({keyType:O.create(),valueType:e,typeName:g.ZodRecord,...v(n)})}}class ke extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.map)return p(r,{code:d.invalid_type,expected:h.map,received:r.parsedType}),_;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([c,u],l)=>({key:s._parse(new Z(r,c,r.path,[l,"key"])),value:i._parse(new Z(r,u,r.path,[l,"value"]))}));if(r.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,m=await u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const u of o){const l=u.key,m=u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}}}}ke.create=(t,e,n)=>new ke({valueType:e,keyType:t,typeName:g.ZodMap,...v(n)});class z extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.set)return p(r,{code:d.invalid_type,expected:h.set,received:r.parsedType}),_;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(p(r,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(p(r,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(u){const l=new Set;for(const m of u){if(m.status==="aborted")return _;m.status==="dirty"&&n.dirty(),l.add(m.value)}return{status:n.value,value:l}}const c=[...r.data.values()].map((u,l)=>i._parse(new Z(r,u,r.path,l)));return r.common.async?Promise.all(c).then(u=>o(u)):o(c)}min(e,n){return new z({...this._def,minSize:{value:e,message:f.toString(n)}})}max(e,n){return new z({...this._def,maxSize:{value:e,message:f.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}z.create=(t,e)=>new z({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...v(e)});class H extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.function)return p(n,{code:d.invalid_type,expected:h.function,received:n.parsedType}),_;function r(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),B].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:u}})}function s(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),B].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof K){const c=this;return T(async function(...u){const l=new C([]),m=await c._def.args.parseAsync(u,i).catch(J=>{throw l.addIssue(r(u,J)),l}),w=await Reflect.apply(o,this,m);return await c._def.returns._def.type.parseAsync(w,i).catch(J=>{throw l.addIssue(s(w,J)),l})})}else{const c=this;return T(function(...u){const l=c._def.args.safeParse(u,i);if(!l.success)throw new C([r(u,l.error)]);const m=Reflect.apply(o,this,l.data),w=c._def.returns.safeParse(m,i);if(!w.success)throw new C([s(m,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:N.create(e).rest(L.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new H({args:e||N.create([]).rest(L.create()),returns:n||L.create(),typeName:g.ZodFunction,...v(r)})}}class ce extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ce.create=(t,e)=>new ce({getter:t,typeName:g.ZodLazy,...v(e)});class de extends b{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return p(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(t,e)=>new de({value:t,typeName:g.ZodLiteral,...v(e)});function Fe(t,e){return new D({values:t,typeName:g.ZodEnum,...v(e)})}class D extends b{constructor(){super(...arguments),ee.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return p(n,{expected:k.joinValues(r),received:n.parsedType,code:d.invalid_type}),_}if(_e(this,ee)||qe(this,ee,new Set(this._def.values)),!_e(this,ee).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return p(n,{received:n.data,code:d.invalid_enum_value,options:r}),_}return T(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return D.create(e,{...this._def,...n})}exclude(e,n=this._def){return D.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ee=new WeakMap,D.create=Fe;class le extends b{constructor(){super(...arguments),te.set(this,void 0)}_parse(e){const n=k.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==h.string&&r.parsedType!==h.number){const s=k.objectValues(n);return p(r,{expected:k.joinValues(s),received:r.parsedType,code:d.invalid_type}),_}if(_e(this,te)||qe(this,te,new Set(k.getValidEnumValues(this._def.values))),!_e(this,te).has(e.data)){const s=k.objectValues(n);return p(r,{received:r.data,code:d.invalid_enum_value,options:s}),_}return T(e.data)}get enum(){return this._def.values}}te=new WeakMap,le.create=(t,e)=>new le({values:t,typeName:g.ZodNativeEnum,...v(e)});class K extends b{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.promise&&n.common.async===!1)return p(n,{code:d.invalid_type,expected:h.promise,received:n.parsedType}),_;const r=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return T(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}K.create=(t,e)=>new K({type:t,typeName:g.ZodPromise,...v(e)});class j extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{p(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async c=>{if(n.value==="aborted")return _;const u=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return u.status==="aborted"?_:u.status==="dirty"||n.value==="dirty"?W(u.value):u});{if(n.value==="aborted")return _;const c=this._def.schema._parseSync({data:o,path:r.path,parent:r});return c.status==="aborted"?_:c.status==="dirty"||n.value==="dirty"?W(c.value):c}}if(s.type==="refinement"){const o=c=>{const u=s.refinement(c,i);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!X(o))return o;const c=s.transform(o.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>X(o)?Promise.resolve(s.transform(o.value,i)).then(c=>({status:n.value,value:c})):o);k.assertNever(s)}}j.create=(t,e,n)=>new j({schema:t,typeName:g.ZodEffects,effect:e,...v(n)}),j.createWithPreprocess=(t,e,n)=>new j({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...v(n)});class I extends b{_parse(e){return this._getType(e)===h.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}I.create=(t,e)=>new I({innerType:t,typeName:g.ZodOptional,...v(e)});class U extends b{_parse(e){return this._getType(e)===h.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(t,e)=>new U({innerType:t,typeName:g.ZodNullable,...v(e)});class ue extends b{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===h.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ue.create=(t,e)=>new ue({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class pe extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class xe extends b{_parse(e){if(this._getType(e)!==h.nan){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.nan,received:r.parsedType}),_}return{status:"valid",value:e.data}}}xe.create=t=>new xe({typeName:g.ZodNaN,...v(t)});const zt=Symbol("zod_brand");class je extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class he extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_:i.status==="dirty"?(n.dirty(),W(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new he({in:e,out:n,typeName:g.ZodPipeline})}}class fe extends b{_parse(e){const n=this._def.innerType._parse(e),r=s=>(X(s)&&(s.value=Object.freeze(s.value)),s);return Q(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}fe.create=(t,e)=>new fe({innerType:t,typeName:g.ZodReadonly,...v(e)});function Xe(t,e={},n){return t?G.create().superRefine((r,s)=>{var i,o;if(!t(r)){const c=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,u=(o=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof c=="string"?{message:c}:c;s.addIssue({code:"custom",...l,fatal:u})}}):G.create()}const Bt={object:x.lazycreate};var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));const Wt=(t,e={message:`Input not instance of ${t.name}`})=>Xe(n=>n instanceof t,e),Qe=O.create,et=M.create,Gt=xe.create,qt=$.create,tt=ne.create,Ht=V.create,Kt=ye.create,Yt=re.create,Jt=ae.create,Ft=G.create,Xt=L.create,Qt=R.create,en=ve.create,tn=E.create,nn=x.create,rn=x.strictCreate,an=se.create,sn=be.create,on=ie.create,cn=N.create,dn=oe.create,ln=ke.create,un=z.create,pn=H.create,hn=ce.create,fn=de.create,mn=D.create,gn=le.create,_n=K.create,nt=j.create,yn=I.create,vn=U.create,bn=j.createWithPreprocess,kn=he.create;var a=Object.freeze({__proto__:null,defaultErrorMap:B,setErrorMap:Tt,getErrorMap:me,makeIssue:ge,EMPTY_PATH:Ct,addIssueToContext:p,ParseStatus:S,INVALID:_,DIRTY:W,OK:T,isAborted:Te,isDirty:Ce,isValid:X,isAsync:Q,get util(){return k},get objectUtil(){return we},ZodParsedType:h,getParsedType:P,ZodType:b,datetimeRegex:Je,ZodString:O,ZodNumber:M,ZodBigInt:$,ZodBoolean:ne,ZodDate:V,ZodSymbol:ye,ZodUndefined:re,ZodNull:ae,ZodAny:G,ZodUnknown:L,ZodNever:R,ZodVoid:ve,ZodArray:E,ZodObject:x,ZodUnion:se,ZodDiscriminatedUnion:be,ZodIntersection:ie,ZodTuple:N,ZodRecord:oe,ZodMap:ke,ZodSet:z,ZodFunction:H,ZodLazy:ce,ZodLiteral:de,ZodEnum:D,ZodNativeEnum:le,ZodPromise:K,ZodEffects:j,ZodTransformer:j,ZodOptional:I,ZodNullable:U,ZodDefault:ue,ZodCatch:pe,ZodNaN:xe,BRAND:zt,ZodBranded:je,ZodPipeline:he,ZodReadonly:fe,custom:Xe,Schema:b,ZodSchema:b,late:Bt,get ZodFirstPartyTypeKind(){return g},coerce:{string:t=>O.create({...t,coerce:!0}),number:t=>M.create({...t,coerce:!0}),boolean:t=>ne.create({...t,coerce:!0}),bigint:t=>$.create({...t,coerce:!0}),date:t=>V.create({...t,coerce:!0})},any:Ft,array:tn,bigint:qt,boolean:tt,date:Ht,discriminatedUnion:sn,effect:nt,enum:mn,function:pn,instanceof:Wt,intersection:on,lazy:hn,literal:fn,map:ln,nan:Gt,nativeEnum:gn,never:Qt,null:Jt,nullable:vn,number:et,object:nn,oboolean:()=>tt().optional(),onumber:()=>et().optional(),optional:yn,ostring:()=>Qe().optional(),pipeline:kn,preprocess:bn,promise:_n,record:dn,set:un,strictObject:rn,string:Qe,symbol:Kt,transformer:nt,tuple:cn,undefined:Yt,union:an,unknown:Xt,void:en,NEVER:_,ZodIssueCode:d,quotelessJson:wt,ZodError:C});St(a);const xn=a.object({start:a.number(),limit:a.number(),length:a.number()}),Ze=a.object({created_at:a.string(),updated_at:a.string()}),Sn=a.object({email:a.string().optional(),email_verified:a.boolean().optional(),name:a.string().optional(),username:a.string().optional(),given_name:a.string().optional(),phone_number:a.string().optional(),phone_verified:a.boolean().optional(),family_name:a.string().optional()}).catchall(a.any()),wn=a.object({connection:a.string(),user_id:a.string(),provider:a.string(),isSocial:a.boolean(),access_token:a.string().optional(),access_token_secret:a.string().optional(),refresh_token:a.string().optional(),profileData:Sn.optional()}),Ne=a.object({email:a.string().optional(),username:a.string().optional(),given_name:a.string().optional(),family_name:a.string().optional(),nickname:a.string().optional(),name:a.string().optional(),picture:a.string().optional(),locale:a.string().optional(),linked_to:a.string().optional(),profileData:a.string().optional(),user_id:a.string().optional()}),rt=Ne.extend({email_verified:a.boolean().default(!1),verify_email:a.boolean().optional(),last_ip:a.string().optional(),last_login:a.string().optional(),user_id:a.string().optional(),provider:a.string().default("email"),connection:a.string().default("email")}),at=rt.extend(Ze.shape).extend({user_id:a.string(),email:a.string(),is_social:a.boolean(),login_count:a.number(),identities:a.array(wn).optional()}),Tn=at,Cn=Ne.extend({email:a.string(),login_count:a.number(),multifactor:a.array(a.string()).optional(),last_ip:a.string().optional(),last_login:a.string().optional(),user_id:a.string()}).catchall(a.any());var st=(t=>(t.SUCCESS_API_OPERATION="sapi",t.SUCCESS_SILENT_AUTH="ssa",t.FAILED_SILENT_AUTH="fsa",t.SUCCESS_SIGNUP="ss",t.FAILED_SIGNUP="fs",t.SUCCESS_LOGIN="s",t.FAILED_LOGIN="f",t.FAILED_LOGIN_INCORRECT_PASSWORD="fp",t.SUCCESS_LOGOUT="slo",t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",t.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",t.CODE_LINK_SENT="cls",t.NOT_IMPLEMENTED_1="seccft",t))(st||{});const On=a.enum(["sapi","ssa","fsa","ss","ssa","fs","s","f","fp","slo","scoa","fcoa","seccft","cls","seacft","serft"]),it=a.object({name:a.string(),version:a.string(),env:a.object({node:a.string().optional()}).optional()}),En=a.object({type:On,date:a.string(),description:a.string().optional(),log_id:a.string().optional(),_id:a.string().optional(),ip:a.string(),user_agent:a.string(),details:a.any().optional(),isMobile:a.boolean(),user_id:a.string().optional(),user_name:a.string().optional(),connection:a.string().optional(),connection_id:a.string().optional(),client_id:a.string().optional(),client_name:a.string().optional(),audience:a.string().optional(),scope:a.array(a.string()).optional(),strategy:a.string().optional(),strategy_type:a.string().optional(),hostname:a.string().optional(),auth0_client:it.optional()}),ot=a.object({id:a.string(),name:a.string(),allowed_web_origins:a.string().transform(t=>t===null?"":t).default(""),allowed_callback_urls:a.string().transform(t=>t===null?"":t).default(""),allowed_logout_urls:a.string().transform(t=>t===null?"":t).default(""),email_validation:a.enum(["enabled","disabled","enforced"]).default("enforced"),client_secret:a.string().default(""),disable_sign_ups:a.boolean().default(!1)}),jn=a.object({created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}).extend(ot.shape);var Ie=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(Ie||{}),Re=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t))(Re||{}),Ae=(t=>(t.S265="S256",t.plain="plain",t))(Ae||{});const Se=a.object({client_id:a.string(),vendor_id:a.string().optional(),response_type:a.nativeEnum(Ie).optional(),response_mode:a.nativeEnum(Re).optional(),redirect_uri:a.string().optional(),audience:a.string().optional(),state:a.string().optional(),nonce:a.string().optional(),scope:a.string().optional(),code_challenge_method:a.nativeEnum(Ae).optional(),code_challenge:a.string().optional(),username:a.string().optional()}),Zn=a.object({authParams:Se,nonce:a.string().optional(),code:a.string(),user_id:a.string(),created_at:a.string(),expires_at:a.string(),used_at:a.string().optional()}),Nn=a.object({colors:a.object({primary:a.string(),page_background:a.object({type:a.string().optional(),start:a.string().optional(),end:a.string().optional(),angle_deg:a.number().optional()}).optional()}).optional(),logo_url:a.string().optional(),favicon_url:a.string().optional(),font:a.object({url:a.string()}).optional()}),ct=a.object({id:a.string().optional(),name:a.string(),client_id:a.string().optional(),client_secret:a.string().optional(),authorization_endpoint:a.string().optional(),response_type:a.custom().optional(),response_mode:a.custom().optional(),private_key:a.string().optional(),kid:a.string().optional(),team_id:a.string().optional(),token_endpoint:a.string().optional(),token_exchange_basic_auth:a.boolean().optional(),userinfo_endpoint:a.string().optional(),scope:a.string().optional()}),Pe=a.object({id:a.string(),created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}).extend(ct.shape),In=a.object({domain:a.string(),dkim_private_key:a.string().optional(),dkim_public_key:a.string().optional(),email_api_key:a.string().optional(),email_service:a.union([a.literal("mailgun"),a.literal("mailchannels")]).optional()}),dt=a.object({id:a.string(),name:a.string(),domains:a.array(In),allowed_callback_urls:a.array(a.string()),allowed_logout_urls:a.array(a.string()),allowed_web_origins:a.array(a.string()),email_validation:a.union([a.literal("enabled"),a.literal("disabled"),a.literal("enforced")]),tenant_id:a.string(),client_secret:a.string(),disable_sign_ups:a.boolean(),tenant:a.object({name:a.string(),audience:a.string().optional(),logo:a.string().optional(),primary_color:a.string().optional(),secondary_color:a.string().optional(),sender_email:a.string(),sender_name:a.string(),support_url:a.string().optional(),language:a.string().length(2).optional()})}),Rn=dt.extend({connections:a.array(Pe)}),An=dt.extend({connections:a.array(Pe.partial())}),lt=a.object({domain:a.string(),dkim_private_key:a.string().optional(),dkim_public_key:a.string().optional(),email_api_key:a.string().optional(),email_service:a.enum(["mailgun","mailchannels"])}),Pn=Ze.extend({...lt.shape,id:a.string()}),ut=a.object({trigger_id:a.enum(["post-user-registration","post-user-login"]),enabled:a.boolean().default(!1),url:a.string(),hook_id:a.string().optional()}),Mn=ut.extend({...Ze.shape,hook_id:a.string()}),pt=a.object({alg:a.string(),e:a.string(),kid:a.string(),kty:a.string(),n:a.string(),use:a.string().optional()}),$n=a.object({keys:a.array(pt)}),Dn=a.object({issuer:a.string(),authorization_endpoint:a.string(),token_endpoint:a.string(),device_authorization_endpoint:a.string(),userinfo_endpoint:a.string(),mfa_challenge_endpoint:a.string(),jwks_uri:a.string(),registration_endpoint:a.string(),revocation_endpoint:a.string(),scopes_supported:a.array(a.string()),response_types_supported:a.array(a.string()),code_challenge_methods_supported:a.array(a.string()),response_modes_supported:a.array(a.string()),subject_types_supported:a.array(a.string()),id_token_signing_alg_values_supported:a.array(a.string()),token_endpoint_auth_methods_supported:a.array(a.string()),claims_supported:a.array(a.string()),request_uri_parameter_supported:a.boolean(),request_parameter_supported:a.boolean(),token_endpoint_auth_signing_alg_values_supported:a.array(a.string())}),ht=a.object({id:a.string(),tenant_id:a.string(),client_id:a.string(),email:a.string(),code:a.string(),ip:a.string().optional(),send:a.string().optional(),authParams:Se,expires_at:a.string(),used_at:a.string().optional(),user_id:a.string().optional()}),Un=a.object({created_at:a.string(),...ht.shape}),ft=a.object({session_id:a.string(),client_id:a.string(),expires_at:a.string(),used_at:a.string(),deleted_at:a.string().optional(),user_id:a.string()});a.object({created_at:a.string(),...ft.shape});const Vn=a.object({private_key:a.string(),public_key:a.string(),kid:a.string(),created_at:a.string(),revoked_at:a.string().optional()}),Ln=a.object({kid:a.string().openapi({description:"The key id of the signing key"}),cert:a.string().openapi({description:"The public certificate of the signing key"}),fingerprint:a.string().openapi({description:"The cert fingerprint"}),thumbprint:a.string().openapi({description:"The cert thumbprint"}),pkcs7:a.string().optional().openapi({description:"The public certificate of the signing key in pkcs7 format"}),current:a.boolean().optional().openapi({description:"True if the key is the current key"}),next:a.boolean().optional().openapi({description:"True if the key is the next key"}),previous:a.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:a.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:a.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:a.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:a.string().optional().openapi({description:"The date and time when the key was revoked"})}),mt=a.object({name:a.string(),audience:a.string(),sender_email:a.string().email(),sender_name:a.string(),support_url:a.string().url().optional(),logo:a.string().url().optional(),primary_color:a.string().optional(),secondary_color:a.string().optional(),language:a.string().optional()}),zn=mt.extend({created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}),Bn=a.object({logoUrl:a.string(),loginBackgroundImage:a.string().nullish(),style:a.object({primaryColor:a.string(),buttonTextColor:a.string(),primaryHoverColor:a.string()}),supportEmail:a.string().nullable(),supportUrl:a.string().nullable(),name:a.string(),showGreyishBackground:a.boolean().optional(),termsAndConditionsUrl:a.string().nullable(),companyName:a.string().optional(),checkoutHideSocial:a.boolean().optional(),siteUrl:a.string().nullable(),manageSubscriptionsUrl:a.string().optional()});var Me=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t))(Me||{});const $e=a.nativeEnum(Me),Wn=a.object({grant_type:$e.refine(t=>t==="authorization_code"),code:a.string(),client_secret:a.string(),client_id:a.string()}),Gn=a.object({grant_type:$e.refine(t=>t==="authorization_code"),code:a.string(),code_verifier:a.string(),client_id:a.string().optional(),redirect_uri:a.string()}),qn=a.object({grant_type:$e.refine(t=>t==="client_credentials"),scope:a.string().optional(),client_secret:a.string(),client_id:a.string(),audience:a.string().optional()});a.object({access_token:a.string(),id_token:a.string().optional(),scope:a.string().optional(),state:a.string().optional(),refresh_token:a.string().optional(),token_type:a.string(),expires_in:a.number()}),a.object({code:a.string(),state:a.string().optional()});const gt=a.object({id:a.string(),expires_at:a.string(),auth0Client:a.string().optional(),authParams:Se}),Hn=a.object({...gt.shape,created_at:a.string(),updated_at:a.string()}),Kn="tmp";return y.Auth0Client=it,y.AuthorizationResponseMode=Re,y.AuthorizationResponseType=Ie,y.ClientSchema=Rn,y.CodeChallengeMethod=Ae,y.GrantType=Me,y.LogTypes=st,y.PartialClientSchema=An,y.applicationInsertSchema=ot,y.applicationSchema=jn,y.auth0UserResponseSchema=Tn,y.authParamsSchema=Se,y.authenticationCodeSchema=Zn,y.authorizationCodeGrantTypeParamsSchema=Wn,y.baseUserSchema=Ne,y.brandingSchema=Nn,y.certificateSchema=Vn,y.clientCredentialGrantTypeParamsSchema=qn,y.connectionInsertSchema=ct,y.connectionSchema=Pe,y.domainInsertSchema=lt,y.domainSchema=Pn,y.hookInsertSchema=ut,y.hookSchema=Mn,y.jwksKeySchema=$n,y.jwksSchema=pt,y.logSchema=En,y.openIDConfigurationSchema=Dn,y.otpInsertSchema=ht,y.otpSchema=Un,y.pkceAuthorizationCodeGrantTypeParamsSchema=Gn,y.sessionInsertSchema=ft,y.signingKeySchema=Ln,y.tenantInsertSchema=mt,y.tenantSchema=zn,y.tmp=Kn,y.totalsSchema=xn,y.universalLoginSessionInsertSchema=gt,y.universalLoginSessionSchema=Hn,y.userInsertSchema=rt,y.userResponseSchema=Cn,y.userSchema=at,y.vendorSettingsSchema=Bn,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y}({});
|
|
1
|
+
var adapterInterfaces=function(y){"use strict";function xt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}typeof SuppressedError=="function"&&SuppressedError;function St(t,e){var n;return((n=t==null?void 0:t._def)===null||n===void 0?void 0:n.typeName)===e}function F(t,e){const n=t.ZodType.prototype[e];t.ZodType.prototype[e]=function(...r){const s=n.apply(this,r);return s._def.openapi=this._def.openapi,s}}function wt(t){if(typeof t.ZodType.prototype.openapi<"u")return;t.ZodType.prototype.openapi=function(s,i){var o,c,u,l,m,w;const Y=typeof s=="string"?i:s,J=Y??{},{param:yt}=J,Fn=xt(J,["param"]),vt=Object.assign(Object.assign({},(o=this._def.openapi)===null||o===void 0?void 0:o._internal),typeof s=="string"?{refId:s}:void 0),bt=Object.assign(Object.assign(Object.assign({},(c=this._def.openapi)===null||c===void 0?void 0:c.metadata),Fn),!((l=(u=this._def.openapi)===null||u===void 0?void 0:u.metadata)===null||l===void 0)&&l.param||yt?{param:Object.assign(Object.assign({},(w=(m=this._def.openapi)===null||m===void 0?void 0:m.metadata)===null||w===void 0?void 0:w.param),yt)}:void 0),kt=new this.constructor(Object.assign(Object.assign({},this._def),{openapi:Object.assign(Object.assign({},Object.keys(vt).length>0?{_internal:vt}:void 0),Object.keys(bt).length>0?{metadata:bt}:void 0)}));if(St(this,"ZodObject")){const Xn=this.extend;kt.extend=function(...Qn){var De,Ue,Ve,Le,ze,Be;const We=Xn.apply(this,Qn);return We._def.openapi={_internal:{extendedFrom:!((Ue=(De=this._def.openapi)===null||De===void 0?void 0:De._internal)===null||Ue===void 0)&&Ue.refId?{refId:(Le=(Ve=this._def.openapi)===null||Ve===void 0?void 0:Ve._internal)===null||Le===void 0?void 0:Le.refId,schema:this}:(ze=this._def.openapi)===null||ze===void 0?void 0:ze._internal.extendedFrom},metadata:(Be=We._def.openapi)===null||Be===void 0?void 0:Be.metadata},We}}return kt},F(t,"optional"),F(t,"nullable"),F(t,"default"),F(t,"transform"),F(t,"refine");const e=t.ZodObject.prototype.deepPartial;t.ZodObject.prototype.deepPartial=function(){const s=this._def.shape(),i=e.apply(this),o=i._def.shape();return Object.entries(o).forEach(([c,u])=>{var l,m;u._def.openapi=(m=(l=s[c])===null||l===void 0?void 0:l._def)===null||m===void 0?void 0:m.openapi}),i._def.openapi=void 0,i};const n=t.ZodObject.prototype.pick;t.ZodObject.prototype.pick=function(...s){const i=n.apply(this,s);return i._def.openapi=void 0,i};const r=t.ZodObject.prototype.omit;t.ZodObject.prototype.omit=function(...s){const i=r.apply(this,s);return i._def.openapi=void 0,i}}new Set(".\\+*[^]$()");var k;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(c=>typeof s[s[c]]!="number"),o={};for(const c of i)o[c]=s[c];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(k||(k={}));var we;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(we||(we={}));const h=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Tt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class C extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let c=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(n(o))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}};return s(this),r}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}C.create=t=>new C(t);const B=(t,e)=>{let n;switch(t.code){case d.invalid_type:t.received===h.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,k.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:n=`Unrecognized key(s) in object: ${k.joinValues(t.keys,", ")}`;break;case d.invalid_union:n="Invalid input";break;case d.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${k.joinValues(t.options)}`;break;case d.invalid_enum_value:n=`Invalid enum value. Expected ${k.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:n="Invalid function arguments";break;case d.invalid_return_type:n="Invalid function return type";break;case d.invalid_date:n="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:k.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case d.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case d.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case d.custom:n="Invalid input";break;case d.invalid_intersection_types:n="Intersection results could not be merged";break;case d.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:n="Number must be finite";break;default:n=e.defaultError,k.assertNever(t)}return{message:n}};let Ge=B;function Ct(t){Ge=t}function me(){return Ge}const ge=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let c="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)c=l(o,{data:e,defaultError:c}).message;return{...s,path:i,message:c}},Ot=[];function p(t,e){const n=me(),r=ge({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===B?void 0:B].filter(s=>!!s)});t.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return _;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return S.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return _;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const _=Object.freeze({status:"aborted"}),W=t=>({status:"dirty",value:t}),T=t=>({status:"valid",value:t}),Te=t=>t.status==="aborted",Ce=t=>t.status==="dirty",X=t=>t.status==="valid",Q=t=>typeof Promise<"u"&&t instanceof Promise;function _e(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function qe(t,e,n,r,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var f;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));var ee,te;class Z{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const He=(t,e)=>{if(X(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new C(t.common.issues);return this._error=n,this._error}}};function v(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,c)=>{var u,l;const{message:m}=t;return o.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:(u=m??r)!==null&&u!==void 0?u:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(l=m??n)!==null&&l!==void 0?l:c.defaultError}},description:s}}class b{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Q(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},i=this._parseSync({data:e,path:s.path,parent:s});return He(s,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Q(s)?s:Promise.resolve(s));return He(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=e(s),c=()=>i.addIssue({code:d.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new j({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return N.create(this,this._def)}nullable(){return U.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return E.create(this,this._def)}promise(){return K.create(this,this._def)}or(e){return se.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ue({...v(this._def),innerType:this,defaultValue:n,typeName:g.ZodDefault})}brand(){return new je({typeName:g.ZodBranded,type:this,...v(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new pe({...v(this._def),innerType:this,catchValue:n,typeName:g.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return he.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Et=/^c[^\s-]{8,}$/i,jt=/^[0-9a-z]+$/,Zt=/^[0-9A-HJKMNP-TV-Z]{26}$/,It=/^[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,Nt=/^[a-z0-9_-]{21}$/i,Rt=/^[-+]?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)?)??$/,At=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Pt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oe;const Mt=/^(?:(?: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])$/,$t=/^(([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})))$/,Dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ke="((\\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])))",Ut=new RegExp(`^${Ke}$`);function Ye(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Vt(t){return new RegExp(`^${Ye(t)}$`)}function Je(t){let e=`${Ke}T${Ye(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Lt(t,e){return!!((e==="v4"||!e)&&Mt.test(t)||(e==="v6"||!e)&&$t.test(t))}class O extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.string,received:i.parsedType}),_}const r=new S;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,c=e.data.length<i.value;(o||c)&&(s=this._getOrReturnCtx(e,s),o?p(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&p(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")At.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Oe||(Oe=new RegExp(Pt,"u")),Oe.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")It.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Nt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"nanoid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Et.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")jt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Zt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:d.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:d.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Je(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Ut.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Vt(i).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Rt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"duration",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Lt(e.data,i.version)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Dt.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"base64",code:d.invalid_string,message:i.message}),r.dirty()):k.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:d.invalid_string,...f.errToObj(r)})}_addCheck(e){return new O({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...f.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...f.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...f.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...f.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...f.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...f.errToObj(n)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new O({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new O({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}O.create=t=>{var e;return new O({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};function zt(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(t.toFixed(s).replace(".","")),o=parseInt(e.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class M extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.number,received:i.parsedType}),_}let r;const s=new S;for(const i of this._def.checks)i.kind==="int"?k.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),p(r,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?zt(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_finite,message:i.message}),s.dirty()):k.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,r,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:f.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}M.create=t=>new M({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});class $ extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==h.bigint){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.bigint,received:i.parsedType}),_}let r;const s=new S;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),p(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):k.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,r,s){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:f.toString(s)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}$.create=t=>{var e;return new $({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...v(t)})};class ne extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.boolean,received:r.parsedType}),_}return T(e.data)}}ne.create=t=>new ne({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...v(t)});class V extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.date,received:i.parsedType}),_}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_date}),_}const r=new S;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):k.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}V.create=t=>new V({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...v(t)});class ye extends b{_parse(e){if(this._getType(e)!==h.symbol){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.symbol,received:r.parsedType}),_}return T(e.data)}}ye.create=t=>new ye({typeName:g.ZodSymbol,...v(t)});class re extends b{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.undefined,received:r.parsedType}),_}return T(e.data)}}re.create=t=>new re({typeName:g.ZodUndefined,...v(t)});class ae extends b{_parse(e){if(this._getType(e)!==h.null){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.null,received:r.parsedType}),_}return T(e.data)}}ae.create=t=>new ae({typeName:g.ZodNull,...v(t)});class G extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}}G.create=t=>new G({typeName:g.ZodAny,...v(t)});class L extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}}L.create=t=>new L({typeName:g.ZodUnknown,...v(t)});class R extends b{_parse(e){const n=this._getOrReturnCtx(e);return p(n,{code:d.invalid_type,expected:h.never,received:n.parsedType}),_}}R.create=t=>new R({typeName:g.ZodNever,...v(t)});class ve extends b{_parse(e){if(this._getType(e)!==h.undefined){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.void,received:r.parsedType}),_}return T(e.data)}}ve.create=t=>new ve({typeName:g.ZodVoid,...v(t)});class E extends b{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==h.array)return p(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),_;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,c=n.data.length<s.exactLength.value;(o||c)&&(p(n,{code:o?d.too_big:d.too_small,minimum:c?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(p(n,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(p(n,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,c)=>s.type._parseAsync(new Z(n,o,n.path,c)))).then(o=>S.mergeArray(r,o));const i=[...n.data].map((o,c)=>s.type._parseSync(new Z(n,o,n.path,c)));return S.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new E({...this._def,minLength:{value:e,message:f.toString(n)}})}max(e,n){return new E({...this._def,maxLength:{value:e,message:f.toString(n)}})}length(e,n){return new E({...this._def,exactLength:{value:e,message:f.toString(n)}})}nonempty(e){return this.min(1,e)}}E.create=(t,e)=>new E({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...v(e)});function q(t){if(t instanceof x){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=N.create(q(r))}return new x({...t._def,shape:()=>e})}else return t instanceof E?new E({...t._def,type:q(t.element)}):t instanceof N?N.create(q(t.unwrap())):t instanceof U?U.create(q(t.unwrap())):t instanceof I?I.create(t.items.map(e=>q(e))):t}class x extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=k.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==h.object){const l=this._getOrReturnCtx(e);return p(l,{code:d.invalid_type,expected:h.object,received:l.parsedType}),_}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof R&&this._def.unknownKeys==="strip"))for(const l in s.data)o.includes(l)||c.push(l);const u=[];for(const l of o){const m=i[l],w=s.data[l];u.push({key:{status:"valid",value:l},value:m._parse(new Z(s,w,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof R){const l=this._def.unknownKeys;if(l==="passthrough")for(const m of c)u.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(l==="strict")c.length>0&&(p(s,{code:d.unrecognized_keys,keys:c}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const m of c){const w=s.data[m];u.push({key:{status:"valid",value:m},value:l._parse(new Z(s,w,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const l=[];for(const m of u){const w=await m.key,Y=await m.value;l.push({key:w,value:Y,alwaysSet:m.alwaysSet})}return l}).then(l=>S.mergeObjectSync(r,l)):S.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var s,i,o,c;const u=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=f.errToObj(e).message)!==null&&c!==void 0?c:u}:{message:u}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const n={};return k.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new x({...this._def,shape:()=>n})}omit(e){const n={};return k.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new x({...this._def,shape:()=>n})}deepPartial(){return q(this)}partial(e){const n={};return k.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}),new x({...this._def,shape:()=>n})}required(e){const n={};return k.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof N;)i=i._def.innerType;n[r]=i}}),new x({...this._def,shape:()=>n})}keyof(){return Fe(k.objectKeys(this.shape))}}x.create=(t,e)=>new x({shape:()=>t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...v(e)}),x.strictCreate=(t,e)=>new x({shape:()=>t,unknownKeys:"strict",catchall:R.create(),typeName:g.ZodObject,...v(e)}),x.lazycreate=(t,e)=>new x({shape:t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...v(e)});class se extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const o=i.map(c=>new C(c.ctx.common.issues));return p(n,{code:d.invalid_union,unionErrors:o}),_}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},m=u._parseSync({data:n.data,path:n.path,parent:l});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const c=o.map(u=>new C(u));return p(n,{code:d.invalid_union,unionErrors:c}),_}}get options(){return this._def.options}}se.create=(t,e)=>new se({options:t,typeName:g.ZodUnion,...v(e)});const A=t=>t instanceof ce?A(t.schema):t instanceof j?A(t.innerType()):t instanceof de?[t.value]:t instanceof D?t.options:t instanceof le?k.objectValues(t.enum):t instanceof ue?A(t._def.innerType):t instanceof re?[void 0]:t instanceof ae?[null]:t instanceof N?[void 0,...A(t.unwrap())]:t instanceof U?[null,...A(t.unwrap())]:t instanceof je||t instanceof fe?A(t.unwrap()):t instanceof pe?A(t._def.innerType):[];class be extends b{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.object)return p(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),_;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(p(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const s=new Map;for(const i of n){const o=A(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(s.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);s.set(c,i)}}return new be({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...v(r)})}}function Ee(t,e){const n=P(t),r=P(e);if(t===e)return{valid:!0,data:t};if(n===h.object&&r===h.object){const s=k.objectKeys(e),i=k.objectKeys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...e};for(const c of i){const u=Ee(t[c],e[c]);if(!u.valid)return{valid:!1};o[c]=u.data}return{valid:!0,data:o}}else if(n===h.array&&r===h.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],c=e[i],u=Ee(o,c);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return n===h.date&&r===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ie extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(Te(i)||Te(o))return _;const c=Ee(i.value,o.value);return c.valid?((Ce(i)||Ce(o))&&n.dirty(),{status:n.value,value:c.data}):(p(r,{code:d.invalid_intersection_types}),_)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ie.create=(t,e,n)=>new ie({left:t,right:e,typeName:g.ZodIntersection,...v(n)});class I extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.array)return p(r,{code:d.invalid_type,expected:h.array,received:r.parsedType}),_;if(r.data.length<this._def.items.length)return p(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&r.data.length>this._def.items.length&&(p(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new Z(r,o,r.path,c)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>S.mergeArray(n,o)):S.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new I({...this._def,rest:e})}}I.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new I({items:t,typeName:g.ZodTuple,rest:null,...v(e)})};class oe extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.object)return p(r,{code:d.invalid_type,expected:h.object,received:r.parsedType}),_;const s=[],i=this._def.keyType,o=this._def.valueType;for(const c in r.data)s.push({key:i._parse(new Z(r,c,r.path,c)),value:o._parse(new Z(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?S.mergeObjectAsync(n,s):S.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof b?new oe({keyType:e,valueType:n,typeName:g.ZodRecord,...v(r)}):new oe({keyType:O.create(),valueType:e,typeName:g.ZodRecord,...v(n)})}}class ke extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.map)return p(r,{code:d.invalid_type,expected:h.map,received:r.parsedType}),_;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([c,u],l)=>({key:s._parse(new Z(r,c,r.path,[l,"key"])),value:i._parse(new Z(r,u,r.path,[l,"value"]))}));if(r.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,m=await u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const u of o){const l=u.key,m=u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}}}}ke.create=(t,e,n)=>new ke({valueType:e,keyType:t,typeName:g.ZodMap,...v(n)});class z extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==h.set)return p(r,{code:d.invalid_type,expected:h.set,received:r.parsedType}),_;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(p(r,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(p(r,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(u){const l=new Set;for(const m of u){if(m.status==="aborted")return _;m.status==="dirty"&&n.dirty(),l.add(m.value)}return{status:n.value,value:l}}const c=[...r.data.values()].map((u,l)=>i._parse(new Z(r,u,r.path,l)));return r.common.async?Promise.all(c).then(u=>o(u)):o(c)}min(e,n){return new z({...this._def,minSize:{value:e,message:f.toString(n)}})}max(e,n){return new z({...this._def,maxSize:{value:e,message:f.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}z.create=(t,e)=>new z({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...v(e)});class H extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.function)return p(n,{code:d.invalid_type,expected:h.function,received:n.parsedType}),_;function r(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),B].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:u}})}function s(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),B].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof K){const c=this;return T(async function(...u){const l=new C([]),m=await c._def.args.parseAsync(u,i).catch(J=>{throw l.addIssue(r(u,J)),l}),w=await Reflect.apply(o,this,m);return await c._def.returns._def.type.parseAsync(w,i).catch(J=>{throw l.addIssue(s(w,J)),l})})}else{const c=this;return T(function(...u){const l=c._def.args.safeParse(u,i);if(!l.success)throw new C([r(u,l.error)]);const m=Reflect.apply(o,this,l.data),w=c._def.returns.safeParse(m,i);if(!w.success)throw new C([s(m,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:I.create(e).rest(L.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new H({args:e||I.create([]).rest(L.create()),returns:n||L.create(),typeName:g.ZodFunction,...v(r)})}}class ce extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ce.create=(t,e)=>new ce({getter:t,typeName:g.ZodLazy,...v(e)});class de extends b{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return p(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(t,e)=>new de({value:t,typeName:g.ZodLiteral,...v(e)});function Fe(t,e){return new D({values:t,typeName:g.ZodEnum,...v(e)})}class D extends b{constructor(){super(...arguments),ee.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return p(n,{expected:k.joinValues(r),received:n.parsedType,code:d.invalid_type}),_}if(_e(this,ee)||qe(this,ee,new Set(this._def.values)),!_e(this,ee).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return p(n,{received:n.data,code:d.invalid_enum_value,options:r}),_}return T(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return D.create(e,{...this._def,...n})}exclude(e,n=this._def){return D.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ee=new WeakMap,D.create=Fe;class le extends b{constructor(){super(...arguments),te.set(this,void 0)}_parse(e){const n=k.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==h.string&&r.parsedType!==h.number){const s=k.objectValues(n);return p(r,{expected:k.joinValues(s),received:r.parsedType,code:d.invalid_type}),_}if(_e(this,te)||qe(this,te,new Set(k.getValidEnumValues(this._def.values))),!_e(this,te).has(e.data)){const s=k.objectValues(n);return p(r,{received:r.data,code:d.invalid_enum_value,options:s}),_}return T(e.data)}get enum(){return this._def.values}}te=new WeakMap,le.create=(t,e)=>new le({values:t,typeName:g.ZodNativeEnum,...v(e)});class K extends b{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.promise&&n.common.async===!1)return p(n,{code:d.invalid_type,expected:h.promise,received:n.parsedType}),_;const r=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return T(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}K.create=(t,e)=>new K({type:t,typeName:g.ZodPromise,...v(e)});class j extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{p(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async c=>{if(n.value==="aborted")return _;const u=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return u.status==="aborted"?_:u.status==="dirty"||n.value==="dirty"?W(u.value):u});{if(n.value==="aborted")return _;const c=this._def.schema._parseSync({data:o,path:r.path,parent:r});return c.status==="aborted"?_:c.status==="dirty"||n.value==="dirty"?W(c.value):c}}if(s.type==="refinement"){const o=c=>{const u=s.refinement(c,i);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value).then(()=>({status:n.value,value:c.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!X(o))return o;const c=s.transform(o.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>X(o)?Promise.resolve(s.transform(o.value,i)).then(c=>({status:n.value,value:c})):o);k.assertNever(s)}}j.create=(t,e,n)=>new j({schema:t,typeName:g.ZodEffects,effect:e,...v(n)}),j.createWithPreprocess=(t,e,n)=>new j({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...v(n)});class N extends b{_parse(e){return this._getType(e)===h.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}N.create=(t,e)=>new N({innerType:t,typeName:g.ZodOptional,...v(e)});class U extends b{_parse(e){return this._getType(e)===h.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(t,e)=>new U({innerType:t,typeName:g.ZodNullable,...v(e)});class ue extends b{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===h.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ue.create=(t,e)=>new ue({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class pe extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class xe extends b{_parse(e){if(this._getType(e)!==h.nan){const r=this._getOrReturnCtx(e);return p(r,{code:d.invalid_type,expected:h.nan,received:r.parsedType}),_}return{status:"valid",value:e.data}}}xe.create=t=>new xe({typeName:g.ZodNaN,...v(t)});const Bt=Symbol("zod_brand");class je extends b{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class he extends b{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_:i.status==="dirty"?(n.dirty(),W(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new he({in:e,out:n,typeName:g.ZodPipeline})}}class fe extends b{_parse(e){const n=this._def.innerType._parse(e),r=s=>(X(s)&&(s.value=Object.freeze(s.value)),s);return Q(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}fe.create=(t,e)=>new fe({innerType:t,typeName:g.ZodReadonly,...v(e)});function Xe(t,e={},n){return t?G.create().superRefine((r,s)=>{var i,o;if(!t(r)){const c=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,u=(o=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof c=="string"?{message:c}:c;s.addIssue({code:"custom",...l,fatal:u})}}):G.create()}const Wt={object:x.lazycreate};var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));const Gt=(t,e={message:`Input not instance of ${t.name}`})=>Xe(n=>n instanceof t,e),Qe=O.create,et=M.create,qt=xe.create,Ht=$.create,tt=ne.create,Kt=V.create,Yt=ye.create,Jt=re.create,Ft=ae.create,Xt=G.create,Qt=L.create,en=R.create,tn=ve.create,nn=E.create,rn=x.create,an=x.strictCreate,sn=se.create,on=be.create,cn=ie.create,dn=I.create,ln=oe.create,un=ke.create,pn=z.create,hn=H.create,fn=ce.create,mn=de.create,gn=D.create,_n=le.create,yn=K.create,nt=j.create,vn=N.create,bn=U.create,kn=j.createWithPreprocess,xn=he.create;var a=Object.freeze({__proto__:null,defaultErrorMap:B,setErrorMap:Ct,getErrorMap:me,makeIssue:ge,EMPTY_PATH:Ot,addIssueToContext:p,ParseStatus:S,INVALID:_,DIRTY:W,OK:T,isAborted:Te,isDirty:Ce,isValid:X,isAsync:Q,get util(){return k},get objectUtil(){return we},ZodParsedType:h,getParsedType:P,ZodType:b,datetimeRegex:Je,ZodString:O,ZodNumber:M,ZodBigInt:$,ZodBoolean:ne,ZodDate:V,ZodSymbol:ye,ZodUndefined:re,ZodNull:ae,ZodAny:G,ZodUnknown:L,ZodNever:R,ZodVoid:ve,ZodArray:E,ZodObject:x,ZodUnion:se,ZodDiscriminatedUnion:be,ZodIntersection:ie,ZodTuple:I,ZodRecord:oe,ZodMap:ke,ZodSet:z,ZodFunction:H,ZodLazy:ce,ZodLiteral:de,ZodEnum:D,ZodNativeEnum:le,ZodPromise:K,ZodEffects:j,ZodTransformer:j,ZodOptional:N,ZodNullable:U,ZodDefault:ue,ZodCatch:pe,ZodNaN:xe,BRAND:Bt,ZodBranded:je,ZodPipeline:he,ZodReadonly:fe,custom:Xe,Schema:b,ZodSchema:b,late:Wt,get ZodFirstPartyTypeKind(){return g},coerce:{string:t=>O.create({...t,coerce:!0}),number:t=>M.create({...t,coerce:!0}),boolean:t=>ne.create({...t,coerce:!0}),bigint:t=>$.create({...t,coerce:!0}),date:t=>V.create({...t,coerce:!0})},any:Xt,array:nn,bigint:Ht,boolean:tt,date:Kt,discriminatedUnion:on,effect:nt,enum:gn,function:hn,instanceof:Gt,intersection:cn,lazy:fn,literal:mn,map:un,nan:qt,nativeEnum:_n,never:en,null:Ft,nullable:bn,number:et,object:rn,oboolean:()=>tt().optional(),onumber:()=>et().optional(),optional:vn,ostring:()=>Qe().optional(),pipeline:xn,preprocess:kn,promise:yn,record:ln,set:pn,strictObject:an,string:Qe,symbol:Yt,transformer:nt,tuple:dn,undefined:Jt,union:sn,unknown:Qt,void:tn,NEVER:_,ZodIssueCode:d,quotelessJson:Tt,ZodError:C});wt(a);const Sn=a.object({start:a.number(),limit:a.number(),length:a.number()}),Ze=a.object({created_at:a.string(),updated_at:a.string()}),wn=a.object({email:a.string().optional(),email_verified:a.boolean().optional(),name:a.string().optional(),username:a.string().optional(),given_name:a.string().optional(),phone_number:a.string().optional(),phone_verified:a.boolean().optional(),family_name:a.string().optional()}).catchall(a.any()),Tn=a.object({connection:a.string(),user_id:a.string(),provider:a.string(),isSocial:a.boolean(),access_token:a.string().optional(),access_token_secret:a.string().optional(),refresh_token:a.string().optional(),profileData:wn.optional()}),Ie=a.object({email:a.string().optional(),username:a.string().optional(),given_name:a.string().optional(),family_name:a.string().optional(),nickname:a.string().optional(),name:a.string().optional(),picture:a.string().optional(),locale:a.string().optional(),linked_to:a.string().optional(),profileData:a.string().optional(),user_id:a.string().optional()}),rt=Ie.extend({email_verified:a.boolean().default(!1),verify_email:a.boolean().optional(),last_ip:a.string().optional(),last_login:a.string().optional(),user_id:a.string().optional(),provider:a.string().default("email"),connection:a.string().default("email")}),at=rt.extend(Ze.shape).extend({user_id:a.string(),email:a.string(),is_social:a.boolean(),login_count:a.number(),identities:a.array(Tn).optional()}),Cn=at,On=Ie.extend({email:a.string(),login_count:a.number(),multifactor:a.array(a.string()).optional(),last_ip:a.string().optional(),last_login:a.string().optional(),user_id:a.string()}).catchall(a.any());var st=(t=>(t.SUCCESS_API_OPERATION="sapi",t.SUCCESS_SILENT_AUTH="ssa",t.FAILED_SILENT_AUTH="fsa",t.SUCCESS_SIGNUP="ss",t.FAILED_SIGNUP="fs",t.SUCCESS_LOGIN="s",t.FAILED_LOGIN="f",t.FAILED_LOGIN_INCORRECT_PASSWORD="fp",t.SUCCESS_LOGOUT="slo",t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",t.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",t.CODE_LINK_SENT="cls",t.NOT_IMPLEMENTED_1="seccft",t))(st||{});const En=a.enum(["sapi","ssa","fsa","ss","ssa","fs","s","f","fp","slo","scoa","fcoa","seccft","cls","seacft","serft"]),it=a.object({name:a.string(),version:a.string(),env:a.object({node:a.string().optional()}).optional()}),jn=a.object({type:En,date:a.string(),description:a.string().optional(),log_id:a.string().optional(),_id:a.string().optional(),ip:a.string(),user_agent:a.string(),details:a.any().optional(),isMobile:a.boolean(),user_id:a.string().optional(),user_name:a.string().optional(),connection:a.string().optional(),connection_id:a.string().optional(),client_id:a.string().optional(),client_name:a.string().optional(),audience:a.string().optional(),scope:a.array(a.string()).optional(),strategy:a.string().optional(),strategy_type:a.string().optional(),hostname:a.string().optional(),auth0_client:it.optional()}),ot=a.object({id:a.string(),name:a.string(),allowed_web_origins:a.string().transform(t=>t===null?"":t).default(""),allowed_callback_urls:a.string().transform(t=>t===null?"":t).default(""),allowed_logout_urls:a.string().transform(t=>t===null?"":t).default(""),email_validation:a.enum(["enabled","disabled","enforced"]).default("enforced"),client_secret:a.string().default(""),disable_sign_ups:a.boolean().default(!1)}),Zn=a.object({created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}).extend(ot.shape);var Ne=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(Ne||{}),Re=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t))(Re||{}),Ae=(t=>(t.S265="S256",t.plain="plain",t))(Ae||{});const Se=a.object({client_id:a.string(),vendor_id:a.string().optional(),response_type:a.nativeEnum(Ne).optional(),response_mode:a.nativeEnum(Re).optional(),redirect_uri:a.string().optional(),audience:a.string().optional(),state:a.string().optional(),nonce:a.string().optional(),scope:a.string().optional(),code_challenge_method:a.nativeEnum(Ae).optional(),code_challenge:a.string().optional(),username:a.string().optional()}),ct=a.object({authParams:Se,code:a.string(),user_id:a.string(),created_at:a.string(),expires_at:a.string(),used_at:a.string().optional()}),In=a.object({...ct.shape,created_at:a.string()}),Nn=a.object({colors:a.object({primary:a.string(),page_background:a.object({type:a.string().optional(),start:a.string().optional(),end:a.string().optional(),angle_deg:a.number().optional()}).optional()}).optional(),logo_url:a.string().optional(),favicon_url:a.string().optional(),font:a.object({url:a.string()}).optional()}),dt=a.object({id:a.string().optional(),name:a.string(),client_id:a.string().optional(),client_secret:a.string().optional(),authorization_endpoint:a.string().optional(),response_type:a.custom().optional(),response_mode:a.custom().optional(),private_key:a.string().optional(),kid:a.string().optional(),team_id:a.string().optional(),token_endpoint:a.string().optional(),token_exchange_basic_auth:a.boolean().optional(),userinfo_endpoint:a.string().optional(),scope:a.string().optional()}),Pe=a.object({id:a.string(),created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}).extend(dt.shape),Rn=a.object({domain:a.string(),dkim_private_key:a.string().optional(),dkim_public_key:a.string().optional(),email_api_key:a.string().optional(),email_service:a.union([a.literal("mailgun"),a.literal("mailchannels")]).optional()}),lt=a.object({id:a.string(),name:a.string(),domains:a.array(Rn),allowed_callback_urls:a.array(a.string()),allowed_logout_urls:a.array(a.string()),allowed_web_origins:a.array(a.string()),email_validation:a.union([a.literal("enabled"),a.literal("disabled"),a.literal("enforced")]),tenant_id:a.string(),client_secret:a.string(),disable_sign_ups:a.boolean(),tenant:a.object({name:a.string(),audience:a.string().optional(),logo:a.string().optional(),primary_color:a.string().optional(),secondary_color:a.string().optional(),sender_email:a.string(),sender_name:a.string(),support_url:a.string().optional(),language:a.string().length(2).optional()})}),An=lt.extend({connections:a.array(Pe)}),Pn=lt.extend({connections:a.array(Pe.partial())}),ut=a.object({domain:a.string(),dkim_private_key:a.string().optional(),dkim_public_key:a.string().optional(),email_api_key:a.string().optional(),email_service:a.enum(["mailgun","mailchannels"])}),Mn=Ze.extend({...ut.shape,id:a.string()}),pt=a.object({trigger_id:a.enum(["post-user-registration","post-user-login"]),enabled:a.boolean().default(!1),url:a.string(),hook_id:a.string().optional()}),$n=pt.extend({...Ze.shape,hook_id:a.string()}),ht=a.object({alg:a.string(),e:a.string(),kid:a.string(),kty:a.string(),n:a.string(),use:a.string().optional()}),Dn=a.object({keys:a.array(ht)}),Un=a.object({issuer:a.string(),authorization_endpoint:a.string(),token_endpoint:a.string(),device_authorization_endpoint:a.string(),userinfo_endpoint:a.string(),mfa_challenge_endpoint:a.string(),jwks_uri:a.string(),registration_endpoint:a.string(),revocation_endpoint:a.string(),scopes_supported:a.array(a.string()),response_types_supported:a.array(a.string()),code_challenge_methods_supported:a.array(a.string()),response_modes_supported:a.array(a.string()),subject_types_supported:a.array(a.string()),id_token_signing_alg_values_supported:a.array(a.string()),token_endpoint_auth_methods_supported:a.array(a.string()),claims_supported:a.array(a.string()),request_uri_parameter_supported:a.boolean(),request_parameter_supported:a.boolean(),token_endpoint_auth_signing_alg_values_supported:a.array(a.string())}),ft=a.object({id:a.string(),email:a.string(),code:a.string(),ip:a.string().optional(),send:a.enum(["email","link"]),authParams:Se,expires_at:a.string(),used_at:a.string().optional(),user_id:a.string().optional()}),Vn=a.object({created_at:a.string(),...ft.shape}),mt=a.object({session_id:a.string(),client_id:a.string(),expires_at:a.string(),used_at:a.string(),deleted_at:a.string().optional(),user_id:a.string()}),Ln=a.object({created_at:a.string(),...mt.shape}),zn=a.object({private_key:a.string(),public_key:a.string(),kid:a.string(),created_at:a.string(),revoked_at:a.string().optional()}),Bn=a.object({kid:a.string().openapi({description:"The key id of the signing key"}),cert:a.string().openapi({description:"The public certificate of the signing key"}),fingerprint:a.string().openapi({description:"The cert fingerprint"}),thumbprint:a.string().openapi({description:"The cert thumbprint"}),pkcs7:a.string().optional().openapi({description:"The public certificate of the signing key in pkcs7 format"}),current:a.boolean().optional().openapi({description:"True if the key is the current key"}),next:a.boolean().optional().openapi({description:"True if the key is the next key"}),previous:a.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:a.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:a.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:a.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:a.string().optional().openapi({description:"The date and time when the key was revoked"})}),gt=a.object({name:a.string(),audience:a.string(),sender_email:a.string().email(),sender_name:a.string(),support_url:a.string().url().optional(),logo:a.string().url().optional(),primary_color:a.string().optional(),secondary_color:a.string().optional(),language:a.string().optional()}),Wn=gt.extend({created_at:a.string().transform(t=>t===null?"":t),updated_at:a.string().transform(t=>t===null?"":t)}),Gn=a.object({logoUrl:a.string(),loginBackgroundImage:a.string().nullish(),style:a.object({primaryColor:a.string(),buttonTextColor:a.string(),primaryHoverColor:a.string()}),supportEmail:a.string().nullable(),supportUrl:a.string().nullable(),name:a.string(),showGreyishBackground:a.boolean().optional(),termsAndConditionsUrl:a.string().nullable(),companyName:a.string().optional(),checkoutHideSocial:a.boolean().optional(),siteUrl:a.string().nullable(),manageSubscriptionsUrl:a.string().optional()});var Me=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t))(Me||{});const $e=a.nativeEnum(Me),qn=a.object({grant_type:$e.refine(t=>t==="authorization_code"),code:a.string(),client_secret:a.string(),client_id:a.string()}),Hn=a.object({grant_type:$e.refine(t=>t==="authorization_code"),code:a.string(),code_verifier:a.string(),client_id:a.string().optional(),redirect_uri:a.string()}),Kn=a.object({grant_type:$e.refine(t=>t==="client_credentials"),scope:a.string().optional(),client_secret:a.string(),client_id:a.string(),audience:a.string().optional()});a.object({access_token:a.string(),id_token:a.string().optional(),scope:a.string().optional(),state:a.string().optional(),refresh_token:a.string().optional(),token_type:a.string(),expires_in:a.number()}),a.object({code:a.string(),state:a.string().optional()});const _t=a.object({id:a.string(),expires_at:a.string(),auth0Client:a.string().optional(),authParams:Se}),Yn=a.object({..._t.shape,created_at:a.string(),updated_at:a.string()}),Jn="tmp";return y.Auth0Client=it,y.AuthorizationResponseMode=Re,y.AuthorizationResponseType=Ne,y.ClientSchema=An,y.CodeChallengeMethod=Ae,y.GrantType=Me,y.LogTypes=st,y.PartialClientSchema=Pn,y.applicationInsertSchema=ot,y.applicationSchema=Zn,y.auth0UserResponseSchema=Cn,y.authParamsSchema=Se,y.authenticationCodeInsertSchema=ct,y.authenticationCodeSchema=In,y.authorizationCodeGrantTypeParamsSchema=qn,y.baseUserSchema=Ie,y.brandingSchema=Nn,y.certificateSchema=zn,y.clientCredentialGrantTypeParamsSchema=Kn,y.connectionInsertSchema=dt,y.connectionSchema=Pe,y.domainInsertSchema=ut,y.domainSchema=Mn,y.hookInsertSchema=pt,y.hookSchema=$n,y.jwksKeySchema=Dn,y.jwksSchema=ht,y.logSchema=jn,y.openIDConfigurationSchema=Un,y.otpInsertSchema=ft,y.otpSchema=Vn,y.pkceAuthorizationCodeGrantTypeParamsSchema=Hn,y.sessionInsertSchema=mt,y.sessionSchema=Ln,y.signingKeySchema=Bn,y.tenantInsertSchema=gt,y.tenantSchema=Wn,y.tmp=Jn,y.totalsSchema=Sn,y.universalLoginSessionInsertSchema=_t,y.universalLoginSessionSchema=Yn,y.userInsertSchema=rt,y.userResponseSchema=On,y.userSchema=at,y.vendorSettingsSchema=Gn,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y}({});
|