@perses-dev/table-plugin 0.14.0-beta.2 → 0.14.0-beta.3

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/__mf/js/{Table.cede74c3.js → Table.883f03c1.js} +5 -5
  2. package/__mf/js/async/{1186.76f7a9c4.js → 1186.3fefcd60.js} +1 -1
  3. package/__mf/js/async/{1522.f490bae9.js → 1522.c8ff8404.js} +5 -5
  4. package/__mf/js/async/{1616.e459f6f7.js → 1616.d4ad9369.js} +1 -1
  5. package/__mf/js/async/{2035.e9f08b1d.js → 2035.663a1725.js} +1 -1
  6. package/__mf/js/async/{2043.ddbebd72.js → 2043.ae4e8288.js} +2 -2
  7. package/__mf/js/async/{2251.2ab11c45.js → 2251.703b76a3.js} +3 -3
  8. package/__mf/js/async/{2465.b442bc56.js → 2465.c6931b55.js} +1 -1
  9. package/__mf/js/async/3473.9be85ef6.js +3 -0
  10. package/__mf/js/async/3632.d2625bb5.js +50 -0
  11. package/__mf/js/async/{392.3b464b91.js → 392.024e73d1.js} +2 -2
  12. package/__mf/js/async/{3923.7b9985ff.js → 3923.f1e47988.js} +1 -1
  13. package/__mf/js/async/{4077.dfd731dd.js → 4077.35af801d.js} +1 -1
  14. package/__mf/js/async/{4121.ed15fe74.js → 4121.3e6205ed.js} +2 -2
  15. package/__mf/js/async/{4496.487e4f10.js → 4496.8a39283e.js} +1 -1
  16. package/__mf/js/async/{5002.fc50985b.js → 5002.a5034462.js} +1 -1
  17. package/__mf/js/async/{5054.a0d861ae.js → 5054.4f6b6a33.js} +1 -1
  18. package/__mf/js/async/{5071.1e325f38.js → 5071.2b02adb9.js} +1 -1
  19. package/__mf/js/async/{5153.8a046a40.js → 5153.3b8e2090.js} +1 -1
  20. package/__mf/js/async/5587.640f7c54.js +1 -0
  21. package/__mf/js/async/{5741.ef0c5df4.js → 5741.bb4c3f82.js} +2 -2
  22. package/__mf/js/async/{6274.db89316a.js → 6274.6ad02cf0.js} +2 -2
  23. package/__mf/js/async/{7192.7e6af5a2.js → 7192.6dcfeaf1.js} +1 -1
  24. package/__mf/js/async/{7534.63c81960.js → 7534.0a3652dc.js} +1 -1
  25. package/__mf/js/async/{7862.cbf7b286.js → 7862.34ec88a2.js} +2 -2
  26. package/__mf/js/async/7968.896cda02.js +1 -0
  27. package/__mf/js/async/{7978.4553ce86.js → 7978.0d69549d.js} +1 -1
  28. package/__mf/js/async/8356.48ae65db.js +1 -0
  29. package/__mf/js/async/{8470.f35cd609.js → 8470.2e8f4245.js} +2 -2
  30. package/__mf/js/async/{873.fc45c2c6.js → 873.135cb93a.js} +1 -1
  31. package/__mf/js/async/{8985.6cc7edf9.js → 8985.aea09972.js} +1 -1
  32. package/__mf/js/async/9207.c9620800.js +1 -0
  33. package/__mf/js/async/{9235.78a103e9.js → 9235.7db37058.js} +1 -1
  34. package/__mf/js/async/{9321.ddbe25a2.js → 9321.66058a34.js} +1 -1
  35. package/__mf/js/async/{941.96941f4e.js → 941.a3308dc6.js} +2 -2
  36. package/__mf/js/async/{9588.039ce076.js → 9588.5e925b9b.js} +1 -1
  37. package/__mf/js/async/{__federation_expose_Table.e7708af8.js → __federation_expose_Table.ff543cd8.js} +1 -1
  38. package/__mf/js/async/{lib-router.e968bcc8.js → lib-router.1c17d6cf.js} +2 -2
  39. package/__mf/js/{main.7815ee7c.js → main.b5301832.js} +5 -5
  40. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
  41. package/lib/test/mock-query-results.d.ts.map +1 -1
  42. package/mf-manifest.json +50 -50
  43. package/mf-stats.json +50 -50
  44. package/package.json +6 -6
  45. package/__mf/js/async/2650.b874a7cd.js +0 -3
  46. package/__mf/js/async/5587.c9c77660.js +0 -1
  47. package/__mf/js/async/7968.f91456c8.js +0 -1
  48. package/__mf/js/async/8356.d5d8a6a3.js +0 -1
  49. package/__mf/js/async/9148.1ff77cf0.js +0 -1
  50. package/__mf/js/async/9207.ca6ac0b2.js +0 -1
  51. /package/__mf/js/async/{1522.f490bae9.js.LICENSE.txt → 1522.c8ff8404.js.LICENSE.txt} +0 -0
  52. /package/__mf/js/async/{2043.ddbebd72.js.LICENSE.txt → 2043.ae4e8288.js.LICENSE.txt} +0 -0
  53. /package/__mf/js/async/{2251.2ab11c45.js.LICENSE.txt → 2251.703b76a3.js.LICENSE.txt} +0 -0
  54. /package/__mf/js/async/{392.3b464b91.js.LICENSE.txt → 392.024e73d1.js.LICENSE.txt} +0 -0
  55. /package/__mf/js/async/{4121.ed15fe74.js.LICENSE.txt → 4121.3e6205ed.js.LICENSE.txt} +0 -0
  56. /package/__mf/js/async/{5741.ef0c5df4.js.LICENSE.txt → 5741.bb4c3f82.js.LICENSE.txt} +0 -0
  57. /package/__mf/js/async/{6274.db89316a.js.LICENSE.txt → 6274.6ad02cf0.js.LICENSE.txt} +0 -0
  58. /package/__mf/js/async/{7862.cbf7b286.js.LICENSE.txt → 7862.34ec88a2.js.LICENSE.txt} +0 -0
  59. /package/__mf/js/async/{8470.f35cd609.js.LICENSE.txt → 8470.2e8f4245.js.LICENSE.txt} +0 -0
  60. /package/__mf/js/async/{941.96941f4e.js.LICENSE.txt → 941.a3308dc6.js.LICENSE.txt} +0 -0
  61. /package/__mf/js/async/{lib-router.e968bcc8.js.LICENSE.txt → lib-router.1c17d6cf.js.LICENSE.txt} +0 -0
