PageSourceSearch

https://susd30.us/dist/assets/schemas-BdgNnLKl.js

js susd30.us collected 2026-09-29 17:33:55 UTC 87,766 bytes, 53 lines download raw bytes

1function Pt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Ke(e,t="|"){return e.map(n=>At(n)).join(t)}function Ze(e,t){return typeof t=="bigint"?t.toString():t}function Ae(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function zn(e){return e==null}function je(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function wn(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const Be=Symbol("evaluating");function $n(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Be)return r===void 0&&(r=Be,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function P(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function D(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function kn(e){return JSON.stringify(e)}function On(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Et="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zn=Ae(()=>{if(A.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function G(e){if(te(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(te(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Tt(e){return G(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Sn=new Set(["string","number","symbol"]);function ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function m(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function At(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function In(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Pn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function En(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={};for(const u of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,u))throw new Error(`Unrecognized key: "${String(u)}"`);t[u]&&P(s,u,n.shape[u])}return P(this,"shape",s),s},checks:[]});return C(e,i)}function Tn(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=D(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const u of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,u))throw new Error(`Unrecognized key: "${String(u)}"`);t[u]&&delete s[u]}return P(this,"shape",s),s},checks:[]});return C(e,i)}function An(e,t){if(!G(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=D(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return P(this,"shape",i),i}});return C(e,o)}function jn(e,t){if(!G(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return P(this,"shape",r),r}});return C(e,n)}function Nn(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=D(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return P(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return C(e,n)}function We(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const u=D(t._zod.def,{get shape(){const c=t._zod.def.shape,a={...c};if(n)for(const f of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(c,f))throw new Error(`Unrecognized key: "${String(f)}"`);n[f]&&(a[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f of Reflect.ownKeys(c))a[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return P(this,"shape",a),a},checks:[]});return C(t,u)}function Rn(e,t,n){const r=D(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,s))throw new Error(`Unrecognized key: "${String(s)}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s of Reflect.ownKeys(o))i[s]=new e({type:"nonoptional",innerType:o[s]});return P(this,"shape",i),i}});return C(t,r)}function U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Dn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ae(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function K(e){return typeof e=="string"?e:e?.message}function Ge(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function J(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:K(e.inst?._zod.def?.error?.(e))??K(i?.(e))??K(t?.error?.(e))??K(n.customError?.(e))??K(n.localeError?.(e))??"Invalid input",{inst:u,schema:c,continue:a,input
1:f,...d}=e;return d.path??(d.path=[]),d.message=s,t?.reportInput&&(d.input=f),d}const Cn=/[\uD800-\uDBFF]/;function Ne(e){const t=e.length;if(!Cn.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Re(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Fn(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Y(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function xn(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Un(e,n,r.value)}}function L(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function jt(e,t,n){return L(e,t,n,!1)}function Un(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:L(this,t,n.bind(this))},set(r){L(this,t,r)}})}function Mn(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let be,R=!1;const Ln={configurable:!0,get(){R=!0}};function b(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&be!==e._zod){be=void 0;return}be=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ln);const o=R;R=!1;try{const i=n(this);return R?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),R=R||o,i}catch(i){throw delete this[t],R=R||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Jn(e,t,n,r){const o=Mn(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const Vn="~constantCatch";function Kn(e){const t=()=>e;return t[Vn]=!0,t}var Ye;const ye={value:void 0,enumerable:!1};let qe="captureStackTrace"in Error?Error:null;function Bn(e){const t=qe;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return qe=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function l(e,t,n,r){const o={};function i(p){this.def=p,this.constr=d,this.traits=new Set}i.prototype=o;const s=n,u=s&&new WeakSet;function c(p,h){if(!p._zod){ye.value=new i(h);try{Object.defineProperty(p,"_zod",ye)}finally{ye.value=void 0}}if(p._zod.traits.has(e))return;if(p._zod.traits.add(e),t(p,h),u){const g=Object.getPrototypeOf(p),v=p._zod.constr.prototype;let T=g;for(;T&&T!==v;)T=Object.getPrototypeOf(T);const N=T??g;u.has(N)||(u.add(N),xn(N,s))}const _=d.prototype;for(const g in _)Object.prototype.hasOwnProperty.call(_,g)&&(g in p||(p[g]=_[g].bind(p)))}const a=r?.Parent??Object;class f extends a{}Object.defineProperty(f,"name",{value:e});function d(p){const h=r?.Parent?Bn(f):this;c(h,p);const _=h._zod.deferred;if(_){for(const v of _)v();h._zod.deferred=void 0}const g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(h),h}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}class M extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Nt extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Ye=globalThis).__zod_globalConfig??(Ye.__zod_globalConfig={});const A=globalThis.__zod_globalConfig;function F(e){return e&&Object.assign(A,e),A}function Wn(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ze,2)),e.message}function Gn(e){this._zod.message=e}const Yn={get:Wn,set:Gn,enumerable:!0,configurable:!0},ze={value:void 0,enumerable:!1},we={value:void 0,enumerable:!1},Xe=new WeakSet([Object.prototype,Error.prototype]),Rt=(e,t)=>
1{e.name="$ZodError",ze.value=e._zod,Object.defineProperty(e,"_zod",ze),we.value=t,Object.defineProperty(e,"issues",we),ze.value=void 0,we.value=void 0,Object.defineProperty(e,"message",Yn);const n=Object.getPrototypeOf(e);Xe.has(n)||(Xe.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},Dt=l("$ZodError",Rt),fe=l("$ZodError",Rt,void 0,{Parent:Error});function qn(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Xn(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?qn(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Hn(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>r({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const u=[...i,...s.path];if(u.length===0)n._errors.push(t(s));else{let c=n,a=0;for(;a<u.length;){const f=u[a],d=a===u.length-1;if(f==="_errors"){d&&c._errors.push(t(s)),a++;continue}Object.prototype.hasOwnProperty.call(c,f)||Object.defineProperty(c,f,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const p=c[f];d&&p._errors.push(t(s)),c=p,a++}}}};return r(e),n}function le(e,t){return{callee:t?.callee??e,Err:t?.Err}}const de=e=>{const t=(n,r,o,i)=>{const s=o?{...o,async:!1}:{async:!1},u=n._zod.run({value:r,issues:[]},s);if(u instanceof Promise)throw new M;if(u.issues.length){const c=new(i?.Err??e)(u.issues.map(a=>J(a,s,F())));throw Et(c,i?.callee??t),c}return u.value};return t},He=de(fe),pe=e=>{const t=async(n,r,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let u=n._zod.run({value:r,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){const c=new(i?.Err??e)(u.issues.map(a=>J(a,s,F())));throw Et(c,i?.callee??t),c}return u.value};return t},Qe=pe(fe),he=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new M;return i.issues.length?{success:!1,error:new(e??Dt)(i.issues.map(s=>J(s,o,F())))}:{success:!0,data:i.value}},Qn=he(fe),me=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>J(s,o,F())))}:{success:!0,data:i.value}},er=me(fe),tr=e=>{const t=de(e),n=(r,o,i,s)=>{const u=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,u,le(n,s))};return n},nr=e=>{const t=de(e),n=(r,o,i,s)=>t(r,o,i,le(n,s));return n},rr=e=>{const t=pe(e),n=async(r,o,i,s)=>{const u=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,u,le(n,s))};return n},or=e=>{const t=pe(e),n=async(r,o,i,s)=>await t(r,o,i,le(n,s));return n},ir=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return he(e)(t,n,o)},sr=e=>(t,n,r)=>he(e)(t,n,r),ur=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return me(e)(t,n,o)},cr=e=>async(t,n,r)=>me(e)(t,n,r),ar=/^[cC][0-9a-z]{6,}$/,fr=/^[0-9a-z]+$/,lr=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,dr=/^[0-9a-vA-V]{20}$/,pr=/^[A-Za-z0-9]{27}$/,hr=/^[a-zA-Z0-9_-]{21}$/;function mr(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const _r=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,et=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,vr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,br="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function yr(){return new RegExp(br,"u")}const zr=/^(?:(?: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])$/,wr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,$r=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,kr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Or=/^$|^(?:[0-9a-zA-Z+/]{4}
1)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ct=/^[A-Za-z0-9_-]*$/,Zr=/^https?$/,Sr=/^\+[1-9]\d{6,14}$/,Ft="(?:(?:\\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])))";function Ir(e){return new RegExp(`^${e}$`)}const Pr=Ir(Ft);function Se(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Er(e){return new RegExp(`^${Se(e)}$`)}function Tr(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Se({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Se({precision:e.precision})}`:n;return new RegExp(`^${Ft}T(?:${r})$`)}const Ar=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jr=/^-?\d+$/,Nr=/^-?\d+(?:\.\d+)?$/,Rr=/^(?:true|false)$/i,Dr=/^[^A-Z]*$/,Cr=/^[^a-z]*$/,I=l("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),De=e=>{const t=e.value;return!zn(t)&&t.length!==void 0},ne={number:"number",bigint:"bigint",object:"date"},xt=l("$ZodCheckLessThan",(e,t)=>{I.init(e,t);const n=ne[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:ne[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ut=l("$ZodCheckGreaterThan",(e,t)=>{I.init(e,t);const n=ne[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:ne[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fr=l("$ZodCheckMultipleOf",(e,t)=>{I.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):wn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),xr=l("$ZodCheckNumberFormat",(e,t)=>{I.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=Pn[t.format];e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,n&&(u.pattern=jr)}),e._zod.check=s=>{const u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ur=l("$ZodCheckMaxLength",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=De),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value,i=o.length;
1if((typeof o=="string"&&i>t.maximum?Ne(o):i)<=t.maximum)return;const u=Re(o);r.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Mr=l("$ZodCheckMinLength",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=De),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?Ne(o):i)>=t.minimum)return;const u=Re(o);r.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Lr=l("$ZodCheckLengthEquals",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=De),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?Ne(o):i;if(s===t.length)return;const u=Re(o),c=s>t.length;r.issues.push({origin:u,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),_e=l("$ZodCheckStringFormat",(e,t)=>{var n,r;I.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Jr=l("$ZodCheckRegex",(e,t)=>{_e.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vr=l("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dr),_e.init(e,t)}),Kr=l("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Cr),_e.init(e,t)}),Br=l("$ZodCheckIncludes",(e,t)=>{I.init(e,t);const n=ce(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Wr=l("$ZodCheckStartsWith",(e,t)=>{I.init(e,t);const n=new RegExp(`^${ce(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Gr=l("$ZodCheckEndsWith",(e,t)=>{I.init(e,t);const n=new RegExp(`.*${ce(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Yr=l("$ZodCheckOverwrite",(e,t)=>{I.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class qr{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
3${n.join(`
4`)}
5};`)(...Object.values(this.closed))}}const Xr={major:4,minor:5,patch:2},y=l("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xr;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const i of o)for(const s of i._zod.onattach)s(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(u,c,a)=>
5{if(u.memo)return u;let f=U(u),d;for(const p of c){if(p._zod.def.when){if(Dn(u)||!p._zod.def.when(u))continue}else if(f)continue;const h=u.issues.length,_=p._zod.check(u);if(_ instanceof Promise&&a?.async===!1)throw new M;if(d||_ instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await _,u.issues.length!==h&&(Ge(u.issues,h,e),f||(f=U(u,h)))});else{if(u.issues.length===h)continue;Ge(u.issues,h,e),f||(f=U(u,h))}}return d?d.then(()=>u):u},s=(u,c,a)=>{if(U(u))return u.aborted=!0,u;const f=i(c,o,a);if(f instanceof Promise){if(a.async===!1)throw new M;return f.then(d=>e._zod.parse(d,a))}return e._zod.parse(f,a)};e._zod.run=(u,c)=>{if(c.skipChecks)return e._zod.parse(u,c);if(c.direction==="backward"){const f=e._zod.parse({value:u.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(d=>s(d,u,c)):s(f,u,c)}const a=e._zod.parse(u,c);if(a instanceof Promise){if(c.async===!1)throw new M;return a.then(f=>i(f,o,c))}return i(a,o,c)}}},{get"~standard"(){return jt(this,"~standard",Mt(this))},set"~standard"(e){L(this,"~standard",e)}}),tt=e=>e.success?{value:e.data}:{issues:e.error?.issues};function Mt(e){return{validate:t=>{try{return tt(Qn(e,t))}catch{return er(e,t).then(tt)}},vendor:"zod",version:1}}const Ce=l("$ZodString",(e,t)=>{y.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ar(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),w=l("$ZodStringFormat",(e,t)=>{_e.init(e,t),Ce.init(e,t)}),Hr=l("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gr),w.init(e,t)}),Qr=l("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=et(r))}else t.pattern??(t.pattern=et());w.init(e,t)}),eo=l("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=vr),w.init(e,t)}),Lt=1,Jt=2;function to(e,t){if(!t.normalize&&t.protocol?.source===Zr.source&&!/^https?:\/\//i.test(e))return Lt;try{return new URL(e)}catch{return Jt}}const no=/[\t\n\r]/g;function ro(e){return e.replace(no,"")}function oo(e,t){return t.lastIndex=0,t.test(e.hostname)}function io(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const so=l("$ZodURL",(e,t)=>{w.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=to(r,t);if(o===Lt){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===Jt){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!oo(o,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!io(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:ro(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),uo=l("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=yr()),w.init(e,t)}),co=l("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?hr:mr(t.length)),w.init(e,t)}),ao=l("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ar),w.init(e,t)}),fo=l("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=fr),w.init(e,t)}),lo=l("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lr),w.init(e,t)}),po=l("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dr),w.init(e,t)}),ho=l("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pr),w.init(e,t)}),mo=l("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Tr(t)),w.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(n=>{n._zod.bag.laxFormat=!0}))}),_o=l("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Pr),w.init(e,t)}),go=l("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Er(t)),w.init(e,t)}),vo=l("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=_r),w.init(e,t)}),bo=l("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zr),w.init(e,t),e._zod.bag.format="ipv4"}),yo=/^[0-9a-fA-F:.]+$/;function Vt(e){if(!yo.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const zo=l("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=wr),w.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{Vt(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),wo=l("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$r),w.init(e,t)});function $o(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Vt(n)}const ko=l("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kr),w.init(e,t),e._zod.check=n=>{$o(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Kt(e){if(e==="")return!0;
5if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Oo=l("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Or),w.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Kt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Zo(e){if(!Ct.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Kt(n)}const So=l("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ct),w.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Zo(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Io=l("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Sr),w.init(e,t)});function Po(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Eo=l("$ZodJWT",(e,t)=>{w.init(e,t),e._zod.check=n=>{Po(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Bt=l("$ZodNumber",(e,t)=>{y.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),To=l("$ZodNumberFormat",(e,t)=>{xr.init(e,t),Bt.init(e,t)}),Ao=l("$ZodBoolean",(e,t)=>{y.init(e,t),e._zod.pattern=Rr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),jo=l("$ZodUnknown",(e,t)=>{y.init(e,t),e._zod.parse=n=>n}),No=l("$ZodNever",(e,t)=>{y.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function nt(e,t,n){e.issues.length&&t.issues.push(...ae(n,e.issues)),t.value[n]=e.value}const Ro=l("$ZodArray",(e,t)=>{y.init(e,t);const n=A.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=n?n.alloc(e,r,Array(i.length),o):Array(i.length);const s=[];for(let u=0;u<i.length;u++){const c=i[u],a=t.element._zod.run({value:c,issues:[]},o);a instanceof Promise?s.push(a.then(f=>nt(f,r,u))):nt(a,r,u)}return s.length?Promise.all(s).then(()=>r):r}});function re(e,t,n,r,o,i){const s=n in r,u=i==="optional";if(!(!s&&u&&o==="optional")){if(e.issues.length){if(o!==void 0&&u&&!s)return;t.issues.push(...ae(n,e.issues))}if(!s&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value}}const Do=[];function Wt(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Do,o=r.length?[...t,...r]:t;for(const s of o)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);const i=In(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Gt(e,t,n,r,o,i){const s=[],u=o.keySet,c=o.catchall._zod,a=c.def.type,f=c.optin,d=c.optout;for(const p in t){if(u.has(p))continue;if(p==="__proto__"){a==="never"&&s.push(p);continue}if(a==="never"){s.push(p);continue}const h=c.run({value:t[p],issues:[]},r);h instanceof Promise?e.push(h.then(_=>re(_,n,p,t,f,d))):re(h,n,p,t,f,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const rt=new WeakMap,Co=l("$ZodObject",(e,t)=>{if(y.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;rt.set(t,c),Object.defineProperty(t,"shape",{get:()=>{const a={...c};return Object.defineProperty(t,"shape",{value:a}),rt.set(t,a),a}})}const r=Ae(()=>Wt(t));b(e,"propValues",c=>{const a=c.def.shape,f={};for(const d in a){const p=a[d]._zod;if(p.values){Object.prototype.hasOwnProperty.call(f,d)||P(f,d,new Set);for(const h of p.values)f[d].add(h);p.optin!==void 0&&f[d].add(void 0)}}return f});const o=te,i=t.catchall;let s;const u=A.memoizer;u?.attach(e),e._zod.parse=(c,a)=>{s??(s=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value=u?u.alloc(e,c,{},a):{};const d=[],p=s.shape;for(const h of s.allKeys){if(h==="__proto__")continue;const _=p[h],g=_._zod.optin,v=_._zod.optout,T=_._zod.run({value:f[h],issues:[]},a);T instanceof Promise?d.push(T.then(N=>re(N,c,h,f,g,v))):re(T,c,h,f,g,v)}return i?Gt(d,f,c,a,r.value,e):d.length?Promise.all(d).then(()=>c):c}}),Fo=l("$ZodObjectJIT",(e,t)=>{Co.init(e,t);const n=e._zod.parse,r=Ae(()=>Wt(t)),o=A.memoizer,i=h=>{const _=r.value,g=_.symbolKeys,v=new qr(["payload","ctx"],{shape:h,inst:e,memo:o,syms:g}),T=S=>`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`,N=(S,z)=>`
6          for (let i = 0; i < ${S}.issues.length; i++) {
7            const iss = ${S}.issues[i];
8            iss.path = iss.path ? [${z}, ...iss.path] : [${z}];
9            payload.issues.push(iss);
10          }`;v.write("const input = payload.value;");const Me=Object.create(null);let vn=0;for(const S of _.allKeys)Me[S]=`key_${vn++}`;v.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const S of _.allKeys){if(S==="__proto__")continue;const z=Me[S],j=typeof S=="symbol"?`syms[${g.indexOf(S)}]`:kn(S),ve=`${j} in input`,Le=h[S],Je=Le?._zod?.optin,Ve=Je!==void 0,bn=Le?._zod?.optout==="optional";if(v.write(`const ${z} = ${T(j)};`),Ve&&bn){const yn=Je==="optional"?`${z}_present`:`${z}.value !== undefined || ${z}_present`;v.write(`
11        const ${z}_present = ${ve};
12        if (!${z}.issues.length || ${z}_present) {
13          if (${z}.issues.length) {${N(z,j)}
14          }
15
16          if (${yn}) {
17            newResult[${j}] = ${z}.value;
18          }
19        }
20
21      `)}else Ve?v.write(`
22        if (${z}.issues.length) {${N(z,j)}
23        }
24        
25        if (${z}.value === undefined) {
26          if (${ve}) {
27            newResult[${j}] = undefined;
28          }
29        } else {
30          newResult[${j}] = ${z}.value;
31        }
32
33      `):v.write(`
34        const ${z}_present = ${ve};
35        if (${z}.issues.length) {${N(z,j)}
36        }
37        if (!${z}_present && !${z}.issues.length) {
38          payload.issues.push({
39            code: "invalid_type",
40            expected: "nonoptional",
41            input: undefined,
42            path: [${j}]
43          });
44        }
45
46        if (${z}_present) {
47          newResult[${j}] = ${z}.value;
48        }
49
50      `)}return v.write("payload.value = newResult;"),v.write("return payload;"),v.compile()};let s;const u=te,c=!A.jitless,f=c&&Zn.value,d=t.catchall;let p;e._zod.parse=(h,_)=>{p??(p=r.value);const g=h.value;return u(g)?c&&f&&_?.async===!1&&_.jitless!==!0?(s||(s=i(t.shape)),h=s(h,_),d?Gt([],g,h,_,p,e):h):n(h,_):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function ot(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!U(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>J(s,r,F())))}),t)}const xo=l("$ZodUnion",(e,t)=>{y.init(e,t),b(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),b(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),b(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),b(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>je(i.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const s=[];for(const u of t.options){const c=u._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>ot(u,r,e,o)):ot(s,r,e,o)}}),Uo=l("$ZodIntersection",(e,t)=>{y.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,a])=>it(n,c,a)):it(n,i,s)}});function Ie(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(G(e)&&G(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const i of r){if(i==="__proto__")continue;const s=Ie(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=Ie(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function it(e,t,n){const r=new Map;let o;const i=new Map,s=(a,f)=>{let d;if(a.code==="unrecognized_keys"&&!a.path?.length)o??(o=a),d=a.keys;else if(a.code==="invalid_key"&&a.origin==="record"&&a.path?.length===1){const p=String(a.path[0]);i.has(p)||i.set(p,a),d=[p]}else return!1;for(const p of d)r.has(p)||r.set(p,{}),r.get(p)[f]=!0;return!0};for(const a of t.issues)s(a,"l")||e.issues.push(a);for(const a of n.issues)s(a,"r")||e.issues.push(a);const u=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(u.length){const a=o?u.filter(f=>o.keys.includes(f)):[];a.length&&e.issues.push({...o,keys:a});for(const f of u)!a.includes(f)&&i.has(f)&&e.issues.push(i.get(f))}const c=Ie(t.value,n.value);if(!c.valid){if(U(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const Yt=l("$ZodTuple",(e,t)=>{y.init(e,t);const n=t.items,r=A.memoizer;r?.attach(e),e._zod.parse=(o,i)=>{const s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=r?r.alloc(e,o,[],i):[];const u=[],c=st(n,"optin"),a=st(n,"optout");if(!t.rest){if(s.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),o;s.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:s,inst:e,origin:"array"})}const f=new Array(n.length);for(let d=0;d<n.length;d++){const p=n[d]._zod.run({value:s[d],issues:[]},i);p instanceof Promise?u.push(p.then(h=>{f[d]=h})):f[d]=p}if(t.rest){let d=n.length-1;const p=s.slice(n.length);for(const h of p){d++;const _=t.rest._zod.run({value:h,issues:[]},i);_ instanceof Promise?u.push(_.then(g=>ut(g,o,d))):ut(_,o,d)}}return u.length?Promise.all(u).then(()=>ct(f,o,n,s,a)):ct(f,o,n,s,a)}});function st(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function ut(e,t,n){e.issues.length&&t.issues.push(...ae(n,e.issues)),t.value[n]=e.value}function ct(e,t,n,r,o){for(let i=0;i<n.length;i++){const s=e[i],u=i<r.length;if(!u&&i>=o&&n[i]._zod.optin==="optional"){t.value.length=i;break}if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...ae(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=r.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}const Mo=l("$ZodEnum",(e,t)=>{y.init(e,t);const n=Pt(t.entries),r=new Set(n);e._zod.values=r;const o=n.filter(i=>Sn.has(typeof i));e._zod.pattern=new RegExp(o.length?`^(${o.map(i=>ce(i.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(i,s)=>{const u=i.value;return r.has(u)||i.issues.push({code:"invalid_value",values:n,input:u,inst:e}),i}}),Lo=l("$ZodTransform",(e,t)=>{y.init(e,t),e._zod.optin="optional",A.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Nt(e.constructor.name);
50const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new M;return n.value=o,n}});function at(e,t){return e.value=t.issues.length?void 0:t.value,e}const qt=l("$ZodOptional",(e,t)=>{y.init(e,t),b(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",b(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),b(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${je(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>at(n,i)):at(n,o)}return t.innerType._zod.run(n,r)}}),Jo=l("$ZodExactOptional",(e,t)=>{qt.init(e,t),b(e,"values",n=>n.def.innerType._zod.values),b(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Vo=l("$ZodNullable",(e,t)=>{y.init(e,t),b(e,"optin",n=>n.def.innerType._zod.optin),b(e,"optout",n=>n.def.innerType._zod.optout),b(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${je(r.source)}|null)$`):void 0}),b(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Ko=l("$ZodDefault",(e,t)=>{y.init(e,t),e._zod.optin="defaulted",b(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ft(i,t)):ft(o,t)}});function ft(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Bo=l("$ZodPrefault",(e,t)=>{y.init(e,t),e._zod.optin="defaulted",b(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Wo=l("$ZodNonOptional",(e,t)=>{y.init(e,t),b(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>lt(i,e)):lt(o,e)}});function lt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function dt(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>J(o,r,F()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Go=l("$ZodCatch",(e,t)=>{y.init(e,t),b(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),b(e,"optout",n=>n.def.innerType._zod.optout),b(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>dt(n,i,t,r)):dt(n,o,t,r)}}),Xt=l("$ZodPipe",(e,t)=>{y.init(e,t),b(e,"values",n=>n.def.in._zod.values),b(e,"optin",n=>n.def.in._zod.optin),b(e,"optout",n=>n.def.out._zod.optout),b(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>q(s,t.in,r)):q(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>q(i,t.out,r)):q(o,t.out,r)}});function q(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Yo=l("$ZodPreprocess",(e,t)=>{Xt.init(e,t)}),qo=l("$ZodReadonly",(e,t)=>{y.init(e,t),b(e,"propValues",n=>n.def.innerType._zod.propValues),b(e,"values",n=>n.def.innerType._zod.values),b(e,"optin",n=>n.def.innerType?._zod?.optin),b(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(pt):pt(o)}});function pt(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Xo=l("$ZodFunction",(e,t)=>(y.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...r){const o=e._def.input?He(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?He(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...r){const o=e._def.input?await Qe(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await Qe(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{const r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Yt({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{const r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),Ho=l("$ZodLazy",(e,t)=>{y.init(e,t),$n(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),b(e,"pattern",n=>n.innerType?._zod?.pattern),b(e,"propValues",n=>
50n.innerType?._zod?.propValues),b(e,"optin",n=>n.innerType?._zod?.optin??void 0),b(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Qo=l("$ZodCustom",(e,t)=>{I.init(e,t),y.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>ht(i,n,r,e));ht(o,n,r,e)}});function ht(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Y(o))}}class ei extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Pe="~memo",mt=[];function $e(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const _t=new WeakMap;function Ht(e,t){const n=_t.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1;const o=s=>{!r&&s?._zod&&Ht(s,t)&&(r=!0)},i=e._zod.def;if(i.type==="lazy")o(e._zod.innerType);else{const s=i.shape;if(s)for(const u of Reflect.ownKeys(s))o(s[u]);for(const u in i){const c=i[u];if(!(!c||typeof c!="object")){if(c._zod)o(c);else if(Array.isArray(c))for(const a of c)o(a)}}}return t.delete(e),_t.set(e,r),r}function ti(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}let X;const H=[],ni={alloc(e,t,n){const r=X;if(!r)return n;X=void 0;const o={value:n,issues:null};return r.set(t.value,o),H.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,i)=>{if(i.direction!=="backward"&&oi(i,o.value))throw new ei;return n(o,i)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,s=(u,c)=>{if(n===void 0&&(n=Ht(e,new Set),!n))return e._zod.parse=i,e._zod.run===s&&(e._zod.run=i),i(u,c);const a=u.value;if(a===null||typeof a!="object")return i(u,c);let f=c[Pe];f||(f={buckets:new Map,backEdges:void 0},c[Pe]=f);let d;r===c?d=o:(d=ti(f,e),r=c,o=d);const p=d.get(a);if(p)return u.value=p.value,p.issues?p.issues.length&&u.issues.push(...$e(p.issues)):(u.memo=!0,f.backEdges??(f.backEdges=new Set),f.backEdges.add(p.value)),u;X=d;const h=H.length,_=i(u,c);X=void 0;const g=H.length>h?H.pop():void 0;return _ instanceof Promise?_.then(v=>(g&&(g.issues=v.issues.length?$e(v.issues):mt),v)):(g&&(g.issues=_.issues.length?$e(_.issues):mt),_)};e._zod.parse=s,e._zod.run===i&&(e._zod.run=s)})}};function ri(){return ni}function oi(e,t){const n=e[Pe]?.backEdges;return n!==void 0&&t!==null&&typeof t=="object"&&n.has(t)}const ii=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):r[i]??i}return i=>{switch(i.code){case"invalid_type":{const s=o(i.expected),u=Fn(i.input),c=o(u,i.input);return`Invalid input: expected ${s}, received ${c}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${At(i.values[0])}`:`Invalid option: expected one of ${Ke(i.values,"|")}`;case"too_big":{const s=i.exact?"exactly ":i.inclusive?"<=":"<",u=t(i.origin);return u?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${u.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{const s=i.exact?"exactly ":i.inclusive?">=":">",u=t(i.origin);return u?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${u.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}
50case"invalid_format":{const s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${n[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Ke(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(u=>`'${u}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function si(){return{localeError:ii()}}var gt;class ui{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ci(){return new ui}(gt=globalThis).__zod_globalRegistry??(gt.__zod_globalRegistry=ci());const B=globalThis.__zod_globalRegistry;function ai(e,t){return new e({type:"string",...m(t)})}function fi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(t)})}function li(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(t)})}function di(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(t)})}function pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(t)})}function hi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(t)})}function mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(t)})}function Qt(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(t)})}function _i(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(t)})}function gi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(t)})}function vi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(t)})}function bi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(t)})}function yi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(t)})}function zi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(t)})}function wi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(t)})}function $i(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(t)})}function ki(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(t)})}function Oi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(t)})}function Zi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(t)})}function Si(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(t)})}function Ii(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(t)})}function Pi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(t)})}function Ei(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(t)})}function Ti(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(t)})}function Ai(e,t){return new e({type:"string",format:"date",check:"string_format",...m(t)})}function ji(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(t)})}function Ni(e,t){return new e({type:"string",format:"duration",check:"string_format",...m(t)})}function Ri(e,t){return new e({type:"number",checks:[],...m(t)})}function Di(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(t)})}function Ci(e,t){return new e({type:"boolean",...m(t)})}function Fi(e){return new e({type:"unknown"})}function xi(e,t){return new e({type:"never",...m(t)})}function vt(e,t){return new xt({check:"less_than",...m(t),value:e,inclusive:!1})}function ke(e,t){return new xt({check:"less_than",...m(t),value:e,inclusive:!0})}function bt(e,t){return new Ut({check:"greater_than",...m(t),value:e,inclusive:!1})}function Oe(e,t){return new Ut({check:"greater_than",...m(t),value:e,inclusive:!0})}function yt(e,t){return new Fr({check:"multiple_of",...m(t),value:e})}function en(e,t){return new Ur({check:"max_length",...m(t),maximum:e})}function oe(e,t){return new Mr({check:"min_length",...m(t),minimum:e})}function tn(e,t){return new Lr({check:"length_equals",...m(t),length:e})}function Ui(e,t){return new Jr({check:"string_format",format:"regex",...m(t),pattern:e})}function Mi(e){return new Vr({check:"string_format",format:"lowercase",...m(e)})}
50function Li(e){return new Kr({check:"string_format",format:"uppercase",...m(e)})}function Ji(e,t){return new Br({check:"string_format",format:"includes",...m(t),includes:e})}function Vi(e,t){return new Wr({check:"string_format",format:"starts_with",...m(t),prefix:e})}function Ki(e,t){return new Gr({check:"string_format",format:"ends_with",...m(t),suffix:e})}function V(e){return new Yr({check:"overwrite",tx:e})}function Bi(e){return V(t=>t.normalize(e))}function Wi(){return V(e=>e.trim())}function Gi(){return V(e=>e.toLowerCase())}function Yi(){return V(e=>e.toUpperCase())}function qi(){return V(e=>On(e))}function Xi(e,t,n){return new e({type:"array",element:t,...m(n)})}function Hi(e,t,n){const r=m(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Qi(e,t,n){return new e({type:"custom",check:"custom",fn:t,...m(n)})}function es(e,t){const n=ts(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Y(o,r.value,n._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(Y(i))}},e(r.value,r)),t);return n}function ts(e,t){const n=new I({check:"custom",...m(t)});return n._zod.check=e,n}function W(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&P(e,r,n[r]);return e}function nn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??B,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],external:e?.external??void 0}}function x(e,t,n,r,o){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(n,i),!0}function O(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{const p=s.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,p,f)}const d=e._zod.parent;d&&(s.ref||(s.ref=d),O(d,t,f),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&W(s.schema,c),t.io==="input"&&Z(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function zt(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function rn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const s of e.seen.entries()){const u=e.metadataRegistry.get(s[0])?.id;if(u){const c=r.get(u);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,s[0])}}const o=s=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(s[0])?.id,p=e.external.uri??(_=>_);if(d)return{ref:p(d)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${p("__shared")}#/${u}/${zt(h)}`}}const c="#",a=`${c}/${u}/`;if(s[1]===n&&!s[1].schema.id)return{ref:c};const f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:a+zt(f)}},i=s=>{if(s[1].schema.$ref)return;const u=s[1],{ref:c,defId:a}=o(s);
50u.def={...u.schema},a&&(u.defId=a);const f=u.schema;for(const d in f)delete f[d];f.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
51
52Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const u=s[1];if(t===s[0]){i(s);continue}if(e.external){const a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function on(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;on(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const i=r.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;n.includes(s)||n.push(s)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const sn=new Set(["type","properties","required","additionalProperties"]),wt=["oneOf","anyOf"];function $t(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Ee(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!sn.has(s))return null;t.push(i)}const n={},r=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(n,s))continue;const u=[];for(const a of t){const f=a.properties?.[s]??$t(a);f!=null&&(u.some(d=>JSON.stringify(d)===JSON.stringify(f))||u.push(f))}const c=u.length===1?u[0]:Ee(u)??{allOf:u};P(n,s,c)}for(const s of i.required??[])r.add(s)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const u=$t(s);u&&!i.some(c=>JSON.stringify(c)===JSON.stringify(u))&&i.push(u)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function ns(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of sn)if(o in e)return;const n=t.filter(o=>wt.some(i=>Array.isArray(o[i])));let r=null;if(!n.length)r=Ee(t);else{const o=n[0],i=wt.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const s=t.filter(c=>c!==o),u=o[i].map(c=>Ee([...s,c]));if(u.some(c=>!c))return;r={[i]:u}}r&&(delete e.allOf,W(e,r))}function un(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const a=c.def??c.schema,f={...a},d=c.ref;if(c.ref=null,d){r(d);const h=e.seen.get(d),_=h.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(_)):W(a,_),W(a,f),u._zod.parent===d)for(const v in a)v==="$ref"||v==="allOf"||v in f||delete a[v];if(_.$ref&&h.def)for(const v in a)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(a[v])===JSON.stringify(h.def[v])&&delete a[v]}const p=u._zod.parent;if(p&&p!==d){r(p);const h=e.seen.get(p);if(h?.schema.$ref&&(a.$ref=h.schema.$ref,h.def))for(const _ in a)_==="$ref"||_==="allOf"||_ in h.def&&JSON.stringify(a[_])===JSON.stringify(h.def[_])&&delete a[_]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const u of[...e.seen.entries()].reverse())r(u[0]);if(e.target!=="openapi-3.0")for(const u of e.seen.entries())on(u[1].def??u[1].schema);if(e.intersections.length){const u=new Map;for(const c of e.seen.values())for(const a of[c.schema,c.def]){const f=a?.allOf;if(!Array.isArray(f))continue;const d=u.get(f);d?d.push(a):u.set(f,[a])}for(const c of e.intersections)for(const a of u.get(c)??[])ns(a)}}const o={};
52if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}W(o,n.defId?n.schema:n.def??n.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,P(s,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:ie(t,"input",e.processors),output:ie(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Z(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Z(r.element,n);if(r.type==="set")return Z(r.valueType,n);if(r.type==="lazy")return Z(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return Z(r.innerType,n);if(r.type==="intersection")return Z(r.left,n)||Z(r.right,n);if(r.type==="record"||r.type==="map")return Z(r.keyType,n)||Z(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Z(r.in,n)||Z(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Z(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Z(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Z(o,n))return!0;return!!(r.rest&&Z(r.rest,n))}return!1}const rs=(e,t={})=>n=>{const r=nn({...n,processors:t});return O(e,r),rn(r,e),un(r,e)},ie=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=nn({...o??{},target:i,io:t,processors:n});return O(e,s),rn(s,e),un(s,e)},os={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},is=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a,laxFormat:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=os[u]??u,o.format===""&&delete o.format,(u==="time"||f)&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},ss=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:u,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:f}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const d=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),p=typeof a=="number"&&a<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";d?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),p?h?(o.maximum=a,o.exclusiveMaximum=!0):o.exclusiveMaximum=a:typeof s=="number"&&(o.maximum=s),typeof c=="number"&&(Number.isFinite(c)&&c!==0?o.multipleOf=Math.abs(c):x(e,t,o,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},us=(e,t,n,r)=>{n.type="boolean"},cs=(e,t,n,r)=>{n.not={}},as=(e,t,n,r)=>{},fs=(e,t,n,r)=>{const o=e._zod.def,i=Pt(o.entries);if(i.length===0){n.not={};return}i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},ls=(e,t,n,r)=>{x(e,t,n,r,"Custom types cannot be represented in JSON Schema")},ds=(e,t,n,r)=>{x(e,t,n,r,"Function types cannot be represented in JSON Schema")},ps=(e,t,n,r)=>{x(e,t,n,r,"Transforms cannot be represented in JSON Schema")},hs=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=O(i.element,t,{...r,path:[...r.path,"items"]})};function se(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?se(t.out):t.type==="catch"?se(t.innerType):e._zod.optin}const ms=(e,t,n,r)=>{const o=n,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&x(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in s)P(o.properties,f,O(s[f],t,{...r,path:[...r.path,"properties",f]}));const c=new Set(Object.keys(s)),a=new Set([...c].filter(f=>{const d=i.shape[f];return t.io==="input"?se(d)===void 0:d._zod.optout===void 0}));a.size>0&&(o.required=Array.from(a)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=O(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},_s=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>O(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},gs=(e,t,n,r)=>{const o=e._zod.def,i=O(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=O(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=c,t.intersections.push(c)},vs=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="array";
52const s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((g,v)=>O(g,t,{...r,path:[...r.path,s,v]})),a=i.rest?O(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;let f=i.items.length;for(;f>0;){const g=i.items[f-1];if(!(t.io==="input"?se(g)!==void 0:g._zod.optout==="optional"))break;f--}const d=i.items.length,p=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,p?o.items=!1:a&&(o.items=a),f>0&&(o.minItems=f),p&&(o.maxItems=d)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),f>0&&(o.minItems=f),p&&(o.maxItems=d)):(o.items=c,p?o.additionalItems=!1:a&&(o.additionalItems=a),f>0&&(o.minItems=f),p&&(o.maxItems=d));const{minimum:h,maximum:_}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof _=="number"&&(o.maxItems=_)},bs=(e,t,n,r)=>{const o=e._zod.def,i=O(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ys=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Fe=Symbol();function cn(e,t,n,r,o){let i=!1;const s=JSON.stringify(e,(u,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(x(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),Fe):JSON.parse(s)}const zs=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;const s=cn(o.defaultValue,e,t,n,r);s!==Fe&&(n.default=s)},ws=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=cn(o.defaultValue,e,t,n,r);s!==Fe&&(n._prefault=s)},$s=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{x(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=s},ks=(e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;O(s,t,r);const u=t.seen.get(e);u.ref=s},Os=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},an=(e,t,n,r)=>{const o=e._zod.def;O(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Zs=(e,t,n,r)=>{const o=e._zod.innerType;O(o,t,r);const i=t.seen.get(e);i.ref=o},kt=new WeakSet([Object.prototype,Error.prototype]);function Q(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const Ss=(e,t)=>{Dt.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);kt.has(n)||(kt.add(n),Q(n,"format",r=>o=>Hn(r,o)),Q(n,"flatten",r=>o=>Xn(r,o)),Q(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ze,2)}),Q(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ze,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},E=l("ZodError",Ss,void 0,{Parent:Error}),Is=de(E),Ps=pe(E),Es=he(E),Ts=me(E),As=tr(E),js=nr(E),Ns=rr(E),Rs=or(E),Ds=ir(E),Cs=sr(E),Fs=ur(E),xs=cr(E);function Us(){A.localeError||F(si())}function ge(){A.memoizer||F({memoizer:ri()})}const $=l("ZodType",(e,t)=>(Us(),y.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(D(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return C(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Fu(e,t))},superRefine(e,t){return this.check(xu(e,t))},overwrite(e){return this.check(V(e))},optional(){return Zt(this)},exactOptional(){return ku(this)},nullable(){return St(this)},nullish(){return Zt(St(this))},nonoptional(e){return Eu(this,e)},array(){return pn(this)},or(e){return gu([this,e])},and(e){return bu(this,e)},transform(e){return It(this,hn(e))},default(e){return Su(this,e)},prefault(e){return Pu(this,e)},catch(e){return Au(this,e)},pipe(e){return It(this,e)},readonly(){return Ru(this)},describe(e){const t=this.clone();return B.add(t,{description:e}),t},meta(...e){if(e.length===0)return B.get(this);const t=this.clone();return B.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return jt(this,"~standard",{...Mt(this),jsonSchema:{input:ie(this,"input"),output:ie(this,"output")}})},set"~standard"(e){L(this,"~standard",e)},parse:function e(t,n){return Is(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Ps(this,t,n,{callee:e})},safeParse(e,t){return Es(this,e,t)},async safeParseAsync(e,t){return Ts(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){L(this,"spa",e)},encode:function e(t,n){return As(this,t,n,{callee:e})},decode:function e(t,n){return js(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ns(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Rs(this,t,n,{callee:e})},safeEncode(e,t){return Ds(this,e,t)},safeDecode(e,t){return Cs(this,e,t)},async safeEncodeAsync(e,t){return Fs(this,e,t)},async safeDecodeAsync(e,t){return xs(this,e,t)},toJSONSchema(e){return rs(this,{})(e)},get description(){return B.get(this)?.description},get _def(){return this._zod.def}}),fn=l("_ZodString",(e,t)=>{Ce.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,o,i)=>is(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(Ui(...e))},includes(...e){return this.check(Ji(...e))},startsWith(...e){return this.check(Vi(...e))},endsWith(...e){return this.check(Ki(...e))},min(...e){return this.check(oe(...e))},max(...e){return this.check(en(...e))},length(...e){return this.check(tn(...e))},nonempty(...e){return this.check(oe(1,...e))},lowercase(e){return this.check(Mi(e))},uppercase(e){return this.check(Li(e))},trim(){return this.check(Wi())},normalize(...e){return this.check(Bi(...e))},toLowerCase(){return this.check(Gi())},toUpperCase(){return this.check(Yi())},slugify(){return this.check(qi())}}),Ms=l("ZodString",(e,t)=>{Ce.init(e,t),fn.init(e,t)},{email(e){return this.check(fi(Bs,e))},url(e){return this.check(Qt(ln,e))},jwt(e){return this.check(Ei(cu,e))},emoji(e){return this.check(_i(Gs,e))},guid(e){return this.check(li(Ws,e))},uuid(e){return this.check(di(ee,e))},uuidv4(e){return this.check(pi(ee,e))},uuidv6(e){return this.check(hi(ee,e))},uuidv7(e){return this.check(mi(ee,e))},nanoid(e){return this.check(gi(Ys,e))},cuid(e){return this.check(vi(qs,e))},cuid2(e){return this.check(bi(Xs,e))},ulid(e){return this.check(yi(Hs,e))},base64(e){return this.check(Si(iu,e))},base64url(e){return this.check(Ii(su,e))},xid(e){return this.check(zi(Qs,e))},ksuid(e){return this.check(wi(eu,e))},ipv4(e){return this.check($i(tu,e))},ipv6(e){return this.check(ki(nu,e))},cidrv4(e){return this.check(Oi(ru,e))},cidrv6(e){return this.check(Zi(ou,e))},e164(e){return this.check(Pi(uu,e))},datetime(e){return this.check(Ti(Ls,e))},date(e){return this.check(Ai(Js,e))},time(e){return this.check(ji(Vs,e))},duration(e){return this.check(Ni(Ks,e))}});function Uu(e){return ai(Ms,e)}const k=l("ZodStringFormat",(e,t)=>{w.init(e,t),fn.init(e,t)}),Ls=l("ZodISODateTime",(e,t)=>{mo.init(e,t),k.init(e,t)}),Js=l("ZodISODate",(e,t)=>{_o.init(e,t),k.init(e,t)}),Vs=l("ZodISOTime",(e,t)=>{go.init(e,t),k.init(e,t)}),Ks=l("ZodISODuration",(e,t)=>{vo.init(e,t),k.init(e,t)}),Bs=l("ZodEmail",(e,t)=>{eo.init(e,t),k.init(e,t)}),Ws=l("ZodGUID",(e,t)=>{Hr.init(e,t),k.init(e,t)}),ee=l("ZodUUID",(e,t)=>{Qr.init(e,t),k.init(e,t)}),ln=l("ZodURL",(e,t)=>{so.init(e,t),k.init(e,t)});function Mu(e){return Qt(ln,e)}const Gs=l("ZodEmoji",(e,t)=>{uo.init(e,t),k.init(e,t)}),Ys=l("ZodNanoID",(e,t)=>{co.init(e,t),k.init(e,t)}),qs=l("ZodCUID",(e,t)=>{ao.init(e,t),k.init(e,t)}),Xs=l("ZodCUID2",(e,t)=>{fo.init(e,t),k.init(e,t)}
52),Hs=l("ZodULID",(e,t)=>{lo.init(e,t),k.init(e,t)}),Qs=l("ZodXID",(e,t)=>{po.init(e,t),k.init(e,t)}),eu=l("ZodKSUID",(e,t)=>{ho.init(e,t),k.init(e,t)}),tu=l("ZodIPv4",(e,t)=>{bo.init(e,t),k.init(e,t)}),nu=l("ZodIPv6",(e,t)=>{zo.init(e,t),k.init(e,t)}),ru=l("ZodCIDRv4",(e,t)=>{wo.init(e,t),k.init(e,t)}),ou=l("ZodCIDRv6",(e,t)=>{ko.init(e,t),k.init(e,t)}),iu=l("ZodBase64",(e,t)=>{Oo.init(e,t),k.init(e,t)}),su=l("ZodBase64URL",(e,t)=>{So.init(e,t),k.init(e,t)}),uu=l("ZodE164",(e,t)=>{Io.init(e,t),k.init(e,t)}),cu=l("ZodJWT",(e,t)=>{Eo.init(e,t),k.init(e,t)}),dn=l("ZodNumber",(e,t)=>{Bt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,o,i)=>ss(e,r,o,i);const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(bt(e,t))},gte(e,t){return this.check(Oe(e,t))},min(e,t){return this.check(Oe(e,t))},lt(e,t){return this.check(vt(e,t))},lte(e,t){return this.check(ke(e,t))},max(e,t){return this.check(ke(e,t))},int(e){return this.check(Ot(e))},safe(e){return this.check(Ot(e))},positive(e){return this.check(bt(0,e))},nonnegative(e){return this.check(Oe(0,e))},negative(e){return this.check(vt(0,e))},nonpositive(e){return this.check(ke(0,e))},multipleOf(e,t){return this.check(yt(e,t))},step(e,t){return this.check(yt(e,t))},finite(){return this}});function Lu(e){return Ri(dn,e)}const au=l("ZodNumberFormat",(e,t)=>{To.init(e,t),dn.init(e,t)});function Ot(e){return Di(au,e)}const fu=l("ZodBoolean",(e,t)=>{Ao.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>us(e,n,r)});function Ju(e){return Ci(fu,e)}const lu=l("ZodUnknown",(e,t)=>{jo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>as()});function ue(){return Fi(lu)}const du=l("ZodNever",(e,t)=>{No.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cs(e,n,r)});function pu(e){return xi(du,e)}const hu=l("ZodArray",(e,t)=>{ge(),Ro.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hs(e,n,r,o),e.element=t.element},{min(e,t){return this.check(oe(e,t))},nonempty(e){return this.check(oe(1,e))},max(e,t){return this.check(en(e,t))},length(e,t){return this.check(tn(e,t))},unwrap(){return this.element}});function pn(e,t){return Xi(hu,e,t)}const mu=l("ZodObject",(e,t)=>{ge(),Fo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ms(e,n,r,o),Jn(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return wu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:ue()})},loose(){return this.clone({...this._zod.def,catchall:ue()})},strict(){return this.clone({...this._zod.def,catchall:pu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return An(this,e)},safeExtend(e){return jn(this,e)},merge(e){return Nn(this,e)},pick(e){return En(this,e)},omit(e){return Tn(this,e)},partial(...e){return We(xe,this,e[0])},exactPartial(...e){return We(mn,this,e[0],"exactPartial")},required(...e){return Rn(_n,this,e[0])}});function Vu(e,t){const n={type:"object",shape:e??{},...m(t)};return new mu(n)}const _u=l("ZodUnion",(e,t)=>{xo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_s(e,n,r,o),e.options=t.options});function gu(e,t){return new _u({type:"union",options:e,...m(t)})}const vu=l("ZodIntersection",(e,t)=>{Uo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gs(e,n,r,o)});function bu(e,t){return new vu({type:"intersection",left:e,right:t})}const yu=l("ZodTuple",(e,t)=>{ge(),Yt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vs(e,n,r,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){const e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new xe({type:"optional",innerType:t}))})}});function zu(e,t,n){const r=t instanceof y,o=r?n:t,i=r?t:null;return new yu({type:"tuple",items:e,rest:i,...m(o)})}const Te=l("ZodEnum",(e,t)=>{Mo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(r,o,i)=>fs(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Te({...t,checks:[],...m(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Te({...t,checks:[],...m(o),entries:i})}});function wu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;
52return new Te({type:"enum",entries:n,...m(t)})}const $u=l("ZodTransform",(e,t)=>{ge(),Lo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ps(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Nt(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Y(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Y(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function hn(e){return new $u({type:"transform",transform:e})}const xe=l("ZodOptional",(e,t)=>{qt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>an(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Zt(e){return new xe({type:"optional",innerType:e})}const mn=l("ZodExactOptional",(e,t)=>{Jo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>an(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new mn({type:"optional",innerType:e})}const Ou=l("ZodNullable",(e,t)=>{Vo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function St(e){return new Ou({type:"nullable",innerType:e})}const Zu=l("ZodDefault",(e,t)=>{Ko.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zs(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Su(e,t){return new Zu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Tt(t)}})}const Iu=l("ZodPrefault",(e,t)=>{Bo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ws(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Pu(e,t){return new Iu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Tt(t)}})}const _n=l("ZodNonOptional",(e,t)=>{Wo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ys(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Eu(e,t){return new _n({type:"nonoptional",innerType:e,...m(t)})}const Tu=l("ZodCatch",(e,t)=>{Go.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$s(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Au(e,t){return new Tu({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Kn(t)})}const gn=l("ZodPipe",(e,t)=>{Xt.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ks(e,n,r,o),e.in=t.in,e.out=t.out});function It(e,t){return new gn({type:"pipe",in:e,out:t})}const ju=l("ZodPreprocess",(e,t)=>{gn.init(e,t),Yo.init(e,t)}),Nu=l("ZodReadonly",(e,t)=>{qo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Os(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ru(e){return new Nu({type:"readonly",innerType:e})}const Du=l("ZodLazy",(e,t)=>{Ho.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zs(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Ku(e){return new Du({type:"lazy",getter:e})}const Cu=l("ZodFunction",(e,t)=>{Xo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ds(e,n,r,o)});function Bu(e){return new Cu({type:"function",input:Array.isArray(e?.input)?zu(e?.input):pn(ue()),output:ue()})}const Ue=l("ZodCustom",(e,t)=>{Qo.init(e,t),$.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ls(e,n,r,o)});function Wu(e,t){return Hi(Ue,e??(()=>!0),t)}function Fu(e,t={}){return Qi(Ue,e,t)}function xu(e,t){return es(e,t)}function Gu(e,t={}){const n=new Ue({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...m(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Yu(e,t){return new ju({type:"pipe",in:hn(e),out:t})}export{wu as _,pn as a,Ju as b,Bu as c,Wu as d,Gu as e,Ku as l,Lu as n,Vu as o,Yu as p,Uu as s,Mu as u};
53//# sourceMappingURL=schemas-BdgNnLKl.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.