PageSourceSearch

https://www.sidecopilot.com/_nuxt/BwtUVIRL.js

js sidecopilot.com collected 2026-09-24 13:39:42 UTC 63,779 bytes, 1 lines download raw bytes

1function e(e,t,n){function i(n,i){var o;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(o=n._zod).traits??(o.traits=new Set),n._zod.traits.add(e),t(n,i);for(const e in s.prototype)e in n||Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=i}const o=n?.Parent??Object;class r extends o{}function s(e){var t;const o=n?.Parent?new r:this;i(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const n of o._zod.deferred)n();return o}return Object.defineProperty(r,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class t extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const n={};function i(e){return n}function o(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function r(e,t){return"bigint"==typeof t?t.toString():t}function s(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function a(e){return null==e}function u(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function c(e,t,n){Object.defineProperty(e,t,{get(){{const i=n();return e[t]=i,i}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function p(e){return JSON.stringify(e)}const l=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function f(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const h=s(()=>
1{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function m(e){if(!1===f(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==f(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}const v=new Set(["string","number","symbol"]);function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function g(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const b={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 z(e,t=0){for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function w(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function k(e){return"string"==typeof e?e:e?.message}function Z(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=k(e.inst?._zod.def?.error?.(e))??k(t?.error?.(e))??k(n.customError?.(e))??k(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function $(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function x(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const E=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,r,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},I=e("$ZodError",E),O=e("$ZodError",E,{Parent:Error});const T=e=>(n,o,r,s)=>{const a=r?Object.assign(r,{async:!1}):{async:!1},u=n._zod.run({value:o,issues:[]},a);if(u instanceof Promise)throw new t;if(u.issues.length){const t=new(s?.Err??e)(u.issues.map(e=>Z(e,a,i())));throw l(t,s?.callee),t}return u.value},S=e=>async(t,n,o,r)=>{const s=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>Z(e,s,i())));throw l(t,r?.callee),t}return a.value},N=e=>(n,o,r)=>{const s=r?{...r,async:!1}:{async:!1},a=n._zod.run({value:o,issues:[]},s);if(a instanceof Promise)throw new t;return a.issues.length?{success:!1,error:new(e??I)(a.issues.map(e=>Z(e,s,i())))}:{success:!0,data:a.value}},P=N(O),j=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(e=>Z(e,r,i())))}:{success:!0,data:s.value}},A=j(O),U=/^[cC][^\s-]{8,}$/,F=/^[0-9a-z]+$/,R=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,C=/^[0-9a-vA-V]{20}$/,D=/^[A-Za-z0-9]{27}$/,M=/^[a-zA-Z0-9_-]{21}$/,V=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,L=/^([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})$/,J=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)$/,B=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const W=/^(?:(?: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])$/,G=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,K=/^((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])$/,Y=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,X=/^$|^(?:[0-9a-zA-Z+/]{4}
1)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,q=/^[A-Za-z0-9_-]*$/,H=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Q=/^\+(?:[0-9]){6,14}[0-9]$/,ee="(?:(?:\\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])))",te=new RegExp(`^${ee}$`);function ne(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ie=/^\d+$/,oe=/^-?\d+(?:\.\d+)?/i,re=/true|false/i,se=/null/i,ae=/^[^A-Z]*$/,ue=/^[^a-z]*$/,ce=e("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),de={number:"number",bigint:"bigint",object:"date"},pe=e("$ZodCheckLessThan",(e,t)=>{ce.init(e,t);const n=de[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),le=e("$ZodCheckGreaterThan",(e,t)=>{ce.init(e,t);const n=de[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fe=e("$ZodCheckMultipleOf",(e,t)=>{ce.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.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.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,o=n>i?n:i;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),he=e("$ZodCheckNumberFormat",(e,t)=>{ce.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,r]=b[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=r,n&&(i.pattern=ie)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>r&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:r,inst:e})}}),me=e("$ZodCheckMaxLength",(e,t)=>{var n;ce.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const o=$(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ve=e("$ZodCheckMinLength",(e,t)=>{var n;ce.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const o=$(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ye=e("$ZodCheckLengthEquals",(e,t)=>{var n;ce.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,o=i.length;if(o===t.length)return;const r=$(i),s=o>t.length;n.issues.push({origin:r,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),_e=e("$ZodCheckStringFormat",(e,t)=>{var n,i;ce.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),ge=e("$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})}}),be=e("$ZodCheckLowerCase",(e,t)=>
1{t.pattern??(t.pattern=ae),_e.init(e,t)}),ze=e("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ue),_e.init(e,t)}),we=e("$ZodCheckIncludes",(e,t)=>{ce.init(e,t);const n=y(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ke=e("$ZodCheckStartsWith",(e,t)=>{ce.init(e,t);const n=new RegExp(`^${y(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ze=e("$ZodCheckEndsWith",(e,t)=>{ce.init(e,t);const n=new RegExp(`.*${y(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),$e=e("$ZodCheckOverwrite",(e,t)=>{ce.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class xe{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const o of i)this.content.push(o)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>`  ${e}`)].join("\n"))}}const Ee={major:4,minor:0,patch:0},Ie=e("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=Ee;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(e,n,i)=>{let o,r=z(e);for(const s of n){if(s._zod.def.when){if(!s._zod.def.when(e))continue}else if(r)continue;const n=e.issues.length,a=s._zod.check(e);if(a instanceof Promise&&!1===i?.async)throw new t;if(o||a instanceof Promise)o=(o??Promise.resolve()).then(async()=>{await a;e.issues.length!==n&&(r||(r=z(e,n)))});else{if(e.issues.length===n)continue;r||(r=z(e,n))}}return o?o.then(()=>e):e};e._zod.run=(i,r)=>{const s=e._zod.parse(i,r);if(s instanceof Promise){if(!1===r.async)throw new t;return s.then(e=>n(e,o,r))}return n(s,o,r)}}e["~standard"]={validate:t=>{try{const n=P(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return A(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),Oe=e("$ZodString",(e,t)=>{var n;Ie.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Te=e("$ZodStringFormat",(e,t)=>{_e.init(e,t),Oe.init(e,t)}),Se=e("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=L),Te.init(e,t)}),Ne=e("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=J(e))}else t.pattern??(t.pattern=J());Te.init(e,t)}),Pe=e("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=B),Te.init(e,t)}),je=e("$ZodURL",(e,t)=>{Te.init(e,t),e._zod.check=n=>{try{const i=n.value,o=new URL(i),r=o.href;return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",n
1ote:"Invalid hostname",pattern:H.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(!i.endsWith("/")&&r.endsWith("/")?n.value=r.slice(0,-1):n.value=r)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Ae=e("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Te.init(e,t)}),Ue=e("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=M),Te.init(e,t)}),Fe=e("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=U),Te.init(e,t)}),Re=e("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=F),Te.init(e,t)}),Ce=e("$ZodULID",(e,t)=>{t.pattern??(t.pattern=R),Te.init(e,t)}),De=e("$ZodXID",(e,t)=>{t.pattern??(t.pattern=C),Te.init(e,t)}),Me=e("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=D),Te.init(e,t)}),Ve=e("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=ne({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${ee}T(?:${i})$`)}(t)),Te.init(e,t)}),Le=e("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=te),Te.init(e,t)}),Je=e("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${ne(t)}$`)),Te.init(e,t)}),Be=e("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=V),Te.init(e,t)}),We=e("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=W),Te.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ge=e("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=G),Te.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ke=e("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=K),Te.init(e,t)}),Ye=e("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Y),Te.init(e,t),e._zod.check=n=>{const[i,o]=n.value.split("/");try{if(!o)throw new Error;const e=Number(o);if(`${e}`!==o)throw new Error;if(e<0||e>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Xe(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const qe=e("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=X),Te.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Xe(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const He=e("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=q),Te.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!q.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Xe(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qe=e("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Q),Te.init(e,t)});const et=e("$ZodJWT",(e,t)=>{Te.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tt=e("$ZodNumber",(e,t)=>{Ie.init(e,t),e._zod.pattern=e._zod.bag.pattern??oe,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(s){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const r="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...r?{received:r}:{}}),n}}),nt=e("$ZodNumber",(e,t)=>{he.init(e,t),tt.init(e,t)}),it=e("$ZodBoolean",(e,t)=>{Ie.init(e,t),e._zod.pattern=re,e._zod.parse=(n,i)=>
1{if(t.coerce)try{n.value=Boolean(n.value)}catch(r){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),ot=e("$ZodNull",(e,t)=>{Ie.init(e,t),e._zod.pattern=se,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rt=e("$ZodUnknown",(e,t)=>{Ie.init(e,t),e._zod.parse=e=>e}),st=e("$ZodNever",(e,t)=>{Ie.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function at(e,t,n){e.issues.length&&t.issues.push(...w(n,e.issues)),t.value[n]=e.value}const ut=e("$ZodArray",(e,t)=>{Ie.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const r=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},i);a instanceof Promise?r.push(a.then(t=>at(t,n,e))):at(a,n,e)}return r.length?Promise.all(r).then(()=>n):n}});function ct(e,t,n){e.issues.length&&t.issues.push(...w(n,e.issues)),t.value[n]=e.value}function dt(e,t,n,i){e.issues.length?void 0===i[n]?t.value[n]=n in i?void 0:e.value:t.issues.push(...w(n,e.issues)):void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}const pt=e("$ZodObject",(e,t)=>{Ie.init(e,t);const i=s(()=>{const e=Object.keys(t.shape);for(const o of e)if(!(t.shape[o]instanceof Ie))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=(i=t.shape,Object.keys(i).filter(e=>"optional"===i[e]._zod.optin&&"optional"===i[e]._zod.optout));var i;return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});c(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});let o;const r=f,a=!n.jitless,u=a&&h.value,d=t.catchall;let l;e._zod.parse=(n,s)=>{l??(l=i.value);const c=n.value;if(!r(c))return n.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),n;const f=[];if(a&&u&&!1===s?.async&&!0!==s.jitless)o||(o=(e=>{const t=new xe(["shape","payload","ctx"]),n=i.value,o=e=>{const t=p(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const r=Object.create(null);let s=0;for(const i of n.keys)r[i]="key_"+s++;t.write("const newResult = {}");for(const i of n.keys)if(n.optionalKeys.has(i)){const e=r[i];t.write(`const ${e} = ${o(i)};`);const n=p(i);t.write(`\n        if (${e}.issues.length) {\n          if (input[${n}] === undefined) {\n            if (${n} in input) {\n              newResult[${n}] = undefined;\n            }\n          } else {\n            payload.issues = payload.issues.concat(\n              ${e}.issues.map((iss) => ({\n                ...iss,\n                path: iss.path ? [${n}, ...iss.path] : [${n}],\n              }))\n            );\n          }\n        } else if (${e}.value === undefined) {\n          if (${n} in input) newResult[${n}] = undefined;\n        } else {\n          newResult[${n}] = ${e}.value;\n        }\n        `)}else{const e=r[i];t.write(`const ${e} = ${o(i)};`),t.write(`\n          if (${e}.issues.length) payload.issues = payload.issues.concat(${e}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${p(i)}, ...iss.path] : [${p(i)}]\n          })));`),t.write(`newResult[${p(i)}] = ${e}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),n=o(n,s);else{n.value={};const e=l.shape;for(const t of l.keys){const i=e[t],o=i._zod.run({value:c[t],issues:[]},s),r="optional"===i._zod.optin&&"optional"===i._zod.optout;o instanceof Promise?f.push(o.then(e=>r?dt(e,n,t,c):ct(e,n,t))):r?dt(o,n,t,c):ct(o,n,t)}}if(!d)return f.length?Promise.all(f).then(()=>n):n;const h=[],m=l.keySet,v=d._zod,y=v.def.type;for(const e of Object.keys(c)){if(m.has(e))continue;if("never"===y){h.push(e);continue}const t=v.run({value:c[e],issues:[]},s);t instanceof Promise?f.push(t.then(t=>ct(t,n,e))):ct(t,n,e)}return h.length&&n.issues.push({code:"unrecognized_keys",keys:h,input
1:c,inst:e}),f.length?Promise.all(f).then(()=>n):n}});function lt(e,t,n,o){for(const i of e)if(0===i.issues.length)return t.value=i.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Z(e,o,i())))}),t}const ft=e("$ZodUnion",(e,t)=>{Ie.init(e,t),c(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),c(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),c(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),c(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>u(e.source)).join("|")})$`)}}),e._zod.parse=(n,i)=>{let o=!1;const r=[];for(const e of t.options){const t=e._zod.run({value:n.value,issues:[]},i);if(t instanceof Promise)r.push(t),o=!0;else{if(0===t.issues.length)return t;r.push(t)}}return o?Promise.all(r).then(t=>lt(t,n,e,i)):lt(r,n,e,i)}}),ht=e("$ZodDiscriminatedUnion",(e,t)=>{ft.init(e,t);const n=e._zod.parse;c(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=s(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(o,r)=>{const s=o.value;if(!f(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(o,r):t.unionFallback?n(o,r):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),o)}}),mt=e("$ZodIntersection",(e,t)=>{Ie.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,o=t.left._zod.run({value:i,issues:[]},n),r=t.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then(([t,n])=>yt(e,t,n)):yt(e,o,r)}});function vt(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(m(e)&&m(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const r of i){const n=vt(e[r],t[r]);if(!n.valid)return{valid:!1,mergeErrorPath:[r,...n.mergeErrorPath]};o[r]=n.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 i=0;i<e.length;i++){const o=vt(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yt(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),z(e))return e;const i=vt(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const _t=e("$ZodRecord",(e,t)=>{Ie.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!m(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const s=[];if(t.keyType._zod.values){const i=t.keyType._zod.values;n.value={};for(const e of i)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const i=t.valueType._zod.run({value:r[e],issues:[]},o);i instanceof Promise?s.push(i.then(t=>{t.issues.length&&n.issues.push(...w(e,t.issues)),n.value[e]=t.value})):(i.issues.length&&n.issues.push(...w(e,i.issues)),n.value[e]=i.value)}let a;for(const e in r)i.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:a})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;const u=t.keyType._zod.run({value:a,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map(e=>
1Z(e,o,i())),input:a,path:[a],inst:e}),n.value[u.value]=u.value;continue}const c=t.valueType._zod.run({value:r[a],issues:[]},o);c instanceof Promise?s.push(c.then(e=>{e.issues.length&&n.issues.push(...w(a,e.issues)),n.value[u.value]=e.value})):(c.issues.length&&n.issues.push(...w(a,c.issues)),n.value[u.value]=c.value)}}return s.length?Promise.all(s).then(()=>n):n}}),gt=e("$ZodEnum",(e,t)=>{Ie.init(e,t);const n=o(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(e=>v.has(typeof e)).map(e=>"string"==typeof e?y(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),bt=e("$ZodLiteral",(e,t)=>{Ie.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?y(e):e?e.toString():String(e)).join("|")})$`),e._zod.parse=(n,i)=>{const o=n.value;return e._zod.values.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),zt=e("$ZodTransform",(e,n)=>{Ie.init(e,n),e._zod.parse=(e,i)=>{const o=n.transform(e.value,e);if(i.async){return(o instanceof Promise?o:Promise.resolve(o)).then(t=>(e.value=t,e))}if(o instanceof Promise)throw new t;return e.value=o,e}}),wt=e("$ZodOptional",(e,t)=>{Ie.init(e,t),e._zod.optin="optional",e._zod.optout="optional",c(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),c(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${u(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,n):void 0===e.value?e:t.innerType._zod.run(e,n)}),kt=e("$ZodNullable",(e,t)=>{Ie.init(e,t),c(e._zod,"optin",()=>t.innerType._zod.optin),c(e._zod,"optout",()=>t.innerType._zod.optout),c(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${u(e.source)}|null)$`):void 0}),c(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Zt=e("$ZodDefault",(e,t)=>{Ie.init(e,t),e._zod.optin="optional",c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>$t(e,t)):$t(i,t)}});function $t(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const xt=e("$ZodPrefault",(e,t)=>{Ie.init(e,t),e._zod.optin="optional",c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Et=e("$ZodNonOptional",(e,t)=>{Ie.init(e,t),c(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(t=>It(t,e)):It(o,e)}});function It(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ot=e("$ZodCatch",(e,t)=>{Ie.init(e,t),e._zod.optin="optional",c(e._zod,"optout",()=>t.innerType._zod.optout),c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(o=>(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>Z(e,n,i()))},input:e.value}),e.issues=[]),e)):(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>Z(e,n,i()))},input:e.value}),e.issues=[]),e)}}),Tt=e("$ZodPipe",(e,t)=>{Ie.init(e,t),c(e._zod,"values",()=>t.in._zod.values),c(e._zod,"optin",()=>t.in._zod.optin),c(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(e,n)=>{const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>St(e,t,n)):St(i,t,n)}});function St(e,t,n){return z(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const Nt=e("$ZodReadonly",(e,t)=>{Ie.init(e,t),c(e._zod,"propValues",()=>t.innerType._zod.propValues),c(e._zod,"values",()=>t.innerType._zod.values),c(e._zod,"optin",()=>t.innerType._zod.optin),c(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Pt):Pt(i)}});function Pt(e){return e.value=Object.freeze(e.value),e}const jt=e("$ZodLazy",(e,t)=>{Ie.init(e,t),c(e._zod,"innerType",()=>t.getter()),c(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),c(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),c(e._zod,"optin",()=>e._zod.innerType._zod.optin),c(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),At=e("$ZodCustom",(e,t)=>{ce.init(e,t),Ie.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>Ut(t,n,i,e));Ut(o,n,i,e)}});function Ut(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(x(e))}}class Ft{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function Rt(){return new Ft}const Ct=Rt();function Dt(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...g(t)})}function Mt(e,t){return new pe({check:"less_than",...g(t),value:e,inclusive:!1})}function Vt(e,t){return new pe({check:"less_than",...g(t),value:e,inclusive:!0})}function Lt(e,t){return new le({check:"greater_than",...g(t),value:e,inclusive:!1})}function Jt(e,t){return new le({check:"greater_than",...g(t),value:e,inclusive:!0})}function Bt(e,t){return new fe({check:"multiple_of",...g(t),value:e})}function Wt(e,t){return new me({check:"max_length",...g(t),maximum:e})}function Gt(e,t){return new ve({check:"min_length",...g(t),minimum:e})}function Kt(e,t){return new ye({check:"length_equals",...g(t),length:e})}function Yt(e){return new $e({check:"overwrite",tx:e})}class Xt{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Ct,this.target=e?.target??"draft-2
1020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var n;const i=e._zod.def,r={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s){s.count++;return t.schemaPath.includes(e)&&(s.cycle=t.path),s.schema}const a={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,a);const u=e._zod.toJSONSchema?.();if(u)a.schema=u;else{const n={...t,schemaPath:[...t.schemaPath,e],path:t.path},s=e._zod.parent;if(s)a.ref=s,this.process(s,n),this.seen.get(s).isParent=!0;else{const t=a.schema;switch(i.type){case"string":{const n=t;n.type="string";const{minimum:i,maximum:o,format:s,patterns:u,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof o&&(n.maxLength=o),s&&(n.format=r[s]??s,""===n.format&&delete n.format),c&&(n.contentEncoding=c),u&&u.size>0){const e=[...u];1===e.length?n.pattern=e[0].source:e.length>1&&(a.schema.allOf=[...e.map(e=>({..."draft-7"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{const n=t,{minimum:i,maximum:o,format:r,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:u}=e._zod.bag;"string"==typeof r&&r.includes("int")?n.type="integer":n.type="number","number"==typeof u&&(n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof a&&(n.exclusiveMaximum=a),"number"==typeof o&&(n.maximum=o,"number"==typeof a&&(a<=o?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof s&&(n.multipleOf=s);break}case"boolean":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":t.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":t.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":{const o=t,{minimum:r,maximum:s}=e._zod.bag;"number"==typeof r&&(o.minItems=r),"number"==typeof s&&(o.maxItems=s),o.type="array",o.items=this.process(i.element,{...n,path:[...n.path,"items"]});break}case"object":{const e=t;e.type="object",e.properties={};const o=i.shape;for(const t in o)e.properties[t]=this.process(o[t],{...n,path:[...n.path,"properties",t]});const r=new Set(Object.keys(o)),s=new Set([...r].filter(e=>{const t=i.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));s.size>0&&(e.required=Array.from(s)),"never"===i.catchall?._zod.def.type?e.additionalProperties=!1:i.catchall?i.catchall&&(e.additionalProperties=this.process(i.catchall,{...n,path:[...n.path,"additionalProperties"]})):"output"===this.io&&(e.additionalProperties=!1);break}case"union":t.anyOf=i.options.map((e,t)=>this.process(e,{...n,path:[...n.path,"anyOf",t]}));break;case"intersection":{const e=t,o=this.process(i.left,{...n,path:[...n.path,"allOf",0]}),r=this.process(i.right,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,a=[...s(o)?o.allOf:[o],...s(r)?r.allOf:[r]];e.allOf=a;break}case"tuple":{const o=t;o.type="array";const r=i.items.map((e,t)=>this.process(e,{...n,path:[...n.path,"prefixItems",t]}));if("draft-2020-12"===this.target?o.prefixItems=r:o.items=r,i.rest){const e=this.process(i.rest,{...n,path:[...n.path,"items"]});
1"draft-2020-12"===this.target?o.items=e:o.additionalItems=e}i.rest&&(o.items=this.process(i.rest,{...n,path:[...n.path,"items"]}));const{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(o.minItems=s),"number"==typeof a&&(o.maxItems=a);break}case"record":{const e=t;e.type="object",e.propertyNames=this.process(i.keyType,{...n,path:[...n.path,"propertyNames"]}),e.additionalProperties=this.process(i.valueType,{...n,path:[...n.path,"additionalProperties"]});break}case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":{const e=t,n=o(i.entries);n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),e.enum=n;break}case"literal":{const e=t,n=[];for(const t of i.values)if(void 0===t){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof t){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(t))}else n.push(t);if(0===n.length);else if(1===n.length){const t=n[0];e.type=null===t?"null":typeof t,e.const=t}else n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),n.every(e=>"boolean"==typeof e)&&(e.type="string"),n.every(e=>null===e)&&(e.type="null"),e.enum=n;break}case"file":{const n=t,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:r,mime:s}=e._zod.bag;void 0!==o&&(i.minLength=o),void 0!==r&&(i.maxLength=r),s?1===s.length?(i.contentMediaType=s[0],Object.assign(n,i)):n.anyOf=s.map(e=>({...i,contentMediaType:e})):Object.assign(n,i);break}case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":{const e=this.process(i.innerType,n);t.anyOf=[e,{type:"null"}];break}case"nonoptional":case"promise":case"optional":this.process(i.innerType,n),a.ref=i.innerType;break;case"success":t.type="boolean";break;case"default":this.process(i.innerType,n),a.ref=i.innerType,t.default=JSON.parse(JSON.stringify(i.defaultValue));break;case"prefault":this.process(i.innerType,n),a.ref=i.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break;case"catch":{let e;this.process(i.innerType,n),a.ref=i.innerType;try{e=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{const n=t,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source;break}case"pipe":{const e="input"===this.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;this.process(e,n),a.ref=e;break}case"readonly":this.process(i.innerType,n),a.ref=i.innerType,t.readOnly=!0;break;case"lazy":{const t=e._zod.innerType;this.process(t,n),a.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")}}}const c=this.metadataRegistry.get(e);c&&Object.assign(a.schema,c),"input"===this.io&&Ht(e)&&(delete a.schema.examples,delete a.schema.default),"input"===this.io&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault;return this.seen.get(e).schema}emit(e,t){const n={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},i=this.seen.get(e);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=e=>{const t="draft-2020-12"===this.target?"$defs":"definitions";if(n.external){const i=n.external.registry.get(e[0])?.id,o=n.external.uri??(e=>e);if(i)return{ref:o(i)};const r=e[1].defId??e[1].schema.id??"schema"+this.counter++;return e[1].defId=r,{defId:r,ref:`${o("__shared")}#/${t}/${r}`}}if(e[1]===i)return{ref:"#"};const o=`#/${t}/`,r=e[1].schema.id??"__schema"+this.counter++;return{defId:r,ref:o+r}},r=e=>{if(e[1].schema.$ref)return;const t=e[1],{ref:n,defId:i}=o(e);t.def={...t.schema},i&&(t.defId=i);const r=t.schema;for(const o in r)delete r[o];r.$ref=n};if("throw"===n.cycles)for(const d of this.seen.entries()){const e=d[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of this.seen.entries()){const t=d[1];if(e===d[0]){r(d);continue}if(n.external){const t=n.external.registry.get(d[0])?.id;if(e!==d[0]&&t){r(d);continue}}const i=this.metadataRegistry.get(d[0])?.id;i?r(d):(t.cycle||t.count>1&&"ref"===n.reused)&&r(d)}const s=(e,t)=>{const n=this.seen.get(e),i=n.def??n.schema,o={...i};if(null===n.ref)return;const r=n.ref;if(n.ref=null,r){s(r,t);const e=this.seen.get(r).schema;e.$ref&&"draft-7"===t.target?(i.allOf=i.allOf??[],i.allOf.push(e)):(Object.assign(i,e),Object.assign(i,o))}n.isParent||this.override({zodSchema:e,jsonSchema:i,path:n.path??[]})};for(const d of[...this.seen.entries()].reverse())s(d[0],{target:this.target});const a={};
1if("draft-2020-12"===this.target?a.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target&&(a.$schema="http://json-schema.org/draft-07/schema#"),n.external?.uri){const t=n.external.registry.get(e)?.id;if(!t)throw new Error("Schema is missing an `id` property");a.$id=n.external.uri(t)}Object.assign(a,i.def);const u=n.external?.defs??{};for(const d of this.seen.entries()){const e=d[1];e.def&&e.defId&&(u[e.defId]=e.def)}n.external||Object.keys(u).length>0&&("draft-2020-12"===this.target?a.$defs=u:a.definitions=u);try{return JSON.parse(JSON.stringify(a))}catch(c){throw new Error("Error converting schema to JSON.")}}}function qt(e,t){if(e instanceof Ft){const n=new Xt(t),i={};for(const t of e._idmap.entries()){const[e,i]=t;n.process(i)}const o={},r={registry:e,uri:t?.uri,defs:i};for(const s of e._idmap.entries()){const[e,i]=s;o[e]=n.emit(i,{...t,external:r})}if(Object.keys(i).length>0){const e="draft-2020-12"===n.target?"$defs":"definitions";o.__shared={[e]:i}}return{schemas:o}}const n=new Xt(t);return n.process(e),n.emit(e,t)}function Ht(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return Ht(i.element,n);case"object":for(const e in i.shape)if(Ht(i.shape[e],n))return!0;return!1;case"union":for(const e of i.options)if(Ht(e,n))return!0;return!1;case"intersection":return Ht(i.left,n)||Ht(i.right,n);case"tuple":for(const e of i.items)if(Ht(e,n))return!0;return!(!i.rest||!Ht(i.rest,n));case"record":case"map":return Ht(i.keyType,n)||Ht(i.valueType,n);case"set":return Ht(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return Ht(i.innerType,n);case"lazy":return Ht(i.getter(),n);case"transform":return!0;case"pipe":return Ht(i.in,n)||Ht(i.out,n)}throw new Error(`Unknown schema type: ${i.type}`)}const Qt=e("ZodISODateTime",(e,t)=>{Ve.init(e,t),yn.init(e,t)});function en(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...g(t)})}(Qt,e)}const tn=e("ZodISODate",(e,t)=>{Le.init(e,t),yn.init(e,t)});function nn(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...g(t)})}(tn,e)}const on=e("ZodISOTime",(e,t)=>{Je.init(e,t),yn.init(e,t)});function rn(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...g(t)})}(on,e)}const sn=e("ZodISODuration",(e,t)=>{Be.init(e,t),yn.init(e,t)});function an(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...g(t)})}(sn,e)}const un=e("ZodError",(e,t)=>{I.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},i={_errors:[]},o=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>o({issues:e}));else if("invalid_key"===t.code)o({issues:t.issues});else if("invalid_element"===t.code)o({issues:t.issues});else if(0===t.path.length)i._errors.push(n(t));else{let e=i,o=0;for(;o<t.path.length;){const i=t.path[o];o===t.path.length-1?(e[i]=e[i]||{_errors:[]},e[i]._errors.push(n(t))):e[i]=e[i]||{_errors:[]},e=e[i],o++}}};return o(e),i}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),cn=T(un),dn=S(un),pn=N(un),ln=j(un),fn=e("ZodType",(e,t)=>(Ie.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,n)=>_(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>cn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>pn(e,t,n),e.parseAsync=async(t,n)=>dn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ln(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...g(n)})}($i,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new ce({check:"custom"});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(x(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(x(i))}}
1,e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(Yt(t)),e.optional=()=>fi(e),e.nullable=()=>mi(e),e.nullish=()=>fi(mi(e)),e.nonoptional=t=>function(e,t){return new _i({type:"nonoptional",innerType:e,...g(t)})}(e,t),e.array=()=>Xn(e),e.or=t=>ti([e,t]),e.and=t=>new oi({type:"intersection",left:e,right:t}),e.transform=t=>zi(e,new pi({type:"transform",transform:t})),e.default=t=>{return n=t,new vi({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.prefault=t=>{return n=t,new yi({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.catch=t=>{return new gi({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>zi(e,t),e.readonly=()=>new wi({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Ct.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Ct.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Ct.get(e);const n=e.clone();return Ct.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),hn=e("_ZodString",(e,t)=>{Oe.init(e,t),fn.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new ge({check:"string_format",format:"regex",...g(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new we({check:"string_format",format:"includes",...g(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ke({check:"string_format",format:"starts_with",...g(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Ze({check:"string_format",format:"ends_with",...g(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Gt(...t)),e.max=(...t)=>e.check(Wt(...t)),e.length=(...t)=>e.check(Kt(...t)),e.nonempty=(...t)=>e.check(Gt(1,...t)),e.lowercase=t=>e.check(function(e){return new be({check:"string_format",format:"lowercase",...g(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ze({check:"string_format",format:"uppercase",...g(e)})}(t)),e.trim=()=>e.check(Yt(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Yt(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Yt(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Yt(e=>e.toUpperCase()))}),mn=e("ZodString",(e,t)=>{Oe.init(e,t),hn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...g(t)})}(_n,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...g(t)})}(zn,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...g(t)})}(Un,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...g(t)})}(wn,t)),e.guid=t=>e.check(Dt(gn,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...g(t)})}(bn,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...g(t)})}(bn,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...g(t)})}(bn,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...g(t)})}(bn,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...g(t)})}(kn,t)),e.guid=t=>e.check(Dt(gn,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...g(t)})}(Zn,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...g(t)})}($n,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...g(t)})}(xn,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...g(t)})}(Pn,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...g(t)})}(jn,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...g(t)})}(En,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...g(t)})}(In,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...g(t)})}(On,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...g(t)})}(Tn,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...g(t)})}(Sn,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...g(t)})}(Nn,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...g(t)})}(An,t)),e.datetime=t=>e.check(en(t)),e.date=t=>e.check(nn(t)),e.time=t=>e.check(rn(t)),e.duration=t=>e.check(an(t))});function vn(e){return function(e,t){return new e({type:"string",...g(t)})}(mn,e)}const yn=e("ZodStringFormat",(e,t)=>{Te.init(e,t),hn.init(e,t)}),_n=e("ZodEmail",(e,t)=>{Pe.init(e,t),yn.init(e,t)}),gn=e("ZodGUID",(e,t)=>{Se.init(e,t),yn.init(e,t)}),bn=e("ZodUUID",(e,t)=>{Ne.init(e,t),yn.init(e,t)}),zn=e("ZodURL",(e,t)=>{je.init(e,t),yn.init(e,t)}),wn=e("ZodEmoji",(e,t)=>{Ae.init(e,t),yn.init(e,t)}),kn=e("ZodNanoID",(e,t)=>{Ue.init(e,t),yn.init(e,t)}),Zn=e("ZodCUID",(e,t)=>{Fe.init(e,t),yn.init(e,t)}),$n=e("ZodCUID2",(e,t)=>{Re.init(e,t),yn.init(e,t)}
1),xn=e("ZodULID",(e,t)=>{Ce.init(e,t),yn.init(e,t)}),En=e("ZodXID",(e,t)=>{De.init(e,t),yn.init(e,t)}),In=e("ZodKSUID",(e,t)=>{Me.init(e,t),yn.init(e,t)}),On=e("ZodIPv4",(e,t)=>{We.init(e,t),yn.init(e,t)}),Tn=e("ZodIPv6",(e,t)=>{Ge.init(e,t),yn.init(e,t)}),Sn=e("ZodCIDRv4",(e,t)=>{Ke.init(e,t),yn.init(e,t)}),Nn=e("ZodCIDRv6",(e,t)=>{Ye.init(e,t),yn.init(e,t)}),Pn=e("ZodBase64",(e,t)=>{qe.init(e,t),yn.init(e,t)}),jn=e("ZodBase64URL",(e,t)=>{He.init(e,t),yn.init(e,t)}),An=e("ZodE164",(e,t)=>{Qe.init(e,t),yn.init(e,t)}),Un=e("ZodJWT",(e,t)=>{et.init(e,t),yn.init(e,t)}),Fn=e("ZodNumber",(e,t)=>{tt.init(e,t),fn.init(e,t),e.gt=(t,n)=>e.check(Lt(t,n)),e.gte=(t,n)=>e.check(Jt(t,n)),e.min=(t,n)=>e.check(Jt(t,n)),e.lt=(t,n)=>e.check(Mt(t,n)),e.lte=(t,n)=>e.check(Vt(t,n)),e.max=(t,n)=>e.check(Vt(t,n)),e.int=t=>e.check(Dn(t)),e.safe=t=>e.check(Dn(t)),e.positive=t=>e.check(Lt(0,t)),e.nonnegative=t=>e.check(Jt(0,t)),e.negative=t=>e.check(Mt(0,t)),e.nonpositive=t=>e.check(Vt(0,t)),e.multipleOf=(t,n)=>e.check(Bt(t,n)),e.step=(t,n)=>e.check(Bt(t,n)),e.finite=()=>e;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});function Rn(e){return function(e,t){return new e({type:"number",checks:[],...g(t)})}(Fn,e)}const Cn=e("ZodNumberFormat",(e,t)=>{nt.init(e,t),Fn.init(e,t)});function Dn(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...g(t)})}(Cn,e)}const Mn=e("ZodBoolean",(e,t)=>{it.init(e,t),fn.init(e,t)});function Vn(e){return function(e,t){return new e({type:"boolean",...g(t)})}(Mn,e)}const Ln=e("ZodNull",(e,t)=>{ot.init(e,t),fn.init(e,t)});function Jn(e){return function(e,t){return new e({type:"null",...g(t)})}(Ln,e)}const Bn=e("ZodUnknown",(e,t)=>{rt.init(e,t),fn.init(e,t)});function Wn(){return new Bn({type:"unknown"})}const Gn=e("ZodNever",(e,t)=>{st.init(e,t),fn.init(e,t)});function Kn(e){return function(e,t){return new e({type:"never",...g(t)})}(Gn,e)}const Yn=e("ZodArray",(e,t)=>{ut.init(e,t),fn.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Gt(t,n)),e.nonempty=t=>e.check(Gt(1,t)),e.max=(t,n)=>e.check(Wt(t,n)),e.length=(t,n)=>e.check(Kt(t,n)),e.unwrap=()=>e.element});function Xn(e,t){return function(e,t,n){return new e({type:"array",element:t,...g(n)})}(Yn,e,t)}const qn=e("ZodObject",(e,t)=>{pt.init(e,t),fn.init(e,t),c(e,"shape",()=>t.shape),e.keyof=()=>ui(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Wn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Wn()}),e.strict=()=>e.clone({...e._zod.def,catchall:Kn()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!m(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return d(this,"shape",n),n},checks:[]};return _(e,n)}(e,t),e.merge=t=>{return i=t,_(n=e,{...n._zod.def,get shape(){const e={...n._zod.def.shape,...i._zod.def.shape};return d(this,"shape",e),e},catchall:i._zod.def.catchall,checks:[]});var n,i},e.pick=t=>function(e,t){const n={},i=e._zod.def;for(const o in t){if(!(o in i.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(n[o]=i.shape[o])}return _(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.omit=t=>function(e,t){const n={...e._zod.def.shape},i=e._zod.def;for(const o in t){if(!(o in i.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete n[o]}return _(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.partial=(...t)=>function(e,t,n){const i=t._zod.def.shape,o={...i};if(n)for(const r in n){if(!(r in i))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=e?new e({type:"optional",innerType:i[r]}):i[r])}else for(const r in i)o[r]=e?new e({type:"optional",innerType:i[r]}):i[r];return _(t,{...t._zod.def,shape:o,checks:[]})}(li,e,t[0]),e.required=(...t)=>function(e,t,n){const i=t._zod.def.shape,o={...i};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:i[r]}))}else for(const r in i)o[r]=new e({type:"nonoptional",innerType:i[r]});return _(t,{...t._zod.def,shape:o,checks:[]})}(_i,e,t[0])});function Hn(e,t){const n={type:"object",get shape(){return d(this,"shape",{...e}),this.shape},...g(t)};return new qn(n)}function Qn(e,t){return new qn({type:"object",get shape(){return d(this,"shape",{...e}),this.shape},catchall:Kn(),...g(t)})}const ei=e("ZodUnion",(e,t)=>{ft.init(e,t),fn.init(e,t),e.options=t.options});function ti(e,t){return new ei({type:"union",options:e,...g(t)})}const ni=e("ZodDiscriminatedUnion",(e,t)=>{ei.init(e,t),ht.init(e,t)});function ii(e,t,n){return new ni({type:"union",options:t,discriminator:e,...g(n)})}const oi=e("ZodIntersection",(e,t)=>{mt.init(e,t),fn.init(e,t)});const ri=e("ZodRecord",(e,t)=>{_t.init(e,t),fn.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function si(e,t,n){return new ri({type:"record",keyType:e,valueType:t,...g(n)})}const ai=e("ZodEnum",(e,t)=>{gt.init(e,t),fn.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}
1return new ai({...t,checks:[],...g(i),entries:o})},e.exclude=(e,i)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new ai({...t,checks:[],...g(i),entries:o})}});function ui(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new ai({type:"enum",entries:n,...g(t)})}const ci=e("ZodLiteral",(e,t)=>{bt.init(e,t),fn.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function di(e,t){return new ci({type:"literal",values:Array.isArray(e)?e:[e],...g(t)})}const pi=e("ZodTransform",(e,t)=>{zt.init(e,t),fn.init(e,t),e._zod.parse=(n,i)=>{n.addIssue=i=>{if("string"==typeof i)n.issues.push(x(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),t.continue??(t.continue=!0),n.issues.push(x(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}});const li=e("ZodOptional",(e,t)=>{wt.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function fi(e){return new li({type:"optional",innerType:e})}const hi=e("ZodNullable",(e,t)=>{kt.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType});function mi(e){return new hi({type:"nullable",innerType:e})}const vi=e("ZodDefault",(e,t)=>{Zt.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const yi=e("ZodPrefault",(e,t)=>{xt.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType});const _i=e("ZodNonOptional",(e,t)=>{Et.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType});const gi=e("ZodCatch",(e,t)=>{Ot.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const bi=e("ZodPipe",(e,t)=>{Tt.init(e,t),fn.init(e,t),e.in=t.in,e.out=t.out});function zi(e,t){return new bi({type:"pipe",in:e,out:t})}const wi=e("ZodReadonly",(e,t)=>{Nt.init(e,t),fn.init(e,t)});const ki=e("ZodLazy",(e,t)=>{jt.init(e,t),fn.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Zi(e){return new ki({type:"lazy",getter:e})}const $i=e("ZodCustom",(e,t)=>{At.init(e,t),fn.init(e,t)});function xi(e,t){return function(e,t,n){const i=g(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}($i,e??(()=>!0),t)}function Ei(e,t={error:`Input not instance of ${e.name}`}){const n=new $i({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...g(t)});return n._zod.bag.Class=e,n}var Ii,Oi;(Oi=Ii||(Ii={})).ZodString="ZodString",Oi.ZodNumber="ZodNumber",Oi.ZodNaN="ZodNaN",Oi.ZodBigInt="ZodBigInt",Oi.ZodBoolean="ZodBoolean",Oi.ZodDate="ZodDate",Oi.ZodSymbol="ZodSymbol",Oi.ZodUndefined="ZodUndefined",Oi.ZodNull="ZodNull",Oi.ZodAny="ZodAny",Oi.ZodUnknown="ZodUnknown",Oi.ZodNever="ZodNever",Oi.ZodVoid="ZodVoid",Oi.ZodArray="ZodArray",Oi.ZodObject="ZodObject",Oi.ZodUnion="ZodUnion",Oi.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Oi.ZodIntersection="ZodIntersection",Oi.ZodTuple="ZodTuple",Oi.ZodRecord="ZodRecord",Oi.ZodMap="ZodMap",Oi.ZodSet="ZodSet",Oi.ZodFunction="ZodFunction",Oi.ZodLazy="ZodLazy",Oi.ZodLiteral="ZodLiteral",Oi.ZodEnum="ZodEnum",Oi.ZodEffects="ZodEffects",Oi.ZodNativeEnum="ZodNativeEnum",Oi.ZodOptional="ZodOptional",Oi.ZodNullable="ZodNullable",Oi.ZodDefault="ZodDefault",Oi.ZodCatch="ZodCatch",Oi.ZodPromise="ZodPromise",Oi.ZodBranded="ZodBranded",Oi.ZodPipeline="ZodPipeline",Oi.ZodReadonly="ZodReadonly";export{Ii as Z,Ei as _,vn as a,di as b,xi as c,Vn as d,Wn as e,ii as f,Xn as g,Qn as h,ui as i,Jn as j,Zi as l,Rn as n,Hn as o,si as r,ln as s,qt as t,ti as u};

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.