@zuplo/cli 6.73.24 → 6.73.26
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/node_modules/@posthog/core/dist/surveys/activation.d.ts +8 -0
- package/node_modules/@posthog/core/dist/surveys/activation.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/surveys/activation.js +7 -1
- package/node_modules/@posthog/core/dist/surveys/activation.mjs +4 -1
- package/node_modules/@posthog/core/dist/surveys/index.d.ts +1 -1
- package/node_modules/@posthog/core/dist/surveys/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/surveys/index.js +3 -0
- package/node_modules/@posthog/core/dist/surveys/index.mjs +2 -2
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/surveys/activation.ts +12 -0
- package/node_modules/@posthog/core/src/surveys/index.ts +1 -1
- package/node_modules/@zuplo/core/customer.cli.minified.js +205 -205
- package/node_modules/@zuplo/core/index.minified.js +210 -210
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-A3425Z75.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-A3425Z75.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-FPZAMUNA.js → chunk-PEUB7LX7.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-PEUB7LX7.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-RB2LCXBX.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-RB2LCXBX.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-SNZSLL63.js → chunk-SL6SOWIV.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-TRBIM47E.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-TRBIM47E.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-QWO5UTVQ.js → chunk-V4X24KCQ.js} +4 -4
- package/node_modules/@zuplo/runtime/out/esm/chunk-V4X24KCQ.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-R7PMDIH4.js → chunk-WK5G5RKI.js} +108 -108
- package/node_modules/@zuplo/runtime/out/esm/chunk-WK5G5RKI.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +28 -21
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +787 -0
- package/node_modules/@zuplo/runtime/package.json +2 -2
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-FPZAMUNA.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-QWO5UTVQ.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-R7PMDIH4.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-US6ITPGV.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-US6ITPGV.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-SNZSLL63.js.map → chunk-SL6SOWIV.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-R7PMDIH4.js.LEGAL.txt → chunk-WK5G5RKI.js.LEGAL.txt} +0 -0
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{W as O,X as oe,Y as
|
|
26
|
-
`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!B.has("X-Amz-Expires")&&B.set("X-Amz-Expires","86400"),B.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),B.set("X-Amz-Credential",`${this.accessKeyId}/${this.credentialString}`),B.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");Et||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=st(this.encodedPath);let
|
|
25
|
+
import{a as Je}from"./chunk-TRBIM47E.js";import{W as O,X as oe,Y as Ye,Z as Ae,a as Xe}from"./chunk-VCMIY3WJ.js";import{a as c,d as It}from"./chunk-2WLR6ZDZ.js";var Me="__zuplo-expiry-header",Te=class{static{c(this,"ZoneCache")}constructor(e,r){this.#s=e,this.#t=r}#t;#s;#r;async#e(){return this.#r||(this.#r=await caches.open(this.#s)),this.#r}#n(e){return new Request(`https://zone-cache.zuplo.app/${encodeURIComponent(e)}`)}async get(e){try{let r=await this.#e(),s=this.#n(e),n=await r.match(s);if(!n)return;let a=n.headers.get(Me);if(!a){try{await r.delete(s)}catch(u){this.logDebug("Handled failure to delete with CF cache because of missing expiryHeader",u),await this.deleteFallback(e)}return}let i=parseInt(a,10);if(Date.now()>=i){try{await r.delete(s)}catch(u){this.logDebug("Handled failure to delete with CF cache because of expiration",u),await this.deleteFallback(e)}return}return await n.json()}catch(r){this.logDebug(r)}}async put(e,r,s){let n=new Headers({"cache-control":`s-maxage=${s}, must-revalidate`,"content-type":"application/json"});n.set(Me,`${Date.now()+s*1e3}`);let a=await this.#e(),i=this.#n(e),o=new Response(JSON.stringify(r),{headers:n});await a.put(i,o)}async delete(e){let r=await this.#e(),s=this.#n(e);try{await r.delete(s)}catch(n){this.logDebug("Handled failure to delete with CF cache due to explicit delete call",n),await this.deleteFallback(e)}}async deleteFallback(e){let r=new Headers({"Cache-Control":"s-maxage=0, must-revalidate"});r.set(Me,`${Date.now()}`);let s=await this.#e(),n=this.#n(e),a=new Response("",{headers:r});await s.put(n,a)}logDebug(...e){"logger"in this.#t?this.#t.logger?.debug(`Error in ZoneCache: '${this.#s}'`,e):"log"in this.#t&&this.#t.log.debug(`Error in ZoneCache: '${this.#s}'`,e)}};var Ge=new Map,De=class{static{c(this,"LruTtlCache")}constructor(e){this.#t=e.maxSize}#t;#s=0;#r=new Map;#e=[];get(e){let r=this.#r.get(e);if(!r)return;let s=Date.now();if(s>r.expiresAt){this.delete(e);return}r.lastUsed=s;let n=this.#e.indexOf(e);return n>=0&&(this.#e.splice(n,1),this.#e.push(e)),this.#n(),r?.data}put(e,r,s){if(s<=0)return;let n=this.#e.indexOf(e),a=n>=0;if(a)this.#e.splice(n,1);else if(this.#r.size>=this.#t){let u=this.#e.shift();u&&this.#r.delete(u)}let i=Date.now(),o={created:a?this.#r.get(e).created:i,lastUsed:i,expiresAt:i+s*1e3,data:r};this.#e.push(e),this.#r.set(e,o)}delete(e){let r=this.#e.indexOf(e);r>=0&&this.#e.splice(r,1),this.#r.delete(e)}get size(){return this.#r.size}#n(){let e=Date.now();e>this.#s+1e4&&(this.purge(),this.#s=e)}purge(){let e=Date.now(),r=[];this.#r.forEach((s,n)=>{e>s.expiresAt&&r.push(n)}),r.forEach(s=>this.delete(s))}},ye=class{static{c(this,"MemoryCache")}constructor(e,r={maxSize:1e3}){this.name=e;let s=Ge.get(e);s||(s=new De(r),Ge.set(e,s)),this.#t=s}name;#t;get(e){return this.#t.get(e)}put(e,r,s){return this.#t.put(e,r,s)}delete(e){return this.#t.delete(e)}get size(){return this.#t.size}purge(){this.#t.purge()}};var Se=class{static{c(this,"MemoryZoneReadThroughCache")}constructor(e,r,s){let n=`f6726488-fd18-4b7f-9c30-6070565e8042-${e}`;this.#t=e,this.#s=s?new ye(n,s):new ye(n),this.#r=new Te(n,r),this.#e=r}#t;#s;#r;#e;async get(e){let r=this.#s.get(e);if(r)return r;let s=await this.#r.get(e);if(s){let n=Math.floor((s.expires-Date.now())/1e3);if(n>0)return this.#s.put(e,s.data,n),s.data}}put(e,r,s){this.#s.put(e,r,s);let n={data:r,expires:Date.now()+s*1e3},a=this.#r.put(e,n,s).catch(i=>{this.#e.log.error(`Error in MemoryZoneReadThroughCache: '${this.#t}'`,i)});this.#e.waitUntil(a)}async delete(e){this.#s.delete(e),await this.#r.delete(e)}};var Ot=Symbol("zuplo-aws-credential-provider"),Qe=new Je(Ot);function hs(t,e){Qe.set(t,e)}c(hs,"setAwsCredentialProvider");function et(t){return Qe.get(t)}c(et,"getAwsCredentialProvider");var Nt=Xe("zuplo:runtime"),$e=new TextEncoder,tt={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},jt=["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"];function Pt(t){let e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e}c(Pt,"copyArrayBufferView");function Mt(t){return typeof t=="string"?$e.encode(t):t instanceof ArrayBuffer?t:Pt(t)}c(Mt,"toCryptoBufferSource");var Ce=class t{static{c(this,"AwsClient")}service;region;cache;#t;#s;#r;#e;#n;#a;constructor(e){let{accessKeyId:r,secretAccessKey:s,sessionToken:n,credentials:a,service:i,region:o,cache:u,retries:h,initRetryMs:y}=e;if(typeof a=="function")this.#e=a;else if(a){let b=a;this.#e=()=>Promise.resolve(b)}else this.#t=r,this.#s=s,this.#r=n;this.service=i,this.region=o,this.cache=u||new Map,this.#n=h??0,this.#a=y||50}static fromContext(e,r){let s=et(e);if(!s)throw new oe("No AWS credentials are available on the request context. Attach an 'upstream-aws-service-auth' or 'upstream-aws-federated-auth' policy to this route (or run one via context.invokeInboundPolicy) before calling AwsClient.fromContext().");return new t({credentials:s,service:r?.service,region:r?.region})}async#i(){if(this.#e)return this.#e();if(this.#t==null||this.#s==null)throw new oe("AwsClient requires either 'credentials' or both 'accessKeyId' and 'secretAccessKey'.");return{accessKeyId:this.#t,secretAccessKey:this.#s,sessionToken:this.#r}}async sign(e,r){let s=await this.#i(),n=new ze(Object.assign({url:e},r,{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,service:this.service,region:this.region,cache:this.cache},r?.aws)),a=Object.assign({},r,await n.sign());return delete a.aws,{url:a.url.toString(),request:a}}async fetch(e,r){Nt("AWS fetch",e);for(let s=0;s<=this.#n;s++){let{url:n,request:a}=await this.sign(e,r),i=Ae.fetch(n,a);if(s===this.#n)return i;let o=await i;if(o.status<500&&o.status!==429)return o;await new Promise(u=>setTimeout(u,Math.random()*this.#a*2**s))}throw new oe("An unknown error occurred, ensure retries is not negative")}},ze=class{static{c(this,"AwsV4Signer")}method;url;headers;body;accessKeyId;secretAccessKey;sessionToken;service;region;cache;datetime;signQuery;appendSessionToken;signableHeaders;signedHeaders;canonicalHeaders;credentialString;encodedPath;encodedSearch;constructor({method:e,url:r,headers:s,body:n,accessKeyId:a,secretAccessKey:i,sessionToken:o,service:u,region:h,cache:y,datetime:b,signQuery:be,appendSessionToken:ge,allHeaders:Rt,singleEncode:Et}){if(r==null)throw new TypeError("url is a required option");if(a==null)throw new TypeError("accessKeyId is a required option");if(i==null)throw new TypeError("secretAccessKey is a required option");this.method=e||(n?"POST":"GET"),this.url=new URL(r),this.headers=new Headers(s||{}),this.body=n,this.accessKeyId=a,this.secretAccessKey=i,this.sessionToken=o;let Be,Fe;(!u||!h)&&([Be,Fe]=Dt(this.url,this.headers)),this.service=u||Be||"",this.region=h||Fe||"us-east-1",this.cache=y||new Map,this.datetime=b||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=be,this.appendSessionToken=ge||this.service==="iotdevicegateway",this.headers.delete("Host");let B=this.signQuery?this.url.searchParams:this.headers;if(this.service==="s3"&&!this.headers.has("X-Amz-Content-Sha256")&&this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD"),B.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&B.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter(k=>Rt||!jt.includes(k)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map(k=>k+":"+(k==="host"?this.url.host:(this.headers.get(k)||"").replace(/\s+/g," "))).join(`
|
|
26
|
+
`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!B.has("X-Amz-Expires")&&B.set("X-Amz-Expires","86400"),B.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),B.set("X-Amz-Credential",`${this.accessKeyId}/${this.credentialString}`),B.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");Et||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=st(this.encodedPath);let He=new Set;this.encodedSearch=[...this.url.searchParams].filter(([k])=>{if(!k)return!1;if(this.service==="s3"){if(He.has(k))return!1;He.add(k)}return!0}).map(k=>k.map(ke=>st(encodeURIComponent(ke)))).sort(([k,ke],[Ke,qe])=>k<Ke?-1:k>Ke?1:ke<qe?-1:ke>qe?1:0).map(k=>k.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,`SignedHeaders=${this.signedHeaders}`,`Signature=${await this.signature()}`].join(", ")}async signature(){let e=this.datetime.slice(0,8),r=[this.secretAccessKey,e,this.region,this.service].join(),s=this.cache.get(r);if(!s){let n=await _e(`AWS4${this.secretAccessKey}`,e),a=await _e(n,this.region),i=await _e(a,this.service);s=await _e(i,"aws4_request"),this.cache.set(r,s)}return Ze(await _e(s,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,Ze(await rt(await this.canonicalString()))].join(`
|
|
27
27
|
`)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,`${this.canonicalHeaders}
|
|
28
28
|
`,this.signedHeaders,await this.hexBodyHash()].join(`
|
|
29
|
-
`)}async hexBodyHash(){let e=this.headers.get("X-Amz-Content-Sha256");if(e==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new O("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");e=$e(await rt(this.body||""))}return e}};async function _e(t,e){let r=await crypto.subtle.importKey("raw",typeof t=="string"?ze.encode(t):t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",r,ze.encode(e))}c(_e,"hmac");async function rt(t){return crypto.subtle.digest("SHA-256",Mt(t))}c(rt,"hash");function $e(t){return Array.prototype.map.call(new Uint8Array(t),e=>`0${e.toString(16)}`.slice(-2)).join("")}c($e,"buf2hex");function st(t){return t.replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}c(st,"encodeRfc3986");function Zt(t,e){let{hostname:r,pathname:s}=t,n=r.replace("dualstack.","").match(/([^.]+)\.(?:([^.]*)\.)?amazonaws\.com(?:\.cn)?$/),[a,i]=(n||["",""]).slice(1,3);if(i==="us-gov")i="us-gov-west-1";else if(i==="s3"||i==="s3-accelerate")i="us-east-1",a="s3";else if(a==="iot")r.startsWith("iot.")?a="execute-api":r.startsWith("data.jobs.iot.")?a="iot-jobs-data":a=s==="/mqtt"?"iotdevicegateway":"iotdata";else if(a==="autoscaling"){let o=(e.get("X-Amz-Target")||"").split(".")[0];o==="AnyScaleFrontendService"?a="application-autoscaling":o==="AnyScaleScalingPlannerFrontendService"&&(a="autoscaling-plans")}else i==null&&a.startsWith("s3-")?(i=a.slice(3).replace(/^fips-|^external-1/,""),a="s3"):a.endsWith("-fips")?a=a.slice(0,-5):i&&/-\d$/.test(a)&&!/-\d$/.test(i)&&([a,i]=[i,a]);return a in tt?[tt[a],i]:[a,i]}c(Zt,"guessServiceRegion");async function nt(t){let e=new TextEncoder().encode(t),r=await crypto.subtle.digest({name:"SHA-256"},e);return[...new Uint8Array(r)].map(n=>n.toString(16).padStart(2,"0")).join("")}c(nt,"sha256");var at=new Map;async function it(t,e){let r=JSON.stringify({policyName:t,options:e}),s=at.get(r);if(s!==void 0)return s;let n=`zuplo-policy-${await nt(r)}`;return at.set(r,n),n}c(it,"getPolicyCacheName");async function Ee(t,e,r){let s=typeof e=="string"?r?.method??"GET":e.method,n=typeof e=="string"?e:e.url;for(let a=0;a<=t.retries;a++){try{let i=t.fetchFn?t.fetchFn(e,r):Te.fetch(e,r);if(a===t.retries)return i;let o=await i;if(o.status<500&&o.status!==429)return o;o.body&&await o.body.cancel(),t.logger?.error("Request failed, retrying",{method:s,url:n,status:o.status})}catch(i){if(a===t.retries)throw i;t.logger?.error("Request failed, retrying",{method:s,url:n,error:i})}await new Promise(i=>setTimeout(i,t.retryDelayMs*2**a))}throw new oe("An unknown error occurred, ensure retries is not negative")}c(Ee,"fetchRetry");async function ot(t,e){let r=new URLSearchParams({client_id:t.clientId,client_secret:t.clientSecret,grant_type:"client_credentials"});t.scope&&r.append("scope",t.scope),t.audience&&r.append("audience",t.audience);let s=await Ee({retries:t.retries?.maxRetries??3,retryDelayMs:t.retries?.delayMs??10},t.tokenEndpointUrl,{headers:{"content-type":"application/x-www-form-urlencoded"},method:"POST",body:r});if(s.status!==200){try{let a=await s.text();e.log.error(`Error getting token from identity provider. Status: ${s.status}`,a)}catch{}throw new O("Error getting token from identity provider.")}let n=await s.json();if(n&&typeof n=="object"&&"access_token"in n&&typeof n.access_token=="string"&&"expires_in"in n&&typeof n.expires_in=="number")return{access_token:n.access_token,expires_in:n.expires_in};throw new O("Response returned from identity provider is not in the expected format.")}c(ot,"getClientCredentialsAccessToken");var Ie=class{static{c(this,"ZuploServices")}static async getIDToken(e,r){let s=new Ce("0c13603a-a19f-4f03-a04a-50aa393f7ffa-zuplo-tokens",e),n=await it("zuplo-token",r),a=await s.get(n);if(a)return a;let{authClientId:i,authClientSecret:o,developerApiUrl:u,zuploClientAuthBucketId:h}=Je.instance;if(!i||!o)throw new O("Zuplo service authentication is not enabled for this deployment. Contact support assistance.");let y=await ot({tokenEndpointUrl:new URL(`/v1/client-auth/${h}/oauth/token`,u).toString(),clientId:i,clientSecret:o,audience:r?.audience},e);return s.put(n,y.access_token,y.expires_in-300),y.access_token}};function Ue(t,e){let r=(e?.expirationOffsetSeconds??300)*1e3,s,n;return async()=>{if(s){let a=s.expiration?.getTime();if(a===void 0||a-r>Date.now())return s}return n||(n=(async()=>{try{let a=await t();return s=a,a}finally{n=void 0}})(),n)}}c(Ue,"memoizeWithExpiry");var A={};It(A,{BRAND:()=>dr,DIRTY:()=>F,EMPTY_PATH:()=>Ut,INVALID:()=>m,NEVER:()=>Kr,OK:()=>T,ParseStatus:()=>w,Schema:()=>v,ZodAny:()=>V,ZodArray:()=>z,ZodBigInt:()=>K,ZodBoolean:()=>q,ZodBranded:()=>xe,ZodCatch:()=>ae,ZodDate:()=>X,ZodDefault:()=>ne,ZodDiscriminatedUnion:()=>je,ZodEffects:()=>I,ZodEnum:()=>re,ZodError:()=>S,ZodFirstPartyTypeKind:()=>g,ZodFunction:()=>Me,ZodIntersection:()=>Q,ZodIssueCode:()=>d,ZodLazy:()=>ee,ZodLiteral:()=>te,ZodMap:()=>fe,ZodNaN:()=>me,ZodNativeEnum:()=>se,ZodNever:()=>N,ZodNull:()=>J,ZodNullable:()=>M,ZodNumber:()=>H,ZodObject:()=>C,ZodOptional:()=>R,ZodParsedType:()=>f,ZodPipeline:()=>we,ZodPromise:()=>W,ZodReadonly:()=>ie,ZodRecord:()=>Pe,ZodSchema:()=>v,ZodSet:()=>pe,ZodString:()=>U,ZodSymbol:()=>le,ZodTransformer:()=>I,ZodTuple:()=>P,ZodType:()=>v,ZodUndefined:()=>Y,ZodUnion:()=>G,ZodUnknown:()=>$,ZodVoid:()=>he,addIssueToContext:()=>l,any:()=>_r,array:()=>br,bigint:()=>fr,boolean:()=>_t,coerce:()=>Hr,custom:()=>mt,date:()=>pr,datetimeRegex:()=>ft,defaultErrorMap:()=>Z,discriminatedUnion:()=>Sr,effect:()=>$r,enum:()=>Mr,function:()=>Nr,getErrorMap:()=>ce,getParsedType:()=>j,instanceof:()=>lr,intersection:()=>Cr,isAborted:()=>Oe,isAsync:()=>de,isDirty:()=>Ne,isValid:()=>L,late:()=>ur,lazy:()=>jr,literal:()=>Pr,makeIssue:()=>ve,map:()=>Ir,nan:()=>hr,nativeEnum:()=>Zr,never:()=>xr,null:()=>yr,nullable:()=>Lr,number:()=>yt,object:()=>kr,objectUtil:()=>Ve,oboolean:()=>Fr,onumber:()=>Br,optional:()=>zr,ostring:()=>Wr,pipeline:()=>Vr,preprocess:()=>Ur,promise:()=>Dr,quotelessJson:()=>$t,record:()=>Er,set:()=>Or,setErrorMap:()=>Lt,strictObject:()=>Tr,string:()=>gt,symbol:()=>mr,transformer:()=>$r,tuple:()=>Rr,undefined:()=>gr,union:()=>Ar,unknown:()=>vr,util:()=>x,void:()=>wr});var x;(function(t){t.assertEqual=n=>{};function e(n){}c(e,"assertIs"),t.assertIs=e;function r(n){throw new Error}c(r,"assertNever"),t.assertNever=r,t.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},t.getValidEnumValues=n=>{let a=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return t.objectValues(i)},t.objectValues=n=>t.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},t.find=(n,a)=>{for(let i of n)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}c(s,"joinValues"),t.joinValues=s,t.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Ve;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ve||(Ve={}));var f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=c(t=>{switch(typeof t){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN(t)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(t)?f.array:t===null?f.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?f.promise:typeof Map<"u"&&t instanceof Map?f.map:typeof Set<"u"&&t instanceof Set?f.set:typeof Date<"u"&&t instanceof Date?f.date:f.object;default:return f.unknown}},"getParsedType");var d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$t=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),S=class t extends Error{static{c(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(a){return a.message},s={_errors:[]},n=c(a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(r(i));else{let o=s,u=0;for(;u<i.path.length;){let h=i.path[u];u===i.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(i))):o[h]=o[h]||{_errors:[]},o=o[h],u++}}},"processError");return n(this),s}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},s=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];r[a]=r[a]||[],r[a].push(e(n))}else s.push(e(n));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}};S.create=t=>new S(t);var zt=c((t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===f.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}},"errorMap"),Z=zt;var ct=Z;function Lt(t){ct=t}c(Lt,"setErrorMap");function ce(){return ct}c(ce,"getErrorMap");var ve=c(t=>{let{data:e,path:r,errorMaps:s,issueData:n}=t,a=[...r,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="",u=s.filter(h=>!!h).slice().reverse();for(let h of u)o=h(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},"makeIssue"),Ut=[];function l(t,e){let r=ce(),s=ve({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Z?void 0:Z].filter(n=>!!n)});t.common.issues.push(s)}c(l,"addIssueToContext");var w=class t{static{c(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let s=[];for(let n of r){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,r){let s=[];for(let n of r){let a=await n.key,i=await n.value;s.push({key:a,value:i})}return t.mergeObjectSync(e,s)}static mergeObjectSync(e,r){let s={};for(let n of r){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},m=Object.freeze({status:"aborted"}),F=c(t=>({status:"dirty",value:t}),"DIRTY"),T=c(t=>({status:"valid",value:t}),"OK"),Oe=c(t=>t.status==="aborted","isAborted"),Ne=c(t=>t.status==="dirty","isDirty"),L=c(t=>t.status==="valid","isValid"),de=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var p;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(p||(p={}));var E=class{static{c(this,"ParseInputLazyPath")}constructor(e,r,s,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=s,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},dt=c((t,e)=>{if(L(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new S(t.common.issues);return this._error=r,this._error}}},"handleResult");function _(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:s,description:n}=t;if(e&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:c((i,o)=>{let{message:u}=t;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:u??s??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:u??r??o.defaultError}},"customMap"),description:n}}c(_,"processCreateParams");var v=class{static{c(this,"ZodType")}get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(de(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let s=this.safeParse(e,r);if(s.success)return s.data;throw s.error}safeParse(e,r){let s={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},n=this._parseSync({data:e,path:s.path,parent:s});return dt(s,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return L(s)?{value:s.value}:{issues:r.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>L(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let s=await this.safeParseAsync(e,r);if(s.success)return s.data;throw s.error}async safeParseAsync(e,r){let s={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(de(n)?n:Promise.resolve(n));return dt(s,a)}refine(e,r){let s=c(n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r,"getIssueProperties");return this._refinement((n,a)=>{let i=e(n),o=c(()=>a.addIssue({code:d.custom,...s(n)}),"setError");return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof r=="function"?r(s,n):r),!1))}_refinement(e){return new I({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:c(r=>this["~validate"](r),"validate")}}optional(){return R.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this)}promise(){return W.create(this,this._def)}or(e){return G.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new I({..._(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ne({..._(this._def),innerType:this,defaultValue:r,typeName:g.ZodDefault})}brand(){return new xe({typeName:g.ZodBranded,type:this,..._(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ae({..._(this._def),innerType:this,catchValue:r,typeName:g.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return we.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Vt=/^c[^\s-]{8,}$/i,Wt=/^[0-9a-z]+$/,Bt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ht=/^[a-z0-9_-]{21}$/i,Kt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,qt=/^[-+]?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)?)??$/,Xt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",We,Jt=/^(?:(?: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])$/,Gt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Qt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,er=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lt="((\\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])))",sr=new RegExp(`^${lt}$`);function ht(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}c(ht,"timeRegexSource");function nr(t){return new RegExp(`^${ht(t)}$`)}c(nr,"timeRegex");function ft(t){let e=`${lt}T${ht(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}c(ft,"datetimeRegex");function ar(t,e){return!!((e==="v4"||!e)&&Jt.test(t)||(e==="v6"||!e)&&Qt.test(t))}c(ar,"isValidIP");function ir(t,e){if(!Kt.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}c(ir,"isValidJWT");function or(t,e){return!!((e==="v4"||!e)&&Gt.test(t)||(e==="v6"||!e)&&er.test(t))}c(or,"isValidCidr");var U=class t extends v{static{c(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),m}let s=new w,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Xt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")We||(We=new RegExp(Yt,"u")),We.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ft.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Ht.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Vt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Wt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Bt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?ft(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?sr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?nr(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?qt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?ar(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?ir(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?or(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?tr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?rr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_regex(e,r,s){return this.refinement(n=>e.test(n),{validation:r,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...p.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...p.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...p.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...p.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...p.errToObj(r)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};U.create=t=>new U({checks:[],typeName:g.ZodString,coerce:t?.coerce??!1,..._(t)});function cr(t,e){let r=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=r>s?r:s,a=Number.parseInt(t.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}c(cr,"floatSafeRemainder");var H=class t extends v{static{c(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),m}let s,n=new w;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?cr(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(r)&&Number.isFinite(e)}};H.create=t=>new H({checks:[],typeName:g.ZodNumber,coerce:t?.coerce||!1,..._(t)});var K=class t extends v{static{c(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let s,n=new w;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:f.bigint,received:r.parsedType}),m}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};K.create=t=>new K({checks:[],typeName:g.ZodBigInt,coerce:t?.coerce??!1,..._(t)});var q=class extends v{static{c(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),m}return T(e.data)}};q.create=t=>new q({typeName:g.ZodBoolean,coerce:t?.coerce||!1,..._(t)});var X=class t extends v{static{c(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),m}let s=new w,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};X.create=t=>new X({checks:[],coerce:t?.coerce||!1,typeName:g.ZodDate,..._(t)});var le=class extends v{static{c(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==f.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),m}return T(e.data)}};le.create=t=>new le({typeName:g.ZodSymbol,..._(t)});var Y=class extends v{static{c(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==f.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),m}return T(e.data)}};Y.create=t=>new Y({typeName:g.ZodUndefined,..._(t)});var J=class extends v{static{c(this,"ZodNull")}_parse(e){if(this._getType(e)!==f.null){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),m}return T(e.data)}};J.create=t=>new J({typeName:g.ZodNull,..._(t)});var V=class extends v{static{c(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}};V.create=t=>new V({typeName:g.ZodAny,..._(t)});var $=class extends v{static{c(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}};$.create=t=>new $({typeName:g.ZodUnknown,..._(t)});var N=class extends v{static{c(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:f.never,received:r.parsedType}),m}};N.create=t=>new N({typeName:g.ZodNever,..._(t)});var he=class extends v{static{c(this,"ZodVoid")}_parse(e){if(this._getType(e)!==f.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),m}return T(e.data)}};he.create=t=>new he({typeName:g.ZodVoid,..._(t)});var z=class t extends v{static{c(this,"ZodArray")}_parse(e){let{ctx:r,status:s}=this._processInputParams(e),n=this._def;if(r.parsedType!==f.array)return l(r,{code:d.invalid_type,expected:f.array,received:r.parsedType}),m;if(n.exactLength!==null){let i=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(i||o)&&(l(r,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(l(r,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(l(r,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>n.type._parseAsync(new E(r,i,r.path,o)))).then(i=>w.mergeArray(s,i));let a=[...r.data].map((i,o)=>n.type._parseSync(new E(r,i,r.path,o)));return w.mergeArray(s,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:p.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:p.toString(r)}})}nonempty(e){return this.min(1,e)}};z.create=(t,e)=>new z({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,..._(e)});function ue(t){if(t instanceof C){let e={};for(let r in t.shape){let s=t.shape[r];e[r]=R.create(ue(s))}return new C({...t._def,shape:c(()=>e,"shape")})}else return t instanceof z?new z({...t._def,type:ue(t.element)}):t instanceof R?R.create(ue(t.unwrap())):t instanceof M?M.create(ue(t.unwrap())):t instanceof P?P.create(t.items.map(e=>ue(e))):t}c(ue,"deepPartialify");var C=class t extends v{static{c(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==f.object){let h=this._getOrReturnCtx(e);return l(h,{code:d.invalid_type,expected:f.object,received:h.parsedType}),m}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let h in n.data)i.includes(h)||o.push(h);let u=[];for(let h of i){let y=a[h],b=n.data[h];u.push({key:{status:"valid",value:h},value:y._parse(new E(n,b,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof N){let h=this._def.unknownKeys;if(h==="passthrough")for(let y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:n.data[y]}});else if(h==="strict")o.length>0&&(l(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let y of o){let b=n.data[y];u.push({key:{status:"valid",value:y},value:h._parse(new E(n,b,n.path,y)),alwaysSet:y in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let y of u){let b=await y.key,be=await y.value;h.push({key:b,value:be,alwaysSet:y.alwaysSet})}return h}).then(h=>w.mergeObjectSync(s,h)):w.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:c((r,s)=>{let n=this._def.errorMap?.(r,s).message??s.defaultError;return r.code==="unrecognized_keys"?{message:p.errToObj(e).message??n}:{message:n}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:c(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:c(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:g.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let s of x.objectKeys(e))e[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new t({...this._def,shape:c(()=>r,"shape")})}omit(e){let r={};for(let s of x.objectKeys(this.shape))e[s]||(r[s]=this.shape[s]);return new t({...this._def,shape:c(()=>r,"shape")})}deepPartial(){return ue(this)}partial(e){let r={};for(let s of x.objectKeys(this.shape)){let n=this.shape[s];e&&!e[s]?r[s]=n:r[s]=n.optional()}return new t({...this._def,shape:c(()=>r,"shape")})}required(e){let r={};for(let s of x.objectKeys(this.shape))if(e&&!e[s])r[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof R;)a=a._def.innerType;r[s]=a}return new t({...this._def,shape:c(()=>r,"shape")})}keyof(){return pt(x.objectKeys(this.shape))}};C.create=(t,e)=>new C({shape:c(()=>t,"shape"),unknownKeys:"strip",catchall:N.create(),typeName:g.ZodObject,..._(e)});C.strictCreate=(t,e)=>new C({shape:c(()=>t,"shape"),unknownKeys:"strict",catchall:N.create(),typeName:g.ZodObject,..._(e)});C.lazycreate=(t,e)=>new C({shape:t,unknownKeys:"strip",catchall:N.create(),typeName:g.ZodObject,..._(e)});var G=class extends v{static{c(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new S(o.ctx.common.issues));return l(r,{code:d.invalid_union,unionErrors:i}),m}if(c(n,"handleResults"),r.common.async)return Promise.all(s.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let u of s){let h={...r,common:{...r.common,issues:[]},parent:null},y=u._parseSync({data:r.data,path:r.path,parent:h});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:h}),h.common.issues.length&&i.push(h.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(u=>new S(u));return l(r,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}};G.create=(t,e)=>new G({options:t,typeName:g.ZodUnion,..._(e)});var D=c(t=>t instanceof ee?D(t.schema):t instanceof I?D(t.innerType()):t instanceof te?[t.value]:t instanceof re?t.options:t instanceof se?x.objectValues(t.enum):t instanceof ne?D(t._def.innerType):t instanceof Y?[void 0]:t instanceof J?[null]:t instanceof R?[void 0,...D(t.unwrap())]:t instanceof M?[null,...D(t.unwrap())]:t instanceof xe||t instanceof ie?D(t.unwrap()):t instanceof ae?D(t._def.innerType):[],"getDiscriminator"),je=class t extends v{static{c(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.object)return l(r,{code:d.invalid_type,expected:f.object,received:r.parsedType}),m;let s=this.discriminator,n=r.data[s],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(l(r,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,s){let n=new Map;for(let a of r){let i=D(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new t({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,..._(s)})}};function Be(t,e){let r=j(t),s=j(e);if(t===e)return{valid:!0,data:t};if(r===f.object&&s===f.object){let n=x.objectKeys(e),a=x.objectKeys(t).filter(o=>n.indexOf(o)!==-1),i={...t,...e};for(let o of a){let u=Be(t[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(r===f.array&&s===f.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<t.length;a++){let i=t[a],o=e[a],u=Be(i,o);if(!u.valid)return{valid:!1};n.push(u.data)}return{valid:!0,data:n}}else return r===f.date&&s===f.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}c(Be,"mergeValues");var Q=class extends v{static{c(this,"ZodIntersection")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=c((a,i)=>{if(Oe(a)||Oe(i))return m;let o=Be(a.value,i.value);return o.valid?((Ne(a)||Ne(i))&&r.dirty(),{status:r.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),m)},"handleParsed");return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};Q.create=(t,e,r)=>new Q({left:t,right:e,typeName:g.ZodIntersection,..._(r)});var P=class t extends v{static{c(this,"ZodTuple")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return l(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...s.data].map((i,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new E(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>w.mergeArray(r,i)):w.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};P.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new P({items:t,typeName:g.ZodTuple,rest:null,..._(e)})};var Pe=class t extends v{static{c(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.object)return l(s,{code:d.invalid_type,expected:f.object,received:s.parsedType}),m;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new E(s,o,s.path,o)),value:i._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?w.mergeObjectAsync(r,n):w.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,s){return r instanceof v?new t({keyType:e,valueType:r,typeName:g.ZodRecord,..._(s)}):new t({keyType:U.create(),valueType:e,typeName:g.ZodRecord,..._(r)})}},fe=class extends v{static{c(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return l(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),m;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,u],h)=>({key:n._parse(new E(s,o,s.path,[h,"key"])),value:a._parse(new E(s,u,s.path,[h,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of i){let h=await u.key,y=await u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(h.value,y.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of i){let h=u.key,y=u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(h.value,y.value)}return{status:r.value,value:o}}}};fe.create=(t,e,r)=>new fe({valueType:e,keyType:t,typeName:g.ZodMap,..._(r)});var pe=class t extends v{static{c(this,"ZodSet")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return l(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),m;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function i(u){let h=new Set;for(let y of u){if(y.status==="aborted")return m;y.status==="dirty"&&r.dirty(),h.add(y.value)}return{status:r.value,value:h}}c(i,"finalizeSet");let o=[...s.data.values()].map((u,h)=>a._parse(new E(s,u,s.path,h)));return s.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:p.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};pe.create=(t,e)=>new pe({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,..._(e)});var Me=class t extends v{static{c(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.function)return l(r,{code:d.invalid_type,expected:f.function,received:r.parsedType}),m;function s(o,u){return ve({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ce(),Z].filter(h=>!!h),issueData:{code:d.invalid_arguments,argumentsError:u}})}c(s,"makeArgsIssue");function n(o,u){return ve({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ce(),Z].filter(h=>!!h),issueData:{code:d.invalid_return_type,returnTypeError:u}})}c(n,"makeReturnsIssue");let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof W){let o=this;return T(async function(...u){let h=new S([]),y=await o._def.args.parseAsync(u,a).catch(ge=>{throw h.addIssue(s(u,ge)),h}),b=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(b,a).catch(ge=>{throw h.addIssue(n(b,ge)),h})})}else{let o=this;return T(function(...u){let h=o._def.args.safeParse(u,a);if(!h.success)throw new S([s(u,h.error)]);let y=Reflect.apply(i,this,h.data),b=o._def.returns.safeParse(y,a);if(!b.success)throw new S([n(y,b.error)]);return b.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:P.create(e).rest($.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,s){return new t({args:e||P.create([]).rest($.create()),returns:r||$.create(),typeName:g.ZodFunction,..._(s)})}},ee=class extends v{static{c(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ee.create=(t,e)=>new ee({getter:t,typeName:g.ZodLazy,..._(e)});var te=class extends v{static{c(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return l(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};te.create=(t,e)=>new te({value:t,typeName:g.ZodLiteral,..._(e)});function pt(t,e){return new re({values:t,typeName:g.ZodEnum,..._(e)})}c(pt,"createZodEnum");var re=class t extends v{static{c(this,"ZodEnum")}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),s=this._def.values;return l(r,{expected:x.joinValues(s),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),s=this._def.values;return l(r,{received:r.data,code:d.invalid_enum_value,options:s}),m}return T(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(s=>!e.includes(s)),{...this._def,...r})}};re.create=pt;var se=class extends v{static{c(this,"ZodNativeEnum")}_parse(e){let r=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){let n=x.objectValues(r);return l(s,{expected:x.joinValues(n),received:s.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.objectValues(r);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),m}return T(e.data)}get enum(){return this._def.values}};se.create=(t,e)=>new se({values:t,typeName:g.ZodNativeEnum,..._(e)});var W=class extends v{static{c(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.promise&&r.common.async===!1)return l(r,{code:d.invalid_type,expected:f.promise,received:r.parsedType}),m;let s=r.parsedType===f.promise?r.data:Promise.resolve(r.data);return T(s.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};W.create=(t,e)=>new W({type:t,typeName:g.ZodPromise,..._(e)});var I=class extends v{static{c(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:c(i=>{l(s,i),i.fatal?r.abort():r.dirty()},"addIssue"),get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return m;let u=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return u.status==="aborted"?m:u.status==="dirty"?F(u.value):r.value==="dirty"?F(u.value):u});{if(r.value==="aborted")return m;let o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?m:o.status==="dirty"?F(o.value):r.value==="dirty"?F(o.value):o}}if(n.type==="refinement"){let i=c(o=>{let u=n.refinement(o,a);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o},"executeRefinement");if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!L(i))return m;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>L(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:r.value,value:o})):m);x.assertNever(n)}};I.create=(t,e,r)=>new I({schema:t,typeName:g.ZodEffects,effect:e,..._(r)});I.createWithPreprocess=(t,e,r)=>new I({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,..._(r)});var R=class extends v{static{c(this,"ZodOptional")}_parse(e){return this._getType(e)===f.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R.create=(t,e)=>new R({innerType:t,typeName:g.ZodOptional,..._(e)});var M=class extends v{static{c(this,"ZodNullable")}_parse(e){return this._getType(e)===f.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M.create=(t,e)=>new M({innerType:t,typeName:g.ZodNullable,..._(e)});var ne=class extends v{static{c(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return r.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ne.create=(t,e)=>new ne({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});var ae=class extends v{static{c(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),s={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return de(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};ae.create=(t,e)=>new ae({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});var me=class extends v{static{c(this,"ZodNaN")}_parse(e){if(this._getType(e)!==f.nan){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}};me.create=t=>new me({typeName:g.ZodNaN,..._(t)});var dr=Symbol("zod_brand"),xe=class extends v{static{c(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}},we=class t extends v{static{c(this,"ZodPipeline")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.common.async)return c(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(r.dirty(),F(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})},"handleAsync")();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,r){return new t({in:e,out:r,typeName:g.ZodPipeline})}},ie=class extends v{static{c(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),s=c(n=>(L(n)&&(n.value=Object.freeze(n.value)),n),"freeze");return de(r)?r.then(n=>s(n)):s(r)}unwrap(){return this._def.innerType}};ie.create=(t,e)=>new ie({innerType:t,typeName:g.ZodReadonly,..._(e)});function ut(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}c(ut,"cleanParams");function mt(t,e={},r){return t?V.create().superRefine((s,n)=>{let a=t(s);if(a instanceof Promise)return a.then(i=>{if(!i){let o=ut(e,s),u=o.fatal??r??!0;n.addIssue({code:"custom",...o,fatal:u})}});if(!a){let i=ut(e,s),o=i.fatal??r??!0;n.addIssue({code:"custom",...i,fatal:o})}}):V.create()}c(mt,"custom");var ur={object:C.lazycreate},g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var lr=c((t,e={message:`Input not instance of ${t.name}`})=>mt(r=>r instanceof t,e),"instanceOfType"),gt=U.create,yt=H.create,hr=me.create,fr=K.create,_t=q.create,pr=X.create,mr=le.create,gr=Y.create,yr=J.create,_r=V.create,vr=$.create,xr=N.create,wr=he.create,br=z.create,kr=C.create,Tr=C.strictCreate,Ar=G.create,Sr=je.create,Cr=Q.create,Rr=P.create,Er=Pe.create,Ir=fe.create,Or=pe.create,Nr=Me.create,jr=ee.create,Pr=te.create,Mr=re.create,Zr=se.create,Dr=W.create,$r=I.create,zr=R.create,Lr=M.create,Ur=I.createWithPreprocess,Vr=we.create,Wr=c(()=>gt().optional(),"ostring"),Br=c(()=>yt().optional(),"onumber"),Fr=c(()=>_t().optional(),"oboolean"),Hr={string:c((t=>U.create({...t,coerce:!0})),"string"),number:c((t=>H.create({...t,coerce:!0})),"number"),boolean:c((t=>q.create({...t,coerce:!0})),"boolean"),bigint:c((t=>K.create({...t,coerce:!0})),"bigint"),date:c((t=>X.create({...t,coerce:!0})),"date")};var Kr=m;var vt="2011-06-15",xt=A.object({AccessKeyId:A.string(),SecretAccessKey:A.string(),SessionToken:A.string(),Expiration:A.union([A.number(),A.string()])}),qr=A.object({AssumeRoleResponse:A.object({AssumeRoleResult:A.object({Credentials:xt})})}),Xr=A.object({AssumeRoleWithWebIdentityResponse:A.object({AssumeRoleWithWebIdentityResult:A.object({Credentials:xt})})});function wt(t,e){return e||`https://sts.${t}.amazonaws.com/`}c(wt,"stsEndpoint");function Yr(t){return typeof t=="number"?new Date(t*1e3):new Date(t)}c(Yr,"normalizeExpiration");function Jr(t){return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:Yr(t.Expiration)}}c(Jr,"toAwsCredentials");async function bt(t,e,r,s,n){let a=await t.text();if(!t.ok){n?.error({status:t.status,body:a},`AWS STS ${s} request failed`);let u="";throw a.includes("ValidationError")&&a.includes("DurationSeconds")?u=" If 'durationSeconds' exceeds the role's maximum session duration, lower it or raise the role's MaxSessionDuration.":a.includes("AccessDenied")?u=" Check that the role's trust policy allows this principal to assume it.":a.includes("InvalidIdentityToken")&&(u=" The web identity token was rejected. Verify the IAM OIDC provider and that the token audience matches a configured client ID."),new O(`Could not get AWS credentials from STS.${u}`,{cause:new Error(`AWS STS ${s} failed (${t.status}): ${a}`)})}let i;try{i=JSON.parse(a)}catch(u){throw n?.error({body:a},`AWS STS ${s} returned non-JSON`),new O("The response returned from AWS STS is not in the expected format.",{cause:u})}let o=e.safeParse(i);if(!o.success)throw n?.error({body:a,issues:o.error.issues},`AWS STS ${s} response missing credentials`),new O("The response returned from AWS STS is not in the expected format.");return Jr(r(o.data))}c(bt,"parseStsResponse");async function kt(t,e){let r=new URLSearchParams({Action:"AssumeRoleWithWebIdentity",Version:vt,RoleArn:t.roleArn,RoleSessionName:t.roleSessionName,WebIdentityToken:t.webIdentityToken,DurationSeconds:String(t.durationSeconds)}),s=await Ee({retries:e.retries,retryDelayMs:e.retryDelayMs,logger:e.logger},wt(t.region,t.stsEndpoint),{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:r});return bt(s,Xr,n=>n.AssumeRoleWithWebIdentityResponse.AssumeRoleWithWebIdentityResult.Credentials,"AssumeRoleWithWebIdentity",e.logger)}c(kt,"assumeRoleWithWebIdentity");async function Tt(t){let e=new URLSearchParams({Action:"AssumeRole",Version:vt,RoleArn:t.roleArn,RoleSessionName:t.roleSessionName,DurationSeconds:String(t.durationSeconds)});t.externalId&&e.set("ExternalId",t.externalId);let s=await new Re({accessKeyId:t.credentials.accessKeyId,secretAccessKey:t.credentials.secretAccessKey,sessionToken:t.credentials.sessionToken,service:"sts",region:t.region,retries:t.retries}).fetch(wt(t.region,t.stsEndpoint),{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:e.toString()});return bt(s,qr,n=>n.AssumeRoleResponse.AssumeRoleResult.Credentials,"AssumeRole",t.logger)}c(Tt,"assumeRole");var At="zuplo-gateway",St=3600,es="sts.amazonaws.com";function Ct(t,e){return{retries:t?.retries??3,retryDelayMs:t?.retryDelayMs??10,logger:e}}c(Ct,"resolveRetry");function Dn(t){let e=typeof t.masterCredentials=="function"?t.masterCredentials:()=>Promise.resolve(t.masterCredentials),r=Ct(t.retry,t.logger);return Ue(async()=>{let s=await e();return Tt({region:t.region,roleArn:t.roleArn,roleSessionName:t.roleSessionName??At,durationSeconds:t.durationSeconds??St,externalId:t.externalId,stsEndpoint:t.stsEndpoint,credentials:s,retries:r.retries,logger:r.logger})},{expirationOffsetSeconds:t.expirationOffsetSeconds})}c(Dn,"fromTemporaryCredentials");function ts(t){let e=Ct(t.retry,t.logger);return Ue(async()=>{let r=typeof t.webIdentityToken=="function"?await t.webIdentityToken():t.webIdentityToken;return kt({region:t.region,roleArn:t.roleArn,webIdentityToken:r,roleSessionName:t.roleSessionName??At,durationSeconds:t.durationSeconds??St,stsEndpoint:t.stsEndpoint},e)},{expirationOffsetSeconds:t.expirationOffsetSeconds})}c(ts,"fromWebToken");function $n(t){return ts({region:t.region,roleArn:t.roleArn,webIdentityToken:c(()=>Ie.getIDToken(t.context,{audience:t.audience??es}),"webIdentityToken"),roleSessionName:t.roleSessionName,durationSeconds:t.durationSeconds,stsEndpoint:t.stsEndpoint,expirationOffsetSeconds:t.expirationOffsetSeconds,retry:t.retry,logger:t.logger})}c($n,"fromZuploIdentity");export{Ae as a,nt as b,it as c,ye as d,Se as e,Ce as f,Ee as g,A as h,ps as i,et as j,Re as k,Le as l,ot as m,Ie as n,Dn as o,ts as p,$n as q};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
`)}async hexBodyHash(){let e=this.headers.get("X-Amz-Content-Sha256");if(e==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new O("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");e=Ze(await rt(this.body||""))}return e}};async function _e(t,e){let r=await crypto.subtle.importKey("raw",typeof t=="string"?$e.encode(t):t,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",r,$e.encode(e))}c(_e,"hmac");async function rt(t){return crypto.subtle.digest("SHA-256",Mt(t))}c(rt,"hash");function Ze(t){return Array.prototype.map.call(new Uint8Array(t),e=>`0${e.toString(16)}`.slice(-2)).join("")}c(Ze,"buf2hex");function st(t){return t.replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}c(st,"encodeRfc3986");function Dt(t,e){let{hostname:r,pathname:s}=t,n=r.replace("dualstack.","").match(/([^.]+)\.(?:([^.]*)\.)?amazonaws\.com(?:\.cn)?$/),[a,i]=(n||["",""]).slice(1,3);if(i==="us-gov")i="us-gov-west-1";else if(i==="s3"||i==="s3-accelerate")i="us-east-1",a="s3";else if(a==="iot")r.startsWith("iot.")?a="execute-api":r.startsWith("data.jobs.iot.")?a="iot-jobs-data":a=s==="/mqtt"?"iotdevicegateway":"iotdata";else if(a==="autoscaling"){let o=(e.get("X-Amz-Target")||"").split(".")[0];o==="AnyScaleFrontendService"?a="application-autoscaling":o==="AnyScaleScalingPlannerFrontendService"&&(a="autoscaling-plans")}else i==null&&a.startsWith("s3-")?(i=a.slice(3).replace(/^fips-|^external-1/,""),a="s3"):a.endsWith("-fips")?a=a.slice(0,-5):i&&/-\d$/.test(a)&&!/-\d$/.test(i)&&([a,i]=[i,a]);return a in tt?[tt[a],i]:[a,i]}c(Dt,"guessServiceRegion");async function nt(t){let e=new TextEncoder().encode(t),r=await crypto.subtle.digest({name:"SHA-256"},e);return[...new Uint8Array(r)].map(n=>n.toString(16).padStart(2,"0")).join("")}c(nt,"sha256");var at=new Map;async function it(t,e){let r=JSON.stringify({policyName:t,options:e}),s=at.get(r);if(s!==void 0)return s;let n=`zuplo-policy-${await nt(r)}`;return at.set(r,n),n}c(it,"getPolicyCacheName");async function Re(t,e,r){let s=typeof e=="string"?r?.method??"GET":e.method,n=typeof e=="string"?e:e.url;for(let a=0;a<=t.retries;a++){try{let i=t.fetchFn?t.fetchFn(e,r):Ae.fetch(e,r);if(a===t.retries)return i;let o=await i;if(o.status<500&&o.status!==429)return o;o.body&&await o.body.cancel(),t.logger?.error("Request failed, retrying",{method:s,url:n,status:o.status})}catch(i){if(a===t.retries)throw i;t.logger?.error("Request failed, retrying",{method:s,url:n,error:i})}await new Promise(i=>setTimeout(i,t.retryDelayMs*2**a))}throw new oe("An unknown error occurred, ensure retries is not negative")}c(Re,"fetchRetry");async function ot(t,e){let r=new URLSearchParams({client_id:t.clientId,client_secret:t.clientSecret,grant_type:"client_credentials"});t.scope&&r.append("scope",t.scope),t.audience&&r.append("audience",t.audience);let s=await Re({retries:t.retries?.maxRetries??3,retryDelayMs:t.retries?.delayMs??10},t.tokenEndpointUrl,{headers:{"content-type":"application/x-www-form-urlencoded"},method:"POST",body:r});if(s.status!==200){try{let a=await s.text();e.log.error(`Error getting token from identity provider. Status: ${s.status}`,a)}catch{}throw new O("Error getting token from identity provider.")}let n=await s.json();if(n&&typeof n=="object"&&"access_token"in n&&typeof n.access_token=="string"&&"expires_in"in n&&typeof n.expires_in=="number")return{access_token:n.access_token,expires_in:n.expires_in};throw new O("Response returned from identity provider is not in the expected format.")}c(ot,"getClientCredentialsAccessToken");var Ee=class{static{c(this,"ZuploServices")}static async getIDToken(e,r){let s=new Se("0c13603a-a19f-4f03-a04a-50aa393f7ffa-zuplo-tokens",e),n=await it("zuplo-token",r),a=await s.get(n);if(a)return a;let{authClientId:i,authClientSecret:o,developerApiUrl:u,zuploClientAuthBucketId:h}=Ye.instance;if(!i||!o)throw new O("Zuplo service authentication is not enabled for this deployment. Contact support assistance.");let y=await ot({tokenEndpointUrl:new URL(`/v1/client-auth/${h}/oauth/token`,u).toString(),clientId:i,clientSecret:o,audience:r?.audience},e);return s.put(n,y.access_token,y.expires_in-300),y.access_token}};function Le(t,e){let r=(e?.expirationOffsetSeconds??300)*1e3,s,n;return async()=>{if(s){let a=s.expiration?.getTime();if(a===void 0||a-r>Date.now())return s}return n||(n=(async()=>{try{let a=await t();return s=a,a}finally{n=void 0}})(),n)}}c(Le,"memoizeWithExpiry");var T={};It(T,{BRAND:()=>dr,DIRTY:()=>F,EMPTY_PATH:()=>Ut,INVALID:()=>m,NEVER:()=>Kr,OK:()=>A,ParseStatus:()=>w,Schema:()=>v,ZodAny:()=>V,ZodArray:()=>z,ZodBigInt:()=>K,ZodBoolean:()=>q,ZodBranded:()=>xe,ZodCatch:()=>ae,ZodDate:()=>X,ZodDefault:()=>ne,ZodDiscriminatedUnion:()=>Ne,ZodEffects:()=>I,ZodEnum:()=>re,ZodError:()=>S,ZodFirstPartyTypeKind:()=>g,ZodFunction:()=>Pe,ZodIntersection:()=>Q,ZodIssueCode:()=>d,ZodLazy:()=>ee,ZodLiteral:()=>te,ZodMap:()=>fe,ZodNaN:()=>me,ZodNativeEnum:()=>se,ZodNever:()=>N,ZodNull:()=>J,ZodNullable:()=>M,ZodNumber:()=>H,ZodObject:()=>C,ZodOptional:()=>R,ZodParsedType:()=>f,ZodPipeline:()=>we,ZodPromise:()=>W,ZodReadonly:()=>ie,ZodRecord:()=>je,ZodSchema:()=>v,ZodSet:()=>pe,ZodString:()=>U,ZodSymbol:()=>le,ZodTransformer:()=>I,ZodTuple:()=>P,ZodType:()=>v,ZodUndefined:()=>Y,ZodUnion:()=>G,ZodUnknown:()=>$,ZodVoid:()=>he,addIssueToContext:()=>l,any:()=>_r,array:()=>br,bigint:()=>fr,boolean:()=>_t,coerce:()=>Hr,custom:()=>mt,date:()=>pr,datetimeRegex:()=>ft,defaultErrorMap:()=>D,discriminatedUnion:()=>Sr,effect:()=>$r,enum:()=>Mr,function:()=>Nr,getErrorMap:()=>ce,getParsedType:()=>j,instanceof:()=>lr,intersection:()=>Cr,isAborted:()=>Ie,isAsync:()=>de,isDirty:()=>Oe,isValid:()=>L,late:()=>ur,lazy:()=>jr,literal:()=>Pr,makeIssue:()=>ve,map:()=>Ir,nan:()=>hr,nativeEnum:()=>Dr,never:()=>xr,null:()=>yr,nullable:()=>Lr,number:()=>yt,object:()=>kr,objectUtil:()=>Ue,oboolean:()=>Fr,onumber:()=>Br,optional:()=>zr,ostring:()=>Wr,pipeline:()=>Vr,preprocess:()=>Ur,promise:()=>Zr,quotelessJson:()=>$t,record:()=>Er,set:()=>Or,setErrorMap:()=>Lt,strictObject:()=>Ar,string:()=>gt,symbol:()=>mr,transformer:()=>$r,tuple:()=>Rr,undefined:()=>gr,union:()=>Tr,unknown:()=>vr,util:()=>x,void:()=>wr});var x;(function(t){t.assertEqual=n=>{};function e(n){}c(e,"assertIs"),t.assertIs=e;function r(n){throw new Error}c(r,"assertNever"),t.assertNever=r,t.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},t.getValidEnumValues=n=>{let a=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return t.objectValues(i)},t.objectValues=n=>t.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},t.find=(n,a)=>{for(let i of n)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}c(s,"joinValues"),t.joinValues=s,t.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Ue;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ue||(Ue={}));var f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=c(t=>{switch(typeof t){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN(t)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(t)?f.array:t===null?f.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?f.promise:typeof Map<"u"&&t instanceof Map?f.map:typeof Set<"u"&&t instanceof Set?f.set:typeof Date<"u"&&t instanceof Date?f.date:f.object;default:return f.unknown}},"getParsedType");var d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$t=c(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),S=class t extends Error{static{c(this,"ZodError")}get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(a){return a.message},s={_errors:[]},n=c(a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(r(i));else{let o=s,u=0;for(;u<i.path.length;){let h=i.path[u];u===i.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(i))):o[h]=o[h]||{_errors:[]},o=o[h],u++}}},"processError");return n(this),s}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},s=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];r[a]=r[a]||[],r[a].push(e(n))}else s.push(e(n));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}};S.create=t=>new S(t);var zt=c((t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===f.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}},"errorMap"),D=zt;var ct=D;function Lt(t){ct=t}c(Lt,"setErrorMap");function ce(){return ct}c(ce,"getErrorMap");var ve=c(t=>{let{data:e,path:r,errorMaps:s,issueData:n}=t,a=[...r,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="",u=s.filter(h=>!!h).slice().reverse();for(let h of u)o=h(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},"makeIssue"),Ut=[];function l(t,e){let r=ce(),s=ve({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===D?void 0:D].filter(n=>!!n)});t.common.issues.push(s)}c(l,"addIssueToContext");var w=class t{static{c(this,"ParseStatus")}constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let s=[];for(let n of r){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,r){let s=[];for(let n of r){let a=await n.key,i=await n.value;s.push({key:a,value:i})}return t.mergeObjectSync(e,s)}static mergeObjectSync(e,r){let s={};for(let n of r){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},m=Object.freeze({status:"aborted"}),F=c(t=>({status:"dirty",value:t}),"DIRTY"),A=c(t=>({status:"valid",value:t}),"OK"),Ie=c(t=>t.status==="aborted","isAborted"),Oe=c(t=>t.status==="dirty","isDirty"),L=c(t=>t.status==="valid","isValid"),de=c(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var p;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(p||(p={}));var E=class{static{c(this,"ParseInputLazyPath")}constructor(e,r,s,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=s,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},dt=c((t,e)=>{if(L(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new S(t.common.issues);return this._error=r,this._error}}},"handleResult");function _(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:s,description:n}=t;if(e&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:c((i,o)=>{let{message:u}=t;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:u??s??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:u??r??o.defaultError}},"customMap"),description:n}}c(_,"processCreateParams");var v=class{static{c(this,"ZodType")}get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(de(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let s=this.safeParse(e,r);if(s.success)return s.data;throw s.error}safeParse(e,r){let s={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},n=this._parseSync({data:e,path:s.path,parent:s});return dt(s,n)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return L(s)?{value:s.value}:{issues:r.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>L(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let s=await this.safeParseAsync(e,r);if(s.success)return s.data;throw s.error}async safeParseAsync(e,r){let s={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(de(n)?n:Promise.resolve(n));return dt(s,a)}refine(e,r){let s=c(n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r,"getIssueProperties");return this._refinement((n,a)=>{let i=e(n),o=c(()=>a.addIssue({code:d.custom,...s(n)}),"setError");return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof r=="function"?r(s,n):r),!1))}_refinement(e){return new I({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:c(r=>this["~validate"](r),"validate")}}optional(){return R.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z.create(this)}promise(){return W.create(this,this._def)}or(e){return G.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new I({..._(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ne({..._(this._def),innerType:this,defaultValue:r,typeName:g.ZodDefault})}brand(){return new xe({typeName:g.ZodBranded,type:this,..._(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ae({..._(this._def),innerType:this,catchValue:r,typeName:g.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return we.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Vt=/^c[^\s-]{8,}$/i,Wt=/^[0-9a-z]+$/,Bt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ht=/^[a-z0-9_-]{21}$/i,Kt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,qt=/^[-+]?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)?)??$/,Xt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ve,Jt=/^(?:(?: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])$/,Gt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Qt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,er=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lt="((\\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])))",sr=new RegExp(`^${lt}$`);function ht(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}c(ht,"timeRegexSource");function nr(t){return new RegExp(`^${ht(t)}$`)}c(nr,"timeRegex");function ft(t){let e=`${lt}T${ht(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}c(ft,"datetimeRegex");function ar(t,e){return!!((e==="v4"||!e)&&Jt.test(t)||(e==="v6"||!e)&&Qt.test(t))}c(ar,"isValidIP");function ir(t,e){if(!Kt.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}c(ir,"isValidJWT");function or(t,e){return!!((e==="v4"||!e)&&Gt.test(t)||(e==="v6"||!e)&&er.test(t))}c(or,"isValidCidr");var U=class t extends v{static{c(this,"ZodString")}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),m}let s=new w,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Xt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Ve||(Ve=new RegExp(Yt,"u")),Ve.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ft.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Ht.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Vt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Wt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Bt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?ft(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?sr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?nr(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?qt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?ar(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?ir(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?or(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?tr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?rr.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_regex(e,r,s){return this.refinement(n=>e.test(n),{validation:r,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...p.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...p.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...p.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...p.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...p.errToObj(r)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};U.create=t=>new U({checks:[],typeName:g.ZodString,coerce:t?.coerce??!1,..._(t)});function cr(t,e){let r=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=r>s?r:s,a=Number.parseInt(t.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}c(cr,"floatSafeRemainder");var H=class t extends v{static{c(this,"ZodNumber")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),m}let s,n=new w;for(let a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?cr(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(r)&&Number.isFinite(e)}};H.create=t=>new H({checks:[],typeName:g.ZodNumber,coerce:t?.coerce||!1,..._(t)});var K=class t extends v{static{c(this,"ZodBigInt")}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let s,n=new w;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:f.bigint,received:r.parsedType}),m}gte(e,r){return this.setLimit("min",e,!0,p.toString(r))}gt(e,r){return this.setLimit("min",e,!1,p.toString(r))}lte(e,r){return this.setLimit("max",e,!0,p.toString(r))}lt(e,r){return this.setLimit("max",e,!1,p.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};K.create=t=>new K({checks:[],typeName:g.ZodBigInt,coerce:t?.coerce??!1,..._(t)});var q=class extends v{static{c(this,"ZodBoolean")}_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),m}return A(e.data)}};q.create=t=>new q({typeName:g.ZodBoolean,coerce:t?.coerce||!1,..._(t)});var X=class t extends v{static{c(this,"ZodDate")}_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),m}let s=new w,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};X.create=t=>new X({checks:[],coerce:t?.coerce||!1,typeName:g.ZodDate,..._(t)});var le=class extends v{static{c(this,"ZodSymbol")}_parse(e){if(this._getType(e)!==f.symbol){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),m}return A(e.data)}};le.create=t=>new le({typeName:g.ZodSymbol,..._(t)});var Y=class extends v{static{c(this,"ZodUndefined")}_parse(e){if(this._getType(e)!==f.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),m}return A(e.data)}};Y.create=t=>new Y({typeName:g.ZodUndefined,..._(t)});var J=class extends v{static{c(this,"ZodNull")}_parse(e){if(this._getType(e)!==f.null){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),m}return A(e.data)}};J.create=t=>new J({typeName:g.ZodNull,..._(t)});var V=class extends v{static{c(this,"ZodAny")}constructor(){super(...arguments),this._any=!0}_parse(e){return A(e.data)}};V.create=t=>new V({typeName:g.ZodAny,..._(t)});var $=class extends v{static{c(this,"ZodUnknown")}constructor(){super(...arguments),this._unknown=!0}_parse(e){return A(e.data)}};$.create=t=>new $({typeName:g.ZodUnknown,..._(t)});var N=class extends v{static{c(this,"ZodNever")}_parse(e){let r=this._getOrReturnCtx(e);return l(r,{code:d.invalid_type,expected:f.never,received:r.parsedType}),m}};N.create=t=>new N({typeName:g.ZodNever,..._(t)});var he=class extends v{static{c(this,"ZodVoid")}_parse(e){if(this._getType(e)!==f.undefined){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),m}return A(e.data)}};he.create=t=>new he({typeName:g.ZodVoid,..._(t)});var z=class t extends v{static{c(this,"ZodArray")}_parse(e){let{ctx:r,status:s}=this._processInputParams(e),n=this._def;if(r.parsedType!==f.array)return l(r,{code:d.invalid_type,expected:f.array,received:r.parsedType}),m;if(n.exactLength!==null){let i=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(i||o)&&(l(r,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(l(r,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(l(r,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>n.type._parseAsync(new E(r,i,r.path,o)))).then(i=>w.mergeArray(s,i));let a=[...r.data].map((i,o)=>n.type._parseSync(new E(r,i,r.path,o)));return w.mergeArray(s,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:p.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:p.toString(r)}})}nonempty(e){return this.min(1,e)}};z.create=(t,e)=>new z({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,..._(e)});function ue(t){if(t instanceof C){let e={};for(let r in t.shape){let s=t.shape[r];e[r]=R.create(ue(s))}return new C({...t._def,shape:c(()=>e,"shape")})}else return t instanceof z?new z({...t._def,type:ue(t.element)}):t instanceof R?R.create(ue(t.unwrap())):t instanceof M?M.create(ue(t.unwrap())):t instanceof P?P.create(t.items.map(e=>ue(e))):t}c(ue,"deepPartialify");var C=class t extends v{static{c(this,"ZodObject")}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==f.object){let h=this._getOrReturnCtx(e);return l(h,{code:d.invalid_type,expected:f.object,received:h.parsedType}),m}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(let h in n.data)i.includes(h)||o.push(h);let u=[];for(let h of i){let y=a[h],b=n.data[h];u.push({key:{status:"valid",value:h},value:y._parse(new E(n,b,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof N){let h=this._def.unknownKeys;if(h==="passthrough")for(let y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:n.data[y]}});else if(h==="strict")o.length>0&&(l(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let y of o){let b=n.data[y];u.push({key:{status:"valid",value:y},value:h._parse(new E(n,b,n.path,y)),alwaysSet:y in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let y of u){let b=await y.key,be=await y.value;h.push({key:b,value:be,alwaysSet:y.alwaysSet})}return h}).then(h=>w.mergeObjectSync(s,h)):w.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:c((r,s)=>{let n=this._def.errorMap?.(r,s).message??s.defaultError;return r.code==="unrecognized_keys"?{message:p.errToObj(e).message??n}:{message:n}},"errorMap")}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:c(()=>({...this._def.shape(),...e}),"shape")})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:c(()=>({...this._def.shape(),...e._def.shape()}),"shape"),typeName:g.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let s of x.objectKeys(e))e[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new t({...this._def,shape:c(()=>r,"shape")})}omit(e){let r={};for(let s of x.objectKeys(this.shape))e[s]||(r[s]=this.shape[s]);return new t({...this._def,shape:c(()=>r,"shape")})}deepPartial(){return ue(this)}partial(e){let r={};for(let s of x.objectKeys(this.shape)){let n=this.shape[s];e&&!e[s]?r[s]=n:r[s]=n.optional()}return new t({...this._def,shape:c(()=>r,"shape")})}required(e){let r={};for(let s of x.objectKeys(this.shape))if(e&&!e[s])r[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof R;)a=a._def.innerType;r[s]=a}return new t({...this._def,shape:c(()=>r,"shape")})}keyof(){return pt(x.objectKeys(this.shape))}};C.create=(t,e)=>new C({shape:c(()=>t,"shape"),unknownKeys:"strip",catchall:N.create(),typeName:g.ZodObject,..._(e)});C.strictCreate=(t,e)=>new C({shape:c(()=>t,"shape"),unknownKeys:"strict",catchall:N.create(),typeName:g.ZodObject,..._(e)});C.lazycreate=(t,e)=>new C({shape:t,unknownKeys:"strip",catchall:N.create(),typeName:g.ZodObject,..._(e)});var G=class extends v{static{c(this,"ZodUnion")}_parse(e){let{ctx:r}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new S(o.ctx.common.issues));return l(r,{code:d.invalid_union,unionErrors:i}),m}if(c(n,"handleResults"),r.common.async)return Promise.all(s.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let u of s){let h={...r,common:{...r.common,issues:[]},parent:null},y=u._parseSync({data:r.data,path:r.path,parent:h});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:h}),h.common.issues.length&&i.push(h.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(u=>new S(u));return l(r,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}};G.create=(t,e)=>new G({options:t,typeName:g.ZodUnion,..._(e)});var Z=c(t=>t instanceof ee?Z(t.schema):t instanceof I?Z(t.innerType()):t instanceof te?[t.value]:t instanceof re?t.options:t instanceof se?x.objectValues(t.enum):t instanceof ne?Z(t._def.innerType):t instanceof Y?[void 0]:t instanceof J?[null]:t instanceof R?[void 0,...Z(t.unwrap())]:t instanceof M?[null,...Z(t.unwrap())]:t instanceof xe||t instanceof ie?Z(t.unwrap()):t instanceof ae?Z(t._def.innerType):[],"getDiscriminator"),Ne=class t extends v{static{c(this,"ZodDiscriminatedUnion")}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.object)return l(r,{code:d.invalid_type,expected:f.object,received:r.parsedType}),m;let s=this.discriminator,n=r.data[s],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(l(r,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,s){let n=new Map;for(let a of r){let i=Z(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new t({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,..._(s)})}};function We(t,e){let r=j(t),s=j(e);if(t===e)return{valid:!0,data:t};if(r===f.object&&s===f.object){let n=x.objectKeys(e),a=x.objectKeys(t).filter(o=>n.indexOf(o)!==-1),i={...t,...e};for(let o of a){let u=We(t[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(r===f.array&&s===f.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<t.length;a++){let i=t[a],o=e[a],u=We(i,o);if(!u.valid)return{valid:!1};n.push(u.data)}return{valid:!0,data:n}}else return r===f.date&&s===f.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}c(We,"mergeValues");var Q=class extends v{static{c(this,"ZodIntersection")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=c((a,i)=>{if(Ie(a)||Ie(i))return m;let o=We(a.value,i.value);return o.valid?((Oe(a)||Oe(i))&&r.dirty(),{status:r.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),m)},"handleParsed");return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};Q.create=(t,e,r)=>new Q({left:t,right:e,typeName:g.ZodIntersection,..._(r)});var P=class t extends v{static{c(this,"ZodTuple")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return l(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...s.data].map((i,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new E(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>w.mergeArray(r,i)):w.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};P.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new P({items:t,typeName:g.ZodTuple,rest:null,..._(e)})};var je=class t extends v{static{c(this,"ZodRecord")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.object)return l(s,{code:d.invalid_type,expected:f.object,received:s.parsedType}),m;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new E(s,o,s.path,o)),value:i._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?w.mergeObjectAsync(r,n):w.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,s){return r instanceof v?new t({keyType:e,valueType:r,typeName:g.ZodRecord,..._(s)}):new t({keyType:U.create(),valueType:e,typeName:g.ZodRecord,..._(r)})}},fe=class extends v{static{c(this,"ZodMap")}get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return l(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),m;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,u],h)=>({key:n._parse(new E(s,o,s.path,[h,"key"])),value:a._parse(new E(s,u,s.path,[h,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of i){let h=await u.key,y=await u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(h.value,y.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of i){let h=u.key,y=u.value;if(h.status==="aborted"||y.status==="aborted")return m;(h.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(h.value,y.value)}return{status:r.value,value:o}}}};fe.create=(t,e,r)=>new fe({valueType:e,keyType:t,typeName:g.ZodMap,..._(r)});var pe=class t extends v{static{c(this,"ZodSet")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return l(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),m;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function i(u){let h=new Set;for(let y of u){if(y.status==="aborted")return m;y.status==="dirty"&&r.dirty(),h.add(y.value)}return{status:r.value,value:h}}c(i,"finalizeSet");let o=[...s.data.values()].map((u,h)=>a._parse(new E(s,u,s.path,h)));return s.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:p.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:p.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};pe.create=(t,e)=>new pe({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,..._(e)});var Pe=class t extends v{static{c(this,"ZodFunction")}constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.function)return l(r,{code:d.invalid_type,expected:f.function,received:r.parsedType}),m;function s(o,u){return ve({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ce(),D].filter(h=>!!h),issueData:{code:d.invalid_arguments,argumentsError:u}})}c(s,"makeArgsIssue");function n(o,u){return ve({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ce(),D].filter(h=>!!h),issueData:{code:d.invalid_return_type,returnTypeError:u}})}c(n,"makeReturnsIssue");let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof W){let o=this;return A(async function(...u){let h=new S([]),y=await o._def.args.parseAsync(u,a).catch(ge=>{throw h.addIssue(s(u,ge)),h}),b=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(b,a).catch(ge=>{throw h.addIssue(n(b,ge)),h})})}else{let o=this;return A(function(...u){let h=o._def.args.safeParse(u,a);if(!h.success)throw new S([s(u,h.error)]);let y=Reflect.apply(i,this,h.data),b=o._def.returns.safeParse(y,a);if(!b.success)throw new S([n(y,b.error)]);return b.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:P.create(e).rest($.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,s){return new t({args:e||P.create([]).rest($.create()),returns:r||$.create(),typeName:g.ZodFunction,..._(s)})}},ee=class extends v{static{c(this,"ZodLazy")}get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ee.create=(t,e)=>new ee({getter:t,typeName:g.ZodLazy,..._(e)});var te=class extends v{static{c(this,"ZodLiteral")}_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return l(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}};te.create=(t,e)=>new te({value:t,typeName:g.ZodLiteral,..._(e)});function pt(t,e){return new re({values:t,typeName:g.ZodEnum,..._(e)})}c(pt,"createZodEnum");var re=class t extends v{static{c(this,"ZodEnum")}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),s=this._def.values;return l(r,{expected:x.joinValues(s),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),s=this._def.values;return l(r,{received:r.data,code:d.invalid_enum_value,options:s}),m}return A(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(s=>!e.includes(s)),{...this._def,...r})}};re.create=pt;var se=class extends v{static{c(this,"ZodNativeEnum")}_parse(e){let r=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){let n=x.objectValues(r);return l(s,{expected:x.joinValues(n),received:s.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=x.objectValues(r);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),m}return A(e.data)}get enum(){return this._def.values}};se.create=(t,e)=>new se({values:t,typeName:g.ZodNativeEnum,..._(e)});var W=class extends v{static{c(this,"ZodPromise")}unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.promise&&r.common.async===!1)return l(r,{code:d.invalid_type,expected:f.promise,received:r.parsedType}),m;let s=r.parsedType===f.promise?r.data:Promise.resolve(r.data);return A(s.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};W.create=(t,e)=>new W({type:t,typeName:g.ZodPromise,..._(e)});var I=class extends v{static{c(this,"ZodEffects")}innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:c(i=>{l(s,i),i.fatal?r.abort():r.dirty()},"addIssue"),get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return m;let u=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return u.status==="aborted"?m:u.status==="dirty"?F(u.value):r.value==="dirty"?F(u.value):u});{if(r.value==="aborted")return m;let o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?m:o.status==="dirty"?F(o.value):r.value==="dirty"?F(o.value):o}}if(n.type==="refinement"){let i=c(o=>{let u=n.refinement(o,a);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o},"executeRefinement");if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!L(i))return m;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>L(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:r.value,value:o})):m);x.assertNever(n)}};I.create=(t,e,r)=>new I({schema:t,typeName:g.ZodEffects,effect:e,..._(r)});I.createWithPreprocess=(t,e,r)=>new I({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,..._(r)});var R=class extends v{static{c(this,"ZodOptional")}_parse(e){return this._getType(e)===f.undefined?A(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R.create=(t,e)=>new R({innerType:t,typeName:g.ZodOptional,..._(e)});var M=class extends v{static{c(this,"ZodNullable")}_parse(e){return this._getType(e)===f.null?A(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M.create=(t,e)=>new M({innerType:t,typeName:g.ZodNullable,..._(e)});var ne=class extends v{static{c(this,"ZodDefault")}_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return r.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ne.create=(t,e)=>new ne({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});var ae=class extends v{static{c(this,"ZodCatch")}_parse(e){let{ctx:r}=this._processInputParams(e),s={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return de(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new S(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};ae.create=(t,e)=>new ae({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});var me=class extends v{static{c(this,"ZodNaN")}_parse(e){if(this._getType(e)!==f.nan){let s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}};me.create=t=>new me({typeName:g.ZodNaN,..._(t)});var dr=Symbol("zod_brand"),xe=class extends v{static{c(this,"ZodBranded")}_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}},we=class t extends v{static{c(this,"ZodPipeline")}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.common.async)return c(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(r.dirty(),F(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})},"handleAsync")();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,r){return new t({in:e,out:r,typeName:g.ZodPipeline})}},ie=class extends v{static{c(this,"ZodReadonly")}_parse(e){let r=this._def.innerType._parse(e),s=c(n=>(L(n)&&(n.value=Object.freeze(n.value)),n),"freeze");return de(r)?r.then(n=>s(n)):s(r)}unwrap(){return this._def.innerType}};ie.create=(t,e)=>new ie({innerType:t,typeName:g.ZodReadonly,..._(e)});function ut(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}c(ut,"cleanParams");function mt(t,e={},r){return t?V.create().superRefine((s,n)=>{let a=t(s);if(a instanceof Promise)return a.then(i=>{if(!i){let o=ut(e,s),u=o.fatal??r??!0;n.addIssue({code:"custom",...o,fatal:u})}});if(!a){let i=ut(e,s),o=i.fatal??r??!0;n.addIssue({code:"custom",...i,fatal:o})}}):V.create()}c(mt,"custom");var ur={object:C.lazycreate},g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var lr=c((t,e={message:`Input not instance of ${t.name}`})=>mt(r=>r instanceof t,e),"instanceOfType"),gt=U.create,yt=H.create,hr=me.create,fr=K.create,_t=q.create,pr=X.create,mr=le.create,gr=Y.create,yr=J.create,_r=V.create,vr=$.create,xr=N.create,wr=he.create,br=z.create,kr=C.create,Ar=C.strictCreate,Tr=G.create,Sr=Ne.create,Cr=Q.create,Rr=P.create,Er=je.create,Ir=fe.create,Or=pe.create,Nr=Pe.create,jr=ee.create,Pr=te.create,Mr=re.create,Dr=se.create,Zr=W.create,$r=I.create,zr=R.create,Lr=M.create,Ur=I.createWithPreprocess,Vr=we.create,Wr=c(()=>gt().optional(),"ostring"),Br=c(()=>yt().optional(),"onumber"),Fr=c(()=>_t().optional(),"oboolean"),Hr={string:c((t=>U.create({...t,coerce:!0})),"string"),number:c((t=>H.create({...t,coerce:!0})),"number"),boolean:c((t=>q.create({...t,coerce:!0})),"boolean"),bigint:c((t=>K.create({...t,coerce:!0})),"bigint"),date:c((t=>X.create({...t,coerce:!0})),"date")};var Kr=m;var vt="2011-06-15",xt=T.object({AccessKeyId:T.string(),SecretAccessKey:T.string(),SessionToken:T.string(),Expiration:T.union([T.number(),T.string()])}),qr=T.object({AssumeRoleResponse:T.object({AssumeRoleResult:T.object({Credentials:xt})})}),Xr=T.object({AssumeRoleWithWebIdentityResponse:T.object({AssumeRoleWithWebIdentityResult:T.object({Credentials:xt})})});function wt(t,e){return e||`https://sts.${t}.amazonaws.com/`}c(wt,"stsEndpoint");function Yr(t){return typeof t=="number"?new Date(t*1e3):new Date(t)}c(Yr,"normalizeExpiration");function Jr(t){return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:Yr(t.Expiration)}}c(Jr,"toAwsCredentials");async function bt(t,e,r,s,n){let a=await t.text();if(!t.ok){n?.error({status:t.status,body:a},`AWS STS ${s} request failed`);let u="";throw a.includes("ValidationError")&&a.includes("DurationSeconds")?u=" If 'durationSeconds' exceeds the role's maximum session duration, lower it or raise the role's MaxSessionDuration.":a.includes("AccessDenied")?u=" Check that the role's trust policy allows this principal to assume it.":a.includes("InvalidIdentityToken")&&(u=" The web identity token was rejected. Verify the IAM OIDC provider and that the token audience matches a configured client ID."),new O(`Could not get AWS credentials from STS.${u}`,{cause:new Error(`AWS STS ${s} failed (${t.status}): ${a}`)})}let i;try{i=JSON.parse(a)}catch(u){throw n?.error({body:a},`AWS STS ${s} returned non-JSON`),new O("The response returned from AWS STS is not in the expected format.",{cause:u})}let o=e.safeParse(i);if(!o.success)throw n?.error({body:a,issues:o.error.issues},`AWS STS ${s} response missing credentials`),new O("The response returned from AWS STS is not in the expected format.");return Jr(r(o.data))}c(bt,"parseStsResponse");async function kt(t,e){let r=new URLSearchParams({Action:"AssumeRoleWithWebIdentity",Version:vt,RoleArn:t.roleArn,RoleSessionName:t.roleSessionName,WebIdentityToken:t.webIdentityToken,DurationSeconds:String(t.durationSeconds)}),s=await Re({retries:e.retries,retryDelayMs:e.retryDelayMs,logger:e.logger},wt(t.region,t.stsEndpoint),{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:r});return bt(s,Xr,n=>n.AssumeRoleWithWebIdentityResponse.AssumeRoleWithWebIdentityResult.Credentials,"AssumeRoleWithWebIdentity",e.logger)}c(kt,"assumeRoleWithWebIdentity");async function At(t){let e=new URLSearchParams({Action:"AssumeRole",Version:vt,RoleArn:t.roleArn,RoleSessionName:t.roleSessionName,DurationSeconds:String(t.durationSeconds)});t.externalId&&e.set("ExternalId",t.externalId);let s=await new Ce({accessKeyId:t.credentials.accessKeyId,secretAccessKey:t.credentials.secretAccessKey,sessionToken:t.credentials.sessionToken,service:"sts",region:t.region,retries:t.retries}).fetch(wt(t.region,t.stsEndpoint),{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:e.toString()});return bt(s,qr,n=>n.AssumeRoleResponse.AssumeRoleResult.Credentials,"AssumeRole",t.logger)}c(At,"assumeRole");var Tt="zuplo-gateway",St=3600,es="sts.amazonaws.com";function Ct(t,e){return{retries:t?.retries??3,retryDelayMs:t?.retryDelayMs??10,logger:e}}c(Ct,"resolveRetry");function Mn(t){let e=typeof t.masterCredentials=="function"?t.masterCredentials:()=>Promise.resolve(t.masterCredentials),r=Ct(t.retry,t.logger);return Le(async()=>{let s=await e();return At({region:t.region,roleArn:t.roleArn,roleSessionName:t.roleSessionName??Tt,durationSeconds:t.durationSeconds??St,externalId:t.externalId,stsEndpoint:t.stsEndpoint,credentials:s,retries:r.retries,logger:r.logger})},{expirationOffsetSeconds:t.expirationOffsetSeconds})}c(Mn,"fromTemporaryCredentials");function ts(t){let e=Ct(t.retry,t.logger);return Le(async()=>{let r=typeof t.webIdentityToken=="function"?await t.webIdentityToken():t.webIdentityToken;return kt({region:t.region,roleArn:t.roleArn,webIdentityToken:r,roleSessionName:t.roleSessionName??Tt,durationSeconds:t.durationSeconds??St,stsEndpoint:t.stsEndpoint},e)},{expirationOffsetSeconds:t.expirationOffsetSeconds})}c(ts,"fromWebToken");function Dn(t){return ts({region:t.region,roleArn:t.roleArn,webIdentityToken:c(()=>Ee.getIDToken(t.context,{audience:t.audience??es}),"webIdentityToken"),roleSessionName:t.roleSessionName,durationSeconds:t.durationSeconds,stsEndpoint:t.stsEndpoint,expirationOffsetSeconds:t.expirationOffsetSeconds,retry:t.retry,logger:t.logger})}c(Dn,"fromZuploIdentity");export{nt as a,it as b,ye as c,Te as d,Se as e,Re as f,T as g,hs as h,et as i,Ce as j,ze as k,ot as l,Ee as m,Mn as n,ts as o,Dn as p};
|
|
30
|
+
//# sourceMappingURL=chunk-V4X24KCQ.js.map
|