@pplethai/pple-today-miniapp-sdk 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/esm.js CHANGED
@@ -1,29 +1 @@
1
- var eu=Object.defineProperty;var ue=(e,r)=>{for(var n in r)eu(e,n,{get:r[n],enumerable:!0})};var le=class extends Error{};le.prototype.name="InvalidTokenError";function tu(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function ru(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return tu(r)}catch{return atob(r)}}function Ia(e,r){if(typeof e!="string")throw new le("Invalid token specified: must be a string");r||(r={});let n=r.header===!0?0:1,o=e.split(".")[n];if(typeof o!="string")throw new le(`Invalid token specified: missing part #${n+1}`);let t;try{t=ru(o)}catch(i){throw new le(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(t)}catch(i){throw new le(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}var nu={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},G,H,$t=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))($t||{});(e=>{function r(){G=3,H=nu}e.reset=r;function n(t){if(!(0<=t&&t<=4))throw new Error("Invalid log level");G=t}e.setLevel=n;function o(t){H=t}e.setLogger=o})($t||($t={}));var P=class K{constructor(r){this._name=r}debug(...r){G>=4&&H.debug(K._format(this._name,this._method),...r)}info(...r){G>=3&&H.info(K._format(this._name,this._method),...r)}warn(...r){G>=2&&H.warn(K._format(this._name,this._method),...r)}error(...r){G>=1&&H.error(K._format(this._name,this._method),...r)}throw(r){throw this.error(r),r}create(r){let n=Object.create(this);return n._method=r,n.debug("begin"),n}static createStatic(r,n){let o=new K(`${r}.${n}`);return o.debug("begin"),o}static _format(r,n){let o=`[${r}]`;return n?`${o} ${n}:`:o}static debug(r,...n){G>=4&&H.debug(K._format(r),...n)}static info(r,...n){G>=3&&H.info(K._format(r),...n)}static warn(r,...n){G>=2&&H.warn(K._format(r),...n)}static error(r,...n){G>=1&&H.error(K._format(r),...n)}};$t.reset();var yt=class{static decode(e){try{return Ia(e)}catch(r){throw P.error("JwtUtils.decode",r),r}}static async generateSignedJwt(e,r,n){let o=R.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),t=R.encodeBase64Url(new TextEncoder().encode(JSON.stringify(r))),i=`${o}.${t}`,a=await window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},n,new TextEncoder().encode(i)),s=R.encodeBase64Url(new Uint8Array(a));return`${i}.${s}`}},iu="10000000-1000-4000-8000-100000000000",kr=e=>btoa([...new Uint8Array(e)].map(r=>String.fromCharCode(r)).join("")),Oa=class B{static _randomWord(){let r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]}static generateUUIDv4(){return iu.replace(/[018]/g,n=>(+n^B._randomWord()&15>>+n/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return B.generateUUIDv4()+B.generateUUIDv4()+B.generateUUIDv4()}static async generateCodeChallenge(r){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{let o=new TextEncoder().encode(r),t=await crypto.subtle.digest("SHA-256",o);return kr(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(n){throw P.error("CryptoUtils.generateCodeChallenge",n),n}}static generateBasicAuth(r,n){let t=new TextEncoder().encode([r,n].join(":"));return kr(t)}static async hash(r,n){let o=new TextEncoder().encode(n),t=await crypto.subtle.digest(r,o);return new Uint8Array(t)}static async customCalculateJwkThumbprint(r){let n;switch(r.kty){case"RSA":n={e:r.e,kty:r.kty,n:r.n};break;case"EC":n={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":n={crv:r.crv,kty:r.kty,x:r.x};break;case"oct":n={crv:r.k,kty:r.kty};break;default:throw new Error("Unknown jwk type")}let o=await B.hash("SHA-256",JSON.stringify(n));return B.encodeBase64Url(o)}static async generateDPoPProof({url:r,accessToken:n,httpMethod:o,keyPair:t,nonce:i}){let a,s,c={jti:window.crypto.randomUUID(),htm:o??"GET",htu:r,iat:Math.floor(Date.now()/1e3)};n&&(a=await B.hash("SHA-256",n),s=B.encodeBase64Url(a),c.ath=s),i&&(c.nonce=i);try{let l=await crypto.subtle.exportKey("jwk",t.publicKey),m={alg:"ES256",typ:"dpop+jwt",jwk:{crv:l.crv,kty:l.kty,x:l.x,y:l.y}};return await yt.generateSignedJwt(m,c,t.privateKey)}catch(l){throw l instanceof TypeError?new Error(`Error exporting dpop public key: ${l.message}`):l}}static async generateDPoPJkt(r){try{let n=await crypto.subtle.exportKey("jwk",r.publicKey);return await B.customCalculateJwkThumbprint(n)}catch(n){throw n instanceof TypeError?new Error(`Could not retrieve dpop keys from storage: ${n.message}`):n}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])}};Oa.encodeBase64Url=e=>kr(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var R=Oa,ae=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new P(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let r=this._callbacks.lastIndexOf(e);r>=0&&this._callbacks.splice(r,1)}async raise(...e){this._logger.debug("raise:",...e);for(let r of this._callbacks)await r(...e)}},za=class{static center({...e}){var r,n,o;return e.width==null&&(e.width=(r=[800,720,600,480].find(t=>t<=window.outerWidth/1.618))!=null?r:360),(n=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((o=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,r])=>r!=null).map(([r,n])=>`${r}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},Q=class _t extends ae{constructor(){super(...arguments),this._logger=new P(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let r=this._expiration-_t.getEpochTime();this._logger.debug("timer completes in",r),this._expiration<=_t.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(r){let n=this._logger.create("init");r=Math.max(Math.floor(r),1);let o=_t.getEpochTime()+r;if(this.expiration===o&&this._timerHandle){n.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),n.debug("using duration",r),this._expiration=o;let t=Math.min(r,5);this._timerHandle=setInterval(this._callback,t*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},Sr=class{static readParams(e,r="query"){if(!e)throw new TypeError("Invalid URL");let o=new URL(e,"http://127.0.0.1")[r==="fragment"?"hash":"search"];return new URLSearchParams(o.slice(1))}},be=";",de=class extends Error{constructor(e,r){var n,o,t;if(super(e.error_description||e.error||""),this.form=r,this.name="ErrorResponse",!e.error)throw P.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(o=e.error_uri)!=null?o:null,this.state=e.userState,this.session_state=(t=e.session_state)!=null?t:null,this.url_state=e.url_state}},Ur=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},ou=class{constructor(e){this._logger=new P("AccessTokenEvents"),this._expiringTimer=new Q("Access token expiring"),this._expiredTimer=new Q("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){let r=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){let n=e.expires_in;if(r.debug("access token present, remaining duration:",n),n>0){let t=n-this._expiringNotificationTimeInSeconds;t<=0&&(t=1),r.debug("registering expiring timer, raising in",t,"seconds"),this._expiringTimer.init(t)}else r.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();let o=n+1;r.debug("registering expired timer, raising in",o,"seconds"),this._expiredTimer.init(o)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},au=class{constructor(e,r,n,o,t){this._callback=e,this._client_id=r,this._intervalInSeconds=o,this._stopOnError=t,this._logger=new P("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=a=>{a.origin===this._frame_origin&&a.source===this._frame.contentWindow&&(a.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):a.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(a.data+" message from check session op iframe"))};let i=new URL(n);this._frame_origin=i.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=i.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;let r=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};r(),this._timer=setInterval(r,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},Na=class{constructor(){this._logger=new P("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,r){this._logger.create(`setItem('${e}')`),this._data[e]=r}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Ir=class extends Error{constructor(e,r){super(r),this.name="ErrorDPoPNonce",this.nonce=e}},Or=class{constructor(e=[],r=null,n={}){this._jwtHandler=r,this._extraHeaders=n,this._logger=new P("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),r&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,r={}){let{timeoutInSeconds:n,...o}=r;if(!n)return await fetch(e,o);let t=new AbortController,i=setTimeout(()=>t.abort(),n*1e3);try{return await fetch(e,{...r,signal:t.signal})}catch(a){throw a instanceof DOMException&&a.name==="AbortError"?new Ur("Network timed out"):a}finally{clearTimeout(i)}}async getJson(e,{token:r,credentials:n,timeoutInSeconds:o}={}){let t=this._logger.create("getJson"),i={Accept:this._contentTypes.join(", ")};r&&(t.debug("token passed, setting Authorization header"),i.Authorization="Bearer "+r),this._appendExtraHeaders(i);let a;try{t.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"GET",headers:i,timeoutInSeconds:o,credentials:n})}catch(l){throw t.error("Network Error"),l}t.debug("HTTP response received, status",a.status);let s=a.headers.get("Content-Type");if(s&&!this._contentTypes.find(l=>s.startsWith(l))&&t.throw(new Error(`Invalid response Content-Type: ${s??"undefined"}, from URL: ${e}`)),a.ok&&this._jwtHandler&&s?.startsWith("application/jwt"))return await this._jwtHandler(await a.text());let c;try{c=await a.json()}catch(l){throw t.error("Error parsing JSON response",l),a.ok?l:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw t.error("Error from server:",c),c.error?new de(c):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:r,basicAuth:n,timeoutInSeconds:o,initCredentials:t,extraHeaders:i}){let a=this._logger.create("postForm"),s={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded",...i};n!==void 0&&(s.Authorization="Basic "+n),this._appendExtraHeaders(s);let c;try{a.debug("url:",e),c=await this.fetchWithTimeout(e,{method:"POST",headers:s,body:r,timeoutInSeconds:o,credentials:t})}catch(h){throw a.error("Network error"),h}a.debug("HTTP response received, status",c.status);let l=c.headers.get("Content-Type");if(l&&!this._contentTypes.find(h=>l.startsWith(h)))throw new Error(`Invalid response Content-Type: ${l??"undefined"}, from URL: ${e}`);let m=await c.text(),d={};if(m)try{d=JSON.parse(m)}catch(h){throw a.error("Error parsing JSON response",h),c.ok?h:new Error(`${c.statusText} (${c.status})`)}if(!c.ok){if(a.error("Error from server:",d),c.headers.has("dpop-nonce")){let h=c.headers.get("dpop-nonce");throw new Ir(h,`${JSON.stringify(d)}`)}throw d.error?new de(d,r):new Error(`${c.statusText} (${c.status}): ${JSON.stringify(d)}`)}return d}_appendExtraHeaders(e){let r=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),o=["accept","content-type"],t=["authorization"];n.length!==0&&n.forEach(i=>{if(o.includes(i.toLocaleLowerCase())){r.warn("Protected header could not be set",i,o);return}if(t.includes(i.toLocaleLowerCase())&&Object.keys(e).includes(i)){r.warn("Header could not be overridden",i,t);return}let a=typeof this._extraHeaders[i]=="function"?this._extraHeaders[i]():this._extraHeaders[i];a&&a!==""&&(e[i]=a)})}},su=class{constructor(e){this._settings=e,this._logger=new P("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Or(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){let e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);let r=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},r,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,r=!1){let n=this._logger.create(`_getMetadataProperty('${e}')`),o=await this.getMetadata();if(n.debug("resolved"),o[e]===void 0){if(r===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return o[e]}async getSigningKeys(){let e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;let r=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",r);let n=await this._jsonService.getJson(r,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys}},wt=class{constructor({prefix:e="oidc.",store:r=localStorage}={}){this._logger=new P("WebStorageStateStore"),this._store=r,this._prefix=e}async set(e,r){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,r)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;let r=await this._store.getItem(e);return await this._store.removeItem(e),r}async getAllKeys(){this._logger.create("getAllKeys");let e=await this._store.length,r=[];for(let n=0;n<e;n++){let o=await this._store.key(n);o&&o.indexOf(this._prefix)===0&&r.push(o.substr(this._prefix.length))}return r}},cu="code",uu="openid",lu="client_secret_post",du=60*15,zr=class{constructor({authority:e,metadataUrl:r,metadata:n,signingKeys:o,metadataSeed:t,client_id:i,client_secret:a,response_type:s=cu,scope:c=uu,redirect_uri:l,post_logout_redirect_uri:m,client_authentication:d=lu,prompt:h,display:v,max_age:p,ui_locales:y,acr_values:b,resource:z,response_mode:w,filterProtocolClaims:x=!0,loadUserInfo:I=!1,requestTimeoutInSeconds:A,staleStateAgeInSeconds:T=du,mergeClaimsStrategy:F={array:"replace"},disablePKCE:M=!1,stateStore:q,revokeTokenAdditionalContentTypes:vt,fetchRequestCredentials:ka,refreshTokenAllowedScope:Kc,extraQueryParams:Bc={},extraTokenParams:Gc={},extraHeaders:Hc={},dpop:Xc,omitScopeWhenRequesting:Yc=!1}){var Sa;if(this.authority=e,r?this.metadataUrl=r:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=n,this.metadataSeed=t,this.signingKeys=o,this.client_id=i,this.client_secret=a,this.response_type=s,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=m,this.client_authentication=d,this.prompt=h,this.display=v,this.max_age=p,this.ui_locales=y,this.acr_values=b,this.resource=z,this.response_mode=w,this.filterProtocolClaims=x??!0,this.loadUserInfo=!!I,this.staleStateAgeInSeconds=T,this.mergeClaimsStrategy=F,this.omitScopeWhenRequesting=Yc,this.disablePKCE=!!M,this.revokeTokenAdditionalContentTypes=vt,this.fetchRequestCredentials=ka||"same-origin",this.requestTimeoutInSeconds=A,q)this.stateStore=q;else{let Qc=typeof window<"u"?window.localStorage:new Na;this.stateStore=new wt({store:Qc})}if(this.refreshTokenAllowedScope=Kc,this.extraQueryParams=Bc,this.extraTokenParams=Gc,this.extraHeaders=Hc,this.dpop=Xc,this.dpop&&!((Sa=this.dpop)!=null&&Sa.store))throw new Error("A DPoPStore is required when dpop is enabled")}},pu=class{constructor(e,r){this._settings=e,this._metadataService=r,this._logger=new P("UserInfoService"),this._getClaimsFromJwt=async n=>{let o=this._logger.create("_getClaimsFromJwt");try{let t=yt.decode(n);return o.debug("JWT decoding successful"),t}catch(t){throw o.error("Error parsing JWT response"),t}},this._jsonService=new Or(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){let r=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));let n=await this._metadataService.getUserInfoEndpoint();r.debug("got userinfo url",n);let o=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return r.debug("got claims",o),o}},Ta=class{constructor(e,r){this._settings=e,this._metadataService=r,this._logger=new P("TokenClient"),this._jsonService=new Or(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:r=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:o=this._settings.client_secret,extraHeaders:t,...i}){let a=this._logger.create("exchangeCode");n||a.throw(new Error("A client_id is required")),r||a.throw(new Error("A redirect_uri is required")),i.code||a.throw(new Error("A code is required"));let s=new URLSearchParams({grant_type:e,redirect_uri:r});for(let[d,h]of Object.entries(i))h!=null&&s.set(d,h);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(o==null)throw a.throw(new Error("A client_secret is required")),null;c=R.generateBasicAuth(n,o);break;case"client_secret_post":s.append("client_id",n),o&&s.append("client_secret",o);break}let l=await this._metadataService.getTokenEndpoint(!1);a.debug("got token endpoint");let m=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:t});return a.debug("got response"),m}async exchangeCredentials({grant_type:e="password",client_id:r=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:o=this._settings.scope,...t}){let i=this._logger.create("exchangeCredentials");r||i.throw(new Error("A client_id is required"));let a=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||a.set("scope",o);for(let[m,d]of Object.entries(t))d!=null&&a.set(m,d);let s;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw i.throw(new Error("A client_secret is required")),null;s=R.generateBasicAuth(r,n);break;case"client_secret_post":a.append("client_id",r),n&&a.append("client_secret",n);break}let c=await this._metadataService.getTokenEndpoint(!1);i.debug("got token endpoint");let l=await this._jsonService.postForm(c,{body:a,basicAuth:s,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return i.debug("got response"),l}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:r=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:o,extraHeaders:t,...i}){let a=this._logger.create("exchangeRefreshToken");r||a.throw(new Error("A client_id is required")),i.refresh_token||a.throw(new Error("A refresh_token is required"));let s=new URLSearchParams({grant_type:e});for(let[d,h]of Object.entries(i))Array.isArray(h)?h.forEach(v=>s.append(d,v)):h!=null&&s.set(d,h);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw a.throw(new Error("A client_secret is required")),null;c=R.generateBasicAuth(r,n);break;case"client_secret_post":s.append("client_id",r),n&&s.append("client_secret",n);break}let l=await this._metadataService.getTokenEndpoint(!1);a.debug("got token endpoint");let m=await this._jsonService.postForm(l,{body:s,basicAuth:c,timeoutInSeconds:o,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:t});return a.debug("got response"),m}async revoke(e){var r;let n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));let o=await this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(r=e.token_type_hint)!=null?r:"default token type"}`);let t=new URLSearchParams;for(let[i,a]of Object.entries(e))a!=null&&t.set(i,a);t.set("client_id",this._settings.client_id),this._settings.client_secret&&t.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(o,{body:t,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),n.debug("got response")}},mu=class{constructor(e,r,n){this._settings=e,this._metadataService=r,this._claimsService=n,this._logger=new P("ResponseValidator"),this._userInfoService=new pu(this._settings,this._metadataService),this._tokenClient=new Ta(this._settings,this._metadataService)}async validateSigninResponse(e,r,n){let o=this._logger.create("validateSigninResponse");this._processSigninState(e,r),o.debug("state processed"),await this._processCode(e,r,n),o.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),o.debug("tokens validated"),await this._processClaims(e,r?.skipUserInfo,e.isOpenId),o.debug("claims processed")}async validateCredentialsResponse(e,r){let n=this._logger.create("validateCredentialsResponse"),o=e.isOpenId&&!!e.id_token;o&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,r,o),n.debug("claims processed")}async validateRefreshResponse(e,r){var n,o;let t=this._logger.create("validateRefreshResponse");e.userState=r.data,(n=e.session_state)!=null||(e.session_state=r.session_state),(o=e.scope)!=null||(e.scope=r.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,r.id_token),t.debug("ID Token validated")),e.id_token||(e.id_token=r.id_token,e.profile=r.profile);let i=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,i),t.debug("claims processed")}validateSignoutResponse(e,r){let n=this._logger.create("validateSignoutResponse");if(r.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=r.data,e.error)throw n.warn("Response was error",e.error),new de(e)}_processSigninState(e,r){var n;let o=this._logger.create("_processSigninState");if(r.id!==e.state&&o.throw(new Error("State does not match")),r.client_id||o.throw(new Error("No client_id on state")),r.authority||o.throw(new Error("No authority on state")),this._settings.authority!==r.authority&&o.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==r.client_id&&o.throw(new Error("client_id mismatch on settings vs. signin state")),o.debug("state validated"),e.userState=r.data,e.url_state=r.url_state,(n=e.scope)!=null||(e.scope=r.scope),e.error)throw o.warn("Response was error",e.error),new de(e);r.code_verifier&&!e.code&&o.throw(new Error("Expected code in response"))}async _processClaims(e,r=!1,n=!0){let o=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),r||!this._settings.loadUserInfo||!e.access_token){o.debug("not loading user info");return}o.debug("loading user info");let t=await this._userInfoService.getClaims(e.access_token);o.debug("user info claims received from user info endpoint"),n&&t.sub!==e.profile.sub&&o.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(t)),o.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,r,n){let o=this._logger.create("_processCode");if(e.code){o.debug("Validating code");let t=await this._tokenClient.exchangeCode({client_id:r.client_id,client_secret:r.client_secret,code:e.code,redirect_uri:r.redirect_uri,code_verifier:r.code_verifier,extraHeaders:n,...r.extraTokenParams});Object.assign(e,t)}else o.debug("No code to process")}_validateIdTokenAttributes(e,r){var n;let o=this._logger.create("_validateIdTokenAttributes");o.debug("decoding ID Token JWT");let t=yt.decode((n=e.id_token)!=null?n:"");if(t.sub||o.throw(new Error("ID Token is missing a subject claim")),r){let i=yt.decode(r);t.sub!==i.sub&&o.throw(new Error("sub in id_token does not match current sub")),t.auth_time&&t.auth_time!==i.auth_time&&o.throw(new Error("auth_time in id_token does not match original auth_time")),t.azp&&t.azp!==i.azp&&o.throw(new Error("azp in id_token does not match original azp")),!t.azp&&i.azp&&o.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=t}},bt=class Pr{constructor(r){this.id=r.id||R.generateUUIDv4(),this.data=r.data,r.created&&r.created>0?this.created=r.created:this.created=Q.getEpochTime(),this.request_type=r.request_type,this.url_state=r.url_state}toStorageString(){return new P("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(r){return P.createStatic("State","fromStorageString"),Promise.resolve(new Pr(JSON.parse(r)))}static async clearStaleState(r,n){let o=P.createStatic("State","clearStaleState"),t=Q.getEpochTime()-n,i=await r.getAllKeys();o.debug("got keys",i);for(let a=0;a<i.length;a++){let s=i[a],c=await r.get(s),l=!1;if(c)try{let m=await Pr.fromStorageString(c);o.debug("got item from key:",s,m.created),m.created<=t&&(l=!0)}catch(m){o.error("Error parsing state for key:",s,m),l=!0}else o.debug("no item in storage for key:",s),l=!0;l&&(o.debug("removed item for key:",s),r.remove(s))}}},Ea=class jr extends bt{constructor(r){super(r),this.code_verifier=r.code_verifier,this.code_challenge=r.code_challenge,this.authority=r.authority,this.client_id=r.client_id,this.redirect_uri=r.redirect_uri,this.scope=r.scope,this.client_secret=r.client_secret,this.extraTokenParams=r.extraTokenParams,this.response_mode=r.response_mode,this.skipUserInfo=r.skipUserInfo}static async create(r){let n=r.code_verifier===!0?R.generateCodeVerifier():r.code_verifier||void 0,o=n?await R.generateCodeChallenge(n):void 0;return new jr({...r,code_verifier:n,code_challenge:o})}toStorageString(){return new P("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(r){P.createStatic("SigninState","fromStorageString");let n=JSON.parse(r);return jr.create(n)}},Za=class Da{constructor(r){this.url=r.url,this.state=r.state}static async create({url:r,authority:n,client_id:o,redirect_uri:t,response_type:i,scope:a,state_data:s,response_mode:c,request_type:l,client_secret:m,nonce:d,url_state:h,resource:v,skipUserInfo:p,extraQueryParams:y,extraTokenParams:b,disablePKCE:z,dpopJkt:w,omitScopeWhenRequesting:x,...I}){if(!r)throw this._logger.error("create: No url passed"),new Error("url");if(!o)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!t)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!i)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!a)throw this._logger.error("create: No scope passed"),new Error("scope");if(!n)throw this._logger.error("create: No authority passed"),new Error("authority");let A=await Ea.create({data:s,request_type:l,url_state:h,code_verifier:!z,client_id:o,authority:n,redirect_uri:t,response_mode:c,client_secret:m,scope:a,extraTokenParams:b,skipUserInfo:p}),T=new URL(r);T.searchParams.append("client_id",o),T.searchParams.append("redirect_uri",t),T.searchParams.append("response_type",i),x||T.searchParams.append("scope",a),d&&T.searchParams.append("nonce",d),w&&T.searchParams.append("dpop_jkt",w);let F=A.id;h&&(F=`${F}${be}${h}`),T.searchParams.append("state",F),A.code_challenge&&(T.searchParams.append("code_challenge",A.code_challenge),T.searchParams.append("code_challenge_method","S256")),v&&(Array.isArray(v)?v:[v]).forEach(q=>T.searchParams.append("resource",q));for(let[M,q]of Object.entries({response_mode:c,...I,...y}))q!=null&&T.searchParams.append(M,q.toString());return new Da({url:T.href,state:A})}};Za._logger=new P("SigninRequest");var gu=Za,fu="openid",xr=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){let r=decodeURIComponent(this.state).split(be);this.state=r[0],r.length>1&&(this.url_state=r.slice(1).join(be))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Q.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+Q.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(fu))||!!this.id_token}},hu=class{constructor({url:e,state_data:r,id_token_hint:n,post_logout_redirect_uri:o,extraQueryParams:t,request_type:i,client_id:a,url_state:s}){if(this._logger=new P("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");let c=new URL(e);if(n&&c.searchParams.append("id_token_hint",n),a&&c.searchParams.append("client_id",a),o&&(c.searchParams.append("post_logout_redirect_uri",o),r||s)){this.state=new bt({data:r,request_type:i,url_state:s});let l=this.state.id;s&&(l=`${l}${be}${s}`),c.searchParams.append("state",l)}for(let[l,m]of Object.entries({...t}))m!=null&&c.searchParams.append(l,m.toString());this.url=c.href}},vu=class{constructor(e){if(this.state=e.get("state"),this.state){let r=decodeURIComponent(this.state).split(be);this.state=r[0],r.length>1&&(this.url_state=r.slice(1).join(be))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},_u=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],$u=["sub","iss","aud","exp","iat"],yu=class{constructor(e){this._settings=e,this._logger=new P("ClaimsService")}filterProtocolClaims(e){let r={...e};if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=_u;for(let o of n)$u.includes(o)||delete r[o]}return r}mergeClaims(e,r){let n={...e};for(let[o,t]of Object.entries(r))if(n[o]!==t)if(Array.isArray(n[o])||Array.isArray(t))if(this._settings.mergeClaimsStrategy.array=="replace")n[o]=t;else{let i=Array.isArray(n[o])?n[o]:[n[o]];for(let a of Array.isArray(t)?t:[t])i.includes(a)||i.push(a);n[o]=i}else typeof n[o]=="object"&&typeof t=="object"?n[o]=this.mergeClaims(n[o],t):n[o]=t;return n}},Aa=class{constructor(e,r){this.keys=e,this.nonce=r}},bu=class{constructor(e,r){this._logger=new P("OidcClient"),this.settings=e instanceof zr?e:new zr(e),this.metadataService=r??new su(this.settings),this._claimsService=new yu(this.settings),this._validator=new mu(this.settings,this.metadataService,this._claimsService),this._tokenClient=new Ta(this.settings,this.metadataService)}async createSigninRequest({state:e,request:r,request_uri:n,request_type:o,id_token_hint:t,login_hint:i,skipUserInfo:a,nonce:s,url_state:c,response_type:l=this.settings.response_type,scope:m=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:h=this.settings.prompt,display:v=this.settings.display,max_age:p=this.settings.max_age,ui_locales:y=this.settings.ui_locales,acr_values:b=this.settings.acr_values,resource:z=this.settings.resource,response_mode:w=this.settings.response_mode,extraQueryParams:x=this.settings.extraQueryParams,extraTokenParams:I=this.settings.extraTokenParams,dpopJkt:A,omitScopeWhenRequesting:T=this.settings.omitScopeWhenRequesting}){let F=this._logger.create("createSigninRequest");if(l!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");let M=await this.metadataService.getAuthorizationEndpoint();F.debug("Received authorization endpoint",M);let q=await gu.create({url:M,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:m,state_data:e,url_state:c,prompt:h,display:v,max_age:p,ui_locales:y,id_token_hint:t,login_hint:i,acr_values:b,dpopJkt:A,resource:z,request:r,request_uri:n,extraQueryParams:x,extraTokenParams:I,request_type:o,response_mode:w,client_secret:this.settings.client_secret,skipUserInfo:a,nonce:s,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:T});await this.clearStaleState();let vt=q.state;return await this.settings.stateStore.set(vt.id,vt.toStorageString()),q}async readSigninResponseState(e,r=!1){let n=this._logger.create("readSigninResponseState"),o=new xr(Sr.readParams(e,this.settings.response_mode));if(!o.state)throw n.throw(new Error("No state in response")),null;let t=await this.settings.stateStore[r?"remove":"get"](o.state);if(!t)throw n.throw(new Error("No matching state found in storage")),null;return{state:await Ea.fromStorageString(t),response:o}}async processSigninResponse(e,r,n=!0){let o=this._logger.create("processSigninResponse"),{state:t,response:i}=await this.readSigninResponseState(e,n);if(o.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){let a=await this.getDpopProof(this.settings.dpop.store);r={...r,DPoP:a}}try{await this._validator.validateSigninResponse(i,t,r)}catch(a){if(a instanceof Ir&&this.settings.dpop){let s=await this.getDpopProof(this.settings.dpop.store,a.nonce);r.DPoP=s,await this._validator.validateSigninResponse(i,t,r)}else throw a}return i}async getDpopProof(e,r){let n,o;return(await e.getAllKeys()).includes(this.settings.client_id)?(o=await e.get(this.settings.client_id),o.nonce!==r&&r&&(o.nonce=r,await e.set(this.settings.client_id,o))):(n=await R.generateDPoPKeys(),o=new Aa(n,r),await e.set(this.settings.client_id,o)),await R.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:o.keys,nonce:o.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:r,skipUserInfo:n=!1,extraTokenParams:o={}}){let t=await this._tokenClient.exchangeCredentials({username:e,password:r,...o}),i=new xr(new URLSearchParams);return Object.assign(i,t),await this._validator.validateCredentialsResponse(i,n),i}async useRefreshToken({state:e,redirect_uri:r,resource:n,timeoutInSeconds:o,extraHeaders:t,extraTokenParams:i}){var a;let s=this._logger.create("useRefreshToken"),c;if(this.settings.refreshTokenAllowedScope===void 0)c=e.scope;else{let d=this.settings.refreshTokenAllowedScope.split(" ");c=(((a=e.scope)==null?void 0:a.split(" "))||[]).filter(v=>d.includes(v)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){let d=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:d}}let l;try{l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:r,resource:n,timeoutInSeconds:o,extraHeaders:t,...i})}catch(d){if(d instanceof Ir&&this.settings.dpop)t.DPoP=await this.getDpopProof(this.settings.dpop.store,d.nonce),l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:r,resource:n,timeoutInSeconds:o,extraHeaders:t,...i});else throw d}let m=new xr(new URLSearchParams);return Object.assign(m,l),s.debug("validating response",m),await this._validator.validateRefreshResponse(m,{...e,scope:c}),m}async createSignoutRequest({state:e,id_token_hint:r,client_id:n,request_type:o,url_state:t,post_logout_redirect_uri:i=this.settings.post_logout_redirect_uri,extraQueryParams:a=this.settings.extraQueryParams}={}){let s=this._logger.create("createSignoutRequest"),c=await this.metadataService.getEndSessionEndpoint();if(!c)throw s.throw(new Error("No end session endpoint")),null;s.debug("Received end session endpoint",c),!n&&i&&!r&&(n=this.settings.client_id);let l=new hu({url:c,id_token_hint:r,client_id:n,post_logout_redirect_uri:i,state_data:e,extraQueryParams:a,request_type:o,url_state:t});await this.clearStaleState();let m=l.state;return m&&(s.debug("Signout request has state to persist"),await this.settings.stateStore.set(m.id,m.toStorageString())),l}async readSignoutResponseState(e,r=!1){let n=this._logger.create("readSignoutResponseState"),o=new vu(Sr.readParams(e,this.settings.response_mode));if(!o.state){if(n.debug("No state in response"),o.error)throw n.warn("Response was error:",o.error),new de(o);return{state:void 0,response:o}}let t=await this.settings.stateStore[r?"remove":"get"](o.state);if(!t)throw n.throw(new Error("No matching state found in storage")),null;return{state:await bt.fromStorageString(t),response:o}}async processSignoutResponse(e){let r=this._logger.create("processSignoutResponse"),{state:n,response:o}=await this.readSignoutResponseState(e,!0);return n?(r.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(o,n)):r.debug("No state from storage; skipping response validation"),o}clearStaleState(){return this._logger.create("clearStaleState"),bt.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,r){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:r})}},wu=class{constructor(e){this._userManager=e,this._logger=new P("SessionMonitor"),this._start=async r=>{let n=r.session_state;if(!n)return;let o=this._logger.create("_start");if(r.profile?(this._sub=r.profile.sub,o.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,o.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{let t=await this._userManager.metadataService.getCheckSessionIframe();if(t){o.debug("initializing check session iframe");let i=this._userManager.settings.client_id,a=this._userManager.settings.checkSessionIntervalInSeconds,s=this._userManager.settings.stopCheckSessionOnError,c=new au(this._callback,i,t,a,s);await c.load(),this._checkSessionIFrame=c,c.start(n)}else o.warn("no check session iframe found in the metadata")}catch(t){o.error("Error from getCheckSessionIframe:",t instanceof Error?t.message:t)}},this._stop=()=>{let r=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let n=setInterval(async()=>{clearInterval(n);try{let o=await this._userManager.querySessionStatus();if(o){let t={session_state:o.session_state,profile:o.sub?{sub:o.sub}:null};this._start(t)}}catch(o){r.error("error from querySessionStatus",o instanceof Error?o.message:o)}},1e3)}},this._callback=async()=>{let r=this._logger.create("_callback");try{let n=await this._userManager.querySessionStatus(),o=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(o=!1,this._checkSessionIFrame.start(n.session_state),r.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),await this._userManager.events._raiseUserSessionChanged()):r.debug("different subject signed into OP",n.sub):r.debug("subject no longer signed into OP"),o?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():r.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(r.debug("Error calling queryCurrentSigninSession; raising signed out event",n),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(r=>{this._logger.error(r)})}async _init(){this._logger.create("_init");let e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let r=await this._userManager.querySessionStatus();if(r){let n={session_state:r.session_state,profile:r.sub?{sub:r.sub}:null};this._start(n)}}}},ye=class Ra{constructor(r){var n;this.id_token=r.id_token,this.session_state=(n=r.session_state)!=null?n:null,this.access_token=r.access_token,this.refresh_token=r.refresh_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=r.profile,this.expires_at=r.expires_at,this.state=r.userState,this.url_state=r.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Q.getEpochTime()}set expires_in(r){r!==void 0&&(this.expires_at=Math.floor(r)+Q.getEpochTime())}get expired(){let r=this.expires_in;if(r!==void 0)return r<=0}get scopes(){var r,n;return(n=(r=this.scope)==null?void 0:r.split(" "))!=null?n:[]}toStorageString(){return new P("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(r){return P.createStatic("User","fromStorageString"),new Ra(JSON.parse(r))}},Pa="oidc-client",Ca=class{constructor(){this._abort=new ae("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){let r=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");r.debug("setting URL in window"),this._window.location.replace(e.url);let{url:n,keepOpen:o}=await new Promise((t,i)=>{let a=c=>{var l;let m=c.data,d=(l=e.scriptOrigin)!=null?l:window.location.origin;if(!(c.origin!==d||m?.source!==Pa)){try{let h=Sr.readParams(m.url,e.response_mode).get("state");if(h||r.warn("no state found in response url"),c.source!==this._window&&h!==e.state)return}catch{this._dispose(),i(new Error("Invalid response from window"))}t(m)}};window.addEventListener("message",a,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",a,!1));let s=new BroadcastChannel(`oidc-client-popup-${e.state}`);s.addEventListener("message",a,!1),this._disposeHandlers.add(()=>s.close()),this._disposeHandlers.add(this._abort.addHandler(c=>{this._dispose(),i(c)}))});return r.debug("got response from window"),this._dispose(),o||this.close(),{url:n}}_dispose(){this._logger.create("_dispose");for(let e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,r,n=!1,o=window.location.origin){let t={source:Pa,url:r,keepOpen:n},i=new P("_notifyParent");if(e)i.debug("With parent. Using parent.postMessage."),e.postMessage(t,o);else{i.debug("No parent. Using BroadcastChannel.");let a=new URL(r).searchParams.get("state");if(!a)throw new Error("No parent and no state in URL. Can't complete notification.");let s=new BroadcastChannel(`oidc-client-popup-${a}`);s.postMessage(t),s.close()}}},La={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},Ma="_blank",xu=60,ku=2,Va=10,Su=class extends zr{constructor(e){let{popup_redirect_uri:r=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:o=La,popupWindowTarget:t=Ma,redirectMethod:i="assign",redirectTarget:a="self",iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:l,silent_redirect_uri:m=e.redirect_uri,silentRequestTimeoutInSeconds:d,automaticSilentRenew:h=!0,validateSubOnSilentRenew:v=!0,includeIdTokenInSilentRenew:p=!1,monitorSession:y=!1,monitorAnonymousSession:b=!1,checkSessionIntervalInSeconds:z=ku,query_status_response_type:w="code",stopCheckSessionOnError:x=!0,revokeTokenTypes:I=["access_token","refresh_token"],revokeTokensOnSignout:A=!1,includeIdTokenInSilentSignout:T=!1,accessTokenExpiringNotificationTimeInSeconds:F=xu,userStore:M}=e;if(super(e),this.popup_redirect_uri=r,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=o,this.popupWindowTarget=t,this.redirectMethod=i,this.redirectTarget=a,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=c,this.silent_redirect_uri=m,this.silentRequestTimeoutInSeconds=d||l||Va,this.automaticSilentRenew=h,this.validateSubOnSilentRenew=v,this.includeIdTokenInSilentRenew=p,this.monitorSession=y,this.monitorAnonymousSession=b,this.checkSessionIntervalInSeconds=z,this.stopCheckSessionOnError=x,this.query_status_response_type=w,this.revokeTokenTypes=I,this.revokeTokensOnSignout=A,this.includeIdTokenInSilentSignout=T,this.accessTokenExpiringNotificationTimeInSeconds=F,M)this.userStore=M;else{let q=typeof window<"u"?window.sessionStorage:new Na;this.userStore=new wt({store:q})}}},ja=class Ja extends Ca{constructor({silentRequestTimeoutInSeconds:r=Va}){super(),this._logger=new P("IFrameWindow"),this._timeoutInSeconds=r,this._frame=Ja.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let r=window.document.createElement("iframe");return r.style.visibility="hidden",r.style.position="fixed",r.style.left="-1000px",r.style.top="0",r.width="0",r.height="0",window.document.body.appendChild(r),r}async navigate(r){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);let n=setTimeout(()=>void this._abort.raise(new Ur("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(n)),await super.navigate(r)}close(){var r;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",n=>{var o;let t=n.target;(o=t.parentNode)==null||o.removeChild(t),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(r=this._frame.contentWindow)==null||r.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(r,n){return super._notifyParent(window.parent,r,!1,n)}},Iu=class{constructor(e){this._settings=e,this._logger=new P("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new ja({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),ja.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},zu=500,Pu=1e3,Ua=class extends Ca{constructor({popupWindowTarget:e=Ma,popupWindowFeatures:r={},popupSignal:n}){super(),this._logger=new P("PopupWindow");let o=za.center({...La,...r});this._window=window.open(void 0,e,za.serialize(o)),n&&n.addEventListener("abort",()=>{var t;this._abort.raise(new Error((t=n.reason)!=null?t:"Popup aborted"))}),r.closePopupWindowAfterInSeconds&&r.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},r.closePopupWindowAfterInSeconds*Pu)}async navigate(e){var r;(r=this._window)==null||r.focus();let n=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug("Popup closed by user or isolated by redirect"),o(),this._disposeHandlers.delete(o))},zu),o=()=>clearInterval(n);return this._disposeHandlers.add(o),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,r){super._notifyParent(window.opener,e,r),!r&&!window.opener&&window.close()}},ju=class{constructor(e){this._settings=e,this._logger=new P("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:r=this._settings.popupWindowTarget,popupSignal:n}){return new Ua({popupWindowFeatures:e,popupWindowTarget:r,popupSignal:n})}async callback(e,{keepOpen:r=!1}){this._logger.create("callback"),Ua.notifyOpener(e,r)}},Uu=class{constructor(e){this._settings=e,this._logger=new P("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:r=this._settings.redirectTarget}){var n;this._logger.create("prepare");let o=window.self;r==="top"&&(o=(n=window.top)!=null?n:window.self);let t=o.location[e].bind(o.location),i;return{navigate:async a=>{this._logger.create("navigate");let s=new Promise((c,l)=>{i=l});return t(a.url),await s},close:()=>{this._logger.create("close"),i?.(new Error("Redirect aborted")),o.stop()}}}async callback(){}},Ou=class extends ou{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new P("UserManagerEvents"),this._userLoaded=new ae("User loaded"),this._userUnloaded=new ae("User unloaded"),this._silentRenewError=new ae("Silent renew error"),this._userSignedIn=new ae("User signed in"),this._userSignedOut=new ae("User signed out"),this._userSessionChanged=new ae("User session changed")}async load(e,r=!0){await super.load(e),r&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},Nu=class{constructor(e){this._userManager=e,this._logger=new P("SilentRenewService"),this._isStarted=!1,this._retryTimer=new Q("Retry Silent Renew"),this._tokenExpiring=async()=>{let r=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),r.debug("silent token renewal successful")}catch(n){if(n instanceof Ur){r.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}r.error("Error from signinSilent:",n),await this._userManager.events._raiseSilentRenewError(n)}}}async start(){let e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(r){e.error("getUser error",r)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},Tu=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},Fa=class{constructor(e,r,n,o){this._logger=new P("UserManager"),this.settings=new Su(e),this._client=new bu(e),this._redirectNavigator=r??new Uu(this.settings),this._popupNavigator=n??new ju(this.settings),this._iframeNavigator=o??new Iu(this.settings),this._events=new Ou(this.settings),this._silentRenewService=new Nu(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new wu(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){let r=this._logger.create("getUser"),n=await this._loadUser();return n?(r.info("user loaded"),await this._events.load(n,e),n):(r.info("user not found in storage"),null)}async removeUser(){let e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){var r;this._logger.create("signinRedirect");let{redirectMethod:n,...o}=e,t;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(t=await this.generateDPoPJkt(this.settings.dpop));let i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signinStart({request_type:"si:r",dpopJkt:t,...o},i)}async signinRedirectCallback(e=window.location.href){let r=this._logger.create("signinRedirectCallback"),n=await this._signinEnd(e);return n.profile&&n.profile.sub?r.info("success, signed in subject",n.profile.sub):r.info("no subject"),n}async signinResourceOwnerCredentials({username:e,password:r,skipUserInfo:n=!1}){let o=this._logger.create("signinResourceOwnerCredential"),t=await this._client.processResourceOwnerPasswordCredentials({username:e,password:r,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});o.debug("got signin response");let i=await this._buildUser(t);return i.profile&&i.profile.sub?o.info("success, signed in subject",i.profile.sub):o.info("no subject"),i}async signinPopup(e={}){var r;let n=this._logger.create("signinPopup"),o;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(o=await this.generateDPoPJkt(this.settings.dpop));let{popupWindowFeatures:t,popupWindowTarget:i,popupSignal:a,...s}=e,c=this.settings.popup_redirect_uri;c||n.throw(new Error("No popup_redirect_uri configured"));let l=await this._popupNavigator.prepare({popupWindowFeatures:t,popupWindowTarget:i,popupSignal:a}),m=await this._signin({request_type:"si:p",redirect_uri:c,display:"popup",dpopJkt:o,...s},l);return m&&(m.profile&&m.profile.sub?n.info("success, signed in subject",m.profile.sub):n.info("no subject")),m}async signinPopupCallback(e=window.location.href,r=!1){let n=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:r}),n.info("success")}async signinSilent(e={}){var r,n;let o=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:t,...i}=e,a=await this._loadUser();if(a?.refresh_token){o.debug("using refresh token");let d=new Tu(a);return await this._useRefreshToken({state:d,redirect_uri:i.redirect_uri,resource:i.resource,extraTokenParams:i.extraTokenParams,timeoutInSeconds:t})}let s;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(s=await this.generateDPoPJkt(this.settings.dpop));let c=this.settings.silent_redirect_uri;c||o.throw(new Error("No silent_redirect_uri configured"));let l;a&&this.settings.validateSubOnSilentRenew&&(o.debug("subject prior to silent renew:",a.profile.sub),l=a.profile.sub);let m=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:t});return a=await this._signin({request_type:"si:s",redirect_uri:c,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?a?.id_token:void 0,dpopJkt:s,...i},m,l),a&&((n=a.profile)!=null&&n.sub?o.info("success, signed in subject",a.profile.sub):o.info("no subject")),a}async _useRefreshToken(e){let r=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),n=new ye({...e.state,...r});return await this.storeUser(n),await this._events.load(n),n}async signinSilentCallback(e=window.location.href){let r=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),r.info("success")}async signinCallback(e=window.location.href){let{state:r}=await this._client.readSigninResponseState(e);switch(r.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":await this.signinPopupCallback(e);break;case"si:s":await this.signinSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,r=!1){let{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":return await this.signoutRedirectCallback(e);case"so:p":await this.signoutPopupCallback(e,r);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){let r=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:n,...o}=e,t=this.settings.silent_redirect_uri;t||r.throw(new Error("No silent_redirect_uri configured"));let i=await this._loadUser(),a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),s=await this._signinStart({request_type:"si:s",redirect_uri:t,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?i?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...o},a);try{let c={},l=await this._client.processSigninResponse(s.url,c);return r.debug("got signin response"),l.session_state&&l.profile.sub?(r.info("success for subject",l.profile.sub),{session_state:l.session_state,sub:l.profile.sub}):(r.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof de)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return r.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,r,n){let o=await this._signinStart(e,r);return await this._signinEnd(o.url,n)}async _signinStart(e,r){let n=this._logger.create("_signinStart");try{let o=await this._client.createSigninRequest(e);return n.debug("got signin request"),await r.navigate({url:o.url,state:o.state.id,response_mode:o.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(o){throw n.debug("error after preparing navigator, closing navigator window"),r.close(),o}}async _signinEnd(e,r){let n=this._logger.create("_signinEnd"),o={},t=await this._client.processSigninResponse(e,o);return n.debug("got signin response"),await this._buildUser(t,r)}async _buildUser(e,r){let n=this._logger.create("_buildUser"),o=new ye(e);if(r){if(r!==o.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",o.profile.sub),new de({...e,error:"login_required"});n.debug("current user matches user returned from signin")}return await this.storeUser(o),n.debug("user stored"),await this._events.load(o),o}async signoutRedirect(e={}){let r=this._logger.create("signoutRedirect"),{redirectMethod:n,...o}=e,t=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...o},t),r.info("success")}async signoutRedirectCallback(e=window.location.href){let r=this._logger.create("signoutRedirectCallback"),n=await this._signoutEnd(e);return r.info("success"),n}async signoutPopup(e={}){let r=this._logger.create("signoutPopup"),{popupWindowFeatures:n,popupWindowTarget:o,popupSignal:t,...i}=e,a=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:o,popupSignal:t});await this._signout({request_type:"so:p",post_logout_redirect_uri:a,state:a==null?void 0:{},...i},s),r.info("success")}async signoutPopupCallback(e=window.location.href,r=!1){let n=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:r}),n.info("success")}async _signout(e,r){let n=await this._signoutStart(e,r);return await this._signoutEnd(n.url)}async _signoutStart(e={},r){var n;let o=this._logger.create("_signoutStart");try{let t=await this._loadUser();o.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(t);let i=e.id_token_hint||t&&t.id_token;i&&(o.debug("setting id_token_hint in signout request"),e.id_token_hint=i),await this.removeUser(),o.debug("user removed, creating signout request");let a=await this._client.createSignoutRequest(e);return o.debug("got signout request"),await r.navigate({url:a.url,state:(n=a.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(t){throw o.debug("error after preparing navigator, closing navigator window"),r.close(),t}}async _signoutEnd(e){let r=this._logger.create("_signoutEnd"),n=await this._client.processSignoutResponse(e);return r.debug("got signout response"),n}async signoutSilent(e={}){var r;let n=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:o,...t}=e,i=this.settings.includeIdTokenInSilentSignout?(r=await this._loadUser())==null?void 0:r.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:o});await this._signout({request_type:"so:s",post_logout_redirect_uri:a,id_token_hint:i,...t},s),n.info("success")}async signoutSilentCallback(e=window.location.href){let r=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),r.info("success")}async revokeTokens(e){let r=await this._loadUser();await this._revokeInternal(r,e)}async _revokeInternal(e,r=this.settings.revokeTokenTypes){let n=this._logger.create("_revokeInternal");if(!e)return;let o=r.filter(t=>typeof e[t]=="string");if(!o.length){n.debug("no need to revoke due to no token(s)");return}for(let t of o)await this._client.revokeToken(e[t],t),n.info(`${t} revoked successfully`),t!=="access_token"&&(e[t]=null);await this.storeUser(e),n.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){let e=this._logger.create("_loadUser"),r=await this.settings.userStore.get(this._userStoreKey);return r?(e.debug("user storageString loaded"),ye.fromStorageString(r)):(e.debug("no user storageString"),null)}async storeUser(e){let r=this._logger.create("storeUser");if(e){r.debug("storing user");let n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,r,n,o){var t,i;let a=await((i=(t=this.settings.dpop)==null?void 0:t.store)==null?void 0:i.get(this.settings.client_id));if(a)return await R.generateDPoPProof({url:e,accessToken:r?.access_token,httpMethod:n,keyPair:a.keys,nonce:o})}async generateDPoPJkt(e){let r=await e.store.get(this.settings.client_id);if(!r){let n=await R.generateDPoPKeys();r=new Aa(n),await e.store.set(this.settings.client_id,r)}return await R.generateDPoPJkt(r.keys)}};var xa={};ue(xa,{$brand:()=>Tr,$input:()=>Bi,$output:()=>Ki,NEVER:()=>Nr,TimePrecision:()=>Xi,ZodAny:()=>cc,ZodArray:()=>pc,ZodBase64:()=>ca,ZodBase64URL:()=>ua,ZodBigInt:()=>ht,ZodBigIntFormat:()=>pa,ZodBoolean:()=>ft,ZodCIDRv4:()=>aa,ZodCIDRv6:()=>sa,ZodCUID:()=>Qo,ZodCUID2:()=>ea,ZodCatch:()=>Oc,ZodCustom:()=>wr,ZodCustomStringFormat:()=>tc,ZodDate:()=>$r,ZodDefault:()=>Sc,ZodDiscriminatedUnion:()=>mc,ZodE164:()=>la,ZodEmail:()=>Go,ZodEmoji:()=>Xo,ZodEnum:()=>pt,ZodError:()=>$d,ZodFile:()=>xc,ZodFirstPartyTypeKind:()=>ba,ZodGUID:()=>mr,ZodIPv4:()=>ia,ZodIPv6:()=>oa,ZodISODate:()=>ur,ZodISODateTime:()=>cr,ZodISODuration:()=>dr,ZodISOTime:()=>lr,ZodIntersection:()=>gc,ZodIssueCode:()=>xp,ZodJWT:()=>da,ZodKSUID:()=>na,ZodLazy:()=>Ac,ZodLiteral:()=>bc,ZodMap:()=>_c,ZodNaN:()=>Tc,ZodNanoID:()=>Yo,ZodNever:()=>lc,ZodNonOptional:()=>$a,ZodNull:()=>ac,ZodNullable:()=>kc,ZodNumber:()=>gt,ZodNumberFormat:()=>Te,ZodObject:()=>yr,ZodOptional:()=>_a,ZodPipe:()=>ya,ZodPrefault:()=>zc,ZodPromise:()=>Cc,ZodReadonly:()=>Ec,ZodRealError:()=>Ne,ZodRecord:()=>fa,ZodSet:()=>$c,ZodString:()=>mt,ZodStringFormat:()=>N,ZodSuccess:()=>Uc,ZodSymbol:()=>ic,ZodTemplateLiteral:()=>Dc,ZodTransform:()=>ha,ZodTuple:()=>hc,ZodType:()=>S,ZodULID:()=>ta,ZodURL:()=>Ho,ZodUUID:()=>oe,ZodUndefined:()=>oc,ZodUnion:()=>ga,ZodUnknown:()=>uc,ZodVoid:()=>dc,ZodXID:()=>ra,_ZodString:()=>Bo,_default:()=>Ic,any:()=>Qd,array:()=>ma,base64:()=>Cd,base64url:()=>Ld,bigint:()=>Bd,boolean:()=>nc,catch:()=>Nc,check:()=>Lc,cidrv4:()=>Ad,cidrv6:()=>Rd,clone:()=>V,coerce:()=>wa,config:()=>Z,core:()=>ie,cuid:()=>Ud,cuid2:()=>Od,custom:()=>_p,date:()=>tp,discriminatedUnion:()=>ap,e164:()=>Md,email:()=>bd,emoji:()=>Pd,endsWith:()=>it,enum:()=>yc,file:()=>pp,flattenError:()=>Je,float32:()=>Fd,float64:()=>qd,formatError:()=>Fe,function:()=>Do,getErrorMap:()=>Sp,globalRegistry:()=>Y,gt:()=>re,gte:()=>L,guid:()=>wd,includes:()=>rt,instanceof:()=>$p,int:()=>Ko,int32:()=>Wd,int64:()=>Gd,intersection:()=>fc,ipv4:()=>Zd,ipv6:()=>Dd,iso:()=>pr,json:()=>bp,jwt:()=>Vd,keyof:()=>rp,ksuid:()=>Ed,lazy:()=>Rc,length:()=>Oe,literal:()=>wc,locales:()=>He,looseObject:()=>op,lowercase:()=>et,lt:()=>te,lte:()=>W,map:()=>up,maxLength:()=>Ue,maxSize:()=>je,mime:()=>ot,minLength:()=>ce,minSize:()=>$e,multipleOf:()=>_e,nan:()=>fp,nanoid:()=>jd,nativeEnum:()=>dp,negative:()=>Io,never:()=>_r,nonnegative:()=>Po,nonoptional:()=>jc,nonpositive:()=>zo,normalize:()=>at,null:()=>sc,nullable:()=>hr,nullish:()=>mp,number:()=>rc,object:()=>np,optional:()=>fr,overwrite:()=>ne,parse:()=>Vo,parseAsync:()=>Jo,partialRecord:()=>cp,pipe:()=>vr,positive:()=>So,prefault:()=>Pc,preprocess:()=>wp,prettifyError:()=>Wr,promise:()=>vp,property:()=>jo,readonly:()=>Zc,record:()=>vc,refine:()=>Mc,regex:()=>Qe,regexes:()=>fe,registry:()=>Ct,safeParse:()=>Fo,safeParseAsync:()=>qo,set:()=>lp,setErrorMap:()=>kp,size:()=>Ye,startsWith:()=>nt,strictObject:()=>ip,string:()=>Wo,stringFormat:()=>Jd,stringbool:()=>yp,success:()=>gp,superRefine:()=>Vc,symbol:()=>Xd,templateLiteral:()=>hp,toJSONSchema:()=>Ao,toLowerCase:()=>ct,toUpperCase:()=>ut,transform:()=>va,treeifyError:()=>qr,trim:()=>st,tuple:()=>sp,uint32:()=>Kd,uint64:()=>Hd,ulid:()=>Nd,undefined:()=>Yd,union:()=>br,unknown:()=>gr,uppercase:()=>tt,url:()=>zd,uuid:()=>xd,uuidv4:()=>kd,uuidv6:()=>Sd,uuidv7:()=>Id,void:()=>ep,xid:()=>Td});var ie={};ue(ie,{$ZodAny:()=>bi,$ZodArray:()=>Ke,$ZodAsyncError:()=>X,$ZodBase64:()=>di,$ZodBase64URL:()=>pi,$ZodBigInt:()=>Dt,$ZodBigIntFormat:()=>vi,$ZodBoolean:()=>We,$ZodCIDRv4:()=>ci,$ZodCIDRv6:()=>ui,$ZodCUID:()=>Xn,$ZodCUID2:()=>Yn,$ZodCatch:()=>Li,$ZodCheck:()=>E,$ZodCheckBigIntFormat:()=>zn,$ZodCheckEndsWith:()=>Cn,$ZodCheckGreaterThan:()=>Nt,$ZodCheckIncludes:()=>An,$ZodCheckLengthEquals:()=>Tn,$ZodCheckLessThan:()=>Ot,$ZodCheckLowerCase:()=>Zn,$ZodCheckMaxLength:()=>On,$ZodCheckMaxSize:()=>Pn,$ZodCheckMimeType:()=>Mn,$ZodCheckMinLength:()=>Nn,$ZodCheckMinSize:()=>jn,$ZodCheckMultipleOf:()=>Sn,$ZodCheckNumberFormat:()=>In,$ZodCheckOverwrite:()=>Vn,$ZodCheckProperty:()=>Ln,$ZodCheckRegex:()=>En,$ZodCheckSizeEquals:()=>Un,$ZodCheckStartsWith:()=>Rn,$ZodCheckStringFormat:()=>Se,$ZodCheckUpperCase:()=>Dn,$ZodCustom:()=>Wi,$ZodCustomStringFormat:()=>fi,$ZodDate:()=>ki,$ZodDefault:()=>Di,$ZodDiscriminatedUnion:()=>Ii,$ZodE164:()=>mi,$ZodEmail:()=>Kn,$ZodEmoji:()=>Gn,$ZodEnum:()=>Oi,$ZodError:()=>Ve,$ZodFile:()=>Ti,$ZodFunction:()=>sr,$ZodGUID:()=>qn,$ZodIPv4:()=>ai,$ZodIPv6:()=>si,$ZodISODate:()=>ni,$ZodISODateTime:()=>ri,$ZodISODuration:()=>oi,$ZodISOTime:()=>ii,$ZodIntersection:()=>zi,$ZodJWT:()=>gi,$ZodKSUID:()=>ti,$ZodLazy:()=>qi,$ZodLiteral:()=>Ni,$ZodMap:()=>ji,$ZodNaN:()=>Mi,$ZodNanoID:()=>Hn,$ZodNever:()=>wi,$ZodNonOptional:()=>Ri,$ZodNull:()=>yi,$ZodNullable:()=>Zi,$ZodNumber:()=>Zt,$ZodNumberFormat:()=>hi,$ZodObject:()=>Si,$ZodOptional:()=>Ei,$ZodPipe:()=>Ge,$ZodPrefault:()=>Ai,$ZodPromise:()=>Fi,$ZodReadonly:()=>Vi,$ZodRealError:()=>ke,$ZodRecord:()=>Pi,$ZodRegistry:()=>ze,$ZodSet:()=>Ui,$ZodString:()=>he,$ZodStringFormat:()=>U,$ZodSuccess:()=>Ci,$ZodSymbol:()=>_i,$ZodTemplateLiteral:()=>Ji,$ZodTransform:()=>Be,$ZodTuple:()=>ve,$ZodType:()=>k,$ZodULID:()=>Qn,$ZodURL:()=>Bn,$ZodUUID:()=>Wn,$ZodUndefined:()=>$i,$ZodUnion:()=>At,$ZodUnknown:()=>Ie,$ZodVoid:()=>xi,$ZodXID:()=>ei,$brand:()=>Tr,$constructor:()=>u,$input:()=>Bi,$output:()=>Ki,Doc:()=>qe,JSONSchema:()=>Ys,JSONSchemaGenerator:()=>dt,NEVER:()=>Nr,TimePrecision:()=>Xi,_any:()=>$o,_array:()=>lt,_base64:()=>nr,_base64url:()=>ir,_bigint:()=>po,_boolean:()=>uo,_catch:()=>pd,_cidrv4:()=>tr,_cidrv6:()=>rr,_coercedBigint:()=>mo,_coercedBoolean:()=>lo,_coercedDate:()=>xo,_coercedNumber:()=>no,_coercedString:()=>Hi,_cuid:()=>Bt,_cuid2:()=>Gt,_custom:()=>No,_date:()=>wo,_default:()=>ud,_discriminatedUnion:()=>Yl,_e164:()=>or,_email:()=>Lt,_emoji:()=>Wt,_endsWith:()=>it,_enum:()=>nd,_file:()=>Oo,_float32:()=>oo,_float64:()=>ao,_gt:()=>re,_gte:()=>L,_guid:()=>Xe,_includes:()=>rt,_int:()=>io,_int32:()=>so,_int64:()=>go,_intersection:()=>Ql,_ipv4:()=>Qt,_ipv6:()=>er,_isoDate:()=>Qi,_isoDateTime:()=>Yi,_isoDuration:()=>to,_isoTime:()=>eo,_jwt:()=>ar,_ksuid:()=>Yt,_lazy:()=>hd,_length:()=>Oe,_literal:()=>od,_lowercase:()=>et,_lt:()=>te,_lte:()=>W,_map:()=>td,_max:()=>W,_maxLength:()=>Ue,_maxSize:()=>je,_mime:()=>ot,_min:()=>L,_minLength:()=>ce,_minSize:()=>$e,_multipleOf:()=>_e,_nan:()=>ko,_nanoid:()=>Kt,_nativeEnum:()=>id,_negative:()=>Io,_never:()=>yo,_nonnegative:()=>Po,_nonoptional:()=>ld,_nonpositive:()=>zo,_normalize:()=>at,_null:()=>_o,_nullable:()=>cd,_number:()=>ro,_optional:()=>sd,_overwrite:()=>ne,_parse:()=>kt,_parseAsync:()=>It,_pipe:()=>md,_positive:()=>So,_promise:()=>vd,_property:()=>jo,_readonly:()=>gd,_record:()=>ed,_refine:()=>To,_regex:()=>Qe,_safeParse:()=>Pt,_safeParseAsync:()=>jt,_set:()=>rd,_size:()=>Ye,_startsWith:()=>nt,_string:()=>Gi,_stringFormat:()=>Zo,_stringbool:()=>Eo,_success:()=>dd,_symbol:()=>ho,_templateLiteral:()=>fd,_toLowerCase:()=>ct,_toUpperCase:()=>ut,_transform:()=>ad,_trim:()=>st,_tuple:()=>Uo,_uint32:()=>co,_uint64:()=>fo,_ulid:()=>Ht,_undefined:()=>vo,_union:()=>Xl,_unknown:()=>Pe,_uppercase:()=>tt,_url:()=>qt,_uuid:()=>Mt,_uuidv4:()=>Vt,_uuidv6:()=>Jt,_uuidv7:()=>Ft,_void:()=>bo,_xid:()=>Xt,clone:()=>V,config:()=>Z,flattenError:()=>Je,formatError:()=>Fe,function:()=>Do,globalConfig:()=>Ee,globalRegistry:()=>Y,isValidBase64:()=>li,isValidBase64URL:()=>us,isValidJWT:()=>ls,locales:()=>He,parse:()=>St,parseAsync:()=>zt,prettifyError:()=>Wr,regexes:()=>fe,registry:()=>Ct,safeParse:()=>Kr,safeParseAsync:()=>Br,toDotPath:()=>Wa,toJSONSchema:()=>Ao,treeifyError:()=>qr,util:()=>$,version:()=>Jn});var Nr=Object.freeze({status:"aborted"});function u(e,r,n){function o(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),r(s,c);for(let m in a.prototype)m in s||Object.defineProperty(s,m,{value:a.prototype[m].bind(s)});s._zod.constr=a,s._zod.def=c}let t=n?.Parent??Object;class i extends t{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let m of l._zod.deferred)m();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Tr=Symbol("zod_brand"),X=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ee={};function Z(e){return e&&Object.assign(Ee,e),Ee}var $={};ue($,{BIGINT_FORMAT_RANGES:()=>Jr,Class:()=>Zr,NUMBER_FORMAT_RANGES:()=>Vr,aborted:()=>me,allowsEval:()=>Cr,assert:()=>Ru,assertEqual:()=>Eu,assertIs:()=>Du,assertNever:()=>Au,assertNotEqual:()=>Zu,assignProp:()=>Rr,cached:()=>Ae,captureStackTrace:()=>xt,cleanEnum:()=>Xu,cleanRegex:()=>Re,clone:()=>V,createTransparentProxy:()=>Fu,defineLazy:()=>j,esc:()=>pe,escapeRegex:()=>ee,extend:()=>Ku,finalizeIssue:()=>J,floatSafeRemainder:()=>Ar,getElementAtPath:()=>Cu,getEnumValues:()=>De,getLengthableOrigin:()=>Me,getParsedType:()=>Ju,getSizableOrigin:()=>Le,isObject:()=>we,isPlainObject:()=>xe,issue:()=>Fr,joinValues:()=>g,jsonStringifyReplacer:()=>Dr,merge:()=>Bu,normalizeParams:()=>f,nullish:()=>se,numKeys:()=>Vu,omit:()=>Wu,optionalKeys:()=>Mr,partial:()=>Gu,pick:()=>qu,prefixIssues:()=>C,primitiveTypes:()=>Lr,promiseAllObject:()=>Lu,propertyKeyTypes:()=>Ce,randomString:()=>Mu,required:()=>Hu,stringifyPrimitive:()=>_,unwrapMessage:()=>Ze});function Eu(e){return e}function Zu(e){return e}function Du(e){}function Au(e){throw new Error}function Ru(e){}function De(e){let r=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,t])=>r.indexOf(+o)===-1).map(([o,t])=>t)}function g(e,r="|"){return e.map(n=>_(n)).join(r)}function Dr(e,r){return typeof r=="bigint"?r.toString():r}function Ae(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function se(e){return e==null}function Re(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Ar(e,r){let n=(e.toString().split(".")[1]||"").length,o=(r.toString().split(".")[1]||"").length,t=n>o?n:o,i=Number.parseInt(e.toFixed(t).replace(".","")),a=Number.parseInt(r.toFixed(t).replace(".",""));return i%a/10**t}function j(e,r,n){Object.defineProperty(e,r,{get(){{let t=n();return e[r]=t,t}throw new Error("cached value already set")},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function Rr(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cu(e,r){return r?r.reduce((n,o)=>n?.[o],e):e}function Lu(e){let r=Object.keys(e),n=r.map(o=>e[o]);return Promise.all(n).then(o=>{let t={};for(let i=0;i<r.length;i++)t[r[i]]=o[i];return t})}function Mu(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=r[Math.floor(Math.random()*r.length)];return n}function pe(e){return JSON.stringify(e)}var xt=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Cr=Ae(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xe(e){if(we(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(we(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Vu(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var Ju=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},Ce=new Set(["string","number","symbol"]),Lr=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(e,r,n){let o=new e._zod.constr(r??e._zod.def);return(!r||n?.parent)&&(o._zod.parent=e),o}function f(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Fu(e){let r;return new Proxy({},{get(n,o,t){return r??(r=e()),Reflect.get(r,o,t)},set(n,o,t,i){return r??(r=e()),Reflect.set(r,o,t,i)},has(n,o){return r??(r=e()),Reflect.has(r,o)},deleteProperty(n,o){return r??(r=e()),Reflect.deleteProperty(r,o)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,o){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(n,o,t){return r??(r=e()),Reflect.defineProperty(r,o,t)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Mr(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var Vr={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]},Jr={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function qu(e,r){let n={},o=e._zod.def;for(let t in r){if(!(t in o.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=o.shape[t])}return V(e,{...e._zod.def,shape:n,checks:[]})}function Wu(e,r){let n={...e._zod.def.shape},o=e._zod.def;for(let t in r){if(!(t in o.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&delete n[t]}return V(e,{...e._zod.def,shape:n,checks:[]})}function Ku(e,r){if(!xe(r))throw new Error("Invalid input to extend: expected a plain object");let n={...e._zod.def,get shape(){let o={...e._zod.def.shape,...r};return Rr(this,"shape",o),o},checks:[]};return V(e,n)}function Bu(e,r){return V(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...r._zod.def.shape};return Rr(this,"shape",n),n},catchall:r._zod.def.catchall,checks:[]})}function Gu(e,r,n){let o=r._zod.def.shape,t={...o};if(n)for(let i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(t[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)t[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return V(r,{...r._zod.def,shape:t,checks:[]})}function Hu(e,r,n){let o=r._zod.def.shape,t={...o};if(n)for(let i in n){if(!(i in t))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(t[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)t[i]=new e({type:"nonoptional",innerType:o[i]});return V(r,{...r._zod.def,shape:t,checks:[]})}function me(e,r=0){for(let n=r;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function C(e,r){return r.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Ze(e){return typeof e=="string"?e:e?.message}function J(e,r,n){let o={...e,path:e.path??[]};if(!e.message){let t=Ze(e.inst?._zod.def?.error?.(e))??Ze(r?.error?.(e))??Ze(n.customError?.(e))??Ze(n.localeError?.(e))??"Invalid input";o.message=t}return delete o.inst,delete o.continue,r?.reportInput||delete o.input,o}function Le(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Me(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Fr(...e){let[r,n,o]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:o}:{...r}}function Xu(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}var Zr=class{constructor(...r){}};var qa=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(r,Dr,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ve=u("$ZodError",qa),ke=u("$ZodError",qa,{Parent:Error});function Je(e,r=n=>n.message){let n={},o=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):o.push(r(t));return{formErrors:o,fieldErrors:n}}function Fe(e,r){let n=r||function(i){return i.message},o={_errors:[]},t=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>t({issues:s}));else if(a.code==="invalid_key")t({issues:a.issues});else if(a.code==="invalid_element")t({issues:a.issues});else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return t(e),o}function qr(e,r){let n=r||function(i){return i.message},o={errors:[]},t=(i,a=[])=>{var s,c;for(let l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(m=>t({issues:m},l.path));else if(l.code==="invalid_key")t({issues:l.issues},l.path);else if(l.code==="invalid_element")t({issues:l.issues},l.path);else{let m=[...a,...l.path];if(m.length===0){o.errors.push(n(l));continue}let d=o,h=0;for(;h<m.length;){let v=m[h],p=h===m.length-1;typeof v=="string"?(d.properties??(d.properties={}),(s=d.properties)[v]??(s[v]={errors:[]}),d=d.properties[v]):(d.items??(d.items=[]),(c=d.items)[v]??(c[v]={errors:[]}),d=d.items[v]),p&&d.errors.push(n(l)),h++}}};return t(e),o}function Wa(e){let r=[];for(let n of e)typeof n=="number"?r.push(`[${n}]`):typeof n=="symbol"?r.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?r.push(`[${JSON.stringify(n)}]`):(r.length&&r.push("."),r.push(n));return r.join("")}function Wr(e){let r=[],n=[...e.issues].sort((o,t)=>o.path.length-t.path.length);for(let o of n)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${Wa(o.path)}`);return r.join(`
2
- `)}var kt=e=>(r,n,o,t)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new X;if(a.issues.length){let s=new(t?.Err??e)(a.issues.map(c=>J(c,i,Z())));throw xt(s,t?.callee),s}return a.value},St=kt(ke),It=e=>async(r,n,o,t)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(t?.Err??e)(a.issues.map(c=>J(c,i,Z())));throw xt(s,t?.callee),s}return a.value},zt=It(ke),Pt=e=>(r,n,o)=>{let t=o?{...o,async:!1}:{async:!1},i=r._zod.run({value:n,issues:[]},t);if(i instanceof Promise)throw new X;return i.issues.length?{success:!1,error:new(e??Ve)(i.issues.map(a=>J(a,t,Z())))}:{success:!0,data:i.value}},Kr=Pt(ke),jt=e=>async(r,n,o)=>{let t=o?Object.assign(o,{async:!0}):{async:!0},i=r._zod.run({value:n,issues:[]},t);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>J(a,t,Z())))}:{success:!0,data:i.value}},Br=jt(ke);var fe={};ue(fe,{base64:()=>ln,base64url:()=>Ut,bigint:()=>vn,boolean:()=>yn,browserEmail:()=>al,cidrv4:()=>cn,cidrv6:()=>un,cuid:()=>Gr,cuid2:()=>Hr,date:()=>mn,datetime:()=>fn,domain:()=>cl,duration:()=>tn,e164:()=>pn,email:()=>nn,emoji:()=>on,extendedDuration:()=>Qu,guid:()=>rn,hostname:()=>dn,html5Email:()=>nl,integer:()=>_n,ipv4:()=>an,ipv6:()=>sn,ksuid:()=>Qr,lowercase:()=>xn,nanoid:()=>en,null:()=>bn,number:()=>$n,rfc5322Email:()=>il,string:()=>hn,time:()=>gn,ulid:()=>Xr,undefined:()=>wn,unicodeEmail:()=>ol,uppercase:()=>kn,uuid:()=>ge,uuid4:()=>el,uuid6:()=>tl,uuid7:()=>rl,xid:()=>Yr});var Gr=/^[cC][^\s-]{8,}$/,Hr=/^[0-9a-z]+$/,Xr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yr=/^[0-9a-vA-V]{20}$/,Qr=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/,tn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qu=/^[-+]?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)?)??$/,rn=/^([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})$/,ge=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,el=ge(4),tl=ge(6),rl=ge(7),nn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,nl=/^[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])?)*$/,il=/^(([^<>()\[\]\\.,;:\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,}))$/,ol=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,al=/^[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])?)*$/,sl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function on(){return new RegExp(sl,"u")}var an=/^(?:(?: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])$/,sn=/^(([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})$/,cn=/^((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])$/,un=/^(([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])$/,ln=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,dn=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,cl=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pn=/^\+(?:[0-9]){6,14}[0-9]$/,Ka="(?:(?:\\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])))",mn=new RegExp(`^${Ka}$`);function Ba(e){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gn(e){return new RegExp(`^${Ba(e)}$`)}function fn(e){let r=Ba({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");let o=`${r}(?:${n.join("|")})`;return new RegExp(`^${Ka}T(?:${o})$`)}var hn=e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},vn=/^\d+n?$/,_n=/^\d+$/,$n=/^-?\d+(?:\.\d+)?/i,yn=/true|false/i,bn=/null/i;var wn=/undefined/i;var xn=/^[^A-Z]*$/,kn=/^[^a-z]*$/;var E=u("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),Ha={number:"number",bigint:"bigint",object:"date"},Ot=u("$ZodCheckLessThan",(e,r)=>{E.init(e,r);let n=Ha[typeof r.value];e._zod.onattach.push(o=>{let t=o._zod.bag,i=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<i&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:n,code:"too_big",maximum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Nt=u("$ZodCheckGreaterThan",(e,r)=>{E.init(e,r);let n=Ha[typeof r.value];e._zod.onattach.push(o=>{let t=o._zod.bag,i=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>i&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:n,code:"too_small",minimum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Sn=u("$ZodCheckMultipleOf",(e,r)=>{E.init(e,r),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Ar(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),In=u("$ZodCheckNumberFormat",(e,r)=>{E.init(e,r),r.format=r.format||"float64";let n=r.format?.includes("int"),o=n?"int":"number",[t,i]=Vr[r.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=r.format,s.minimum=t,s.maximum=i,n&&(s.pattern=_n)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:r.format,code:"invalid_type",input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort});return}}s<t&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e})}}),zn=u("$ZodCheckBigIntFormat",(e,r)=>{E.init(e,r);let[n,o]=Jr[r.format];e._zod.onattach.push(t=>{let i=t._zod.bag;i.format=r.format,i.minimum=n,i.maximum=o}),e._zod.check=t=>{let i=t.value;i<n&&t.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),i>o&&t.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),Pn=u("$ZodCheckMaxSize",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(o._zod.bag.maximum=r.maximum)}),e._zod.check=o=>{let t=o.value;t.size<=r.maximum||o.issues.push({origin:Le(t),code:"too_big",maximum:r.maximum,input:t,inst:e,continue:!r.abort})}}),jn=u("$ZodCheckMinSize",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{let t=o.value;t.size>=r.minimum||o.issues.push({origin:Le(t),code:"too_small",minimum:r.minimum,input:t,inst:e,continue:!r.abort})}}),Un=u("$ZodCheckSizeEquals",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=o=>{let t=o.value,i=t.size;if(i===r.size)return;let a=i>r.size;o.issues.push({origin:Le(t),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),On=u("$ZodCheckMaxLength",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(o._zod.bag.maximum=r.maximum)}),e._zod.check=o=>{let t=o.value;if(t.length<=r.maximum)return;let a=Me(t);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Nn=u("$ZodCheckMinLength",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{let t=o.value;if(t.length>=r.minimum)return;let a=Me(t);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Tn=u("$ZodCheckLengthEquals",(e,r)=>{var n;E.init(e,r),(n=e._zod.def).when??(n.when=o=>{let t=o.value;return!se(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=o=>{let t=o.value,i=t.length;if(i===r.length)return;let a=Me(t),s=i>r.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),Se=u("$ZodCheckStringFormat",(e,r)=>{var n,o;E.init(e,r),e._zod.onattach.push(t=>{let i=t._zod.bag;i.format=r.format,r.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(o=e._zod).check??(o.check=()=>{})}),En=u("$ZodCheckRegex",(e,r)=>{Se.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Zn=u("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=xn),Se.init(e,r)}),Dn=u("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=kn),Se.init(e,r)}),An=u("$ZodCheckIncludes",(e,r)=>{E.init(e,r);let n=ee(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=o,e._zod.onattach.push(t=>{let i=t._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Rn=u("$ZodCheckStartsWith",(e,r)=>{E.init(e,r);let n=new RegExp(`^${ee(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(o=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),Cn=u("$ZodCheckEndsWith",(e,r)=>{E.init(e,r);let n=new RegExp(`.*${ee(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(o=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}});function Ga(e,r,n){e.issues.length&&r.issues.push(...C(n,e.issues))}var Ln=u("$ZodCheckProperty",(e,r)=>{E.init(e,r),e._zod.check=n=>{let o=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(t=>Ga(t,n,r.property));Ga(o,n,r.property)}}),Mn=u("$ZodCheckMimeType",(e,r)=>{E.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:e})}}),Vn=u("$ZodCheckOverwrite",(e,r)=>{E.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var qe=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
3
- `).filter(a=>a),t=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let r=Function,n=this?.args,t=[...(this?.content??[""]).map(i=>` ${i}`)];return new r(...n,t.join(`
4
- `))}};var Jn={major:4,minor:0,patch:5};var k=u("$ZodType",(e,r)=>{var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Jn;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let t of o)for(let i of t._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(i,a,s)=>{let c=me(i),l;for(let m of a){if(m._zod.def.when){if(!m._zod.def.when(i))continue}else if(c)continue;let d=i.issues.length,h=m._zod.check(i);if(h instanceof Promise&&s?.async===!1)throw new X;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(c||(c=me(i,d)))});else{if(i.issues.length===d)continue;c||(c=me(i,d))}}return l?l.then(()=>i):i};e._zod.run=(i,a)=>{let s=e._zod.parse(i,a);if(s instanceof Promise){if(a.async===!1)throw new X;return s.then(c=>t(c,o,a))}return t(s,o,a)}}e["~standard"]={validate:t=>{try{let i=Kr(e,t);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Br(e,t).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),he=u("$ZodString",(e,r)=>{k.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hn(e._zod.bag),e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),U=u("$ZodStringFormat",(e,r)=>{Se.init(e,r),he.init(e,r)}),qn=u("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=rn),U.init(e,r)}),Wn=u("$ZodUUID",(e,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ge(o))}else r.pattern??(r.pattern=ge());U.init(e,r)}),Kn=u("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=nn),U.init(e,r)}),Bn=u("$ZodURL",(e,r)=>{U.init(e,r),e._zod.check=n=>{try{let o=n.value,t=new URL(o),i=t.href;r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:dn.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),!o.endsWith("/")&&i.endsWith("/")?n.value=i.slice(0,-1):n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),Gn=u("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=on()),U.init(e,r)}),Hn=u("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=en),U.init(e,r)}),Xn=u("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Gr),U.init(e,r)}),Yn=u("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Hr),U.init(e,r)}),Qn=u("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Xr),U.init(e,r)}),ei=u("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Yr),U.init(e,r)}),ti=u("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Qr),U.init(e,r)}),ri=u("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=fn(r)),U.init(e,r)}),ni=u("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=mn),U.init(e,r)}),ii=u("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=gn(r)),U.init(e,r)}),oi=u("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=tn),U.init(e,r)}),ai=u("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=an),U.init(e,r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format="ipv4"})}),si=u("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=sn),U.init(e,r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.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:!r.abort})}}}),ci=u("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=cn),U.init(e,r)}),ui=u("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=un),U.init(e,r),e._zod.check=n=>{let[o,t]=n.value.split("/");try{if(!t)throw new Error;let i=Number(t);if(`${i}`!==t)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function li(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var di=u("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=ln),U.init(e,r),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{li(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function us(e){if(!Ut.test(e))return!1;let r=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return li(n)}var pi=u("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=Ut),U.init(e,r),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{us(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),mi=u("$ZodE164",(e,r)=>{r.pattern??(r.pattern=pn),U.init(e,r)});function ls(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let t=JSON.parse(atob(o));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}var gi=u("$ZodJWT",(e,r)=>{U.init(e,r),e._zod.check=n=>{ls(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),fi=u("$ZodCustomStringFormat",(e,r)=>{U.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),Zt=u("$ZodNumber",(e,r)=>{k.init(e,r),e._zod.pattern=e._zod.bag.pattern??$n,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let i=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...i?{received:i}:{}}),n}}),hi=u("$ZodNumber",(e,r)=>{In.init(e,r),Zt.init(e,r)}),We=u("$ZodBoolean",(e,r)=>{k.init(e,r),e._zod.pattern=yn,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Dt=u("$ZodBigInt",(e,r)=>{k.init(e,r),e._zod.pattern=vn,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),vi=u("$ZodBigInt",(e,r)=>{zn.init(e,r),Dt.init(e,r)}),_i=u("$ZodSymbol",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),$i=u("$ZodUndefined",(e,r)=>{k.init(e,r),e._zod.pattern=wn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),yi=u("$ZodNull",(e,r)=>{k.init(e,r),e._zod.pattern=bn,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),bi=u("$ZodAny",(e,r)=>{k.init(e,r),e._zod.parse=n=>n}),Ie=u("$ZodUnknown",(e,r)=>{k.init(e,r),e._zod.parse=n=>n}),wi=u("$ZodNever",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),xi=u("$ZodVoid",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),ki=u("$ZodDate",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,i=t instanceof Date;return i&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Ya(e,r,n){e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[n]=e.value}var Ke=u("$ZodArray",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let i=[];for(let a=0;a<t.length;a++){let s=t[a],c=r.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>Ya(l,n,a))):Ya(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function Tt(e,r,n){e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[n]=e.value}function Qa(e,r,n,o){e.issues.length?o[n]===void 0?n in o?r.value[n]=void 0:r.value[n]=e.value:r.issues.push(...C(n,e.issues)):e.value===void 0?n in o&&(r.value[n]=void 0):r.value[n]=e.value}var Si=u("$ZodObject",(e,r)=>{k.init(e,r);let n=Ae(()=>{let d=Object.keys(r.shape);for(let v of d)if(!(r.shape[v]instanceof k))throw new Error(`Invalid element at key "${v}": expected a Zod schema`);let h=Mr(r.shape);return{shape:r.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(h)}});j(e._zod,"propValues",()=>{let d=r.shape,h={};for(let v in d){let p=d[v]._zod;if(p.values){h[v]??(h[v]=new Set);for(let y of p.values)h[v].add(y)}}return h});let o=d=>{let h=new qe(["shape","payload","ctx"]),v=n.value,p=w=>{let x=pe(w);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};h.write("const input = payload.value;");let y=Object.create(null),b=0;for(let w of v.keys)y[w]=`key_${b++}`;h.write("const newResult = {}");for(let w of v.keys)if(v.optionalKeys.has(w)){let x=y[w];h.write(`const ${x} = ${p(w)};`);let I=pe(w);h.write(`
5
- if (${x}.issues.length) {
6
- if (input[${I}] === undefined) {
7
- if (${I} in input) {
8
- newResult[${I}] = undefined;
9
- }
10
- } else {
11
- payload.issues = payload.issues.concat(
12
- ${x}.issues.map((iss) => ({
13
- ...iss,
14
- path: iss.path ? [${I}, ...iss.path] : [${I}],
15
- }))
16
- );
17
- }
18
- } else if (${x}.value === undefined) {
19
- if (${I} in input) newResult[${I}] = undefined;
20
- } else {
21
- newResult[${I}] = ${x}.value;
22
- }
23
- `)}else{let x=y[w];h.write(`const ${x} = ${p(w)};`),h.write(`
24
- if (${x}.issues.length) payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
25
- ...iss,
26
- path: iss.path ? [${pe(w)}, ...iss.path] : [${pe(w)}]
27
- })));`),h.write(`newResult[${pe(w)}] = ${x}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");let z=h.compile();return(w,x)=>z(d,w,x)},t,i=we,a=!Ee.jitless,c=a&&Cr.value,l=r.catchall,m;e._zod.parse=(d,h)=>{m??(m=n.value);let v=d.value;if(!i(v))return d.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),d;let p=[];if(a&&c&&h?.async===!1&&h.jitless!==!0)t||(t=o(r.shape)),d=t(d,h);else{d.value={};let x=m.shape;for(let I of m.keys){let A=x[I],T=A._zod.run({value:v[I],issues:[]},h),F=A._zod.optin==="optional"&&A._zod.optout==="optional";T instanceof Promise?p.push(T.then(M=>F?Qa(M,d,I,v):Tt(M,d,I))):F?Qa(T,d,I,v):Tt(T,d,I)}}if(!l)return p.length?Promise.all(p).then(()=>d):d;let y=[],b=m.keySet,z=l._zod,w=z.def.type;for(let x of Object.keys(v)){if(b.has(x))continue;if(w==="never"){y.push(x);continue}let I=z.run({value:v[x],issues:[]},h);I instanceof Promise?p.push(I.then(A=>Tt(A,d,x))):Tt(I,d,x)}return y.length&&d.issues.push({code:"unrecognized_keys",keys:y,input:v,inst:e}),p.length?Promise.all(p).then(()=>d):d}});function es(e,r,n,o){for(let t of e)if(t.issues.length===0)return r.value=t.value,r;return r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(t=>t.issues.map(i=>J(i,o,Z())))}),r}var At=u("$ZodUnion",(e,r)=>{k.init(e,r),j(e._zod,"optin",()=>r.options.some(n=>n._zod.optin==="optional")?"optional":void 0),j(e._zod,"optout",()=>r.options.some(n=>n._zod.optout==="optional")?"optional":void 0),j(e._zod,"values",()=>{if(r.options.every(n=>n._zod.values))return new Set(r.options.flatMap(n=>Array.from(n._zod.values)))}),j(e._zod,"pattern",()=>{if(r.options.every(n=>n._zod.pattern)){let n=r.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Re(o.source)).join("|")})$`)}}),e._zod.parse=(n,o)=>{let t=!1,i=[];for(let a of r.options){let s=a._zod.run({value:n.value,issues:[]},o);if(s instanceof Promise)i.push(s),t=!0;else{if(s.issues.length===0)return s;i.push(s)}}return t?Promise.all(i).then(a=>es(a,n,e,o)):es(i,n,e,o)}}),Ii=u("$ZodDiscriminatedUnion",(e,r)=>{At.init(e,r);let n=e._zod.parse;j(e._zod,"propValues",()=>{let t={};for(let i of r.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){t[s]||(t[s]=new Set);for(let l of c)t[s].add(l)}}return t});let o=Ae(()=>{let t=r.options,i=new Map;for(let a of t){let s=a._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(t,i)=>{let a=t.value;if(!we(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;let s=o.value.get(a?.[r.discriminator]);return s?s._zod.run(t,i):r.unionFallback?n(t,i):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[r.discriminator],inst:e}),t)}}),zi=u("$ZodIntersection",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value,i=r.left._zod.run({value:t,issues:[]},o),a=r.right._zod.run({value:t,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>ts(n,c,l)):ts(n,i,a)}});function Fn(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(xe(e)&&xe(r)){let n=Object.keys(r),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),t={...e,...r};for(let i of o){let a=Fn(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};t[i]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let t=e[o],i=r[o],a=Fn(t,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ts(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),me(e))return e;let o=Fn(r.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var ve=u("$ZodTuple",(e,r)=>{k.init(e,r);let n=r.items,o=n.length-[...n].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,i)=>{let a=t.value;if(!Array.isArray(a))return t.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];let s=[];if(!r.rest){let l=a.length>n.length,m=a.length<o-1;if(l||m)return t.issues.push({input:a,inst:e,origin:"array",...l?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length}}),t}let c=-1;for(let l of n){if(c++,c>=a.length&&c>=o)continue;let m=l._zod.run({value:a[c],issues:[]},i);m instanceof Promise?s.push(m.then(d=>Et(d,t,c))):Et(m,t,c)}if(r.rest){let l=a.slice(n.length);for(let m of l){c++;let d=r.rest._zod.run({value:m,issues:[]},i);d instanceof Promise?s.push(d.then(h=>Et(h,t,c))):Et(d,t,c)}}return s.length?Promise.all(s).then(()=>t):t}});function Et(e,r,n){e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[n]=e.value}var Pi=u("$ZodRecord",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!xe(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let i=[];if(r.keyType._zod.values){let a=r.keyType._zod.values;n.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=r.valueType._zod.run({value:t[c],issues:[]},o);l instanceof Promise?i.push(l.then(m=>{m.issues.length&&n.issues.push(...C(c,m.issues)),n.value[c]=m.value})):(l.issues.length&&n.issues.push(...C(c,l.issues)),n.value[c]=l.value)}let s;for(let c in t)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:s})}else{n.value={};for(let a of Reflect.ownKeys(t)){if(a==="__proto__")continue;let s=r.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(l=>J(l,o,Z())),input:a,path:[a],inst:e}),n.value[s.value]=s.value;continue}let c=r.valueType._zod.run({value:t[a],issues:[]},o);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...C(a,l.issues)),n.value[s.value]=l.value})):(c.issues.length&&n.issues.push(...C(a,c.issues)),n.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ji=u("$ZodMap",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of t){let c=r.keyType._zod.run({value:a,issues:[]},o),l=r.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([m,d])=>{rs(m,d,n,a,t,e,o)})):rs(c,l,n,a,t,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function rs(e,r,n,o,t,i,a){e.issues.length&&(Ce.has(typeof o)?n.issues.push(...C(o,e.issues)):n.issues.push({origin:"map",code:"invalid_key",input:t,inst:i,issues:e.issues.map(s=>J(s,a,Z()))})),r.issues.length&&(Ce.has(typeof o)?n.issues.push(...C(o,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:o,issues:r.issues.map(s=>J(s,a,Z()))})),n.value.set(e.value,r.value)}var Ui=u("$ZodSet",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of t){let s=r.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>ns(c,n))):ns(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function ns(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Oi=u("$ZodEnum",(e,r)=>{k.init(e,r);let n=De(r.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(o=>Ce.has(typeof o)).map(o=>typeof o=="string"?ee(o):o.toString()).join("|")})$`),e._zod.parse=(o,t)=>{let i=o.value;return e._zod.values.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),Ni=u("$ZodLiteral",(e,r)=>{k.init(e,r),e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(n=>typeof n=="string"?ee(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let t=n.value;return e._zod.values.has(t)||n.issues.push({code:"invalid_value",values:r.values,input:t,inst:e}),n}}),Ti=u("$ZodFile",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Be=u("$ZodTransform",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=r.transform(n.value,n);if(o.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(n.value=a,n));if(t instanceof Promise)throw new X;return n.value=t,n}}),Ei=u("$ZodOptional",(e,r)=>{k.init(e,r),e._zod.optin="optional",e._zod.optout="optional",j(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),j(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Re(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>r.innerType._zod.optin==="optional"?r.innerType._zod.run(n,o):n.value===void 0?n:r.innerType._zod.run(n,o)}),Zi=u("$ZodNullable",(e,r)=>{k.init(e,r),j(e._zod,"optin",()=>r.innerType._zod.optin),j(e._zod,"optout",()=>r.innerType._zod.optout),j(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Re(n.source)}|null)$`):void 0}),j(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:r.innerType._zod.run(n,o)}),Di=u("$ZodDefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",j(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>{if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,o);return t instanceof Promise?t.then(i=>is(i,r)):is(t,r)}});function is(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var Ai=u("$ZodPrefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",j(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>(n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,o))}),Ri=u("$ZodNonOptional",(e,r)=>{k.init(e,r),j(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let t=r.innerType._zod.run(n,o);return t instanceof Promise?t.then(i=>os(i,e)):os(t,e)}});function os(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Ci=u("$ZodSuccess",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>{let t=r.innerType._zod.run(n,o);return t instanceof Promise?t.then(i=>(n.value=i.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Li=u("$ZodCatch",(e,r)=>{k.init(e,r),e._zod.optin="optional",j(e._zod,"optout",()=>r.innerType._zod.optout),j(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>{let t=r.innerType._zod.run(n,o);return t instanceof Promise?t.then(i=>(n.value=i.value,i.issues.length&&(n.value=r.catchValue({...n,error:{issues:i.issues.map(a=>J(a,o,Z()))},input:n.value}),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(i=>J(i,o,Z()))},input:n.value}),n.issues=[]),n)}}),Mi=u("$ZodNaN",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ge=u("$ZodPipe",(e,r)=>{k.init(e,r),j(e._zod,"values",()=>r.in._zod.values),j(e._zod,"optin",()=>r.in._zod.optin),j(e._zod,"optout",()=>r.out._zod.optout),j(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,o)=>{let t=r.in._zod.run(n,o);return t instanceof Promise?t.then(i=>as(i,r,o)):as(t,r,o)}});function as(e,r,n){return me(e)?e:r.out._zod.run({value:e.value,issues:e.issues},n)}var Vi=u("$ZodReadonly",(e,r)=>{k.init(e,r),j(e._zod,"propValues",()=>r.innerType._zod.propValues),j(e._zod,"values",()=>r.innerType._zod.values),j(e._zod,"optin",()=>r.innerType._zod.optin),j(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(n,o)=>{let t=r.innerType._zod.run(n,o);return t instanceof Promise?t.then(ss):ss(t)}});function ss(e){return e.value=Object.freeze(e.value),e}var Ji=u("$ZodTemplateLiteral",(e,r)=>{k.init(e,r);let n=[];for(let o of r.parts)if(o instanceof k){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let t=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,a))}else if(o===null||Lr.has(typeof o))n.push(ee(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,t)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Fi=u("$ZodPromise",(e,r)=>{k.init(e,r),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},o))}),qi=u("$ZodLazy",(e,r)=>{k.init(e,r),j(e._zod,"innerType",()=>r.getter()),j(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),j(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),j(e._zod,"optin",()=>e._zod.innerType._zod.optin),j(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Wi=u("$ZodCustom",(e,r)=>{E.init(e,r),k.init(e,r),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,t=r.fn(o);if(t instanceof Promise)return t.then(i=>cs(i,n,o,e));cs(t,n,o,e)}});function cs(e,r,n,o){if(!e){let t={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(t.params=o._zod.def.params),r.issues.push(Fr(t))}}var He={};ue(He,{ar:()=>ps,az:()=>ms,be:()=>fs,ca:()=>hs,cs:()=>vs,de:()=>_s,en:()=>Rt,eo:()=>$s,es:()=>ys,fa:()=>bs,fi:()=>ws,fr:()=>xs,frCA:()=>ks,he:()=>Ss,hu:()=>Is,id:()=>zs,it:()=>Ps,ja:()=>js,kh:()=>Us,ko:()=>Os,mk:()=>Ns,ms:()=>Ts,nl:()=>Es,no:()=>Zs,ota:()=>Ds,pl:()=>Rs,ps:()=>As,pt:()=>Cs,ru:()=>Ms,sl:()=>Vs,sv:()=>Js,ta:()=>Fs,th:()=>qs,tr:()=>Ws,ua:()=>Ks,ur:()=>Bs,vi:()=>Gs,zhCN:()=>Hs,zhTW:()=>Xs});var ul=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return t=>{switch(t.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${_(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${g(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function ps(){return{localeError:ul()}}var ll=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={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",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"};return t=>{switch(t.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${t.expected}, daxil olan ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function ms(){return{localeError:ll()}}function gs(e,r,n,o){let t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?r:i>=2&&i<=4?n:o}var dl=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0456\u045E";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return t=>{switch(t.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${_(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),c=gs(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${t.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),c=gs(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${t.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function fs(){return{localeError:dl()}}var pl=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{switch(t.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${t.expected}, s'ha rebut ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${_(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${g(t.values," o ")}`;case"too_big":{let i=t.inclusive?"com a m\xE0xim":"menys de",a=r(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${i} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"com a m\xEDnim":"m\xE9s de",a=r(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${i} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function hs(){return{localeError:pl()}}var ml=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return t=>{switch(t.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${t.expected}, obdr\u017Eeno ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${g(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function vs(){return{localeError:ml()}}var gl=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{switch(t.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${t.expected}, erhalten ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function _s(){return{localeError:gl()}}var fl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},hl=()=>{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"}};function r(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${fl(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${_(o.values[0])}`:`Invalid option: expected one of ${g(o.values,"|")}`;case"too_big":{let t=o.inclusive?"<=":"<",i=r(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${t}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${t}${o.maximum.toString()}`}case"too_small":{let t=o.inclusive?">=":">",i=r(o.origin);return i?`Too small: expected ${o.origin} to have ${t}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${t}${o.minimum.toString()}`}case"invalid_format":{let t=o;return t.format==="starts_with"?`Invalid string: must start with "${t.prefix}"`:t.format==="ends_with"?`Invalid string: must end with "${t.suffix}"`:t.format==="includes"?`Invalid string: must include "${t.includes}"`:t.format==="regex"?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${g(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function Rt(){return{localeError:hl()}}var vl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},_l=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${vl(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${g(o.values,"|")}`;case"too_big":{let t=o.inclusive?"<=":"<",i=r(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()}`}case"too_small":{let t=o.inclusive?">=":">",i=r(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${t}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${t}${o.minimum.toString()}`}case"invalid_format":{let t=o;return t.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${t.prefix}"`:t.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${t.suffix}"`:t.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${g(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function $s(){return{localeError:_l()}}var $l=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(t))return"arreglo";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype)return t.constructor.name}}return i},o={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{switch(t.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${t.expected}, recibido ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Demasiado grande: se esperaba que ${t.origin??"valor"} tuviera ${i}${t.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${t.origin??"valor"} fuera ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Demasiado peque\xF1o: se esperaba que ${t.origin} tuviera ${i}${t.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${t.origin} fuera ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${o[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${t.origin}`;default:return"Entrada inv\xE1lida"}}};function ys(){return{localeError:$l()}}var yl=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(t))return"\u0622\u0631\u0627\u06CC\u0647";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return t=>{switch(t.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${n(t.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${_(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${g(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${g(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function bs(){return{localeError:yl()}}var bl=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{switch(t.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${t.expected}, oli ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function ws(){return{localeError:bl()}}var wl=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return t=>{switch(t.code){case"invalid_type":return`Entr\xE9e invalide : ${t.expected} attendu, ${n(t.input)} re\xE7u`;case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${_(t.values[0])} attendu`:`Option invalide : une valeur parmi ${g(t.values,"|")} attendue`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Trop grand : ${t.origin??"valeur"} doit ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${t.origin??"valeur"} doit \xEAtre ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Trop petit : ${t.origin} doit ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${t.origin} doit \xEAtre ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function xs(){return{localeError:wl()}}var xl=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return t=>{switch(t.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${t.expected}, re\xE7u ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${_(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u2264":"<",a=r(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u2265":">",a=r(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function ks(){return{localeError:xl()}}var kl=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return t=>{switch(t.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${t.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${_(t.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${t.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${t.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${t.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${t.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${t.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${t.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??t.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${t.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${t.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${t.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Ss(){return{localeError:kl()}}var Sl=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(t))return"t\xF6mb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return t=>{switch(t.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${t.expected}, a kapott \xE9rt\xE9k ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${t.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${i}${t.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Is(){return{localeError:Sl()}}var Il=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Input tidak valid: diharapkan ${t.expected}, diterima ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${_(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function zs(){return{localeError:Il()}}var zl=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Input non valido: atteso ${t.expected}, ricevuto ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input non valido: atteso ${_(t.values[0])}`:`Opzione non valida: atteso uno tra ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${g(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function Ps(){return{localeError:zl()}}var Pl=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(t))return"\u914D\u5217";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return t=>{switch(t.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${n(t.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${g(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=r(t.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=r(t.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${g(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function js(){return{localeError:Pl()}}var jl=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(t))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(t===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return t=>{switch(t.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${_(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${g(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Us(){return{localeError:jl()}}var Ul=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return t=>{switch(t.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${n(t.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${g(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(t.origin),c=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${c} ${i}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${i}${a}`}case"too_small":{let i=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(t.origin),c=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${c} ${i}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${g(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Os(){return{localeError:Ul()}}var Ol=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(t))return"\u043D\u0438\u0437\u0430";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return t=>{switch(t.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Invalid input: expected ${_(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Ns(){return{localeError:Ol()}}var Nl=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Input tidak sah: dijangka ${t.expected}, diterima ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${_(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Ts(){return{localeError:Nl()}}var Tl=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>{switch(t.code){case"invalid_type":return`Ongeldige invoer: verwacht ${t.expected}, ontving ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${_(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Te lang: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Te kort: verwacht dat ${t.origin} ${i}${t.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Es(){return{localeError:Tl()}}var El=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`Ugyldig input: forventet ${t.expected}, fikk ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${_(t.values[0])}`:`Ugyldig valg: forventet en av ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Zs(){return{localeError:El()}}var Zl=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return t=>{switch(t.code){case"invalid_type":return`F\xE2sit giren: umulan ${t.expected}, al\u0131nan ${n(t.input)}`;case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${_(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=t;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Ds(){return{localeError:Zl()}}var Dl=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(t))return"\u0627\u0631\u06D0";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return t=>{switch(t.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${n(t.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${_(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${g(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function As(){return{localeError:Dl()}}var Al=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return t=>{switch(t.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${t.expected}, otrzymano ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Rs(){return{localeError:Al()}}var Rl=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{switch(t.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${t.expected}, recebido ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${_(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function Cs(){return{localeError:Rl()}}function Ls(e,r,n,o){let t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?r:i>=2&&i<=4?n:o}var Cl=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return t=>{switch(t.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${_(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),c=Ls(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),c=Ls(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Ms(){return{localeError:Cl()}}var Ll=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{switch(t.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${t.expected}, prejeto ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${g(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Vs(){return{localeError:Ll()}}var Ml=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return t=>{switch(t.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${t.expected}, fick ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Js(){return{localeError:Ml()}}var Vl=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(t))return"\u0B85\u0BA3\u0BBF";if(t===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return t=>{switch(t.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${g(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Fs(){return{localeError:Vl()}}var Jl=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(t))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(t===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return t=>{switch(t.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${_(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${g(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function qs(){return{localeError:Jl()}}var Fl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},ql=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function r(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${Fl(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${g(o.values,"|")}`;case"too_big":{let t=o.inclusive?"<=":"<",i=r(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${t}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${t}${o.maximum.toString()}`}case"too_small":{let t=o.inclusive?">=":">",i=r(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${t}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${t}${o.minimum.toString()}`}case"invalid_format":{let t=o;return t.format==="starts_with"?`Ge\xE7ersiz metin: "${t.prefix}" ile ba\u015Flamal\u0131`:t.format==="ends_with"?`Ge\xE7ersiz metin: "${t.suffix}" ile bitmeli`:t.format==="includes"?`Ge\xE7ersiz metin: "${t.includes}" i\xE7ermeli`:t.format==="regex"?`Ge\xE7ersiz metin: ${t.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[t.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${g(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Ws(){return{localeError:ql()}}var Wl=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0438\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return t=>{switch(t.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Ks(){return{localeError:Wl()}}var Kl=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(t))return"\u0622\u0631\u06D2";if(t===null)return"\u0646\u0644";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return t=>{switch(t.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${n(t.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${g(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${i}${t.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${i}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${g(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Bs(){return{localeError:Kl()}}var Bl=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(t))return"m\u1EA3ng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return t=>{switch(t.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${g(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Gs(){return{localeError:Bl()}}var Gl=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(t))return"\u6570\u7EC4";if(t===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return t=>{switch(t.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Hs(){return{localeError:Gl()}}var Hl=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function r(t){return e[t]??null}let n=t=>{let i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return t=>{switch(t.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${t.expected}\uFF0C\u4F46\u6536\u5230 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${g(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Xs(){return{localeError:Hl()}}var Ki=Symbol("ZodOutput"),Bi=Symbol("ZodInput"),ze=class{constructor(){this._map=new Map,this._idmap=new Map}add(r,...n){let o=n[0];if(this._map.set(r,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){let n=r._zod.parent;if(n){let o={...this.get(n)??{}};return delete o.id,{...o,...this._map.get(r)}}return this._map.get(r)}has(r){return this._map.has(r)}};function Ct(){return new ze}var Y=Ct();function Gi(e,r){return new e({type:"string",...f(r)})}function Hi(e,r){return new e({type:"string",coerce:!0,...f(r)})}function Lt(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...f(r)})}function Xe(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...f(r)})}function Mt(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...f(r)})}function Vt(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...f(r)})}function Jt(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...f(r)})}function Ft(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...f(r)})}function qt(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...f(r)})}function Wt(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...f(r)})}function Kt(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...f(r)})}function Bt(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...f(r)})}function Gt(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...f(r)})}function Ht(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...f(r)})}function Xt(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...f(r)})}function Yt(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...f(r)})}function Qt(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...f(r)})}function er(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...f(r)})}function tr(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...f(r)})}function rr(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...f(r)})}function nr(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...f(r)})}function ir(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...f(r)})}function or(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...f(r)})}function ar(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...f(r)})}var Xi={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Yi(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...f(r)})}function Qi(e,r){return new e({type:"string",format:"date",check:"string_format",...f(r)})}function eo(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...f(r)})}function to(e,r){return new e({type:"string",format:"duration",check:"string_format",...f(r)})}function ro(e,r){return new e({type:"number",checks:[],...f(r)})}function no(e,r){return new e({type:"number",coerce:!0,checks:[],...f(r)})}function io(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...f(r)})}function oo(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...f(r)})}function ao(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...f(r)})}function so(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...f(r)})}function co(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...f(r)})}function uo(e,r){return new e({type:"boolean",...f(r)})}function lo(e,r){return new e({type:"boolean",coerce:!0,...f(r)})}function po(e,r){return new e({type:"bigint",...f(r)})}function mo(e,r){return new e({type:"bigint",coerce:!0,...f(r)})}function go(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...f(r)})}function fo(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...f(r)})}function ho(e,r){return new e({type:"symbol",...f(r)})}function vo(e,r){return new e({type:"undefined",...f(r)})}function _o(e,r){return new e({type:"null",...f(r)})}function $o(e){return new e({type:"any"})}function Pe(e){return new e({type:"unknown"})}function yo(e,r){return new e({type:"never",...f(r)})}function bo(e,r){return new e({type:"void",...f(r)})}function wo(e,r){return new e({type:"date",...f(r)})}function xo(e,r){return new e({type:"date",coerce:!0,...f(r)})}function ko(e,r){return new e({type:"nan",...f(r)})}function te(e,r){return new Ot({check:"less_than",...f(r),value:e,inclusive:!1})}function W(e,r){return new Ot({check:"less_than",...f(r),value:e,inclusive:!0})}function re(e,r){return new Nt({check:"greater_than",...f(r),value:e,inclusive:!1})}function L(e,r){return new Nt({check:"greater_than",...f(r),value:e,inclusive:!0})}function So(e){return re(0,e)}function Io(e){return te(0,e)}function zo(e){return W(0,e)}function Po(e){return L(0,e)}function _e(e,r){return new Sn({check:"multiple_of",...f(r),value:e})}function je(e,r){return new Pn({check:"max_size",...f(r),maximum:e})}function $e(e,r){return new jn({check:"min_size",...f(r),minimum:e})}function Ye(e,r){return new Un({check:"size_equals",...f(r),size:e})}function Ue(e,r){return new On({check:"max_length",...f(r),maximum:e})}function ce(e,r){return new Nn({check:"min_length",...f(r),minimum:e})}function Oe(e,r){return new Tn({check:"length_equals",...f(r),length:e})}function Qe(e,r){return new En({check:"string_format",format:"regex",...f(r),pattern:e})}function et(e){return new Zn({check:"string_format",format:"lowercase",...f(e)})}function tt(e){return new Dn({check:"string_format",format:"uppercase",...f(e)})}function rt(e,r){return new An({check:"string_format",format:"includes",...f(r),includes:e})}function nt(e,r){return new Rn({check:"string_format",format:"starts_with",...f(r),prefix:e})}function it(e,r){return new Cn({check:"string_format",format:"ends_with",...f(r),suffix:e})}function jo(e,r,n){return new Ln({check:"property",property:e,schema:r,...f(n)})}function ot(e,r){return new Mn({check:"mime_type",mime:e,...f(r)})}function ne(e){return new Vn({check:"overwrite",tx:e})}function at(e){return ne(r=>r.normalize(e))}function st(){return ne(e=>e.trim())}function ct(){return ne(e=>e.toLowerCase())}function ut(){return ne(e=>e.toUpperCase())}function lt(e,r,n){return new e({type:"array",element:r,...f(n)})}function Xl(e,r,n){return new e({type:"union",options:r,...f(n)})}function Yl(e,r,n,o){return new e({type:"union",options:n,discriminator:r,...f(o)})}function Ql(e,r,n){return new e({type:"intersection",left:r,right:n})}function Uo(e,r,n,o){let t=n instanceof k,i=t?o:n,a=t?n:null;return new e({type:"tuple",items:r,rest:a,...f(i)})}function ed(e,r,n,o){return new e({type:"record",keyType:r,valueType:n,...f(o)})}function td(e,r,n,o){return new e({type:"map",keyType:r,valueType:n,...f(o)})}function rd(e,r,n){return new e({type:"set",valueType:r,...f(n)})}function nd(e,r,n){let o=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e({type:"enum",entries:o,...f(n)})}function id(e,r,n){return new e({type:"enum",entries:r,...f(n)})}function od(e,r,n){return new e({type:"literal",values:Array.isArray(r)?r:[r],...f(n)})}function Oo(e,r){return new e({type:"file",...f(r)})}function ad(e,r){return new e({type:"transform",transform:r})}function sd(e,r){return new e({type:"optional",innerType:r})}function cd(e,r){return new e({type:"nullable",innerType:r})}function ud(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():n}})}function ld(e,r,n){return new e({type:"nonoptional",innerType:r,...f(n)})}function dd(e,r){return new e({type:"success",innerType:r})}function pd(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function md(e,r,n){return new e({type:"pipe",in:r,out:n})}function gd(e,r){return new e({type:"readonly",innerType:r})}function fd(e,r,n){return new e({type:"template_literal",parts:r,...f(n)})}function hd(e,r){return new e({type:"lazy",getter:r})}function vd(e,r){return new e({type:"promise",innerType:r})}function No(e,r,n){let o=f(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:r,...o})}function To(e,r,n){return new e({type:"custom",check:"custom",fn:r,...f(n)})}function Eo(e,r){let n=f(r),o=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),t=t.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),a=new Set(t),s=e.Pipe??Ge,c=e.Boolean??We,l=e.String??he,m=e.Transform??Be,d=new m({type:"transform",transform:(p,y)=>{let b=p;return n.case!=="sensitive"&&(b=b.toLowerCase()),i.has(b)?!0:a.has(b)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:y.value,inst:d}),{})},error:n.error}),h=new s({type:"pipe",in:new l({type:"string",error:n.error}),out:d,error:n.error});return new s({type:"pipe",in:h,out:new c({type:"boolean",error:n.error}),error:n.error})}function Zo(e,r,n,o={}){let t=f(o),i={...f(o),check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:s=>n.test(s),...t};return n instanceof RegExp&&(i.pattern=n),new e(i)}var sr=class{constructor(r){this._def=r,this.def=r}implement(r){if(typeof r!="function")throw new Error("implement() must be called with a function");let n=(...o)=>{let t=this._def.input?St(this._def.input,o,void 0,{callee:n}):o;if(!Array.isArray(t))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=r(...t);return this._def.output?St(this._def.output,i,void 0,{callee:n}):i};return n}implementAsync(r){if(typeof r!="function")throw new Error("implement() must be called with a function");let n=async(...o)=>{let t=this._def.input?await zt(this._def.input,o,void 0,{callee:n}):o;if(!Array.isArray(t))throw new Error("Invalid arguments schema: not an array or tuple schema.");let i=await r(...t);return this._def.output?zt(this._def.output,i,void 0,{callee:n}):i};return n}input(...r){let n=this.constructor;return Array.isArray(r[0])?new n({type:"function",input:new ve({type:"tuple",items:r[0],rest:r[1]}),output:this._def.output}):new n({type:"function",input:r[0],output:this._def.output})}output(r){let n=this.constructor;return new n({type:"function",input:this._def.input,output:r})}};function Do(e){return new sr({type:"function",input:Array.isArray(e?.input)?Uo(ve,e?.input):e?.input??lt(Ke,Pe(Ie)),output:e?.output??Pe(Ie)})}var dt=class{constructor(r){this.counter=0,this.metadataRegistry=r?.metadata??Y,this.target=r?.target??"draft-2020-12",this.unrepresentable=r?.unrepresentable??"throw",this.override=r?.override??(()=>{}),this.io=r?.io??"output",this.seen=new Map}process(r,n={path:[],schemaPath:[]}){var o;let t=r._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(r);if(a)return a.count++,n.schemaPath.includes(r)&&(a.cycle=n.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,s);let c=r._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...n,schemaPath:[...n.schemaPath,r],path:n.path},h=r._zod.parent;if(h)s.ref=h,this.process(h,d),this.seen.get(h).isParent=!0;else{let v=s.schema;switch(t.type){case"string":{let p=v;p.type="string";let{minimum:y,maximum:b,format:z,patterns:w,contentEncoding:x}=r._zod.bag;if(typeof y=="number"&&(p.minLength=y),typeof b=="number"&&(p.maxLength=b),z&&(p.format=i[z]??z,p.format===""&&delete p.format),x&&(p.contentEncoding=x),w&&w.size>0){let I=[...w];I.length===1?p.pattern=I[0].source:I.length>1&&(s.schema.allOf=[...I.map(A=>({...this.target==="draft-7"?{type:"string"}:{},pattern:A.source}))])}break}case"number":{let p=v,{minimum:y,maximum:b,format:z,multipleOf:w,exclusiveMaximum:x,exclusiveMinimum:I}=r._zod.bag;typeof z=="string"&&z.includes("int")?p.type="integer":p.type="number",typeof I=="number"&&(p.exclusiveMinimum=I),typeof y=="number"&&(p.minimum=y,typeof I=="number"&&(I>=y?delete p.minimum:delete p.exclusiveMinimum)),typeof x=="number"&&(p.exclusiveMaximum=x),typeof b=="number"&&(p.maximum=b,typeof x=="number"&&(x<=b?delete p.maximum:delete p.exclusiveMaximum)),typeof w=="number"&&(p.multipleOf=w);break}case"boolean":{let p=v;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{v.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{v.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let p=v,{minimum:y,maximum:b}=r._zod.bag;typeof y=="number"&&(p.minItems=y),typeof b=="number"&&(p.maxItems=b),p.type="array",p.items=this.process(t.element,{...d,path:[...d.path,"items"]});break}case"object":{let p=v;p.type="object",p.properties={};let y=t.shape;for(let w in y)p.properties[w]=this.process(y[w],{...d,path:[...d.path,"properties",w]});let b=new Set(Object.keys(y)),z=new Set([...b].filter(w=>{let x=t.shape[w]._zod;return this.io==="input"?x.optin===void 0:x.optout===void 0}));z.size>0&&(p.required=Array.from(z)),t.catchall?._zod.def.type==="never"?p.additionalProperties=!1:t.catchall?t.catchall&&(p.additionalProperties=this.process(t.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=v;p.anyOf=t.options.map((y,b)=>this.process(y,{...d,path:[...d.path,"anyOf",b]}));break}case"intersection":{let p=v,y=this.process(t.left,{...d,path:[...d.path,"allOf",0]}),b=this.process(t.right,{...d,path:[...d.path,"allOf",1]}),z=x=>"allOf"in x&&Object.keys(x).length===1,w=[...z(y)?y.allOf:[y],...z(b)?b.allOf:[b]];p.allOf=w;break}case"tuple":{let p=v;p.type="array";let y=t.items.map((w,x)=>this.process(w,{...d,path:[...d.path,"prefixItems",x]}));if(this.target==="draft-2020-12"?p.prefixItems=y:p.items=y,t.rest){let w=this.process(t.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?p.items=w:p.additionalItems=w}t.rest&&(p.items=this.process(t.rest,{...d,path:[...d.path,"items"]}));let{minimum:b,maximum:z}=r._zod.bag;typeof b=="number"&&(p.minItems=b),typeof z=="number"&&(p.maxItems=z);break}case"record":{let p=v;p.type="object",p.propertyNames=this.process(t.keyType,{...d,path:[...d.path,"propertyNames"]}),p.additionalProperties=this.process(t.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let p=v,y=De(t.entries);y.every(b=>typeof b=="number")&&(p.type="number"),y.every(b=>typeof b=="string")&&(p.type="string"),p.enum=y;break}case"literal":{let p=v,y=[];for(let b of t.values)if(b===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof b=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");y.push(Number(b))}else y.push(b);if(y.length!==0)if(y.length===1){let b=y[0];p.type=b===null?"null":typeof b,p.const=b}else y.every(b=>typeof b=="number")&&(p.type="number"),y.every(b=>typeof b=="string")&&(p.type="string"),y.every(b=>typeof b=="boolean")&&(p.type="string"),y.every(b=>b===null)&&(p.type="null"),p.enum=y;break}case"file":{let p=v,y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:b,maximum:z,mime:w}=r._zod.bag;b!==void 0&&(y.minLength=b),z!==void 0&&(y.maxLength=z),w?w.length===1?(y.contentMediaType=w[0],Object.assign(p,y)):p.anyOf=w.map(x=>({...y,contentMediaType:x})):Object.assign(p,y);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(t.innerType,d);v.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,d),s.ref=t.innerType;break}case"success":{let p=v;p.type="boolean";break}case"default":{this.process(t.innerType,d),s.ref=t.innerType,v.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,d),s.ref=t.innerType,this.io==="input"&&(v._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,d),s.ref=t.innerType;let p;try{p=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}v.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=v,y=r._zod.pattern;if(!y)throw new Error("Pattern not found in template literal");p.type="string",p.pattern=y.source;break}case"pipe":{let p=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(p,d),s.ref=p;break}case"readonly":{this.process(t.innerType,d),s.ref=t.innerType,v.readOnly=!0;break}case"promise":{this.process(t.innerType,d),s.ref=t.innerType;break}case"optional":{this.process(t.innerType,d),s.ref=t.innerType;break}case"lazy":{let p=r._zod.innerType;this.process(p,d),s.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(r);return l&&Object.assign(s.schema,l),this.io==="input"&&D(r)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(r).schema}emit(r,n){let o={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},t=this.seen.get(r);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=m=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let y=o.external.registry.get(m[0])?.id,b=o.external.uri??(w=>w);if(y)return{ref:b(y)};let z=m[1].defId??m[1].schema.id??`schema${this.counter++}`;return m[1].defId=z,{defId:z,ref:`${b("__shared")}#/${d}/${z}`}}if(m[1]===t)return{ref:"#"};let v=`#/${d}/`,p=m[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:v+p}},a=m=>{if(m[1].schema.$ref)return;let d=m[1],{ref:h,defId:v}=i(m);d.def={...d.schema},v&&(d.defId=v);let p=d.schema;for(let y in p)delete p[y];p.$ref=h};if(o.cycles==="throw")for(let m of this.seen.entries()){let d=m[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
28
-
29
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let m of this.seen.entries()){let d=m[1];if(r===m[0]){a(m);continue}if(o.external){let v=o.external.registry.get(m[0])?.id;if(r!==m[0]&&v){a(m);continue}}if(this.metadataRegistry.get(m[0])?.id){a(m);continue}if(d.cycle){a(m);continue}if(d.count>1&&o.reused==="ref"){a(m);continue}}let s=(m,d)=>{let h=this.seen.get(m),v=h.def??h.schema,p={...v};if(h.ref===null)return;let y=h.ref;if(h.ref=null,y){s(y,d);let b=this.seen.get(y).schema;b.$ref&&d.target==="draft-7"?(v.allOf=v.allOf??[],v.allOf.push(b)):(Object.assign(v,b),Object.assign(v,p))}h.isParent||this.override({zodSchema:m,jsonSchema:v,path:h.path??[]})};for(let m of[...this.seen.entries()].reverse())s(m[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){let m=o.external.registry.get(r)?.id;if(!m)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(m)}Object.assign(c,t.def);let l=o.external?.defs??{};for(let m of this.seen.entries()){let d=m[1];d.def&&d.defId&&(l[d.defId]=d.def)}o.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function Ao(e,r){if(e instanceof ze){let o=new dt(r),t={};for(let s of e._idmap.entries()){let[c,l]=s;o.process(l)}let i={},a={registry:e,uri:r?.uri,defs:t};for(let s of e._idmap.entries()){let[c,l]=s;i[c]=o.emit(l,{...r,external:a})}if(Object.keys(t).length>0){let s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:t}}return{schemas:i}}let n=new dt(r);return n.process(e),n.emit(e,r)}function D(e,r){let n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return D(t.element,n);case"object":{for(let i in t.shape)if(D(t.shape[i],n))return!0;return!1}case"union":{for(let i of t.options)if(D(i,n))return!0;return!1}case"intersection":return D(t.left,n)||D(t.right,n);case"tuple":{for(let i of t.items)if(D(i,n))return!0;return!!(t.rest&&D(t.rest,n))}case"record":return D(t.keyType,n)||D(t.valueType,n);case"map":return D(t.keyType,n)||D(t.valueType,n);case"set":return D(t.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return D(t.innerType,n);case"lazy":return D(t.getter(),n);case"default":return D(t.innerType,n);case"prefault":return D(t.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return D(t.in,n)||D(t.out,n);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${t.type}`)}var Ys={};var pr={};ue(pr,{ZodISODate:()=>ur,ZodISODateTime:()=>cr,ZodISODuration:()=>dr,ZodISOTime:()=>lr,date:()=>Co,datetime:()=>Ro,duration:()=>Mo,time:()=>Lo});var cr=u("ZodISODateTime",(e,r)=>{ri.init(e,r),N.init(e,r)});function Ro(e){return Yi(cr,e)}var ur=u("ZodISODate",(e,r)=>{ni.init(e,r),N.init(e,r)});function Co(e){return Qi(ur,e)}var lr=u("ZodISOTime",(e,r)=>{ii.init(e,r),N.init(e,r)});function Lo(e){return eo(lr,e)}var dr=u("ZodISODuration",(e,r)=>{oi.init(e,r),N.init(e,r)});function Mo(e){return to(dr,e)}var ec=(e,r)=>{Ve.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Fe(e,n)},flatten:{value:n=>Je(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},$d=u("ZodError",ec),Ne=u("ZodError",ec,{Parent:Error});var Vo=kt(Ne),Jo=It(Ne),Fo=Pt(Ne),qo=jt(Ne);var S=u("ZodType",(e,r)=>(k.init(e,r),e.def=r,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>e.clone({...r,checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(n,o)=>V(e,n,o),e.brand=()=>e,e.register=(n,o)=>(n.add(e,o),e),e.parse=(n,o)=>Vo(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Fo(e,n,o),e.parseAsync=async(n,o)=>Jo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>qo(e,n,o),e.spa=e.safeParseAsync,e.refine=(n,o)=>e.check(Mc(n,o)),e.superRefine=n=>e.check(Vc(n)),e.overwrite=n=>e.check(ne(n)),e.optional=()=>fr(e),e.nullable=()=>hr(e),e.nullish=()=>fr(hr(e)),e.nonoptional=n=>jc(e,n),e.array=()=>ma(e),e.or=n=>br([e,n]),e.and=n=>fc(e,n),e.transform=n=>vr(e,va(n)),e.default=n=>Ic(e,n),e.prefault=n=>Pc(e,n),e.catch=n=>Nc(e,n),e.pipe=n=>vr(e,n),e.readonly=()=>Zc(e),e.describe=n=>{let o=e.clone();return Y.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Y.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Y.get(e);let o=e.clone();return Y.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Bo=u("_ZodString",(e,r)=>{he.init(e,r),S.init(e,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Qe(...o)),e.includes=(...o)=>e.check(rt(...o)),e.startsWith=(...o)=>e.check(nt(...o)),e.endsWith=(...o)=>e.check(it(...o)),e.min=(...o)=>e.check(ce(...o)),e.max=(...o)=>e.check(Ue(...o)),e.length=(...o)=>e.check(Oe(...o)),e.nonempty=(...o)=>e.check(ce(1,...o)),e.lowercase=o=>e.check(et(o)),e.uppercase=o=>e.check(tt(o)),e.trim=()=>e.check(st()),e.normalize=(...o)=>e.check(at(...o)),e.toLowerCase=()=>e.check(ct()),e.toUpperCase=()=>e.check(ut())}),mt=u("ZodString",(e,r)=>{he.init(e,r),Bo.init(e,r),e.email=n=>e.check(Lt(Go,n)),e.url=n=>e.check(qt(Ho,n)),e.jwt=n=>e.check(ar(da,n)),e.emoji=n=>e.check(Wt(Xo,n)),e.guid=n=>e.check(Xe(mr,n)),e.uuid=n=>e.check(Mt(oe,n)),e.uuidv4=n=>e.check(Vt(oe,n)),e.uuidv6=n=>e.check(Jt(oe,n)),e.uuidv7=n=>e.check(Ft(oe,n)),e.nanoid=n=>e.check(Kt(Yo,n)),e.guid=n=>e.check(Xe(mr,n)),e.cuid=n=>e.check(Bt(Qo,n)),e.cuid2=n=>e.check(Gt(ea,n)),e.ulid=n=>e.check(Ht(ta,n)),e.base64=n=>e.check(nr(ca,n)),e.base64url=n=>e.check(ir(ua,n)),e.xid=n=>e.check(Xt(ra,n)),e.ksuid=n=>e.check(Yt(na,n)),e.ipv4=n=>e.check(Qt(ia,n)),e.ipv6=n=>e.check(er(oa,n)),e.cidrv4=n=>e.check(tr(aa,n)),e.cidrv6=n=>e.check(rr(sa,n)),e.e164=n=>e.check(or(la,n)),e.datetime=n=>e.check(Ro(n)),e.date=n=>e.check(Co(n)),e.time=n=>e.check(Lo(n)),e.duration=n=>e.check(Mo(n))});function Wo(e){return Gi(mt,e)}var N=u("ZodStringFormat",(e,r)=>{U.init(e,r),Bo.init(e,r)}),Go=u("ZodEmail",(e,r)=>{Kn.init(e,r),N.init(e,r)});function bd(e){return Lt(Go,e)}var mr=u("ZodGUID",(e,r)=>{qn.init(e,r),N.init(e,r)});function wd(e){return Xe(mr,e)}var oe=u("ZodUUID",(e,r)=>{Wn.init(e,r),N.init(e,r)});function xd(e){return Mt(oe,e)}function kd(e){return Vt(oe,e)}function Sd(e){return Jt(oe,e)}function Id(e){return Ft(oe,e)}var Ho=u("ZodURL",(e,r)=>{Bn.init(e,r),N.init(e,r)});function zd(e){return qt(Ho,e)}var Xo=u("ZodEmoji",(e,r)=>{Gn.init(e,r),N.init(e,r)});function Pd(e){return Wt(Xo,e)}var Yo=u("ZodNanoID",(e,r)=>{Hn.init(e,r),N.init(e,r)});function jd(e){return Kt(Yo,e)}var Qo=u("ZodCUID",(e,r)=>{Xn.init(e,r),N.init(e,r)});function Ud(e){return Bt(Qo,e)}var ea=u("ZodCUID2",(e,r)=>{Yn.init(e,r),N.init(e,r)});function Od(e){return Gt(ea,e)}var ta=u("ZodULID",(e,r)=>{Qn.init(e,r),N.init(e,r)});function Nd(e){return Ht(ta,e)}var ra=u("ZodXID",(e,r)=>{ei.init(e,r),N.init(e,r)});function Td(e){return Xt(ra,e)}var na=u("ZodKSUID",(e,r)=>{ti.init(e,r),N.init(e,r)});function Ed(e){return Yt(na,e)}var ia=u("ZodIPv4",(e,r)=>{ai.init(e,r),N.init(e,r)});function Zd(e){return Qt(ia,e)}var oa=u("ZodIPv6",(e,r)=>{si.init(e,r),N.init(e,r)});function Dd(e){return er(oa,e)}var aa=u("ZodCIDRv4",(e,r)=>{ci.init(e,r),N.init(e,r)});function Ad(e){return tr(aa,e)}var sa=u("ZodCIDRv6",(e,r)=>{ui.init(e,r),N.init(e,r)});function Rd(e){return rr(sa,e)}var ca=u("ZodBase64",(e,r)=>{di.init(e,r),N.init(e,r)});function Cd(e){return nr(ca,e)}var ua=u("ZodBase64URL",(e,r)=>{pi.init(e,r),N.init(e,r)});function Ld(e){return ir(ua,e)}var la=u("ZodE164",(e,r)=>{mi.init(e,r),N.init(e,r)});function Md(e){return or(la,e)}var da=u("ZodJWT",(e,r)=>{gi.init(e,r),N.init(e,r)});function Vd(e){return ar(da,e)}var tc=u("ZodCustomStringFormat",(e,r)=>{fi.init(e,r),N.init(e,r)});function Jd(e,r,n={}){return Zo(tc,e,r,n)}var gt=u("ZodNumber",(e,r)=>{Zt.init(e,r),S.init(e,r),e.gt=(o,t)=>e.check(re(o,t)),e.gte=(o,t)=>e.check(L(o,t)),e.min=(o,t)=>e.check(L(o,t)),e.lt=(o,t)=>e.check(te(o,t)),e.lte=(o,t)=>e.check(W(o,t)),e.max=(o,t)=>e.check(W(o,t)),e.int=o=>e.check(Ko(o)),e.safe=o=>e.check(Ko(o)),e.positive=o=>e.check(re(0,o)),e.nonnegative=o=>e.check(L(0,o)),e.negative=o=>e.check(te(0,o)),e.nonpositive=o=>e.check(W(0,o)),e.multipleOf=(o,t)=>e.check(_e(o,t)),e.step=(o,t)=>e.check(_e(o,t)),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 rc(e){return ro(gt,e)}var Te=u("ZodNumberFormat",(e,r)=>{hi.init(e,r),gt.init(e,r)});function Ko(e){return io(Te,e)}function Fd(e){return oo(Te,e)}function qd(e){return ao(Te,e)}function Wd(e){return so(Te,e)}function Kd(e){return co(Te,e)}var ft=u("ZodBoolean",(e,r)=>{We.init(e,r),S.init(e,r)});function nc(e){return uo(ft,e)}var ht=u("ZodBigInt",(e,r)=>{Dt.init(e,r),S.init(e,r),e.gte=(o,t)=>e.check(L(o,t)),e.min=(o,t)=>e.check(L(o,t)),e.gt=(o,t)=>e.check(re(o,t)),e.gte=(o,t)=>e.check(L(o,t)),e.min=(o,t)=>e.check(L(o,t)),e.lt=(o,t)=>e.check(te(o,t)),e.lte=(o,t)=>e.check(W(o,t)),e.max=(o,t)=>e.check(W(o,t)),e.positive=o=>e.check(re(BigInt(0),o)),e.negative=o=>e.check(te(BigInt(0),o)),e.nonpositive=o=>e.check(W(BigInt(0),o)),e.nonnegative=o=>e.check(L(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(_e(o,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Bd(e){return po(ht,e)}var pa=u("ZodBigIntFormat",(e,r)=>{vi.init(e,r),ht.init(e,r)});function Gd(e){return go(pa,e)}function Hd(e){return fo(pa,e)}var ic=u("ZodSymbol",(e,r)=>{_i.init(e,r),S.init(e,r)});function Xd(e){return ho(ic,e)}var oc=u("ZodUndefined",(e,r)=>{$i.init(e,r),S.init(e,r)});function Yd(e){return vo(oc,e)}var ac=u("ZodNull",(e,r)=>{yi.init(e,r),S.init(e,r)});function sc(e){return _o(ac,e)}var cc=u("ZodAny",(e,r)=>{bi.init(e,r),S.init(e,r)});function Qd(){return $o(cc)}var uc=u("ZodUnknown",(e,r)=>{Ie.init(e,r),S.init(e,r)});function gr(){return Pe(uc)}var lc=u("ZodNever",(e,r)=>{wi.init(e,r),S.init(e,r)});function _r(e){return yo(lc,e)}var dc=u("ZodVoid",(e,r)=>{xi.init(e,r),S.init(e,r)});function ep(e){return bo(dc,e)}var $r=u("ZodDate",(e,r)=>{ki.init(e,r),S.init(e,r),e.min=(o,t)=>e.check(L(o,t)),e.max=(o,t)=>e.check(W(o,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function tp(e){return wo($r,e)}var pc=u("ZodArray",(e,r)=>{Ke.init(e,r),S.init(e,r),e.element=r.element,e.min=(n,o)=>e.check(ce(n,o)),e.nonempty=n=>e.check(ce(1,n)),e.max=(n,o)=>e.check(Ue(n,o)),e.length=(n,o)=>e.check(Oe(n,o)),e.unwrap=()=>e.element});function ma(e,r){return lt(pc,e,r)}function rp(e){let r=e._zod.def.shape;return wc(Object.keys(r))}var yr=u("ZodObject",(e,r)=>{Si.init(e,r),S.init(e,r),$.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>yc(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:gr()}),e.loose=()=>e.clone({...e._zod.def,catchall:gr()}),e.strict=()=>e.clone({...e._zod.def,catchall:_r()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>$.extend(e,n),e.merge=n=>$.merge(e,n),e.pick=n=>$.pick(e,n),e.omit=n=>$.omit(e,n),e.partial=(...n)=>$.partial(_a,e,n[0]),e.required=(...n)=>$.required($a,e,n[0])});function np(e,r){let n={type:"object",get shape(){return $.assignProp(this,"shape",{...e}),this.shape},...$.normalizeParams(r)};return new yr(n)}function ip(e,r){return new yr({type:"object",get shape(){return $.assignProp(this,"shape",{...e}),this.shape},catchall:_r(),...$.normalizeParams(r)})}function op(e,r){return new yr({type:"object",get shape(){return $.assignProp(this,"shape",{...e}),this.shape},catchall:gr(),...$.normalizeParams(r)})}var ga=u("ZodUnion",(e,r)=>{At.init(e,r),S.init(e,r),e.options=r.options});function br(e,r){return new ga({type:"union",options:e,...$.normalizeParams(r)})}var mc=u("ZodDiscriminatedUnion",(e,r)=>{ga.init(e,r),Ii.init(e,r)});function ap(e,r,n){return new mc({type:"union",options:r,discriminator:e,...$.normalizeParams(n)})}var gc=u("ZodIntersection",(e,r)=>{zi.init(e,r),S.init(e,r)});function fc(e,r){return new gc({type:"intersection",left:e,right:r})}var hc=u("ZodTuple",(e,r)=>{ve.init(e,r),S.init(e,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function sp(e,r,n){let o=r instanceof k,t=o?n:r,i=o?r:null;return new hc({type:"tuple",items:e,rest:i,...$.normalizeParams(t)})}var fa=u("ZodRecord",(e,r)=>{Pi.init(e,r),S.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function vc(e,r,n){return new fa({type:"record",keyType:e,valueType:r,...$.normalizeParams(n)})}function cp(e,r,n){return new fa({type:"record",keyType:br([e,_r()]),valueType:r,...$.normalizeParams(n)})}var _c=u("ZodMap",(e,r)=>{ji.init(e,r),S.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function up(e,r,n){return new _c({type:"map",keyType:e,valueType:r,...$.normalizeParams(n)})}var $c=u("ZodSet",(e,r)=>{Ui.init(e,r),S.init(e,r),e.min=(...n)=>e.check($e(...n)),e.nonempty=n=>e.check($e(1,n)),e.max=(...n)=>e.check(je(...n)),e.size=(...n)=>e.check(Ye(...n))});function lp(e,r){return new $c({type:"set",valueType:e,...$.normalizeParams(r)})}var pt=u("ZodEnum",(e,r)=>{Oi.init(e,r),S.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(o,t)=>{let i={};for(let a of o)if(n.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new pt({...r,checks:[],...$.normalizeParams(t),entries:i})},e.exclude=(o,t)=>{let i={...r.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new pt({...r,checks:[],...$.normalizeParams(t),entries:i})}});function yc(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new pt({type:"enum",entries:n,...$.normalizeParams(r)})}function dp(e,r){return new pt({type:"enum",entries:e,...$.normalizeParams(r)})}var bc=u("ZodLiteral",(e,r)=>{Ni.init(e,r),S.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function wc(e,r){return new bc({type:"literal",values:Array.isArray(e)?e:[e],...$.normalizeParams(r)})}var xc=u("ZodFile",(e,r)=>{Ti.init(e,r),S.init(e,r),e.min=(n,o)=>e.check($e(n,o)),e.max=(n,o)=>e.check(je(n,o)),e.mime=(n,o)=>e.check(ot(Array.isArray(n)?n:[n],o))});function pp(e){return Oo(xc,e)}var ha=u("ZodTransform",(e,r)=>{Be.init(e,r),S.init(e,r),e._zod.parse=(n,o)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push($.issue(i,n.value,r));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),a.continue??(a.continue=!0),n.issues.push($.issue(a))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(i=>(n.value=i,n)):(n.value=t,n)}});function va(e){return new ha({type:"transform",transform:e})}var _a=u("ZodOptional",(e,r)=>{Ei.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function fr(e){return new _a({type:"optional",innerType:e})}var kc=u("ZodNullable",(e,r)=>{Zi.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function hr(e){return new kc({type:"nullable",innerType:e})}function mp(e){return fr(hr(e))}var Sc=u("ZodDefault",(e,r)=>{Di.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ic(e,r){return new Sc({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}var zc=u("ZodPrefault",(e,r)=>{Ai.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e,r){return new zc({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}var $a=u("ZodNonOptional",(e,r)=>{Ri.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function jc(e,r){return new $a({type:"nonoptional",innerType:e,...$.normalizeParams(r)})}var Uc=u("ZodSuccess",(e,r)=>{Ci.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function gp(e){return new Uc({type:"success",innerType:e})}var Oc=u("ZodCatch",(e,r)=>{Li.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Nc(e,r){return new Oc({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var Tc=u("ZodNaN",(e,r)=>{Mi.init(e,r),S.init(e,r)});function fp(e){return ko(Tc,e)}var ya=u("ZodPipe",(e,r)=>{Ge.init(e,r),S.init(e,r),e.in=r.in,e.out=r.out});function vr(e,r){return new ya({type:"pipe",in:e,out:r})}var Ec=u("ZodReadonly",(e,r)=>{Vi.init(e,r),S.init(e,r)});function Zc(e){return new Ec({type:"readonly",innerType:e})}var Dc=u("ZodTemplateLiteral",(e,r)=>{Ji.init(e,r),S.init(e,r)});function hp(e,r){return new Dc({type:"template_literal",parts:e,...$.normalizeParams(r)})}var Ac=u("ZodLazy",(e,r)=>{qi.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.getter()});function Rc(e){return new Ac({type:"lazy",getter:e})}var Cc=u("ZodPromise",(e,r)=>{Fi.init(e,r),S.init(e,r),e.unwrap=()=>e._zod.def.innerType});function vp(e){return new Cc({type:"promise",innerType:e})}var wr=u("ZodCustom",(e,r)=>{Wi.init(e,r),S.init(e,r)});function Lc(e){let r=new E({check:"custom"});return r._zod.check=e,r}function _p(e,r){return No(wr,e??(()=>!0),r)}function Mc(e,r={}){return To(wr,e,r)}function Vc(e){let r=Lc(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push($.issue(o,n.value,r._zod.def));else{let t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push($.issue(t))}},e(n.value,n)));return r}function $p(e,r={error:`Input not instance of ${e.name}`}){let n=new wr({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...$.normalizeParams(r)});return n._zod.bag.Class=e,n}var yp=(...e)=>Eo({Pipe:ya,Boolean:ft,String:mt,Transform:ha},...e);function bp(e){let r=Rc(()=>br([Wo(e),rc(),nc(),sc(),ma(r),vc(Wo(),r)]));return r}function wp(e,r){return vr(va(e),r)}var xp={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function kp(e){Z({customError:e})}function Sp(){return Z().customError}var ba;ba||(ba={});var wa={};ue(wa,{bigint:()=>jp,boolean:()=>Pp,date:()=>Up,number:()=>zp,string:()=>Ip});function Ip(e){return Hi(mt,e)}function zp(e){return no(gt,e)}function Pp(e){return lo(ft,e)}function jp(e){return mo(ht,e)}function Up(e){return xo($r,e)}Z(Rt());var O=xa;var Jc=O.object({iss:O.string(),sub:O.string(),aud:O.union([O.string(),O.array(O.string())]),exp:O.number(),iat:O.number(),azp:O.string().optional(),client_id:O.string().optional(),at_hash:O.string().optional(),sid:O.string().optional()}),Fc=O.object({sub:O.string(),name:O.string().optional(),given_name:O.string().optional(),family_name:O.string().optional(),updated_at:O.number().optional(),phone_number:O.string().optional(),phone_number_verified:O.boolean().optional()}),qc=O.object({accessToken:O.string(),idToken:O.string(),tokenType:O.string(),expiresIn:O.string()});var Wc=class{config;userManager;_user=null;async extractJWTPayload(r){let n=r.split(".")[1],o=atob(n),t=await Jc.safeParseAsync(JSON.parse(o));if(!t.success)throw new Error("[PPLE Mini App] Invalid ID token payload format");if(t.data.exp<=new Date().getTime()/1e3)throw await this.logout(),new Error("[PPLE Mini App] ID token has expired");return t.data}async getAccessTokenFromUrl(){let r=new URLSearchParams(window.location.search),n={accessToken:r.get("access_token"),idToken:r.get("id_token"),tokenType:r.get("token_type"),expiresIn:r.get("expires_in")},o=await qc.safeParseAsync(n);return o.success?o.data:null}async storeUserInOIDCClient(){let r=await this.userManager.getUser();if(!r?.profile)throw new Error("[PPLE Mini App] No existing user profile found in OIDC client");if(r.state&&r.state.isProfileFetched)return r;let n=await this.fetchProfileByAccessToken(r.access_token),o=new ye({...r,profile:{...r?.profile,...n},userState:{isProfileFetched:!0}});return await this.userManager.storeUser(o),o}async storeJWTProfileInOIDCClient(r){let n=await this.extractJWTPayload(r.idToken),o=new ye({access_token:r.accessToken,id_token:r.idToken,token_type:r.tokenType,profile:{sub:n.sub,aud:n.aud,iss:n.iss,exp:n.exp,iat:n.iat}});return await this.userManager.storeUser(o),o}async fetchProfileByAccessToken(r){let n=await this.userManager.metadataService.getUserInfoEndpoint(),o=await fetch(n,{headers:{Authorization:`Bearer ${r}`}});if(!o.ok)throw new Error("[PPLE Mini App] Failed to fetch user info from OAuth server");let t=await o.json();if(Fc.safeParse(t).success===!1)throw new Error("[PPLE Mini App] Invalid user info format received from OAuth server");return t}constructor(r){if(typeof window>"u")throw new Error("[PPLE Mini App] PPLEMiniApp can only be instantiated in a browser environment");let n=this.isMiniApp();this.config=r,this.userManager=new Fa({authority:this.config.oauthUrl,client_id:this.config.oauthClientId,redirect_uri:this.config.oauthRedirectUri,response_type:"code",scope:"openid profile phone",userStore:new wt({store:n?window.sessionStorage:window.localStorage})})}async init(){if(console.log("[PPLE Mini App] Initializing PPLE Mini App..."),this.isMiniApp()){let r=await this.getAccessTokenFromUrl();if(r){let n=await this.storeJWTProfileInOIDCClient(r);console.log("[PPLE Mini App] User signed in successfully via Mini App URL parameters"),this._user=n}else{let n=await this.userManager.getUser();if(n){this._user=n,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}throw new Error("[PPLE Mini App] No user is currently logged in in Mini App")}}else{try{let r=await this.userManager.signinCallback();if(r){let n={accessToken:r.access_token,idToken:r.id_token,tokenType:"Bearer",expiresIn:(r.expires_in||3600).toString()},o=await this.storeJWTProfileInOIDCClient(n);this._user=o,console.log("[PPLE Mini App] User signed in successfully");return}console.error("[PPLE Mini App] Signin callback did not return a user")}catch{console.warn("[PPLE Mini App] No signin callback to process");let r=await this.userManager.getUser();if(r){this._user=r,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}}console.warn("[PPLE Mini App] Redirecting to sign-in page..."),await this.userManager.signinRedirect()}}async getAccessToken(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");return this._user.access_token}async getProfile(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");let r=await this.storeUserInOIDCClient();return this._user=r,{sub:this._user.profile.sub,family_name:this._user.profile.family_name,given_name:this._user.profile.given_name,phone_number:this._user.profile.phone_number,name:this._user.profile.name,phone_number_verified:this._user.profile.phone_number_verified,updated_at:this._user.profile.updated_at}}isMiniApp(){let r=new URLSearchParams(window.location.search),n=!!navigator.userAgent.match(/PPLETodayApp\/(\d.\d.\d) MiniApp/),o=!!r.has("access_token");return n&&o}async logout(){await this.userManager.revokeTokens(["access_token"]),await this.userManager.removeUser()}};export{Wc as PPLEMiniApp};
1
+ import{User as c,UserManager as u,WebStorageStateStore as l}from"oidc-client-ts";import n from"zod";var t=n.object({iss:n.string(),sub:n.string(),aud:n.union([n.string(),n.array(n.string())]),exp:n.number(),iat:n.number(),azp:n.string().optional(),client_id:n.string().optional(),at_hash:n.string().optional(),sid:n.string().optional()}),o=n.object({sub:n.string(),name:n.string().optional(),given_name:n.string().optional(),family_name:n.string().optional(),updated_at:n.number().optional(),phone_number:n.string().optional(),phone_number_verified:n.boolean().optional()}),a=n.object({accessToken:n.string(),idToken:n.string(),tokenType:n.string(),expiresIn:n.string()});var p=class{config;userManager;_user=null;async extractJWTPayload(e){let s=e.split(".")[1],i=atob(s),r=await t.safeParseAsync(JSON.parse(i));if(!r.success)throw new Error("[PPLE Mini App] Invalid ID token payload format");if(r.data.exp<=new Date().getTime()/1e3)throw await this.logout(),new Error("[PPLE Mini App] ID token has expired");return r.data}async getAccessTokenFromUrl(){let e=new URLSearchParams(window.location.search),s={accessToken:e.get("access_token"),idToken:e.get("id_token"),tokenType:e.get("token_type"),expiresIn:e.get("expires_in")},i=await a.safeParseAsync(s);return i.success?i.data:null}async storeUserInOIDCClient(){let e=await this.userManager.getUser();if(!e?.profile)throw new Error("[PPLE Mini App] No existing user profile found in OIDC client");if(e.state&&e.state.isProfileFetched)return e;let s=await this.fetchProfileByAccessToken(e.access_token),i=new c({...e,profile:{...e?.profile,...s},userState:{isProfileFetched:!0}});return await this.userManager.storeUser(i),i}async storeJWTProfileInOIDCClient(e){let s=await this.extractJWTPayload(e.idToken),i=new c({access_token:e.accessToken,id_token:e.idToken,token_type:e.tokenType,profile:{sub:s.sub,aud:s.aud,iss:s.iss,exp:s.exp,iat:s.iat}});return await this.userManager.storeUser(i),i}async fetchProfileByAccessToken(e){let s=await this.userManager.metadataService.getUserInfoEndpoint(),i=await fetch(s,{headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw new Error("[PPLE Mini App] Failed to fetch user info from OAuth server");let r=await i.json();if(o.safeParse(r).success===!1)throw new Error("[PPLE Mini App] Invalid user info format received from OAuth server");return r}constructor(e){if(typeof window>"u")throw new Error("[PPLE Mini App] PPLEMiniApp can only be instantiated in a browser environment");let s=this.isMiniApp();this.config=e,this.userManager=new u({authority:this.config.oauthUrl,client_id:this.config.oauthClientId,redirect_uri:this.config.oauthRedirectUri,response_type:"code",scope:"openid profile phone",userStore:new l({store:s?window.sessionStorage:window.localStorage})})}async init(){if(console.log("[PPLE Mini App] Initializing PPLE Mini App..."),this.isMiniApp()){let e=await this.getAccessTokenFromUrl();if(e){let s=await this.storeJWTProfileInOIDCClient(e);console.log("[PPLE Mini App] User signed in successfully via Mini App URL parameters"),this._user=s}else{let s=await this.userManager.getUser();if(s){this._user=s,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}throw new Error("[PPLE Mini App] No user is currently logged in in Mini App")}}else{try{let e=await this.userManager.signinCallback();if(e){let s={accessToken:e.access_token,idToken:e.id_token,tokenType:"Bearer",expiresIn:(e.expires_in||3600).toString()},i=await this.storeJWTProfileInOIDCClient(s);this._user=i,console.log("[PPLE Mini App] User signed in successfully");return}console.error("[PPLE Mini App] Signin callback did not return a user")}catch{console.warn("[PPLE Mini App] No signin callback to process");let e=await this.userManager.getUser();if(e){this._user=e,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}}console.warn("[PPLE Mini App] Redirecting to sign-in page..."),await this.userManager.signinRedirect()}}async getAccessToken(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");return this._user.access_token}async getProfile(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");let e=await this.storeUserInOIDCClient();return this._user=e,{sub:this._user.profile.sub,family_name:this._user.profile.family_name,given_name:this._user.profile.given_name,phone_number:this._user.profile.phone_number,name:this._user.profile.name,phone_number_verified:this._user.profile.phone_number_verified,updated_at:this._user.profile.updated_at}}isMiniApp(){let e=new URLSearchParams(window.location.search),s=!!navigator.userAgent.match(/PPLETodayApp\/(\d.\d.\d) MiniApp/),i=!!e.has("access_token");return s&&i}async logout(){await this.userManager.revokeTokens(["access_token"]),await this.userManager.removeUser()}};export{p as PPLEMiniApp};