@techdocs/cli 1.2.3-next.1 → 1.2.4-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/embedded-app/.config-schema.json +7 -8
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{5837.ebb0f422.chunk.js → 5837.45e6ec1d.chunk.js} +2 -2
  5. package/dist/embedded-app/static/{5837.ebb0f422.chunk.js.map → 5837.45e6ec1d.chunk.js.map} +1 -1
  6. package/dist/embedded-app/static/{6051.f45bae28.chunk.js → 6051.3f1d6d7c.chunk.js} +3 -3
  7. package/dist/embedded-app/static/{6051.f45bae28.chunk.js.map → 6051.3f1d6d7c.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{7560.b3ed3a97.chunk.js → 7560.a50a4f27.chunk.js} +2 -2
  9. package/dist/embedded-app/static/{7560.b3ed3a97.chunk.js.map → 7560.a50a4f27.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/7750.36f3b714.chunk.js +8 -0
  11. package/dist/embedded-app/static/{7750.0f3395fe.chunk.js.map → 7750.36f3b714.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/main.4fdcff32.js +494 -0
  13. package/dist/embedded-app/static/main.4fdcff32.js.map +1 -0
  14. package/dist/embedded-app/static/{module-ajv.fca02de5.js → module-ajv.2efe45a5.js} +5 -5
  15. package/dist/embedded-app/static/module-ajv.2efe45a5.js.map +1 -0
  16. package/dist/embedded-app/static/module-date-fns.7dd2cc1f.js +4 -0
  17. package/dist/embedded-app/static/module-date-fns.7dd2cc1f.js.map +1 -0
  18. package/dist/embedded-app/static/module-luxon.1ec72e86.js +3 -0
  19. package/dist/embedded-app/static/module-luxon.1ec72e86.js.map +1 -0
  20. package/dist/embedded-app/static/{module-material-table.5d56e1cb.js → module-material-table.ac270938.js} +2 -2
  21. package/dist/embedded-app/static/{module-material-table.5d56e1cb.js.map → module-material-table.ac270938.js.map} +1 -1
  22. package/dist/embedded-app/static/module-material-ui.8008c157.js +51 -0
  23. package/dist/embedded-app/static/module-material-ui.8008c157.js.map +1 -0
  24. package/dist/embedded-app/static/module-octokit.ea8cd5cc.js +2 -2
  25. package/dist/embedded-app/static/module-octokit.ea8cd5cc.js.map +1 -1
  26. package/dist/embedded-app/static/module-yaml.b5c4d531.js +1 -1
  27. package/dist/embedded-app/static/module-yaml.b5c4d531.js.map +1 -1
  28. package/dist/embedded-app/static/module-zod.49ffd80f.js +1 -1
  29. package/dist/embedded-app/static/module-zod.49ffd80f.js.map +1 -1
  30. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ada.88274170.chunk.js +1 -1
  31. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ada.88274170.chunk.js.map +1 -1
  32. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dart.d81ae419.chunk.js +1 -1
  33. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dart.d81ae419.chunk.js.map +1 -1
  34. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dts.497871f1.chunk.js +1 -1
  35. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dts.497871f1.chunk.js.map +1 -1
  36. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_javascript.b660af43.chunk.js +1 -1
  37. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_javascript.b660af43.chunk.js.map +1 -1
  38. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mathematica.19225e2a.chunk.js +1 -1
  39. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mathematica.19225e2a.chunk.js.map +1 -1
  40. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_typescript.90772612.chunk.js +1 -1
  41. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_typescript.90772612.chunk.js.map +1 -1
  42. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vhdl.c15a8f55.chunk.js +1 -1
  43. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vhdl.c15a8f55.chunk.js.map +1 -1
  44. package/dist/embedded-app/static/{runtime.3308728f.js → runtime.4fdcff32.js} +2 -2
  45. package/dist/embedded-app/static/{runtime.3308728f.js.map → runtime.4fdcff32.js.map} +1 -1
  46. package/dist/embedded-app/static/vendor.4fdcff32.js +236 -0
  47. package/dist/embedded-app/static/vendor.4fdcff32.js.map +1 -0
  48. package/dist/index.cjs.js +1 -1
  49. package/package.json +6 -6
  50. package/dist/embedded-app/static/7750.0f3395fe.chunk.js +0 -8
  51. package/dist/embedded-app/static/main.3308728f.js +0 -494
  52. package/dist/embedded-app/static/main.3308728f.js.map +0 -1
  53. package/dist/embedded-app/static/module-ajv.fca02de5.js.map +0 -1
  54. package/dist/embedded-app/static/module-date-fns.d70f4cc3.js +0 -3
  55. package/dist/embedded-app/static/module-date-fns.d70f4cc3.js.map +0 -1
  56. package/dist/embedded-app/static/module-luxon.f67513b2.js +0 -3
  57. package/dist/embedded-app/static/module-luxon.f67513b2.js.map +0 -1
  58. package/dist/embedded-app/static/module-material-ui.e3edf608.js +0 -74
  59. package/dist/embedded-app/static/module-material-ui.e3edf608.js.map +0 -1
  60. package/dist/embedded-app/static/vendor.3308728f.js +0 -236
  61. package/dist/embedded-app/static/vendor.3308728f.js.map +0 -1
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6816],{30195:function(ht,Ze,Ne){Ne.d(Ze,{z:function(){return pt}});var g;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s})(g||(g={}));const d=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),E=r=>{switch(typeof r){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(r)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"object":return Array.isArray(r)?d.array:r===null?d.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?d.promise:typeof Map!="undefined"&&r instanceof Map?d.map:typeof Set!="undefined"&&r instanceof Set?d.set:typeof Date!="undefined"&&r instanceof Date?d.date:d.object;default:return d.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of"]),Se=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class O extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,le,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}O.create=r=>new O(r);const U=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===d.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,le)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be greater than ${r.inclusive?"or equal to ":""}${r.minimum}`:r.type==="date"?t=`Date must be greater than ${r.inclusive?"or equal to ":""}${new Date(r.minimum)}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be less than ${r.inclusive?"or equal to ":""}${r.maximum}`:r.type==="date"?t=`Date must be smaller than ${r.inclusive?"or equal to ":""}${new Date(r.maximum)}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let me=U;function Oe(r){me=r}function J(){return me}const Y=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};let o="";const l=s.filter(u=>!!u).slice().reverse();for(const u of l)o=u(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},Ee=[];function p(r,e){const t=Y({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,J(),U].filter(s=>!!s)});r.common.issues.push(t)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return f;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t)s.push({key:await n.key,value:await n.value});return b.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return f;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),(typeof i.value!="undefined"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const f=Object.freeze({status:"aborted"}),Ie=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),ce=r=>r.status==="aborted",de=r=>r.status==="dirty",H=r=>r.status==="valid",ue=r=>typeof Promise!==void 0&&r instanceof Promise,le=(r,e)=>typeof e=="bigint"?e.toString():e;var _;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));class w{constructor(e,t,s,n){this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._path.concat(this._key)}}const ye=(r,e)=>{if(H(e))return{success:!0,data:e.value};{if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");const t=new O(r.common.issues);return{success:!1,error:t}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data=="undefined"?{message:s!=null?s:o.defaultError}:{message:t!=null?t:o.defaultError},description:n}}class v{constructor(e){this.spa=this.safeParseAsync,this.superRefine=this._refinement,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.default=this.default.bind(this),this.describe=this.describe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return E(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ue(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ye(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parse({data:e,path:[],parent:s}),a=await(ue(n)?n:Promise.resolve(n));return ye(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise!="undefined"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new N({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:e}})}optional(){return S.create(this)}nullable(){return P.create(this)}nullish(){return this.optional().nullable()}array(){return T.create(this)}promise(){return $.create(this)}or(e){return B.create([this,e])}and(e){return W.create(this,e)}transform(e){return new N({schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({innerType:this,defaultValue:t,typeName:h.ZodDefault})}brand(){return new ge({typeName:h.ZodBranded,type:this,...y(void 0)})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,Ce=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Ae=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;class I extends v{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,..._.errToObj(s)}),this.nonempty=e=>this.min(1,_.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._getType(e)!==d.string){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.string,received:a.parsedType}),f}const s=new b;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,message:a.message}),s.dirty());else if(a.kind==="email")Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ce.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")je.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):g.assertNever(a);return{status:s.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this.min(e,t).max(e,t)}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}I.create=r=>new I({checks:[],typeName:h.ZodString,...y(r)});function Re(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class A extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._getType(e)!==d.number){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.number,received:a.parsedType}),f}let s;const n=new b;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?Re(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,s,n){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:_.toString(n)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}}A.create=r=>new A({checks:[],typeName:h.ZodNumber,...y(r)});class K extends v{_parse(e){if(this._getType(e)!==d.bigint){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.bigint,received:s.parsedType}),f}return k(e.data)}}K.create=r=>new K({typeName:h.ZodBigInt,...y(r)});class G extends v{_parse(e){if(this._getType(e)!==d.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.boolean,received:s.parsedType}),f}return k(e.data)}}G.create=r=>new G({typeName:h.ZodBoolean,...y(r)});class V extends v{_parse(e){if(this._getType(e)!==d.date){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.date,received:a.parsedType}),f}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_date}),f}const s=new b;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,message:a.message,inclusive:!0,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,message:a.message,inclusive:!0,maximum:a.value,type:"date"}),s.dirty()):g.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}V.create=r=>new V({checks:[],typeName:h.ZodDate,...y(r)});class Q extends v{_parse(e){if(this._getType(e)!==d.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.undefined,received:s.parsedType}),f}return k(e.data)}}Q.create=r=>new Q({typeName:h.ZodUndefined,...y(r)});class X extends v{_parse(e){if(this._getType(e)!==d.null){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.null,received:s.parsedType}),f}return k(e.data)}}X.create=r=>new X({typeName:h.ZodNull,...y(r)});class D extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}}D.create=r=>new D({typeName:h.ZodAny,...y(r)});class j extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}j.create=r=>new j({typeName:h.ZodUnknown,...y(r)});class C extends v{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:d.never,received:t.parsedType}),f}}C.create=r=>new C({typeName:h.ZodNever,...y(r)});class F extends v{_parse(e){if(this._getType(e)!==d.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.void,received:s.parsedType}),f}return k(e.data)}}F.create=r=>new F({typeName:h.ZodVoid,...y(r)});class T extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==d.array)return p(t,{code:c.invalid_type,expected:d.array,received:t.parsedType}),f;if(n.minLength!==null&&t.data.length<n.minLength.value&&(p(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(p(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all(t.data.map((i,o)=>n.type._parseAsync(new w(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));const a=t.data.map((i,o)=>n.type._parseSync(new w(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new T({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new T({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}T.create=(r,e)=>new T({type:r,minLength:null,maxLength:null,typeName:h.ZodArray,...y(e)});var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const ve=r=>e=>new x({...r,shape:()=>({...r.shape(),...e})});function z(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=S.create(z(s))}return new x({...r._def,shape:()=>e})}else return r instanceof T?T.create(z(r.element)):r instanceof S?S.create(z(r.unwrap())):r instanceof P?P.create(z(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>z(e))):r}class x extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=ve(this._def),this.extend=ve(this._def)}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==d.object){const u=this._getOrReturnCtx(e);return p(u,{code:c.invalid_type,expected:d.object,received:u.parsedType}),f}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];for(const u in n.data)i.includes(u)||o.push(u);const l=[];for(const u of i){const m=a[u],L=n.data[u];l.push({key:{status:"valid",value:u},value:m._parse(new w(n,L,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof C){const u=this._def.unknownKeys;if(u==="passthrough")for(const m of o)l.push({key:{status:"valid",value:m},value:{status:"valid",value:n.data[m]}});else if(u==="strict")o.length>0&&(p(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const m of o){const L=n.data[m];l.push({key:{status:"valid",value:m},value:u._parse(new w(n,L,n.path,m)),alwaysSet:m in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const u=[];for(const m of l){const L=await m.key;u.push({key:L,value:await m.value,alwaysSet:m.alwaysSet})}return u}).then(u=>b.mergeObjectSync(s,u)):b.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const l=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>ee.mergeShapes(this._def.shape(),e._def.shape()),typeName:h.ZodObject})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};return g.objectKeys(e).map(s=>{this.shape[s]&&(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}omit(e){const t={};return g.objectKeys(this.shape).map(s=>{g.objectKeys(e).indexOf(s)===-1&&(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}deepPartial(){return z(this)}partial(e){const t={};if(e)return g.objectKeys(this.shape).map(s=>{g.objectKeys(e).indexOf(s)===-1?t[s]=this.shape[s]:t[s]=this.shape[s].optional()}),new x({...this._def,shape:()=>t});for(const s in this.shape){const n=this.shape[s];t[s]=n.optional()}return new x({...this._def,shape:()=>t})}required(){const e={};for(const t in this.shape){let n=this.shape[t];for(;n instanceof S;)n=n._def.innerType;e[t]=n}return new x({...this._def,shape:()=>e})}keyof(){return _e(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:C.create(),typeName:h.ZodObject,...y(e)}),x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:C.create(),typeName:h.ZodObject,...y(e)}),x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:C.create(),typeName:h.ZodObject,...y(e)});class B extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new O(o.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:i}),f}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const l of s){const u={...t,common:{...t.common,issues:[]},parent:null},m=l._parseSync({data:t.data,path:t.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!a&&(a={result:m,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(l=>new O(l));return p(t,{code:c.invalid_union,unionErrors:o}),f}}get options(){return this._def.options}}B.create=(r,e)=>new B({options:r,typeName:h.ZodUnion,...y(e)});class te extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.object)return p(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),f;const s=this.discriminator,n=t.data[s],a=this.options.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:this.validDiscriminatorValues,path:[s]}),f)}get discriminator(){return this._def.discriminator}get validDiscriminatorValues(){return Array.from(this.options.keys())}get options(){return this._def.options}static create(e,t,s){const n=new Map;try{t.forEach(a=>{const i=a.shape[e].value;n.set(i,a)})}catch{throw new Error("The discriminator value could not be extracted from all the provided schemas")}if(n.size!==t.length)throw new Error("Some of the discriminator values are not unique");return new te({typeName:h.ZodDiscriminatedUnion,discriminator:e,options:n,...y(s)})}}function pe(r,e){const t=E(r),s=E(e);if(r===e)return{valid:!0,data:r};if(t===d.object&&s===d.object){const n=g.objectKeys(e),a=g.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const l=pe(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===d.array&&s===d.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],l=pe(i,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===d.date&&s===d.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class W extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(ce(a)||ce(i))return f;const o=pe(a.value,i.value);return o.valid?((de(a)||de(i))&&t.dirty(),{status:t.value,value:o.data}):(p(s,{code:c.invalid_intersection_types}),f)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}W.create=(r,e,t)=>new W({left:r,right:e,typeName:h.ZodIntersection,...y(t)});class Z extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.array)return p(s,{code:c.invalid_type,expected:d.array,received:s.parsedType}),f;if(s.data.length<this._def.items.length)return p(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,type:"array"}),f;!this._def.rest&&s.data.length>this._def.items.length&&(p(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,type:"array"}),t.dirty());const a=s.data.map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new w(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(r,e)=>new Z({items:r,typeName:h.ZodTuple,rest:null,...y(e)});class q extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.object)return p(s,{code:c.invalid_type,expected:d.object,received:s.parsedType}),f;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new w(s,o,s.path,o)),value:i._parse(new w(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof v?new q({keyType:e,valueType:t,typeName:h.ZodRecord,...y(s)}):new q({keyType:I.create(),valueType:e,typeName:h.ZodRecord,...y(t)})}}class re extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.map)return p(s,{code:c.invalid_type,expected:d.map,received:s.parsedType}),f;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,l],u)=>({key:n._parse(new w(s,o,s.path,[u,"key"])),value:a._parse(new w(s,l,s.path,[u,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,m=await l.value;if(u.status==="aborted"||m.status==="aborted")return f;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const u=l.key,m=l.value;if(u.status==="aborted"||m.status==="aborted")return f;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}}}}re.create=(r,e,t)=>new re({valueType:e,keyType:r,typeName:h.ZodMap,...y(t)});class R extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.set)return p(s,{code:c.invalid_type,expected:d.set,received:s.parsedType}),f;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(p(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(p(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(l){const u=new Set;for(const m of l){if(m.status==="aborted")return f;m.status==="dirty"&&t.dirty(),u.add(m.value)}return{status:t.value,value:u}}const o=[...s.data.values()].map((l,u)=>a._parse(new w(s,l,s.path,u)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new R({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new R({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}R.create=(r,e)=>new R({valueType:r,minSize:null,maxSize:null,typeName:h.ZodSet,...y(e)});class M extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.function)return p(t,{code:c.invalid_type,expected:d.function,received:t.parsedType}),f;function s(o,l){return Y({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),U].filter(u=>!!u),issueData:{code:c.invalid_arguments,argumentsError:l}})}function n(o,l){return Y({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),U].filter(u=>!!u),issueData:{code:c.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;return this._def.returns instanceof $?k(async(...o)=>{const l=new O([]),u=await this._def.args.parseAsync(o,a).catch(fe=>{throw l.addIssue(s(o,fe)),l}),m=await i(...u);return await this._def.returns._def.type.parseAsync(m,a).catch(fe=>{throw l.addIssue(n(m,fe)),l})}):k((...o)=>{const l=this._def.args.safeParse(o,a);if(!l.success)throw new O([s(o,l.error)]);const u=i(...l.data),m=this._def.returns.safeParse(u,a);if(!m.success)throw new O([n(u,m.error)]);return m.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new M({...this._def,args:Z.create(e).rest(j.create())})}returns(e){return new M({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}}M.create=(r,e,t)=>new M({args:r?r.rest(j.create()):Z.create([]).rest(j.create()),returns:e||j.create(),typeName:h.ZodFunction,...y(t)});class se extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}se.create=(r,e)=>new se({getter:r,typeName:h.ZodLazy,...y(e)});class ne extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_literal,expected:this._def.value}),f}return{status:"valid",value:e.data}}get value(){return this._def.value}}ne.create=(r,e)=>new ne({value:r,typeName:h.ZodLiteral,...y(e)});function _e(r,e){return new ae({values:r,typeName:h.ZodEnum,...y(e)})}class ae extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),f}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:s}),f}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}}ae.create=_e;class ie extends v{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==d.string&&s.parsedType!==d.number){const n=g.objectValues(t);return p(s,{expected:g.joinValues(n),received:s.parsedType,code:c.invalid_type}),f}if(t.indexOf(e.data)===-1){const n=g.objectValues(t);return p(s,{received:s.data,code:c.invalid_enum_value,options:n}),f}return k(e.data)}get enum(){return this._def.values}}ie.create=(r,e)=>new ie({values:r,typeName:h.ZodNativeEnum,...y(e)});class $ extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&t.common.async===!1)return p(t,{code:c.invalid_type,expected:d.promise,received:t.parsedType}),f;const s=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}$.create=(r,e)=>new $({type:r,typeName:h.ZodPromise,...y(e)});class N extends v{innerType(){return this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if(n.type==="preprocess"){const i=n.transform(s.data);return s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}const a={addIssue:i=>{p(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="refinement"){const i=o=>{const l=n.refinement(o,a);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?f:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?f:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!H(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>H(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);g.assertNever(n)}}N.create=(r,e,t)=>new N({schema:r,typeName:h.ZodEffects,effect:e,...y(t)}),N.createWithPreprocess=(r,e,t)=>new N({schema:e,effect:{type:"preprocess",transform:r},typeName:h.ZodEffects,...y(t)});class S extends v{_parse(e){return this._getType(e)===d.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}S.create=(r,e)=>new S({innerType:r,typeName:h.ZodOptional,...y(e)});class P extends v{_parse(e){return this._getType(e)===d.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(r,e)=>new P({innerType:r,typeName:h.ZodNullable,...y(e)});class he extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===d.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(r,e)=>new S({innerType:r,typeName:h.ZodOptional,...y(e)});class oe extends v{_parse(e){if(this._getType(e)!==d.nan){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.nan,received:s.parsedType}),f}return{status:"valid",value:e.data}}}oe.create=r=>new oe({typeName:h.ZodNaN,...y(r)});const Me=Symbol("zod_brand");class ge extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}const xe=(r,e={},t)=>r?D.create().superRefine((s,n)=>{if(!r(s)){const a=typeof e=="function"?e(s):e,i=typeof a=="string"?{message:a}:a;n.addIssue({code:"custom",...i,fatal:t})}}):D.create(),Pe={object:x.lazycreate};var h;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded"})(h||(h={}));const Ve=(r,e={message:`Input not instance of ${r.name}`})=>xe(t=>t instanceof r,e,!0),be=I.create,ke=A.create,De=oe.create,ze=K.create,we=G.create,$e=V.create,Le=Q.create,Ue=X.create,Be=D.create,We=j.create,qe=C.create,Je=F.create,Ye=T.create,He=x.create,Ke=x.strictCreate,Ge=B.create,Qe=te.create,Xe=W.create,Fe=Z.create,et=q.create,tt=re.create,rt=R.create,st=M.create,nt=se.create,at=ne.create,it=ae.create,ot=ie.create,ct=$.create,Te=N.create,dt=S.create,ut=P.create,lt=N.createWithPreprocess;var pt=Object.freeze({__proto__:null,getParsedType:E,ZodParsedType:d,makeIssue:Y,EMPTY_PATH:Ee,addIssueToContext:p,ParseStatus:b,INVALID:f,DIRTY:Ie,OK:k,isAborted:ce,isDirty:de,isValid:H,isAsync:ue,jsonStringifyReplacer:le,ZodType:v,ZodString:I,ZodNumber:A,ZodBigInt:K,ZodBoolean:G,ZodDate:V,ZodUndefined:Q,ZodNull:X,ZodAny:D,ZodUnknown:j,ZodNever:C,ZodVoid:F,ZodArray:T,get objectUtil(){return ee},ZodObject:x,ZodUnion:B,ZodDiscriminatedUnion:te,ZodIntersection:W,ZodTuple:Z,ZodRecord:q,ZodMap:re,ZodSet:R,ZodFunction:M,ZodLazy:se,ZodLiteral:ne,ZodEnum:ae,ZodNativeEnum:ie,ZodPromise:$,ZodEffects:N,ZodTransformer:N,ZodOptional:S,ZodNullable:P,ZodDefault:he,ZodNaN:oe,BRAND:Me,ZodBranded:ge,custom:xe,Schema:v,ZodSchema:v,late:Pe,get ZodFirstPartyTypeKind(){return h},any:Be,array:Ye,bigint:ze,boolean:we,date:$e,discriminatedUnion:Qe,effect:Te,enum:it,function:st,instanceof:Ve,intersection:Xe,lazy:nt,literal:at,map:tt,nan:De,nativeEnum:ot,never:qe,null:Ue,nullable:ut,number:ke,object:He,oboolean:()=>we().optional(),onumber:()=>ke().optional(),optional:dt,ostring:()=>be().optional(),preprocess:lt,promise:ct,record:et,set:rt,strictObject:Ke,string:be,transformer:Te,tuple:Fe,undefined:Le,union:Ge,unknown:We,void:Je,ZodIssueCode:c,quotelessJson:Se,ZodError:O,defaultErrorMap:U,setErrorMap:Oe,getErrorMap:J})}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6816],{30195:function(ht,Ze,Ne){Ne.d(Ze,{z:function(){return pt}});var g;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s})(g||(g={}));const d=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),E=r=>{switch(typeof r){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(r)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"object":return Array.isArray(r)?d.array:r===null?d.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?d.promise:typeof Map!="undefined"&&r instanceof Map?d.map:typeof Set!="undefined"&&r instanceof Set?d.set:typeof Date!="undefined"&&r instanceof Date?d.date:d.object;default:return d.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of"]),Se=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class O extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,le,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}O.create=r=>new O(r);const U=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===d.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,le)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be greater than ${r.inclusive?"or equal to ":""}${r.minimum}`:r.type==="date"?t=`Date must be greater than ${r.inclusive?"or equal to ":""}${new Date(r.minimum)}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be less than ${r.inclusive?"or equal to ":""}${r.maximum}`:r.type==="date"?t=`Date must be smaller than ${r.inclusive?"or equal to ":""}${new Date(r.maximum)}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let me=U;function Oe(r){me=r}function J(){return me}const Y=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};let o="";const l=s.filter(u=>!!u).slice().reverse();for(const u of l)o=u(i,{data:e,defaultError:o}).message;return{...n,path:a,message:n.message||o}},Ee=[];function p(r,e){const t=Y({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,J(),U].filter(s=>!!s)});r.common.issues.push(t)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return f;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t)s.push({key:await n.key,value:await n.value});return b.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return f;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),(typeof i.value!="undefined"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const f=Object.freeze({status:"aborted"}),Ie=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),ce=r=>r.status==="aborted",de=r=>r.status==="dirty",H=r=>r.status==="valid",ue=r=>typeof Promise!==void 0&&r instanceof Promise,le=(r,e)=>typeof e=="bigint"?e.toString():e;var _;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(_||(_={}));class w{constructor(e,t,s,n){this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._path.concat(this._key)}}const ye=(r,e)=>{if(H(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new O(r.common.issues)}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>i.code!=="invalid_type"?{message:o.defaultError}:typeof o.data=="undefined"?{message:s!=null?s:o.defaultError}:{message:t!=null?t:o.defaultError},description:n}}class v{constructor(e){this.spa=this.safeParseAsync,this.superRefine=this._refinement,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.default=this.default.bind(this),this.describe=this.describe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return E(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:E(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ue(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},a=this._parseSync({data:e,path:n.path,parent:n});return ye(n,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:E(e)},n=this._parse({data:e,path:[],parent:s}),a=await(ue(n)?n:Promise.resolve(n));return ye(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise!="undefined"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new N({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:e}})}optional(){return S.create(this)}nullable(){return P.create(this)}nullish(){return this.optional().nullable()}array(){return T.create(this)}promise(){return $.create(this)}or(e){return B.create([this,e])}and(e){return W.create(this,e)}transform(e){return new N({schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({innerType:this,defaultValue:t,typeName:h.ZodDefault})}brand(){return new ge({typeName:h.ZodBranded,type:this,...y(void 0)})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,Ce=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Ae=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;class I extends v{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,..._.errToObj(s)}),this.nonempty=e=>this.min(1,_.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._getType(e)!==d.string){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.string,received:a.parsedType}),f}const s=new b;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,message:a.message}),s.dirty());else if(a.kind==="email")Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ce.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")je.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):g.assertNever(a);return{status:s.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this.min(e,t).max(e,t)}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}I.create=r=>new I({checks:[],typeName:h.ZodString,...y(r)});function Re(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class A extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._getType(e)!==d.number){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.number,received:a.parsedType}),f}let s;const n=new b;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?Re(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,s,n){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:_.toString(n)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}}A.create=r=>new A({checks:[],typeName:h.ZodNumber,...y(r)});class K extends v{_parse(e){if(this._getType(e)!==d.bigint){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.bigint,received:s.parsedType}),f}return k(e.data)}}K.create=r=>new K({typeName:h.ZodBigInt,...y(r)});class G extends v{_parse(e){if(this._getType(e)!==d.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.boolean,received:s.parsedType}),f}return k(e.data)}}G.create=r=>new G({typeName:h.ZodBoolean,...y(r)});class V extends v{_parse(e){if(this._getType(e)!==d.date){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:d.date,received:a.parsedType}),f}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_date}),f}const s=new b;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,message:a.message,inclusive:!0,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,message:a.message,inclusive:!0,maximum:a.value,type:"date"}),s.dirty()):g.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}V.create=r=>new V({checks:[],typeName:h.ZodDate,...y(r)});class Q extends v{_parse(e){if(this._getType(e)!==d.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.undefined,received:s.parsedType}),f}return k(e.data)}}Q.create=r=>new Q({typeName:h.ZodUndefined,...y(r)});class X extends v{_parse(e){if(this._getType(e)!==d.null){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.null,received:s.parsedType}),f}return k(e.data)}}X.create=r=>new X({typeName:h.ZodNull,...y(r)});class D extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}}D.create=r=>new D({typeName:h.ZodAny,...y(r)});class j extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}j.create=r=>new j({typeName:h.ZodUnknown,...y(r)});class C extends v{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:d.never,received:t.parsedType}),f}}C.create=r=>new C({typeName:h.ZodNever,...y(r)});class F extends v{_parse(e){if(this._getType(e)!==d.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.void,received:s.parsedType}),f}return k(e.data)}}F.create=r=>new F({typeName:h.ZodVoid,...y(r)});class T extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==d.array)return p(t,{code:c.invalid_type,expected:d.array,received:t.parsedType}),f;if(n.minLength!==null&&t.data.length<n.minLength.value&&(p(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(p(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all(t.data.map((i,o)=>n.type._parseAsync(new w(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));const a=t.data.map((i,o)=>n.type._parseSync(new w(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new T({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new T({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}T.create=(r,e)=>new T({type:r,minLength:null,maxLength:null,typeName:h.ZodArray,...y(e)});var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const ve=r=>e=>new x({...r,shape:()=>({...r.shape(),...e})});function z(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=S.create(z(s))}return new x({...r._def,shape:()=>e})}else return r instanceof T?T.create(z(r.element)):r instanceof S?S.create(z(r.unwrap())):r instanceof P?P.create(z(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>z(e))):r}class x extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=ve(this._def),this.extend=ve(this._def)}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==d.object){const u=this._getOrReturnCtx(e);return p(u,{code:c.invalid_type,expected:d.object,received:u.parsedType}),f}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];for(const u in n.data)i.includes(u)||o.push(u);const l=[];for(const u of i){const m=a[u],L=n.data[u];l.push({key:{status:"valid",value:u},value:m._parse(new w(n,L,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof C){const u=this._def.unknownKeys;if(u==="passthrough")for(const m of o)l.push({key:{status:"valid",value:m},value:{status:"valid",value:n.data[m]}});else if(u==="strict")o.length>0&&(p(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const m of o){const L=n.data[m];l.push({key:{status:"valid",value:m},value:u._parse(new w(n,L,n.path,m)),alwaysSet:m in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const u=[];for(const m of l){const L=await m.key;u.push({key:L,value:await m.value,alwaysSet:m.alwaysSet})}return u}).then(u=>b.mergeObjectSync(s,u)):b.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const l=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>ee.mergeShapes(this._def.shape(),e._def.shape()),typeName:h.ZodObject})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};return g.objectKeys(e).map(s=>{this.shape[s]&&(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}omit(e){const t={};return g.objectKeys(this.shape).map(s=>{g.objectKeys(e).indexOf(s)===-1&&(t[s]=this.shape[s])}),new x({...this._def,shape:()=>t})}deepPartial(){return z(this)}partial(e){const t={};if(e)return g.objectKeys(this.shape).map(s=>{g.objectKeys(e).indexOf(s)===-1?t[s]=this.shape[s]:t[s]=this.shape[s].optional()}),new x({...this._def,shape:()=>t});for(const s in this.shape){const n=this.shape[s];t[s]=n.optional()}return new x({...this._def,shape:()=>t})}required(){const e={};for(const t in this.shape){let n=this.shape[t];for(;n instanceof S;)n=n._def.innerType;e[t]=n}return new x({...this._def,shape:()=>e})}keyof(){return _e(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:C.create(),typeName:h.ZodObject,...y(e)}),x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:C.create(),typeName:h.ZodObject,...y(e)}),x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:C.create(),typeName:h.ZodObject,...y(e)});class B extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new O(o.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:i}),f}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const l of s){const u={...t,common:{...t.common,issues:[]},parent:null},m=l._parseSync({data:t.data,path:t.path,parent:u});if(m.status==="valid")return m;m.status==="dirty"&&!a&&(a={result:m,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(l=>new O(l));return p(t,{code:c.invalid_union,unionErrors:o}),f}}get options(){return this._def.options}}B.create=(r,e)=>new B({options:r,typeName:h.ZodUnion,...y(e)});class te extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.object)return p(t,{code:c.invalid_type,expected:d.object,received:t.parsedType}),f;const s=this.discriminator,n=t.data[s],a=this.options.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:this.validDiscriminatorValues,path:[s]}),f)}get discriminator(){return this._def.discriminator}get validDiscriminatorValues(){return Array.from(this.options.keys())}get options(){return this._def.options}static create(e,t,s){const n=new Map;try{t.forEach(a=>{const i=a.shape[e].value;n.set(i,a)})}catch{throw new Error("The discriminator value could not be extracted from all the provided schemas")}if(n.size!==t.length)throw new Error("Some of the discriminator values are not unique");return new te({typeName:h.ZodDiscriminatedUnion,discriminator:e,options:n,...y(s)})}}function pe(r,e){const t=E(r),s=E(e);if(r===e)return{valid:!0,data:r};if(t===d.object&&s===d.object){const n=g.objectKeys(e),a=g.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const l=pe(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===d.array&&s===d.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],l=pe(i,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===d.date&&s===d.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class W extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(ce(a)||ce(i))return f;const o=pe(a.value,i.value);return o.valid?((de(a)||de(i))&&t.dirty(),{status:t.value,value:o.data}):(p(s,{code:c.invalid_intersection_types}),f)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}W.create=(r,e,t)=>new W({left:r,right:e,typeName:h.ZodIntersection,...y(t)});class Z extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.array)return p(s,{code:c.invalid_type,expected:d.array,received:s.parsedType}),f;if(s.data.length<this._def.items.length)return p(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,type:"array"}),f;!this._def.rest&&s.data.length>this._def.items.length&&(p(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,type:"array"}),t.dirty());const a=s.data.map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new w(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(r,e)=>new Z({items:r,typeName:h.ZodTuple,rest:null,...y(e)});class q extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.object)return p(s,{code:c.invalid_type,expected:d.object,received:s.parsedType}),f;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new w(s,o,s.path,o)),value:i._parse(new w(s,s.data[o],s.path,o))});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof v?new q({keyType:e,valueType:t,typeName:h.ZodRecord,...y(s)}):new q({keyType:I.create(),valueType:e,typeName:h.ZodRecord,...y(t)})}}class re extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.map)return p(s,{code:c.invalid_type,expected:d.map,received:s.parsedType}),f;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,l],u)=>({key:n._parse(new w(s,o,s.path,[u,"key"])),value:a._parse(new w(s,l,s.path,[u,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,m=await l.value;if(u.status==="aborted"||m.status==="aborted")return f;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const u=l.key,m=l.value;if(u.status==="aborted"||m.status==="aborted")return f;(u.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(u.value,m.value)}return{status:t.value,value:o}}}}re.create=(r,e,t)=>new re({valueType:e,keyType:r,typeName:h.ZodMap,...y(t)});class R extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==d.set)return p(s,{code:c.invalid_type,expected:d.set,received:s.parsedType}),f;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(p(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(p(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(l){const u=new Set;for(const m of l){if(m.status==="aborted")return f;m.status==="dirty"&&t.dirty(),u.add(m.value)}return{status:t.value,value:u}}const o=[...s.data.values()].map((l,u)=>a._parse(new w(s,l,s.path,u)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new R({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new R({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}R.create=(r,e)=>new R({valueType:r,minSize:null,maxSize:null,typeName:h.ZodSet,...y(e)});class M extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.function)return p(t,{code:c.invalid_type,expected:d.function,received:t.parsedType}),f;function s(o,l){return Y({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),U].filter(u=>!!u),issueData:{code:c.invalid_arguments,argumentsError:l}})}function n(o,l){return Y({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),U].filter(u=>!!u),issueData:{code:c.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;return this._def.returns instanceof $?k(async(...o)=>{const l=new O([]),u=await this._def.args.parseAsync(o,a).catch(fe=>{throw l.addIssue(s(o,fe)),l}),m=await i(...u);return await this._def.returns._def.type.parseAsync(m,a).catch(fe=>{throw l.addIssue(n(m,fe)),l})}):k((...o)=>{const l=this._def.args.safeParse(o,a);if(!l.success)throw new O([s(o,l.error)]);const u=i(...l.data),m=this._def.returns.safeParse(u,a);if(!m.success)throw new O([n(u,m.error)]);return m.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new M({...this._def,args:Z.create(e).rest(j.create())})}returns(e){return new M({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}}M.create=(r,e,t)=>new M({args:r?r.rest(j.create()):Z.create([]).rest(j.create()),returns:e||j.create(),typeName:h.ZodFunction,...y(t)});class se extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}se.create=(r,e)=>new se({getter:r,typeName:h.ZodLazy,...y(e)});class ne extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_literal,expected:this._def.value}),f}return{status:"valid",value:e.data}}get value(){return this._def.value}}ne.create=(r,e)=>new ne({value:r,typeName:h.ZodLiteral,...y(e)});function _e(r,e){return new ae({values:r,typeName:h.ZodEnum,...y(e)})}class ae extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),f}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:s}),f}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}}ae.create=_e;class ie extends v{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==d.string&&s.parsedType!==d.number){const n=g.objectValues(t);return p(s,{expected:g.joinValues(n),received:s.parsedType,code:c.invalid_type}),f}if(t.indexOf(e.data)===-1){const n=g.objectValues(t);return p(s,{received:s.data,code:c.invalid_enum_value,options:n}),f}return k(e.data)}get enum(){return this._def.values}}ie.create=(r,e)=>new ie({values:r,typeName:h.ZodNativeEnum,...y(e)});class $ extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.promise&&t.common.async===!1)return p(t,{code:c.invalid_type,expected:d.promise,received:t.parsedType}),f;const s=t.parsedType===d.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}$.create=(r,e)=>new $({type:r,typeName:h.ZodPromise,...y(e)});class N extends v{innerType(){return this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if(n.type==="preprocess"){const i=n.transform(s.data);return s.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:s.path,parent:s})):this._def.schema._parseSync({data:i,path:s.path,parent:s})}const a={addIssue:i=>{p(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="refinement"){const i=o=>{const l=n.refinement(o,a);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?f:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?f:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!H(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>H(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);g.assertNever(n)}}N.create=(r,e,t)=>new N({schema:r,typeName:h.ZodEffects,effect:e,...y(t)}),N.createWithPreprocess=(r,e,t)=>new N({schema:e,effect:{type:"preprocess",transform:r},typeName:h.ZodEffects,...y(t)});class S extends v{_parse(e){return this._getType(e)===d.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}S.create=(r,e)=>new S({innerType:r,typeName:h.ZodOptional,...y(e)});class P extends v{_parse(e){return this._getType(e)===d.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(r,e)=>new P({innerType:r,typeName:h.ZodNullable,...y(e)});class he extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===d.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(r,e)=>new S({innerType:r,typeName:h.ZodOptional,...y(e)});class oe extends v{_parse(e){if(this._getType(e)!==d.nan){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:d.nan,received:s.parsedType}),f}return{status:"valid",value:e.data}}}oe.create=r=>new oe({typeName:h.ZodNaN,...y(r)});const Me=Symbol("zod_brand");class ge extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}const xe=(r,e={},t)=>r?D.create().superRefine((s,n)=>{if(!r(s)){const a=typeof e=="function"?e(s):e,i=typeof a=="string"?{message:a}:a;n.addIssue({code:"custom",...i,fatal:t})}}):D.create(),Pe={object:x.lazycreate};var h;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded"})(h||(h={}));const Ve=(r,e={message:`Input not instance of ${r.name}`})=>xe(t=>t instanceof r,e,!0),be=I.create,ke=A.create,De=oe.create,ze=K.create,we=G.create,$e=V.create,Le=Q.create,Ue=X.create,Be=D.create,We=j.create,qe=C.create,Je=F.create,Ye=T.create,He=x.create,Ke=x.strictCreate,Ge=B.create,Qe=te.create,Xe=W.create,Fe=Z.create,et=q.create,tt=re.create,rt=R.create,st=M.create,nt=se.create,at=ne.create,it=ae.create,ot=ie.create,ct=$.create,Te=N.create,dt=S.create,ut=P.create,lt=N.createWithPreprocess;var pt=Object.freeze({__proto__:null,getParsedType:E,ZodParsedType:d,makeIssue:Y,EMPTY_PATH:Ee,addIssueToContext:p,ParseStatus:b,INVALID:f,DIRTY:Ie,OK:k,isAborted:ce,isDirty:de,isValid:H,isAsync:ue,jsonStringifyReplacer:le,ZodType:v,ZodString:I,ZodNumber:A,ZodBigInt:K,ZodBoolean:G,ZodDate:V,ZodUndefined:Q,ZodNull:X,ZodAny:D,ZodUnknown:j,ZodNever:C,ZodVoid:F,ZodArray:T,get objectUtil(){return ee},ZodObject:x,ZodUnion:B,ZodDiscriminatedUnion:te,ZodIntersection:W,ZodTuple:Z,ZodRecord:q,ZodMap:re,ZodSet:R,ZodFunction:M,ZodLazy:se,ZodLiteral:ne,ZodEnum:ae,ZodNativeEnum:ie,ZodPromise:$,ZodEffects:N,ZodTransformer:N,ZodOptional:S,ZodNullable:P,ZodDefault:he,ZodNaN:oe,BRAND:Me,ZodBranded:ge,custom:xe,Schema:v,ZodSchema:v,late:Pe,get ZodFirstPartyTypeKind(){return h},any:Be,array:Ye,bigint:ze,boolean:we,date:$e,discriminatedUnion:Qe,effect:Te,enum:it,function:st,instanceof:Ve,intersection:Xe,lazy:nt,literal:at,map:tt,nan:De,nativeEnum:ot,never:qe,null:Ue,nullable:ut,number:ke,object:He,oboolean:()=>we().optional(),onumber:()=>ke().optional(),optional:dt,ostring:()=>be().optional(),preprocess:lt,promise:ct,record:et,set:rt,strictObject:Ke,string:be,transformer:Te,tuple:Fe,undefined:Le,union:Ge,unknown:We,void:Je,ZodIssueCode:c,quotelessJson:Se,ZodError:O,defaultErrorMap:U,setErrorMap:Oe,getErrorMap:J})}}]);})();
2
2
 
3
3
  //# sourceMappingURL=module-zod.49ffd80f.js.map