@@ -0,0 +1,50 @@
1
+ "use strict";(self.chunk_Table_0_14_0_beta_3=self.chunk_Table_0_14_0_beta_3||[]).push([["3632"],{45123(e,t,r){var n,i;let o,a,s,u,l,c,d,f,p,h;function m(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function y(e,t="|"){return e.map(e=>E(e)).join(t)}function g(e,t){return"bigint"==typeof t?t.toString():t}function v(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function b(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function z(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}r.d(t,{k5:()=>nL,gM:()=>nD,bz:()=>nx,g1:()=>nU,zM:()=>nO,ai:()=>nz,Ik:()=>nI,YO:()=>nT,Yj:()=>r6,eu:()=>nK,KC:()=>nF});let w="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function k(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let $=v(()=>{if(H.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function O(e){if(!1===k(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==k(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function S(e){return O(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let x=new Set(["string","number","symbol"]);function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Z(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function E(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let T={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function A(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${n}() cannot be used on object schemas containing refinements`);let o=z(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let t of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(n,t))throw Error(`Unrecognized key: "${String(t)}"`);r[t]&&(i[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t of Reflect.ownKeys(n))i[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return b(this,"shape",i),i},checks:[]});return P(t,o)}function I(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function N(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function F(e){return"string"==typeof e?e:e?.message}function J(e,t,r){var n;for(let i=t;i<e.length;i++)(n=e[i]).schema??(n.schema=r)}function D(e,t,r){let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?e.schema??(e.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,o=e.message?e.message:F(e.inst?._zod.def?.error?.(e))??F(i?.(e))??F(t?.error?.(e))??F(r.customError?.(e))??F(r.localeError?.(e))??"Invalid input",{inst:a,schema:s,continue:u,input:l,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=l),c}let R=/[\uD800-\uDBFF]/;function C(e){let t=e.length;if(!R.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(64512&e.charCodeAt(n))==55296&&(64512&e.charCodeAt(n+1))==56320&&(r--,n++);return r}function U(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function M(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function L(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}let V=!1,K={configurable:!0,get(){V=!0}};function W(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&o!==e._zod){o=void 0;return}o=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,K);let e=V;V=!1;try{let n=r(this);return V?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n}),V=V||e,n}catch(r){throw delete this[t],V=V||e,r}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}let B={value:void 0,enumerable:!1},q="captureStackTrace"in Error?Error:null;function G(e,t,r,n){function i(e){this.def=e,this.constr=l,this.traits=new Set}i.prototype={};let o=r&&new WeakSet;function a(n,a){if(!n._zod){B.value=new i(a);try{Object.defineProperty(n,"_zod",B)}finally{B.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,a),o){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;if(!o.has(a)){o.add(a);for(let e in r){let t=Object.getOwnPropertyDescriptor(r,e);t.get?Object.defineProperty(a,e,{...t,enumerable:!1}):function(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:L(this,t,r.bind(this))},set(e){L(this,t,e)}})}(a,e,t.value)}}}let s=l.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in n||(n[e]=s[e].bind(n)))}let s=n?.Parent??Object;class u extends s{}function l(e){let t=n?.Parent?function(e){let t=q;if(t){let r=t.stackTraceLimit;if("number"==typeof r){try{t.stackTraceLimit=0}catch{return q=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}(u):this;a(t,e);let r=t._zod.deferred;if(r){for(let e of r)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(u,"name",{value:e}),Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class X extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Y extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(n=globalThis).__zod_globalConfig??(n.__zod_globalConfig={});let H=globalThis.__zod_globalConfig;function Q(e){return e&&Object.assign(H,e),H}class ee extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let et="~memo",er=[];function en(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let ei=new WeakMap,eo=[],ea={alloc(e,t,r){let n=a;if(!n)return r;a=void 0;let i={value:r,issues:null};return n.set(t.value,i),eo.push(i),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var n,i;let o;if("backward"!==r.direction&&(n=r,i=e.value,void 0!==(o=n[et]?.backEdges)&&null!==i&&"object"==typeof i&&o.has(i)))throw new ee;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var t;let r,n,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,u)=>{let l;if(void 0===r&&!(r=function e(t,r){let n=ei.get(t);if(void 0!==n)return n;if(r.has(t))return!0;r.add(t);let i=!1,o=t=>{!i&&t?._zod&&e(t,r)&&(i=!0)},a=t._zod.def;switch(a.type){case"object":for(let e of Reflect.ownKeys(a.shape))o(a.shape[e]);o(a.catchall);break;case"array":o(a.element);break;case"tuple":for(let e of a.items)o(e);o(a.rest);break;case"record":case"map":o(a.keyType),o(a.valueType);break;case"set":o(a.valueType);break;case"union":for(let e of a.options)o(e);break;case"intersection":o(a.left),o(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(a.innerType);break;case"pipe":o(a.in),o(a.out);break;case"function":o(a.input),o(a.output);break;case"lazy":o(t._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)o(r);else if(Array.isArray(r))for(let e of r)o(e)}}}return r.delete(t),ei.set(t,i),i}(e,new Set)))return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,u);let c=s.value;if(null===c||"object"!=typeof c)return t(s,u);let d=u[et];if(d||(d={buckets:new Map,backEdges:void 0},u[et]=d),n===u)l=i;else{var f;let t;(t=(f=d).buckets.get(e))||(t=new Map,f.buckets.set(e,t)),l=t,n=u,i=l}let p=l.get(c);if(p)return s.value=p.value,p.issues?p.issues.length&&s.issues.push(...en(p.issues)):(s.memo=!0,d.backEdges??(d.backEdges=new Set),d.backEdges.add(p.value)),s;a=l;let h=eo.length,m=t(s,u);a=void 0;let y=eo.length>h?eo.pop():void 0;return m instanceof Promise?m.then(e=>(y&&(y.issues=e.issues.length?en(e.issues):er),e)):(y&&(y.issues=m.issues.length?en(m.issues):er),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}},es=/^[cC][0-9a-z]{6,}$/,eu=/^[0-9a-z]+$/,el=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,ec=/^[0-9a-vA-V]{20}$/,ed=/^[A-Za-z0-9]{27}$/,ef=/^[a-zA-Z0-9_-]{21}$/,ep=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eh=/^([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})$/,em=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ey=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eg=/^(?:(?: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])$/,ev=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e_=/^((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])$/,eb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ez=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ew=/^[A-Za-z0-9_-]*$/,ek=/^https?$/,e$=/^\+[1-9]\d{6,14}$/,eO="(?:(?:\\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])))",eS=RegExp(`^${eO}$`);function ex(e){let 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ej=/^-?\d+$/,eP=/^-?\d+(?:\.\d+)?$/,eZ=/^(?:true|false)$/i,eE=/^[^A-Z]*$/,eT=/^[^a-z]*$/,eA=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),eI=e=>{let t=e.value;return null!=t&&void 0!==t.length},eN={number:"number",bigint:"bigint",object:"date"},eF=G("$ZodCheckLessThan",(e,t)=>{eA.init(e,t);let r=eN[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<n&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:eN[typeof n.value]??r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eJ=G("$ZodCheckGreaterThan",(e,t)=>{eA.init(e,t);let r=eN[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>n&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:eN[typeof n.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eD=G("$ZodCheckMultipleOf",(e,t)=>{eA.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let n,i,o;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(i=Math.round(n=r.value/t.value),o=4*Number.EPSILON*Math.max(Math.abs(n),1),Math.abs(n-i)<o?0:n-i))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),eR=G("$ZodCheckNumberFormat",(e,t)=>{eA.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,o]=T[t.format];e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=o,r&&(n.pattern=ej)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}))}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),eC=G("$ZodCheckMaxLength",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=eI),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>t.maximum?C(n):i)<=t.maximum)return;let o=U(n);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),eU=G("$ZodCheckMinLength",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=eI),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value,i=n.length;if(("string"==typeof n&&i>=t.minimum&&i<2*t.minimum?C(n):i)>=t.minimum)return;let o=U(n);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),eM=G("$ZodCheckLengthEquals",(e,t)=>{var r;eA.init(e,t),(r=e._zod.def).when??(r.when=eI),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let n=r.value,i=n.length,o="string"==typeof n&&i>=t.length&&i<=2*t.length?C(n):i;if(o===t.length)return;let a=U(n),s=o>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),eL=G("$ZodCheckStringFormat",(e,t)=>{var r,n;eA.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),eV=G("$ZodCheckRegex",(e,t)=>{eL.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eK=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eE),eL.init(e,t)}),eW=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eT),eL.init(e,t)}),eB=G("$ZodCheckIncludes",(e,t)=>{eA.init(e,t);let r=j(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),eq=G("$ZodCheckStartsWith",(e,t)=>{eA.init(e,t);let r=RegExp(`^${j(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),eG=G("$ZodCheckEndsWith",(e,t)=>{eA.init(e,t);let r=RegExp(`.*${j(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),eX=G("$ZodCheckOverwrite",(e,t)=>{eA.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eY{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
2
+ ${t.join("\n")}
3
+ };`)(...Object.values(this.closed))}}let eH={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,g,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},eQ={value:void 0,enumerable:!1},e0={value:void 0,enumerable:!1},e1=new WeakSet([Object.prototype,Error.prototype]),e4=(e,t)=>{e.name="$ZodError",eQ.value=e._zod,Object.defineProperty(e,"_zod",eQ),e0.value=t,Object.defineProperty(e,"issues",e0),eQ.value=void 0,e0.value=void 0,Object.defineProperty(e,"message",eH);let r=Object.getPrototypeOf(e);e1.has(r)||(e1.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},e9=G("$ZodError",e4),e2=G("$ZodError",e4,void 0,{Parent:Error});function e6(e,t){return{callee:t?.callee??e,Err:t?.Err}}let e3=e=>{let t=(r,n,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new X;if(s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>D(e,a,Q())));throw w(r,o?.callee??t),r}return s.value};return t},e5=e=>{let t=async(r,n,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(o?.Err??e)(s.issues.map(e=>D(e,a,Q())));throw w(r,o?.callee??t),r}return s.value};return t},e8=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new X;return o.issues.length?{success:!1,error:new(e??e9)(o.issues.map(e=>D(e,i,Q())))}:{success:!0,data:o.value}},e7=e8(e2),te=e=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>D(e,i,Q())))}:{success:!0,data:o.value}},tt=te(e2),tr={major:4,minor:5,patch:4},tn=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tr;let n=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let t of i)for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,n)=>{let i;if(t.memo)return t;let o=I(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}(t)||!a._zod.def.when(t))continue}else if(o)continue;let r=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&n?.async===!1)throw new X;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==r&&(J(t.issues,r,e),o||(o=I(t,r)))});else{if(t.issues.length===r)continue;J(t.issues,r,e),o||(o=I(t,r))}}return i?i.then(()=>t):t},r=(r,n,o)=>{if(I(r))return r.aborted=!0,r;let a=t(n,i,o);if(a instanceof Promise){if(!1===o.async)throw new X;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(n,o)=>{if(o.skipChecks)return e._zod.parse(n,o);if("backward"===o.direction){let t=e._zod.parse({value:n.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,n,o)):r(t,n,o)}let a=e._zod.parse(n,o);if(a instanceof Promise){if(!1===o.async)throw new X;return a.then(e=>t(e,i,o))}return t(a,i,o)}}},{get"~standard"(){return L(this,"~standard",to(this),!1)},set"~standard"(value){L(this,"~standard",value)}}),ti=e=>e.success?{value:e.data}:{issues:e.error?.issues};function to(e){return{validate:t=>{try{return ti(e7(e,t))}catch(r){return tt(e,t).then(ti)}},vendor:"zod",version:1}}let ta=G("$ZodString",(e,t)=>{var r;let n;tn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${n}$`)),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ts=G("$ZodStringFormat",(e,t)=>{eL.init(e,t),ta.init(e,t)}),tu=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=eh),ts.init(e,t)}),tl=G("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=em(e))}else t.pattern??(t.pattern=em());ts.init(e,t)}),tc=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ey),ts.init(e,t)}),td=/[\t\n\r]/g,tf=G("$ZodURL",(e,t)=>{ts.init(e,t),e._zod.check=r=>{try{var n,i;let o=r.value.trim(),a=function(e,t){if(!t.normalize&&t.protocol?.source===ek.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}(o,t);if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});t.hostname&&((n=t.hostname).lastIndex=0,!n.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:o.replace(td,"");return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),tp=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),ts.init(e,t)}),th=G("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?ef:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),ts.init(e,t)}),tm=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=es),ts.init(e,t)}),ty=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eu),ts.init(e,t)}),tg=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=el),ts.init(e,t)}),tv=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ec),ts.init(e,t)}),t_=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ed),ts.init(e,t)}),tb=G("$ZodISODateTime",(e,t)=>{let r,n,i;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),n=`${ex({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,i=t.local?`${n}|${ex({precision:t.precision})}`:n,t.pattern=RegExp(`^${eO}T(?:${i})$`)),ts.init(e,t),(t.local||-1===t.precision)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),tz=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eS),ts.init(e,t)}),tw=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${ex(t)}$`)),ts.init(e,t)}),tk=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ep),ts.init(e,t)}),t$=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=eg),ts.init(e,t),e._zod.bag.format="ipv4"}),tO=/^[0-9a-fA-F:.]+$/;function tS(e){if(!tO.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}let tx=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ev),ts.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{tS(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),tj=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e_),ts.init(e,t)}),tP=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=eb),ts.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,n]=t;if(!n)return!1;let i=Number(n);return`${i}`===n&&!(i<0)&&!(i>128)&&tS(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function tZ(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tE=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ez),ts.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{tZ(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),tT=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ew),ts.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!ew.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tZ(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),tA=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=e$),ts.init(e,t)}),tI=G("$ZodJWT",(e,t)=>{ts.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),tN=G("$ZodNumber",(e,t)=>{tn.init(e,t),e._zod.pattern=e._zod.bag.pattern??eP,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),r}}),tF=G("$ZodNumberFormat",(e,t)=>{eR.init(e,t),tN.init(e,t)}),tJ=G("$ZodBoolean",(e,t)=>{tn.init(e,t),e._zod.pattern=eZ,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),tD=G("$ZodAny",(e,t)=>{tn.init(e,t),e._zod.parse=e=>e}),tR=G("$ZodUnknown",(e,t)=>{tn.init(e,t),e._zod.parse=e=>e}),tC=G("$ZodNever",(e,t)=>{tn.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function tU(e,t,r){e.issues.length&&t.issues.push(...N(r,e.issues)),t.value[r]=e.value}let tM=G("$ZodArray",(e,t)=>{tn.init(e,t);let r=H.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=r?r.alloc(e,n,Array(o.length),i):Array(o.length);let a=[];for(let e=0;e<o.length;e++){let r=o[e],s=t.element._zod.run({value:r,issues:[]},i);s instanceof Promise?a.push(s.then(t=>tU(t,n,e))):tU(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function tL(e,t,r,n,i,o){let a=r in n,s="optional"===o;if(a||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!a)return;t.issues.push(...N(r,e.issues))}if(!a&&void 0===i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}}let tV=[];function tK(e){var t;let r=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),i=n.length?n:tV,o=i.length?[...r,...i]:r;for(let t of o)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:o,symbolKeys:i,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function tW(e,t,r,n,i,o){let a=[],s=i.keySet,u=i.catchall._zod,l=u.def.type,c=u.optin,d=u.optout;for(let i in t){if(s.has(i))continue;if("__proto__"===i){"never"===l&&a.push(i);continue}if("never"===l){a.push(i);continue}let o=u.run({value:t[i],issues:[]},n);o instanceof Promise?e.push(o.then(e=>tL(e,r,i,t,c,d))):tL(o,r,i,t,c,d)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let tB=new WeakMap,tq=G("$ZodObject",(e,t)=>{let r;tn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){let e=t.shape;tB.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),tB.set(t,r),r}})}let i=v(()=>tK(t));W(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let n=t[e]._zod;if(n.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||b(r,e,new Set),n.values))r[e].add(t);void 0!==n.optin&&r[e].add(void 0)}}return r});let o=t.catchall,a=H.memoizer;a?.attach(e),e._zod.parse=(t,n)=>{r??(r=i.value);let s=t.value;if(!k(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value=a?a.alloc(e,t,{},n):{};let u=[],l=r.shape;for(let e of r.allKeys){if("__proto__"===e)continue;let r=l[e],i=r._zod.optin,o=r._zod.optout,a=r._zod.run({value:s[e],issues:[]},n);a instanceof Promise?u.push(a.then(r=>tL(r,t,e,s,i,o))):tL(a,t,e,s,i,o)}return o?tW(u,s,t,n,i.value,e):u.length?Promise.all(u).then(()=>t):t}}),tG=G("$ZodObjectJIT",(e,t)=>{let r,n;tq.init(e,t);let i=e._zod.parse,o=v(()=>tK(t)),a=H.memoizer,s=!H.jitless,u=s&&$.value,l=t.catchall;e._zod.parse=(c,d)=>{n??(n=o.value);let f=c.value;return k(f)?s&&u&&d?.async===!1&&!0!==d.jitless?(r||(r=(t=>{let r=o.value,n=r.symbolKeys,i=new eY(["payload","ctx"],{shape:t,inst:e,memo:a,syms:n}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,u=(e,t)=>`
4
+ for (let i = 0; i < ${e}.issues.length; i++) {
5
+ const iss = ${e}.issues[i];
6
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
7
+ payload.issues.push(iss);
8
+ }`;i.write("const input = payload.value;");let l=Object.create(null),c=0;for(let e of r.allKeys)l[e]=`key_${c++}`;for(let e of(i.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};"),r.allKeys)){if("__proto__"===e)continue;let r=l[e],o="symbol"==typeof e?`syms[${n.indexOf(e)}]`:JSON.stringify(e),a=`${o} in input`,c=t[e],d=c?._zod?.optin,f=void 0!==d,p=c?._zod?.optout==="optional";if(i.write(`const ${r} = ${s(o)};`),f&&p){let e="optional"===d?`${r}_present`:`${r}.value !== undefined || ${r}_present`;i.write(`
9
+ const ${r}_present = ${a};
10
+ if (!${r}.issues.length || ${r}_present) {
11
+ if (${r}.issues.length) {${u(r,o)}
12
+ }
13
+
14
+ if (${e}) {
15
+ newResult[${o}] = ${r}.value;
16
+ }
17
+ }
18
+
19
+ `)}else f?i.write(`
20
+ if (${r}.issues.length) {${u(r,o)}
21
+ }
22
+
23
+ if (${r}.value === undefined) {
24
+ if (${a}) {
25
+ newResult[${o}] = undefined;
26
+ }
27
+ } else {
28
+ newResult[${o}] = ${r}.value;
29
+ }
30
+
31
+ `):i.write(`
32
+ const ${r}_present = ${a};
33
+ if (${r}.issues.length) {${u(r,o)}
34
+ }
35
+ if (!${r}_present && !${r}.issues.length) {
36
+ payload.issues.push({
37
+ code: "invalid_type",
38
+ expected: "nonoptional",
39
+ input: undefined,
40
+ path: [${o}]
41
+ });
42
+ }
43
+
44
+ if (${r}_present) {
45
+ newResult[${o}] = ${r}.value;
46
+ }
47
+
48
+ `)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),c=r(c,d),l)?tW([],f,c,d,n,e):c:i(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}});function tX(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let i=e.filter(e=>!I(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>D(e,n,Q())))}),t)}let tY=G("$ZodUnion",(e,t)=>{tn.init(e,t),W(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),W(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),W(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),W(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>_(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(n,i)=>{if(r)return r(n,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>tX(t,n,e,i)):tX(a,n,e,i)}}),tH=G("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,tY.init(e,t);let r=e._zod.parse;W(e,"propValues",e=>{let t={};for(let r of e.def.options){let n=r._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);for(let[e,r]of Object.entries(n))for(let n of(Object.prototype.hasOwnProperty.call(t,e)||b(t,e,new Set),r))t[e].add(n)}return t}),t.options.forEach((e,r)=>{let n=tB.get(e._zod.def);if(n&&!Object.prototype.hasOwnProperty.call(n,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let n=v(()=>{let e=t.options,r=new Map;for(let n of e){let e=n._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,n)}}return r});e._zod.parse=(i,o)=>{let a=i.value;if(!k(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=n.value.get(a?.[t.discriminator]);return s?s._zod.run(i,o):t.unionFallback||"backward"===o.direction?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:a,path:[t.discriminator],inst:e}),i)}}),tQ=G("$ZodIntersection",(e,t)=>{tn.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),o=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,r])=>t0(e,t,r)):t0(e,i,o)}});function t0(e,t,r){let n,i=new Map,o=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),r=[t]}else n??(n=e),r=e.keys;for(let e of r)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=n?s.filter(e=>n.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...n,keys:t}),s))!t.includes(r)&&o.has(r)&&e.issues.push(o.get(r))}let u=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(O(t)&&O(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===n)continue;let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o[n]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!u.valid){if(I(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}let t1=G("$ZodRecord",(e,t)=>{tn.init(e,t);let r=H.memoizer;r?.attach(e),e._zod.parse=(n,i)=>{let o=n.value;if(!O(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let u;n.value=r?r.alloc(e,n,{},i):{};let l=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(l.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>D(e,i,Q())),input:r,path:[r],inst:e});continue}let u=s.value;if("__proto__"===u)continue;let c=t.valueType._zod.run({value:o[r],issues:[]},i);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...N(r,e.issues)),n.value[u]=e.value})):(c.issues.length&&n.issues.push(...N(r,c.issues)),n.value[u]=c.value)}for(let e in o)if(!l.has(e))if("loose"===t.mode){if("__proto__"===e)continue;n.value[e]=o[e]}else(u=u??[]).push(e);u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{let u;for(let l of(n.value=r?r.alloc(e,n,{},i):{},Reflect.ownKeys(o))){if("__proto__"===l||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let r=t.keyType._zod.run({value:l,issues:[]},i);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof l&&eP.test(l)&&r.issues.length){let e=t.keyType._zod.run({value:Number(l),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?n.value[l]=o[l]:s?(u=u??[]).push(l):n.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>D(e,i,Q())),input:l,path:[l],inst:e});continue}let c=r.value;if("__proto__"===c)continue;let d=t.valueType._zod.run({value:o[l],issues:[]},i);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&n.issues.push(...N(l,e.issues)),n.value[c]=e.value})):(d.issues.length&&n.issues.push(...N(l,d.issues)),n.value[c]=d.value)}u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),t4=G("$ZodEnum",(e,t)=>{tn.init(e,t);let r=m(t.entries),n=new Set(r);e._zod.values=n;let i=r.filter(e=>x.has(typeof e));e._zod.pattern=new RegExp(i.length?`^(${i.map(e=>j(e.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(t,i)=>{let o=t.value;return n.has(o)||t.issues.push({code:"invalid_value",values:r,input:o,inst:e}),t}}),t9=G("$ZodLiteral",(e,t)=>{tn.init(e,t);let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(t.values.length?`^(${t.values.map(e=>"string"==typeof e?j(e):e?j(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),t2=G("$ZodTransform",(e,t)=>{tn.init(e,t),e._zod.optin="optional",H.memoizer?.guard(e),e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new Y(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(r.value=e,r));if(i instanceof Promise)throw new X;return r.value=i,r}});function t6(e,t){return e.value=t.issues.length?void 0:t.value,e}let t3=G("$ZodOptional",(e,t)=>{tn.init(e,t),W(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",W(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),W(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(t=>t6(e,t)):t6(e,n)}return t.innerType._zod.run(e,r)}}),t5=G("$ZodExactOptional",(e,t)=>{t3.init(e,t),W(e,"values",e=>e.def.innerType._zod.values),W(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),t8=G("$ZodNullable",(e,t)=>{tn.init(e,t),W(e,"optin",e=>e.def.innerType._zod.optin),W(e,"optout",e=>e.def.innerType._zod.optout),W(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_(t.source)}|null)$`):void 0}),W(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),t7=G("$ZodDefault",(e,t)=>{tn.init(e,t),e._zod.optin="defaulted",W(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>re(e,t)):re(n,t)}});function re(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let rt=G("$ZodPrefault",(e,t)=>{tn.init(e,t),e._zod.optin="defaulted",W(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),rr=G("$ZodNonOptional",(e,t)=>{tn.init(e,t),W(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>rn(t,e)):rn(i,e)}});function rn(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ri(e,t,r,n){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>D(e,n,Q()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let ro=G("$ZodCatch",(e,t)=>{tn.init(e,t),W(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),W(e,"optout",e=>e.def.innerType._zod.optout),W(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run({value:e.value,issues:[]},r);return n instanceof Promise?n.then(n=>ri(e,n,t,r)):ri(e,n,t,r)}}),ra=G("$ZodPipe",(e,t)=>{tn.init(e,t),W(e,"values",e=>e.def.in._zod.values),W(e,"optin",e=>e.def.in._zod.optin),W(e,"optout",e=>e.def.out._zod.optout),W(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let n=t.out._zod.run(e,r);return n instanceof Promise?n.then(e=>rs(e,t.in,r)):rs(n,t.in,r)}let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>rs(e,t.out,r)):rs(n,t.out,r)}});function rs(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let ru=G("$ZodReadonly",(e,t)=>{tn.init(e,t),W(e,"propValues",e=>e.def.innerType._zod.propValues),W(e,"values",e=>e.def.innerType._zod.values),W(e,"optin",e=>e.def.innerType?._zod?.optin),W(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(rl):rl(n)}});function rl(e){return e.memo||(e.value=Object.freeze(e.value)),e}let rc=G("$ZodCustom",(e,t)=>{eA.init(e,t),tn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>rd(t,r,n,e));rd(i,r,n,e)}});function rd(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(M(e))}}(i=globalThis).__zod_globalRegistry??(i.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let 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){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let rf=globalThis.__zod_globalRegistry;function rp(e,t){return new eF({check:"less_than",...Z(t),value:e,inclusive:!1})}function rh(e,t){return new eF({check:"less_than",...Z(t),value:e,inclusive:!0})}function rm(e,t){return new eJ({check:"greater_than",...Z(t),value:e,inclusive:!1})}function ry(e,t){return new eJ({check:"greater_than",...Z(t),value:e,inclusive:!0})}function rg(e,t){return new eD({check:"multiple_of",...Z(t),value:e})}function rv(e,t){return new eC({check:"max_length",...Z(t),maximum:e})}function r_(e,t){return new eU({check:"min_length",...Z(t),minimum:e})}function rb(e,t){return new eM({check:"length_equals",...Z(t),length:e})}function rz(e){return new eX({check:"overwrite",tx:e})}function rw(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&b(e,t,r[t]);return e}function rk(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??rf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function r$(e,t,r,n,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:n.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(r,o),!0}function rO(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let n={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,n);else{let r=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,r,n)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),rO(o,t,n),t.seen.get(o).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&rw(a.schema,u),"input"===t.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,n);if("set"===i.type)return e(i.valueType,n);if("lazy"===i.type)return e(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,n);if("intersection"===i.type)return e(i.left,n)||e(i.right,n);if("record"===i.type||"map"===i.type)return e(i.keyType,n)||e(i.valueType,n);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,n)||e(i.out,n);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,n))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function rS(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function rx(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=n.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(r,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let n=t[1],{ref:i,defId:o}=(t=>{let n="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(r)return{ref:i(r)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${n}/${rS(o)}`}}let i=`#/${n}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+rS(o)}})(t);n.def={...n.schema},o&&(n.defId=o);let a=n.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
49
+
50
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){i(r);continue}if(e.external){let n=e.external.registry.get(r[0])?.id;if(t!==r[0]&&n){i(r);continue}}if(e.metadataRegistry.get(r[0])?.id||n.cycle||n.count>1&&"ref"===e.reused){i(r);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}let rj=new Set(["type","properties","required","additionalProperties"]),rP=["oneOf","anyOf"];function rZ(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function rE(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!rj.has(e))return null;t.push(r)}let r={},n=new Set;for(let e of t){for(let n in e.properties){if(Object.prototype.hasOwnProperty.call(r,n))continue;let e=[];for(let r of t){let t=r.properties?.[n]??rZ(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}b(r,n,1===e.length?e[0]:rE(e)??{allOf:e})}for(let t of e.required??[])n.add(t)}let i={type:"object",properties:r};if(n.size&&(i.required=[...n]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let r of t){let t=rZ(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function rT(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=t=>{let r=e.seen.get(t);if(null===r.ref)return;let i=r.def??r.schema,o={...i},a=r.ref;if(r.ref=null,a){n(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):rw(i,s),rw(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&r.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(i[e])===JSON.stringify(r.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){n(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())n(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let n=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;n.includes(e)||n.push(e)}}delete t.anyOf,t.type=1===n.length?n[0]:n}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let n=t.get(r);n?n.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of rj)if(t in e)return;let r=t.filter(e=>rP.some(t=>Array.isArray(e[t]))),n=null;if(r.length){let e=r[0],i=rP.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>rE([...o,e]));if(a.some(e=>!e))return;n={[i]:a}}else n=rE(t);n&&(delete e.allOf,rw(e,n))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(r)}rw(i,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,b(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let r=JSON.parse(JSON.stringify(i));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:rA(t,"input",e.processors),output:rA(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let rA=(e,t,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=rk({...i??{},target:o,io:t,processors:r});return rO(e,a),rx(a,e),rT(a,e)},rI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""};function rN(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?rN(t.out):"catch"===t.type?rN(t.innerType):e._zod.optin}let rF=new WeakMap,rJ=Symbol();function rD(e,t,r,n,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(r$(t,r,n,i,"BigInt defaults cannot be represented in JSON Schema"),rJ):JSON.parse(a)}let rR=(e,t,r,n)=>{let i=e._zod.def;rO(i.innerType,t,n),t.seen.get(e).ref=i.innerType},rC=new WeakSet([Object.prototype,Error.prototype]);function rU(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let rM=G("ZodError",(e,t)=>{e9.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);rC.has(r)||(rC.add(r),rU(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},n=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>n({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)n({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)n({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)r._errors.push(t(o));else{let n=r,i=0;for(;i<e.length;){let r=e[i],a=i===e.length-1;if("_errors"===r){a&&n._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(n,r)||Object.defineProperty(n,r,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=n[r];a&&s._errors.push(t(o)),n=s,i++}}}};return n(e),r})(e,t)),rU(r,"flatten",e=>t=>(function(e,t=e=>e.message){let r={},n=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(r,i)&&("__proto__"===i?Object.defineProperty(r,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):r[i]=o()),r[i]).push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}})(e,t)),rU(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,g,2)}),rU(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,g,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),rL=e3(rM),rV=e5(rM),rK=e8(rM),rW=te(rM),rB=(s=e3(rM),u=(e,t,r,n)=>s(e,t,r?{...r,direction:"backward"}:{direction:"backward"},e6(u,n))),rq=(l=e3(rM),c=(e,t,r,n)=>l(e,t,r,e6(c,n))),rG=(d=e5(rM),f=async(e,t,r,n)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return await d(e,t,i,e6(f,n))}),rX=(p=e5(rM),h=async(e,t,r,n)=>await p(e,t,r,e6(h,n))),rY=(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return e8(rM)(e,t,n)},rH=(e,t,r)=>e8(rM)(e,t,r),rQ=async(e,t,r)=>{let n=r?{...r,direction:"backward"}:{direction:"backward"};return te(rM)(e,t,n)},r0=async(e,t,r)=>te(rM)(e,t,r);function r1(){H.memoizer||Q({memoizer:ea})}let r4=G("ZodType",(e,t)=>(H.localeError||Q({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function n(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=n(r.expected),t=n(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${E(r.values[0])}`;return`Invalid option: expected one of ${y(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),tn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(z(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return P(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new n6({type:"custom",check:"custom",fn:e,...Z(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let n,i;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(M(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(M(e)))},e(t.value,t)),(i=new eA({check:"custom",...Z(t)}))._zod.check=r,n=i}(e,t))},overwrite(e){return this.check(rz(e))},optional(){return nq(this)},exactOptional(){var e;return e=this,new nG({type:"optional",innerType:e})},nullable(){return nY(this)},nullish(){return nq(nY(this))},nonoptional(e){var t;return t=this,new n0({type:"nonoptional",innerType:t,...Z(e)})},array(){return nT(this)},or(e){return nF([this,e])},and(e){var t;return t=this,new nR({type:"intersection",left:t,right:e})},transform(e){return n9(this,new nW({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new nH({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():S(r)}})},prefault(e){var t,r;return t=this,r=e,new nQ({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():S(r)}})},catch(e){return function(e,t){let r;return new n1({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return n9(this,e)},readonly(){var e;return e=this,new n2({type:"readonly",innerType:e})},describe(e){let t=this.clone();return rf.add(t,{description:e}),t},meta(...e){if(0===e.length)return rf.get(this);let t=this.clone();return rf.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return L(this,"~standard",{...to(this),jsonSchema:{input:rA(this,"input"),output:rA(this,"output")}},!1)},set"~standard"(value){L(this,"~standard",value)},parse:function e(t,r){return rL(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await rV(this,t,r,{callee:e})},safeParse(e,t){return rK(this,e,t)},async safeParseAsync(e,t){return rW(this,e,t)},get spa(){return this?.safeParseAsync},set spa(value){L(this,"spa",value)},encode:function e(t,r){return rB(this,t,r,{callee:e})},decode:function e(t,r){return rq(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await rG(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await rX(this,t,r,{callee:e})},safeEncode(e,t){return rY(this,e,t)},safeDecode(e,t){return rH(this,e,t)},async safeEncodeAsync(e,t){return rQ(this,e,t)},async safeDecodeAsync(e,t){return r0(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let n=rk({...r,processors:t});return rO(e,n),rx(n,e),rT(n,e)})(this,{})(e)},get description(){return rf.get(this)?.description},get _def(){return this._zod.def}}),r9=G("_ZodString",(e,t)=>{ta.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r)=>{r.type="string";let{minimum:n,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:u}=e._zod.bag;if("number"==typeof n&&(r.minLength=n),"number"==typeof i&&(r.maxLength=i),o&&(r.format=rI[o]??o,""===r.format&&delete r.format,("time"===o||u)&&delete r.format),s&&(r.contentEncoding=s),a&&a.size>0){let e=[...a];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,r);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null},{regex(...e){return this.check(function(e,t){return new eV({check:"string_format",format:"regex",...Z(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new eB({check:"string_format",format:"includes",...Z(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new eq({check:"string_format",format:"starts_with",...Z(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new eG({check:"string_format",format:"ends_with",...Z(t),suffix:e})}(...e))},min(...e){return this.check(r_(...e))},max(...e){return this.check(rv(...e))},length(...e){return this.check(rb(...e))},nonempty(...e){return this.check(r_(1,...e))},lowercase(e){return this.check(new eK({check:"string_format",format:"lowercase",...Z(e)}))},uppercase(e){return this.check(new eW({check:"string_format",format:"uppercase",...Z(e)}))},trim(){return this.check(rz(e=>e.trim()))},normalize(...e){return this.check(function(e){return rz(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(rz(e=>e.toLowerCase()))},toUpperCase(){return this.check(rz(e=>e.toUpperCase()))},slugify(){return this.check(rz(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}}),r2=G("ZodString",(e,t)=>{ta.init(e,t),r9.init(e,t)},{email(e){return this.check(new nt({type:"string",format:"email",check:"string_format",abort:!1,...Z(e)}))},url(e){return this.check(new ni({type:"string",format:"url",check:"string_format",abort:!1,...Z(e)}))},jwt(e){return this.check(new n_({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(e)}))},emoji(e){return this.check(new no({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(e)}))},guid(e){return this.check(new nr({type:"string",format:"guid",check:"string_format",abort:!1,...Z(e)}))},uuid(e){return this.check(new nn({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(e)}))},uuidv4(e){return this.check(new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(e)}))},uuidv6(e){return this.check(new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(e)}))},uuidv7(e){return this.check(new nn({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(e)}))},nanoid(e){return this.check(new na({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(e)}))},cuid(e){return this.check(new ns({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(e)}))},cuid2(e){return this.check(new nu({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(e)}))},ulid(e){return this.check(new nl({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(e)}))},base64(e){return this.check(new ny({type:"string",format:"base64",check:"string_format",abort:!1,...Z(e)}))},base64url(e){return this.check(new ng({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(e)}))},xid(e){return this.check(new nc({type:"string",format:"xid",check:"string_format",abort:!1,...Z(e)}))},ksuid(e){return this.check(new nd({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(e)}))},ipv4(e){return this.check(new nf({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(e)}))},ipv6(e){return this.check(new np({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(e)}))},cidrv4(e){return this.check(new nh({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(e)}))},cidrv6(e){return this.check(new nm({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(e)}))},e164(e){return this.check(new nv({type:"string",format:"e164",check:"string_format",abort:!1,...Z(e)}))},datetime(e){return this.check(new r5({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(e)}))},date(e){return this.check(new r8({type:"string",format:"date",check:"string_format",...Z(e)}))},time(e){return this.check(new r7({type:"string",format:"time",check:"string_format",precision:null,...Z(e)}))},duration(e){return this.check(new ne({type:"string",format:"duration",check:"string_format",...Z(e)}))}});function r6(e){return new r2({type:"string",...Z(e)})}let r3=G("ZodStringFormat",(e,t)=>{ts.init(e,t),r9.init(e,t)}),r5=G("ZodISODateTime",(e,t)=>{tb.init(e,t),r3.init(e,t)}),r8=G("ZodISODate",(e,t)=>{tz.init(e,t),r3.init(e,t)}),r7=G("ZodISOTime",(e,t)=>{tw.init(e,t),r3.init(e,t)}),ne=G("ZodISODuration",(e,t)=>{tk.init(e,t),r3.init(e,t)}),nt=G("ZodEmail",(e,t)=>{tc.init(e,t),r3.init(e,t)}),nr=G("ZodGUID",(e,t)=>{tu.init(e,t),r3.init(e,t)}),nn=G("ZodUUID",(e,t)=>{tl.init(e,t),r3.init(e,t)}),ni=G("ZodURL",(e,t)=>{tf.init(e,t),r3.init(e,t)}),no=G("ZodEmoji",(e,t)=>{tp.init(e,t),r3.init(e,t)}),na=G("ZodNanoID",(e,t)=>{th.init(e,t),r3.init(e,t)}),ns=G("ZodCUID",(e,t)=>{tm.init(e,t),r3.init(e,t)}),nu=G("ZodCUID2",(e,t)=>{ty.init(e,t),r3.init(e,t)}),nl=G("ZodULID",(e,t)=>{tg.init(e,t),r3.init(e,t)}),nc=G("ZodXID",(e,t)=>{tv.init(e,t),r3.init(e,t)}),nd=G("ZodKSUID",(e,t)=>{t_.init(e,t),r3.init(e,t)}),nf=G("ZodIPv4",(e,t)=>{t$.init(e,t),r3.init(e,t)}),np=G("ZodIPv6",(e,t)=>{tx.init(e,t),r3.init(e,t)}),nh=G("ZodCIDRv4",(e,t)=>{tj.init(e,t),r3.init(e,t)}),nm=G("ZodCIDRv6",(e,t)=>{tP.init(e,t),r3.init(e,t)}),ny=G("ZodBase64",(e,t)=>{tE.init(e,t),r3.init(e,t)}),ng=G("ZodBase64URL",(e,t)=>{tT.init(e,t),r3.init(e,t)}),nv=G("ZodE164",(e,t)=>{tA.init(e,t),r3.init(e,t)}),n_=G("ZodJWT",(e,t)=>{tI.init(e,t),r3.init(e,t)}),nb=G("ZodNumber",(e,t)=>{tN.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let{minimum:i,maximum:o,format:a,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";let c="number"==typeof l&&l>=(i??-1/0),d="number"==typeof u&&u<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;c?f?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof i&&(r.minimum=i),d?f?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:"number"==typeof o&&(r.maximum=o),"number"==typeof s&&(Number.isFinite(s)&&0!==s?r.multipleOf=Math.abs(s):r$(e,t,r,n,`A multipleOf divisor of ${s} cannot be represented in JSON Schema`))})(e,t,r,n);let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null},{gt(e,t){return this.check(rm(e,t))},gte(e,t){return this.check(ry(e,t))},min(e,t){return this.check(ry(e,t))},lt(e,t){return this.check(rp(e,t))},lte(e,t){return this.check(rh(e,t))},max(e,t){return this.check(rh(e,t))},int(e){return this.check(nk(e))},safe(e){return this.check(nk(e))},positive(e){return this.check(rm(0,e))},nonnegative(e){return this.check(ry(0,e))},negative(e){return this.check(rp(0,e))},nonpositive(e){return this.check(rh(0,e))},multipleOf(e,t){return this.check(rg(e,t))},step(e,t){return this.check(rg(e,t))},finite(){return this}});function nz(e){return new nb({type:"number",checks:[],...Z(e)})}let nw=G("ZodNumberFormat",(e,t)=>{tF.init(e,t),nb.init(e,t)});function nk(e){return new nw({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(e)})}let n$=G("ZodBoolean",(e,t)=>{tJ.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.type="boolean"}});function nO(e){return new n$({type:"boolean",...Z(e)})}let nS=G("ZodAny",(e,t)=>{tD.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(e,t,r)=>void 0});function nx(){return new nS({type:"any"})}let nj=G("ZodUnknown",(e,t)=>{tR.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(e,t,r)=>void 0});function nP(){return new nj({type:"unknown"})}let nZ=G("ZodNever",(e,t)=>{tC.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(e,t,r)=>{t.not={}}}),nE=G("ZodArray",(e,t)=>{r1(),tM.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;"number"==typeof o&&(r.minItems=o),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=rO(i.element,t,{...n,path:[...n.path,"items"]})})(e,t,r,n),e.element=t.element},{min(e,t){return this.check(r_(e,t))},nonempty(e){return this.check(r_(1,e))},max(e,t){return this.check(rv(e,t))},length(e,t){return this.check(rb(e,t))},unwrap(){return this.element}});function nT(e,t){return new nE({type:"array",element:e,...Z(t)})}let nA=G("ZodObject",(e,t)=>{var r;let n,i;r1(),tG.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&r$(e,t,r,n,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},o)b(r.properties,e,rO(o[e],t,{...n,path:[...n.path,"properties",e]}));let a=new Set([...new Set(Object.keys(o))].filter(e=>{let r=i.shape[e];return"input"===t.io?void 0===rN(r):void 0===r._zod.optout}));a.size>0&&(r.required=Array.from(a)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=rO(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,r,n),r="shape",(i=r in(n=Object.getPrototypeOf(e))?void 0:n)&&Object.defineProperty(i,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return nL(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:nP()})},loose(){return this.clone({...this._zod.def,catchall:nP()})},strict(){return this.clone({...this._zod.def,catchall:new nZ({type:"never",...Z(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!O(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let r=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=z(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return b(this,"shape",r),r}});return P(e,n)}(this,e)},safeExtend(e){var t=this;if(!O(e))throw Error("Invalid input to safeExtend: expected a plain object");let r=z(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return b(this,"shape",r),r}});return P(t,r)},merge(e){var t=this;if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=z(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return b(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return P(t,r)},pick(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=z(e._zod.def,{get shape(){let e={};for(let n of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,n))throw Error(`Unrecognized key: "${String(n)}"`);t[n]&&b(e,n,r.shape[n])}return b(this,"shape",e),e},checks:[]});return P(e,i)}(this,e)},omit(e){return function(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=z(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete n[e]}return b(this,"shape",n),n},checks:[]});return P(e,i)}(this,e)},partial(...e){return A(nB,this,e[0])},exactPartial(...e){return A(nG,this,e[0],"exactPartial")},required(...e){var t,r;let n;return t=this,r=e[0],n=z(t._zod.def,{get shape(){let e=t._zod.def.shape,n={...e};if(r)for(let t of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(n,t))throw Error(`Unrecognized key: "${String(t)}"`);r[t]&&(n[t]=new n0({type:"nonoptional",innerType:e[t]}))}else for(let t of Reflect.ownKeys(e))n[t]=new n0({type:"nonoptional",innerType:e[t]});return b(this,"shape",n),n}}),P(t,n)}});function nI(e,t){return new nA({type:"object",shape:e??{},...Z(t)})}let nN=G("ZodUnion",(e,t)=>{tY.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,r)=>rO(e,t,{...n,path:[...n.path,o?"oneOf":"anyOf",r]})),void(o?r.oneOf=a:r.anyOf=a)},e.options=t.options});function nF(e,t){return new nN({type:"union",options:e,...Z(t)})}let nJ=G("ZodDiscriminatedUnion",(e,t)=>{nN.init(e,t),tH.init(e,t)});function nD(e,t,r){return new nJ({type:"union",options:t,discriminator:e,...Z(r)})}let nR=G("ZodIntersection",(e,t)=>{tQ.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a,s,u;return o=rO((i=e._zod.def).left,t,{...n,path:[...n.path,"allOf",0]}),a=rO(i.right,t,{...n,path:[...n.path,"allOf",1]}),void(r.allOf=u=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(u))}}),nC=G("ZodRecord",(e,t)=>{r1(),t1.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;r.type="object";let o=i.keyType,a=o._zod.bag,s=a?.patterns;if("loose"===i.mode&&s&&s.size>0){let e=rO(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))b(r.patternProperties,t.source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=rO(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let o=rF.get(t);o||(o=[],rF.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let n of rF.get(e)??[]){let i=e.seen.get(n),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||r.has(o))continue;let a=function e(t,r,n){if(r.$ref){if(n.has(r))return r;n.add(r);let i=t.get(r)?.def;if(!i)return r;let o=e(t,i,n);return o===i?r:o}for(let i of["anyOf","oneOf"]){let o=r[i];if(!Array.isArray(o))continue;let a=o.map(r=>e(t,r,n));a.some((e,t)=>e!==o[t])&&(r={...r,[i]:a})}let i=Array.isArray(r.type)?r.type:[r.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:u,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:f,id:p,...h}=r;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?eP:ej).source)),h}(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}r.additionalProperties=rO(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let u=o._zod.values,l="input"===t.io&&void 0!==rN(i.valueType);if(u&&!i.partial&&!l){let e=[...u].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}})(e,t,r,n),e.keyType=t.keyType,e.valueType=t.valueType});function nU(e,t,r){return new nC(t&&t._zod?{type:"record",keyType:e,valueType:t,...Z(r)}:{type:"record",keyType:r6(),valueType:e,...Z(t)})}let nM=G("ZodEnum",(e,t)=>{t4.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t)=>{let r=m(e._zod.def.entries);if(0===r.length){t.not={};return}r.every(e=>"number"==typeof e)&&(t.type="number"),r.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=r})(e,r),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new nM({...t,checks:[],...Z(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new nM({...t,checks:[],...Z(n),entries:i})}});function nL(e,t){return new nM({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Z(t)})}let nV=G("ZodLiteral",(e,t)=>{t9.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(0===i.values.length){r.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(r$(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(r$(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),o.every(e=>"boolean"==typeof e)&&(r.type="boolean"),o.every(e=>null===e)&&(r.type="null"),r.enum=o})(e,t,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nK(e,t){return new nV({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}let nW=G("ZodTransform",(e,t)=>{r1(),t2.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r$(e,t,r,n,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(r,n)=>{if("backward"===n.direction)throw new Y(e.constructor.name);r.addIssue=n=>{"string"==typeof n?r.issues.push(M(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),"input"in n||(n.input=r.value),n.inst??(n.inst=e),r.issues.push(M(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}}),nB=G("ZodOptional",(e,t)=>{t3.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>rR(e,t,r,n),e.unwrap=()=>e._zod.def.innerType});function nq(e){return new nB({type:"optional",innerType:e})}let nG=G("ZodExactOptional",(e,t)=>{t5.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>rR(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),nX=G("ZodNullable",(e,t)=>{t8.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=rO((i=e._zod.def).innerType,t,n),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function nY(e){return new nX({type:"nullable",innerType:e})}let nH=G("ZodDefault",(e,t)=>{t7.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o;return rO((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,void((o=rD(i.defaultValue,e,t,r,n))!==rJ&&(r.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),nQ=G("ZodPrefault",(e,t)=>{rt.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i=e._zod.def;if(rO(i.innerType,t,n),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=rD(i.defaultValue,e,t,r,n);o!==rJ&&(r._prefault=o)})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType}),n0=G("ZodNonOptional",(e,t)=>{rr.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;rO((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),n1=G("ZodCatch",(e,t)=>{ro.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>((e,t,r,n)=>{let i,o=e._zod.def;rO(o.innerType,t,n),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{r$(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=i})(e,t,r,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),n4=G("ZodPipe",(e,t)=>{ra.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(rO(a="input"===t.io?o?i.out:i.in:i.out,t,n),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function n9(e,t){return new n4({type:"pipe",in:e,out:t})}let n2=G("ZodReadonly",(e,t)=>{ru.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{let i;rO((i=e._zod.def).innerType,t,n),t.seen.get(e).ref=i.innerType,r.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),n6=G("ZodCustom",(e,t)=>{rc.init(e,t),r4.init(e,t),e._zod.processJSONSchema=(t,r,n)=>{r$(e,t,r,n,"Custom types cannot be represented in JSON Schema")}})}}]);