@zuplo/cli 6.73.26 → 6.73.27
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/types/dist/capture.d.ts +4 -0
- package/node_modules/@posthog/types/dist/capture.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/index.d.ts +1 -1
- package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/posthog-config.d.ts +50 -2
- package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/session-recording.d.ts +10 -0
- package/node_modules/@posthog/types/dist/session-recording.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/capture.ts +4 -0
- package/node_modules/@posthog/types/src/index.ts +1 -0
- package/node_modules/@posthog/types/src/posthog-config.ts +56 -2
- package/node_modules/@posthog/types/src/session-recording.ts +11 -0
- 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-SL6SOWIV.js → chunk-6SNZ4DOC.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-PEUB7LX7.js → chunk-A3QGJZO7.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/chunk-GWEFPK3R.js +405 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-GWEFPK3R.js.LEGAL.txt +16 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-GWEFPK3R.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/{chunk-RB2LCXBX.js → chunk-QGAJTUPE.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-V4X24KCQ.js → chunk-QVZD2XRK.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-7WS4HIGR.js → chunk-SH74D236.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-2WLR6ZDZ.js → chunk-TYV53J3B.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-TRBIM47E.js → chunk-UKQQD2JN.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-A3425Z75.js → chunk-VHRZC4UF.js} +2 -2
- package/node_modules/@zuplo/runtime/out/esm/{chunk-VCMIY3WJ.js → chunk-YIT72S45.js} +3 -3
- 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 +13 -13
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +86 -3
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-WK5G5RKI.js +0 -385
- package/node_modules/@zuplo/runtime/out/esm/chunk-WK5G5RKI.js.LEGAL.txt +0 -7
- package/node_modules/@zuplo/runtime/out/esm/chunk-WK5G5RKI.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-SL6SOWIV.js.map → chunk-6SNZ4DOC.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-PEUB7LX7.js.map → chunk-A3QGJZO7.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-RB2LCXBX.js.map → chunk-QGAJTUPE.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-V4X24KCQ.js.map → chunk-QVZD2XRK.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-7WS4HIGR.js.map → chunk-SH74D236.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-2WLR6ZDZ.js.map → chunk-TYV53J3B.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-TRBIM47E.js.map → chunk-UKQQD2JN.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-A3425Z75.js.map → chunk-VHRZC4UF.js.map} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-VCMIY3WJ.js.LEGAL.txt → chunk-YIT72S45.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-VCMIY3WJ.js.map → chunk-YIT72S45.js.map} +0 -0
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a}from"./chunk-
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
import{a}from"./chunk-A3QGJZO7.js";import{a as i}from"./chunk-TYV53J3B.js";var R=class u extends Request{static{i(this,"ZuploRequest")}#s=void 0;#e;#t;constructor(e,s,r){super(e,s);let t=s?.params;this.#t=r,t?this.#e=t:e instanceof u?this.#e=e.#e:this.#e={};let n=s?.user;n?this.user=n:e instanceof u&&(this.user=e.user)}get originalRequest(){return this.#t??null}get query(){if(this.#s===void 0){let e={},s=new URL(this.url).searchParams;for(let[r,t]of s.entries())e[r]=t;this.#s=e}return a(this.#s)}get params(){return a(this.#e)}user};export{R as a};
|
|
26
|
+
//# sourceMappingURL=chunk-QGAJTUPE.js.map
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as Je}from"./chunk-
|
|
25
|
+
import{a as Je}from"./chunk-UKQQD2JN.js";import{W as O,X as oe,Y as Ye,Z as Ae,a as Xe}from"./chunk-YIT72S45.js";import{a as c,c as It}from"./chunk-TYV53J3B.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
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
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-
|
|
30
|
+
//# sourceMappingURL=chunk-QVZD2XRK.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{Y as o}from"./chunk-
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
import{Y as o}from"./chunk-YIT72S45.js";import{a}from"./chunk-TYV53J3B.js";var t={AI_GATEWAY_COST_SUM:"ai_gateway_cost_sum",AI_GATEWAY_REQUEST_COUNT:"ai_gateway_request_count",AI_GATEWAY_TOKEN_SUM:"ai_gateway_token_sum",AI_GATEWAY_LATENCY_HISTOGRAM:"ai_gateway_latency_histogram",AI_GATEWAY_WARNING_COUNT:"ai_gateway_warning_count",AI_GATEWAY_BLOCKED_COUNT:"ai_gateway_blocked_count",AI_GATEWAY_FALLBACK_COUNT:"ai_gateway_fallback_count",MCP_REQUEST_RECEIVED:"mcp_request_received",MCP_REQUEST_COMPLETED:"mcp_request_completed",MCP_REQUEST_REJECTED:"mcp_request_rejected",MCP_INITIALIZE_NEGOTIATED:"mcp_initialize_negotiated",MCP_CLIENT_UNSUPPORTED_BEHAVIOR:"mcp_client_unsupported_behavior",MCP_CAPABILITY_LISTED:"mcp_capability_listed",MCP_CAPABILITY_INVOKED:"mcp_capability_invoked",MCP_CAPABILITY_COMPLETED:"mcp_capability_completed",MCP_CAPABILITY_FAILED:"mcp_capability_failed",MCP_CAPABILITY_CONNECT_REQUIRED:"mcp_capability_connect_required",MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED:"mcp_auth_downstream_token_validated",MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED:"mcp_auth_downstream_token_rejected",MCP_OAUTH_CLIENT_REGISTERED:"mcp_oauth_client_registered",MCP_OAUTH_AUTHORIZE_STARTED:"mcp_oauth_authorize_started",MCP_OAUTH_AUTHORIZE_AWAITING_SETUP:"mcp_oauth_authorize_awaiting_setup",MCP_OAUTH_TOKEN_ISSUED:"mcp_oauth_token_issued",MCP_OAUTH_TOKEN_REFRESH_ROTATED:"mcp_oauth_token_refresh_rotated",MCP_OAUTH_TOKEN_REVOKED:"mcp_oauth_token_revoked",MCP_AUTH_UPSTREAM_CONNECT_REQUIRED:"mcp_auth_upstream_connect_required",MCP_AUTH_UPSTREAM_CONNECT_STARTED:"mcp_auth_upstream_connect_started",MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED:"mcp_auth_upstream_callback_received",MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED:"mcp_auth_upstream_token_exchange_succeeded",MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED:"mcp_auth_upstream_token_exchange_failed",MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED:"mcp_auth_upstream_credential_resolved",MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING:"mcp_auth_upstream_credential_missing",MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED:"mcp_auth_upstream_reconsent_required",GRAPHQL_OPERATION:"graphql_operation",CACHE_OPERATION:"cache_operation"};var i=class{static{a(this,"BaseAnalyticsEvent")}eventId;requestId;timestamp;accountName;projectName;deploymentName;unit;value;constructor(e){this.eventId=e.eventId,this.requestId=e.requestId,this.timestamp=e.timestamp??new Date,this.accountName=e.accountName,this.projectName=e.projectName,this.deploymentName=e.deploymentName,this.unit=e.unit,this.value=e.value}};var s=class extends i{static{a(this,"AiGatewayBlockedCountEvent")}eventType=t.AI_GATEWAY_BLOCKED_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.type||!this.metadata.type.trim())&&(this.metadata.type="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var p=class extends i{static{a(this,"AiGatewayCostSumEvent")}eventType=t.AI_GATEWAY_COST_SUM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.label||!this.metadata.label.trim())&&(this.metadata.label="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var l=class extends i{static{a(this,"AiGatewayFallbackCountEvent")}eventType=t.AI_GATEWAY_FALLBACK_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.type||!this.metadata.type.trim())&&(this.metadata.type="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var _=class extends i{static{a(this,"AiGatewayLatencyHistogramEvent")}eventType=t.AI_GATEWAY_LATENCY_HISTOGRAM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.label||!this.metadata.label.trim())&&(this.metadata.label="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var T=class extends i{static{a(this,"AiGatewayRequestCountEvent")}eventType=t.AI_GATEWAY_REQUEST_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.label||!this.metadata.label.trim())&&(this.metadata.label="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var u=class extends i{static{a(this,"AiGatewayTokenSumEvent")}eventType=t.AI_GATEWAY_TOKEN_SUM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.label||!this.metadata.label.trim())&&(this.metadata.label="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var m=class extends i{static{a(this,"AiGatewayWarningCountEvent")}eventType=t.AI_GATEWAY_WARNING_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.type||!this.metadata.type.trim())&&(this.metadata.type="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var A=class extends i{static{a(this,"CacheOperationEvent")}eventType=t.CACHE_OPERATION;metadata;constructor(e){super(e),this.metadata=e.metadata}};var c=class extends i{static{a(this,"GraphqlOperationEvent")}eventType=t.GRAPHQL_OPERATION;metadata;constructor(e){super(e),this.metadata=e.metadata}};var d=class extends i{static{a(this,"McpEvent")}eventType;metadata;constructor(e){super(e),this.eventType=e.eventType,this.metadata=e.metadata}};var r=a(n=>e=>new d({...e,eventType:n}),"buildMcpEvent"),g={[t.AI_GATEWAY_COST_SUM]:n=>new p(n),[t.AI_GATEWAY_REQUEST_COUNT]:n=>new T(n),[t.AI_GATEWAY_TOKEN_SUM]:n=>new u(n),[t.AI_GATEWAY_LATENCY_HISTOGRAM]:n=>new _(n),[t.AI_GATEWAY_WARNING_COUNT]:n=>new m(n),[t.AI_GATEWAY_BLOCKED_COUNT]:n=>new s(n),[t.AI_GATEWAY_FALLBACK_COUNT]:n=>new l(n),[t.MCP_REQUEST_RECEIVED]:r(t.MCP_REQUEST_RECEIVED),[t.MCP_REQUEST_COMPLETED]:r(t.MCP_REQUEST_COMPLETED),[t.MCP_REQUEST_REJECTED]:r(t.MCP_REQUEST_REJECTED),[t.MCP_INITIALIZE_NEGOTIATED]:r(t.MCP_INITIALIZE_NEGOTIATED),[t.MCP_CLIENT_UNSUPPORTED_BEHAVIOR]:r(t.MCP_CLIENT_UNSUPPORTED_BEHAVIOR),[t.MCP_CAPABILITY_LISTED]:r(t.MCP_CAPABILITY_LISTED),[t.MCP_CAPABILITY_INVOKED]:r(t.MCP_CAPABILITY_INVOKED),[t.MCP_CAPABILITY_COMPLETED]:r(t.MCP_CAPABILITY_COMPLETED),[t.MCP_CAPABILITY_FAILED]:r(t.MCP_CAPABILITY_FAILED),[t.MCP_CAPABILITY_CONNECT_REQUIRED]:r(t.MCP_CAPABILITY_CONNECT_REQUIRED),[t.MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED]:r(t.MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED),[t.MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED]:r(t.MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED),[t.MCP_OAUTH_CLIENT_REGISTERED]:r(t.MCP_OAUTH_CLIENT_REGISTERED),[t.MCP_OAUTH_AUTHORIZE_STARTED]:r(t.MCP_OAUTH_AUTHORIZE_STARTED),[t.MCP_OAUTH_AUTHORIZE_AWAITING_SETUP]:r(t.MCP_OAUTH_AUTHORIZE_AWAITING_SETUP),[t.MCP_OAUTH_TOKEN_ISSUED]:r(t.MCP_OAUTH_TOKEN_ISSUED),[t.MCP_OAUTH_TOKEN_REFRESH_ROTATED]:r(t.MCP_OAUTH_TOKEN_REFRESH_ROTATED),[t.MCP_OAUTH_TOKEN_REVOKED]:r(t.MCP_OAUTH_TOKEN_REVOKED),[t.MCP_AUTH_UPSTREAM_CONNECT_REQUIRED]:r(t.MCP_AUTH_UPSTREAM_CONNECT_REQUIRED),[t.MCP_AUTH_UPSTREAM_CONNECT_STARTED]:r(t.MCP_AUTH_UPSTREAM_CONNECT_STARTED),[t.MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED]:r(t.MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED),[t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED]:r(t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED),[t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED]:r(t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED),[t.MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED]:r(t.MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED),[t.MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING]:r(t.MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING),[t.MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED]:r(t.MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED),[t.GRAPHQL_OPERATION]:n=>new c(n),[t.CACHE_OPERATION]:n=>new A(n)};function I(n,e){let E=g[n];return E(e)}a(I,"createAnalyticsEvent");var O=class{static{a(this,"ZuploGatewayAnalyticsContext")}#t;#e;constructor(e){this.#t=[],this.#e=e}addAnalyticsEvent(e,E,y,C,M){let v=this.createAnalyticsEvent(e,E,y,C,M);this.#t.push(v)}flushAnalyticsEvents(){let e=[...this.#t];return this.#t.length=0,e}getAnalyticsEvents(){return[...this.#t]}createAnalyticsEvent(e,E,y,C,M){return I(E,{eventId:M??crypto.randomUUID(),requestId:this.#e,accountName:o.instance.accountName??"unknown",projectName:o.instance.projectName??"unknown",deploymentName:o.instance.deploymentName??"unknown",metadata:y,unit:C,value:e})}};export{t as a,O as b};
|
|
26
|
+
//# sourceMappingURL=chunk-SH74D236.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>e(b,"name",{value:a,configurable:!0});var n=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},o=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var p=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c,p as d};
|
|
26
|
+
//# sourceMappingURL=chunk-TYV53J3B.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as o}from"./chunk-
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
import{a as o}from"./chunk-TYV53J3B.js";var i=class e{static{o(this,"ContextData")}static#t;#e;constructor(t){this.#e=t}get(t){return e.get(t,this.#e)}static get(t,n){return e.#t||(e.#t=new WeakMap),e.#t.get(t)?.get(n)}set(t,n){e.set(t,this.#e,n)}static set(t,n,a){e.#t||(e.#t=new WeakMap);let s=e.#t.get(t);s||(s=new Map),s.set(n,a),e.#t.set(t,s)}};export{i as a};
|
|
26
|
+
//# sourceMappingURL=chunk-UKQQD2JN.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as c}from"./chunk-
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
import{a as c}from"./chunk-A3QGJZO7.js";import{a as p}from"./chunk-UKQQD2JN.js";import{Y as o}from"./chunk-YIT72S45.js";import{a as r}from"./chunk-TYV53J3B.js";var l=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function u(e){return e.startsWith("__ZUPLO")||e.startsWith("ZUPLO_")?!l.includes(e)&&!e.startsWith("ZUPLO_PUBLIC_"):e.startsWith("ZUDOKU_")?!e.startsWith("ZUDOKU_PUBLIC_"):!1}r(u,"isRestrictedEnvVariableName");function _(e){return!!e.startsWith("ZUPLO_")}r(_,"isZuploReadableEnvVariableName");var O=new Proxy({},{get(e,t){let n=String(t);switch(n){case"ZUPLO_ENVIRONMENT_TYPE":return o.instance.loggingEnvironmentType;case"ZUPLO_ENVIRONMENT_STAGE":return o.instance.loggingEnvironmentStage;case"ZUPLO_ENVIRONMENT_NAME":return o.instance.runtime.__ZUPLO_DEPLOYMENT_NAME;case"ZUPLO_ACCOUNT_NAME":return o.instance.accountName;case"ZUPLO_PROJECT_NAME":return o.instance.projectName;case"ZUPLO_BUILD_ID":return o.instance.build.BUILD_ID;case"ZUPLO_COMPATIBILITY_DATE":return o.instance.build.COMPATIBILITY_DATE}if(!(u(n)&&!_(n)))return o.instance.runtime[n]}});var d=(i=>(i.Build="build-data",i.CorsPreflight="cors-preflight",i.DeveloperPortal="developer-portal",i.ZudokuPortal="zudoku-portal",i.DeveloperPortalLegacy="developer-portal-legacy",i.EmptyGatewayCatchall="empty-gateway-catchall",i.Ping="ping",i.UnmatchedPath="unmatched-path",i))(d||{});var s=new p(Symbol("ai-gateway-app-configuration")),f={set(e,t){let n=t!==null&&typeof t=="object"&&!Object.isFrozen(t)?c(t):t;s.set(e,{configuration:n})},has(e){return s.get(e)!==void 0},get(e){return s.get(e)?.configuration},getId(e){let t=f.get(e);if(t===null||typeof t!="object")return;let n=Reflect.get(t,"id");return typeof n=="string"&&n!==""?n:void 0}};function A(e,t,n){return`_${a(`${e}_${t}_${n}`)}`}r(A,"getRawOperationDataIdentifierName");function I(e,t,n,g){return`_${a(e.toLowerCase())}_${t.toLowerCase()}_${n.toLowerCase()}_${g.toLowerCase()}`}r(I,"getIdForParameterSchema");function R(e,t,n){return`_${a(e.toLowerCase())}_${t.toLowerCase()}_rb_${a(n.toLowerCase())}`}r(R,"getIdForRequestBodySchema");function D(e,t){return`_${a(e)}_${a(t)}`}r(D,"getIdForRefSchema");function a(e){let t=e.replace(/\[/g,"_LBRACKET_").replace(/\]/g,"_RBRACKET_").replace(/\{/g,"_LCURLY_").replace(/\}/g,"_RCURLY_").replace(/\//g,"_SLASH_").replace(/-/g,"_DASH_").replace(/\./g,"_DOT_").replace(/\+/g,"_PLUS_").replace(/:/g,"_COLON_").replace(/@/g,"_AT_").replace(/\$/g,"_DOLLAR_").replace(/[^a-zA-Z0-9_]/g,"_");return/^[a-zA-Z_]/.test(t)||(t=`_${t}`),t}r(a,"sanitizedIdentifierName");export{u as a,_ as b,O as c,d,f as e,A as f,I as g,R as h,D as i,a as j};
|
|
26
|
+
//# sourceMappingURL=chunk-VHRZC4UF.js.map
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as r}from"./chunk-
|
|
25
|
+
import{a as r}from"./chunk-TYV53J3B.js";var st="zuplo-request-id",pe="zp-rid",de="zp-body-removed",ge="cf-ray",ct="x-forwarded-scheme",ut="x-forwarded-proto",lt="x-scheme",_e="cf-ipcity",Ee="cf-ipcontinent",he="cf-ipcountry",me="cf-iplongitude",Re="cf-iplatitude",at="cf-region",ft="cf-region-code",pt="cf-metro-code",dt="cf-postal-code",gt="cf-timezone",_t="zp-ipcity",Et="zp-ipcontinent",ht="zp-ipcountry",mt="zp-iplongitude",Rt="zp-iplatitude",Oe="zp-client-cert",ye="zp-mtls-status",be="zp-mtls-failure-reason",Ae="zp-mtls-cert-fingerprint-sha256",Te="zp-mtls-cert-not-before",xe="zp-mtls-cert-not-after",Le="zp-mtls-cert-issuer-dn",Se="zp-mtls-cert-subject-dn",Pe="zp-asn",Ie="zp-asorg",Ce="zp-colo",Ue="zp-postalcode",we="zp-metrocode",Ne="zp-region",De="zp-regioncode",He="zp-timezone",Ot="zp-http-protocol",w="zp-local-service",Me="x-akamai-edgescape",yt=[Oe,ye,be,Ae,Te,xe,Le,Se,Me,w],bt=[_e,Ee,he,me,Re,Pe,Ie,Ce,Ue,we,Ne,De,He],At=["zp-","cf-"],Tt=[pe,ge,de];var xt="system-logger";var Y=class extends Error{static{r(this,"SystemError")}constructor(t,n){super(t,n),this.name="InternalError"}},b=class extends Error{static{r(this,"RuntimeError")}extensionMembers;constructor(t,n){typeof t=="string"?super(t,n):(super(t.message,n),this.extensionMembers=t.extensionMembers),this.name="RuntimeError"}},j=class extends b{static{r(this,"ConfigurationError")}constructor(t,n){super(t,n),this.name="ConfigurationError"}};var ve=!1;function L(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}r(L,"code");function S(e,t){return ve?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}r(S,"run");function ze(e){return S(e,L([31],39))}r(ze,"red");function Fe(e){return S(e,L([32],39))}r(Fe,"green");function Ze(e){return S(e,L([33],39))}r(Ze,"yellow");function $e(e){return S(e,L([34],39))}r($e,"blue");function ke(e){return S(e,L([35],39))}r(ke,"magenta");function Ge(e){return S(e,L([36],39))}r(Ge,"cyan");var It=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");var q=[ze,Fe,Ze,$e,ke,Ge];function Be(e){let t=0,n=e.length,i=0;if(n>0)for(;i<n;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}r(Be,"hashCode");function W(e){let t=Math.abs(Be(e));return q[t%q.length]}r(W,"generateColor");function J(e,t,...n){let i=0,o=n.length,u=String(t).replace(/%[sdjoO%]/g,s=>{if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]).toString();case"%o":return e(n[i++]).split(`
|
|
26
26
|
`).map(l=>l.trim()).join(" ");case"%O":return e(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return s}});for(let s of n.splice(i))s===null||!(typeof s=="object"&&s!==null)?u+=" "+s:u+=" "+e(s);return u}r(J,"format");function T(e,t,n,i){let o={seen:[],stylize:Ve,showHidden:t??!1,depth:n??2,colors:i??!1,customInspect:!0};return o.colors&&(o.stylize=je),C(o,e,o.depth)}r(T,"inspect");T.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};T.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Ve(e,t){return e}r(Ve,"stylizeNoColor");function Ye(e){return typeof e=="boolean"}r(Ye,"isBoolean");function X(e){return e===void 0}r(X,"isUndefined");function je(e,t){let n=T.styles[t];return n?"\x1B["+T.colors[n][0]+"m"+e+"\x1B["+T.colors[n][1]+"m":e}r(je,"stylizeWithColor");function N(e){return typeof e=="function"}r(N,"isFunction");function Q(e){return typeof e=="string"}r(Q,"isString");function qe(e){return typeof e=="number"}r(qe,"isNumber");function ee(e){return e===null}r(ee,"isNull");function te(e,t){return Object.hasOwn(e,t)}r(te,"hasOwn");function D(e){return z(e)&&F(e)==="[object RegExp]"}r(D,"isRegExp");function z(e){return typeof e=="object"&&e!==null}r(z,"isObject");function H(e){return z(e)&&(F(e)==="[object Error]"||e instanceof Error)}r(H,"isError");function K(e){return z(e)&&F(e)==="[object Date]"}r(K,"isDate");function F(e){return Object.prototype.toString.call(e)}r(F,"objectToString");function We(e){let t={};return e.forEach(function(n,i){t[n]=!0}),t}r(We,"arrayToHash");function Je(e,t,n,i,o){let u=[];for(let s=0,l=t.length;s<l;++s)te(t,String(s))?u.push(v(e,t,n,i,String(s),!0)):u.push("");return o.forEach(function(s){s.match(/^\d+$/)||u.push(v(e,t,n,i,s,!0))}),u}r(Je,"formatArray");function M(e){return"["+Error.prototype.toString.call(e)+"]"}r(M,"formatError");function C(e,t,n){if(e.customInspect&&t&&N(t.inspect)&&t.inspect!==T&&!(t.constructor&&t.constructor.prototype===t)){let a=t.inspect(n,e);return Q(a)||(a=C(e,a,n)),a}let i=Ke(e,t);if(i)return i;let o=Object.keys(t),u=We(o);try{e.showHidden&&Object.getOwnPropertyNames&&(o=Object.getOwnPropertyNames(t))}catch{}if(H(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return M(t);if(o.length===0){if(N(t)){let a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(D(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(K(t))return e.stylize(Date.prototype.toString.call(t),"date");if(H(t))return M(t)}let s="",l=!1,f=["{","}"];if(Array.isArray(t)&&(l=!0,f=["[","]"]),N(t)&&(s=" [Function"+(t.name?": "+t.name:"")+"]"),D(t)&&(s=" "+RegExp.prototype.toString.call(t)),K(t)&&(s=" "+Date.prototype.toUTCString.call(t)),H(t)&&(s=" "+M(t)),o.length===0&&(!l||t.length==0))return f[0]+s+f[1];if(n<0)return D(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);let c;return l?c=Je(e,t,n,u,o):c=o.map(function(a){return v(e,t,n,u,a,l)}),e.seen.pop(),Xe(c,s,f)}r(C,"formatValue");function v(e,t,n,i,o,u){let s,l,f;f={value:void 0};try{f.value=t[o]}catch{}try{Object.getOwnPropertyDescriptor&&(f=Object.getOwnPropertyDescriptor(t,o)||f)}catch{}if(f.get?f.set?l=e.stylize("[Getter/Setter]","special"):l=e.stylize("[Getter]","special"):f.set&&(l=e.stylize("[Setter]","special")),te(i,o)||(s="["+o+"]"),l||(e.seen.indexOf(f.value)<0?(ee(n)?l=C(e,f.value,null):l=C(e,f.value,n-1),l.indexOf(`
|
|
27
27
|
`)>-1&&(u?l=l.split(`
|
|
28
28
|
`).map(function(c){return" "+c}).join(`
|
|
@@ -33,5 +33,5 @@ import{a as r}from"./chunk-2WLR6ZDZ.js";var st="zuplo-request-id",pe="zp-rid",de
|
|
|
33
33
|
`)>=0&&i++,u+s.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(t===""?"":t+`
|
|
34
34
|
`)+" "+e.join(`,
|
|
35
35
|
`)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}r(Xe,"reduceToSingleString");var ne=r((e,...t)=>J(T,e,t),"format");var Z=class{static{r(this,"Debugger")}manager;ns;color;last;enabled;constructor(t,n){this.manager=t,this.ns=n,this.color=W(n),this.last=0,this.enabled=t.enabled.some(i=>i.test(n))}log(...t){if(!this.enabled)return;let n,i=t[0];typeof i=="function"?n=i():n=String(i);let o=Date.now()-(this.last||Date.now());n=ne(n,...t);let u=`${this.color(this.ns)} ${n} ${this.color(`+${o}ms`)}`;console.log(u),this.last=Date.now()}},$=class{static{r(this,"DebugManager")}debuggers;enabled;constructor(t){this.debuggers=new Map,this.enabled=t??[]}};function Qe(e){return!e||e.length===0?[]:(e=e.replace(/\s/g,"").replace(/\*/g,".+"),e.split(",").map(t=>new RegExp(`^${t}$`)))}r(Qe,"extract");var U;function re(e){let t=globalThis.DEBUG;U||(U=new $(Qe(t)));let n=new Z(U,e);return U.debuggers.set(e,n),Object.assign(n.log.bind(n),{self:n})}r(re,"debug");function et(e){if(e.length>=255)throw new TypeError("Alphabet too long");let t=new Uint8Array(256);for(let c=0;c<t.length;c++)t[c]=255;for(let c=0;c<e.length;c++){let a=e.charAt(c),h=a.charCodeAt(0);if(t[h]!==255)throw new TypeError(a+" is ambiguous");t[h]=c}let n=e.length,i=e.charAt(0),o=Math.log(n)/Math.log(256),u=Math.log(256)/Math.log(n);function s(c){if(c instanceof Uint8Array||(ArrayBuffer.isView(c)?c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength):Array.isArray(c)&&(c=Uint8Array.from(c))),!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(c.length===0)return"";let a=0,h=0,_=0,g=c.length;for(;_!==g&&c[_]===0;)_++,a++;let m=(g-_)*u+1>>>0,E=new Uint8Array(m);for(;_!==g;){let d=c[_],y=0;for(let A=m-1;(d!==0||y<h)&&A!==-1;A--,y++)d+=256*E[A]>>>0,E[A]=d%n>>>0,d=d/n>>>0;if(d!==0)throw new Error("Non-zero carry");h=y,_++}let p=m-h;for(;p!==m&&E[p]===0;)p++;let O=i.repeat(a);for(;p<m;++p)O+=e.charAt(E[p]);return O}r(s,"encode");function l(c){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;let a=0,h=0,_=0;for(;c[a]===i;)h++,a++;let g=(c.length-a)*o+1>>>0,m=new Uint8Array(g);for(;c[a];){let d=t[c.charCodeAt(a)];if(d===255)return;let y=0;for(let A=g-1;(d!==0||y<_)&&A!==-1;A--,y++)d+=n*m[A]>>>0,m[A]=d%256>>>0,d=d/256>>>0;if(d!==0)throw new Error("Non-zero carry");_=y,a++}let E=g-_;for(;E!==g&&m[E]===0;)E++;let p=new Uint8Array(h+(g-E)),O=h;for(;E!==g;)p[O++]=m[E++];return p}r(l,"decodeUnsafe");function f(c){let a=l(c);if(a)return a;throw new Error("Non-base"+n+" character")}return r(f,"decode"),{encode:s,decodeUnsafe:l,decode:f}}r(et,"base");var oe=et;var tt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ie=oe(tt);var x=re("zuplo:runtime:external-service");function nt(){let e,{__ZUPLO_EXTERNAL_SERVICE_TOKEN:t}=R.instance.runtime;if(t&&t!=="undefined")try{let n=atob(t);e=JSON.parse(n)}catch{}return e}r(nt,"getServiceAuth");async function se(e,t){let n=".proxy",i=".tunnel";if(typeof e=="string"){let o=new URL(e),u=o.hostname;if(u.endsWith(n)){let p=u.slice(0,-n.length),O=new URL(`http://${p}${o.pathname}${o.search}`);x(`Routing to proxy: ${O.toString()}`);let d=t??{};return P(O.toString(),d)}let s=u.endsWith(i),l=u.indexOf(".")===-1;if(!(s||l))throw new b(`Invalid service hostname suffix: ${u}. Use .proxy for proxy routing, .tunnel for explicit tunnel routing, or no suffix for default tunnel routing.`);let c=s?u.slice(0,-i.length):u,a=nt();if(!a)throw x("There is no external service auth configured for this zup."),new b("There are no external services configured for this zup.");x(`Using external service auth. ClientId: ${a.clientId})`);let h=t??{},_=new Headers(h.headers||{});_.set("CF-Access-Client-Id",a.clientId),_.set("CF-Access-Client-Secret",a.clientSecret),h.headers=_;let g;if(a.customServiceMapping?.[c])g=`https://${a.customServiceMapping[c]}`;else if(R.instance.useLegacyServiceRouting)g=`https://${c}.zuptunnel.com`;else{x("Using sha256 service routing");let p=R.instance.build;if(p.ACCOUNT_NAME&&p.PROJECT_NAME&&p.ENVIRONMENT_TYPE){let O=await rt(c,p.ACCOUNT_NAME,p.PROJECT_NAME,p.ENVIRONMENT_TYPE),d=ue(p.ENVIRONMENT_TYPE),y=await k(`${p.ACCOUNT_NAME}-${p.PROJECT_NAME}-${d}`);y==="40d7ad502f5d743997999594c177184a00161a77865423511f3a1ea21eb5a5e"||y==="d05bffe8fa91a300187d2cf43e8aa4a56bd809c442ae10d1ee49af7d29a5a11"?g=`https://${O}.zuptunnel.com`:g=`https://${O}.t.zuplo.app`}else throw x("Cannot use sha256 service routing, missing build variables"),new b("Failed to generate fully qualified tunnel url.")}let m=new URL(`${g}${o.pathname}${o.search}`);x(`Calling external service: ${m.toString()}`);let E=await P(m.toString(),h);if(E.status===403&&E.headers.get("cf-access-domain")!==null)throw I.console.error("403 Forbidden when calling external service.",{clientId:a.clientId,tunnelHost:g}),new b("Could not connect to secure tunnel.");return E}else throw x("Cannot call external service with Request object"),new b("Currently, we only support fetch(<some_string>, ...).")}r(se,"externalServiceHandler");async function ce(e,t){if(typeof e=="string"){let n=new URL(e),i=n.hostname,o=t??{},u=`http://${i}.zuplo.svc.cluster.local:9000`,s=new URL(`${u}${n.pathname}${n.search}`),l=new Headers(o.headers||{});return l.set(w,i),o.headers=l,await P(s.toString(),o)}else throw new b("Currently, we only support fetch(<some_string>, ...).")}r(ce,"clusterServiceHandler");async function rt(e,t,n,i){let o=e.toLowerCase(),u=t.toLowerCase(),s=n.toLowerCase(),l=ue(i);x(`Hashing service name: ${u}-${o}.${u}-${s}-${l}`);let f=await k(`${u}-${o}`),c=await k(`${u}-${s}-${l}`);return`${f}.${c}`}r(rt,"hashServiceName");async function k(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(u=>u.toString(16).padStart(2,"0")).join("").slice(0,-1)}r(k,"hashSegment");function ue(e){let t=e.toLowerCase();switch(t){case"production":case"preview":return t;default:return"working-copy"}}r(ue,"sanitizeEnvironmentType");var G=new Map;G.set("service:",se);G.set("local:",ce);var P=globalThis.fetch;function B(e,t){let{transformedInit:n,mtlsCertificate:i}=ot(t);if(typeof e=="string"){let o=new URL(e),u=G.get(o.protocol);return u?u(e,n):le(e,n,i)}else return le(e,n,i)}r(B,"internalFetch");globalThis.fetch=B;function le(e,t,n){if(!n)return P(e,t);if(R.instance.isCloudflare){let o=R.instance.runtime[n];if(!o)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof o!="object"||typeof o.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding. Make sure it's configured as an mTLS certificate, not an environment variable.`);return o.fetch(e,t)}else if(R.instance.isDeno){let i=globalThis.managedDedicatedMtlsBindings?.[n];if(!i)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof i.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding.`);return i.fetch(e,t)}else throw new Error("mTLS client certificates are not supported in this runtime environment")}r(le,"performFetch");var ot=r(e=>{if(!e||e instanceof Request)return{transformedInit:e,mtlsCertificate:void 0};let t=e;if(!t.zuplo)return{transformedInit:e,mtlsCertificate:void 0};let n=t.zuplo.mtlsCertificate,i=e;return i.cf={cacheEverything:t.zuplo?.cacheEverything,cacheTtl:t.zuplo?.cacheTtlSeconds},delete e.zuplo,{transformedInit:e,mtlsCertificate:n}},"transformInit");var it={console:{log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),assert:console.assert.bind(console),clear:console.clear.bind(console),count:console.count.bind(console),countReset:console.countReset.bind(console),dir:console.dir.bind(console),dirxml:console.dirxml.bind(console),group:console.group.bind(console),groupCollapsed:console.groupCollapsed.bind(console),groupEnd:console.groupEnd.bind(console),table:console.table.bind(console),time:console.time.bind(console),timeEnd:console.timeEnd.bind(console),timeLog:console.timeLog.bind(console),timeStamp:console.timeStamp.bind(console),trace:console.trace.bind(console),profile:console.profile.bind(console),profileEnd:console.profileEnd.bind(console)},fetch:B},I=it;var V="2025-02-06",ae=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2024-09-02":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2025-02-06":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1},"2026-03-01":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,chainResponseSendingHooks:!0,return501ForUnsupportedHttpMethods:!0}});function fe(){return new R({build:{ACCOUNT_NAME:"mock-account-name",PROJECT_NAME:"mock-project-name",API_VERSION:"0.0.0",BUILD_ID:crypto.randomUUID(),TIMESTAMP:new Date().toISOString(),BUILD_ENV:"test",ZUPLO_VERSION:"0.0.0",COMPATIBILITY_DATE:V,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:ae[V]},runtime:{RUNTIME_ENV:"test",RUNTIME_STAGE:"test",__ZUPLO_DEPLOYMENT_NAME:"mock-deployment-name",__ZUPLO_LOG_LEVEL:"debug",__ZUPLO_LOG_FORMAT:"pretty",__ZUPLO_MANAGEMENT_API_URL:"",__ZUPLO_RUNTIME_TYPE:"cloudflare",__ZUPLO_AUTH_API_JWT:"",ZUPLO_SERVICE_BUCKET_ID:"bckt_mock"}})}r(fe,"getMockEnvironment");var R=class e{static{r(this,"Environment")}config;static#e;static#t=!1;static initialize(t){e.#e||(e.#e=new e(t),e.#t=!0)}static get instance(){return e.#t||(I.console.debug("Environment has not been initialized. This is okay when running tests, a mock environment will be used."),e.#e??=fe()),e.#e}constructor({build:t,runtime:n}){let i;try{if(n.ZUPLO_SYSTEM_CONFIGURATIONS){let o=new TextDecoder().decode(ie.decode(n.ZUPLO_SYSTEM_CONFIGURATIONS)),u=JSON.parse(o);for(let s of Object.keys(u))n[s]||(n[s]=u[s])}if(n.__ZUPLO_CONFIG){let o=atob(n.__ZUPLO_CONFIG);i=JSON.parse(o)}}catch(o){I.console.error("Failed to parse runtime configuration",o)}this.config=i??{},this.build=t,this.runtime=n,this.instanceId=crypto.randomUUID()}build;runtime;instanceId;get deploymentName(){return this.runtime.__ZUPLO_DEPLOYMENT_NAME??this.config.deployment_name??void 0}get accountName(){return this.build.ACCOUNT_NAME??this.runtime.ZUPLO_ACCOUNT_NAME??void 0}get projectName(){return this.build.PROJECT_NAME??this.runtime.ZUPLO_PROJECT_NAME??void 0}get useLegacyServiceRouting(){return this.config.use_legacy_service_routing??void 0}get useProxyForFetchFromZups(){return this.config.use_proxy_for_fetch_from_zups??void 0}get devPortalBaseUrl(){return this.runtime.__ZUPLO_DEV_PORTAL_URL??this.config.dev_portal_url??"https://dev-portal-v4-1.zuplo.com"}get buildAssetsUrl(){return this.runtime.__ZUPLO_BUILD_ASSETS_URL??this.config.build_assets_url??"https://build-assets.zuplo.com"}get zuploEdgeApiUrl(){return this.config.zuplo_edge_api_url??"https://api.zuploedge.com"}get remoteLogToken(){return this.runtime.__ZUPLO_REMOTE_LOG_TOKEN??this.config.remote_log_token??void 0}get zuploClientAuthBucketId(){return this.config.zuplo_auth_client_bucket_id??"auth_o8PUdhKxSTOiB794GWPwLQCD"}get managementApiURL(){return this.runtime.__ZUPLO_MANAGEMENT_API_URL??this.config.management_api_url??"https://api.zuplo.com"}get developerApiUrl(){return this.config.developer_api_url??"https://dev.zuplo.com"}get cdnURL(){return this.runtime.__ZUPLO_CDN_URL??this.config.cdn_url??"https://cdn.zuplo.com"}get remoteLogURL(){return this.runtime.__ZUPLO_REMOTE_LOG_URL??this.config.log_event_api??"https://ellie.zuploedge.com"}get loggingId(){return this.runtime.__ZUPLO_LOGGING_ID??this.config.logging_id??void 0}get redisURL(){return this.runtime.__ZUPLO_REDIS_URL??this.config.redis_proxy_url??"https://redis-proxy.zuploedge.com"}get apiKeyServiceUrl(){return this.runtime.__ZUPLO_API_KEY_SERVICE_URL??this.config.api_key_service_url??"https://apikey.zuploedge.com"}get meteringServiceUrl(){return this.config.metering_service_url??"https://meters.zuploedge.com"}get authApiJWT(){return this.runtime.__ZUPLO_AUTH_API_JWT??void 0}get authClientId(){return this.config.auth_client_id??this.runtime.__ZUPLO_AUTH_CLIENT_ID}get authClientSecret(){return this.config.auth_client_secret??this.runtime.__ZUPLO_AUTH_CLIENT_SECRET}get authPublicKey(){return this.config.auth_public_key??this.runtime.__ZUPLO_AUTH_PUBLIC_KEY}get authPrivateKey(){return this.config.auth_private_key??this.runtime.__ZUPLO_AUTH_PRIVATE_KEY}get userLogLevel(){return this.runtime.ZUPLO_LOG_LEVEL??this.runtime.__ZUPLO_LOG_LEVEL??this.config.user_log_level??"debug"}get systemLogLevel(){return this.runtime.__ZUPLO_LOG_LEVEL??this.config.system_log_level??"debug"}get logFormat(){return this.runtime.__ZUPLO_LOG_FORMAT??this.config.log_format??"cloudflare"}get isCloudflare(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="cloudflare":this.config.runtime_type?this.config.runtime_type==="cloudflare":typeof WebSocketPair=="function"}get isManagedDedicated(){return this.runtime.__ZUPLO_IS_MANAGED_DEDICATED==="true"}get isDeno(){if(this.runtime.__ZUPLO_RUNTIME_TYPE)return this.runtime.__ZUPLO_RUNTIME_TYPE==="deno";if(this.config.runtime_type)return this.config.runtime_type==="deno";{let t=globalThis.Deno?.version?.deno;return typeof WebSocketPair!="function"&&t}}get isLocalDevelopment(){return this.build.IS_LOCAL_DEVELOPMENT}get isTestMode(){return!!this.runtime.__ZUPLO_TEST_MODE}get systemUserAgent(){return`Zuplo/${this.build.ZUPLO_VERSION}`}get loggingEnvironmentType(){return this.isCloudflare?"edge":this.isLocalDevelopment?"local":this.isDeno?"working-copy":"unknown"}get loggingEnvironmentStage(){return this.build.ENVIRONMENT_TYPE==="PRODUCTION"?"production":this.build.ENVIRONMENT_TYPE==="PREVIEW"?"preview":this.isLocalDevelopment?"local":this.isWorkingCopy?"working-copy":"unknown"}get isWorkingCopy(){return this.build.ENVIRONMENT_TYPE==="WORKING_COPY"}get rateLimitServiceTimeoutMs(){let t=this.runtime.__ZUPLO_RATE_LIMIT_TIMEOUT_MS,n=this.config.rate_limit_service_timeout_ms,i=t??n;if(!i)return 500;let o=Number(i);return Number.isFinite(o)&&o>0?o:500}};export{re as a,st as b,pe as c,de as d,ge as e,ct as f,ut as g,lt as h,_e as i,Ee as j,he as k,me as l,Re as m,at as n,ft as o,pt as p,dt as q,gt as r,_t as s,Et as t,ht as u,mt as v,Rt as w,Oe as x,ye as y,be as z,Ae as A,Te as B,xe as C,Le as D,Se as E,Pe as F,Ie as G,Ce as H,Ue as I,we as J,Ne as K,De as L,He as M,Ot as N,w as O,Me as P,yt as Q,bt as R,At as S,Tt as T,xt as U,Y as V,b as W,j as X,R as Y,I as Z};
|
|
36
|
-
/*! For license information please see chunk-
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
/*! For license information please see chunk-YIT72S45.js.LEGAL.txt */
|
|
37
|
+
//# sourceMappingURL=chunk-YIT72S45.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{$a as
|
|
25
|
+
import{$a as Zt,$d as cs,A as N,Aa as Dt,Ab as Dr,Ae as Js,B as O,Ba as Et,Bb as Er,Be as Ks,C as Q,Ca as Ht,Cb as Hr,Ce as Ms,D as V,Da as Pt,Db as Pr,De as Ns,E as W,Ea as St,Eb as Sr,Ee as Os,F as X,Fa as Tt,Fb as Tr,Fe as Qs,G as Y,Ga as Ut,Gb as Ur,Ge as Vs,H as Z,Ha as $t,Hb as $r,Hd as Kr,I as _,Ia as kt,Id as Mr,J as tt,Ja as Ft,Jd as Nr,K as rt,Ka as Lt,Kd as Or,L as st,La as Rt,Ld as Qr,M as et,Ma as qt,Md as Vr,N as ot,Na as vt,Nd as Wr,Oa as zt,Od as Xr,Pa as Gt,Pd as Yr,Qa as It,Qd as Zr,Ra as Jt,Rd as _r,Sa as Kt,Sd as ts,Ta as Mt,Td as rs,Ua as Nt,Ud as ss,Va as Ot,Vd as es,Wa as Qt,Wd as os,Xa as Vt,Xd as as,Ya as Wt,Yd as ns,Za as Xt,Zd as is,_a as Yt,_d as ps,a as b,ab as _t,ae as hs,b as l,bb as tr,be as xs,c as j,cb as rr,ce as ys,d as B,db as sr,dc as kr,de as ws,e as C,eb as er,ec as Fr,ee as As,f as D,fb as or,fc as Lr,fe as bs,g as E,ga as at,gb as ar,gc as Rr,ge as ls,h as H,ha as nt,hb as nr,hc as qr,he as js,i as P,ia as it,ib as ir,ic as vr,ie as Bs,j as S,ja as pt,jb as pr,jc as zr,je as Cs,k as n,ka as ct,kb as cr,kc as Gr,ke as Ds,l as T,la as ht,lb as hr,lc as Ir,le as Es,m as U,ma as mt,mb as mr,mc as Jr,me as Hs,n as $,na as gt,nb as gr,ne as Ps,o as k,oa as dt,ob as dr,oe as Ss,p as F,pa as ut,pb as ur,pe as Ts,q as L,qa as ft,qb as fr,qe as Us,r as R,ra as xt,rb as xr,re as ks,sa as yt,sb as yr,se as Fs,t as q,ta as wt,tb as wr,te as Ls,u as z,ua as At,ub as Ar,ue as Rs,v as G,va as bt,vb as br,ve as qs,w as I,wa as lt,wb as lr,we as vs,xa as jt,xb as jr,xe as zs,y as K,ya as Bt,yb as Br,ye as Gs,z as M,za as Ct,zb as Cr,ze as Is}from"./chunk-GWEFPK3R.js";import{c as y,d as J,f as ms,g as gs,h as ds,i as us,j as fs}from"./chunk-VHRZC4UF.js";import"./chunk-SH74D236.js";import{a as v}from"./chunk-QGAJTUPE.js";import"./chunk-A3QGJZO7.js";import{d as w,e as A,m as $s}from"./chunk-QVZD2XRK.js";import{a as x}from"./chunk-UKQQD2JN.js";import{U as u,W as a,X as f}from"./chunk-YIT72S45.js";import{a as t}from"./chunk-TYV53J3B.js";var e=["sha-1","sha-256","sha-384","sha-512"],r=class{static{t(this,"BaseCryptoBeta")}};var o=class extends r{static{t(this,"WorkerCryptoBeta")}async digest(s,p){if(n("runtime.crypto-beta"),!e.includes(s.toLowerCase()))throw new a(`Algorithm ${s} is not supported. Try using ${e.join(", ")}`);let c=new TextEncoder().encode(p),h=await crypto.subtle.digest(s,c);return Array.from(new Uint8Array(h)).map(m=>m.toString(16).padStart(2,"0")).join("")}};export{qt as AIGatewayAnthropicToOpenAIInboundPolicy,vt as AIGatewayAuthInboundPolicy,zt as AIGatewayAuthV2InboundPolicy,Gt as AIGatewayConfigurationExecutorV2InboundPolicy,It as AIGatewayFallbackModelV2InboundPolicy,Z as AIGatewayMeteringInboundPolicy,Jt as AIGatewayModelFilteringV2InboundPolicy,l as AIGatewayModelRouting,b as AIGatewayModels,Kt as AIGatewayOpenAIToAnthropicOutboundPolicy,Mt as AIGatewaySemanticCacheInboundPolicy,Nt as AIGatewaySemanticCacheOutboundPolicy,Ot as AIGatewaySemanticCacheV2InboundPolicy,Qt as AIGatewayUsageTrackerPolicy,dt as AWSLoggingPlugin,Vt as AkamaiAIFirewallInboundPolicy,Wt as AkamaiAIFirewallV2InboundPolicy,Tt as AkamaiApiSecurityPlugin,Xt as AkamaiFirewallForAiInboundPolicy,Yt as AkamaiFirewallForAiOutboundPolicy,_t as AmberfloMeteringInboundPolicy,Zt as AmberfloMeteringPolicy,rr as ApiAuthKeyInboundPolicy,Qs as ApiKeyConsumerClient,tr as ApiKeyInboundPolicy,Dt as AuditLogDataStaxProvider,sr as AuditLogInboundPolicy,Et as AuditLogPlugin,or as Auth0JwtInboundPolicy,ar as AuthZenInboundPolicy,rt as AwsLambdaHandlerExtensions,nr as AxiomaticsAuthZInboundPolicy,$t as AzureBlobPlugin,kt as AzureEventHubsRequestLoggerPlugin,Ut as BackgroundDispatcher,Vs as BackgroundLoader,ir as BasicAuthInboundPolicy,os as BasicRateLimitInboundPolicy,I as BatchDispatch,pr as BrownoutInboundPolicy,cr as CachingInboundPolicy,hr as ChangeMethodInboundPolicy,mr as ClearHeadersInboundPolicy,gr as ClearHeadersOutboundPolicy,dr as ClerkJwtInboundPolicy,ur as CognitoJwtInboundPolicy,fr as CometOpikTracingInboundPolicy,xr as CometOpikTracingV2InboundPolicy,yr as ComplexRateLimitInboundPolicy,wr as CompositeInboundPolicy,Ar as CompositeOutboundPolicy,f as ConfigurationError,z as ContentTypes,x as ContextData,o as CryptoBeta,br as CurityPhantomTokenInboundPolicy,O as DataDogLoggingPlugin,lt as DataDogMetricsPlugin,lr as DataLossPreventionInboundPolicy,jr as DataLossPreventionOutboundPolicy,ut as DynaTraceLoggingPlugin,jt as DynatraceMetricsPlugin,Br as FirebaseJwtInboundPolicy,Cr as FormDataToJsonInboundPolicy,Dr as GalileoTracingInboundPolicy,Er as GalileoTracingV2InboundPolicy,Hr as GeoFilterInboundPolicy,N as GoogleCloudLoggingPlugin,Tr as GraphqlAnalyticsOutboundPolicy,Y as Handler,Ur as HttpDeprecationOutboundPolicy,R as HttpProblems,k as HttpStatusCode,Lt as HydrolixRequestLoggerPlugin,K as InboundPolicy,$r as JWTScopeValidationInboundPolicy,Ht as JwtServicePlugin,ft as LokiLoggingPlugin,V as LookupResult,Wr as MTLSAuthInboundPolicy,Kr as McpAuth0OAuthInboundPolicy,kr as McpClerkOAuthInboundPolicy,Fr as McpCognitoOAuthInboundPolicy,Lr as McpEntraOAuthInboundPolicy,Pt as McpGatewayOAuthProtectedResourcePlugin,Rr as McpGoogleOAuthInboundPolicy,qr as McpKeycloakOAuthInboundPolicy,vr as McpLogtoOAuthInboundPolicy,Mr as McpOAuthInboundPolicy,zr as McpOktaOAuthInboundPolicy,Gr as McpOneLoginOAuthInboundPolicy,Ir as McpPingOAuthInboundPolicy,Jr as McpWorkosOAuthInboundPolicy,A as MemoryZoneReadThroughCache,Nr as MockApiInboundPolicy,Qr as MoesifInboundPolicy,Vr as MonetizationInboundPolicy,xt as NewRelicLoggingPlugin,Bt as NewRelicMetricsPlugin,St as OAuthProtectedResourcePlugin,Ct as OTelMetricsPlugin,Xr as OktaFGAAuthZInboundPolicy,Yr as OktaJwtInboundPolicy,Zr as OpenFGAAuthZInboundPolicy,er as OpenIdJwtInboundPolicy,_r as OpenMeterInboundPolicy,M as OutboundPolicy,L as ProblemResponseFormatter,ts as PromptInjectionDetectionOutboundPolicy,rs as PropelAuthJwtInboundPolicy,ss as QueryParamToHeaderInboundPolicy,es as QuotaInboundPolicy,os as RateLimitInboundPolicy,as as ReadmeMetricsInboundPolicy,ns as RemoveHeadersInboundPolicy,is as RemoveHeadersOutboundPolicy,ps as RemoveQueryParamsInboundPolicy,cs as ReplaceStringOutboundPolicy,Rt as RequestLoggerPlugin,hs as RequestSizeLimitInboundPolicy,xs as RequestValidationInboundPolicy,ws as RequireOriginInboundPolicy,As as RequireUserClaimsInboundPolicy,W as ResponseSendingEvent,X as ResponseSentEvent,a as RuntimeError,u as SYSTEM_LOGGER,ys as SchemaBasedRequestValidation,bs as SecretMaskingOutboundPolicy,$ as SemanticAttributes,ls as SemanticCacheInboundPolicy,Os as ServiceProviderImpl,js as SetBodyInboundPolicy,Bs as SetHeadersInboundPolicy,Cs as SetHeadersOutboundPolicy,Ds as SetQueryParamsInboundPolicy,Es as SetStatusOutboundPolicy,Hs as SetUpstreamApiKeyInboundPolicy,Ps as SleepInboundPolicy,yt as SplunkLoggingPlugin,U as StreamingZoneCache,Ss as StripeWebhookVerificationInboundPolicy,wt as SumoLogicLoggingPlugin,Ts as SupabaseJwtInboundPolicy,J as SystemRouteName,q as TelemetryPlugin,Us as TrafficSplittingInboundPolicy,ks as UpstreamAwsFederatedAuthInboundPolicy,Fs as UpstreamAwsServiceAuthInboundPolicy,Ls as UpstreamAzureAdServiceAuthInboundPolicy,Rs as UpstreamFirebaseAdminAuthInboundPolicy,qs as UpstreamFirebaseUserAuthInboundPolicy,vs as UpstreamGcpFederatedAuthInboundPolicy,zs as UpstreamGcpJwtInboundPolicy,Gs as UpstreamGcpServiceAuthInboundPolicy,Is as UpstreamOAuthClientCredentialsInboundPolicy,Js as UpstreamZuploJwtAuthInboundPolicy,At as VMWareLogInsightLoggingPlugin,Ks as ValidateJsonSchemaInbound,Ms as WebBotAuthInboundPolicy,Ns as XmlToJsonOutboundPolicy,w as ZoneCache,bt as ZuploMcpSdk,v as ZuploRequest,$s as ZuploServices,_ as aiGatewayHandler,tt as aiGatewayHandlerV2,T as apiServices,st as awsLambdaHandler,Ft as defaultGenerateHydrolixEntry,y as environment,H as extractAllText,Pr as extractGraphqlErrors,S as extractStreamTextDelta,E as flattenMessageContent,j as getFormat,gs as getIdForParameterSchema,us as getIdForRefSchema,ds as getIdForRequestBodySchema,ms as getRawOperationDataIdentifierName,B as getRequestBody,C as getResponseBody,P as getStreamEvents,D as getUsage,F as httpStatuses,et as legacyDevPortalHandler,at as mcpServerHandler,nt as openApiSpecHandler,Q as recordGraphqlCacheState,it as redirectHandler,ot as redirectLegacyDevPortal,Sr as responseHasGraphqlErrors,fs as sanitizedIdentifierName,G as serialize,Or as setMoesifContext,n as trackFeature,ct as urlForwardHandler,ht as urlRewriteHandler,gt as webSocketHandler,mt as webSocketPipelineHandler,pt as zuploServiceProxy};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/crypto-beta.ts","@zuplo/runtime/platforms/worker/crypto-beta.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["@zuplo/runtime/crypto-beta.ts","@zuplo/runtime/platforms/worker/crypto-beta.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;s8DAIO,IAAMA,EAAmB,CAAC,QAAS,UAAW,UAAW,SAAS,EAKnDC,EAAf,KAA8B,CATrC,MASqC,CAAAC,EAAA,uBAErC,ECHO,IAAMC,EAAN,cAA+BC,CAAe,CARrD,MAQqD,CAAAC,EAAA,yBACnD,MAAM,OAAOC,EAAmBC,EAA+B,CAE7D,GADAC,EAAa,qBAAqB,EAC9B,CAACC,EAAiB,SAASH,EAAU,YAAY,CAAC,EACpD,MAAM,IAAII,EACR,aAAaJ,CAAS,gCAAgCG,EAAiB,KACrE,IACF,CAAC,EACH,EAEF,IAAME,EAAW,IAAI,YAAY,EAAE,OAAOJ,CAAI,EACxCK,EAAa,MAAM,OAAO,OAAO,OAAON,EAAWK,CAAQ,EAKjE,OAJkB,MAAM,KAAK,IAAI,WAAWC,CAAU,CAAC,EAEpD,IAAKC,GAAMA,EAAE,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CAAC,EAC1C,KAAK,EAAE,CAEZ,CACF","names":["supportedDigests","BaseCryptoBeta","__name","WorkerCryptoBeta","BaseCryptoBeta","__name","algorithm","data","trackFeature","supportedDigests","RuntimeError","msgUint8","hashBuffer","b"]}
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a as e,b as t,e as o,f as a,g as i,h as r,i as n,j as m}from"../chunk-
|
|
25
|
+
import{a as e,b as t,e as o,f as a,g as i,h as r,i as n,j as m}from"../chunk-VHRZC4UF.js";import"../chunk-A3QGJZO7.js";import"../chunk-UKQQD2JN.js";import"../chunk-YIT72S45.js";import"../chunk-TYV53J3B.js";export{o as AIGatewayConfiguration,i as getIdForParameterSchema,n as getIdForRefSchema,r as getIdForRequestBodySchema,a as getRawOperationDataIdentifierName,e as isRestrictedEnvVariableName,t as isZuploReadableEnvVariableName,m as sanitizedIdentifierName};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{a,b,c,d}from"../../chunk-
|
|
25
|
+
import{a,b,c,d}from"../../chunk-6SNZ4DOC.js";import"../../chunk-QGAJTUPE.js";import"../../chunk-A3QGJZO7.js";import"../../chunk-TYV53J3B.js";export{b as createErrorResponse,c as createResultResponse,a as getRequest,d as processMessages};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|