2
0

210-9a6fd3e2c3481772.js 121 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{7648:function(e,t,n){n.d(t,{default:function(){return i.a}});var r=n(2972),i=n.n(r)},5449:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(8521);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6958:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(8521),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2972:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(7043),i=n(7437),o=r._(n(2265)),u=n(5246),a=n(3552),s=n(7497),l=n(3987),c=n(5449),d=n(5523),f=n(1956),p=n(6081),h=n(6958),m=n(1634),g=n(4673),y=new Set;function _(e,t,n,r,i,o){if("undefined"!=typeof window&&(o||(0,a.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let i=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(y.has(i))return;y.add(i)}(async()=>o?e.prefetch(t,i):e.prefetch(t,n,r))().catch(e=>{})}}function v(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let b=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:y,children:b,prefetch:z=null,passHref:w,replace:k,shallow:S,scroll:$,locale:O,onClick:Z,onMouseEnter:x,onTouchStart:N,legacyBehavior:I=!1,...E}=e;n=b,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let P=o.default.useContext(d.RouterContext),T=o.default.useContext(f.AppRouterContext),j=null!=P?P:T,A=!P,R=!1!==z,C=null===z?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:M,as:U}=o.default.useMemo(()=>{if(!P){let e=v(s);return{href:e,as:y?v(y):e}}let[e,t]=(0,u.resolveHref)(P,s,!0);return{href:e,as:y?(0,u.resolveHref)(P,y):t||e}},[P,s,y]),F=o.default.useRef(M),D=o.default.useRef(U);I&&(r=o.default.Children.only(n));let J=I?r&&"object"==typeof r&&r.ref:t,[L,V,W]=(0,p.useIntersection)({rootMargin:"200px"}),B=o.default.useCallback(e=>{(D.current!==U||F.current!==M)&&(W(),D.current=U,F.current=M),L(e),J&&("function"==typeof J?J(e):"object"==typeof J&&(J.current=e))},[U,J,M,W,L]);o.default.useEffect(()=>{j&&V&&R&&_(j,M,U,{locale:O},{kind:C},A)},[U,M,V,O,R,null==P?void 0:P.locale,j,A,C]);let K={ref:B,onClick(e){I||"function"!=typeof Z||Z(e),I&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),j&&!e.defaultPrevented&&function(e,t,n,r,i,u,s,l,c){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let f=()=>{let e=null==s||s;"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:u,locale:l,scroll:e}):t[i?"replace":"push"](r||n,{scroll:e})};c?o.default.startTransition(f):f()}(e,j,M,U,k,S,$,O,A)},onMouseEnter(e){I||"function"!=typeof x||x(e),I&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),j&&(R||!A)&&_(j,M,U,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:C},A)},onTouchStart:function(e){I||"function"!=typeof N||N(e),I&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),j&&(R||!A)&&_(j,M,U,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:C},A)}};if((0,l.isAbsoluteUrl)(U))K.href=U;else if(!I||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==O?O:null==P?void 0:P.locale,t=(null==P?void 0:P.isLocaleDomain)&&(0,h.getDomainLocale)(U,e,null==P?void 0:P.locales,null==P?void 0:P.domainLocales);K.href=t||(0,m.addBasePath)((0,c.addLocale)(U,e,null==P?void 0:P.defaultLocale))}return I?o.default.cloneElement(r,K):(0,i.jsx)("a",{...E,...K,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3515:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5246:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return d}});let r=n(8637),i=n(7497),o=n(7053),u=n(3987),a=n(8521),s=n(3552),l=n(6279),c=n(7205);function d(e,t,n){let d;let f="string"==typeof t?t:(0,i.formatWithValidation)(t),p=f.match(/^[a-zA-Z]{1,}:\/\//),h=p?f.slice(p[0].length):f;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,u.normalizeRepeatedSlashes)(h);f=(p?p[0]:"")+t}if(!(0,s.isLocalURL)(f))return n?[f]:f;try{d=new URL(f.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){d=new URL("/","http://n")}try{let e=new URL(f,d);e.pathname=(0,a.normalizePathTrailingSlash)(e.pathname);let t="";if((0,l.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:u,params:a}=(0,c.interpolateAs)(e.pathname,e.pathname,n);u&&(t=(0,i.formatWithValidation)({pathname:u,hash:e.hash,query:(0,o.omit)(n,a)}))}let u=e.origin===d.origin?e.href.slice(e.origin.length):e.href;return n?[u,t||u]:u}catch(e){return n?[f]:f}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6081:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return s}});let r=n(2265),i=n(3515),o="function"==typeof IntersectionObserver,u=new Map,a=[];function s(e){let{rootRef:t,rootMargin:n,disabled:s}=e,l=s||!o,[c,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{f.current=e},[]);return(0,r.useEffect)(()=>{if(o){if(l||c)return;let e=f.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:i,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=a.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=u.get(r)))return t;let i=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},a.push(n),u.set(n,t),t}(n);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),u.delete(r);let e=a.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[l,n,t,c,f.current]),[p,c,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},42:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return i}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function i(e){return n.test(e)?e.replace(r,"\\$&"):e}},5523:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(7043)._(n(2265)).default.createContext(null)},7497:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return o},formatWithValidation:function(){return a},urlObjectKeys:function(){return u}});let r=n(3099)._(n(8637)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,o=e.protocol||"",u=e.pathname||"",a=e.hash||"",s=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:n&&(l=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(l+=":"+e.port)),s&&"object"==typeof s&&(s=String(r.urlQueryToSearchParams(s)));let c=e.search||s&&"?"+s||"";return o&&!o.endsWith(":")&&(o+=":"),e.slashes||(!o||i.test(o))&&!1!==l?(l="//"+(l||""),u&&"/"!==u[0]&&(u="/"+u)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),""+o+l+(u=u.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+a}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function a(e){return o(e)}},6279:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return i.isDynamicRoute}});let r=n(4777),i=n(8104)},7205:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return o}});let r=n(4199),i=n(9964);function o(e,t,n){let o="",u=(0,i.getRouteRegex)(e),a=u.groups,s=(t!==e?(0,r.getRouteMatcher)(u)(t):"")||n;o=e;let l=Object.keys(a);return l.every(e=>{let t=s[e]||"",{repeat:n,optional:r}=a[e],i="["+(n?"...":"")+e+"]";return r&&(i=(t?"":"/")+"["+i+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in s)&&(o=o.replace(i,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:l,result:o}}},8104:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let r=n(1182),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},3552:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let r=n(3987),i=n(1283);function o(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},7053:function(e,t){function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},8637:function(e,t){function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,i]=e;Array.isArray(i)?i.forEach(e=>t.append(n,r(e))):t.set(n,r(i))}),t}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{assign:function(){return o},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return i}})},4199:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let r=n(3987);function i(e){let{re:t,groups:n}=e;return e=>{let i=t.exec(e);if(!i)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},u={};return Object.keys(n).forEach(e=>{let t=n[e],r=i[t.pos];void 0!==r&&(u[e]=~r.indexOf("/")?r.split("/").map(e=>o(e)):t.repeat?[o(r)]:o(r))}),u}}},9964:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getNamedMiddlewareRegex:function(){return f},getNamedRouteRegex:function(){return d},getRouteRegex:function(){return s},parseParameter:function(){return u}});let r=n(1182),i=n(42),o=n(6674);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function a(e){let t=(0,o.removeTrailingSlash)(e).slice(1).split("/"),n={},a=1;return{parameterizedRoute:t.map(e=>{let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&o){let{key:e,optional:r,repeat:s}=u(o[1]);return n[e]={pos:a++,repeat:s,optional:r},"/"+(0,i.escapeStringRegexp)(t)+"([^/]+?)"}if(!o)return"/"+(0,i.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:r}=u(o[1]);return n[e]={pos:a++,repeat:t,optional:r},t?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function s(e){let{parameterizedRoute:t,groups:n}=a(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function l(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:o,keyPrefix:a}=e,{key:s,optional:l,repeat:c}=u(r),d=s.replace(/\W/g,"");a&&(d=""+a+d);let f=!1;(0===d.length||d.length>30)&&(f=!0),isNaN(parseInt(d.slice(0,1)))||(f=!0),f&&(d=n()),a?o[d]=""+a+s:o[d]=s;let p=t?(0,i.escapeStringRegexp)(t):"";return c?l?"(?:/"+p+"(?<"+d+">.+?))?":"/"+p+"(?<"+d+">.+?)":"/"+p+"(?<"+d+">[^/]+?)"}function c(e,t){let n;let u=(0,o.removeTrailingSlash)(e).slice(1).split("/"),a=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),s={};return{namedParameterizedRoute:u.map(e=>{let n=r.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&o){let[n]=e.split(o[0]);return l({getSafeRouteKey:a,interceptionMarker:n,segment:o[1],routeKeys:s,keyPrefix:t?"nxtI":void 0})}return o?l({getSafeRouteKey:a,segment:o[1],routeKeys:s,keyPrefix:t?"nxtP":void 0}):"/"+(0,i.escapeStringRegexp)(e)}).join(""),routeKeys:s}}function d(e,t){let n=c(e,t);return{...s(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function f(e,t){let{parameterizedRoute:n}=a(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:i}=c(e,!1);return{namedRegex:"^"+i+(r?"(?:(/.*)?)":"")+"$"}}},4777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let n=i.slice(1,-1),u=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),u=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function o(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(u){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,n),this.optionalRestSlugName=n,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,n),this.restSlugName=n,i="[...]"}}else{if(u)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,n),this.slugName=n,i="[]"}}this.children.has(i)||this.children.set(i,new n),this.children.get(i)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return _},MissingStaticPage:function(){return y},NormalizeError:function(){return m},PageNotFoundError:function(){return g},SP:function(){return f},ST:function(){return p},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return s},getLocationOrigin:function(){return u},getURL:function(){return a},isAbsoluteUrl:function(){return o},isResSent:function(){return l},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return v}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n||(n=!0,t=e(...i)),t}}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>i.test(e);function u(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function a(){let{href:e}=window.location,t=u();return e.substring(t.length)}function s(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function l(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&l(n))return r;if(!r)throw Error('"'+s(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,p=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class _ extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},19:function(e,t,n){n.d(t,{YjB:function(){return o7},IXX:function(){return us},O72:function(){return oq},VKR:function(){return uv},KmV:function(){return uT},i0J:function(){return uR},Rxh:function(){return oD},Ryn:function(){return ud},IMB:function(){return u$},Z_8:function(){return iQ}});var r,i,o={};n.r(o),n.d(o,{base64:function(){return eZ},base64url:function(){return ex},bigint:function(){return eM},boolean:function(){return eD},browserEmail:function(){return eb},cidrv4:function(){return e$},cidrv6:function(){return eO},cuid:function(){return en},cuid2:function(){return er},date:function(){return eT},datetime:function(){return eR},domain:function(){return eI},duration:function(){return es},e164:function(){return eE},email:function(){return em},emoji:function(){return ez},extendedDuration:function(){return el},guid:function(){return ec},hex:function(){return eB},hostname:function(){return eN},html5Email:function(){return eg},idnEmail:function(){return ev},integer:function(){return eU},ipv4:function(){return ew},ipv6:function(){return ek},ksuid:function(){return eu},lowercase:function(){return eV},mac:function(){return eS},md5_base64:function(){return eG},md5_base64url:function(){return eX},md5_hex:function(){return eq},nanoid:function(){return ea},null:function(){return eJ},number:function(){return eF},rfc5322Email:function(){return ey},sha1_base64:function(){return eQ},sha1_base64url:function(){return e0},sha1_hex:function(){return eH},sha256_base64:function(){return e4},sha256_base64url:function(){return e2},sha256_hex:function(){return e1},sha384_base64:function(){return e6},sha384_base64url:function(){return e3},sha384_hex:function(){return e9},sha512_base64:function(){return e7},sha512_base64url:function(){return e8},sha512_hex:function(){return e5},string:function(){return eC},time:function(){return eA},ulid:function(){return ei},undefined:function(){return eL},unicodeEmail:function(){return e_},uppercase:function(){return eW},uuid:function(){return ed},uuid4:function(){return ef},uuid6:function(){return ep},uuid7:function(){return eh},xid:function(){return eo}});var u={};n.r(u),n.d(u,{endsWith:function(){return rj},gt:function(){return rg},gte:function(){return ry},includes:function(){return rP},length:function(){return rx},lowercase:function(){return rI},lt:function(){return rh},lte:function(){return rm},maxLength:function(){return rO},maxSize:function(){return rk},mime:function(){return rR},minLength:function(){return rZ},minSize:function(){return rS},multipleOf:function(){return rw},negative:function(){return rv},nonnegative:function(){return rz},nonpositive:function(){return rb},normalize:function(){return rM},overwrite:function(){return rC},positive:function(){return r_},property:function(){return rA},regex:function(){return rN},size:function(){return r$},slugify:function(){return rJ},startsWith:function(){return rT},toLowerCase:function(){return rF},toUpperCase:function(){return rD},trim:function(){return rU},uppercase:function(){return rE}});var a={};n.r(a),n.d(a,{ZodISODate:function(){return iI},ZodISODateTime:function(){return ix},ZodISODuration:function(){return ij},ZodISOTime:function(){return iP},date:function(){return iE},datetime:function(){return iN},duration:function(){return iA},time:function(){return iT}});var s={};function l(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:u,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=u.prototype,o=Object.keys(i);for(let e=0;e<o.length;e++){let t=o[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class o extends i{}function u(e){var t;let i=n?.Parent?new o:this;for(let n of(r(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))n();return i}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(u,"init",{value:r}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}n.r(s),n.d(s,{ZodAny:function(){return o5},ZodArray:function(){return ua},ZodBase64:function(){return oZ},ZodBase64URL:function(){return oN},ZodBigInt:function(){return oG},ZodBigIntFormat:function(){return oH},ZodBoolean:function(){return oY},ZodCIDRv4:function(){return ok},ZodCIDRv6:function(){return o$},ZodCUID:function(){return oa},ZodCUID2:function(){return ol},ZodCatch:function(){return u4},ZodCodec:function(){return u7},ZodCustom:function(){return ac},ZodCustomStringFormat:function(){return oA},ZodDate:function(){return uo},ZodDefault:function(){return uY},ZodDiscriminatedUnion:function(){return u_},ZodE164:function(){return oE},ZodEmail:function(){return i1},ZodEmoji:function(){return or},ZodEnum:function(){return uP},ZodExactOptional:function(){return uL},ZodFile:function(){return uC},ZodFunction:function(){return as},ZodGUID:function(){return i2},ZodIPv4:function(){return oy},ZodIPv6:function(){return oz},ZodIntersection:function(){return ub},ZodJWT:function(){return oT},ZodKSUID:function(){return om},ZodLazy:function(){return ai},ZodLiteral:function(){return uA},ZodMAC:function(){return ov},ZodMap:function(){return ux},ZodNaN:function(){return u9},ZodNanoID:function(){return oo},ZodNever:function(){return ut},ZodNonOptional:function(){return uH},ZodNull:function(){return o6},ZodNullable:function(){return uW},ZodNumber:function(){return oF},ZodNumberFormat:function(){return oJ},ZodObject:function(){return uc},ZodOptional:function(){return uD},ZodPipe:function(){return u3},ZodPrefault:function(){return uG},ZodPromise:function(){return au},ZodReadonly:function(){return ae},ZodRecord:function(){return uS},ZodSet:function(){return uI},ZodString:function(){return iH},ZodStringFormat:function(){return i0},ZodSuccess:function(){return u0},ZodSymbol:function(){return o1},ZodTemplateLiteral:function(){return an},ZodTransform:function(){return uU},ZodTuple:function(){return uw},ZodType:function(){return iG},ZodULID:function(){return od},ZodURL:function(){return oe},ZodUUID:function(){return i6},ZodUndefined:function(){return o2},ZodUnion:function(){return uh},ZodUnknown:function(){return o8},ZodVoid:function(){return ur},ZodXID:function(){return op},ZodXor:function(){return ug},_ZodString:function(){return iX},_default:function(){return uq},_function:function(){return al},any:function(){return o7},array:function(){return us},base64:function(){return ox},base64url:function(){return oI},bigint:function(){return oX},boolean:function(){return oq},catch:function(){return u2},check:function(){return ad},cidrv4:function(){return oS},cidrv6:function(){return oO},codec:function(){return u8},cuid:function(){return os},cuid2:function(){return oc},custom:function(){return af},date:function(){return uu},describe:function(){return am},discriminatedUnion:function(){return uv},e164:function(){return oP},email:function(){return i4},emoji:function(){return oi},enum:function(){return uT},exactOptional:function(){return uV},file:function(){return uM},float32:function(){return oV},float64:function(){return oW},function:function(){return al},guid:function(){return i9},hash:function(){return oU},hex:function(){return oM},hostname:function(){return oC},httpUrl:function(){return on},instanceof:function(){return ay},int:function(){return oL},int32:function(){return oB},int64:function(){return oQ},intersection:function(){return uz},ipv4:function(){return o_},ipv6:function(){return ow},json:function(){return av},jwt:function(){return oj},keyof:function(){return ul},ksuid:function(){return og},lazy:function(){return ao},literal:function(){return uR},looseObject:function(){return up},looseRecord:function(){return uZ},mac:function(){return ob},map:function(){return uN},meta:function(){return ag},nan:function(){return u6},nanoid:function(){return ou},nativeEnum:function(){return uj},never:function(){return un},nonoptional:function(){return uQ},null:function(){return o3},nullable:function(){return uB},nullish:function(){return uK},number:function(){return oD},object:function(){return ud},optional:function(){return uJ},partialRecord:function(){return uO},pipe:function(){return u5},prefault:function(){return uX},preprocess:function(){return ab},promise:function(){return aa},readonly:function(){return at},record:function(){return u$},refine:function(){return ap},set:function(){return uE},strictObject:function(){return uf},string:function(){return iQ},stringFormat:function(){return oR},stringbool:function(){return a_},success:function(){return u1},superRefine:function(){return ah},symbol:function(){return o4},templateLiteral:function(){return ar},transform:function(){return uF},tuple:function(){return uk},uint32:function(){return oK},uint64:function(){return o0},ulid:function(){return of},undefined:function(){return o9},union:function(){return um},unknown:function(){return ue},url:function(){return ot},uuid:function(){return i3},uuidv4:function(){return i5},uuidv6:function(){return i7},uuidv7:function(){return i8},void:function(){return ui},xid:function(){return oh},xor:function(){return uy}}),Object.freeze({status:"aborted"}),Symbol("zod_brand");class c extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class d extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let f={};function p(e){return e&&Object.assign(f,e),f}function h(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function m(e,t="|"){return e.map(e=>A(e)).join(t)}function g(e,t){return"bigint"==typeof t?t.toString():t}function y(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _(e){return null==e}function v(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let b=Symbol("evaluating");function z(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==b)return void 0===r&&(r=b,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function w(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function k(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function S(e){return JSON.stringify(e)}let $="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function O(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Z=y(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function x(e){if(!1===O(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==O(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function N(e){return x(e)?{...e}:Array.isArray(e)?[...e]:e}let I=new Set(["string","number","symbol"]),E=new Set(["string","number","bigint","boolean","symbol","undefined"]);function P(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function j(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 A(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let R={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},C={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function M(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function U(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 D(e,t,n){let r={...e,path:e.path??[]};if(!e.message){let i=F(e.inst?._zod.def?.error?.(e))??F(t?.error?.(e))??F(n.customError?.(e))??F(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function J(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function L(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function V(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let W=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,g,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},B=l("$ZodError",W),K=l("$ZodError",W,{Parent:Error}),Y=e=>(t,n,r,i)=>{let o=r?Object.assign(r,{async:!1}):{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new c;if(u.issues.length){let t=new(i?.Err??e)(u.issues.map(e=>D(e,o,p())));throw $(t,i?.callee),t}return u.value},q=Y(K),G=e=>async(t,n,r,i)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise&&(u=await u),u.issues.length){let t=new(i?.Err??e)(u.issues.map(e=>D(e,o,p())));throw $(t,i?.callee),t}return u.value},X=G(K),H=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new c;return o.issues.length?{success:!1,error:new(e??B)(o.issues.map(e=>D(e,i,p())))}:{success:!0,data:o.value}},Q=H(K),ee=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>D(e,i,p())))}:{success:!0,data:o.value}},et=ee(K),en=/^[cC][^\s-]{8,}$/,er=/^[0-9a-z]+$/,ei=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eo=/^[0-9a-vA-V]{20}$/,eu=/^[A-Za-z0-9]{27}$/,ea=/^[a-zA-Z0-9_-]{21}$/,es=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,el=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ec=/^([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})$/,ed=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)$/,ef=ed(4),ep=ed(6),eh=ed(7),em=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eg=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ey=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,e_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ev=e_,eb=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function ez(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}let ew=/^(?:(?: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])$/,ek=/^(([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}|:))$/,eS=e=>{let t=P(e??":");return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},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])$/,eO=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ex=/^[A-Za-z0-9_-]*$/,eN=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,eI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,eE=/^\+[1-9]\d{6,14}$/,eP="(?:(?:\\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])))",eT=RegExp(`^${eP}$`);function ej(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function eA(e){return RegExp(`^${ej(e)}$`)}function eR(e){let t=ej({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${eP}T(?:${r})$`)}let eC=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},eM=/^-?\d+n?$/,eU=/^-?\d+$/,eF=/^-?\d+(?:\.\d+)?$/,eD=/^(?:true|false)$/i,eJ=/^null$/i,eL=/^undefined$/i,eV=/^[^A-Z]*$/,eW=/^[^a-z]*$/,eB=/^[0-9a-fA-F]*$/;function eK(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function eY(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}let eq=/^[0-9a-fA-F]{32}$/,eG=eK(22,"=="),eX=eY(22),eH=/^[0-9a-fA-F]{40}$/,eQ=eK(27,"="),e0=eY(27),e1=/^[0-9a-fA-F]{64}$/,e4=eK(43,"="),e2=eY(43),e9=/^[0-9a-fA-F]{96}$/,e6=eK(64,""),e3=eY(64),e5=/^[0-9a-fA-F]{128}$/,e7=eK(86,"=="),e8=eY(86),te=l("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tt={number:"number",bigint:"bigint",object:"date"},tn=l("$ZodCheckLessThan",(e,t)=>{te.init(e,t);let n=tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tr=l("$ZodCheckGreaterThan",(e,t)=>{te.init(e,t);let n=tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ti=l("$ZodCheckMultipleOf",(e,t)=>{te.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),i=(r.split(".")[1]||"").length;if(0===i&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let o=n>i?n:i;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),to=l("$ZodCheckNumberFormat",(e,t)=>{te.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=R[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=o,n&&(r.pattern=eU)}),e._zod.check=u=>{let a=u.value;if(n){if(!Number.isInteger(a)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?u.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):u.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<i&&u.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),a>o&&u.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),tu=l("$ZodCheckBigIntFormat",(e,t)=>{te.init(e,t);let[n,r]=C[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),ta=l("$ZodCheckMaxSize",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:J(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ts=l("$ZodCheckMinSize",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:J(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tl=l("$ZodCheckSizeEquals",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let o=i>t.size;n.issues.push({origin:J(r),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tc=l("$ZodCheckMaxLength",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=L(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),td=l("$ZodCheckMinLength",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=L(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tf=l("$ZodCheckLengthEquals",(e,t)=>{var n;te.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!_(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let o=L(r),u=i>t.length;n.issues.push({origin:o,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tp=l("$ZodCheckStringFormat",(e,t)=>{var n,r;te.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),th=l("$ZodCheckRegex",(e,t)=>{tp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),tm=l("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eV),tp.init(e,t)}),tg=l("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eW),tp.init(e,t)}),ty=l("$ZodCheckIncludes",(e,t)=>{te.init(e,t);let n=P(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);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=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),t_=l("$ZodCheckStartsWith",(e,t)=>{te.init(e,t);let n=RegExp(`^${P(t.prefix)}.*`);t.pattern??(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=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tv=l("$ZodCheckEndsWith",(e,t)=>{te.init(e,t);let n=RegExp(`.*${P(t.suffix)}$`);t.pattern??(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=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function tb(e,t,n){e.issues.length&&t.issues.push(...U(n,e.issues))}let tz=l("$ZodCheckProperty",(e,t)=>{te.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>tb(n,e,t.property));tb(n,e,t.property)}}),tw=l("$ZodCheckMimeType",(e,t)=>{te.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),tk=l("$ZodCheckOverwrite",(e,t)=>{te.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class tS{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let t$={major:4,minor:3,patch:6},tO=l("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=t$;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,i=M(e);for(let o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,u=o._zod.check(e);if(u instanceof Promise&&n?.async===!1)throw new c;if(r||u instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await u,e.issues.length===t||i||(i=M(e,t))});else{if(e.issues.length===t)continue;i||(i=M(e,t))}}return r?r.then(()=>e):e},n=(n,i,o)=>{if(M(n))return n.aborted=!0,n;let u=t(i,r,o);if(u instanceof Promise){if(!1===o.async)throw new c;return u.then(t=>e._zod.parse(t,o))}return e._zod.parse(u,o)};e._zod.run=(i,o)=>{if(o.skipChecks)return e._zod.parse(i,o);if("backward"===o.direction){let t=e._zod.parse({value:i.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,o)):n(t,i,o)}let u=e._zod.parse(i,o);if(u instanceof Promise){if(!1===o.async)throw new c;return u.then(e=>t(e,r,o))}return t(u,r,o)}}z(e,"~standard",()=>({validate:t=>{try{let n=Q(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return et(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),tZ=l("$ZodString",(e,t)=>{tO.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??eC(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),tx=l("$ZodStringFormat",(e,t)=>{tp.init(e,t),tZ.init(e,t)}),tN=l("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ec),tx.init(e,t)}),tI=l("$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=ed(e))}else t.pattern??(t.pattern=ed());tx.init(e,t)}),tE=l("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=em),tx.init(e,t)}),tP=l("$ZodURL",(e,t)=>{tx.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),tT=l("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ez()),tx.init(e,t)}),tj=l("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ea),tx.init(e,t)}),tA=l("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=en),tx.init(e,t)}),tR=l("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=er),tx.init(e,t)}),tC=l("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ei),tx.init(e,t)}),tM=l("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eo),tx.init(e,t)}),tU=l("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=eu),tx.init(e,t)}),tF=l("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=eR(t)),tx.init(e,t)}),tD=l("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eT),tx.init(e,t)}),tJ=l("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=eA(t)),tx.init(e,t)}),tL=l("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=es),tx.init(e,t)}),tV=l("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ew),tx.init(e,t),e._zod.bag.format="ipv4"}),tW=l("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ek),tx.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),tB=l("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=eS(t.delimiter)),tx.init(e,t),e._zod.bag.format="mac"}),tK=l("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e$),tx.init(e,t)}),tY=l("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=eO),tx.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function tq(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tG=l("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eZ),tx.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tq(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tX=l("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ex),tx.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!ex.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tq(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),tH=l("$ZodE164",(e,t)=>{t.pattern??(t.pattern=eE),tx.init(e,t)}),tQ=l("$ZodJWT",(e,t)=>{tx.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),t0=l("$ZodCustomStringFormat",(e,t)=>{tx.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),t1=l("$ZodNumber",(e,t)=>{tO.init(e,t),e._zod.pattern=e._zod.bag.pattern??eF,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),t4=l("$ZodNumberFormat",(e,t)=>{to.init(e,t),t1.init(e,t)}),t2=l("$ZodBoolean",(e,t)=>{tO.init(e,t),e._zod.pattern=eD,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),t9=l("$ZodBigInt",(e,t)=>{tO.init(e,t),e._zod.pattern=eM,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),t6=l("$ZodBigIntFormat",(e,t)=>{tu.init(e,t),t9.init(e,t)}),t3=l("$ZodSymbol",(e,t)=>{tO.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return"symbol"==typeof r||t.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),t}}),t5=l("$ZodUndefined",(e,t)=>{tO.init(e,t),e._zod.pattern=eL,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{let r=t.value;return void 0===r||t.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),t}}),t7=l("$ZodNull",(e,t)=>{tO.init(e,t),e._zod.pattern=eJ,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}}),t8=l("$ZodAny",(e,t)=>{tO.init(e,t),e._zod.parse=e=>e}),ne=l("$ZodUnknown",(e,t)=>{tO.init(e,t),e._zod.parse=e=>e}),nt=l("$ZodNever",(e,t)=>{tO.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),nn=l("$ZodVoid",(e,t)=>{tO.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return void 0===r||t.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),t}}),nr=l("$ZodDate",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function ni(e,t,n){e.issues.length&&t.issues.push(...U(n,e.issues)),t.value[n]=e.value}let no=l("$ZodArray",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let o=[];for(let e=0;e<i.length;e++){let u=i[e],a=t.element._zod.run({value:u,issues:[]},r);a instanceof Promise?o.push(a.then(t=>ni(t,n,e))):ni(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function nu(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...U(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function na(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function ns(e,t,n,r,i,o){let u=[],a=i.keySet,s=i.catchall._zod,l=s.def.type,c="optional"===s.optout;for(let i in t){if(a.has(i))continue;if("never"===l){u.push(i);continue}let o=s.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>nu(e,n,i,t,c))):nu(o,n,i,t,c)}return(u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:o}),e.length)?Promise.all(e).then(()=>n):n}let nl=l("$ZodObject",(e,t)=>{let n;tO.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let i=y(()=>na(t));z(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let o=t.catchall;e._zod.parse=(t,r)=>{n??(n=i.value);let u=t.value;if(!O(u))return t.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),t;t.value={};let a=[],s=n.shape;for(let e of n.keys){let n=s[e],i="optional"===n._zod.optout,o=n._zod.run({value:u[e],issues:[]},r);o instanceof Promise?a.push(o.then(n=>nu(n,t,e,u,i))):nu(o,t,e,u,i)}return o?ns(a,u,t,r,i.value,e):a.length?Promise.all(a).then(()=>t):t}}),nc=l("$ZodObjectJIT",(e,t)=>{let n,r;nl.init(e,t);let i=e._zod.parse,o=y(()=>na(t)),u=e=>{let t=new tS(["shape","payload","ctx"]),n=o.value,r=e=>{let t=S(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),u=0;for(let e of n.keys)i[e]=`key_${u++}`;for(let o of(t.write("const newResult = {};"),n.keys)){let n=i[o],u=S(o),a=e[o],s=a?._zod?.optout==="optional";t.write(`const ${n} = ${r(o)};`),s?t.write(`
  2. if (${n}.issues.length) {
  3. if (${u} in input) {
  4. payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
  5. ...iss,
  6. path: iss.path ? [${u}, ...iss.path] : [${u}]
  7. })));
  8. }
  9. }
  10. if (${n}.value === undefined) {
  11. if (${u} in input) {
  12. newResult[${u}] = undefined;
  13. }
  14. } else {
  15. newResult[${u}] = ${n}.value;
  16. }
  17. `):t.write(`
  18. if (${n}.issues.length) {
  19. payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
  20. ...iss,
  21. path: iss.path ? [${u}, ...iss.path] : [${u}]
  22. })));
  23. }
  24. if (${n}.value === undefined) {
  25. if (${u} in input) {
  26. newResult[${u}] = undefined;
  27. }
  28. } else {
  29. newResult[${u}] = ${n}.value;
  30. }
  31. `)}t.write("payload.value = newResult;"),t.write("return payload;");let a=t.compile();return(t,n)=>a(e,t,n)},a=!f.jitless,s=a&&Z.value,l=t.catchall;e._zod.parse=(c,d)=>{r??(r=o.value);let f=c.value;return O(f)?a&&s&&d?.async===!1&&!0!==d.jitless?(n||(n=u(t.shape)),c=n(c,d),l)?ns([],f,c,d,r,e):c:i(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}});function nd(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!M(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>D(e,r,p())))}),t)}let nf=l("$ZodUnion",(e,t)=>{tO.init(e,t),z(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),z(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),z(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),z(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>v(e.source)).join("|")})$`)}});let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let u=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),u=!0;else{if(0===t.issues.length)return t;a.push(t)}}return u?Promise.all(a).then(t=>nd(t,i,e,o)):nd(a,i,e,o)}});function np(e,t,n,r){let i=e.filter(e=>0===e.issues.length);return 1===i.length?t.value=i[0].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>D(e,r,p())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t}let nh=l("$ZodXor",(e,t)=>{nf.init(e,t),t.inclusive=!1;let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let u=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);t instanceof Promise?(a.push(t),u=!0):a.push(t)}return u?Promise.all(a).then(t=>np(t,i,e,o)):np(a,i,e,o)}}),nm=l("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,nf.init(e,t);let n=e._zod.parse;z(e._zod,"propValues",()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||0===Object.keys(r).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r))for(let r of(e[t]||(e[t]=new Set),n))e[t].add(r)}return e});let r=y(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,o)=>{let u=i.value;if(!O(u))return i.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),i;let a=r.value.get(u?.[t.discriminator]);return a?a._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:u,path:[t.discriminator],inst:e}),i)}}),ng=l("$ZodIntersection",(e,t)=>{tO.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>ny(e,t,n)):ny(e,i,o)}});function ny(e,t,n){let r;let i=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))i.has(e)||i.set(e,{}),i.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);let o=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),M(e))return e;let u=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(x(t)&&x(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!u.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}let n_=l("$ZodTuple",(e,t)=>{tO.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let u=[],a=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),s=-1===a?0:n.length-a;if(!t.rest){let t=o.length>n.length,i=o.length<s-1;if(t||i)return r.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),r}let l=-1;for(let e of n){if(++l>=o.length&&l>=s)continue;let t=e._zod.run({value:o[l],issues:[]},i);t instanceof Promise?u.push(t.then(e=>nv(e,r,l))):nv(t,r,l)}if(t.rest)for(let e of o.slice(n.length)){l++;let n=t.rest._zod.run({value:e,issues:[]},i);n instanceof Promise?u.push(n.then(e=>nv(e,r,l))):nv(n,r,l)}return u.length?Promise.all(u).then(()=>r):r}});function nv(e,t,n){e.issues.length&&t.issues.push(...U(n,e.issues)),t.value[n]=e.value}let nb=l("$ZodRecord",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!x(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let o=[],u=t.keyType._zod.values;if(u){let a;n.value={};let s=new Set;for(let e of u)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);let u=t.valueType._zod.run({value:i[e],issues:[]},r);u instanceof Promise?o.push(u.then(t=>{t.issues.length&&n.issues.push(...U(e,t.issues)),n.value[e]=t.value})):(u.issues.length&&n.issues.push(...U(e,u.issues)),n.value[e]=u.value)}for(let e in i)s.has(e)||(a=a??[]).push(e);a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a})}else for(let u of(n.value={},Reflect.ownKeys(i))){if("__proto__"===u)continue;let a=t.keyType._zod.run({value:u,issues:[]},r);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof u&&eF.test(u)&&a.issues.length){let e=t.keyType._zod.run({value:Number(u),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[u]=i[u]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>D(e,r,p())),input:u,path:[u],inst:e});continue}let s=t.valueType._zod.run({value:i[u],issues:[]},r);s instanceof Promise?o.push(s.then(e=>{e.issues.length&&n.issues.push(...U(u,e.issues)),n.value[a.value]=e.value})):(s.issues.length&&n.issues.push(...U(u,s.issues)),n.value[a.value]=s.value)}return o.length?Promise.all(o).then(()=>n):n}}),nz=l("$ZodMap",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let o=[];for(let[u,a]of(n.value=new Map,i)){let s=t.keyType._zod.run({value:u,issues:[]},r),l=t.valueType._zod.run({value:a,issues:[]},r);s instanceof Promise||l instanceof Promise?o.push(Promise.all([s,l]).then(([t,o])=>{nw(t,o,n,u,i,e,r)})):nw(s,l,n,u,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function nw(e,t,n,r,i,o,u){e.issues.length&&(I.has(typeof r)?n.issues.push(...U(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(e=>D(e,u,p()))})),t.issues.length&&(I.has(typeof r)?n.issues.push(...U(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(e=>D(e,u,p()))})),n.value.set(e.value,t.value)}let nk=l("$ZodSet",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];for(let e of(n.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?o.push(i.then(e=>nS(e,n))):nS(i,n)}return o.length?Promise.all(o).then(()=>n):n}});function nS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}let n$=l("$ZodEnum",(e,t)=>{tO.init(e,t);let n=h(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>I.has(typeof e)).map(e=>"string"==typeof e?P(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),nO=l("$ZodLiteral",(e,t)=>{if(tO.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?P(e):e?P(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),nZ=l("$ZodFile",(e,t)=>{tO.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),t}}),nx=l("$ZodTransform",(e,t)=>{tO.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new d(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new c;return n.value=i,n}});function nN(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let nI=l("$ZodOptional",(e,t)=>{tO.init(e,t),e._zod.optin="optional",e._zod.optout="optional",z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),z(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${v(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>nN(t,e.value)):nN(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),nE=l("$ZodExactOptional",(e,t)=>{nI.init(e,t),z(e._zod,"values",()=>t.innerType._zod.values),z(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),nP=l("$ZodNullable",(e,t)=>{tO.init(e,t),z(e._zod,"optin",()=>t.innerType._zod.optin),z(e._zod,"optout",()=>t.innerType._zod.optout),z(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${v(e.source)}|null)$`):void 0}),z(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),nT=l("$ZodDefault",(e,t)=>{tO.init(e,t),e._zod.optin="optional",z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>nj(e,t)):nj(r,t)}});function nj(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let nA=l("$ZodPrefault",(e,t)=>{tO.init(e,t),e._zod.optin="optional",z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nR=l("$ZodNonOptional",(e,t)=>{tO.init(e,t),z(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>nC(t,e)):nC(i,e)}});function nC(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let nM=l("$ZodSuccess",(e,t)=>{tO.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new d("ZodSuccess");let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===r.issues.length,e)}}),nU=l("$ZodCatch",(e,t)=>{tO.init(e,t),z(e._zod,"optin",()=>t.innerType._zod.optin),z(e._zod,"optout",()=>t.innerType._zod.optout),z(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>D(e,n,p()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>D(e,n,p()))},input:e.value}),e.issues=[]),e)}}),nF=l("$ZodNaN",(e,t)=>{tO.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),nD=l("$ZodPipe",(e,t)=>{tO.init(e,t),z(e._zod,"values",()=>t.in._zod.values),z(e._zod,"optin",()=>t.in._zod.optin),z(e._zod,"optout",()=>t.out._zod.optout),z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>nJ(e,t.in,n)):nJ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>nJ(e,t.out,n)):nJ(r,t.out,n)}});function nJ(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let nL=l("$ZodCodec",(e,t)=>{tO.init(e,t),z(e._zod,"values",()=>t.in._zod.values),z(e._zod,"optin",()=>t.in._zod.optin),z(e._zod,"optout",()=>t.out._zod.optout),z(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>nV(e,t,n)):nV(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>nV(e,t,n)):nV(r,t,n)}}});function nV(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>nW(e,r,t.out,n)):nW(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>nW(e,r,t.in,n)):nW(e,r,t.in,n)}}function nW(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}let nB=l("$ZodReadonly",(e,t)=>{tO.init(e,t),z(e._zod,"propValues",()=>t.innerType._zod.propValues),z(e._zod,"values",()=>t.innerType._zod.values),z(e._zod,"optin",()=>t.innerType?._zod?.optin),z(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(nK):nK(r)}});function nK(e){return e.value=Object.freeze(e.value),e}let nY=l("$ZodTemplateLiteral",(e,t)=>{tO.init(e,t);let n=[];for(let e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(r,i))}else if(null===e||E.has(typeof e))n.push(P(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join("")}$`),e._zod.parse=(n,r)=>("string"!=typeof n.value?n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),n)}),nq=l("$ZodFunction",(e,t)=>(tO.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw Error("implement() must be called with a function");return function(...n){let r=Reflect.apply(t,this,e._def.input?q(e._def.input,n):n);return e._def.output?q(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw Error("implementAsync() must be called with a function");return async function(...n){let r=e._def.input?await X(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await X(e._def.output,i):i}},e._zod.parse=(t,n)=>("function"!=typeof t.value?t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}):e._def.output&&"promise"===e._def.output._zod.def.type?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t),e.input=(...t)=>new e.constructor(Array.isArray(t[0])?{type:"function",input:new n_({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}:{type:"function",input:t[0],output:e._def.output}),e.output=t=>new e.constructor({type:"function",input:e._def.input,output:t}),e)),nG=l("$ZodPromise",(e,t)=>{tO.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),nX=l("$ZodLazy",(e,t)=>{tO.init(e,t),z(e._zod,"innerType",()=>t.getter()),z(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),z(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),z(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),z(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nH=l("$ZodCustom",(e,t)=>{te.init(e,t),tO.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>nQ(t,n,r,e));nQ(i,n,r,e)}});function nQ(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(V(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class n0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.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 n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(r=globalThis).__zod_globalRegistry??(r.__zod_globalRegistry=new n0);let n1=globalThis.__zod_globalRegistry;function n4(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...j(t)})}function n2(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...j(t)})}function n9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...j(t)})}function n6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...j(t)})}function n3(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...j(t)})}function n5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...j(t)})}function n7(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...j(t)})}function n8(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...j(t)})}function re(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...j(t)})}function rt(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...j(t)})}function rn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...j(t)})}function rr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...j(t)})}function ri(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...j(t)})}function ro(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...j(t)})}function ru(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...j(t)})}function ra(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...j(t)})}function rs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...j(t)})}function rl(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...j(t)})}function rc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...j(t)})}function rd(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...j(t)})}function rf(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...j(t)})}function rp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...j(t)})}function rh(e,t){return new tn({check:"less_than",...j(t),value:e,inclusive:!1})}function rm(e,t){return new tn({check:"less_than",...j(t),value:e,inclusive:!0})}function rg(e,t){return new tr({check:"greater_than",...j(t),value:e,inclusive:!1})}function ry(e,t){return new tr({check:"greater_than",...j(t),value:e,inclusive:!0})}function r_(e){return rg(0,e)}function rv(e){return rh(0,e)}function rb(e){return rm(0,e)}function rz(e){return ry(0,e)}function rw(e,t){return new ti({check:"multiple_of",...j(t),value:e})}function rk(e,t){return new ta({check:"max_size",...j(t),maximum:e})}function rS(e,t){return new ts({check:"min_size",...j(t),minimum:e})}function r$(e,t){return new tl({check:"size_equals",...j(t),size:e})}function rO(e,t){return new tc({check:"max_length",...j(t),maximum:e})}function rZ(e,t){return new td({check:"min_length",...j(t),minimum:e})}function rx(e,t){return new tf({check:"length_equals",...j(t),length:e})}function rN(e,t){return new th({check:"string_format",format:"regex",...j(t),pattern:e})}function rI(e){return new tm({check:"string_format",format:"lowercase",...j(e)})}function rE(e){return new tg({check:"string_format",format:"uppercase",...j(e)})}function rP(e,t){return new ty({check:"string_format",format:"includes",...j(t),includes:e})}function rT(e,t){return new t_({check:"string_format",format:"starts_with",...j(t),prefix:e})}function rj(e,t){return new tv({check:"string_format",format:"ends_with",...j(t),suffix:e})}function rA(e,t,n){return new tz({check:"property",property:e,schema:t,...j(n)})}function rR(e,t){return new tw({check:"mime_type",mime:e,...j(t)})}function rC(e){return new tk({check:"overwrite",tx:e})}function rM(e){return rC(t=>t.normalize(e))}function rU(){return rC(e=>e.trim())}function rF(){return rC(e=>e.toLowerCase())}function rD(){return rC(e=>e.toUpperCase())}function rJ(){return rC(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""))}function rL(e,t,n,r={}){let i=j(r),o={...j(r),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}function rV(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??n1,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function rW(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let u={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,u);let a=e._zod.toJSONSchema?.();if(a)u.schema=a;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,r);else{let n=u.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(u.ref||(u.ref=o),rW(o,t,r),t.seen.get(o).isParent=!0)}let s=t.metadataRegistry.get(e);return s&&Object.assign(u.schema,s),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete u.schema.examples,delete u.schema.default),"input"===t.io&&u.schema._prefault&&((r=u.schema).default??(r.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function rB(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${o}`}}if(t[1]===n)return{ref:"#"};let i=`#/${r}/`,o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+o}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let o=t.schema;for(let e in o)delete o[e];o.$ref=n};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>
  32. Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){o(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused){o(n);continue}}}function rK(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},u=n.ref;if(n.ref=null,u){r(u);let n=e.seen.get(u),a=n.schema;if(a.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(a)):Object.assign(i,a),Object.assign(i,o),t._zod.parent===u)for(let e in i)"$ref"===e||"allOf"===e||e in o||delete i[e];if(a.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let a=t._zod.parent;if(a&&a!==u){r(a);let t=e.seen.get(a);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:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);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 n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:rq(t,"input",e.processors),output:rq(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let rY=(e,t={})=>n=>{let r=rV({...n,processors:t});return rW(e,r),rB(r,e),rK(r,e)},rq=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},u=rV({...i??{},target:o,io:t,processors:n});return rW(e,u),rB(u,e),rK(u,e)},rG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rX=(e,t,n,r)=>{n.type="string";let{minimum:i,maximum:o,format:u,patterns:a,contentEncoding:s}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof o&&(n.maxLength=o),u&&(n.format=rG[u]??u,""===n.format&&delete n.format,"time"===u&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},rH=(e,t,n,r)=>{let{minimum:i,maximum:o,format:u,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:l}=e._zod.bag;"string"==typeof u&&u.includes("int")?n.type="integer":n.type="number","number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),"number"==typeof i&&(n.minimum=i,"number"==typeof l&&"draft-04"!==t.target&&(l>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof s&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s),"number"==typeof o&&(n.maximum=o,"number"==typeof s&&"draft-04"!==t.target&&(s<=o?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof a&&(n.multipleOf=a)},rQ=(e,t,n,r)=>{n.type="boolean"},r0=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},r1=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},r4=(e,t,n,r)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},r2=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},r9=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},r6=(e,t,n,r)=>{n.not={}},r3=(e,t,n,r)=>{},r5=(e,t,n,r)=>{},r7=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},r8=(e,t,n,r)=>{let i=h(e._zod.def.entries);i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i},ie=(e,t,n,r)=>{let i=e._zod.def,o=[];for(let e of i.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o},it=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},ir=(e,t,n,r)=>{let i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},ii=(e,t,n,r)=>{let i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:u,mime:a}=e._zod.bag;void 0!==o&&(i.minLength=o),void 0!==u&&(i.maxLength=u),a?1===a.length?(i.contentMediaType=a[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=a.map(e=>({contentMediaType:e}))):Object.assign(n,i)},io=(e,t,n,r)=>{n.type="boolean"},iu=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},ia=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},is=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},il=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},ic=(e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},id=(e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:u}=e._zod.bag;"number"==typeof o&&(n.minItems=o),"number"==typeof u&&(n.maxItems=u),n.type="array",n.items=rW(i.element,t,{...r,path:[...r.path,"items"]})},ip=(e,t,n,r)=>{let i=e._zod.def;n.type="object",n.properties={};let o=i.shape;for(let e in o)n.properties[e]=rW(o[e],t,{...r,path:[...r.path,"properties",e]});let u=new Set([...new Set(Object.keys(o))].filter(e=>{let n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=rW(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)},ih=(e,t,n,r)=>{let i=e._zod.def,o=!1===i.inclusive,u=i.options.map((e,n)=>rW(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=u:n.anyOf=u},im=(e,t,n,r)=>{let i=e._zod.def,o=rW(i.left,t,{...r,path:[...r.path,"allOf",0]}),u=rW(i.right,t,{...r,path:[...r.path,"allOf",1]}),a=[..."allOf"in o&&1===Object.keys(o).length?o.allOf:[o],..."allOf"in u&&1===Object.keys(u).length?u.allOf:[u]];n.allOf=a},ig=(e,t,n,r)=>{let i=e._zod.def;n.type="array";let o="draft-2020-12"===t.target?"prefixItems":"items",u="draft-2020-12"===t.target?"items":"openapi-3.0"===t.target?"items":"additionalItems",a=i.items.map((e,n)=>rW(e,t,{...r,path:[...r.path,o,n]})),s=i.rest?rW(i.rest,t,{...r,path:[...r.path,u,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(n.prefixItems=a,s&&(n.items=s)):"openapi-3.0"===t.target?(n.items={anyOf:a},s&&n.items.anyOf.push(s),n.minItems=a.length,s||(n.maxItems=a.length)):(n.items=a,s&&(n.additionalItems=s));let{minimum:l,maximum:c}=e._zod.bag;"number"==typeof l&&(n.minItems=l),"number"==typeof c&&(n.maxItems=c)},iy=(e,t,n,r)=>{let i=e._zod.def;n.type="object";let o=i.keyType,u=o._zod.bag,a=u?.patterns;if("loose"===i.mode&&a&&a.size>0){let e=rW(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},a))n.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(n.propertyNames=rW(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=rW(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let s=o._zod.values;if(s){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}},i_=(e,t,n,r)=>{let i=e._zod.def,o=rW(i.innerType,t,r),u=t.seen.get(e);"openapi-3.0"===t.target?(u.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},iv=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType},ib=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},iz=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},iw=(e,t,n,r)=>{let i;let o=e._zod.def;rW(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},ik=(e,t,n,r)=>{let i=e._zod.def,o="input"===t.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;rW(o,t,r),t.seen.get(e).ref=o},iS=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},i$=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType},iO=(e,t,n,r)=>{let i=e._zod.def;rW(i.innerType,t,r),t.seen.get(e).ref=i.innerType},iZ=(e,t,n,r)=>{let i=e._zod.innerType;rW(i,t,r),t.seen.get(e).ref=i},ix=l("ZodISODateTime",(e,t)=>{tF.init(e,t),i0.init(e,t)});function iN(e){return new ix({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...j(e)})}let iI=l("ZodISODate",(e,t)=>{tD.init(e,t),i0.init(e,t)});function iE(e){return new iI({type:"string",format:"date",check:"string_format",...j(e)})}let iP=l("ZodISOTime",(e,t)=>{tJ.init(e,t),i0.init(e,t)});function iT(e){return new iP({type:"string",format:"time",check:"string_format",precision:null,...j(e)})}let ij=l("ZodISODuration",(e,t)=>{tL.init(e,t),i0.init(e,t)});function iA(e){return new ij({type:"string",format:"duration",check:"string_format",...j(e)})}let iR=(e,t)=>{B.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map(e=>r({issues:e}));else if("invalid_key"===i.code)r({issues:i.issues});else if("invalid_element"===i.code)r({issues:i.issues});else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,g,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,g,2)}},isEmpty:{get:()=>0===e.issues.length}})};l("ZodError",iR);let iC=l("ZodError",iR,{Parent:Error}),iM=Y(iC),iU=G(iC),iF=H(iC),iD=ee(iC),iJ=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Y(iC)(e,t,r)},iL=(e,t,n)=>Y(iC)(e,t,n),iV=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return G(iC)(e,t,r)},iW=async(e,t,n)=>G(iC)(e,t,n),iB=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return H(iC)(e,t,r)},iK=(e,t,n)=>H(iC)(e,t,n),iY=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ee(iC)(e,t,r)},iq=async(e,t,n)=>ee(iC)(e,t,n),iG=l("ZodType",(e,t)=>(tO.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rq(e,"input"),output:rq(e,"output")}}),e.toJSONSchema=rY(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(k(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>T(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>iM(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>iF(e,t,n),e.parseAsync=async(t,n)=>iU(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>iD(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>iJ(e,t,n),e.decode=(t,n)=>iL(e,t,n),e.encodeAsync=async(t,n)=>iV(e,t,n),e.decodeAsync=async(t,n)=>iW(e,t,n),e.safeEncode=(t,n)=>iB(e,t,n),e.safeDecode=(t,n)=>iK(e,t,n),e.safeEncodeAsync=async(t,n)=>iY(e,t,n),e.safeDecodeAsync=async(t,n)=>iq(e,t,n),e.refine=(t,n)=>e.check(ap(t,n)),e.superRefine=t=>e.check(ah(t)),e.overwrite=t=>e.check(rC(t)),e.optional=()=>uJ(e),e.exactOptional=()=>uV(e),e.nullable=()=>uB(e),e.nullish=()=>uJ(uB(e)),e.nonoptional=t=>uQ(e,t),e.array=()=>us(e),e.or=t=>um([e,t]),e.and=t=>uz(e,t),e.transform=t=>u5(e,uF(t)),e.default=t=>uq(e,t),e.prefault=t=>uX(e,t),e.catch=t=>u2(e,t),e.pipe=t=>u5(e,t),e.readonly=()=>at(e),e.describe=t=>{let n=e.clone();return n1.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>n1.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return n1.get(e);let n=e.clone();return n1.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),iX=l("_ZodString",(e,t)=>{tZ.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rX(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(rN(...t)),e.includes=(...t)=>e.check(rP(...t)),e.startsWith=(...t)=>e.check(rT(...t)),e.endsWith=(...t)=>e.check(rj(...t)),e.min=(...t)=>e.check(rZ(...t)),e.max=(...t)=>e.check(rO(...t)),e.length=(...t)=>e.check(rx(...t)),e.nonempty=(...t)=>e.check(rZ(1,...t)),e.lowercase=t=>e.check(rI(t)),e.uppercase=t=>e.check(rE(t)),e.trim=()=>e.check(rU()),e.normalize=(...t)=>e.check(rM(...t)),e.toLowerCase=()=>e.check(rF()),e.toUpperCase=()=>e.check(rD()),e.slugify=()=>e.check(rJ())}),iH=l("ZodString",(e,t)=>{tZ.init(e,t),iX.init(e,t),e.email=t=>e.check(n4(i1,t)),e.url=t=>e.check(n7(oe,t)),e.jwt=t=>e.check(rp(oT,t)),e.emoji=t=>e.check(n8(or,t)),e.guid=t=>e.check(n2(i2,t)),e.uuid=t=>e.check(n9(i6,t)),e.uuidv4=t=>e.check(n6(i6,t)),e.uuidv6=t=>e.check(n3(i6,t)),e.uuidv7=t=>e.check(n5(i6,t)),e.nanoid=t=>e.check(re(oo,t)),e.guid=t=>e.check(n2(i2,t)),e.cuid=t=>e.check(rt(oa,t)),e.cuid2=t=>e.check(rn(ol,t)),e.ulid=t=>e.check(rr(od,t)),e.base64=t=>e.check(rc(oZ,t)),e.base64url=t=>e.check(rd(oN,t)),e.xid=t=>e.check(ri(op,t)),e.ksuid=t=>e.check(ro(om,t)),e.ipv4=t=>e.check(ru(oy,t)),e.ipv6=t=>e.check(ra(oz,t)),e.cidrv4=t=>e.check(rs(ok,t)),e.cidrv6=t=>e.check(rl(o$,t)),e.e164=t=>e.check(rf(oE,t)),e.datetime=t=>e.check(iN(t)),e.date=t=>e.check(iE(t)),e.time=t=>e.check(iT(t)),e.duration=t=>e.check(iA(t))});function iQ(e){return new iH({type:"string",...j(e)})}let i0=l("ZodStringFormat",(e,t)=>{tx.init(e,t),iX.init(e,t)}),i1=l("ZodEmail",(e,t)=>{tE.init(e,t),i0.init(e,t)});function i4(e){return n4(i1,e)}let i2=l("ZodGUID",(e,t)=>{tN.init(e,t),i0.init(e,t)});function i9(e){return n2(i2,e)}let i6=l("ZodUUID",(e,t)=>{tI.init(e,t),i0.init(e,t)});function i3(e){return n9(i6,e)}function i5(e){return n6(i6,e)}function i7(e){return n3(i6,e)}function i8(e){return n5(i6,e)}let oe=l("ZodURL",(e,t)=>{tP.init(e,t),i0.init(e,t)});function ot(e){return n7(oe,e)}function on(e){return n7(oe,{protocol:/^https?$/,hostname:eI,...j(e)})}let or=l("ZodEmoji",(e,t)=>{tT.init(e,t),i0.init(e,t)});function oi(e){return n8(or,e)}let oo=l("ZodNanoID",(e,t)=>{tj.init(e,t),i0.init(e,t)});function ou(e){return re(oo,e)}let oa=l("ZodCUID",(e,t)=>{tA.init(e,t),i0.init(e,t)});function os(e){return rt(oa,e)}let ol=l("ZodCUID2",(e,t)=>{tR.init(e,t),i0.init(e,t)});function oc(e){return rn(ol,e)}let od=l("ZodULID",(e,t)=>{tC.init(e,t),i0.init(e,t)});function of(e){return rr(od,e)}let op=l("ZodXID",(e,t)=>{tM.init(e,t),i0.init(e,t)});function oh(e){return ri(op,e)}let om=l("ZodKSUID",(e,t)=>{tU.init(e,t),i0.init(e,t)});function og(e){return ro(om,e)}let oy=l("ZodIPv4",(e,t)=>{tV.init(e,t),i0.init(e,t)});function o_(e){return ru(oy,e)}let ov=l("ZodMAC",(e,t)=>{tB.init(e,t),i0.init(e,t)});function ob(e){return new ov({type:"string",format:"mac",check:"string_format",abort:!1,...j(e)})}let oz=l("ZodIPv6",(e,t)=>{tW.init(e,t),i0.init(e,t)});function ow(e){return ra(oz,e)}let ok=l("ZodCIDRv4",(e,t)=>{tK.init(e,t),i0.init(e,t)});function oS(e){return rs(ok,e)}let o$=l("ZodCIDRv6",(e,t)=>{tY.init(e,t),i0.init(e,t)});function oO(e){return rl(o$,e)}let oZ=l("ZodBase64",(e,t)=>{tG.init(e,t),i0.init(e,t)});function ox(e){return rc(oZ,e)}let oN=l("ZodBase64URL",(e,t)=>{tX.init(e,t),i0.init(e,t)});function oI(e){return rd(oN,e)}let oE=l("ZodE164",(e,t)=>{tH.init(e,t),i0.init(e,t)});function oP(e){return rf(oE,e)}let oT=l("ZodJWT",(e,t)=>{tQ.init(e,t),i0.init(e,t)});function oj(e){return rp(oT,e)}let oA=l("ZodCustomStringFormat",(e,t)=>{t0.init(e,t),i0.init(e,t)});function oR(e,t,n={}){return rL(oA,e,t,n)}function oC(e){return rL(oA,"hostname",eN,e)}function oM(e){return rL(oA,"hex",eB,e)}function oU(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,i=o[r];if(!i)throw Error(`Unrecognized hash format: ${r}`);return rL(oA,r,i,t)}let oF=l("ZodNumber",(e,t)=>{t1.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rH(e,t,n,r),e.gt=(t,n)=>e.check(rg(t,n)),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.lt=(t,n)=>e.check(rh(t,n)),e.lte=(t,n)=>e.check(rm(t,n)),e.max=(t,n)=>e.check(rm(t,n)),e.int=t=>e.check(oL(t)),e.safe=t=>e.check(oL(t)),e.positive=t=>e.check(rg(0,t)),e.nonnegative=t=>e.check(ry(0,t)),e.negative=t=>e.check(rh(0,t)),e.nonpositive=t=>e.check(rm(0,t)),e.multipleOf=(t,n)=>e.check(rw(t,n)),e.step=(t,n)=>e.check(rw(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function oD(e){return new oF({type:"number",checks:[],...j(e)})}let oJ=l("ZodNumberFormat",(e,t)=>{t4.init(e,t),oF.init(e,t)});function oL(e){return new oJ({type:"number",check:"number_format",abort:!1,format:"safeint",...j(e)})}function oV(e){return new oJ({type:"number",check:"number_format",abort:!1,format:"float32",...j(e)})}function oW(e){return new oJ({type:"number",check:"number_format",abort:!1,format:"float64",...j(e)})}function oB(e){return new oJ({type:"number",check:"number_format",abort:!1,format:"int32",...j(e)})}function oK(e){return new oJ({type:"number",check:"number_format",abort:!1,format:"uint32",...j(e)})}let oY=l("ZodBoolean",(e,t)=>{t2.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rQ(e,t,n,r)});function oq(e){return new oY({type:"boolean",...j(e)})}let oG=l("ZodBigInt",(e,t)=>{t9.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r0(e,t,n,r),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.gt=(t,n)=>e.check(rg(t,n)),e.gte=(t,n)=>e.check(ry(t,n)),e.min=(t,n)=>e.check(ry(t,n)),e.lt=(t,n)=>e.check(rh(t,n)),e.lte=(t,n)=>e.check(rm(t,n)),e.max=(t,n)=>e.check(rm(t,n)),e.positive=t=>e.check(rg(BigInt(0),t)),e.negative=t=>e.check(rh(BigInt(0),t)),e.nonpositive=t=>e.check(rm(BigInt(0),t)),e.nonnegative=t=>e.check(ry(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(rw(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function oX(e){return new oG({type:"bigint",...j(e)})}let oH=l("ZodBigIntFormat",(e,t)=>{t6.init(e,t),oG.init(e,t)});function oQ(e){return new oH({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...j(e)})}function o0(e){return new oH({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...j(e)})}let o1=l("ZodSymbol",(e,t)=>{t3.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r1(e,t,n,r)});function o4(e){return new o1({type:"symbol",...j(e)})}let o2=l("ZodUndefined",(e,t)=>{t5.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r2(e,t,n,r)});function o9(e){return new o2({type:"undefined",...j(e)})}let o6=l("ZodNull",(e,t)=>{t7.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r4(e,t,n,r)});function o3(e){return new o6({type:"null",...j(e)})}let o5=l("ZodAny",(e,t)=>{t8.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)});function o7(){return new o5({type:"any"})}let o8=l("ZodUnknown",(e,t)=>{ne.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r5(e,t,n,r)});function ue(){return new o8({type:"unknown"})}let ut=l("ZodNever",(e,t)=>{nt.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r6(e,t,n,r)});function un(e){return new ut({type:"never",...j(e)})}let ur=l("ZodVoid",(e,t)=>{nn.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r9(e,t,n,r)});function ui(e){return new ur({type:"void",...j(e)})}let uo=l("ZodDate",(e,t)=>{nr.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r7(e,t,n,r),e.min=(t,n)=>e.check(ry(t,n)),e.max=(t,n)=>e.check(rm(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function uu(e){return new uo({type:"date",...j(e)})}let ua=l("ZodArray",(e,t)=>{no.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>id(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(rZ(t,n)),e.nonempty=t=>e.check(rZ(1,t)),e.max=(t,n)=>e.check(rO(t,n)),e.length=(t,n)=>e.check(rx(t,n)),e.unwrap=()=>e.element});function us(e,t){return new ua({type:"array",element:e,...j(t)})}function ul(e){return uT(Object.keys(e._zod.def.shape))}let uc=l("ZodObject",(e,t)=>{nc.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ip(e,t,n,r),z(e,"shape",()=>t.shape),e.keyof=()=>uT(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ue()}),e.loose=()=>e.clone({...e._zod.def,catchall:ue()}),e.strict=()=>e.clone({...e._zod.def,catchall:un()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>(function(e,t){if(!x(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=k(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return w(this,"shape",n),n}});return T(e,r)})(e,t),e.safeExtend=t=>(function(e,t){if(!x(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=k(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return w(this,"shape",n),n}});return T(e,n)})(e,t),e.merge=t=>(function(e,t){let n=k(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return w(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return T(e,n)})(e,t),e.pick=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=k(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return w(this,"shape",e),e},checks:[]});return T(e,i)})(e,t),e.omit=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=k(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return w(this,"shape",r),r},checks:[]});return T(e,i)})(e,t),e.partial=(...t)=>(function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=k(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return w(this,"shape",i),i},checks:[]});return T(t,i)})(uD,e,t[0]),e.required=(...t)=>(function(e,t,n){let r=k(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)i[t]=new e({type:"nonoptional",innerType:r[t]});return w(this,"shape",i),i}});return T(t,r)})(uH,e,t[0])});function ud(e,t){return new uc({type:"object",shape:e??{},...j(t)})}function uf(e,t){return new uc({type:"object",shape:e,catchall:un(),...j(t)})}function up(e,t){return new uc({type:"object",shape:e,catchall:ue(),...j(t)})}let uh=l("ZodUnion",(e,t)=>{nf.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ih(e,t,n,r),e.options=t.options});function um(e,t){return new uh({type:"union",options:e,...j(t)})}let ug=l("ZodXor",(e,t)=>{uh.init(e,t),nh.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ih(e,t,n,r),e.options=t.options});function uy(e,t){return new ug({type:"union",options:e,inclusive:!1,...j(t)})}let u_=l("ZodDiscriminatedUnion",(e,t)=>{uh.init(e,t),nm.init(e,t)});function uv(e,t,n){return new u_({type:"union",options:t,discriminator:e,...j(n)})}let ub=l("ZodIntersection",(e,t)=>{ng.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>im(e,t,n,r)});function uz(e,t){return new ub({type:"intersection",left:e,right:t})}let uw=l("ZodTuple",(e,t)=>{n_.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ig(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function uk(e,t,n){let r=t instanceof tO,i=r?n:t;return new uw({type:"tuple",items:e,rest:r?t:null,...j(i)})}let uS=l("ZodRecord",(e,t)=>{nb.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iy(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function u$(e,t,n){return new uS({type:"record",keyType:e,valueType:t,...j(n)})}function uO(e,t,n){let r=T(e);return r._zod.values=void 0,new uS({type:"record",keyType:r,valueType:t,...j(n)})}function uZ(e,t,n){return new uS({type:"record",keyType:e,valueType:t,mode:"loose",...j(n)})}let ux=l("ZodMap",(e,t)=>{nz.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>il(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(rS(...t)),e.nonempty=t=>e.check(rS(1,t)),e.max=(...t)=>e.check(rk(...t)),e.size=(...t)=>e.check(r$(...t))});function uN(e,t,n){return new ux({type:"map",keyType:e,valueType:t,...j(n)})}let uI=l("ZodSet",(e,t)=>{nk.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ic(e,t,n,r),e.min=(...t)=>e.check(rS(...t)),e.nonempty=t=>e.check(rS(1,t)),e.max=(...t)=>e.check(rk(...t)),e.size=(...t)=>e.check(r$(...t))});function uE(e,t){return new uI({type:"set",valueType:e,...j(t)})}let uP=l("ZodEnum",(e,t)=>{n$.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r8(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new uP({...t,checks:[],...j(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new uP({...t,checks:[],...j(r),entries:i})}});function uT(e,t){return new uP({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...j(t)})}function uj(e,t){return new uP({type:"enum",entries:e,...j(t)})}let uA=l("ZodLiteral",(e,t)=>{nO.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ie(e,t,n,r),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 uR(e,t){return new uA({type:"literal",values:Array.isArray(e)?e:[e],...j(t)})}let uC=l("ZodFile",(e,t)=>{nZ.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ii(e,t,n,r),e.min=(t,n)=>e.check(rS(t,n)),e.max=(t,n)=>e.check(rk(t,n)),e.mime=(t,n)=>e.check(rR(Array.isArray(t)?t:[t],n))});function uM(e){return new uC({type:"file",...j(e)})}let uU=l("ZodTransform",(e,t)=>{nx.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new d(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(V(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(V(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function uF(e){return new uU({type:"transform",transform:e})}let uD=l("ZodOptional",(e,t)=>{nI.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uJ(e){return new uD({type:"optional",innerType:e})}let uL=l("ZodExactOptional",(e,t)=>{nE.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iO(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uV(e){return new uL({type:"optional",innerType:e})}let uW=l("ZodNullable",(e,t)=>{nP.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uB(e){return new uW({type:"nullable",innerType:e})}function uK(e){return uJ(uB(e))}let uY=l("ZodDefault",(e,t)=>{nT.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ib(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uq(e,t){return new uY({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():N(t)}})}let uG=l("ZodPrefault",(e,t)=>{nA.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iz(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uX(e,t){return new uG({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():N(t)}})}let uH=l("ZodNonOptional",(e,t)=>{nR.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uQ(e,t){return new uH({type:"nonoptional",innerType:e,...j(t)})}let u0=l("ZodSuccess",(e,t)=>{nM.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function u1(e){return new u0({type:"success",innerType:e})}let u4=l("ZodCatch",(e,t)=>{nU.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function u2(e,t){return new u4({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}let u9=l("ZodNaN",(e,t)=>{nF.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>it(e,t,n,r)});function u6(e){return new u9({type:"nan",...j(e)})}let u3=l("ZodPipe",(e,t)=>{nD.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ik(e,t,n,r),e.in=t.in,e.out=t.out});function u5(e,t){return new u3({type:"pipe",in:e,out:t})}let u7=l("ZodCodec",(e,t)=>{u3.init(e,t),nL.init(e,t)});function u8(e,t,n){return new u7({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}let ae=l("ZodReadonly",(e,t)=>{nB.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iS(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function at(e){return new ae({type:"readonly",innerType:e})}let an=l("ZodTemplateLiteral",(e,t)=>{nY.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ir(e,t,n,r)});function ar(e,t){return new an({type:"template_literal",parts:e,...j(t)})}let ai=l("ZodLazy",(e,t)=>{nX.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iZ(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function ao(e){return new ai({type:"lazy",getter:e})}let au=l("ZodPromise",(e,t)=>{nG.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function aa(e){return new au({type:"promise",innerType:e})}let as=l("ZodFunction",(e,t)=>{nq.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ia(e,t,n,r)});function al(e){return new as({type:"function",input:Array.isArray(e?.input)?uk(e?.input):e?.input??us(ue()),output:e?.output??ue()})}let ac=l("ZodCustom",(e,t)=>{nH.init(e,t),iG.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iu(e,t,n,r)});function ad(e){let t=new te({check:"custom"});return t._zod.check=e,t}function af(e,t){return function(e,t,n){let r=j(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}(ac,e??(()=>!0),t)}function ap(e,t={}){return new ac({type:"custom",check:"custom",fn:e,...j(t)})}function ah(e){return function(e){let t=function(e,t){let n=new te({check:"custom",...j(void 0)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{"string"==typeof e?n.issues.push(V(e,n.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=n.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),n.issues.push(V(e)))},e(n.value,n)));return t}(e)}let am=function(e){let t=new te({check:"describe"});return t._zod.onattach=[t=>{let n=n1.get(t)??{};n1.add(t,{...n,description:e})}],t._zod.check=()=>{},t},ag=function(e){let t=new te({check:"meta"});return t._zod.onattach=[t=>{let n=n1.get(t)??{};n1.add(t,{...n,...e})}],t._zod.check=()=>{},t};function ay(e,t={}){let n=new ac({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...j(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}let a_=(...e)=>(function(e,t){let n=j(t),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(r=r.map(e=>"string"==typeof e?e.toLowerCase():e),i=i.map(e=>"string"==typeof e?e.toLowerCase():e));let o=new Set(r),u=new Set(i),a=e.Codec??nL,s=e.Boolean??t2,l=new a({type:"pipe",in:new(e.String??tZ)({type:"string",error:n.error}),out:new s({type:"boolean",error:n.error}),transform:(e,t)=>{let r=e;return"sensitive"!==n.case&&(r=r.toLowerCase()),!!o.has(r)||!u.has(r)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...u],input:t.value,inst:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?r[0]||"true":i[0]||"false",error:n.error});return l})({Codec:u7,Boolean:oY,String:iH},...e);function av(e){let t=ao(()=>um([iQ(e),oD(),oq(),o3(),us(t),u$(iQ(),t)]));return t}function ab(e,t){return u5(uF(e),t)}i||(i={}),p({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",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let e=n[r.expected]??r.expected,t=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),i=n[t]??t;return`Invalid input: expected ${e}, received ${i}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${A(r.values[0])}`;return`Invalid option: expected one of ${m(r.values,"|")}`;case"too_big":{let t=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.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":""}: ${m(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`}}})()})}}]);