MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / debug

Method debug

package/cli.js:342–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

340`),O){let H=_(await w);j.push(`${$}:${H}\r
341`),j.push(`\r
342`)}j.push(null)}),j};RXq.getAwsChunkedEncodingStream=WR9});var IXq=m((Gr$,xXq)=>{var{defineProperty:SM8,getOwnPropertyDescriptor:DR9,getOwnPropertyNames:fR9}=Object,ZR9=Object.prototype.hasOwnProperty,RP1=(q,K)=>SM8(q,"name",{value:K,configurable:!0}),GR9=(q,K)=>{for(var _ in K)SM8(q,_,{get:K[_],enumerable:!0})},TR9=(q,K,_,z)=>{if(K&&typeof K==="object"||typeof K==="function"){for(let Y of fR9(K))if(!ZR9.call(q,Y)&&Y!==_)SM8(q,Y,{get:()=>K[Y],enumerable:!(z=DR9(K,Y))||z.enumerable})}return q},vR9=(q)=>TR9(SM8({},"__esModule",{value:!0}),q),CXq={};GR9(CXq,{escapeUri:()=>bXq,escapeUriPath:()=>VR9});xXq.exports=vR9(CXq);var bXq=RP1((q)=>encodeURIComponent(q).replace(/[!'()*]/g,kR9),"escapeUri"),kR9=RP1((q)=>`%${q.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),VR9=RP1((q)=>q.split("/").map(bXq).join("/"),"escapeUriPath")});var BXq=m((Tr$,pXq)=>{var{defineProperty:CM8,getOwnPropertyDescriptor:NR9,getOwnPropertyNames:yR9}=Object,ER9=Object.prototype.hasOwnProperty,LR9=(q,K)=>CM8(q,"name",{value:K,configurable:!0}),RR9=(q,K)=>{for(var _ in K)CM8(q,_,{get:K[_],enumerable:!0})},hR9=(q,K,_,z)=>{if(K&&typeof K==="object"||typeof K==="function"){for(let Y of yR9(K))if(!ER9.call(q,Y)&&Y!==_)CM8(q,Y,{get:()=>K[Y],enumerable:!(z=NR9(K,Y))||z.enumerable})}return q},SR9=(q)=>hR9(CM8({},"__esModule",{value:!0}),q),uXq={};RR9(uXq,{buildQueryString:()=>mXq});pXq.exports=SR9(uXq);var hP1=IXq();function mXq(q){let K=[];for(let _ of Object.keys(q).sort()){let z=q[_];if(_=(0,hP1.escapeUri)(_),Array.isArray(z))for(let Y=0,$=z.length;Y<$;Y++)K.push(`${_}=${(0,hP1.escapeUri)(z[Y])}`);else{let Y=_;if(z||typeof z==="string")Y+=`=${(0,hP1.escapeUri)(z)}`;K.push(Y)}}return K.join("&")}LR9(mXq,"buildQueryString")});var qPq=m((vr$,eXq)=>{var{create:CR9,defineProperty:rF6,getOwnPropertyDescriptor:bR9,getOwnPropertyNames:xR9,getPrototypeOf:IR9}=Object,uR9=Object.prototype.hasOwnProperty,UW=(q,K)=>rF6(q,"name",{value:K,configurable:!0}),mR9=(q,K)=>{for(var _ in K)rF6(q,_,{get:K[_],enumerable:!0})},UXq=(q,K,_,z)=>{if(K&&typeof K==="object"||typeof K==="function"){for(let Y of xR9(K))if(!uR9.call(q,Y)&&Y!==_)rF6(q,Y,{get:()=>K[Y],enumerable:!(z=bR9(K,Y))||z.enumerable})}return q},pR9=(q,K,_)=>(_=q!=null?CR9(IR9(q)):{},UXq(K||!q||!q.__esModule?rF6(_,"default",{value:q,enumerable:!0}):_,q)),BR9=(q)=>UXq(rF6({},"__esModule",{value:!0}),q),QXq={};mR9(QXq,{DEFAULT_REQUEST_TIMEOUT:()=>dR9,NodeHttp2Handler:()=>rR9,NodeHttpHandler:()=>cR9,streamCollector:()=>aR9});eXq.exports=BR9(QXq);var dXq=_P1(),cXq=BXq(),SP1=U6("http"),CP1=U6("https"),gR9=["ECONNRESET","EPIPE","ETIMEDOUT"],lXq=UW((q)=>{let K={};for(let _ of Object.keys(q)){let z=q[_];K[_]=Array.isArray(z)?z.join(","):z}return K},"getTransformedHeaders"),FR9=UW((q,K,_=0)=>{if(!_)return;let z=setTimeout(()=>{q.destroy(),K(Object.assign(Error(`Socket timed out without establishing a connection within ${_} ms`),{name:"TimeoutError"}))},_);q.on("socket",(Y)=>{if(Y.connecting)Y.on("connect",()=>{clearTimeout(z)});else clearTimeout(z)})},"setConnectionTimeout"),UR9=UW((q,{keepAlive:K,keepAliveMsecs:_})=>{if(K!==!0)return;q.on("socket",(z)=>{z.setKeepAlive(K,_||0)})},"setSocketKeepAlive"),QR9=UW((q,K,_=0)=>{q.setTimeout(_,()=>{q.destroy(),K(Object.assign(Error(`Connection timed out after ${_} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),nXq=U6("stream"),gXq=1000;async function bP1(q,K,_=gXq){let z=K.headers??{},Y=z.Expect||z.expect,$=-1,A=!1;if(Y==="100-continue")await Promise.race([new Promise((O)=>{$=Number(setTimeout(O,Math.max(gXq,_)))}),new Promise((O)=>{q.on("continue",()=>{clearTimeout($),O()}),q.on("error",()=>{A=!0,clearTimeout($),O()})})]);if(!A)iXq(q,K.body)}UW(bP1,"writeRequestBody");function iXq(q,K){if(K instanceof nXq.Readable){K.pipe(q);return}if(K){if(Buffer.isBuffer(K)||typeof K==="string"){q.end(K);return}let _=K;if(typeof _==="object"&&_.buffer&&typeof _.byteOffset==="number"&&typeof _.byteLength==="number"){q.end(Buffer.from(_.buffer,_.byteOffset,_.byteLength));return}q.end(Buffer.from(K));return}q.end()}UW(iXq,"writeBody");var dR9=0,rXq=class q{constructor(K){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((_,z)=>{if(typeof K==="function")K().then((Y)=>{_(this.resolveDefaultConfig(Y))}).catch(z);else _(this.resolveDefaultConfig(K))})}static create(K){if(typeof(K==null?void 0:K.handle)==="function")return K;return new q(K)}static checkSocketUsage(K,_){var z,Y;let{sockets:$,requests:A,maxSockets:O}=K;if(typeof O!=="number"||O===1/0)return _;let w=15000;if(Date.now()-w<_)return _;if($&&A)for(let j in $){let H=((z=$[j])==null?void 0:z.length)??0,J=((Y=A[j])==null?void 0:Y.length)??0;if(H>=O&&J>=2*O)return console.warn("@smithy/node-http-handler:WARN",`socket usage at capacity=${H} and ${J} additional requests are enqueued.`,"See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html","or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config."),Date.now()}return _}resolveDefaultConfig(K){let{requestTimeout:_,connectionTimeout:z,socketTimeout:Y,httpAgent:$,httpsAgent:A}=K||{},O=!0,w=50;return{connectionTimeout:z,requestTimeout:_??Y,httpAgent:(()=>{if($ instanceof SP1.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new SP1.Agent({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(A instanceof CP1.Agent||typeof(A==null?void 0:A.destroy)==="function")return A;return new CP1.Agent({keepAlive:!0,maxSockets:50,...A})})()}}destroy(){var K,_,z,Y;(_=(K=this.config)==null?void 0:K.httpAgent)==null||_.destroy(),(Y=(z=this.config)==null?void 0:z.httpsAgent)==null||Y.destroy()}async handle(K,{abortSignal:_}={}){if(!this.config)this.config=await this.configProvider;let z;return new Promise((Y,$)=>{let A=void 0,O=UW(async(G)=>{await A,clearTimeout(z),Y(G)},"resolve"),w=UW(async(G)=>{await A,$(G)},"reject");if(!this.config)throw Error("Node HTTP request handler config is not resolved");if(_==null?void 0:_.aborted){let G=Error("Request aborted");G.name="AbortError",w(G);return}let j=K.protocol==="https:",H=j?this.config.httpsAgent:this.config.httpAgent;z=setTimeout(()=>{this.socketWarningTimestamp=q.checkSocketUsage(H,this.socketWarningTimestamp)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));let J=(0,cXq.buildQueryString)(K.query||{}),M=void 0;if(K.username!=null||K.password!=null){let G=K.username??"",Z=K.password??"";M=`${G}:${Z}`}let X=K.path;if(J)X+=`?${J}`;if(K.fragment)X+=`#${K.fragment}`;let P={headers:K.headers,host:K.hostname,method:K.method,path:X,port:K.port,agent:H,auth:M},D=(j?CP1.request:SP1.request)(P,(G)=>{let Z=new dXq.HttpResponse({statusCode:G.statusCode||-1,reason:G.statusMessage,headers:lXq(G.headers),body:G});O({response:Z})});if(D.on("error",(G)=>{if(gR9.includes(G.code))w(Object.assign(G,{name:"TimeoutError"}));else w(G)}),FR9(D,w,this.config.connectionTimeout),QR9(D,w,this.config.requestTimeout),_)_.onabort=()=>{D.abort();let G=Error("Request aborted");G.name="AbortError",w(G)};let f=P.agent;if(typeof f==="object"&&"keepAlive"in f)UR9(D,{keepAlive:f.keepAlive,keepAliveMsecs:f.keepAliveMsecs});A=bP1(D,K,this.config.requestTimeout).catch($)})}updateHttpClientConfig(K,_){this.config=void 0,this.configProvider=this.configProvider.then((z)=>{return{...z,[K]:_}})}httpHandlerConfigs(){return this.config??{}}};UW(rXq,"NodeHttpHandler");var cR9=rXq,FXq=U6("http2"),lR9=pR9(U6("http2")),oXq=class{constructor(K){this.sessions=[],this.sessions=K??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(K){this.sessions.push(K)}contains(K){return this.sessions.includes(K)}remove(K){this.sessions=this.sessions.filter((_)=>_!==K)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(K){for(let _ of this.sessions)if(_===K){if(!_.destroyed)_.destroy()}}};UW(oXq,"NodeHttp2ConnectionPool");var nR9=oXq,aXq=class{constructor(K){if(this.sessionCache=new Map,this.config=K,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(K,_){let z=this.getUrlString(K),Y=this.sessionCache.get(z);if(Y){let w=Y.poll();if(w&&!this.config.disableConcurrency)return w}let $=lR9.default.connect(z);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(w)=>{if(w)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+K.destination.toString())});$.unref();let A=UW(()=>{$.destroy(),this.deleteSession(z,$)},"destroySessionCb");if($.on("goaway",A),$.on("error",A),$.on("frameError",A),$.on("close",()=>this.deleteSession(z,$)),_.requestTimeout)$.setTimeout(_.requestTimeout,A);let O=this.sessionCache.get(z)||new nR9;return O.offerLast($),this.sessionCache.set(z,O),$}deleteSession(K,_){let z=this.sessionCache.get(K);if(!z)return;if(!z.contains(_))return;z.remove(_),this.sessionCache.set(K,z)}release(K,_){var z;let Y=this.getUrlString(K);(z=this.sessionCache.get(Y))==null||z.offerLast(_)}destroy(){for(let[K,_]of this.sessionCache){for(let z of _){if(!z.destroyed)z.destroy();_.remove(z)}this.sessionCache.delete(K)}}setMaxConcurrentStreams(K){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=K}setDisableConcurrentStreams(K){this.config.disableConcurrency=K}getUrlString(K){return K.destination.toString()}};UW(aXq,"NodeHttp2ConnectionManager");var iR9=aXq,sXq=class q{constructor(K){this.metadata={handlerProtocol:"h2"},this.connectionManager=new iR9({}),this.configProvider=new Promise((_,z)=>{if(typeof K==="function")K().then((Y)=>{_(Y||{})}).catch(z);else _(K||{})})}static create(K){if(typeof(K==null?void 0:K.handle)==="function")return K;return new q(K)}destroy(){this.connectionManager.destroy()}async handle(K,{abortSignal:_}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:z,disableConcurrentStreams:Y}=this.config;return new Promise(($,A)=>{var O;let w=!1,j=void 0,H=UW(async(R)=>{await j,$(R)},"resolve"),J=UW(async(R)=>{await j,A(R)},"reject");if(_==null?void 0:_.aborted){w=!0;let R=Error("Request aborted");R.name="AbortError",J(R);return}let{hostname:M,method:X,port:P,protocol:W,query:D}=K,f="";if(K.username!=null||K.password!=null){let R=K.username??"",x=K.password??"";f=`${R}:${x}@`}let G=`${W}//${f}${M}${P?`:${P}`:""}`,Z={destination:new URL(G)},T=this.connectionManager.lease(Z,{requestTimeout:(O=this.config)==null?void 0:O.sessionTimeout,disableConcurrentStreams:Y||!1}),v=UW((R)=>{if(Y)this.destroySession(T);w=!0,J(R)},"rejectWithDestroy"),V=(0,cXq.buildQueryString)(D||{}),E=K.path;if(V)E+=`?${V}`;if(K.fragment)E+=`#${K.fragment}`;let S=T.request({...K.headers,[FXq.constants.HTTP2_HEADER_PATH]:E,[FXq.constants.HTTP2_HEADER_METHOD]:X});if(T.ref(),S.on("response",(R)=>{let x=new dXq.HttpResponse({statusCode:R[":status"]||-1,headers:lXq(R),body:S});if(w=!0,H({response:x}),Y)T.close(),this.connectionManager.deleteSession(G,T)}),z)S.setTimeout(z,()=>{S.close();let R=Error(`Stream timed out because of no activity for ${z} ms`);R.name="TimeoutError",v(R)});if(_)_.onabort=()=>{S.close();let R=Error("Request aborted");R.name="AbortError",v(R)};S.on("frameError",(R,x,I)=>{v(Error(`Frame type id ${R} in stream id ${I} has failed with code ${x}.`))}),S.on("error",v),S.on("aborted",()=>{v(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${S.rstCode}.`))}),S.on("close",()=>{if(T.unref(),Y)T.destroy();if(!w)v(Error("Unexpected error: http2 request did not get a response"))}),j=bP1(S,K,z)})}updateHttpClientConfig(K,_){this.config=void 0,this.configProvider=this.configProvider.then((z)=>{return{...z,[K]:_}})}httpHandlerConfigs(){return this.config??{}}destroySession(K){if(!K.destroyed)K.destroy()}};UW(sXq,"NodeHttp2Handler");var rR9=sXq,tXq=class extends nXq.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(K,_,z){this.bufferedBytes.push(K),z()}};UW(tXq,"Collector");var oR9=tXq,aR9=UW((q)=>new Promise((K,_)=>{let z=new oR9;q.pipe(z),q.on("error",(Y)=>{z.end(),_(Y)}),z.on("error",_),z.on("finish",function(){let Y=new Uint8Array(Buffer.concat(this.bufferedBytes));K(Y)})}),"streamCollector")});var YPq=m((_Pq)=>{Object.defineProperty(_Pq,"__esModule",{value:!0});_Pq.sdkStreamMixin=void 0;var sR9=qPq(),tR9=Nz6(),xP1=U6("stream"),eR9=U6("util"),KPq="The stream has already been transformed.",qh9=(q)=>{var K,_;if(!(q instanceof xP1.Readable)){let $=((_=(K=q===null||q===void 0?void 0:q.__proto__)===null||K===void 0?void 0:K.constructor)===null||_===void 0?void 0:_.name)||q;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let z=!1,Y=async()=>{if(z)throw Error(KPq);return z=!0,await(0,sR9.streamCollector)(q)};return Object.assign(q,{transformToByteArray:Y,transformToString:async($)=>{let A=await Y();if($===void 0||Buffer.isEncoding($))return(0,tR9.fromArrayBuffer)(A.buffer,A.byteOffset,A.byteLength).toString($);else return new eR9.TextDecoder($).decode(A)},transformToWebStream:()=>{if(z)throw Error(KPq);if(q.readableFlowing!==null)throw Error("The stream has been consumed by other callbacks.");if(typeof xP1.Readable.toWeb!=="function")throw Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return z=!0,xP1.Readable.toWeb(q)}})};_Pq.sdkStreamMixin=qh9});var JPq=m((Vr$,IM8)=>{var{defineProperty:bM8,getOwnPropertyDescriptor:Kh9,getOwnPropertyNames:_h9}=Object,zh9=Object.prototype.hasOwnProperty,mP1=(q,K)=>bM8(q,"name",{value:K,configurable:!0}),Yh9=(q,K)=>{for(var _ in K)bM8(q,_,{get:K[_],enumerable:!0})},IP1=(q,K,_,z)=>{if(K&&typeof K==="object"||typeof K==="function"){for(let Y of _h9(K))if(!zh9.call(q,Y)&&Y!==_)bM8(q,Y,{get:()=>K[Y],enumerable:!(z=Kh9(K,Y))||z.enumerable})}return q},$Pq=(q,K,_)=>(IP1(q,K,"default"),_&&IP1(_,K,"default")),$h9=(q)=>IP1(bM8({},"__esModule",{value:!0}),q),xM8={};Yh9(xM8,{Uint8ArrayBlobAdapter:()=>uP1});IM8.exports=$h9(xM8);var APq=yP1(),OPq=LXq();function wPq(q,K="utf-8"){if(K==="base64")return(0,APq.toBase64)(q);return(0,OPq.toUtf8)(q)}mP1(wPq,"transformToString");function jPq(q,K){if(K==="base64")return uP1.mutate((0,APq.fromBase64)(q));return uP1.mutate((0,OPq.fromUtf8)(q))}mP1(jPq,"transformFromString");var HPq=class q extends Uint8Array{static fromString(K,_="utf-8"){switch(typeof K){case"string":return jPq(K,_);default:throw Error(`Unsupported conversion from ${typeof K} to Uint8ArrayBlobAdapter.`)}}static mutate(K){return Object.setPrototypeOf(K,q.prototype),K}transformToString(K="utf-8"){return wPq(this,K)}};mP1(HPq,"Uint8ArrayBlobAdapter");var uP1=HPq;$Pq(xM8,SXq(),IM8.exports);$Pq(xM8,YPq(),IM8.exports)});var uPq=m((Nr$,IPq)=>{var{defineProperty:BM8,getOwnPropertyDescriptor:Ah9,getOwnPropertyNames:Oh9}=Object,wh9=Object.prototype.hasOwnProperty,w4=(q,K)=>BM8(q,"name",{value:K,configurable:!0}),jh9=(q,K)=>{for(var _ in K)BM8(q,_,{get:K[_],enumerable:!0})},Hh9=(q,K,_,z)=>{if(K&&typeof K==="object"||typeof K==="function"){for(let Y of Oh9(K))if(!wh9.call(q,Y)&&Y!==_)BM8(q,Y,{get:()=>K[Y],enumerable:!(z=Ah9(K,Y))||z.enumerable})}return q},Jh9=(q)=>Hh9(BM8({},"__esModule",{value:!0}),q),XPq={};jh9(XPq,{Client:()=>Xh9,Command:()=>ZPq,LazyJsonString:()=>jS9,NoOpLogger:()=>Mh9,SENSITIVE_STRING:()=>Dh9,ServiceException:()=>sh9,StringWrapper:()=>eF6,_json:()=>dP1,collectBody:()=>Ph9,convertMap:()=>HS9,createAggregatedClient:()=>fh9,dateToUtcString:()=>yPq,decorateServiceException:()=>LPq,emitWarningIfUnsupportedVersion:()=>KS9,expectBoolean:()=>Gh9,expectByte:()=>QP1,expectFloat32:()=>uM8,expectInt:()=>vh9,expectInt32:()=>FP1,expectLong:()=>sF6,expectNonNull:()=>Vh9,expectNumber:()=>aF6,expectObject:()=>TPq,expectShort:()=>UP1,expectString:()=>Nh9,expectUnion:()=>yh9,extendedEncodeURIComponent:()=>pM8,getArrayIfSingleItem:()=>wS9,getDefaultClientConfiguration:()=>AS9,getDefaultExtensionConfiguration:()=>hPq,getValueFromTextNode:()=>SPq,handleFloat:()=>Rh9,limitedParseDouble:()=>nP1,limitedParseFloat:()=>hh9,limitedParseFloat32:()=>Sh9,loadConfigsForDefaultMode:()=>qS9,logger:()=>tF6,map:()=>rP1,parseBoolean:()=>Zh9,parseEpochTimestamp:()=>Qh9,parseRfc3339DateTime:()=>uh9,parseRfc3339DateTimeWithOffset:()=>ph9,parseRfc7231DateTime:()=>Uh9,resolveDefaultRuntimeConfig:()=>OS9,resolvedPath:()=>WS9,serializeFloat:()=>DS9,splitEvery:()=>xPq,strictParseByte:()=>NPq,strictParseDouble:()=>lP1,strictParseFloat:()=>Eh9,strictParseFloat32:()=>vPq,strictParseInt:()=>Ch9,strictParseInt32:()=>bh9,strictParseLong:()=>VPq,strictParseShort:()=>i06,take:()=>JS9,throwDefaultError:()=>RPq,withBaseException:()=>th9});IPq.exports=Jh9(XPq);var PPq=class{trace(){}debug(){}info(){}warn(){}error(){}};w4(PPq,"NoOpLogger");var Mh9=PPq,WPq=kXq(),DPq=class{constructor(K){this.middlewareStack=(0,WPq.constructStack)(),this.config=K}send(K,_,z){let Y=typeof _!=="function"?_:void 0,$=typeof _==="function"?_:z,A=K.resolveMiddleware(this.middlewareStack,this.config,Y);if($)A(K).then((O)=>$(null,O.output),(O)=>$(O)).catch(()=>{});else return A(K).then((O)=>O.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};w4(DPq,"Client");var Xh9=DPq,pP1=JPq(),Ph9=w4(async(q=new Uint8Array,K)=>{if(q instanceof Uint8Array)return pP1.Uint8ArrayBlobAdapter.mutate(q);if(!q)return pP1.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let _=K.streamCollector(q);return pP1.Uint8ArrayBlobAdapter.mutate(await _)},"collectBody"),gP1=KP1(),fPq=class{constructor(){this.middlewareStack=(0,WPq.constructStack)()}static classBuilder(){return new Wh9}resolveMiddlewareWithContext(K,_,z,{middlewareFn:Y,clientName:$,commandName:A,inputFilterSensitiveLog:O,outputFilterSensitiveLog:w,smithyContext:j,additionalContext:H,CommandCtor:J}){for(let D of Y.bind(this)(J,K,_,z))this.middlewareStack.use(D);let M=K.concat(this.middlewareStack),{logger:X}=_,P={logger:X,clientName:$,commandName:A,inputFilterSensitiveLog:O,outputFilterSensitiveLog:w,[gP1.SMITHY_CONTEXT_KEY]:{...j},...H},{requestHandler:W}=_;return M.resolve((D)=>W.handle(D.request,z||{}),P)}};w4(fPq,"Command");var ZPq=fPq,GPq=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(K)=>K,this._outputFilterSensitiveLog=(K)=>K,this._serializer=null,this._deserializer=null}init(K){this._init=K}ep(K){return this._ep=K,this}m(K){return this._middlewareFn=K,this}s(K,_,z={}){return this._smithyContext={service:K,operation:_,...z},this}c(K={}){return this._additionalContext=K,this}n(K,_){return this._clientName=K,this._commandName=_,this}f(K=(z)=>z,_=(z)=>z){return this._inputFilterSensitiveLog=K,this._outputFilterSensitiveLog=_,this}ser(K){return this._serializer=K,this}de(K){return this._deserializer=K,this}build(){var K;let _=this,z;return z=(K=class extends ZPq{constructor(...[Y]){super();this.serialize=_._serializer,this.deserialize=_._deserializer,this.input=Y??{},_._init(this)}static getEndpointParameterInstructions(){return _._ep}resolveMiddleware(Y,$,A){return this.resolveMiddlewareWithContext(Y,$,A,{CommandCtor:z,middlewareFn:_._middlewareFn,clientName:_._clientName,commandName:_._commandName,inputFilterSensitiveLog:_._inputFilterSensitiveLog,outputFilterSensitiveLog:_._outputFilterSensitiveLog,smithyContext:_._smithyContext,additionalContext:_._additionalContext})}},w4(K,"CommandRef"),K)}};w4(GPq,"ClassBuilder");var Wh9=GPq,Dh9="***SensitiveInformation***",fh9=w4((q,K)=>{for(let _ of Object.keys(q)){let z=q[_],Y=w4(async function(A,O,w){let j=new z(A);if(typeof O==="function")this.send(j,O);else if(typeof w==="function"){if(typeof O!=="object")throw Error(`Expected http options but got ${typeof O}`);this.send(j,O||{},w)}else return this.send(j,O)},"methodImpl"),$=(_[0].toLowerCase()+_.slice(1)).replace(/Command$/,"");K.prototype[$]=Y}},"createAggregatedClient"),Zh9=w4((q)=>{switch(q){case"true":return!0;case"false":return!1;default:throw Error(`Unable to parse boolean value "${q}"`)}},"parseBoolean"),Gh9=w4((q)=>{if(q===null||q===void 0)return;if(typeof q==="number"){if(q===0||q===1)tF6.warn(mM8(`Expected boolean, got ${typeof q}: ${q}`));if(q===0)return!1;if(q===1)return!0}if(typeof q==="string"){let K=q.toLowerCase();if(K==="false"||K==="true")tF6.warn(mM8(`Expected boolean, got ${typeof q}: ${q}`));if(K==="false")return!1;if(K==="true")return!0}if(typeof q==="boolean")return q;throw TypeError(`Expected boolean, got ${typeof q}: ${q}`)},"expectBoolean"),aF6=w4((q)=>{if(q===null||q===void 0)return;if(typeof q==="string"){let K=parseFloat(q);if(!Number.isNaN(K)){if(String(K)!==String(q))tF6.warn(mM8(`Expected number but observed string: ${q}`));return K}}if(typeof q==="number")return q;throw TypeError(`Expected number, got ${typeof q}: ${q}`)},"expectNumber"),Th9=Math.ceil(340282346638528860000000000000000000000),uM8=w4((q)=>{let K=aF6(q);if(K!==void 0&&!Number.isNaN(K)&&K!==1/0&&K!==-1/0){if(Math.abs(K)>Th9)throw TypeError(`Expected 32-bit float, got ${q}`)}return K},"expectFloat32"),sF6=w4((q)=>{if(q===null||q===void 0)return;if(Number.isInteger(q)&&!Number.isNaN(q))return q;throw TypeError(`Expected integer, got ${typeof q}: ${q}`)},"expectLong"),vh9=sF6,FP1=w4((q)=>cP1(q,32),"expectInt32"),UP1=w4((q)=>cP1(q,16),"expectShort"),QP1=w4((q)=>cP1(q,8),"expectByte"),cP1=w4((q,K)=>{let _=sF6(q);if(_!==void 0&&kh9(_,K)!==_)throw TypeError(`Expected ${K}-bit integer, got ${q}`);return _},"expectSizedInt"),kh9=w4((q,K)=>{switch(K){case 32:return Int32Array.of(q)[0];case 16:return Int16Array.of(q)[0];case 8:return Int8Array.of(q)[0]}},"castInt"),Vh9=w4((q,K)=>{if(q===null||q===void 0){if(K)throw TypeError(`Expected a non-null value for ${K}`);throw TypeError("Expected a non-null value")}return q},"expectNonNull"),TPq=w4((q)=>{if(q===null||q===void 0)return;if(typeof q==="object"&&!Array.isArray(q))return q;let K=Array.isArray(q)?"array":typeof q;throw TypeError(`Expected object, got ${K}: ${q}`)},"expectObject"),Nh9=w4((q)=>{if(q===null||q===void 0)return;if(typeof q==="string")return q;if(["boolean","number","bigint"].includes(typeof q))return tF6.warn(mM8(`Expected string, got ${typeof q}: ${q}`)),String(q);throw TypeError(`Expected string, got ${typeof q}: ${q}`)},"expectString"),yh9=w4((q)=>{if(q===null||q===void 0)return;let K=TPq(q),_=Object.entries(K).filter(([,z])=>z!=null).map(([z])=>z);if(_.length===0)throw TypeError("Unions must have exactly one non-null member. None were found.");if(_.length>1)throw TypeError(`Unions must have exactly one non-null member. Keys ${_} were not null.`);return K},"expectUnion"),lP1=w4((q)=>{if(typeof q=="string")return aF6(o06(q));return aF6(q)},"strictParseDouble"),Eh9=lP1,vPq=w4((q)=>{if(typeof q=="string")return uM8(o06(q));return uM8(q)},"strictParseFloat32"),Lh9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,o06=w4((q)=>{let K=q.match(Lh9);if(K===null||K[0].length!==q.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(q)},"parseNumber"),nP1=w4((q)=>{if(typeof q=="string")return kPq(q);return aF6(q)},"limitedParseDouble"),Rh9=nP1,hh9=nP1,Sh9=w4((q)=>{if(typeof q=="string")return kPq(q);return uM8(q)},"limitedParseFloat32"),kPq=w4((q)=>{switch(q){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw Error(`Unable to parse float value: ${q}`)}},"parseFloatString"),VPq=w4((q)=>{if(typeof q==="string")return sF6(o06(q));return sF6(q)},"strictParseLong"),Ch9=VPq,bh9=w4((q)=>{if(typeof q==="string")return FP1(o06(q));return FP1(q)},"strictParseInt32"),i06=w4((q)=>{if(typeof q==="string")return UP1(o06(q));return UP1(q)},"strictParseShort"),NPq=w4((q)=>{if(typeof q==="string")return QP1(o06(q));return QP1(q)},"strictParseByte"),mM8=w4((q)=>{return String(TypeError(q).stack||q).split(`
343`).slice(0,5).filter((K)=>!K.includes("stackTraceWarning")).join(`
344`)},"stackTraceWarning"),tF6={warn:console.warn},xh9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],iP1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yPq(q){let K=q.getUTCFullYear(),_=q.getUTCMonth(),z=q.getUTCDay(),Y=q.getUTCDate(),$=q.getUTCHours(),A=q.getUTCMinutes(),O=q.getUTCSeconds(),w=Y<10?`0${Y}`:`${Y}`,j=$<10?`0${$}`:`${$}`,H=A<10?`0${A}`:`${A}`,J=O<10?`0${O}`:`${O}`;return`${xh9[z]}, ${w} ${iP1[_]} ${K} ${j}:${H}:${J} GMT`}w4(yPq,"dateToUtcString");var Ih9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),uh9=w4((q)=>{if(q===null||q===void 0)return;if(typeof q!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let K=Ih9.exec(q);if(!K)throw TypeError("Invalid RFC-3339 date-time value");let[_,z,Y,$,A,O,w,j]=K,H=i06(r06(z)),J=Rg(Y,"month",1,12),M=Rg($,"day",1,31);return oF6(H,J,M,{hours:A,minutes:O,seconds:w,fractionalMilliseconds:j})},"parseRfc3339DateTime"),mh9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ph9=w4((q)=>{if(q===null||q===void 0)return;if(typeof q!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let K=mh9.exec(q);if(!K)throw TypeError("Invalid RFC-3339 date-time value");let[_,z,Y,$,A,O,w,j,H]=K,J=i06(r06(z)),M=Rg(Y,"month",1,12),X=Rg($,"day",1,31),P=oF6(J,M,X,{hours:A,minutes:O,seconds:w,fractionalMilliseconds:j});if(H.toUpperCase()!="Z")P.setTime(P.getTime()-ah9(H));return P},"parseRfc3339DateTimeWithOffset"),Bh9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),gh9=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Fh9=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Uh9=w4((q)=>{if(q===null||q===void 0)return;if(typeof q!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let K=Bh9.exec(q);if(K){let[_,z,Y,$,A,O,w,j]=K;return oF6(i06(r06($)),BP1(Y),Rg(z,"day",1,31),{hours:A,minutes:O,seconds:w,fractionalMilliseconds:j})}if(K=gh9.exec(q),K){let[_,z,Y,$,A,O,w,j]=K;return lh9(oF6(dh9($),BP1(Y),Rg(z,"day",1,31),{hours:A,minutes:O,seconds:w,fractionalMilliseconds:j}))}if(K=Fh9.exec(q),K){let[_,z,Y,$,A,O,w,j]=K;return oF6(i06(r06(j)),BP1(z),Rg(Y.trimLeft(),"day",1,31),{hours:$,minutes:A,seconds:O,fractionalMilliseconds:w})}throw TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Qh9=w4((q)=>{if(q===null||q===void 0)return;let K;if(typeof q==="number")K=q;else if(typeof q==="string")K=lP1(q);else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(K)||K===1/0||K===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(K*1000))},"parseEpochTimestamp"),oF6=w4((q,K,_,z)=>{let Y=K-1;return ih9(q,Y,_),new Date(Date.UTC(q,Y,_,Rg(z.hours,"hour",0,23),Rg(z.minutes,"minute",0,59),Rg(z.seconds,"seconds",0,60),oh9(z.fractionalMilliseconds)))},"buildDate"),dh9=w4((q)=>{let K=new Date().getUTCFullYear(),_=Math.floor(K/100)*100+i06(r06(q));if(_<K)return _+100;return _},"parseTwoDigitYear"),ch9=1576800000000,lh9=w4((q)=>{if(q.getTime()-new Date().getTime()>ch9)return new Date(Date.UTC(q.getUTCFullYear()-100,q.getUTCMonth(),q.getUTCDate(),q.getUTCHours(),q.getUTCMinutes(),q.getUTCSeconds(),q.getUTCMilliseconds()));return q},"adjustRfc850Year"),BP1=w4((q)=>{let K=iP1.indexOf(q);if(K<0)throw TypeError(`Invalid month: ${q}`);return K+1},"parseMonthByShortName"),nh9=[31,28,31,30,31,30,31,31,30,31,30,31],ih9=w4((q,K,_)=>{let z=nh9[K];if(K===1&&rh9(q))z=29;if(_>z)throw TypeError(`Invalid day for ${iP1[K]} in ${q}: ${_}`)},"validateDayOfMonth"),rh9=w4((q)=>{return q%4===0&&(q%100!==0||q%400===0)},"isLeapYear"),Rg=w4((q,K,_,z)=>{let Y=NPq(r06(q));if(Y<_||Y>z)throw TypeError(`${K} must be between ${_} and ${z}, inclusive`);return Y},"parseDateValue"),oh9=w4((q)=>{if(q===null||q===void 0)return 0;return vPq("0."+q)*1000},"parseMilliseconds"),ah9=w4((q)=>{let K=q[0],_=1;if(K=="+")_=1;else if(K=="-")_=-1;else throw TypeError(`Offset direction, ${K}, must be "+" or "-"`);let z=Number(q.substring(1,3)),Y=Number(q.substring(4,6));return _*(z*60+Y)*60*1000},"parseOffsetToMilliseconds"),r06=w4((q)=>{let K=0;while(K<q.length-1&&q.charAt(K)==="0")K++;if(K===0)return q;return q.slice(K)},"stripLeadingZeroes"),EPq=class q extends Error{constructor(K){super(K.message);Object.setPrototypeOf(this,q.prototype),this.name=K.name,this.$fault=K.$fault,this.$metadata=K.$metadata}};w4(EPq,"ServiceException");var sh9=EPq,LPq=w4((q,K={})=>{Object.entries(K).filter(([,z])=>z!==void 0).forEach(([z,Y])=>{if(q[z]==null||q[z]==="")q[z]=Y});let _=q.message||q.Message||"UnknownError";return q.message=_,delete q.Message,q},"decorateServiceException"),RPq=w4(({output:q,parsedBody:K,exceptionCtor:_,errorCode:z})=>{let Y=eh9(q),$=Y.httpStatusCode?Y.httpStatusCode+"":void 0,A=new _({name:(K==null?void 0:K.code)||(K==null?void 0:K.Code)||z||$||"UnknownError",$fault:"client",$metadata:Y});throw LPq(A,K)},"throwDefaultError"),th9=w4((q)=>{return({output:K,parsedBody:_,errorCode:z})=>{RPq({output:K,parsedBody:_,exceptionCtor:q,errorCode:z})}},"withBaseException"),eh9=w4((q)=>({httpStatusCode:q.statusCode,requestId:q.headers["x-amzn-requestid"]??q.headers["x-amzn-request-id"]??q.headers["x-amz-request-id"],extendedRequestId:q.headers["x-amz-id-2"],cfId:q.headers["x-amz-cf-id"]}),"deserializeMetadata"),qS9=w4((q)=>{switch(q){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),MPq=!1,KS9=w4((q)=>{if(q&&!MPq&&parseInt(q.substring(1,q.indexOf(".")))<14)MPq=!0},"emitWarningIfUnsupportedVersion"),_S9=w4((q)=>{let K=[];for(let _ in gP1.AlgorithmId){let z=gP1.AlgorithmId[_];if(q[z]===void 0)continue;K.push({algorithmId:()=>z,checksumConstructor:()=>q[z]})}return{_checksumAlgorithms:K,addChecksumAlgorithm(_){this._checksumAlgorithms.push(_)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),zS9=w4((q)=>{let K={};return q.checksumAlgorithms().forEach((_)=>{K[_.algorithmId()]=_.checksumConstructor()}),K},"resolveChecksumRuntimeConfig"),YS9=w4((q)=>{let K=q.retryStrategy;return{setRetryStrategy(_){K=_},retryStrategy(){return K}}},"getRetryConfiguration"),$S9=w4((q)=>{let K={};return K.retryStrategy=q.retryStrategy(),K},"resolveRetryRuntimeConfig"),hPq=w4((q)=>{return{..._S9(q),...YS9(q)}},"getDefaultExtensionConfiguration"),AS9=hPq,OS9=w4((q)=>{return{...zS9(q),...$S9(q)}},"resolveDefaultRuntimeConfig");function pM8(q){return encodeURIComponent(q).replace(/[!'()*]/g,function(K){return"%"+K.charCodeAt(0).toString(16).toUpperCase()})}w4(pM8,"extendedEncodeURIComponent");var wS9=w4((q)=>Array.isArray(q)?q:[q],"getArrayIfSingleItem"),SPq=w4((q)=>{for(let _ in q)if(q.hasOwnProperty(_)&&q[_]["#text"]!==void 0)q[_]=q[_]["#text"];else if(typeof q[_]==="object"&&q[_]!==null)q[_]=SPq(q[_]);return q},"getValueFromTextNode"),eF6=w4(function(){let q=Object.getPrototypeOf(this).constructor,_=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(_,q.prototype),_},"StringWrapper");eF6.prototype=Object.create(String.prototype,{constructor:{value:eF6,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(eF6,String);var CPq=class q extends eF6{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(K){if(K instanceof q)return K;else if(K instanceof String||typeof K==="string")return new q(K);return new q(JSON.stringify(K))}};w4(CPq,"LazyJsonString");var jS9=CPq;function rP1(q,K,_){let z,Y,$;if(typeof K>"u"&&typeof _>"u")z={},$=q;else if(z=q,typeof K==="function")return Y=K,$=_,MS9(z,Y,$);else $=K;for(let A of Object.keys($)){if(!Array.isArray($[A])){z[A]=$[A];continue}bPq(z,null,$,A)}return z}w4(rP1,"map");var HS9=w4((q)=>{let K={};for(let[_,z]of Object.entries(q||{}))K[_]=[,z];return K},"convertMap"),JS9=w4((q,K)=>{let _={};for(let z in K)bPq(_,q,K,z);return _},"take"),MS9=w4((q,K,_)=>{return rP1(q,Object.entries(_).reduce((z,[Y,$])=>{if(Array.isArray($))z[Y]=$;else if(typeof $==="function")z[Y]=[K,$()];else z[Y]=[K,$];return z},{}))},"mapWithFilter"),bPq=w4((q,K,_,z)=>{if(K!==null){let A=_[z];if(typeof A==="function")A=[,A];let[O=XS9,w=PS9,j=z]=A;if(typeof O==="function"&&O(K[j])||typeof O!=="function"&&!!O)q[z]=w(K[j]);return}let[Y,$]=_[z];if(typeof $==="function"){let A,O=Y===void 0&&(A=$())!=null,w=typeof Y==="function"&&!!Y(void 0)||typeof Y!=="function"&&!!Y;if(O)q[z]=A;else if(w)q[z]=$()}else{let A=Y===void 0&&$!=null,O=typeof Y==="function"&&!!Y($)||typeof Y!=="function"&&!!Y;if(A||O)q[z]=$}},"applyInstruction"),XS9=w4((q)=>q!=null,"nonNullish"),PS9=w4((q)=>q,"pass"),WS9=w4((q,K,_,z,Y,$)=>{if(K!=null&&K[_]!==void 0){let A=z();if(A.length<=0)throw Error("Empty value provided for input HTTP label: "+_+".");q=q.replace(Y,$?A.split("/").map((O)=>pM8(O)).join("/"):pM8(A))}else throw Error("No value provided for input HTTP label: "+_+".");return q},"resolvedPath"),DS9=w4((q)=>{if(q!==q)return"NaN";switch(q){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return q}},"serializeFloat"),dP1=w4((q)=>{if(q==null)return{};if(Array.isArray(q))return q.filter((K)=>K!=null).map(dP1);if(typeof q==="object"){let K={};for(let _ of Object.keys(q)){if(q[_]==null)continue;K[_]=dP1(q[_])}return K}return q},"_json");function xPq(q,K,_){if(_<=0||!Number.isInteger(_))throw Error("Invalid number of delimiters ("+_+") for splitEvery.");let z=q.split(K);if(_===1)return z;let Y=[],$="";for(let A=0;A<z.length;A++){if($==="")$=z[A];else $+=K+z[A];if((A+1)%_===0)Y.push($),$=""}if($!=="")Y.push($);return Y}w4(xPq,"splitEvery")});var dw,w86,fS9=async(q,K)=>{let _=dw.map({}),z=q.body,Y=dw.take(z,{message:dw.expectString});Object.assign(_,Y);let $=new w86.InternalServerException({$metadata:gM8(q),..._});return dw.decorateServiceException($,q.body)},ZS9=async(q,K)=>{let _=dw.map({}),z=q.body,Y=dw.take(z,{message:dw.expectString,originalMessage:dw.expectString,originalStatusCode:dw.expectInt32});Object.assign(_,Y);let $=new w86.ModelStreamErrorException({$metadata:gM8(q),..._});return dw.decorateServiceException($,q.body)},GS9=async(q,K)=>{let _=dw.map({}),z=q.body,Y=dw.take(z,{message:dw.expectString});Object.assign(_,Y);let $=new w86.ThrottlingException({$metadata:gM8(q),..._});return dw.decorateServiceException($,q.body)},TS9=async(q,K)=>{let _=dw.map({}),z=q.body,Y=dw.take(z,{message:dw.expectString});Object.assign(_,Y);let $=new w86.ValidationException({$metadata:gM8(q),..._});return dw.decorateServiceException($,q.body)},mPq=(q,K)=>{return K.eventStreamMarshaller.deserialize(q,async(_)=>{if(_.chunk!=null)return{chunk:await VS9(_.chunk,K)};if(_.internalServerException!=null)return{internalServerException:await vS9(_.internalServerException,K)};if(_.modelStreamErrorException!=null)return{modelStreamErrorException:await kS9(_.modelStreamErrorException,K)};if(_.validationException!=null)return{validationException:await yS9(_.validationException,K)};if(_.throttlingException!=null)return{throttlingException:await NS9(_.throttlingException,K)};return{$unknown:q}})},vS9=async(q,K)=>{let _={...q,body:await qU6(q.body,K)};return fS9(_,K)},kS9=async(q,K)=>{let _={...q,body:await qU6(q.body,K)};return ZS9(_,K)},VS9=async(q,K)=>{let _={},z=await qU6(q.body,K);return Object.assign(_,ES9(z,K)),_},NS9=async(q,K)=>{let _={...q,body:await qU6(q.body,K)};return GS9(_,K)},yS9=async(q,K)=>{let _={...q,body:await qU6(q.body,K)};return TS9(_,K)},ES9=(q,K)=>{return dw.take(q,{bytes:K.base64Decoder})},gM8=(q)=>({httpStatusCode:q.statusCode,requestId:q.headers["x-amzn-requestid"]??q.headers["x-amzn-request-id"]??q.headers["x-amz-request-id"]??"",extendedRequestId:q.headers["x-amz-id-2"]??"",cfId:q.headers["x-amz-cf-id"]??""}),LS9=(q,K)=>dw.collectBody(q,K).then((_)=>K.utf8Encoder(_)),qU6=(q,K)=>LS9(q,K).then((_)=>{if(_.length)return JSON.parse(_);return{}});var pPq=y(()=>{dw=O6(uPq(),1),w86=O6(tH8(),1)});function BPq(q){if(q[Symbol.asyncIterator])return q;let K=q.getReader();return{async next(){try{let _=await K.read();if(_?.done)K.releaseLock();return _}catch(_){throw K.releaseLock(),_}},async return(){let _=K.cancel();return K.releaseLock(),await _,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}var oP1=y(()=>{yZ()});function FM8(q){return q!=null&&typeof q==="object"&&!Array.isArray(q)}var aP1=(q)=>(aP1=Array.isArray,aP1(q)),sP1,gPq=(q)=>{try{return JSON.parse(q)}catch(K){return}};var KU6=y(()=>{oP1();sP1=aP1});function _U6(){}function UM8(q,K,_){if(!K||FPq[q]>FPq[_])return _U6;else return K[q].bind(K)}function QPq(q){let K=q.logger,_=q.logLevel??"off";if(!K)return RS9;let z=UPq.get(K);if(z&&z[0]===_)return z[1];let Y={error:UM8("error",K,_),warn:UM8("warn",K,_),info:UM8("info",K,_),debug:UM8("debug",K,_)};return UPq.set(K,[_,Y]),Y}var FPq,RS9,UPq;var dPq=y(()=>{KU6();FPq={off:0,error:200,warn:300,info:400,debug:500};RS9={error:_U6,warn:_U6,info:_U6,debug:_U6},UPq=new WeakMap});function SS9(q){return typeof q==="object"&&q!==null&&(("name"in q)&&q.name==="AbortError"||("message"in q)&&String(q.message).includes("FetchRequestCanceledException"))}var lPq,QM8,nPq,tP1=(q)=>new TextDecoder("utf-8").decode(q),cPq=(q)=>new TextEncoder().encode(q),hS9=()=>{let q=new lPq.EventStreamMarshaller({utf8Encoder:tP1,utf8Decoder:cPq});return{base64Decoder:QM8.fromBase64,base64Encoder:QM8.toBase64,utf8Decoder:cPq,utf8Encoder:tP1,eventStreamMarshaller:q,streamCollector:nPq.streamCollector}},dM8;var iPq=y(()=>{u38();Ft();LZ();pPq();KU6();dPq();lPq=O6(YXq(),1),QM8=O6(yP1(),1),nPq=O6(qP1(),1);dM8=class dM8 extends RT{static fromSSEResponse(q,K,_){let z=!1,Y=_?QPq(_):console;async function*$(){if(!q.body)throw K.abort(),new O4("Attempted to iterate over a response with no body");let O=BPq(q.body),w=mPq(O,hS9());for await(let j of w)if(j.chunk&&j.chunk.bytes)yield{event:"chunk",data:tP1(j.chunk.bytes),raw:[]};else if(j.internalServerException)yield{event:"error",data:"InternalServerException",raw:[]};else if(j.modelStreamErrorException)yield{event:"error",data:"ModelStreamErrorException",raw:[]};else if(j.validationException)yield{event:"error",data:"ValidationException",raw:[]};else if(j.throttlingException)yield{event:"error",data:"ThrottlingException",raw:[]}}async function*A(){if(z)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");z=!0;let O=!1;try{for await(let w of $()){if(w.event==="chunk")try{yield JSON.parse(w.data)}catch(j){throw Y.error("Could not parse message into JSON:",w.data),Y.error("From chunk:",w.raw),j}if(w.event==="error"){let j=w.data,H=gPq(j),J=H?void 0:j;throw Qq.generate(void 0,H,J,q.headers)}}O=!0}catch(w){if(SS9(w))return;throw w}finally{if(!O)K.abort()}}return new dM8(A,K)}}});var eP1=(q)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[q]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(q)?.trim();return};function*CS9(q){if(!q)return;if(rPq in q){let{values:z,nulls:Y}=q;yield*z.entries();for(let $ of Y)yield[$,null];return}let K=!1,_;if(q instanceof Headers)_=q.entries();else if(sP1(q))_=q;else K=!0,_=Object.entries(q??{});for(let z of _){let Y=z[0];if(typeof Y!=="string")throw TypeError("expected header name to be a string");let $=sP1(z[1])?z[1]:[z[1]],A=!1;for(let O of $){if(O===void 0)continue;if(K&&!A)A=!0,yield[Y,null];yield[Y,O]}}}var rPq,qW1=(q)=>{let K=new Headers,_=new Set;for(let z of q){let Y=new Set;for(let[$,A]of CS9(z)){let O=$.toLowerCase();if(!Y.has(O))K.delete($),Y.add(O);if(A===null)K.delete($),_.add(O);else K.append($,A),_.delete(O)}}return{[rPq]:!0,values:K,nulls:_}};var oPq=y(()=>{KU6();rPq=Symbol.for("brand.privateNullableHeaders")});function sPq(q){return q.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var aPq,bS9=(q=sPq)=>function(_,...z){if(_.length===1)return _[0];let Y=!1,$=[],A=_.reduce((H,J,M)=>{if(/[?#]/.test(J))Y=!0;let X=z[M],P=(Y?encodeURIComponent:q)(""+X);if(M!==z.length&&(X==null||typeof X==="object"&&X.toString===Object.getPrototypeOf(Object.getPrototypeOf(X.hasOwnProperty??aPq)??aPq)?.toString))P=X+"",$.push({start:H.length+J.length,length:P.length,error:`Value of type ${Object.prototype.toString.call(X).slice(8,-1)} is not a valid path parameter`});return H+J+(M===z.length?"":P)},""),O=A.split(/[?#]/,1)[0],w=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,j;while((j=w.exec(O))!==null)$.push({start:j.index,length:j[0].length,error:`Value "${j[0]}" can't be safely passed as a path parameter`});if($.sort((H,J)=>H.start-J.start),$.length>0){let H=0,J=$.reduce((M,X)=>{let P=" ".repeat(X.start-H),W="^".repeat(X.length);return H=X.start+X.length,M+P+W},"");throw new O4(`Path parameters result in path with invalid segments:
345${$.map((M)=>M.error).join(`

Callers 15

E38Function · 0.45
makeRequestMethod · 0.45
callToolMethod · 0.45
connectMethod · 0.45
handleToolResultMethod · 0.45
constructorMethod · 0.45
jn5Function · 0.45
ci5Function · 0.45
d83Function · 0.45
pK3Function · 0.45
sz1Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected