@stacksjs/dns 0.70.11 → 0.70.13

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -29
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  // @bun
2
- var Nj=Object.create;var{getPrototypeOf:Dj,defineProperty:kU,getOwnPropertyNames:qj}=Object;var kj=Object.prototype.hasOwnProperty;var o=(f,h,w)=>{w=f!=null?Nj(Dj(f)):{};let s=h||!f||!f.__esModule?kU(w,"default",{value:f,enumerable:!0}):w;for(let $ of qj(f))if(!kj.call(s,$))kU(s,$,{get:()=>f[$],enumerable:!0});return s};var H=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Ch=(f,h)=>{for(var w in h)kU(f,w,{get:h[w],enumerable:!0,configurable:!0,set:(s)=>h[w]=()=>s})};var B=(f,h)=>()=>(f&&(h=f(f=0)),h);var B0=import.meta.require;var Jw=(f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},Vw=(f)=>{return{httpHandler:f.httpHandler()}};var iL=()=>{};var F1=H((W50,oL)=>{var{defineProperty:$4,getOwnPropertyDescriptor:yj,getOwnPropertyNames:jj}=Object,Oj=Object.prototype.hasOwnProperty,r4=(f,h)=>$4(f,"name",{value:h,configurable:!0}),lj=(f,h)=>{for(var w in h)$4(f,w,{get:h[w],enumerable:!0})},vj=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of jj(h))if(!Oj.call(f,$)&&$!==w)$4(f,$,{get:()=>h[$],enumerable:!(s=yj(h,$))||s.enumerable})}return f},bj=(f)=>vj($4({},"__esModule",{value:!0}),f),cL={};lj(cL,{AlgorithmId:()=>nL,EndpointURLScheme:()=>_L,FieldPosition:()=>eL,HttpApiKeyAuthLocation:()=>xL,HttpAuthLocation:()=>gL,IniSectionType:()=>aL,RequestHandlerProtocol:()=>pL,SMITHY_CONTEXT_KEY:()=>gj,getDefaultClientConfiguration:()=>ij,resolveDefaultRuntimeConfig:()=>cj});oL.exports=bj(cL);var gL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(gL||{}),xL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(xL||{}),_L=((f)=>{return f.HTTP="http",f.HTTPS="https",f})(_L||{}),nL=((f)=>{return f.MD5="md5",f.CRC32="crc32",f.CRC32C="crc32c",f.SHA1="sha1",f.SHA256="sha256",f})(nL||{}),mj=r4((f)=>{let h=[];if(f.sha256!==void 0)h.push({algorithmId:()=>"sha256",checksumConstructor:()=>f.sha256});if(f.md5!=null)h.push({algorithmId:()=>"md5",checksumConstructor:()=>f.md5});return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),dj=r4((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),ij=r4((f)=>{return mj(f)},"getDefaultClientConfiguration"),cj=r4((f)=>{return dj(f)},"resolveDefaultRuntimeConfig"),eL=((f)=>{return f[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",f})(eL||{}),gj="__smithy_context",aL=((f)=>{return f.PROFILE="profile",f.SSO_SESSION="sso-session",f.SERVICES="services",f})(aL||{}),pL=((f)=>{return f.HTTP_0_9="http/0.9",f.HTTP_1_0="http/1.0",f.TDS_8_0="tds/8.0",f})(pL||{})});var xj;var uL=B(()=>{xj=o(F1(),1)});var tL=()=>{};class n0{constructor(f){this.method=f.method||"GET",this.hostname=f.hostname||"localhost",this.port=f.port,this.query=f.query||{},this.headers=f.headers||{},this.body=f.body,this.protocol=f.protocol?f.protocol.slice(-1)!==":"?`${f.protocol}:`:f.protocol:"https:",this.path=f.path?f.path.charAt(0)!=="/"?`/${f.path}`:f.path:"/",this.username=f.username,this.password=f.password,this.fragment=f.fragment}static clone(f){let h=new n0({...f,headers:{...f.headers}});if(h.query)h.query=_j(h.query);return h}static isInstance(f){if(!f)return!1;let h=f;return"method"in h&&"protocol"in h&&"hostname"in h&&"path"in h&&typeof h.query==="object"&&typeof h.headers==="object"}clone(){return n0.clone(this)}}function _j(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}class xh{constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}}var fB=()=>{};var C1=B(()=>{iL();uL();tL();fB()});function Pw(f){return f}var nj=(f)=>(h)=>async(w)=>{if(!n0.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},ej,Hw=(f)=>({applyToStack:(h)=>{h.add(nj(f),ej)}});var E4=B(()=>{C1();ej={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var aj=()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...W}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(W),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},pj,Nw=(f)=>({applyToStack:(h)=>{h.add(aj(),pj)}});var hB=B(()=>{pj={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var U4=B(()=>{hB()});var yU="X-Amzn-Trace-Id",oj="AWS_LAMBDA_FUNCTION_NAME",uj="_X_AMZN_TRACE_ID",tj=(f)=>(h)=>async(w)=>{let{request:s}=w;if(!n0.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===yU.toLowerCase())??yU;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[oj],E=process.env[uj],U=(T)=>typeof T==="string"&&T.length>0;if(U(r)&&U(E))s.headers[yU]=E;return h({...w,request:s})},fO,Dw=(f)=>({applyToStack:(h)=>{h.add(tj(f),fO)}});var T4=B(()=>{C1();fO={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var Ih=H((l50,rB)=>{var{defineProperty:F4,getOwnPropertyDescriptor:hO,getOwnPropertyNames:wO}=Object,sO=Object.prototype.hasOwnProperty,sB=(f,h)=>F4(f,"name",{value:h,configurable:!0}),$O=(f,h)=>{for(var w in h)F4(f,w,{get:h[w],enumerable:!0})},rO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of wO(h))if(!sO.call(f,$)&&$!==w)F4(f,$,{get:()=>h[$],enumerable:!(s=hO(h,$))||s.enumerable})}return f},EO=(f)=>rO(F4({},"__esModule",{value:!0}),f),$B={};$O($B,{getSmithyContext:()=>UO,normalizeProvider:()=>TO});rB.exports=EO($B);var wB=F1(),UO=sB((f)=>f[wB.SMITHY_CONTEXT_KEY]||(f[wB.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),TO=sB((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider")});var qw=H((v50,LB)=>{var{defineProperty:C4,getOwnPropertyDescriptor:FO,getOwnPropertyNames:CO}=Object,IO=Object.prototype.hasOwnProperty,jU=(f,h)=>C4(f,"name",{value:h,configurable:!0}),LO=(f,h)=>{for(var w in h)C4(f,w,{get:h[w],enumerable:!0})},BO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of CO(h))if(!IO.call(f,$)&&$!==w)C4(f,$,{get:()=>h[$],enumerable:!(s=FO(h,$))||s.enumerable})}return f},GO=(f)=>BO(C4({},"__esModule",{value:!0}),f),EB={};LO(EB,{deserializerMiddleware:()=>UB,deserializerMiddlewareOption:()=>FB,getSerdePlugin:()=>IB,serializerMiddleware:()=>TB,serializerMiddlewareOption:()=>CB});LB.exports=GO(EB);var UB=jU((f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
3
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),TB=jU((f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})},"serializerMiddleware"),FB={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},CB={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function IB(f,h,w){return{applyToStack:(s)=>{s.add(UB(f,w),FB),s.add(TB(f,h),CB)}}}jU(IB,"getSerdePlugin")});var t0=H((b50,zB)=>{var{defineProperty:I4,getOwnPropertyDescriptor:WO,getOwnPropertyNames:AO}=Object,zO=Object.prototype.hasOwnProperty,Lh=(f,h)=>I4(f,"name",{value:h,configurable:!0}),RO=(f,h)=>{for(var w in h)I4(f,w,{get:h[w],enumerable:!0})},XO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of AO(h))if(!zO.call(f,$)&&$!==w)I4(f,$,{get:()=>h[$],enumerable:!(s=WO(h,$))||s.enumerable})}return f},SO=(f)=>XO(I4({},"__esModule",{value:!0}),f),BB={};RO(BB,{Field:()=>QO,Fields:()=>KO,HttpRequest:()=>ZO,HttpResponse:()=>JO,IHttpRequest:()=>GB.HttpRequest,getHttpHandlerExtensionConfiguration:()=>YO,isValidHostname:()=>AB,resolveHttpHandlerRuntimeConfig:()=>MO});zB.exports=SO(BB);var YO=Lh((f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),MO=Lh((f)=>{return{httpHandler:f.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),GB=F1(),QO=class{static{Lh(this,"Field")}constructor({name:f,kind:h=GB.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=h,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((h)=>h!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}},KO=class{constructor({fields:f=[],encoding:h="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=h}static{Lh(this,"Fields")}setField(f){this.entries[f.name.toLowerCase()]=f}getField(f){return this.entries[f.toLowerCase()]}removeField(f){delete this.entries[f.toLowerCase()]}getByType(f){return Object.values(this.entries).filter((h)=>h.kind===f)}},ZO=class f{static{Lh(this,"HttpRequest")}constructor(h){this.method=h.method||"GET",this.hostname=h.hostname||"localhost",this.port=h.port,this.query=h.query||{},this.headers=h.headers||{},this.body=h.body,this.protocol=h.protocol?h.protocol.slice(-1)!==":"?`${h.protocol}:`:h.protocol:"https:",this.path=h.path?h.path.charAt(0)!=="/"?`/${h.path}`:h.path:"/",this.username=h.username,this.password=h.password,this.fragment=h.fragment}static clone(h){let w=new f({...h,headers:{...h.headers}});if(w.query)w.query=WB(w.query);return w}static isInstance(h){if(!h)return!1;let w=h;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return f.clone(this)}};function WB(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}Lh(WB,"cloneQuery");var JO=class{static{Lh(this,"HttpResponse")}constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}};function AB(f){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(f)}Lh(AB,"isValidHostname")});var OU=H((c50,XB)=>{var{defineProperty:L4,getOwnPropertyDescriptor:VO,getOwnPropertyNames:PO}=Object,HO=Object.prototype.hasOwnProperty,NO=(f,h)=>L4(f,"name",{value:h,configurable:!0}),DO=(f,h)=>{for(var w in h)L4(f,w,{get:h[w],enumerable:!0})},qO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of PO(h))if(!HO.call(f,$)&&$!==w)L4(f,$,{get:()=>h[$],enumerable:!(s=VO(h,$))||s.enumerable})}return f},kO=(f)=>qO(L4({},"__esModule",{value:!0}),f),RB={};DO(RB,{isArrayBuffer:()=>yO});XB.exports=kO(RB);var yO=NO((f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]","isArrayBuffer")});var kw=H((g50,MB)=>{var{defineProperty:B4,getOwnPropertyDescriptor:jO,getOwnPropertyNames:OO}=Object,lO=Object.prototype.hasOwnProperty,SB=(f,h)=>B4(f,"name",{value:h,configurable:!0}),vO=(f,h)=>{for(var w in h)B4(f,w,{get:h[w],enumerable:!0})},bO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of OO(h))if(!lO.call(f,$)&&$!==w)B4(f,$,{get:()=>h[$],enumerable:!(s=jO(h,$))||s.enumerable})}return f},mO=(f)=>bO(B4({},"__esModule",{value:!0}),f),YB={};vO(YB,{fromArrayBuffer:()=>iO,fromString:()=>cO});MB.exports=mO(YB);var dO=OU(),lU=B0("node:buffer"),iO=SB((f,h=0,w=f.byteLength-h)=>{if(!dO.isArrayBuffer(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return lU.Buffer.from(f,h,w)},"fromArrayBuffer"),cO=SB((f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?lU.Buffer.from(f,h):lU.Buffer.from(f)},"fromString")});var ZB=H((QB)=>{Object.defineProperty(QB,"__esModule",{value:!0});QB.fromBase64=void 0;var gO=kw(),xO=/^[A-Za-z0-9+/]*={0,2}$/,_O=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!xO.exec(f))throw new TypeError("Invalid base64 string.");let h=gO.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};QB.fromBase64=_O});var u1=H((_50,HB)=>{var{defineProperty:G4,getOwnPropertyDescriptor:nO,getOwnPropertyNames:eO}=Object,aO=Object.prototype.hasOwnProperty,vU=(f,h)=>G4(f,"name",{value:h,configurable:!0}),pO=(f,h)=>{for(var w in h)G4(f,w,{get:h[w],enumerable:!0})},oO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of eO(h))if(!aO.call(f,$)&&$!==w)G4(f,$,{get:()=>h[$],enumerable:!(s=nO(h,$))||s.enumerable})}return f},uO=(f)=>oO(G4({},"__esModule",{value:!0}),f),JB={};pO(JB,{fromUtf8:()=>PB,toUint8Array:()=>tO,toUtf8:()=>fl});HB.exports=uO(JB);var VB=kw(),PB=vU((f)=>{let h=VB.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),tO=vU((f)=>{if(typeof f==="string")return PB(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)},"toUint8Array"),fl=vU((f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return VB.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")},"toUtf8")});var qB=H((NB)=>{Object.defineProperty(NB,"__esModule",{value:!0});NB.toBase64=void 0;var hl=kw(),wl=u1(),sl=(f)=>{let h;if(typeof f==="string")h=wl.fromUtf8(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return hl.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};NB.toBase64=sl});var Bh=H((e50,W4)=>{var{defineProperty:kB,getOwnPropertyDescriptor:$l,getOwnPropertyNames:rl}=Object,El=Object.prototype.hasOwnProperty,bU=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of rl(h))if(!El.call(f,$)&&$!==w)kB(f,$,{get:()=>h[$],enumerable:!(s=$l(h,$))||s.enumerable})}return f},yB=(f,h,w)=>(bU(f,h,"default"),w&&bU(w,h,"default")),Ul=(f)=>bU(kB({},"__esModule",{value:!0}),f),mU={};W4.exports=Ul(mU);yB(mU,ZB(),W4.exports);yB(mU,qB(),W4.exports)});var dU=H((OB)=>{Object.defineProperty(OB,"__esModule",{value:!0});OB.ChecksumStream=void 0;var Tl=Bh(),Fl=B0("node:stream");class jB extends Fl.Duplex{constructor({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$}){var r,E;super();if(typeof w.pipe==="function")this.source=w;else throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:Tl.toBase64,this.expectedChecksum=f,this.checksum=h,this.checksumSourceLocation=s,this.source.pipe(this)}_read(f){}_write(f,h,w){try{this.checksum.update(f),this.push(f)}catch(s){return w(s)}return w()}async _final(f){try{let h=await this.checksum.digest(),w=this.base64Encoder(h);if(this.expectedChecksum!==w)return f(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${w}" in response header "${this.checksumSourceLocation}".`))}catch(h){return f(h)}return this.push(null),f()}}OB.ChecksumStream=jB});var Gh=H((vB)=>{Object.defineProperty(vB,"__esModule",{value:!0});vB.isBlob=vB.isReadableStream=void 0;var Cl=(f)=>{var h;return typeof ReadableStream==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===ReadableStream.name||f instanceof ReadableStream)};vB.isReadableStream=Cl;var Il=(f)=>{var h;return typeof Blob==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===Blob.name||f instanceof Blob)};vB.isBlob=Il});var cB=H((dB)=>{Object.defineProperty(dB,"__esModule",{value:!0});dB.ChecksumStream=void 0;var Bl=typeof ReadableStream==="function"?ReadableStream:function(){};class mB extends Bl{}dB.ChecksumStream=mB});var _B=H((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});gB.createChecksumStream=void 0;var Gl=Bh(),Wl=Gh(),Al=cB(),zl=({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$})=>{var r,E;if(!Wl.isReadableStream(w))throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);let U=$!==null&&$!==void 0?$:Gl.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let T=new TransformStream({start(){},async transform(C,I){h.update(C),I.enqueue(C)},async flush(C){let I=await h.digest(),L=U(I);if(f!==L){let W=new Error(`Checksum mismatch: expected "${f}" but received "${L}" in response header "${s}".`);C.error(W)}else C.terminate()}});w.pipeThrough(T);let F=T.readable;return Object.setPrototypeOf(F,Al.ChecksumStream.prototype),F};gB.createChecksumStream=zl});var aB=H((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});nB.createChecksumStream=void 0;var Rl=Gh(),Xl=dU(),Sl=_B();function Yl(f){if(typeof ReadableStream==="function"&&Rl.isReadableStream(f.source))return Sl.createChecksumStream(f);return new Xl.ChecksumStream(f)}nB.createChecksumStream=Yl});var iU=H((oB)=>{Object.defineProperty(oB,"__esModule",{value:!0});oB.ByteArrayCollector=void 0;class pB{constructor(f){this.allocByteArray=f,this.byteLength=0,this.byteArrays=[]}push(f){this.byteArrays.push(f),this.byteLength+=f.byteLength}flush(){if(this.byteArrays.length===1){let w=this.byteArrays[0];return this.reset(),w}let f=this.allocByteArray(this.byteLength),h=0;for(let w=0;w<this.byteArrays.length;++w){let s=this.byteArrays[w];f.set(s,h),h+=s.byteLength}return this.reset(),f}reset(){this.byteArrays=[],this.byteLength=0}}oB.ByteArrayCollector=pB});var $G=H((wG)=>{Object.defineProperty(wG,"__esModule",{value:!0});wG.modeOf=wG.sizeOf=wG.flush=wG.merge=wG.createBufferedReadable=wG.createBufferedReadableStream=void 0;var Ml=iU();function tB(f,h,w){let s=f.getReader(),$=!1,r=0,E=["",new Ml.ByteArrayCollector((F)=>new Uint8Array(F))],U=-1,T=async(F)=>{let{value:C,done:I}=await s.read(),L=C;if(I){if(U!==-1){let W=A4(E,U);if(yw(W)>0)F.enqueue(W)}F.close()}else{let W=hG(L,!1);if(U!==W){if(U>=0)F.enqueue(A4(E,U));U=W}if(U===-1){F.enqueue(L);return}let X=yw(L);r+=X;let Q=yw(E[U]);if(X>=h&&Q===0)F.enqueue(L);else{let M=fG(E,U,L);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${X} is below threshold of ${h}, automatically buffering.`);if(M>=h)F.enqueue(A4(E,U));else await T(F)}}};return new ReadableStream({pull:T})}wG.createBufferedReadableStream=tB;wG.createBufferedReadable=tB;function fG(f,h,w){switch(h){case 0:return f[0]+=w,yw(f[0]);case 1:case 2:return f[h].push(w),yw(f[h])}}wG.merge=fG;function A4(f,h){switch(h){case 0:let w=f[0];return f[0]="",w;case 1:case 2:return f[h].flush()}throw new Error(`@smithy/util-stream - invalid index ${h} given to flush()`)}wG.flush=A4;function yw(f){var h,w;return(w=(h=f===null||f===void 0?void 0:f.byteLength)!==null&&h!==void 0?h:f===null||f===void 0?void 0:f.length)!==null&&w!==void 0?w:0}wG.sizeOf=yw;function hG(f,h=!0){if(h&&typeof Buffer!=="undefined"&&f instanceof Buffer)return 2;if(f instanceof Uint8Array)return 1;if(typeof f==="string")return 0;return-1}wG.modeOf=hG});var TG=H((EG)=>{Object.defineProperty(EG,"__esModule",{value:!0});EG.createBufferedReadable=void 0;var Pl=B0("node:stream"),rG=iU(),mf=$G(),Hl=Gh();function Nl(f,h,w){if(Hl.isReadableStream(f))return mf.createBufferedReadableStream(f,h,w);let s=new Pl.Readable({read(){}}),$=!1,r=0,E=["",new rG.ByteArrayCollector((T)=>new Uint8Array(T)),new rG.ByteArrayCollector((T)=>Buffer.from(new Uint8Array(T)))],U=-1;return f.on("data",(T)=>{let F=mf.modeOf(T,!0);if(U!==F){if(U>=0)s.push(mf.flush(E,U));U=F}if(U===-1){s.push(T);return}let C=mf.sizeOf(T);r+=C;let I=mf.sizeOf(E[U]);if(C>=h&&I===0)s.push(T);else{let L=mf.merge(E,U,T);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${h}, automatically buffering.`);if(L>=h)s.push(mf.flush(E,U))}}),f.on("end",()=>{if(U!==-1){let T=mf.flush(E,U);if(mf.sizeOf(T)>0)s.push(T)}s.push(null)}),s}EG.createBufferedReadable=Nl});var IG=H((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.getAwsChunkedEncodingStream=void 0;var Dl=B0("node:stream"),ql=(f,h)=>{let{base64Encoder:w,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:r,streamHasher:E}=h,U=w!==void 0&&$!==void 0&&r!==void 0&&E!==void 0,T=U?E($,f):void 0,F=new Dl.Readable({read:()=>{}});return f.on("data",(C)=>{let I=s(C)||0;F.push(`${I.toString(16)}\r
2
+ var Pj=Object.create;var{getPrototypeOf:Hj,defineProperty:kU,getOwnPropertyNames:Nj}=Object;var Dj=Object.prototype.hasOwnProperty;var p=(f,h,w)=>{w=f!=null?Pj(Hj(f)):{};let s=h||!f||!f.__esModule?kU(w,"default",{value:f,enumerable:!0}):w;for(let $ of Nj(f))if(!Dj.call(s,$))kU(s,$,{get:()=>f[$],enumerable:!0});return s};var H=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Ch=(f,h)=>{for(var w in h)kU(f,w,{get:h[w],enumerable:!0,configurable:!0,set:(s)=>h[w]=()=>s})};var B=(f,h)=>()=>(f&&(h=f(f=0)),h);var B0=import.meta.require;var Zw=(f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},Jw=(f)=>{return{httpHandler:f.httpHandler()}};var iL=()=>{};var F1=H((Lr0,oL)=>{var{defineProperty:f5,getOwnPropertyDescriptor:qj,getOwnPropertyNames:kj}=Object,yj=Object.prototype.hasOwnProperty,h5=(f,h)=>f5(f,"name",{value:h,configurable:!0}),jj=(f,h)=>{for(var w in h)f5(f,w,{get:h[w],enumerable:!0})},Oj=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of kj(h))if(!yj.call(f,$)&&$!==w)f5(f,$,{get:()=>h[$],enumerable:!(s=qj(h,$))||s.enumerable})}return f},lj=(f)=>Oj(f5({},"__esModule",{value:!0}),f),cL={};jj(cL,{AlgorithmId:()=>nL,EndpointURLScheme:()=>_L,FieldPosition:()=>eL,HttpApiKeyAuthLocation:()=>xL,HttpAuthLocation:()=>gL,IniSectionType:()=>aL,RequestHandlerProtocol:()=>pL,SMITHY_CONTEXT_KEY:()=>ij,getDefaultClientConfiguration:()=>mj,resolveDefaultRuntimeConfig:()=>dj});oL.exports=lj(cL);var gL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(gL||{}),xL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(xL||{}),_L=((f)=>{return f.HTTP="http",f.HTTPS="https",f})(_L||{}),nL=((f)=>{return f.MD5="md5",f.CRC32="crc32",f.CRC32C="crc32c",f.SHA1="sha1",f.SHA256="sha256",f})(nL||{}),vj=h5((f)=>{let h=[];if(f.sha256!==void 0)h.push({algorithmId:()=>"sha256",checksumConstructor:()=>f.sha256});if(f.md5!=null)h.push({algorithmId:()=>"md5",checksumConstructor:()=>f.md5});return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),bj=h5((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),mj=h5((f)=>{return vj(f)},"getDefaultClientConfiguration"),dj=h5((f)=>{return bj(f)},"resolveDefaultRuntimeConfig"),eL=((f)=>{return f[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",f})(eL||{}),ij="__smithy_context",aL=((f)=>{return f.PROFILE="profile",f.SSO_SESSION="sso-session",f.SERVICES="services",f})(aL||{}),pL=((f)=>{return f.HTTP_0_9="http/0.9",f.HTTP_1_0="http/1.0",f.TDS_8_0="tds/8.0",f})(pL||{})});var cj;var uL=B(()=>{cj=p(F1(),1)});var tL=()=>{};class n0{constructor(f){this.method=f.method||"GET",this.hostname=f.hostname||"localhost",this.port=f.port,this.query=f.query||{},this.headers=f.headers||{},this.body=f.body,this.protocol=f.protocol?f.protocol.slice(-1)!==":"?`${f.protocol}:`:f.protocol:"https:",this.path=f.path?f.path.charAt(0)!=="/"?`/${f.path}`:f.path:"/",this.username=f.username,this.password=f.password,this.fragment=f.fragment}static clone(f){let h=new n0({...f,headers:{...f.headers}});if(h.query)h.query=gj(h.query);return h}static isInstance(f){if(!f)return!1;let h=f;return"method"in h&&"protocol"in h&&"hostname"in h&&"path"in h&&typeof h.query==="object"&&typeof h.headers==="object"}clone(){return n0.clone(this)}}function gj(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}class xh{constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}}var fB=()=>{};var C1=B(()=>{iL();uL();tL();fB()});function Vw(f){return f}var xj=(f)=>(h)=>async(w)=>{if(!n0.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},_j,Pw=(f)=>({applyToStack:(h)=>{h.add(xj(f),_j)}});var w5=B(()=>{C1();_j={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var nj=()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...W}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(W),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},ej,Hw=(f)=>({applyToStack:(h)=>{h.add(nj(),ej)}});var hB=B(()=>{ej={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var s5=B(()=>{hB()});var yU="X-Amzn-Trace-Id",aj="AWS_LAMBDA_FUNCTION_NAME",pj="_X_AMZN_TRACE_ID",oj=(f)=>(h)=>async(w)=>{let{request:s}=w;if(!n0.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===yU.toLowerCase())??yU;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[aj],E=process.env[pj],U=(T)=>typeof T==="string"&&T.length>0;if(U(r)&&U(E))s.headers[yU]=E;return h({...w,request:s})},uj,Nw=(f)=>({applyToStack:(h)=>{h.add(oj(f),uj)}});var $5=B(()=>{C1();uj={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var Ih=H((yr0,rB)=>{var{defineProperty:r5,getOwnPropertyDescriptor:tj,getOwnPropertyNames:fO}=Object,hO=Object.prototype.hasOwnProperty,sB=(f,h)=>r5(f,"name",{value:h,configurable:!0}),wO=(f,h)=>{for(var w in h)r5(f,w,{get:h[w],enumerable:!0})},sO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of fO(h))if(!hO.call(f,$)&&$!==w)r5(f,$,{get:()=>h[$],enumerable:!(s=tj(h,$))||s.enumerable})}return f},$O=(f)=>sO(r5({},"__esModule",{value:!0}),f),$B={};wO($B,{getSmithyContext:()=>rO,normalizeProvider:()=>EO});rB.exports=$O($B);var wB=F1(),rO=sB((f)=>f[wB.SMITHY_CONTEXT_KEY]||(f[wB.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),EO=sB((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider")});var Dw=H((jr0,LB)=>{var{defineProperty:E5,getOwnPropertyDescriptor:UO,getOwnPropertyNames:TO}=Object,FO=Object.prototype.hasOwnProperty,jU=(f,h)=>E5(f,"name",{value:h,configurable:!0}),CO=(f,h)=>{for(var w in h)E5(f,w,{get:h[w],enumerable:!0})},IO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of TO(h))if(!FO.call(f,$)&&$!==w)E5(f,$,{get:()=>h[$],enumerable:!(s=UO(h,$))||s.enumerable})}return f},LO=(f)=>IO(E5({},"__esModule",{value:!0}),f),EB={};CO(EB,{deserializerMiddleware:()=>UB,deserializerMiddlewareOption:()=>FB,getSerdePlugin:()=>IB,serializerMiddleware:()=>TB,serializerMiddlewareOption:()=>CB});LB.exports=LO(EB);var UB=jU((f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
3
+ Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),TB=jU((f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})},"serializerMiddleware"),FB={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},CB={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function IB(f,h,w){return{applyToStack:(s)=>{s.add(UB(f,w),FB),s.add(TB(f,h),CB)}}}jU(IB,"getSerdePlugin")});var t0=H((Or0,AB)=>{var{defineProperty:U5,getOwnPropertyDescriptor:BO,getOwnPropertyNames:GO}=Object,WO=Object.prototype.hasOwnProperty,Lh=(f,h)=>U5(f,"name",{value:h,configurable:!0}),zO=(f,h)=>{for(var w in h)U5(f,w,{get:h[w],enumerable:!0})},AO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of GO(h))if(!WO.call(f,$)&&$!==w)U5(f,$,{get:()=>h[$],enumerable:!(s=BO(h,$))||s.enumerable})}return f},RO=(f)=>AO(U5({},"__esModule",{value:!0}),f),BB={};zO(BB,{Field:()=>YO,Fields:()=>MO,HttpRequest:()=>QO,HttpResponse:()=>KO,IHttpRequest:()=>GB.HttpRequest,getHttpHandlerExtensionConfiguration:()=>XO,isValidHostname:()=>zB,resolveHttpHandlerRuntimeConfig:()=>SO});AB.exports=RO(BB);var XO=Lh((f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),SO=Lh((f)=>{return{httpHandler:f.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),GB=F1(),YO=class{static{Lh(this,"Field")}constructor({name:f,kind:h=GB.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=h,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((h)=>h!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}},MO=class{constructor({fields:f=[],encoding:h="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=h}static{Lh(this,"Fields")}setField(f){this.entries[f.name.toLowerCase()]=f}getField(f){return this.entries[f.toLowerCase()]}removeField(f){delete this.entries[f.toLowerCase()]}getByType(f){return Object.values(this.entries).filter((h)=>h.kind===f)}},QO=class f{static{Lh(this,"HttpRequest")}constructor(h){this.method=h.method||"GET",this.hostname=h.hostname||"localhost",this.port=h.port,this.query=h.query||{},this.headers=h.headers||{},this.body=h.body,this.protocol=h.protocol?h.protocol.slice(-1)!==":"?`${h.protocol}:`:h.protocol:"https:",this.path=h.path?h.path.charAt(0)!=="/"?`/${h.path}`:h.path:"/",this.username=h.username,this.password=h.password,this.fragment=h.fragment}static clone(h){let w=new f({...h,headers:{...h.headers}});if(w.query)w.query=WB(w.query);return w}static isInstance(h){if(!h)return!1;let w=h;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return f.clone(this)}};function WB(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}Lh(WB,"cloneQuery");var KO=class{static{Lh(this,"HttpResponse")}constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}};function zB(f){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(f)}Lh(zB,"isValidHostname")});var OU=H((mr0,XB)=>{var{defineProperty:T5,getOwnPropertyDescriptor:ZO,getOwnPropertyNames:JO}=Object,VO=Object.prototype.hasOwnProperty,PO=(f,h)=>T5(f,"name",{value:h,configurable:!0}),HO=(f,h)=>{for(var w in h)T5(f,w,{get:h[w],enumerable:!0})},NO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of JO(h))if(!VO.call(f,$)&&$!==w)T5(f,$,{get:()=>h[$],enumerable:!(s=ZO(h,$))||s.enumerable})}return f},DO=(f)=>NO(T5({},"__esModule",{value:!0}),f),RB={};HO(RB,{isArrayBuffer:()=>qO});XB.exports=DO(RB);var qO=PO((f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]","isArrayBuffer")});var qw=H((dr0,MB)=>{var{defineProperty:F5,getOwnPropertyDescriptor:kO,getOwnPropertyNames:yO}=Object,jO=Object.prototype.hasOwnProperty,SB=(f,h)=>F5(f,"name",{value:h,configurable:!0}),OO=(f,h)=>{for(var w in h)F5(f,w,{get:h[w],enumerable:!0})},lO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yO(h))if(!jO.call(f,$)&&$!==w)F5(f,$,{get:()=>h[$],enumerable:!(s=kO(h,$))||s.enumerable})}return f},vO=(f)=>lO(F5({},"__esModule",{value:!0}),f),YB={};OO(YB,{fromArrayBuffer:()=>mO,fromString:()=>dO});MB.exports=vO(YB);var bO=OU(),lU=B0("node:buffer"),mO=SB((f,h=0,w=f.byteLength-h)=>{if(!bO.isArrayBuffer(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return lU.Buffer.from(f,h,w)},"fromArrayBuffer"),dO=SB((f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?lU.Buffer.from(f,h):lU.Buffer.from(f)},"fromString")});var ZB=H((QB)=>{Object.defineProperty(QB,"__esModule",{value:!0});QB.fromBase64=void 0;var iO=qw(),cO=/^[A-Za-z0-9+/]*={0,2}$/,gO=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!cO.exec(f))throw new TypeError("Invalid base64 string.");let h=iO.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};QB.fromBase64=gO});var u1=H((cr0,HB)=>{var{defineProperty:C5,getOwnPropertyDescriptor:xO,getOwnPropertyNames:_O}=Object,nO=Object.prototype.hasOwnProperty,vU=(f,h)=>C5(f,"name",{value:h,configurable:!0}),eO=(f,h)=>{for(var w in h)C5(f,w,{get:h[w],enumerable:!0})},aO=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of _O(h))if(!nO.call(f,$)&&$!==w)C5(f,$,{get:()=>h[$],enumerable:!(s=xO(h,$))||s.enumerable})}return f},pO=(f)=>aO(C5({},"__esModule",{value:!0}),f),JB={};eO(JB,{fromUtf8:()=>PB,toUint8Array:()=>oO,toUtf8:()=>uO});HB.exports=pO(JB);var VB=qw(),PB=vU((f)=>{let h=VB.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),oO=vU((f)=>{if(typeof f==="string")return PB(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)},"toUint8Array"),uO=vU((f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return VB.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")},"toUtf8")});var qB=H((NB)=>{Object.defineProperty(NB,"__esModule",{value:!0});NB.toBase64=void 0;var tO=qw(),fl=u1(),hl=(f)=>{let h;if(typeof f==="string")h=fl.fromUtf8(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return tO.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};NB.toBase64=hl});var t1=H((xr0,I5)=>{var{defineProperty:kB,getOwnPropertyDescriptor:wl,getOwnPropertyNames:sl}=Object,$l=Object.prototype.hasOwnProperty,bU=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sl(h))if(!$l.call(f,$)&&$!==w)kB(f,$,{get:()=>h[$],enumerable:!(s=wl(h,$))||s.enumerable})}return f},yB=(f,h,w)=>(bU(f,h,"default"),w&&bU(w,h,"default")),rl=(f)=>bU(kB({},"__esModule",{value:!0}),f),mU={};I5.exports=rl(mU);yB(mU,ZB(),I5.exports);yB(mU,qB(),I5.exports)});var dU=H((OB)=>{Object.defineProperty(OB,"__esModule",{value:!0});OB.ChecksumStream=void 0;var El=t1(),Ul=B0("node:stream");class jB extends Ul.Duplex{constructor({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$}){var r,E;super();if(typeof w.pipe==="function")this.source=w;else throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:El.toBase64,this.expectedChecksum=f,this.checksum=h,this.checksumSourceLocation=s,this.source.pipe(this)}_read(f){}_write(f,h,w){try{this.checksum.update(f),this.push(f)}catch(s){return w(s)}return w()}async _final(f){try{let h=await this.checksum.digest(),w=this.base64Encoder(h);if(this.expectedChecksum!==w)return f(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${w}" in response header "${this.checksumSourceLocation}".`))}catch(h){return f(h)}return this.push(null),f()}}OB.ChecksumStream=jB});var Bh=H((vB)=>{Object.defineProperty(vB,"__esModule",{value:!0});vB.isBlob=vB.isReadableStream=void 0;var Tl=(f)=>{var h;return typeof ReadableStream==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===ReadableStream.name||f instanceof ReadableStream)};vB.isReadableStream=Tl;var Fl=(f)=>{var h;return typeof Blob==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===Blob.name||f instanceof Blob)};vB.isBlob=Fl});var cB=H((dB)=>{Object.defineProperty(dB,"__esModule",{value:!0});dB.ChecksumStream=void 0;var Il=typeof ReadableStream==="function"?ReadableStream:function(){};class mB extends Il{}dB.ChecksumStream=mB});var _B=H((gB)=>{Object.defineProperty(gB,"__esModule",{value:!0});gB.createChecksumStream=void 0;var Ll=t1(),Bl=Bh(),Gl=cB(),Wl=({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$})=>{var r,E;if(!Bl.isReadableStream(w))throw new Error(`@smithy/util-stream: unsupported source type ${(E=(r=w===null||w===void 0?void 0:w.constructor)===null||r===void 0?void 0:r.name)!==null&&E!==void 0?E:w} in ChecksumStream.`);let U=$!==null&&$!==void 0?$:Ll.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let T=new TransformStream({start(){},async transform(C,I){h.update(C),I.enqueue(C)},async flush(C){let I=await h.digest(),L=U(I);if(f!==L){let W=new Error(`Checksum mismatch: expected "${f}" but received "${L}" in response header "${s}".`);C.error(W)}else C.terminate()}});w.pipeThrough(T);let F=T.readable;return Object.setPrototypeOf(F,Gl.ChecksumStream.prototype),F};gB.createChecksumStream=Wl});var aB=H((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});nB.createChecksumStream=void 0;var zl=Bh(),Al=dU(),Rl=_B();function Xl(f){if(typeof ReadableStream==="function"&&zl.isReadableStream(f.source))return Rl.createChecksumStream(f);return new Al.ChecksumStream(f)}nB.createChecksumStream=Xl});var iU=H((oB)=>{Object.defineProperty(oB,"__esModule",{value:!0});oB.ByteArrayCollector=void 0;class pB{constructor(f){this.allocByteArray=f,this.byteLength=0,this.byteArrays=[]}push(f){this.byteArrays.push(f),this.byteLength+=f.byteLength}flush(){if(this.byteArrays.length===1){let w=this.byteArrays[0];return this.reset(),w}let f=this.allocByteArray(this.byteLength),h=0;for(let w=0;w<this.byteArrays.length;++w){let s=this.byteArrays[w];f.set(s,h),h+=s.byteLength}return this.reset(),f}reset(){this.byteArrays=[],this.byteLength=0}}oB.ByteArrayCollector=pB});var $G=H((wG)=>{Object.defineProperty(wG,"__esModule",{value:!0});wG.modeOf=wG.sizeOf=wG.flush=wG.merge=wG.createBufferedReadable=wG.createBufferedReadableStream=void 0;var Sl=iU();function tB(f,h,w){let s=f.getReader(),$=!1,r=0,E=["",new Sl.ByteArrayCollector((F)=>new Uint8Array(F))],U=-1,T=async(F)=>{let{value:C,done:I}=await s.read(),L=C;if(I){if(U!==-1){let W=L5(E,U);if(kw(W)>0)F.enqueue(W)}F.close()}else{let W=hG(L,!1);if(U!==W){if(U>=0)F.enqueue(L5(E,U));U=W}if(U===-1){F.enqueue(L);return}let X=kw(L);r+=X;let Q=kw(E[U]);if(X>=h&&Q===0)F.enqueue(L);else{let M=fG(E,U,L);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${X} is below threshold of ${h}, automatically buffering.`);if(M>=h)F.enqueue(L5(E,U));else await T(F)}}};return new ReadableStream({pull:T})}wG.createBufferedReadableStream=tB;wG.createBufferedReadable=tB;function fG(f,h,w){switch(h){case 0:return f[0]+=w,kw(f[0]);case 1:case 2:return f[h].push(w),kw(f[h])}}wG.merge=fG;function L5(f,h){switch(h){case 0:let w=f[0];return f[0]="",w;case 1:case 2:return f[h].flush()}throw new Error(`@smithy/util-stream - invalid index ${h} given to flush()`)}wG.flush=L5;function kw(f){var h,w;return(w=(h=f===null||f===void 0?void 0:f.byteLength)!==null&&h!==void 0?h:f===null||f===void 0?void 0:f.length)!==null&&w!==void 0?w:0}wG.sizeOf=kw;function hG(f,h=!0){if(h&&typeof Buffer!=="undefined"&&f instanceof Buffer)return 2;if(f instanceof Uint8Array)return 1;if(typeof f==="string")return 0;return-1}wG.modeOf=hG});var TG=H((EG)=>{Object.defineProperty(EG,"__esModule",{value:!0});EG.createBufferedReadable=void 0;var Jl=B0("node:stream"),rG=iU(),mf=$G(),Vl=Bh();function Pl(f,h,w){if(Vl.isReadableStream(f))return mf.createBufferedReadableStream(f,h,w);let s=new Jl.Readable({read(){}}),$=!1,r=0,E=["",new rG.ByteArrayCollector((T)=>new Uint8Array(T)),new rG.ByteArrayCollector((T)=>Buffer.from(new Uint8Array(T)))],U=-1;return f.on("data",(T)=>{let F=mf.modeOf(T,!0);if(U!==F){if(U>=0)s.push(mf.flush(E,U));U=F}if(U===-1){s.push(T);return}let C=mf.sizeOf(T);r+=C;let I=mf.sizeOf(E[U]);if(C>=h&&I===0)s.push(T);else{let L=mf.merge(E,U,T);if(!$&&r>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${h}, automatically buffering.`);if(L>=h)s.push(mf.flush(E,U))}}),f.on("end",()=>{if(U!==-1){let T=mf.flush(E,U);if(mf.sizeOf(T)>0)s.push(T)}s.push(null)}),s}EG.createBufferedReadable=Pl});var IG=H((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.getAwsChunkedEncodingStream=void 0;var Hl=B0("node:stream"),Nl=(f,h)=>{let{base64Encoder:w,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:r,streamHasher:E}=h,U=w!==void 0&&$!==void 0&&r!==void 0&&E!==void 0,T=U?E($,f):void 0,F=new Hl.Readable({read:()=>{}});return f.on("data",(C)=>{let I=s(C)||0;F.push(`${I.toString(16)}\r
4
4
  `),F.push(C),F.push(`\r
5
5
  `)}),f.on("end",async()=>{if(F.push(`0\r
6
6
  `),U){let C=w(await T);F.push(`${r}:${C}\r
7
7
  `),F.push(`\r
8
- `)}F.push(null)}),F};FG.getAwsChunkedEncodingStream=ql});var GG=H((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.headStream=void 0;async function kl(f,h){var w;let s=0,$=[],r=f.getReader(),E=!1;while(!E){let{done:F,value:C}=await r.read();if(C)$.push(C),s+=(w=C===null||C===void 0?void 0:C.byteLength)!==null&&w!==void 0?w:0;if(s>=h)break;E=F}r.releaseLock();let U=new Uint8Array(Math.min(h,s)),T=0;for(let F of $){if(F.byteLength>U.byteLength-T){U.set(F.subarray(0,U.byteLength-T),T);break}else U.set(F,T);T+=F.length}return U}LG.headStream=kl});var RG=H((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.headStream=void 0;var yl=B0("node:stream"),jl=GG(),Ol=Gh(),ll=(f,h)=>{if(Ol.isReadableStream(f))return jl.headStream(f,h);return new Promise((w,s)=>{let $=new WG;$.limit=h,f.pipe($),f.on("error",(r)=>{$.end(),s(r)}),$.on("error",s),$.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.buffers));w(r)})})};AG.headStream=ll;class WG extends yl.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(f,h,w){var s;if(this.buffers.push(f),this.bytesBuffered+=(s=f.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,r=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=r.subarray(0,r.byteLength-$),this.emit("finish")}w()}}});var gU=H((EE0,YG)=>{var{defineProperty:z4,getOwnPropertyDescriptor:vl,getOwnPropertyNames:bl}=Object,ml=Object.prototype.hasOwnProperty,cU=(f,h)=>z4(f,"name",{value:h,configurable:!0}),dl=(f,h)=>{for(var w in h)z4(f,w,{get:h[w],enumerable:!0})},il=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of bl(h))if(!ml.call(f,$)&&$!==w)z4(f,$,{get:()=>h[$],enumerable:!(s=vl(h,$))||s.enumerable})}return f},cl=(f)=>il(z4({},"__esModule",{value:!0}),f),XG={};dl(XG,{escapeUri:()=>SG,escapeUriPath:()=>xl});YG.exports=cl(XG);var SG=cU((f)=>encodeURIComponent(f).replace(/[!'()*]/g,gl),"escapeUri"),gl=cU((f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),xl=cU((f)=>f.split("/").map(SG).join("/"),"escapeUriPath")});var _U=H((UE0,KG)=>{var{defineProperty:R4,getOwnPropertyDescriptor:_l,getOwnPropertyNames:nl}=Object,el=Object.prototype.hasOwnProperty,al=(f,h)=>R4(f,"name",{value:h,configurable:!0}),pl=(f,h)=>{for(var w in h)R4(f,w,{get:h[w],enumerable:!0})},ol=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of nl(h))if(!el.call(f,$)&&$!==w)R4(f,$,{get:()=>h[$],enumerable:!(s=_l(h,$))||s.enumerable})}return f},ul=(f)=>ol(R4({},"__esModule",{value:!0}),f),MG={};pl(MG,{buildQueryString:()=>QG});KG.exports=ul(MG);var xU=gU();function QG(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=xU.escapeUri(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${xU.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${xU.escapeUri(s)}`;h.push($)}}return h.join("&")}al(QG,"buildQueryString")});var X4=H((TE0,vG)=>{var{create:tl,defineProperty:Z$,getOwnPropertyDescriptor:fv,getOwnPropertyNames:hv,getPrototypeOf:wv}=Object,sv=Object.prototype.hasOwnProperty,K0=(f,h)=>Z$(f,"name",{value:h,configurable:!0}),$v=(f,h)=>{for(var w in h)Z$(f,w,{get:h[w],enumerable:!0})},HG=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of hv(h))if(!sv.call(f,$)&&$!==w)Z$(f,$,{get:()=>h[$],enumerable:!(s=fv(h,$))||s.enumerable})}return f},rv=(f,h,w)=>(w=f!=null?tl(wv(f)):{},HG(h||!f||!f.__esModule?Z$(w,"default",{value:f,enumerable:!0}):w,f)),Ev=(f)=>HG(Z$({},"__esModule",{value:!0}),f),NG={};$v(NG,{DEFAULT_REQUEST_TIMEOUT:()=>OG,NodeHttp2Handler:()=>Av,NodeHttpHandler:()=>Lv,streamCollector:()=>Rv});vG.exports=Ev(NG);var DG=t0(),qG=_U(),nU=B0("node:http"),eU=B0("node:https"),Uv=["ECONNRESET","EPIPE","ETIMEDOUT"],kG=K0((f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h},"getTransformedHeaders"),R1={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)},ZG=1000,Tv=K0((f,h,w=0)=>{if(!w)return-1;let s=K0(($)=>{let r=R1.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=K0((U)=>{if(U?.connecting)U.on("connect",()=>{R1.clearTimeout(r)});else R1.clearTimeout(r)},"doWithSocket");if(f.socket)E(f.socket);else f.on("socket",E)},"registerTimeout");if(w<2000)return s(0),0;return R1.setTimeout(s.bind(null,ZG),ZG)},"setConnectionTimeout"),Fv=3000,Cv=K0((f,{keepAlive:h,keepAliveMsecs:w},s=Fv)=>{if(h!==!0)return-1;let $=K0(()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})},"registerListener");if(s===0)return $(),0;return R1.setTimeout($,s)},"setSocketKeepAlive"),JG=3000,Iv=K0((f,h,w=OG)=>{let s=K0(($)=>{let r=w-$,E=K0(()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))},"onTimeout");if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)},"registerTimeout");if(0<w&&w<6000)return s(0),0;return R1.setTimeout(s.bind(null,w===0?0:JG),JG)},"setSocketTimeout"),yG=B0("node:stream"),VG=6000;async function aU(f,h,w=VG){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(R1.setTimeout(()=>U(!0),Math.max(VG,w)))}),new Promise((U)=>{f.on("continue",()=>{R1.clearTimeout(r),U(!0)}),f.on("response",()=>{R1.clearTimeout(r),U(!1)}),f.on("error",()=>{R1.clearTimeout(r),U(!1)})})]);if(E)jG(f,h.body)}K0(aU,"writeRequestBody");function jG(f,h){if(h instanceof yG.Readable){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}K0(jG,"writeBody");var OG=0,Lv=class f{constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w(this.resolveDefaultConfig($))}).catch(s);else w(this.resolveDefaultConfig(h))})}static{K0(this,"NodeHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}static checkSocketUsage(h,w,s=console){let{sockets:$,requests:r,maxSockets:E}=h;if(typeof E!=="number"||E===1/0)return w;let U=15000;if(Date.now()-U<w)return w;if($&&r)for(let T in $){let F=$[T]?.length??0,C=r[T]?.length??0;if(F>=E&&C>=2*E)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${C} additional requests are enqueued.
8
+ `)}F.push(null)}),F};FG.getAwsChunkedEncodingStream=Nl});var GG=H((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.headStream=void 0;async function Dl(f,h){var w;let s=0,$=[],r=f.getReader(),E=!1;while(!E){let{done:F,value:C}=await r.read();if(C)$.push(C),s+=(w=C===null||C===void 0?void 0:C.byteLength)!==null&&w!==void 0?w:0;if(s>=h)break;E=F}r.releaseLock();let U=new Uint8Array(Math.min(h,s)),T=0;for(let F of $){if(F.byteLength>U.byteLength-T){U.set(F.subarray(0,U.byteLength-T),T);break}else U.set(F,T);T+=F.length}return U}LG.headStream=Dl});var RG=H((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.headStream=void 0;var ql=B0("node:stream"),kl=GG(),yl=Bh(),jl=(f,h)=>{if(yl.isReadableStream(f))return kl.headStream(f,h);return new Promise((w,s)=>{let $=new WG;$.limit=h,f.pipe($),f.on("error",(r)=>{$.end(),s(r)}),$.on("error",s),$.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.buffers));w(r)})})};zG.headStream=jl;class WG extends ql.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(f,h,w){var s;if(this.buffers.push(f),this.bytesBuffered+=(s=f.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,r=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=r.subarray(0,r.byteLength-$),this.emit("finish")}w()}}});var gU=H((sE0,YG)=>{var{defineProperty:B5,getOwnPropertyDescriptor:Ol,getOwnPropertyNames:ll}=Object,vl=Object.prototype.hasOwnProperty,cU=(f,h)=>B5(f,"name",{value:h,configurable:!0}),bl=(f,h)=>{for(var w in h)B5(f,w,{get:h[w],enumerable:!0})},ml=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ll(h))if(!vl.call(f,$)&&$!==w)B5(f,$,{get:()=>h[$],enumerable:!(s=Ol(h,$))||s.enumerable})}return f},dl=(f)=>ml(B5({},"__esModule",{value:!0}),f),XG={};bl(XG,{escapeUri:()=>SG,escapeUriPath:()=>cl});YG.exports=dl(XG);var SG=cU((f)=>encodeURIComponent(f).replace(/[!'()*]/g,il),"escapeUri"),il=cU((f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),cl=cU((f)=>f.split("/").map(SG).join("/"),"escapeUriPath")});var _U=H(($E0,KG)=>{var{defineProperty:G5,getOwnPropertyDescriptor:gl,getOwnPropertyNames:xl}=Object,_l=Object.prototype.hasOwnProperty,nl=(f,h)=>G5(f,"name",{value:h,configurable:!0}),el=(f,h)=>{for(var w in h)G5(f,w,{get:h[w],enumerable:!0})},al=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of xl(h))if(!_l.call(f,$)&&$!==w)G5(f,$,{get:()=>h[$],enumerable:!(s=gl(h,$))||s.enumerable})}return f},pl=(f)=>al(G5({},"__esModule",{value:!0}),f),MG={};el(MG,{buildQueryString:()=>QG});KG.exports=pl(MG);var xU=gU();function QG(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=xU.escapeUri(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${xU.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${xU.escapeUri(s)}`;h.push($)}}return h.join("&")}nl(QG,"buildQueryString")});var W5=H((rE0,vG)=>{var{create:ol,defineProperty:X$,getOwnPropertyDescriptor:ul,getOwnPropertyNames:tl,getPrototypeOf:fv}=Object,hv=Object.prototype.hasOwnProperty,K0=(f,h)=>X$(f,"name",{value:h,configurable:!0}),wv=(f,h)=>{for(var w in h)X$(f,w,{get:h[w],enumerable:!0})},HG=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of tl(h))if(!hv.call(f,$)&&$!==w)X$(f,$,{get:()=>h[$],enumerable:!(s=ul(h,$))||s.enumerable})}return f},sv=(f,h,w)=>(w=f!=null?ol(fv(f)):{},HG(h||!f||!f.__esModule?X$(w,"default",{value:f,enumerable:!0}):w,f)),$v=(f)=>HG(X$({},"__esModule",{value:!0}),f),NG={};wv(NG,{DEFAULT_REQUEST_TIMEOUT:()=>OG,NodeHttp2Handler:()=>Gv,NodeHttpHandler:()=>Cv,streamCollector:()=>zv});vG.exports=$v(NG);var DG=t0(),qG=_U(),nU=B0("node:http"),eU=B0("node:https"),rv=["ECONNRESET","EPIPE","ETIMEDOUT"],kG=K0((f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h},"getTransformedHeaders"),R1={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)},ZG=1000,Ev=K0((f,h,w=0)=>{if(!w)return-1;let s=K0(($)=>{let r=R1.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=K0((U)=>{if(U?.connecting)U.on("connect",()=>{R1.clearTimeout(r)});else R1.clearTimeout(r)},"doWithSocket");if(f.socket)E(f.socket);else f.on("socket",E)},"registerTimeout");if(w<2000)return s(0),0;return R1.setTimeout(s.bind(null,ZG),ZG)},"setConnectionTimeout"),Uv=3000,Tv=K0((f,{keepAlive:h,keepAliveMsecs:w},s=Uv)=>{if(h!==!0)return-1;let $=K0(()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})},"registerListener");if(s===0)return $(),0;return R1.setTimeout($,s)},"setSocketKeepAlive"),JG=3000,Fv=K0((f,h,w=OG)=>{let s=K0(($)=>{let r=w-$,E=K0(()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))},"onTimeout");if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)},"registerTimeout");if(0<w&&w<6000)return s(0),0;return R1.setTimeout(s.bind(null,w===0?0:JG),JG)},"setSocketTimeout"),yG=B0("node:stream"),VG=6000;async function aU(f,h,w=VG){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(R1.setTimeout(()=>U(!0),Math.max(VG,w)))}),new Promise((U)=>{f.on("continue",()=>{R1.clearTimeout(r),U(!0)}),f.on("response",()=>{R1.clearTimeout(r),U(!1)}),f.on("error",()=>{R1.clearTimeout(r),U(!1)})})]);if(E)jG(f,h.body)}K0(aU,"writeRequestBody");function jG(f,h){if(h instanceof yG.Readable){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}K0(jG,"writeBody");var OG=0,Cv=class f{constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w(this.resolveDefaultConfig($))}).catch(s);else w(this.resolveDefaultConfig(h))})}static{K0(this,"NodeHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}static checkSocketUsage(h,w,s=console){let{sockets:$,requests:r,maxSockets:E}=h;if(typeof E!=="number"||E===1/0)return w;let U=15000;if(Date.now()-U<w)return w;if($&&r)for(let T in $){let F=$[T]?.length??0,C=r[T]?.length??0;if(F>=E&&C>=2*E)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${C} additional requests are enqueued.
9
9
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
10
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:r,httpAgent:E,httpsAgent:U}=h||{},T=!0,F=50;return{connectionTimeout:s,requestTimeout:w??$,socketAcquisitionWarningTimeout:r,httpAgent:(()=>{if(E instanceof nU.Agent||typeof E?.destroy==="function")return E;return new nU.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(U instanceof eU.Agent||typeof U?.destroy==="function")return U;return new eU.Agent({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let r=void 0,E=[],U=K0(async(y)=>{await r,E.forEach(R1.clearTimeout),s(y)},"resolve"),T=K0(async(y)=>{await r,E.forEach(R1.clearTimeout),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let y=new Error("Request aborted");y.name="AbortError",T(y);return}let F=h.protocol==="https:",C=F?this.config.httpsAgent:this.config.httpAgent;E.push(R1.setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=qG.buildQueryString(h.query||{}),L=void 0;if(h.username!=null||h.password!=null){let y=h.username??"",n=h.password??"";L=`${y}:${n}`}let W=h.path;if(I)W+=`?${I}`;if(h.fragment)W+=`#${h.fragment}`;let X=h.hostname??"";if(X[0]==="["&&X.endsWith("]"))X=h.hostname.slice(1,-1);else X=h.hostname;let Q={headers:h.headers,host:X,method:h.method,path:W,port:h.port,agent:C,auth:L},q=(F?eU.request:nU.request)(Q,(y)=>{let n=new DG.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:kG(y.headers),body:y});U({response:n})});if(q.on("error",(y)=>{if(Uv.includes(y.code))T(Object.assign(y,{name:"TimeoutError"}));else T(y)}),w){let y=K0(()=>{q.destroy();let n=new Error("Request aborted");n.name="AbortError",T(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),q.once("close",()=>n.removeEventListener("abort",y))}else w.onabort=y}E.push(Tv(q,T,this.config.connectionTimeout)),E.push(Iv(q,T,this.config.requestTimeout));let N=Q.agent;if(typeof N==="object"&&"keepAlive"in N)E.push(Cv(q,{keepAlive:N.keepAlive,keepAliveMsecs:N.keepAliveMsecs}));r=aU(q,h,this.config.requestTimeout).catch((y)=>{return E.forEach(R1.clearTimeout),$(y)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}},PG=B0("node:http2"),Bv=rv(B0("node:http2")),Gv=class{constructor(f){this.sessions=[],this.sessions=f??[]}static{K0(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(f){this.sessions.push(f)}contains(f){return this.sessions.includes(f)}remove(f){this.sessions=this.sessions.filter((h)=>h!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let h of this.sessions)if(h===f){if(!h.destroyed)h.destroy()}}},Wv=class{constructor(f){if(this.sessionCache=new Map,this.config=f,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{K0(this,"NodeHttp2ConnectionManager")}lease(f,h){let w=this.getUrlString(f),s=this.sessionCache.get(w);if(s){let U=s.poll();if(U&&!this.config.disableConcurrency)return U}let $=Bv.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(U)=>{if(U)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();let r=K0(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",r),$.on("error",r),$.on("frameError",r),$.on("close",()=>this.deleteSession(w,$)),h.requestTimeout)$.setTimeout(h.requestTimeout,r);let E=this.sessionCache.get(w)||new Gv;return E.offerLast($),this.sessionCache.set(w,E),$}deleteSession(f,h){let w=this.sessionCache.get(f);if(!w)return;if(!w.contains(h))return;w.remove(h),this.sessionCache.set(f,w)}release(f,h){let w=this.getUrlString(f);this.sessionCache.get(w)?.offerLast(h)}destroy(){for(let[f,h]of this.sessionCache){for(let w of h){if(!w.destroyed)w.destroy();h.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(f&&f<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=f}setDisableConcurrentStreams(f){this.config.disableConcurrency=f}getUrlString(f){return f.destination.toString()}},Av=class f{constructor(h){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Wv({}),this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w($||{})}).catch(s);else w(h||{})})}static{K0(this,"NodeHttp2Handler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}destroy(){this.connectionManager.destroy()}async handle(h,{abortSignal:w}={}){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:s,disableConcurrentStreams:$}=this.config;return new Promise((r,E)=>{let U=!1,T=void 0,F=K0(async(X0)=>{await T,r(X0)},"resolve"),C=K0(async(X0)=>{await T,E(X0)},"reject");if(w?.aborted){U=!0;let X0=new Error("Request aborted");X0.name="AbortError",C(X0);return}let{hostname:I,method:L,port:W,protocol:X,query:Q}=h,M="";if(h.username!=null||h.password!=null){let X0=h.username??"",o1=h.password??"";M=`${X0}:${o1}@`}let q=`${X}//${M}${I}${W?`:${W}`:""}`,N={destination:new URL(q)},y=this.connectionManager.lease(N,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),n=K0((X0)=>{if($)this.destroySession(y);U=!0,C(X0)},"rejectWithDestroy"),L0=qG.buildQueryString(Q||{}),b0=h.path;if(L0)b0+=`?${L0}`;if(h.fragment)b0+=`#${h.fragment}`;let r1=y.request({...h.headers,[PG.constants.HTTP2_HEADER_PATH]:b0,[PG.constants.HTTP2_HEADER_METHOD]:L});if(y.ref(),r1.on("response",(X0)=>{let o1=new DG.HttpResponse({statusCode:X0[":status"]||-1,headers:kG(X0),body:r1});if(U=!0,F({response:o1}),$)y.close(),this.connectionManager.deleteSession(q,y)}),s)r1.setTimeout(s,()=>{r1.close();let X0=new Error(`Stream timed out because of no activity for ${s} ms`);X0.name="TimeoutError",n(X0)});if(w){let X0=K0(()=>{r1.close();let o1=new Error("Request aborted");o1.name="AbortError",n(o1)},"onAbort");if(typeof w.addEventListener==="function"){let o1=w;o1.addEventListener("abort",X0,{once:!0}),r1.once("close",()=>o1.removeEventListener("abort",X0))}else w.onabort=X0}r1.on("frameError",(X0,o1,Hj)=>{n(new Error(`Frame type id ${X0} in stream id ${Hj} has failed with code ${o1}.`))}),r1.on("error",n),r1.on("aborted",()=>{n(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${r1.rstCode}.`))}),r1.on("close",()=>{if(y.unref(),$)y.destroy();if(!U)n(new Error("Unexpected error: http2 request did not get a response"))}),T=aU(r1,h,s)})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(h){if(!h.destroyed)h.destroy()}},zv=class extends yG.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{K0(this,"Collector")}_write(f,h,w){this.bufferedBytes.push(f),w()}},Rv=K0((f)=>{if(Xv(f))return lG(f);return new Promise((h,w)=>{let s=new zv;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},"streamCollector"),Xv=K0((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");async function lG(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}K0(lG,"collectReadableStream")});var _G=H((LE0,xG)=>{var{defineProperty:Y4,getOwnPropertyDescriptor:Sv,getOwnPropertyNames:Yv}=Object,Mv=Object.prototype.hasOwnProperty,Rf=(f,h)=>Y4(f,"name",{value:h,configurable:!0}),Qv=(f,h)=>{for(var w in h)Y4(f,w,{get:h[w],enumerable:!0})},Kv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Yv(h))if(!Mv.call(f,$)&&$!==w)Y4(f,$,{get:()=>h[$],enumerable:!(s=Sv(h,$))||s.enumerable})}return f},Zv=(f)=>Kv(Y4({},"__esModule",{value:!0}),f),mG={};Qv(mG,{FetchHttpHandler:()=>Vv,keepAliveSupport:()=>S4,streamCollector:()=>Hv});xG.exports=Zv(mG);var bG=t0(),Jv=_U();function pU(f,h){return new Request(f,h)}Rf(pU,"createRequest");function dG(f=0){return new Promise((h,w)=>{if(f)setTimeout(()=>{let s=new Error(`Request did not complete within ${f} ms`);s.name="TimeoutError",w(s)},f)})}Rf(dG,"requestTimeout");var S4={supported:void 0},Vv=class f{static{Rf(this,"FetchHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}constructor(h){if(typeof h==="function")this.configProvider=h().then((w)=>w||{});else this.config=h??{},this.configProvider=Promise.resolve(this.config);if(S4.supported===void 0)S4.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in pU("https://[::1]"))}destroy(){}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,r=this.config.credentials;if(w?.aborted){let q=new Error("Request aborted");return q.name="AbortError",Promise.reject(q)}let E=h.path,U=Jv.buildQueryString(h.query||{});if(U)E+=`?${U}`;if(h.fragment)E+=`#${h.fragment}`;let T="";if(h.username!=null||h.password!=null){let q=h.username??"",N=h.password??"";T=`${q}:${N}@`}let{port:F,method:C}=h,I=`${h.protocol}//${T}${h.hostname}${F?`:${F}`:""}${E}`,L=C==="GET"||C==="HEAD"?void 0:h.body,W={body:L,headers:new Headers(h.headers),method:C,credentials:r};if(this.config?.cache)W.cache=this.config.cache;if(L)W.duplex="half";if(typeof AbortController!=="undefined")W.signal=w;if(S4.supported)W.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(W,this.config.requestInit(h));let X=Rf(()=>{},"removeSignalEventListener"),Q=pU(I,W),M=[fetch(Q).then((q)=>{let N=q.headers,y={};for(let L0 of N.entries())y[L0[0]]=L0[1];if(q.body==null)return q.blob().then((L0)=>({response:new bG.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:L0})}));return{response:new bG.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:q.body})}}),dG(s)];if(w)M.push(new Promise((q,N)=>{let y=Rf(()=>{let n=new Error("Request aborted");n.name="AbortError",N(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),X=Rf(()=>n.removeEventListener("abort",y),"removeSignalEventListener")}else w.onabort=y}));return Promise.race(M).finally(X)}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[h]=w,s})}httpHandlerConfigs(){return this.config??{}}},Pv=Bh(),Hv=Rf(async(f)=>{if(typeof Blob==="function"&&f instanceof Blob||f.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await f.arrayBuffer());return iG(f)}return cG(f)},"streamCollector");async function iG(f){let h=await gG(f),w=Pv.fromBase64(h);return new Uint8Array(w)}Rf(iG,"collectBlob");async function cG(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}Rf(cG,"collectStream");function gG(f){return new Promise((h,w)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return w(new Error("Reader aborted too early"));let $=s.result??"",r=$.indexOf(","),E=r>-1?r+1:$.length;h($.substring(E))},s.onabort=()=>w(new Error("Read aborted")),s.onerror=()=>w(s.error),s.readAsDataURL(f)})}Rf(gG,"readToBase64")});var uU=H((BE0,uG)=>{var{defineProperty:M4,getOwnPropertyDescriptor:Nv,getOwnPropertyNames:Dv}=Object,qv=Object.prototype.hasOwnProperty,nG=(f,h)=>M4(f,"name",{value:h,configurable:!0}),kv=(f,h)=>{for(var w in h)M4(f,w,{get:h[w],enumerable:!0})},yv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Dv(h))if(!qv.call(f,$)&&$!==w)M4(f,$,{get:()=>h[$],enumerable:!(s=Nv(h,$))||s.enumerable})}return f},jv=(f)=>yv(M4({},"__esModule",{value:!0}),f),eG={};kv(eG,{fromHex:()=>pG,toHex:()=>oG});uG.exports=jv(eG);var aG={},oU={};for(let f=0;f<256;f++){let h=f.toString(16).toLowerCase();if(h.length===1)h=`0${h}`;aG[f]=h,oU[h]=f}function pG(f){if(f.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let h=new Uint8Array(f.length/2);for(let w=0;w<f.length;w+=2){let s=f.slice(w,w+2).toLowerCase();if(s in oU)h[w/2]=oU[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return h}nG(pG,"fromHex");function oG(f){let h="";for(let w=0;w<f.byteLength;w++)h+=aG[f[w]];return h}nG(oG,"toHex")});var $W=H((wW)=>{Object.defineProperty(wW,"__esModule",{value:!0});wW.sdkStreamMixin=void 0;var Ov=_G(),lv=Bh(),vv=uU(),bv=u1(),tG=Gh(),fW="The stream has already been transformed.",mv=(f)=>{var h,w;if(!hW(f)&&!tG.isReadableStream(f)){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(fW);return s=!0,await Ov.streamCollector(f)},r=(E)=>{if(typeof E.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
11
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return E.stream()};return Object.assign(f,{transformToByteArray:$,transformToString:async(E)=>{let U=await $();if(E==="base64")return lv.toBase64(U);else if(E==="hex")return vv.toHex(U);else if(E===void 0||E==="utf8"||E==="utf-8")return bv.toUtf8(U);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(U);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(fW);if(s=!0,hW(f))return r(f);else if(tG.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};wW.sdkStreamMixin=mv;var hW=(f)=>typeof Blob==="function"&&f instanceof Blob});var TW=H((EW)=>{Object.defineProperty(EW,"__esModule",{value:!0});EW.sdkStreamMixin=void 0;var dv=X4(),iv=kw(),tU=B0("node:stream"),cv=$W(),rW="The stream has already been transformed.",gv=(f)=>{var h,w;if(!(f instanceof tU.Readable))try{return cv.sdkStreamMixin(f)}catch(r){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(rW);return s=!0,await dv.streamCollector(f)};return Object.assign(f,{transformToByteArray:$,transformToString:async(r)=>{let E=await $();if(r===void 0||Buffer.isEncoding(r))return iv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString(r);else return new TextDecoder(r).decode(E)},transformToWebStream:()=>{if(s)throw new Error(rW);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof tU.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,tU.Readable.toWeb(f)}})};EW.sdkStreamMixin=gv});var IW=H((FW)=>{Object.defineProperty(FW,"__esModule",{value:!0});FW.splitStream=void 0;async function xv(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}FW.splitStream=xv});var AW=H((GW)=>{Object.defineProperty(GW,"__esModule",{value:!0});GW.splitStream=void 0;var LW=B0("node:stream"),_v=IW(),BW=Gh();async function nv(f){if(BW.isReadableStream(f)||BW.isBlob(f))return _v.splitStream(f);let h=new LW.PassThrough,w=new LW.PassThrough;return f.pipe(h),f.pipe(w),[h,w]}GW.splitStream=nv});var sT=H((RE0,Sf)=>{var{defineProperty:Q4,getOwnPropertyDescriptor:ev,getOwnPropertyNames:av}=Object,pv=Object.prototype.hasOwnProperty,wT=(f,h)=>Q4(f,"name",{value:h,configurable:!0}),ov=(f,h)=>{for(var w in h)Q4(f,w,{get:h[w],enumerable:!0})},fT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of av(h))if(!pv.call(f,$)&&$!==w)Q4(f,$,{get:()=>h[$],enumerable:!(s=ev(h,$))||s.enumerable})}return f},Wh=(f,h,w)=>(fT(f,h,"default"),w&&fT(w,h,"default")),uv=(f)=>fT(Q4({},"__esModule",{value:!0}),f),Xf={};ov(Xf,{Uint8ArrayBlobAdapter:()=>hT});Sf.exports=uv(Xf);var zW=Bh(),RW=u1();function XW(f,h="utf-8"){if(h==="base64")return zW.toBase64(f);return RW.toUtf8(f)}wT(XW,"transformToString");function SW(f,h){if(h==="base64")return hT.mutate(zW.fromBase64(f));return hT.mutate(RW.fromUtf8(f))}wT(SW,"transformFromString");var hT=class f extends Uint8Array{static{wT(this,"Uint8ArrayBlobAdapter")}static fromString(h,w="utf-8"){switch(typeof h){case"string":return SW(h,w);default:throw new Error(`Unsupported conversion from ${typeof h} to Uint8ArrayBlobAdapter.`)}}static mutate(h){return Object.setPrototypeOf(h,f.prototype),h}transformToString(h="utf-8"){return XW(this,h)}};Wh(Xf,dU(),Sf.exports);Wh(Xf,aB(),Sf.exports);Wh(Xf,TG(),Sf.exports);Wh(Xf,IG(),Sf.exports);Wh(Xf,RG(),Sf.exports);Wh(Xf,TW(),Sf.exports);Wh(Xf,AW(),Sf.exports);Wh(Xf,Gh(),Sf.exports)});var jw=H((XE0,KW)=>{var{defineProperty:ET,getOwnPropertyDescriptor:tv,getOwnPropertyNames:fb}=Object,hb=Object.prototype.hasOwnProperty,wb=(f,h)=>{for(var w in h)ET(f,w,{get:h[w],enumerable:!0})},sb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of fb(h))if(!hb.call(f,$)&&$!==w)ET(f,$,{get:()=>h[$],enumerable:!(s=tv(h,$))||s.enumerable})}return f},$b=(f)=>sb(ET({},"__esModule",{value:!0}),f),YW={};wb(YW,{RequestBuilder:()=>QW,collectBody:()=>rb,extendedEncodeURIComponent:()=>rT,requestBuilder:()=>Ub,resolvedPath:()=>MW});KW.exports=$b(YW);var $T=sT(),rb=async(f=new Uint8Array,h)=>{if(f instanceof Uint8Array)return $T.Uint8ArrayBlobAdapter.mutate(f);if(!f)return $T.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let w=h.streamCollector(f);return $T.Uint8ArrayBlobAdapter.mutate(await w)};function rT(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(h){return"%"+h.charCodeAt(0).toString(16).toUpperCase()})}var Eb=t0(),MW=(f,h,w,s,$,r)=>{if(h!=null&&h[w]!==void 0){let E=s();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,r?E.split("/").map((U)=>rT(U)).join("/"):rT(E))}else throw new Error("No value provided for input HTTP label: "+w+".");return f};function Ub(f,h){return new QW(f,h)}var QW=class{constructor(f,h){this.input=f,this.context=h,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:f,protocol:h="https",port:w,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new Eb.HttpRequest({protocol:h,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((h)=>{this.path=`${h?.endsWith("/")?h.slice(0,-1):h||""}`+f}),this}p(f,h,w,s){return this.resolvePathStack.push(($)=>{this.path=MW($,this.input,f,h,w,s)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}}});var m0=H((YE0,lW)=>{var{defineProperty:Z4,getOwnPropertyDescriptor:Tb,getOwnPropertyNames:Fb}=Object,Cb=Object.prototype.hasOwnProperty,j0=(f,h)=>Z4(f,"name",{value:h,configurable:!0}),Ib=(f,h)=>{for(var w in h)Z4(f,w,{get:h[w],enumerable:!0})},Lb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Fb(h))if(!Cb.call(f,$)&&$!==w)Z4(f,$,{get:()=>h[$],enumerable:!(s=Tb(h,$))||s.enumerable})}return f},Bb=(f)=>Lb(Z4({},"__esModule",{value:!0}),f),ZW={};Ib(ZW,{DefaultIdentityProviderConfig:()=>Zb,EXPIRATION_MS:()=>jW,HttpApiKeyAuthSigner:()=>Jb,HttpBearerAuthSigner:()=>Vb,NoAuthSigner:()=>Pb,createIsIdentityExpiredFunction:()=>yW,createPaginator:()=>qW,doesIdentityRequireRefresh:()=>OW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Wb,getHttpAuthSchemePlugin:()=>zb,getHttpSigningPlugin:()=>Sb,getSmithyContext:()=>Gb,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>PW,httpAuthSchemeMiddleware:()=>UT,httpAuthSchemeMiddlewareOptions:()=>HW,httpSigningMiddleware:()=>NW,httpSigningMiddlewareOptions:()=>DW,isIdentityExpired:()=>Hb,memoizeIdentityProvider:()=>Nb,normalizeProvider:()=>Yb,requestBuilder:()=>Kb.requestBuilder,setFeature:()=>kW});lW.exports=Bb(ZW);var K4=F1(),Gb=j0((f)=>f[K4.SMITHY_CONTEXT_KEY]||(f[K4.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),JW=Ih();function VW(f){let h=new Map;for(let w of f)h.set(w.schemeId,w);return h}j0(VW,"convertHttpAuthSchemesToMap");var UT=j0((f,h)=>(w,s)=>async($)=>{let r=f.httpAuthSchemeProvider(await h.httpAuthSchemeParametersProvider(f,s,$.input)),E=VW(f.httpAuthSchemes),U=JW.getSmithyContext(s),T=[];for(let F of r){let C=E.get(F.schemeId);if(!C){T.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}let I=C.identityProvider(await h.identityProviderConfigProvider(f));if(!I){T.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:L={},signingProperties:W={}}=F.propertiesExtractor?.(f,s)||{};F.identityProperties=Object.assign(F.identityProperties||{},L),F.signingProperties=Object.assign(F.signingProperties||{},W),U.selectedHttpAuthScheme={httpAuthOption:F,identity:await I(F.identityProperties),signer:C.signer};break}if(!U.selectedHttpAuthScheme)throw new Error(T.join(`
12
- `));return w($)},"httpAuthSchemeMiddleware"),PW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Wb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(UT(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),PW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Ab=qw(),HW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Ab.serializerMiddlewareOption.name},zb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(UT(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),HW)}}),"getHttpAuthSchemePlugin"),TT=t0(),Rb=j0((f)=>(h)=>{throw h},"defaultErrorHandler"),Xb=j0((f,h)=>{},"defaultSuccessHandler"),NW=j0((f)=>(h,w)=>async(s)=>{if(!TT.HttpRequest.isInstance(s.request))return h(s);let r=JW.getSmithyContext(w).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:E={}},identity:U,signer:T}=r,F=await h({...s,request:await T.sign(s.request,U,E)}).catch((T.errorHandler||Rb)(E));return(T.successHandler||Xb)(F.response,E),F},"httpSigningMiddleware"),DW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Sb=j0((f)=>({applyToStack:(h)=>{h.addRelativeTo(NW(f),DW)}}),"getHttpSigningPlugin"),Yb=j0((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider"),Mb=j0(async(f,h,w,s=(r)=>r,...$)=>{let r=new f(w);return r=s(r)??r,await h.send(r,...$)},"makePagedClientRequest");function qW(f,h,w,s,$){return j0(async function*r(E,U,...T){let F=U,C=E.startingToken??F[w],I=!0,L;while(I){if(F[w]=C,$)F[$]=F[$]??E.pageSize;if(E.client instanceof f)L=await Mb(h,E.client,U,E.withCommand,...T);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield L;let W=C;C=Qb(L,s),I=!!(C&&(!E.stopOnSameToken||C!==W))}return},"paginateOperation")}j0(qW,"createPaginator");var Qb=j0((f,h)=>{let w=f,s=h.split(".");for(let $ of s){if(!w||typeof w!=="object")return;w=w[$]}return w},"get"),Kb=jw();function kW(f,h,w){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[h]=w}j0(kW,"setFeature");var Zb=class{constructor(f){this.authSchemes=new Map;for(let[h,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(h,w)}static{j0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(f){return this.authSchemes.get(f)}},Jb=class{static{j0(this,"HttpApiKeyAuthSigner")}async sign(f,h,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!h.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=TT.HttpRequest.clone(f);if(w.in===K4.HttpApiKeyAuthLocation.QUERY)s.query[w.name]=h.apiKey;else if(w.in===K4.HttpApiKeyAuthLocation.HEADER)s.headers[w.name]=w.scheme?`${w.scheme} ${h.apiKey}`:h.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return s}},Vb=class{static{j0(this,"HttpBearerAuthSigner")}async sign(f,h,w){let s=TT.HttpRequest.clone(f);if(!h.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${h.token}`,s}},Pb=class{static{j0(this,"NoAuthSigner")}async sign(f,h,w){return f}},yW=j0((f)=>(h)=>OW(h)&&h.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),jW=300000,Hb=yW(jW),OW=j0((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),Nb=j0((f,h,w)=>{if(f===void 0)return;let s=typeof f!=="function"?async()=>Promise.resolve(f):f,$,r,E,U=!1,T=j0(async(F)=>{if(!r)r=s(F);try{$=await r,E=!0,U=!1}finally{r=void 0}return $},"coalesceProvider");if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);return $};return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);if(U)return $;if(!w($))return U=!0,$;if(h($))return await T(F),$;return $}},"memoizeIdentityProvider")});function Db(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function Ow(f){let h=vW.normalizeProvider(f.userAgentAppId??FT),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:async()=>{let s=await h();if(!Db(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}var vW,FT=void 0;var bW=B(()=>{vW=o(m0(),1)});class _h{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}}var qb,J$=(f)=>qb.test(f)||f.startsWith("[")&&f.endsWith("]");var CT=B(()=>{qb=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var kb,V$=(f,h=!1)=>{if(!h)return kb.test(f);let w=f.split(".");for(let s of w)if(!V$(s))return!1;return!0};var IT=B(()=>{kb=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var t1;var J4=B(()=>{t1={}});var df="endpoints";function N1(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${N1(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(N1).join(", ")})`;return JSON.stringify(f,null,2)}var P$=()=>{};var H0;var mW=B(()=>{H0=class H0 extends Error{constructor(f){super(f);this.name="EndpointError"}}});var dW=()=>{};var iW=()=>{};var cW=()=>{};var gW=()=>{};var xW=()=>{};var _W=()=>{};var D1=B(()=>{mW();dW();iW();cW();gW();xW();_W()});var nW=(f,h)=>f===h;var eW=(f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new H0(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new H0(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w};var aW=B(()=>{D1()});var V4=(f,h)=>eW(h).reduce((w,s)=>{if(typeof w!=="object")throw new H0(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f);var pW=B(()=>{D1();aW()});var oW=(f)=>f!=null;var uW=(f)=>!f;var P4,LT,tW=(f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:W,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${W?`:${W}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(P4.EndpointURLScheme).includes(T))return null;let F=J$($),C=w.includes(`${s}:${LT[T]}`)||typeof f==="string"&&f.includes(`${s}:${LT[T]}`),I=`${s}${C?`:${LT[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}};var fA=B(()=>{P4=o(F1(),1);CT();LT={[P4.EndpointURLScheme.HTTP]:80,[P4.EndpointURLScheme.HTTPS]:443}});var hA=(f,h)=>f===h;var wA=(f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)};var sA=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`);var BT=B(()=>{pW();IT();fA()});var $A;var rA=B(()=>{BT();$A={booleanEquals:nW,getAttr:V4,isSet:oW,isValidHostLabel:V$,not:uW,parseURL:tW,stringEquals:hA,substring:wA,uriEncode:sA}});var H4=(f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(V4(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")};var GT=B(()=>{BT()});var EA=({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]};var Ah=(f,h,w)=>{if(typeof f==="string")return H4(f,w);else if(f.fn)return N4(f,w);else if(f.ref)return EA(f,w);throw new H0(`'${h}': ${String(f)} is not a string, function or reference.`)};var H$=B(()=>{D1();WT();GT()});var N4=({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:Ah(r,"arg",w)),$=f.split(".");if($[0]in t1&&$[1]!=null)return t1[$[0]][$[1]](...s);return $A[f](...s)};var WT=B(()=>{J4();rA();H$()});var UA=({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new H0(`'${f}' is already defined in Reference Record.`);let s=N4(h,w);return w.logger?.debug?.(`${df} evaluateCondition: ${N1(h)} = ${N1(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}};var TA=B(()=>{P$();D1();WT()});var lw=(f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=UA(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${df} assign: ${r.name} := ${N1(r.value)}`)}return{result:!0,referenceRecord:w}};var D4=B(()=>{P$();TA()});var FA=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=Ah(r,"Header value entry",h);if(typeof E!=="string")throw new H0(`Header '${s}' value '${E}' is not a string`);return E})}),{});var CA=B(()=>{D1();H$()});var AT=(f,h)=>{if(Array.isArray(f))return f.map((w)=>AT(w,h));switch(typeof f){case"string":return H4(f,h);case"object":if(f===null)throw new H0(`Unexpected endpoint property: ${f}`);return q4(f,h);case"boolean":return f;default:throw new H0(`Unexpected endpoint property type: ${typeof f}`)}};var IA=B(()=>{D1();GT();zT()});var q4=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:AT($,h)}),{});var zT=B(()=>{IA()});var LA=(f,h)=>{let w=Ah(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new H0(`Endpoint URL must be a string, got ${typeof w}`)};var BA=B(()=>{D1();H$()});var GA=(f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=lw(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${df} Resolving endpoint from template: ${N1(s)}`),{...F!=null&&{headers:FA(F,E)},...T!=null&&{properties:q4(T,E)},url:LA(U,E)}};var WA=B(()=>{P$();D4();CA();zT();BA()});var AA=(f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=lw(w,h);if(!$)return;throw new H0(Ah(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))};var zA=B(()=>{D1();D4();H$()});var RA=(f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=lw(w,h);if(!$)return;return k4(s,{...h,referenceRecord:{...h.referenceRecord,...r}})};var XA=B(()=>{D4();RT()});var k4=(f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=GA(w,h);if(s)return s}else if(w.type==="error")AA(w,h);else if(w.type==="tree"){let s=RA(w,h);if(s)return s}else throw new H0(`Unknown endpoint rule: ${w}`);throw new H0("Rules evaluation failed")};var RT=B(()=>{D1();WA();zA();XA()});var SA=B(()=>{J4();RT()});var nh=(f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${df} Initial EndpointParams: ${N1(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new H0(`Missing required parameter: '${F}'`);let T=k4(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${df} Resolved endpoint: ${N1(T)}`),T};var YA=B(()=>{P$();D1();SA()});var cf=B(()=>{CT();IT();J4();YA();D1()});var XT=B(()=>{cf()});var ST=(f,h=!1)=>{if(h){for(let w of f.split("."))if(!ST(w))return!1;return!0}if(!V$(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(J$(f))return!1;return!0};var MA=B(()=>{cf();XT()});var QA=(f)=>{let h=f.split(":");if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(":")==="")return null;let T=U.map((F)=>F.split("/")).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}};var ZA;var KA=B(()=>{ZA={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"}});var jb,Ob="",JA=(f)=>{let{partitions:h}=jb;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},VA=()=>Ob;var YT=B(()=>{KA();jb=ZA});var eh;var PA=B(()=>{cf();MA();YT();eh={isVirtualHostableS3Bucket:ST,parseArn:QA,partition:JA};t1.aws=eh});var HA=B(()=>{cf()});var NA=B(()=>{cf()});var DA=()=>{};var qA=()=>{};var kA=()=>{};var yA=()=>{};var jA=()=>{};var OA=B(()=>{NA();DA();qA();kA();yA();jA()});var N$=B(()=>{PA();YT();XT();HA();OA()});var l4=H((wT0,O4)=>{var lA,vA,bA,mA,dA,iA,cA,gA,xA,_A,nA,eA,aA,y4,MT,pA,oA,uA,vw,tA,fz,hz,wz,sz,$z,rz,Ez,Uz,j4,Tz,Fz,Cz;(function(f){var h=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){f(w(h,w(s)))});else if(typeof O4==="object"&&typeof wT0==="object")f(w(h,w(wT0)));else f(w(h));function w(s,$){if(s!==h)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(r,E){return s[r]=$?$(r,E):E}}})(function(f){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,E){r.__proto__=E}||function(r,E){for(var U in E)if(Object.prototype.hasOwnProperty.call(E,U))r[U]=E[U]};lA=function(r,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");h(r,E);function U(){this.constructor=r}r.prototype=E===null?Object.create(E):(U.prototype=E.prototype,new U)},vA=Object.assign||function(r){for(var E,U=1,T=arguments.length;U<T;U++){E=arguments[U];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))r[F]=E[F]}return r},bA=function(r,E){var U={};for(var T in r)if(Object.prototype.hasOwnProperty.call(r,T)&&E.indexOf(T)<0)U[T]=r[T];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,T=Object.getOwnPropertySymbols(r);F<T.length;F++)if(E.indexOf(T[F])<0&&Object.prototype.propertyIsEnumerable.call(r,T[F]))U[T[F]]=r[T[F]]}return U},mA=function(r,E,U,T){var F=arguments.length,C=F<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,U):T,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")C=Reflect.decorate(r,E,U,T);else for(var L=r.length-1;L>=0;L--)if(I=r[L])C=(F<3?I(C):F>3?I(E,U,C):I(E,U))||C;return F>3&&C&&Object.defineProperty(E,U,C),C},dA=function(r,E){return function(U,T){E(U,T,r)}},iA=function(r,E,U,T,F,C){function I(b0){if(b0!==void 0&&typeof b0!=="function")throw new TypeError("Function expected");return b0}var L=T.kind,W=L==="getter"?"get":L==="setter"?"set":"value",X=!E&&r?T.static?r:r.prototype:null,Q=E||(X?Object.getOwnPropertyDescriptor(X,T.name):{}),M,q=!1;for(var N=U.length-1;N>=0;N--){var y={};for(var n in T)y[n]=n==="access"?{}:T[n];for(var n in T.access)y.access[n]=T.access[n];y.addInitializer=function(b0){if(q)throw new TypeError("Cannot add initializers after decoration has completed");C.push(I(b0||null))};var L0=U[N](L==="accessor"?{get:Q.get,set:Q.set}:Q[W],y);if(L==="accessor"){if(L0===void 0)continue;if(L0===null||typeof L0!=="object")throw new TypeError("Object expected");if(M=I(L0.get))Q.get=M;if(M=I(L0.set))Q.set=M;if(M=I(L0.init))F.unshift(M)}else if(M=I(L0))if(L==="field")F.unshift(M);else Q[W]=M}if(X)Object.defineProperty(X,T.name,Q);q=!0},cA=function(r,E,U){var T=arguments.length>2;for(var F=0;F<E.length;F++)U=T?E[F].call(r,U):E[F].call(r);return T?U:void 0},gA=function(r){return typeof r==="symbol"?r:"".concat(r)},xA=function(r,E,U){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:U?"".concat(U," ",E):E})},_A=function(r,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,E)},nA=function(r,E,U,T){function F(C){return C instanceof U?C:new U(function(I){I(C)})}return new(U||(U=Promise))(function(C,I){function L(Q){try{X(T.next(Q))}catch(M){I(M)}}function W(Q){try{X(T.throw(Q))}catch(M){I(M)}}function X(Q){Q.done?C(Q.value):F(Q.value).then(L,W)}X((T=T.apply(r,E||[])).next())})},eA=function(r,E){var U={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},T,F,C,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=L(0),I.throw=L(1),I.return=L(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(X){return function(Q){return W([X,Q])}}function W(X){if(T)throw new TypeError("Generator is already executing.");while(I&&(I=0,X[0]&&(U=0)),U)try{if(T=1,F&&(C=X[0]&2?F.return:X[0]?F.throw||((C=F.return)&&C.call(F),0):F.next)&&!(C=C.call(F,X[1])).done)return C;if(F=0,C)X=[X[0]&2,C.value];switch(X[0]){case 0:case 1:C=X;break;case 4:return U.label++,{value:X[1],done:!1};case 5:U.label++,F=X[1],X=[0];continue;case 7:X=U.ops.pop(),U.trys.pop();continue;default:if((C=U.trys,!(C=C.length>0&&C[C.length-1]))&&(X[0]===6||X[0]===2)){U=0;continue}if(X[0]===3&&(!C||X[1]>C[0]&&X[1]<C[3])){U.label=X[1];break}if(X[0]===6&&U.label<C[1]){U.label=C[1],C=X;break}if(C&&U.label<C[2]){U.label=C[2],U.ops.push(X);break}if(C[2])U.ops.pop();U.trys.pop();continue}X=E.call(r,U)}catch(Q){X=[6,Q],F=0}finally{T=C=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},aA=function(r,E){for(var U in r)if(U!=="default"&&!Object.prototype.hasOwnProperty.call(E,U))j4(E,r,U)},j4=Object.create?function(r,E,U,T){if(T===void 0)T=U;var F=Object.getOwnPropertyDescriptor(E,U);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[U]}};Object.defineProperty(r,T,F)}:function(r,E,U,T){if(T===void 0)T=U;r[T]=E[U]},y4=function(r){var E=typeof Symbol==="function"&&Symbol.iterator,U=E&&r[E],T=0;if(U)return U.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&T>=r.length)r=void 0;return{value:r&&r[T++],done:!r}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},MT=function(r,E){var U=typeof Symbol==="function"&&r[Symbol.iterator];if(!U)return r;var T=U.call(r),F,C=[],I;try{while((E===void 0||E-- >0)&&!(F=T.next()).done)C.push(F.value)}catch(L){I={error:L}}finally{try{if(F&&!F.done&&(U=T.return))U.call(T)}finally{if(I)throw I.error}}return C},pA=function(){for(var r=[],E=0;E<arguments.length;E++)r=r.concat(MT(arguments[E]));return r},oA=function(){for(var r=0,E=0,U=arguments.length;E<U;E++)r+=arguments[E].length;for(var T=Array(r),F=0,E=0;E<U;E++)for(var C=arguments[E],I=0,L=C.length;I<L;I++,F++)T[F]=C[I];return T},uA=function(r,E,U){if(U||arguments.length===2){for(var T=0,F=E.length,C;T<F;T++)if(C||!(T in E)){if(!C)C=Array.prototype.slice.call(E,0,T);C[T]=E[T]}}return r.concat(C||Array.prototype.slice.call(E))},vw=function(r){return this instanceof vw?(this.v=r,this):new vw(r)},tA=function(r,E,U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=U.apply(r,E||[]),F,C=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",I),F[Symbol.asyncIterator]=function(){return this},F;function I(N){return function(y){return Promise.resolve(y).then(N,M)}}function L(N,y){if(T[N]){if(F[N]=function(n){return new Promise(function(L0,b0){C.push([N,n,L0,b0])>1||W(N,n)})},y)F[N]=y(F[N])}}function W(N,y){try{X(T[N](y))}catch(n){q(C[0][3],n)}}function X(N){N.value instanceof vw?Promise.resolve(N.value.v).then(Q,M):q(C[0][2],N)}function Q(N){W("next",N)}function M(N){W("throw",N)}function q(N,y){if(N(y),C.shift(),C.length)W(C[0][0],C[0][1])}},fz=function(r){var E,U;return E={},T("next"),T("throw",function(F){throw F}),T("return"),E[Symbol.iterator]=function(){return this},E;function T(F,C){E[F]=r[F]?function(I){return(U=!U)?{value:vw(r[F](I)),done:!1}:C?C(I):I}:C}},hz=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=r[Symbol.asyncIterator],U;return E?E.call(r):(r=typeof y4==="function"?y4(r):r[Symbol.iterator](),U={},T("next"),T("throw"),T("return"),U[Symbol.asyncIterator]=function(){return this},U);function T(C){U[C]=r[C]&&function(I){return new Promise(function(L,W){I=r[C](I),F(L,W,I.done,I.value)})}}function F(C,I,L,W){Promise.resolve(W).then(function(X){C({value:X,done:L})},I)}},wz=function(r,E){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:E});else r.raw=E;return r};var w=Object.create?function(r,E){Object.defineProperty(r,"default",{enumerable:!0,value:E})}:function(r,E){r.default=E},s=function(r){return s=Object.getOwnPropertyNames||function(E){var U=[];for(var T in E)if(Object.prototype.hasOwnProperty.call(E,T))U[U.length]=T;return U},s(r)};sz=function(r){if(r&&r.__esModule)return r;var E={};if(r!=null){for(var U=s(r),T=0;T<U.length;T++)if(U[T]!=="default")j4(E,r,U[T])}return w(E,r),E},$z=function(r){return r&&r.__esModule?r:{default:r}},rz=function(r,E,U,T){if(U==="a"&&!T)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?r!==E||!T:!E.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return U==="m"?T:U==="a"?T.call(r):T?T.value:E.get(r)},Ez=function(r,E,U,T,F){if(T==="m")throw new TypeError("Private method is not writable");if(T==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?r!==E||!F:!E.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return T==="a"?F.call(r,U):F?F.value=U:E.set(r,U),U},Uz=function(r,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?E===r:r.has(E)},Tz=function(r,E,U){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var T,F;if(U){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");T=E[Symbol.asyncDispose]}if(T===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(T=E[Symbol.dispose],U)F=T}if(typeof T!=="function")throw new TypeError("Object not disposable.");if(F)T=function(){try{F.call(this)}catch(C){return Promise.reject(C)}};r.stack.push({value:E,dispose:T,async:U})}else if(U)r.stack.push({async:!0});return E};var $=typeof SuppressedError==="function"?SuppressedError:function(r,E,U){var T=new Error(U);return T.name="SuppressedError",T.error=r,T.suppressed=E,T};Fz=function(r){function E(C){r.error=r.hasError?new $(C,r.error,"An error was suppressed during disposal."):C,r.hasError=!0}var U,T=0;function F(){while(U=r.stack.pop())try{if(!U.async&&T===1)return T=0,r.stack.push(U),Promise.resolve().then(F);if(U.dispose){var C=U.dispose.call(U.value);if(U.async)return T|=2,Promise.resolve(C).then(F,function(I){return E(I),F()})}else T|=1}catch(I){E(I)}if(T===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return F()},Cz=function(r,E){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(U,T,F,C,I){return T?E?".jsx":".js":F&&(!C||!I)?U:F+C+"."+I.toLowerCase()+"js"});return r},f("__extends",lA),f("__assign",vA),f("__rest",bA),f("__decorate",mA),f("__param",dA),f("__esDecorate",iA),f("__runInitializers",cA),f("__propKey",gA),f("__setFunctionName",xA),f("__metadata",_A),f("__awaiter",nA),f("__generator",eA),f("__exportStar",aA),f("__createBinding",j4),f("__values",y4),f("__read",MT),f("__spread",pA),f("__spreadArrays",oA),f("__spreadArray",uA),f("__await",vw),f("__asyncGenerator",tA),f("__asyncDelegator",fz),f("__asyncValues",hz),f("__makeTemplateObject",wz),f("__importStar",sz),f("__importDefault",$z),f("__classPrivateFieldGet",rz),f("__classPrivateFieldSet",Ez),f("__classPrivateFieldIn",Uz),f("__addDisposableResource",Tz),f("__disposeResources",Fz),f("__rewriteRelativeImportExtension",Cz)})});var I1=H((sT0,Gz)=>{var{defineProperty:v4,getOwnPropertyDescriptor:lb,getOwnPropertyNames:vb}=Object,bb=Object.prototype.hasOwnProperty,KT=(f,h)=>v4(f,"name",{value:h,configurable:!0}),mb=(f,h)=>{for(var w in h)v4(f,w,{get:h[w],enumerable:!0})},db=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of vb(h))if(!bb.call(f,$)&&$!==w)v4(f,$,{get:()=>h[$],enumerable:!(s=lb(h,$))||s.enumerable})}return f},ib=(f)=>db(v4({},"__esModule",{value:!0}),f),Iz={};mb(Iz,{emitWarningIfUnsupportedVersion:()=>cb,setCredentialFeature:()=>Lz,setFeature:()=>Bz,state:()=>QT});Gz.exports=ib(Iz);var QT={warningEmitted:!1},cb=KT((f)=>{if(f&&!QT.warningEmitted&&parseInt(f.substring(1,f.indexOf(".")))<18)QT.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
10
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:r,httpAgent:E,httpsAgent:U}=h||{},T=!0,F=50;return{connectionTimeout:s,requestTimeout:w??$,socketAcquisitionWarningTimeout:r,httpAgent:(()=>{if(E instanceof nU.Agent||typeof E?.destroy==="function")return E;return new nU.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(U instanceof eU.Agent||typeof U?.destroy==="function")return U;return new eU.Agent({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let r=void 0,E=[],U=K0(async(y)=>{await r,E.forEach(R1.clearTimeout),s(y)},"resolve"),T=K0(async(y)=>{await r,E.forEach(R1.clearTimeout),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let y=new Error("Request aborted");y.name="AbortError",T(y);return}let F=h.protocol==="https:",C=F?this.config.httpsAgent:this.config.httpAgent;E.push(R1.setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=qG.buildQueryString(h.query||{}),L=void 0;if(h.username!=null||h.password!=null){let y=h.username??"",n=h.password??"";L=`${y}:${n}`}let W=h.path;if(I)W+=`?${I}`;if(h.fragment)W+=`#${h.fragment}`;let X=h.hostname??"";if(X[0]==="["&&X.endsWith("]"))X=h.hostname.slice(1,-1);else X=h.hostname;let Q={headers:h.headers,host:X,method:h.method,path:W,port:h.port,agent:C,auth:L},q=(F?eU.request:nU.request)(Q,(y)=>{let n=new DG.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:kG(y.headers),body:y});U({response:n})});if(q.on("error",(y)=>{if(rv.includes(y.code))T(Object.assign(y,{name:"TimeoutError"}));else T(y)}),w){let y=K0(()=>{q.destroy();let n=new Error("Request aborted");n.name="AbortError",T(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),q.once("close",()=>n.removeEventListener("abort",y))}else w.onabort=y}E.push(Ev(q,T,this.config.connectionTimeout)),E.push(Fv(q,T,this.config.requestTimeout));let N=Q.agent;if(typeof N==="object"&&"keepAlive"in N)E.push(Tv(q,{keepAlive:N.keepAlive,keepAliveMsecs:N.keepAliveMsecs}));r=aU(q,h,this.config.requestTimeout).catch((y)=>{return E.forEach(R1.clearTimeout),$(y)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}},PG=B0("node:http2"),Iv=sv(B0("node:http2")),Lv=class{constructor(f){this.sessions=[],this.sessions=f??[]}static{K0(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(f){this.sessions.push(f)}contains(f){return this.sessions.includes(f)}remove(f){this.sessions=this.sessions.filter((h)=>h!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let h of this.sessions)if(h===f){if(!h.destroyed)h.destroy()}}},Bv=class{constructor(f){if(this.sessionCache=new Map,this.config=f,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{K0(this,"NodeHttp2ConnectionManager")}lease(f,h){let w=this.getUrlString(f),s=this.sessionCache.get(w);if(s){let U=s.poll();if(U&&!this.config.disableConcurrency)return U}let $=Iv.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(U)=>{if(U)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();let r=K0(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",r),$.on("error",r),$.on("frameError",r),$.on("close",()=>this.deleteSession(w,$)),h.requestTimeout)$.setTimeout(h.requestTimeout,r);let E=this.sessionCache.get(w)||new Lv;return E.offerLast($),this.sessionCache.set(w,E),$}deleteSession(f,h){let w=this.sessionCache.get(f);if(!w)return;if(!w.contains(h))return;w.remove(h),this.sessionCache.set(f,w)}release(f,h){let w=this.getUrlString(f);this.sessionCache.get(w)?.offerLast(h)}destroy(){for(let[f,h]of this.sessionCache){for(let w of h){if(!w.destroyed)w.destroy();h.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(f&&f<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=f}setDisableConcurrentStreams(f){this.config.disableConcurrency=f}getUrlString(f){return f.destination.toString()}},Gv=class f{constructor(h){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Bv({}),this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w($||{})}).catch(s);else w(h||{})})}static{K0(this,"NodeHttp2Handler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}destroy(){this.connectionManager.destroy()}async handle(h,{abortSignal:w}={}){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:s,disableConcurrentStreams:$}=this.config;return new Promise((r,E)=>{let U=!1,T=void 0,F=K0(async(X0)=>{await T,r(X0)},"resolve"),C=K0(async(X0)=>{await T,E(X0)},"reject");if(w?.aborted){U=!0;let X0=new Error("Request aborted");X0.name="AbortError",C(X0);return}let{hostname:I,method:L,port:W,protocol:X,query:Q}=h,M="";if(h.username!=null||h.password!=null){let X0=h.username??"",o1=h.password??"";M=`${X0}:${o1}@`}let q=`${X}//${M}${I}${W?`:${W}`:""}`,N={destination:new URL(q)},y=this.connectionManager.lease(N,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),n=K0((X0)=>{if($)this.destroySession(y);U=!0,C(X0)},"rejectWithDestroy"),L0=qG.buildQueryString(Q||{}),b0=h.path;if(L0)b0+=`?${L0}`;if(h.fragment)b0+=`#${h.fragment}`;let r1=y.request({...h.headers,[PG.constants.HTTP2_HEADER_PATH]:b0,[PG.constants.HTTP2_HEADER_METHOD]:L});if(y.ref(),r1.on("response",(X0)=>{let o1=new DG.HttpResponse({statusCode:X0[":status"]||-1,headers:kG(X0),body:r1});if(U=!0,F({response:o1}),$)y.close(),this.connectionManager.deleteSession(q,y)}),s)r1.setTimeout(s,()=>{r1.close();let X0=new Error(`Stream timed out because of no activity for ${s} ms`);X0.name="TimeoutError",n(X0)});if(w){let X0=K0(()=>{r1.close();let o1=new Error("Request aborted");o1.name="AbortError",n(o1)},"onAbort");if(typeof w.addEventListener==="function"){let o1=w;o1.addEventListener("abort",X0,{once:!0}),r1.once("close",()=>o1.removeEventListener("abort",X0))}else w.onabort=X0}r1.on("frameError",(X0,o1,Vj)=>{n(new Error(`Frame type id ${X0} in stream id ${Vj} has failed with code ${o1}.`))}),r1.on("error",n),r1.on("aborted",()=>{n(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${r1.rstCode}.`))}),r1.on("close",()=>{if(y.unref(),$)y.destroy();if(!U)n(new Error("Unexpected error: http2 request did not get a response"))}),T=aU(r1,h,s)})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(h){if(!h.destroyed)h.destroy()}},Wv=class extends yG.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{K0(this,"Collector")}_write(f,h,w){this.bufferedBytes.push(f),w()}},zv=K0((f)=>{if(Av(f))return lG(f);return new Promise((h,w)=>{let s=new Wv;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},"streamCollector"),Av=K0((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");async function lG(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}K0(lG,"collectReadableStream")});var _G=H((FE0,xG)=>{var{defineProperty:A5,getOwnPropertyDescriptor:Rv,getOwnPropertyNames:Xv}=Object,Sv=Object.prototype.hasOwnProperty,Xf=(f,h)=>A5(f,"name",{value:h,configurable:!0}),Yv=(f,h)=>{for(var w in h)A5(f,w,{get:h[w],enumerable:!0})},Mv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Xv(h))if(!Sv.call(f,$)&&$!==w)A5(f,$,{get:()=>h[$],enumerable:!(s=Rv(h,$))||s.enumerable})}return f},Qv=(f)=>Mv(A5({},"__esModule",{value:!0}),f),mG={};Yv(mG,{FetchHttpHandler:()=>Zv,keepAliveSupport:()=>z5,streamCollector:()=>Vv});xG.exports=Qv(mG);var bG=t0(),Kv=_U();function pU(f,h){return new Request(f,h)}Xf(pU,"createRequest");function dG(f=0){return new Promise((h,w)=>{if(f)setTimeout(()=>{let s=new Error(`Request did not complete within ${f} ms`);s.name="TimeoutError",w(s)},f)})}Xf(dG,"requestTimeout");var z5={supported:void 0},Zv=class f{static{Xf(this,"FetchHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}constructor(h){if(typeof h==="function")this.configProvider=h().then((w)=>w||{});else this.config=h??{},this.configProvider=Promise.resolve(this.config);if(z5.supported===void 0)z5.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in pU("https://[::1]"))}destroy(){}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,r=this.config.credentials;if(w?.aborted){let q=new Error("Request aborted");return q.name="AbortError",Promise.reject(q)}let E=h.path,U=Kv.buildQueryString(h.query||{});if(U)E+=`?${U}`;if(h.fragment)E+=`#${h.fragment}`;let T="";if(h.username!=null||h.password!=null){let q=h.username??"",N=h.password??"";T=`${q}:${N}@`}let{port:F,method:C}=h,I=`${h.protocol}//${T}${h.hostname}${F?`:${F}`:""}${E}`,L=C==="GET"||C==="HEAD"?void 0:h.body,W={body:L,headers:new Headers(h.headers),method:C,credentials:r};if(this.config?.cache)W.cache=this.config.cache;if(L)W.duplex="half";if(typeof AbortController!=="undefined")W.signal=w;if(z5.supported)W.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(W,this.config.requestInit(h));let X=Xf(()=>{},"removeSignalEventListener"),Q=pU(I,W),M=[fetch(Q).then((q)=>{let N=q.headers,y={};for(let L0 of N.entries())y[L0[0]]=L0[1];if(q.body==null)return q.blob().then((L0)=>({response:new bG.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:L0})}));return{response:new bG.HttpResponse({headers:y,reason:q.statusText,statusCode:q.status,body:q.body})}}),dG(s)];if(w)M.push(new Promise((q,N)=>{let y=Xf(()=>{let n=new Error("Request aborted");n.name="AbortError",N(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),X=Xf(()=>n.removeEventListener("abort",y),"removeSignalEventListener")}else w.onabort=y}));return Promise.race(M).finally(X)}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[h]=w,s})}httpHandlerConfigs(){return this.config??{}}},Jv=t1(),Vv=Xf(async(f)=>{if(typeof Blob==="function"&&f instanceof Blob||f.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await f.arrayBuffer());return iG(f)}return cG(f)},"streamCollector");async function iG(f){let h=await gG(f),w=Jv.fromBase64(h);return new Uint8Array(w)}Xf(iG,"collectBlob");async function cG(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}Xf(cG,"collectStream");function gG(f){return new Promise((h,w)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return w(new Error("Reader aborted too early"));let $=s.result??"",r=$.indexOf(","),E=r>-1?r+1:$.length;h($.substring(E))},s.onabort=()=>w(new Error("Read aborted")),s.onerror=()=>w(s.error),s.readAsDataURL(f)})}Xf(gG,"readToBase64")});var uU=H((CE0,uG)=>{var{defineProperty:R5,getOwnPropertyDescriptor:Pv,getOwnPropertyNames:Hv}=Object,Nv=Object.prototype.hasOwnProperty,nG=(f,h)=>R5(f,"name",{value:h,configurable:!0}),Dv=(f,h)=>{for(var w in h)R5(f,w,{get:h[w],enumerable:!0})},qv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Hv(h))if(!Nv.call(f,$)&&$!==w)R5(f,$,{get:()=>h[$],enumerable:!(s=Pv(h,$))||s.enumerable})}return f},kv=(f)=>qv(R5({},"__esModule",{value:!0}),f),eG={};Dv(eG,{fromHex:()=>pG,toHex:()=>oG});uG.exports=kv(eG);var aG={},oU={};for(let f=0;f<256;f++){let h=f.toString(16).toLowerCase();if(h.length===1)h=`0${h}`;aG[f]=h,oU[h]=f}function pG(f){if(f.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let h=new Uint8Array(f.length/2);for(let w=0;w<f.length;w+=2){let s=f.slice(w,w+2).toLowerCase();if(s in oU)h[w/2]=oU[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return h}nG(pG,"fromHex");function oG(f){let h="";for(let w=0;w<f.byteLength;w++)h+=aG[f[w]];return h}nG(oG,"toHex")});var $W=H((wW)=>{Object.defineProperty(wW,"__esModule",{value:!0});wW.sdkStreamMixin=void 0;var yv=_G(),jv=t1(),Ov=uU(),lv=u1(),tG=Bh(),fW="The stream has already been transformed.",vv=(f)=>{var h,w;if(!hW(f)&&!tG.isReadableStream(f)){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(fW);return s=!0,await yv.streamCollector(f)},r=(E)=>{if(typeof E.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
11
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return E.stream()};return Object.assign(f,{transformToByteArray:$,transformToString:async(E)=>{let U=await $();if(E==="base64")return jv.toBase64(U);else if(E==="hex")return Ov.toHex(U);else if(E===void 0||E==="utf8"||E==="utf-8")return lv.toUtf8(U);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(U);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(fW);if(s=!0,hW(f))return r(f);else if(tG.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};wW.sdkStreamMixin=vv;var hW=(f)=>typeof Blob==="function"&&f instanceof Blob});var TW=H((EW)=>{Object.defineProperty(EW,"__esModule",{value:!0});EW.sdkStreamMixin=void 0;var bv=W5(),mv=qw(),tU=B0("node:stream"),dv=$W(),rW="The stream has already been transformed.",iv=(f)=>{var h,w;if(!(f instanceof tU.Readable))try{return dv.sdkStreamMixin(f)}catch(r){let E=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${E}`)}let s=!1,$=async()=>{if(s)throw new Error(rW);return s=!0,await bv.streamCollector(f)};return Object.assign(f,{transformToByteArray:$,transformToString:async(r)=>{let E=await $();if(r===void 0||Buffer.isEncoding(r))return mv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString(r);else return new TextDecoder(r).decode(E)},transformToWebStream:()=>{if(s)throw new Error(rW);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof tU.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,tU.Readable.toWeb(f)}})};EW.sdkStreamMixin=iv});var IW=H((FW)=>{Object.defineProperty(FW,"__esModule",{value:!0});FW.splitStream=void 0;async function cv(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}FW.splitStream=cv});var zW=H((GW)=>{Object.defineProperty(GW,"__esModule",{value:!0});GW.splitStream=void 0;var LW=B0("node:stream"),gv=IW(),BW=Bh();async function xv(f){if(BW.isReadableStream(f)||BW.isBlob(f))return gv.splitStream(f);let h=new LW.PassThrough,w=new LW.PassThrough;return f.pipe(h),f.pipe(w),[h,w]}GW.splitStream=xv});var sT=H((WE0,Yf)=>{var{defineProperty:X5,getOwnPropertyDescriptor:_v,getOwnPropertyNames:nv}=Object,ev=Object.prototype.hasOwnProperty,wT=(f,h)=>X5(f,"name",{value:h,configurable:!0}),av=(f,h)=>{for(var w in h)X5(f,w,{get:h[w],enumerable:!0})},fT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of nv(h))if(!ev.call(f,$)&&$!==w)X5(f,$,{get:()=>h[$],enumerable:!(s=_v(h,$))||s.enumerable})}return f},Gh=(f,h,w)=>(fT(f,h,"default"),w&&fT(w,h,"default")),pv=(f)=>fT(X5({},"__esModule",{value:!0}),f),Sf={};av(Sf,{Uint8ArrayBlobAdapter:()=>hT});Yf.exports=pv(Sf);var AW=t1(),RW=u1();function XW(f,h="utf-8"){if(h==="base64")return AW.toBase64(f);return RW.toUtf8(f)}wT(XW,"transformToString");function SW(f,h){if(h==="base64")return hT.mutate(AW.fromBase64(f));return hT.mutate(RW.fromUtf8(f))}wT(SW,"transformFromString");var hT=class f extends Uint8Array{static{wT(this,"Uint8ArrayBlobAdapter")}static fromString(h,w="utf-8"){switch(typeof h){case"string":return SW(h,w);default:throw new Error(`Unsupported conversion from ${typeof h} to Uint8ArrayBlobAdapter.`)}}static mutate(h){return Object.setPrototypeOf(h,f.prototype),h}transformToString(h="utf-8"){return XW(this,h)}};Gh(Sf,dU(),Yf.exports);Gh(Sf,aB(),Yf.exports);Gh(Sf,TG(),Yf.exports);Gh(Sf,IG(),Yf.exports);Gh(Sf,RG(),Yf.exports);Gh(Sf,TW(),Yf.exports);Gh(Sf,zW(),Yf.exports);Gh(Sf,Bh(),Yf.exports)});var yw=H((zE0,KW)=>{var{defineProperty:ET,getOwnPropertyDescriptor:ov,getOwnPropertyNames:uv}=Object,tv=Object.prototype.hasOwnProperty,fb=(f,h)=>{for(var w in h)ET(f,w,{get:h[w],enumerable:!0})},hb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of uv(h))if(!tv.call(f,$)&&$!==w)ET(f,$,{get:()=>h[$],enumerable:!(s=ov(h,$))||s.enumerable})}return f},wb=(f)=>hb(ET({},"__esModule",{value:!0}),f),YW={};fb(YW,{RequestBuilder:()=>QW,collectBody:()=>sb,extendedEncodeURIComponent:()=>rT,requestBuilder:()=>rb,resolvedPath:()=>MW});KW.exports=wb(YW);var $T=sT(),sb=async(f=new Uint8Array,h)=>{if(f instanceof Uint8Array)return $T.Uint8ArrayBlobAdapter.mutate(f);if(!f)return $T.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let w=h.streamCollector(f);return $T.Uint8ArrayBlobAdapter.mutate(await w)};function rT(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(h){return"%"+h.charCodeAt(0).toString(16).toUpperCase()})}var $b=t0(),MW=(f,h,w,s,$,r)=>{if(h!=null&&h[w]!==void 0){let E=s();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,r?E.split("/").map((U)=>rT(U)).join("/"):rT(E))}else throw new Error("No value provided for input HTTP label: "+w+".");return f};function rb(f,h){return new QW(f,h)}var QW=class{constructor(f,h){this.input=f,this.context=h,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:f,protocol:h="https",port:w,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new $b.HttpRequest({protocol:h,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((h)=>{this.path=`${h?.endsWith("/")?h.slice(0,-1):h||""}`+f}),this}p(f,h,w,s){return this.resolvePathStack.push(($)=>{this.path=MW($,this.input,f,h,w,s)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}}});var m0=H((RE0,lW)=>{var{defineProperty:Y5,getOwnPropertyDescriptor:Eb,getOwnPropertyNames:Ub}=Object,Tb=Object.prototype.hasOwnProperty,j0=(f,h)=>Y5(f,"name",{value:h,configurable:!0}),Fb=(f,h)=>{for(var w in h)Y5(f,w,{get:h[w],enumerable:!0})},Cb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ub(h))if(!Tb.call(f,$)&&$!==w)Y5(f,$,{get:()=>h[$],enumerable:!(s=Eb(h,$))||s.enumerable})}return f},Ib=(f)=>Cb(Y5({},"__esModule",{value:!0}),f),ZW={};Fb(ZW,{DefaultIdentityProviderConfig:()=>Qb,EXPIRATION_MS:()=>jW,HttpApiKeyAuthSigner:()=>Kb,HttpBearerAuthSigner:()=>Zb,NoAuthSigner:()=>Jb,createIsIdentityExpiredFunction:()=>yW,createPaginator:()=>qW,doesIdentityRequireRefresh:()=>OW,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Bb,getHttpAuthSchemePlugin:()=>Wb,getHttpSigningPlugin:()=>Rb,getSmithyContext:()=>Lb,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>PW,httpAuthSchemeMiddleware:()=>UT,httpAuthSchemeMiddlewareOptions:()=>HW,httpSigningMiddleware:()=>NW,httpSigningMiddlewareOptions:()=>DW,isIdentityExpired:()=>Vb,memoizeIdentityProvider:()=>Pb,normalizeProvider:()=>Xb,requestBuilder:()=>Mb.requestBuilder,setFeature:()=>kW});lW.exports=Ib(ZW);var S5=F1(),Lb=j0((f)=>f[S5.SMITHY_CONTEXT_KEY]||(f[S5.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),JW=Ih();function VW(f){let h=new Map;for(let w of f)h.set(w.schemeId,w);return h}j0(VW,"convertHttpAuthSchemesToMap");var UT=j0((f,h)=>(w,s)=>async($)=>{let r=f.httpAuthSchemeProvider(await h.httpAuthSchemeParametersProvider(f,s,$.input)),E=VW(f.httpAuthSchemes),U=JW.getSmithyContext(s),T=[];for(let F of r){let C=E.get(F.schemeId);if(!C){T.push(`HttpAuthScheme \`${F.schemeId}\` was not enabled for this service.`);continue}let I=C.identityProvider(await h.identityProviderConfigProvider(f));if(!I){T.push(`HttpAuthScheme \`${F.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:L={},signingProperties:W={}}=F.propertiesExtractor?.(f,s)||{};F.identityProperties=Object.assign(F.identityProperties||{},L),F.signingProperties=Object.assign(F.signingProperties||{},W),U.selectedHttpAuthScheme={httpAuthOption:F,identity:await I(F.identityProperties),signer:C.signer};break}if(!U.selectedHttpAuthScheme)throw new Error(T.join(`
12
+ `));return w($)},"httpAuthSchemeMiddleware"),PW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Bb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(UT(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),PW)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Gb=Dw(),HW={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Gb.serializerMiddlewareOption.name},Wb=j0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(UT(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),HW)}}),"getHttpAuthSchemePlugin"),TT=t0(),zb=j0((f)=>(h)=>{throw h},"defaultErrorHandler"),Ab=j0((f,h)=>{},"defaultSuccessHandler"),NW=j0((f)=>(h,w)=>async(s)=>{if(!TT.HttpRequest.isInstance(s.request))return h(s);let r=JW.getSmithyContext(w).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:E={}},identity:U,signer:T}=r,F=await h({...s,request:await T.sign(s.request,U,E)}).catch((T.errorHandler||zb)(E));return(T.successHandler||Ab)(F.response,E),F},"httpSigningMiddleware"),DW={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Rb=j0((f)=>({applyToStack:(h)=>{h.addRelativeTo(NW(f),DW)}}),"getHttpSigningPlugin"),Xb=j0((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider"),Sb=j0(async(f,h,w,s=(r)=>r,...$)=>{let r=new f(w);return r=s(r)??r,await h.send(r,...$)},"makePagedClientRequest");function qW(f,h,w,s,$){return j0(async function*r(E,U,...T){let F=U,C=E.startingToken??F[w],I=!0,L;while(I){if(F[w]=C,$)F[$]=F[$]??E.pageSize;if(E.client instanceof f)L=await Sb(h,E.client,U,E.withCommand,...T);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield L;let W=C;C=Yb(L,s),I=!!(C&&(!E.stopOnSameToken||C!==W))}return},"paginateOperation")}j0(qW,"createPaginator");var Yb=j0((f,h)=>{let w=f,s=h.split(".");for(let $ of s){if(!w||typeof w!=="object")return;w=w[$]}return w},"get"),Mb=yw();function kW(f,h,w){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[h]=w}j0(kW,"setFeature");var Qb=class{constructor(f){this.authSchemes=new Map;for(let[h,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(h,w)}static{j0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(f){return this.authSchemes.get(f)}},Kb=class{static{j0(this,"HttpApiKeyAuthSigner")}async sign(f,h,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!h.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=TT.HttpRequest.clone(f);if(w.in===S5.HttpApiKeyAuthLocation.QUERY)s.query[w.name]=h.apiKey;else if(w.in===S5.HttpApiKeyAuthLocation.HEADER)s.headers[w.name]=w.scheme?`${w.scheme} ${h.apiKey}`:h.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return s}},Zb=class{static{j0(this,"HttpBearerAuthSigner")}async sign(f,h,w){let s=TT.HttpRequest.clone(f);if(!h.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${h.token}`,s}},Jb=class{static{j0(this,"NoAuthSigner")}async sign(f,h,w){return f}},yW=j0((f)=>(h)=>OW(h)&&h.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),jW=300000,Vb=yW(jW),OW=j0((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),Pb=j0((f,h,w)=>{if(f===void 0)return;let s=typeof f!=="function"?async()=>Promise.resolve(f):f,$,r,E,U=!1,T=j0(async(F)=>{if(!r)r=s(F);try{$=await r,E=!0,U=!1}finally{r=void 0}return $},"coalesceProvider");if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);return $};return async(F)=>{if(!E||F?.forceRefresh)$=await T(F);if(U)return $;if(!w($))return U=!0,$;if(h($))return await T(F),$;return $}},"memoizeIdentityProvider")});function Hb(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function jw(f){let h=vW.normalizeProvider(f.userAgentAppId??FT),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:async()=>{let s=await h();if(!Hb(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}var vW,FT=void 0;var bW=B(()=>{vW=p(m0(),1)});class _h{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}}var Nb,S$=(f)=>Nb.test(f)||f.startsWith("[")&&f.endsWith("]");var CT=B(()=>{Nb=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Db,Y$=(f,h=!1)=>{if(!h)return Db.test(f);let w=f.split(".");for(let s of w)if(!Y$(s))return!1;return!0};var IT=B(()=>{Db=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var ff;var M5=B(()=>{ff={}});var df="endpoints";function N1(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${N1(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(N1).join(", ")})`;return JSON.stringify(f,null,2)}var M$=()=>{};var H0;var mW=B(()=>{H0=class H0 extends Error{constructor(f){super(f);this.name="EndpointError"}}});var dW=()=>{};var iW=()=>{};var cW=()=>{};var gW=()=>{};var xW=()=>{};var _W=()=>{};var D1=B(()=>{mW();dW();iW();cW();gW();xW();_W()});var nW=(f,h)=>f===h;var eW=(f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new H0(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new H0(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w};var aW=B(()=>{D1()});var Q5=(f,h)=>eW(h).reduce((w,s)=>{if(typeof w!=="object")throw new H0(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f);var pW=B(()=>{D1();aW()});var oW=(f)=>f!=null;var uW=(f)=>!f;var K5,LT,tW=(f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:W,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${W?`:${W}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(K5.EndpointURLScheme).includes(T))return null;let F=S$($),C=w.includes(`${s}:${LT[T]}`)||typeof f==="string"&&f.includes(`${s}:${LT[T]}`),I=`${s}${C?`:${LT[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}};var fz=B(()=>{K5=p(F1(),1);CT();LT={[K5.EndpointURLScheme.HTTP]:80,[K5.EndpointURLScheme.HTTPS]:443}});var hz=(f,h)=>f===h;var wz=(f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)};var sz=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`);var BT=B(()=>{pW();IT();fz()});var $z;var rz=B(()=>{BT();$z={booleanEquals:nW,getAttr:Q5,isSet:oW,isValidHostLabel:Y$,not:uW,parseURL:tW,stringEquals:hz,substring:wz,uriEncode:sz}});var Z5=(f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(Q5(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")};var GT=B(()=>{BT()});var Ez=({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]};var Wh=(f,h,w)=>{if(typeof f==="string")return Z5(f,w);else if(f.fn)return J5(f,w);else if(f.ref)return Ez(f,w);throw new H0(`'${h}': ${String(f)} is not a string, function or reference.`)};var Q$=B(()=>{D1();WT();GT()});var J5=({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:Wh(r,"arg",w)),$=f.split(".");if($[0]in ff&&$[1]!=null)return ff[$[0]][$[1]](...s);return $z[f](...s)};var WT=B(()=>{M5();rz();Q$()});var Uz=({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new H0(`'${f}' is already defined in Reference Record.`);let s=J5(h,w);return w.logger?.debug?.(`${df} evaluateCondition: ${N1(h)} = ${N1(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}};var Tz=B(()=>{M$();D1();WT()});var Ow=(f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=Uz(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${df} assign: ${r.name} := ${N1(r.value)}`)}return{result:!0,referenceRecord:w}};var V5=B(()=>{M$();Tz()});var Fz=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=Wh(r,"Header value entry",h);if(typeof E!=="string")throw new H0(`Header '${s}' value '${E}' is not a string`);return E})}),{});var Cz=B(()=>{D1();Q$()});var zT=(f,h)=>{if(Array.isArray(f))return f.map((w)=>zT(w,h));switch(typeof f){case"string":return Z5(f,h);case"object":if(f===null)throw new H0(`Unexpected endpoint property: ${f}`);return P5(f,h);case"boolean":return f;default:throw new H0(`Unexpected endpoint property type: ${typeof f}`)}};var Iz=B(()=>{D1();GT();AT()});var P5=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:zT($,h)}),{});var AT=B(()=>{Iz()});var Lz=(f,h)=>{let w=Wh(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new H0(`Endpoint URL must be a string, got ${typeof w}`)};var Bz=B(()=>{D1();Q$()});var Gz=(f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${df} Resolving endpoint from template: ${N1(s)}`),{...F!=null&&{headers:Fz(F,E)},...T!=null&&{properties:P5(T,E)},url:Lz(U,E)}};var Wz=B(()=>{M$();V5();Cz();AT();Bz()});var zz=(f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;throw new H0(Wh(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))};var Az=B(()=>{D1();V5();Q$()});var Rz=(f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=Ow(w,h);if(!$)return;return H5(s,{...h,referenceRecord:{...h.referenceRecord,...r}})};var Xz=B(()=>{V5();RT()});var H5=(f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=Gz(w,h);if(s)return s}else if(w.type==="error")zz(w,h);else if(w.type==="tree"){let s=Rz(w,h);if(s)return s}else throw new H0(`Unknown endpoint rule: ${w}`);throw new H0("Rules evaluation failed")};var RT=B(()=>{D1();Wz();Az();Xz()});var Sz=B(()=>{M5();RT()});var nh=(f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${df} Initial EndpointParams: ${N1(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new H0(`Missing required parameter: '${F}'`);let T=H5(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${df} Resolved endpoint: ${N1(T)}`),T};var Yz=B(()=>{M$();D1();Sz()});var cf=B(()=>{CT();IT();M5();Yz();D1()});var XT=B(()=>{cf()});var ST=(f,h=!1)=>{if(h){for(let w of f.split("."))if(!ST(w))return!1;return!0}if(!Y$(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(S$(f))return!1;return!0};var Mz=B(()=>{cf();XT()});var Qz=(f)=>{let h=f.split(":");if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(":")==="")return null;let T=U.map((F)=>F.split("/")).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}};var Zz;var Kz=B(()=>{Zz={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"}});var kb,yb="",Jz=(f)=>{let{partitions:h}=kb;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},Vz=()=>yb;var YT=B(()=>{Kz();kb=Zz});var eh;var Pz=B(()=>{cf();Mz();YT();eh={isVirtualHostableS3Bucket:ST,parseArn:Qz,partition:Jz};ff.aws=eh});var Hz=B(()=>{cf()});var Nz=B(()=>{cf()});var Dz=()=>{};var qz=()=>{};var kz=()=>{};var yz=()=>{};var jz=()=>{};var Oz=B(()=>{Nz();Dz();qz();kz();yz();jz()});var K$=B(()=>{Pz();YT();XT();Hz();Oz()});var k5=H((tU0,q5)=>{var lz,vz,bz,mz,dz,iz,cz,gz,xz,_z,nz,ez,az,N5,MT,pz,oz,uz,lw,tz,fA,hA,wA,sA,$A,rA,EA,UA,D5,TA,FA,CA;(function(f){var h=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){f(w(h,w(s)))});else if(typeof q5==="object"&&typeof tU0==="object")f(w(h,w(tU0)));else f(w(h));function w(s,$){if(s!==h)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(r,E){return s[r]=$?$(r,E):E}}})(function(f){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,E){r.__proto__=E}||function(r,E){for(var U in E)if(Object.prototype.hasOwnProperty.call(E,U))r[U]=E[U]};lz=function(r,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");h(r,E);function U(){this.constructor=r}r.prototype=E===null?Object.create(E):(U.prototype=E.prototype,new U)},vz=Object.assign||function(r){for(var E,U=1,T=arguments.length;U<T;U++){E=arguments[U];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))r[F]=E[F]}return r},bz=function(r,E){var U={};for(var T in r)if(Object.prototype.hasOwnProperty.call(r,T)&&E.indexOf(T)<0)U[T]=r[T];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,T=Object.getOwnPropertySymbols(r);F<T.length;F++)if(E.indexOf(T[F])<0&&Object.prototype.propertyIsEnumerable.call(r,T[F]))U[T[F]]=r[T[F]]}return U},mz=function(r,E,U,T){var F=arguments.length,C=F<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,U):T,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")C=Reflect.decorate(r,E,U,T);else for(var L=r.length-1;L>=0;L--)if(I=r[L])C=(F<3?I(C):F>3?I(E,U,C):I(E,U))||C;return F>3&&C&&Object.defineProperty(E,U,C),C},dz=function(r,E){return function(U,T){E(U,T,r)}},iz=function(r,E,U,T,F,C){function I(b0){if(b0!==void 0&&typeof b0!=="function")throw new TypeError("Function expected");return b0}var L=T.kind,W=L==="getter"?"get":L==="setter"?"set":"value",X=!E&&r?T.static?r:r.prototype:null,Q=E||(X?Object.getOwnPropertyDescriptor(X,T.name):{}),M,q=!1;for(var N=U.length-1;N>=0;N--){var y={};for(var n in T)y[n]=n==="access"?{}:T[n];for(var n in T.access)y.access[n]=T.access[n];y.addInitializer=function(b0){if(q)throw new TypeError("Cannot add initializers after decoration has completed");C.push(I(b0||null))};var L0=U[N](L==="accessor"?{get:Q.get,set:Q.set}:Q[W],y);if(L==="accessor"){if(L0===void 0)continue;if(L0===null||typeof L0!=="object")throw new TypeError("Object expected");if(M=I(L0.get))Q.get=M;if(M=I(L0.set))Q.set=M;if(M=I(L0.init))F.unshift(M)}else if(M=I(L0))if(L==="field")F.unshift(M);else Q[W]=M}if(X)Object.defineProperty(X,T.name,Q);q=!0},cz=function(r,E,U){var T=arguments.length>2;for(var F=0;F<E.length;F++)U=T?E[F].call(r,U):E[F].call(r);return T?U:void 0},gz=function(r){return typeof r==="symbol"?r:"".concat(r)},xz=function(r,E,U){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:U?"".concat(U," ",E):E})},_z=function(r,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,E)},nz=function(r,E,U,T){function F(C){return C instanceof U?C:new U(function(I){I(C)})}return new(U||(U=Promise))(function(C,I){function L(Q){try{X(T.next(Q))}catch(M){I(M)}}function W(Q){try{X(T.throw(Q))}catch(M){I(M)}}function X(Q){Q.done?C(Q.value):F(Q.value).then(L,W)}X((T=T.apply(r,E||[])).next())})},ez=function(r,E){var U={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},T,F,C,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=L(0),I.throw=L(1),I.return=L(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(X){return function(Q){return W([X,Q])}}function W(X){if(T)throw new TypeError("Generator is already executing.");while(I&&(I=0,X[0]&&(U=0)),U)try{if(T=1,F&&(C=X[0]&2?F.return:X[0]?F.throw||((C=F.return)&&C.call(F),0):F.next)&&!(C=C.call(F,X[1])).done)return C;if(F=0,C)X=[X[0]&2,C.value];switch(X[0]){case 0:case 1:C=X;break;case 4:return U.label++,{value:X[1],done:!1};case 5:U.label++,F=X[1],X=[0];continue;case 7:X=U.ops.pop(),U.trys.pop();continue;default:if((C=U.trys,!(C=C.length>0&&C[C.length-1]))&&(X[0]===6||X[0]===2)){U=0;continue}if(X[0]===3&&(!C||X[1]>C[0]&&X[1]<C[3])){U.label=X[1];break}if(X[0]===6&&U.label<C[1]){U.label=C[1],C=X;break}if(C&&U.label<C[2]){U.label=C[2],U.ops.push(X);break}if(C[2])U.ops.pop();U.trys.pop();continue}X=E.call(r,U)}catch(Q){X=[6,Q],F=0}finally{T=C=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},az=function(r,E){for(var U in r)if(U!=="default"&&!Object.prototype.hasOwnProperty.call(E,U))D5(E,r,U)},D5=Object.create?function(r,E,U,T){if(T===void 0)T=U;var F=Object.getOwnPropertyDescriptor(E,U);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[U]}};Object.defineProperty(r,T,F)}:function(r,E,U,T){if(T===void 0)T=U;r[T]=E[U]},N5=function(r){var E=typeof Symbol==="function"&&Symbol.iterator,U=E&&r[E],T=0;if(U)return U.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&T>=r.length)r=void 0;return{value:r&&r[T++],done:!r}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},MT=function(r,E){var U=typeof Symbol==="function"&&r[Symbol.iterator];if(!U)return r;var T=U.call(r),F,C=[],I;try{while((E===void 0||E-- >0)&&!(F=T.next()).done)C.push(F.value)}catch(L){I={error:L}}finally{try{if(F&&!F.done&&(U=T.return))U.call(T)}finally{if(I)throw I.error}}return C},pz=function(){for(var r=[],E=0;E<arguments.length;E++)r=r.concat(MT(arguments[E]));return r},oz=function(){for(var r=0,E=0,U=arguments.length;E<U;E++)r+=arguments[E].length;for(var T=Array(r),F=0,E=0;E<U;E++)for(var C=arguments[E],I=0,L=C.length;I<L;I++,F++)T[F]=C[I];return T},uz=function(r,E,U){if(U||arguments.length===2){for(var T=0,F=E.length,C;T<F;T++)if(C||!(T in E)){if(!C)C=Array.prototype.slice.call(E,0,T);C[T]=E[T]}}return r.concat(C||Array.prototype.slice.call(E))},lw=function(r){return this instanceof lw?(this.v=r,this):new lw(r)},tz=function(r,E,U){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=U.apply(r,E||[]),F,C=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",I),F[Symbol.asyncIterator]=function(){return this},F;function I(N){return function(y){return Promise.resolve(y).then(N,M)}}function L(N,y){if(T[N]){if(F[N]=function(n){return new Promise(function(L0,b0){C.push([N,n,L0,b0])>1||W(N,n)})},y)F[N]=y(F[N])}}function W(N,y){try{X(T[N](y))}catch(n){q(C[0][3],n)}}function X(N){N.value instanceof lw?Promise.resolve(N.value.v).then(Q,M):q(C[0][2],N)}function Q(N){W("next",N)}function M(N){W("throw",N)}function q(N,y){if(N(y),C.shift(),C.length)W(C[0][0],C[0][1])}},fA=function(r){var E,U;return E={},T("next"),T("throw",function(F){throw F}),T("return"),E[Symbol.iterator]=function(){return this},E;function T(F,C){E[F]=r[F]?function(I){return(U=!U)?{value:lw(r[F](I)),done:!1}:C?C(I):I}:C}},hA=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=r[Symbol.asyncIterator],U;return E?E.call(r):(r=typeof N5==="function"?N5(r):r[Symbol.iterator](),U={},T("next"),T("throw"),T("return"),U[Symbol.asyncIterator]=function(){return this},U);function T(C){U[C]=r[C]&&function(I){return new Promise(function(L,W){I=r[C](I),F(L,W,I.done,I.value)})}}function F(C,I,L,W){Promise.resolve(W).then(function(X){C({value:X,done:L})},I)}},wA=function(r,E){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:E});else r.raw=E;return r};var w=Object.create?function(r,E){Object.defineProperty(r,"default",{enumerable:!0,value:E})}:function(r,E){r.default=E},s=function(r){return s=Object.getOwnPropertyNames||function(E){var U=[];for(var T in E)if(Object.prototype.hasOwnProperty.call(E,T))U[U.length]=T;return U},s(r)};sA=function(r){if(r&&r.__esModule)return r;var E={};if(r!=null){for(var U=s(r),T=0;T<U.length;T++)if(U[T]!=="default")D5(E,r,U[T])}return w(E,r),E},$A=function(r){return r&&r.__esModule?r:{default:r}},rA=function(r,E,U,T){if(U==="a"&&!T)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?r!==E||!T:!E.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return U==="m"?T:U==="a"?T.call(r):T?T.value:E.get(r)},EA=function(r,E,U,T,F){if(T==="m")throw new TypeError("Private method is not writable");if(T==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?r!==E||!F:!E.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return T==="a"?F.call(r,U):F?F.value=U:E.set(r,U),U},UA=function(r,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?E===r:r.has(E)},TA=function(r,E,U){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var T,F;if(U){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");T=E[Symbol.asyncDispose]}if(T===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(T=E[Symbol.dispose],U)F=T}if(typeof T!=="function")throw new TypeError("Object not disposable.");if(F)T=function(){try{F.call(this)}catch(C){return Promise.reject(C)}};r.stack.push({value:E,dispose:T,async:U})}else if(U)r.stack.push({async:!0});return E};var $=typeof SuppressedError==="function"?SuppressedError:function(r,E,U){var T=new Error(U);return T.name="SuppressedError",T.error=r,T.suppressed=E,T};FA=function(r){function E(C){r.error=r.hasError?new $(C,r.error,"An error was suppressed during disposal."):C,r.hasError=!0}var U,T=0;function F(){while(U=r.stack.pop())try{if(!U.async&&T===1)return T=0,r.stack.push(U),Promise.resolve().then(F);if(U.dispose){var C=U.dispose.call(U.value);if(U.async)return T|=2,Promise.resolve(C).then(F,function(I){return E(I),F()})}else T|=1}catch(I){E(I)}if(T===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return F()},CA=function(r,E){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(U,T,F,C,I){return T?E?".jsx":".js":F&&(!C||!I)?U:F+C+"."+I.toLowerCase()+"js"});return r},f("__extends",lz),f("__assign",vz),f("__rest",bz),f("__decorate",mz),f("__param",dz),f("__esDecorate",iz),f("__runInitializers",cz),f("__propKey",gz),f("__setFunctionName",xz),f("__metadata",_z),f("__awaiter",nz),f("__generator",ez),f("__exportStar",az),f("__createBinding",D5),f("__values",N5),f("__read",MT),f("__spread",pz),f("__spreadArrays",oz),f("__spreadArray",uz),f("__await",lw),f("__asyncGenerator",tz),f("__asyncDelegator",fA),f("__asyncValues",hA),f("__makeTemplateObject",wA),f("__importStar",sA),f("__importDefault",$A),f("__classPrivateFieldGet",rA),f("__classPrivateFieldSet",EA),f("__classPrivateFieldIn",UA),f("__addDisposableResource",TA),f("__disposeResources",FA),f("__rewriteRelativeImportExtension",CA)})});var I1=H((fT0,GA)=>{var{defineProperty:y5,getOwnPropertyDescriptor:jb,getOwnPropertyNames:Ob}=Object,lb=Object.prototype.hasOwnProperty,KT=(f,h)=>y5(f,"name",{value:h,configurable:!0}),vb=(f,h)=>{for(var w in h)y5(f,w,{get:h[w],enumerable:!0})},bb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ob(h))if(!lb.call(f,$)&&$!==w)y5(f,$,{get:()=>h[$],enumerable:!(s=jb(h,$))||s.enumerable})}return f},mb=(f)=>bb(y5({},"__esModule",{value:!0}),f),IA={};vb(IA,{emitWarningIfUnsupportedVersion:()=>db,setCredentialFeature:()=>LA,setFeature:()=>BA,state:()=>QT});GA.exports=mb(IA);var QT={warningEmitted:!1},db=KT((f)=>{if(f&&!QT.warningEmitted&&parseInt(f.substring(1,f.indexOf(".")))<18)QT.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
13
13
  no longer support Node.js 16.x on January 6, 2025.
14
14
 
15
15
  To continue receiving updates to AWS services, bug fixes, and security
16
16
  updates please upgrade to a supported Node.js LTS version.
17
17
 
18
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Lz(f,h,w){if(!f.$source)f.$source={};return f.$source[h]=w,f}KT(Lz,"setCredentialFeature");function Bz(f,h,w){if(!f.__aws_sdk_context)f.__aws_sdk_context={features:{}};else if(!f.__aws_sdk_context.features)f.__aws_sdk_context.features={};f.__aws_sdk_context.features[h]=w}KT(Bz,"setFeature")});var D$=H(($T0,Az)=>{var{defineProperty:b4,getOwnPropertyDescriptor:gb,getOwnPropertyNames:xb}=Object,_b=Object.prototype.hasOwnProperty,ah=(f,h)=>b4(f,"name",{value:h,configurable:!0}),nb=(f,h)=>{for(var w in h)b4(f,w,{get:h[w],enumerable:!0})},eb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of xb(h))if(!_b.call(f,$)&&$!==w)b4(f,$,{get:()=>h[$],enumerable:!(s=gb(h,$))||s.enumerable})}return f},ab=(f)=>eb(b4({},"__esModule",{value:!0}),f),Wz={};nb(Wz,{CredentialsProviderError:()=>pb,ProviderError:()=>m4,TokenProviderError:()=>ob,chain:()=>ub,fromStatic:()=>tb,memoize:()=>fm});Az.exports=ab(Wz);var m4=class f extends Error{constructor(h,w=!0){let s,$=!0;if(typeof w==="boolean")s=void 0,$=w;else if(w!=null&&typeof w==="object")s=w.logger,$=w.tryNextLink??!0;super(h);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,f.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${h}`)}static{ah(this,"ProviderError")}static from(h,w=!0){return Object.assign(new this(h.message,w),h)}},pb=class f extends m4{constructor(h,w=!0){super(h,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"CredentialsProviderError")}},ob=class f extends m4{constructor(h,w=!0){super(h,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"TokenProviderError")}},ub=ah((...f)=>async()=>{if(f.length===0)throw new m4("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h},"chain"),tb=ah((f)=>()=>Promise.resolve(f),"fromStatic"),fm=ah((f,h,w)=>{let s,$,r,E=!1,U=ah(async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s},"coalesceProvider");if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}},"memoize")});var kz=H((rT0,qz)=>{var{defineProperty:_4,getOwnPropertyDescriptor:hm,getOwnPropertyNames:wm}=Object,sm=Object.prototype.hasOwnProperty,p0=(f,h)=>_4(f,"name",{value:h,configurable:!0}),$m=(f,h)=>{for(var w in h)_4(f,w,{get:h[w],enumerable:!0})},rm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of wm(h))if(!sm.call(f,$)&&$!==w)_4(f,$,{get:()=>h[$],enumerable:!(s=hm(h,$))||s.enumerable})}return f},Em=(f)=>rm(_4({},"__esModule",{value:!0}),f),Yz={};$m(Yz,{SignatureV4:()=>qm,clearCredentialCache:()=>Qm,createScope:()=>c4,getCanonicalHeaders:()=>PT,getCanonicalQuery:()=>Hz,getPayloadHash:()=>x4,getSigningKey:()=>Pz,moveHeadersToQuery:()=>Dz,prepareRequest:()=>NT});qz.exports=Em(Yz);var zz=Ih(),ZT=u1(),Um="X-Amz-Algorithm",Tm="X-Amz-Credential",Mz="X-Amz-Date",Fm="X-Amz-SignedHeaders",Cm="X-Amz-Expires",Qz="X-Amz-Signature",Kz="X-Amz-Security-Token",Zz="authorization",Jz=Mz.toLowerCase(),Im="date",Lm=[Zz,Jz,Im],Bm=Qz.toLowerCase(),VT="x-amz-content-sha256",Gm=Kz.toLowerCase(),Wm={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Am=/^proxy-/,zm=/^sec-/,JT="AWS4-HMAC-SHA256",Rm="AWS4-HMAC-SHA256-PAYLOAD",Xm="UNSIGNED-PAYLOAD",Sm=50,Vz="aws4_request",Ym=604800,zh=uU(),Mm=u1(),bw={},i4=[],c4=p0((f,h,w)=>`${f}/${h}/${w}/${Vz}`,"createScope"),Pz=p0(async(f,h,w,s,$)=>{let r=await Rz(f,h.secretAccessKey,h.accessKeyId),E=`${w}:${s}:${$}:${zh.toHex(r)}:${h.sessionToken}`;if(E in bw)return bw[E];i4.push(E);while(i4.length>Sm)delete bw[i4.shift()];let U=`AWS4${h.secretAccessKey}`;for(let T of[w,s,$,Vz])U=await Rz(f,U,T);return bw[E]=U},"getSigningKey"),Qm=p0(()=>{i4.length=0,Object.keys(bw).forEach((f)=>{delete bw[f]})},"clearCredentialCache"),Rz=p0((f,h,w)=>{let s=new f(h);return s.update(Mm.toUint8Array(w)),s.digest()},"hmac"),PT=p0(({headers:f},h,w)=>{let s={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;let r=$.toLowerCase();if(r in Wm||h?.has(r)||Am.test(r)||zm.test(r)){if(!w||w&&!w.has(r))continue}s[r]=f[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),g4=gU(),Hz=p0(({query:f={}})=>{let h=[],w={};for(let s of Object.keys(f)){if(s.toLowerCase()===Bm)continue;let $=g4.escapeUri(s);h.push($);let r=f[s];if(typeof r==="string")w[$]=`${$}=${g4.escapeUri(r)}`;else if(Array.isArray(r))w[$]=r.slice(0).reduce((E,U)=>E.concat([`${$}=${g4.escapeUri(U)}`]),[]).sort().join("&")}return h.sort().map((s)=>w[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Km=OU(),Zm=u1(),x4=p0(async({headers:f,body:h},w)=>{for(let s of Object.keys(f))if(s.toLowerCase()===VT)return f[s];if(h==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof h==="string"||ArrayBuffer.isView(h)||Km.isArrayBuffer(h)){let s=new w;return s.update(Zm.toUint8Array(h)),zh.toHex(await s.digest())}return Xm},"getPayloadHash"),Xz=u1(),Jm=class{static{p0(this,"HeaderFormatter")}format(f){let h=[];for(let $ of Object.keys(f)){let r=Xz.fromUtf8($);h.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(f[$]))}let w=new Uint8Array(h.reduce(($,r)=>$+r.byteLength,0)),s=0;for(let $ of h)w.set($,s),s+=$.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let h=new DataView(new ArrayBuffer(3));return h.setUint8(0,3),h.setInt16(1,f.value,!1),new Uint8Array(h.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(f.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);let r=new Uint8Array($.buffer);return r.set(f.value,3),r;case"string":let E=Xz.fromUtf8(f.value),U=new DataView(new ArrayBuffer(3+E.byteLength));U.setUint8(0,7),U.setUint16(1,E.byteLength,!1);let T=new Uint8Array(U.buffer);return T.set(E,3),T;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(Pm.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!Vm.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let C=new Uint8Array(17);return C[0]=9,C.set(zh.fromHex(f.value.replace(/\-/g,"")),1),C}}},Vm=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Pm=class f{constructor(h){if(this.bytes=h,h.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{p0(this,"Int64")}static fromNumber(h){if(h>9223372036854776000||h<-9223372036854776000)throw new Error(`${h} is too large (or, if negative, too small) to represent as an Int64`);let w=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(h));s>-1&&$>0;s--,$/=256)w[s]=$;if(h<0)HT(w);return new f(w)}valueOf(){let h=this.bytes.slice(0),w=h[0]&128;if(w)HT(h);return parseInt(zh.toHex(h),16)*(w?-1:1)}toString(){return String(this.valueOf())}};function HT(f){for(let h=0;h<8;h++)f[h]^=255;for(let h=7;h>-1;h--)if(f[h]++,f[h]!==0)break}p0(HT,"negate");var Hm=p0((f,h)=>{f=f.toLowerCase();for(let w of Object.keys(h))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),Nz=t0(),Dz=p0((f,h={})=>{let{headers:w,query:s={}}=Nz.HttpRequest.clone(f);for(let $ of Object.keys(w)){let r=$.toLowerCase();if(r.slice(0,6)==="x-amz-"&&!h.unhoistableHeaders?.has(r)||h.hoistableHeaders?.has(r))s[$]=w[$],delete w[$]}return{...f,headers:w,query:s}},"moveHeadersToQuery"),NT=p0((f)=>{f=Nz.HttpRequest.clone(f);for(let h of Object.keys(f.headers))if(Lm.indexOf(h.toLowerCase())>-1)delete f.headers[h];return f},"prepareRequest"),Nm=p0((f)=>Dm(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Dm=p0((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),qm=class{constructor({applyChecksum:f,credentials:h,region:w,service:s,sha256:$,uriEscapePath:r=!0}){this.headerFormatter=new Jm,this.service=s,this.sha256=$,this.uriEscapePath=r,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=zz.normalizeProvider(w),this.credentialProvider=zz.normalizeProvider(h)}static{p0(this,"SignatureV4")}async presign(f,h={}){let{signingDate:w=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:r,signableHeaders:E,hoistableHeaders:U,signingRegion:T,signingService:F}=h,C=await this.credentialProvider();this.validateResolvedCredentials(C);let I=T??await this.regionProvider(),{longDate:L,shortDate:W}=d4(w);if(s>Ym)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=c4(W,I,F??this.service),Q=Dz(NT(f),{unhoistableHeaders:r,hoistableHeaders:U});if(C.sessionToken)Q.query[Kz]=C.sessionToken;Q.query[Um]=JT,Q.query[Tm]=`${C.accessKeyId}/${X}`,Q.query[Mz]=L,Q.query[Cm]=s.toString(10);let M=PT(Q,$,E);return Q.query[Fm]=Sz(M),Q.query[Qz]=await this.getSignature(L,X,this.getSigningKey(C,I,W,F),this.createCanonicalRequest(Q,M,await x4(f,this.sha256))),Q}async sign(f,h){if(typeof f==="string")return this.signString(f,h);else if(f.headers&&f.payload)return this.signEvent(f,h);else if(f.message)return this.signMessage(f,h);else return this.signRequest(f,h)}async signEvent({headers:f,payload:h},{signingDate:w=new Date,priorSignature:s,signingRegion:$,signingService:r}){let E=$??await this.regionProvider(),{shortDate:U,longDate:T}=d4(w),F=c4(U,E,r??this.service),C=await x4({headers:{},body:h},this.sha256),I=new this.sha256;I.update(f);let L=zh.toHex(await I.digest()),W=[Rm,T,F,s,L,C].join(`
19
- `);return this.signString(W,{signingDate:w,signingRegion:E,signingService:r})}async signMessage(f,{signingDate:h=new Date,signingRegion:w,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:h,signingRegion:w,signingService:s,priorSignature:f.priorSignature}).then((r)=>{return{message:f.message,signature:r}})}async signString(f,{signingDate:h=new Date,signingRegion:w,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let r=w??await this.regionProvider(),{shortDate:E}=d4(h),U=new this.sha256(await this.getSigningKey($,r,E,s));return U.update(ZT.toUint8Array(f)),zh.toHex(await U.digest())}async signRequest(f,{signingDate:h=new Date,signableHeaders:w,unsignableHeaders:s,signingRegion:$,signingService:r}={}){let E=await this.credentialProvider();this.validateResolvedCredentials(E);let U=$??await this.regionProvider(),T=NT(f),{longDate:F,shortDate:C}=d4(h),I=c4(C,U,r??this.service);if(T.headers[Jz]=F,E.sessionToken)T.headers[Gm]=E.sessionToken;let L=await x4(T,this.sha256);if(!Hm(VT,T.headers)&&this.applyChecksum)T.headers[VT]=L;let W=PT(T,s,w),X=await this.getSignature(F,I,this.getSigningKey(E,U,C,r),this.createCanonicalRequest(T,W,L));return T.headers[Zz]=`${JT} Credential=${E.accessKeyId}/${I}, SignedHeaders=${Sz(W)}, Signature=${X}`,T}createCanonicalRequest(f,h,w){let s=Object.keys(h).sort();return`${f.method}
18
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function LA(f,h,w){if(!f.$source)f.$source={};return f.$source[h]=w,f}KT(LA,"setCredentialFeature");function BA(f,h,w){if(!f.__aws_sdk_context)f.__aws_sdk_context={features:{}};else if(!f.__aws_sdk_context.features)f.__aws_sdk_context.features={};f.__aws_sdk_context.features[h]=w}KT(BA,"setFeature")});var Z$=H((hT0,zA)=>{var{defineProperty:j5,getOwnPropertyDescriptor:ib,getOwnPropertyNames:cb}=Object,gb=Object.prototype.hasOwnProperty,ah=(f,h)=>j5(f,"name",{value:h,configurable:!0}),xb=(f,h)=>{for(var w in h)j5(f,w,{get:h[w],enumerable:!0})},_b=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of cb(h))if(!gb.call(f,$)&&$!==w)j5(f,$,{get:()=>h[$],enumerable:!(s=ib(h,$))||s.enumerable})}return f},nb=(f)=>_b(j5({},"__esModule",{value:!0}),f),WA={};xb(WA,{CredentialsProviderError:()=>eb,ProviderError:()=>O5,TokenProviderError:()=>ab,chain:()=>pb,fromStatic:()=>ob,memoize:()=>ub});zA.exports=nb(WA);var O5=class f extends Error{constructor(h,w=!0){let s,$=!0;if(typeof w==="boolean")s=void 0,$=w;else if(w!=null&&typeof w==="object")s=w.logger,$=w.tryNextLink??!0;super(h);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,f.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${h}`)}static{ah(this,"ProviderError")}static from(h,w=!0){return Object.assign(new this(h.message,w),h)}},eb=class f extends O5{constructor(h,w=!0){super(h,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"CredentialsProviderError")}},ab=class f extends O5{constructor(h,w=!0){super(h,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"TokenProviderError")}},pb=ah((...f)=>async()=>{if(f.length===0)throw new O5("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h},"chain"),ob=ah((f)=>()=>Promise.resolve(f),"fromStatic"),ub=ah((f,h,w)=>{let s,$,r,E=!1,U=ah(async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s},"coalesceProvider");if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}},"memoize")});var kA=H((wT0,qA)=>{var{defineProperty:i5,getOwnPropertyDescriptor:tb,getOwnPropertyNames:fm}=Object,hm=Object.prototype.hasOwnProperty,p0=(f,h)=>i5(f,"name",{value:h,configurable:!0}),wm=(f,h)=>{for(var w in h)i5(f,w,{get:h[w],enumerable:!0})},sm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of fm(h))if(!hm.call(f,$)&&$!==w)i5(f,$,{get:()=>h[$],enumerable:!(s=tb(h,$))||s.enumerable})}return f},$m=(f)=>sm(i5({},"__esModule",{value:!0}),f),YA={};wm(YA,{SignatureV4:()=>Nm,clearCredentialCache:()=>Ym,createScope:()=>b5,getCanonicalHeaders:()=>PT,getCanonicalQuery:()=>HA,getPayloadHash:()=>d5,getSigningKey:()=>PA,moveHeadersToQuery:()=>DA,prepareRequest:()=>NT});qA.exports=$m(YA);var AA=Ih(),ZT=u1(),rm="X-Amz-Algorithm",Em="X-Amz-Credential",MA="X-Amz-Date",Um="X-Amz-SignedHeaders",Tm="X-Amz-Expires",QA="X-Amz-Signature",KA="X-Amz-Security-Token",ZA="authorization",JA=MA.toLowerCase(),Fm="date",Cm=[ZA,JA,Fm],Im=QA.toLowerCase(),VT="x-amz-content-sha256",Lm=KA.toLowerCase(),Bm={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Gm=/^proxy-/,Wm=/^sec-/,JT="AWS4-HMAC-SHA256",zm="AWS4-HMAC-SHA256-PAYLOAD",Am="UNSIGNED-PAYLOAD",Rm=50,VA="aws4_request",Xm=604800,zh=uU(),Sm=u1(),vw={},v5=[],b5=p0((f,h,w)=>`${f}/${h}/${w}/${VA}`,"createScope"),PA=p0(async(f,h,w,s,$)=>{let r=await RA(f,h.secretAccessKey,h.accessKeyId),E=`${w}:${s}:${$}:${zh.toHex(r)}:${h.sessionToken}`;if(E in vw)return vw[E];v5.push(E);while(v5.length>Rm)delete vw[v5.shift()];let U=`AWS4${h.secretAccessKey}`;for(let T of[w,s,$,VA])U=await RA(f,U,T);return vw[E]=U},"getSigningKey"),Ym=p0(()=>{v5.length=0,Object.keys(vw).forEach((f)=>{delete vw[f]})},"clearCredentialCache"),RA=p0((f,h,w)=>{let s=new f(h);return s.update(Sm.toUint8Array(w)),s.digest()},"hmac"),PT=p0(({headers:f},h,w)=>{let s={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;let r=$.toLowerCase();if(r in Bm||h?.has(r)||Gm.test(r)||Wm.test(r)){if(!w||w&&!w.has(r))continue}s[r]=f[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),m5=gU(),HA=p0(({query:f={}})=>{let h=[],w={};for(let s of Object.keys(f)){if(s.toLowerCase()===Im)continue;let $=m5.escapeUri(s);h.push($);let r=f[s];if(typeof r==="string")w[$]=`${$}=${m5.escapeUri(r)}`;else if(Array.isArray(r))w[$]=r.slice(0).reduce((E,U)=>E.concat([`${$}=${m5.escapeUri(U)}`]),[]).sort().join("&")}return h.sort().map((s)=>w[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Mm=OU(),Qm=u1(),d5=p0(async({headers:f,body:h},w)=>{for(let s of Object.keys(f))if(s.toLowerCase()===VT)return f[s];if(h==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof h==="string"||ArrayBuffer.isView(h)||Mm.isArrayBuffer(h)){let s=new w;return s.update(Qm.toUint8Array(h)),zh.toHex(await s.digest())}return Am},"getPayloadHash"),XA=u1(),Km=class{static{p0(this,"HeaderFormatter")}format(f){let h=[];for(let $ of Object.keys(f)){let r=XA.fromUtf8($);h.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(f[$]))}let w=new Uint8Array(h.reduce(($,r)=>$+r.byteLength,0)),s=0;for(let $ of h)w.set($,s),s+=$.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":let h=new DataView(new ArrayBuffer(3));return h.setUint8(0,3),h.setInt16(1,f.value,!1),new Uint8Array(h.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(f.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);let r=new Uint8Array($.buffer);return r.set(f.value,3),r;case"string":let E=XA.fromUtf8(f.value),U=new DataView(new ArrayBuffer(3+E.byteLength));U.setUint8(0,7),U.setUint16(1,E.byteLength,!1);let T=new Uint8Array(U.buffer);return T.set(E,3),T;case"timestamp":let F=new Uint8Array(9);return F[0]=8,F.set(Jm.fromNumber(f.value.valueOf()).bytes,1),F;case"uuid":if(!Zm.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let C=new Uint8Array(17);return C[0]=9,C.set(zh.fromHex(f.value.replace(/\-/g,"")),1),C}}},Zm=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Jm=class f{constructor(h){if(this.bytes=h,h.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{p0(this,"Int64")}static fromNumber(h){if(h>9223372036854776000||h<-9223372036854776000)throw new Error(`${h} is too large (or, if negative, too small) to represent as an Int64`);let w=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(h));s>-1&&$>0;s--,$/=256)w[s]=$;if(h<0)HT(w);return new f(w)}valueOf(){let h=this.bytes.slice(0),w=h[0]&128;if(w)HT(h);return parseInt(zh.toHex(h),16)*(w?-1:1)}toString(){return String(this.valueOf())}};function HT(f){for(let h=0;h<8;h++)f[h]^=255;for(let h=7;h>-1;h--)if(f[h]++,f[h]!==0)break}p0(HT,"negate");var Vm=p0((f,h)=>{f=f.toLowerCase();for(let w of Object.keys(h))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),NA=t0(),DA=p0((f,h={})=>{let{headers:w,query:s={}}=NA.HttpRequest.clone(f);for(let $ of Object.keys(w)){let r=$.toLowerCase();if(r.slice(0,6)==="x-amz-"&&!h.unhoistableHeaders?.has(r)||h.hoistableHeaders?.has(r))s[$]=w[$],delete w[$]}return{...f,headers:w,query:s}},"moveHeadersToQuery"),NT=p0((f)=>{f=NA.HttpRequest.clone(f);for(let h of Object.keys(f.headers))if(Cm.indexOf(h.toLowerCase())>-1)delete f.headers[h];return f},"prepareRequest"),Pm=p0((f)=>Hm(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Hm=p0((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),Nm=class{constructor({applyChecksum:f,credentials:h,region:w,service:s,sha256:$,uriEscapePath:r=!0}){this.headerFormatter=new Km,this.service=s,this.sha256=$,this.uriEscapePath=r,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=AA.normalizeProvider(w),this.credentialProvider=AA.normalizeProvider(h)}static{p0(this,"SignatureV4")}async presign(f,h={}){let{signingDate:w=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:r,signableHeaders:E,hoistableHeaders:U,signingRegion:T,signingService:F}=h,C=await this.credentialProvider();this.validateResolvedCredentials(C);let I=T??await this.regionProvider(),{longDate:L,shortDate:W}=l5(w);if(s>Xm)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=b5(W,I,F??this.service),Q=DA(NT(f),{unhoistableHeaders:r,hoistableHeaders:U});if(C.sessionToken)Q.query[KA]=C.sessionToken;Q.query[rm]=JT,Q.query[Em]=`${C.accessKeyId}/${X}`,Q.query[MA]=L,Q.query[Tm]=s.toString(10);let M=PT(Q,$,E);return Q.query[Um]=SA(M),Q.query[QA]=await this.getSignature(L,X,this.getSigningKey(C,I,W,F),this.createCanonicalRequest(Q,M,await d5(f,this.sha256))),Q}async sign(f,h){if(typeof f==="string")return this.signString(f,h);else if(f.headers&&f.payload)return this.signEvent(f,h);else if(f.message)return this.signMessage(f,h);else return this.signRequest(f,h)}async signEvent({headers:f,payload:h},{signingDate:w=new Date,priorSignature:s,signingRegion:$,signingService:r}){let E=$??await this.regionProvider(),{shortDate:U,longDate:T}=l5(w),F=b5(U,E,r??this.service),C=await d5({headers:{},body:h},this.sha256),I=new this.sha256;I.update(f);let L=zh.toHex(await I.digest()),W=[zm,T,F,s,L,C].join(`
19
+ `);return this.signString(W,{signingDate:w,signingRegion:E,signingService:r})}async signMessage(f,{signingDate:h=new Date,signingRegion:w,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:h,signingRegion:w,signingService:s,priorSignature:f.priorSignature}).then((r)=>{return{message:f.message,signature:r}})}async signString(f,{signingDate:h=new Date,signingRegion:w,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let r=w??await this.regionProvider(),{shortDate:E}=l5(h),U=new this.sha256(await this.getSigningKey($,r,E,s));return U.update(ZT.toUint8Array(f)),zh.toHex(await U.digest())}async signRequest(f,{signingDate:h=new Date,signableHeaders:w,unsignableHeaders:s,signingRegion:$,signingService:r}={}){let E=await this.credentialProvider();this.validateResolvedCredentials(E);let U=$??await this.regionProvider(),T=NT(f),{longDate:F,shortDate:C}=l5(h),I=b5(C,U,r??this.service);if(T.headers[JA]=F,E.sessionToken)T.headers[Lm]=E.sessionToken;let L=await d5(T,this.sha256);if(!Vm(VT,T.headers)&&this.applyChecksum)T.headers[VT]=L;let W=PT(T,s,w),X=await this.getSignature(F,I,this.getSigningKey(E,U,C,r),this.createCanonicalRequest(T,W,L));return T.headers[ZA]=`${JT} Credential=${E.accessKeyId}/${I}, SignedHeaders=${SA(W)}, Signature=${X}`,T}createCanonicalRequest(f,h,w){let s=Object.keys(h).sort();return`${f.method}
20
20
  ${this.getCanonicalPath(f)}
21
- ${Hz(f)}
21
+ ${HA(f)}
22
22
  ${s.map(($)=>`${$}:${h[$]}`).join(`
23
23
  `)}
24
24
 
@@ -26,29 +26,29 @@ ${s.join(";")}
26
26
  ${w}`}async createStringToSign(f,h,w){let s=new this.sha256;s.update(ZT.toUint8Array(w));let $=await s.digest();return`${JT}
27
27
  ${f}
28
28
  ${h}
29
- ${zh.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let h=[];for(let $ of f.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")h.pop();else h.push($)}let w=`${f?.startsWith("/")?"/":""}${h.join("/")}${h.length>0&&f?.endsWith("/")?"/":""}`;return g4.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,h,w,s){let $=await this.createStringToSign(f,h,s),r=new this.sha256(await w);return r.update(ZT.toUint8Array($)),zh.toHex(await r.digest())}getSigningKey(f,h,w,s){return Pz(this.sha256,f,w,h,s||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}},d4=p0((f)=>{let h=Nm(f).replace(/[\-:]/g,"");return{longDate:h,shortDate:h.slice(0,8)}},"formatDate"),Sz=p0((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var cz=H((TT0,iz)=>{var{defineProperty:n4,getOwnPropertyDescriptor:km,getOwnPropertyNames:ym}=Object,jm=Object.prototype.hasOwnProperty,f1=(f,h)=>n4(f,"name",{value:h,configurable:!0}),Om=(f,h)=>{for(var w in h)n4(f,w,{get:h[w],enumerable:!0})},lm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ym(h))if(!jm.call(f,$)&&$!==w)n4(f,$,{get:()=>h[$],enumerable:!(s=km(h,$))||s.enumerable})}return f},vm=(f)=>lm(n4({},"__esModule",{value:!0}),f),vz={};Om(vz,{AWSSDKSigV4Signer:()=>im,AwsSdkSigV4ASigner:()=>gm,AwsSdkSigV4Signer:()=>kT,NODE_SIGV4A_CONFIG_OPTIONS:()=>nm,resolveAWSSDKSigV4Config:()=>am,resolveAwsSdkSigV4AConfig:()=>_m,resolveAwsSdkSigV4Config:()=>bz,validateSigningProperties:()=>qT});iz.exports=vm(vz);var bm=t0(),mm=t0(),yz=f1((f)=>mm.HttpResponse.isInstance(f)?f.headers?.date??f.headers?.Date:void 0,"getDateHeader"),DT=f1((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),dm=f1((f,h)=>Math.abs(DT(h).getTime()-f)>=300000,"isClockSkewed"),jz=f1((f,h)=>{let w=Date.parse(f);if(dm(w,h))return w-Date.now();return h},"getUpdatedSystemClockOffset"),q$=f1((f,h)=>{if(!h)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return h},"throwSigningPropertyError"),qT=f1(async(f)=>{let h=q$("context",f.context),w=q$("config",f.config),s=h.endpointV2?.properties?.authSchemes?.[0],r=await q$("signer",w.signer)(s),E=f?.signingRegion,U=f?.signingRegionSet,T=f?.signingName;return{config:w,signer:r,signingRegion:E,signingRegionSet:U,signingName:T}},"validateSigningProperties"),kT=class{static{f1(this,"AwsSdkSigV4Signer")}async sign(f,h,w){if(!bm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await qT(w),{config:$,signer:r}=s,{signingRegion:E,signingName:U}=s,T=w.context;if(T?.authSchemes?.length??0>1){let[C,I]=T.authSchemes;if(C?.name==="sigv4a"&&I?.name==="sigv4")E=I?.signingRegion??E,U=I?.signingName??U}return await r.sign(f,{signingDate:DT($.systemClockOffset),signingRegion:E,signingService:U})}errorHandler(f){return(h)=>{let w=h.ServerTime??yz(h.$response);if(w){let s=q$("config",f.config),$=s.systemClockOffset;if(s.systemClockOffset=jz(w,s.systemClockOffset),s.systemClockOffset!==$&&h.$metadata)h.$metadata.clockSkewCorrected=!0}throw h}}successHandler(f,h){let w=yz(f);if(w){let s=q$("config",h.config);s.systemClockOffset=jz(w,s.systemClockOffset)}}},im=kT,cm=t0(),gm=class extends kT{static{f1(this,"AwsSdkSigV4ASigner")}async sign(f,h,w){if(!cm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:r,signingRegionSet:E,signingName:U}=await qT(w),F=(await s.sigv4aSigningRegionSet?.()??E??[r]).join(",");return await $.sign(f,{signingDate:DT(s.systemClockOffset),signingRegion:F,signingService:U})}},xm=m0(),Oz=D$(),_m=f1((f)=>{return f.sigv4aSigningRegionSet=xm.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),nm={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((h)=>h.trim());throw new Oz.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((h)=>h.trim());throw new Oz.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},em=I1(),ph=m0(),lz=kz(),bz=f1((f)=>{let h=f.credentials,w=!!f.credentials,s=void 0;Object.defineProperty(f,"credentials",{set(F){if(F&&F!==h&&F!==s)w=!0;h=F;let C=mz(f,{credentials:h,credentialDefaultProvider:f.credentialDefaultProvider}),I=dz(f,C);if(w&&!I.attributed)s=f1(async(L)=>I(L).then((W)=>em.setCredentialFeature(W,"CREDENTIALS_CODE","e")),"resolvedCredentials"),s.memoized=I.memoized,s.configBound=I.configBound,s.attributed=!0;else s=I},get(){return s},enumerable:!0,configurable:!0}),f.credentials=h;let{signingEscapePath:$=!0,systemClockOffset:r=f.systemClockOffset||0,sha256:E}=f,U;if(f.signer)U=ph.normalizeProvider(f.signer);else if(f.regionInfoProvider)U=f1(()=>ph.normalizeProvider(f.region)().then(async(F)=>[await f.regionInfoProvider(F,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},F]).then(([F,C])=>{let{signingRegion:I,signingService:L}=F;f.signingRegion=f.signingRegion||I||C,f.signingName=f.signingName||L||f.serviceId;let W={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||lz.SignatureV4)(W)}),"signer");else U=f1(async(F)=>{F=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await ph.normalizeProvider(f.region)(),properties:{}},F);let{signingRegion:C,signingName:I}=F;f.signingRegion=f.signingRegion||C,f.signingName=f.signingName||I||f.serviceId;let L={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||lz.SignatureV4)(L)},"signer");return Object.assign(f,{systemClockOffset:r,signingEscapePath:$,signer:U})},"resolveAwsSdkSigV4Config"),am=bz;function mz(f,{credentials:h,credentialDefaultProvider:w}){let s;if(h)if(!h?.memoized)s=ph.memoizeIdentityProvider(h,ph.isIdentityExpired,ph.doesIdentityRequireRefresh);else s=h;else if(w)s=ph.normalizeProvider(w(Object.assign({},f,{parentClientConfig:f})));else s=f1(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider");return s.memoized=!0,s}f1(mz,"normalizeCredentialProvider");function dz(f,h){if(h.configBound)return h;let w=f1(async(s)=>h({...s,callerClientConfig:f}),"fn");return w.memoized=h.memoized,w.configBound=!0,w}f1(dz,"bindCallerConfig")});var ez=H((IT0,nz)=>{var{defineProperty:e4,getOwnPropertyDescriptor:pm,getOwnPropertyNames:om}=Object,um=Object.prototype.hasOwnProperty,q1=(f,h)=>e4(f,"name",{value:h,configurable:!0}),tm=(f,h)=>{for(var w in h)e4(f,w,{get:h[w],enumerable:!0})},fd=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of om(h))if(!um.call(f,$)&&$!==w)e4(f,$,{get:()=>h[$],enumerable:!(s=pm(h,$))||s.enumerable})}return f},hd=(f)=>fd(e4({},"__esModule",{value:!0}),f),_z={};tm(_z,{constructStack:()=>yT});nz.exports=hd(_z);var oh=q1((f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},"getAllAliases"),Rh=q1((f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},"getMiddlewareNameWithAliases"),yT=q1(()=>{let f=[],h=[],w=!1,s=new Set,$=q1((I)=>I.sort((L,W)=>gz[W.step]-gz[L.step]||xz[W.priority||"normal"]-xz[L.priority||"normal"]),"sort"),r=q1((I)=>{let L=!1,W=q1((X)=>{let Q=oh(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},"removeByName"),E=q1((I)=>{let L=!1,W=q1((X)=>{if(X.middleware===I){L=!0;for(let Q of oh(X.name,X.aliases))s.delete(Q);return!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},"removeByReference"),U=q1((I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},"cloneTo"),T=q1((I)=>{let L=[];return I.before.forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L.push(I),I.after.reverse().forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L},"expandRelativeMiddlewareList"),F=q1((I=!1)=>{let L=[],W=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of oh(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of oh(q.name,q.aliases))X[N]=q;W.push(q)}),W.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Rh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},"getMiddlewareList"),C={add:(I,L={})=>{let{name:W,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=oh(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Rh(W,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Rh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Rh(W,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:W,override:X,aliases:Q}=L,M={middleware:I,...L},q=oh(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Rh(W,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Rh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Rh(W,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(yT()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,W=q1((X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=oh(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},concat:(I)=>{let L=U(yT());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Rh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let W of F().map((X)=>X.middleware).reverse())I=W(I,L);if(w)console.log(C.identify());return I}};return C},"constructStack"),gz={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},xz={high:3,normal:2,low:1}});var J0=H((LT0,L7)=>{var{defineProperty:o4,getOwnPropertyDescriptor:wd,getOwnPropertyNames:sd}=Object,$d=Object.prototype.hasOwnProperty,b=(f,h)=>o4(f,"name",{value:h,configurable:!0}),rd=(f,h)=>{for(var w in h)o4(f,w,{get:h[w],enumerable:!0})},Ed=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sd(h))if(!$d.call(f,$)&&$!==w)o4(f,$,{get:()=>h[$],enumerable:!(s=wd(h,$))||s.enumerable})}return f},Ud=(f)=>Ed(o4({},"__esModule",{value:!0}),f),pz={};rd(pz,{Client:()=>Td,Command:()=>uz,LazyJsonString:()=>uh,NoOpLogger:()=>$i,SENSITIVE_STRING:()=>Cd,ServiceException:()=>xd,_json:()=>dT,collectBody:()=>jT.collectBody,convertMap:()=>ri,createAggregatedClient:()=>Id,dateToUtcString:()=>$7,decorateServiceException:()=>r7,emitWarningIfUnsupportedVersion:()=>ad,expectBoolean:()=>Bd,expectByte:()=>mT,expectFloat32:()=>a4,expectInt:()=>Wd,expectInt32:()=>vT,expectLong:()=>j$,expectNonNull:()=>zd,expectNumber:()=>y$,expectObject:()=>tz,expectShort:()=>bT,expectString:()=>Rd,expectUnion:()=>Xd,extendedEncodeURIComponent:()=>jT.extendedEncodeURIComponent,getArrayIfSingleItem:()=>wi,getDefaultClientConfiguration:()=>fi,getDefaultExtensionConfiguration:()=>U7,getValueFromTextNode:()=>T7,handleFloat:()=>Md,isSerializableHeaderValue:()=>si,limitedParseDouble:()=>gT,limitedParseFloat:()=>Qd,limitedParseFloat32:()=>Kd,loadConfigsForDefaultMode:()=>ed,logger:()=>O$,map:()=>_T,parseBoolean:()=>Ld,parseEpochTimestamp:()=>Od,parseRfc3339DateTime:()=>Hd,parseRfc3339DateTimeWithOffset:()=>Dd,parseRfc7231DateTime:()=>jd,quoteHeader:()=>C7,resolveDefaultRuntimeConfig:()=>hi,resolvedPath:()=>jT.resolvedPath,serializeDateTime:()=>Ii,serializeFloat:()=>Ci,splitEvery:()=>I7,splitHeader:()=>Li,strictParseByte:()=>s7,strictParseDouble:()=>cT,strictParseFloat:()=>Sd,strictParseFloat32:()=>f7,strictParseInt:()=>Zd,strictParseInt32:()=>Jd,strictParseLong:()=>w7,strictParseShort:()=>mw,take:()=>Ei,throwDefaultError:()=>E7,withBaseException:()=>_d});L7.exports=Ud(pz);var oz=ez(),Td=class{constructor(f){this.config=f,this.middlewareStack=oz.constructStack()}static{b(this,"Client")}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},jT=jw(),lT=F1(),uz=class{constructor(){this.middlewareStack=oz.constructStack()}static{b(this,"Command")}static classBuilder(){return new Fd}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,W={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[lT.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),W)}},Fd=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}static{b(this,"ClassBuilder")}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends uz{constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}static{b(this,"CommandRef")}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}},Cd="***SensitiveInformation***",Id=b((f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=b(async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},"methodImpl"),r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}},"createAggregatedClient"),Ld=b((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Bd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)O$.warn(p4(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")O$.warn(p4(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),y$=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))O$.warn(p4(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),Gd=Math.ceil(340282346638528860000000000000000000000),a4=b((f)=>{let h=y$(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>Gd)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},"expectFloat32"),j$=b((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Wd=j$,vT=b((f)=>iT(f,32),"expectInt32"),bT=b((f)=>iT(f,16),"expectShort"),mT=b((f)=>iT(f,8),"expectByte"),iT=b((f,h)=>{let w=j$(f);if(w!==void 0&&Ad(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},"expectSizedInt"),Ad=b((f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),zd=b((f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),tz=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},"expectObject"),Rd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return O$.warn(p4(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),Xd=b((f)=>{if(f===null||f===void 0)return;let h=tz(f),w=Object.entries(h).filter(([,s])=>s!=null).map(([s])=>s);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return h},"expectUnion"),cT=b((f)=>{if(typeof f=="string")return y$(iw(f));return y$(f)},"strictParseDouble"),Sd=cT,f7=b((f)=>{if(typeof f=="string")return a4(iw(f));return a4(f)},"strictParseFloat32"),Yd=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,iw=b((f)=>{let h=f.match(Yd);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),gT=b((f)=>{if(typeof f=="string")return h7(f);return y$(f)},"limitedParseDouble"),Md=gT,Qd=gT,Kd=b((f)=>{if(typeof f=="string")return h7(f);return a4(f)},"limitedParseFloat32"),h7=b((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),w7=b((f)=>{if(typeof f==="string")return j$(iw(f));return j$(f)},"strictParseLong"),Zd=w7,Jd=b((f)=>{if(typeof f==="string")return vT(iw(f));return vT(f)},"strictParseInt32"),mw=b((f)=>{if(typeof f==="string")return bT(iw(f));return bT(f)},"strictParseShort"),s7=b((f)=>{if(typeof f==="string")return mT(iw(f));return mT(f)},"strictParseByte"),p4=b((f)=>{return String(new TypeError(f).stack||f).split(`
29
+ ${zh.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let h=[];for(let $ of f.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")h.pop();else h.push($)}let w=`${f?.startsWith("/")?"/":""}${h.join("/")}${h.length>0&&f?.endsWith("/")?"/":""}`;return m5.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,h,w,s){let $=await this.createStringToSign(f,h,s),r=new this.sha256(await w);return r.update(ZT.toUint8Array($)),zh.toHex(await r.digest())}getSigningKey(f,h,w,s){return PA(this.sha256,f,w,h,s||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}},l5=p0((f)=>{let h=Pm(f).replace(/[\-:]/g,"");return{longDate:h,shortDate:h.slice(0,8)}},"formatDate"),SA=p0((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var cA=H((rT0,iA)=>{var{defineProperty:c5,getOwnPropertyDescriptor:Dm,getOwnPropertyNames:qm}=Object,km=Object.prototype.hasOwnProperty,f1=(f,h)=>c5(f,"name",{value:h,configurable:!0}),ym=(f,h)=>{for(var w in h)c5(f,w,{get:h[w],enumerable:!0})},jm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of qm(h))if(!km.call(f,$)&&$!==w)c5(f,$,{get:()=>h[$],enumerable:!(s=Dm(h,$))||s.enumerable})}return f},Om=(f)=>jm(c5({},"__esModule",{value:!0}),f),vA={};ym(vA,{AWSSDKSigV4Signer:()=>mm,AwsSdkSigV4ASigner:()=>im,AwsSdkSigV4Signer:()=>kT,NODE_SIGV4A_CONFIG_OPTIONS:()=>xm,resolveAWSSDKSigV4Config:()=>nm,resolveAwsSdkSigV4AConfig:()=>gm,resolveAwsSdkSigV4Config:()=>bA,validateSigningProperties:()=>qT});iA.exports=Om(vA);var lm=t0(),vm=t0(),yA=f1((f)=>vm.HttpResponse.isInstance(f)?f.headers?.date??f.headers?.Date:void 0,"getDateHeader"),DT=f1((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),bm=f1((f,h)=>Math.abs(DT(h).getTime()-f)>=300000,"isClockSkewed"),jA=f1((f,h)=>{let w=Date.parse(f);if(bm(w,h))return w-Date.now();return h},"getUpdatedSystemClockOffset"),J$=f1((f,h)=>{if(!h)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return h},"throwSigningPropertyError"),qT=f1(async(f)=>{let h=J$("context",f.context),w=J$("config",f.config),s=h.endpointV2?.properties?.authSchemes?.[0],r=await J$("signer",w.signer)(s),E=f?.signingRegion,U=f?.signingRegionSet,T=f?.signingName;return{config:w,signer:r,signingRegion:E,signingRegionSet:U,signingName:T}},"validateSigningProperties"),kT=class{static{f1(this,"AwsSdkSigV4Signer")}async sign(f,h,w){if(!lm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await qT(w),{config:$,signer:r}=s,{signingRegion:E,signingName:U}=s,T=w.context;if(T?.authSchemes?.length??0>1){let[C,I]=T.authSchemes;if(C?.name==="sigv4a"&&I?.name==="sigv4")E=I?.signingRegion??E,U=I?.signingName??U}return await r.sign(f,{signingDate:DT($.systemClockOffset),signingRegion:E,signingService:U})}errorHandler(f){return(h)=>{let w=h.ServerTime??yA(h.$response);if(w){let s=J$("config",f.config),$=s.systemClockOffset;if(s.systemClockOffset=jA(w,s.systemClockOffset),s.systemClockOffset!==$&&h.$metadata)h.$metadata.clockSkewCorrected=!0}throw h}}successHandler(f,h){let w=yA(f);if(w){let s=J$("config",h.config);s.systemClockOffset=jA(w,s.systemClockOffset)}}},mm=kT,dm=t0(),im=class extends kT{static{f1(this,"AwsSdkSigV4ASigner")}async sign(f,h,w){if(!dm.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:r,signingRegionSet:E,signingName:U}=await qT(w),F=(await s.sigv4aSigningRegionSet?.()??E??[r]).join(",");return await $.sign(f,{signingDate:DT(s.systemClockOffset),signingRegion:F,signingService:U})}},cm=m0(),OA=Z$(),gm=f1((f)=>{return f.sigv4aSigningRegionSet=cm.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),xm={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((h)=>h.trim());throw new OA.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((h)=>h.trim());throw new OA.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},_m=I1(),ph=m0(),lA=kA(),bA=f1((f)=>{let h=f.credentials,w=!!f.credentials,s=void 0;Object.defineProperty(f,"credentials",{set(F){if(F&&F!==h&&F!==s)w=!0;h=F;let C=mA(f,{credentials:h,credentialDefaultProvider:f.credentialDefaultProvider}),I=dA(f,C);if(w&&!I.attributed)s=f1(async(L)=>I(L).then((W)=>_m.setCredentialFeature(W,"CREDENTIALS_CODE","e")),"resolvedCredentials"),s.memoized=I.memoized,s.configBound=I.configBound,s.attributed=!0;else s=I},get(){return s},enumerable:!0,configurable:!0}),f.credentials=h;let{signingEscapePath:$=!0,systemClockOffset:r=f.systemClockOffset||0,sha256:E}=f,U;if(f.signer)U=ph.normalizeProvider(f.signer);else if(f.regionInfoProvider)U=f1(()=>ph.normalizeProvider(f.region)().then(async(F)=>[await f.regionInfoProvider(F,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},F]).then(([F,C])=>{let{signingRegion:I,signingService:L}=F;f.signingRegion=f.signingRegion||I||C,f.signingName=f.signingName||L||f.serviceId;let W={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||lA.SignatureV4)(W)}),"signer");else U=f1(async(F)=>{F=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await ph.normalizeProvider(f.region)(),properties:{}},F);let{signingRegion:C,signingName:I}=F;f.signingRegion=f.signingRegion||C,f.signingName=f.signingName||I||f.serviceId;let L={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:E,uriEscapePath:$};return new(f.signerConstructor||lA.SignatureV4)(L)},"signer");return Object.assign(f,{systemClockOffset:r,signingEscapePath:$,signer:U})},"resolveAwsSdkSigV4Config"),nm=bA;function mA(f,{credentials:h,credentialDefaultProvider:w}){let s;if(h)if(!h?.memoized)s=ph.memoizeIdentityProvider(h,ph.isIdentityExpired,ph.doesIdentityRequireRefresh);else s=h;else if(w)s=ph.normalizeProvider(w(Object.assign({},f,{parentClientConfig:f})));else s=f1(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider");return s.memoized=!0,s}f1(mA,"normalizeCredentialProvider");function dA(f,h){if(h.configBound)return h;let w=f1(async(s)=>h({...s,callerClientConfig:f}),"fn");return w.memoized=h.memoized,w.configBound=!0,w}f1(dA,"bindCallerConfig")});var eA=H((TT0,nA)=>{var{defineProperty:g5,getOwnPropertyDescriptor:em,getOwnPropertyNames:am}=Object,pm=Object.prototype.hasOwnProperty,q1=(f,h)=>g5(f,"name",{value:h,configurable:!0}),om=(f,h)=>{for(var w in h)g5(f,w,{get:h[w],enumerable:!0})},um=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of am(h))if(!pm.call(f,$)&&$!==w)g5(f,$,{get:()=>h[$],enumerable:!(s=em(h,$))||s.enumerable})}return f},tm=(f)=>um(g5({},"__esModule",{value:!0}),f),_A={};om(_A,{constructStack:()=>yT});nA.exports=tm(_A);var oh=q1((f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},"getAllAliases"),Ah=q1((f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},"getMiddlewareNameWithAliases"),yT=q1(()=>{let f=[],h=[],w=!1,s=new Set,$=q1((I)=>I.sort((L,W)=>gA[W.step]-gA[L.step]||xA[W.priority||"normal"]-xA[L.priority||"normal"]),"sort"),r=q1((I)=>{let L=!1,W=q1((X)=>{let Q=oh(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},"removeByName"),E=q1((I)=>{let L=!1,W=q1((X)=>{if(X.middleware===I){L=!0;for(let Q of oh(X.name,X.aliases))s.delete(Q);return!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},"removeByReference"),U=q1((I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},"cloneTo"),T=q1((I)=>{let L=[];return I.before.forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L.push(I),I.after.reverse().forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L},"expandRelativeMiddlewareList"),F=q1((I=!1)=>{let L=[],W=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of oh(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of oh(q.name,q.aliases))X[N]=q;W.push(q)}),W.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Ah(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},"getMiddlewareList"),C={add:(I,L={})=>{let{name:W,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=oh(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Ah(W,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Ah(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Ah(W,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:W,override:X,aliases:Q}=L,M={middleware:I,...L},q=oh(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Ah(W,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Ah(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Ah(W,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(yT()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,W=q1((X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=oh(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0},"filterCb");return f=f.filter(W),h=h.filter(W),L},concat:(I)=>{let L=U(yT());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Ah(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let W of F().map((X)=>X.middleware).reverse())I=W(I,L);if(w)console.log(C.identify());return I}};return C},"constructStack"),gA={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},xA={high:3,normal:2,low:1}});var J0=H((FT0,L7)=>{var{defineProperty:n5,getOwnPropertyDescriptor:fd,getOwnPropertyNames:hd}=Object,wd=Object.prototype.hasOwnProperty,b=(f,h)=>n5(f,"name",{value:h,configurable:!0}),sd=(f,h)=>{for(var w in h)n5(f,w,{get:h[w],enumerable:!0})},$d=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of hd(h))if(!wd.call(f,$)&&$!==w)n5(f,$,{get:()=>h[$],enumerable:!(s=fd(h,$))||s.enumerable})}return f},rd=(f)=>$d(n5({},"__esModule",{value:!0}),f),pA={};sd(pA,{Client:()=>Ed,Command:()=>uA,LazyJsonString:()=>uh,NoOpLogger:()=>wi,SENSITIVE_STRING:()=>Td,ServiceException:()=>cd,_json:()=>dT,collectBody:()=>jT.collectBody,convertMap:()=>si,createAggregatedClient:()=>Fd,dateToUtcString:()=>$7,decorateServiceException:()=>r7,emitWarningIfUnsupportedVersion:()=>nd,expectBoolean:()=>Id,expectByte:()=>mT,expectFloat32:()=>x5,expectInt:()=>Bd,expectInt32:()=>vT,expectLong:()=>H$,expectNonNull:()=>Wd,expectNumber:()=>P$,expectObject:()=>tA,expectShort:()=>bT,expectString:()=>zd,expectUnion:()=>Ad,extendedEncodeURIComponent:()=>jT.extendedEncodeURIComponent,getArrayIfSingleItem:()=>fi,getDefaultClientConfiguration:()=>ud,getDefaultExtensionConfiguration:()=>U7,getValueFromTextNode:()=>T7,handleFloat:()=>Sd,isSerializableHeaderValue:()=>hi,limitedParseDouble:()=>gT,limitedParseFloat:()=>Yd,limitedParseFloat32:()=>Md,loadConfigsForDefaultMode:()=>_d,logger:()=>N$,map:()=>_T,parseBoolean:()=>Cd,parseEpochTimestamp:()=>yd,parseRfc3339DateTime:()=>Vd,parseRfc3339DateTimeWithOffset:()=>Hd,parseRfc7231DateTime:()=>kd,quoteHeader:()=>C7,resolveDefaultRuntimeConfig:()=>td,resolvedPath:()=>jT.resolvedPath,serializeDateTime:()=>Fi,serializeFloat:()=>Ti,splitEvery:()=>I7,splitHeader:()=>Ci,strictParseByte:()=>s7,strictParseDouble:()=>cT,strictParseFloat:()=>Rd,strictParseFloat32:()=>f7,strictParseInt:()=>Qd,strictParseInt32:()=>Kd,strictParseLong:()=>w7,strictParseShort:()=>bw,take:()=>$i,throwDefaultError:()=>E7,withBaseException:()=>gd});L7.exports=rd(pA);var oA=eA(),Ed=class{constructor(f){this.config=f,this.middlewareStack=oA.constructStack()}static{b(this,"Client")}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},jT=yw(),lT=F1(),uA=class{constructor(){this.middlewareStack=oA.constructStack()}static{b(this,"Command")}static classBuilder(){return new Ud}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,W={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[lT.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),W)}},Ud=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}static{b(this,"ClassBuilder")}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends uA{constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}static{b(this,"CommandRef")}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}},Td="***SensitiveInformation***",Fd=b((f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=b(async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},"methodImpl"),r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}},"createAggregatedClient"),Cd=b((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Id=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)N$.warn(_5(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")N$.warn(_5(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),P$=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))N$.warn(_5(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),Ld=Math.ceil(340282346638528860000000000000000000000),x5=b((f)=>{let h=P$(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>Ld)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},"expectFloat32"),H$=b((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Bd=H$,vT=b((f)=>iT(f,32),"expectInt32"),bT=b((f)=>iT(f,16),"expectShort"),mT=b((f)=>iT(f,8),"expectByte"),iT=b((f,h)=>{let w=H$(f);if(w!==void 0&&Gd(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},"expectSizedInt"),Gd=b((f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),Wd=b((f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),tA=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},"expectObject"),zd=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return N$.warn(_5(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),Ad=b((f)=>{if(f===null||f===void 0)return;let h=tA(f),w=Object.entries(h).filter(([,s])=>s!=null).map(([s])=>s);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return h},"expectUnion"),cT=b((f)=>{if(typeof f=="string")return P$(dw(f));return P$(f)},"strictParseDouble"),Rd=cT,f7=b((f)=>{if(typeof f=="string")return x5(dw(f));return x5(f)},"strictParseFloat32"),Xd=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dw=b((f)=>{let h=f.match(Xd);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),gT=b((f)=>{if(typeof f=="string")return h7(f);return P$(f)},"limitedParseDouble"),Sd=gT,Yd=gT,Md=b((f)=>{if(typeof f=="string")return h7(f);return x5(f)},"limitedParseFloat32"),h7=b((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),w7=b((f)=>{if(typeof f==="string")return H$(dw(f));return H$(f)},"strictParseLong"),Qd=w7,Kd=b((f)=>{if(typeof f==="string")return vT(dw(f));return vT(f)},"strictParseInt32"),bw=b((f)=>{if(typeof f==="string")return bT(dw(f));return bT(f)},"strictParseShort"),s7=b((f)=>{if(typeof f==="string")return mT(dw(f));return mT(f)},"strictParseByte"),_5=b((f)=>{return String(new TypeError(f).stack||f).split(`
30
30
  `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
31
- `)},"stackTraceWarning"),O$={warn:console.warn},Vd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xT=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $7(f){let h=f.getUTCFullYear(),w=f.getUTCMonth(),s=f.getUTCDay(),$=f.getUTCDate(),r=f.getUTCHours(),E=f.getUTCMinutes(),U=f.getUTCSeconds(),T=$<10?`0${$}`:`${$}`,F=r<10?`0${r}`:`${r}`,C=E<10?`0${E}`:`${E}`,I=U<10?`0${U}`:`${U}`;return`${Vd[s]}, ${T} ${xT[w]} ${h} ${F}:${C}:${I} GMT`}b($7,"dateToUtcString");var Pd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Hd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Pd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=mw(dw(s)),I=Yf($,"month",1,12),L=Yf(r,"day",1,31);return k$(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},"parseRfc3339DateTime"),Nd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Dd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Nd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=mw(dw(s)),L=Yf($,"month",1,12),W=Yf(r,"day",1,31),X=k$(I,L,W,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-gd(C));return X},"parseRfc3339DateTimeWithOffset"),qd=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$/),kd=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$/),yd=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})$/),jd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let h=qd.exec(f);if(h){let[w,s,$,r,E,U,T,F]=h;return k$(mw(dw(r)),OT($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})}if(h=kd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return bd(k$(ld(r),OT($),Yf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F}))}if(h=yd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return k$(mw(dw(F)),OT(s),Yf($.trimLeft(),"day",1,31),{hours:r,minutes:E,seconds:U,fractionalMilliseconds:T})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Od=b((f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=cT(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},"parseEpochTimestamp"),k$=b((f,h,w,s)=>{let $=h-1;return dd(f,$,w),new Date(Date.UTC(f,$,w,Yf(s.hours,"hour",0,23),Yf(s.minutes,"minute",0,59),Yf(s.seconds,"seconds",0,60),cd(s.fractionalMilliseconds)))},"buildDate"),ld=b((f)=>{let h=new Date().getUTCFullYear(),w=Math.floor(h/100)*100+mw(dw(f));if(w<h)return w+100;return w},"parseTwoDigitYear"),vd=1576800000000,bd=b((f)=>{if(f.getTime()-new Date().getTime()>vd)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),OT=b((f)=>{let h=xT.indexOf(f);if(h<0)throw new TypeError(`Invalid month: ${f}`);return h+1},"parseMonthByShortName"),md=[31,28,31,30,31,30,31,31,30,31,30,31],dd=b((f,h,w)=>{let s=md[h];if(h===1&&id(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${xT[h]} in ${f}: ${w}`)},"validateDayOfMonth"),id=b((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),Yf=b((f,h,w,s)=>{let $=s7(dw(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},"parseDateValue"),cd=b((f)=>{if(f===null||f===void 0)return 0;return f7("0."+f)*1000},"parseMilliseconds"),gd=b((f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),dw=b((f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)},"stripLeadingZeroes"),xd=class f extends Error{static{b(this,"ServiceException")}constructor(h){super(h.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=h.name,this.$fault=h.$fault,this.$metadata=h.$metadata}static isInstance(h){if(!h)return!1;let w=h;return f.prototype.isPrototypeOf(w)||Boolean(w.$fault)&&Boolean(w.$metadata)&&(w.$fault==="client"||w.$fault==="server")}static[Symbol.hasInstance](h){if(!h)return!1;let w=h;if(this===f)return f.isInstance(h);if(f.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}},r7=b((f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),E7=b(({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=nd(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw r7(E,h)},"throwDefaultError"),_d=b((f)=>{return({output:h,parsedBody:w,errorCode:s})=>{E7({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},"withBaseException"),nd=b((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),ed=b((f)=>{switch(f){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"),az=!1,ad=b((f)=>{if(f&&!az&&parseInt(f.substring(1,f.indexOf(".")))<16)az=!0},"emitWarningIfUnsupportedVersion"),pd=b((f)=>{let h=[];for(let w in lT.AlgorithmId){let s=lT.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),od=b((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),ud=b((f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},"getRetryConfiguration"),td=b((f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h},"resolveRetryRuntimeConfig"),U7=b((f)=>{return Object.assign(pd(f),ud(f))},"getDefaultExtensionConfiguration"),fi=U7,hi=b((f)=>{return Object.assign(od(f),td(f))},"resolveDefaultRuntimeConfig"),wi=b((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),T7=b((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=T7(f[w]);return f},"getValueFromTextNode"),si=b((f)=>{return f!=null},"isSerializableHeaderValue"),uh=b(function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})},"LazyJsonString");uh.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof uh||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return uh(String(f));return uh(JSON.stringify(f))};uh.fromObject=uh.from;var $i=class{static{b(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function _T(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,Ui(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}F7(s,null,r,E)}return s}b(_T,"map");var ri=b((f)=>{let h={};for(let[w,s]of Object.entries(f||{}))h[w]=[,s];return h},"convertMap"),Ei=b((f,h)=>{let w={};for(let s in h)F7(w,f,h,s);return w},"take"),Ui=b((f,h,w)=>{return _T(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},"mapWithFilter"),F7=b((f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=Ti,T=Fi,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},"applyInstruction"),Ti=b((f)=>f!=null,"nonNullish"),Fi=b((f)=>f,"pass");function C7(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,"\\\"")}"`;return f}b(C7,"quoteHeader");var Ci=b((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),Ii=b((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),dT=b((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(dT);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=dT(f[w])}return h}return f},"_json");function I7(f,h,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");let s=f.split(h);if(w===1)return s;let $=[],r="";for(let E=0;E<s.length;E++){if(r==="")r=s[E];else r+=h+s[E];if((E+1)%w===0)$.push(r),r=""}if(r!=="")$.push(r);return $}b(I7,"splitEvery");var Li=b((f)=>{let h=f.length,w=[],s=!1,$=void 0,r=0;for(let E=0;E<h;++E){let U=f[E];switch(U){case'"':if($!=="\\")s=!s;break;case",":if(!s)w.push(f.slice(r,E)),r=E+1;break;default:}$=U}return w.push(f.slice(r)),w.map((E)=>{E=E.trim();let U=E.length;if(U<2)return E;if(E[0]==='"'&&E[U-1]==='"')E=E.slice(1,U-1);return E.replace(/\\"/g,'"')})},"splitHeader")});var u4=H((zi)=>{var Bi=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B7="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Bi+"]*",Gi=new RegExp("^"+B7+"$"),Wi=function(f,h){let w=[],s=h.exec(f);while(s){let $=[];$.startIndex=h.lastIndex-s[0].length;let r=s.length;for(let E=0;E<r;E++)$.push(s[E]);w.push($),s=h.exec(f)}return w},Ai=function(f){let h=Gi.exec(f);return!(h===null||typeof h==="undefined")};zi.isExist=function(f){return typeof f!=="undefined"};zi.isEmptyObject=function(f){return Object.keys(f).length===0};zi.merge=function(f,h,w){if(h){let s=Object.keys(h),$=s.length;for(let r=0;r<$;r++)if(w==="strict")f[s[r]]=[h[s[r]]];else f[s[r]]=h[s[r]]}};zi.getValue=function(f){if(zi.isExist(f))return f;else return""};zi.isName=Ai;zi.getAllMatches=Wi;zi.nameRegexp=B7});var eT=H((ki)=>{var nT=u4(),Ki={allowBooleanAttributes:!1,unpairedTags:[]};ki.validate=function(f,h){h=Object.assign({},Ki,h);let w=[],s=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let r=0;r<f.length;r++)if(f[r]==="<"&&f[r+1]==="?"){if(r+=2,r=A7(f,r),r.err)return r}else if(f[r]==="<"){let E=r;if(r++,f[r]==="!"){r=z7(f,r);continue}else{let U=!1;if(f[r]==="/")U=!0,r++;let T="";for(;r<f.length&&f[r]!==">"&&f[r]!==" "&&f[r]!=="\t"&&f[r]!==`
32
- `&&f[r]!=="\r";r++)T+=f[r];if(T=T.trim(),T[T.length-1]==="/")T=T.substring(0,T.length-1),r--;if(!qi(T)){let I;if(T.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+T+"' is an invalid name.";return d0("InvalidTag",I,L1(f,r))}let F=Vi(f,r);if(F===!1)return d0("InvalidAttr","Attributes for '"+T+"' have open quote.",L1(f,r));let C=F.value;if(r=F.index,C[C.length-1]==="/"){let I=r-C.length;C=C.substring(0,C.length-1);let L=R7(C,h);if(L===!0)s=!0;else return d0(L.err.code,L.err.msg,L1(f,I+L.err.line))}else if(U)if(!F.tagClosed)return d0("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",L1(f,r));else if(C.trim().length>0)return d0("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",L1(f,E));else if(w.length===0)return d0("InvalidTag","Closing tag '"+T+"' has not been opened.",L1(f,E));else{let I=w.pop();if(T!==I.tagName){let L=L1(f,I.tagStartPos);return d0("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+T+"'.",L1(f,E))}if(w.length==0)$=!0}else{let I=R7(C,h);if(I!==!0)return d0(I.err.code,I.err.msg,L1(f,r-C.length+I.err.line));if($===!0)return d0("InvalidXml","Multiple possible root nodes found.",L1(f,r));else if(h.unpairedTags.indexOf(T)!==-1);else w.push({tagName:T,tagStartPos:E});s=!0}for(r++;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="!"){r++,r=z7(f,r);continue}else if(f[r+1]==="?"){if(r=A7(f,++r),r.err)return r}else break;else if(f[r]==="&"){let I=Ni(f,r);if(I==-1)return d0("InvalidChar","char '&' is not expected.",L1(f,r));r=I}else if($===!0&&!W7(f[r]))return d0("InvalidXml","Extra text at the end",L1(f,r));if(f[r]==="<")r--}}else{if(W7(f[r]))continue;return d0("InvalidChar","char '"+f[r]+"' is not expected.",L1(f,r))}if(!s)return d0("InvalidXml","Start tag expected.",1);else if(w.length==1)return d0("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",L1(f,w[0].tagStartPos));else if(w.length>0)return d0("InvalidXml","Invalid '"+JSON.stringify(w.map((r)=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function W7(f){return f===" "||f==="\t"||f===`
33
- `||f==="\r"}function A7(f,h){let w=h;for(;h<f.length;h++)if(f[h]=="?"||f[h]==" "){let s=f.substr(w,h-w);if(h>5&&s==="xml")return d0("InvalidXml","XML declaration allowed only at the start of the document.",L1(f,h));else if(f[h]=="?"&&f[h+1]==">"){h++;break}else continue}return h}function z7(f,h){if(f.length>h+5&&f[h+1]==="-"&&f[h+2]==="-"){for(h+=3;h<f.length;h++)if(f[h]==="-"&&f[h+1]==="-"&&f[h+2]===">"){h+=2;break}}else if(f.length>h+8&&f[h+1]==="D"&&f[h+2]==="O"&&f[h+3]==="C"&&f[h+4]==="T"&&f[h+5]==="Y"&&f[h+6]==="P"&&f[h+7]==="E"){let w=1;for(h+=8;h<f.length;h++)if(f[h]==="<")w++;else if(f[h]===">"){if(w--,w===0)break}}else if(f.length>h+9&&f[h+1]==="["&&f[h+2]==="C"&&f[h+3]==="D"&&f[h+4]==="A"&&f[h+5]==="T"&&f[h+6]==="A"&&f[h+7]==="["){for(h+=8;h<f.length;h++)if(f[h]==="]"&&f[h+1]==="]"&&f[h+2]===">"){h+=2;break}}return h}var Zi='"',Ji="'";function Vi(f,h){let w="",s="",$=!1;for(;h<f.length;h++){if(f[h]===Zi||f[h]===Ji)if(s==="")s=f[h];else if(s!==f[h]);else s="";else if(f[h]===">"){if(s===""){$=!0;break}}w+=f[h]}if(s!=="")return!1;return{value:w,index:h,tagClosed:$}}var Pi=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function R7(f,h){let w=nT.getAllMatches(f,Pi),s={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",l$(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",l$(w[$]));else if(w[$][3]===void 0&&!h.allowBooleanAttributes)return d0("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",l$(w[$]));let r=w[$][2];if(!Di(r))return d0("InvalidAttr","Attribute '"+r+"' is an invalid name.",l$(w[$]));if(!s.hasOwnProperty(r))s[r]=1;else return d0("InvalidAttr","Attribute '"+r+"' is repeated.",l$(w[$]))}return!0}function Hi(f,h){let w=/\d/;if(f[h]==="x")h++,w=/[\da-fA-F]/;for(;h<f.length;h++){if(f[h]===";")return h;if(!f[h].match(w))break}return-1}function Ni(f,h){if(h++,f[h]===";")return-1;if(f[h]==="#")return h++,Hi(f,h);let w=0;for(;h<f.length;h++,w++){if(f[h].match(/\w/)&&w<20)continue;if(f[h]===";")break;return-1}return h}function d0(f,h,w){return{err:{code:f,msg:h,line:w.line||w,col:w.col}}}function Di(f){return nT.isName(f)}function qi(f){return nT.isName(f)}function L1(f,h){let w=f.substring(0,h).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function l$(f){return f.startIndex+f[1].length}});var S7=H((Oi)=>{var X7={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,h,w){return f}},ji=function(f){return Object.assign({},X7,f)};Oi.buildOptions=ji;Oi.defaultOptions=X7});var Q7=H((YT0,M7)=>{class Y7{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,h){if(f==="__proto__")f="#__proto__";this.child.push({[f]:h})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}M7.exports=Y7});var Z7=H((MT0,K7)=>{var bi=u4();function mi(f,h){let w={};if(f[h+3]==="O"&&f[h+4]==="C"&&f[h+5]==="T"&&f[h+6]==="Y"&&f[h+7]==="P"&&f[h+8]==="E"){h=h+9;let s=1,$=!1,r=!1,E="";for(;h<f.length;h++)if(f[h]==="<"&&!r){if($&&ci(f,h)){if(h+=7,[entityName,val,h]=di(f,h+1),val.indexOf("&")===-1)w[ni(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&gi(f,h))h+=8;else if($&&xi(f,h))h+=8;else if($&&_i(f,h))h+=9;else if(ii)r=!0;else throw new Error("Invalid DOCTYPE");s++,E=""}else if(f[h]===">"){if(r){if(f[h-1]==="-"&&f[h-2]==="-")r=!1,s--}else s--;if(s===0)break}else if(f[h]==="[")$=!0;else E+=f[h];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:h}}function di(f,h){let w="";for(;h<f.length&&(f[h]!=="'"&&f[h]!=='"');h++)w+=f[h];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=f[h++],$="";for(;h<f.length&&f[h]!==s;h++)$+=f[h];return[w,$,h]}function ii(f,h){if(f[h+1]==="!"&&f[h+2]==="-"&&f[h+3]==="-")return!0;return!1}function ci(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="N"&&f[h+4]==="T"&&f[h+5]==="I"&&f[h+6]==="T"&&f[h+7]==="Y")return!0;return!1}function gi(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="L"&&f[h+4]==="E"&&f[h+5]==="M"&&f[h+6]==="E"&&f[h+7]==="N"&&f[h+8]==="T")return!0;return!1}function xi(f,h){if(f[h+1]==="!"&&f[h+2]==="A"&&f[h+3]==="T"&&f[h+4]==="T"&&f[h+5]==="L"&&f[h+6]==="I"&&f[h+7]==="S"&&f[h+8]==="T")return!0;return!1}function _i(f,h){if(f[h+1]==="!"&&f[h+2]==="N"&&f[h+3]==="O"&&f[h+4]==="T"&&f[h+5]==="A"&&f[h+6]==="T"&&f[h+7]==="I"&&f[h+8]==="O"&&f[h+9]==="N")return!0;return!1}function ni(f){if(bi.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}K7.exports=mi});var V7=H((QT0,J7)=>{var ei=/^[-+]?0x[a-fA-F0-9]+$/,ai=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,pi={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function oi(f,h={}){if(h=Object.assign({},pi,h),!f||typeof f!=="string")return f;let w=f.trim();if(h.skipLike!==void 0&&h.skipLike.test(w))return f;else if(f==="0")return 0;else if(h.hex&&ei.test(w))return ti(w,16);else if(w.search(/[eE]/)!==-1){let s=w.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(h.leadingZeros)w=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return f;return h.eNotation?Number(w):f}else return f}else{let s=ai.exec(w);if(s){let $=s[1],r=s[2],E=ui(s[3]);if(!h.leadingZeros&&r.length>0&&$&&w[2]!==".")return f;else if(!h.leadingZeros&&r.length>0&&!$&&w[1]!==".")return f;else if(h.leadingZeros&&r===f)return 0;else{let U=Number(w),T=""+U;if(T.search(/[eE]/)!==-1)if(h.eNotation)return U;else return f;else if(w.indexOf(".")!==-1)if(T==="0"&&E==="")return U;else if(T===E)return U;else if($&&T==="-"+E)return U;else return f;if(r)return E===T||$+E===T?U:f;else return w===T||w===$+T?U:f}}else return f}}function ui(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}function ti(f,h){if(parseInt)return parseInt(f,h);else if(Number.parseInt)return Number.parseInt(f,h);else if(window&&window.parseInt)return window.parseInt(f,h);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}J7.exports=oi});var D7=H((KT0,N7)=>{var P7=u4(),v$=Q7(),fc=Z7(),hc=V7();class H7{constructor(f){this.options=f,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=wc,this.parseXml=Uc,this.parseTextData=sc,this.resolveNameSpace=$c,this.buildAttributesMap=Ec,this.isItStopNode=Ic,this.replaceEntitiesValue=Fc,this.readStopNodeData=Bc,this.saveTextToParentTag=Cc,this.addChild=Tc}}function wc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:f[s]}}}function sc(f,h,w,s,$,r,E){if(f!==void 0){if(this.options.trimValues&&!s)f=f.trim();if(f.length>0){if(!E)f=this.replaceEntitiesValue(f);let U=this.options.tagValueProcessor(h,f,w,$,r);if(U===null||U===void 0)return f;else if(typeof U!==typeof f||U!==f)return U;else if(this.options.trimValues)return pT(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return pT(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function $c(f){if(this.options.removeNSPrefix){let h=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(h[0]==="xmlns")return"";if(h.length===2)f=w+h[1]}return f}var rc=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ec(f,h,w){if(!this.options.ignoreAttributes&&typeof f==="string"){let s=P7.getAllMatches(f,rc),$=s.length,r={};for(let E=0;E<$;E++){let U=this.resolveNameSpace(s[E][1]),T=s[E][4],F=this.options.attributeNamePrefix+U;if(U.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(T!==void 0){if(this.options.trimValues)T=T.trim();T=this.replaceEntitiesValue(T);let C=this.options.attributeValueProcessor(U,T,h);if(C===null||C===void 0)r[F]=T;else if(typeof C!==typeof T||C!==T)r[F]=C;else r[F]=pT(T,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)r[F]=!0}}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){let E={};return E[this.options.attributesGroupName]=r,E}return r}}var Uc=function(f){f=f.replace(/\r\n?/g,`
34
- `);let h=new v$("!xml"),w=h,s="",$="";for(let r=0;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="/"){let U=th(f,">",r,"Closing Tag is not closed."),T=f.substring(r+2,U).trim();if(this.options.removeNSPrefix){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1)}if(this.options.transformTagName)T=this.options.transformTagName(T);if(w)s=this.saveTextToParentTag(s,w,$);let F=$.substring($.lastIndexOf(".")+1);if(T&&this.options.unpairedTags.indexOf(T)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${T}>`);let C=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)C=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=$.lastIndexOf(".");$=$.substring(0,C),w=this.tagsNodeStack.pop(),s="",r=U}else if(f[r+1]==="?"){let U=aT(f,r,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,w,$),this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags);else{let T=new v$(U.tagName);if(T.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent)T[":@"]=this.buildAttributesMap(U.tagExp,$,U.tagName);this.addChild(w,T,$)}r=U.closeIndex+1}else if(f.substr(r+1,3)==="!--"){let U=th(f,"-->",r+4,"Comment is not closed.");if(this.options.commentPropName){let T=f.substring(r+4,U-2);s=this.saveTextToParentTag(s,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:T}])}r=U}else if(f.substr(r+1,2)==="!D"){let U=fc(f,r);this.docTypeEntities=U.entities,r=U.i}else if(f.substr(r+1,2)==="!["){let U=th(f,"]]>",r,"CDATA is not closed.")-2,T=f.substring(r+9,U);s=this.saveTextToParentTag(s,w,$);let F=this.parseTextData(T,w.tagname,$,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:T}]);else w.add(this.options.textNodeName,F);r=U+2}else{let U=aT(f,r,this.options.removeNSPrefix),T=U.tagName,F=U.rawTagName,C=U.tagExp,I=U.attrExpPresent,L=U.closeIndex;if(this.options.transformTagName)T=this.options.transformTagName(T);if(w&&s){if(w.tagname!=="!xml")s=this.saveTextToParentTag(s,w,$,!1)}let W=w;if(W&&this.options.unpairedTags.indexOf(W.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(T!==h.tagname)$+=$?"."+T:T;if(this.isItStopNode(this.options.stopNodes,$,T)){let X="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);r=U.closeIndex}else if(this.options.unpairedTags.indexOf(T)!==-1)r=U.closeIndex;else{let M=this.readStopNodeData(f,F,L+1);if(!M)throw new Error(`Unexpected end of ${F}`);r=M.i,X=M.tagContent}let Q=new v$(T);if(T!==C&&I)Q[":@"]=this.buildAttributesMap(C,$,T);if(X)X=this.parseTextData(X,T,$,!0,I,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Q.add(this.options.textNodeName,X),this.addChild(w,Q,$)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);if(this.options.transformTagName)T=this.options.transformTagName(T);let X=new v$(T);if(T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),$=$.substr(0,$.lastIndexOf("."))}else{let X=new v$(T);if(this.tagsNodeStack.push(w),T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),w=X}s="",r=L}}else s+=f[r];return h.child};function Tc(f,h,w){let s=this.options.updateTag(h.tagname,w,h[":@"]);if(s===!1);else if(typeof s==="string")h.tagname=s,f.addChild(h);else f.addChild(h)}var Fc=function(f){if(this.options.processEntities){for(let h in this.docTypeEntities){let w=this.docTypeEntities[h];f=f.replace(w.regx,w.val)}for(let h in this.lastEntities){let w=this.lastEntities[h];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let h in this.htmlEntities){let w=this.htmlEntities[h];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function Cc(f,h,w,s){if(f){if(s===void 0)s=Object.keys(h.child).length===0;if(f=this.parseTextData(f,h.tagname,w,!1,h[":@"]?Object.keys(h[":@"]).length!==0:!1,s),f!==void 0&&f!=="")h.add(this.options.textNodeName,f);f=""}return f}function Ic(f,h,w){let s="*."+w;for(let $ in f){let r=f[$];if(s===r||h===r)return!0}return!1}function Lc(f,h,w=">"){let s,$="";for(let r=h;r<f.length;r++){let E=f[r];if(s){if(E===s)s=""}else if(E==='"'||E==="'")s=E;else if(E===w[0])if(w[1]){if(f[r+1]===w[1])return{data:$,index:r}}else return{data:$,index:r};else if(E==="\t")E=" ";$+=E}}function th(f,h,w,s){let $=f.indexOf(h,w);if($===-1)throw new Error(s);else return $+h.length-1}function aT(f,h,w,s=">"){let $=Lc(f,h+1,s);if(!$)return;let{data:r,index:E}=$,U=r.search(/\s/),T=r,F=!0;if(U!==-1)T=r.substring(0,U),r=r.substring(U+1).trimStart();let C=T;if(w){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1),F=T!==$.data.substr(I+1)}return{tagName:T,tagExp:r,closeIndex:E,attrExpPresent:F,rawTagName:C}}function Bc(f,h,w){let s=w,$=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){let r=th(f,">",w,`${h} is not closed`);if(f.substring(w+2,r).trim()===h){if($--,$===0)return{tagContent:f.substring(s,w),i:r}}w=r}else if(f[w+1]==="?")w=th(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=th(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=th(f,"]]>",w,"StopNode is not closed.")-2;else{let r=aT(f,w,">");if(r){if((r&&r.tagName)===h&&r.tagExp[r.tagExp.length-1]!=="/")$++;w=r.closeIndex}}}function pT(f,h,w){if(h&&typeof f==="string"){let s=f.trim();if(s==="true")return!0;else if(s==="false")return!1;else return hc(f,w)}else if(P7.isExist(f))return f;else return""}N7.exports=H7});var k7=H((Rc)=>{function Gc(f,h){return q7(f,h)}function q7(f,h,w){let s,$={};for(let r=0;r<f.length;r++){let E=f[r],U=Wc(E),T="";if(w===void 0)T=U;else T=w+"."+U;if(U===h.textNodeName)if(s===void 0)s=E[U];else s+=""+E[U];else if(U===void 0)continue;else if(E[U]){let F=q7(E[U],h,T),C=zc(F,h);if(E[":@"])Ac(F,E[":@"],T,h);else if(Object.keys(F).length===1&&F[h.textNodeName]!==void 0&&!h.alwaysCreateTextNode)F=F[h.textNodeName];else if(Object.keys(F).length===0)if(h.alwaysCreateTextNode)F[h.textNodeName]="";else F="";if($[U]!==void 0&&$.hasOwnProperty(U)){if(!Array.isArray($[U]))$[U]=[$[U]];$[U].push(F)}else if(h.isArray(U,T,C))$[U]=[F];else $[U]=F}}if(typeof s==="string"){if(s.length>0)$[h.textNodeName]=s}else if(s!==void 0)$[h.textNodeName]=s;return $}function Wc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(s!==":@")return s}}function Ac(f,h,w,s){if(h){let $=Object.keys(h),r=$.length;for(let E=0;E<r;E++){let U=$[E];if(s.isArray(U,w+"."+U,!0,!0))f[U]=[h[U]];else f[U]=h[U]}}}function zc(f,h){let{textNodeName:w}=h,s=Object.keys(f).length;if(s===0)return!0;if(s===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1}Rc.prettify=Gc});var O7=H((JT0,j7)=>{var{buildOptions:Sc}=S7(),Yc=D7(),{prettify:Mc}=k7(),Qc=eT();class y7{constructor(f){this.externalEntities={},this.options=Sc(f)}parse(f,h){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){if(h===!0)h={};let $=Qc.validate(f,h);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let w=new Yc(this.options);w.addExternalEntities(this.externalEntities);let s=w.parseXml(f);if(this.options.preserveOrder||s===void 0)return s;else return Mc(s,this.options)}addEntity(f,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(h==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=h}}j7.exports=y7});var d7=H((VT0,m7)=>{function Kc(f,h){let w="";if(h.format&&h.indentBy.length>0)w=`
35
- `;return v7(f,h,"",w)}function v7(f,h,w,s){let $="",r=!1;for(let E=0;E<f.length;E++){let U=f[E],T=Zc(U);if(T===void 0)continue;let F="";if(w.length===0)F=T;else F=`${w}.${T}`;if(T===h.textNodeName){let X=U[T];if(!Jc(F,h))X=h.tagValueProcessor(T,X),X=b7(X,h);if(r)$+=s;$+=X,r=!1;continue}else if(T===h.cdataPropName){if(r)$+=s;$+=`<![CDATA[${U[T][0][h.textNodeName]}]]>`,r=!1;continue}else if(T===h.commentPropName){$+=s+`<!--${U[T][0][h.textNodeName]}-->`,r=!0;continue}else if(T[0]==="?"){let X=l7(U[":@"],h),Q=T==="?xml"?"":s,M=U[T][0][h.textNodeName];M=M.length!==0?" "+M:"",$+=Q+`<${T}${M}${X}?>`,r=!0;continue}let C=s;if(C!=="")C+=h.indentBy;let I=l7(U[":@"],h),L=s+`<${T}${I}`,W=v7(U[T],h,F,C);if(h.unpairedTags.indexOf(T)!==-1)if(h.suppressUnpairedNode)$+=L+">";else $+=L+"/>";else if((!W||W.length===0)&&h.suppressEmptyNode)$+=L+"/>";else if(W&&W.endsWith(">"))$+=L+`>${W}${s}</${T}>`;else{if($+=L+">",W&&s!==""&&(W.includes("/>")||W.includes("</")))$+=s+h.indentBy+W+s;else $+=W;$+=`</${T}>`}r=!0}return $}function Zc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(!f.hasOwnProperty(s))continue;if(s!==":@")return s}}function l7(f,h){let w="";if(f&&!h.ignoreAttributes)for(let s in f){if(!f.hasOwnProperty(s))continue;let $=h.attributeValueProcessor(s,f[s]);if($=b7($,h),$===!0&&h.suppressBooleanAttributes)w+=` ${s.substr(h.attributeNamePrefix.length)}`;else w+=` ${s.substr(h.attributeNamePrefix.length)}="${$}"`}return w}function Jc(f,h){f=f.substr(0,f.length-h.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===f||h.stopNodes[s]==="*."+w)return!0;return!1}function b7(f,h){if(f&&f.length>0&&h.processEntities)for(let w=0;w<h.entities.length;w++){let s=h.entities[w];f=f.replace(s.regex,s.val)}return f}m7.exports=Kc});var c7=H((PT0,i7)=>{var Vc=d7(),Pc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Xh(f){if(this.options=Object.assign({},Pc,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Dc;if(this.processTextOrObjNode=Hc,this.options.format)this.indentate=Nc,this.tagEndChar=`>
31
+ `)},"stackTraceWarning"),N$={warn:console.warn},Zd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xT=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $7(f){let h=f.getUTCFullYear(),w=f.getUTCMonth(),s=f.getUTCDay(),$=f.getUTCDate(),r=f.getUTCHours(),E=f.getUTCMinutes(),U=f.getUTCSeconds(),T=$<10?`0${$}`:`${$}`,F=r<10?`0${r}`:`${r}`,C=E<10?`0${E}`:`${E}`,I=U<10?`0${U}`:`${U}`;return`${Zd[s]}, ${T} ${xT[w]} ${h} ${F}:${C}:${I} GMT`}b($7,"dateToUtcString");var Jd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Vd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Jd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=bw(mw(s)),I=Mf($,"month",1,12),L=Mf(r,"day",1,31);return V$(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},"parseRfc3339DateTime"),Pd=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Hd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Pd.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=bw(mw(s)),L=Mf($,"month",1,12),W=Mf(r,"day",1,31),X=V$(I,L,W,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-id(C));return X},"parseRfc3339DateTimeWithOffset"),Nd=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$/),Dd=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$/),qd=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})$/),kd=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let h=Nd.exec(f);if(h){let[w,s,$,r,E,U,T,F]=h;return V$(bw(mw(r)),OT($),Mf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})}if(h=Dd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return ld(V$(jd(r),OT($),Mf(s,"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F}))}if(h=qd.exec(f),h){let[w,s,$,r,E,U,T,F]=h;return V$(bw(mw(F)),OT(s),Mf($.trimLeft(),"day",1,31),{hours:r,minutes:E,seconds:U,fractionalMilliseconds:T})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),yd=b((f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=cT(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},"parseEpochTimestamp"),V$=b((f,h,w,s)=>{let $=h-1;return bd(f,$,w),new Date(Date.UTC(f,$,w,Mf(s.hours,"hour",0,23),Mf(s.minutes,"minute",0,59),Mf(s.seconds,"seconds",0,60),dd(s.fractionalMilliseconds)))},"buildDate"),jd=b((f)=>{let h=new Date().getUTCFullYear(),w=Math.floor(h/100)*100+bw(mw(f));if(w<h)return w+100;return w},"parseTwoDigitYear"),Od=1576800000000,ld=b((f)=>{if(f.getTime()-new Date().getTime()>Od)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),OT=b((f)=>{let h=xT.indexOf(f);if(h<0)throw new TypeError(`Invalid month: ${f}`);return h+1},"parseMonthByShortName"),vd=[31,28,31,30,31,30,31,31,30,31,30,31],bd=b((f,h,w)=>{let s=vd[h];if(h===1&&md(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${xT[h]} in ${f}: ${w}`)},"validateDayOfMonth"),md=b((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),Mf=b((f,h,w,s)=>{let $=s7(mw(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},"parseDateValue"),dd=b((f)=>{if(f===null||f===void 0)return 0;return f7("0."+f)*1000},"parseMilliseconds"),id=b((f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),mw=b((f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)},"stripLeadingZeroes"),cd=class f extends Error{static{b(this,"ServiceException")}constructor(h){super(h.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=h.name,this.$fault=h.$fault,this.$metadata=h.$metadata}static isInstance(h){if(!h)return!1;let w=h;return f.prototype.isPrototypeOf(w)||Boolean(w.$fault)&&Boolean(w.$metadata)&&(w.$fault==="client"||w.$fault==="server")}static[Symbol.hasInstance](h){if(!h)return!1;let w=h;if(this===f)return f.isInstance(h);if(f.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}},r7=b((f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),E7=b(({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=xd(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw r7(E,h)},"throwDefaultError"),gd=b((f)=>{return({output:h,parsedBody:w,errorCode:s})=>{E7({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},"withBaseException"),xd=b((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),_d=b((f)=>{switch(f){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"),aA=!1,nd=b((f)=>{if(f&&!aA&&parseInt(f.substring(1,f.indexOf(".")))<16)aA=!0},"emitWarningIfUnsupportedVersion"),ed=b((f)=>{let h=[];for(let w in lT.AlgorithmId){let s=lT.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),ad=b((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),pd=b((f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},"getRetryConfiguration"),od=b((f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h},"resolveRetryRuntimeConfig"),U7=b((f)=>{return Object.assign(ed(f),pd(f))},"getDefaultExtensionConfiguration"),ud=U7,td=b((f)=>{return Object.assign(ad(f),od(f))},"resolveDefaultRuntimeConfig"),fi=b((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),T7=b((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=T7(f[w]);return f},"getValueFromTextNode"),hi=b((f)=>{return f!=null},"isSerializableHeaderValue"),uh=b(function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})},"LazyJsonString");uh.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof uh||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return uh(String(f));return uh(JSON.stringify(f))};uh.fromObject=uh.from;var wi=class{static{b(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function _T(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,ri(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}F7(s,null,r,E)}return s}b(_T,"map");var si=b((f)=>{let h={};for(let[w,s]of Object.entries(f||{}))h[w]=[,s];return h},"convertMap"),$i=b((f,h)=>{let w={};for(let s in h)F7(w,f,h,s);return w},"take"),ri=b((f,h,w)=>{return _T(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},"mapWithFilter"),F7=b((f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=Ei,T=Ui,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},"applyInstruction"),Ei=b((f)=>f!=null,"nonNullish"),Ui=b((f)=>f,"pass");function C7(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,"\\\"")}"`;return f}b(C7,"quoteHeader");var Ti=b((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),Fi=b((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),dT=b((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(dT);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=dT(f[w])}return h}return f},"_json");function I7(f,h,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");let s=f.split(h);if(w===1)return s;let $=[],r="";for(let E=0;E<s.length;E++){if(r==="")r=s[E];else r+=h+s[E];if((E+1)%w===0)$.push(r),r=""}if(r!=="")$.push(r);return $}b(I7,"splitEvery");var Ci=b((f)=>{let h=f.length,w=[],s=!1,$=void 0,r=0;for(let E=0;E<h;++E){let U=f[E];switch(U){case'"':if($!=="\\")s=!s;break;case",":if(!s)w.push(f.slice(r,E)),r=E+1;break;default:}$=U}return w.push(f.slice(r)),w.map((E)=>{E=E.trim();let U=E.length;if(U<2)return E;if(E[0]==='"'&&E[U-1]==='"')E=E.slice(1,U-1);return E.replace(/\\"/g,'"')})},"splitHeader")});var e5=H((Wi)=>{var Ii=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B7="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Ii+"]*",Li=new RegExp("^"+B7+"$"),Bi=function(f,h){let w=[],s=h.exec(f);while(s){let $=[];$.startIndex=h.lastIndex-s[0].length;let r=s.length;for(let E=0;E<r;E++)$.push(s[E]);w.push($),s=h.exec(f)}return w},Gi=function(f){let h=Li.exec(f);return!(h===null||typeof h==="undefined")};Wi.isExist=function(f){return typeof f!=="undefined"};Wi.isEmptyObject=function(f){return Object.keys(f).length===0};Wi.merge=function(f,h,w){if(h){let s=Object.keys(h),$=s.length;for(let r=0;r<$;r++)if(w==="strict")f[s[r]]=[h[s[r]]];else f[s[r]]=h[s[r]]}};Wi.getValue=function(f){if(Wi.isExist(f))return f;else return""};Wi.isName=Gi;Wi.getAllMatches=Bi;Wi.nameRegexp=B7});var eT=H((Di)=>{var nT=e5(),Mi={allowBooleanAttributes:!1,unpairedTags:[]};Di.validate=function(f,h){h=Object.assign({},Mi,h);let w=[],s=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let r=0;r<f.length;r++)if(f[r]==="<"&&f[r+1]==="?"){if(r+=2,r=z7(f,r),r.err)return r}else if(f[r]==="<"){let E=r;if(r++,f[r]==="!"){r=A7(f,r);continue}else{let U=!1;if(f[r]==="/")U=!0,r++;let T="";for(;r<f.length&&f[r]!==">"&&f[r]!==" "&&f[r]!=="\t"&&f[r]!==`
32
+ `&&f[r]!=="\r";r++)T+=f[r];if(T=T.trim(),T[T.length-1]==="/")T=T.substring(0,T.length-1),r--;if(!Ni(T)){let I;if(T.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+T+"' is an invalid name.";return d0("InvalidTag",I,L1(f,r))}let F=Zi(f,r);if(F===!1)return d0("InvalidAttr","Attributes for '"+T+"' have open quote.",L1(f,r));let C=F.value;if(r=F.index,C[C.length-1]==="/"){let I=r-C.length;C=C.substring(0,C.length-1);let L=R7(C,h);if(L===!0)s=!0;else return d0(L.err.code,L.err.msg,L1(f,I+L.err.line))}else if(U)if(!F.tagClosed)return d0("InvalidTag","Closing tag '"+T+"' doesn't have proper closing.",L1(f,r));else if(C.trim().length>0)return d0("InvalidTag","Closing tag '"+T+"' can't have attributes or invalid starting.",L1(f,E));else if(w.length===0)return d0("InvalidTag","Closing tag '"+T+"' has not been opened.",L1(f,E));else{let I=w.pop();if(T!==I.tagName){let L=L1(f,I.tagStartPos);return d0("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+T+"'.",L1(f,E))}if(w.length==0)$=!0}else{let I=R7(C,h);if(I!==!0)return d0(I.err.code,I.err.msg,L1(f,r-C.length+I.err.line));if($===!0)return d0("InvalidXml","Multiple possible root nodes found.",L1(f,r));else if(h.unpairedTags.indexOf(T)!==-1);else w.push({tagName:T,tagStartPos:E});s=!0}for(r++;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="!"){r++,r=A7(f,r);continue}else if(f[r+1]==="?"){if(r=z7(f,++r),r.err)return r}else break;else if(f[r]==="&"){let I=Pi(f,r);if(I==-1)return d0("InvalidChar","char '&' is not expected.",L1(f,r));r=I}else if($===!0&&!W7(f[r]))return d0("InvalidXml","Extra text at the end",L1(f,r));if(f[r]==="<")r--}}else{if(W7(f[r]))continue;return d0("InvalidChar","char '"+f[r]+"' is not expected.",L1(f,r))}if(!s)return d0("InvalidXml","Start tag expected.",1);else if(w.length==1)return d0("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",L1(f,w[0].tagStartPos));else if(w.length>0)return d0("InvalidXml","Invalid '"+JSON.stringify(w.map((r)=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function W7(f){return f===" "||f==="\t"||f===`
33
+ `||f==="\r"}function z7(f,h){let w=h;for(;h<f.length;h++)if(f[h]=="?"||f[h]==" "){let s=f.substr(w,h-w);if(h>5&&s==="xml")return d0("InvalidXml","XML declaration allowed only at the start of the document.",L1(f,h));else if(f[h]=="?"&&f[h+1]==">"){h++;break}else continue}return h}function A7(f,h){if(f.length>h+5&&f[h+1]==="-"&&f[h+2]==="-"){for(h+=3;h<f.length;h++)if(f[h]==="-"&&f[h+1]==="-"&&f[h+2]===">"){h+=2;break}}else if(f.length>h+8&&f[h+1]==="D"&&f[h+2]==="O"&&f[h+3]==="C"&&f[h+4]==="T"&&f[h+5]==="Y"&&f[h+6]==="P"&&f[h+7]==="E"){let w=1;for(h+=8;h<f.length;h++)if(f[h]==="<")w++;else if(f[h]===">"){if(w--,w===0)break}}else if(f.length>h+9&&f[h+1]==="["&&f[h+2]==="C"&&f[h+3]==="D"&&f[h+4]==="A"&&f[h+5]==="T"&&f[h+6]==="A"&&f[h+7]==="["){for(h+=8;h<f.length;h++)if(f[h]==="]"&&f[h+1]==="]"&&f[h+2]===">"){h+=2;break}}return h}var Qi='"',Ki="'";function Zi(f,h){let w="",s="",$=!1;for(;h<f.length;h++){if(f[h]===Qi||f[h]===Ki)if(s==="")s=f[h];else if(s!==f[h]);else s="";else if(f[h]===">"){if(s===""){$=!0;break}}w+=f[h]}if(s!=="")return!1;return{value:w,index:h,tagClosed:$}}var Ji=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function R7(f,h){let w=nT.getAllMatches(f,Ji),s={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",D$(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return d0("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",D$(w[$]));else if(w[$][3]===void 0&&!h.allowBooleanAttributes)return d0("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",D$(w[$]));let r=w[$][2];if(!Hi(r))return d0("InvalidAttr","Attribute '"+r+"' is an invalid name.",D$(w[$]));if(!s.hasOwnProperty(r))s[r]=1;else return d0("InvalidAttr","Attribute '"+r+"' is repeated.",D$(w[$]))}return!0}function Vi(f,h){let w=/\d/;if(f[h]==="x")h++,w=/[\da-fA-F]/;for(;h<f.length;h++){if(f[h]===";")return h;if(!f[h].match(w))break}return-1}function Pi(f,h){if(h++,f[h]===";")return-1;if(f[h]==="#")return h++,Vi(f,h);let w=0;for(;h<f.length;h++,w++){if(f[h].match(/\w/)&&w<20)continue;if(f[h]===";")break;return-1}return h}function d0(f,h,w){return{err:{code:f,msg:h,line:w.line||w,col:w.col}}}function Hi(f){return nT.isName(f)}function Ni(f){return nT.isName(f)}function L1(f,h){let w=f.substring(0,h).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function D$(f){return f.startIndex+f[1].length}});var S7=H((yi)=>{var X7={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,h,w){return f}},ki=function(f){return Object.assign({},X7,f)};yi.buildOptions=ki;yi.defaultOptions=X7});var Q7=H((RT0,M7)=>{class Y7{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,h){if(f==="__proto__")f="#__proto__";this.child.push({[f]:h})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}M7.exports=Y7});var Z7=H((XT0,K7)=>{var li=e5();function vi(f,h){let w={};if(f[h+3]==="O"&&f[h+4]==="C"&&f[h+5]==="T"&&f[h+6]==="Y"&&f[h+7]==="P"&&f[h+8]==="E"){h=h+9;let s=1,$=!1,r=!1,E="";for(;h<f.length;h++)if(f[h]==="<"&&!r){if($&&di(f,h)){if(h+=7,[entityName,val,h]=bi(f,h+1),val.indexOf("&")===-1)w[xi(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&ii(f,h))h+=8;else if($&&ci(f,h))h+=8;else if($&&gi(f,h))h+=9;else if(mi)r=!0;else throw new Error("Invalid DOCTYPE");s++,E=""}else if(f[h]===">"){if(r){if(f[h-1]==="-"&&f[h-2]==="-")r=!1,s--}else s--;if(s===0)break}else if(f[h]==="[")$=!0;else E+=f[h];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:h}}function bi(f,h){let w="";for(;h<f.length&&(f[h]!=="'"&&f[h]!=='"');h++)w+=f[h];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=f[h++],$="";for(;h<f.length&&f[h]!==s;h++)$+=f[h];return[w,$,h]}function mi(f,h){if(f[h+1]==="!"&&f[h+2]==="-"&&f[h+3]==="-")return!0;return!1}function di(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="N"&&f[h+4]==="T"&&f[h+5]==="I"&&f[h+6]==="T"&&f[h+7]==="Y")return!0;return!1}function ii(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="L"&&f[h+4]==="E"&&f[h+5]==="M"&&f[h+6]==="E"&&f[h+7]==="N"&&f[h+8]==="T")return!0;return!1}function ci(f,h){if(f[h+1]==="!"&&f[h+2]==="A"&&f[h+3]==="T"&&f[h+4]==="T"&&f[h+5]==="L"&&f[h+6]==="I"&&f[h+7]==="S"&&f[h+8]==="T")return!0;return!1}function gi(f,h){if(f[h+1]==="!"&&f[h+2]==="N"&&f[h+3]==="O"&&f[h+4]==="T"&&f[h+5]==="A"&&f[h+6]==="T"&&f[h+7]==="I"&&f[h+8]==="O"&&f[h+9]==="N")return!0;return!1}function xi(f){if(li.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}K7.exports=vi});var V7=H((ST0,J7)=>{var _i=/^[-+]?0x[a-fA-F0-9]+$/,ni=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ei={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function ai(f,h={}){if(h=Object.assign({},ei,h),!f||typeof f!=="string")return f;let w=f.trim();if(h.skipLike!==void 0&&h.skipLike.test(w))return f;else if(f==="0")return 0;else if(h.hex&&_i.test(w))return oi(w,16);else if(w.search(/[eE]/)!==-1){let s=w.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(h.leadingZeros)w=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return f;return h.eNotation?Number(w):f}else return f}else{let s=ni.exec(w);if(s){let $=s[1],r=s[2],E=pi(s[3]);if(!h.leadingZeros&&r.length>0&&$&&w[2]!==".")return f;else if(!h.leadingZeros&&r.length>0&&!$&&w[1]!==".")return f;else if(h.leadingZeros&&r===f)return 0;else{let U=Number(w),T=""+U;if(T.search(/[eE]/)!==-1)if(h.eNotation)return U;else return f;else if(w.indexOf(".")!==-1)if(T==="0"&&E==="")return U;else if(T===E)return U;else if($&&T==="-"+E)return U;else return f;if(r)return E===T||$+E===T?U:f;else return w===T||w===$+T?U:f}}else return f}}function pi(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}function oi(f,h){if(parseInt)return parseInt(f,h);else if(Number.parseInt)return Number.parseInt(f,h);else if(window&&window.parseInt)return window.parseInt(f,h);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}J7.exports=ai});var D7=H((YT0,N7)=>{var P7=e5(),q$=Q7(),ui=Z7(),ti=V7();class H7{constructor(f){this.options=f,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=fc,this.parseXml=rc,this.parseTextData=hc,this.resolveNameSpace=wc,this.buildAttributesMap=$c,this.isItStopNode=Fc,this.replaceEntitiesValue=Uc,this.readStopNodeData=Ic,this.saveTextToParentTag=Tc,this.addChild=Ec}}function fc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:f[s]}}}function hc(f,h,w,s,$,r,E){if(f!==void 0){if(this.options.trimValues&&!s)f=f.trim();if(f.length>0){if(!E)f=this.replaceEntitiesValue(f);let U=this.options.tagValueProcessor(h,f,w,$,r);if(U===null||U===void 0)return f;else if(typeof U!==typeof f||U!==f)return U;else if(this.options.trimValues)return pT(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return pT(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function wc(f){if(this.options.removeNSPrefix){let h=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(h[0]==="xmlns")return"";if(h.length===2)f=w+h[1]}return f}var sc=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function $c(f,h,w){if(!this.options.ignoreAttributes&&typeof f==="string"){let s=P7.getAllMatches(f,sc),$=s.length,r={};for(let E=0;E<$;E++){let U=this.resolveNameSpace(s[E][1]),T=s[E][4],F=this.options.attributeNamePrefix+U;if(U.length){if(this.options.transformAttributeName)F=this.options.transformAttributeName(F);if(F==="__proto__")F="#__proto__";if(T!==void 0){if(this.options.trimValues)T=T.trim();T=this.replaceEntitiesValue(T);let C=this.options.attributeValueProcessor(U,T,h);if(C===null||C===void 0)r[F]=T;else if(typeof C!==typeof T||C!==T)r[F]=C;else r[F]=pT(T,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)r[F]=!0}}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){let E={};return E[this.options.attributesGroupName]=r,E}return r}}var rc=function(f){f=f.replace(/\r\n?/g,`
34
+ `);let h=new q$("!xml"),w=h,s="",$="";for(let r=0;r<f.length;r++)if(f[r]==="<")if(f[r+1]==="/"){let U=th(f,">",r,"Closing Tag is not closed."),T=f.substring(r+2,U).trim();if(this.options.removeNSPrefix){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1)}if(this.options.transformTagName)T=this.options.transformTagName(T);if(w)s=this.saveTextToParentTag(s,w,$);let F=$.substring($.lastIndexOf(".")+1);if(T&&this.options.unpairedTags.indexOf(T)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${T}>`);let C=0;if(F&&this.options.unpairedTags.indexOf(F)!==-1)C=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=$.lastIndexOf(".");$=$.substring(0,C),w=this.tagsNodeStack.pop(),s="",r=U}else if(f[r+1]==="?"){let U=aT(f,r,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,w,$),this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags);else{let T=new q$(U.tagName);if(T.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent)T[":@"]=this.buildAttributesMap(U.tagExp,$,U.tagName);this.addChild(w,T,$)}r=U.closeIndex+1}else if(f.substr(r+1,3)==="!--"){let U=th(f,"-->",r+4,"Comment is not closed.");if(this.options.commentPropName){let T=f.substring(r+4,U-2);s=this.saveTextToParentTag(s,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:T}])}r=U}else if(f.substr(r+1,2)==="!D"){let U=ui(f,r);this.docTypeEntities=U.entities,r=U.i}else if(f.substr(r+1,2)==="!["){let U=th(f,"]]>",r,"CDATA is not closed.")-2,T=f.substring(r+9,U);s=this.saveTextToParentTag(s,w,$);let F=this.parseTextData(T,w.tagname,$,!0,!1,!0,!0);if(F==null)F="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:T}]);else w.add(this.options.textNodeName,F);r=U+2}else{let U=aT(f,r,this.options.removeNSPrefix),T=U.tagName,F=U.rawTagName,C=U.tagExp,I=U.attrExpPresent,L=U.closeIndex;if(this.options.transformTagName)T=this.options.transformTagName(T);if(w&&s){if(w.tagname!=="!xml")s=this.saveTextToParentTag(s,w,$,!1)}let W=w;if(W&&this.options.unpairedTags.indexOf(W.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(T!==h.tagname)$+=$?"."+T:T;if(this.isItStopNode(this.options.stopNodes,$,T)){let X="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);r=U.closeIndex}else if(this.options.unpairedTags.indexOf(T)!==-1)r=U.closeIndex;else{let M=this.readStopNodeData(f,F,L+1);if(!M)throw new Error(`Unexpected end of ${F}`);r=M.i,X=M.tagContent}let Q=new q$(T);if(T!==C&&I)Q[":@"]=this.buildAttributesMap(C,$,T);if(X)X=this.parseTextData(X,T,$,!0,I,!0,!0);$=$.substr(0,$.lastIndexOf(".")),Q.add(this.options.textNodeName,X),this.addChild(w,Q,$)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(T[T.length-1]==="/")T=T.substr(0,T.length-1),$=$.substr(0,$.length-1),C=T;else C=C.substr(0,C.length-1);if(this.options.transformTagName)T=this.options.transformTagName(T);let X=new q$(T);if(T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),$=$.substr(0,$.lastIndexOf("."))}else{let X=new q$(T);if(this.tagsNodeStack.push(w),T!==C&&I)X[":@"]=this.buildAttributesMap(C,$,T);this.addChild(w,X,$),w=X}s="",r=L}}else s+=f[r];return h.child};function Ec(f,h,w){let s=this.options.updateTag(h.tagname,w,h[":@"]);if(s===!1);else if(typeof s==="string")h.tagname=s,f.addChild(h);else f.addChild(h)}var Uc=function(f){if(this.options.processEntities){for(let h in this.docTypeEntities){let w=this.docTypeEntities[h];f=f.replace(w.regx,w.val)}for(let h in this.lastEntities){let w=this.lastEntities[h];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let h in this.htmlEntities){let w=this.htmlEntities[h];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function Tc(f,h,w,s){if(f){if(s===void 0)s=Object.keys(h.child).length===0;if(f=this.parseTextData(f,h.tagname,w,!1,h[":@"]?Object.keys(h[":@"]).length!==0:!1,s),f!==void 0&&f!=="")h.add(this.options.textNodeName,f);f=""}return f}function Fc(f,h,w){let s="*."+w;for(let $ in f){let r=f[$];if(s===r||h===r)return!0}return!1}function Cc(f,h,w=">"){let s,$="";for(let r=h;r<f.length;r++){let E=f[r];if(s){if(E===s)s=""}else if(E==='"'||E==="'")s=E;else if(E===w[0])if(w[1]){if(f[r+1]===w[1])return{data:$,index:r}}else return{data:$,index:r};else if(E==="\t")E=" ";$+=E}}function th(f,h,w,s){let $=f.indexOf(h,w);if($===-1)throw new Error(s);else return $+h.length-1}function aT(f,h,w,s=">"){let $=Cc(f,h+1,s);if(!$)return;let{data:r,index:E}=$,U=r.search(/\s/),T=r,F=!0;if(U!==-1)T=r.substring(0,U),r=r.substring(U+1).trimStart();let C=T;if(w){let I=T.indexOf(":");if(I!==-1)T=T.substr(I+1),F=T!==$.data.substr(I+1)}return{tagName:T,tagExp:r,closeIndex:E,attrExpPresent:F,rawTagName:C}}function Ic(f,h,w){let s=w,$=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){let r=th(f,">",w,`${h} is not closed`);if(f.substring(w+2,r).trim()===h){if($--,$===0)return{tagContent:f.substring(s,w),i:r}}w=r}else if(f[w+1]==="?")w=th(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=th(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=th(f,"]]>",w,"StopNode is not closed.")-2;else{let r=aT(f,w,">");if(r){if((r&&r.tagName)===h&&r.tagExp[r.tagExp.length-1]!=="/")$++;w=r.closeIndex}}}function pT(f,h,w){if(h&&typeof f==="string"){let s=f.trim();if(s==="true")return!0;else if(s==="false")return!1;else return ti(f,w)}else if(P7.isExist(f))return f;else return""}N7.exports=H7});var k7=H((zc)=>{function Lc(f,h){return q7(f,h)}function q7(f,h,w){let s,$={};for(let r=0;r<f.length;r++){let E=f[r],U=Bc(E),T="";if(w===void 0)T=U;else T=w+"."+U;if(U===h.textNodeName)if(s===void 0)s=E[U];else s+=""+E[U];else if(U===void 0)continue;else if(E[U]){let F=q7(E[U],h,T),C=Wc(F,h);if(E[":@"])Gc(F,E[":@"],T,h);else if(Object.keys(F).length===1&&F[h.textNodeName]!==void 0&&!h.alwaysCreateTextNode)F=F[h.textNodeName];else if(Object.keys(F).length===0)if(h.alwaysCreateTextNode)F[h.textNodeName]="";else F="";if($[U]!==void 0&&$.hasOwnProperty(U)){if(!Array.isArray($[U]))$[U]=[$[U]];$[U].push(F)}else if(h.isArray(U,T,C))$[U]=[F];else $[U]=F}}if(typeof s==="string"){if(s.length>0)$[h.textNodeName]=s}else if(s!==void 0)$[h.textNodeName]=s;return $}function Bc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(s!==":@")return s}}function Gc(f,h,w,s){if(h){let $=Object.keys(h),r=$.length;for(let E=0;E<r;E++){let U=$[E];if(s.isArray(U,w+"."+U,!0,!0))f[U]=[h[U]];else f[U]=h[U]}}}function Wc(f,h){let{textNodeName:w}=h,s=Object.keys(f).length;if(s===0)return!0;if(s===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1}zc.prettify=Lc});var O7=H((QT0,j7)=>{var{buildOptions:Rc}=S7(),Xc=D7(),{prettify:Sc}=k7(),Yc=eT();class y7{constructor(f){this.externalEntities={},this.options=Rc(f)}parse(f,h){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){if(h===!0)h={};let $=Yc.validate(f,h);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let w=new Xc(this.options);w.addExternalEntities(this.externalEntities);let s=w.parseXml(f);if(this.options.preserveOrder||s===void 0)return s;else return Sc(s,this.options)}addEntity(f,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(h==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=h}}j7.exports=y7});var d7=H((KT0,m7)=>{function Mc(f,h){let w="";if(h.format&&h.indentBy.length>0)w=`
35
+ `;return v7(f,h,"",w)}function v7(f,h,w,s){let $="",r=!1;for(let E=0;E<f.length;E++){let U=f[E],T=Qc(U);if(T===void 0)continue;let F="";if(w.length===0)F=T;else F=`${w}.${T}`;if(T===h.textNodeName){let X=U[T];if(!Kc(F,h))X=h.tagValueProcessor(T,X),X=b7(X,h);if(r)$+=s;$+=X,r=!1;continue}else if(T===h.cdataPropName){if(r)$+=s;$+=`<![CDATA[${U[T][0][h.textNodeName]}]]>`,r=!1;continue}else if(T===h.commentPropName){$+=s+`<!--${U[T][0][h.textNodeName]}-->`,r=!0;continue}else if(T[0]==="?"){let X=l7(U[":@"],h),Q=T==="?xml"?"":s,M=U[T][0][h.textNodeName];M=M.length!==0?" "+M:"",$+=Q+`<${T}${M}${X}?>`,r=!0;continue}let C=s;if(C!=="")C+=h.indentBy;let I=l7(U[":@"],h),L=s+`<${T}${I}`,W=v7(U[T],h,F,C);if(h.unpairedTags.indexOf(T)!==-1)if(h.suppressUnpairedNode)$+=L+">";else $+=L+"/>";else if((!W||W.length===0)&&h.suppressEmptyNode)$+=L+"/>";else if(W&&W.endsWith(">"))$+=L+`>${W}${s}</${T}>`;else{if($+=L+">",W&&s!==""&&(W.includes("/>")||W.includes("</")))$+=s+h.indentBy+W+s;else $+=W;$+=`</${T}>`}r=!0}return $}function Qc(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(!f.hasOwnProperty(s))continue;if(s!==":@")return s}}function l7(f,h){let w="";if(f&&!h.ignoreAttributes)for(let s in f){if(!f.hasOwnProperty(s))continue;let $=h.attributeValueProcessor(s,f[s]);if($=b7($,h),$===!0&&h.suppressBooleanAttributes)w+=` ${s.substr(h.attributeNamePrefix.length)}`;else w+=` ${s.substr(h.attributeNamePrefix.length)}="${$}"`}return w}function Kc(f,h){f=f.substr(0,f.length-h.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===f||h.stopNodes[s]==="*."+w)return!0;return!1}function b7(f,h){if(f&&f.length>0&&h.processEntities)for(let w=0;w<h.entities.length;w++){let s=h.entities[w];f=f.replace(s.regex,s.val)}return f}m7.exports=Mc});var c7=H((ZT0,i7)=>{var Zc=d7(),Jc={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Rh(f){if(this.options=Object.assign({},Jc,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Hc;if(this.processTextOrObjNode=Vc,this.options.format)this.indentate=Pc,this.tagEndChar=`>
36
36
  `,this.newLine=`
37
- `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}Xh.prototype.build=function(f){if(this.options.preserveOrder)return Vc(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};Xh.prototype.j2x=function(f,h){let w="",s="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))s+=""}else if(f[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)s+=this.buildTextValNode(f[$],$,"",h);else if(typeof f[$]!=="object"){let r=this.isAttribute($);if(r)w+=this.buildAttrPairStr(r,""+f[$]);else if($===this.options.textNodeName){let E=this.options.tagValueProcessor($,""+f[$]);s+=this.replaceEntitiesValue(E)}else s+=this.buildTextValNode(f[$],$,"",h)}else if(Array.isArray(f[$])){let r=f[$].length,E="",U="";for(let T=0;T<r;T++){let F=f[$][T];if(typeof F==="undefined");else if(F===null)if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){let C=this.j2x(F,h+1);if(E+=C.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))U+=C.attrStr}else E+=this.processTextOrObjNode(F,$,h);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor($,F);C=this.replaceEntitiesValue(C),E+=C}else E+=this.buildTextValNode(F,$,"",h)}if(this.options.oneListGroup)E=this.buildObjectNode(E,$,U,h);s+=E}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let r=Object.keys(f[$]),E=r.length;for(let U=0;U<E;U++)w+=this.buildAttrPairStr(r[U],""+f[$][r[U]])}else s+=this.processTextOrObjNode(f[$],$,h)}return{attrStr:w,val:s}};Xh.prototype.buildAttrPairStr=function(f,h){if(h=this.options.attributeValueProcessor(f,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true")return" "+f;else return" "+f+'="'+h+'"'};function Hc(f,h,w){let s=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],h,s.attrStr,w);else return this.buildObjectNode(s.val,h,s.attrStr,w)}Xh.prototype.buildObjectNode=function(f,h,w,s){if(f==="")if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else{let $="</"+h+this.tagEndChar,r="";if(h[0]==="?")r="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(s)+"<"+h+w+r+">"+f+$;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName&&r.length===0)return this.indentate(s)+`<!--${f}-->`+this.newLine;else return this.indentate(s)+"<"+h+w+r+this.tagEndChar+f+this.indentate(s)+$}};Xh.prototype.closeTag=function(f){let h="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)h="/"}else if(this.options.suppressEmptyNode)h="/";else h=`></${f}`;return h};Xh.prototype.buildTextValNode=function(f,h,w,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${f}-->`+this.newLine;else if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(h,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else return this.indentate(s)+"<"+h+w+">"+$+"</"+h+this.tagEndChar}};Xh.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){let w=this.options.entities[h];f=f.replace(w.regex,w.val)}return f};function Nc(f){return this.options.indentBy.repeat(f)}function Dc(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}i7.exports=Xh});var x7=H((HT0,g7)=>{var qc=eT(),kc=O7(),yc=c7();g7.exports={XMLParser:kc,XMLValidator:qc,XMLBuilder:yc}});var o7=H((NT0,p7)=>{var{defineProperty:t4,getOwnPropertyDescriptor:jc,getOwnPropertyNames:Oc}=Object,lc=Object.prototype.hasOwnProperty,X1=(f,h)=>t4(f,"name",{value:h,configurable:!0}),vc=(f,h)=>{for(var w in h)t4(f,w,{get:h[w],enumerable:!0})},bc=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Oc(h))if(!lc.call(f,$)&&$!==w)t4(f,$,{get:()=>h[$],enumerable:!(s=jc(h,$))||s.enumerable})}return f},mc=(f)=>bc(t4({},"__esModule",{value:!0}),f),_7={};vc(_7,{_toBool:()=>ic,_toNum:()=>cc,_toStr:()=>dc,awsExpectUnion:()=>xc,loadRestJsonErrorCode:()=>ec,loadRestXmlErrorCode:()=>uc,parseJsonBody:()=>e7,parseJsonErrorBody:()=>nc,parseXmlBody:()=>a7,parseXmlErrorBody:()=>oc});p7.exports=mc(_7);var dc=X1((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let h=new Error(`Received number ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}if(typeof f==="boolean"){let h=new Error(`Received boolean ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}return f},"_toStr"),ic=X1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=f.toLowerCase();if(f!==""&&h!=="false"&&h!=="true"){let w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&h!=="false"}return f},"_toBool"),cc=X1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=Number(f);if(h.toString()!==f){let w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return h}return f},"_toNum"),gc=J0(),xc=X1((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return gc.expectUnion(f)},"awsExpectUnion"),_c=J0(),n7=X1((f,h)=>_c.collectBody(f,h).then((w)=>h.utf8Encoder(w)),"collectBodyString"),e7=X1((f,h)=>n7(f,h).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:w});throw s}return{}}),"parseJsonBody"),nc=X1(async(f,h)=>{let w=await e7(f,h);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),ec=X1((f,h)=>{let w=X1((r,E)=>Object.keys(r).find((U)=>U.toLowerCase()===E.toLowerCase()),"findKey"),s=X1((r)=>{let E=r;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return s(f.headers[$]);if(h.code!==void 0)return s(h.code);if(h.__type!==void 0)return s(h.__type)},"loadRestJsonErrorCode"),ac=J0(),pc=x7(),a7=X1((f,h)=>n7(f,h).then((w)=>{if(w.length){let s=new pc.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:X1((T,F)=>F.trim()===""&&F.includes(`
37
+ `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}Rh.prototype.build=function(f){if(this.options.preserveOrder)return Zc(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};Rh.prototype.j2x=function(f,h){let w="",s="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))s+=""}else if(f[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)s+=this.buildTextValNode(f[$],$,"",h);else if(typeof f[$]!=="object"){let r=this.isAttribute($);if(r)w+=this.buildAttrPairStr(r,""+f[$]);else if($===this.options.textNodeName){let E=this.options.tagValueProcessor($,""+f[$]);s+=this.replaceEntitiesValue(E)}else s+=this.buildTextValNode(f[$],$,"",h)}else if(Array.isArray(f[$])){let r=f[$].length,E="",U="";for(let T=0;T<r;T++){let F=f[$][T];if(typeof F==="undefined");else if(F===null)if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(typeof F==="object")if(this.options.oneListGroup){let C=this.j2x(F,h+1);if(E+=C.val,this.options.attributesGroupName&&F.hasOwnProperty(this.options.attributesGroupName))U+=C.attrStr}else E+=this.processTextOrObjNode(F,$,h);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor($,F);C=this.replaceEntitiesValue(C),E+=C}else E+=this.buildTextValNode(F,$,"",h)}if(this.options.oneListGroup)E=this.buildObjectNode(E,$,U,h);s+=E}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let r=Object.keys(f[$]),E=r.length;for(let U=0;U<E;U++)w+=this.buildAttrPairStr(r[U],""+f[$][r[U]])}else s+=this.processTextOrObjNode(f[$],$,h)}return{attrStr:w,val:s}};Rh.prototype.buildAttrPairStr=function(f,h){if(h=this.options.attributeValueProcessor(f,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true")return" "+f;else return" "+f+'="'+h+'"'};function Vc(f,h,w){let s=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],h,s.attrStr,w);else return this.buildObjectNode(s.val,h,s.attrStr,w)}Rh.prototype.buildObjectNode=function(f,h,w,s){if(f==="")if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else{let $="</"+h+this.tagEndChar,r="";if(h[0]==="?")r="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(s)+"<"+h+w+r+">"+f+$;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName&&r.length===0)return this.indentate(s)+`<!--${f}-->`+this.newLine;else return this.indentate(s)+"<"+h+w+r+this.tagEndChar+f+this.indentate(s)+$}};Rh.prototype.closeTag=function(f){let h="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)h="/"}else if(this.options.suppressEmptyNode)h="/";else h=`></${f}`;return h};Rh.prototype.buildTextValNode=function(f,h,w,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${f}-->`+this.newLine;else if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(h,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else return this.indentate(s)+"<"+h+w+">"+$+"</"+h+this.tagEndChar}};Rh.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){let w=this.options.entities[h];f=f.replace(w.regex,w.val)}return f};function Pc(f){return this.options.indentBy.repeat(f)}function Hc(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}i7.exports=Rh});var x7=H((JT0,g7)=>{var Nc=eT(),Dc=O7(),qc=c7();g7.exports={XMLParser:Dc,XMLValidator:Nc,XMLBuilder:qc}});var o7=H((VT0,p7)=>{var{defineProperty:a5,getOwnPropertyDescriptor:kc,getOwnPropertyNames:yc}=Object,jc=Object.prototype.hasOwnProperty,X1=(f,h)=>a5(f,"name",{value:h,configurable:!0}),Oc=(f,h)=>{for(var w in h)a5(f,w,{get:h[w],enumerable:!0})},lc=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yc(h))if(!jc.call(f,$)&&$!==w)a5(f,$,{get:()=>h[$],enumerable:!(s=kc(h,$))||s.enumerable})}return f},vc=(f)=>lc(a5({},"__esModule",{value:!0}),f),_7={};Oc(_7,{_toBool:()=>mc,_toNum:()=>dc,_toStr:()=>bc,awsExpectUnion:()=>cc,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>pc,parseJsonBody:()=>e7,parseJsonErrorBody:()=>xc,parseXmlBody:()=>a7,parseXmlErrorBody:()=>ac});p7.exports=vc(_7);var bc=X1((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let h=new Error(`Received number ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}if(typeof f==="boolean"){let h=new Error(`Received boolean ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}return f},"_toStr"),mc=X1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=f.toLowerCase();if(f!==""&&h!=="false"&&h!=="true"){let w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&h!=="false"}return f},"_toBool"),dc=X1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=Number(f);if(h.toString()!==f){let w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return h}return f},"_toNum"),ic=J0(),cc=X1((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return ic.expectUnion(f)},"awsExpectUnion"),gc=J0(),n7=X1((f,h)=>gc.collectBody(f,h).then((w)=>h.utf8Encoder(w)),"collectBodyString"),e7=X1((f,h)=>n7(f,h).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:w});throw s}return{}}),"parseJsonBody"),xc=X1(async(f,h)=>{let w=await e7(f,h);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),_c=X1((f,h)=>{let w=X1((r,E)=>Object.keys(r).find((U)=>U.toLowerCase()===E.toLowerCase()),"findKey"),s=X1((r)=>{let E=r;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return s(f.headers[$]);if(h.code!==void 0)return s(h.code);if(h.__type!==void 0)return s(h.__type)},"loadRestJsonErrorCode"),nc=J0(),ec=x7(),a7=X1((f,h)=>n7(f,h).then((w)=>{if(w.length){let s=new ec.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:X1((T,F)=>F.trim()===""&&F.includes(`
38
38
  `)?"":void 0,"tagValueProcessor")});s.addEntity("#xD","\r"),s.addEntity("#10",`
39
- `);let $;try{$=s.parse(w,!0)}catch(T){if(T&&typeof T==="object")Object.defineProperty(T,"$responseBodyText",{value:w});throw T}let r="#text",E=Object.keys($)[0],U=$[E];if(U[r])U[E]=U[r],delete U[r];return ac.getValueFromTextNode(U)}return{}}),"parseXmlBody"),oc=X1(async(f,h)=>{let w=await a7(f,h);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),uc=X1((f,h)=>{if(h?.Error?.Code!==void 0)return h.Error.Code;if(h?.Code!==void 0)return h.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var O0=H((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});var oT=l4();oT.__exportStar(I1(),b$);oT.__exportStar(cz(),b$);oT.__exportStar(o7(),b$)});async function u7(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")ff.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))ff.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else ff.setFeature(f,"RETRY_MODE_STANDARD","E");else ff.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(tc))ff.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":ff.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ff.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ff.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)ff.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))ff.setFeature(f,E,U)}}var ff,tc;var t7=B(()=>{ff=o(O0(),1),tc=/\d{12}\.ddb/});var uT="user-agent",f5="x-amz-user-agent",tT=" ",h5="/",fR,hR,fF="-";var wR=B(()=>{fR=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,hR=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function sR(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=1024){if(h.length)h+=","+s;else h+=s;continue}break}return h}var fg=(f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!n0.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(w5)||[],U=(await f.defaultUserAgentProvider()).map(w5);await u7(w,f,s);let T=w;U.push(`m/${sR(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(w5)||[],C=await f.userAgentAppId();if(C)U.push(w5([`app/${C}`]));let I=VA(),L=(I?[I]:[]).concat([...U,...E,...F]).join(tT),W=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(tT);if(f.runtime!=="browser"){if(W)r[f5]=r[f5]?`${r[uT]} ${W}`:W;r[uT]=L}else r[f5]=L;return h({...s,request:$})},w5=(f)=>{let h=f[0].split(h5).map((E)=>E.replace(fR,fF)).join(h5),w=f[1]?.replace(hR,fF),s=h.indexOf(h5),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},hg,cw=(f)=>({applyToStack:(h)=>{h.add(fg(f),hg)}});var $R=B(()=>{N$();C1();t7();wR();hg={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var m$=B(()=>{bW();$R()});var gw=(f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)};var Sh;var rR=B(()=>{(function(f){f.ENV="env",f.CONFIG="shared config entry"})(Sh||(Sh={}))});var hF=B(()=>{rR()});var wg="AWS_USE_DUALSTACK_ENDPOINT",sg="use_dualstack_endpoint",xw;var ER=B(()=>{hF();xw={environmentVariableSelector:(f)=>gw(f,wg,Sh.ENV),configFileSelector:(f)=>gw(f,sg,Sh.CONFIG),default:!1}});var $g="AWS_USE_FIPS_ENDPOINT",rg="use_fips_endpoint",_w;var UR=B(()=>{hF();_w={environmentVariableSelector:(f)=>gw(f,$g,Sh.ENV),configFileSelector:(f)=>gw(f,rg,Sh.CONFIG),default:!1}});var wF,Yh=(f)=>f[wF.SMITHY_CONTEXT_KEY]||(f[wF.SMITHY_CONTEXT_KEY]={});var TR=B(()=>{wF=o(F1(),1)});var B1=(f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h};var gf=B(()=>{TR()});var FR=B(()=>{gf()});var CR=B(()=>{gf()});var IR=B(()=>{ER();UR();FR();CR()});var Mh,nw;var LR=B(()=>{Mh={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},nw={preferredFile:"credentials"}});var s5=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var sF=(f)=>s5(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var BR=()=>{};var ew=(f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return sF(h);let s=await h();return sF(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(s5(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})};var GR=B(()=>{BR()});var WR=B(()=>{LR();GR()});var AR=()=>{};var zR=()=>{};var RR=()=>{};var XR=B(()=>{AR();zR();RR()});var Qh=B(()=>{IR();WR();XR()});function Eg(f){return(h)=>async(w)=>{let s=w.request;if(n0.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(SR)===-1)try{let E=f($);s.headers={...s.headers,[SR]:String(E)}}catch(E){}}return h({...w,request:s})}}var SR="content-length",Ug,aw=(f)=>({applyToStack:(h)=>{h.add(Eg(f.bodyLengthChecker),Ug)}});var $5=B(()=>{C1();Ug={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var YR=async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Lg(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Ig(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},Tg,Fg,Cg,Ig=(f)=>Tg.test(f)&&!Fg.test(f)&&!Cg.test(f),Lg=(f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E};var MR=B(()=>{Tg=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Fg=/(\d+\.){3}\d+/,Cg=/\.\./});var QR=B(()=>{MR()});var KR=(f,h,w)=>{let s=async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $};if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s};var k1;var d$=B(()=>{k1=class k1 extends Error{constructor(f,h=!0){let w,s=!0;if(typeof h==="boolean")w=void 0,s=h;else if(h!=null&&typeof h==="object")w=h.logger,s=h.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,k1.prototype),w?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${f}`)}static from(f,h=!0){return Object.assign(new this(f.message,h),f)}}});var a;var ZR=B(()=>{d$();a=class a extends k1{constructor(f,h=!0){super(f,h);this.name="CredentialsProviderError",Object.setPrototypeOf(this,a.prototype)}}});var S1;var JR=B(()=>{d$();S1=class S1 extends k1{constructor(f,h=!0){super(f,h);this.name="TokenProviderError",Object.setPrototypeOf(this,S1.prototype)}}});var xf=(...f)=>async()=>{if(f.length===0)throw new k1("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h};var VR=B(()=>{d$()});var PR=(f)=>()=>Promise.resolve(f);var fw=(f,h,w)=>{let s,$,r,E=!1,U=async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s};if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}};var Y0=B(()=>{ZR();d$();JR();VR()});function r5(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}var HR=(f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new a(w.message||`Not found in ENV: ${r5(f.toString())}`,{logger:h})}};var NR=B(()=>{Y0()});import{homedir as Bg}from"node:os";import{sep as Gg}from"node:path";var $F,Wg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Kh=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Gg}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Wg();if(!$F[$])$F[$]=Bg();return $F[$]};var pw=B(()=>{$F={}});var DR="AWS_PROFILE",y1=(f)=>f.profile||process.env.AWS_PROFILE||"default";import{createHash as Ag}from"node:crypto";import{join as zg}from"node:path";var E5=(f)=>{let w=Ag("sha1").update(f).digest("hex");return zg(Kh(),".aws","sso","cache",`${w}.json`)};var rF=B(()=>{pw()});import{promises as Rg}from"node:fs";var Xg,U5=async(f)=>{let h=E5(f),w=await Xg(h,"utf8");return JSON.parse(w)};var qR=B(()=>{rF();({readFile:Xg}=Rg)});var EF,kR=(f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(j1);if(w===-1)return!1;return Object.values(EF.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(j1),r=w.substring(0,$)===EF.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}});var yR=B(()=>{EF=o(F1(),1);ow()});import{join as Sg}from"node:path";var Yg="AWS_CONFIG_FILE",T5=()=>process.env[Yg]||Sg(Kh(),".aws","config");var UF=B(()=>{pw()});import{join as Mg}from"node:path";var Qg="AWS_SHARED_CREDENTIALS_FILE",jR=()=>process.env[Qg]||Mg(Kh(),".aws","credentials");var OR=B(()=>{pw()});var lR,Kg,Zg,i$=(f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=Kg.exec(U);if(T){let[,F,,C]=T;if(Object.values(lR.IniSectionType).includes(F))w=[F,C].join(j1)}else w=U;if(Zg.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(j1):T;h[w][C]=F}}}}return h};var TF=B(()=>{lR=o(F1(),1);ow();Kg=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Zg=["__proto__","profile __proto__"]});import{promises as Jg}from"node:fs";var Vg,FF,c$=(f,h)=>{if(!FF[f]||h?.ignoreCache)FF[f]=Vg(f,"utf8");return FF[f]};var CF=B(()=>{({readFile:Vg}=Jg),FF={}});import{join as vR}from"node:path";var bR=()=>({}),j1=".",F5=async(f={})=>{let{filepath:h=jR(),configFilepath:w=T5()}=f,s=Kh(),$="~/",r=h;if(h.startsWith("~/"))r=vR(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=vR(s,w.slice(2));let U=await Promise.all([c$(E,{ignoreCache:f.ignoreCache}).then(i$).then(kR).catch(bR),c$(r,{ignoreCache:f.ignoreCache}).then(i$).catch(bR)]);return{configFile:U[0],credentialsFile:U[1]}};var ow=B(()=>{yR();UF();OR();pw();TF();CF()});var mR,dR=(f)=>Object.entries(f).filter(([h])=>h.startsWith(mR.IniSectionType.SSO_SESSION+j1)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(j1)+1)]:s}),{});var iR=B(()=>{mR=o(F1(),1);ow()});var Pg=()=>({}),C5=async(f={})=>c$(f.configFilepath??T5()).then(i$).then(dR).catch(Pg);var cR=B(()=>{UF();iR();TF();CF()});var gR=(...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h};var Zh=async(f)=>{let h=await F5(f);return gR(h.configFile,h.credentialsFile)};var xR=B(()=>{ow()});var _R=()=>{};var hf=B(()=>{pw();rF();qR();ow();cR();xR();_R()});var nR=(f,{preferredFile:h="config",...w}={})=>async()=>{let s=y1(w),{configFile:$,credentialsFile:r}=await F5(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new a(F.message||`Not found in config files w/ profile [${s}]: ${r5(f.toString())}`,{logger:w.logger})}};var eR=B(()=>{Y0();hf()});var Hg=(f)=>typeof f==="function",aR=(f)=>Hg(f)?async()=>await f():PR(f);var pR=B(()=>{Y0()});var z0=({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>fw(xf(HR(f),nR(h,s),aR(w)));var oR=B(()=>{Y0();NR();eR();pR()});var Jh=B(()=>{oR()});var uR="AWS_ENDPOINT_URL",tR="endpoint_url",fX=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[uR,...w].join("_")];if(s)return s;let $=h[uR];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(j1)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),tR].join(j1)];if(E)return E}}let s=h[tR];if(s)return s;return},default:void 0});var hX=B(()=>{hf()});var I5=async(f)=>z0(fX(f??""))();var IF=B(()=>{Jh();hX()});function wX(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}var O1=(f)=>{if(typeof f==="string")return O1(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=wX(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}};var uw=()=>{};var L5=(f)=>{if(typeof f==="object"){if("url"in f)return O1(f.url);return f}return O1(f)};var B5=B(()=>{uw()});var sX=async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await I5(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(L5(E))}let $=await Ng(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},Ng=async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await KR(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await YR(s);return s};var LF=B(()=>{QR();IF();B5()});var $X=B(()=>{LF();B5()});var rX,EX=({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)rX.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await sX($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=Yh(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}};var BF=B(()=>{rX=o(m0(),1);gf();LF()});var UX=(f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
40
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var TX=(f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})};function z(f,h,w){return{applyToStack:(s)=>{s.add(UX(f,w),Dg),s.add(TX(f,h),GF)}}}var Dg,GF;var FX=B(()=>{Dg={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},GF={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var k=B(()=>{FX()});var qg,R=(f,h)=>({applyToStack:(w)=>{w.addRelativeTo(EX({config:f,instructions:h}),qg)}});var CX=B(()=>{k();BF();qg={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:GF.name}});var tw=(f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,r=w!=null?async()=>L5(await B1(w)()):void 0,U=Object.assign(f,{endpoint:r,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:B1(s??!1),useFipsEndpoint:B1($??!1)}),T=void 0;return U.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!T)T=I5(f.serviceId);return T},U};var IX=B(()=>{gf();IF();B5()});var LX=()=>{};var D=B(()=>{$X();BF();CX();IX();LX()});var l1,hw=3,Vh;var G5=B(()=>{(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(l1||(l1={}));Vh=l1.STANDARD});var BX,GX,WX,AX;var zX=B(()=>{BX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],GX=["TimeoutError","RequestTimeout","RequestTimeoutException"],WX=[500,502,503,504],AX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var kg=(f)=>f.$metadata?.clockSkewCorrected,fs=(f)=>f.$metadata?.httpStatusCode===429||BX.includes(f.name)||f.$retryable?.throttling==!0,g$=(f,h=0)=>kg(f)||GX.includes(f.name)||AX.includes(f?.code||"")||WX.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&g$(f.cause,h+1),RX=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!g$(f))return!0;return!1}return!1};var x$=B(()=>{zX()});class hs{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=f?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let h=this.getCurrentTimeInSeconds();this.lastThrottleTime=h,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){let h=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>hs.setTimeoutFn(w,h))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let h=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+h),this.lastTimestamp=f}updateClientSendingRate(f){let h;if(this.updateMeasuredRate(),fs(f)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),h=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),h=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(h,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let f=this.getCurrentTimeInSeconds(),h=Math.floor(f*2)/2;if(this.requestCount++,h>this.lastTxRateBucket){let w=this.requestCount/(h-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=h}}getPrecise(f){return parseFloat(f.toFixed(8))}}var WF=B(()=>{x$();hs.setTimeoutFn=setTimeout});var ww=100,_$=20000,AF=500,W5=500,zF=5,RF=10,XF=1,A5="amz-sdk-invocation-id",z5="amz-sdk-request";var XX=()=>{let f=ww;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(_$,Math.random()*2**s*f))},setDelayBase:(s)=>{f=s}}};var SX=()=>{};var SF=({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:()=>h,getRetryDelay:()=>Math.min(_$,f),getRetryCost:()=>w}};var YX=()=>{};class ws{constructor(f){this.maxAttempts=f,this.mode=l1.STANDARD,this.capacity=W5,this.retryBackoffStrategy=XX(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return SF({retryDelay:ww,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?AF:ww);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,SF({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(W5,this.capacity+(f.getRetryCost()??XF))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${hw}`),hw}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?RF:zF}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}var R5=B(()=>{G5();SX();YX()});class YF{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l1.ADAPTIVE;let{rateLimiter:w}=h??{};this.rateLimiter=w??new hs,this.standardRetryStrategy=new ws(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var MX=B(()=>{G5();WF();R5()});var QX=B(()=>{R5()});var KX=()=>{};var wf=B(()=>{MX();QX();WF();R5();G5();KX()});var MF=H((ZX)=>{Object.defineProperty(ZX,"__esModule",{value:!0});ZX.default=Og;var yg=jg(B0("node:crypto"));function jg(f){return f&&f.__esModule?f:{default:f}}var S5=new Uint8Array(256),X5=S5.length;function Og(){if(X5>S5.length-16)yg.default.randomFillSync(S5),X5=0;return S5.slice(X5,X5+=16)}});var PX=H((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.default=void 0;var vg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;JX.default=vg});var n$=H((HX)=>{Object.defineProperty(HX,"__esModule",{value:!0});HX.default=void 0;var bg=mg(PX());function mg(f){return f&&f.__esModule?f:{default:f}}function dg(f){return typeof f==="string"&&bg.default.test(f)}var ig=dg;HX.default=ig});var e$=H((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.default=void 0;qX.unsafeStringify=DX;var cg=gg(n$());function gg(f){return f&&f.__esModule?f:{default:f}}var h1=[];for(let f=0;f<256;++f)h1.push((f+256).toString(16).slice(1));function DX(f,h=0){return h1[f[h+0]]+h1[f[h+1]]+h1[f[h+2]]+h1[f[h+3]]+"-"+h1[f[h+4]]+h1[f[h+5]]+"-"+h1[f[h+6]]+h1[f[h+7]]+"-"+h1[f[h+8]]+h1[f[h+9]]+"-"+h1[f[h+10]]+h1[f[h+11]]+h1[f[h+12]]+h1[f[h+13]]+h1[f[h+14]]+h1[f[h+15]]}function xg(f,h=0){let w=DX(f,h);if(!cg.default(w))throw TypeError("Stringified UUID is invalid");return w}var _g=xg;qX.default=_g});var lX=H((jX)=>{Object.defineProperty(jX,"__esModule",{value:!0});jX.default=void 0;var eg=pg(MF()),ag=e$();function pg(f){return f&&f.__esModule?f:{default:f}}var yX,QF,KF=0,ZF=0;function og(f,h,w){let s=h&&w||0,$=h||new Array(16);f=f||{};let r=f.node||yX,E=f.clockseq!==void 0?f.clockseq:QF;if(r==null||E==null){let L=f.random||(f.rng||eg.default)();if(r==null)r=yX=[L[0]|1,L[1],L[2],L[3],L[4],L[5]];if(E==null)E=QF=(L[6]<<8|L[7])&16383}let U=f.msecs!==void 0?f.msecs:Date.now(),T=f.nsecs!==void 0?f.nsecs:ZF+1,F=U-KF+(T-ZF)/1e4;if(F<0&&f.clockseq===void 0)E=E+1&16383;if((F<0||U>KF)&&f.nsecs===void 0)T=0;if(T>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");KF=U,ZF=T,QF=E,U+=12219292800000;let C=((U&268435455)*1e4+T)%4294967296;$[s++]=C>>>24&255,$[s++]=C>>>16&255,$[s++]=C>>>8&255,$[s++]=C&255;let I=U/4294967296*1e4&268435455;$[s++]=I>>>8&255,$[s++]=I&255,$[s++]=I>>>24&15|16,$[s++]=I>>>16&255,$[s++]=E>>>8|128,$[s++]=E&255;for(let L=0;L<6;++L)$[s+L]=r[L];return h||ag.unsafeStringify($)}var ug=og;jX.default=ug});var JF=H((vX)=>{Object.defineProperty(vX,"__esModule",{value:!0});vX.default=void 0;var tg=fx(n$());function fx(f){return f&&f.__esModule?f:{default:f}}function hx(f){if(!tg.default(f))throw TypeError("Invalid UUID");let h,w=new Uint8Array(16);return w[0]=(h=parseInt(f.slice(0,8),16))>>>24,w[1]=h>>>16&255,w[2]=h>>>8&255,w[3]=h&255,w[4]=(h=parseInt(f.slice(9,13),16))>>>8,w[5]=h&255,w[6]=(h=parseInt(f.slice(14,18),16))>>>8,w[7]=h&255,w[8]=(h=parseInt(f.slice(19,23),16))>>>8,w[9]=h&255,w[10]=(h=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=h/4294967296&255,w[12]=h>>>24&255,w[13]=h>>>16&255,w[14]=h>>>8&255,w[15]=h&255,w}var wx=hx;vX.default=wx});var VF=H((iX)=>{Object.defineProperty(iX,"__esModule",{value:!0});iX.URL=iX.DNS=void 0;iX.default=Ux;var sx=e$(),$x=rx(JF());function rx(f){return f&&f.__esModule?f:{default:f}}function Ex(f){f=unescape(encodeURIComponent(f));let h=[];for(let w=0;w<f.length;++w)h.push(f.charCodeAt(w));return h}var mX="6ba7b810-9dad-11d1-80b4-00c04fd430c8";iX.DNS=mX;var dX="6ba7b811-9dad-11d1-80b4-00c04fd430c8";iX.URL=dX;function Ux(f,h,w){function s($,r,E,U){var T;if(typeof $==="string")$=Ex($);if(typeof r==="string")r=$x.default(r);if(((T=r)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+$.length);if(F.set(r),F.set($,r.length),F=w(F),F[6]=F[6]&15|h,F[8]=F[8]&63|128,E){U=U||0;for(let C=0;C<16;++C)E[U+C]=F[C];return E}return sx.unsafeStringify(F)}try{s.name=f}catch($){}return s.DNS=mX,s.URL=dX,s}});var _X=H((gX)=>{Object.defineProperty(gX,"__esModule",{value:!0});gX.default=void 0;var Cx=Ix(B0("node:crypto"));function Ix(f){return f&&f.__esModule?f:{default:f}}function Lx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Cx.default.createHash("md5").update(f).digest()}var Bx=Lx;gX.default=Bx});var pX=H((eX)=>{Object.defineProperty(eX,"__esModule",{value:!0});eX.default=void 0;var Gx=nX(VF()),Wx=nX(_X());function nX(f){return f&&f.__esModule?f:{default:f}}var Ax=Gx.default("v3",48,Wx.default),zx=Ax;eX.default=zx});var tX=H((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.default=void 0;var Rx=Xx(B0("node:crypto"));function Xx(f){return f&&f.__esModule?f:{default:f}}var Sx={randomUUID:Rx.default.randomUUID};oX.default=Sx});var $S=H((wS)=>{Object.defineProperty(wS,"__esModule",{value:!0});wS.default=void 0;var fS=hS(tX()),Yx=hS(MF()),Mx=e$();function hS(f){return f&&f.__esModule?f:{default:f}}function Qx(f,h,w){if(fS.default.randomUUID&&!h&&!f)return fS.default.randomUUID();f=f||{};let s=f.random||(f.rng||Yx.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,h){w=w||0;for(let $=0;$<16;++$)h[w+$]=s[$];return h}return Mx.unsafeStringify(s)}var Kx=Qx;wS.default=Kx});var US=H((rS)=>{Object.defineProperty(rS,"__esModule",{value:!0});rS.default=void 0;var Zx=Jx(B0("node:crypto"));function Jx(f){return f&&f.__esModule?f:{default:f}}function Vx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Zx.default.createHash("sha1").update(f).digest()}var Px=Vx;rS.default=Px});var IS=H((FS)=>{Object.defineProperty(FS,"__esModule",{value:!0});FS.default=void 0;var Hx=TS(VF()),Nx=TS(US());function TS(f){return f&&f.__esModule?f:{default:f}}var Dx=Hx.default("v5",80,Nx.default),qx=Dx;FS.default=qx});var GS=H((LS)=>{Object.defineProperty(LS,"__esModule",{value:!0});LS.default=void 0;var kx="00000000-0000-0000-0000-000000000000";LS.default=kx});var zS=H((WS)=>{Object.defineProperty(WS,"__esModule",{value:!0});WS.default=void 0;var yx=jx(n$());function jx(f){return f&&f.__esModule?f:{default:f}}function Ox(f){if(!yx.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var lx=Ox;WS.default=lx});var PF=H((sf)=>{Object.defineProperty(sf,"__esModule",{value:!0});Object.defineProperty(sf,"NIL",{enumerable:!0,get:function(){return ix.default}});Object.defineProperty(sf,"parse",{enumerable:!0,get:function(){return _x.default}});Object.defineProperty(sf,"stringify",{enumerable:!0,get:function(){return xx.default}});Object.defineProperty(sf,"v1",{enumerable:!0,get:function(){return vx.default}});Object.defineProperty(sf,"v3",{enumerable:!0,get:function(){return bx.default}});Object.defineProperty(sf,"v4",{enumerable:!0,get:function(){return mx.default}});Object.defineProperty(sf,"v5",{enumerable:!0,get:function(){return dx.default}});Object.defineProperty(sf,"validate",{enumerable:!0,get:function(){return gx.default}});Object.defineProperty(sf,"version",{enumerable:!0,get:function(){return cx.default}});var vx=_f(lX()),bx=_f(pX()),mx=_f($S()),dx=_f(IS()),ix=_f(GS()),cx=_f(zS()),gx=_f(n$()),xx=_f(e$()),_x=_f(JF());function _f(f){return f&&f.__esModule?f:{default:f}}});var Mf,GC0,WC0,RS,AC0,zC0,RC0,XC0,SC0,YC0;var XS=B(()=>{Mf=o(PF(),1),GC0=Mf.default.v1,WC0=Mf.default.v3,RS=Mf.default.v4,AC0=Mf.default.v5,zC0=Mf.default.NIL,RC0=Mf.default.version,XC0=Mf.default.validate,SC0=Mf.default.stringify,YC0=Mf.default.parse});var SS=B(()=>{wf()});var HF=B(()=>{wf()});var NF=B(()=>{x$()});var DF=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var qF=B(()=>{C1();x$();wf();SS();HF();NF()});var YS=B(()=>{wf();qF()});var MS="AWS_MAX_ATTEMPTS",QS="max_attempts",ss,$s=(f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=B1(s??hw);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await B1(w)()===l1.ADAPTIVE)return new YF($);return new ws($)}})},nx="AWS_RETRY_MODE",ex="retry_mode",rs;var KS=B(()=>{gf();wf();ss={environmentVariableSelector:(f)=>{let h=f[MS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${MS} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[QS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${QS} mast be a number, got "${h}"`);return w},default:hw},rs={environmentVariableSelector:(f)=>f[nx],configFileSelector:(f)=>f[ex],default:Vh}});var ZS=B(()=>{C1();wf()});var sw=(f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},Ph=(f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},Es=()=>{let f=[],h=[],w=!1,s=new Set,$=(I)=>I.sort((L,W)=>JS[W.step]-JS[L.step]||VS[W.priority||"normal"]-VS[L.priority||"normal"]),r=(I)=>{let L=!1,W=(X)=>{let Q=sw(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0};return f=f.filter(W),h=h.filter(W),L},E=(I)=>{let L=!1,W=(X)=>{if(X.middleware===I){L=!0;for(let Q of sw(X.name,X.aliases))s.delete(Q);return!1}return!0};return f=f.filter(W),h=h.filter(W),L},U=(I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},T=(I)=>{let L=[];return I.before.forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L.push(I),I.after.reverse().forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L},F=(I=!1)=>{let L=[],W=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of sw(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of sw(q.name,q.aliases))X[N]=q;W.push(q)}),W.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Ph(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},C={add:(I,L={})=>{let{name:W,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=sw(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Ph(W,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Ph(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Ph(W,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:W,override:X,aliases:Q}=L,M={middleware:I,...L},q=sw(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Ph(W,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Ph(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Ph(W,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(Es()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,W=(X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=sw(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0};return f=f.filter(W),h=h.filter(W),L},concat:(I)=>{let L=U(Es());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Ph(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let W of F().map((X)=>X.middleware).reverse())I=W(I,L);if(w)console.log(C.identify());return I}};return C},JS,VS;var PS=B(()=>{JS={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},VS={high:3,normal:2,low:1}});var kF=B(()=>{PS()});class $w{constructor(f){this.config=f,this.middlewareStack=Es()}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var HS=B(()=>{kF()});var G1;var NS=B(()=>{G1=o(jw(),1)});class A{constructor(){this.middlewareStack=Es()}static classBuilder(){return new qS}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,W={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[DS.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),W)}}class qS{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends A{static getEndpointParameterInstructions(){return f._ep}constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}}var DS;var kS=B(()=>{kF();DS=o(F1(),1)});var T0="***SensitiveInformation***";var Us=(f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}};var e0=(f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},Hh=(f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)M5.warn(Y5(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")M5.warn(Y5(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},Y1=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))M5.warn(Y5(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},ax,yS=(f)=>{let h=Y1(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>ax)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},yF=(f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},jS=(f)=>jF(f,32),OS=(f)=>jF(f,16),lS=(f)=>jF(f,8),jF=(f,h)=>{let w=yF(f);if(w!==void 0&&px(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},px=(f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},j=(f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},g=(f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},G=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return M5.warn(Y5(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},OF=(f)=>{if(typeof f=="string")return Y1(Ts(f));return Y1(f)},vS,bS=(f)=>{if(typeof f=="string")return yS(Ts(f));return yS(f)},ox,Ts=(f)=>{let h=f.match(ox);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},lF=(f)=>{if(typeof f=="string")return ux(f);return Y1(f)},ux=(f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},E1=(f)=>{if(typeof f==="string")return yF(Ts(f));return yF(f)},M0=(f)=>{if(typeof f==="string")return jS(Ts(f));return jS(f)},vF=(f)=>{if(typeof f==="string")return OS(Ts(f));return OS(f)},mS=(f)=>{if(typeof f==="string")return lS(Ts(f));return lS(f)},Y5=(f)=>{return String(new TypeError(f).stack||f).split(`
39
+ `);let $;try{$=s.parse(w,!0)}catch(T){if(T&&typeof T==="object")Object.defineProperty(T,"$responseBodyText",{value:w});throw T}let r="#text",E=Object.keys($)[0],U=$[E];if(U[r])U[E]=U[r],delete U[r];return nc.getValueFromTextNode(U)}return{}}),"parseXmlBody"),ac=X1(async(f,h)=>{let w=await a7(f,h);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),pc=X1((f,h)=>{if(h?.Error?.Code!==void 0)return h.Error.Code;if(h?.Code!==void 0)return h.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var O0=H((k$)=>{Object.defineProperty(k$,"__esModule",{value:!0});var oT=k5();oT.__exportStar(I1(),k$);oT.__exportStar(cA(),k$);oT.__exportStar(o7(),k$)});async function u7(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")hf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))hf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else hf.setFeature(f,"RETRY_MODE_STANDARD","E");else hf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(oc))hf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":hf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":hf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":hf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)hf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))hf.setFeature(f,E,U)}}var hf,oc;var t7=B(()=>{hf=p(O0(),1),oc=/\d{12}\.ddb/});var uT="user-agent",p5="x-amz-user-agent",tT=" ",o5="/",fR,hR,fF="-";var wR=B(()=>{fR=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,hR=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function sR(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=1024){if(h.length)h+=","+s;else h+=s;continue}break}return h}var uc=(f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!n0.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(u5)||[],U=(await f.defaultUserAgentProvider()).map(u5);await u7(w,f,s);let T=w;U.push(`m/${sR(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(u5)||[],C=await f.userAgentAppId();if(C)U.push(u5([`app/${C}`]));let I=Vz(),L=(I?[I]:[]).concat([...U,...E,...F]).join(tT),W=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(tT);if(f.runtime!=="browser"){if(W)r[p5]=r[p5]?`${r[uT]} ${W}`:W;r[uT]=L}else r[p5]=L;return h({...s,request:$})},u5=(f)=>{let h=f[0].split(o5).map((E)=>E.replace(fR,fF)).join(o5),w=f[1]?.replace(hR,fF),s=h.indexOf(o5),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},tc,iw=(f)=>({applyToStack:(h)=>{h.add(uc(f),tc)}});var $R=B(()=>{K$();C1();t7();wR();tc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var y$=B(()=>{bW();$R()});var cw=(f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)};var Xh;var rR=B(()=>{(function(f){f.ENV="env",f.CONFIG="shared config entry"})(Xh||(Xh={}))});var hF=B(()=>{rR()});var fg="AWS_USE_DUALSTACK_ENDPOINT",hg="use_dualstack_endpoint",gw;var ER=B(()=>{hF();gw={environmentVariableSelector:(f)=>cw(f,fg,Xh.ENV),configFileSelector:(f)=>cw(f,hg,Xh.CONFIG),default:!1}});var wg="AWS_USE_FIPS_ENDPOINT",sg="use_fips_endpoint",xw;var UR=B(()=>{hF();xw={environmentVariableSelector:(f)=>cw(f,wg,Xh.ENV),configFileSelector:(f)=>cw(f,sg,Xh.CONFIG),default:!1}});var wF,Sh=(f)=>f[wF.SMITHY_CONTEXT_KEY]||(f[wF.SMITHY_CONTEXT_KEY]={});var TR=B(()=>{wF=p(F1(),1)});var B1=(f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h};var gf=B(()=>{TR()});var FR=B(()=>{gf()});var CR=B(()=>{gf()});var IR=B(()=>{ER();UR();FR();CR()});var Yh,_w;var LR=B(()=>{Yh={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},_w={preferredFile:"credentials"}});var t5=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var sF=(f)=>t5(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var BR=()=>{};var nw=(f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return sF(h);let s=await h();return sF(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(t5(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})};var GR=B(()=>{BR()});var WR=B(()=>{LR();GR()});var zR=()=>{};var AR=()=>{};var RR=()=>{};var XR=B(()=>{zR();AR();RR()});var Mh=B(()=>{IR();WR();XR()});function $g(f){return(h)=>async(w)=>{let s=w.request;if(n0.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(SR)===-1)try{let E=f($);s.headers={...s.headers,[SR]:String(E)}}catch(E){}}return h({...w,request:s})}}var SR="content-length",rg,ew=(f)=>({applyToStack:(h)=>{h.add($g(f.bodyLengthChecker),rg)}});var fr=B(()=>{C1();rg={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var YR=async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Cg(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Fg(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},Eg,Ug,Tg,Fg=(f)=>Eg.test(f)&&!Ug.test(f)&&!Tg.test(f),Cg=(f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E};var MR=B(()=>{Eg=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ug=/(\d+\.){3}\d+/,Tg=/\.\./});var QR=B(()=>{MR()});var KR=(f,h,w)=>{let s=async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $};if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s};var k1;var j$=B(()=>{k1=class k1 extends Error{constructor(f,h=!0){let w,s=!0;if(typeof h==="boolean")w=void 0,s=h;else if(h!=null&&typeof h==="object")w=h.logger,s=h.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,k1.prototype),w?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${f}`)}static from(f,h=!0){return Object.assign(new this(f.message,h),f)}}});var a;var ZR=B(()=>{j$();a=class a extends k1{constructor(f,h=!0){super(f,h);this.name="CredentialsProviderError",Object.setPrototypeOf(this,a.prototype)}}});var S1;var JR=B(()=>{j$();S1=class S1 extends k1{constructor(f,h=!0){super(f,h);this.name="TokenProviderError",Object.setPrototypeOf(this,S1.prototype)}}});var xf=(...f)=>async()=>{if(f.length===0)throw new k1("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h};var VR=B(()=>{j$()});var PR=(f)=>()=>Promise.resolve(f);var fw=(f,h,w)=>{let s,$,r,E=!1,U=async()=>{if(!$)$=f();try{s=await $,r=!0,E=!1}finally{$=void 0}return s};if(h===void 0)return async(T)=>{if(!r||T?.forceRefresh)s=await U();return s};return async(T)=>{if(!r||T?.forceRefresh)s=await U();if(E)return s;if(w&&!w(s))return E=!0,s;if(h(s))return await U(),s;return s}};var Y0=B(()=>{ZR();j$();JR();VR()});function hr(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}var HR=(f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new a(w.message||`Not found in ENV: ${hr(f.toString())}`,{logger:h})}};var NR=B(()=>{Y0()});import{homedir as Ig}from"node:os";import{sep as Lg}from"node:path";var $F,Bg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Qh=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Lg}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Bg();if(!$F[$])$F[$]=Ig();return $F[$]};var aw=B(()=>{$F={}});var DR="AWS_PROFILE",y1=(f)=>f.profile||process.env.AWS_PROFILE||"default";import{createHash as Gg}from"node:crypto";import{join as Wg}from"node:path";var wr=(f)=>{let w=Gg("sha1").update(f).digest("hex");return Wg(Qh(),".aws","sso","cache",`${w}.json`)};var rF=B(()=>{aw()});import{promises as zg}from"node:fs";var Ag,sr=async(f)=>{let h=wr(f),w=await Ag(h,"utf8");return JSON.parse(w)};var qR=B(()=>{rF();({readFile:Ag}=zg)});var EF,kR=(f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(j1);if(w===-1)return!1;return Object.values(EF.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(j1),r=w.substring(0,$)===EF.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}});var yR=B(()=>{EF=p(F1(),1);pw()});import{join as Rg}from"node:path";var Xg="AWS_CONFIG_FILE",$r=()=>process.env[Xg]||Rg(Qh(),".aws","config");var UF=B(()=>{aw()});import{join as Sg}from"node:path";var Yg="AWS_SHARED_CREDENTIALS_FILE",jR=()=>process.env[Yg]||Sg(Qh(),".aws","credentials");var OR=B(()=>{aw()});var lR,Mg,Qg,O$=(f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=Mg.exec(U);if(T){let[,F,,C]=T;if(Object.values(lR.IniSectionType).includes(F))w=[F,C].join(j1)}else w=U;if(Qg.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(j1):T;h[w][C]=F}}}}return h};var TF=B(()=>{lR=p(F1(),1);pw();Mg=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Qg=["__proto__","profile __proto__"]});import{promises as Kg}from"node:fs";var Zg,FF,l$=(f,h)=>{if(!FF[f]||h?.ignoreCache)FF[f]=Zg(f,"utf8");return FF[f]};var CF=B(()=>{({readFile:Zg}=Kg),FF={}});import{join as vR}from"node:path";var bR=()=>({}),j1=".",rr=async(f={})=>{let{filepath:h=jR(),configFilepath:w=$r()}=f,s=Qh(),$="~/",r=h;if(h.startsWith("~/"))r=vR(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=vR(s,w.slice(2));let U=await Promise.all([l$(E,{ignoreCache:f.ignoreCache}).then(O$).then(kR).catch(bR),l$(r,{ignoreCache:f.ignoreCache}).then(O$).catch(bR)]);return{configFile:U[0],credentialsFile:U[1]}};var pw=B(()=>{yR();UF();OR();aw();TF();CF()});var mR,dR=(f)=>Object.entries(f).filter(([h])=>h.startsWith(mR.IniSectionType.SSO_SESSION+j1)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(j1)+1)]:s}),{});var iR=B(()=>{mR=p(F1(),1);pw()});var Jg=()=>({}),Er=async(f={})=>l$(f.configFilepath??$r()).then(O$).then(dR).catch(Jg);var cR=B(()=>{UF();iR();TF();CF()});var gR=(...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h};var Kh=async(f)=>{let h=await rr(f);return gR(h.configFile,h.credentialsFile)};var xR=B(()=>{pw()});var _R=()=>{};var wf=B(()=>{aw();rF();qR();pw();cR();xR();_R()});var nR=(f,{preferredFile:h="config",...w}={})=>async()=>{let s=y1(w),{configFile:$,credentialsFile:r}=await rr(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new a(F.message||`Not found in config files w/ profile [${s}]: ${hr(f.toString())}`,{logger:w.logger})}};var eR=B(()=>{Y0();wf()});var Vg=(f)=>typeof f==="function",aR=(f)=>Vg(f)?async()=>await f():PR(f);var pR=B(()=>{Y0()});var A0=({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>fw(xf(HR(f),nR(h,s),aR(w)));var oR=B(()=>{Y0();NR();eR();pR()});var Zh=B(()=>{oR()});var uR="AWS_ENDPOINT_URL",tR="endpoint_url",fX=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[uR,...w].join("_")];if(s)return s;let $=h[uR];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(j1)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),tR].join(j1)];if(E)return E}}let s=h[tR];if(s)return s;return},default:void 0});var hX=B(()=>{wf()});var Ur=async(f)=>A0(fX(f??""))();var IF=B(()=>{Zh();hX()});function wX(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}var O1=(f)=>{if(typeof f==="string")return O1(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=wX(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}};var ow=()=>{};var Tr=(f)=>{if(typeof f==="object"){if("url"in f)return O1(f.url);return f}return O1(f)};var Fr=B(()=>{ow()});var sX=async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await Ur(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(Tr(E))}let $=await Pg(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},Pg=async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await KR(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await YR(s);return s};var LF=B(()=>{QR();IF();Fr()});var $X=B(()=>{LF();Fr()});var rX,EX=({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)rX.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await sX($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=Sh(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}};var BF=B(()=>{rX=p(m0(),1);gf();LF()});var UX=(f,h)=>(w,s)=>async($)=>{let{response:r}=await w($);try{let E=await h(r,f);return{response:r,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:r}),!("$metadata"in E)){try{E.message+=`
40
+ Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(T){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var TX=(f,h)=>(w,s)=>async($)=>{let r=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!r)throw new Error("No valid endpoint provider available.");let E=await h($.input,{...f,endpoint:r});return w({...$,request:E})};function A(f,h,w){return{applyToStack:(s)=>{s.add(UX(f,w),Hg),s.add(TX(f,h),GF)}}}var Hg,GF;var FX=B(()=>{Hg={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},GF={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var k=B(()=>{FX()});var Ng,R=(f,h)=>({applyToStack:(w)=>{w.addRelativeTo(EX({config:f,instructions:h}),Ng)}});var CX=B(()=>{k();BF();Ng={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:GF.name}});var uw=(f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,r=w!=null?async()=>Tr(await B1(w)()):void 0,U=Object.assign(f,{endpoint:r,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:B1(s??!1),useFipsEndpoint:B1($??!1)}),T=void 0;return U.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!T)T=Ur(f.serviceId);return T},U};var IX=B(()=>{gf();IF();Fr()});var LX=()=>{};var D=B(()=>{$X();BF();CX();IX();LX()});var l1,hw=3,Jh;var Cr=B(()=>{(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(l1||(l1={}));Jh=l1.STANDARD});var BX,GX,WX,zX;var AX=B(()=>{BX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],GX=["TimeoutError","RequestTimeout","RequestTimeoutException"],WX=[500,502,503,504],zX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var Dg=(f)=>f.$metadata?.clockSkewCorrected,tw=(f)=>f.$metadata?.httpStatusCode===429||BX.includes(f.name)||f.$retryable?.throttling==!0,v$=(f,h=0)=>Dg(f)||GX.includes(f.name)||zX.includes(f?.code||"")||WX.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&v$(f.cause,h+1),RX=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!v$(f))return!0;return!1}return!1};var b$=B(()=>{AX()});class fs{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=f?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let h=this.getCurrentTimeInSeconds();this.lastThrottleTime=h,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){let h=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>fs.setTimeoutFn(w,h))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let h=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+h),this.lastTimestamp=f}updateClientSendingRate(f){let h;if(this.updateMeasuredRate(),tw(f)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),h=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),h=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(h,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let f=this.getCurrentTimeInSeconds(),h=Math.floor(f*2)/2;if(this.requestCount++,h>this.lastTxRateBucket){let w=this.requestCount/(h-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=h}}getPrecise(f){return parseFloat(f.toFixed(8))}}var WF=B(()=>{b$();fs.setTimeoutFn=setTimeout});var ww=100,m$=20000,zF=500,Ir=500,AF=5,RF=10,XF=1,Lr="amz-sdk-invocation-id",Br="amz-sdk-request";var XX=()=>{let f=ww;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(m$,Math.random()*2**s*f))},setDelayBase:(s)=>{f=s}}};var SX=()=>{};var SF=({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:()=>h,getRetryDelay:()=>Math.min(m$,f),getRetryCost:()=>w}};var YX=()=>{};class hs{constructor(f){this.maxAttempts=f,this.mode=l1.STANDARD,this.capacity=Ir,this.retryBackoffStrategy=XX(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return SF({retryDelay:ww,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?zF:ww);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,SF({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(Ir,this.capacity+(f.getRetryCost()??XF))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${hw}`),hw}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?RF:AF}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}var Gr=B(()=>{Cr();SX();YX()});class YF{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l1.ADAPTIVE;let{rateLimiter:w}=h??{};this.rateLimiter=w??new fs,this.standardRetryStrategy=new hs(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var MX=B(()=>{Cr();WF();Gr()});var QX=B(()=>{Gr()});var KX=()=>{};var sf=B(()=>{MX();QX();WF();Gr();Cr();KX()});var MF=H((ZX)=>{Object.defineProperty(ZX,"__esModule",{value:!0});ZX.default=yg;var qg=kg(B0("node:crypto"));function kg(f){return f&&f.__esModule?f:{default:f}}var zr=new Uint8Array(256),Wr=zr.length;function yg(){if(Wr>zr.length-16)qg.default.randomFillSync(zr),Wr=0;return zr.slice(Wr,Wr+=16)}});var PX=H((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.default=void 0;var Og=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;JX.default=Og});var d$=H((HX)=>{Object.defineProperty(HX,"__esModule",{value:!0});HX.default=void 0;var lg=vg(PX());function vg(f){return f&&f.__esModule?f:{default:f}}function bg(f){return typeof f==="string"&&lg.default.test(f)}var mg=bg;HX.default=mg});var i$=H((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.default=void 0;qX.unsafeStringify=DX;var dg=ig(d$());function ig(f){return f&&f.__esModule?f:{default:f}}var h1=[];for(let f=0;f<256;++f)h1.push((f+256).toString(16).slice(1));function DX(f,h=0){return h1[f[h+0]]+h1[f[h+1]]+h1[f[h+2]]+h1[f[h+3]]+"-"+h1[f[h+4]]+h1[f[h+5]]+"-"+h1[f[h+6]]+h1[f[h+7]]+"-"+h1[f[h+8]]+h1[f[h+9]]+"-"+h1[f[h+10]]+h1[f[h+11]]+h1[f[h+12]]+h1[f[h+13]]+h1[f[h+14]]+h1[f[h+15]]}function cg(f,h=0){let w=DX(f,h);if(!dg.default(w))throw TypeError("Stringified UUID is invalid");return w}var gg=cg;qX.default=gg});var lX=H((jX)=>{Object.defineProperty(jX,"__esModule",{value:!0});jX.default=void 0;var _g=eg(MF()),ng=i$();function eg(f){return f&&f.__esModule?f:{default:f}}var yX,QF,KF=0,ZF=0;function ag(f,h,w){let s=h&&w||0,$=h||new Array(16);f=f||{};let r=f.node||yX,E=f.clockseq!==void 0?f.clockseq:QF;if(r==null||E==null){let L=f.random||(f.rng||_g.default)();if(r==null)r=yX=[L[0]|1,L[1],L[2],L[3],L[4],L[5]];if(E==null)E=QF=(L[6]<<8|L[7])&16383}let U=f.msecs!==void 0?f.msecs:Date.now(),T=f.nsecs!==void 0?f.nsecs:ZF+1,F=U-KF+(T-ZF)/1e4;if(F<0&&f.clockseq===void 0)E=E+1&16383;if((F<0||U>KF)&&f.nsecs===void 0)T=0;if(T>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");KF=U,ZF=T,QF=E,U+=12219292800000;let C=((U&268435455)*1e4+T)%4294967296;$[s++]=C>>>24&255,$[s++]=C>>>16&255,$[s++]=C>>>8&255,$[s++]=C&255;let I=U/4294967296*1e4&268435455;$[s++]=I>>>8&255,$[s++]=I&255,$[s++]=I>>>24&15|16,$[s++]=I>>>16&255,$[s++]=E>>>8|128,$[s++]=E&255;for(let L=0;L<6;++L)$[s+L]=r[L];return h||ng.unsafeStringify($)}var pg=ag;jX.default=pg});var JF=H((vX)=>{Object.defineProperty(vX,"__esModule",{value:!0});vX.default=void 0;var og=ug(d$());function ug(f){return f&&f.__esModule?f:{default:f}}function tg(f){if(!og.default(f))throw TypeError("Invalid UUID");let h,w=new Uint8Array(16);return w[0]=(h=parseInt(f.slice(0,8),16))>>>24,w[1]=h>>>16&255,w[2]=h>>>8&255,w[3]=h&255,w[4]=(h=parseInt(f.slice(9,13),16))>>>8,w[5]=h&255,w[6]=(h=parseInt(f.slice(14,18),16))>>>8,w[7]=h&255,w[8]=(h=parseInt(f.slice(19,23),16))>>>8,w[9]=h&255,w[10]=(h=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=h/4294967296&255,w[12]=h>>>24&255,w[13]=h>>>16&255,w[14]=h>>>8&255,w[15]=h&255,w}var fx=tg;vX.default=fx});var VF=H((iX)=>{Object.defineProperty(iX,"__esModule",{value:!0});iX.URL=iX.DNS=void 0;iX.default=rx;var hx=i$(),wx=sx(JF());function sx(f){return f&&f.__esModule?f:{default:f}}function $x(f){f=unescape(encodeURIComponent(f));let h=[];for(let w=0;w<f.length;++w)h.push(f.charCodeAt(w));return h}var mX="6ba7b810-9dad-11d1-80b4-00c04fd430c8";iX.DNS=mX;var dX="6ba7b811-9dad-11d1-80b4-00c04fd430c8";iX.URL=dX;function rx(f,h,w){function s($,r,E,U){var T;if(typeof $==="string")$=$x($);if(typeof r==="string")r=wx.default(r);if(((T=r)===null||T===void 0?void 0:T.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let F=new Uint8Array(16+$.length);if(F.set(r),F.set($,r.length),F=w(F),F[6]=F[6]&15|h,F[8]=F[8]&63|128,E){U=U||0;for(let C=0;C<16;++C)E[U+C]=F[C];return E}return hx.unsafeStringify(F)}try{s.name=f}catch($){}return s.DNS=mX,s.URL=dX,s}});var _X=H((gX)=>{Object.defineProperty(gX,"__esModule",{value:!0});gX.default=void 0;var Tx=Fx(B0("node:crypto"));function Fx(f){return f&&f.__esModule?f:{default:f}}function Cx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Tx.default.createHash("md5").update(f).digest()}var Ix=Cx;gX.default=Ix});var pX=H((eX)=>{Object.defineProperty(eX,"__esModule",{value:!0});eX.default=void 0;var Lx=nX(VF()),Bx=nX(_X());function nX(f){return f&&f.__esModule?f:{default:f}}var Gx=Lx.default("v3",48,Bx.default),Wx=Gx;eX.default=Wx});var tX=H((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.default=void 0;var zx=Ax(B0("node:crypto"));function Ax(f){return f&&f.__esModule?f:{default:f}}var Rx={randomUUID:zx.default.randomUUID};oX.default=Rx});var $S=H((wS)=>{Object.defineProperty(wS,"__esModule",{value:!0});wS.default=void 0;var fS=hS(tX()),Xx=hS(MF()),Sx=i$();function hS(f){return f&&f.__esModule?f:{default:f}}function Yx(f,h,w){if(fS.default.randomUUID&&!h&&!f)return fS.default.randomUUID();f=f||{};let s=f.random||(f.rng||Xx.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,h){w=w||0;for(let $=0;$<16;++$)h[w+$]=s[$];return h}return Sx.unsafeStringify(s)}var Mx=Yx;wS.default=Mx});var US=H((rS)=>{Object.defineProperty(rS,"__esModule",{value:!0});rS.default=void 0;var Qx=Kx(B0("node:crypto"));function Kx(f){return f&&f.__esModule?f:{default:f}}function Zx(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Qx.default.createHash("sha1").update(f).digest()}var Jx=Zx;rS.default=Jx});var IS=H((FS)=>{Object.defineProperty(FS,"__esModule",{value:!0});FS.default=void 0;var Vx=TS(VF()),Px=TS(US());function TS(f){return f&&f.__esModule?f:{default:f}}var Hx=Vx.default("v5",80,Px.default),Nx=Hx;FS.default=Nx});var GS=H((LS)=>{Object.defineProperty(LS,"__esModule",{value:!0});LS.default=void 0;var Dx="00000000-0000-0000-0000-000000000000";LS.default=Dx});var AS=H((WS)=>{Object.defineProperty(WS,"__esModule",{value:!0});WS.default=void 0;var qx=kx(d$());function kx(f){return f&&f.__esModule?f:{default:f}}function yx(f){if(!qx.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var jx=yx;WS.default=jx});var PF=H(($f)=>{Object.defineProperty($f,"__esModule",{value:!0});Object.defineProperty($f,"NIL",{enumerable:!0,get:function(){return mx.default}});Object.defineProperty($f,"parse",{enumerable:!0,get:function(){return gx.default}});Object.defineProperty($f,"stringify",{enumerable:!0,get:function(){return cx.default}});Object.defineProperty($f,"v1",{enumerable:!0,get:function(){return Ox.default}});Object.defineProperty($f,"v3",{enumerable:!0,get:function(){return lx.default}});Object.defineProperty($f,"v4",{enumerable:!0,get:function(){return vx.default}});Object.defineProperty($f,"v5",{enumerable:!0,get:function(){return bx.default}});Object.defineProperty($f,"validate",{enumerable:!0,get:function(){return ix.default}});Object.defineProperty($f,"version",{enumerable:!0,get:function(){return dx.default}});var Ox=_f(lX()),lx=_f(pX()),vx=_f($S()),bx=_f(IS()),mx=_f(GS()),dx=_f(AS()),ix=_f(d$()),cx=_f(i$()),gx=_f(JF());function _f(f){return f&&f.__esModule?f:{default:f}}});var Qf,I60,L60,RS,B60,G60,W60,z60,A60,R60;var XS=B(()=>{Qf=p(PF(),1),I60=Qf.default.v1,L60=Qf.default.v3,RS=Qf.default.v4,B60=Qf.default.v5,G60=Qf.default.NIL,W60=Qf.default.version,z60=Qf.default.validate,A60=Qf.default.stringify,R60=Qf.default.parse});var SS=B(()=>{sf()});var HF=B(()=>{sf()});var NF=B(()=>{b$()});var DF=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var qF=B(()=>{C1();b$();sf();SS();HF();NF()});var YS=B(()=>{sf();qF()});var MS="AWS_MAX_ATTEMPTS",QS="max_attempts",ws,ss=(f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=B1(s??hw);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await B1(w)()===l1.ADAPTIVE)return new YF($);return new hs($)}})},xx="AWS_RETRY_MODE",_x="retry_mode",$s;var KS=B(()=>{gf();sf();ws={environmentVariableSelector:(f)=>{let h=f[MS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${MS} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[QS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${QS} mast be a number, got "${h}"`);return w},default:hw},$s={environmentVariableSelector:(f)=>f[xx],configFileSelector:(f)=>f[_x],default:Jh}});var ZS=B(()=>{C1();sf()});var sw=(f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},Vh=(f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},rs=()=>{let f=[],h=[],w=!1,s=new Set,$=(I)=>I.sort((L,W)=>JS[W.step]-JS[L.step]||VS[W.priority||"normal"]-VS[L.priority||"normal"]),r=(I)=>{let L=!1,W=(X)=>{let Q=sw(X.name,X.aliases);if(Q.includes(I)){L=!0;for(let M of Q)s.delete(M);return!1}return!0};return f=f.filter(W),h=h.filter(W),L},E=(I)=>{let L=!1,W=(X)=>{if(X.middleware===I){L=!0;for(let Q of sw(X.name,X.aliases))s.delete(Q);return!1}return!0};return f=f.filter(W),h=h.filter(W),L},U=(I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},T=(I)=>{let L=[];return I.before.forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L.push(I),I.after.reverse().forEach((W)=>{if(W.before.length===0&&W.after.length===0)L.push(W);else L.push(...T(W))}),L},F=(I=!1)=>{let L=[],W=[],X={};return f.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of sw(q.name,q.aliases))X[N]=q;L.push(q)}),h.forEach((M)=>{let q={...M,before:[],after:[]};for(let N of sw(q.name,q.aliases))X[N]=q;W.push(q)}),W.forEach((M)=>{if(M.toMiddleware){let q=X[M.toMiddleware];if(q===void 0){if(I)return;throw new Error(`${M.toMiddleware} is not found when adding ${Vh(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")q.after.push(M);if(M.relation==="before")q.before.push(M)}}),$(L).map(T).reduce((M,q)=>{return M.push(...q),M},[])},C={add:(I,L={})=>{let{name:W,override:X,aliases:Q}=L,M={step:"initialize",priority:"normal",middleware:I,...L},q=sw(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Vh(W,Q)}'`);for(let N of q){let y=f.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=f[y];if(n.step!==M.step||M.priority!==n.priority)throw new Error(`"${Vh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Vh(W,Q)}" middleware with ${M.priority} priority in ${M.step} step.`);f.splice(y,1)}}for(let N of q)s.add(N)}f.push(M)},addRelativeTo:(I,L)=>{let{name:W,override:X,aliases:Q}=L,M={middleware:I,...L},q=sw(W,Q);if(q.length>0){if(q.some((N)=>s.has(N))){if(!X)throw new Error(`Duplicate middleware name '${Vh(W,Q)}'`);for(let N of q){let y=h.findIndex((L0)=>L0.name===N||L0.aliases?.some((b0)=>b0===N));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==M.toMiddleware||n.relation!==M.relation)throw new Error(`"${Vh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Vh(W,Q)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);h.splice(y,1)}}for(let N of q)s.add(N)}h.push(M)},clone:()=>U(rs()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return r(I);else return E(I)},removeByTag:(I)=>{let L=!1,W=(X)=>{let{tags:Q,name:M,aliases:q}=X;if(Q&&Q.includes(I)){let N=sw(M,q);for(let y of N)s.delete(y);return L=!0,!1}return!0};return f=f.filter(W),h=h.filter(W),L},concat:(I)=>{let L=U(rs());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:U,identify:()=>{return F(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Vh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let W of F().map((X)=>X.middleware).reverse())I=W(I,L);if(w)console.log(C.identify());return I}};return C},JS,VS;var PS=B(()=>{JS={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},VS={high:3,normal:2,low:1}});var kF=B(()=>{PS()});class $w{constructor(f){this.config=f,this.middlewareStack=rs()}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,r=s===void 0&&this.config.cacheMiddleware===!0,E;if(r){if(!this.handlers)this.handlers=new WeakMap;let U=this.handlers;if(U.has(f.constructor))E=U.get(f.constructor);else E=f.resolveMiddleware(this.middlewareStack,this.config,s),U.set(f.constructor,E)}else delete this.handlers,E=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)E(f).then((U)=>$(null,U.output),(U)=>$(U)).catch(()=>{});else return E(f).then((U)=>U.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var HS=B(()=>{kF()});var G1;var NS=B(()=>{G1=p(yw(),1)});class z{constructor(){this.middlewareStack=rs()}static classBuilder(){return new qS}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,smithyContext:T,additionalContext:F,CommandCtor:C}){for(let Q of s.bind(this)(C,f,h,w))this.middlewareStack.use(Q);let I=f.concat(this.middlewareStack),{logger:L}=h,W={logger:L,clientName:$,commandName:r,inputFilterSensitiveLog:E,outputFilterSensitiveLog:U,[DS.SMITHY_CONTEXT_KEY]:{commandInstance:this,...T},...F},{requestHandler:X}=h;return I.resolve((Q)=>X.handle(Q.request,w||{}),W)}}class qS{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends z{static getEndpointParameterInstructions(){return f._ep}constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}}var DS;var kS=B(()=>{kF();DS=p(F1(),1)});var T0="***SensitiveInformation***";var Es=(f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=async function(E,U,T){let F=new s(E);if(typeof U==="function")this.send(F,U);else if(typeof T==="function"){if(typeof U!=="object")throw new Error(`Expected http options but got ${typeof U}`);this.send(F,U||{},T)}else return this.send(F,U)},r=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[r]=$}};var e0=(f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},Ph=(f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)Rr.warn(Ar(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")Rr.warn(Ar(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},Y1=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))Rr.warn(Ar(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},nx,yS=(f)=>{let h=Y1(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>nx)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},yF=(f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},jS=(f)=>jF(f,32),OS=(f)=>jF(f,16),lS=(f)=>jF(f,8),jF=(f,h)=>{let w=yF(f);if(w!==void 0&&ex(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},ex=(f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},j=(f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},g=(f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},G=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return Rr.warn(Ar(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},OF=(f)=>{if(typeof f=="string")return Y1(Us(f));return Y1(f)},vS,bS=(f)=>{if(typeof f=="string")return yS(Us(f));return yS(f)},ax,Us=(f)=>{let h=f.match(ax);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},lF=(f)=>{if(typeof f=="string")return px(f);return Y1(f)},px=(f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},E1=(f)=>{if(typeof f==="string")return yF(Us(f));return yF(f)},M0=(f)=>{if(typeof f==="string")return jS(Us(f));return jS(f)},vF=(f)=>{if(typeof f==="string")return OS(Us(f));return OS(f)},mS=(f)=>{if(typeof f==="string")return lS(Us(f));return lS(f)},Ar=(f)=>{return String(new TypeError(f).stack||f).split(`
41
41
  `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
42
- `)},M5;var bF=B(()=>{ax=Math.ceil(340282346638528860000000000000000000000),vS=OF,ox=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,M5={warn:console.warn}});var tx,f_,dS=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=f_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=vF(mF(s)),I=rw($,"month",1,12),L=rw(r,"day",1,31);return iS(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},h_,a$=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=h_.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=vF(mF(s)),L=rw($,"month",1,12),W=rw(r,"day",1,31),X=iS(I,L,W,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-E_(C));return X},LI0,BI0,GI0,Qf=(f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=OF(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},iS=(f,h,w,s)=>{let $=h-1;return s_(f,$,w),new Date(Date.UTC(f,$,w,rw(s.hours,"hour",0,23),rw(s.minutes,"minute",0,59),rw(s.seconds,"seconds",0,60),r_(s.fractionalMilliseconds)))},w_,s_=(f,h,w)=>{let s=w_[h];if(h===1&&$_(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${tx[h]} in ${f}: ${w}`)},$_=(f)=>{return f%4===0&&(f%100!==0||f%400===0)},rw=(f,h,w,s)=>{let $=mS(mF(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},r_=(f)=>{if(f===null||f===void 0)return 0;return bS("0."+f)*1000},E_=(f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},mF=(f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)};var cS=B(()=>{bF();tx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),h_=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),LI0=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$/),BI0=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$/),GI0=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})$/),w_=[31,28,31,30,31,30,31,31,30,31,30,31]});var $f,l=(f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f};var dF=B(()=>{$f=class $f extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}static isInstance(f){if(!f)return!1;let h=f;return $f.prototype.isPrototypeOf(h)||Boolean(h.$fault)&&Boolean(h.$metadata)&&(h.$fault==="client"||h.$fault==="server")}static[Symbol.hasInstance](f){if(!f)return!1;let h=f;if(this===$f)return $f.isInstance(f);if($f.isInstance(f)){if(h.name&&this.name)return this.prototype.isPrototypeOf(f)||h.name===this.name;return this.prototype.isPrototypeOf(f)}return!1}}});var U_=({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=T_(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw l(E,h)},Fs=(f)=>{return({output:h,parsedBody:w,errorCode:s})=>{U_({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},T_=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var gS=B(()=>{dF()});var Cs=(f)=>{switch(f){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{}}};var xS=!1,Is=(f)=>{if(f&&!xS&&parseInt(f.substring(1,f.indexOf(".")))<16)xS=!0};var F_;var _S=B(()=>{F_=o(jw(),1)});var iF,nS=(f)=>{let h=[];for(let w in iF.AlgorithmId){let s=iF.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},eS=(f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h};var aS=B(()=>{iF=o(F1(),1)});var pS=(f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},oS=(f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h};var Ls=(f)=>{return Object.assign(nS(f),pS(f))},Bs=(f)=>{return Object.assign(eS(f),oS(f))};var uS=B(()=>{aS()});var tS=B(()=>{uS()});var G0=(f)=>Array.isArray(f)?f:[f];var p$=(f)=>{return f!=null};var Gs=function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})};var fY=B(()=>{Gs.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof Gs||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return Gs(String(f));return Gs(JSON.stringify(f))};Gs.fromObject=Gs.from});class nf{trace(){}debug(){}info(){}warn(){}error(){}}function Y(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,C_(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}hY(s,null,r,E)}return s}var N0=(f,h)=>{let w={};for(let s in h)hY(w,f,h,s);return w},C_=(f,h,w)=>{return Y(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},hY=(f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=I_,T=L_,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},I_=(f)=>f!=null,L_=(f)=>f;var B_;var wY=B(()=>{B_=o(jw(),1)});var sY=(f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}};var v=(f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(v);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=v(f[w])}return h}return f};var J=B(()=>{HS();NS();kS();cS();gS();dF();_S();tS();fY();bF();wY()});import{Readable as G_}from"node:stream";var $Y=(f)=>f?.body instanceof G_||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var rY=()=>{};var W_=(f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(A_($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=n0.isInstance(C);if(I)C.headers[A5]=RS();while(!0)try{if(I)C.headers[z5]=`attempt=${T+1}; max=${r}`;let{response:L,output:W}=await h(s);return $.recordSuccess(E),W.$metadata.attempts=T+1,W.$metadata.totalRetryDelay=F,{response:L,output:W}}catch(L){let W=z_(L);if(U=DF(L),I&&$Y(C))throw(w.logger instanceof nf?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,W)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},A_=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",z_=(f)=>{let h={error:f,errorType:R_(f)},w=S_(f.$response);if(w)h.retryAfterHint=w;return h},R_=(f)=>{if(fs(f))return"THROTTLING";if(g$(f))return"TRANSIENT";if(RX(f))return"SERVER_ERROR";return"CLIENT_ERROR"},X_,Ws=(f)=>({applyToStack:(h)=>{h.add(W_(f),X_)}}),S_=(f)=>{if(!xh.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)};var EY=B(()=>{C1();x$();J();wf();XS();rY();X_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Ew=B(()=>{YS();qF();KS();HF();ZS();NF();EY()});var BY,Q5="AWS_ACCESS_KEY_ID",K5="AWS_SECRET_ACCESS_KEY",GY="AWS_SESSION_TOKEN",WY="AWS_CREDENTIAL_EXPIRATION",AY="AWS_CREDENTIAL_SCOPE",zY="AWS_ACCOUNT_ID",cF=(f)=>async()=>{f?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let h=process.env[Q5],w=process.env[K5],s=process.env[GY],$=process.env[WY],r=process.env[AY],E=process.env[zY];if(h&&w){let U={accessKeyId:h,secretAccessKey:w,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...r&&{credentialScope:r},...E&&{accountId:E}};return BY.setCredentialFeature(U,"CREDENTIALS_ENV_VARS","g"),U}throw new a("Unable to find environment variable credentials.",{logger:f?.logger})};var RY=B(()=>{BY=o(I1(),1);Y0()});var XY={};Ch(XY,{fromEnv:()=>cF,ENV_SESSION:()=>GY,ENV_SECRET:()=>K5,ENV_KEY:()=>Q5,ENV_EXPIRATION:()=>WY,ENV_CREDENTIAL_SCOPE:()=>AY,ENV_ACCOUNT_ID:()=>zY});var gF=B(()=>{RY()});import{Buffer as Q_}from"node:buffer";import{request as K_}from"node:http";function Nh(f){return new Promise((h,w)=>{let s=K_({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new k1("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new k1("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new k1("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(Q_.concat(E)),s.destroy()})}),s.end()})}var Z5=B(()=>{Y0()});var J5=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string",V5=(f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}});var Z_=1000,J_=0,o$=({maxRetries:f=0,timeout:h=1000})=>({maxRetries:f,timeout:h});var u$=(f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w};import{parse as V_}from"node:url";var P5="AWS_CONTAINER_CREDENTIALS_FULL_URI",H5="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",xF="AWS_CONTAINER_AUTHORIZATION_TOKEN",P_=(f={})=>{let{timeout:h,maxRetries:w}=o$(f);return()=>u$(async()=>{let s=await k_({logger:f.logger}),$=JSON.parse(await H_(h,s));if(!J5($))throw new a("Invalid response received from instance metadata service.",{logger:f.logger});return V5($)},w)},H_=async(f,h)=>{if(process.env[xF])h.headers={...h.headers,Authorization:process.env[xF]};return(await Nh({...h,timeout:f})).toString()},N_="169.254.170.2",D_,q_,k_=async({logger:f})=>{if(process.env[H5])return{hostname:N_,path:process.env[H5]};if(process.env[P5]){let h=V_(process.env[P5]);if(!h.hostname||!(h.hostname in D_))throw new a(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in q_))throw new a(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${H5} or ${P5} environment variable is set`,{tryNextLink:!1,logger:f})};var SY=B(()=>{Y0();Z5();D_={localhost:!0,"127.0.0.1":!0},q_={"http:":!0,"https:":!0}});var N5;var YY=B(()=>{Y0();N5=class N5 extends a{constructor(f,h=!0){super(f,h);this.tryNextLink=h,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,N5.prototype)}}});var Uw;var _F=B(()=>{(function(f){f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]"})(Uw||(Uw={}))});var MY;var QY=B(()=>{MY={environmentVariableSelector:(f)=>f.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(f)=>f.ec2_metadata_service_endpoint,default:void 0}});var Dh;var nF=B(()=>{(function(f){f.IPv4="IPv4",f.IPv6="IPv6"})(Dh||(Dh={}))});var y_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",j_="ec2_metadata_service_endpoint_mode",KY;var ZY=B(()=>{nF();KY={environmentVariableSelector:(f)=>f[y_],configFileSelector:(f)=>f[j_],default:Dh.IPv4}});var D5=async()=>O1(await O_()||await l_()),O_=async()=>z0(MY)(),l_=async()=>{let f=await z0(KY)();switch(f){case Dh.IPv4:return Uw.IPv4;case Dh.IPv6:return Uw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(Dh)}`)}};var eF=B(()=>{Jh();uw();_F();QY();nF();ZY()});var aF=(f,h)=>{let w=300+Math.floor(Math.random()*300),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
43
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}};var JY=(f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=aF($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=aF(s,w);else throw r}return s=$,$}};var VY=()=>{};var NY="/latest/meta-data/iam/security-credentials/",v_="/latest/api/token",pF="AWS_EC2_METADATA_V1_DISABLED",PY="ec2_metadata_v1_disabled",HY="x-aws-ec2-metadata-token",b_=(f={})=>JY(m_(f),{logger:f.logger}),m_=(f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=o$(f),E=async(U,T)=>{if(h||T.headers?.[HY]==null){let I=!1,L=!1,W=await z0({environmentVariableSelector:(X)=>{let Q=X[pF];if(L=!!Q&&Q!=="false",Q===void 0)throw new a(`${pF} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[PY];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||W){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${PY})`);if(L)X.push(`process environment variable (${pF})`);throw new N5(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await u$(async()=>{let I;try{I=await i_(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return u$(async()=>{let I;try{I=await c_(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)};return async()=>{let U=await D5();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await d_({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[HY]:T},timeout:$})}}},d_=async(f)=>Nh({...f,path:v_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),i_=async(f)=>(await Nh({...f,path:NY})).toString(),c_=async(f,h,w)=>{let s=JSON.parse((await Nh({...h,path:NY+f})).toString());if(!J5(s))throw new a("Invalid response received from instance metadata service.",{logger:w.logger});return V5(s)};var DY=B(()=>{Jh();Y0();YY();Z5();eF();VY()});var qY=()=>{};var t$={};Ch(t$,{providerConfigFromInit:()=>o$,httpRequest:()=>Nh,getInstanceMetadataEndpoint:()=>D5,fromInstanceMetadata:()=>b_,fromContainerMetadata:()=>P_,Endpoint:()=>Uw,ENV_CMDS_RELATIVE_URI:()=>H5,ENV_CMDS_FULL_URI:()=>P5,ENV_CMDS_AUTH_TOKEN:()=>xF,DEFAULT_TIMEOUT:()=>Z_,DEFAULT_MAX_RETRIES:()=>J_});var fr=B(()=>{SY();DY();qY();Z5();eF();_F()});var hr=(f)=>encodeURIComponent(f).replace(/[!'()*]/g,g_),g_=(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`;var kY=()=>{};var yY=B(()=>{kY()});function oF(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=hr(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${hr(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${hr(s)}`;h.push($)}}return h.join("&")}var uF=B(()=>{yY()});var jY;var OY=B(()=>{jY=["ECONNRESET","EPIPE","ETIMEDOUT"]});var tF=(f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h};var f3=()=>{};var a0;var As=B(()=>{a0={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)}});var lY=1000,vY=(f,h,w=0)=>{if(!w)return-1;let s=($)=>{let r=a0.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=(U)=>{if(U?.connecting)U.on("connect",()=>{a0.clearTimeout(r)});else a0.clearTimeout(r)};if(f.socket)E(f.socket);else f.on("socket",E)};if(w<2000)return s(0),0;return a0.setTimeout(s.bind(null,lY),lY)};var bY=B(()=>{As()});var x_=3000,mY=(f,{keepAlive:h,keepAliveMsecs:w},s=x_)=>{if(h!==!0)return-1;let $=()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})};if(s===0)return $(),0;return a0.setTimeout($,s)};var dY=B(()=>{As()});var iY=3000,cY=(f,h,w=xY)=>{let s=($)=>{let r=w-$,E=()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))};if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)};if(0<w&&w<6000)return s(0),0;return a0.setTimeout(s.bind(null,w===0?0:iY),iY)};var gY=B(()=>{h3();As()});import{Readable as __}from"node:stream";async function w3(f,h,w=_Y){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(a0.setTimeout(()=>U(!0),Math.max(_Y,w)))}),new Promise((U)=>{f.on("continue",()=>{a0.clearTimeout(r),U(!0)}),f.on("response",()=>{a0.clearTimeout(r),U(!1)}),f.on("error",()=>{a0.clearTimeout(r),U(!1)})})]);if(E)n_(f,h.body)}function n_(f,h){if(h instanceof __){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}var _Y=6000;var s3=B(()=>{As()});import{Agent as nY,request as e_}from"node:http";import{Agent as eY,request as a_}from"node:https";class rf{static create(f){if(typeof f?.handle==="function")return f;return new rf(f)}static checkSocketUsage(f,h,w=console){let{sockets:s,requests:$,maxSockets:r}=f;if(typeof r!=="number"||r===1/0)return h;let E=15000;if(Date.now()-E<h)return h;if(s&&$)for(let U in s){let T=s[U]?.length??0,F=$[U]?.length??0;if(T>=r&&F>=2*r)return w?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${T} and ${F} additional requests are enqueued.
42
+ `)},Rr;var bF=B(()=>{nx=Math.ceil(340282346638528860000000000000000000000),vS=OF,ax=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Rr={warn:console.warn}});var ox,ux,dS=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=ux.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F]=h,C=vF(mF(s)),I=rw($,"month",1,12),L=rw(r,"day",1,31);return iS(C,I,L,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})},tx,c$=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=tx.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,r,E,U,T,F,C]=h,I=vF(mF(s)),L=rw($,"month",1,12),W=rw(r,"day",1,31),X=iS(I,L,W,{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F});if(C.toUpperCase()!="Z")X.setTime(X.getTime()-$_(C));return X},FI0,CI0,II0,Kf=(f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=OF(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},iS=(f,h,w,s)=>{let $=h-1;return h_(f,$,w),new Date(Date.UTC(f,$,w,rw(s.hours,"hour",0,23),rw(s.minutes,"minute",0,59),rw(s.seconds,"seconds",0,60),s_(s.fractionalMilliseconds)))},f_,h_=(f,h,w)=>{let s=f_[h];if(h===1&&w_(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${ox[h]} in ${f}: ${w}`)},w_=(f)=>{return f%4===0&&(f%100!==0||f%400===0)},rw=(f,h,w,s)=>{let $=mS(mF(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},s_=(f)=>{if(f===null||f===void 0)return 0;return bS("0."+f)*1000},$_=(f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},mF=(f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)};var cS=B(()=>{bF();ox=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ux=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),tx=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),FI0=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$/),CI0=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$/),II0=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})$/),f_=[31,28,31,30,31,30,31,31,30,31,30,31]});var rf,l=(f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f};var dF=B(()=>{rf=class rf extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}static isInstance(f){if(!f)return!1;let h=f;return rf.prototype.isPrototypeOf(h)||Boolean(h.$fault)&&Boolean(h.$metadata)&&(h.$fault==="client"||h.$fault==="server")}static[Symbol.hasInstance](f){if(!f)return!1;let h=f;if(this===rf)return rf.isInstance(f);if(rf.isInstance(f)){if(h.name&&this.name)return this.prototype.isPrototypeOf(f)||h.name===this.name;return this.prototype.isPrototypeOf(f)}return!1}}});var r_=({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=E_(f),r=$.httpStatusCode?$.httpStatusCode+"":void 0,E=new w({name:h?.code||h?.Code||s||r||"UnknownError",$fault:"client",$metadata:$});throw l(E,h)},Ts=(f)=>{return({output:h,parsedBody:w,errorCode:s})=>{r_({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},E_=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var gS=B(()=>{dF()});var Fs=(f)=>{switch(f){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{}}};var xS=!1,Cs=(f)=>{if(f&&!xS&&parseInt(f.substring(1,f.indexOf(".")))<16)xS=!0};var U_;var _S=B(()=>{U_=p(yw(),1)});var iF,nS=(f)=>{let h=[];for(let w in iF.AlgorithmId){let s=iF.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},eS=(f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h};var aS=B(()=>{iF=p(F1(),1)});var pS=(f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},oS=(f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h};var Is=(f)=>{return Object.assign(nS(f),pS(f))},Ls=(f)=>{return Object.assign(eS(f),oS(f))};var uS=B(()=>{aS()});var tS=B(()=>{uS()});var G0=(f)=>Array.isArray(f)?f:[f];var g$=(f)=>{return f!=null};var Bs=function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})};var fY=B(()=>{Bs.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof Bs||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return Bs(String(f));return Bs(JSON.stringify(f))};Bs.fromObject=Bs.from});class nf{trace(){}debug(){}info(){}warn(){}error(){}}function Y(f,h,w){let s,$,r;if(typeof h==="undefined"&&typeof w==="undefined")s={},r=f;else if(s=f,typeof h==="function")return $=h,r=w,T_(s,$,r);else r=h;for(let E of Object.keys(r)){if(!Array.isArray(r[E])){s[E]=r[E];continue}hY(s,null,r,E)}return s}var N0=(f,h)=>{let w={};for(let s in h)hY(w,f,h,s);return w},T_=(f,h,w)=>{return Y(f,Object.entries(w).reduce((s,[$,r])=>{if(Array.isArray(r))s[$]=r;else if(typeof r==="function")s[$]=[h,r()];else s[$]=[h,r];return s},{}))},hY=(f,h,w,s)=>{if(h!==null){let E=w[s];if(typeof E==="function")E=[,E];let[U=F_,T=C_,F=s]=E;if(typeof U==="function"&&U(h[F])||typeof U!=="function"&&!!U)f[s]=T(h[F]);return}let[$,r]=w[s];if(typeof r==="function"){let E,U=$===void 0&&(E=r())!=null,T=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(U)f[s]=E;else if(T)f[s]=r()}else{let E=$===void 0&&r!=null,U=typeof $==="function"&&!!$(r)||typeof $!=="function"&&!!$;if(E||U)f[s]=r}},F_=(f)=>f!=null,C_=(f)=>f;var I_;var wY=B(()=>{I_=p(yw(),1)});var sY=(f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}};var v=(f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(v);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=v(f[w])}return h}return f};var J=B(()=>{HS();NS();kS();cS();gS();dF();_S();tS();fY();bF();wY()});import{Readable as L_}from"node:stream";var $Y=(f)=>f?.body instanceof L_||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var rY=()=>{};var B_=(f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(G_($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=n0.isInstance(C);if(I)C.headers[Lr]=RS();while(!0)try{if(I)C.headers[Br]=`attempt=${T+1}; max=${r}`;let{response:L,output:W}=await h(s);return $.recordSuccess(E),W.$metadata.attempts=T+1,W.$metadata.totalRetryDelay=F,{response:L,output:W}}catch(L){let W=W_(L);if(U=DF(L),I&&$Y(C))throw(w.logger instanceof nf?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,W)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},G_=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",W_=(f)=>{let h={error:f,errorType:z_(f)},w=R_(f.$response);if(w)h.retryAfterHint=w;return h},z_=(f)=>{if(tw(f))return"THROTTLING";if(v$(f))return"TRANSIENT";if(RX(f))return"SERVER_ERROR";return"CLIENT_ERROR"},A_,Gs=(f)=>({applyToStack:(h)=>{h.add(B_(f),A_)}}),R_=(f)=>{if(!xh.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)};var EY=B(()=>{C1();b$();J();sf();XS();rY();A_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Ew=B(()=>{YS();qF();KS();HF();ZS();NF();EY()});var BY,Xr="AWS_ACCESS_KEY_ID",Sr="AWS_SECRET_ACCESS_KEY",GY="AWS_SESSION_TOKEN",WY="AWS_CREDENTIAL_EXPIRATION",zY="AWS_CREDENTIAL_SCOPE",AY="AWS_ACCOUNT_ID",cF=(f)=>async()=>{f?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let h=process.env[Xr],w=process.env[Sr],s=process.env[GY],$=process.env[WY],r=process.env[zY],E=process.env[AY];if(h&&w){let U={accessKeyId:h,secretAccessKey:w,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...r&&{credentialScope:r},...E&&{accountId:E}};return BY.setCredentialFeature(U,"CREDENTIALS_ENV_VARS","g"),U}throw new a("Unable to find environment variable credentials.",{logger:f?.logger})};var RY=B(()=>{BY=p(I1(),1);Y0()});var XY={};Ch(XY,{fromEnv:()=>cF,ENV_SESSION:()=>GY,ENV_SECRET:()=>Sr,ENV_KEY:()=>Xr,ENV_EXPIRATION:()=>WY,ENV_CREDENTIAL_SCOPE:()=>zY,ENV_ACCOUNT_ID:()=>AY});var gF=B(()=>{RY()});import{Buffer as Y_}from"node:buffer";import{request as M_}from"node:http";function Hh(f){return new Promise((h,w)=>{let s=M_({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new k1("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new k1("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new k1("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(Y_.concat(E)),s.destroy()})}),s.end()})}var Yr=B(()=>{Y0()});var Mr=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string",Qr=(f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}});var Q_=1000,K_=0,x$=({maxRetries:f=0,timeout:h=1000})=>({maxRetries:f,timeout:h});var _$=(f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w};import{parse as Z_}from"node:url";var Kr="AWS_CONTAINER_CREDENTIALS_FULL_URI",Zr="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",xF="AWS_CONTAINER_AUTHORIZATION_TOKEN",J_=(f={})=>{let{timeout:h,maxRetries:w}=x$(f);return()=>_$(async()=>{let s=await D_({logger:f.logger}),$=JSON.parse(await V_(h,s));if(!Mr($))throw new a("Invalid response received from instance metadata service.",{logger:f.logger});return Qr($)},w)},V_=async(f,h)=>{if(process.env[xF])h.headers={...h.headers,Authorization:process.env[xF]};return(await Hh({...h,timeout:f})).toString()},P_="169.254.170.2",H_,N_,D_=async({logger:f})=>{if(process.env[Zr])return{hostname:P_,path:process.env[Zr]};if(process.env[Kr]){let h=Z_(process.env[Kr]);if(!h.hostname||!(h.hostname in H_))throw new a(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in N_))throw new a(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${Zr} or ${Kr} environment variable is set`,{tryNextLink:!1,logger:f})};var SY=B(()=>{Y0();Yr();H_={localhost:!0,"127.0.0.1":!0},N_={"http:":!0,"https:":!0}});var Jr;var YY=B(()=>{Y0();Jr=class Jr extends a{constructor(f,h=!0){super(f,h);this.tryNextLink=h,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Jr.prototype)}}});var Uw;var _F=B(()=>{(function(f){f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]"})(Uw||(Uw={}))});var MY;var QY=B(()=>{MY={environmentVariableSelector:(f)=>f.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(f)=>f.ec2_metadata_service_endpoint,default:void 0}});var Nh;var nF=B(()=>{(function(f){f.IPv4="IPv4",f.IPv6="IPv6"})(Nh||(Nh={}))});var q_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",k_="ec2_metadata_service_endpoint_mode",KY;var ZY=B(()=>{nF();KY={environmentVariableSelector:(f)=>f[q_],configFileSelector:(f)=>f[k_],default:Nh.IPv4}});var Vr=async()=>O1(await y_()||await j_()),y_=async()=>A0(MY)(),j_=async()=>{let f=await A0(KY)();switch(f){case Nh.IPv4:return Uw.IPv4;case Nh.IPv6:return Uw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(Nh)}`)}};var eF=B(()=>{Zh();ow();_F();QY();nF();ZY()});var aF=(f,h)=>{let w=300+Math.floor(Math.random()*300),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
43
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}};var JY=(f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=aF($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=aF(s,w);else throw r}return s=$,$}};var VY=()=>{};var NY="/latest/meta-data/iam/security-credentials/",O_="/latest/api/token",pF="AWS_EC2_METADATA_V1_DISABLED",PY="ec2_metadata_v1_disabled",HY="x-aws-ec2-metadata-token",l_=(f={})=>JY(v_(f),{logger:f.logger}),v_=(f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=x$(f),E=async(U,T)=>{if(h||T.headers?.[HY]==null){let I=!1,L=!1,W=await A0({environmentVariableSelector:(X)=>{let Q=X[pF];if(L=!!Q&&Q!=="false",Q===void 0)throw new a(`${pF} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[PY];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||W){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${PY})`);if(L)X.push(`process environment variable (${pF})`);throw new Jr(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await _$(async()=>{let I;try{I=await m_(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return _$(async()=>{let I;try{I=await d_(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)};return async()=>{let U=await Vr();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await b_({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[HY]:T},timeout:$})}}},b_=async(f)=>Hh({...f,path:O_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),m_=async(f)=>(await Hh({...f,path:NY})).toString(),d_=async(f,h,w)=>{let s=JSON.parse((await Hh({...h,path:NY+f})).toString());if(!Mr(s))throw new a("Invalid response received from instance metadata service.",{logger:w.logger});return Qr(s)};var DY=B(()=>{Zh();Y0();YY();Yr();eF();VY()});var qY=()=>{};var n$={};Ch(n$,{providerConfigFromInit:()=>x$,httpRequest:()=>Hh,getInstanceMetadataEndpoint:()=>Vr,fromInstanceMetadata:()=>l_,fromContainerMetadata:()=>J_,Endpoint:()=>Uw,ENV_CMDS_RELATIVE_URI:()=>Zr,ENV_CMDS_FULL_URI:()=>Kr,ENV_CMDS_AUTH_TOKEN:()=>xF,DEFAULT_TIMEOUT:()=>Q_,DEFAULT_MAX_RETRIES:()=>K_});var e$=B(()=>{SY();DY();qY();Yr();eF();_F()});var a$=(f)=>encodeURIComponent(f).replace(/[!'()*]/g,i_),i_=(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`;var kY=()=>{};var yY=B(()=>{kY()});function oF(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=a$(w),Array.isArray(s))for(let $=0,r=s.length;$<r;$++)h.push(`${w}=${a$(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${a$(s)}`;h.push($)}}return h.join("&")}var uF=B(()=>{yY()});var jY;var OY=B(()=>{jY=["ECONNRESET","EPIPE","ETIMEDOUT"]});var tF=(f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h};var f3=()=>{};var a0;var Ws=B(()=>{a0={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)}});var lY=1000,vY=(f,h,w=0)=>{if(!w)return-1;let s=($)=>{let r=a0.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),E=(U)=>{if(U?.connecting)U.on("connect",()=>{a0.clearTimeout(r)});else a0.clearTimeout(r)};if(f.socket)E(f.socket);else f.on("socket",E)};if(w<2000)return s(0),0;return a0.setTimeout(s.bind(null,lY),lY)};var bY=B(()=>{Ws()});var c_=3000,mY=(f,{keepAlive:h,keepAliveMsecs:w},s=c_)=>{if(h!==!0)return-1;let $=()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(r)=>{r.setKeepAlive(h,w||0)})};if(s===0)return $(),0;return a0.setTimeout($,s)};var dY=B(()=>{Ws()});var iY=3000,cY=(f,h,w=xY)=>{let s=($)=>{let r=w-$,E=()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))};if(f.socket)f.socket.setTimeout(r,E),f.on("close",()=>f.socket?.removeListener("timeout",E));else f.setTimeout(r,E)};if(0<w&&w<6000)return s(0),0;return a0.setTimeout(s.bind(null,w===0?0:iY),iY)};var gY=B(()=>{h3();Ws()});import{Readable as g_}from"node:stream";async function w3(f,h,w=_Y){let s=h.headers??{},$=s.Expect||s.expect,r=-1,E=!0;if($==="100-continue")E=await Promise.race([new Promise((U)=>{r=Number(a0.setTimeout(()=>U(!0),Math.max(_Y,w)))}),new Promise((U)=>{f.on("continue",()=>{a0.clearTimeout(r),U(!0)}),f.on("response",()=>{a0.clearTimeout(r),U(!1)}),f.on("error",()=>{a0.clearTimeout(r),U(!1)})})]);if(E)x_(f,h.body)}function x_(f,h){if(h instanceof g_){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}var _Y=6000;var s3=B(()=>{Ws()});import{Agent as nY,request as __}from"node:http";import{Agent as eY,request as n_}from"node:https";class Ef{static create(f){if(typeof f?.handle==="function")return f;return new Ef(f)}static checkSocketUsage(f,h,w=console){let{sockets:s,requests:$,maxSockets:r}=f;if(typeof r!=="number"||r===1/0)return h;let E=15000;if(Date.now()-E<h)return h;if(s&&$)for(let U in s){let T=s[U]?.length??0,F=$[U]?.length??0;if(T>=r&&F>=2*r)return w?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${T} and ${F} additional requests are enqueued.
44
44
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
45
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return h}constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((h,w)=>{if(typeof f==="function")f().then((s)=>{h(this.resolveDefaultConfig(s))}).catch(w);else h(this.resolveDefaultConfig(f))})}resolveDefaultConfig(f){let{requestTimeout:h,connectionTimeout:w,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:r,httpsAgent:E}=f||{},U=!0,T=50;return{connectionTimeout:w,requestTimeout:h??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(r instanceof nY||typeof r?.destroy==="function")return r;return new nY({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(E instanceof eY||typeof E?.destroy==="function")return E;return new eY({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(f,{abortSignal:h}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,s)=>{let $=void 0,r=[],E=async(N)=>{await $,r.forEach(a0.clearTimeout),w(N)},U=async(N)=>{await $,r.forEach(a0.clearTimeout),s(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(h?.aborted){let N=new Error("Request aborted");N.name="AbortError",U(N);return}let T=f.protocol==="https:",F=T?this.config.httpsAgent:this.config.httpAgent;r.push(a0.setTimeout(()=>{this.socketWarningTimestamp=rf.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let C=oF(f.query||{}),I=void 0;if(f.username!=null||f.password!=null){let N=f.username??"",y=f.password??"";I=`${N}:${y}`}let L=f.path;if(C)L+=`?${C}`;if(f.fragment)L+=`#${f.fragment}`;let W=f.hostname??"";if(W[0]==="["&&W.endsWith("]"))W=f.hostname.slice(1,-1);else W=f.hostname;let X={headers:f.headers,host:W,method:f.method,path:L,port:f.port,agent:F,auth:I},M=(T?a_:e_)(X,(N)=>{let y=new xh({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:tF(N.headers),body:N});E({response:y})});if(M.on("error",(N)=>{if(jY.includes(N.code))U(Object.assign(N,{name:"TimeoutError"}));else U(N)}),h){let N=()=>{M.destroy();let y=new Error("Request aborted");y.name="AbortError",U(y)};if(typeof h.addEventListener==="function"){let y=h;y.addEventListener("abort",N,{once:!0}),M.once("close",()=>y.removeEventListener("abort",N))}else h.onabort=N}r.push(vY(M,U,this.config.connectionTimeout)),r.push(cY(M,U,this.config.requestTimeout));let q=X.agent;if(typeof q==="object"&&"keepAlive"in q)r.push(mY(M,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs}));$=w3(M,f,this.config.requestTimeout).catch((N)=>{return r.forEach(a0.clearTimeout),s(N)})})}updateHttpClientConfig(f,h){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:h}})}httpHandlerConfigs(){return this.config??{}}}var xY=0;var h3=B(()=>{C1();uF();OY();f3();bY();dY();gY();As();s3()});var aY=()=>{};var pY=B(()=>{aY()});var oY=B(()=>{C1();uF();f3();pY();s3()});import{Writable as p_}from"node:stream";var $3;var uY=B(()=>{$3=class $3 extends p_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,h,w){this.bufferedBytes.push(f),w()}}});async function u_(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}var zs=(f)=>{if(o_(f))return u_(f);return new Promise((h,w)=>{let s=new $3;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},o_=(f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream;var tY=B(()=>{uY()});var wr=B(()=>{h3();oY();tY()});var t_="169.254.170.2",fn="169.254.170.23",hn="[fd00:ec2::23]",f9=(f,h)=>{if(f.protocol==="https:")return;if(f.hostname===t_||f.hostname===fn||f.hostname===hn)return;if(f.hostname.includes("[")){if(f.hostname==="[::1]"||f.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(f.hostname==="localhost")return;let w=f.hostname.split("."),s=($)=>{let r=parseInt($,10);return 0<=r&&r<=255};if(w[0]==="127"&&s(w[1])&&s(w[2])&&s(w[3])&&w.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
45
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return h}constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((h,w)=>{if(typeof f==="function")f().then((s)=>{h(this.resolveDefaultConfig(s))}).catch(w);else h(this.resolveDefaultConfig(f))})}resolveDefaultConfig(f){let{requestTimeout:h,connectionTimeout:w,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:r,httpsAgent:E}=f||{},U=!0,T=50;return{connectionTimeout:w,requestTimeout:h??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(r instanceof nY||typeof r?.destroy==="function")return r;return new nY({keepAlive:!0,maxSockets:50,...r})})(),httpsAgent:(()=>{if(E instanceof eY||typeof E?.destroy==="function")return E;return new eY({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(f,{abortSignal:h}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,s)=>{let $=void 0,r=[],E=async(N)=>{await $,r.forEach(a0.clearTimeout),w(N)},U=async(N)=>{await $,r.forEach(a0.clearTimeout),s(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(h?.aborted){let N=new Error("Request aborted");N.name="AbortError",U(N);return}let T=f.protocol==="https:",F=T?this.config.httpsAgent:this.config.httpAgent;r.push(a0.setTimeout(()=>{this.socketWarningTimestamp=Ef.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let C=oF(f.query||{}),I=void 0;if(f.username!=null||f.password!=null){let N=f.username??"",y=f.password??"";I=`${N}:${y}`}let L=f.path;if(C)L+=`?${C}`;if(f.fragment)L+=`#${f.fragment}`;let W=f.hostname??"";if(W[0]==="["&&W.endsWith("]"))W=f.hostname.slice(1,-1);else W=f.hostname;let X={headers:f.headers,host:W,method:f.method,path:L,port:f.port,agent:F,auth:I},M=(T?n_:__)(X,(N)=>{let y=new xh({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:tF(N.headers),body:N});E({response:y})});if(M.on("error",(N)=>{if(jY.includes(N.code))U(Object.assign(N,{name:"TimeoutError"}));else U(N)}),h){let N=()=>{M.destroy();let y=new Error("Request aborted");y.name="AbortError",U(y)};if(typeof h.addEventListener==="function"){let y=h;y.addEventListener("abort",N,{once:!0}),M.once("close",()=>y.removeEventListener("abort",N))}else h.onabort=N}r.push(vY(M,U,this.config.connectionTimeout)),r.push(cY(M,U,this.config.requestTimeout));let q=X.agent;if(typeof q==="object"&&"keepAlive"in q)r.push(mY(M,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs}));$=w3(M,f,this.config.requestTimeout).catch((N)=>{return r.forEach(a0.clearTimeout),s(N)})})}updateHttpClientConfig(f,h){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:h}})}httpHandlerConfigs(){return this.config??{}}}var xY=0;var h3=B(()=>{C1();uF();OY();f3();bY();dY();gY();Ws();s3()});var aY=()=>{};var pY=B(()=>{aY()});var oY=B(()=>{C1();uF();f3();pY();s3()});import{Writable as e_}from"node:stream";var $3;var uY=B(()=>{$3=class $3 extends e_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,h,w){this.bufferedBytes.push(f),w()}}});async function p_(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:U,value:T}=await w.read();if(T)h.push(T),$+=T.length;s=U}let r=new Uint8Array($),E=0;for(let U of h)r.set(U,E),E+=U.length;return r}var zs=(f)=>{if(a_(f))return p_(f);return new Promise((h,w)=>{let s=new $3;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},a_=(f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream;var tY=B(()=>{uY()});var p$=B(()=>{h3();oY();tY()});var o_="169.254.170.2",u_="169.254.170.23",t_="[fd00:ec2::23]",f9=(f,h)=>{if(f.protocol==="https:")return;if(f.hostname===o_||f.hostname===u_||f.hostname===t_)return;if(f.hostname.includes("[")){if(f.hostname==="[::1]"||f.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(f.hostname==="localhost")return;let w=f.hostname.split("."),s=($)=>{let r=parseInt($,10);return 0<=r&&r<=255};if(w[0]==="127"&&s(w[1])&&s(w[2])&&s(w[3])&&w.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
46
46
  - loopback CIDR 127.0.0.0/8 or [::1/128]
47
47
  - ECS container host 169.254.170.2
48
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:h})};var h9=B(()=>{Y0()});function s9(f){return new n0({protocol:f.protocol,hostname:f.hostname,port:Number(f.port),path:f.pathname,query:Array.from(f.searchParams.entries()).reduce((h,[w,s])=>{return h[w]=s,h},{}),fragment:f.hash})}async function $9(f,h){let s=await w9.sdkStreamMixin(f.body).transformToString();if(f.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:h});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:dS($.Expiration)}}if(f.statusCode>=400&&f.statusCode<500){let $={};try{$=JSON.parse(s)}catch(r){}throw Object.assign(new a(`Server responded with status: ${f.statusCode}`,{logger:h}),{Code:$.Code,Message:$.Message})}throw new a(`Server responded with status: ${f.statusCode}`,{logger:h})}var w9;var r9=B(()=>{Y0();C1();J();w9=o(sT(),1)});var E9=(f,h,w)=>{return async()=>{for(let s=0;s<h;++s)try{return await f()}catch($){await new Promise((r)=>setTimeout(r,w))}return await f()}};import wn from"node:fs/promises";var U9,sn="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",$n="http://169.254.170.2",rn="AWS_CONTAINER_CREDENTIALS_FULL_URI",En="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Un="AWS_CONTAINER_AUTHORIZATION_TOKEN",T9=(f={})=>{f.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let h,w=f.awsContainerCredentialsRelativeUri??process.env[sn],s=f.awsContainerCredentialsFullUri??process.env[rn],$=f.awsContainerAuthorizationToken??process.env[Un],r=f.awsContainerAuthorizationTokenFile??process.env[En],E=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console.warn:f.logger.warn;if(w&&s)E("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),E("awsContainerCredentialsFullUri will take precedence.");if($&&r)E("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),E("awsContainerAuthorizationToken will take precedence.");if(s)h=s;else if(w)h=`${$n}${w}`;else throw new a(`No HTTP credential provider host provided.
49
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:f.logger});let U=new URL(h);f9(U,f.logger);let T=new rf({requestTimeout:f.timeout??1000,connectionTimeout:f.timeout??1000});return E9(async()=>{let F=s9(U);if($)F.headers.Authorization=$;else if(r)F.headers.Authorization=(await wn.readFile(r)).toString();try{let C=await T.handle(F);return $9(C.response).then((I)=>U9.setCredentialFeature(I,"CREDENTIALS_HTTP","z"))}catch(C){throw new a(String(C),{logger:f.logger})}},f.maxRetries??3,f.timeout??1000)};var F9=B(()=>{U9=o(I1(),1);wr();Y0();h9();r9()});var r3={};Ch(r3,{fromHttp:()=>T9});var E3=B(()=>{F9()});var U3=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var L9=300000,Rs="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var T3=H((aG0,z9)=>{var{defineProperty:k5,getOwnPropertyDescriptor:Tn,getOwnPropertyNames:Fn}=Object,Cn=Object.prototype.hasOwnProperty,q5=(f,h)=>k5(f,"name",{value:h,configurable:!0}),In=(f,h)=>{for(var w in h)k5(f,w,{get:h[w],enumerable:!0})},Ln=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Fn(h))if(!Cn.call(f,$)&&$!==w)k5(f,$,{get:()=>h[$],enumerable:!(s=Tn(h,$))||s.enumerable})}return f},Bn=(f)=>Ln(k5({},"__esModule",{value:!0}),f),B9={};In(B9,{getHostHeaderPlugin:()=>Wn,hostHeaderMiddleware:()=>W9,hostHeaderMiddlewareOptions:()=>A9,resolveHostHeaderConfig:()=>G9});z9.exports=Bn(B9);var Gn=t0();function G9(f){return f}q5(G9,"resolveHostHeaderConfig");var W9=q5((f)=>(h)=>async(w)=>{if(!Gn.HttpRequest.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},"hostHeaderMiddleware"),A9={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Wn=q5((f)=>({applyToStack:q5((h)=>{h.add(W9(f),A9)},"applyToStack")}),"getHostHeaderPlugin")});var C3=H((pG0,Y9)=>{var{defineProperty:y5,getOwnPropertyDescriptor:An,getOwnPropertyNames:zn}=Object,Rn=Object.prototype.hasOwnProperty,F3=(f,h)=>y5(f,"name",{value:h,configurable:!0}),Xn=(f,h)=>{for(var w in h)y5(f,w,{get:h[w],enumerable:!0})},Sn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zn(h))if(!Rn.call(f,$)&&$!==w)y5(f,$,{get:()=>h[$],enumerable:!(s=An(h,$))||s.enumerable})}return f},Yn=(f)=>Sn(y5({},"__esModule",{value:!0}),f),R9={};Xn(R9,{getLoggerPlugin:()=>Mn,loggerMiddleware:()=>X9,loggerMiddlewareOptions:()=>S9});Y9.exports=Yn(R9);var X9=F3(()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...W}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(W),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),S9={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Mn=F3((f)=>({applyToStack:F3((h)=>{h.add(X9(),S9)},"applyToStack")}),"getLoggerPlugin")});var L3=H((oG0,Z9)=>{var{defineProperty:O5,getOwnPropertyDescriptor:Qn,getOwnPropertyNames:Kn}=Object,Zn=Object.prototype.hasOwnProperty,j5=(f,h)=>O5(f,"name",{value:h,configurable:!0}),Jn=(f,h)=>{for(var w in h)O5(f,w,{get:h[w],enumerable:!0})},Vn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Kn(h))if(!Zn.call(f,$)&&$!==w)O5(f,$,{get:()=>h[$],enumerable:!(s=Qn(h,$))||s.enumerable})}return f},Pn=(f)=>Vn(O5({},"__esModule",{value:!0}),f),M9={};Jn(M9,{addRecursionDetectionMiddlewareOptions:()=>K9,getRecursionDetectionPlugin:()=>qn,recursionDetectionMiddleware:()=>Q9});Z9.exports=Pn(M9);var Hn=t0(),I3="X-Amzn-Trace-Id",Nn="AWS_LAMBDA_FUNCTION_NAME",Dn="_X_AMZN_TRACE_ID",Q9=j5((f)=>(h)=>async(w)=>{let{request:s}=w;if(!Hn.HttpRequest.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===I3.toLowerCase())??I3;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[Nn],E=process.env[Dn],U=j5((T)=>typeof T==="string"&&T.length>0,"nonEmptyString");if(U(r)&&U(E))s.headers[I3]=E;return h({...w,request:s})},"recursionDetectionMiddleware"),K9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qn=j5((f)=>({applyToStack:j5((h)=>{h.add(Q9(f),K9)},"applyToStack")}),"getRecursionDetectionPlugin")});var b5=H((uG0,y9)=>{var{defineProperty:l5,getOwnPropertyDescriptor:kn,getOwnPropertyNames:yn}=Object,jn=Object.prototype.hasOwnProperty,Q0=(f,h)=>l5(f,"name",{value:h,configurable:!0}),On=(f,h)=>{for(var w in h)l5(f,w,{get:h[w],enumerable:!0})},ln=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yn(h))if(!jn.call(f,$)&&$!==w)l5(f,$,{get:()=>h[$],enumerable:!(s=kn(h,$))||s.enumerable})}return f},vn=(f)=>ln(l5({},"__esModule",{value:!0}),f),J9={};On(J9,{EndpointCache:()=>bn,EndpointError:()=>M1,customEndpointFunctions:()=>G3,isIpAddress:()=>V9,isValidHostLabel:()=>A3,resolveEndpoint:()=>re});y9.exports=vn(J9);var bn=class{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}static{Q0(this,"EndpointCache")}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}},mn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),V9=Q0((f)=>mn.test(f)||f.startsWith("[")&&f.endsWith("]"),"isIpAddress"),dn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),A3=Q0((f,h=!1)=>{if(!h)return dn.test(f);let w=f.split(".");for(let s of w)if(!A3(s))return!1;return!0},"isValidHostLabel"),G3={},sr="endpoints";function ef(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${ef(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(ef).join(", ")})`;return JSON.stringify(f,null,2)}Q0(ef,"toDebugString");var M1=class extends Error{static{Q0(this,"EndpointError")}constructor(f){super(f);this.name="EndpointError"}},cn=Q0((f,h)=>f===h,"booleanEquals"),gn=Q0((f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new M1(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new M1(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w},"getAttrPathList"),P9=Q0((f,h)=>gn(h).reduce((w,s)=>{if(typeof w!=="object")throw new M1(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f),"getAttr"),xn=Q0((f)=>f!=null,"isSet"),_n=Q0((f)=>!f,"not"),W3=F1(),B3={[W3.EndpointURLScheme.HTTP]:80,[W3.EndpointURLScheme.HTTPS]:443},nn=Q0((f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:W,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${W?`:${W}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(W3.EndpointURLScheme).includes(T))return null;let F=V9($),C=w.includes(`${s}:${B3[T]}`)||typeof f==="string"&&f.includes(`${s}:${B3[T]}`),I=`${s}${C?`:${B3[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}},"parseURL"),en=Q0((f,h)=>f===h,"stringEquals"),an=Q0((f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)},"substring"),pn=Q0((f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),on={booleanEquals:cn,getAttr:P9,isSet:xn,isValidHostLabel:A3,not:_n,parseURL:nn,stringEquals:en,substring:an,uriEncode:pn},H9=Q0((f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(P9(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")},"evaluateTemplate"),un=Q0(({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]},"getReferenceValue"),v5=Q0((f,h,w)=>{if(typeof f==="string")return H9(f,w);else if(f.fn)return N9(f,w);else if(f.ref)return un(f,w);throw new M1(`'${h}': ${String(f)} is not a string, function or reference.`)},"evaluateExpression"),N9=Q0(({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:v5(r,"arg",w)),$=f.split(".");if($[0]in G3&&$[1]!=null)return G3[$[0]][$[1]](...s);return on[f](...s)},"callFunction"),tn=Q0(({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new M1(`'${f}' is already defined in Reference Record.`);let s=N9(h,w);return w.logger?.debug?.(`${sr} evaluateCondition: ${ef(h)} = ${ef(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}},"evaluateCondition"),z3=Q0((f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=tn(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${sr} assign: ${r.name} := ${ef(r.value)}`)}return{result:!0,referenceRecord:w}},"evaluateConditions"),fe=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=v5(r,"Header value entry",h);if(typeof E!=="string")throw new M1(`Header '${s}' value '${E}' is not a string`);return E})}),{}),"getEndpointHeaders"),D9=Q0((f,h)=>{if(Array.isArray(f))return f.map((w)=>D9(w,h));switch(typeof f){case"string":return H9(f,h);case"object":if(f===null)throw new M1(`Unexpected endpoint property: ${f}`);return q9(f,h);case"boolean":return f;default:throw new M1(`Unexpected endpoint property type: ${typeof f}`)}},"getEndpointProperty"),q9=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:D9($,h)}),{}),"getEndpointProperties"),he=Q0((f,h)=>{let w=v5(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new M1(`Endpoint URL must be a string, got ${typeof w}`)},"getEndpointUrl"),we=Q0((f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=z3(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${sr} Resolving endpoint from template: ${ef(s)}`),{...F!=null&&{headers:fe(F,E)},...T!=null&&{properties:q9(T,E)},url:he(U,E)}},"evaluateEndpointRule"),se=Q0((f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=z3(w,h);if(!$)return;throw new M1(v5(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))},"evaluateErrorRule"),$e=Q0((f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=z3(w,h);if(!$)return;return k9(s,{...h,referenceRecord:{...h.referenceRecord,...r}})},"evaluateTreeRule"),k9=Q0((f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=we(w,h);if(s)return s}else if(w.type==="error")se(w,h);else if(w.type==="tree"){let s=$e(w,h);if(s)return s}else throw new M1(`Unknown endpoint rule: ${w}`);throw new M1("Rules evaluation failed")},"evaluateRules"),re=Q0((f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${sr} Initial EndpointParams: ${ef(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new M1(`Missing required parameter: '${F}'`);let T=k9(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${sr} Resolved endpoint: ${ef(T)}`),T},"resolveEndpoint")});var d5=H((hW0,g9)=>{var{defineProperty:m5,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:Ue}=Object,Te=Object.prototype.hasOwnProperty,Xs=(f,h)=>m5(f,"name",{value:h,configurable:!0}),Fe=(f,h)=>{for(var w in h)m5(f,w,{get:h[w],enumerable:!0})},Ce=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ue(h))if(!Te.call(f,$)&&$!==w)m5(f,$,{get:()=>h[$],enumerable:!(s=Ee(h,$))||s.enumerable})}return f},Ie=(f)=>Ce(m5({},"__esModule",{value:!0}),f),O9={};Fe(O9,{ConditionObject:()=>V0.ConditionObject,DeprecatedObject:()=>V0.DeprecatedObject,EndpointError:()=>V0.EndpointError,EndpointObject:()=>V0.EndpointObject,EndpointObjectHeaders:()=>V0.EndpointObjectHeaders,EndpointObjectProperties:()=>V0.EndpointObjectProperties,EndpointParams:()=>V0.EndpointParams,EndpointResolverOptions:()=>V0.EndpointResolverOptions,EndpointRuleObject:()=>V0.EndpointRuleObject,ErrorRuleObject:()=>V0.ErrorRuleObject,EvaluateOptions:()=>V0.EvaluateOptions,Expression:()=>V0.Expression,FunctionArgv:()=>V0.FunctionArgv,FunctionObject:()=>V0.FunctionObject,FunctionReturn:()=>V0.FunctionReturn,ParameterObject:()=>V0.ParameterObject,ReferenceObject:()=>V0.ReferenceObject,ReferenceRecord:()=>V0.ReferenceRecord,RuleSetObject:()=>V0.RuleSetObject,RuleSetRules:()=>V0.RuleSetRules,TreeRuleObject:()=>V0.TreeRuleObject,awsEndpointFunctions:()=>c9,getUserAgentPrefix:()=>We,isIpAddress:()=>V0.isIpAddress,partition:()=>d9,resolveEndpoint:()=>V0.resolveEndpoint,setPartitionInfo:()=>i9,useDefaultPartitionInfo:()=>Ge});g9.exports=Ie(O9);var V0=b5(),l9=Xs((f,h=!1)=>{if(h){for(let w of f.split("."))if(!l9(w))return!1;return!0}if(!V0.isValidHostLabel(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(V0.isIpAddress(f))return!1;return!0},"isVirtualHostableS3Bucket"),j9=":",Le="/",Be=Xs((f)=>{let h=f.split(j9);if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(j9)==="")return null;let T=U.map((F)=>F.split(Le)).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}},"parseArn"),v9={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},b9=v9,m9="",d9=Xs((f)=>{let{partitions:h}=b9;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},"partition"),i9=Xs((f,h="")=>{b9=f,m9=h},"setPartitionInfo"),Ge=Xs(()=>{i9(v9,"")},"useDefaultPartitionInfo"),We=Xs(()=>m9,"getUserAgentPrefix"),c9={isVirtualHostableS3Bucket:l9,parseArn:Be,partition:d9};V0.customEndpointFunctions.aws=c9});var g5=H((wW0,wM)=>{var{defineProperty:c5,getOwnPropertyDescriptor:Ae,getOwnPropertyNames:ze}=Object,Re=Object.prototype.hasOwnProperty,af=(f,h)=>c5(f,"name",{value:h,configurable:!0}),Xe=(f,h)=>{for(var w in h)c5(f,w,{get:h[w],enumerable:!0})},Se=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ze(h))if(!Re.call(f,$)&&$!==w)c5(f,$,{get:()=>h[$],enumerable:!(s=Ae(h,$))||s.enumerable})}return f},Ye=(f)=>Se(c5({},"__esModule",{value:!0}),f),e9={};Xe(e9,{DEFAULT_UA_APP_ID:()=>a9,getUserAgentMiddlewareOptions:()=>hM,getUserAgentPlugin:()=>He,resolveUserAgentConfig:()=>o9,userAgentMiddleware:()=>fM});wM.exports=Ye(e9);var Me=m0(),a9=void 0;function p9(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}af(p9,"isValidUserAgentAppId");function o9(f){let h=Me.normalizeProvider(f.userAgentAppId??a9),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:af(async()=>{let s=await h();if(!p9(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s},"userAgentAppId")})}af(o9,"resolveUserAgentConfig");var Qe=d5(),Ke=t0(),Kf=O0(),Ze=/\d{12}\.ddb/;async function u9(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Kf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))Kf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else Kf.setFeature(f,"RETRY_MODE_STANDARD","E");else Kf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(Ze))Kf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":Kf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Kf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Kf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)Kf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))Kf.setFeature(f,E,U)}}af(u9,"checkFeatures");var x9="user-agent",R3="x-amz-user-agent",_9=" ",X3="/",Je=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ve=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,n9="-",Pe=1024;function t9(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=Pe){if(h.length)h+=","+s;else h+=s;continue}break}return h}af(t9,"encodeFeatures");var fM=af((f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!Ke.HttpRequest.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(i5)||[],U=(await f.defaultUserAgentProvider()).map(i5);await u9(w,f,s);let T=w;U.push(`m/${t9(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(i5)||[],C=await f.userAgentAppId();if(C)U.push(i5([`app/${C}`]));let I=Qe.getUserAgentPrefix(),L=(I?[I]:[]).concat([...U,...E,...F]).join(_9),W=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(_9);if(f.runtime!=="browser"){if(W)r[R3]=r[R3]?`${r[x9]} ${W}`:W;r[x9]=L}else r[R3]=L;return h({...s,request:$})},"userAgentMiddleware"),i5=af((f)=>{let h=f[0].split(X3).map((E)=>E.replace(Je,n9)).join(X3),w=f[1]?.replace(Ve,n9),s=h.indexOf(X3),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},"escapeUserAgent"),hM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},He=af((f)=>({applyToStack:af((h)=>{h.add(fM(f),hM)},"applyToStack")}),"getUserAgentPlugin")});var UM=H((sW0,EM)=>{var{defineProperty:x5,getOwnPropertyDescriptor:Ne,getOwnPropertyNames:De}=Object,qe=Object.prototype.hasOwnProperty,sM=(f,h)=>x5(f,"name",{value:h,configurable:!0}),ke=(f,h)=>{for(var w in h)x5(f,w,{get:h[w],enumerable:!0})},ye=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of De(h))if(!qe.call(f,$)&&$!==w)x5(f,$,{get:()=>h[$],enumerable:!(s=Ne(h,$))||s.enumerable})}return f},je=(f)=>ye(x5({},"__esModule",{value:!0}),f),$M={};ke($M,{SelectorType:()=>rM,booleanSelector:()=>Oe,numberSelector:()=>le});EM.exports=je($M);var Oe=sM((f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)},"booleanSelector"),le=sM((f,h,w)=>{if(!(h in f))return;let s=parseInt(f[h],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${w} '${h}'. Expected number, got '${f[h]}'.`);return s},"numberSelector"),rM=((f)=>{return f.ENV="env",f.CONFIG="shared config entry",f})(rM||{})});var Ss=H(($W0,RM)=>{var{defineProperty:n5,getOwnPropertyDescriptor:ve,getOwnPropertyNames:be}=Object,me=Object.prototype.hasOwnProperty,Ef=(f,h)=>n5(f,"name",{value:h,configurable:!0}),de=(f,h)=>{for(var w in h)n5(f,w,{get:h[w],enumerable:!0})},ie=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of be(h))if(!me.call(f,$)&&$!==w)n5(f,$,{get:()=>h[$],enumerable:!(s=ve(h,$))||s.enumerable})}return f},ce=(f)=>ie(n5({},"__esModule",{value:!0}),f),CM={};de(CM,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>LM,CONFIG_USE_FIPS_ENDPOINT:()=>GM,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>ge,DEFAULT_USE_FIPS_ENDPOINT:()=>_e,ENV_USE_DUALSTACK_ENDPOINT:()=>IM,ENV_USE_FIPS_ENDPOINT:()=>BM,NODE_REGION_CONFIG_FILE_OPTIONS:()=>ue,NODE_REGION_CONFIG_OPTIONS:()=>oe,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>xe,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>ne,REGION_ENV_NAME:()=>WM,REGION_INI_NAME:()=>AM,getRegionInfo:()=>sa,resolveCustomEndpointsConfig:()=>ee,resolveEndpointsConfig:()=>pe,resolveRegionConfig:()=>te});RM.exports=ce(CM);var qh=UM(),IM="AWS_USE_DUALSTACK_ENDPOINT",LM="use_dualstack_endpoint",ge=!1,xe={environmentVariableSelector:(f)=>qh.booleanSelector(f,IM,qh.SelectorType.ENV),configFileSelector:(f)=>qh.booleanSelector(f,LM,qh.SelectorType.CONFIG),default:!1},BM="AWS_USE_FIPS_ENDPOINT",GM="use_fips_endpoint",_e=!1,ne={environmentVariableSelector:(f)=>qh.booleanSelector(f,BM,qh.SelectorType.ENV),configFileSelector:(f)=>qh.booleanSelector(f,GM,qh.SelectorType.CONFIG),default:!1},_5=Ih(),ee=Ef((f)=>{let{tls:h,endpoint:w,urlParser:s,useDualstackEndpoint:$}=f;return Object.assign(f,{tls:h??!0,endpoint:_5.normalizeProvider(typeof w==="string"?s(w):w),isCustomEndpoint:!0,useDualstackEndpoint:_5.normalizeProvider($??!1)})},"resolveCustomEndpointsConfig"),ae=Ef(async(f)=>{let{tls:h=!0}=f,w=await f.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(w))throw new Error("Invalid region in client config");let $=await f.useDualstackEndpoint(),r=await f.useFipsEndpoint(),{hostname:E}=await f.regionInfoProvider(w,{useDualstackEndpoint:$,useFipsEndpoint:r})??{};if(!E)throw new Error("Cannot resolve hostname from client config");return f.urlParser(`${h?"https:":"http:"}//${E}`)},"getEndpointFromRegion"),pe=Ef((f)=>{let h=_5.normalizeProvider(f.useDualstackEndpoint??!1),{endpoint:w,useFipsEndpoint:s,urlParser:$,tls:r}=f;return Object.assign(f,{tls:r??!0,endpoint:w?_5.normalizeProvider(typeof w==="string"?$(w):w):()=>ae({...f,useDualstackEndpoint:h,useFipsEndpoint:s}),isCustomEndpoint:!!w,useDualstackEndpoint:h})},"resolveEndpointsConfig"),WM="AWS_REGION",AM="region",oe={environmentVariableSelector:(f)=>f[WM],configFileSelector:(f)=>f[AM],default:()=>{throw new Error("Region is missing")}},ue={preferredFile:"credentials"},zM=Ef((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),TM=Ef((f)=>zM(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),te=Ef((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return TM(h);let s=await h();return TM(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(zM(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})},"resolveRegionConfig"),FM=Ef((f=[],{useFipsEndpoint:h,useDualstackEndpoint:w})=>f.find(({tags:s})=>h===s.includes("fips")&&w===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),fa=Ef((f,{regionHostname:h,partitionHostname:w})=>h?h:w?w.replace("{region}",f):void 0,"getResolvedHostname"),ha=Ef((f,{partitionHash:h})=>Object.keys(h||{}).find((w)=>h[w].regions.includes(f))??"aws","getResolvedPartition"),wa=Ef((f,{signingRegion:h,regionRegex:w,useFipsEndpoint:s})=>{if(h)return h;else if(s){let $=w.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=f.match($);if(r)return r[0].slice(1,-1)}},"getResolvedSigningRegion"),sa=Ef((f,{useFipsEndpoint:h=!1,useDualstackEndpoint:w=!1,signingService:s,regionHash:$,partitionHash:r})=>{let E=ha(f,{partitionHash:r}),U=f in $?f:r[E]?.endpoint??f,T={useFipsEndpoint:h,useDualstackEndpoint:w},F=FM($[U]?.variants,T),C=FM(r[E]?.variants,T),I=fa(U,{regionHostname:F,partitionHostname:C});if(I===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:U,useFipsEndpoint:h,useDualstackEndpoint:w}}`);let L=wa(I,{signingRegion:$[U]?.signingRegion,regionRegex:r[E].regionRegex,useFipsEndpoint:h});return{partition:E,signingService:s,hostname:I,...L&&{signingRegion:L},...$[U]?.signingService&&{signingService:$[U].signingService}}},"getRegionInfo")});var Y3=H((rW0,QM)=>{var{defineProperty:e5,getOwnPropertyDescriptor:$a,getOwnPropertyNames:ra}=Object,Ea=Object.prototype.hasOwnProperty,SM=(f,h)=>e5(f,"name",{value:h,configurable:!0}),Ua=(f,h)=>{for(var w in h)e5(f,w,{get:h[w],enumerable:!0})},Ta=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ra(h))if(!Ea.call(f,$)&&$!==w)e5(f,$,{get:()=>h[$],enumerable:!(s=$a(h,$))||s.enumerable})}return f},Fa=(f)=>Ta(e5({},"__esModule",{value:!0}),f),YM={};Ua(YM,{contentLengthMiddleware:()=>S3,contentLengthMiddlewareOptions:()=>MM,getContentLengthPlugin:()=>Ia});QM.exports=Fa(YM);var Ca=t0(),XM="content-length";function S3(f){return(h)=>async(w)=>{let s=w.request;if(Ca.HttpRequest.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(XM)===-1)try{let E=f($);s.headers={...s.headers,[XM]:String(E)}}catch(E){}}return h({...w,request:s})}}SM(S3,"contentLengthMiddleware");var MM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Ia=SM((f)=>({applyToStack:(h)=>{h.add(S3(f.bodyLengthChecker),MM)}}),"getContentLengthPlugin")});var Ys=H((KM)=>{Object.defineProperty(KM,"__esModule",{value:!0});KM.getHomeDir=void 0;var La=B0("node:os"),Ba=B0("node:path"),M3={},Ga=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Wa=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Ba.sep}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Ga();if(!M3[$])M3[$]=La.homedir();return M3[$]};KM.getHomeDir=Wa});var Q3=H((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.getSSOTokenFilepath=void 0;var Aa=B0("node:crypto"),za=B0("node:path"),Ra=Ys(),Xa=(f)=>{let w=Aa.createHash("sha1").update(f).digest("hex");return za.join(Ra.getHomeDir(),".aws","sso","cache",`${w}.json`)};JM.getSSOTokenFilepath=Xa});var NM=H((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.getSSOTokenFromFile=void 0;var Sa=B0("node:fs"),Ya=Q3(),{readFile:Ma}=Sa.promises,Qa=async(f)=>{let h=Ya.getSSOTokenFilepath(f),w=await Ma(h,"utf8");return JSON.parse(w)};PM.getSSOTokenFromFile=Qa});var Z3=H((DM)=>{Object.defineProperty(DM,"__esModule",{value:!0});DM.slurpFile=void 0;var Ka=B0("node:fs"),{readFile:Za}=Ka.promises,K3={},Ja=(f,h)=>{if(!K3[f]||(h===null||h===void 0?void 0:h.ignoreCache))K3[f]=Za(f,"utf8");return K3[f]};DM.slurpFile=Ja});var H3=H((CW0,rr)=>{var{defineProperty:o5,getOwnPropertyDescriptor:Va,getOwnPropertyNames:Pa}=Object,Ha=Object.prototype.hasOwnProperty,v1=(f,h)=>o5(f,"name",{value:h,configurable:!0}),Na=(f,h)=>{for(var w in h)o5(f,w,{get:h[w],enumerable:!0})},J3=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Pa(h))if(!Ha.call(f,$)&&$!==w)o5(f,$,{get:()=>h[$],enumerable:!(s=Va(h,$))||s.enumerable})}return f},P3=(f,h,w)=>(J3(f,h,"default"),w&&J3(w,h,"default")),Da=(f)=>J3(o5({},"__esModule",{value:!0}),f),$r={};Na($r,{CONFIG_PREFIX_SEPARATOR:()=>Tw,DEFAULT_PROFILE:()=>OM,ENV_PROFILE:()=>jM,getProfileName:()=>qa,loadSharedConfigFiles:()=>vM,loadSsoSessionData:()=>xa,parseKnownFiles:()=>na});rr.exports=Da($r);P3($r,Ys(),rr.exports);var jM="AWS_PROFILE",OM="default",qa=v1((f)=>f.profile||process.env[jM]||OM,"getProfileName");P3($r,Q3(),rr.exports);P3($r,NM(),rr.exports);var a5=F1(),ka=v1((f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(Tw);if(w===-1)return!1;return Object.values(a5.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(Tw),r=w.substring(0,$)===a5.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}}),"getConfigData"),p5=B0("node:path"),ya=Ys(),ja="AWS_CONFIG_FILE",lM=v1(()=>process.env[ja]||p5.join(ya.getHomeDir(),".aws","config"),"getConfigFilepath"),Oa=Ys(),la="AWS_SHARED_CREDENTIALS_FILE",va=v1(()=>process.env[la]||p5.join(Oa.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ba=Ys(),ma=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,da=["__proto__","profile __proto__"],V3=v1((f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=ma.exec(U);if(T){let[,F,,C]=T;if(Object.values(a5.IniSectionType).includes(F))w=[F,C].join(Tw)}else w=U;if(da.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(Tw):T;h[w][C]=F}}}}return h},"parseIni"),kM=Z3(),yM=v1(()=>({}),"swallowError"),Tw=".",vM=v1(async(f={})=>{let{filepath:h=va(),configFilepath:w=lM()}=f,s=ba.getHomeDir(),$="~/",r=h;if(h.startsWith("~/"))r=p5.join(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=p5.join(s,w.slice(2));let U=await Promise.all([kM.slurpFile(E,{ignoreCache:f.ignoreCache}).then(V3).then(ka).catch(yM),kM.slurpFile(r,{ignoreCache:f.ignoreCache}).then(V3).catch(yM)]);return{configFile:U[0],credentialsFile:U[1]}},"loadSharedConfigFiles"),ia=v1((f)=>Object.entries(f).filter(([h])=>h.startsWith(a5.IniSectionType.SSO_SESSION+Tw)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(Tw)+1)]:s}),{}),"getSsoSessionData"),ca=Z3(),ga=v1(()=>({}),"swallowError"),xa=v1(async(f={})=>ca.slurpFile(f.configFilepath??lM()).then(V3).then(ia).catch(ga),"loadSsoSessionData"),_a=v1((...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h},"mergeConfigFiles"),na=v1(async(f)=>{let h=await vM(f);return _a(h.configFile,h.credentialsFile)},"parseKnownFiles")});var Qs=H((IW0,dM)=>{var{defineProperty:u5,getOwnPropertyDescriptor:ea,getOwnPropertyNames:aa}=Object,pa=Object.prototype.hasOwnProperty,Ms=(f,h)=>u5(f,"name",{value:h,configurable:!0}),oa=(f,h)=>{for(var w in h)u5(f,w,{get:h[w],enumerable:!0})},ua=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of aa(h))if(!pa.call(f,$)&&$!==w)u5(f,$,{get:()=>h[$],enumerable:!(s=ea(h,$))||s.enumerable})}return f},ta=(f)=>ua(u5({},"__esModule",{value:!0}),f),mM={};oa(mM,{loadConfig:()=>$p});dM.exports=ta(mM);var Er=D$();function N3(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}Ms(N3,"getSelectorName");var fp=Ms((f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new Er.CredentialsProviderError(w.message||`Not found in ENV: ${N3(f.toString())}`,{logger:h})}},"fromEnv"),bM=H3(),hp=Ms((f,{preferredFile:h="config",...w}={})=>async()=>{let s=bM.getProfileName(w),{configFile:$,credentialsFile:r}=await bM.loadSharedConfigFiles(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new Er.CredentialsProviderError(F.message||`Not found in config files w/ profile [${s}]: ${N3(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),wp=Ms((f)=>typeof f==="function","isFunction"),sp=Ms((f)=>wp(f)?async()=>await f():Er.fromStatic(f),"fromStatic"),$p=Ms(({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>Er.memoize(Er.chain(fp(f),hp(h,s),sp(w))),"loadConfig")});var nM=H((xM)=>{Object.defineProperty(xM,"__esModule",{value:!0});xM.getEndpointUrlConfig=void 0;var iM=H3(),cM="AWS_ENDPOINT_URL",gM="endpoint_url",rp=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[cM,...w].join("_")];if(s)return s;let $=h[cM];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(iM.CONFIG_PREFIX_SEPARATOR)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),gM].join(iM.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}let s=h[gM];if(s)return s;return},default:void 0});xM.getEndpointUrlConfig=rp});var D3=H((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.getEndpointFromConfig=void 0;var Ep=Qs(),Up=nM(),Tp=async(f)=>Ep.loadConfig(Up.getEndpointUrlConfig(f!==null&&f!==void 0?f:""))();eM.getEndpointFromConfig=Tp});var tM=H((GW0,uM)=>{var{defineProperty:t5,getOwnPropertyDescriptor:Fp,getOwnPropertyNames:Cp}=Object,Ip=Object.prototype.hasOwnProperty,Lp=(f,h)=>t5(f,"name",{value:h,configurable:!0}),Bp=(f,h)=>{for(var w in h)t5(f,w,{get:h[w],enumerable:!0})},Gp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Cp(h))if(!Ip.call(f,$)&&$!==w)t5(f,$,{get:()=>h[$],enumerable:!(s=Fp(h,$))||s.enumerable})}return f},Wp=(f)=>Gp(t5({},"__esModule",{value:!0}),f),pM={};Bp(pM,{parseQueryString:()=>oM});uM.exports=Wp(pM);function oM(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}Lp(oM,"parseQueryString")});var Ur=H((WW0,wQ)=>{var{defineProperty:fE,getOwnPropertyDescriptor:Ap,getOwnPropertyNames:zp}=Object,Rp=Object.prototype.hasOwnProperty,Xp=(f,h)=>fE(f,"name",{value:h,configurable:!0}),Sp=(f,h)=>{for(var w in h)fE(f,w,{get:h[w],enumerable:!0})},Yp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zp(h))if(!Rp.call(f,$)&&$!==w)fE(f,$,{get:()=>h[$],enumerable:!(s=Ap(h,$))||s.enumerable})}return f},Mp=(f)=>Yp(fE({},"__esModule",{value:!0}),f),fQ={};Sp(fQ,{parseUrl:()=>hQ});wQ.exports=Mp(fQ);var Qp=tM(),hQ=Xp((f)=>{if(typeof f==="string")return hQ(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=Qp.parseQueryString(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}},"parseUrl")});var Ks=H((AW0,FQ)=>{var{defineProperty:wE,getOwnPropertyDescriptor:Kp,getOwnPropertyNames:Zp}=Object,Jp=Object.prototype.hasOwnProperty,Uf=(f,h)=>wE(f,"name",{value:h,configurable:!0}),Vp=(f,h)=>{for(var w in h)wE(f,w,{get:h[w],enumerable:!0})},Pp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Zp(h))if(!Jp.call(f,$)&&$!==w)wE(f,$,{get:()=>h[$],enumerable:!(s=Kp(h,$))||s.enumerable})}return f},Hp=(f)=>Pp(wE({},"__esModule",{value:!0}),f),$Q={};Vp($Q,{endpointMiddleware:()=>UQ,endpointMiddlewareOptions:()=>TQ,getEndpointFromInstructions:()=>rQ,getEndpointPlugin:()=>mp,resolveEndpointConfig:()=>ip,resolveParams:()=>EQ,toEndpointV1:()=>q3});FQ.exports=Hp($Q);var Np=Uf(async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(jp(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!yp(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),Dp=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qp=/(\d+\.){3}\d+/,kp=/\.\./,yp=Uf((f)=>Dp.test(f)&&!qp.test(f)&&!kp.test(f),"isDnsCompatibleBucketName"),jp=Uf((f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E},"isArnBucketName"),Op=Uf((f,h,w)=>{let s=Uf(async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s},"createConfigValueProvider"),lp=D3(),sQ=Ur(),q3=Uf((f)=>{if(typeof f==="object"){if("url"in f)return sQ.parseUrl(f.url);return f}return sQ.parseUrl(f)},"toEndpointV1"),rQ=Uf(async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await lp.getEndpointFromConfig(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(q3(E))}let $=await EQ(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},"getEndpointFromInstructions"),EQ=Uf(async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await Op(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await Np(s);return s},"resolveParams"),vp=m0(),hE=Ih(),UQ=Uf(({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)vp.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await rQ($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=hE.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}},"endpointMiddleware"),bp=qw(),TQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:bp.serializerMiddlewareOption.name},mp=Uf((f,h)=>({applyToStack:(w)=>{w.addRelativeTo(UQ({config:f,instructions:h}),TQ)}}),"getEndpointPlugin"),dp=D3(),ip=Uf((f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,r=w!=null?async()=>q3(await hE.normalizeProvider(w)()):void 0,U=Object.assign(f,{endpoint:r,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:hE.normalizeProvider(s??!1),useFipsEndpoint:hE.normalizeProvider($??!1)}),T=void 0;return U.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!T)T=dp.getEndpointFromConfig(f.serviceId);return T},U},"resolveEndpointConfig")});var y3=H((zW0,LQ)=>{var{defineProperty:sE,getOwnPropertyDescriptor:cp,getOwnPropertyNames:gp}=Object,xp=Object.prototype.hasOwnProperty,Zs=(f,h)=>sE(f,"name",{value:h,configurable:!0}),_p=(f,h)=>{for(var w in h)sE(f,w,{get:h[w],enumerable:!0})},np=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of gp(h))if(!xp.call(f,$)&&$!==w)sE(f,$,{get:()=>h[$],enumerable:!(s=cp(h,$))||s.enumerable})}return f},ep=(f)=>np(sE({},"__esModule",{value:!0}),f),CQ={};_p(CQ,{isClockSkewCorrectedError:()=>IQ,isClockSkewError:()=>ho,isRetryableByTrait:()=>fo,isServerError:()=>so,isThrottlingError:()=>wo,isTransientError:()=>k3});LQ.exports=ep(CQ);var ap=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],pp=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],op=["TimeoutError","RequestTimeout","RequestTimeoutException"],up=[500,502,503,504],tp=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],fo=Zs((f)=>f.$retryable!==void 0,"isRetryableByTrait"),ho=Zs((f)=>ap.includes(f.name),"isClockSkewError"),IQ=Zs((f)=>f.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),wo=Zs((f)=>f.$metadata?.httpStatusCode===429||pp.includes(f.name)||f.$retryable?.throttling==!0,"isThrottlingError"),k3=Zs((f,h=0)=>IQ(f)||op.includes(f.name)||tp.includes(f?.code||"")||up.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&k3(f.cause,h+1),"isTransientError"),so=Zs((f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!k3(f))return!0;return!1}return!1},"isServerError")});var rE=H((RW0,YQ)=>{var{defineProperty:$E,getOwnPropertyDescriptor:$o,getOwnPropertyNames:ro}=Object,Eo=Object.prototype.hasOwnProperty,Tf=(f,h)=>$E(f,"name",{value:h,configurable:!0}),Uo=(f,h)=>{for(var w in h)$E(f,w,{get:h[w],enumerable:!0})},To=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ro(h))if(!Eo.call(f,$)&&$!==w)$E(f,$,{get:()=>h[$],enumerable:!(s=$o(h,$))||s.enumerable})}return f},Fo=(f)=>To($E({},"__esModule",{value:!0}),f),GQ={};Uo(GQ,{AdaptiveRetryStrategy:()=>Wo,ConfiguredRetryStrategy:()=>Ao,DEFAULT_MAX_ATTEMPTS:()=>j3,DEFAULT_RETRY_DELAY_BASE:()=>Tr,DEFAULT_RETRY_MODE:()=>Co,DefaultRateLimiter:()=>AQ,INITIAL_RETRY_TOKENS:()=>O3,INVOCATION_ID_HEADER:()=>Lo,MAXIMUM_RETRY_DELAY:()=>l3,NO_RETRY_INCREMENT:()=>SQ,REQUEST_HEADER:()=>Bo,RETRY_COST:()=>RQ,RETRY_MODES:()=>WQ,StandardRetryStrategy:()=>v3,THROTTLING_RETRY_DELAY_BASE:()=>zQ,TIMEOUT_RETRY_COST:()=>XQ});YQ.exports=Fo(GQ);var WQ=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(WQ||{}),j3=3,Co="standard",Io=y3(),AQ=class f{constructor(h){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=h?.beta??0.7,this.minCapacity=h?.minCapacity??1,this.minFillRate=h?.minFillRate??0.5,this.scaleConstant=h?.scaleConstant??0.4,this.smooth=h?.smooth??0.8;let w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Tf(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(h){if(!this.enabled)return;if(this.refillTokenBucket(),h>this.currentCapacity){let w=(h-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>f.setTimeoutFn(s,w))}this.currentCapacity=this.currentCapacity-h}refillTokenBucket(){let h=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=h;return}let w=(h-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=h}updateClientSendingRate(h){let w;if(this.updateMeasuredRate(),Io.isThrottlingError(h)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(h){return this.getPrecise(h*this.beta)}cubicSuccess(h){return this.getPrecise(this.scaleConstant*Math.pow(h-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(h){this.refillTokenBucket(),this.fillRate=Math.max(h,this.minFillRate),this.maxCapacity=Math.max(h,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let h=this.getCurrentTimeInSeconds(),w=Math.floor(h*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){let s=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}},Tr=100,l3=20000,zQ=500,O3=500,RQ=5,XQ=10,SQ=1,Lo="amz-sdk-invocation-id",Bo="amz-sdk-request",Go=Tf(()=>{let f=Tr;return{computeNextBackoffDelay:Tf((s)=>{return Math.floor(Math.min(l3,Math.random()*2**s*f))},"computeNextBackoffDelay"),setDelayBase:Tf((s)=>{f=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),BQ=Tf(({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:Tf(()=>h,"getRetryCount"),getRetryDelay:Tf(()=>Math.min(l3,f),"getRetryDelay"),getRetryCost:Tf(()=>w,"getRetryCost")}},"createDefaultRetryToken"),v3=class{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=O3,this.retryBackoffStrategy=Go(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}static{Tf(this,"StandardRetryStrategy")}async acquireInitialRetryToken(f){return BQ({retryDelay:Tr,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?zQ:Tr);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,BQ({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(O3,this.capacity+(f.getRetryCost()??SQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${j3}`),j3}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?XQ:RQ}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}},Wo=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode="adaptive";let{rateLimiter:w}=h??{};this.rateLimiter=w??new AQ,this.standardRetryStrategy=new v3(f)}static{Tf(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}},Ao=class extends v3{static{Tf(this,"ConfiguredRetryStrategy")}constructor(f,h=Tr){super(typeof f==="function"?f:async()=>f);if(typeof h==="number")this.computeNextBackoffDelay=()=>h;else this.computeNextBackoffDelay=h}async refreshRetryTokenForRetry(f,h){let w=await super.refreshRetryTokenForRetry(f,h);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}}});var KQ=H((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.isStreamingPayload=void 0;var zo=B0("node:stream"),Ro=(f)=>(f===null||f===void 0?void 0:f.body)instanceof zo.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;MQ.isStreamingPayload=Ro});var Fr=H((QW0,bQ)=>{var{defineProperty:EE,getOwnPropertyDescriptor:Xo,getOwnPropertyNames:So}=Object,Yo=Object.prototype.hasOwnProperty,x0=(f,h)=>EE(f,"name",{value:h,configurable:!0}),Mo=(f,h)=>{for(var w in h)EE(f,w,{get:h[w],enumerable:!0})},Qo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of So(h))if(!Yo.call(f,$)&&$!==w)EE(f,$,{get:()=>h[$],enumerable:!(s=Xo(h,$))||s.enumerable})}return f},Ko=(f)=>Qo(EE({},"__esModule",{value:!0}),f),JQ={};Mo(JQ,{AdaptiveRetryStrategy:()=>Vo,CONFIG_MAX_ATTEMPTS:()=>m3,CONFIG_RETRY_MODE:()=>kQ,ENV_MAX_ATTEMPTS:()=>b3,ENV_RETRY_MODE:()=>qQ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Po,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>No,StandardRetryStrategy:()=>DQ,defaultDelayDecider:()=>PQ,defaultRetryDecider:()=>HQ,getOmitRetryHeadersPlugin:()=>Do,getRetryAfterHint:()=>vQ,getRetryPlugin:()=>lo,omitRetryHeadersMiddleware:()=>yQ,omitRetryHeadersMiddlewareOptions:()=>jQ,resolveRetryConfig:()=>Ho,retryMiddleware:()=>OQ,retryMiddlewareOptions:()=>lQ});bQ.exports=Ko(JQ);var Js=t0(),VQ=PF(),l0=rE(),Zo=x0((f,h)=>{let w=f,s=h?.noRetryIncrement??l0.NO_RETRY_INCREMENT,$=h?.retryCost??l0.RETRY_COST,r=h?.timeoutRetryCost??l0.TIMEOUT_RETRY_COST,E=f,U=x0((I)=>I.name==="TimeoutError"?r:$,"getCapacityAmount"),T=x0((I)=>U(I)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:T,retrieveRetryTokens:x0((I)=>{if(!T(I))throw new Error("No retry token available");let L=U(I);return E-=L,L},"retrieveRetryTokens"),releaseRetryTokens:x0((I)=>{E+=I??s,E=Math.min(E,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),PQ=x0((f,h)=>Math.floor(Math.min(l0.MAXIMUM_RETRY_DELAY,Math.random()*2**h*f)),"defaultDelayDecider"),kh=y3(),HQ=x0((f)=>{if(!f)return!1;return kh.isRetryableByTrait(f)||kh.isClockSkewError(f)||kh.isThrottlingError(f)||kh.isTransientError(f)},"defaultRetryDecider"),NQ=x0((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),DQ=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l0.RETRY_MODES.STANDARD,this.retryDecider=h?.retryDecider??HQ,this.delayDecider=h?.delayDecider??PQ,this.retryQuota=h?.retryQuota??Zo(l0.INITIAL_RETRY_TOKENS)}static{x0(this,"StandardRetryStrategy")}shouldRetry(f,h,w){return h<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(h){f=l0.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,h,w){let s,$=0,r=0,E=await this.getMaxAttempts(),{request:U}=h;if(Js.HttpRequest.isInstance(U))U.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(Js.HttpRequest.isInstance(U))U.headers[l0.REQUEST_HEADER]=`attempt=${$+1}; max=${E}`;if(w?.beforeRequest)await w.beforeRequest();let{response:T,output:F}=await f(h);if(w?.afterRequest)w.afterRequest(T);return this.retryQuota.releaseRetryTokens(s),F.$metadata.attempts=$+1,F.$metadata.totalRetryDelay=r,{response:T,output:F}}catch(T){let F=NQ(T);if($++,this.shouldRetry(F,$,E)){s=this.retryQuota.retrieveRetryTokens(F);let C=this.delayDecider(kh.isThrottlingError(F)?l0.THROTTLING_RETRY_DELAY_BASE:l0.DEFAULT_RETRY_DELAY_BASE,$),I=Jo(F.$response),L=Math.max(I||0,C);r+=L,await new Promise((W)=>setTimeout(W,L));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=$,F.$metadata.totalRetryDelay=r,F}}},Jo=x0((f)=>{if(!Js.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return s*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Vo=class extends DQ{static{x0(this,"AdaptiveRetryStrategy")}constructor(f,h){let{rateLimiter:w,...s}=h??{};super(f,s);this.rateLimiter=w??new l0.DefaultRateLimiter,this.mode=l0.RETRY_MODES.ADAPTIVE}async retry(f,h){return super.retry(f,h,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}},ZQ=Ih(),b3="AWS_MAX_ATTEMPTS",m3="max_attempts",Po={environmentVariableSelector:(f)=>{let h=f[b3];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${b3} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[m3];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${m3} mast be a number, got "${h}"`);return w},default:l0.DEFAULT_MAX_ATTEMPTS},Ho=x0((f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=ZQ.normalizeProvider(s??l0.DEFAULT_MAX_ATTEMPTS);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await ZQ.normalizeProvider(w)()===l0.RETRY_MODES.ADAPTIVE)return new l0.AdaptiveRetryStrategy($);return new l0.StandardRetryStrategy($)}})},"resolveRetryConfig"),qQ="AWS_RETRY_MODE",kQ="retry_mode",No={environmentVariableSelector:(f)=>f[qQ],configFileSelector:(f)=>f[kQ],default:l0.DEFAULT_RETRY_MODE},yQ=x0(()=>(f)=>async(h)=>{let{request:w}=h;if(Js.HttpRequest.isInstance(w))delete w.headers[l0.INVOCATION_ID_HEADER],delete w.headers[l0.REQUEST_HEADER];return f(h)},"omitRetryHeadersMiddleware"),jQ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Do=x0((f)=>({applyToStack:(h)=>{h.addRelativeTo(yQ(),jQ)}}),"getOmitRetryHeadersPlugin"),qo=J0(),ko=KQ(),OQ=x0((f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(yo($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=Js.HttpRequest.isInstance(C);if(I)C.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(I)C.headers[l0.REQUEST_HEADER]=`attempt=${T+1}; max=${r}`;let{response:L,output:W}=await h(s);return $.recordSuccess(E),W.$metadata.attempts=T+1,W.$metadata.totalRetryDelay=F,{response:L,output:W}}catch(L){let W=jo(L);if(U=NQ(L),I&&ko.isStreamingPayload(C))throw(w.logger instanceof qo.NoOpLogger?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,W)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},"retryMiddleware"),yo=x0((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),jo=x0((f)=>{let h={error:f,errorType:Oo(f)},w=vQ(f.$response);if(w)h.retryAfterHint=w;return h},"getRetryErrorInfo"),Oo=x0((f)=>{if(kh.isThrottlingError(f))return"THROTTLING";if(kh.isTransientError(f))return"TRANSIENT";if(kh.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),lQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},lo=x0((f)=>({applyToStack:(h)=>{h.add(OQ(f),lQ)}}),"getRetryPlugin"),vQ=x0((f)=>{if(!Js.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)},"getRetryAfterHint")});var d3=H((dQ)=>{Object.defineProperty(dQ,"__esModule",{value:!0});dQ.resolveHttpAuthSchemeConfig=dQ.defaultSSOOIDCHttpAuthSchemeProvider=dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var vo=O0(),mQ=Ih(),bo=async(f,h,w)=>{return{operation:mQ.getSmithyContext(h).operation,region:await mQ.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=bo;function mo(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function io(f){return{schemeId:"smithy.api#noAuth"}}var co=(f)=>{let h=[];switch(f.operation){case"CreateToken":{h.push(io(f));break}default:h.push(mo(f))}return h};dQ.defaultSSOOIDCHttpAuthSchemeProvider=co;var go=(f)=>{let h=vo.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};dQ.resolveHttpAuthSchemeConfig=go});var i3=H((VW0,no)=>{no.exports={name:"@aws-sdk/nested-clients",version:"3.775.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"}}}});var g3=H((PW0,aQ)=>{var{defineProperty:TE,getOwnPropertyDescriptor:eo,getOwnPropertyNames:ao}=Object,po=Object.prototype.hasOwnProperty,UE=(f,h)=>TE(f,"name",{value:h,configurable:!0}),oo=(f,h)=>{for(var w in h)TE(f,w,{get:h[w],enumerable:!0})},uo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ao(h))if(!po.call(f,$)&&$!==w)TE(f,$,{get:()=>h[$],enumerable:!(s=eo(h,$))||s.enumerable})}return f},to=(f)=>uo(TE({},"__esModule",{value:!0}),f),gQ={};oo(gQ,{NODE_APP_ID_CONFIG_OPTIONS:()=>$u,UA_APP_ID_ENV_NAME:()=>nQ,UA_APP_ID_INI_NAME:()=>eQ,createDefaultUserAgentProvider:()=>_Q,crtAvailability:()=>xQ,defaultUserAgent:()=>hu});aQ.exports=to(gQ);var cQ=B0("node:os"),c3=B0("node:process"),xQ={isCrtAvailable:!1},fu=UE(()=>{if(xQ.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),_Q=UE(({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${cQ.platform()}`,cQ.release()],["lang/js"],["md/nodejs",`${c3.versions.node}`]],$=fu();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(c3.env.AWS_EXECUTION_ENV)s.push([`exec-env/${c3.env.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}},"createDefaultUserAgentProvider"),hu=_Q,wu=g5(),nQ="AWS_SDK_UA_APP_ID",eQ="sdk_ua_app_id",su="sdk-ua-app-id",$u={environmentVariableSelector:UE((f)=>f[nQ],"environmentVariableSelector"),configFileSelector:UE((f)=>f[eQ]??f[su],"configFileSelector"),default:wu.DEFAULT_UA_APP_ID}});var n3=H((HW0,tQ)=>{var{defineProperty:FE,getOwnPropertyDescriptor:ru,getOwnPropertyNames:Eu}=Object,Uu=Object.prototype.hasOwnProperty,oQ=(f,h)=>FE(f,"name",{value:h,configurable:!0}),Tu=(f,h)=>{for(var w in h)FE(f,w,{get:h[w],enumerable:!0})},Fu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Eu(h))if(!Uu.call(f,$)&&$!==w)FE(f,$,{get:()=>h[$],enumerable:!(s=ru(h,$))||s.enumerable})}return f},Cu=(f)=>Fu(FE({},"__esModule",{value:!0}),f),uQ={};Tu(uQ,{Hash:()=>Bu});tQ.exports=Cu(uQ);var x3=kw(),Iu=u1(),Lu=B0("node:buffer"),pQ=B0("node:crypto"),Bu=class{static{oQ(this,"Hash")}constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(Iu.toUint8Array(_3(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?pQ.createHmac(this.algorithmIdentifier,_3(this.secret)):pQ.createHash(this.algorithmIdentifier)}};function _3(f,h){if(Lu.Buffer.isBuffer(f))return f;if(typeof f==="string")return x3.fromString(f,h);if(ArrayBuffer.isView(f))return x3.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return x3.fromArrayBuffer(f)}oQ(_3,"castSourceData")});var e3=H((DW0,wK)=>{var{defineProperty:CE,getOwnPropertyDescriptor:Gu,getOwnPropertyNames:Wu}=Object,Au=Object.prototype.hasOwnProperty,zu=(f,h)=>CE(f,"name",{value:h,configurable:!0}),Ru=(f,h)=>{for(var w in h)CE(f,w,{get:h[w],enumerable:!0})},Xu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Wu(h))if(!Au.call(f,$)&&$!==w)CE(f,$,{get:()=>h[$],enumerable:!(s=Gu(h,$))||s.enumerable})}return f},Su=(f)=>Xu(CE({},"__esModule",{value:!0}),f),hK={};Ru(hK,{calculateBodyLength:()=>Yu});wK.exports=Su(hK);var fK=B0("node:fs"),Yu=zu((f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return fK.lstatSync(f.path).size;else if(typeof f.fd==="number")return fK.fstatSync(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)},"calculateBodyLength")});var XK=H((zK)=>{Object.defineProperty(zK,"__esModule",{value:!0});zK.ruleSet=void 0;var BK="required",m1="fn",d1="argv",Hs="ref",sK=!0,$K="isSet",Cr="booleanEquals",Vs="error",Ps="endpoint",pf="tree",a3="PartitionResult",p3="getAttr",rK={[BK]:!1,type:"String"},EK={[BK]:!0,default:!1,type:"Boolean"},UK={[Hs]:"Endpoint"},GK={[m1]:Cr,[d1]:[{[Hs]:"UseFIPS"},!0]},WK={[m1]:Cr,[d1]:[{[Hs]:"UseDualStack"},!0]},b1={},TK={[m1]:p3,[d1]:[{[Hs]:a3},"supportsFIPS"]},AK={[Hs]:a3},FK={[m1]:Cr,[d1]:[!0,{[m1]:p3,[d1]:[AK,"supportsDualStack"]}]},CK=[GK],IK=[WK],LK=[{[Hs]:"Region"}],Mu={version:"1.0",parameters:{Region:rK,UseDualStack:EK,UseFIPS:EK,Endpoint:rK},rules:[{conditions:[{[m1]:$K,[d1]:[UK]}],rules:[{conditions:CK,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Vs},{conditions:IK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Vs},{endpoint:{url:UK,properties:b1,headers:b1},type:Ps}],type:pf},{conditions:[{[m1]:$K,[d1]:LK}],rules:[{conditions:[{[m1]:"aws.partition",[d1]:LK,assign:a3}],rules:[{conditions:[GK,WK],rules:[{conditions:[{[m1]:Cr,[d1]:[sK,TK]},FK],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Ps}],type:pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Vs}],type:pf},{conditions:CK,rules:[{conditions:[{[m1]:Cr,[d1]:[TK,sK]}],rules:[{conditions:[{[m1]:"stringEquals",[d1]:[{[m1]:p3,[d1]:[AK,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:b1,headers:b1},type:Ps},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Ps}],type:pf},{error:"FIPS is enabled but this partition does not support FIPS",type:Vs}],type:pf},{conditions:IK,rules:[{conditions:[FK],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Ps}],type:pf},{error:"DualStack is enabled but this partition does not support DualStack",type:Vs}],type:pf},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Ps}],type:pf}],type:pf},{error:"Invalid Configuration: Missing Region",type:Vs}]};zK.ruleSet=Mu});var MK=H((SK)=>{Object.defineProperty(SK,"__esModule",{value:!0});SK.defaultEndpointResolver=void 0;var Qu=d5(),o3=b5(),Ku=XK(),Zu=new o3.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ju=(f,h={})=>{return Zu.get(f,()=>o3.resolveEndpoint(Ku.ruleSet,{endpointParams:f,logger:h.logger}))};SK.defaultEndpointResolver=Ju;o3.customEndpointFunctions.aws=Qu.awsEndpointFunctions});var VK=H((ZK)=>{Object.defineProperty(ZK,"__esModule",{value:!0});ZK.getRuntimeConfig=void 0;var Vu=O0(),Pu=m0(),Hu=J0(),Nu=Ur(),QK=Bh(),KK=u1(),Du=d3(),qu=MK(),ku=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??QK.fromBase64,base64Encoder:f?.base64Encoder??QK.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??qu.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Du.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Vu.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Pu.NoAuthSigner}],logger:f?.logger??new Hu.NoOpLogger,serviceId:f?.serviceId??"SSO OIDC",urlParser:f?.urlParser??Nu.parseUrl,utf8Decoder:f?.utf8Decoder??KK.fromUtf8,utf8Encoder:f?.utf8Encoder??KK.toUtf8}};ZK.getRuntimeConfig=ku});var dK=H((jW0,mK)=>{var{defineProperty:BE,getOwnPropertyDescriptor:yu,getOwnPropertyNames:ju}=Object,Ou=Object.prototype.hasOwnProperty,_0=(f,h)=>BE(f,"name",{value:h,configurable:!0}),lu=(f,h)=>{for(var w in h)BE(f,w,{get:h[w],enumerable:!0})},vu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ju(h))if(!Ou.call(f,$)&&$!==w)BE(f,$,{get:()=>h[$],enumerable:!(s=yu(h,$))||s.enumerable})}return f},bu=(f)=>vu(BE({},"__esModule",{value:!0}),f),DK={};lu(DK,{DEFAULT_MAX_RETRIES:()=>jK,DEFAULT_TIMEOUT:()=>yK,ENV_CMDS_AUTH_TOKEN:()=>f8,ENV_CMDS_FULL_URI:()=>IE,ENV_CMDS_RELATIVE_URI:()=>LE,Endpoint:()=>OK,fromContainerMetadata:()=>cu,fromInstanceMetadata:()=>Ct,getInstanceMetadataEndpoint:()=>vK,httpRequest:()=>Ns,providerConfigFromInit:()=>h8});mK.exports=bu(DK);var mu=B0("node:url"),Zf=D$(),du=B0("node:buffer"),iu=B0("node:http");function Ns(f){return new Promise((h,w)=>{let s=iu.request({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new Zf.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new Zf.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new Zf.ProviderError("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(du.Buffer.concat(E)),s.destroy()})}),s.end()})}_0(Ns,"httpRequest");var qK=_0((f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string","isImdsCredentials"),kK=_0((f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}}),"fromImdsCredentials"),yK=1000,jK=0,h8=_0(({maxRetries:f=jK,timeout:h=yK})=>({maxRetries:f,timeout:h}),"providerConfigFromInit"),t3=_0((f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w},"retry"),IE="AWS_CONTAINER_CREDENTIALS_FULL_URI",LE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",f8="AWS_CONTAINER_AUTHORIZATION_TOKEN",cu=_0((f={})=>{let{timeout:h,maxRetries:w}=h8(f);return()=>t3(async()=>{let s=await eu({logger:f.logger}),$=JSON.parse(await gu(h,s));if(!qK($))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return kK($)},w)},"fromContainerMetadata"),gu=_0(async(f,h)=>{if(process.env[f8])h.headers={...h.headers,Authorization:process.env[f8]};return(await Ns({...h,timeout:f})).toString()},"requestFromEcsImds"),xu="169.254.170.2",_u={localhost:!0,"127.0.0.1":!0},nu={"http:":!0,"https:":!0},eu=_0(async({logger:f})=>{if(process.env[LE])return{hostname:xu,path:process.env[LE]};if(process.env[IE]){let h=mu.parse(process.env[IE]);if(!h.hostname||!(h.hostname in _u))throw new Zf.CredentialsProviderError(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in nu))throw new Zf.CredentialsProviderError(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new Zf.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${LE} or ${IE} environment variable is set`,{tryNextLink:!1,logger:f})},"getCmdsUri"),au=class f extends Zf.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,f.prototype)}static{_0(this,"InstanceMetadataV1FallbackError")}},w8=Qs(),pu=Ur(),OK=((f)=>{return f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]",f})(OK||{}),ou="AWS_EC2_METADATA_SERVICE_ENDPOINT",uu="ec2_metadata_service_endpoint",tu={environmentVariableSelector:(f)=>f[ou],configFileSelector:(f)=>f[uu],default:void 0},lK=((f)=>{return f.IPv4="IPv4",f.IPv6="IPv6",f})(lK||{}),ft="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ht="ec2_metadata_service_endpoint_mode",wt={environmentVariableSelector:(f)=>f[ft],configFileSelector:(f)=>f[ht],default:"IPv4"},vK=_0(async()=>pu.parseUrl(await st()||await $t()),"getInstanceMetadataEndpoint"),st=_0(async()=>w8.loadConfig(tu)(),"getFromEndpointConfig"),$t=_0(async()=>{let f=await w8.loadConfig(wt)();switch(f){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(lK)}`)}},"getFromEndpointModeConfig"),rt=300,Et=300,Ut="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",PK=_0((f,h)=>{let w=rt+Math.floor(Math.random()*Et),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
50
- For more information, please visit: `+Ut);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),Tt=_0((f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=PK($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=PK(s,w);else throw r}return s=$,$}},"staticStabilityProvider"),bK="/latest/meta-data/iam/security-credentials/",Ft="/latest/api/token",u3="AWS_EC2_METADATA_V1_DISABLED",HK="ec2_metadata_v1_disabled",NK="x-aws-ec2-metadata-token",Ct=_0((f={})=>Tt(It(f),{logger:f.logger}),"fromInstanceMetadata"),It=_0((f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=h8(f),E=_0(async(U,T)=>{if(h||T.headers?.[NK]==null){let I=!1,L=!1,W=await w8.loadConfig({environmentVariableSelector:(X)=>{let Q=X[u3];if(L=!!Q&&Q!=="false",Q===void 0)throw new Zf.CredentialsProviderError(`${u3} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[HK];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||W){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${HK})`);if(L)X.push(`process environment variable (${u3})`);throw new au(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await t3(async()=>{let I;try{I=await Bt(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return t3(async()=>{let I;try{I=await Gt(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)},"getCredentials");return async()=>{let U=await vK();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await Lt({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[NK]:T},timeout:$})}}},"getInstanceMetadataProvider"),Lt=_0(async(f)=>Ns({...f,path:Ft,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),Bt=_0(async(f)=>(await Ns({...f,path:bK})).toString(),"getProfile"),Gt=_0(async(f,h,w)=>{let s=JSON.parse((await Ns({...h,path:bK+f})).toString());if(!qK(s))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:w.logger});return kK(s)},"getCredentialsFromProfile")});var $8=H((OW0,nK)=>{var{create:Wt,defineProperty:Ir,getOwnPropertyDescriptor:At,getOwnPropertyNames:zt,getPrototypeOf:Rt}=Object,Xt=Object.prototype.hasOwnProperty,s8=(f,h)=>Ir(f,"name",{value:h,configurable:!0}),St=(f,h)=>{for(var w in h)Ir(f,w,{get:h[w],enumerable:!0})},xK=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of zt(h))if(!Xt.call(f,$)&&$!==w)Ir(f,$,{get:()=>h[$],enumerable:!(s=At(h,$))||s.enumerable})}return f},Yt=(f,h,w)=>(w=f!=null?Wt(Rt(f)):{},xK(h||!f||!f.__esModule?Ir(w,"default",{value:f,enumerable:!0}):w,f)),Mt=(f)=>xK(Ir({},"__esModule",{value:!0}),f),_K={};St(_K,{resolveDefaultsModeConfig:()=>qt});nK.exports=Mt(_K);var Qt=Ss(),iK=Qs(),Kt=D$(),Zt="AWS_EXECUTION_ENV",cK="AWS_REGION",gK="AWS_DEFAULT_REGION",Jt="AWS_EC2_METADATA_DISABLED",Vt=["in-region","cross-region","mobile","standard","legacy"],Pt="/latest/meta-data/placement/region",Ht="AWS_DEFAULTS_MODE",Nt="defaults_mode",Dt={environmentVariableSelector:(f)=>{return f[Ht]},configFileSelector:(f)=>{return f[Nt]},default:"legacy"},qt=s8(({region:f=iK.loadConfig(Qt.NODE_REGION_CONFIG_OPTIONS),defaultsMode:h=iK.loadConfig(Dt)}={})=>Kt.memoize(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return kt(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Vt.join(", ")}, got ${w}`)}}),"resolveDefaultsModeConfig"),kt=s8(async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await yt();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),yt=s8(async()=>{if(process.env[Zt]&&(process.env[cK]||process.env[gK]))return process.env[cK]??process.env[gK];if(!process.env[Jt])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(()=>Yt(dK())),w=await f();return(await h({...w,path:Pt})).toString()}catch(f){}},"inferPhysicalRegion")});var tK=H((oK)=>{Object.defineProperty(oK,"__esModule",{value:!0});oK.getRuntimeConfig=void 0;var jt=l4(),Ot=jt.__importDefault(i3()),lt=O0(),eK=g3(),GE=Ss(),vt=n3(),aK=Fr(),Ds=Qs(),pK=X4(),bt=e3(),mt=rE(),dt=VK(),it=J0(),ct=$8(),gt=J0(),xt=(f)=>{gt.emitWarningIfUnsupportedVersion(process.version);let h=ct.resolveDefaultsModeConfig(f),w=()=>h().then(it.loadConfigsForDefaultMode),s=dt.getRuntimeConfig(f);lt.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??bt.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??eK.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:Ot.default.version}),maxAttempts:f?.maxAttempts??Ds.loadConfig(aK.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??Ds.loadConfig(GE.NODE_REGION_CONFIG_OPTIONS,{...GE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:pK.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??Ds.loadConfig({...aK.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||mt.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??vt.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??pK.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??Ds.loadConfig(GE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??Ds.loadConfig(GE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??Ds.loadConfig(eK.NODE_APP_ID_CONFIG_OPTIONS,$)}};oK.getRuntimeConfig=xt});var r8=H((vW0,rZ)=>{var{defineProperty:WE,getOwnPropertyDescriptor:_t,getOwnPropertyNames:nt}=Object,et=Object.prototype.hasOwnProperty,Jf=(f,h)=>WE(f,"name",{value:h,configurable:!0}),at=(f,h)=>{for(var w in h)WE(f,w,{get:h[w],enumerable:!0})},pt=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of nt(h))if(!et.call(f,$)&&$!==w)WE(f,$,{get:()=>h[$],enumerable:!(s=_t(h,$))||s.enumerable})}return f},ot=(f)=>pt(WE({},"__esModule",{value:!0}),f),hZ={};at(hZ,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>h00,NODE_REGION_CONFIG_OPTIONS:()=>f00,REGION_ENV_NAME:()=>wZ,REGION_INI_NAME:()=>sZ,getAwsRegionExtensionConfiguration:()=>ut,resolveAwsRegionExtensionConfiguration:()=>tt,resolveRegionConfig:()=>w00});rZ.exports=ot(hZ);var ut=Jf((f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},"getAwsRegionExtensionConfiguration"),tt=Jf((f)=>{return{region:f.region()}},"resolveAwsRegionExtensionConfiguration"),wZ="AWS_REGION",sZ="region",f00={environmentVariableSelector:Jf((f)=>f[wZ],"environmentVariableSelector"),configFileSelector:Jf((f)=>f[sZ],"configFileSelector"),default:Jf(()=>{throw new Error("Region is missing")},"default")},h00={preferredFile:"credentials"},$Z=Jf((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),fZ=Jf((f)=>$Z(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),w00=Jf((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:Jf(async()=>{if(typeof h==="string")return fZ(h);let s=await h();return fZ(s)},"region"),useFipsEndpoint:Jf(async()=>{let s=typeof h==="string"?h:await h();if($Z(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()},"useFipsEndpoint")})},"resolveRegionConfig")});var T8=H((bW0,qZ)=>{var{defineProperty:AE,getOwnPropertyDescriptor:s00,getOwnPropertyNames:$00}=Object,r00=Object.prototype.hasOwnProperty,w0=(f,h)=>AE(f,"name",{value:h,configurable:!0}),E00=(f,h)=>{for(var w in h)AE(f,w,{get:h[w],enumerable:!0})},U00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $00(h))if(!r00.call(f,$)&&$!==w)AE(f,$,{get:()=>h[$],enumerable:!(s=s00(h,$))||s.enumerable})}return f},T00=(f)=>U00(AE({},"__esModule",{value:!0}),f),BZ={};E00(BZ,{$Command:()=>AZ.Command,AccessDeniedException:()=>zZ,AuthorizationPendingException:()=>RZ,CreateTokenCommand:()=>NZ,CreateTokenRequestFilterSensitiveLog:()=>XZ,CreateTokenResponseFilterSensitiveLog:()=>SZ,ExpiredTokenException:()=>YZ,InternalServerException:()=>MZ,InvalidClientException:()=>QZ,InvalidGrantException:()=>KZ,InvalidRequestException:()=>ZZ,InvalidScopeException:()=>JZ,SSOOIDC:()=>DZ,SSOOIDCClient:()=>WZ,SSOOIDCServiceException:()=>Z1,SlowDownException:()=>VZ,UnauthorizedClientException:()=>PZ,UnsupportedGrantTypeException:()=>HZ,__Client:()=>GZ.Client});qZ.exports=T00(BZ);var EZ=T3(),F00=C3(),C00=L3(),UZ=g5(),I00=Ss(),E8=m0(),L00=Y3(),B00=Ks(),TZ=Fr(),GZ=J0(),FZ=d3(),G00=w0((f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),W00={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},A00=tK(),CZ=r8(),IZ=t0(),LZ=J0(),z00=w0((f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),R00=w0((f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}},"resolveHttpAuthRuntimeConfig"),X00=w0((f,h)=>{let w=Object.assign(CZ.getAwsRegionExtensionConfiguration(f),LZ.getDefaultExtensionConfiguration(f),IZ.getHttpHandlerExtensionConfiguration(f),z00(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,CZ.resolveAwsRegionExtensionConfiguration(w),LZ.resolveDefaultRuntimeConfig(w),IZ.resolveHttpHandlerRuntimeConfig(w),R00(w))},"resolveRuntimeExtensions"),WZ=class extends GZ.Client{static{w0(this,"SSOOIDCClient")}config;constructor(...[f]){let h=A00.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=G00(h),s=UZ.resolveUserAgentConfig(w),$=TZ.resolveRetryConfig(s),r=I00.resolveRegionConfig($),E=EZ.resolveHostHeaderConfig(r),U=B00.resolveEndpointConfig(E),T=FZ.resolveHttpAuthSchemeConfig(U),F=X00(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(UZ.getUserAgentPlugin(this.config)),this.middlewareStack.use(TZ.getRetryPlugin(this.config)),this.middlewareStack.use(L00.getContentLengthPlugin(this.config)),this.middlewareStack.use(EZ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(F00.getLoggerPlugin(this.config)),this.middlewareStack.use(C00.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(E8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w0(async(C)=>new E8.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(E8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},S00=J0(),Y00=Ks(),M00=qw(),AZ=J0(),qs=J0(),Q00=J0(),Z1=class f extends Q00.ServiceException{static{w0(this,"SSOOIDCServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},zZ=class f extends Z1{static{w0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(h){super({name:"AccessDeniedException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},RZ=class f extends Z1{static{w0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(h){super({name:"AuthorizationPendingException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},XZ=w0((f)=>({...f,...f.clientSecret&&{clientSecret:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.codeVerifier&&{codeVerifier:qs.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),SZ=w0((f)=>({...f,...f.accessToken&&{accessToken:qs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:qs.SENSITIVE_STRING},...f.idToken&&{idToken:qs.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),YZ=class f extends Z1{static{w0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},MZ=class f extends Z1{static{w0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(h){super({name:"InternalServerException",$fault:"server",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},QZ=class f extends Z1{static{w0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(h){super({name:"InvalidClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},KZ=class f extends Z1{static{w0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(h){super({name:"InvalidGrantException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},ZZ=class f extends Z1{static{w0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},JZ=class f extends Z1{static{w0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(h){super({name:"InvalidScopeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},VZ=class f extends Z1{static{w0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(h){super({name:"SlowDownException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},PZ=class f extends Z1{static{w0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(h){super({name:"UnauthorizedClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},HZ=class f extends Z1{static{w0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(h){super({name:"UnsupportedGrantTypeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},U8=O0(),K00=m0(),x=J0(),Z00=w0(async(f,h)=>{let w=K00.requestBuilder(f,h),s={"content-type":"application/json"};w.bp("/token");let $;return $=JSON.stringify(x.take(f,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:w0((r)=>x._json(r),"scope")})),w.m("POST").h(s).b($),w.build()},"se_CreateTokenCommand"),J00=w0(async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return V00(f,h);let w=x.map({$metadata:i1(f)}),s=x.expectNonNull(x.expectObject(await U8.parseJsonBody(f.body,h)),"body"),$=x.take(s,{accessToken:x.expectString,expiresIn:x.expectInt32,idToken:x.expectString,refreshToken:x.expectString,tokenType:x.expectString});return Object.assign(w,$),w},"de_CreateTokenCommand"),V00=w0(async(f,h)=>{let w={...f,body:await U8.parseJsonErrorBody(f.body,h)},s=U8.loadRestJsonErrorCode(f,w.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await H00(w,h);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await N00(w,h);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await D00(w,h);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await q00(w,h);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await k00(w,h);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await y00(w,h);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await j00(w,h);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await O00(w,h);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await l00(w,h);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await v00(w,h);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await b00(w,h);default:let $=w.body;return P00({output:f,parsedBody:$,errorCode:s})}},"de_CommandError"),P00=x.withBaseException(Z1),H00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new zZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AccessDeniedExceptionRes"),N00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new RZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AuthorizationPendingExceptionRes"),D00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new YZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_ExpiredTokenExceptionRes"),q00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new MZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InternalServerExceptionRes"),k00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new QZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidClientExceptionRes"),y00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new KZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidGrantExceptionRes"),j00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new ZZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidRequestExceptionRes"),O00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new JZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidScopeExceptionRes"),l00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new VZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_SlowDownExceptionRes"),v00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new PZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnauthorizedClientExceptionRes"),b00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new HZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnsupportedGrantTypeExceptionRes"),i1=w0((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),NZ=class extends AZ.Command.classBuilder().ep(W00).m(function(f,h,w,s){return[M00.getSerdePlugin(w,this.serialize,this.deserialize),Y00.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(XZ,SZ).ser(Z00).de(J00).build(){static{w0(this,"CreateTokenCommand")}},m00={CreateTokenCommand:NZ},DZ=class extends WZ{static{w0(this,"SSOOIDC")}};S00.createAggregatedClient(m00,DZ)});var kZ=async(f,h={})=>{let{SSOOIDCClient:w}=await Promise.resolve().then(() => o(T8(),1));return new w(Object.assign({},h.clientConfig??{},{region:f??h.clientConfig?.region,logger:h.clientConfig?.logger??h.parentClientConfig?.logger}))};var yZ=async(f,h,w={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => o(T8(),1));return(await kZ(h,w)).send(new s({clientId:f.clientId,clientSecret:f.clientSecret,refreshToken:f.refreshToken,grantType:"refresh_token"}))};var jZ=()=>{};var F8=(f)=>{if(f.expiration&&f.expiration.getTime()<Date.now())throw new S1(`Token is expired. ${Rs}`,!1)};var OZ=B(()=>{Y0()});var yh=(f,h,w=!1)=>{if(typeof h==="undefined")throw new S1(`Value not present for '${f}' in SSO Token${w?". Cannot refresh":""}. ${Rs}`,!1)};var lZ=B(()=>{Y0()});import{promises as d00}from"node:fs";var i00,vZ=(f,h)=>{let w=E5(f),s=JSON.stringify(h,null,2);return i00(w,s)};var bZ=B(()=>{hf();({writeFile:i00}=d00)});var mZ,dZ=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Zh(w),$=y1({profile:w.profile??h?.profile}),r=s[$];if(!r)throw new S1(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!r.sso_session)throw new S1(`Profile '${$}' is missing required property 'sso_session'.`);let E=r.sso_session,T=(await C5(w))[E];if(!T)throw new S1(`Sso session '${E}' could not be found in shared credentials file.`,!1);for(let Q of["sso_start_url","sso_region"])if(!T[Q])throw new S1(`Sso session '${E}' is missing required property '${Q}'.`,!1);let{sso_start_url:F,sso_region:C}=T,I;try{I=await U5(E)}catch(Q){throw new S1(`The SSO session token associated with profile=${$} was not found or is invalid. ${Rs}`,!1)}yh("accessToken",I.accessToken),yh("expiresAt",I.expiresAt);let{accessToken:L,expiresAt:W}=I,X={token:L,expiration:new Date(W)};if(X.expiration.getTime()-Date.now()>L9)return X;if(Date.now()-mZ.getTime()<30000)return F8(X),X;yh("clientId",I.clientId,!0),yh("clientSecret",I.clientSecret,!0),yh("refreshToken",I.refreshToken,!0);try{mZ.setTime(Date.now());let Q=await yZ(I,C,w);yh("accessToken",Q.accessToken),yh("expiresIn",Q.expiresIn);let M=new Date(Date.now()+Q.expiresIn*1000);try{await vZ(E,{...I,accessToken:Q.accessToken,expiresAt:M.toISOString(),refreshToken:Q.refreshToken})}catch(q){}return{token:Q.accessToken,expiration:M}}catch(Q){return F8(X),X}};var iZ=B(()=>{Y0();hf();jZ();OZ();lZ();bZ();mZ=new Date(0)});var cZ=B(()=>{Y0()});var gZ=B(()=>{Y0()});var xZ=B(()=>{iZ();cZ();gZ()});function c00(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function zE(f){return{schemeId:"smithy.api#noAuth"}}var _Z,nZ=async(f,h,w)=>{return{operation:Yh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},eZ=(f)=>{let h=[];switch(f.operation){case"GetRoleCredentials":{h.push(zE(f));break}case"ListAccountRoles":{h.push(zE(f));break}case"ListAccounts":{h.push(zE(f));break}case"Logout":{h.push(zE(f));break}default:h.push(c00(f))}return h},aZ=(f)=>{let h=_Z.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var C8=B(()=>{_Z=o(O0(),1);gf()});var pZ=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},jh;var ks=B(()=>{jh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var uZ;var oZ=B(()=>{uZ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var I8;var L8=B(()=>{I8={isCrtAvailable:!1}});var tZ=()=>{if(I8.isCrtAvailable)return["md/crt-avail"];return null};var fJ=B(()=>{L8()});import{platform as x00,release as _00}from"node:os";import{env as hJ,versions as n00}from"node:process";var ys=({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${x00()}`,_00()],["lang/js"],["md/nodejs",`${n00.node}`]],$=tZ();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(hJ.AWS_EXECUTION_ENV)s.push([`exec-env/${hJ.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}};var wJ=B(()=>{fJ();L8()});var e00="AWS_SDK_UA_APP_ID",a00="sdk_ua_app_id",p00="sdk-ua-app-id",js;var sJ=B(()=>{m$();js={environmentVariableSelector:(f)=>f[e00],configFileSelector:(f)=>f[a00]??f[p00],default:FT}});var RE=B(()=>{wJ();sJ()});var $J=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as B8}from"node:buffer";var Fw=(f,h=0,w=f.byteLength-h)=>{if(!$J(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return B8.from(f,h,w)},Os=(f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?B8.from(f,h):B8.from(f)};var ls=()=>{};var Vf=(f)=>{let h=Os(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var G8=B(()=>{ls()});var rJ=(f)=>{if(typeof f==="string")return Vf(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var EJ=B(()=>{G8()});var vs=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Fw(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};var UJ=B(()=>{ls()});var bs=B(()=>{G8();EJ();UJ()});import{Buffer as o00}from"node:buffer";import{createHash as u00,createHmac as t00}from"node:crypto";class Cw{constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(rJ(TJ(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?t00(this.algorithmIdentifier,TJ(this.secret)):u00(this.algorithmIdentifier)}}function TJ(f,h){if(o00.isBuffer(f))return f;if(typeof f==="string")return Os(f,h);if(ArrayBuffer.isView(f))return Fw(f.buffer,f.byteOffset,f.byteLength);return Fw(f)}var XE=B(()=>{ls();bs()});import{fstatSync as f10,lstatSync as h10}from"node:fs";var ms=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return h10(f.path).size;else if(typeof f.fd==="number")return f10(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var FJ=()=>{};var SE=B(()=>{FJ()});var w10,ds=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!w10.exec(f))throw new TypeError("Invalid base64 string.");let h=Os(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};var CJ=B(()=>{ls();w10=/^[A-Za-z0-9+/]*={0,2}$/});var is=(f)=>{let h;if(typeof f==="string")h=Vf(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Fw(h.buffer,h.byteOffset,h.byteLength).toString("base64")};var IJ=B(()=>{ls();bs()});var YE=B(()=>{CJ();IJ()});var LJ,BJ,GJ,SJ,YJ,c1,WJ,MJ,AJ,zJ,RJ,XJ,s10,QJ;var KJ=B(()=>{LJ={["required"]:!1,type:"String"},BJ={["required"]:!0,default:!1,type:"Boolean"},GJ={["ref"]:"Endpoint"},SJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},YJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},c1={},WJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},MJ={["ref"]:"PartitionResult"},AJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[MJ,"supportsDualStack"]}]},zJ=[SJ],RJ=[YJ],XJ=[{["ref"]:"Region"}],s10={version:"1.0",parameters:{Region:LJ,UseDualStack:BJ,UseFIPS:BJ,Endpoint:LJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[GJ]}],rules:[{conditions:zJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:RJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:GJ,properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:XJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:XJ,assign:"PartitionResult"}],rules:[{conditions:[SJ,YJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,WJ]},AJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:zJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[WJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[MJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:c1,headers:c1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:RJ,rules:[{conditions:[AJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},QJ=s10});var $10,ZJ=(f,h={})=>{return $10.get(f,()=>nh(QJ,{endpointParams:f,logger:h.logger}))};var JJ=B(()=>{N$();cf();KJ();$10=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});t1.aws=eh});var VJ,PJ,HJ=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??ZJ,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??eZ,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new VJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new PJ.NoAuthSigner}],logger:f?.logger??new nf,serviceId:f?.serviceId??"SSO",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??vs}};var NJ=B(()=>{VJ=o(O0(),1),PJ=o(m0(),1);J();uw();YE();bs();C8();JJ()});var DJ="AWS_EXECUTION_ENV",W8="AWS_REGION",A8="AWS_DEFAULT_REGION",qJ="AWS_EC2_METADATA_DISABLED",kJ,yJ="/latest/meta-data/placement/region";var jJ=B(()=>{kJ=["in-region","cross-region","mobile","standard","legacy"]});var OJ;var lJ=B(()=>{OJ={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"}});var cs=({region:f=z0(Mh),defaultsMode:h=z0(OJ)}={})=>fw(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return r10(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${kJ.join(", ")}, got ${w}`)}}),r10=async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await E10();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},E10=async()=>{if(process.env[DJ]&&(process.env[W8]||process.env[A8]))return process.env[W8]??process.env[A8];if(!process.env[qJ])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(() => (fr(),t$)),w=await f();return(await h({...w,path:yJ})).toString()}catch(f){}};var vJ=B(()=>{Qh();Jh();Y0();jJ();lJ()});var ME=B(()=>{vJ()});var bJ,mJ=(f)=>{Is(process.version);let h=cs(f),w=()=>h().then(Cs),s=HJ(f);bJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:uZ.version}),maxAttempts:f?.maxAttempts??z0(ss,f),region:f?.region??z0(Mh,{...nw,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...rs,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??Cw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??z0(xw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(_w,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};var dJ=B(()=>{oZ();bJ=o(O0(),1);RE();Qh();XE();Ew();Jh();wr();SE();wf();NJ();J();ME();J()});var gs=(f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},xs=(f)=>{return{region:f.region()}};var iJ=()=>{};var cJ=()=>{};var gJ=B(()=>{cJ()});var xJ=B(()=>{iJ();gJ()});var QE=B(()=>{xJ()});var _J=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},nJ=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var eJ=(f,h)=>{let w=Object.assign(gs(f),Ls(f),Jw(f),_J(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,xs(w),Bs(w),Vw(w),nJ(w))};var aJ=B(()=>{QE();C1();J()});var _s,of;var Lr=B(()=>{E4();U4();T4();m$();Qh();_s=o(m0(),1);$5();D();Ew();J();C8();ks();dJ();aJ();of=class of extends $w{config;constructor(...[f]){let h=mJ(f||{});super(h);this.initConfig=h;let w=pZ(h),s=Ow(w),$=$s(s),r=ew($),E=Pw(r),U=tw(E),T=aZ(U),F=eJ(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(cw(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(aw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(Dw(this.config)),this.middlewareStack.use(_s.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:nZ,identityProviderConfigProvider:async(C)=>new _s.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(_s.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var uf;var z8=B(()=>{J();uf=class uf extends $f{constructor(f){super(f);Object.setPrototypeOf(this,uf.prototype)}}});var KE,ZE,JE,VE,pJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),T10=(f)=>({...f,...f.secretAccessKey&&{secretAccessKey:T0},...f.sessionToken&&{sessionToken:T0}}),oJ=(f)=>({...f,...f.roleCredentials&&{roleCredentials:T10(f.roleCredentials)}}),uJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),tJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),fV=(f)=>({...f,...f.accessToken&&{accessToken:T0}});var Iw=B(()=>{J();z8();KE=class KE extends uf{name="InvalidRequestException";$fault="client";constructor(f){super({name:"InvalidRequestException",$fault:"client",...f});Object.setPrototypeOf(this,KE.prototype)}};ZE=class ZE extends uf{name="ResourceNotFoundException";$fault="client";constructor(f){super({name:"ResourceNotFoundException",$fault:"client",...f});Object.setPrototypeOf(this,ZE.prototype)}};JE=class JE extends uf{name="TooManyRequestsException";$fault="client";constructor(f){super({name:"TooManyRequestsException",$fault:"client",...f});Object.setPrototypeOf(this,JE.prototype)}};VE=class VE extends uf{name="UnauthorizedException";$fault="client";constructor(f){super({name:"UnauthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,VE.prototype)}}});var Oh,Br,hV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},p$,{[NE]:f[HE]});w.bp("/federation/credentials");let $=Y({[W10]:[,j(f[G10],"roleName")],[CV]:[,j(f[FV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},wV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},p$,{[NE]:f[HE]});w.bp("/assignment/roles");let $=Y({[GV]:[,f[BV]],[LV]:[()=>f.maxResults!==void 0,()=>f[IV].toString()],[CV]:[,j(f[FV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},sV=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},p$,{[NE]:f[HE]});w.bp("/assignment/accounts");let $=Y({[GV]:[,f[BV]],[LV]:[()=>f.maxResults!==void 0,()=>f[IV].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},$V=async(f,h)=>{let w=Br.requestBuilder(f,h),s=Y({},p$,{[NE]:f[HE]});w.bp("/logout");let $;return w.m("POST").h(s).b($),w.build()},rV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{roleCredentials:v});return Object.assign(w,$),w},EV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{nextToken:G,roleList:v});return Object.assign(w,$),w},UV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{accountList:v,nextToken:G});return Object.assign(w,$),w},TV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return PE(f,h);let w=Y({$metadata:lh(f)});return await G1.collectBody(f.body,h),w},PE=async(f,h)=>{let w={...f,body:await Oh.parseJsonErrorBody(f.body,h)},s=Oh.loadRestJsonErrorCode(f,w.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await C10(w,h);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await I10(w,h);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await L10(w,h);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await B10(w,h);default:let $=w.body;return F10({output:f,parsedBody:$,errorCode:s})}},F10,C10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new KE({$metadata:lh(f),...w});return l(r,f.body)},I10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new ZE({$metadata:lh(f),...w});return l(r,f.body)},L10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new JE({$metadata:lh(f),...w});return l(r,f.body)},B10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new VE({$metadata:lh(f),...w});return l(r,f.body)},lh=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),FV="accountId",HE="accessToken",CV="account_id",IV="maxResults",LV="max_result",BV="nextToken",GV="next_token",G10="roleName",W10="role_name",NE="x-amz-sso_bearer_token";var Gr=B(()=>{Oh=o(O0(),1),Br=o(m0(),1);J();Iw();z8();F10=Fs(uf)});var Wr;var R8=B(()=>{D();k();J();ks();Iw();Gr();Wr=class Wr extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(pJ,oJ).ser(hV).de(rV).build(){}});var Ar;var DE=B(()=>{D();k();J();ks();Iw();Gr();Ar=class Ar extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(uJ,void 0).ser(wV).de(EV).build(){}});var zr;var qE=B(()=>{D();k();J();ks();Iw();Gr();zr=class zr extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(tJ,void 0).ser(sV).de(UV).build(){}});var X8;var S8=B(()=>{D();k();J();ks();Iw();Gr();X8=class X8 extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(fV,void 0).ser($V).de(TV).build(){}});var A10,WV;var AV=B(()=>{J();R8();DE();qE();S8();Lr();A10={GetRoleCredentialsCommand:Wr,ListAccountRolesCommand:Ar,ListAccountsCommand:zr,LogoutCommand:X8};WV=class WV extends of{};Us(A10,WV)});var zV=B(()=>{R8();DE();qE();S8()});var RV=()=>{};var XV,ZR0;var SV=B(()=>{XV=o(m0(),1);DE();Lr();ZR0=XV.createPaginator(of,Ar,"nextToken","nextToken","maxResults")});var YV,HR0;var MV=B(()=>{YV=o(m0(),1);qE();Lr();HR0=YV.createPaginator(of,zr,"nextToken","nextToken","maxResults")});var QV=B(()=>{RV();SV();MV()});var KV=B(()=>{Iw()});var ZV=B(()=>{Lr();AV();zV();QV();KV()});var JV={};Ch(JV,{SSOClient:()=>of,GetRoleCredentialsCommand:()=>Wr});var VV=B(()=>{ZV()});var Y8,Rr=!1,M8=async({ssoStartUrl:f,ssoSession:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoClient:r,clientConfig:E,parentClientConfig:U,profile:T,logger:F})=>{let C,I="To refresh this SSO session run aws sso login with the corresponding profile.";if(h)try{let X0=await dZ({profile:T})();C={accessToken:X0.token,expiresAt:new Date(X0.expiration).toISOString()}}catch(X0){throw new a(X0.message,{tryNextLink:Rr,logger:F})}else try{C=await U5(f)}catch(X0){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:Rr,logger:F})}if(new Date(C.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:Rr,logger:F});let{accessToken:L}=C,{SSOClient:W,GetRoleCredentialsCommand:X}=await Promise.resolve().then(() => (VV(),JV)),Q=r||new W(Object.assign({},E??{},{logger:E?.logger??U?.logger,region:E?.region??s})),M;try{M=await Q.send(new X({accountId:w,roleName:$,accessToken:L}))}catch(X0){throw new a(X0,{tryNextLink:Rr,logger:F})}let{roleCredentials:{accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:n,credentialScope:L0,accountId:b0}={}}=M;if(!q||!N||!y||!n)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:Rr,logger:F});let r1={accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:new Date(n),...L0&&{credentialScope:L0},...b0&&{accountId:b0}};if(h)Y8.setCredentialFeature(r1,"CREDENTIALS_SSO","s");else Y8.setCredentialFeature(r1,"CREDENTIALS_SSO_LEGACY","u");return r1};var PV=B(()=>{Y8=o(I1(),1);xZ();Y0();hf()});var Q8=(f,h)=>{let{sso_start_url:w,sso_account_id:s,sso_region:$,sso_role_name:r}=f;if(!w||!s||!$||!r)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(f).join(", ")}
51
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:h});return f};var K8=B(()=>{Y0()});var z10=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:w,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoSession:E}=f,{ssoClient:U}=f,T=y1({profile:f.profile??h?.profile});if(!w&&!s&&!$&&!r&&!E){let C=(await Zh(f))[T];if(!C)throw new a(`Profile ${T} was not found.`,{logger:f.logger});if(!U3(C))throw new a(`Profile ${T} is not configured with SSO credentials.`,{logger:f.logger});if(C?.sso_session){let q=(await C5(f))[C.sso_session],N=` configurations in profile ${T} and sso-session ${C.sso_session}`;if($&&$!==q.sso_region)throw new a("Conflicting SSO region"+N,{tryNextLink:!1,logger:f.logger});if(w&&w!==q.sso_start_url)throw new a("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:f.logger});C.sso_region=q.sso_region,C.sso_start_url=q.sso_start_url}let{sso_start_url:I,sso_account_id:L,sso_region:W,sso_role_name:X,sso_session:Q}=Q8(C,f.logger);return M8({ssoStartUrl:I,ssoSession:Q,ssoAccountId:L,ssoRegion:W,ssoRoleName:X,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})}else if(!w||!s||!$||!r)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:f.logger});else return M8({ssoStartUrl:w,ssoSession:E,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})};var HV=B(()=>{Y0();hf();PV();K8()});var NV=()=>{};var Z8={};Ch(Z8,{validateSsoProfile:()=>Q8,isSsoProfile:()=>U3,fromSSO:()=>z10});var J8=B(()=>{HV();NV();K8()});var DV,qV=(f,h,w)=>{let s={EcsContainer:async($)=>{let{fromHttp:r}=await Promise.resolve().then(() => (E3(),r3)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (fr(),t$));return w?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>xf(r($??{}),E($))().then(V8)},Ec2InstanceMetadata:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:r}=await Promise.resolve().then(() => (fr(),t$));return async()=>r($)().then(V8)},Environment:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:r}=await Promise.resolve().then(() => (gF(),XY));return async()=>r($)().then(V8)}};if(f in s)return s[f];else throw new a(`Unsupported credential source in profile ${h}. Got ${f}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:w})},V8=(f)=>DV.setCredentialFeature(f,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var kV=B(()=>{DV=o(I1(),1);Y0()});var P8=H((jV)=>{Object.defineProperty(jV,"__esModule",{value:!0});jV.resolveHttpAuthSchemeConfig=jV.resolveStsAuthConfig=jV.defaultSTSHttpAuthSchemeProvider=jV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var R10=O0(),yV=Ih(),X10=Xr(),S10=async(f,h,w)=>{return{operation:yV.getSmithyContext(h).operation,region:await yV.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};jV.defaultSTSHttpAuthSchemeParametersProvider=S10;function Y10(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function M10(f){return{schemeId:"smithy.api#noAuth"}}var Q10=(f)=>{let h=[];switch(f.operation){case"AssumeRoleWithWebIdentity":{h.push(M10(f));break}default:h.push(Y10(f))}return h};jV.defaultSTSHttpAuthSchemeProvider=Q10;var K10=(f)=>Object.assign(f,{stsClientCtor:X10.STSClient});jV.resolveStsAuthConfig=K10;var Z10=(f)=>{let h=jV.resolveStsAuthConfig(f),w=R10.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};jV.resolveHttpAuthSchemeConfig=Z10});var Sr=H((vV)=>{Object.defineProperty(vV,"__esModule",{value:!0});vV.commonParams=vV.resolveClientEndpointParameters=void 0;var P10=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,defaultSigningName:"sts"})};vV.resolveClientEndpointParameters=P10;vV.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var FP=H((UP)=>{Object.defineProperty(UP,"__esModule",{value:!0});UP.ruleSet=void 0;var oV="required",t="type",W0="fn",A0="argv",bh="ref",mV=!1,H8=!0,vh="booleanEquals",w1="stringEquals",uV="sigv4",tV="sts",fP="us-east-1",D0="endpoint",dV="https://sts.{Region}.{PartitionResult#dnsSuffix}",Pf="tree",ns="error",D8="getAttr",iV={[oV]:!1,[t]:"String"},N8={[oV]:!0,default:!1,[t]:"Boolean"},hP={[bh]:"Endpoint"},cV={[W0]:"isSet",[A0]:[{[bh]:"Region"}]},s1={[bh]:"Region"},gV={[W0]:"aws.partition",[A0]:[s1],assign:"PartitionResult"},wP={[bh]:"UseFIPS"},sP={[bh]:"UseDualStack"},U1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:uV,signingName:tV,signingRegion:fP}]},headers:{}},J1={},xV={conditions:[{[W0]:w1,[A0]:[s1,"aws-global"]}],[D0]:U1,[t]:D0},$P={[W0]:vh,[A0]:[wP,!0]},rP={[W0]:vh,[A0]:[sP,!0]},_V={[W0]:D8,[A0]:[{[bh]:"PartitionResult"},"supportsFIPS"]},EP={[bh]:"PartitionResult"},nV={[W0]:vh,[A0]:[!0,{[W0]:D8,[A0]:[EP,"supportsDualStack"]}]},eV=[{[W0]:"isSet",[A0]:[hP]}],aV=[$P],pV=[rP],N10={version:"1.0",parameters:{Region:iV,UseDualStack:N8,UseFIPS:N8,Endpoint:iV,UseGlobalEndpoint:N8},rules:[{conditions:[{[W0]:vh,[A0]:[{[bh]:"UseGlobalEndpoint"},H8]},{[W0]:"not",[A0]:eV},cV,gV,{[W0]:vh,[A0]:[wP,mV]},{[W0]:vh,[A0]:[sP,mV]}],rules:[{conditions:[{[W0]:w1,[A0]:[s1,"ap-northeast-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"ap-south-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"ap-southeast-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"ap-southeast-2"]}],endpoint:U1,[t]:D0},xV,{conditions:[{[W0]:w1,[A0]:[s1,"ca-central-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"eu-central-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"eu-north-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"eu-west-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"eu-west-2"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"eu-west-3"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"sa-east-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,fP]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"us-east-2"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"us-west-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[A0]:[s1,"us-west-2"]}],endpoint:U1,[t]:D0},{endpoint:{url:dV,properties:{authSchemes:[{name:uV,signingName:tV,signingRegion:"{Region}"}]},headers:J1},[t]:D0}],[t]:Pf},{conditions:eV,rules:[{conditions:aV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[t]:ns},{conditions:pV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[t]:ns},{endpoint:{url:hP,properties:J1,headers:J1},[t]:D0}],[t]:Pf},{conditions:[cV],rules:[{conditions:[gV],rules:[{conditions:[$P,rP],rules:[{conditions:[{[W0]:vh,[A0]:[H8,_V]},nV],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[t]:ns}],[t]:Pf},{conditions:aV,rules:[{conditions:[{[W0]:vh,[A0]:[_V,H8]}],rules:[{conditions:[{[W0]:w1,[A0]:[{[W0]:D8,[A0]:[EP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:J1,headers:J1},[t]:D0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"FIPS is enabled but this partition does not support FIPS",[t]:ns}],[t]:Pf},{conditions:pV,rules:[{conditions:[nV],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"DualStack is enabled but this partition does not support DualStack",[t]:ns}],[t]:Pf},xV,{endpoint:{url:dV,properties:J1,headers:J1},[t]:D0}],[t]:Pf}],[t]:Pf},{error:"Invalid Configuration: Missing Region",[t]:ns}]};UP.ruleSet=N10});var LP=H((CP)=>{Object.defineProperty(CP,"__esModule",{value:!0});CP.defaultEndpointResolver=void 0;var D10=d5(),q8=b5(),q10=FP(),k10=new q8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),y10=(f,h={})=>{return k10.get(f,()=>q8.resolveEndpoint(q10.ruleSet,{endpointParams:f,logger:h.logger}))};CP.defaultEndpointResolver=y10;q8.customEndpointFunctions.aws=D10.awsEndpointFunctions});var zP=H((WP)=>{Object.defineProperty(WP,"__esModule",{value:!0});WP.getRuntimeConfig=void 0;var j10=O0(),O10=m0(),l10=J0(),v10=Ur(),BP=Bh(),GP=u1(),b10=P8(),m10=LP(),d10=(f)=>{return{apiVersion:"2011-06-15",base64Decoder:f?.base64Decoder??BP.fromBase64,base64Encoder:f?.base64Encoder??BP.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??m10.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??b10.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new j10.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new O10.NoAuthSigner}],logger:f?.logger??new l10.NoOpLogger,serviceId:f?.serviceId??"STS",urlParser:f?.urlParser??v10.parseUrl,utf8Decoder:f?.utf8Decoder??GP.fromUtf8,utf8Encoder:f?.utf8Encoder??GP.toUtf8}};WP.getRuntimeConfig=d10});var KP=H((MP)=>{Object.defineProperty(MP,"__esModule",{value:!0});MP.getRuntimeConfig=void 0;var i10=l4(),c10=i10.__importDefault(i3()),RP=O0(),XP=g3(),kE=Ss(),g10=m0(),x10=n3(),SP=Fr(),es=Qs(),YP=X4(),_10=e3(),n10=rE(),e10=zP(),a10=J0(),p10=$8(),o10=J0(),u10=(f)=>{o10.emitWarningIfUnsupportedVersion(process.version);let h=p10.resolveDefaultsModeConfig(f),w=()=>h().then(a10.loadConfigsForDefaultMode),s=e10.getRuntimeConfig(f);RP.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??_10.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??XP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:c10.default.version}),httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await f.credentialDefaultProvider(E?.__config||{})()),signer:new RP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new g10.NoAuthSigner}],maxAttempts:f?.maxAttempts??es.loadConfig(SP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??es.loadConfig(kE.NODE_REGION_CONFIG_OPTIONS,{...kE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:YP.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??es.loadConfig({...SP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||n10.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??x10.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??YP.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??es.loadConfig(kE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??es.loadConfig(kE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??es.loadConfig(XP.NODE_APP_ID_CONFIG_OPTIONS,$)}};MP.getRuntimeConfig=u10});var VP=H((ZP)=>{Object.defineProperty(ZP,"__esModule",{value:!0});ZP.resolveHttpAuthRuntimeConfig=ZP.getHttpAuthExtensionConfiguration=void 0;var t10=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}};ZP.getHttpAuthExtensionConfiguration=t10;var ff0=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};ZP.resolveHttpAuthRuntimeConfig=ff0});var yP=H((qP)=>{Object.defineProperty(qP,"__esModule",{value:!0});qP.resolveRuntimeExtensions=void 0;var PP=r8(),HP=t0(),NP=J0(),DP=VP(),wf0=(f,h)=>{let w=Object.assign(PP.getAwsRegionExtensionConfiguration(f),NP.getDefaultExtensionConfiguration(f),HP.getHttpHandlerExtensionConfiguration(f),DP.getHttpAuthExtensionConfiguration(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,PP.resolveAwsRegionExtensionConfiguration(w),NP.resolveDefaultRuntimeConfig(w),HP.resolveHttpHandlerRuntimeConfig(w),DP.resolveHttpAuthRuntimeConfig(w))};qP.resolveRuntimeExtensions=wf0});var Xr=H((y8)=>{Object.defineProperty(y8,"__esModule",{value:!0});y8.STSClient=y8.__Client=void 0;var jP=T3(),sf0=C3(),$f0=L3(),OP=g5(),rf0=Ss(),k8=m0(),Ef0=Y3(),Uf0=Ks(),lP=Fr(),bP=J0();Object.defineProperty(y8,"__Client",{enumerable:!0,get:function(){return bP.Client}});var vP=P8(),Tf0=Sr(),Ff0=KP(),Cf0=yP();class mP extends bP.Client{config;constructor(...[f]){let h=Ff0.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=Tf0.resolveClientEndpointParameters(h),s=OP.resolveUserAgentConfig(w),$=lP.resolveRetryConfig(s),r=rf0.resolveRegionConfig($),E=jP.resolveHostHeaderConfig(r),U=Uf0.resolveEndpointConfig(E),T=vP.resolveHttpAuthSchemeConfig(U),F=Cf0.resolveRuntimeExtensions(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(OP.getUserAgentPlugin(this.config)),this.middlewareStack.use(lP.getRetryPlugin(this.config)),this.middlewareStack.use(Ef0.getContentLengthPlugin(this.config)),this.middlewareStack.use(jP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(sf0.getLoggerPlugin(this.config)),this.middlewareStack.use($f0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(k8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:vP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(C)=>new k8.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(k8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}y8.STSClient=mP});var I6=H((RX0,C6)=>{var{defineProperty:yE,getOwnPropertyDescriptor:If0,getOwnPropertyNames:Lf0}=Object,Bf0=Object.prototype.hasOwnProperty,e=(f,h)=>yE(f,"name",{value:h,configurable:!0}),Gf0=(f,h)=>{for(var w in h)yE(f,w,{get:h[w],enumerable:!0})},s6=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Lf0(h))if(!Bf0.call(f,$)&&$!==w)yE(f,$,{get:()=>h[$],enumerable:!(s=If0(h,$))||s.enumerable})}return f},Wf0=(f,h,w)=>(s6(f,h,"default"),w&&s6(w,h,"default")),Af0=(f)=>s6(yE({},"__esModule",{value:!0}),f),r6={};Gf0(r6,{AssumeRoleCommand:()=>T6,AssumeRoleResponseFilterSensitiveLog:()=>gP,AssumeRoleWithWebIdentityCommand:()=>F6,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>oP,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>uP,ClientInputEndpointParameters:()=>Th0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>E6,ExpiredTokenException:()=>xP,IDPCommunicationErrorException:()=>tP,IDPRejectedClaimException:()=>aP,InvalidIdentityTokenException:()=>pP,MalformedPolicyDocumentException:()=>_P,PackedPolicyTooLargeException:()=>nP,RegionDisabledException:()=>eP,STS:()=>CH,STSServiceException:()=>fh,decorateDefaultCredentialProvider:()=>Ih0,getDefaultRoleAssumer:()=>AH,getDefaultRoleAssumerWithWebIdentity:()=>zH});C6.exports=Af0(r6);Wf0(r6,Xr(),C6.exports);var zf0=J0(),Rf0=Ks(),Xf0=qw(),Sf0=J0(),Yf0=Sr(),cP=J0(),Mf0=J0(),fh=class f extends Mf0.ServiceException{static{e(this,"STSServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},E6=e((f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:cP.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),gP=e((f)=>({...f,...f.Credentials&&{Credentials:E6(f.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),xP=class f extends fh{static{e(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},_P=class f extends fh{static{e(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},nP=class f extends fh{static{e(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},eP=class f extends fh{static{e(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},aP=class f extends fh{static{e(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},pP=class f extends fh{static{e(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},oP=e((f)=>({...f,...f.WebIdentityToken&&{WebIdentityToken:cP.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),uP=e((f)=>({...f,...f.Credentials&&{Credentials:E6(f.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),tP=class f extends fh{static{e(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},U6=O0(),Qf0=t0(),R0=J0(),Kf0=e(async(f,h)=>{let w=rH,s;return s=FH({...jf0(f,h),[UH]:tf0,[TH]:EH}),$H(h,w,"/",void 0,s)},"se_AssumeRoleCommand"),Zf0=e(async(f,h)=>{let w=rH,s;return s=FH({...Of0(f,h),[UH]:fh0,[TH]:EH}),$H(h,w,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),Jf0=e(async(f,h)=>{if(f.statusCode>=300)return fH(f,h);let w=await U6.parseXmlBody(f.body,h),s={};return s=cf0(w.AssumeRoleResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleCommand"),Vf0=e(async(f,h)=>{if(f.statusCode>=300)return fH(f,h);let w=await U6.parseXmlBody(f.body,h),s={};return s=gf0(w.AssumeRoleWithWebIdentityResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleWithWebIdentityCommand"),fH=e(async(f,h)=>{let w={...f,body:await U6.parseXmlErrorBody(f.body,h)},s=hh0(f,w.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Pf0(w,h);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await qf0(w,h);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await kf0(w,h);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await yf0(w,h);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Hf0(w,h);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Nf0(w,h);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Df0(w,h);default:let $=w.body;return uf0({output:f,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),Pf0=e(async(f,h)=>{let w=f.body,s=xf0(w.Error,h),$=new xP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_ExpiredTokenExceptionRes"),Hf0=e(async(f,h)=>{let w=f.body,s=_f0(w.Error,h),$=new tP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_IDPCommunicationErrorExceptionRes"),Nf0=e(async(f,h)=>{let w=f.body,s=nf0(w.Error,h),$=new aP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_IDPRejectedClaimExceptionRes"),Df0=e(async(f,h)=>{let w=f.body,s=ef0(w.Error,h),$=new pP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_InvalidIdentityTokenExceptionRes"),qf0=e(async(f,h)=>{let w=f.body,s=af0(w.Error,h),$=new _P({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_MalformedPolicyDocumentExceptionRes"),kf0=e(async(f,h)=>{let w=f.body,s=pf0(w.Error,h),$=new nP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_PackedPolicyTooLargeExceptionRes"),yf0=e(async(f,h)=>{let w=f.body,s=of0(w.Error,h),$=new eP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_RegionDisabledExceptionRes"),jf0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[ts]!=null){let s=hH(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[os]!=null)w[os]=f[os];if(f[o8]!=null){let s=if0(f[o8],h);if(f[o8]?.length===0)w.Tags=[];Object.entries(s).forEach(([$,r])=>{let E=`Tags.${$}`;w[E]=r})}if(f[t8]!=null){let s=df0(f[t8],h);if(f[t8]?.length===0)w.TransitiveTagKeys=[];Object.entries(s).forEach(([$,r])=>{let E=`TransitiveTagKeys.${$}`;w[E]=r})}if(f[d8]!=null)w[d8]=f[d8];if(f[a8]!=null)w[a8]=f[a8];if(f[u8]!=null)w[u8]=f[u8];if(f[tf]!=null)w[tf]=f[tf];if(f[g8]!=null){let s=bf0(f[g8],h);if(f[g8]?.length===0)w.ProvidedContexts=[];Object.entries(s).forEach(([$,r])=>{let E=`ProvidedContexts.${$}`;w[E]=r})}return w},"se_AssumeRoleRequest"),Of0=e((f,h)=>{let w={};if(f[h$]!=null)w[h$]=f[h$];if(f[w$]!=null)w[w$]=f[w$];if(f[h6]!=null)w[h6]=f[h6];if(f[x8]!=null)w[x8]=f[x8];if(f[ts]!=null){let s=hH(f[ts],h);if(f[ts]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[us]!=null)w[us]=f[us];if(f[os]!=null)w[os]=f[os];return w},"se_AssumeRoleWithWebIdentityRequest"),hH=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=lf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_policyDescriptorListType"),lf0=e((f,h)=>{let w={};if(f[w6]!=null)w[w6]=f[w6];return w},"se_PolicyDescriptorType"),vf0=e((f,h)=>{let w={};if(f[c8]!=null)w[c8]=f[c8];if(f[b8]!=null)w[b8]=f[b8];return w},"se_ProvidedContext"),bf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=vf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_ProvidedContextsListType"),mf0=e((f,h)=>{let w={};if(f[i8]!=null)w[i8]=f[i8];if(f[f6]!=null)w[f6]=f[f6];return w},"se_Tag"),df0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;w[`member.${s}`]=$,s++}return w},"se_tagKeyListType"),if0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=mf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_tagListType"),wH=e((f,h)=>{let w={};if(f[O8]!=null)w[O8]=R0.expectString(f[O8]);if(f[l8]!=null)w[l8]=R0.expectString(f[l8]);return w},"de_AssumedRoleUser"),cf0=e((f,h)=>{let w={};if(f[ps]!=null)w[ps]=sH(f[ps],h);if(f[as]!=null)w[as]=wH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[tf]!=null)w[tf]=R0.expectString(f[tf]);return w},"de_AssumeRoleResponse"),gf0=e((f,h)=>{let w={};if(f[ps]!=null)w[ps]=sH(f[ps],h);if(f[e8]!=null)w[e8]=R0.expectString(f[e8]);if(f[as]!=null)w[as]=wH(f[as],h);if(f[f$]!=null)w[f$]=R0.strictParseInt32(f[f$]);if(f[_8]!=null)w[_8]=R0.expectString(f[_8]);if(f[v8]!=null)w[v8]=R0.expectString(f[v8]);if(f[tf]!=null)w[tf]=R0.expectString(f[tf]);return w},"de_AssumeRoleWithWebIdentityResponse"),sH=e((f,h)=>{let w={};if(f[j8]!=null)w[j8]=R0.expectString(f[j8]);if(f[n8]!=null)w[n8]=R0.expectString(f[n8]);if(f[p8]!=null)w[p8]=R0.expectString(f[p8]);if(f[m8]!=null)w[m8]=R0.expectNonNull(R0.parseRfc3339DateTimeWithOffset(f[m8]));return w},"de_Credentials"),xf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_ExpiredTokenException"),_f0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPCommunicationErrorException"),nf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPRejectedClaimException"),ef0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_InvalidIdentityTokenException"),af0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_MalformedPolicyDocumentException"),pf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_PackedPolicyTooLargeException"),of0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_RegionDisabledException"),hh=e((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),uf0=R0.withBaseException(fh),$H=e(async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new Qf0.HttpRequest(F)},"buildHttpRpcRequest"),rH={"content-type":"application/x-www-form-urlencoded"},EH="2011-06-15",UH="Action",j8="AccessKeyId",tf0="AssumeRole",O8="AssumedRoleId",as="AssumedRoleUser",fh0="AssumeRoleWithWebIdentity",l8="Arn",v8="Audience",ps="Credentials",b8="ContextAssertion",os="DurationSeconds",m8="Expiration",d8="ExternalId",i8="Key",us="Policy",ts="PolicyArns",c8="ProviderArn",g8="ProvidedContexts",x8="ProviderId",f$="PackedPolicySize",_8="Provider",h$="RoleArn",w$="RoleSessionName",n8="SecretAccessKey",e8="SubjectFromWebIdentityToken",tf="SourceIdentity",a8="SerialNumber",p8="SessionToken",o8="Tags",u8="TokenCode",t8="TransitiveTagKeys",TH="Version",f6="Value",h6="WebIdentityToken",w6="arn",i0="message",FH=e((f)=>Object.entries(f).map(([h,w])=>R0.extendedEncodeURIComponent(h)+"="+R0.extendedEncodeURIComponent(w)).join("&"),"buildFormUrlencodedString"),hh0=e((f,h)=>{if(h.Error?.Code!==void 0)return h.Error.Code;if(f.statusCode==404)return"NotFound"},"loadQueryErrorCode"),T6=class extends Sf0.Command.classBuilder().ep(Yf0.commonParams).m(function(f,h,w,s){return[Xf0.getSerdePlugin(w,this.serialize,this.deserialize),Rf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,gP).ser(Kf0).de(Jf0).build(){static{e(this,"AssumeRoleCommand")}},wh0=Ks(),sh0=qw(),$h0=J0(),rh0=Sr(),F6=class extends $h0.Command.classBuilder().ep(rh0.commonParams).m(function(f,h,w,s){return[sh0.getSerdePlugin(w,this.serialize,this.deserialize),wh0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(oP,uP).ser(Zf0).de(Vf0).build(){static{e(this,"AssumeRoleWithWebIdentityCommand")}},Eh0=Xr(),Uh0={AssumeRoleCommand:T6,AssumeRoleWithWebIdentityCommand:F6},CH=class extends Eh0.STSClient{static{e(this,"STS")}};zf0.createAggregatedClient(Uh0,CH);var Th0=Sr(),$6=I1(),iP="us-east-1",IH=e((f)=>{if(typeof f?.Arn==="string"){let h=f.Arn.split(":");if(h.length>4&&h[4]!=="")return h[4]}return},"getAccountIdFromAssumedRoleUser"),LH=e(async(f,h,w)=>{let s=typeof f==="function"?await f():f,$=typeof h==="function"?await h():h;return w?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${iP} (STS default)`),s??$??iP},"resolveRegion"),Fh0=e((f,h)=>{let w,s;return async($,r)=>{if(s=$,!w){let{logger:C=f?.parentClientConfig?.logger,region:I,requestHandler:L=f?.parentClientConfig?.requestHandler,credentialProviderLogger:W}=f,X=await LH(I,f?.parentClientConfig?.region,W),Q=!BH(L);w=new h({profile:f?.parentClientConfig?.profile,credentialDefaultProvider:e(()=>async()=>s,"credentialDefaultProvider"),region:X,requestHandler:Q?L:void 0,logger:C})}let{Credentials:E,AssumedRoleUser:U}=await w.send(new T6(r));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);let T=IH(U),F={accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...T&&{accountId:T}};return $6.setCredentialFeature(F,"CREDENTIALS_STS_ASSUME_ROLE","i"),F}},"getDefaultRoleAssumer"),Ch0=e((f,h)=>{let w;return async(s)=>{if(!w){let{logger:T=f?.parentClientConfig?.logger,region:F,requestHandler:C=f?.parentClientConfig?.requestHandler,credentialProviderLogger:I}=f,L=await LH(F,f?.parentClientConfig?.region,I),W=!BH(C);w=new h({profile:f?.parentClientConfig?.profile,region:L,requestHandler:W?C:void 0,logger:T})}let{Credentials:$,AssumedRoleUser:r}=await w.send(new F6(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let E=IH(r),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...E&&{accountId:E}};if(E)$6.setCredentialFeature(U,"RESOLVED_ACCOUNT_ID","T");return $6.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),U}},"getDefaultRoleAssumerWithWebIdentity"),BH=e((f)=>{return f?.metadata?.handlerProtocol==="h2"},"isH2"),GH=Xr(),WH=e((f,h)=>{if(!h)return f;else return class w extends f{static{e(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of h)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),AH=e((f={},h)=>Fh0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumer"),zH=e((f={},h)=>Ch0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumerWithWebIdentity"),Ih0=e((f)=>(h)=>f({roleAssumer:AH(h),roleAssumerWithWebIdentity:zH(h),...h}),"decorateDefaultCredentialProvider")});var L6,XH=(f,{profile:h="default",logger:w}={})=>{return Boolean(f)&&typeof f==="object"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1&&["undefined","string"].indexOf(typeof f.external_id)>-1&&["undefined","string"].indexOf(typeof f.mfa_serial)>-1&&(Lh0(f,{profile:h,logger:w})||Bh0(f,{profile:h,logger:w}))},Lh0=(f,{profile:h,logger:w})=>{let s=typeof f.source_profile==="string"&&typeof f.credential_source==="undefined";if(s)w?.debug?.(` ${h} isAssumeRoleWithSourceProfile source_profile=${f.source_profile}`);return s},Bh0=(f,{profile:h,logger:w})=>{let s=typeof f.credential_source==="string"&&typeof f.source_profile==="undefined";if(s)w?.debug?.(` ${h} isCredentialSourceProfile credential_source=${f.credential_source}`);return s},SH=async(f,h,w,s={})=>{w.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=h[f],{source_profile:r,region:E}=$;if(!w.roleAssumer){let{getDefaultRoleAssumer:T}=await Promise.resolve().then(() => o(I6(),1));w.roleAssumer=T({...w.clientConfig,credentialProviderLogger:w.logger,parentClientConfig:{...w?.parentClientConfig,region:E??w?.parentClientConfig?.region}},w.clientPlugins)}if(r&&r in s)throw new a(`Detected a cycle attempting to resolve credentials for profile ${y1(w)}. Profiles visited: `+Object.keys(s).join(", "),{logger:w.logger});w.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${r?`source_profile=[${r}]`:`profile=[${f}]`}`);let U=r?jE(r,h,w,{...s,[r]:!0},RH(h[r]??{})):(await qV($.credential_source,f,w.logger)(w))();if(RH($))return U.then((T)=>L6.setCredentialFeature(T,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let T={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:F}=$;if(F){if(!w.mfaCodeProvider)throw new a(`Profile ${f} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:w.logger,tryNextLink:!1});T.SerialNumber=F,T.TokenCode=await w.mfaCodeProvider(F)}let C=await U;return w.roleAssumer(C,T).then((I)=>L6.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},RH=(f)=>{return!f.role_arn&&!!f.credential_source};var YH=B(()=>{L6=o(I1(),1);Y0();hf();kV();B6()});var MH,QH=(f,h,w)=>{if(h.Version!==1)throw Error(`Profile ${f} credential_process did not return Version 1.`);if(h.AccessKeyId===void 0||h.SecretAccessKey===void 0)throw Error(`Profile ${f} credential_process returned invalid credentials.`);if(h.Expiration){let r=new Date;if(new Date(h.Expiration)<r)throw Error(`Profile ${f} credential_process returned expired credentials.`)}let s=h.AccountId;if(!s&&w?.[f]?.aws_account_id)s=w[f].aws_account_id;let $={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,...h.SessionToken&&{sessionToken:h.SessionToken},...h.Expiration&&{expiration:new Date(h.Expiration)},...h.CredentialScope&&{credentialScope:h.CredentialScope},...s&&{accountId:s}};return MH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var KH=B(()=>{MH=o(I1(),1)});import{exec as Gh0}from"node:child_process";import{promisify as Wh0}from"node:util";var ZH=async(f,h,w)=>{let s=h[f];if(h[f]){let $=s.credential_process;if($!==void 0){let r=Wh0(Gh0);try{let{stdout:E}=await r($),U;try{U=JSON.parse(E.trim())}catch{throw Error(`Profile ${f} credential_process returned invalid JSON.`)}return QH(f,U,h)}catch(E){throw new a(E.message,{logger:w})}}else throw new a(`Profile ${f} did not contain credential_process.`,{logger:w})}else throw new a(`Profile ${f} could not be found in shared credentials file.`,{logger:w})};var JH=B(()=>{Y0();KH()});var Ah0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let w=await Zh(f);return ZH(y1({profile:f.profile??h?.profile}),w,f.logger)};var VH=B(()=>{hf();JH()});var G6={};Ch(G6,{fromProcess:()=>Ah0});var W6=B(()=>{VH()});var PH,HH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.credential_process==="string",NH=async(f,h)=>Promise.resolve().then(() => (W6(),G6)).then(({fromProcess:w})=>w({...f,profile:h})().then((s)=>PH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var DH=B(()=>{PH=o(I1(),1)});var A6,qH=async(f,h,w={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (J8(),Z8));return s({profile:f,logger:w.logger,parentClientConfig:w.parentClientConfig,clientConfig:w.clientConfig})().then(($)=>{if(h.sso_session)return A6.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return A6.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},kH=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var yH=B(()=>{A6=o(I1(),1)});var jH,z6=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.aws_access_key_id==="string"&&typeof f.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof f.aws_session_token)>-1&&["undefined","string"].indexOf(typeof f.aws_account_id)>-1,R6=async(f,h)=>{h?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let w={accessKeyId:f.aws_access_key_id,secretAccessKey:f.aws_secret_access_key,sessionToken:f.aws_session_token,...f.aws_credential_scope&&{credentialScope:f.aws_credential_scope},...f.aws_account_id&&{accountId:f.aws_account_id}};return jH.setCredentialFeature(w,"CREDENTIALS_PROFILE","n")};var OH=B(()=>{jH=o(I1(),1)});var X6=(f)=>async(h)=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:w,roleSessionName:s,webIdentityToken:$,providerId:r,policyArns:E,policy:U,durationSeconds:T}=f,{roleAssumerWithWebIdentity:F}=f;if(!F){let{getDefaultRoleAssumerWithWebIdentity:C}=await Promise.resolve().then(() => o(I6(),1));F=C({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...h?.callerClientConfig,...f.parentClientConfig}},f.clientPlugins)}return F({RoleArn:w,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:r,PolicyArns:E,Policy:U,DurationSeconds:T})};import{readFileSync as zh0}from"node:fs";var vH,lH="AWS_WEB_IDENTITY_TOKEN_FILE",Rh0="AWS_ROLE_ARN",Xh0="AWS_ROLE_SESSION_NAME",Sh0=(f={})=>async()=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let h=f?.webIdentityTokenFile??process.env[lH],w=f?.roleArn??process.env[Rh0],s=f?.roleSessionName??process.env[Xh0];if(!h||!w)throw new a("Web identity configuration not specified",{logger:f.logger});let $=await X6({...f,webIdentityToken:zh0(h,{encoding:"ascii"}),roleArn:w,roleSessionName:s})();if(h===process.env[lH])vH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var bH=B(()=>{vH=o(I1(),1);Y0()});var S6={};Ch(S6,{fromWebToken:()=>X6,fromTokenFile:()=>Sh0});var Y6=B(()=>{bH()});var mH,dH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.web_identity_token_file==="string"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1,iH=async(f,h)=>Promise.resolve().then(() => (Y6(),S6)).then(({fromTokenFile:w})=>w({webIdentityTokenFile:f.web_identity_token_file,roleArn:f.role_arn,roleSessionName:f.role_session_name,roleAssumerWithWebIdentity:h.roleAssumerWithWebIdentity,logger:h.logger,parentClientConfig:h.parentClientConfig})().then((s)=>mH.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var cH=B(()=>{mH=o(I1(),1)});var jE=async(f,h,w,s={},$=!1)=>{let r=h[f];if(Object.keys(s).length>0&&z6(r))return R6(r,w);if($||XH(r,{profile:f,logger:w.logger}))return SH(f,h,w,s);if(z6(r))return R6(r,w);if(dH(r))return iH(r,w);if(HH(r))return NH(w,f);if(kH(r))return await qH(f,r,w);throw new a(`Could not resolve credentials using profile: [${f}] in configuration/credentials file(s).`,{logger:w.logger})};var B6=B(()=>{Y0();YH();DH();yH();OH();cH()});var Yh0=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Zh(w);return jE(y1({profile:f.profile??h?.profile}),s,w)};var gH=B(()=>{hf();B6()});var xH={};Ch(xH,{fromIni:()=>Yh0});var _H=B(()=>{gH()});E4();U4();T4();m$();Qh();var $$=o(m0(),1);$5();D();Ew();J();var UY=o(O0(),1);gf();var TY=async(f,h,w)=>{return{operation:Yh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Y_(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var FY=(f)=>{let h=[];switch(f.operation){default:h.push(Y_(f))}return h},CY=(f)=>{let h=UY.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var IY=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53"})},K={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var LY={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/credential-provider-node":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-route53":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var IN=o(O0(),1);gF();Y0();hf();Y0();var C9="AWS_EC2_METADATA_DISABLED",I9=async(f)=>{let{ENV_CMDS_FULL_URI:h,ENV_CMDS_RELATIVE_URI:w,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (fr(),t$));if(process.env[w]||process.env[h]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:r}=await Promise.resolve().then(() => (E3(),r3));return xf(r(f),s(f))}if(process.env[C9]&&process.env[C9]!=="false")return async()=>{throw new a("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(f)};var nH=!1,OE=(f={})=>fw(xf(async()=>{if(f.profile??process.env[DR]){if(process.env[Q5]&&process.env[K5]){if(!nH)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
48
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:h})};var h9=B(()=>{Y0()});function s9(f){return new n0({protocol:f.protocol,hostname:f.hostname,port:Number(f.port),path:f.pathname,query:Array.from(f.searchParams.entries()).reduce((h,[w,s])=>{return h[w]=s,h},{}),fragment:f.hash})}async function $9(f,h){let s=await w9.sdkStreamMixin(f.body).transformToString();if(f.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:h});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:dS($.Expiration)}}if(f.statusCode>=400&&f.statusCode<500){let $={};try{$=JSON.parse(s)}catch(r){}throw Object.assign(new a(`Server responded with status: ${f.statusCode}`,{logger:h}),{Code:$.Code,Message:$.Message})}throw new a(`Server responded with status: ${f.statusCode}`,{logger:h})}var w9;var r9=B(()=>{Y0();C1();J();w9=p(sT(),1)});var E9=(f,h,w)=>{return async()=>{for(let s=0;s<h;++s)try{return await f()}catch($){await new Promise((r)=>setTimeout(r,w))}return await f()}};import fn from"node:fs/promises";var U9,hn="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",wn="http://169.254.170.2",sn="AWS_CONTAINER_CREDENTIALS_FULL_URI",$n="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",rn="AWS_CONTAINER_AUTHORIZATION_TOKEN",T9=(f={})=>{f.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let h,w=f.awsContainerCredentialsRelativeUri??process.env[hn],s=f.awsContainerCredentialsFullUri??process.env[sn],$=f.awsContainerAuthorizationToken??process.env[rn],r=f.awsContainerAuthorizationTokenFile??process.env[$n],E=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console.warn:f.logger.warn;if(w&&s)E("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),E("awsContainerCredentialsFullUri will take precedence.");if($&&r)E("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),E("awsContainerAuthorizationToken will take precedence.");if(s)h=s;else if(w)h=`${wn}${w}`;else throw new a(`No HTTP credential provider host provided.
49
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:f.logger});let U=new URL(h);f9(U,f.logger);let T=new Ef({requestTimeout:f.timeout??1000,connectionTimeout:f.timeout??1000});return E9(async()=>{let F=s9(U);if($)F.headers.Authorization=$;else if(r)F.headers.Authorization=(await fn.readFile(r)).toString();try{let C=await T.handle(F);return $9(C.response).then((I)=>U9.setCredentialFeature(I,"CREDENTIALS_HTTP","z"))}catch(C){throw new a(String(C),{logger:f.logger})}},f.maxRetries??3,f.timeout??1000)};var F9=B(()=>{U9=p(I1(),1);p$();Y0();h9();r9()});var r3={};Ch(r3,{fromHttp:()=>T9});var E3=B(()=>{F9()});var U3=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var L9=300000,As="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var T3=H((_G0,A9)=>{var{defineProperty:Hr,getOwnPropertyDescriptor:En,getOwnPropertyNames:Un}=Object,Tn=Object.prototype.hasOwnProperty,Pr=(f,h)=>Hr(f,"name",{value:h,configurable:!0}),Fn=(f,h)=>{for(var w in h)Hr(f,w,{get:h[w],enumerable:!0})},Cn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Un(h))if(!Tn.call(f,$)&&$!==w)Hr(f,$,{get:()=>h[$],enumerable:!(s=En(h,$))||s.enumerable})}return f},In=(f)=>Cn(Hr({},"__esModule",{value:!0}),f),B9={};Fn(B9,{getHostHeaderPlugin:()=>Bn,hostHeaderMiddleware:()=>W9,hostHeaderMiddlewareOptions:()=>z9,resolveHostHeaderConfig:()=>G9});A9.exports=In(B9);var Ln=t0();function G9(f){return f}Pr(G9,"resolveHostHeaderConfig");var W9=Pr((f)=>(h)=>async(w)=>{if(!Ln.HttpRequest.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let r=s.hostname;if(s.port!=null)r+=`:${s.port}`;s.headers.host=r}return h(w)},"hostHeaderMiddleware"),z9={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Bn=Pr((f)=>({applyToStack:Pr((h)=>{h.add(W9(f),z9)},"applyToStack")}),"getHostHeaderPlugin")});var C3=H((nG0,Y9)=>{var{defineProperty:Nr,getOwnPropertyDescriptor:Gn,getOwnPropertyNames:Wn}=Object,zn=Object.prototype.hasOwnProperty,F3=(f,h)=>Nr(f,"name",{value:h,configurable:!0}),An=(f,h)=>{for(var w in h)Nr(f,w,{get:h[w],enumerable:!0})},Rn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Wn(h))if(!zn.call(f,$)&&$!==w)Nr(f,$,{get:()=>h[$],enumerable:!(s=Gn(h,$))||s.enumerable})}return f},Xn=(f)=>Rn(Nr({},"__esModule",{value:!0}),f),R9={};An(R9,{getLoggerPlugin:()=>Sn,loggerMiddleware:()=>X9,loggerMiddlewareOptions:()=>S9});Y9.exports=Xn(R9);var X9=F3(()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T,overrideOutputFilterSensitiveLog:F}=U,C=T??h.inputFilterSensitiveLog,I=F??h.outputFilterSensitiveLog,{$metadata:L,...W}=s.output;return E?.info?.({clientName:$,commandName:r,input:C(w.input),output:I(W),metadata:L}),s}catch(s){let{clientName:$,commandName:r,logger:E,dynamoDbDocumentClientOptions:U={}}=h,{overrideInputFilterSensitiveLog:T}=U,F=T??h.inputFilterSensitiveLog;throw E?.error?.({clientName:$,commandName:r,input:F(w.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),S9={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Sn=F3((f)=>({applyToStack:F3((h)=>{h.add(X9(),S9)},"applyToStack")}),"getLoggerPlugin")});var L3=H((eG0,Z9)=>{var{defineProperty:qr,getOwnPropertyDescriptor:Yn,getOwnPropertyNames:Mn}=Object,Qn=Object.prototype.hasOwnProperty,Dr=(f,h)=>qr(f,"name",{value:h,configurable:!0}),Kn=(f,h)=>{for(var w in h)qr(f,w,{get:h[w],enumerable:!0})},Zn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Mn(h))if(!Qn.call(f,$)&&$!==w)qr(f,$,{get:()=>h[$],enumerable:!(s=Yn(h,$))||s.enumerable})}return f},Jn=(f)=>Zn(qr({},"__esModule",{value:!0}),f),M9={};Kn(M9,{addRecursionDetectionMiddlewareOptions:()=>K9,getRecursionDetectionPlugin:()=>Nn,recursionDetectionMiddleware:()=>Q9});Z9.exports=Jn(M9);var Vn=t0(),I3="X-Amzn-Trace-Id",Pn="AWS_LAMBDA_FUNCTION_NAME",Hn="_X_AMZN_TRACE_ID",Q9=Dr((f)=>(h)=>async(w)=>{let{request:s}=w;if(!Vn.HttpRequest.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((T)=>T.toLowerCase()===I3.toLowerCase())??I3;if(s.headers.hasOwnProperty($))return h(w);let r=process.env[Pn],E=process.env[Hn],U=Dr((T)=>typeof T==="string"&&T.length>0,"nonEmptyString");if(U(r)&&U(E))s.headers[I3]=E;return h({...w,request:s})},"recursionDetectionMiddleware"),K9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Nn=Dr((f)=>({applyToStack:Dr((h)=>{h.add(Q9(f),K9)},"applyToStack")}),"getRecursionDetectionPlugin")});var jr=H((aG0,y9)=>{var{defineProperty:kr,getOwnPropertyDescriptor:Dn,getOwnPropertyNames:qn}=Object,kn=Object.prototype.hasOwnProperty,Q0=(f,h)=>kr(f,"name",{value:h,configurable:!0}),yn=(f,h)=>{for(var w in h)kr(f,w,{get:h[w],enumerable:!0})},jn=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of qn(h))if(!kn.call(f,$)&&$!==w)kr(f,$,{get:()=>h[$],enumerable:!(s=Dn(h,$))||s.enumerable})}return f},On=(f)=>jn(kr({},"__esModule",{value:!0}),f),J9={};yn(J9,{EndpointCache:()=>ln,EndpointError:()=>M1,customEndpointFunctions:()=>G3,isIpAddress:()=>V9,isValidHostLabel:()=>z3,resolveEndpoint:()=>se});y9.exports=On(J9);var ln=class{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}static{Q0(this,"EndpointCache")}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:r,done:E}=s.next();if(this.data.delete(r),E||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}},vn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),V9=Q0((f)=>vn.test(f)||f.startsWith("[")&&f.endsWith("]"),"isIpAddress"),bn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),z3=Q0((f,h=!1)=>{if(!h)return bn.test(f);let w=f.split(".");for(let s of w)if(!z3(s))return!1;return!0},"isValidHostLabel"),G3={},o$="endpoints";function ef(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${ef(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(ef).join(", ")})`;return JSON.stringify(f,null,2)}Q0(ef,"toDebugString");var M1=class extends Error{static{Q0(this,"EndpointError")}constructor(f){super(f);this.name="EndpointError"}},mn=Q0((f,h)=>f===h,"booleanEquals"),dn=Q0((f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new M1(`Path: '${f}' does not end with ']'`);let r=s.slice($+1,-1);if(Number.isNaN(parseInt(r)))throw new M1(`Invalid array index: '${r}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(r)}else w.push(s)}return w},"getAttrPathList"),P9=Q0((f,h)=>dn(h).reduce((w,s)=>{if(typeof w!=="object")throw new M1(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f),"getAttr"),cn=Q0((f)=>f!=null,"isSet"),gn=Q0((f)=>!f,"not"),W3=F1(),B3={[W3.EndpointURLScheme.HTTP]:80,[W3.EndpointURLScheme.HTTPS]:443},xn=Q0((f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:W,protocol:X="",path:Q="",query:M={}}=f,q=new URL(`${X}//${L}${W?`:${W}`:""}${Q}`);return q.search=Object.entries(M).map(([N,y])=>`${N}=${y}`).join("&"),q}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:r,protocol:E,search:U}=h;if(U)return null;let T=E.slice(0,-1);if(!Object.values(W3.EndpointURLScheme).includes(T))return null;let F=V9($),C=w.includes(`${s}:${B3[T]}`)||typeof f==="string"&&f.includes(`${s}:${B3[T]}`),I=`${s}${C?`:${B3[T]}`:""}`;return{scheme:T,authority:I,path:r,normalizedPath:r.endsWith("/")?r:`${r}/`,isIp:F}},"parseURL"),_n=Q0((f,h)=>f===h,"stringEquals"),nn=Q0((f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)},"substring"),en=Q0((f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),an={booleanEquals:mn,getAttr:P9,isSet:cn,isValidHostLabel:z3,not:gn,parseURL:xn,stringEquals:_n,substring:nn,uriEncode:en},H9=Q0((f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let r=f.indexOf("{",$);if(r===-1){w.push(f.slice($));break}w.push(f.slice($,r));let E=f.indexOf("}",r);if(E===-1){w.push(f.slice(r));break}if(f[r+1]==="{"&&f[E+1]==="}")w.push(f.slice(r+1,E)),$=E+2;let U=f.substring(r+1,E);if(U.includes("#")){let[T,F]=U.split("#");w.push(P9(s[T],F))}else w.push(s[U]);$=E+1}return w.join("")},"evaluateTemplate"),pn=Q0(({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]},"getReferenceValue"),yr=Q0((f,h,w)=>{if(typeof f==="string")return H9(f,w);else if(f.fn)return N9(f,w);else if(f.ref)return pn(f,w);throw new M1(`'${h}': ${String(f)} is not a string, function or reference.`)},"evaluateExpression"),N9=Q0(({fn:f,argv:h},w)=>{let s=h.map((r)=>["boolean","number"].includes(typeof r)?r:yr(r,"arg",w)),$=f.split(".");if($[0]in G3&&$[1]!=null)return G3[$[0]][$[1]](...s);return an[f](...s)},"callFunction"),on=Q0(({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new M1(`'${f}' is already defined in Reference Record.`);let s=N9(h,w);return w.logger?.debug?.(`${o$} evaluateCondition: ${ef(h)} = ${ef(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}},"evaluateCondition"),A3=Q0((f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:r}=on(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(r)w[r.name]=r.value,h.logger?.debug?.(`${o$} assign: ${r.name} := ${ef(r.value)}`)}return{result:!0,referenceRecord:w}},"evaluateConditions"),un=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((r)=>{let E=yr(r,"Header value entry",h);if(typeof E!=="string")throw new M1(`Header '${s}' value '${E}' is not a string`);return E})}),{}),"getEndpointHeaders"),D9=Q0((f,h)=>{if(Array.isArray(f))return f.map((w)=>D9(w,h));switch(typeof f){case"string":return H9(f,h);case"object":if(f===null)throw new M1(`Unexpected endpoint property: ${f}`);return q9(f,h);case"boolean":return f;default:throw new M1(`Unexpected endpoint property type: ${typeof f}`)}},"getEndpointProperty"),q9=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:D9($,h)}),{}),"getEndpointProperties"),tn=Q0((f,h)=>{let w=yr(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new M1(`Endpoint URL must be a string, got ${typeof w}`)},"getEndpointUrl"),fe=Q0((f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:r}=A3(w,h);if(!$)return;let E={...h,referenceRecord:{...h.referenceRecord,...r}},{url:U,properties:T,headers:F}=s;return h.logger?.debug?.(`${o$} Resolving endpoint from template: ${ef(s)}`),{...F!=null&&{headers:un(F,E)},...T!=null&&{properties:q9(T,E)},url:tn(U,E)}},"evaluateEndpointRule"),he=Q0((f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:r}=A3(w,h);if(!$)return;throw new M1(yr(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...r}}))},"evaluateErrorRule"),we=Q0((f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:r}=A3(w,h);if(!$)return;return k9(s,{...h,referenceRecord:{...h.referenceRecord,...r}})},"evaluateTreeRule"),k9=Q0((f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=fe(w,h);if(s)return s}else if(w.type==="error")he(w,h);else if(w.type==="tree"){let s=we(w,h);if(s)return s}else throw new M1(`Unknown endpoint rule: ${w}`);throw new M1("Rules evaluation failed")},"evaluateRules"),se=Q0((f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:r}=f;h.logger?.debug?.(`${o$} Initial EndpointParams: ${ef(w)}`);let E=Object.entries($).filter(([,F])=>F.default!=null).map(([F,C])=>[F,C.default]);if(E.length>0)for(let[F,C]of E)w[F]=w[F]??C;let U=Object.entries($).filter(([,F])=>F.required).map(([F])=>F);for(let F of U)if(w[F]==null)throw new M1(`Missing required parameter: '${F}'`);let T=k9(r,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${o$} Resolved endpoint: ${ef(T)}`),T},"resolveEndpoint")});var lr=H((uG0,g9)=>{var{defineProperty:Or,getOwnPropertyDescriptor:$e,getOwnPropertyNames:re}=Object,Ee=Object.prototype.hasOwnProperty,Rs=(f,h)=>Or(f,"name",{value:h,configurable:!0}),Ue=(f,h)=>{for(var w in h)Or(f,w,{get:h[w],enumerable:!0})},Te=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of re(h))if(!Ee.call(f,$)&&$!==w)Or(f,$,{get:()=>h[$],enumerable:!(s=$e(h,$))||s.enumerable})}return f},Fe=(f)=>Te(Or({},"__esModule",{value:!0}),f),O9={};Ue(O9,{ConditionObject:()=>V0.ConditionObject,DeprecatedObject:()=>V0.DeprecatedObject,EndpointError:()=>V0.EndpointError,EndpointObject:()=>V0.EndpointObject,EndpointObjectHeaders:()=>V0.EndpointObjectHeaders,EndpointObjectProperties:()=>V0.EndpointObjectProperties,EndpointParams:()=>V0.EndpointParams,EndpointResolverOptions:()=>V0.EndpointResolverOptions,EndpointRuleObject:()=>V0.EndpointRuleObject,ErrorRuleObject:()=>V0.ErrorRuleObject,EvaluateOptions:()=>V0.EvaluateOptions,Expression:()=>V0.Expression,FunctionArgv:()=>V0.FunctionArgv,FunctionObject:()=>V0.FunctionObject,FunctionReturn:()=>V0.FunctionReturn,ParameterObject:()=>V0.ParameterObject,ReferenceObject:()=>V0.ReferenceObject,ReferenceRecord:()=>V0.ReferenceRecord,RuleSetObject:()=>V0.RuleSetObject,RuleSetRules:()=>V0.RuleSetRules,TreeRuleObject:()=>V0.TreeRuleObject,awsEndpointFunctions:()=>c9,getUserAgentPrefix:()=>Be,isIpAddress:()=>V0.isIpAddress,partition:()=>d9,resolveEndpoint:()=>V0.resolveEndpoint,setPartitionInfo:()=>i9,useDefaultPartitionInfo:()=>Le});g9.exports=Fe(O9);var V0=jr(),l9=Rs((f,h=!1)=>{if(h){for(let w of f.split("."))if(!l9(w))return!1;return!0}if(!V0.isValidHostLabel(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(V0.isIpAddress(f))return!1;return!0},"isVirtualHostableS3Bucket"),j9=":",Ce="/",Ie=Rs((f)=>{let h=f.split(j9);if(h.length<6)return null;let[w,s,$,r,E,...U]=h;if(w!=="arn"||s===""||$===""||U.join(j9)==="")return null;let T=U.map((F)=>F.split(Ce)).flat();return{partition:s,service:$,region:r,accountId:E,resourceId:T}},"parseArn"),v9={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},b9=v9,m9="",d9=Rs((f)=>{let{partitions:h}=b9;for(let s of h){let{regions:$,outputs:r}=s;for(let[E,U]of Object.entries($))if(E===f)return{...r,...U}}for(let s of h){let{regionRegex:$,outputs:r}=s;if(new RegExp($).test(f))return{...r}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},"partition"),i9=Rs((f,h="")=>{b9=f,m9=h},"setPartitionInfo"),Le=Rs(()=>{i9(v9,"")},"useDefaultPartitionInfo"),Be=Rs(()=>m9,"getUserAgentPrefix"),c9={isVirtualHostableS3Bucket:l9,parseArn:Ie,partition:d9};V0.customEndpointFunctions.aws=c9});var mr=H((tG0,wM)=>{var{defineProperty:br,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:We}=Object,ze=Object.prototype.hasOwnProperty,af=(f,h)=>br(f,"name",{value:h,configurable:!0}),Ae=(f,h)=>{for(var w in h)br(f,w,{get:h[w],enumerable:!0})},Re=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of We(h))if(!ze.call(f,$)&&$!==w)br(f,$,{get:()=>h[$],enumerable:!(s=Ge(h,$))||s.enumerable})}return f},Xe=(f)=>Re(br({},"__esModule",{value:!0}),f),e9={};Ae(e9,{DEFAULT_UA_APP_ID:()=>a9,getUserAgentMiddlewareOptions:()=>hM,getUserAgentPlugin:()=>Ve,resolveUserAgentConfig:()=>o9,userAgentMiddleware:()=>fM});wM.exports=Xe(e9);var Se=m0(),a9=void 0;function p9(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}af(p9,"isValidUserAgentAppId");function o9(f){let h=Se.normalizeProvider(f.userAgentAppId??a9),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:af(async()=>{let s=await h();if(!p9(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s},"userAgentAppId")})}af(o9,"resolveUserAgentConfig");var Ye=lr(),Me=t0(),Zf=O0(),Qe=/\d{12}\.ddb/;async function u9(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Zf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let r=await h.retryStrategy();if(typeof r.acquireInitialRetryToken==="function")if(r.constructor?.name?.includes("Adaptive"))Zf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else Zf.setFeature(f,"RETRY_MODE_STANDARD","E");else Zf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let r=f.endpointV2;if(String(r?.url?.hostname).match(Qe))Zf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":Zf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Zf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Zf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let r=$;if(r.accountId)Zf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[E,U]of Object.entries(r.$source??{}))Zf.setFeature(f,E,U)}}af(u9,"checkFeatures");var x9="user-agent",R3="x-amz-user-agent",_9=" ",X3="/",Ke=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ze=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,n9="-",Je=1024;function t9(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=Je){if(h.length)h+=","+s;else h+=s;continue}break}return h}af(t9,"encodeFeatures");var fM=af((f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!Me.HttpRequest.isInstance($))return h(s);let{headers:r}=$,E=w?.userAgent?.map(vr)||[],U=(await f.defaultUserAgentProvider()).map(vr);await u9(w,f,s);let T=w;U.push(`m/${t9(Object.assign({},w.__smithy_context?.features,T.__aws_sdk_context?.features))}`);let F=f?.customUserAgent?.map(vr)||[],C=await f.userAgentAppId();if(C)U.push(vr([`app/${C}`]));let I=Ye.getUserAgentPrefix(),L=(I?[I]:[]).concat([...U,...E,...F]).join(_9),W=[...U.filter((X)=>X.startsWith("aws-sdk-")),...F].join(_9);if(f.runtime!=="browser"){if(W)r[R3]=r[R3]?`${r[x9]} ${W}`:W;r[x9]=L}else r[R3]=L;return h({...s,request:$})},"userAgentMiddleware"),vr=af((f)=>{let h=f[0].split(X3).map((E)=>E.replace(Ke,n9)).join(X3),w=f[1]?.replace(Ze,n9),s=h.indexOf(X3),$=h.substring(0,s),r=h.substring(s+1);if($==="api")r=r.toLowerCase();return[$,r,w].filter((E)=>E&&E.length>0).reduce((E,U,T)=>{switch(T){case 0:return U;case 1:return`${E}/${U}`;default:return`${E}#${U}`}},"")},"escapeUserAgent"),hM={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ve=af((f)=>({applyToStack:af((h)=>{h.add(fM(f),hM)},"applyToStack")}),"getUserAgentPlugin")});var UM=H((fW0,EM)=>{var{defineProperty:dr,getOwnPropertyDescriptor:Pe,getOwnPropertyNames:He}=Object,Ne=Object.prototype.hasOwnProperty,sM=(f,h)=>dr(f,"name",{value:h,configurable:!0}),De=(f,h)=>{for(var w in h)dr(f,w,{get:h[w],enumerable:!0})},qe=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of He(h))if(!Ne.call(f,$)&&$!==w)dr(f,$,{get:()=>h[$],enumerable:!(s=Pe(h,$))||s.enumerable})}return f},ke=(f)=>qe(dr({},"__esModule",{value:!0}),f),$M={};De($M,{SelectorType:()=>rM,booleanSelector:()=>ye,numberSelector:()=>je});EM.exports=ke($M);var ye=sM((f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)},"booleanSelector"),je=sM((f,h,w)=>{if(!(h in f))return;let s=parseInt(f[h],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${w} '${h}'. Expected number, got '${f[h]}'.`);return s},"numberSelector"),rM=((f)=>{return f.ENV="env",f.CONFIG="shared config entry",f})(rM||{})});var Xs=H((hW0,RM)=>{var{defineProperty:cr,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:le}=Object,ve=Object.prototype.hasOwnProperty,Uf=(f,h)=>cr(f,"name",{value:h,configurable:!0}),be=(f,h)=>{for(var w in h)cr(f,w,{get:h[w],enumerable:!0})},me=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of le(h))if(!ve.call(f,$)&&$!==w)cr(f,$,{get:()=>h[$],enumerable:!(s=Oe(h,$))||s.enumerable})}return f},de=(f)=>me(cr({},"__esModule",{value:!0}),f),CM={};be(CM,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>LM,CONFIG_USE_FIPS_ENDPOINT:()=>GM,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>ie,DEFAULT_USE_FIPS_ENDPOINT:()=>ge,ENV_USE_DUALSTACK_ENDPOINT:()=>IM,ENV_USE_FIPS_ENDPOINT:()=>BM,NODE_REGION_CONFIG_FILE_OPTIONS:()=>pe,NODE_REGION_CONFIG_OPTIONS:()=>ae,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>ce,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>xe,REGION_ENV_NAME:()=>WM,REGION_INI_NAME:()=>zM,getRegionInfo:()=>ha,resolveCustomEndpointsConfig:()=>_e,resolveEndpointsConfig:()=>ee,resolveRegionConfig:()=>oe});RM.exports=de(CM);var Dh=UM(),IM="AWS_USE_DUALSTACK_ENDPOINT",LM="use_dualstack_endpoint",ie=!1,ce={environmentVariableSelector:(f)=>Dh.booleanSelector(f,IM,Dh.SelectorType.ENV),configFileSelector:(f)=>Dh.booleanSelector(f,LM,Dh.SelectorType.CONFIG),default:!1},BM="AWS_USE_FIPS_ENDPOINT",GM="use_fips_endpoint",ge=!1,xe={environmentVariableSelector:(f)=>Dh.booleanSelector(f,BM,Dh.SelectorType.ENV),configFileSelector:(f)=>Dh.booleanSelector(f,GM,Dh.SelectorType.CONFIG),default:!1},ir=Ih(),_e=Uf((f)=>{let{tls:h,endpoint:w,urlParser:s,useDualstackEndpoint:$}=f;return Object.assign(f,{tls:h??!0,endpoint:ir.normalizeProvider(typeof w==="string"?s(w):w),isCustomEndpoint:!0,useDualstackEndpoint:ir.normalizeProvider($??!1)})},"resolveCustomEndpointsConfig"),ne=Uf(async(f)=>{let{tls:h=!0}=f,w=await f.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(w))throw new Error("Invalid region in client config");let $=await f.useDualstackEndpoint(),r=await f.useFipsEndpoint(),{hostname:E}=await f.regionInfoProvider(w,{useDualstackEndpoint:$,useFipsEndpoint:r})??{};if(!E)throw new Error("Cannot resolve hostname from client config");return f.urlParser(`${h?"https:":"http:"}//${E}`)},"getEndpointFromRegion"),ee=Uf((f)=>{let h=ir.normalizeProvider(f.useDualstackEndpoint??!1),{endpoint:w,useFipsEndpoint:s,urlParser:$,tls:r}=f;return Object.assign(f,{tls:r??!0,endpoint:w?ir.normalizeProvider(typeof w==="string"?$(w):w):()=>ne({...f,useDualstackEndpoint:h,useFipsEndpoint:s}),isCustomEndpoint:!!w,useDualstackEndpoint:h})},"resolveEndpointsConfig"),WM="AWS_REGION",zM="region",ae={environmentVariableSelector:(f)=>f[WM],configFileSelector:(f)=>f[zM],default:()=>{throw new Error("Region is missing")}},pe={preferredFile:"credentials"},AM=Uf((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),TM=Uf((f)=>AM(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),oe=Uf((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return TM(h);let s=await h();return TM(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(AM(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})},"resolveRegionConfig"),FM=Uf((f=[],{useFipsEndpoint:h,useDualstackEndpoint:w})=>f.find(({tags:s})=>h===s.includes("fips")&&w===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),ue=Uf((f,{regionHostname:h,partitionHostname:w})=>h?h:w?w.replace("{region}",f):void 0,"getResolvedHostname"),te=Uf((f,{partitionHash:h})=>Object.keys(h||{}).find((w)=>h[w].regions.includes(f))??"aws","getResolvedPartition"),fa=Uf((f,{signingRegion:h,regionRegex:w,useFipsEndpoint:s})=>{if(h)return h;else if(s){let $=w.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),r=f.match($);if(r)return r[0].slice(1,-1)}},"getResolvedSigningRegion"),ha=Uf((f,{useFipsEndpoint:h=!1,useDualstackEndpoint:w=!1,signingService:s,regionHash:$,partitionHash:r})=>{let E=te(f,{partitionHash:r}),U=f in $?f:r[E]?.endpoint??f,T={useFipsEndpoint:h,useDualstackEndpoint:w},F=FM($[U]?.variants,T),C=FM(r[E]?.variants,T),I=ue(U,{regionHostname:F,partitionHostname:C});if(I===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:U,useFipsEndpoint:h,useDualstackEndpoint:w}}`);let L=fa(I,{signingRegion:$[U]?.signingRegion,regionRegex:r[E].regionRegex,useFipsEndpoint:h});return{partition:E,signingService:s,hostname:I,...L&&{signingRegion:L},...$[U]?.signingService&&{signingService:$[U].signingService}}},"getRegionInfo")});var Y3=H((wW0,QM)=>{var{defineProperty:gr,getOwnPropertyDescriptor:wa,getOwnPropertyNames:sa}=Object,$a=Object.prototype.hasOwnProperty,SM=(f,h)=>gr(f,"name",{value:h,configurable:!0}),ra=(f,h)=>{for(var w in h)gr(f,w,{get:h[w],enumerable:!0})},Ea=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of sa(h))if(!$a.call(f,$)&&$!==w)gr(f,$,{get:()=>h[$],enumerable:!(s=wa(h,$))||s.enumerable})}return f},Ua=(f)=>Ea(gr({},"__esModule",{value:!0}),f),YM={};ra(YM,{contentLengthMiddleware:()=>S3,contentLengthMiddlewareOptions:()=>MM,getContentLengthPlugin:()=>Fa});QM.exports=Ua(YM);var Ta=t0(),XM="content-length";function S3(f){return(h)=>async(w)=>{let s=w.request;if(Ta.HttpRequest.isInstance(s)){let{body:$,headers:r}=s;if($&&Object.keys(r).map((E)=>E.toLowerCase()).indexOf(XM)===-1)try{let E=f($);s.headers={...s.headers,[XM]:String(E)}}catch(E){}}return h({...w,request:s})}}SM(S3,"contentLengthMiddleware");var MM={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Fa=SM((f)=>({applyToStack:(h)=>{h.add(S3(f.bodyLengthChecker),MM)}}),"getContentLengthPlugin")});var Ss=H((KM)=>{Object.defineProperty(KM,"__esModule",{value:!0});KM.getHomeDir=void 0;var Ca=B0("node:os"),Ia=B0("node:path"),M3={},La=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Ba=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${Ia.sep}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=La();if(!M3[$])M3[$]=Ca.homedir();return M3[$]};KM.getHomeDir=Ba});var Q3=H((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.getSSOTokenFilepath=void 0;var Ga=B0("node:crypto"),Wa=B0("node:path"),za=Ss(),Aa=(f)=>{let w=Ga.createHash("sha1").update(f).digest("hex");return Wa.join(za.getHomeDir(),".aws","sso","cache",`${w}.json`)};JM.getSSOTokenFilepath=Aa});var NM=H((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.getSSOTokenFromFile=void 0;var Ra=B0("node:fs"),Xa=Q3(),{readFile:Sa}=Ra.promises,Ya=async(f)=>{let h=Xa.getSSOTokenFilepath(f),w=await Sa(h,"utf8");return JSON.parse(w)};PM.getSSOTokenFromFile=Ya});var Z3=H((DM)=>{Object.defineProperty(DM,"__esModule",{value:!0});DM.slurpFile=void 0;var Ma=B0("node:fs"),{readFile:Qa}=Ma.promises,K3={},Ka=(f,h)=>{if(!K3[f]||(h===null||h===void 0?void 0:h.ignoreCache))K3[f]=Qa(f,"utf8");return K3[f]};DM.slurpFile=Ka});var H3=H((UW0,t$)=>{var{defineProperty:nr,getOwnPropertyDescriptor:Za,getOwnPropertyNames:Ja}=Object,Va=Object.prototype.hasOwnProperty,v1=(f,h)=>nr(f,"name",{value:h,configurable:!0}),Pa=(f,h)=>{for(var w in h)nr(f,w,{get:h[w],enumerable:!0})},J3=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ja(h))if(!Va.call(f,$)&&$!==w)nr(f,$,{get:()=>h[$],enumerable:!(s=Za(h,$))||s.enumerable})}return f},P3=(f,h,w)=>(J3(f,h,"default"),w&&J3(w,h,"default")),Ha=(f)=>J3(nr({},"__esModule",{value:!0}),f),u$={};Pa(u$,{CONFIG_PREFIX_SEPARATOR:()=>Tw,DEFAULT_PROFILE:()=>OM,ENV_PROFILE:()=>jM,getProfileName:()=>Na,loadSharedConfigFiles:()=>vM,loadSsoSessionData:()=>ca,parseKnownFiles:()=>xa});t$.exports=Ha(u$);P3(u$,Ss(),t$.exports);var jM="AWS_PROFILE",OM="default",Na=v1((f)=>f.profile||process.env[jM]||OM,"getProfileName");P3(u$,Q3(),t$.exports);P3(u$,NM(),t$.exports);var xr=F1(),Da=v1((f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(Tw);if(w===-1)return!1;return Object.values(xr.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(Tw),r=w.substring(0,$)===xr.IniSectionType.PROFILE?w.substring($+1):w;return h[r]=s,h},{...f.default&&{default:f.default}}),"getConfigData"),_r=B0("node:path"),qa=Ss(),ka="AWS_CONFIG_FILE",lM=v1(()=>process.env[ka]||_r.join(qa.getHomeDir(),".aws","config"),"getConfigFilepath"),ya=Ss(),ja="AWS_SHARED_CREDENTIALS_FILE",Oa=v1(()=>process.env[ja]||_r.join(ya.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),la=Ss(),va=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ba=["__proto__","profile __proto__"],V3=v1((f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let r=$.split(/(^|\s)[;#]/)[0].trim();if(r[0]==="["&&r[r.length-1]==="]"){w=void 0,s=void 0;let U=r.substring(1,r.length-1),T=va.exec(U);if(T){let[,F,,C]=T;if(Object.values(xr.IniSectionType).includes(F))w=[F,C].join(Tw)}else w=U;if(ba.includes(U))throw new Error(`Found invalid profile name "${U}"`)}else if(w){let U=r.indexOf("=");if(![0,-1].includes(U)){let[T,F]=[r.substring(0,U).trim(),r.substring(U+1).trim()];if(F==="")s=T;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,T].join(Tw):T;h[w][C]=F}}}}return h},"parseIni"),kM=Z3(),yM=v1(()=>({}),"swallowError"),Tw=".",vM=v1(async(f={})=>{let{filepath:h=Oa(),configFilepath:w=lM()}=f,s=la.getHomeDir(),$="~/",r=h;if(h.startsWith("~/"))r=_r.join(s,h.slice(2));let E=w;if(w.startsWith("~/"))E=_r.join(s,w.slice(2));let U=await Promise.all([kM.slurpFile(E,{ignoreCache:f.ignoreCache}).then(V3).then(Da).catch(yM),kM.slurpFile(r,{ignoreCache:f.ignoreCache}).then(V3).catch(yM)]);return{configFile:U[0],credentialsFile:U[1]}},"loadSharedConfigFiles"),ma=v1((f)=>Object.entries(f).filter(([h])=>h.startsWith(xr.IniSectionType.SSO_SESSION+Tw)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(Tw)+1)]:s}),{}),"getSsoSessionData"),da=Z3(),ia=v1(()=>({}),"swallowError"),ca=v1(async(f={})=>da.slurpFile(f.configFilepath??lM()).then(V3).then(ma).catch(ia),"loadSsoSessionData"),ga=v1((...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h},"mergeConfigFiles"),xa=v1(async(f)=>{let h=await vM(f);return ga(h.configFile,h.credentialsFile)},"parseKnownFiles")});var Ms=H((TW0,dM)=>{var{defineProperty:er,getOwnPropertyDescriptor:_a,getOwnPropertyNames:na}=Object,ea=Object.prototype.hasOwnProperty,Ys=(f,h)=>er(f,"name",{value:h,configurable:!0}),aa=(f,h)=>{for(var w in h)er(f,w,{get:h[w],enumerable:!0})},pa=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of na(h))if(!ea.call(f,$)&&$!==w)er(f,$,{get:()=>h[$],enumerable:!(s=_a(h,$))||s.enumerable})}return f},oa=(f)=>pa(er({},"__esModule",{value:!0}),f),mM={};aa(mM,{loadConfig:()=>wp});dM.exports=oa(mM);var f4=Z$();function N3(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}Ys(N3,"getSelectorName");var ua=Ys((f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new f4.CredentialsProviderError(w.message||`Not found in ENV: ${N3(f.toString())}`,{logger:h})}},"fromEnv"),bM=H3(),ta=Ys((f,{preferredFile:h="config",...w}={})=>async()=>{let s=bM.getProfileName(w),{configFile:$,credentialsFile:r}=await bM.loadSharedConfigFiles(w),E=r[s]||{},U=$[s]||{},T=h==="config"?{...E,...U}:{...U,...E};try{let C=f(T,h==="config"?$:r);if(C===void 0)throw new Error;return C}catch(F){throw new f4.CredentialsProviderError(F.message||`Not found in config files w/ profile [${s}]: ${N3(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),fp=Ys((f)=>typeof f==="function","isFunction"),hp=Ys((f)=>fp(f)?async()=>await f():f4.fromStatic(f),"fromStatic"),wp=Ys(({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>f4.memoize(f4.chain(ua(f),ta(h,s),hp(w))),"loadConfig")});var nM=H((xM)=>{Object.defineProperty(xM,"__esModule",{value:!0});xM.getEndpointUrlConfig=void 0;var iM=H3(),cM="AWS_ENDPOINT_URL",gM="endpoint_url",sp=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((r)=>r.toUpperCase()),s=h[[cM,...w].join("_")];if(s)return s;let $=h[cM];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(iM.CONFIG_PREFIX_SEPARATOR)];if($){let r=f.split(" ").map((U)=>U.toLowerCase()),E=$[[r.join("_"),gM].join(iM.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}let s=h[gM];if(s)return s;return},default:void 0});xM.getEndpointUrlConfig=sp});var D3=H((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.getEndpointFromConfig=void 0;var $p=Ms(),rp=nM(),Ep=async(f)=>$p.loadConfig(rp.getEndpointUrlConfig(f!==null&&f!==void 0?f:""))();eM.getEndpointFromConfig=Ep});var tM=H((IW0,uM)=>{var{defineProperty:ar,getOwnPropertyDescriptor:Up,getOwnPropertyNames:Tp}=Object,Fp=Object.prototype.hasOwnProperty,Cp=(f,h)=>ar(f,"name",{value:h,configurable:!0}),Ip=(f,h)=>{for(var w in h)ar(f,w,{get:h[w],enumerable:!0})},Lp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Tp(h))if(!Fp.call(f,$)&&$!==w)ar(f,$,{get:()=>h[$],enumerable:!(s=Up(h,$))||s.enumerable})}return f},Bp=(f)=>Lp(ar({},"__esModule",{value:!0}),f),pM={};Ip(pM,{parseQueryString:()=>oM});uM.exports=Bp(pM);function oM(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}Cp(oM,"parseQueryString")});var h4=H((LW0,wQ)=>{var{defineProperty:pr,getOwnPropertyDescriptor:Gp,getOwnPropertyNames:Wp}=Object,zp=Object.prototype.hasOwnProperty,Ap=(f,h)=>pr(f,"name",{value:h,configurable:!0}),Rp=(f,h)=>{for(var w in h)pr(f,w,{get:h[w],enumerable:!0})},Xp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Wp(h))if(!zp.call(f,$)&&$!==w)pr(f,$,{get:()=>h[$],enumerable:!(s=Gp(h,$))||s.enumerable})}return f},Sp=(f)=>Xp(pr({},"__esModule",{value:!0}),f),fQ={};Rp(fQ,{parseUrl:()=>hQ});wQ.exports=Sp(fQ);var Yp=tM(),hQ=Ap((f)=>{if(typeof f==="string")return hQ(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:r}=f,E;if(r)E=Yp.parseQueryString(r);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:E}},"parseUrl")});var Qs=H((BW0,FQ)=>{var{defineProperty:ur,getOwnPropertyDescriptor:Mp,getOwnPropertyNames:Qp}=Object,Kp=Object.prototype.hasOwnProperty,Tf=(f,h)=>ur(f,"name",{value:h,configurable:!0}),Zp=(f,h)=>{for(var w in h)ur(f,w,{get:h[w],enumerable:!0})},Jp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Qp(h))if(!Kp.call(f,$)&&$!==w)ur(f,$,{get:()=>h[$],enumerable:!(s=Mp(h,$))||s.enumerable})}return f},Vp=(f)=>Jp(ur({},"__esModule",{value:!0}),f),$Q={};Zp($Q,{endpointMiddleware:()=>UQ,endpointMiddlewareOptions:()=>TQ,getEndpointFromInstructions:()=>rQ,getEndpointPlugin:()=>vp,resolveEndpointConfig:()=>mp,resolveParams:()=>EQ,toEndpointV1:()=>q3});FQ.exports=Vp($Q);var Pp=Tf(async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(kp(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!qp(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),Hp=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Np=/(\d+\.){3}\d+/,Dp=/\.\./,qp=Tf((f)=>Hp.test(f)&&!Np.test(f)&&!Dp.test(f),"isDnsCompatibleBucketName"),kp=Tf((f)=>{let[h,w,s,,,$]=f.split(":"),r=h==="arn"&&f.split(":").length>=6,E=Boolean(r&&w&&s&&$);if(r&&!E)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return E},"isArnBucketName"),yp=Tf((f,h,w)=>{let s=Tf(async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:r,hostname:E,port:U,path:T}=$;return`${r}//${E}${U?":"+U:""}${T}`}}return $};return s},"createConfigValueProvider"),jp=D3(),sQ=h4(),q3=Tf((f)=>{if(typeof f==="object"){if("url"in f)return sQ.parseUrl(f.url);return f}return sQ.parseUrl(f)},"toEndpointV1"),rQ=Tf(async(f,h,w,s)=>{if(!w.endpoint){let E;if(w.serviceConfiguredEndpoint)E=await w.serviceConfiguredEndpoint();else E=await jp.getEndpointFromConfig(w.serviceId);if(E)w.endpoint=()=>Promise.resolve(q3(E))}let $=await EQ(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},"getEndpointFromInstructions"),EQ=Tf(async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[r,E]of Object.entries($))switch(E.type){case"staticContextParams":s[r]=E.value;break;case"contextParams":s[r]=f[E.name];break;case"clientContextParams":case"builtInParams":s[r]=await yp(E.name,r,w)();break;case"operationContextParams":s[r]=E.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await Pp(s);return s},"resolveParams"),Op=m0(),or=Ih(),UQ=Tf(({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)Op.setFeature(s,"ENDPOINT_OVERRIDE","N");let r=await rQ($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;let E=s.authSchemes?.[0];if(E){s.signing_region=E.signingRegion,s.signing_service=E.signingName;let T=or.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(T)T.signingProperties=Object.assign(T.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return w({...$})}},"endpointMiddleware"),lp=Dw(),TQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:lp.serializerMiddlewareOption.name},vp=Tf((f,h)=>({applyToStack:(w)=>{w.addRelativeTo(UQ({config:f,instructions:h}),TQ)}}),"getEndpointPlugin"),bp=D3(),mp=Tf((f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,r=w!=null?async()=>q3(await or.normalizeProvider(w)()):void 0,U=Object.assign(f,{endpoint:r,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:or.normalizeProvider(s??!1),useFipsEndpoint:or.normalizeProvider($??!1)}),T=void 0;return U.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!T)T=bp.getEndpointFromConfig(f.serviceId);return T},U},"resolveEndpointConfig")});var y3=H((GW0,LQ)=>{var{defineProperty:tr,getOwnPropertyDescriptor:dp,getOwnPropertyNames:ip}=Object,cp=Object.prototype.hasOwnProperty,Ks=(f,h)=>tr(f,"name",{value:h,configurable:!0}),gp=(f,h)=>{for(var w in h)tr(f,w,{get:h[w],enumerable:!0})},xp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ip(h))if(!cp.call(f,$)&&$!==w)tr(f,$,{get:()=>h[$],enumerable:!(s=dp(h,$))||s.enumerable})}return f},_p=(f)=>xp(tr({},"__esModule",{value:!0}),f),CQ={};gp(CQ,{isClockSkewCorrectedError:()=>IQ,isClockSkewError:()=>tp,isRetryableByTrait:()=>up,isServerError:()=>ho,isThrottlingError:()=>fo,isTransientError:()=>k3});LQ.exports=_p(CQ);var np=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],ep=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ap=["TimeoutError","RequestTimeout","RequestTimeoutException"],pp=[500,502,503,504],op=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],up=Ks((f)=>f.$retryable!==void 0,"isRetryableByTrait"),tp=Ks((f)=>np.includes(f.name),"isClockSkewError"),IQ=Ks((f)=>f.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),fo=Ks((f)=>f.$metadata?.httpStatusCode===429||ep.includes(f.name)||f.$retryable?.throttling==!0,"isThrottlingError"),k3=Ks((f,h=0)=>IQ(f)||ap.includes(f.name)||op.includes(f?.code||"")||pp.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&k3(f.cause,h+1),"isTransientError"),ho=Ks((f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!k3(f))return!0;return!1}return!1},"isServerError")});var hE=H((WW0,YQ)=>{var{defineProperty:fE,getOwnPropertyDescriptor:wo,getOwnPropertyNames:so}=Object,$o=Object.prototype.hasOwnProperty,Ff=(f,h)=>fE(f,"name",{value:h,configurable:!0}),ro=(f,h)=>{for(var w in h)fE(f,w,{get:h[w],enumerable:!0})},Eo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of so(h))if(!$o.call(f,$)&&$!==w)fE(f,$,{get:()=>h[$],enumerable:!(s=wo(h,$))||s.enumerable})}return f},Uo=(f)=>Eo(fE({},"__esModule",{value:!0}),f),GQ={};ro(GQ,{AdaptiveRetryStrategy:()=>Bo,ConfiguredRetryStrategy:()=>Go,DEFAULT_MAX_ATTEMPTS:()=>j3,DEFAULT_RETRY_DELAY_BASE:()=>w4,DEFAULT_RETRY_MODE:()=>To,DefaultRateLimiter:()=>zQ,INITIAL_RETRY_TOKENS:()=>O3,INVOCATION_ID_HEADER:()=>Co,MAXIMUM_RETRY_DELAY:()=>l3,NO_RETRY_INCREMENT:()=>SQ,REQUEST_HEADER:()=>Io,RETRY_COST:()=>RQ,RETRY_MODES:()=>WQ,StandardRetryStrategy:()=>v3,THROTTLING_RETRY_DELAY_BASE:()=>AQ,TIMEOUT_RETRY_COST:()=>XQ});YQ.exports=Uo(GQ);var WQ=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(WQ||{}),j3=3,To="standard",Fo=y3(),zQ=class f{constructor(h){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=h?.beta??0.7,this.minCapacity=h?.minCapacity??1,this.minFillRate=h?.minFillRate??0.5,this.scaleConstant=h?.scaleConstant??0.4,this.smooth=h?.smooth??0.8;let w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Ff(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(h){if(!this.enabled)return;if(this.refillTokenBucket(),h>this.currentCapacity){let w=(h-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>f.setTimeoutFn(s,w))}this.currentCapacity=this.currentCapacity-h}refillTokenBucket(){let h=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=h;return}let w=(h-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=h}updateClientSendingRate(h){let w;if(this.updateMeasuredRate(),Fo.isThrottlingError(h)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(h){return this.getPrecise(h*this.beta)}cubicSuccess(h){return this.getPrecise(this.scaleConstant*Math.pow(h-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(h){this.refillTokenBucket(),this.fillRate=Math.max(h,this.minFillRate),this.maxCapacity=Math.max(h,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let h=this.getCurrentTimeInSeconds(),w=Math.floor(h*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){let s=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}},w4=100,l3=20000,AQ=500,O3=500,RQ=5,XQ=10,SQ=1,Co="amz-sdk-invocation-id",Io="amz-sdk-request",Lo=Ff(()=>{let f=w4;return{computeNextBackoffDelay:Ff((s)=>{return Math.floor(Math.min(l3,Math.random()*2**s*f))},"computeNextBackoffDelay"),setDelayBase:Ff((s)=>{f=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),BQ=Ff(({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:Ff(()=>h,"getRetryCount"),getRetryDelay:Ff(()=>Math.min(l3,f),"getRetryDelay"),getRetryCost:Ff(()=>w,"getRetryCost")}},"createDefaultRetryToken"),v3=class{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=O3,this.retryBackoffStrategy=Lo(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}static{Ff(this,"StandardRetryStrategy")}async acquireInitialRetryToken(f){return BQ({retryDelay:w4,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?AQ:w4);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),r=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,E=this.getCapacityCost(s);return this.capacity-=E,BQ({retryDelay:r,retryCount:f.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(O3,this.capacity+(f.getRetryCost()??SQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${j3}`),j3}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?XQ:RQ}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}},Bo=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode="adaptive";let{rateLimiter:w}=h??{};this.rateLimiter=w??new zQ,this.standardRetryStrategy=new v3(f)}static{Ff(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}},Go=class extends v3{static{Ff(this,"ConfiguredRetryStrategy")}constructor(f,h=w4){super(typeof f==="function"?f:async()=>f);if(typeof h==="number")this.computeNextBackoffDelay=()=>h;else this.computeNextBackoffDelay=h}async refreshRetryTokenForRetry(f,h){let w=await super.refreshRetryTokenForRetry(f,h);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}}});var KQ=H((MQ)=>{Object.defineProperty(MQ,"__esModule",{value:!0});MQ.isStreamingPayload=void 0;var Wo=B0("node:stream"),zo=(f)=>(f===null||f===void 0?void 0:f.body)instanceof Wo.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;MQ.isStreamingPayload=zo});var s4=H((SW0,bQ)=>{var{defineProperty:wE,getOwnPropertyDescriptor:Ao,getOwnPropertyNames:Ro}=Object,Xo=Object.prototype.hasOwnProperty,x0=(f,h)=>wE(f,"name",{value:h,configurable:!0}),So=(f,h)=>{for(var w in h)wE(f,w,{get:h[w],enumerable:!0})},Yo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ro(h))if(!Xo.call(f,$)&&$!==w)wE(f,$,{get:()=>h[$],enumerable:!(s=Ao(h,$))||s.enumerable})}return f},Mo=(f)=>Yo(wE({},"__esModule",{value:!0}),f),JQ={};So(JQ,{AdaptiveRetryStrategy:()=>Zo,CONFIG_MAX_ATTEMPTS:()=>m3,CONFIG_RETRY_MODE:()=>kQ,ENV_MAX_ATTEMPTS:()=>b3,ENV_RETRY_MODE:()=>qQ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Jo,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Po,StandardRetryStrategy:()=>DQ,defaultDelayDecider:()=>PQ,defaultRetryDecider:()=>HQ,getOmitRetryHeadersPlugin:()=>Ho,getRetryAfterHint:()=>vQ,getRetryPlugin:()=>jo,omitRetryHeadersMiddleware:()=>yQ,omitRetryHeadersMiddlewareOptions:()=>jQ,resolveRetryConfig:()=>Vo,retryMiddleware:()=>OQ,retryMiddlewareOptions:()=>lQ});bQ.exports=Mo(JQ);var Zs=t0(),VQ=PF(),l0=hE(),Qo=x0((f,h)=>{let w=f,s=h?.noRetryIncrement??l0.NO_RETRY_INCREMENT,$=h?.retryCost??l0.RETRY_COST,r=h?.timeoutRetryCost??l0.TIMEOUT_RETRY_COST,E=f,U=x0((I)=>I.name==="TimeoutError"?r:$,"getCapacityAmount"),T=x0((I)=>U(I)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:T,retrieveRetryTokens:x0((I)=>{if(!T(I))throw new Error("No retry token available");let L=U(I);return E-=L,L},"retrieveRetryTokens"),releaseRetryTokens:x0((I)=>{E+=I??s,E=Math.min(E,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),PQ=x0((f,h)=>Math.floor(Math.min(l0.MAXIMUM_RETRY_DELAY,Math.random()*2**h*f)),"defaultDelayDecider"),qh=y3(),HQ=x0((f)=>{if(!f)return!1;return qh.isRetryableByTrait(f)||qh.isClockSkewError(f)||qh.isThrottlingError(f)||qh.isTransientError(f)},"defaultRetryDecider"),NQ=x0((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),DQ=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode=l0.RETRY_MODES.STANDARD,this.retryDecider=h?.retryDecider??HQ,this.delayDecider=h?.delayDecider??PQ,this.retryQuota=h?.retryQuota??Qo(l0.INITIAL_RETRY_TOKENS)}static{x0(this,"StandardRetryStrategy")}shouldRetry(f,h,w){return h<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(h){f=l0.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,h,w){let s,$=0,r=0,E=await this.getMaxAttempts(),{request:U}=h;if(Zs.HttpRequest.isInstance(U))U.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(Zs.HttpRequest.isInstance(U))U.headers[l0.REQUEST_HEADER]=`attempt=${$+1}; max=${E}`;if(w?.beforeRequest)await w.beforeRequest();let{response:T,output:F}=await f(h);if(w?.afterRequest)w.afterRequest(T);return this.retryQuota.releaseRetryTokens(s),F.$metadata.attempts=$+1,F.$metadata.totalRetryDelay=r,{response:T,output:F}}catch(T){let F=NQ(T);if($++,this.shouldRetry(F,$,E)){s=this.retryQuota.retrieveRetryTokens(F);let C=this.delayDecider(qh.isThrottlingError(F)?l0.THROTTLING_RETRY_DELAY_BASE:l0.DEFAULT_RETRY_DELAY_BASE,$),I=Ko(F.$response),L=Math.max(I||0,C);r+=L,await new Promise((W)=>setTimeout(W,L));continue}if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=$,F.$metadata.totalRetryDelay=r,F}}},Ko=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return s*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Zo=class extends DQ{static{x0(this,"AdaptiveRetryStrategy")}constructor(f,h){let{rateLimiter:w,...s}=h??{};super(f,s);this.rateLimiter=w??new l0.DefaultRateLimiter,this.mode=l0.RETRY_MODES.ADAPTIVE}async retry(f,h){return super.retry(f,h,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}},ZQ=Ih(),b3="AWS_MAX_ATTEMPTS",m3="max_attempts",Jo={environmentVariableSelector:(f)=>{let h=f[b3];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${b3} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[m3];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${m3} mast be a number, got "${h}"`);return w},default:l0.DEFAULT_MAX_ATTEMPTS},Vo=x0((f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=ZQ.normalizeProvider(s??l0.DEFAULT_MAX_ATTEMPTS);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await ZQ.normalizeProvider(w)()===l0.RETRY_MODES.ADAPTIVE)return new l0.AdaptiveRetryStrategy($);return new l0.StandardRetryStrategy($)}})},"resolveRetryConfig"),qQ="AWS_RETRY_MODE",kQ="retry_mode",Po={environmentVariableSelector:(f)=>f[qQ],configFileSelector:(f)=>f[kQ],default:l0.DEFAULT_RETRY_MODE},yQ=x0(()=>(f)=>async(h)=>{let{request:w}=h;if(Zs.HttpRequest.isInstance(w))delete w.headers[l0.INVOCATION_ID_HEADER],delete w.headers[l0.REQUEST_HEADER];return f(h)},"omitRetryHeadersMiddleware"),jQ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Ho=x0((f)=>({applyToStack:(h)=>{h.addRelativeTo(yQ(),jQ)}}),"getOmitRetryHeadersPlugin"),No=J0(),Do=KQ(),OQ=x0((f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),r=await f.maxAttempts();if(qo($)){$=$;let E=await $.acquireInitialRetryToken(w.partition_id),U=new Error,T=0,F=0,{request:C}=s,I=Zs.HttpRequest.isInstance(C);if(I)C.headers[l0.INVOCATION_ID_HEADER]=VQ.v4();while(!0)try{if(I)C.headers[l0.REQUEST_HEADER]=`attempt=${T+1}; max=${r}`;let{response:L,output:W}=await h(s);return $.recordSuccess(E),W.$metadata.attempts=T+1,W.$metadata.totalRetryDelay=F,{response:L,output:W}}catch(L){let W=ko(L);if(U=NQ(L),I&&Do.isStreamingPayload(C))throw(w.logger instanceof No.NoOpLogger?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),U;try{E=await $.refreshRetryTokenForRetry(E,W)}catch(Q){if(!U.$metadata)U.$metadata={};throw U.$metadata.attempts=T+1,U.$metadata.totalRetryDelay=F,U}T=E.getRetryCount();let X=E.getRetryDelay();F+=X,await new Promise((Q)=>setTimeout(Q,X))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},"retryMiddleware"),qo=x0((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),ko=x0((f)=>{let h={error:f,errorType:yo(f)},w=vQ(f.$response);if(w)h.retryAfterHint=w;return h},"getRetryErrorInfo"),yo=x0((f)=>{if(qh.isThrottlingError(f))return"THROTTLING";if(qh.isTransientError(f))return"TRANSIENT";if(qh.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),lQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},jo=x0((f)=>({applyToStack:(h)=>{h.add(OQ(f),lQ)}}),"getRetryPlugin"),vQ=x0((f)=>{if(!Zs.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((r)=>r.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)},"getRetryAfterHint")});var d3=H((dQ)=>{Object.defineProperty(dQ,"__esModule",{value:!0});dQ.resolveHttpAuthSchemeConfig=dQ.defaultSSOOIDCHttpAuthSchemeProvider=dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var Oo=O0(),mQ=Ih(),lo=async(f,h,w)=>{return{operation:mQ.getSmithyContext(h).operation,region:await mQ.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};dQ.defaultSSOOIDCHttpAuthSchemeParametersProvider=lo;function vo(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function bo(f){return{schemeId:"smithy.api#noAuth"}}var mo=(f)=>{let h=[];switch(f.operation){case"CreateToken":{h.push(bo(f));break}default:h.push(vo(f))}return h};dQ.defaultSSOOIDCHttpAuthSchemeProvider=mo;var io=(f)=>{let h=Oo.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};dQ.resolveHttpAuthSchemeConfig=io});var i3=H((KW0,xo)=>{xo.exports={name:"@aws-sdk/nested-clients",version:"3.775.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"}}}});var g3=H((ZW0,aQ)=>{var{defineProperty:$E,getOwnPropertyDescriptor:_o,getOwnPropertyNames:no}=Object,eo=Object.prototype.hasOwnProperty,sE=(f,h)=>$E(f,"name",{value:h,configurable:!0}),ao=(f,h)=>{for(var w in h)$E(f,w,{get:h[w],enumerable:!0})},po=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of no(h))if(!eo.call(f,$)&&$!==w)$E(f,$,{get:()=>h[$],enumerable:!(s=_o(h,$))||s.enumerable})}return f},oo=(f)=>po($E({},"__esModule",{value:!0}),f),gQ={};ao(gQ,{NODE_APP_ID_CONFIG_OPTIONS:()=>wu,UA_APP_ID_ENV_NAME:()=>nQ,UA_APP_ID_INI_NAME:()=>eQ,createDefaultUserAgentProvider:()=>_Q,crtAvailability:()=>xQ,defaultUserAgent:()=>to});aQ.exports=oo(gQ);var cQ=B0("node:os"),c3=B0("node:process"),xQ={isCrtAvailable:!1},uo=sE(()=>{if(xQ.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),_Q=sE(({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${cQ.platform()}`,cQ.release()],["lang/js"],["md/nodejs",`${c3.versions.node}`]],$=uo();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(c3.env.AWS_EXECUTION_ENV)s.push([`exec-env/${c3.env.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}},"createDefaultUserAgentProvider"),to=_Q,fu=mr(),nQ="AWS_SDK_UA_APP_ID",eQ="sdk_ua_app_id",hu="sdk-ua-app-id",wu={environmentVariableSelector:sE((f)=>f[nQ],"environmentVariableSelector"),configFileSelector:sE((f)=>f[eQ]??f[hu],"configFileSelector"),default:fu.DEFAULT_UA_APP_ID}});var n3=H((JW0,tQ)=>{var{defineProperty:rE,getOwnPropertyDescriptor:su,getOwnPropertyNames:$u}=Object,ru=Object.prototype.hasOwnProperty,oQ=(f,h)=>rE(f,"name",{value:h,configurable:!0}),Eu=(f,h)=>{for(var w in h)rE(f,w,{get:h[w],enumerable:!0})},Uu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $u(h))if(!ru.call(f,$)&&$!==w)rE(f,$,{get:()=>h[$],enumerable:!(s=su(h,$))||s.enumerable})}return f},Tu=(f)=>Uu(rE({},"__esModule",{value:!0}),f),uQ={};Eu(uQ,{Hash:()=>Iu});tQ.exports=Tu(uQ);var x3=qw(),Fu=u1(),Cu=B0("node:buffer"),pQ=B0("node:crypto"),Iu=class{static{oQ(this,"Hash")}constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(Fu.toUint8Array(_3(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?pQ.createHmac(this.algorithmIdentifier,_3(this.secret)):pQ.createHash(this.algorithmIdentifier)}};function _3(f,h){if(Cu.Buffer.isBuffer(f))return f;if(typeof f==="string")return x3.fromString(f,h);if(ArrayBuffer.isView(f))return x3.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return x3.fromArrayBuffer(f)}oQ(_3,"castSourceData")});var e3=H((PW0,wK)=>{var{defineProperty:EE,getOwnPropertyDescriptor:Lu,getOwnPropertyNames:Bu}=Object,Gu=Object.prototype.hasOwnProperty,Wu=(f,h)=>EE(f,"name",{value:h,configurable:!0}),zu=(f,h)=>{for(var w in h)EE(f,w,{get:h[w],enumerable:!0})},Au=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Bu(h))if(!Gu.call(f,$)&&$!==w)EE(f,$,{get:()=>h[$],enumerable:!(s=Lu(h,$))||s.enumerable})}return f},Ru=(f)=>Au(EE({},"__esModule",{value:!0}),f),hK={};zu(hK,{calculateBodyLength:()=>Xu});wK.exports=Ru(hK);var fK=B0("node:fs"),Xu=Wu((f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return fK.lstatSync(f.path).size;else if(typeof f.fd==="number")return fK.fstatSync(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)},"calculateBodyLength")});var XK=H((AK)=>{Object.defineProperty(AK,"__esModule",{value:!0});AK.ruleSet=void 0;var BK="required",m1="fn",d1="argv",Ps="ref",sK=!0,$K="isSet",$4="booleanEquals",Js="error",Vs="endpoint",pf="tree",a3="PartitionResult",p3="getAttr",rK={[BK]:!1,type:"String"},EK={[BK]:!0,default:!1,type:"Boolean"},UK={[Ps]:"Endpoint"},GK={[m1]:$4,[d1]:[{[Ps]:"UseFIPS"},!0]},WK={[m1]:$4,[d1]:[{[Ps]:"UseDualStack"},!0]},b1={},TK={[m1]:p3,[d1]:[{[Ps]:a3},"supportsFIPS"]},zK={[Ps]:a3},FK={[m1]:$4,[d1]:[!0,{[m1]:p3,[d1]:[zK,"supportsDualStack"]}]},CK=[GK],IK=[WK],LK=[{[Ps]:"Region"}],Su={version:"1.0",parameters:{Region:rK,UseDualStack:EK,UseFIPS:EK,Endpoint:rK},rules:[{conditions:[{[m1]:$K,[d1]:[UK]}],rules:[{conditions:CK,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Js},{conditions:IK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Js},{endpoint:{url:UK,properties:b1,headers:b1},type:Vs}],type:pf},{conditions:[{[m1]:$K,[d1]:LK}],rules:[{conditions:[{[m1]:"aws.partition",[d1]:LK,assign:a3}],rules:[{conditions:[GK,WK],rules:[{conditions:[{[m1]:$4,[d1]:[sK,TK]},FK],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Js}],type:pf},{conditions:CK,rules:[{conditions:[{[m1]:$4,[d1]:[TK,sK]}],rules:[{conditions:[{[m1]:"stringEquals",[d1]:[{[m1]:p3,[d1]:[zK,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:b1,headers:b1},type:Vs},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:pf},{error:"FIPS is enabled but this partition does not support FIPS",type:Js}],type:pf},{conditions:IK,rules:[{conditions:[FK],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:b1,headers:b1},type:Vs}],type:pf},{error:"DualStack is enabled but this partition does not support DualStack",type:Js}],type:pf},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:b1,headers:b1},type:Vs}],type:pf}],type:pf},{error:"Invalid Configuration: Missing Region",type:Js}]};AK.ruleSet=Su});var MK=H((SK)=>{Object.defineProperty(SK,"__esModule",{value:!0});SK.defaultEndpointResolver=void 0;var Yu=lr(),o3=jr(),Mu=XK(),Qu=new o3.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ku=(f,h={})=>{return Qu.get(f,()=>o3.resolveEndpoint(Mu.ruleSet,{endpointParams:f,logger:h.logger}))};SK.defaultEndpointResolver=Ku;o3.customEndpointFunctions.aws=Yu.awsEndpointFunctions});var VK=H((ZK)=>{Object.defineProperty(ZK,"__esModule",{value:!0});ZK.getRuntimeConfig=void 0;var Zu=O0(),Ju=m0(),Vu=J0(),Pu=h4(),QK=t1(),KK=u1(),Hu=d3(),Nu=MK(),Du=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??QK.fromBase64,base64Encoder:f?.base64Encoder??QK.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??Nu.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Hu.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Zu.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ju.NoAuthSigner}],logger:f?.logger??new Vu.NoOpLogger,serviceId:f?.serviceId??"SSO OIDC",urlParser:f?.urlParser??Pu.parseUrl,utf8Decoder:f?.utf8Decoder??KK.fromUtf8,utf8Encoder:f?.utf8Encoder??KK.toUtf8}};ZK.getRuntimeConfig=Du});var dK=H((qW0,mK)=>{var{defineProperty:FE,getOwnPropertyDescriptor:qu,getOwnPropertyNames:ku}=Object,yu=Object.prototype.hasOwnProperty,_0=(f,h)=>FE(f,"name",{value:h,configurable:!0}),ju=(f,h)=>{for(var w in h)FE(f,w,{get:h[w],enumerable:!0})},Ou=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ku(h))if(!yu.call(f,$)&&$!==w)FE(f,$,{get:()=>h[$],enumerable:!(s=qu(h,$))||s.enumerable})}return f},lu=(f)=>Ou(FE({},"__esModule",{value:!0}),f),DK={};ju(DK,{DEFAULT_MAX_RETRIES:()=>jK,DEFAULT_TIMEOUT:()=>yK,ENV_CMDS_AUTH_TOKEN:()=>f8,ENV_CMDS_FULL_URI:()=>UE,ENV_CMDS_RELATIVE_URI:()=>TE,Endpoint:()=>OK,fromContainerMetadata:()=>du,fromInstanceMetadata:()=>Tt,getInstanceMetadataEndpoint:()=>vK,httpRequest:()=>Hs,providerConfigFromInit:()=>h8});mK.exports=lu(DK);var vu=B0("node:url"),Jf=Z$(),bu=B0("node:buffer"),mu=B0("node:http");function Hs(f){return new Promise((h,w)=>{let s=mu.request({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new Jf.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new Jf.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:r=400}=$;if(r<200||300<=r)w(Object.assign(new Jf.ProviderError("Error response received from instance metadata service"),{statusCode:r})),s.destroy();let E=[];$.on("data",(U)=>{E.push(U)}),$.on("end",()=>{h(bu.Buffer.concat(E)),s.destroy()})}),s.end()})}_0(Hs,"httpRequest");var qK=_0((f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string","isImdsCredentials"),kK=_0((f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}}),"fromImdsCredentials"),yK=1000,jK=0,h8=_0(({maxRetries:f=jK,timeout:h=yK})=>({maxRetries:f,timeout:h}),"providerConfigFromInit"),t3=_0((f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w},"retry"),UE="AWS_CONTAINER_CREDENTIALS_FULL_URI",TE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",f8="AWS_CONTAINER_AUTHORIZATION_TOKEN",du=_0((f={})=>{let{timeout:h,maxRetries:w}=h8(f);return()=>t3(async()=>{let s=await _u({logger:f.logger}),$=JSON.parse(await iu(h,s));if(!qK($))throw new Jf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return kK($)},w)},"fromContainerMetadata"),iu=_0(async(f,h)=>{if(process.env[f8])h.headers={...h.headers,Authorization:process.env[f8]};return(await Hs({...h,timeout:f})).toString()},"requestFromEcsImds"),cu="169.254.170.2",gu={localhost:!0,"127.0.0.1":!0},xu={"http:":!0,"https:":!0},_u=_0(async({logger:f})=>{if(process.env[TE])return{hostname:cu,path:process.env[TE]};if(process.env[UE]){let h=vu.parse(process.env[UE]);if(!h.hostname||!(h.hostname in gu))throw new Jf.CredentialsProviderError(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in xu))throw new Jf.CredentialsProviderError(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new Jf.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${TE} or ${UE} environment variable is set`,{tryNextLink:!1,logger:f})},"getCmdsUri"),nu=class f extends Jf.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,f.prototype)}static{_0(this,"InstanceMetadataV1FallbackError")}},w8=Ms(),eu=h4(),OK=((f)=>{return f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]",f})(OK||{}),au="AWS_EC2_METADATA_SERVICE_ENDPOINT",pu="ec2_metadata_service_endpoint",ou={environmentVariableSelector:(f)=>f[au],configFileSelector:(f)=>f[pu],default:void 0},lK=((f)=>{return f.IPv4="IPv4",f.IPv6="IPv6",f})(lK||{}),uu="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",tu="ec2_metadata_service_endpoint_mode",ft={environmentVariableSelector:(f)=>f[uu],configFileSelector:(f)=>f[tu],default:"IPv4"},vK=_0(async()=>eu.parseUrl(await ht()||await wt()),"getInstanceMetadataEndpoint"),ht=_0(async()=>w8.loadConfig(ou)(),"getFromEndpointConfig"),wt=_0(async()=>{let f=await w8.loadConfig(ft)();switch(f){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(lK)}`)}},"getFromEndpointModeConfig"),st=300,$t=300,rt="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",PK=_0((f,h)=>{let w=st+Math.floor(Math.random()*$t),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
50
+ For more information, please visit: `+rt);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),Et=_0((f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=PK($,w)}catch(r){if(s)w.warn("Credential renew failed: ",r),$=PK(s,w);else throw r}return s=$,$}},"staticStabilityProvider"),bK="/latest/meta-data/iam/security-credentials/",Ut="/latest/api/token",u3="AWS_EC2_METADATA_V1_DISABLED",HK="ec2_metadata_v1_disabled",NK="x-aws-ec2-metadata-token",Tt=_0((f={})=>Et(Ft(f),{logger:f.logger}),"fromInstanceMetadata"),Ft=_0((f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:r}=h8(f),E=_0(async(U,T)=>{if(h||T.headers?.[NK]==null){let I=!1,L=!1,W=await w8.loadConfig({environmentVariableSelector:(X)=>{let Q=X[u3];if(L=!!Q&&Q!=="false",Q===void 0)throw new Jf.CredentialsProviderError(`${u3} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(X)=>{let Q=X[HK];return I=!!Q&&Q!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||W){let X=[];if(f.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)X.push(`config file profile (${HK})`);if(L)X.push(`process environment variable (${u3})`);throw new nu(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let C=(await t3(async()=>{let I;try{I=await It(T)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)).trim();return t3(async()=>{let I;try{I=await Lt(C,T,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},U)},"getCredentials");return async()=>{let U=await vK();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(r,{...U,timeout:$});else{let T;try{T=(await Ct({...U,timeout:$})).toString()}catch(F){if(F?.statusCode===400)throw Object.assign(F,{message:"EC2 Metadata token request returned error"});else if(F.message==="TimeoutError"||[403,404,405].includes(F.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(r,{...U,timeout:$})}return E(r,{...U,headers:{[NK]:T},timeout:$})}}},"getInstanceMetadataProvider"),Ct=_0(async(f)=>Hs({...f,path:Ut,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),It=_0(async(f)=>(await Hs({...f,path:bK})).toString(),"getProfile"),Lt=_0(async(f,h,w)=>{let s=JSON.parse((await Hs({...h,path:bK+f})).toString());if(!qK(s))throw new Jf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:w.logger});return kK(s)},"getCredentialsFromProfile")});var $8=H((kW0,nK)=>{var{create:Bt,defineProperty:r4,getOwnPropertyDescriptor:Gt,getOwnPropertyNames:Wt,getPrototypeOf:zt}=Object,At=Object.prototype.hasOwnProperty,s8=(f,h)=>r4(f,"name",{value:h,configurable:!0}),Rt=(f,h)=>{for(var w in h)r4(f,w,{get:h[w],enumerable:!0})},xK=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Wt(h))if(!At.call(f,$)&&$!==w)r4(f,$,{get:()=>h[$],enumerable:!(s=Gt(h,$))||s.enumerable})}return f},Xt=(f,h,w)=>(w=f!=null?Bt(zt(f)):{},xK(h||!f||!f.__esModule?r4(w,"default",{value:f,enumerable:!0}):w,f)),St=(f)=>xK(r4({},"__esModule",{value:!0}),f),_K={};Rt(_K,{resolveDefaultsModeConfig:()=>Nt});nK.exports=St(_K);var Yt=Xs(),iK=Ms(),Mt=Z$(),Qt="AWS_EXECUTION_ENV",cK="AWS_REGION",gK="AWS_DEFAULT_REGION",Kt="AWS_EC2_METADATA_DISABLED",Zt=["in-region","cross-region","mobile","standard","legacy"],Jt="/latest/meta-data/placement/region",Vt="AWS_DEFAULTS_MODE",Pt="defaults_mode",Ht={environmentVariableSelector:(f)=>{return f[Vt]},configFileSelector:(f)=>{return f[Pt]},default:"legacy"},Nt=s8(({region:f=iK.loadConfig(Yt.NODE_REGION_CONFIG_OPTIONS),defaultsMode:h=iK.loadConfig(Ht)}={})=>Mt.memoize(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return Dt(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Zt.join(", ")}, got ${w}`)}}),"resolveDefaultsModeConfig"),Dt=s8(async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await qt();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),qt=s8(async()=>{if(process.env[Qt]&&(process.env[cK]||process.env[gK]))return process.env[cK]??process.env[gK];if(!process.env[Kt])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(()=>Xt(dK())),w=await f();return(await h({...w,path:Jt})).toString()}catch(f){}},"inferPhysicalRegion")});var tK=H((oK)=>{Object.defineProperty(oK,"__esModule",{value:!0});oK.getRuntimeConfig=void 0;var kt=k5(),yt=kt.__importDefault(i3()),jt=O0(),eK=g3(),CE=Xs(),Ot=n3(),aK=s4(),Ns=Ms(),pK=W5(),lt=e3(),vt=hE(),bt=VK(),mt=J0(),dt=$8(),it=J0(),ct=(f)=>{it.emitWarningIfUnsupportedVersion(process.version);let h=dt.resolveDefaultsModeConfig(f),w=()=>h().then(mt.loadConfigsForDefaultMode),s=bt.getRuntimeConfig(f);jt.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??lt.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??eK.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:yt.default.version}),maxAttempts:f?.maxAttempts??Ns.loadConfig(aK.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??Ns.loadConfig(CE.NODE_REGION_CONFIG_OPTIONS,{...CE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:pK.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??Ns.loadConfig({...aK.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||vt.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??Ot.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??pK.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??Ns.loadConfig(CE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??Ns.loadConfig(CE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??Ns.loadConfig(eK.NODE_APP_ID_CONFIG_OPTIONS,$)}};oK.getRuntimeConfig=ct});var r8=H((jW0,rZ)=>{var{defineProperty:IE,getOwnPropertyDescriptor:gt,getOwnPropertyNames:xt}=Object,_t=Object.prototype.hasOwnProperty,Vf=(f,h)=>IE(f,"name",{value:h,configurable:!0}),nt=(f,h)=>{for(var w in h)IE(f,w,{get:h[w],enumerable:!0})},et=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of xt(h))if(!_t.call(f,$)&&$!==w)IE(f,$,{get:()=>h[$],enumerable:!(s=gt(h,$))||s.enumerable})}return f},at=(f)=>et(IE({},"__esModule",{value:!0}),f),hZ={};nt(hZ,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>tt,NODE_REGION_CONFIG_OPTIONS:()=>ut,REGION_ENV_NAME:()=>wZ,REGION_INI_NAME:()=>sZ,getAwsRegionExtensionConfiguration:()=>pt,resolveAwsRegionExtensionConfiguration:()=>ot,resolveRegionConfig:()=>f00});rZ.exports=at(hZ);var pt=Vf((f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},"getAwsRegionExtensionConfiguration"),ot=Vf((f)=>{return{region:f.region()}},"resolveAwsRegionExtensionConfiguration"),wZ="AWS_REGION",sZ="region",ut={environmentVariableSelector:Vf((f)=>f[wZ],"environmentVariableSelector"),configFileSelector:Vf((f)=>f[sZ],"configFileSelector"),default:Vf(()=>{throw new Error("Region is missing")},"default")},tt={preferredFile:"credentials"},$Z=Vf((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),fZ=Vf((f)=>$Z(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),f00=Vf((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:Vf(async()=>{if(typeof h==="string")return fZ(h);let s=await h();return fZ(s)},"region"),useFipsEndpoint:Vf(async()=>{let s=typeof h==="string"?h:await h();if($Z(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()},"useFipsEndpoint")})},"resolveRegionConfig")});var T8=H((OW0,qZ)=>{var{defineProperty:LE,getOwnPropertyDescriptor:h00,getOwnPropertyNames:w00}=Object,s00=Object.prototype.hasOwnProperty,w0=(f,h)=>LE(f,"name",{value:h,configurable:!0}),$00=(f,h)=>{for(var w in h)LE(f,w,{get:h[w],enumerable:!0})},r00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of w00(h))if(!s00.call(f,$)&&$!==w)LE(f,$,{get:()=>h[$],enumerable:!(s=h00(h,$))||s.enumerable})}return f},E00=(f)=>r00(LE({},"__esModule",{value:!0}),f),BZ={};$00(BZ,{$Command:()=>zZ.Command,AccessDeniedException:()=>AZ,AuthorizationPendingException:()=>RZ,CreateTokenCommand:()=>NZ,CreateTokenRequestFilterSensitiveLog:()=>XZ,CreateTokenResponseFilterSensitiveLog:()=>SZ,ExpiredTokenException:()=>YZ,InternalServerException:()=>MZ,InvalidClientException:()=>QZ,InvalidGrantException:()=>KZ,InvalidRequestException:()=>ZZ,InvalidScopeException:()=>JZ,SSOOIDC:()=>DZ,SSOOIDCClient:()=>WZ,SSOOIDCServiceException:()=>Z1,SlowDownException:()=>VZ,UnauthorizedClientException:()=>PZ,UnsupportedGrantTypeException:()=>HZ,__Client:()=>GZ.Client});qZ.exports=E00(BZ);var EZ=T3(),U00=C3(),T00=L3(),UZ=mr(),F00=Xs(),E8=m0(),C00=Y3(),I00=Qs(),TZ=s4(),GZ=J0(),FZ=d3(),L00=w0((f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),B00={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},G00=tK(),CZ=r8(),IZ=t0(),LZ=J0(),W00=w0((f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),z00=w0((f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}},"resolveHttpAuthRuntimeConfig"),A00=w0((f,h)=>{let w=Object.assign(CZ.getAwsRegionExtensionConfiguration(f),LZ.getDefaultExtensionConfiguration(f),IZ.getHttpHandlerExtensionConfiguration(f),W00(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,CZ.resolveAwsRegionExtensionConfiguration(w),LZ.resolveDefaultRuntimeConfig(w),IZ.resolveHttpHandlerRuntimeConfig(w),z00(w))},"resolveRuntimeExtensions"),WZ=class extends GZ.Client{static{w0(this,"SSOOIDCClient")}config;constructor(...[f]){let h=G00.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=L00(h),s=UZ.resolveUserAgentConfig(w),$=TZ.resolveRetryConfig(s),r=F00.resolveRegionConfig($),E=EZ.resolveHostHeaderConfig(r),U=I00.resolveEndpointConfig(E),T=FZ.resolveHttpAuthSchemeConfig(U),F=A00(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(UZ.getUserAgentPlugin(this.config)),this.middlewareStack.use(TZ.getRetryPlugin(this.config)),this.middlewareStack.use(C00.getContentLengthPlugin(this.config)),this.middlewareStack.use(EZ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(U00.getLoggerPlugin(this.config)),this.middlewareStack.use(T00.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(E8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w0(async(C)=>new E8.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(E8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},R00=J0(),X00=Qs(),S00=Dw(),zZ=J0(),Ds=J0(),Y00=J0(),Z1=class f extends Y00.ServiceException{static{w0(this,"SSOOIDCServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},AZ=class f extends Z1{static{w0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(h){super({name:"AccessDeniedException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},RZ=class f extends Z1{static{w0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(h){super({name:"AuthorizationPendingException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},XZ=w0((f)=>({...f,...f.clientSecret&&{clientSecret:Ds.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:Ds.SENSITIVE_STRING},...f.codeVerifier&&{codeVerifier:Ds.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),SZ=w0((f)=>({...f,...f.accessToken&&{accessToken:Ds.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:Ds.SENSITIVE_STRING},...f.idToken&&{idToken:Ds.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),YZ=class f extends Z1{static{w0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},MZ=class f extends Z1{static{w0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(h){super({name:"InternalServerException",$fault:"server",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},QZ=class f extends Z1{static{w0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(h){super({name:"InvalidClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},KZ=class f extends Z1{static{w0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(h){super({name:"InvalidGrantException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},ZZ=class f extends Z1{static{w0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},JZ=class f extends Z1{static{w0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(h){super({name:"InvalidScopeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},VZ=class f extends Z1{static{w0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(h){super({name:"SlowDownException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},PZ=class f extends Z1{static{w0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(h){super({name:"UnauthorizedClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},HZ=class f extends Z1{static{w0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(h){super({name:"UnsupportedGrantTypeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},U8=O0(),M00=m0(),x=J0(),Q00=w0(async(f,h)=>{let w=M00.requestBuilder(f,h),s={"content-type":"application/json"};w.bp("/token");let $;return $=JSON.stringify(x.take(f,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:w0((r)=>x._json(r),"scope")})),w.m("POST").h(s).b($),w.build()},"se_CreateTokenCommand"),K00=w0(async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return Z00(f,h);let w=x.map({$metadata:i1(f)}),s=x.expectNonNull(x.expectObject(await U8.parseJsonBody(f.body,h)),"body"),$=x.take(s,{accessToken:x.expectString,expiresIn:x.expectInt32,idToken:x.expectString,refreshToken:x.expectString,tokenType:x.expectString});return Object.assign(w,$),w},"de_CreateTokenCommand"),Z00=w0(async(f,h)=>{let w={...f,body:await U8.parseJsonErrorBody(f.body,h)},s=U8.loadRestJsonErrorCode(f,w.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await V00(w,h);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await P00(w,h);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await H00(w,h);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await N00(w,h);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await D00(w,h);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await q00(w,h);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await k00(w,h);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await y00(w,h);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await j00(w,h);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await O00(w,h);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await l00(w,h);default:let $=w.body;return J00({output:f,parsedBody:$,errorCode:s})}},"de_CommandError"),J00=x.withBaseException(Z1),V00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new AZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AccessDeniedExceptionRes"),P00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new RZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_AuthorizationPendingExceptionRes"),H00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new YZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_ExpiredTokenExceptionRes"),N00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new MZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InternalServerExceptionRes"),D00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new QZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidClientExceptionRes"),q00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new KZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidGrantExceptionRes"),k00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new ZZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidRequestExceptionRes"),y00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new JZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_InvalidScopeExceptionRes"),j00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new VZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_SlowDownExceptionRes"),O00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new PZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnauthorizedClientExceptionRes"),l00=w0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let r=new HZ({$metadata:i1(f),...w});return x.decorateServiceException(r,f.body)},"de_UnsupportedGrantTypeExceptionRes"),i1=w0((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),NZ=class extends zZ.Command.classBuilder().ep(B00).m(function(f,h,w,s){return[S00.getSerdePlugin(w,this.serialize,this.deserialize),X00.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(XZ,SZ).ser(Q00).de(K00).build(){static{w0(this,"CreateTokenCommand")}},v00={CreateTokenCommand:NZ},DZ=class extends WZ{static{w0(this,"SSOOIDC")}};R00.createAggregatedClient(v00,DZ)});var kZ=async(f,h={})=>{let{SSOOIDCClient:w}=await Promise.resolve().then(() => p(T8(),1));return new w(Object.assign({},h.clientConfig??{},{region:f??h.clientConfig?.region,logger:h.clientConfig?.logger??h.parentClientConfig?.logger}))};var yZ=async(f,h,w={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => p(T8(),1));return(await kZ(h,w)).send(new s({clientId:f.clientId,clientSecret:f.clientSecret,refreshToken:f.refreshToken,grantType:"refresh_token"}))};var jZ=()=>{};var F8=(f)=>{if(f.expiration&&f.expiration.getTime()<Date.now())throw new S1(`Token is expired. ${As}`,!1)};var OZ=B(()=>{Y0()});var kh=(f,h,w=!1)=>{if(typeof h==="undefined")throw new S1(`Value not present for '${f}' in SSO Token${w?". Cannot refresh":""}. ${As}`,!1)};var lZ=B(()=>{Y0()});import{promises as b00}from"node:fs";var m00,vZ=(f,h)=>{let w=wr(f),s=JSON.stringify(h,null,2);return m00(w,s)};var bZ=B(()=>{wf();({writeFile:m00}=b00)});var mZ,dZ=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Kh(w),$=y1({profile:w.profile??h?.profile}),r=s[$];if(!r)throw new S1(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!r.sso_session)throw new S1(`Profile '${$}' is missing required property 'sso_session'.`);let E=r.sso_session,T=(await Er(w))[E];if(!T)throw new S1(`Sso session '${E}' could not be found in shared credentials file.`,!1);for(let Q of["sso_start_url","sso_region"])if(!T[Q])throw new S1(`Sso session '${E}' is missing required property '${Q}'.`,!1);let{sso_start_url:F,sso_region:C}=T,I;try{I=await sr(E)}catch(Q){throw new S1(`The SSO session token associated with profile=${$} was not found or is invalid. ${As}`,!1)}kh("accessToken",I.accessToken),kh("expiresAt",I.expiresAt);let{accessToken:L,expiresAt:W}=I,X={token:L,expiration:new Date(W)};if(X.expiration.getTime()-Date.now()>L9)return X;if(Date.now()-mZ.getTime()<30000)return F8(X),X;kh("clientId",I.clientId,!0),kh("clientSecret",I.clientSecret,!0),kh("refreshToken",I.refreshToken,!0);try{mZ.setTime(Date.now());let Q=await yZ(I,C,w);kh("accessToken",Q.accessToken),kh("expiresIn",Q.expiresIn);let M=new Date(Date.now()+Q.expiresIn*1000);try{await vZ(E,{...I,accessToken:Q.accessToken,expiresAt:M.toISOString(),refreshToken:Q.refreshToken})}catch(q){}return{token:Q.accessToken,expiration:M}}catch(Q){return F8(X),X}};var iZ=B(()=>{Y0();wf();jZ();OZ();lZ();bZ();mZ=new Date(0)});var cZ=B(()=>{Y0()});var gZ=B(()=>{Y0()});var xZ=B(()=>{iZ();cZ();gZ()});function d00(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function BE(f){return{schemeId:"smithy.api#noAuth"}}var _Z,nZ=async(f,h,w)=>{return{operation:Sh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},eZ=(f)=>{let h=[];switch(f.operation){case"GetRoleCredentials":{h.push(BE(f));break}case"ListAccountRoles":{h.push(BE(f));break}case"ListAccounts":{h.push(BE(f));break}case"Logout":{h.push(BE(f));break}default:h.push(d00(f))}return h},aZ=(f)=>{let h=_Z.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var C8=B(()=>{_Z=p(O0(),1);gf()});var pZ=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},yh;var qs=B(()=>{yh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var uZ;var oZ=B(()=>{uZ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var I8;var L8=B(()=>{I8={isCrtAvailable:!1}});var tZ=()=>{if(I8.isCrtAvailable)return["md/crt-avail"];return null};var fJ=B(()=>{L8()});import{platform as c00,release as g00}from"node:os";import{env as hJ,versions as x00}from"node:process";var ks=({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${c00()}`,g00()],["lang/js"],["md/nodejs",`${x00.node}`]],$=tZ();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(hJ.AWS_EXECUTION_ENV)s.push([`exec-env/${hJ.AWS_EXECUTION_ENV}`]);let r=await w?.userAgentAppId?.();return r?[...s,[`app/${r}`]]:[...s]}};var wJ=B(()=>{fJ();L8()});var _00="AWS_SDK_UA_APP_ID",n00="sdk_ua_app_id",e00="sdk-ua-app-id",ys;var sJ=B(()=>{y$();ys={environmentVariableSelector:(f)=>f[_00],configFileSelector:(f)=>f[n00]??f[e00],default:FT}});var GE=B(()=>{wJ();sJ()});var $J=(f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]";import{Buffer as B8}from"node:buffer";var E4=(f,h=0,w=f.byteLength-h)=>{if(!$J(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return B8.from(f,h,w)},WE=(f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?B8.from(f,h):B8.from(f)};var zE=()=>{};var jh=(f)=>{let h=WE(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var G8=B(()=>{zE()});var rJ=(f)=>{if(typeof f==="string")return jh(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var EJ=B(()=>{G8()});var js=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return E4(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};var UJ=B(()=>{zE()});var U4=B(()=>{G8();EJ();UJ()});import{Buffer as a00}from"node:buffer";import{createHash as p00,createHmac as o00}from"node:crypto";class Fw{constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(rJ(TJ(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?o00(this.algorithmIdentifier,TJ(this.secret)):p00(this.algorithmIdentifier)}}function TJ(f,h){if(a00.isBuffer(f))return f;if(typeof f==="string")return WE(f,h);if(ArrayBuffer.isView(f))return E4(f.buffer,f.byteOffset,f.byteLength);return E4(f)}var AE=B(()=>{zE();U4()});import{fstatSync as u00,lstatSync as t00}from"node:fs";var Os=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return t00(f.path).size;else if(typeof f.fd==="number")return u00(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var FJ=()=>{};var RE=B(()=>{FJ()});var CJ,IJ,LJ,RJ,XJ,c1,BJ,SJ,GJ,WJ,zJ,AJ,f10,YJ;var MJ=B(()=>{CJ={["required"]:!1,type:"String"},IJ={["required"]:!0,default:!1,type:"Boolean"},LJ={["ref"]:"Endpoint"},RJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},XJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},c1={},BJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},SJ={["ref"]:"PartitionResult"},GJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[SJ,"supportsDualStack"]}]},WJ=[RJ],zJ=[XJ],AJ=[{["ref"]:"Region"}],f10={version:"1.0",parameters:{Region:CJ,UseDualStack:IJ,UseFIPS:IJ,Endpoint:CJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[LJ]}],rules:[{conditions:WJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:zJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:LJ,properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:AJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:AJ,assign:"PartitionResult"}],rules:[{conditions:[RJ,XJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,BJ]},GJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:WJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[BJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[SJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:c1,headers:c1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:zJ,rules:[{conditions:[GJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:c1,headers:c1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},YJ=f10});var h10,QJ=(f,h={})=>{return h10.get(f,()=>nh(YJ,{endpointParams:f,logger:h.logger}))};var KJ=B(()=>{K$();cf();MJ();h10=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});ff.aws=eh});var ZJ,JJ,XE,VJ=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??XE.fromBase64,base64Encoder:f?.base64Encoder??XE.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??QJ,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??eZ,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new ZJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new JJ.NoAuthSigner}],logger:f?.logger??new nf,serviceId:f?.serviceId??"SSO",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??jh,utf8Encoder:f?.utf8Encoder??js}};var PJ=B(()=>{ZJ=p(O0(),1),JJ=p(m0(),1);J();ow();XE=p(t1(),1);U4();C8();KJ()});var HJ="AWS_EXECUTION_ENV",W8="AWS_REGION",z8="AWS_DEFAULT_REGION",NJ="AWS_EC2_METADATA_DISABLED",DJ,qJ="/latest/meta-data/placement/region";var kJ=B(()=>{DJ=["in-region","cross-region","mobile","standard","legacy"]});var yJ;var jJ=B(()=>{yJ={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"}});var ls=({region:f=A0(Yh),defaultsMode:h=A0(yJ)}={})=>fw(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return w10(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${DJ.join(", ")}, got ${w}`)}}),w10=async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await s10();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},s10=async()=>{if(process.env[HJ]&&(process.env[W8]||process.env[z8]))return process.env[W8]??process.env[z8];if(!process.env[NJ])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(() => (e$(),n$)),w=await f();return(await h({...w,path:qJ})).toString()}catch(f){}};var OJ=B(()=>{Mh();Zh();Y0();kJ();jJ()});var SE=B(()=>{OJ()});var lJ,vJ=(f)=>{Cs(process.version);let h=ls(f),w=()=>h().then(Fs),s=VJ(f);lJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??Os,defaultUserAgentProvider:f?.defaultUserAgentProvider??ks({serviceId:s.serviceId,clientVersion:uZ.version}),maxAttempts:f?.maxAttempts??A0(ws,f),region:f?.region??A0(Yh,{..._w,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...$s,default:async()=>(await w()).retryMode||Jh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??A0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(xw,$),userAgentAppId:f?.userAgentAppId??A0(ys,$)}};var bJ=B(()=>{oZ();lJ=p(O0(),1);GE();Mh();AE();Ew();Zh();p$();RE();sf();PJ();J();SE();J()});var vs=(f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},bs=(f)=>{return{region:f.region()}};var mJ=()=>{};var dJ=()=>{};var iJ=B(()=>{dJ()});var cJ=B(()=>{mJ();iJ()});var YE=B(()=>{cJ()});var gJ=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},xJ=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var _J=(f,h)=>{let w=Object.assign(vs(f),Is(f),Zw(f),gJ(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,bs(w),Ls(w),Jw(w),xJ(w))};var nJ=B(()=>{YE();C1();J()});var ms,of;var T4=B(()=>{w5();s5();$5();y$();Mh();ms=p(m0(),1);fr();D();Ew();J();C8();qs();bJ();nJ();of=class of extends $w{config;constructor(...[f]){let h=vJ(f||{});super(h);this.initConfig=h;let w=pZ(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=aZ(U),F=_J(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(Gs(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(ms.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:nZ,identityProviderConfigProvider:async(C)=>new ms.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(ms.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var uf;var A8=B(()=>{J();uf=class uf extends rf{constructor(f){super(f);Object.setPrototypeOf(this,uf.prototype)}}});var ME,QE,KE,ZE,eJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),r10=(f)=>({...f,...f.secretAccessKey&&{secretAccessKey:T0},...f.sessionToken&&{sessionToken:T0}}),aJ=(f)=>({...f,...f.roleCredentials&&{roleCredentials:r10(f.roleCredentials)}}),pJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),oJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),uJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}});var Cw=B(()=>{J();A8();ME=class ME extends uf{name="InvalidRequestException";$fault="client";constructor(f){super({name:"InvalidRequestException",$fault:"client",...f});Object.setPrototypeOf(this,ME.prototype)}};QE=class QE extends uf{name="ResourceNotFoundException";$fault="client";constructor(f){super({name:"ResourceNotFoundException",$fault:"client",...f});Object.setPrototypeOf(this,QE.prototype)}};KE=class KE extends uf{name="TooManyRequestsException";$fault="client";constructor(f){super({name:"TooManyRequestsException",$fault:"client",...f});Object.setPrototypeOf(this,KE.prototype)}};ZE=class ZE extends uf{name="UnauthorizedException";$fault="client";constructor(f){super({name:"UnauthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,ZE.prototype)}}});var Oh,F4,tJ=async(f,h)=>{let w=F4.requestBuilder(f,h),s=Y({},g$,{[PE]:f[VE]});w.bp("/federation/credentials");let $=Y({[L10]:[,j(f[I10],"roleName")],[TV]:[,j(f[UV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},fV=async(f,h)=>{let w=F4.requestBuilder(f,h),s=Y({},g$,{[PE]:f[VE]});w.bp("/assignment/roles");let $=Y({[LV]:[,f[IV]],[CV]:[()=>f.maxResults!==void 0,()=>f[FV].toString()],[TV]:[,j(f[UV],"accountId")]}),r;return w.m("GET").h(s).q($).b(r),w.build()},hV=async(f,h)=>{let w=F4.requestBuilder(f,h),s=Y({},g$,{[PE]:f[VE]});w.bp("/assignment/accounts");let $=Y({[LV]:[,f[IV]],[CV]:[()=>f.maxResults!==void 0,()=>f[FV].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},wV=async(f,h)=>{let w=F4.requestBuilder(f,h),s=Y({},g$,{[PE]:f[VE]});w.bp("/logout");let $;return w.m("POST").h(s).b($),w.build()},sV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return JE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{roleCredentials:v});return Object.assign(w,$),w},$V=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return JE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{nextToken:G,roleList:v});return Object.assign(w,$),w},rV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return JE(f,h);let w=Y({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=N0(s,{accountList:v,nextToken:G});return Object.assign(w,$),w},EV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return JE(f,h);let w=Y({$metadata:lh(f)});return await G1.collectBody(f.body,h),w},JE=async(f,h)=>{let w={...f,body:await Oh.parseJsonErrorBody(f.body,h)},s=Oh.loadRestJsonErrorCode(f,w.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await U10(w,h);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await T10(w,h);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await F10(w,h);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await C10(w,h);default:let $=w.body;return E10({output:f,parsedBody:$,errorCode:s})}},E10,U10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new ME({$metadata:lh(f),...w});return l(r,f.body)},T10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new QE({$metadata:lh(f),...w});return l(r,f.body)},F10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new KE({$metadata:lh(f),...w});return l(r,f.body)},C10=async(f,h)=>{let w=Y({}),s=f.body,$=N0(s,{message:G});Object.assign(w,$);let r=new ZE({$metadata:lh(f),...w});return l(r,f.body)},lh=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),UV="accountId",VE="accessToken",TV="account_id",FV="maxResults",CV="max_result",IV="nextToken",LV="next_token",I10="roleName",L10="role_name",PE="x-amz-sso_bearer_token";var C4=B(()=>{Oh=p(O0(),1),F4=p(m0(),1);J();Cw();A8();E10=Ts(uf)});var I4;var R8=B(()=>{D();k();J();qs();Cw();C4();I4=class I4 extends z.classBuilder().ep(yh).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(eJ,aJ).ser(tJ).de(sV).build(){}});var L4;var HE=B(()=>{D();k();J();qs();Cw();C4();L4=class L4 extends z.classBuilder().ep(yh).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(pJ,void 0).ser(fV).de($V).build(){}});var B4;var NE=B(()=>{D();k();J();qs();Cw();C4();B4=class B4 extends z.classBuilder().ep(yh).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(oJ,void 0).ser(hV).de(rV).build(){}});var X8;var S8=B(()=>{D();k();J();qs();Cw();C4();X8=class X8 extends z.classBuilder().ep(yh).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(uJ,void 0).ser(wV).de(EV).build(){}});var B10,BV;var GV=B(()=>{J();R8();HE();NE();S8();T4();B10={GetRoleCredentialsCommand:I4,ListAccountRolesCommand:L4,ListAccountsCommand:B4,LogoutCommand:X8};BV=class BV extends of{};Es(B10,BV)});var WV=B(()=>{R8();HE();NE();S8()});var zV=()=>{};var AV,BR0;var RV=B(()=>{AV=p(m0(),1);HE();T4();BR0=AV.createPaginator(of,L4,"nextToken","nextToken","maxResults")});var XV,AR0;var SV=B(()=>{XV=p(m0(),1);NE();T4();AR0=XV.createPaginator(of,B4,"nextToken","nextToken","maxResults")});var YV=B(()=>{zV();RV();SV()});var MV=B(()=>{Cw()});var QV=B(()=>{T4();GV();WV();YV();MV()});var KV={};Ch(KV,{SSOClient:()=>of,GetRoleCredentialsCommand:()=>I4});var ZV=B(()=>{QV()});var Y8,G4=!1,M8=async({ssoStartUrl:f,ssoSession:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoClient:r,clientConfig:E,parentClientConfig:U,profile:T,logger:F})=>{let C,I="To refresh this SSO session run aws sso login with the corresponding profile.";if(h)try{let X0=await dZ({profile:T})();C={accessToken:X0.token,expiresAt:new Date(X0.expiration).toISOString()}}catch(X0){throw new a(X0.message,{tryNextLink:G4,logger:F})}else try{C=await sr(f)}catch(X0){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:G4,logger:F})}if(new Date(C.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:G4,logger:F});let{accessToken:L}=C,{SSOClient:W,GetRoleCredentialsCommand:X}=await Promise.resolve().then(() => (ZV(),KV)),Q=r||new W(Object.assign({},E??{},{logger:E?.logger??U?.logger,region:E?.region??s})),M;try{M=await Q.send(new X({accountId:w,roleName:$,accessToken:L}))}catch(X0){throw new a(X0,{tryNextLink:G4,logger:F})}let{roleCredentials:{accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:n,credentialScope:L0,accountId:b0}={}}=M;if(!q||!N||!y||!n)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:G4,logger:F});let r1={accessKeyId:q,secretAccessKey:N,sessionToken:y,expiration:new Date(n),...L0&&{credentialScope:L0},...b0&&{accountId:b0}};if(h)Y8.setCredentialFeature(r1,"CREDENTIALS_SSO","s");else Y8.setCredentialFeature(r1,"CREDENTIALS_SSO_LEGACY","u");return r1};var JV=B(()=>{Y8=p(I1(),1);xZ();Y0();wf()});var Q8=(f,h)=>{let{sso_start_url:w,sso_account_id:s,sso_region:$,sso_role_name:r}=f;if(!w||!s||!$||!r)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(f).join(", ")}
51
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:h});return f};var K8=B(()=>{Y0()});var G10=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:w,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoSession:E}=f,{ssoClient:U}=f,T=y1({profile:f.profile??h?.profile});if(!w&&!s&&!$&&!r&&!E){let C=(await Kh(f))[T];if(!C)throw new a(`Profile ${T} was not found.`,{logger:f.logger});if(!U3(C))throw new a(`Profile ${T} is not configured with SSO credentials.`,{logger:f.logger});if(C?.sso_session){let q=(await Er(f))[C.sso_session],N=` configurations in profile ${T} and sso-session ${C.sso_session}`;if($&&$!==q.sso_region)throw new a("Conflicting SSO region"+N,{tryNextLink:!1,logger:f.logger});if(w&&w!==q.sso_start_url)throw new a("Conflicting SSO start_url"+N,{tryNextLink:!1,logger:f.logger});C.sso_region=q.sso_region,C.sso_start_url=q.sso_start_url}let{sso_start_url:I,sso_account_id:L,sso_region:W,sso_role_name:X,sso_session:Q}=Q8(C,f.logger);return M8({ssoStartUrl:I,ssoSession:Q,ssoAccountId:L,ssoRegion:W,ssoRoleName:X,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})}else if(!w||!s||!$||!r)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:f.logger});else return M8({ssoStartUrl:w,ssoSession:E,ssoAccountId:s,ssoRegion:$,ssoRoleName:r,ssoClient:U,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:T})};var VV=B(()=>{Y0();wf();JV();K8()});var PV=()=>{};var Z8={};Ch(Z8,{validateSsoProfile:()=>Q8,isSsoProfile:()=>U3,fromSSO:()=>G10});var J8=B(()=>{VV();PV();K8()});var HV,NV=(f,h,w)=>{let s={EcsContainer:async($)=>{let{fromHttp:r}=await Promise.resolve().then(() => (E3(),r3)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (e$(),n$));return w?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>xf(r($??{}),E($))().then(V8)},Ec2InstanceMetadata:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:r}=await Promise.resolve().then(() => (e$(),n$));return async()=>r($)().then(V8)},Environment:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:r}=await Promise.resolve().then(() => (gF(),XY));return async()=>r($)().then(V8)}};if(f in s)return s[f];else throw new a(`Unsupported credential source in profile ${h}. Got ${f}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:w})},V8=(f)=>HV.setCredentialFeature(f,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var DV=B(()=>{HV=p(I1(),1);Y0()});var P8=H((kV)=>{Object.defineProperty(kV,"__esModule",{value:!0});kV.resolveHttpAuthSchemeConfig=kV.resolveStsAuthConfig=kV.defaultSTSHttpAuthSchemeProvider=kV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var W10=O0(),qV=Ih(),z10=W4(),A10=async(f,h,w)=>{return{operation:qV.getSmithyContext(h).operation,region:await qV.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};kV.defaultSTSHttpAuthSchemeParametersProvider=A10;function R10(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function X10(f){return{schemeId:"smithy.api#noAuth"}}var S10=(f)=>{let h=[];switch(f.operation){case"AssumeRoleWithWebIdentity":{h.push(X10(f));break}default:h.push(R10(f))}return h};kV.defaultSTSHttpAuthSchemeProvider=S10;var Y10=(f)=>Object.assign(f,{stsClientCtor:z10.STSClient});kV.resolveStsAuthConfig=Y10;var M10=(f)=>{let h=kV.resolveStsAuthConfig(f),w=W10.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};kV.resolveHttpAuthSchemeConfig=M10});var z4=H((OV)=>{Object.defineProperty(OV,"__esModule",{value:!0});OV.commonParams=OV.resolveClientEndpointParameters=void 0;var Z10=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,defaultSigningName:"sts"})};OV.resolveClientEndpointParameters=Z10;OV.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var UP=H((rP)=>{Object.defineProperty(rP,"__esModule",{value:!0});rP.ruleSet=void 0;var aV="required",t="type",W0="fn",z0="argv",bh="ref",vV=!1,H8=!0,vh="booleanEquals",w1="stringEquals",pV="sigv4",oV="sts",uV="us-east-1",D0="endpoint",bV="https://sts.{Region}.{PartitionResult#dnsSuffix}",Pf="tree",ds="error",D8="getAttr",mV={[aV]:!1,[t]:"String"},N8={[aV]:!0,default:!1,[t]:"Boolean"},tV={[bh]:"Endpoint"},dV={[W0]:"isSet",[z0]:[{[bh]:"Region"}]},s1={[bh]:"Region"},iV={[W0]:"aws.partition",[z0]:[s1],assign:"PartitionResult"},fP={[bh]:"UseFIPS"},hP={[bh]:"UseDualStack"},U1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:pV,signingName:oV,signingRegion:uV}]},headers:{}},J1={},cV={conditions:[{[W0]:w1,[z0]:[s1,"aws-global"]}],[D0]:U1,[t]:D0},wP={[W0]:vh,[z0]:[fP,!0]},sP={[W0]:vh,[z0]:[hP,!0]},gV={[W0]:D8,[z0]:[{[bh]:"PartitionResult"},"supportsFIPS"]},$P={[bh]:"PartitionResult"},xV={[W0]:vh,[z0]:[!0,{[W0]:D8,[z0]:[$P,"supportsDualStack"]}]},_V=[{[W0]:"isSet",[z0]:[tV]}],nV=[wP],eV=[sP],V10={version:"1.0",parameters:{Region:mV,UseDualStack:N8,UseFIPS:N8,Endpoint:mV,UseGlobalEndpoint:N8},rules:[{conditions:[{[W0]:vh,[z0]:[{[bh]:"UseGlobalEndpoint"},H8]},{[W0]:"not",[z0]:_V},dV,iV,{[W0]:vh,[z0]:[fP,vV]},{[W0]:vh,[z0]:[hP,vV]}],rules:[{conditions:[{[W0]:w1,[z0]:[s1,"ap-northeast-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"ap-south-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"ap-southeast-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"ap-southeast-2"]}],endpoint:U1,[t]:D0},cV,{conditions:[{[W0]:w1,[z0]:[s1,"ca-central-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"eu-central-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"eu-north-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"eu-west-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"eu-west-2"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"eu-west-3"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"sa-east-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,uV]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"us-east-2"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"us-west-1"]}],endpoint:U1,[t]:D0},{conditions:[{[W0]:w1,[z0]:[s1,"us-west-2"]}],endpoint:U1,[t]:D0},{endpoint:{url:bV,properties:{authSchemes:[{name:pV,signingName:oV,signingRegion:"{Region}"}]},headers:J1},[t]:D0}],[t]:Pf},{conditions:_V,rules:[{conditions:nV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[t]:ds},{conditions:eV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[t]:ds},{endpoint:{url:tV,properties:J1,headers:J1},[t]:D0}],[t]:Pf},{conditions:[dV],rules:[{conditions:[iV],rules:[{conditions:[wP,sP],rules:[{conditions:[{[W0]:vh,[z0]:[H8,gV]},xV],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[t]:ds}],[t]:Pf},{conditions:nV,rules:[{conditions:[{[W0]:vh,[z0]:[gV,H8]}],rules:[{conditions:[{[W0]:w1,[z0]:[{[W0]:D8,[z0]:[$P,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:J1,headers:J1},[t]:D0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"FIPS is enabled but this partition does not support FIPS",[t]:ds}],[t]:Pf},{conditions:eV,rules:[{conditions:[xV],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:J1,headers:J1},[t]:D0}],[t]:Pf},{error:"DualStack is enabled but this partition does not support DualStack",[t]:ds}],[t]:Pf},cV,{endpoint:{url:bV,properties:J1,headers:J1},[t]:D0}],[t]:Pf}],[t]:Pf},{error:"Invalid Configuration: Missing Region",[t]:ds}]};rP.ruleSet=V10});var CP=H((TP)=>{Object.defineProperty(TP,"__esModule",{value:!0});TP.defaultEndpointResolver=void 0;var P10=lr(),q8=jr(),H10=UP(),N10=new q8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),D10=(f,h={})=>{return N10.get(f,()=>q8.resolveEndpoint(H10.ruleSet,{endpointParams:f,logger:h.logger}))};TP.defaultEndpointResolver=D10;q8.customEndpointFunctions.aws=P10.awsEndpointFunctions});var WP=H((BP)=>{Object.defineProperty(BP,"__esModule",{value:!0});BP.getRuntimeConfig=void 0;var q10=O0(),k10=m0(),y10=J0(),j10=h4(),IP=t1(),LP=u1(),O10=P8(),l10=CP(),v10=(f)=>{return{apiVersion:"2011-06-15",base64Decoder:f?.base64Decoder??IP.fromBase64,base64Encoder:f?.base64Encoder??IP.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??l10.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??O10.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new q10.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new k10.NoAuthSigner}],logger:f?.logger??new y10.NoOpLogger,serviceId:f?.serviceId??"STS",urlParser:f?.urlParser??j10.parseUrl,utf8Decoder:f?.utf8Decoder??LP.fromUtf8,utf8Encoder:f?.utf8Encoder??LP.toUtf8}};BP.getRuntimeConfig=v10});var MP=H((SP)=>{Object.defineProperty(SP,"__esModule",{value:!0});SP.getRuntimeConfig=void 0;var b10=k5(),m10=b10.__importDefault(i3()),zP=O0(),AP=g3(),DE=Xs(),d10=m0(),i10=n3(),RP=s4(),is=Ms(),XP=W5(),c10=e3(),g10=hE(),x10=WP(),_10=J0(),n10=$8(),e10=J0(),a10=(f)=>{e10.emitWarningIfUnsupportedVersion(process.version);let h=n10.resolveDefaultsModeConfig(f),w=()=>h().then(_10.loadConfigsForDefaultMode),s=x10.getRuntimeConfig(f);zP.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??c10.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??AP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:m10.default.version}),httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(r)=>r.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await f.credentialDefaultProvider(E?.__config||{})()),signer:new zP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(r)=>r.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new d10.NoAuthSigner}],maxAttempts:f?.maxAttempts??is.loadConfig(RP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??is.loadConfig(DE.NODE_REGION_CONFIG_OPTIONS,{...DE.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:XP.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??is.loadConfig({...RP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||g10.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??i10.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??XP.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??is.loadConfig(DE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??is.loadConfig(DE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??is.loadConfig(AP.NODE_APP_ID_CONFIG_OPTIONS,$)}};SP.getRuntimeConfig=a10});var ZP=H((QP)=>{Object.defineProperty(QP,"__esModule",{value:!0});QP.resolveHttpAuthRuntimeConfig=QP.getHttpAuthExtensionConfiguration=void 0;var p10=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}};QP.getHttpAuthExtensionConfiguration=p10;var o10=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};QP.resolveHttpAuthRuntimeConfig=o10});var qP=H((NP)=>{Object.defineProperty(NP,"__esModule",{value:!0});NP.resolveRuntimeExtensions=void 0;var JP=r8(),VP=t0(),PP=J0(),HP=ZP(),t10=(f,h)=>{let w=Object.assign(JP.getAwsRegionExtensionConfiguration(f),PP.getDefaultExtensionConfiguration(f),VP.getHttpHandlerExtensionConfiguration(f),HP.getHttpAuthExtensionConfiguration(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,JP.resolveAwsRegionExtensionConfiguration(w),PP.resolveDefaultRuntimeConfig(w),VP.resolveHttpHandlerRuntimeConfig(w),HP.resolveHttpAuthRuntimeConfig(w))};NP.resolveRuntimeExtensions=t10});var W4=H((y8)=>{Object.defineProperty(y8,"__esModule",{value:!0});y8.STSClient=y8.__Client=void 0;var kP=T3(),ff0=C3(),hf0=L3(),yP=mr(),wf0=Xs(),k8=m0(),sf0=Y3(),$f0=Qs(),jP=s4(),lP=J0();Object.defineProperty(y8,"__Client",{enumerable:!0,get:function(){return lP.Client}});var OP=P8(),rf0=z4(),Ef0=MP(),Uf0=qP();class vP extends lP.Client{config;constructor(...[f]){let h=Ef0.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=rf0.resolveClientEndpointParameters(h),s=yP.resolveUserAgentConfig(w),$=jP.resolveRetryConfig(s),r=wf0.resolveRegionConfig($),E=kP.resolveHostHeaderConfig(r),U=$f0.resolveEndpointConfig(E),T=OP.resolveHttpAuthSchemeConfig(U),F=Uf0.resolveRuntimeExtensions(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(yP.getUserAgentPlugin(this.config)),this.middlewareStack.use(jP.getRetryPlugin(this.config)),this.middlewareStack.use(sf0.getContentLengthPlugin(this.config)),this.middlewareStack.use(kP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(ff0.getLoggerPlugin(this.config)),this.middlewareStack.use(hf0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(k8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:OP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(C)=>new k8.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(k8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}y8.STSClient=vP});var IC=H((EX0,CC)=>{var{defineProperty:qE,getOwnPropertyDescriptor:Tf0,getOwnPropertyNames:Ff0}=Object,Cf0=Object.prototype.hasOwnProperty,e=(f,h)=>qE(f,"name",{value:h,configurable:!0}),If0=(f,h)=>{for(var w in h)qE(f,w,{get:h[w],enumerable:!0})},sC=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ff0(h))if(!Cf0.call(f,$)&&$!==w)qE(f,$,{get:()=>h[$],enumerable:!(s=Tf0(h,$))||s.enumerable})}return f},Lf0=(f,h,w)=>(sC(f,h,"default"),w&&sC(w,h,"default")),Bf0=(f)=>sC(qE({},"__esModule",{value:!0}),f),rC={};If0(rC,{AssumeRoleCommand:()=>TC,AssumeRoleResponseFilterSensitiveLog:()=>iP,AssumeRoleWithWebIdentityCommand:()=>FC,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>aP,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>pP,ClientInputEndpointParameters:()=>rh0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>EC,ExpiredTokenException:()=>cP,IDPCommunicationErrorException:()=>oP,IDPRejectedClaimException:()=>nP,InvalidIdentityTokenException:()=>eP,MalformedPolicyDocumentException:()=>gP,PackedPolicyTooLargeException:()=>xP,RegionDisabledException:()=>_P,STS:()=>TH,STSServiceException:()=>fh,decorateDefaultCredentialProvider:()=>Th0,getDefaultRoleAssumer:()=>GH,getDefaultRoleAssumerWithWebIdentity:()=>WH});CC.exports=Bf0(rC);Lf0(rC,W4(),CC.exports);var Gf0=J0(),Wf0=Qs(),zf0=Dw(),Af0=J0(),Rf0=z4(),dP=J0(),Xf0=J0(),fh=class f extends Xf0.ServiceException{static{e(this,"STSServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},EC=e((f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:dP.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),iP=e((f)=>({...f,...f.Credentials&&{Credentials:EC(f.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),cP=class f extends fh{static{e(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},gP=class f extends fh{static{e(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},xP=class f extends fh{static{e(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},_P=class f extends fh{static{e(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},nP=class f extends fh{static{e(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},eP=class f extends fh{static{e(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},aP=e((f)=>({...f,...f.WebIdentityToken&&{WebIdentityToken:dP.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),pP=e((f)=>({...f,...f.Credentials&&{Credentials:EC(f.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),oP=class f extends fh{static{e(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},UC=O0(),Sf0=t0(),R0=J0(),Yf0=e(async(f,h)=>{let w=sH,s;return s=UH({...qf0(f,h),[rH]:pf0,[EH]:$H}),wH(h,w,"/",void 0,s)},"se_AssumeRoleCommand"),Mf0=e(async(f,h)=>{let w=sH,s;return s=UH({...kf0(f,h),[rH]:of0,[EH]:$H}),wH(h,w,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),Qf0=e(async(f,h)=>{if(f.statusCode>=300)return uP(f,h);let w=await UC.parseXmlBody(f.body,h),s={};return s=mf0(w.AssumeRoleResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleCommand"),Kf0=e(async(f,h)=>{if(f.statusCode>=300)return uP(f,h);let w=await UC.parseXmlBody(f.body,h),s={};return s=df0(w.AssumeRoleWithWebIdentityResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleWithWebIdentityCommand"),uP=e(async(f,h)=>{let w={...f,body:await UC.parseXmlErrorBody(f.body,h)},s=uf0(f,w.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Zf0(w,h);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Hf0(w,h);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Nf0(w,h);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Df0(w,h);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Jf0(w,h);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Vf0(w,h);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Pf0(w,h);default:let $=w.body;return af0({output:f,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),Zf0=e(async(f,h)=>{let w=f.body,s=if0(w.Error,h),$=new cP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_ExpiredTokenExceptionRes"),Jf0=e(async(f,h)=>{let w=f.body,s=cf0(w.Error,h),$=new oP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_IDPCommunicationErrorExceptionRes"),Vf0=e(async(f,h)=>{let w=f.body,s=gf0(w.Error,h),$=new nP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_IDPRejectedClaimExceptionRes"),Pf0=e(async(f,h)=>{let w=f.body,s=xf0(w.Error,h),$=new eP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_InvalidIdentityTokenExceptionRes"),Hf0=e(async(f,h)=>{let w=f.body,s=_f0(w.Error,h),$=new gP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_MalformedPolicyDocumentExceptionRes"),Nf0=e(async(f,h)=>{let w=f.body,s=nf0(w.Error,h),$=new xP({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_PackedPolicyTooLargeExceptionRes"),Df0=e(async(f,h)=>{let w=f.body,s=ef0(w.Error,h),$=new _P({$metadata:hh(f),...s});return R0.decorateServiceException($,w)},"de_RegionDisabledExceptionRes"),qf0=e((f,h)=>{let w={};if(f[as]!=null)w[as]=f[as];if(f[ps]!=null)w[ps]=f[ps];if(f[ns]!=null){let s=tP(f[ns],h);if(f[ns]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[_s]!=null)w[_s]=f[_s];if(f[xs]!=null)w[xs]=f[xs];if(f[o8]!=null){let s=bf0(f[o8],h);if(f[o8]?.length===0)w.Tags=[];Object.entries(s).forEach(([$,r])=>{let E=`Tags.${$}`;w[E]=r})}if(f[t8]!=null){let s=vf0(f[t8],h);if(f[t8]?.length===0)w.TransitiveTagKeys=[];Object.entries(s).forEach(([$,r])=>{let E=`TransitiveTagKeys.${$}`;w[E]=r})}if(f[d8]!=null)w[d8]=f[d8];if(f[a8]!=null)w[a8]=f[a8];if(f[u8]!=null)w[u8]=f[u8];if(f[tf]!=null)w[tf]=f[tf];if(f[g8]!=null){let s=Of0(f[g8],h);if(f[g8]?.length===0)w.ProvidedContexts=[];Object.entries(s).forEach(([$,r])=>{let E=`ProvidedContexts.${$}`;w[E]=r})}return w},"se_AssumeRoleRequest"),kf0=e((f,h)=>{let w={};if(f[as]!=null)w[as]=f[as];if(f[ps]!=null)w[ps]=f[ps];if(f[hC]!=null)w[hC]=f[hC];if(f[x8]!=null)w[x8]=f[x8];if(f[ns]!=null){let s=tP(f[ns],h);if(f[ns]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,r])=>{let E=`PolicyArns.${$}`;w[E]=r})}if(f[_s]!=null)w[_s]=f[_s];if(f[xs]!=null)w[xs]=f[xs];return w},"se_AssumeRoleWithWebIdentityRequest"),tP=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=yf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_policyDescriptorListType"),yf0=e((f,h)=>{let w={};if(f[wC]!=null)w[wC]=f[wC];return w},"se_PolicyDescriptorType"),jf0=e((f,h)=>{let w={};if(f[c8]!=null)w[c8]=f[c8];if(f[b8]!=null)w[b8]=f[b8];return w},"se_ProvidedContext"),Of0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=jf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_ProvidedContextsListType"),lf0=e((f,h)=>{let w={};if(f[i8]!=null)w[i8]=f[i8];if(f[fC]!=null)w[fC]=f[fC];return w},"se_Tag"),vf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;w[`member.${s}`]=$,s++}return w},"se_tagKeyListType"),bf0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let r=lf0($,h);Object.entries(r).forEach(([E,U])=>{w[`member.${s}.${E}`]=U}),s++}return w},"se_tagListType"),fH=e((f,h)=>{let w={};if(f[O8]!=null)w[O8]=R0.expectString(f[O8]);if(f[l8]!=null)w[l8]=R0.expectString(f[l8]);return w},"de_AssumedRoleUser"),mf0=e((f,h)=>{let w={};if(f[gs]!=null)w[gs]=hH(f[gs],h);if(f[cs]!=null)w[cs]=fH(f[cs],h);if(f[es]!=null)w[es]=R0.strictParseInt32(f[es]);if(f[tf]!=null)w[tf]=R0.expectString(f[tf]);return w},"de_AssumeRoleResponse"),df0=e((f,h)=>{let w={};if(f[gs]!=null)w[gs]=hH(f[gs],h);if(f[e8]!=null)w[e8]=R0.expectString(f[e8]);if(f[cs]!=null)w[cs]=fH(f[cs],h);if(f[es]!=null)w[es]=R0.strictParseInt32(f[es]);if(f[_8]!=null)w[_8]=R0.expectString(f[_8]);if(f[v8]!=null)w[v8]=R0.expectString(f[v8]);if(f[tf]!=null)w[tf]=R0.expectString(f[tf]);return w},"de_AssumeRoleWithWebIdentityResponse"),hH=e((f,h)=>{let w={};if(f[j8]!=null)w[j8]=R0.expectString(f[j8]);if(f[n8]!=null)w[n8]=R0.expectString(f[n8]);if(f[p8]!=null)w[p8]=R0.expectString(f[p8]);if(f[m8]!=null)w[m8]=R0.expectNonNull(R0.parseRfc3339DateTimeWithOffset(f[m8]));return w},"de_Credentials"),if0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_ExpiredTokenException"),cf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPCommunicationErrorException"),gf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_IDPRejectedClaimException"),xf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_InvalidIdentityTokenException"),_f0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_MalformedPolicyDocumentException"),nf0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_PackedPolicyTooLargeException"),ef0=e((f,h)=>{let w={};if(f[i0]!=null)w[i0]=R0.expectString(f[i0]);return w},"de_RegionDisabledException"),hh=e((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),af0=R0.withBaseException(fh),wH=e(async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new Sf0.HttpRequest(F)},"buildHttpRpcRequest"),sH={"content-type":"application/x-www-form-urlencoded"},$H="2011-06-15",rH="Action",j8="AccessKeyId",pf0="AssumeRole",O8="AssumedRoleId",cs="AssumedRoleUser",of0="AssumeRoleWithWebIdentity",l8="Arn",v8="Audience",gs="Credentials",b8="ContextAssertion",xs="DurationSeconds",m8="Expiration",d8="ExternalId",i8="Key",_s="Policy",ns="PolicyArns",c8="ProviderArn",g8="ProvidedContexts",x8="ProviderId",es="PackedPolicySize",_8="Provider",as="RoleArn",ps="RoleSessionName",n8="SecretAccessKey",e8="SubjectFromWebIdentityToken",tf="SourceIdentity",a8="SerialNumber",p8="SessionToken",o8="Tags",u8="TokenCode",t8="TransitiveTagKeys",EH="Version",fC="Value",hC="WebIdentityToken",wC="arn",i0="message",UH=e((f)=>Object.entries(f).map(([h,w])=>R0.extendedEncodeURIComponent(h)+"="+R0.extendedEncodeURIComponent(w)).join("&"),"buildFormUrlencodedString"),uf0=e((f,h)=>{if(h.Error?.Code!==void 0)return h.Error.Code;if(f.statusCode==404)return"NotFound"},"loadQueryErrorCode"),TC=class extends Af0.Command.classBuilder().ep(Rf0.commonParams).m(function(f,h,w,s){return[zf0.getSerdePlugin(w,this.serialize,this.deserialize),Wf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,iP).ser(Yf0).de(Qf0).build(){static{e(this,"AssumeRoleCommand")}},tf0=Qs(),fh0=Dw(),hh0=J0(),wh0=z4(),FC=class extends hh0.Command.classBuilder().ep(wh0.commonParams).m(function(f,h,w,s){return[fh0.getSerdePlugin(w,this.serialize,this.deserialize),tf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(aP,pP).ser(Mf0).de(Kf0).build(){static{e(this,"AssumeRoleWithWebIdentityCommand")}},sh0=W4(),$h0={AssumeRoleCommand:TC,AssumeRoleWithWebIdentityCommand:FC},TH=class extends sh0.STSClient{static{e(this,"STS")}};Gf0.createAggregatedClient($h0,TH);var rh0=z4(),$C=I1(),mP="us-east-1",FH=e((f)=>{if(typeof f?.Arn==="string"){let h=f.Arn.split(":");if(h.length>4&&h[4]!=="")return h[4]}return},"getAccountIdFromAssumedRoleUser"),CH=e(async(f,h,w)=>{let s=typeof f==="function"?await f():f,$=typeof h==="function"?await h():h;return w?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${mP} (STS default)`),s??$??mP},"resolveRegion"),Eh0=e((f,h)=>{let w,s;return async($,r)=>{if(s=$,!w){let{logger:C=f?.parentClientConfig?.logger,region:I,requestHandler:L=f?.parentClientConfig?.requestHandler,credentialProviderLogger:W}=f,X=await CH(I,f?.parentClientConfig?.region,W),Q=!IH(L);w=new h({profile:f?.parentClientConfig?.profile,credentialDefaultProvider:e(()=>async()=>s,"credentialDefaultProvider"),region:X,requestHandler:Q?L:void 0,logger:C})}let{Credentials:E,AssumedRoleUser:U}=await w.send(new TC(r));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${r.RoleArn}`);let T=FH(U),F={accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...T&&{accountId:T}};return $C.setCredentialFeature(F,"CREDENTIALS_STS_ASSUME_ROLE","i"),F}},"getDefaultRoleAssumer"),Uh0=e((f,h)=>{let w;return async(s)=>{if(!w){let{logger:T=f?.parentClientConfig?.logger,region:F,requestHandler:C=f?.parentClientConfig?.requestHandler,credentialProviderLogger:I}=f,L=await CH(F,f?.parentClientConfig?.region,I),W=!IH(C);w=new h({profile:f?.parentClientConfig?.profile,region:L,requestHandler:W?C:void 0,logger:T})}let{Credentials:$,AssumedRoleUser:r}=await w.send(new FC(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let E=FH(r),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...E&&{accountId:E}};if(E)$C.setCredentialFeature(U,"RESOLVED_ACCOUNT_ID","T");return $C.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),U}},"getDefaultRoleAssumerWithWebIdentity"),IH=e((f)=>{return f?.metadata?.handlerProtocol==="h2"},"isH2"),LH=W4(),BH=e((f,h)=>{if(!h)return f;else return class w extends f{static{e(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of h)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),GH=e((f={},h)=>Eh0(f,BH(LH.STSClient,h)),"getDefaultRoleAssumer"),WH=e((f={},h)=>Uh0(f,BH(LH.STSClient,h)),"getDefaultRoleAssumerWithWebIdentity"),Th0=e((f)=>(h)=>f({roleAssumer:GH(h),roleAssumerWithWebIdentity:WH(h),...h}),"decorateDefaultCredentialProvider")});var LC,AH=(f,{profile:h="default",logger:w}={})=>{return Boolean(f)&&typeof f==="object"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1&&["undefined","string"].indexOf(typeof f.external_id)>-1&&["undefined","string"].indexOf(typeof f.mfa_serial)>-1&&(Fh0(f,{profile:h,logger:w})||Ch0(f,{profile:h,logger:w}))},Fh0=(f,{profile:h,logger:w})=>{let s=typeof f.source_profile==="string"&&typeof f.credential_source==="undefined";if(s)w?.debug?.(` ${h} isAssumeRoleWithSourceProfile source_profile=${f.source_profile}`);return s},Ch0=(f,{profile:h,logger:w})=>{let s=typeof f.credential_source==="string"&&typeof f.source_profile==="undefined";if(s)w?.debug?.(` ${h} isCredentialSourceProfile credential_source=${f.credential_source}`);return s},RH=async(f,h,w,s={})=>{w.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=h[f],{source_profile:r,region:E}=$;if(!w.roleAssumer){let{getDefaultRoleAssumer:T}=await Promise.resolve().then(() => p(IC(),1));w.roleAssumer=T({...w.clientConfig,credentialProviderLogger:w.logger,parentClientConfig:{...w?.parentClientConfig,region:E??w?.parentClientConfig?.region}},w.clientPlugins)}if(r&&r in s)throw new a(`Detected a cycle attempting to resolve credentials for profile ${y1(w)}. Profiles visited: `+Object.keys(s).join(", "),{logger:w.logger});w.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${r?`source_profile=[${r}]`:`profile=[${f}]`}`);let U=r?kE(r,h,w,{...s,[r]:!0},zH(h[r]??{})):(await NV($.credential_source,f,w.logger)(w))();if(zH($))return U.then((T)=>LC.setCredentialFeature(T,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let T={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:F}=$;if(F){if(!w.mfaCodeProvider)throw new a(`Profile ${f} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:w.logger,tryNextLink:!1});T.SerialNumber=F,T.TokenCode=await w.mfaCodeProvider(F)}let C=await U;return w.roleAssumer(C,T).then((I)=>LC.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},zH=(f)=>{return!f.role_arn&&!!f.credential_source};var XH=B(()=>{LC=p(I1(),1);Y0();wf();DV();BC()});var SH,YH=(f,h,w)=>{if(h.Version!==1)throw Error(`Profile ${f} credential_process did not return Version 1.`);if(h.AccessKeyId===void 0||h.SecretAccessKey===void 0)throw Error(`Profile ${f} credential_process returned invalid credentials.`);if(h.Expiration){let r=new Date;if(new Date(h.Expiration)<r)throw Error(`Profile ${f} credential_process returned expired credentials.`)}let s=h.AccountId;if(!s&&w?.[f]?.aws_account_id)s=w[f].aws_account_id;let $={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,...h.SessionToken&&{sessionToken:h.SessionToken},...h.Expiration&&{expiration:new Date(h.Expiration)},...h.CredentialScope&&{credentialScope:h.CredentialScope},...s&&{accountId:s}};return SH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var MH=B(()=>{SH=p(I1(),1)});import{exec as Ih0}from"node:child_process";import{promisify as Lh0}from"node:util";var QH=async(f,h,w)=>{let s=h[f];if(h[f]){let $=s.credential_process;if($!==void 0){let r=Lh0(Ih0);try{let{stdout:E}=await r($),U;try{U=JSON.parse(E.trim())}catch{throw Error(`Profile ${f} credential_process returned invalid JSON.`)}return YH(f,U,h)}catch(E){throw new a(E.message,{logger:w})}}else throw new a(`Profile ${f} did not contain credential_process.`,{logger:w})}else throw new a(`Profile ${f} could not be found in shared credentials file.`,{logger:w})};var KH=B(()=>{Y0();MH()});var Bh0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let w=await Kh(f);return QH(y1({profile:f.profile??h?.profile}),w,f.logger)};var ZH=B(()=>{wf();KH()});var GC={};Ch(GC,{fromProcess:()=>Bh0});var WC=B(()=>{ZH()});var JH,VH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.credential_process==="string",PH=async(f,h)=>Promise.resolve().then(() => (WC(),GC)).then(({fromProcess:w})=>w({...f,profile:h})().then((s)=>JH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var HH=B(()=>{JH=p(I1(),1)});var zC,NH=async(f,h,w={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (J8(),Z8));return s({profile:f,logger:w.logger,parentClientConfig:w.parentClientConfig,clientConfig:w.clientConfig})().then(($)=>{if(h.sso_session)return zC.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return zC.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},DH=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var qH=B(()=>{zC=p(I1(),1)});var kH,AC=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.aws_access_key_id==="string"&&typeof f.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof f.aws_session_token)>-1&&["undefined","string"].indexOf(typeof f.aws_account_id)>-1,RC=async(f,h)=>{h?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let w={accessKeyId:f.aws_access_key_id,secretAccessKey:f.aws_secret_access_key,sessionToken:f.aws_session_token,...f.aws_credential_scope&&{credentialScope:f.aws_credential_scope},...f.aws_account_id&&{accountId:f.aws_account_id}};return kH.setCredentialFeature(w,"CREDENTIALS_PROFILE","n")};var yH=B(()=>{kH=p(I1(),1)});var XC=(f)=>async(h)=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:w,roleSessionName:s,webIdentityToken:$,providerId:r,policyArns:E,policy:U,durationSeconds:T}=f,{roleAssumerWithWebIdentity:F}=f;if(!F){let{getDefaultRoleAssumerWithWebIdentity:C}=await Promise.resolve().then(() => p(IC(),1));F=C({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...h?.callerClientConfig,...f.parentClientConfig}},f.clientPlugins)}return F({RoleArn:w,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:r,PolicyArns:E,Policy:U,DurationSeconds:T})};import{readFileSync as Gh0}from"node:fs";var OH,jH="AWS_WEB_IDENTITY_TOKEN_FILE",Wh0="AWS_ROLE_ARN",zh0="AWS_ROLE_SESSION_NAME",Ah0=(f={})=>async()=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let h=f?.webIdentityTokenFile??process.env[jH],w=f?.roleArn??process.env[Wh0],s=f?.roleSessionName??process.env[zh0];if(!h||!w)throw new a("Web identity configuration not specified",{logger:f.logger});let $=await XC({...f,webIdentityToken:Gh0(h,{encoding:"ascii"}),roleArn:w,roleSessionName:s})();if(h===process.env[jH])OH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var lH=B(()=>{OH=p(I1(),1);Y0()});var SC={};Ch(SC,{fromWebToken:()=>XC,fromTokenFile:()=>Ah0});var YC=B(()=>{lH()});var vH,bH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.web_identity_token_file==="string"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1,mH=async(f,h)=>Promise.resolve().then(() => (YC(),SC)).then(({fromTokenFile:w})=>w({webIdentityTokenFile:f.web_identity_token_file,roleArn:f.role_arn,roleSessionName:f.role_session_name,roleAssumerWithWebIdentity:h.roleAssumerWithWebIdentity,logger:h.logger,parentClientConfig:h.parentClientConfig})().then((s)=>vH.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var dH=B(()=>{vH=p(I1(),1)});var kE=async(f,h,w,s={},$=!1)=>{let r=h[f];if(Object.keys(s).length>0&&AC(r))return RC(r,w);if($||AH(r,{profile:f,logger:w.logger}))return RH(f,h,w,s);if(AC(r))return RC(r,w);if(bH(r))return mH(r,w);if(VH(r))return PH(w,f);if(DH(r))return await NH(f,r,w);throw new a(`Could not resolve credentials using profile: [${f}] in configuration/credentials file(s).`,{logger:w.logger})};var BC=B(()=>{Y0();XH();HH();qH();yH();dH()});var Rh0=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Kh(w);return kE(y1({profile:f.profile??h?.profile}),s,w)};var iH=B(()=>{wf();BC()});var cH={};Ch(cH,{fromIni:()=>Rh0});var gH=B(()=>{iH()});w5();s5();$5();y$();Mh();var us=p(m0(),1);fr();D();Ew();J();var UY=p(O0(),1);gf();var TY=async(f,h,w)=>{return{operation:Sh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function X_(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var FY=(f)=>{let h=[];switch(f.operation){default:h.push(X_(f))}return h},CY=(f)=>{let h=UY.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var IY=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53"})},K={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var LY={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/credential-provider-node":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-route53":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var FN=p(O0(),1);gF();Y0();wf();Y0();var C9="AWS_EC2_METADATA_DISABLED",I9=async(f)=>{let{ENV_CMDS_FULL_URI:h,ENV_CMDS_RELATIVE_URI:w,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (e$(),n$));if(process.env[w]||process.env[h]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:r}=await Promise.resolve().then(() => (E3(),r3));return xf(r(f),s(f))}if(process.env[C9]&&process.env[C9]!=="false")return async()=>{throw new a("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(f)};var xH=!1,yE=(f={})=>fw(xf(async()=>{if(f.profile??process.env[DR]){if(process.env[Xr]&&process.env[Sr]){if(!xH)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
52
52
  Multiple credential sources detected:
53
53
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
54
54
  This SDK will proceed with the AWS_PROFILE value.
@@ -56,9 +56,9 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
56
56
  However, a future version may change this behavior to prefer the ENV static credentials.
57
57
  Please ensure that your environment only sets either the AWS_PROFILE or the
58
58
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
59
- `),nH=!0}throw new a("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),cF(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoSession:r}=f;if(!h&&!w&&!s&&!$&&!r)throw new a("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:E}=await Promise.resolve().then(() => (J8(),Z8));return E(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:h}=await Promise.resolve().then(() => (_H(),xH));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:h}=await Promise.resolve().then(() => (W6(),G6));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:h}=await Promise.resolve().then(() => (Y6(),S6));return h(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await I9(f))()},async()=>{throw new a("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),Qh0,Mh0),Mh0=(f)=>f?.expiration!==void 0,Qh0=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;RE();Qh();XE();Ew();Jh();wr();SE();wf();var FN=o(O0(),1);J();uw();YE();bs();N$();cf();var eH={["required"]:!1,type:"String"},aH={["required"]:!0,default:!1,type:"Boolean"},pH={["ref"]:"Endpoint"},lE={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},EN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},$1={},oH={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},s$={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Lw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},wh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},uH={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},tH={["fn"]:"stringEquals",["argv"]:[s$,"aws-us-gov"]},fN={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},hN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},wN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},sN=[lE],$N=[EN],rN=[{["ref"]:"Region"}],Kh0={version:"1.0",parameters:{Region:eH,UseDualStack:aH,UseFIPS:aH,Endpoint:eH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[pH]}],rules:[{conditions:sN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:$N,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:pH,properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:rN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:rN,assign:"PartitionResult"}],rules:[{conditions:[oH,Lw,wh],endpoint:{url:"https://route53.amazonaws.com",properties:uH,headers:$1},type:"endpoint"},{conditions:[oH,lE,wh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:uH,headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-cn"]},Lw,wh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:$1},type:"endpoint"},{conditions:[tH,Lw,wh],endpoint:fN,type:"endpoint"},{conditions:[tH,lE,wh],endpoint:fN,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso"]},Lw,wh],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-b"]},Lw,wh],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-e"]},Lw,wh],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[s$,"aws-iso-f"]},Lw,wh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:$1},type:"endpoint"},{conditions:[lE,EN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,hN]},wN],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:sN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[hN,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:$N,rules:[{conditions:[wN],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},UN=Kh0;var Zh0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),TN=(f,h={})=>{return Zh0.get(f,()=>nh(UN,{endpointParams:f,logger:h.logger}))};t1.aws=eh;var CN=(f)=>{return{apiVersion:"2013-04-01",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??TN,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??FY,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new FN.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??vs}};J();ME();J();var LN=(f)=>{Is(process.version);let h=cs(f),w=()=>h().then(Cs),s=CN(f);IN.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??OE,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:LY.version}),maxAttempts:f?.maxAttempts??z0(ss,f),region:f?.region??z0(Mh,{...nw,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...rs,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??Cw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??z0(xw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(_w,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};QE();C1();J();var BN=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},GN=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var WN=(f,h)=>{let w=Object.assign(gs(f),Ls(f),Jw(f),BN(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,xs(w),Bs(w),Vw(w),GN(w))};class M6 extends $w{config;constructor(...[f]){let h=LN(f||{});super(h);this.initConfig=h;let w=IY(h),s=Ow(w),$=$s(s),r=ew($),E=Pw(r),U=tw(E),T=CY(U),F=WN(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(cw(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(aw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(Dw(this.config)),this.middlewareStack.use($$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:TY,identityProviderConfigProvider:async(C)=>new $$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use($$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var vE=/^\/(hostedzone|change|delegationset)\//;function Jh0(){return(f)=>async(h)=>{let{ChangeBatch:w}=h.input,s=[];for(let $ of w.Changes){let{AliasTarget:r}=$.ResourceRecordSet;if(r)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...r,HostedZoneId:r.HostedZoneId.replace(vE,"")}}});else s.push($)}return f({...h,input:{...h.input,ChangeBatch:{...w,Changes:s}}})}}var Vh0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},AN=(f)=>({applyToStack:(h)=>{h.add(Jh0(),Vh0)}});var Ph0=["DelegationSetId","HostedZoneId","Id"];function Hh0(){return(f)=>async(h)=>{let w={...h.input};for(let s of Ph0){let $=w[s];if($)w[s]=$.replace(vE,"")}return f({...h,input:w})}}var Nh0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},O=(f)=>({applyToStack:(h)=>{h.add(Hh0(),Nh0)}});D();k();J();var _=o(O0(),1);function zN(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function RN(f){return f.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class Q6{value;constructor(f){this.value=f}toString(){return RN(""+this.value)}}class P{name;children;attributes={};static of(f,h,w){let s=new P(f);if(h!==void 0)s.addChildNode(new Q6(h));if(w!==void 0)s.withName(w);return s}constructor(f,h=[]){this.name=f,this.children=h}withName(f){return this.name=f,this}addAttribute(f,h){return this.attributes[f]=h,this}addChildNode(f){return this.children.push(f),this}removeAttribute(f){return delete this.attributes[f],this}n(f){return this.name=f,this}c(f){return this.children.push(f),this}a(f,h){if(h!=null)this.attributes[f]=h;return this}cc(f,h,w=h){if(f[h]!=null){let s=P.of(h,f[h]).withName(w);this.c(s)}}l(f,h,w,s){if(f[h]!=null)s().map((r)=>{r.withName(w),this.c(r)})}lc(f,h,w,s){if(f[h]!=null){let $=s(),r=new P(w);$.map((E)=>{r.c(E)}),this.c(r)}}toString(){let f=Boolean(this.children.length),h=`<${this.name}`,w=this.attributes;for(let s of Object.keys(w)){let $=w[s];if($!=null)h+=` ${s}="${zN(""+$)}"`}return h+=!f?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var d=o(m0(),1);J();J();class m extends $f{constructor(f){super(f);Object.setPrototypeOf(this,m.prototype)}}class bE extends m{name="ConcurrentModification";$fault="client";constructor(f){super({name:"ConcurrentModification",$fault:"client",...f});Object.setPrototypeOf(this,bE.prototype)}}class mE extends m{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,mE.prototype)}}class dE extends m{name="InvalidKeySigningKeyStatus";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...f});Object.setPrototypeOf(this,dE.prototype)}}class iE extends m{name="InvalidKMSArn";$fault="client";constructor(f){super({name:"InvalidKMSArn",$fault:"client",...f});Object.setPrototypeOf(this,iE.prototype)}}class cE extends m{name="InvalidSigningStatus";$fault="client";constructor(f){super({name:"InvalidSigningStatus",$fault:"client",...f});Object.setPrototypeOf(this,cE.prototype)}}class gE extends m{name="NoSuchKeySigningKey";$fault="client";constructor(f){super({name:"NoSuchKeySigningKey",$fault:"client",...f});Object.setPrototypeOf(this,gE.prototype)}}class xE extends m{name="ConflictingDomainExists";$fault="client";constructor(f){super({name:"ConflictingDomainExists",$fault:"client",...f});Object.setPrototypeOf(this,xE.prototype)}}class _E extends m{name="InvalidVPCId";$fault="client";constructor(f){super({name:"InvalidVPCId",$fault:"client",...f});Object.setPrototypeOf(this,_E.prototype)}}class nE extends m{name="LimitsExceeded";$fault="client";constructor(f){super({name:"LimitsExceeded",$fault:"client",...f});Object.setPrototypeOf(this,nE.prototype)}}class eE extends m{name="NoSuchHostedZone";$fault="client";constructor(f){super({name:"NoSuchHostedZone",$fault:"client",...f});Object.setPrototypeOf(this,eE.prototype)}}class aE extends m{name="NotAuthorizedException";$fault="client";constructor(f){super({name:"NotAuthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,aE.prototype)}}class pE extends m{name="PriorRequestNotComplete";$fault="client";constructor(f){super({name:"PriorRequestNotComplete",$fault:"client",...f});Object.setPrototypeOf(this,pE.prototype)}}class oE extends m{name="PublicZoneVPCAssociation";$fault="client";constructor(f){super({name:"PublicZoneVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,oE.prototype)}}class uE extends m{name="CidrBlockInUseException";$fault="client";Message;constructor(f){super({name:"CidrBlockInUseException",$fault:"client",...f});Object.setPrototypeOf(this,uE.prototype),this.Message=f.Message}}class tE extends m{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(f){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...f});Object.setPrototypeOf(this,tE.prototype),this.Message=f.Message}}class f2 extends m{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrCollectionException",$fault:"client",...f});Object.setPrototypeOf(this,f2.prototype),this.Message=f.Message}}class h2 extends m{name="InvalidChangeBatch";$fault="client";messages;constructor(f){super({name:"InvalidChangeBatch",$fault:"client",...f});Object.setPrototypeOf(this,h2.prototype),this.messages=f.messages}}class w2 extends m{name="NoSuchHealthCheck";$fault="client";constructor(f){super({name:"NoSuchHealthCheck",$fault:"client",...f});Object.setPrototypeOf(this,w2.prototype)}}class s2 extends m{name="ThrottlingException";$fault="client";constructor(f){super({name:"ThrottlingException",$fault:"client",...f});Object.setPrototypeOf(this,s2.prototype)}}class $2 extends m{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(f){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...f});Object.setPrototypeOf(this,$2.prototype),this.Message=f.Message}}class r2 extends m{name="HealthCheckAlreadyExists";$fault="client";constructor(f){super({name:"HealthCheckAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,r2.prototype)}}class E2 extends m{name="TooManyHealthChecks";$fault="client";constructor(f){super({name:"TooManyHealthChecks",$fault:"client",...f});Object.setPrototypeOf(this,E2.prototype)}}class U2 extends m{name="DelegationSetNotAvailable";$fault="client";constructor(f){super({name:"DelegationSetNotAvailable",$fault:"client",...f});Object.setPrototypeOf(this,U2.prototype)}}class T2 extends m{name="DelegationSetNotReusable";$fault="client";constructor(f){super({name:"DelegationSetNotReusable",$fault:"client",...f});Object.setPrototypeOf(this,T2.prototype)}}class F2 extends m{name="HostedZoneAlreadyExists";$fault="client";constructor(f){super({name:"HostedZoneAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,F2.prototype)}}class C2 extends m{name="InvalidDomainName";$fault="client";constructor(f){super({name:"InvalidDomainName",$fault:"client",...f});Object.setPrototypeOf(this,C2.prototype)}}class I2 extends m{name="NoSuchDelegationSet";$fault="client";constructor(f){super({name:"NoSuchDelegationSet",$fault:"client",...f});Object.setPrototypeOf(this,I2.prototype)}}class L2 extends m{name="TooManyHostedZones";$fault="client";constructor(f){super({name:"TooManyHostedZones",$fault:"client",...f});Object.setPrototypeOf(this,L2.prototype)}}class B2 extends m{name="InvalidArgument";$fault="client";constructor(f){super({name:"InvalidArgument",$fault:"client",...f});Object.setPrototypeOf(this,B2.prototype)}}class G2 extends m{name="InvalidKeySigningKeyName";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyName",$fault:"client",...f});Object.setPrototypeOf(this,G2.prototype)}}class W2 extends m{name="KeySigningKeyAlreadyExists";$fault="client";constructor(f){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,W2.prototype)}}class A2 extends m{name="TooManyKeySigningKeys";$fault="client";constructor(f){super({name:"TooManyKeySigningKeys",$fault:"client",...f});Object.setPrototypeOf(this,A2.prototype)}}class z2 extends m{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(f){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...f});Object.setPrototypeOf(this,z2.prototype)}}class R2 extends m{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(f){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...f});Object.setPrototypeOf(this,R2.prototype)}}class X2 extends m{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(f){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,X2.prototype)}}class S2 extends m{name="DelegationSetAlreadyCreated";$fault="client";constructor(f){super({name:"DelegationSetAlreadyCreated",$fault:"client",...f});Object.setPrototypeOf(this,S2.prototype)}}class Y2 extends m{name="DelegationSetAlreadyReusable";$fault="client";constructor(f){super({name:"DelegationSetAlreadyReusable",$fault:"client",...f});Object.setPrototypeOf(this,Y2.prototype)}}class M2 extends m{name="HostedZoneNotFound";$fault="client";constructor(f){super({name:"HostedZoneNotFound",$fault:"client",...f});Object.setPrototypeOf(this,M2.prototype)}}class Q2 extends m{name="InvalidTrafficPolicyDocument";$fault="client";constructor(f){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...f});Object.setPrototypeOf(this,Q2.prototype)}}class K2 extends m{name="TooManyTrafficPolicies";$fault="client";constructor(f){super({name:"TooManyTrafficPolicies",$fault:"client",...f});Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends m{name="TrafficPolicyAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,Z2.prototype)}}class J2 extends m{name="NoSuchTrafficPolicy";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicy",$fault:"client",...f});Object.setPrototypeOf(this,J2.prototype)}}class V2 extends m{name="TooManyTrafficPolicyInstances";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...f});Object.setPrototypeOf(this,V2.prototype)}}class P2 extends m{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,P2.prototype)}}class H2 extends m{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...f});Object.setPrototypeOf(this,H2.prototype)}}class N2 extends m{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(f){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...f});Object.setPrototypeOf(this,N2.prototype)}}class D2 extends m{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(f){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...f});Object.setPrototypeOf(this,D2.prototype)}}class q2 extends m{name="KeySigningKeyInUse";$fault="client";constructor(f){super({name:"KeySigningKeyInUse",$fault:"client",...f});Object.setPrototypeOf(this,q2.prototype)}}class k2 extends m{name="CidrCollectionInUseException";$fault="client";Message;constructor(f){super({name:"CidrCollectionInUseException",$fault:"client",...f});Object.setPrototypeOf(this,k2.prototype),this.Message=f.Message}}class y2 extends m{name="HealthCheckInUse";$fault="client";constructor(f){super({name:"HealthCheckInUse",$fault:"client",...f});Object.setPrototypeOf(this,y2.prototype)}}class j2 extends m{name="HostedZoneNotEmpty";$fault="client";constructor(f){super({name:"HostedZoneNotEmpty",$fault:"client",...f});Object.setPrototypeOf(this,j2.prototype)}}class O2 extends m{name="NoSuchQueryLoggingConfig";$fault="client";constructor(f){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...f});Object.setPrototypeOf(this,O2.prototype)}}class l2 extends m{name="DelegationSetInUse";$fault="client";constructor(f){super({name:"DelegationSetInUse",$fault:"client",...f});Object.setPrototypeOf(this,l2.prototype)}}class v2 extends m{name="TrafficPolicyInUse";$fault="client";constructor(f){super({name:"TrafficPolicyInUse",$fault:"client",...f});Object.setPrototypeOf(this,v2.prototype)}}class b2 extends m{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...f});Object.setPrototypeOf(this,b2.prototype)}}class m2 extends m{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,m2.prototype)}}class d2 extends m{name="DNSSECNotFound";$fault="client";constructor(f){super({name:"DNSSECNotFound",$fault:"client",...f});Object.setPrototypeOf(this,d2.prototype)}}class i2 extends m{name="LastVPCAssociation";$fault="client";constructor(f){super({name:"LastVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,i2.prototype)}}class c2 extends m{name="VPCAssociationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,c2.prototype)}}class g2 extends m{name="HostedZonePartiallyDelegated";$fault="client";constructor(f){super({name:"HostedZonePartiallyDelegated",$fault:"client",...f});Object.setPrototypeOf(this,g2.prototype)}}class x2 extends m{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(f){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...f});Object.setPrototypeOf(this,x2.prototype)}}class _2 extends m{name="NoSuchChange";$fault="client";constructor(f){super({name:"NoSuchChange",$fault:"client",...f});Object.setPrototypeOf(this,_2.prototype)}}class n2 extends m{name="NoSuchGeoLocation";$fault="client";constructor(f){super({name:"NoSuchGeoLocation",$fault:"client",...f});Object.setPrototypeOf(this,n2.prototype)}}class e2 extends m{name="IncompatibleVersion";$fault="client";constructor(f){super({name:"IncompatibleVersion",$fault:"client",...f});Object.setPrototypeOf(this,e2.prototype)}}class a2 extends m{name="HostedZoneNotPrivate";$fault="client";constructor(f){super({name:"HostedZoneNotPrivate",$fault:"client",...f});Object.setPrototypeOf(this,a2.prototype)}}class p2 extends m{name="NoSuchCidrLocationException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrLocationException",$fault:"client",...f});Object.setPrototypeOf(this,p2.prototype),this.Message=f.Message}}class o2 extends m{name="InvalidPaginationToken";$fault="client";constructor(f){super({name:"InvalidPaginationToken",$fault:"client",...f});Object.setPrototypeOf(this,o2.prototype)}}class u2 extends m{name="HealthCheckVersionMismatch";$fault="client";constructor(f){super({name:"HealthCheckVersionMismatch",$fault:"client",...f});Object.setPrototypeOf(this,u2.prototype)}}class t2 extends m{name="ConflictingTypes";$fault="client";constructor(f){super({name:"ConflictingTypes",$fault:"client",...f});Object.setPrototypeOf(this,t2.prototype)}}var JN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},VN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(L$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(I$0,f[F0]).n(F0));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},PN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(A$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"Changes","Changes",()=>uw0(f[Gk],h)),f[fU]!=null)r.c(P.of(fU,String(f[fU])).n(fU));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},HN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(P$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[wU]!=null)r.c(aw0(f[wU],h).n(wU));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},NN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;$=c0;let r=new P(H$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"AddTags","AddTags",()=>Ls0(f[C$0],h)),r.lc(f,"RemoveTagKeys","RemoveTagKeys",()=>Is0(f[rr0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},DN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection");let $;$=c0;let r=new P(z$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(K$0,f[q0]).n(q0));if(f[p]!=null)r.c(P.of(Z$0,f[p]).n(p));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},qN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck");let $;$=c0;let r=new P(R$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(c$0,f[q0]).n(q0));if(f[Kw]!=null)r.c($s0(f[Kw],h).n(Kw));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},kN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone");let $;$=c0;let r=new P(X$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(qC,f[q0]).n(q0));if(f[$U]!=null)r.c(P.of(jf,f[$U]).n($U));if(f[rU]!=null)r.c(rs0(f[rU],h).n(rU));if(f[p]!=null)r.c(P.of(Wf,f[p]).n(p));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},yN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/keysigningkey");let $;$=c0;let r=new P(S$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(qC,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));if(f[g6]!=null)r.c(P.of(Fr0,f[g6]).n(g6));if(f[p]!=null)r.c(P.of(Tr0,f[p]).n(p));if(f[A1]!=null)r.c(P.of(Cr0,f[A1]).n(A1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},jN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/queryloggingconfig");let $;$=c0;let r=new P(J$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.cc(f,sU),f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},ON=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/delegationset");let $;$=c0;let r=new P(V$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(qC,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},lN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy");let $;$=c0;let r=new P(D$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(yC,f[F0]).n(F0));if(f[$h]!=null)r.c(P.of(zk,f[$h]).n($h));if(f[p]!=null)r.c(P.of(Wr0,f[p]).n(p));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},vN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance");let $;$=c0;let r=new P(N$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));if(f[p]!=null)r.c(P.of(Wf,f[p]).n(p));if(f[o0]!=null)r.c(P.of(o0,String(f[o0])).n(o0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},bN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(q$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(yC,f[F0]).n(F0));if(f[$h]!=null)r.c(P.of(zk,f[$h]).n($h));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},mN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(k$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},dN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},iN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},cN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},gN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},xN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},_N=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},nN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},eN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},aN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},pN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(j$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},oN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},uN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(l$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(O$0,f[F0]).n(F0));if(f[P0]!=null)r.c(ar(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},tN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},fD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/accountlimit/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1);let $;return w.m("GET").h(s).b($),w.build()},hD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/change/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},wD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/checkeripranges");let $;return w.m("GET").h(s).b($),w.build()},sD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},$D=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocation");let $=Y({[Qr0]:[,f[kf]],[Kr0]:[,f[yf]],[jr0]:[,f[Of]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},rD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ED=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheckcount");let $;return w.m("GET").h(s).b($),w.build()},UD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},TD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},FD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},CD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonecount");let $;return w.m("GET").h(s).b($),w.build()},ID=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},LD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},BD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},GD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("DelegationSetId",()=>f.DelegationSetId,"{DelegationSetId}",!1);let $;return w.m("GET").h(s).b($),w.build()},WD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("GET").h(s).b($),w.build()},AD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},zD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstancecount");let $;return w.m("GET").h(s).b($),w.build()},RD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[lf]:[,f[T1]],[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},XD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection");let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},SD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},YD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocations");let $=Y({[Or0]:[,f[Er0]],[lr0]:[,f[Ur0]],[vr0]:[,f[Gr0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},MD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck");let $=Y({[jC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},QD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone");let $=Y({[jC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[Zr0]:[,f[$U]],[Hr0]:[,f[_$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},KD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyname");let $=Y({[Jr0]:[,f[Wf]],[tr]:[,f[h0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ZD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyvpc");let $=Y({[ir0]:[,j(f[nr],"VPCId")],[gr0]:[,j(f[er],"VPCRegion")],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[X$]:[,f[k0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},JD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig");let $=Y({[tr]:[,f[h0]],[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},VD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[Dr0]:[,f[Lr0]],[br0]:[,f[Br0]],[Nr0]:[,f[Ir0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},PD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset");let $=Y({[jC]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},HD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ND=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1);let $;$=c0;let r=new P(e$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"ResourceIds","ResourceIds",()=>Bs0(f[u$0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},DD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies");let $=Y({[mr0]:[,f[BU]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},qD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances");let $=Y({[tr]:[,f[mh]],[OC]:[,f[_1]],[lC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},kD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=Y({[Rk]:[,j(f[h0],"HostedZoneId")],[OC]:[,f[_1]],[lC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},yD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=Y({[Rk]:[,j(f[z$],"TrafficPolicyId")],[cr0]:[j(f.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>f[g1].toString()],[tr]:[,f[mh]],[OC]:[,f[_1]],[lC]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},jD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies/{Id}/versions"),w.p("Id",()=>f.Id,"{Id}",!1);let $=Y({[dr0]:[,f[GU]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},OD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[X$]:[,f[k0]],[f4]:[()=>f.MaxResults!==void 0,()=>f[ur].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},lD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/testdnsanswer");let $=Y({[tr]:[,j(f[h0],"HostedZoneId")],[qr0]:[,j(f[CU],"RecordName")],[kr0]:[,j(f[IU],"RecordType")],[yr0]:[,f[o$0]],[Vr0]:[,f[v$0]],[Pr0]:[,f[b$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},vD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;$=c0;let r=new P(Rr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[qf]!=null)r.c($k(f[qf],h).n(qf));if(r.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>rk(f[Bw],h)),f[Ff]!=null)r.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Cf]!=null)r.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[If]!=null)r.c(P.of(If,String(f[If])).n(If));if(r.cc(f,mr),f[Aw]!=null)r.c(P.of(Aw,String(f[Aw])).n(Aw));if(f[Lf]!=null)r.c(P.of(Lf,String(f[Lf])).n(Lf));if(r.cc(f,dh),r.cc(f,cr),f[Bf]!=null)r.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Gf]!=null)r.c(P.of(Gf,String(f[Gf])).n(Gf));return r.lc(f,"Regions","Regions",()=>Ek(f[Gw],h)),r.lc(f,"ResetElements","ResetElements",()=>Es0(f[p$0],h)),r.cc(f,gr),r.cc(f,_r),$+=r.toString(),w.m("POST").h(s).b($),w.build()},bD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Xr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(kC,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},mD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;$=c0;let r=new P(Sr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(yC,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},dD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(Yr0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[o0]!=null)r.c(P.of(o0,String(f[o0])).n(o0));if(r.cc(f,z$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},iD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},cD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},gD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[I0]!=null)w[I0]=G(s[I0]);return w},xD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},_D=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},nD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[D6]!=null)w[D6]=Ys0(s[D6],h);return w},eD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=RU(s[Af],h);return w},aD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);if(s[V1]!=null)w[V1]=XU(s[V1],h);if(s[P0]!=null)w[P0]=DC(s[P0],h);return w},pD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[x6]!=null)w[x6]=Ck(s[x6],h);return w},oD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=HC(s[ih],h);return w},uD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},tD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=or(s[K1],h);return w},fq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[z1]!=null)w[z1]=SU(s[z1],h);return w},hq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=or(s[K1],h);return w},wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=G(s[h0]);if(s[P0]!=null)w[P0]=DC(s[P0],h);return w},sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},$q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=Gs0(s[rh],h);return w},zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CheckerIpRanges==="")w[Qr]=[];else if(s[Qr]!=null&&s[Qr][zf]!=null)w[Qr]=zs0(G0(s[Qr][zf]),h);return w},Xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.KeySigningKeys==="")w[Nr]=[];else if(s[Nr]!=null&&s[Nr][zf]!=null)w[Nr]=xs0(G0(s[Nr][zf]),h);if(s[A1]!=null)w[A1]=Ds0(s[A1],h);return w},Sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[dr]!=null)w[dr]=Uk(s[dr],h);return w},Yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=RU(s[Af],h);return w},Mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[d6]!=null)w[d6]=E1(s[d6]);return w},Qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][WU]!=null)w[Hf]=Tk(G0(s[Hf][WU]),h);return w},Kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][WU]!=null)w[Hf]=Tk(G0(s[Hf][WU]),h);return w},Zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);if(s[V1]!=null)w[V1]=XU(s[V1],h);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][P0]!=null)w[Df]=Bk(G0(s[Df][P0]),h);return w},Jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[i6]!=null)w[i6]=E1(s[i6]);return w},Vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=ds0(s[rh],h);return w},Pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=HC(s[ih],h);return w},Hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=pr(s[Q1],h);return w},Nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=h$0(s[rh],h);return w},Dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=or(s[K1],h);return w},qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[z1]!=null)w[z1]=SU(s[z1],h);return w},kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ZC]!=null)w[ZC]=M0(s[ZC]);return w},yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrBlocks==="")w[Yr]=[];else if(s[Yr]!=null&&s[Yr][zf]!=null)w[Yr]=Xs0(G0(s[Yr][zf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrCollections==="")w[Mr]=[];else if(s[Mr]!=null&&s[Mr][zf]!=null)w[Mr]=Ks0(G0(s[Mr][zf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},Oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrLocations==="")w[Kr]=[];else if(s[Kr]!=null&&s[Kr][zf]!=null)w[Kr]=_s0(G0(s[Kr][zf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.GeoLocationDetailsList==="")w[Vr]=[];else if(s[Vr]!=null&&s[Vr][dr]!=null)w[Vr]=ys0(G0(s[Vr][dr]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[p6]!=null)w[p6]=G(s[p6]);if(s[o6]!=null)w[o6]=G(s[o6]);if(s[sC]!=null)w[sC]=G(s[sC]);return w},vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthChecks==="")w[Pr]=[];else if(s[Pr]!=null&&s[Pr][Af]!=null)w[Pr]=bs0(G0(s[Pr][Af]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][V1]!=null)w[Nf]=Fk(G0(s[Nf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Wf]!=null)w[Wf]=G(s[Wf]);if(s[h0]!=null)w[h0]=G(s[h0]);if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][V1]!=null)w[Nf]=Fk(G0(s[Nf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[u6]!=null)w[u6]=G(s[u6]);if(s[t6]!=null)w[t6]=G(s[t6]);return w},dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZoneSummaries==="")w[Hr]=[];else if(s[Hr]!=null&&s[Hr][YN]!=null)w[Hr]=cs0(G0(s[Hr][YN]),h);if(s[u]!=null)w[u]=M0(s[u]);if(s[k0]!=null)w[k0]=G(s[k0]);return w},iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[k0]!=null)w[k0]=G(s[k0]);if(s.QueryLoggingConfigs==="")w[qr]=[];else if(s[qr]!=null&&s[qr][ih]!=null)w[qr]=es0(G0(s[qr][ih]),h);return w},cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[fC]!=null)w[fC]=G(s[fC]);if(s[hC]!=null)w[hC]=G(s[hC]);if(s[wC]!=null)w[wC]=G(s[wC]);if(s.ResourceRecordSets==="")w[yr]=[];else if(s[yr]!=null&&s[yr][G$]!=null)w[yr]=ts0(G0(s[yr][G$]),h);return w},gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.DelegationSets==="")w[Zr]=[];else if(s[Zr]!=null&&s[Zr][Q1]!=null)w[Zr]=Ps0(G0(s[Zr][Q1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[xr]!=null)w[xr]=Lk(s[xr],h);return w},_q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.ResourceTagSets==="")w[jr]=[];else if(s[jr]!=null&&s[jr][xr]!=null)w[jr]=f$0(G0(s[jr][xr]),h);return w},nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[BU]!=null)w[BU]=G(s[BU]);if(s.TrafficPolicySummaries==="")w[Or]=[];else if(s[Or]!=null&&s[Or][ZN]!=null)w[Or]=E$0(G0(s[Or][ZN]),h);return w},eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=G(s[mh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][z1]!=null)w[W1]=NC(G0(s[W1][z1]),h);return w},aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][z1]!=null)w[W1]=NC(G0(s[W1][z1]),h);return w},pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=G(s[mh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][z1]!=null)w[W1]=NC(G0(s[W1][z1]),h);return w},oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s.TrafficPolicies==="")w[lr]=[];else if(s[lr]!=null&&s[lr][K1]!=null)w[lr]=r$0(G0(s[lr][K1]),h);if(s[GU]!=null)w[GU]=G(s[GU]);return w},uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=G(s[h0]);if(s[k0]!=null)w[k0]=G(s[k0]);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][P0]!=null)w[Df]=Bk(G0(s[Df][P0]),h);return w},tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$C]!=null)w[$C]=G(s[$C]);if(s[IC]!=null)w[IC]=G(s[IC]);if(s.RecordData==="")w[kr]=[];else if(s[kr]!=null&&s[kr][QN]!=null)w[kr]=as0(G0(s[kr][QN]),h);if(s[CU]!=null)w[CU]=G(s[CU]);if(s[IU]!=null)w[IU]=G(s[IU]);if(s[LC]!=null)w[LC]=G(s[LC]);return w},fk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=RU(s[Af],h);return w},hk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[V1]!=null)w[V1]=XU(s[V1],h);return w},wk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=or(s[K1],h);return w},sk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[z1]!=null)w[z1]=SU(s[z1],h);return w},i=async(f,h)=>{let w={...f,body:await _.parseXmlErrorBody(f.body,h)},s=_.loadRestXmlErrorCode(f,w.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await Oh0(w,h);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await $w0(w,h);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Uw0(w,h);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Ew0(w,h);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Fw0(w,h);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await Jw0(w,h);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await lh0(w,h);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Iw0(w,h);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await zw0(w,h);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Zw0(w,h);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await Nw0(w,h);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await Dw0(w,h);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await qw0(w,h);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await qh0(w,h);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await jh0(w,h);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Xw0(w,h);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await ww0(w,h);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Kw0(w,h);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await yw0(w,h);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await kh0(w,h);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await xh0(w,h);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await jw0(w,h);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await ih0(w,h);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await ch0(w,h);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await eh0(w,h);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await sw0(w,h);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Mw0(w,h);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await Ow0(w,h);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await hw0(w,h);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await rw0(w,h);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Lw0(w,h);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await lw0(w,h);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await fw0(w,h);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Yw0(w,h);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await kw0(w,h);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await bh0(w,h);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await mh0(w,h);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await ph0(w,h);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Cw0(w,h);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await vw0(w,h);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await iw0(w,h);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await Pw0(w,h);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await bw0(w,h);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await cw0(w,h);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await mw0(w,h);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await dw0(w,h);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Bw0(w,h);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Gw0(w,h);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await yh0(w,h);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await _h0(w,h);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await ah0(w,h);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Vw0(w,h);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await dh0(w,h);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await gw0(w,h);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await Hw0(w,h);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await xw0(w,h);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await gh0(w,h);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Aw0(w,h);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await _w0(w,h);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await uh0(w,h);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Ww0(w,h);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Rw0(w,h);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Qw0(w,h);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await th0(w,h);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await oh0(w,h);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Sw0(w,h);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Tw0(w,h);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await nh0(w,h);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await vh0(w,h);default:let $=w.body;return Dh0({output:f,parsedBody:$.Error,errorCode:s})}},Dh0=Fs(m),qh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new uE({$metadata:Z(f),...w});return l($,f.body.Error)},kh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new $2({$metadata:Z(f),...w});return l($,f.body.Error)},yh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new k2({$metadata:Z(f),...w});return l($,f.body.Error)},jh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new tE({$metadata:Z(f),...w});return l($,f.body.Error)},Oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new bE({$metadata:Z(f),...w});return l($,f.body.Error)},lh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new xE({$metadata:Z(f),...w});return l($,f.body.Error)},vh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new t2({$metadata:Z(f),...w});return l($,f.body.Error)},bh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new S2({$metadata:Z(f),...w});return l($,f.body.Error)},mh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Y2({$metadata:Z(f),...w});return l($,f.body.Error)},dh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new l2({$metadata:Z(f),...w});return l($,f.body.Error)},ih0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new U2({$metadata:Z(f),...w});return l($,f.body.Error)},ch0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new T2({$metadata:Z(f),...w});return l($,f.body.Error)},gh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new d2({$metadata:Z(f),...w});return l($,f.body.Error)},xh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new r2({$metadata:Z(f),...w});return l($,f.body.Error)},_h0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new y2({$metadata:Z(f),...w});return l($,f.body.Error)},nh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new u2({$metadata:Z(f),...w});return l($,f.body.Error)},eh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new F2({$metadata:Z(f),...w});return l($,f.body.Error)},ah0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new j2({$metadata:Z(f),...w});return l($,f.body.Error)},ph0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new M2({$metadata:Z(f),...w});return l($,f.body.Error)},oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new a2({$metadata:Z(f),...w});return l($,f.body.Error)},uh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new g2({$metadata:Z(f),...w});return l($,f.body.Error)},th0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new e2({$metadata:Z(f),...w});return l($,f.body.Error)},fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new z2({$metadata:Z(f),...w});return l($,f.body.Error)},hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new B2({$metadata:Z(f),...w});return l($,f.body.Error)},ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);if(s.messages==="")w[br]=[];else if(s[br]!=null&&s[br][v0]!=null)w[br]=qs0(G0(s[br][v0]),h);let $=new h2({$metadata:Z(f),...w});return l($,f.body.Error)},sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new C2({$metadata:Z(f),...w});return l($,f.body.Error)},$w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new mE({$metadata:Z(f),...w});return l($,f.body.Error)},rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new G2({$metadata:Z(f),...w});return l($,f.body.Error)},Ew0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new dE({$metadata:Z(f),...w});return l($,f.body.Error)},Uw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new iE({$metadata:Z(f),...w});return l($,f.body.Error)},Tw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new o2({$metadata:Z(f),...w});return l($,f.body.Error)},Fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new cE({$metadata:Z(f),...w});return l($,f.body.Error)},Cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Q2({$metadata:Z(f),...w});return l($,f.body.Error)},Iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new _E({$metadata:Z(f),...w});return l($,f.body.Error)},Lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new W2({$metadata:Z(f),...w});return l($,f.body.Error)},Bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new D2({$metadata:Z(f),...w});return l($,f.body.Error)},Gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new q2({$metadata:Z(f),...w});return l($,f.body.Error)},Ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new x2({$metadata:Z(f),...w});return l($,f.body.Error)},Aw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new i2({$metadata:Z(f),...w});return l($,f.body.Error)},zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new nE({$metadata:Z(f),...w});return l($,f.body.Error)},Rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new _2({$metadata:Z(f),...w});return l($,f.body.Error)},Xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new f2({$metadata:Z(f),...w});return l($,f.body.Error)},Sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new p2({$metadata:Z(f),...w});return l($,f.body.Error)},Yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new R2({$metadata:Z(f),...w});return l($,f.body.Error)},Mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new I2({$metadata:Z(f),...w});return l($,f.body.Error)},Qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new n2({$metadata:Z(f),...w});return l($,f.body.Error)},Kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new w2({$metadata:Z(f),...w});return l($,f.body.Error)},Zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new eE({$metadata:Z(f),...w});return l($,f.body.Error)},Jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new gE({$metadata:Z(f),...w});return l($,f.body.Error)},Vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new O2({$metadata:Z(f),...w});return l($,f.body.Error)},Pw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new J2({$metadata:Z(f),...w});return l($,f.body.Error)},Hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new b2({$metadata:Z(f),...w});return l($,f.body.Error)},Nw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new aE({$metadata:Z(f),...w});return l($,f.body.Error)},Dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new pE({$metadata:Z(f),...w});return l($,f.body.Error)},qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new oE({$metadata:Z(f),...w});return l($,f.body.Error)},kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new X2({$metadata:Z(f),...w});return l($,f.body.Error)},yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new s2({$metadata:Z(f),...w});return l($,f.body.Error)},jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new E2({$metadata:Z(f),...w});return l($,f.body.Error)},Ow0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new L2({$metadata:Z(f),...w});return l($,f.body.Error)},lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new A2({$metadata:Z(f),...w});return l($,f.body.Error)},vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new K2({$metadata:Z(f),...w});return l($,f.body.Error)},bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new V2({$metadata:Z(f),...w});return l($,f.body.Error)},mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new H2({$metadata:Z(f),...w});return l($,f.body.Error)},dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new N2({$metadata:Z(f),...w});return l($,f.body.Error)},iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Z2({$metadata:Z(f),...w});return l($,f.body.Error)},cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new P2({$metadata:Z(f),...w});return l($,f.body.Error)},gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new v2({$metadata:Z(f),...w});return l($,f.body.Error)},xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new m2({$metadata:Z(f),...w});return l($,f.body.Error)},_w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new c2({$metadata:Z(f),...w});return l($,f.body.Error)},$k=(f,h)=>{let w=new P(qf);if(f[u0]!=null)w.c(P.of(y$0,f[u0]).n(u0));if(f[p]!=null)w.c(P.of(F$0,f[p]).n(p));return w},nw0=(f,h)=>{let w=new P(Xw);if(f[h0]!=null)w.c(P.of(jf,f[h0]).n(h0));if(w.cc(f,Wf),f[F$]!=null)w.c(P.of(T$0,String(f[F$])).n(F$));return w},ew0=(f,h)=>{let w=new P(Wk);if(f[E$]!=null)w.c(P.of(B$0,f[E$]).n(E$));if(f[G$]!=null)w.c(Fs0(f[G$],h).n(G$));return w},aw0=(f,h)=>{let w=new P(wU);if(f[F0]!=null)w.c(P.of(kC,f[F0]).n(F0));return w.lc(f,"Changes","Changes",()=>pw0(f[Gk],h)),w},pw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return ew0(w,h).n(Wk)})},rk=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(ir,w).n(PC)})},ow0=(f,h)=>{let w=new P(G$0);if(f[T1]!=null)w.c(P.of(M$0,f[T1]).n(T1));if(f[E$]!=null)w.c(P.of(W$0,f[E$]).n(E$));return w.lc(f,"CidrList","CidrList",()=>tw0(f[Q$0],h)),w},uw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return ow0(w,h).n(zf)})},tw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(XN,w).n(XN)})},fs0=(f,h)=>{let w=new P(Sw);if(f[T$]!=null)w.c(P.of(Mr0,f[T$]).n(T$));if(f[T1]!=null)w.c(P.of(Y$0,f[T1]).n(T1));return w},hs0=(f,h)=>{let w=new P(Yw);return w.cc(f,UU),w.cc(f,TU),w},ws0=(f,h)=>{let w=new P(Mw);if(f[kf]!=null)w.c(P.of(m$0,f[kf]).n(kf));if(f[yf]!=null)w.c(P.of(d$0,f[yf]).n(yf));if(f[Of]!=null)w.c(P.of(i$0,f[Of]).n(Of));return w},ss0=(f,h)=>{let w=new P(Qw);if(w.cc(f,hU),w.cc(f,EU),f[Yw]!=null)w.c(hs0(f[Yw],h).n(Yw));if(f[Ww]!=null)w.c(P.of(Ww,String(f[Ww])).n(Ww));return w},$s0=(f,h)=>{let w=new P(Kw);if(w.cc(f,dh),f[Gf]!=null)w.c(P.of(Gf,String(f[Gf])).n(Gf));if(f[Z0]!=null)w.c(P.of(x$0,f[Z0]).n(Z0));if(w.cc(f,gr),w.cc(f,mr),w.cc(f,_r),f[Rw]!=null)w.c(P.of(Rw,String(f[Rw])).n(Rw));if(f[If]!=null)w.c(P.of(If,String(f[If])).n(If));if(f[zw]!=null)w.c(P.of(zw,String(f[zw])).n(zw));if(f[Bf]!=null)w.c(P.of(Bf,String(f[Bf])).n(Bf));if(f[Ff]!=null)w.c(P.of(Ff,String(f[Ff])).n(Ff));if(f[Lf]!=null)w.c(P.of(Lf,String(f[Lf])).n(Lf));if(w.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>rk(f[Bw],h)),f[Cf]!=null)w.c(P.of(Cf,String(f[Cf])).n(Cf));if(w.lc(f,"Regions","Regions",()=>Ek(f[Gw],h)),f[qf]!=null)w.c($k(f[qf],h).n(qf));return w.cc(f,cr),w.cc(f,FU),w},Ek=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(g$0,w).n(u0)})},rs0=(f,h)=>{let w=new P(rU);if(f[F0]!=null)w.c(P.of(kC,f[F0]).n(F0));if(f[B$]!=null)w.c(P.of(n$0,String(f[B$])).n(B$));return w},Es0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(KN,w).n(KN)})},Us0=(f,h)=>{let w=new P(AU);if(f[y0]!=null)w.c(P.of(a$0,f[y0]).n(y0));return w},Ts0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Us0(w,h).n(AU)})},Fs0=(f,h)=>{let w=new P(G$);if(f[p]!=null)w.c(P.of(Wf,f[p]).n(p));if(f[Z0]!=null)w.c(P.of($r0,f[Z0]).n(Z0));if(f[W$]!=null)w.c(P.of(fr0,f[W$]).n(W$));if(f[R$]!=null)w.c(P.of(sr0,String(f[R$])).n(R$));if(f[u0]!=null)w.c(P.of(wr0,f[u0]).n(u0));if(f[Mw]!=null)w.c(ws0(f[Mw],h).n(Mw));if(f[C$]!=null)w.c(P.of(t$0,f[C$]).n(C$));if(f[L$]!=null)w.c(P.of(hr0,String(f[L$])).n(L$));if(f[o0]!=null)w.c(P.of(o0,String(f[o0])).n(o0));if(w.lc(f,"ResourceRecords","ResourceRecords",()=>Ts0(f[r$],h)),f[Xw]!=null)w.c(nw0(f[Xw],h).n(Xw));if(w.cc(f,ir),w.cc(f,LU),f[Sw]!=null)w.c(fs0(f[Sw],h).n(Sw));if(f[Qw]!=null)w.c(ss0(f[Qw],h).n(Qw));return w},Cs0=(f,h)=>{let w=new P(zU);if(f[Zw]!=null)w.c(P.of(Ak,f[Zw]).n(Zw));if(f[y0]!=null)w.c(P.of(zr0,f[y0]).n(y0));return w},Is0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Ak,w).n(Zw)})},Ls0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Cs0(w,h).n(zU)})},Bs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Ar0,w).n(jf)})},ar=(f,h)=>{let w=new P(P0);return w.cc(f,er),w.cc(f,nr),w},Gs0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},Ws0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=G(f[u0]);if(f[p]!=null)w[p]=G(f[p]);return w},As0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=G(f[h0]);if(f[Wf]!=null)w[Wf]=G(f[Wf]);if(f[F$]!=null)w[F$]=e0(f[F$]);return w},e1=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[A1]!=null)w[A1]=G(f[A1]);if(f[WC]!=null)w[WC]=j(a$(f[WC]));if(f[F0]!=null)w[F0]=G(f[F0]);return w},zs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Rs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Xs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ss0(w,h)})},Ss0=(f,h)=>{let w={};if(f[K6]!=null)w[K6]=G(f[K6]);if(f[T1]!=null)w[T1]=G(f[T1]);return w},Ys0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=G(f[U$]);if(f[I0]!=null)w[I0]=G(f[I0]);if(f[p]!=null)w[p]=G(f[p]);if(f[Uh]!=null)w[Uh]=E1(f[Uh]);return w},Ms0=(f,h)=>{let w={};if(f[T$]!=null)w[T$]=G(f[T$]);if(f[T1]!=null)w[T1]=G(f[T1]);return w},Qs0=(f,h)=>{let w={};if(f[b6]!=null)w[b6]=M0(f[b6]);if(f[VC]!=null)w[VC]=vS(f[VC]);if(f[P6]!=null)w[P6]=G(f[P6]);if(f[CC]!=null)w[CC]=M0(f[CC]);if(f[a6]!=null)w[a6]=G(f[a6]);if(f[rC]!=null)w[rC]=G(f[rC]);if(f[MC]!=null)w[MC]=G(f[MC]);if(f.Dimensions==="")w[Jr]=[];else if(f[Jr]!=null&&f[Jr][SN]!=null)w[Jr]=Ns0(G0(f[Jr][SN]),h);return w},Ks0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Zs0(w,h)})},Zs0=(f,h)=>{let w={};if(f[U$]!=null)w[U$]=G(f[U$]);if(f[I0]!=null)w[I0]=G(f[I0]);if(f[p]!=null)w[p]=G(f[p]);if(f[Uh]!=null)w[Uh]=E1(f[Uh]);return w},Js0=(f,h)=>{let w={};if(f[UU]!=null)w[UU]=G(f[UU]);if(f[TU]!=null)w[TU]=G(f[TU]);return w},pr=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f.NameServers==="")w[Dr]=[];else if(f[Dr]!=null&&f[Dr][MN]!=null)w[Dr]=Vs0(G0(f[Dr][MN]),h);return w},Vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Ps0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return pr(w,h)})},Hs0=(f,h)=>{let w={};if(f[p]!=null)w[p]=G(f[p]);if(f[y0]!=null)w[y0]=G(f[y0]);return w},Ns0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Hs0(w,h)})},Ds0=(f,h)=>{let w={};if(f[YC]!=null)w[YC]=G(f[YC]);if(f[A$]!=null)w[A$]=G(f[A$]);return w},qs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},ks0=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=G(f[kf]);if(f[yf]!=null)w[yf]=G(f[yf]);if(f[Of]!=null)w[Of]=G(f[Of]);return w},Uk=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=G(f[kf]);if(f[J6]!=null)w[J6]=G(f[J6]);if(f[yf]!=null)w[yf]=G(f[yf]);if(f[V6]!=null)w[V6]=G(f[V6]);if(f[Of]!=null)w[Of]=G(f[Of]);if(f[RC]!=null)w[RC]=G(f[RC]);return w},ys0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Uk(w,h)})},js0=(f,h)=>{let w={};if(f[hU]!=null)w[hU]=G(f[hU]);if(f[EU]!=null)w[EU]=G(f[EU]);if(f[Yw]!=null)w[Yw]=Js0(f[Yw],h);if(f[Ww]!=null)w[Ww]=M0(f[Ww]);return w},RU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f[I$]!=null)w[I$]=Ik(f[I$],h);if(f[Kw]!=null)w[Kw]=Os0(f[Kw],h);if(f[Aw]!=null)w[Aw]=E1(f[Aw]);if(f[N6]!=null)w[N6]=Qs0(f[N6],h);return w},Os0=(f,h)=>{let w={};if(f[dh]!=null)w[dh]=G(f[dh]);if(f[Gf]!=null)w[Gf]=M0(f[Gf]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[gr]!=null)w[gr]=G(f[gr]);if(f[mr]!=null)w[mr]=G(f[mr]);if(f[_r]!=null)w[_r]=G(f[_r]);if(f[Rw]!=null)w[Rw]=M0(f[Rw]);if(f[If]!=null)w[If]=M0(f[If]);if(f[zw]!=null)w[zw]=e0(f[zw]);if(f[Bf]!=null)w[Bf]=e0(f[Bf]);if(f[Ff]!=null)w[Ff]=e0(f[Ff]);if(f[Lf]!=null)w[Lf]=M0(f[Lf]);if(f.ChildHealthChecks==="")w[Bw]=[];else if(f[Bw]!=null&&f[Bw][PC]!=null)w[Bw]=Rs0(G0(f[Bw][PC]),h);if(f[Cf]!=null)w[Cf]=e0(f[Cf]);if(f.Regions==="")w[Gw]=[];else if(f[Gw]!=null&&f[Gw][u0]!=null)w[Gw]=vs0(G0(f[Gw][u0]),h);if(f[qf]!=null)w[qf]=Ws0(f[qf],h);if(f[cr]!=null)w[cr]=G(f[cr]);if(f[FU]!=null)w[FU]=G(f[FU]);return w},ls0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=G(f[u0]);if(f[dh]!=null)w[dh]=G(f[dh]);if(f[SC]!=null)w[SC]=w$0(f[SC],h);return w},Tk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ls0(w,h)})},vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},bs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return RU(w,h)})},XU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[p]!=null)w[p]=G(f[p]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f[q6]!=null)w[q6]=ms0(f[q6],h);if(f[BC]!=null)w[BC]=E1(f[BC]);if(f[I$]!=null)w[I$]=Ik(f[I$],h);return w},ms0=(f,h)=>{let w={};if(f[F0]!=null)w[F0]=G(f[F0]);if(f[B$]!=null)w[B$]=e0(f[B$]);return w},ds0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},is0=(f,h)=>{let w={};if(f[UC]!=null)w[UC]=G(f[UC]);if(f[TC]!=null)w[TC]=G(f[TC]);return w},Fk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return XU(w,h)})},cs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return gs0(w,h)})},gs0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=G(f[h0]);if(f[p]!=null)w[p]=G(f[p]);if(f[EC]!=null)w[EC]=is0(f[EC],h);return w},Ck=(f,h)=>{let w={};if(f[p]!=null)w[p]=G(f[p]);if(f[c6]!=null)w[c6]=G(f[c6]);if(f[m6]!=null)w[m6]=M0(f[m6]);if(f[AC]!=null)w[AC]=G(f[AC]);if(f[zC]!=null)w[zC]=M0(f[zC]);if(f[k6]!=null)w[k6]=G(f[k6]);if(f[y6]!=null)w[y6]=M0(f[y6]);if(f[_6]!=null)w[_6]=M0(f[_6]);if(f[l6]!=null)w[l6]=G(f[l6]);if(f[FC]!=null)w[FC]=G(f[FC]);if(f[O6]!=null)w[O6]=G(f[O6]);if(f[j6]!=null)w[j6]=G(f[j6]);if(f[A1]!=null)w[A1]=G(f[A1]);if(f[A$]!=null)w[A$]=G(f[A$]);if(f[Z6]!=null)w[Z6]=j(a$(f[Z6]));if(f[n6]!=null)w[n6]=j(a$(f[n6]));return w},xs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ck(w,h)})},Ik=(f,h)=>{let w={};if(f[XC]!=null)w[XC]=G(f[XC]);if(f[v6]!=null)w[v6]=G(f[v6]);return w},_s0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ns0(w,h)})},ns0=(f,h)=>{let w={};if(f[T1]!=null)w[T1]=G(f[T1]);return w},HC=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[h0]!=null)w[h0]=G(f[h0]);if(f[sU]!=null)w[sU]=G(f[sU]);return w},es0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return HC(w,h)})},as0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},ps0=(f,h)=>{let w={};if(f[y0]!=null)w[y0]=G(f[y0]);return w},os0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ps0(w,h)})},us0=(f,h)=>{let w={};if(f[p]!=null)w[p]=G(f[p]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[W$]!=null)w[W$]=G(f[W$]);if(f[R$]!=null)w[R$]=E1(f[R$]);if(f[u0]!=null)w[u0]=G(f[u0]);if(f[Mw]!=null)w[Mw]=ks0(f[Mw],h);if(f[C$]!=null)w[C$]=G(f[C$]);if(f[L$]!=null)w[L$]=e0(f[L$]);if(f[o0]!=null)w[o0]=E1(f[o0]);if(f.ResourceRecords==="")w[r$]=[];else if(f[r$]!=null&&f[r$][AU]!=null)w[r$]=os0(G0(f[r$][AU]),h);if(f[Xw]!=null)w[Xw]=As0(f[Xw],h);if(f[ir]!=null)w[ir]=G(f[ir]);if(f[LU]!=null)w[LU]=G(f[LU]);if(f[Sw]!=null)w[Sw]=Ms0(f[Sw],h);if(f[Qw]!=null)w[Qw]=js0(f[Qw],h);return w},ts0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return us0(w,h)})},Lk=(f,h)=>{let w={};if(f[GC]!=null)w[GC]=G(f[GC]);if(f[jf]!=null)w[jf]=G(f[jf]);if(f.Tags==="")w[vr]=[];else if(f[vr]!=null&&f[vr][zU]!=null)w[vr]=$$0(G0(f[vr][zU]),h);return w},f$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Lk(w,h)})},h$0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},w$0=(f,h)=>{let w={};if(f[A1]!=null)w[A1]=G(f[A1]);if(f[H6]!=null)w[H6]=j(a$(f[H6]));return w},s$0=(f,h)=>{let w={};if(f[Zw]!=null)w[Zw]=G(f[Zw]);if(f[y0]!=null)w[y0]=G(f[y0]);return w},$$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return s$0(w,h)})},r$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return or(w,h)})},or=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[Uh]!=null)w[Uh]=M0(f[Uh]);if(f[p]!=null)w[p]=G(f[p]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[$h]!=null)w[$h]=G(f[$h]);if(f[F0]!=null)w[F0]=G(f[F0]);return w},SU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[h0]!=null)w[h0]=G(f[h0]);if(f[p]!=null)w[p]=G(f[p]);if(f[o0]!=null)w[o0]=E1(f[o0]);if(f[QC]!=null)w[QC]=G(f[QC]);if(f[v0]!=null)w[v0]=G(f[v0]);if(f[z$]!=null)w[z$]=G(f[z$]);if(f[g1]!=null)w[g1]=M0(f[g1]);if(f[JC]!=null)w[JC]=G(f[JC]);return w},NC=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return SU(w,h)})},E$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return U$0(w,h)})},U$0=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[p]!=null)w[p]=G(f[p]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[e6]!=null)w[e6]=M0(f[e6]);if(f[KC]!=null)w[KC]=M0(f[KC]);return w},DC=(f,h)=>{let w={};if(f[er]!=null)w[er]=G(f[er]);if(f[nr]!=null)w[nr]=G(f[nr]);return w},Bk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return DC(w,h)})},Z=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var E$="Action",T$0="AliasHealthEnabled",qf="AlarmIdentifier",F$0="AlarmName",C$0="AddTags",Xw="AliasTarget",I$0="AssociateVPCComment",L$0="AssociateVPCWithHostedZoneRequest",hU="AWSRegion",U$="Arn",Ww="Bias",F0="Comment",B$0="ChangeAction",wU="ChangeBatch",Yr="CidrBlocks",K6="CidrBlock",kf="ContinentCode",G$0="CidrCollectionChange",W$0="CidrCollectionChangeAction",A$0="ChangeCidrCollectionRequest",z$0="CreateCidrCollectionRequest",Mr="CidrCollections",yf="CountryCode",Z6="CreatedDate",Bw="ChildHealthChecks",R$0="CreateHealthCheckRequest",PC="ChildHealthCheck",X$0="CreateHostedZoneRequest",$0="ChangeInfo",Qr="CheckerIpRanges",T$="CollectionId",S$0="CreateKeySigningKeyRequest",Kr="CidrLocations",Y$0="CidrLocationNameDefaultAllowed",M$0="CidrLocationNameDefaultNotAllowed",Q$0="CidrList",K$0="CidrNonce",Z$0="CollectionName",J6="ContinentName",V6="CountryName",P6="ComparisonOperator",J$0="CreateQueryLoggingConfigRequest",q0="CallerReference",Sw="CidrRoutingConfig",V$0="CreateReusableDelegationSetRequest",P$0="ChangeResourceRecordSetsRequest",H6="CheckedTime",H$0="ChangeTagsForResourceRequest",N$0="CreateTrafficPolicyInstanceRequest",D$0="CreateTrafficPolicyRequest",q$0="CreateTrafficPolicyVersionRequest",fU="CollectionVersion",k$0="CreateVPCAssociationAuthorizationRequest",N6="CloudWatchAlarmConfiguration",sU="CloudWatchLogsLogGroupArn",y$0="CloudWatchRegion",Gk="Changes",Wk="Change",XN="Cidr",D6="Collection",q6="Config",Yw="Coordinates",sh="Count",$h="Document",k6="DigestAlgorithmMnemonic",y6="DigestAlgorithmType",j6="DNSKEYRecord",Wf="DNSName",Q1="DelegationSet",$U="DelegationSetId",O6="DSRecord",Zr="DelegationSets",l6="DigestValue",j$0="DeleteVPCAssociationAuthorizationRequest",O$0="DisassociateVPCComment",l$0="DisassociateVPCFromHostedZoneRequest",v6="Description",Ff="Disabled",Jr="Dimensions",SN="Dimension",v$0="EDNS0ClientSubnetIP",b$0="EDNS0ClientSubnetMask",b6="EvaluationPeriods",Cf="EnableSNI",F$="EvaluateTargetHealth",C$="Failover",mr="FullyQualifiedDomainName",If="FailureThreshold",m6="Flag",Mw="GeoLocation",m$0="GeoLocationContinentCode",d$0="GeoLocationCountryCode",dr="GeoLocationDetails",Vr="GeoLocationDetailsList",i$0="GeoLocationSubdivisionCode",Qw="GeoProximityLocation",Af="HealthCheck",Kw="HealthCheckConfig",d6="HealthCheckCount",ir="HealthCheckId",c$0="HealthCheckNonce",Hf="HealthCheckObservations",WU="HealthCheckObservation",g$0="HealthCheckRegion",x$0="HealthCheckType",Aw="HealthCheckVersion",Pr="HealthChecks",Lf="HealthThreshold",V1="HostedZone",rU="HostedZoneConfig",i6="HostedZoneCount",h0="HostedZoneId",mh="HostedZoneIdMarker",Hr="HostedZoneSummaries",YN="HostedZoneSummary",_$0="HostedZoneType",Nf="HostedZones",Bf="Inverted",cr="InsufficientDataHealthStatus",dh="IPAddress",n$0="IsPrivateZone",C0="IsTruncated",I0="Id",Zw="Key",c6="KmsArn",g6="KeyManagementServiceArn",x6="KeySigningKey",Nr="KeySigningKeys",_6="KeyTag",Th="Location",n6="LastModifiedDate",T1="LocationName",I$="LinkedService",e$0="ListTagsForResourcesRequest",e6="LatestVersion",EU="LocalZoneGroup",UU="Latitude",rh="Limit",TU="Longitude",x1="Marker",u="MaxItems",zw="MeasureLatency",a6="MetricName",ur="MaxResults",L$="MultiValueAnswer",v0="Message",p="Name",p6="NextContinentCode",o6="NextCountryCode",u6="NextDNSName",t6="NextHostedZoneId",Eh="NextMarker",fC="NextRecordIdentifier",hC="NextRecordName",wC="NextRecordType",Dr="NameServers",sC="NextSubdivisionCode",MN="NameServer",k0="NextToken",$C="Nameserver",rC="Namespace",qC="Nonce",EC="Owner",UC="OwningAccount",TC="OwningService",Gf="Port",FC="PublicKey",B$="PrivateZone",CC="Period",IC="Protocol",ih="QueryLoggingConfig",qr="QueryLoggingConfigs",Gw="Regions",LC="ResponseCode",FU="RoutingControlArn",kC="ResourceDescription",QN="RecordDataEntry",a$0="RData",kr="RecordData",p$0="ResetElements",KN="ResettableElementName",jf="ResourceId",o$0="ResolverIP",u$0="ResourceIds",Rw="RequestInterval",CU="RecordName",gr="ResourcePath",AU="ResourceRecord",yr="ResourceRecordSets",BC="ResourceRecordSetCount",t$0="ResourceRecordSetFailover",fr0="ResourceRecordSetIdentifier",hr0="ResourceRecordSetMultiValueAnswer",wr0="ResourceRecordSetRegion",sr0="ResourceRecordSetWeight",G$="ResourceRecordSet",$r0="RRType",r$="ResourceRecords",IU="RecordType",rr0="RemoveTagKeys",xr="ResourceTagSet",jr="ResourceTagSets",GC="ResourceType",u0="Region",A1="Status",WC="SubmittedAt",AC="SigningAlgorithmMnemonic",zC="SigningAlgorithmType",Of="SubdivisionCode",Er0="StartContinentCode",Ur0="StartCountryCode",W$="SetIdentifier",Tr0="SigningKeyName",Fr0="SigningKeyString",Cr0="SigningKeyStatus",A$="StatusMessage",RC="SubdivisionName",XC="ServicePrincipal",SC="StatusReport",Ir0="StartRecordIdentifier",Lr0="StartRecordName",Br0="StartRecordType",_r="SearchString",Gr0="StartSubdivisionCode",YC="ServeSignature",MC="Statistic",QC="State",Z0="Type",Ak="TagKey",K1="TrafficPolicy",yC="TrafficPolicyComment",KC="TrafficPolicyCount",zk="TrafficPolicyDocument",z$="TrafficPolicyId",ZC="TrafficPolicyInstanceCount",LU="TrafficPolicyInstanceId",BU="TrafficPolicyIdMarker",_1="TrafficPolicyInstanceNameMarker",n1="TrafficPolicyInstanceTypeMarker",z1="TrafficPolicyInstance",W1="TrafficPolicyInstances",Wr0="TrafficPolicyName",Or="TrafficPolicySummaries",ZN="TrafficPolicySummary",JC="TrafficPolicyType",g1="TrafficPolicyVersion",GU="TrafficPolicyVersionMarker",lr="TrafficPolicies",Ar0="TagResourceId",o0="TTL",zr0="TagValue",zU="Tag",vr="Tags",VC="Threshold",Rr0="UpdateHealthCheckRequest",Xr0="UpdateHostedZoneCommentRequest",Sr0="UpdateTrafficPolicyCommentRequest",Yr0="UpdateTrafficPolicyInstanceRequest",Mr0="UUID",y0="Value",P0="VPC",nr="VPCId",er="VPCRegion",Df="VPCs",Uh="Version",R$="Weight",Qr0="continentcode",Kr0="countrycode",Zr0="delegationsetid",Jr0="dnsname",Vr0="edns0clientsubnetip",Pr0="edns0clientsubnetmask",Hr0="hostedzonetype",tr="hostedzoneid",Nr0="identifier",Rk="id",lf="location",f4="maxresults",a1="maxitems",jC="marker",zf="member",S="message",br="messages",X$="nexttoken",Dr0="name",qr0="recordname",kr0="recordtype",yr0="resolverip",jr0="subdivisioncode",Or0="startcontinentcode",lr0="startcountrycode",vr0="startsubdivisioncode",br0="type",mr0="trafficpolicyid",OC="trafficpolicyinstancename",lC="trafficpolicyinstancetype",dr0="trafficpolicyversion",ir0="vpcid",c0='<?xml version="1.0" encoding="UTF-8"?>',cr0="version",gr0="vpcregion";class vC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(JN).de(iD).build(){}D();k();J();class bC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(VN).de(cD).build(){}D();k();J();class mC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(PN).de(gD).build(){}D();k();J();class dC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),AN(w),O(w)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(HN).de(xD).build(){}D();k();J();class iC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(NN).de(_D).build(){}D();k();J();class cC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(DN).de(nD).build(){}D();k();J();class gC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(qN).de(eD).build(){}D();k();J();class xC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(kN).de(aD).build(){}D();k();J();class _C extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(yN).de(pD).build(){}D();k();J();class nC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(jN).de(oD).build(){}D();k();J();class eC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(ON).de(uD).build(){}D();k();J();class aC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(lN).de(tD).build(){}D();k();J();class pC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(vN).de(fq).build(){}D();k();J();class oC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(bN).de(hq).build(){}D();k();J();class uC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(mN).de(wq).build(){}D();k();J();class tC extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(dN).de(sq).build(){}D();k();J();class fI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(iN).de($q).build(){}D();k();J();class hI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(cN).de(rq).build(){}D();k();J();class wI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(gN).de(Eq).build(){}D();k();J();class sI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(xN).de(Uq).build(){}D();k();J();class $I extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(_N).de(Tq).build(){}D();k();J();class rI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(nN).de(Fq).build(){}D();k();J();class EI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(eN).de(Cq).build(){}D();k();J();class UI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(aN).de(Iq).build(){}D();k();J();class TI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(pN).de(Lq).build(){}D();k();J();class FI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(oN).de(Bq).build(){}D();k();J();class CI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(uN).de(Gq).build(){}D();k();J();class II extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(tN).de(Wq).build(){}D();k();J();class LI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(fD).de(Aq).build(){}D();k();J();class BI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(hD).de(zq).build(){}D();k();J();class GI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}D();k();J();class WI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(sD).de(Xq).build(){}D();k();J();class AI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser($D).de(Sq).build(){}D();k();J();class zI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(rD).de(Yq).build(){}D();k();J();class RI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(ED).de(Mq).build(){}D();k();J();class XI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}D();k();J();class SI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(TD).de(Kq).build(){}D();k();J();class YI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(FD).de(Zq).build(){}D();k();J();class MI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(CD).de(Jq).build(){}D();k();J();class QI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(ID).de(Vq).build(){}D();k();J();class KI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(LD).de(Pq).build(){}D();k();J();class ZI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(BD).de(Hq).build(){}D();k();J();class JI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(GD).de(Nq).build(){}D();k();J();class VI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(WD).de(Dq).build(){}D();k();J();class PI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(AD).de(qq).build(){}D();k();J();class HI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(zD).de(kq).build(){}D();k();J();class NI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(RD).de(yq).build(){}D();k();J();class DI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(XD).de(jq).build(){}D();k();J();class qI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}D();k();J();class kI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(YD).de(lq).build(){}D();k();J();class yI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(MD).de(vq).build(){}D();k();J();class jI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(KD).de(mq).build(){}D();k();J();class OI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}D();k();J();class lI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(QD).de(bq).build(){}D();k();J();class vI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(JD).de(iq).build(){}D();k();J();class bI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(VD).de(cq).build(){}D();k();J();class mI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(PD).de(gq).build(){}D();k();J();class dI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(HD).de(xq).build(){}D();k();J();class iI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(ND).de(_q).build(){}D();k();J();class cI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(DD).de(nq).build(){}D();k();J();class gI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(kD).de(aq).build(){}D();k();J();class xI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(yD).de(pq).build(){}D();k();J();class _I extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(qD).de(eq).build(){}D();k();J();class nI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(jD).de(oq).build(){}D();k();J();class eI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(OD).de(uq).build(){}D();k();J();class aI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(lD).de(tq).build(){}D();k();J();class pI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(vD).de(fk).build(){}D();k();J();class oI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(bD).de(hk).build(){}D();k();J();class uI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(mD).de(wk).build(){}D();k();J();class tI extends A.classBuilder().ep(K).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(dD).de(sk).build(){}var xr0={ActivateKeySigningKeyCommand:vC,AssociateVPCWithHostedZoneCommand:bC,ChangeCidrCollectionCommand:mC,ChangeResourceRecordSetsCommand:dC,ChangeTagsForResourceCommand:iC,CreateCidrCollectionCommand:cC,CreateHealthCheckCommand:gC,CreateHostedZoneCommand:xC,CreateKeySigningKeyCommand:_C,CreateQueryLoggingConfigCommand:nC,CreateReusableDelegationSetCommand:eC,CreateTrafficPolicyCommand:aC,CreateTrafficPolicyInstanceCommand:pC,CreateTrafficPolicyVersionCommand:oC,CreateVPCAssociationAuthorizationCommand:uC,DeactivateKeySigningKeyCommand:tC,DeleteCidrCollectionCommand:fI,DeleteHealthCheckCommand:hI,DeleteHostedZoneCommand:wI,DeleteKeySigningKeyCommand:sI,DeleteQueryLoggingConfigCommand:$I,DeleteReusableDelegationSetCommand:rI,DeleteTrafficPolicyCommand:EI,DeleteTrafficPolicyInstanceCommand:UI,DeleteVPCAssociationAuthorizationCommand:TI,DisableHostedZoneDNSSECCommand:FI,DisassociateVPCFromHostedZoneCommand:CI,EnableHostedZoneDNSSECCommand:II,GetAccountLimitCommand:LI,GetChangeCommand:BI,GetCheckerIpRangesCommand:GI,GetDNSSECCommand:WI,GetGeoLocationCommand:AI,GetHealthCheckCommand:zI,GetHealthCheckCountCommand:RI,GetHealthCheckLastFailureReasonCommand:XI,GetHealthCheckStatusCommand:SI,GetHostedZoneCommand:YI,GetHostedZoneCountCommand:MI,GetHostedZoneLimitCommand:QI,GetQueryLoggingConfigCommand:KI,GetReusableDelegationSetCommand:ZI,GetReusableDelegationSetLimitCommand:JI,GetTrafficPolicyCommand:VI,GetTrafficPolicyInstanceCommand:PI,GetTrafficPolicyInstanceCountCommand:HI,ListCidrBlocksCommand:NI,ListCidrCollectionsCommand:DI,ListCidrLocationsCommand:qI,ListGeoLocationsCommand:kI,ListHealthChecksCommand:yI,ListHostedZonesCommand:lI,ListHostedZonesByNameCommand:jI,ListHostedZonesByVPCCommand:OI,ListQueryLoggingConfigsCommand:vI,ListResourceRecordSetsCommand:bI,ListReusableDelegationSetsCommand:mI,ListTagsForResourceCommand:dI,ListTagsForResourcesCommand:iI,ListTrafficPoliciesCommand:cI,ListTrafficPolicyInstancesCommand:_I,ListTrafficPolicyInstancesByHostedZoneCommand:gI,ListTrafficPolicyInstancesByPolicyCommand:xI,ListTrafficPolicyVersionsCommand:nI,ListVPCAssociationAuthorizationsCommand:eI,TestDNSAnswerCommand:aI,UpdateHealthCheckCommand:pI,UpdateHostedZoneCommentCommand:oI,UpdateTrafficPolicyCommentCommand:uI,UpdateTrafficPolicyInstanceCommand:tI};class ch extends M6{}Us(xr0,ch);E4();U4();T4();m$();Qh();var S$=o(m0(),1);$5();D();Ew();J();var Xk=o(O0(),1);gf();var Sk=async(f,h,w)=>{return{operation:Yh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function _r0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var Yk=(f)=>{let h=[];switch(f.operation){default:h.push(_r0(f))}return h},Mk=(f)=>{let h=Xk.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var Qk=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53domains"})},c={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Kk={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/credential-provider-node":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var bk=o(O0(),1);RE();Qh();XE();Ew();Jh();wr();SE();wf();var lk=o(O0(),1);J();uw();YE();bs();N$();cf();var Zk={["required"]:!1,type:"String"},Jk={["required"]:!0,default:!1,type:"Boolean"},Vk={["ref"]:"Endpoint"},kk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},yk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vf={},Pk={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Hk={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},Nk=[kk],Dk=[yk],qk=[{["ref"]:"Region"}],er0={version:"1.0",parameters:{Region:Zk,UseDualStack:Jk,UseFIPS:Jk,Endpoint:Zk},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Vk]}],rules:[{conditions:Nk,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Dk,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Vk,properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:qk}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:qk,assign:"PartitionResult"}],rules:[{conditions:[kk,yk],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Pk]},Hk],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Nk,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Pk,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Dk,rules:[{conditions:[Hk],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},jk=er0;var ar0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ok=(f,h={})=>{return ar0.get(f,()=>nh(jk,{endpointParams:f,logger:h.logger}))};t1.aws=eh;var vk=(f)=>{return{apiVersion:"2014-05-15",base64Decoder:f?.base64Decoder??ds,base64Encoder:f?.base64Encoder??is,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??Ok,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Yk,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new lk.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53 Domains",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??vs}};J();ME();J();var mk=(f)=>{Is(process.version);let h=cs(f),w=()=>h().then(Cs),s=vk(f);bk.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??ms,credentialDefaultProvider:f?.credentialDefaultProvider??OE,defaultUserAgentProvider:f?.defaultUserAgentProvider??ys({serviceId:s.serviceId,clientVersion:Kk.version}),maxAttempts:f?.maxAttempts??z0(ss,f),region:f?.region??z0(Mh,{...nw,...$}),requestHandler:rf.create(f?.requestHandler??w),retryMode:f?.retryMode??z0({...rs,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??Cw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??z0(xw,$),useFipsEndpoint:f?.useFipsEndpoint??z0(_w,$),userAgentAppId:f?.userAgentAppId??z0(js,$)}};QE();C1();J();var dk=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},ik=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var ck=(f,h)=>{let w=Object.assign(gs(f),Ls(f),Jw(f),dk(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,xs(w),Bs(w),Vw(w),ik(w))};class fL extends $w{config;constructor(...[f]){let h=mk(f||{});super(h);this.initConfig=h;let w=Qk(h),s=Ow(w),$=$s(s),r=ew($),E=Pw(r),U=tw(E),T=Mk(U),F=ck(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(cw(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(aw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(Dw(this.config)),this.middlewareStack.use(S$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Sk,identityProviderConfigProvider:async(C)=>new S$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(S$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();D();k();J();J();J();class p1 extends $f{constructor(f){super(f);Object.setPrototypeOf(this,p1.prototype)}}class YU extends p1{name="DomainLimitExceeded";$fault="client";constructor(f){super({name:"DomainLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,YU.prototype)}}class MU extends p1{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,MU.prototype)}}class QU extends p1{name="OperationLimitExceeded";$fault="client";constructor(f){super({name:"OperationLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,QU.prototype)}}class KU extends p1{name="UnsupportedTLD";$fault="client";constructor(f){super({name:"UnsupportedTLD",$fault:"client",...f});Object.setPrototypeOf(this,KU.prototype)}}class ZU extends p1{name="DnssecLimitExceeded";$fault="client";constructor(f){super({name:"DnssecLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,ZU.prototype)}}class JU extends p1{name="DuplicateRequest";$fault="client";requestId;constructor(f){super({name:"DuplicateRequest",$fault:"client",...f});Object.setPrototypeOf(this,JU.prototype),this.requestId=f.requestId}}class VU extends p1{name="TLDRulesViolation";$fault="client";constructor(f){super({name:"TLDRulesViolation",$fault:"client",...f});Object.setPrototypeOf(this,VU.prototype)}}var gk=(f)=>({...f,...f.Password&&{Password:T0}}),xk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}});var _k=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.AbuseContactEmail&&{AbuseContactEmail:T0},...f.AbuseContactPhone&&{AbuseContactPhone:T0},...f.BillingContact&&{BillingContact:T0}}),nk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),ek=(f)=>({...f,...f.emailAddress&&{emailAddress:T0}}),ak=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}}),pk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0},...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),ok=(f)=>({...f,...f.Password&&{Password:T0}}),uk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),tk=(f)=>({...f,...f.FIAuthKey&&{FIAuthKey:T0}});var s0=o(O0(),1);C1();J();var fy=async(f,h)=>{let w=U0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},hy=async(f,h)=>{let w=U0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},wy=async(f,h)=>{let w=U0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},sy=async(f,h)=>{let w=U0("CheckDomainAvailability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},$y=async(f,h)=>{let w=U0("CheckDomainTransferability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ry=async(f,h)=>{let w=U0("DeleteDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ey=async(f,h)=>{let w=U0("DeleteTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Uy=async(f,h)=>{let w=U0("DisableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ty=async(f,h)=>{let w=U0("DisableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Fy=async(f,h)=>{let w=U0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Cy=async(f,h)=>{let w=U0("EnableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Iy=async(f,h)=>{let w=U0("EnableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ly=async(f,h)=>{let w=U0("GetContactReachabilityStatus"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},By=async(f,h)=>{let w=U0("GetDomainDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Gy=async(f,h)=>{let w=U0("GetDomainSuggestions"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Wy=async(f,h)=>{let w=U0("GetOperationDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ay=async(f,h)=>{let w=U0("ListDomains"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},zy=async(f,h)=>{let w=U0("ListOperations"),s;return s=JSON.stringify($40(f,h)),E0(h,w,"/",void 0,s)},Ry=async(f,h)=>{let w=U0("ListPrices"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Xy=async(f,h)=>{let w=U0("ListTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Sy=async(f,h)=>{let w=U0("PushDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Yy=async(f,h)=>{let w=U0("RegisterDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},My=async(f,h)=>{let w=U0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Qy=async(f,h)=>{let w=U0("RenewDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ky=async(f,h)=>{let w=U0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Zy=async(f,h)=>{let w=U0("ResendOperationAuthorization"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Jy=async(f,h)=>{let w=U0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Vy=async(f,h)=>{let w=U0("TransferDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Py=async(f,h)=>{let w=U0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Hy=async(f,h)=>{let w=U0("UpdateDomainContact"),s;return s=JSON.stringify(r40(f,h)),E0(h,w,"/",void 0,s)},Ny=async(f,h)=>{let w=U0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Dy=async(f,h)=>{let w=U0("UpdateDomainNameservers"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},qy=async(f,h)=>{let w=U0("UpdateTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ky=async(f,h)=>{let w=U0("ViewBilling"),s;return s=JSON.stringify(E40(f,h)),E0(h,w,"/",void 0,s)},yy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},jy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ly=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},vy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},by=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},my=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},dy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},iy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},cy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},gy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},xy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},_y=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ny=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=B40(w,h),{$metadata:f0(f),...s}},ey=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ay=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=G40(w,h),{$metadata:f0(f),...s}},py=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=W40(w,h),{$metadata:f0(f),...s}},oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=A40(w,h),{$metadata:f0(f),...s}},uy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=z40(w,h),{$metadata:f0(f),...s}},ty=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await G1.collectBody(f.body,h),{$metadata:f0(f)}},hj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},wj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},sj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},$j=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},rj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await G1.collectBody(f.body,h),{$metadata:f0(f)}},Ej=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Uj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Tj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Cj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ij=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Lj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Bj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=S40(w,h),{$metadata:f0(f),...s}},r0=async(f,h)=>{let w={...f,body:await s0.parseJsonErrorBody(f.body,h)},s=s0.loadRestJsonErrorCode(f,w.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await or0(w,h);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await tr0(w,h);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await f40(w,h);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await w40(w,h);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await pr0(w,h);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await ur0(w,h);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await h40(w,h);default:let $=w.body;return Y40({output:f,parsedBody:$,errorCode:s})}},pr0=async(f,h)=>{let w=f.body,s=v(w),$=new ZU({$metadata:f0(f),...s});return l($,w)},or0=async(f,h)=>{let w=f.body,s=v(w),$=new YU({$metadata:f0(f),...s});return l($,w)},ur0=async(f,h)=>{let w=f.body,s=v(w),$=new JU({$metadata:f0(f),...s});return l($,w)},tr0=async(f,h)=>{let w=f.body,s=v(w),$=new MU({$metadata:f0(f),...s});return l($,w)},f40=async(f,h)=>{let w=f.body,s=v(w),$=new QU({$metadata:f0(f),...s});return l($,w)},h40=async(f,h)=>{let w=f.body,s=v(w),$=new VU({$metadata:f0(f),...s});return l($,w)},w40=async(f,h)=>{let w=f.body,s=v(w),$=new KU({$metadata:f0(f),...s});return l($,w)},s40=(f,h)=>{return N0(f,{Currency:[],MaxPrice:sY})},$40=(f,h)=>{return N0(f,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:v,SubmittedSince:(w)=>w.getTime()/1000,Type:v})},r40=(f,h)=>{return N0(f,{AdminContact:v,BillingContact:v,Consent:(w)=>s40(w,h),DomainName:[],RegistrantContact:v,TechContact:v})},E40=(f,h)=>{return N0(f,{End:(w)=>w.getTime()/1000,Marker:[],MaxItems:[],Start:(w)=>w.getTime()/1000})},U40=(f,h)=>{return N0(f,{BillDate:(w)=>j(Qf(Y1(w))),DomainName:G,InvoiceId:G,Operation:G,Price:lF})},T40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return U40(s,h)})},F40=(f,h)=>{return N0(f,{ChangeOwnershipPrice:(w)=>h4(w,h),Name:G,RegistrationPrice:(w)=>h4(w,h),RenewalPrice:(w)=>h4(w,h),RestorationPrice:(w)=>h4(w,h),TransferPrice:(w)=>h4(w,h)})},C40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return F40(s,h)})},I40=(f,h)=>{return N0(f,{AutoRenew:Hh,DomainName:G,Expiry:(w)=>j(Qf(Y1(w))),TransferLock:Hh})},L40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return I40(s,h)})},B40=(f,h)=>{return N0(f,{AbuseContactEmail:G,AbuseContactPhone:G,AdminContact:v,AdminPrivacy:Hh,AutoRenew:Hh,BillingContact:v,BillingPrivacy:Hh,CreationDate:(w)=>j(Qf(Y1(w))),DnsSec:G,DnssecKeys:v,DomainName:G,ExpirationDate:(w)=>j(Qf(Y1(w))),Nameservers:v,RegistrantContact:v,RegistrantPrivacy:Hh,RegistrarName:G,RegistrarUrl:G,RegistryDomainId:G,Reseller:G,StatusList:v,TechContact:v,TechPrivacy:Hh,UpdatedDate:(w)=>j(Qf(Y1(w))),WhoIsServer:G})},G40=(f,h)=>{return N0(f,{DomainName:G,LastUpdatedDate:(w)=>j(Qf(Y1(w))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(w)=>j(Qf(Y1(w))),Type:G})},W40=(f,h)=>{return N0(f,{Domains:(w)=>L40(w,h),NextPageMarker:G})},A40=(f,h)=>{return N0(f,{NextPageMarker:G,Operations:(w)=>X40(w,h)})},z40=(f,h)=>{return N0(f,{NextPageMarker:G,Prices:(w)=>C40(w,h)})},R40=(f,h)=>{return N0(f,{DomainName:G,LastUpdatedDate:(w)=>j(Qf(Y1(w))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(w)=>j(Qf(Y1(w))),Type:G})},X40=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return R40(s,h)})},h4=(f,h)=>{return N0(f,{Currency:G,Price:lF})},S40=(f,h)=>{return N0(f,{BillingRecords:(w)=>T40(w,h),NextPageMarker:G})},f0=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var Y40=Fs(p1),E0=async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new n0(F)};function U0(f){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${f}`}}class hL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(gk,void 0).ser(fy).de(yy).build(){}D();k();J();class wL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(hy).de(jy).build(){}D();k();J();class sL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(wy).de(Oy).build(){}D();k();J();class $L extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(sy).de(ly).build(){}D();k();J();class rL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(xk,void 0).ser($y).de(vy).build(){}D();k();J();class EL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(ry).de(by).build(){}D();k();J();class UL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(Ey).de(my).build(){}D();k();J();class TL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(Uy).de(dy).build(){}D();k();J();class FL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(Ty).de(iy).build(){}D();k();J();class CL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Fy).de(cy).build(){}D();k();J();class IL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(Cy).de(gy).build(){}D();k();J();class LL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Iy).de(xy).build(){}D();k();J();class BL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(Ly).de(_y).build(){}D();k();J();class GL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,_k).ser(By).de(ny).build(){}D();k();J();class WL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(Gy).de(ey).build(){}D();k();J();class AL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(Wy).de(ay).build(){}D();k();J();class zL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(Ay).de(py).build(){}D();k();J();class RL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(zy).de(oy).build(){}D();k();J();class XL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(Ry).de(uy).build(){}D();k();J();class SL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(Xy).de(ty).build(){}D();k();J();class YL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(Sy).de(fj).build(){}D();k();J();class ML extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(nk,void 0).ser(Yy).de(hj).build(){}D();k();J();class QL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(My).de(wj).build(){}D();k();J();class KL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(Qy).de(sj).build(){}D();k();J();class ZL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,ek).ser(Ky).de($j).build(){}D();k();J();class JL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(Zy).de(rj).build(){}D();k();J();class VL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,ak).ser(Jy).de(Ej).build(){}D();k();J();class PL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(pk,void 0).ser(Vy).de(Uj).build(){}D();k();J();class HL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,ok).ser(Py).de(Tj).build(){}D();k();J();class NL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(uk,void 0).ser(Hy).de(Fj).build(){}D();k();J();class DL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(Ny).de(Cj).build(){}D();k();J();class qL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(tk,void 0).ser(Dy).de(Ij).build(){}D();k();J();class kL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(qy).de(Lj).build(){}D();k();J();class yL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[z(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(ky).de(Bj).build(){}var M40={AcceptDomainTransferFromAnotherAwsAccountCommand:hL,AssociateDelegationSignerToDomainCommand:wL,CancelDomainTransferToAnotherAwsAccountCommand:sL,CheckDomainAvailabilityCommand:$L,CheckDomainTransferabilityCommand:rL,DeleteDomainCommand:EL,DeleteTagsForDomainCommand:UL,DisableDomainAutoRenewCommand:TL,DisableDomainTransferLockCommand:FL,DisassociateDelegationSignerFromDomainCommand:CL,EnableDomainAutoRenewCommand:IL,EnableDomainTransferLockCommand:LL,GetContactReachabilityStatusCommand:BL,GetDomainDetailCommand:GL,GetDomainSuggestionsCommand:WL,GetOperationDetailCommand:AL,ListDomainsCommand:zL,ListOperationsCommand:RL,ListPricesCommand:XL,ListTagsForDomainCommand:SL,PushDomainCommand:YL,RegisterDomainCommand:ML,RejectDomainTransferFromAnotherAwsAccountCommand:QL,RenewDomainCommand:KL,ResendContactReachabilityEmailCommand:ZL,ResendOperationAuthorizationCommand:JL,RetrieveDomainAuthCodeCommand:VL,TransferDomainCommand:PL,TransferDomainToAnotherAwsAccountCommand:HL,UpdateDomainContactCommand:NL,UpdateDomainContactPrivacyCommand:DL,UpdateDomainNameserversCommand:qL,UpdateTagsForDomainCommand:kL,ViewBillingCommand:yL};class w4 extends fL{}Us(M40,w4);import{runAction as Q40}from"@stacksjs/actions";import{config as Wj}from"@stacksjs/config";import{Action as K40}from"@stacksjs/enums";import{err as Fh,handleError as bf,ok as Y$}from"@stacksjs/error-handling";import{log as P1}from"@stacksjs/logging";import{path as Z40}from"@stacksjs/path";import{fs as Gj}from"@stacksjs/storage";async function ZO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Fh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Fh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Fh(bf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return await h.deleteHostedZone({Id:s.Id}),P1.info(`Deleted Hosted Zone for domain: ${f}`),Y$("success")}async function JO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Fh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Fh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Fh(bf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return P1.info(`Deleted DNS records for domain: ${f}`),Y$("success")}async function VO0(f){let h=new ch,s=(await h.listHostedZonesByName({DNSName:f})).HostedZones?.find((r)=>r.Name===`${f}.`);if(s)return Y$(s);let $=await h.createHostedZone({Name:f,CallerReference:`${Date.now()}`});if(!$.HostedZone)return Fh(bf("Failed to create hosted zone"));return Y$($)}function J40(f){try{let h=Z40.projectConfigPath("dns.ts"),s=Gj.readFileSync(h,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${f.map(($)=>`'${$}'`).join(", ")}]`);Gj.writeFileSync(h,s,"utf-8"),P1.info("Nameservers have been set.")}catch(h){console.error("Error updating nameservers:",h)}}async function PO0(f){try{let h=new ch,{HostedZones:w}=await h.listHostedZonesByName({DNSName:f});if(!w)return Fh(bf(`No hosted zones found for domain ${f}`));let s=w[0];if(s&&s.Name===`${f}.`)return Y$(s.Id);return Y$(null)}catch(h){return Fh(bf(`Failed to find hosted zone for domain ${f}`,h))}}async function V40(f){if(P1.debug("Getting nameservers for domain:",f),!f)return[];try{return(await new w4().getDomainDetail({DomainName:f}))?.Nameservers?.map((s)=>s.Name)||[]}catch(h){bf("Error getting domain detail",h)}}async function P40(f,h){if(!h)h=Wj.app.url;let w=await V40(h);if(w&&f&&JSON.stringify(w.sort())!==JSON.stringify(f.sort()))return P1.info("Updating your domain nameservers to match the ones in your hosted zone..."),P1.debug("Hosted zone nameservers:",f),P1.debug("Domain nameservers:",w),await new w4().updateDomainNameservers({DomainName:h,Nameservers:f.map(($)=>({Name:$}))}),J40(f),P1.info("Nameservers updated."),!0;P1.success("Your nameservers are up to date.")}async function HO0(f){if(P1.debug("Checking if domain has been added to cloud..."),!f)f=Wj.app.url;P1.debug("domainName:",f);let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(P1.debug("Existing hosted zones:",w),!w||!w.HostedZones)return!1;let s=w.HostedZones.find(($)=>$.Name===`${f}.`);if(s){P1.debug("Hosted zone found:",s);let r=(await h.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await P40(r,f),!0}return!1}async function NO0(f){return await Q40(K40.DomainsAdd,f)}import{Buffer as Yj}from"node:buffer";import{Buffer as dL}from"node:buffer";import b40 from"node:dgram";import m40 from"node:https";import d40 from"node:net";import i40 from"node:tls";import{URL as zj}from"node:url";import{promises as c40}from"node:fs";import{platform as g40}from"node:os";var H40=Object.create,{getPrototypeOf:N40,defineProperty:Aj,getOwnPropertyNames:D40}=Object,q40=Object.prototype.hasOwnProperty,k40=(f,h,w)=>{w=f!=null?H40(N40(f)):{};let s=h||!f||!f.__esModule?Aj(w,"default",{value:f,enumerable:!0}):w;for(let $ of D40(f))if(!q40.call(s,$))Aj(s,$,{get:()=>f[$],enumerable:!0});return s},y40=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),j40=y40((f,h)=>{var w=process||{},s=w.argv||[],$=w.env||{},r=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||w.platform==="win32"||(w.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),E=(F,C,I=F)=>(L)=>{let W=""+L,X=W.indexOf(C,F.length);return~X?F+U(W,C,I,X)+C:F+W+C},U=(F,C,I,L)=>{let W="",X=0;do W+=F.substring(X,L)+I,X=L+C.length,L=F.indexOf(C,X);while(~L);return W+F.substring(X)},T=(F=r)=>{let C=F?E:()=>String;return{isColorSupported:F,reset:C("\x1B[0m","\x1B[0m"),bold:C("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:C("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:C("\x1B[3m","\x1B[23m"),underline:C("\x1B[4m","\x1B[24m"),inverse:C("\x1B[7m","\x1B[27m"),hidden:C("\x1B[8m","\x1B[28m"),strikethrough:C("\x1B[9m","\x1B[29m"),black:C("\x1B[30m","\x1B[39m"),red:C("\x1B[31m","\x1B[39m"),green:C("\x1B[32m","\x1B[39m"),yellow:C("\x1B[33m","\x1B[39m"),blue:C("\x1B[34m","\x1B[39m"),magenta:C("\x1B[35m","\x1B[39m"),cyan:C("\x1B[36m","\x1B[39m"),white:C("\x1B[37m","\x1B[39m"),gray:C("\x1B[90m","\x1B[39m"),bgBlack:C("\x1B[40m","\x1B[49m"),bgRed:C("\x1B[41m","\x1B[49m"),bgGreen:C("\x1B[42m","\x1B[49m"),bgYellow:C("\x1B[43m","\x1B[49m"),bgBlue:C("\x1B[44m","\x1B[49m"),bgMagenta:C("\x1B[45m","\x1B[49m"),bgCyan:C("\x1B[46m","\x1B[49m"),bgWhite:C("\x1B[47m","\x1B[49m"),blackBright:C("\x1B[90m","\x1B[39m"),redBright:C("\x1B[91m","\x1B[39m"),greenBright:C("\x1B[92m","\x1B[39m"),yellowBright:C("\x1B[93m","\x1B[39m"),blueBright:C("\x1B[94m","\x1B[39m"),magentaBright:C("\x1B[95m","\x1B[39m"),cyanBright:C("\x1B[96m","\x1B[39m"),whiteBright:C("\x1B[97m","\x1B[39m"),bgBlackBright:C("\x1B[100m","\x1B[49m"),bgRedBright:C("\x1B[101m","\x1B[49m"),bgGreenBright:C("\x1B[102m","\x1B[49m"),bgYellowBright:C("\x1B[103m","\x1B[49m"),bgBlueBright:C("\x1B[104m","\x1B[49m"),bgMagentaBright:C("\x1B[105m","\x1B[49m"),bgCyanBright:C("\x1B[106m","\x1B[49m"),bgWhiteBright:C("\x1B[107m","\x1B[49m")}};h.exports=T(),h.exports.createColors=T}),gh;((f)=>{f[f.A=1]="A",f[f.NS=2]="NS",f[f.CNAME=5]="CNAME",f[f.SOA=6]="SOA",f[f.PTR=12]="PTR",f[f.MX=15]="MX",f[f.TXT=16]="TXT",f[f.AAAA=28]="AAAA",f[f.SRV=33]="SRV",f[f.NAPTR=35]="NAPTR",f[f.OPT=41]="OPT",f[f.SSHFP=44]="SSHFP",f[f.TLSA=52]="TLSA",f[f.DNSKEY=48]="DNSKEY",f[f.CAA=257]="CAA"})(gh||={});var vL;((f)=>{f[f.IN=1]="IN",f[f.CH=3]="CH",f[f.HS=4]="HS"})(vL||={});var Rj;((f)=>{f.Disable="disable",f.Hide="hide",f.Show="show"})(Rj||={});var Xj;((f)=>{f[f.NoError=0]="NoError",f[f.FormErr=1]="FormErr",f[f.ServFail=2]="ServFail",f[f.NXDomain=3]="NXDomain",f[f.NotImp=4]="NotImp",f[f.Refused=5]="Refused",f[f.YXDomain=6]="YXDomain",f[f.YXRRSet=7]="YXRRSet",f[f.NXRRSet=8]="NXRRSet",f[f.NotAuth=9]="NotAuth",f[f.NotZone=10]="NotZone"})(Xj||={});var Sj;((f)=>{f.TruncatedPacket="TRUNCATED_PACKET",f.InvalidLength="INVALID_LENGTH",f.InvalidFormat="INVALID_FORMAT",f.InvalidName="INVALID_NAME",f.InvalidLabel="INVALID_LABEL",f.InvalidPointer="INVALID_POINTER",f.InvalidType="INVALID_TYPE",f.InvalidClass="INVALID_CLASS",f.NetworkError="NETWORK_ERROR"})(Sj||={});function O40(f){if(!f)return;let h=Array.isArray(f)?f:[f],w={};for(let s of h)if(s==="aa"||s==="authoritative")w.authoritative=!0;else if(s==="ad"||s==="authentic")w.authenticData=!0;else if(s==="cd"||s==="checking-disabled")w.checkingDisabled=!0;else if(s.startsWith("bufsize="))w.udpPayloadSize=Number.parseInt(s.split("=")[1]);return w}function S0(f,h,w){if(w)console.debug(`[dnsx:${f}] ${h}`)}var l40=12,v40=63;class s4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(f){let h=new s4,w=f.readUInt16BE(0);return h.response=(w&32768)!==0,h.opcode=(w&30720)>>>11,h.authoritative=(w&1024)!==0,h.truncated=(w&512)!==0,h.recursionDesired=(w&256)!==0,h.recursionAvailable=(w&128)!==0,h.authenticData=(w&32)!==0,h.checkingDisabled=(w&16)!==0,h.responseCode=w&15,h}toBuffer(){let f=Yj.alloc(2),h=0;if(this.response)h|=32768;if(h|=(this.opcode&15)<<11,this.authoritative)h|=1024;if(this.truncated)h|=512;if(this.recursionDesired)h|=256;if(this.recursionAvailable)h|=128;if(this.authenticData)h|=32;if(this.checkingDisabled)h|=16;return h|=this.responseCode&15,f.writeUInt16BE(h,0),f}}class bL{buffer;offset;nameOffsets;verbose;constructor(f=512,h){this.buffer=Yj.alloc(f),this.offset=0,this.nameOffsets=new Map,this.verbose=h}writeHeader(f,h,w){S0("encoder",`Writing DNS header: ${JSON.stringify({id:f,flags:{response:h.response,opcode:h.opcode,recursionDesired:h.recursionDesired},counts:w})}`,this.verbose),this.writeUint16(f);let s=h.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(w.qdcount),this.writeUint16(w.ancount),this.writeUint16(w.nscount),this.writeUint16(w.arcount)}writeName(f){S0("encoder",`Writing DNS name: ${f}`,this.verbose);let h=f.split(".");for(let w of h){if(w.length>v40)throw new Error(`Label too long: ${w}`);this.buffer[this.offset++]=w.length,this.buffer.write(w,this.offset),this.offset+=w.length}this.buffer[this.offset++]=0}writeQuestion(f){this.writeName(f.name),this.writeUint16(f.type),this.writeUint16(f.class)}writeUint16(f){this.buffer.writeUInt16BE(f,this.offset),this.offset+=2}writeUint32(f){this.buffer.writeUInt32BE(f,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class mL{buffer;offset;constructor(f){this.buffer=f,this.offset=0}canRead(f){return this.offset+f<=this.buffer.length}readName(){let f=[],h=!1,w=this.offset;for(let s=0;s<5;s++){if(w>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[w];if($===0){if(!h)this.offset=w+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!h)this.offset=w+2,h=!0;w=($&63)<<8|this.buffer[w+1];continue}if(w++,w+$>this.buffer.length)throw new Error("Out of bounds access");let r=this.buffer.slice(w,w+$).toString("ascii");f.push(r),w+=$}return f.join(".")}readHeader(){if(!this.canRead(l40))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let f=this.readUint16(),h=s4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let w={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:f,flags:h,counts:w}}readQuestion(){let f=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16();return{name:f,type:h,class:w}}readAnswer(){let f=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let r=this.readRData(h,$);return{name:f,type:h,class:w,ttl:s,data:r}}readRData(f,h){let w=this.offset,s;switch(f){case 1:if(h!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(h!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(h<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(h);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+h).toString("hex"),this.offset+=h}if(this.offset-w!==h)this.offset=w+h;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let f=this.buffer.readUInt16BE(this.offset);return this.offset+=2,f}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=this.buffer.readUInt32BE(this.offset);return this.offset+=4,f}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=[];for(let h=0;h<4;h++)f.push(this.buffer[this.offset++]);return f.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let f=[];for(let h=0;h<8;h++)f.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return f.join(":")}readString(f){if(!this.canRead(f))throw new Error("Out of bounds access");let h=this.buffer.slice(this.offset,this.offset+f).toString();return this.offset+=f,h}}function Mj(f,h={}){let w=new bL(512,h.verbose),s=new s4;s.recursionDesired=!0,s.response=!1;let $=h.txid??h.id??Math.floor(Math.random()*65536);return w.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),w.writeQuestion({name:f.name,type:typeof f.type==="string"?gh[f.type]:f.type,class:f.class}),w.getBuffer()}function OL(f){let h=new mL(f);if((f.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:w,flags:s,counts:$}=h.readHeader();for(let T=0;T<$.qdcount;T++)h.readQuestion();let r=[];for(let T=0;T<$.ancount;T++)r.push(h.readAnswer());let E=[];for(let T=0;T<$.nscount;T++)E.push(h.readAnswer());let U=[];for(let T=0;T<$.arcount;T++)U.push(h.readAnswer());return{id:w,flags:s,answers:r,authorities:E,additionals:U}}var Qj;((f)=>{f.UDP="udp",f.TCP="tcp",f.TLS="tls",f.HTTPS="https"})(Qj||={});class HU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=b40.createSocket("udp4"),r,E,U=HU.DEFAULT_PORT;if(f.includes(":")){let[F,C]=f.split(":");E=F;let I=Number.parseInt(C,10);if(I>0&&I<65536)U=I}else E=f;$.on("error",(F)=>{clearTimeout(r),$.close(),s(F)}),$.on("message",(F)=>{clearTimeout(r),$.close(),w(F)}),r=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},HU.TIMEOUT);let T=new Uint8Array(h.buffer,h.byteOffset,h.length);$.send(T,U,E,(F)=>{if(F)clearTimeout(r),$.close(),s(F)})})}}class NU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=new d40.Socket,r,E=new Uint8Array(0),U=-1;$.on("error",(C)=>{clearTimeout(r),$.destroy(),s(C)}),$.on("data",(C)=>{let I=new Uint8Array(E.length+C.length);if(I.set(E),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),E.length),E=I,U===-1&&E.length>=2)U=new DataView(E.buffer,E.byteOffset).getUint16(0)+2;if(U!==-1&&E.length>=U)clearTimeout(r),$.destroy(),w(dL.from(E.slice(2,U)))}),r=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},NU.TIMEOUT);let[T,F=NU.DEFAULT_PORT]=f.split(":");$.connect(Number(F),T,()=>{let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,h.length);let I=new Uint8Array(h.buffer,h.byteOffset,h.length),L=new Uint8Array(C.length+I.length);L.set(C),L.set(I,C.length),$.write(L,(W)=>{if(W)clearTimeout(r),$.destroy(),s(W)})})})}}class DU{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $={host:f.split(":")[0],port:Number(f.split(":")[1])||DU.DEFAULT_PORT,servername:f.split(":")[0]},r,E=i40.connect($,()=>{if(!E.authorized){E.destroy(),s(new Error("TLS authorization failed"));return}let F=new Uint8Array(2);new DataView(F.buffer).setUint16(0,h.length);let C=new Uint8Array(h.buffer,h.byteOffset,h.length),I=new Uint8Array(F.length+C.length);I.set(F),I.set(C,F.length),E.write(I,(L)=>{if(L)clearTimeout(r),E.destroy(),s(L)})}),U=new Uint8Array(0),T=-1;E.on("error",(F)=>{clearTimeout(r),E.destroy(),s(F)}),E.on("data",(F)=>{let C=new Uint8Array(U.length+F.length);if(C.set(U),C.set(new Uint8Array(F.buffer,F.byteOffset,F.length),U.length),U=C,T===-1&&U.length>=2)T=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(T!==-1&&U.length>=T)clearTimeout(r),E.destroy(),w(dL.from(U.slice(2,T)))}),r=setTimeout(()=>{E.destroy(),s(new Error("TLS query timed out"))},DU.TIMEOUT)})}}class M${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(f,h){return new Promise((w,s)=>{let $;try{$=new zj(f)}catch{$=new zj(`https://${f}/dns-query`)}let r={method:"POST",headers:{"Content-Type":M$.CONTENT_TYPE,"Content-Length":h.length.toString(),Accept:M$.CONTENT_TYPE},timeout:M$.TIMEOUT},E=m40.request($,r,(U)=>{let T=[];U.on("data",(F)=>{T.push(new Uint8Array(F.buffer,F.byteOffset,F.length))}),U.on("end",()=>{if(U.statusCode!==200){s(new Error(`HTTPS query failed with status ${U.statusCode}`));return}let F=U.headers["content-type"];if(F!==M$.CONTENT_TYPE){s(new Error(`Invalid content type: ${F}`));return}let C=T.reduce((W,X)=>W+X.length,0),I=new Uint8Array(C),L=0;for(let W of T)I.set(W,L),L+=W.length;w(dL.from(I))})});E.on("error",s),E.on("timeout",()=>{E.destroy(),s(new Error("HTTPS query timed out"))}),E.write(new Uint8Array(h.buffer,h.byteOffset,h.length)),E.end()})}}function lL(f){switch(f){case"udp":return new HU;case"tcp":return new NU;case"tls":return new DU;case"https":return new M$}}class H1{options;static DEFAULT_NAMESERVER="1.1.1.1";static RESOLV_CONF_PATH="/etc/resolv.conf";static WINDOWS_DNS_KEY="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Nameserver";validateDomainName(f){if(f.includes(".."))throw new Error(`Invalid domain name: ${f} (consecutive dots)`);if(f.startsWith(".")||f.endsWith("."))throw new Error(`Invalid domain name: ${f} (starts or ends with dot)`);if(f.length>253)throw new Error(`Domain name too long: ${f}`);let h=f.split(".");for(let w of h){if(w.length>63)throw new Error(`Label too long in domain: ${f}`);if(!/^[a-z0-9-]+$/i.test(w))throw new Error(`Invalid characters in domain label: ${w}`)}}validateRecordType(f){if(typeof f==="string"){if(!(f.toUpperCase()in gh))throw new Error(`Invalid record type: ${f}`)}else if(typeof f==="number"){if(!Object.values(gh).filter((h)=>typeof h==="number").includes(f))throw new Error(`Invalid record type number: ${f}`)}else throw new TypeError("Record type must be string or number")}constructor(f){this.options={transport:{type:"udp"},verbose:!1,...f},this.validateOptions()}async query(){try{let f=this.determineTransportType();S0("client",`Selected transport type: ${f}`,this.options.verbose);let h=lL(f);if(!h)throw new Error(`Failed to create transport for type: ${f}`);let w=[],s=await this.resolveNameserver();if(S0("client",`Resolved nameserver: ${s}`,this.options.verbose),!s)throw new Error("Failed to resolve nameserver");let $=this.buildQueries();S0("client",`Built ${$.length} queries`,this.options.verbose);for(let r of $){S0("client",`Processing query: ${JSON.stringify({query:r,nameserver:s,transportType:f})}`,this.options.verbose);let E=Mj(r,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});S0("client",`Built DNS request: ${JSON.stringify({hexData:E.toString("hex"),length:E.length,txid:E.readUInt16BE(0),flags:E.readUInt16BE(2).toString(16)})}`,this.options.verbose);let U=this.options.retries||3;for(let T=0;T<U;T++)try{S0("client",`Attempt ${T+1}/${U}`,this.options.verbose);let F=await h.query(s,E);if(S0("client",`Received DNS response: ${JSON.stringify({hexData:F.toString("hex"),length:F.length,txid:F.readUInt16BE(0),flags:F.readUInt16BE(2).toString(16)})}`,this.options.verbose),F.length<12)throw new Error(`Response too short: ${F.length} bytes`);if(!(F.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let C=OL(F);if(S0("client",`Parsed DNS response: ${JSON.stringify({id:C.id,answerCount:C.answers.length,authorityCount:C.authorities.length,additionalCount:C.additionals.length})}`,this.options.verbose),f==="udp"&&C.flags.truncated){S0("client","Response truncated, retrying with TCP",this.options.verbose);let I=await lL("tcp").query(s,E);w.push(OL(I))}else w.push(C);break}catch(F){if(S0("client",`Attempt ${T+1} failed: ${F.message}`,this.options.verbose),T===U-1)throw S0("client","All retry attempts failed",this.options.verbose),F;let C=2**T*1000;S0("client",`Waiting ${C}ms before retry`,this.options.verbose),await new Promise((I)=>setTimeout(I,C))}}if(w.length===0)throw new Error("No responses received");return w}catch(f){let h=f instanceof Error?f.message:"Unknown error occurred";throw S0("client",`Query failed with error: ${h}`,this.options.verbose),S0("client",`Full error: ${JSON.stringify(f)}`,this.options.verbose),new Error(`DNS query failed: ${h}`)}}buildQueries(){let f=[];if(!this.options.domains?.length)throw new Error("No domains specified");let h=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],w=this.resolveTypes(),s=this.resolveClasses();for(let $ of h)for(let r of w)for(let E of s)f.push({name:$,type:r,class:E});return S0("client",`Built queries: ${JSON.stringify(f)}`,this.options.verbose),f}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((f)=>{if(this.validateRecordType(f),typeof f==="number")return f;let h=f.toUpperCase();return gh[h]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((f)=>{if(typeof f==="number")return f;let h=f.toUpperCase(),w=vL[h];if(w===void 0)throw new Error(`Invalid query class: ${f}`);return w})}validateNameserver(f){if(f.startsWith("https://"))return!0;if(f.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(f))return f.split(".").every((h)=>{let w=Number.parseInt(h,10);return w>=0&&w<=255});if(f.includes(":"))return!1;return!1}async resolveNameserver(){try{if(this.options.nameserver){if(S0("client",`Checking configured nameserver: ${this.options.nameserver}`,this.options.verbose),this.validateNameserver(this.options.nameserver))return this.options.nameserver}let f=g40();S0("client",`Resolving nameserver for platform: ${f}`,this.options.verbose);let h;if(f==="win32")h=await this.resolveWindowsNameserver();else h=await this.resolveUnixNameserver();if(this.validateNameserver(h))return h;return S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to resolve nameserver: ${f.message}`,this.options.verbose),S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let f=(await c40.readFile(H1.RESOLV_CONF_PATH,"utf-8")).split(`
60
- `),h=[];for(let s of f){let $=s.trim();if($.startsWith("nameserver")){let[,r]=$.split(/\s+/);if(r&&!r.includes("%"))h.push(r)}}let w=h.find((s)=>!s.includes(":"));if(w)return S0("client",`Using IPv4 nameserver from resolv.conf: ${w}`,this.options.verbose),w;return S0("client",`No valid nameserver found in resolv.conf, using fallback: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to read resolv.conf: ${f.message}`,this.options.verbose),S0("client",`Using fallback nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return S0("client",`Using default nameserver for Windows: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){throw S0("client",`Failed to get Windows nameserver: ${f.message}`,this.options.verbose),new Error("Failed to get Windows nameserver")}}determineTransportType(){if(this.options.https)return"https";if(this.options.tls)return"tls";if(this.options.tcp)return"tcp";if(this.options.udp)return"udp";if(typeof this.options.transport==="object")return this.options.transport.type||"udp";return"udp"}validateOptions(){if(this.options.domains)for(let f of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(f);if(this.options.type){let f=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let h of f)this.validateRecordType(h)}if([this.options.udp,this.options.tcp,this.options.tls,this.options.https].filter(Boolean).length>1)throw new Error("Only one transport type can be specified");if(this.options.https&&!this.options.nameserver?.startsWith("https://"))throw new Error("HTTPS transport requires an HTTPS nameserver URL");S0("client","Options validation completed successfully",this.options.verbose)}}var x40=k40(j40(),1),_40={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function n40(f,h){if(h.json)return e40(f,h.showDuration);return a40(f,h)}function e40(f,h){let w={responses:f.map((s)=>({id:s.id,answers:s.answers.map(jL),authorities:s.authorities.map(jL),additionals:s.additionals.map(jL)}))};if(h!==void 0)w.duration={ms:h};return JSON.stringify(w,null,2)}function jL(f){let h={name:f.name,type:gh[f.type]||f.type,ttl:f.ttl};switch(f.type){case 1:case 28:return{...h,address:f.data};case 5:case 12:case 2:return{...h,target:f.data};case 15:return{...h,preference:f.data.preference,exchange:f.data.exchange};case 16:return{...h,text:f.data};case 33:return{...h,priority:f.data.priority,weight:f.data.weight,port:f.data.port,target:f.data.target};case 257:return{...h,flags:f.data.flags,tag:f.data.tag,value:f.data.value};default:return{...h,data:f.data}}}function a40(f,h){let w=[];for(let s of f){if(h.short){if(s.answers.length>0)w.push(PU(s.answers[0],h));continue}if(s.answers.length>0)for(let $ of s.answers)w.push(PU($,h));if(s.authorities.length>0){w.push(`
59
+ `),xH=!0}throw new a("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),cF(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoSession:r}=f;if(!h&&!w&&!s&&!$&&!r)throw new a("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:E}=await Promise.resolve().then(() => (J8(),Z8));return E(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:h}=await Promise.resolve().then(() => (gH(),cH));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:h}=await Promise.resolve().then(() => (WC(),GC));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:h}=await Promise.resolve().then(() => (YC(),SC));return h(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await I9(f))()},async()=>{throw new a("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),Sh0,Xh0),Xh0=(f)=>f?.expiration!==void 0,Sh0=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;GE();Mh();AE();Ew();Zh();p$();RE();sf();var UN=p(O0(),1);J();ow();var OE=p(t1(),1);U4();K$();cf();var _H={["required"]:!1,type:"String"},nH={["required"]:!0,default:!1,type:"Boolean"},eH={["ref"]:"Endpoint"},jE={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},$N={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},$1={},aH={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},os={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Iw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},wh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},pH={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},oH={["fn"]:"stringEquals",["argv"]:[os,"aws-us-gov"]},uH={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},tH={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},fN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},hN=[jE],wN=[$N],sN=[{["ref"]:"Region"}],Yh0={version:"1.0",parameters:{Region:_H,UseDualStack:nH,UseFIPS:nH,Endpoint:_H},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[eH]}],rules:[{conditions:hN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:wN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:eH,properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:sN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:sN,assign:"PartitionResult"}],rules:[{conditions:[aH,Iw,wh],endpoint:{url:"https://route53.amazonaws.com",properties:pH,headers:$1},type:"endpoint"},{conditions:[aH,jE,wh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:pH,headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[os,"aws-cn"]},Iw,wh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:$1},type:"endpoint"},{conditions:[oH,Iw,wh],endpoint:uH,type:"endpoint"},{conditions:[oH,jE,wh],endpoint:uH,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[os,"aws-iso"]},Iw,wh],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[os,"aws-iso-b"]},Iw,wh],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[os,"aws-iso-e"]},Iw,wh],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:$1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[os,"aws-iso-f"]},Iw,wh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:$1},type:"endpoint"},{conditions:[jE,$N],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,tH]},fN],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:hN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[tH,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:wN,rules:[{conditions:[fN],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:$1,headers:$1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},rN=Yh0;var Mh0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),EN=(f,h={})=>{return Mh0.get(f,()=>nh(rN,{endpointParams:f,logger:h.logger}))};ff.aws=eh;var TN=(f)=>{return{apiVersion:"2013-04-01",base64Decoder:f?.base64Decoder??OE.fromBase64,base64Encoder:f?.base64Encoder??OE.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??EN,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??FY,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new UN.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??jh,utf8Encoder:f?.utf8Encoder??js}};J();SE();J();var CN=(f)=>{Cs(process.version);let h=ls(f),w=()=>h().then(Fs),s=TN(f);FN.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??Os,credentialDefaultProvider:f?.credentialDefaultProvider??yE,defaultUserAgentProvider:f?.defaultUserAgentProvider??ks({serviceId:s.serviceId,clientVersion:LY.version}),maxAttempts:f?.maxAttempts??A0(ws,f),region:f?.region??A0(Yh,{..._w,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...$s,default:async()=>(await w()).retryMode||Jh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??A0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(xw,$),userAgentAppId:f?.userAgentAppId??A0(ys,$)}};YE();C1();J();var IN=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},LN=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var BN=(f,h)=>{let w=Object.assign(vs(f),Is(f),Zw(f),IN(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,bs(w),Ls(w),Jw(w),LN(w))};class MC extends $w{config;constructor(...[f]){let h=CN(f||{});super(h);this.initConfig=h;let w=IY(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=CY(U),F=BN(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(Gs(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(us.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:TY,identityProviderConfigProvider:async(C)=>new us.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(us.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var lE=/^\/(hostedzone|change|delegationset)\//;function Qh0(){return(f)=>async(h)=>{let{ChangeBatch:w}=h.input,s=[];for(let $ of w.Changes){let{AliasTarget:r}=$.ResourceRecordSet;if(r)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...r,HostedZoneId:r.HostedZoneId.replace(lE,"")}}});else s.push($)}return f({...h,input:{...h.input,ChangeBatch:{...w,Changes:s}}})}}var Kh0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},GN=(f)=>({applyToStack:(h)=>{h.add(Qh0(),Kh0)}});var Zh0=["DelegationSetId","HostedZoneId","Id"];function Jh0(){return(f)=>async(h)=>{let w={...h.input};for(let s of Zh0){let $=w[s];if($)w[s]=$.replace(lE,"")}return f({...h,input:w})}}var Vh0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},O=(f)=>({applyToStack:(h)=>{h.add(Jh0(),Vh0)}});D();k();J();var _=p(O0(),1);function WN(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function zN(f){return f.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class QC{value;constructor(f){this.value=f}toString(){return zN(""+this.value)}}class P{name;children;attributes={};static of(f,h,w){let s=new P(f);if(h!==void 0)s.addChildNode(new QC(h));if(w!==void 0)s.withName(w);return s}constructor(f,h=[]){this.name=f,this.children=h}withName(f){return this.name=f,this}addAttribute(f,h){return this.attributes[f]=h,this}addChildNode(f){return this.children.push(f),this}removeAttribute(f){return delete this.attributes[f],this}n(f){return this.name=f,this}c(f){return this.children.push(f),this}a(f,h){if(h!=null)this.attributes[f]=h;return this}cc(f,h,w=h){if(f[h]!=null){let s=P.of(h,f[h]).withName(w);this.c(s)}}l(f,h,w,s){if(f[h]!=null)s().map((r)=>{r.withName(w),this.c(r)})}lc(f,h,w,s){if(f[h]!=null){let $=s(),r=new P(w);$.map((E)=>{r.c(E)}),this.c(r)}}toString(){let f=Boolean(this.children.length),h=`<${this.name}`,w=this.attributes;for(let s of Object.keys(w)){let $=w[s];if($!=null)h+=` ${s}="${WN(""+$)}"`}return h+=!f?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var d=p(m0(),1);J();J();class m extends rf{constructor(f){super(f);Object.setPrototypeOf(this,m.prototype)}}class vE extends m{name="ConcurrentModification";$fault="client";constructor(f){super({name:"ConcurrentModification",$fault:"client",...f});Object.setPrototypeOf(this,vE.prototype)}}class bE extends m{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,bE.prototype)}}class mE extends m{name="InvalidKeySigningKeyStatus";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...f});Object.setPrototypeOf(this,mE.prototype)}}class dE extends m{name="InvalidKMSArn";$fault="client";constructor(f){super({name:"InvalidKMSArn",$fault:"client",...f});Object.setPrototypeOf(this,dE.prototype)}}class iE extends m{name="InvalidSigningStatus";$fault="client";constructor(f){super({name:"InvalidSigningStatus",$fault:"client",...f});Object.setPrototypeOf(this,iE.prototype)}}class cE extends m{name="NoSuchKeySigningKey";$fault="client";constructor(f){super({name:"NoSuchKeySigningKey",$fault:"client",...f});Object.setPrototypeOf(this,cE.prototype)}}class gE extends m{name="ConflictingDomainExists";$fault="client";constructor(f){super({name:"ConflictingDomainExists",$fault:"client",...f});Object.setPrototypeOf(this,gE.prototype)}}class xE extends m{name="InvalidVPCId";$fault="client";constructor(f){super({name:"InvalidVPCId",$fault:"client",...f});Object.setPrototypeOf(this,xE.prototype)}}class _E extends m{name="LimitsExceeded";$fault="client";constructor(f){super({name:"LimitsExceeded",$fault:"client",...f});Object.setPrototypeOf(this,_E.prototype)}}class nE extends m{name="NoSuchHostedZone";$fault="client";constructor(f){super({name:"NoSuchHostedZone",$fault:"client",...f});Object.setPrototypeOf(this,nE.prototype)}}class eE extends m{name="NotAuthorizedException";$fault="client";constructor(f){super({name:"NotAuthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,eE.prototype)}}class aE extends m{name="PriorRequestNotComplete";$fault="client";constructor(f){super({name:"PriorRequestNotComplete",$fault:"client",...f});Object.setPrototypeOf(this,aE.prototype)}}class pE extends m{name="PublicZoneVPCAssociation";$fault="client";constructor(f){super({name:"PublicZoneVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,pE.prototype)}}class oE extends m{name="CidrBlockInUseException";$fault="client";Message;constructor(f){super({name:"CidrBlockInUseException",$fault:"client",...f});Object.setPrototypeOf(this,oE.prototype),this.Message=f.Message}}class uE extends m{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(f){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...f});Object.setPrototypeOf(this,uE.prototype),this.Message=f.Message}}class tE extends m{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrCollectionException",$fault:"client",...f});Object.setPrototypeOf(this,tE.prototype),this.Message=f.Message}}class f2 extends m{name="InvalidChangeBatch";$fault="client";messages;constructor(f){super({name:"InvalidChangeBatch",$fault:"client",...f});Object.setPrototypeOf(this,f2.prototype),this.messages=f.messages}}class h2 extends m{name="NoSuchHealthCheck";$fault="client";constructor(f){super({name:"NoSuchHealthCheck",$fault:"client",...f});Object.setPrototypeOf(this,h2.prototype)}}class w2 extends m{name="ThrottlingException";$fault="client";constructor(f){super({name:"ThrottlingException",$fault:"client",...f});Object.setPrototypeOf(this,w2.prototype)}}class s2 extends m{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(f){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...f});Object.setPrototypeOf(this,s2.prototype),this.Message=f.Message}}class $2 extends m{name="HealthCheckAlreadyExists";$fault="client";constructor(f){super({name:"HealthCheckAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,$2.prototype)}}class r2 extends m{name="TooManyHealthChecks";$fault="client";constructor(f){super({name:"TooManyHealthChecks",$fault:"client",...f});Object.setPrototypeOf(this,r2.prototype)}}class E2 extends m{name="DelegationSetNotAvailable";$fault="client";constructor(f){super({name:"DelegationSetNotAvailable",$fault:"client",...f});Object.setPrototypeOf(this,E2.prototype)}}class U2 extends m{name="DelegationSetNotReusable";$fault="client";constructor(f){super({name:"DelegationSetNotReusable",$fault:"client",...f});Object.setPrototypeOf(this,U2.prototype)}}class T2 extends m{name="HostedZoneAlreadyExists";$fault="client";constructor(f){super({name:"HostedZoneAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,T2.prototype)}}class F2 extends m{name="InvalidDomainName";$fault="client";constructor(f){super({name:"InvalidDomainName",$fault:"client",...f});Object.setPrototypeOf(this,F2.prototype)}}class C2 extends m{name="NoSuchDelegationSet";$fault="client";constructor(f){super({name:"NoSuchDelegationSet",$fault:"client",...f});Object.setPrototypeOf(this,C2.prototype)}}class I2 extends m{name="TooManyHostedZones";$fault="client";constructor(f){super({name:"TooManyHostedZones",$fault:"client",...f});Object.setPrototypeOf(this,I2.prototype)}}class L2 extends m{name="InvalidArgument";$fault="client";constructor(f){super({name:"InvalidArgument",$fault:"client",...f});Object.setPrototypeOf(this,L2.prototype)}}class B2 extends m{name="InvalidKeySigningKeyName";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyName",$fault:"client",...f});Object.setPrototypeOf(this,B2.prototype)}}class G2 extends m{name="KeySigningKeyAlreadyExists";$fault="client";constructor(f){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,G2.prototype)}}class W2 extends m{name="TooManyKeySigningKeys";$fault="client";constructor(f){super({name:"TooManyKeySigningKeys",$fault:"client",...f});Object.setPrototypeOf(this,W2.prototype)}}class z2 extends m{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(f){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...f});Object.setPrototypeOf(this,z2.prototype)}}class A2 extends m{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(f){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...f});Object.setPrototypeOf(this,A2.prototype)}}class R2 extends m{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(f){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,R2.prototype)}}class X2 extends m{name="DelegationSetAlreadyCreated";$fault="client";constructor(f){super({name:"DelegationSetAlreadyCreated",$fault:"client",...f});Object.setPrototypeOf(this,X2.prototype)}}class S2 extends m{name="DelegationSetAlreadyReusable";$fault="client";constructor(f){super({name:"DelegationSetAlreadyReusable",$fault:"client",...f});Object.setPrototypeOf(this,S2.prototype)}}class Y2 extends m{name="HostedZoneNotFound";$fault="client";constructor(f){super({name:"HostedZoneNotFound",$fault:"client",...f});Object.setPrototypeOf(this,Y2.prototype)}}class M2 extends m{name="InvalidTrafficPolicyDocument";$fault="client";constructor(f){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...f});Object.setPrototypeOf(this,M2.prototype)}}class Q2 extends m{name="TooManyTrafficPolicies";$fault="client";constructor(f){super({name:"TooManyTrafficPolicies",$fault:"client",...f});Object.setPrototypeOf(this,Q2.prototype)}}class K2 extends m{name="TrafficPolicyAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends m{name="NoSuchTrafficPolicy";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicy",$fault:"client",...f});Object.setPrototypeOf(this,Z2.prototype)}}class J2 extends m{name="TooManyTrafficPolicyInstances";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...f});Object.setPrototypeOf(this,J2.prototype)}}class V2 extends m{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,V2.prototype)}}class P2 extends m{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...f});Object.setPrototypeOf(this,P2.prototype)}}class H2 extends m{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(f){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...f});Object.setPrototypeOf(this,H2.prototype)}}class N2 extends m{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(f){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...f});Object.setPrototypeOf(this,N2.prototype)}}class D2 extends m{name="KeySigningKeyInUse";$fault="client";constructor(f){super({name:"KeySigningKeyInUse",$fault:"client",...f});Object.setPrototypeOf(this,D2.prototype)}}class q2 extends m{name="CidrCollectionInUseException";$fault="client";Message;constructor(f){super({name:"CidrCollectionInUseException",$fault:"client",...f});Object.setPrototypeOf(this,q2.prototype),this.Message=f.Message}}class k2 extends m{name="HealthCheckInUse";$fault="client";constructor(f){super({name:"HealthCheckInUse",$fault:"client",...f});Object.setPrototypeOf(this,k2.prototype)}}class y2 extends m{name="HostedZoneNotEmpty";$fault="client";constructor(f){super({name:"HostedZoneNotEmpty",$fault:"client",...f});Object.setPrototypeOf(this,y2.prototype)}}class j2 extends m{name="NoSuchQueryLoggingConfig";$fault="client";constructor(f){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...f});Object.setPrototypeOf(this,j2.prototype)}}class O2 extends m{name="DelegationSetInUse";$fault="client";constructor(f){super({name:"DelegationSetInUse",$fault:"client",...f});Object.setPrototypeOf(this,O2.prototype)}}class l2 extends m{name="TrafficPolicyInUse";$fault="client";constructor(f){super({name:"TrafficPolicyInUse",$fault:"client",...f});Object.setPrototypeOf(this,l2.prototype)}}class v2 extends m{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...f});Object.setPrototypeOf(this,v2.prototype)}}class b2 extends m{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,b2.prototype)}}class m2 extends m{name="DNSSECNotFound";$fault="client";constructor(f){super({name:"DNSSECNotFound",$fault:"client",...f});Object.setPrototypeOf(this,m2.prototype)}}class d2 extends m{name="LastVPCAssociation";$fault="client";constructor(f){super({name:"LastVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,d2.prototype)}}class i2 extends m{name="VPCAssociationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,i2.prototype)}}class c2 extends m{name="HostedZonePartiallyDelegated";$fault="client";constructor(f){super({name:"HostedZonePartiallyDelegated",$fault:"client",...f});Object.setPrototypeOf(this,c2.prototype)}}class g2 extends m{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(f){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...f});Object.setPrototypeOf(this,g2.prototype)}}class x2 extends m{name="NoSuchChange";$fault="client";constructor(f){super({name:"NoSuchChange",$fault:"client",...f});Object.setPrototypeOf(this,x2.prototype)}}class _2 extends m{name="NoSuchGeoLocation";$fault="client";constructor(f){super({name:"NoSuchGeoLocation",$fault:"client",...f});Object.setPrototypeOf(this,_2.prototype)}}class n2 extends m{name="IncompatibleVersion";$fault="client";constructor(f){super({name:"IncompatibleVersion",$fault:"client",...f});Object.setPrototypeOf(this,n2.prototype)}}class e2 extends m{name="HostedZoneNotPrivate";$fault="client";constructor(f){super({name:"HostedZoneNotPrivate",$fault:"client",...f});Object.setPrototypeOf(this,e2.prototype)}}class a2 extends m{name="NoSuchCidrLocationException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrLocationException",$fault:"client",...f});Object.setPrototypeOf(this,a2.prototype),this.Message=f.Message}}class p2 extends m{name="InvalidPaginationToken";$fault="client";constructor(f){super({name:"InvalidPaginationToken",$fault:"client",...f});Object.setPrototypeOf(this,p2.prototype)}}class o2 extends m{name="HealthCheckVersionMismatch";$fault="client";constructor(f){super({name:"HealthCheckVersionMismatch",$fault:"client",...f});Object.setPrototypeOf(this,o2.prototype)}}class u2 extends m{name="ConflictingTypes";$fault="client";constructor(f){super({name:"ConflictingTypes",$fault:"client",...f});Object.setPrototypeOf(this,u2.prototype)}}var KN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},ZN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(F$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(T$0,f[F0]).n(F0));if(f[P0]!=null)r.c(x4(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},JN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(B$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"Changes","Changes",()=>aw0(f[Lk],h)),f[t2]!=null)r.c(P.of(t2,String(f[t2])).n(t2));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},VN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(Z$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[hU]!=null)r.c(_w0(f[hU],h).n(hU));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},PN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;$=c0;let r=new P(J$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"AddTags","AddTags",()=>Fs0(f[U$0],h)),r.lc(f,"RemoveTagKeys","RemoveTagKeys",()=>Ts0(f[w40],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},HN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection");let $;$=c0;let r=new P(G$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(Y$0,f[q0]).n(q0));if(f[o]!=null)r.c(P.of(M$0,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},NN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck");let $;$=c0;let r=new P(W$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(m$0,f[q0]).n(q0));if(f[Qw]!=null)r.c(hs0(f[Qw],h).n(Qw));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},DN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone");let $;$=c0;let r=new P(z$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(q6,f[q0]).n(q0));if(f[sU]!=null)r.c(P.of(jf,f[sU]).n(sU));if(f[$U]!=null)r.c(ws0(f[$U],h).n($U));if(f[o]!=null)r.c(P.of(zf,f[o]).n(o));if(f[P0]!=null)r.c(x4(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},qN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/keysigningkey");let $;$=c0;let r=new P(A$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(q6,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));if(f[gC]!=null)r.c(P.of(E40,f[gC]).n(gC));if(f[o]!=null)r.c(P.of(r40,f[o]).n(o));if(f[z1]!=null)r.c(P.of(U40,f[z1]).n(z1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},kN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/queryloggingconfig");let $;$=c0;let r=new P(Q$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.cc(f,wU),f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},yN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/delegationset");let $;$=c0;let r=new P(K$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[q0]!=null)r.c(P.of(q6,f[q0]).n(q0));if(f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},jN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy");let $;$=c0;let r=new P(P$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(y6,f[F0]).n(F0));if(f[$h]!=null)r.c(P.of(Wk,f[$h]).n($h));if(f[o]!=null)r.c(P.of(L40,f[o]).n(o));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},ON=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance");let $;$=c0;let r=new P(V$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[h0]!=null)r.c(P.of(jf,f[h0]).n(h0));if(f[o]!=null)r.c(P.of(zf,f[o]).n(o));if(f[o0]!=null)r.c(P.of(o0,String(f[o0])).n(o0));if(r.cc(f,I$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},lN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(H$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(y6,f[F0]).n(F0));if(f[$h]!=null)r.c(P.of(Wk,f[$h]).n($h));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},vN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(N$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(x4(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},bN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},mN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},dN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},iN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},cN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},gN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},xN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},_N=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},nN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},eN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(q$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[P0]!=null)r.c(x4(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},aN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},pN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=c0;let r=new P(y$0);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(k$0,f[F0]).n(F0));if(f[P0]!=null)r.c(x4(f[P0],h).n(P0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},oN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},uN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/accountlimit/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1);let $;return w.m("GET").h(s).b($),w.build()},tN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/change/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},fD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/checkeripranges");let $;return w.m("GET").h(s).b($),w.build()},hD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},wD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocation");let $=Y({[S40]:[,f[kf]],[Y40]:[,f[yf]],[q40]:[,f[Of]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},sD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},$D=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheckcount");let $;return w.m("GET").h(s).b($),w.build()},rD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ED=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},UD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},TD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonecount");let $;return w.m("GET").h(s).b($),w.build()},FD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},CD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},ID=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},LD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("DelegationSetId",()=>f.DelegationSetId,"{DelegationSetId}",!1);let $;return w.m("GET").h(s).b($),w.build()},BD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("GET").h(s).b($),w.build()},GD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},WD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstancecount");let $;return w.m("GET").h(s).b($),w.build()},zD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[lf]:[,f[T1]],[B$]:[,f[k0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},AD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection");let $=Y({[B$]:[,f[k0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},RD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=Y({[B$]:[,f[k0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},XD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocations");let $=Y({[k40]:[,f[s40]],[y40]:[,f[$40]],[j40]:[,f[I40]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},SD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck");let $=Y({[j6]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},YD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone");let $=Y({[j6]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[M40]:[,f[sU]],[J40]:[,f[c$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},MD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyname");let $=Y({[Q40]:[,f[zf]],[a4]:[,f[h0]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},QD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyvpc");let $=Y({[b40]:[,j(f[c4],"VPCId")],[d40]:[,j(f[g4],"VPCRegion")],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()],[B$]:[,f[k0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},KD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig");let $=Y({[a4]:[,f[h0]],[B$]:[,f[k0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ZD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[P40]:[,f[F40]],[O40]:[,f[C40]],[V40]:[,f[T40]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},JD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset");let $=Y({[j6]:[,f[x1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},VD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;return w.m("GET").h(s).b($),w.build()},PD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1);let $;$=c0;let r=new P(x$0);return r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r.lc(f,"ResourceIds","ResourceIds",()=>Cs0(f[a$0],h)),$+=r.toString(),w.m("POST").h(s).b($),w.build()},HD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies");let $=Y({[l40]:[,f[LU]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},ND=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances");let $=Y({[a4]:[,f[mh]],[O6]:[,f[_1]],[l6]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},DD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=Y({[zk]:[,j(f[h0],"HostedZoneId")],[O6]:[,f[_1]],[l6]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},qD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=Y({[zk]:[,j(f[I$],"TrafficPolicyId")],[m40]:[j(f.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>f[g1].toString()],[a4]:[,f[mh]],[O6]:[,f[_1]],[l6]:[,f[n1]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},kD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies/{Id}/versions"),w.p("Id",()=>f.Id,"{Id}",!1);let $=Y({[v40]:[,f[BU]],[a1]:[()=>f.MaxItems!==void 0,()=>f[u].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},yD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=Y({[B$]:[,f[k0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),r;return w.m("GET").h(s).q($).b(r),w.build()},jD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/testdnsanswer");let $=Y({[a4]:[,j(f[h0],"HostedZoneId")],[H40]:[,j(f[FU],"RecordName")],[N40]:[,j(f[CU],"RecordType")],[D40]:[,f[e$0]],[K40]:[,f[j$0]],[Z40]:[,f[O$0]]}),r;return w.m("GET").h(s).q($).b(r),w.build()},OD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;$=c0;let r=new P(W40);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[qf]!=null)r.c(wk(f[qf],h).n(qf));if(r.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>sk(f[Lw],h)),f[Cf]!=null)r.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[If]!=null)r.c(P.of(If,String(f[If])).n(If));if(f[Lf]!=null)r.c(P.of(Lf,String(f[Lf])).n(Lf));if(r.cc(f,O4),f[Ww]!=null)r.c(P.of(Ww,String(f[Ww])).n(Ww));if(f[Bf]!=null)r.c(P.of(Bf,String(f[Bf])).n(Bf));if(r.cc(f,dh),r.cc(f,b4),f[Gf]!=null)r.c(P.of(Gf,String(f[Gf])).n(Gf));if(f[Wf]!=null)r.c(P.of(Wf,String(f[Wf])).n(Wf));return r.lc(f,"Regions","Regions",()=>$k(f[Bw],h)),r.lc(f,"ResetElements","ResetElements",()=>ss0(f[n$0],h)),r.cc(f,m4),r.cc(f,i4),$+=r.toString(),w.m("POST").h(s).b($),w.build()},lD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(z40);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(k6,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},vD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;$=c0;let r=new P(A40);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)r.c(P.of(y6,f[F0]).n(F0));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},bD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=c0;let r=new P(R40);if(r.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[o0]!=null)r.c(P.of(o0,String(f[o0])).n(o0));if(r.cc(f,I$),f[g1]!=null)r.c(P.of(g1,String(f[g1])).n(g1));return $+=r.toString(),w.m("POST").h(s).b($),w.build()},mD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},dD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},iD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[I0]!=null)w[I0]=G(s[I0]);return w},cD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},gD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},xD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[DC]!=null)w[DC]=Rs0(s[DC],h);return w},_D=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=AU(s[Af],h);return w},nD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);if(s[V1]!=null)w[V1]=RU(s[V1],h);if(s[P0]!=null)w[P0]=D6(s[P0],h);return w},eD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);if(s[xC]!=null)w[xC]=Tk(s[xC],h);return w},aD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=H6(s[ih],h);return w},pD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);return w},oD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},uD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=XU(s[A1],h);return w},tD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f),[Th]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=G(s[h0]);if(s[P0]!=null)w[P0]=D6(s[P0],h);return w},hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},$q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},Gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=Is0(s[rh],h);return w},Wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$0]!=null)w[$0]=e1(s[$0],h);return w},zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CheckerIpRanges==="")w[X4]=[];else if(s[X4]!=null&&s[X4][Rf]!=null)w[X4]=Gs0(G0(s[X4][Rf]),h);return w},Aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.KeySigningKeys==="")w[J4]=[];else if(s[J4]!=null&&s[J4][Rf]!=null)w[J4]=is0(G0(s[J4][Rf]),h);if(s[z1]!=null)w[z1]=Ps0(s[z1],h);return w},Rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[l4]!=null)w[l4]=rk(s[l4],h);return w},Xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=AU(s[Af],h);return w},Sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[dC]!=null)w[dC]=E1(s[dC]);return w},Yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][GU]!=null)w[Hf]=Ek(G0(s[Hf][GU]),h);return w},Mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][GU]!=null)w[Hf]=Ek(G0(s[Hf][GU]),h);return w},Qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);if(s[V1]!=null)w[V1]=RU(s[V1],h);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][P0]!=null)w[Df]=Ik(G0(s[Df][P0]),h);return w},Kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[iC]!=null)w[iC]=E1(s[iC]);return w},Zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=vs0(s[rh],h);return w},Jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=H6(s[ih],h);return w},Vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);return w},Pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[rh]!=null)w[rh]=us0(s[rh],h);return w},Hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},Nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=XU(s[A1],h);return w},Dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Z6]!=null)w[Z6]=M0(s[Z6]);return w},qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrBlocks==="")w[A4]=[];else if(s[A4]!=null&&s[A4][Rf]!=null)w[A4]=zs0(G0(s[A4][Rf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrCollections==="")w[R4]=[];else if(s[R4]!=null&&s[R4][Rf]!=null)w[R4]=Ys0(G0(s[R4][Rf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrLocations==="")w[S4]=[];else if(s[S4]!=null&&s[S4][Rf]!=null)w[S4]=cs0(G0(s[S4][Rf]),h);if(s[k0]!=null)w[k0]=G(s[k0]);return w},jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.GeoLocationDetailsList==="")w[Q4]=[];else if(s[Q4]!=null&&s[Q4][l4]!=null)w[Q4]=Ds0(G0(s[Q4][l4]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[pC]!=null)w[pC]=G(s[pC]);if(s[oC]!=null)w[oC]=G(s[oC]);if(s[s6]!=null)w[s6]=G(s[s6]);return w},Oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthChecks==="")w[K4]=[];else if(s[K4]!=null&&s[K4][Af]!=null)w[K4]=Os0(G0(s[K4][Af]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][V1]!=null)w[Nf]=Uk(G0(s[Nf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[zf]!=null)w[zf]=G(s[zf]);if(s[h0]!=null)w[h0]=G(s[h0]);if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][V1]!=null)w[Nf]=Uk(G0(s[Nf][V1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[uC]!=null)w[uC]=G(s[uC]);if(s[tC]!=null)w[tC]=G(s[tC]);return w},bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZoneSummaries==="")w[Z4]=[];else if(s[Z4]!=null&&s[Z4][XN]!=null)w[Z4]=ms0(G0(s[Z4][XN]),h);if(s[u]!=null)w[u]=M0(s[u]);if(s[k0]!=null)w[k0]=G(s[k0]);return w},mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[k0]!=null)w[k0]=G(s[k0]);if(s.QueryLoggingConfigs==="")w[P4]=[];else if(s[P4]!=null&&s[P4][ih]!=null)w[P4]=xs0(G0(s[P4][ih]),h);return w},dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[f6]!=null)w[f6]=G(s[f6]);if(s[h6]!=null)w[h6]=G(s[h6]);if(s[w6]!=null)w[w6]=G(s[w6]);if(s.ResourceRecordSets==="")w[N4]=[];else if(s[N4]!=null&&s[N4][T$]!=null)w[N4]=ps0(G0(s[N4][T$]),h);return w},iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.DelegationSets==="")w[Y4]=[];else if(s[Y4]!=null&&s[Y4][Q1]!=null)w[Y4]=Zs0(G0(s[Y4][Q1]),h);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[x1]!=null)w[x1]=G(s[x1]);if(s[u]!=null)w[u]=M0(s[u]);if(s[Eh]!=null)w[Eh]=G(s[Eh]);return w},cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[d4]!=null)w[d4]=Ck(s[d4],h);return w},gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.ResourceTagSets==="")w[D4]=[];else if(s[D4]!=null&&s[D4][d4]!=null)w[D4]=os0(G0(s[D4][d4]),h);return w},xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[LU]!=null)w[LU]=G(s[LU]);if(s.TrafficPolicySummaries==="")w[q4]=[];else if(s[q4]!=null&&s[q4][QN]!=null)w[q4]=s$0(G0(s[q4][QN]),h);return w},_q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=G(s[mh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=N6(G0(s[W1][A1]),h);return w},nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=N6(G0(s[W1][A1]),h);return w},eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=G(s[mh]);if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s[_1]!=null)w[_1]=G(s[_1]);if(s[n1]!=null)w[n1]=G(s[n1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=N6(G0(s[W1][A1]),h);return w},aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=e0(s[C0]);if(s[u]!=null)w[u]=M0(s[u]);if(s.TrafficPolicies==="")w[k4]=[];else if(s[k4]!=null&&s[k4][K1]!=null)w[k4]=w$0(G0(s[k4][K1]),h);if(s[BU]!=null)w[BU]=G(s[BU]);return w},pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[h0]!=null)w[h0]=G(s[h0]);if(s[k0]!=null)w[k0]=G(s[k0]);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][P0]!=null)w[Df]=Ik(G0(s[Df][P0]),h);return w},oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[$6]!=null)w[$6]=G(s[$6]);if(s[I6]!=null)w[I6]=G(s[I6]);if(s.RecordData==="")w[H4]=[];else if(s[H4]!=null&&s[H4][YN]!=null)w[H4]=_s0(G0(s[H4][YN]),h);if(s[FU]!=null)w[FU]=G(s[FU]);if(s[CU]!=null)w[CU]=G(s[CU]);if(s[L6]!=null)w[L6]=G(s[L6]);return w},uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=AU(s[Af],h);return w},tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[V1]!=null)w[V1]=RU(s[V1],h);return w},fk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},hk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=Y({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=XU(s[A1],h);return w},i=async(f,h)=>{let w={...f,body:await _.parseXmlErrorBody(f.body,h)},s=_.loadRestXmlErrorCode(f,w.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await kh0(w,h);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await hw0(w,h);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await $w0(w,h);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await sw0(w,h);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Ew0(w,h);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await Qw0(w,h);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await yh0(w,h);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Tw0(w,h);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Gw0(w,h);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Mw0(w,h);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await Vw0(w,h);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await Pw0(w,h);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await Hw0(w,h);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await Hh0(w,h);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await qh0(w,h);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await zw0(w,h);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await th0(w,h);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Yw0(w,h);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await Dw0(w,h);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await Nh0(w,h);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await ih0(w,h);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await qw0(w,h);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await bh0(w,h);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await mh0(w,h);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await xh0(w,h);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await fw0(w,h);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Xw0(w,h);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await kw0(w,h);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await uh0(w,h);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await ww0(w,h);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Fw0(w,h);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await yw0(w,h);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await oh0(w,h);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Rw0(w,h);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await Nw0(w,h);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await Oh0(w,h);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await lh0(w,h);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await nh0(w,h);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Uw0(w,h);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await jw0(w,h);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await bw0(w,h);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await Zw0(w,h);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await Ow0(w,h);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await mw0(w,h);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await lw0(w,h);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await vw0(w,h);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Cw0(w,h);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Iw0(w,h);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await Dh0(w,h);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await ch0(w,h);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await _h0(w,h);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Kw0(w,h);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await vh0(w,h);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await dw0(w,h);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await Jw0(w,h);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await iw0(w,h);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await dh0(w,h);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Bw0(w,h);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await cw0(w,h);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await ah0(w,h);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Lw0(w,h);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Ww0(w,h);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Sw0(w,h);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await ph0(w,h);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await eh0(w,h);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Aw0(w,h);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await rw0(w,h);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await gh0(w,h);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await jh0(w,h);default:let $=w.body;return Ph0({output:f,parsedBody:$.Error,errorCode:s})}},Ph0=Ts(m),Hh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new oE({$metadata:Z(f),...w});return l($,f.body.Error)},Nh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new s2({$metadata:Z(f),...w});return l($,f.body.Error)},Dh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new q2({$metadata:Z(f),...w});return l($,f.body.Error)},qh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new uE({$metadata:Z(f),...w});return l($,f.body.Error)},kh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new vE({$metadata:Z(f),...w});return l($,f.body.Error)},yh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new gE({$metadata:Z(f),...w});return l($,f.body.Error)},jh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new u2({$metadata:Z(f),...w});return l($,f.body.Error)},Oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new X2({$metadata:Z(f),...w});return l($,f.body.Error)},lh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new S2({$metadata:Z(f),...w});return l($,f.body.Error)},vh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new O2({$metadata:Z(f),...w});return l($,f.body.Error)},bh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new E2({$metadata:Z(f),...w});return l($,f.body.Error)},mh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new U2({$metadata:Z(f),...w});return l($,f.body.Error)},dh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new m2({$metadata:Z(f),...w});return l($,f.body.Error)},ih0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new $2({$metadata:Z(f),...w});return l($,f.body.Error)},ch0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new k2({$metadata:Z(f),...w});return l($,f.body.Error)},gh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new o2({$metadata:Z(f),...w});return l($,f.body.Error)},xh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new T2({$metadata:Z(f),...w});return l($,f.body.Error)},_h0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new y2({$metadata:Z(f),...w});return l($,f.body.Error)},nh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Y2({$metadata:Z(f),...w});return l($,f.body.Error)},eh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new e2({$metadata:Z(f),...w});return l($,f.body.Error)},ah0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new c2({$metadata:Z(f),...w});return l($,f.body.Error)},ph0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new n2({$metadata:Z(f),...w});return l($,f.body.Error)},oh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new z2({$metadata:Z(f),...w});return l($,f.body.Error)},uh0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new L2({$metadata:Z(f),...w});return l($,f.body.Error)},th0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);if(s.messages==="")w[j4]=[];else if(s[j4]!=null&&s[j4][v0]!=null)w[j4]=Hs0(G0(s[j4][v0]),h);let $=new f2({$metadata:Z(f),...w});return l($,f.body.Error)},fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new F2({$metadata:Z(f),...w});return l($,f.body.Error)},hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new bE({$metadata:Z(f),...w});return l($,f.body.Error)},ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new B2({$metadata:Z(f),...w});return l($,f.body.Error)},sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new mE({$metadata:Z(f),...w});return l($,f.body.Error)},$w0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new dE({$metadata:Z(f),...w});return l($,f.body.Error)},rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new p2({$metadata:Z(f),...w});return l($,f.body.Error)},Ew0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new iE({$metadata:Z(f),...w});return l($,f.body.Error)},Uw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new M2({$metadata:Z(f),...w});return l($,f.body.Error)},Tw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new xE({$metadata:Z(f),...w});return l($,f.body.Error)},Fw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new G2({$metadata:Z(f),...w});return l($,f.body.Error)},Cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new N2({$metadata:Z(f),...w});return l($,f.body.Error)},Iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new D2({$metadata:Z(f),...w});return l($,f.body.Error)},Lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new g2({$metadata:Z(f),...w});return l($,f.body.Error)},Bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new d2({$metadata:Z(f),...w});return l($,f.body.Error)},Gw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new _E({$metadata:Z(f),...w});return l($,f.body.Error)},Ww0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new x2({$metadata:Z(f),...w});return l($,f.body.Error)},zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new tE({$metadata:Z(f),...w});return l($,f.body.Error)},Aw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[v0]!=null)w[v0]=G(s[v0]);let $=new a2({$metadata:Z(f),...w});return l($,f.body.Error)},Rw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new A2({$metadata:Z(f),...w});return l($,f.body.Error)},Xw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new C2({$metadata:Z(f),...w});return l($,f.body.Error)},Sw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new _2({$metadata:Z(f),...w});return l($,f.body.Error)},Yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new h2({$metadata:Z(f),...w});return l($,f.body.Error)},Mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new nE({$metadata:Z(f),...w});return l($,f.body.Error)},Qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new cE({$metadata:Z(f),...w});return l($,f.body.Error)},Kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new j2({$metadata:Z(f),...w});return l($,f.body.Error)},Zw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Z2({$metadata:Z(f),...w});return l($,f.body.Error)},Jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new v2({$metadata:Z(f),...w});return l($,f.body.Error)},Vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new eE({$metadata:Z(f),...w});return l($,f.body.Error)},Pw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new aE({$metadata:Z(f),...w});return l($,f.body.Error)},Hw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new pE({$metadata:Z(f),...w});return l($,f.body.Error)},Nw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new R2({$metadata:Z(f),...w});return l($,f.body.Error)},Dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new w2({$metadata:Z(f),...w});return l($,f.body.Error)},qw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new r2({$metadata:Z(f),...w});return l($,f.body.Error)},kw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new I2({$metadata:Z(f),...w});return l($,f.body.Error)},yw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new W2({$metadata:Z(f),...w});return l($,f.body.Error)},jw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new Q2({$metadata:Z(f),...w});return l($,f.body.Error)},Ow0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new J2({$metadata:Z(f),...w});return l($,f.body.Error)},lw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new P2({$metadata:Z(f),...w});return l($,f.body.Error)},vw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new H2({$metadata:Z(f),...w});return l($,f.body.Error)},bw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new K2({$metadata:Z(f),...w});return l($,f.body.Error)},mw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new V2({$metadata:Z(f),...w});return l($,f.body.Error)},dw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new l2({$metadata:Z(f),...w});return l($,f.body.Error)},iw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new b2({$metadata:Z(f),...w});return l($,f.body.Error)},cw0=async(f,h)=>{let w=Y({}),s=f.body.Error;if(s[S]!=null)w[S]=G(s[S]);let $=new i2({$metadata:Z(f),...w});return l($,f.body.Error)},wk=(f,h)=>{let w=new P(qf);if(f[u0]!=null)w.c(P.of(D$0,f[u0]).n(u0));if(f[o]!=null)w.c(P.of(E$0,f[o]).n(o));return w},gw0=(f,h)=>{let w=new P(Rw);if(f[h0]!=null)w.c(P.of(jf,f[h0]).n(h0));if(w.cc(f,zf),f[s$]!=null)w.c(P.of(r$0,String(f[s$])).n(s$));return w},xw0=(f,h)=>{let w=new P(Bk);if(f[f$]!=null)w.c(P.of(C$0,f[f$]).n(f$));if(f[T$]!=null)w.c(Es0(f[T$],h).n(T$));return w},_w0=(f,h)=>{let w=new P(hU);if(f[F0]!=null)w.c(P.of(k6,f[F0]).n(F0));return w.lc(f,"Changes","Changes",()=>nw0(f[Lk],h)),w},nw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return xw0(w,h).n(Bk)})},sk=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(v4,w).n(P6)})},ew0=(f,h)=>{let w=new P(I$0);if(f[T1]!=null)w.c(P.of(X$0,f[T1]).n(T1));if(f[f$]!=null)w.c(P.of(L$0,f[f$]).n(f$));return w.lc(f,"CidrList","CidrList",()=>pw0(f[S$0],h)),w},aw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return ew0(w,h).n(Rf)})},pw0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(AN,w).n(AN)})},ow0=(f,h)=>{let w=new P(Xw);if(f[w$]!=null)w.c(P.of(X40,f[w$]).n(w$));if(f[T1]!=null)w.c(P.of(R$0,f[T1]).n(T1));return w},uw0=(f,h)=>{let w=new P(Sw);return w.cc(f,EU),w.cc(f,UU),w},tw0=(f,h)=>{let w=new P(Yw);if(f[kf]!=null)w.c(P.of(l$0,f[kf]).n(kf));if(f[yf]!=null)w.c(P.of(v$0,f[yf]).n(yf));if(f[Of]!=null)w.c(P.of(b$0,f[Of]).n(Of));return w},fs0=(f,h)=>{let w=new P(Mw);if(w.cc(f,fU),w.cc(f,rU),f[Sw]!=null)w.c(uw0(f[Sw],h).n(Sw));if(f[Gw]!=null)w.c(P.of(Gw,String(f[Gw])).n(Gw));return w},hs0=(f,h)=>{let w=new P(Qw);if(w.cc(f,dh),f[Wf]!=null)w.c(P.of(Wf,String(f[Wf])).n(Wf));if(f[Z0]!=null)w.c(P.of(i$0,f[Z0]).n(Z0));if(w.cc(f,m4),w.cc(f,O4),w.cc(f,i4),f[Aw]!=null)w.c(P.of(Aw,String(f[Aw])).n(Aw));if(f[Lf]!=null)w.c(P.of(Lf,String(f[Lf])).n(Lf));if(f[zw]!=null)w.c(P.of(zw,String(f[zw])).n(zw));if(f[Gf]!=null)w.c(P.of(Gf,String(f[Gf])).n(Gf));if(f[Cf]!=null)w.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[Bf]!=null)w.c(P.of(Bf,String(f[Bf])).n(Bf));if(w.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>sk(f[Lw],h)),f[If]!=null)w.c(P.of(If,String(f[If])).n(If));if(w.lc(f,"Regions","Regions",()=>$k(f[Bw],h)),f[qf]!=null)w.c(wk(f[qf],h).n(qf));return w.cc(f,b4),w.cc(f,TU),w},$k=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(d$0,w).n(u0)})},ws0=(f,h)=>{let w=new P($U);if(f[F0]!=null)w.c(P.of(k6,f[F0]).n(F0));if(f[U$]!=null)w.c(P.of(g$0,String(f[U$])).n(U$));return w},ss0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(MN,w).n(MN)})},$s0=(f,h)=>{let w=new P(WU);if(f[y0]!=null)w.c(P.of(_$0,f[y0]).n(y0));return w},rs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return $s0(w,h).n(WU)})},Es0=(f,h)=>{let w=new P(T$);if(f[o]!=null)w.c(P.of(zf,f[o]).n(o));if(f[Z0]!=null)w.c(P.of(h40,f[Z0]).n(Z0));if(f[F$]!=null)w.c(P.of(o$0,f[F$]).n(F$));if(f[L$]!=null)w.c(P.of(f40,String(f[L$])).n(L$));if(f[u0]!=null)w.c(P.of(t$0,f[u0]).n(u0));if(f[Yw]!=null)w.c(tw0(f[Yw],h).n(Yw));if(f[$$]!=null)w.c(P.of(p$0,f[$$]).n($$));if(f[E$]!=null)w.c(P.of(u$0,String(f[E$])).n(E$));if(f[o0]!=null)w.c(P.of(o0,String(f[o0])).n(o0));if(w.lc(f,"ResourceRecords","ResourceRecords",()=>rs0(f[ts],h)),f[Rw]!=null)w.c(gw0(f[Rw],h).n(Rw));if(w.cc(f,v4),w.cc(f,IU),f[Xw]!=null)w.c(ow0(f[Xw],h).n(Xw));if(f[Mw]!=null)w.c(fs0(f[Mw],h).n(Mw));return w},Us0=(f,h)=>{let w=new P(zU);if(f[Kw]!=null)w.c(P.of(Gk,f[Kw]).n(Kw));if(f[y0]!=null)w.c(P.of(G40,f[y0]).n(y0));return w},Ts0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Gk,w).n(Kw)})},Fs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return Us0(w,h).n(zU)})},Cs0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(B40,w).n(jf)})},x4=(f,h)=>{let w=new P(P0);return w.cc(f,g4),w.cc(f,c4),w},Is0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},Ls0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=G(f[u0]);if(f[o]!=null)w[o]=G(f[o]);return w},Bs0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=G(f[h0]);if(f[zf]!=null)w[zf]=G(f[zf]);if(f[s$]!=null)w[s$]=e0(f[s$]);return w},e1=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[z1]!=null)w[z1]=G(f[z1]);if(f[W6]!=null)w[W6]=j(c$(f[W6]));if(f[F0]!=null)w[F0]=G(f[F0]);return w},Gs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Ws0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},zs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return As0(w,h)})},As0=(f,h)=>{let w={};if(f[KC]!=null)w[KC]=G(f[KC]);if(f[T1]!=null)w[T1]=G(f[T1]);return w},Rs0=(f,h)=>{let w={};if(f[h$]!=null)w[h$]=G(f[h$]);if(f[I0]!=null)w[I0]=G(f[I0]);if(f[o]!=null)w[o]=G(f[o]);if(f[Uh]!=null)w[Uh]=E1(f[Uh]);return w},Xs0=(f,h)=>{let w={};if(f[w$]!=null)w[w$]=G(f[w$]);if(f[T1]!=null)w[T1]=G(f[T1]);return w},Ss0=(f,h)=>{let w={};if(f[bC]!=null)w[bC]=M0(f[bC]);if(f[V6]!=null)w[V6]=vS(f[V6]);if(f[PC]!=null)w[PC]=G(f[PC]);if(f[C6]!=null)w[C6]=M0(f[C6]);if(f[aC]!=null)w[aC]=G(f[aC]);if(f[r6]!=null)w[r6]=G(f[r6]);if(f[M6]!=null)w[M6]=G(f[M6]);if(f.Dimensions==="")w[M4]=[];else if(f[M4]!=null&&f[M4][RN]!=null)w[M4]=Vs0(G0(f[M4][RN]),h);return w},Ys0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ms0(w,h)})},Ms0=(f,h)=>{let w={};if(f[h$]!=null)w[h$]=G(f[h$]);if(f[I0]!=null)w[I0]=G(f[I0]);if(f[o]!=null)w[o]=G(f[o]);if(f[Uh]!=null)w[Uh]=E1(f[Uh]);return w},Qs0=(f,h)=>{let w={};if(f[EU]!=null)w[EU]=G(f[EU]);if(f[UU]!=null)w[UU]=G(f[UU]);return w},_4=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f.NameServers==="")w[V4]=[];else if(f[V4]!=null&&f[V4][SN]!=null)w[V4]=Ks0(G0(f[V4][SN]),h);return w},Ks0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Zs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return _4(w,h)})},Js0=(f,h)=>{let w={};if(f[o]!=null)w[o]=G(f[o]);if(f[y0]!=null)w[y0]=G(f[y0]);return w},Vs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Js0(w,h)})},Ps0=(f,h)=>{let w={};if(f[Y6]!=null)w[Y6]=G(f[Y6]);if(f[C$]!=null)w[C$]=G(f[C$]);return w},Hs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Ns0=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=G(f[kf]);if(f[yf]!=null)w[yf]=G(f[yf]);if(f[Of]!=null)w[Of]=G(f[Of]);return w},rk=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=G(f[kf]);if(f[JC]!=null)w[JC]=G(f[JC]);if(f[yf]!=null)w[yf]=G(f[yf]);if(f[VC]!=null)w[VC]=G(f[VC]);if(f[Of]!=null)w[Of]=G(f[Of]);if(f[R6]!=null)w[R6]=G(f[R6]);return w},Ds0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return rk(w,h)})},qs0=(f,h)=>{let w={};if(f[fU]!=null)w[fU]=G(f[fU]);if(f[rU]!=null)w[rU]=G(f[rU]);if(f[Sw]!=null)w[Sw]=Qs0(f[Sw],h);if(f[Gw]!=null)w[Gw]=M0(f[Gw]);return w},AU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f[r$]!=null)w[r$]=Fk(f[r$],h);if(f[Qw]!=null)w[Qw]=ks0(f[Qw],h);if(f[Ww]!=null)w[Ww]=E1(f[Ww]);if(f[NC]!=null)w[NC]=Ss0(f[NC],h);return w},ks0=(f,h)=>{let w={};if(f[dh]!=null)w[dh]=G(f[dh]);if(f[Wf]!=null)w[Wf]=M0(f[Wf]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[m4]!=null)w[m4]=G(f[m4]);if(f[O4]!=null)w[O4]=G(f[O4]);if(f[i4]!=null)w[i4]=G(f[i4]);if(f[Aw]!=null)w[Aw]=M0(f[Aw]);if(f[Lf]!=null)w[Lf]=M0(f[Lf]);if(f[zw]!=null)w[zw]=e0(f[zw]);if(f[Gf]!=null)w[Gf]=e0(f[Gf]);if(f[Cf]!=null)w[Cf]=e0(f[Cf]);if(f[Bf]!=null)w[Bf]=M0(f[Bf]);if(f.ChildHealthChecks==="")w[Lw]=[];else if(f[Lw]!=null&&f[Lw][P6]!=null)w[Lw]=Ws0(G0(f[Lw][P6]),h);if(f[If]!=null)w[If]=e0(f[If]);if(f.Regions==="")w[Bw]=[];else if(f[Bw]!=null&&f[Bw][u0]!=null)w[Bw]=js0(G0(f[Bw][u0]),h);if(f[qf]!=null)w[qf]=Ls0(f[qf],h);if(f[b4]!=null)w[b4]=G(f[b4]);if(f[TU]!=null)w[TU]=G(f[TU]);return w},ys0=(f,h)=>{let w={};if(f[u0]!=null)w[u0]=G(f[u0]);if(f[dh]!=null)w[dh]=G(f[dh]);if(f[S6]!=null)w[S6]=ts0(f[S6],h);return w},Ek=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ys0(w,h)})},js0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},Os0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return AU(w,h)})},RU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[o]!=null)w[o]=G(f[o]);if(f[q0]!=null)w[q0]=G(f[q0]);if(f[qC]!=null)w[qC]=ls0(f[qC],h);if(f[B6]!=null)w[B6]=E1(f[B6]);if(f[r$]!=null)w[r$]=Fk(f[r$],h);return w},ls0=(f,h)=>{let w={};if(f[F0]!=null)w[F0]=G(f[F0]);if(f[U$]!=null)w[U$]=e0(f[U$]);return w},vs0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},bs0=(f,h)=>{let w={};if(f[U6]!=null)w[U6]=G(f[U6]);if(f[T6]!=null)w[T6]=G(f[T6]);return w},Uk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return RU(w,h)})},ms0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ds0(w,h)})},ds0=(f,h)=>{let w={};if(f[h0]!=null)w[h0]=G(f[h0]);if(f[o]!=null)w[o]=G(f[o]);if(f[E6]!=null)w[E6]=bs0(f[E6],h);return w},Tk=(f,h)=>{let w={};if(f[o]!=null)w[o]=G(f[o]);if(f[cC]!=null)w[cC]=G(f[cC]);if(f[mC]!=null)w[mC]=M0(f[mC]);if(f[z6]!=null)w[z6]=G(f[z6]);if(f[A6]!=null)w[A6]=M0(f[A6]);if(f[kC]!=null)w[kC]=G(f[kC]);if(f[yC]!=null)w[yC]=M0(f[yC]);if(f[_C]!=null)w[_C]=M0(f[_C]);if(f[lC]!=null)w[lC]=G(f[lC]);if(f[F6]!=null)w[F6]=G(f[F6]);if(f[OC]!=null)w[OC]=G(f[OC]);if(f[jC]!=null)w[jC]=G(f[jC]);if(f[z1]!=null)w[z1]=G(f[z1]);if(f[C$]!=null)w[C$]=G(f[C$]);if(f[ZC]!=null)w[ZC]=j(c$(f[ZC]));if(f[nC]!=null)w[nC]=j(c$(f[nC]));return w},is0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Tk(w,h)})},Fk=(f,h)=>{let w={};if(f[X6]!=null)w[X6]=G(f[X6]);if(f[vC]!=null)w[vC]=G(f[vC]);return w},cs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return gs0(w,h)})},gs0=(f,h)=>{let w={};if(f[T1]!=null)w[T1]=G(f[T1]);return w},H6=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[h0]!=null)w[h0]=G(f[h0]);if(f[wU]!=null)w[wU]=G(f[wU]);return w},xs0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return H6(w,h)})},_s0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return G(w)})},ns0=(f,h)=>{let w={};if(f[y0]!=null)w[y0]=G(f[y0]);return w},es0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ns0(w,h)})},as0=(f,h)=>{let w={};if(f[o]!=null)w[o]=G(f[o]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[F$]!=null)w[F$]=G(f[F$]);if(f[L$]!=null)w[L$]=E1(f[L$]);if(f[u0]!=null)w[u0]=G(f[u0]);if(f[Yw]!=null)w[Yw]=Ns0(f[Yw],h);if(f[$$]!=null)w[$$]=G(f[$$]);if(f[E$]!=null)w[E$]=e0(f[E$]);if(f[o0]!=null)w[o0]=E1(f[o0]);if(f.ResourceRecords==="")w[ts]=[];else if(f[ts]!=null&&f[ts][WU]!=null)w[ts]=es0(G0(f[ts][WU]),h);if(f[Rw]!=null)w[Rw]=Bs0(f[Rw],h);if(f[v4]!=null)w[v4]=G(f[v4]);if(f[IU]!=null)w[IU]=G(f[IU]);if(f[Xw]!=null)w[Xw]=Xs0(f[Xw],h);if(f[Mw]!=null)w[Mw]=qs0(f[Mw],h);return w},ps0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return as0(w,h)})},Ck=(f,h)=>{let w={};if(f[G6]!=null)w[G6]=G(f[G6]);if(f[jf]!=null)w[jf]=G(f[jf]);if(f.Tags==="")w[y4]=[];else if(f[y4]!=null&&f[y4][zU]!=null)w[y4]=h$0(G0(f[y4][zU]),h);return w},os0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ck(w,h)})},us0=(f,h)=>{let w={};if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[y0]!=null)w[y0]=E1(f[y0]);return w},ts0=(f,h)=>{let w={};if(f[z1]!=null)w[z1]=G(f[z1]);if(f[HC]!=null)w[HC]=j(c$(f[HC]));return w},f$0=(f,h)=>{let w={};if(f[Kw]!=null)w[Kw]=G(f[Kw]);if(f[y0]!=null)w[y0]=G(f[y0]);return w},h$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return f$0(w,h)})},w$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return n4(w,h)})},n4=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[Uh]!=null)w[Uh]=M0(f[Uh]);if(f[o]!=null)w[o]=G(f[o]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[$h]!=null)w[$h]=G(f[$h]);if(f[F0]!=null)w[F0]=G(f[F0]);return w},XU=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[h0]!=null)w[h0]=G(f[h0]);if(f[o]!=null)w[o]=G(f[o]);if(f[o0]!=null)w[o0]=E1(f[o0]);if(f[Q6]!=null)w[Q6]=G(f[Q6]);if(f[v0]!=null)w[v0]=G(f[v0]);if(f[I$]!=null)w[I$]=G(f[I$]);if(f[g1]!=null)w[g1]=M0(f[g1]);if(f[J6]!=null)w[J6]=G(f[J6]);return w},N6=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return XU(w,h)})},s$0=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return $$0(w,h)})},$$0=(f,h)=>{let w={};if(f[I0]!=null)w[I0]=G(f[I0]);if(f[o]!=null)w[o]=G(f[o]);if(f[Z0]!=null)w[Z0]=G(f[Z0]);if(f[eC]!=null)w[eC]=M0(f[eC]);if(f[K6]!=null)w[K6]=M0(f[K6]);return w},D6=(f,h)=>{let w={};if(f[g4]!=null)w[g4]=G(f[g4]);if(f[c4]!=null)w[c4]=G(f[c4]);return w},Ik=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return D6(w,h)})},Z=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var f$="Action",r$0="AliasHealthEnabled",qf="AlarmIdentifier",E$0="AlarmName",U$0="AddTags",Rw="AliasTarget",T$0="AssociateVPCComment",F$0="AssociateVPCWithHostedZoneRequest",fU="AWSRegion",h$="Arn",Gw="Bias",F0="Comment",C$0="ChangeAction",hU="ChangeBatch",A4="CidrBlocks",KC="CidrBlock",kf="ContinentCode",I$0="CidrCollectionChange",L$0="CidrCollectionChangeAction",B$0="ChangeCidrCollectionRequest",G$0="CreateCidrCollectionRequest",R4="CidrCollections",yf="CountryCode",ZC="CreatedDate",Lw="ChildHealthChecks",W$0="CreateHealthCheckRequest",P6="ChildHealthCheck",z$0="CreateHostedZoneRequest",$0="ChangeInfo",X4="CheckerIpRanges",w$="CollectionId",A$0="CreateKeySigningKeyRequest",S4="CidrLocations",R$0="CidrLocationNameDefaultAllowed",X$0="CidrLocationNameDefaultNotAllowed",S$0="CidrList",Y$0="CidrNonce",M$0="CollectionName",JC="ContinentName",VC="CountryName",PC="ComparisonOperator",Q$0="CreateQueryLoggingConfigRequest",q0="CallerReference",Xw="CidrRoutingConfig",K$0="CreateReusableDelegationSetRequest",Z$0="ChangeResourceRecordSetsRequest",HC="CheckedTime",J$0="ChangeTagsForResourceRequest",V$0="CreateTrafficPolicyInstanceRequest",P$0="CreateTrafficPolicyRequest",H$0="CreateTrafficPolicyVersionRequest",t2="CollectionVersion",N$0="CreateVPCAssociationAuthorizationRequest",NC="CloudWatchAlarmConfiguration",wU="CloudWatchLogsLogGroupArn",D$0="CloudWatchRegion",Lk="Changes",Bk="Change",AN="Cidr",DC="Collection",qC="Config",Sw="Coordinates",sh="Count",$h="Document",kC="DigestAlgorithmMnemonic",yC="DigestAlgorithmType",jC="DNSKEYRecord",zf="DNSName",Q1="DelegationSet",sU="DelegationSetId",OC="DSRecord",Y4="DelegationSets",lC="DigestValue",q$0="DeleteVPCAssociationAuthorizationRequest",k$0="DisassociateVPCComment",y$0="DisassociateVPCFromHostedZoneRequest",vC="Description",Cf="Disabled",M4="Dimensions",RN="Dimension",j$0="EDNS0ClientSubnetIP",O$0="EDNS0ClientSubnetMask",bC="EvaluationPeriods",If="EnableSNI",s$="EvaluateTargetHealth",$$="Failover",O4="FullyQualifiedDomainName",Lf="FailureThreshold",mC="Flag",Yw="GeoLocation",l$0="GeoLocationContinentCode",v$0="GeoLocationCountryCode",l4="GeoLocationDetails",Q4="GeoLocationDetailsList",b$0="GeoLocationSubdivisionCode",Mw="GeoProximityLocation",Af="HealthCheck",Qw="HealthCheckConfig",dC="HealthCheckCount",v4="HealthCheckId",m$0="HealthCheckNonce",Hf="HealthCheckObservations",GU="HealthCheckObservation",d$0="HealthCheckRegion",i$0="HealthCheckType",Ww="HealthCheckVersion",K4="HealthChecks",Bf="HealthThreshold",V1="HostedZone",$U="HostedZoneConfig",iC="HostedZoneCount",h0="HostedZoneId",mh="HostedZoneIdMarker",Z4="HostedZoneSummaries",XN="HostedZoneSummary",c$0="HostedZoneType",Nf="HostedZones",Gf="Inverted",b4="InsufficientDataHealthStatus",dh="IPAddress",g$0="IsPrivateZone",C0="IsTruncated",I0="Id",Kw="Key",cC="KmsArn",gC="KeyManagementServiceArn",xC="KeySigningKey",J4="KeySigningKeys",_C="KeyTag",Th="Location",nC="LastModifiedDate",T1="LocationName",r$="LinkedService",x$0="ListTagsForResourcesRequest",eC="LatestVersion",rU="LocalZoneGroup",EU="Latitude",rh="Limit",UU="Longitude",x1="Marker",u="MaxItems",zw="MeasureLatency",aC="MetricName",e4="MaxResults",E$="MultiValueAnswer",v0="Message",o="Name",pC="NextContinentCode",oC="NextCountryCode",uC="NextDNSName",tC="NextHostedZoneId",Eh="NextMarker",f6="NextRecordIdentifier",h6="NextRecordName",w6="NextRecordType",V4="NameServers",s6="NextSubdivisionCode",SN="NameServer",k0="NextToken",$6="Nameserver",r6="Namespace",q6="Nonce",E6="Owner",U6="OwningAccount",T6="OwningService",Wf="Port",F6="PublicKey",U$="PrivateZone",C6="Period",I6="Protocol",ih="QueryLoggingConfig",P4="QueryLoggingConfigs",Bw="Regions",L6="ResponseCode",TU="RoutingControlArn",k6="ResourceDescription",YN="RecordDataEntry",_$0="RData",H4="RecordData",n$0="ResetElements",MN="ResettableElementName",jf="ResourceId",e$0="ResolverIP",a$0="ResourceIds",Aw="RequestInterval",FU="RecordName",m4="ResourcePath",WU="ResourceRecord",N4="ResourceRecordSets",B6="ResourceRecordSetCount",p$0="ResourceRecordSetFailover",o$0="ResourceRecordSetIdentifier",u$0="ResourceRecordSetMultiValueAnswer",t$0="ResourceRecordSetRegion",f40="ResourceRecordSetWeight",T$="ResourceRecordSet",h40="RRType",ts="ResourceRecords",CU="RecordType",w40="RemoveTagKeys",d4="ResourceTagSet",D4="ResourceTagSets",G6="ResourceType",u0="Region",z1="Status",W6="SubmittedAt",z6="SigningAlgorithmMnemonic",A6="SigningAlgorithmType",Of="SubdivisionCode",s40="StartContinentCode",$40="StartCountryCode",F$="SetIdentifier",r40="SigningKeyName",E40="SigningKeyString",U40="SigningKeyStatus",C$="StatusMessage",R6="SubdivisionName",X6="ServicePrincipal",S6="StatusReport",T40="StartRecordIdentifier",F40="StartRecordName",C40="StartRecordType",i4="SearchString",I40="StartSubdivisionCode",Y6="ServeSignature",M6="Statistic",Q6="State",Z0="Type",Gk="TagKey",K1="TrafficPolicy",y6="TrafficPolicyComment",K6="TrafficPolicyCount",Wk="TrafficPolicyDocument",I$="TrafficPolicyId",Z6="TrafficPolicyInstanceCount",IU="TrafficPolicyInstanceId",LU="TrafficPolicyIdMarker",_1="TrafficPolicyInstanceNameMarker",n1="TrafficPolicyInstanceTypeMarker",A1="TrafficPolicyInstance",W1="TrafficPolicyInstances",L40="TrafficPolicyName",q4="TrafficPolicySummaries",QN="TrafficPolicySummary",J6="TrafficPolicyType",g1="TrafficPolicyVersion",BU="TrafficPolicyVersionMarker",k4="TrafficPolicies",B40="TagResourceId",o0="TTL",G40="TagValue",zU="Tag",y4="Tags",V6="Threshold",W40="UpdateHealthCheckRequest",z40="UpdateHostedZoneCommentRequest",A40="UpdateTrafficPolicyCommentRequest",R40="UpdateTrafficPolicyInstanceRequest",X40="UUID",y0="Value",P0="VPC",c4="VPCId",g4="VPCRegion",Df="VPCs",Uh="Version",L$="Weight",S40="continentcode",Y40="countrycode",M40="delegationsetid",Q40="dnsname",K40="edns0clientsubnetip",Z40="edns0clientsubnetmask",J40="hostedzonetype",a4="hostedzoneid",V40="identifier",zk="id",lf="location",p4="maxresults",a1="maxitems",j6="marker",Rf="member",S="message",j4="messages",B$="nexttoken",P40="name",H40="recordname",N40="recordtype",D40="resolverip",q40="subdivisioncode",k40="startcontinentcode",y40="startcountrycode",j40="startsubdivisioncode",O40="type",l40="trafficpolicyid",O6="trafficpolicyinstancename",l6="trafficpolicyinstancetype",v40="trafficpolicyversion",b40="vpcid",c0='<?xml version="1.0" encoding="UTF-8"?>',m40="version",d40="vpcregion";class v6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(KN).de(mD).build(){}D();k();J();class b6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(ZN).de(dD).build(){}D();k();J();class m6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(JN).de(iD).build(){}D();k();J();class d6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),GN(w),O(w)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(VN).de(cD).build(){}D();k();J();class i6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(PN).de(gD).build(){}D();k();J();class c6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(HN).de(xD).build(){}D();k();J();class g6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(NN).de(_D).build(){}D();k();J();class x6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(DN).de(nD).build(){}D();k();J();class _6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(qN).de(eD).build(){}D();k();J();class n6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(kN).de(aD).build(){}D();k();J();class e6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(yN).de(pD).build(){}D();k();J();class a6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(jN).de(oD).build(){}D();k();J();class p6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(ON).de(uD).build(){}D();k();J();class o6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(lN).de(tD).build(){}D();k();J();class u6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(vN).de(fq).build(){}D();k();J();class t6 extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(bN).de(hq).build(){}D();k();J();class fI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(mN).de(wq).build(){}D();k();J();class hI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(dN).de(sq).build(){}D();k();J();class wI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(iN).de($q).build(){}D();k();J();class sI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(cN).de(rq).build(){}D();k();J();class $I extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(gN).de(Eq).build(){}D();k();J();class rI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(xN).de(Uq).build(){}D();k();J();class EI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(_N).de(Tq).build(){}D();k();J();class UI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(nN).de(Fq).build(){}D();k();J();class TI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(eN).de(Cq).build(){}D();k();J();class FI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(aN).de(Iq).build(){}D();k();J();class CI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(pN).de(Lq).build(){}D();k();J();class II extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(oN).de(Bq).build(){}D();k();J();class LI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(uN).de(Gq).build(){}D();k();J();class BI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(tN).de(Wq).build(){}D();k();J();class GI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(fD).de(zq).build(){}D();k();J();class WI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(hD).de(Aq).build(){}D();k();J();class zI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}D();k();J();class AI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(sD).de(Xq).build(){}D();k();J();class RI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser($D).de(Sq).build(){}D();k();J();class XI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(rD).de(Yq).build(){}D();k();J();class SI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(ED).de(Mq).build(){}D();k();J();class YI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}D();k();J();class MI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(TD).de(Kq).build(){}D();k();J();class QI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(FD).de(Zq).build(){}D();k();J();class KI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(CD).de(Jq).build(){}D();k();J();class ZI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(ID).de(Vq).build(){}D();k();J();class JI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(LD).de(Pq).build(){}D();k();J();class VI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(BD).de(Hq).build(){}D();k();J();class PI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(GD).de(Nq).build(){}D();k();J();class HI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(WD).de(Dq).build(){}D();k();J();class NI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(zD).de(qq).build(){}D();k();J();class DI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(AD).de(kq).build(){}D();k();J();class qI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(RD).de(yq).build(){}D();k();J();class kI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(XD).de(jq).build(){}D();k();J();class yI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}D();k();J();class jI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(MD).de(vq).build(){}D();k();J();class OI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(QD).de(bq).build(){}D();k();J();class lI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(YD).de(lq).build(){}D();k();J();class vI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(KD).de(mq).build(){}D();k();J();class bI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}D();k();J();class mI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(JD).de(iq).build(){}D();k();J();class dI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(VD).de(cq).build(){}D();k();J();class iI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(PD).de(gq).build(){}D();k();J();class cI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(HD).de(xq).build(){}D();k();J();class gI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(DD).de(nq).build(){}D();k();J();class xI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(qD).de(eq).build(){}D();k();J();class _I extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(ND).de(_q).build(){}D();k();J();class nI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(kD).de(aq).build(){}D();k();J();class eI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(yD).de(pq).build(){}D();k();J();class aI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(jD).de(oq).build(){}D();k();J();class pI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(OD).de(uq).build(){}D();k();J();class oI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(lD).de(tq).build(){}D();k();J();class uI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(vD).de(fk).build(){}D();k();J();class tI extends z.classBuilder().ep(K).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(bD).de(hk).build(){}var i40={ActivateKeySigningKeyCommand:v6,AssociateVPCWithHostedZoneCommand:b6,ChangeCidrCollectionCommand:m6,ChangeResourceRecordSetsCommand:d6,ChangeTagsForResourceCommand:i6,CreateCidrCollectionCommand:c6,CreateHealthCheckCommand:g6,CreateHostedZoneCommand:x6,CreateKeySigningKeyCommand:_6,CreateQueryLoggingConfigCommand:n6,CreateReusableDelegationSetCommand:e6,CreateTrafficPolicyCommand:a6,CreateTrafficPolicyInstanceCommand:p6,CreateTrafficPolicyVersionCommand:o6,CreateVPCAssociationAuthorizationCommand:u6,DeactivateKeySigningKeyCommand:t6,DeleteCidrCollectionCommand:fI,DeleteHealthCheckCommand:hI,DeleteHostedZoneCommand:wI,DeleteKeySigningKeyCommand:sI,DeleteQueryLoggingConfigCommand:$I,DeleteReusableDelegationSetCommand:rI,DeleteTrafficPolicyCommand:EI,DeleteTrafficPolicyInstanceCommand:UI,DeleteVPCAssociationAuthorizationCommand:TI,DisableHostedZoneDNSSECCommand:FI,DisassociateVPCFromHostedZoneCommand:CI,EnableHostedZoneDNSSECCommand:II,GetAccountLimitCommand:LI,GetChangeCommand:BI,GetCheckerIpRangesCommand:GI,GetDNSSECCommand:WI,GetGeoLocationCommand:zI,GetHealthCheckCommand:AI,GetHealthCheckCountCommand:RI,GetHealthCheckLastFailureReasonCommand:XI,GetHealthCheckStatusCommand:SI,GetHostedZoneCommand:YI,GetHostedZoneCountCommand:MI,GetHostedZoneLimitCommand:QI,GetQueryLoggingConfigCommand:KI,GetReusableDelegationSetCommand:ZI,GetReusableDelegationSetLimitCommand:JI,GetTrafficPolicyCommand:VI,GetTrafficPolicyInstanceCommand:PI,GetTrafficPolicyInstanceCountCommand:HI,ListCidrBlocksCommand:NI,ListCidrCollectionsCommand:DI,ListCidrLocationsCommand:qI,ListGeoLocationsCommand:kI,ListHealthChecksCommand:yI,ListHostedZonesCommand:lI,ListHostedZonesByNameCommand:jI,ListHostedZonesByVPCCommand:OI,ListQueryLoggingConfigsCommand:vI,ListResourceRecordSetsCommand:bI,ListReusableDelegationSetsCommand:mI,ListTagsForResourceCommand:dI,ListTagsForResourcesCommand:iI,ListTrafficPoliciesCommand:cI,ListTrafficPolicyInstancesCommand:_I,ListTrafficPolicyInstancesByHostedZoneCommand:gI,ListTrafficPolicyInstancesByPolicyCommand:xI,ListTrafficPolicyVersionsCommand:nI,ListVPCAssociationAuthorizationsCommand:eI,TestDNSAnswerCommand:aI,UpdateHealthCheckCommand:pI,UpdateHostedZoneCommentCommand:oI,UpdateTrafficPolicyCommentCommand:uI,UpdateTrafficPolicyInstanceCommand:tI};class ch extends MC{}Es(i40,ch);w5();s5();$5();y$();Mh();var G$=p(m0(),1);fr();D();Ew();J();var Ak=p(O0(),1);gf();var Rk=async(f,h,w)=>{return{operation:Sh(h).operation,region:await B1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function c40(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var Xk=(f)=>{let h=[];switch(f.operation){default:h.push(c40(f))}return h},Sk=(f)=>{let h=Ak.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var Yk=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53domains"})},c={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Mk={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.775.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/credential-provider-node":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var lk=p(O0(),1);GE();Mh();AE();Ew();Zh();p$();RE();sf();var jk=p(O0(),1);J();ow();var SU=p(t1(),1);U4();K$();cf();var Qk={["required"]:!1,type:"String"},Kk={["required"]:!0,default:!1,type:"Boolean"},Zk={["ref"]:"Endpoint"},Dk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},qk={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vf={},Jk={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Vk={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},Pk=[Dk],Hk=[qk],Nk=[{["ref"]:"Region"}],x40={version:"1.0",parameters:{Region:Qk,UseDualStack:Kk,UseFIPS:Kk,Endpoint:Qk},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Zk]}],rules:[{conditions:Pk,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Hk,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Zk,properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Nk}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Nk,assign:"PartitionResult"}],rules:[{conditions:[Dk,qk],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Jk]},Vk],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Pk,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Jk,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Hk,rules:[{conditions:[Vk],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},kk=x40;var _40=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),yk=(f,h={})=>{return _40.get(f,()=>nh(kk,{endpointParams:f,logger:h.logger}))};ff.aws=eh;var Ok=(f)=>{return{apiVersion:"2014-05-15",base64Decoder:f?.base64Decoder??SU.fromBase64,base64Encoder:f?.base64Encoder??SU.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??yk,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Xk,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new jk.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53 Domains",urlParser:f?.urlParser??O1,utf8Decoder:f?.utf8Decoder??jh,utf8Encoder:f?.utf8Encoder??js}};J();SE();J();var vk=(f)=>{Cs(process.version);let h=ls(f),w=()=>h().then(Fs),s=Ok(f);lk.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??Os,credentialDefaultProvider:f?.credentialDefaultProvider??yE,defaultUserAgentProvider:f?.defaultUserAgentProvider??ks({serviceId:s.serviceId,clientVersion:Mk.version}),maxAttempts:f?.maxAttempts??A0(ws,f),region:f?.region??A0(Yh,{..._w,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...$s,default:async()=>(await w()).retryMode||Jh},f),sha256:f?.sha256??Fw.bind(null,"sha256"),streamCollector:f?.streamCollector??zs,useDualstackEndpoint:f?.useDualstackEndpoint??A0(gw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(xw,$),userAgentAppId:f?.userAgentAppId??A0(ys,$)}};YE();C1();J();var bk=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let r=h.findIndex((E)=>E.schemeId===$.schemeId);if(r===-1)h.push($);else h.splice(r,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},mk=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var dk=(f,h)=>{let w=Object.assign(vs(f),Is(f),Zw(f),bk(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,bs(w),Ls(w),Jw(w),mk(w))};class fL extends $w{config;constructor(...[f]){let h=vk(f||{});super(h);this.initConfig=h;let w=Yk(h),s=jw(w),$=ss(s),r=nw($),E=Vw(r),U=uw(E),T=Sk(U),F=dk(T,f?.extensions||[]);this.config=F,this.middlewareStack.use(iw(this.config)),this.middlewareStack.use(Gs(this.config)),this.middlewareStack.use(ew(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(G$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Rk,identityProviderConfigProvider:async(C)=>new G$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(G$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();D();k();J();J();J();class p1 extends rf{constructor(f){super(f);Object.setPrototypeOf(this,p1.prototype)}}class YU extends p1{name="DomainLimitExceeded";$fault="client";constructor(f){super({name:"DomainLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,YU.prototype)}}class MU extends p1{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,MU.prototype)}}class QU extends p1{name="OperationLimitExceeded";$fault="client";constructor(f){super({name:"OperationLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,QU.prototype)}}class KU extends p1{name="UnsupportedTLD";$fault="client";constructor(f){super({name:"UnsupportedTLD",$fault:"client",...f});Object.setPrototypeOf(this,KU.prototype)}}class ZU extends p1{name="DnssecLimitExceeded";$fault="client";constructor(f){super({name:"DnssecLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,ZU.prototype)}}class JU extends p1{name="DuplicateRequest";$fault="client";requestId;constructor(f){super({name:"DuplicateRequest",$fault:"client",...f});Object.setPrototypeOf(this,JU.prototype),this.requestId=f.requestId}}class VU extends p1{name="TLDRulesViolation";$fault="client";constructor(f){super({name:"TLDRulesViolation",$fault:"client",...f});Object.setPrototypeOf(this,VU.prototype)}}var ik=(f)=>({...f,...f.Password&&{Password:T0}}),ck=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}});var gk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.AbuseContactEmail&&{AbuseContactEmail:T0},...f.AbuseContactPhone&&{AbuseContactPhone:T0},...f.BillingContact&&{BillingContact:T0}}),xk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),_k=(f)=>({...f,...f.emailAddress&&{emailAddress:T0}}),nk=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}}),ek=(f)=>({...f,...f.AuthCode&&{AuthCode:T0},...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),ak=(f)=>({...f,...f.Password&&{Password:T0}}),pk=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),ok=(f)=>({...f,...f.FIAuthKey&&{FIAuthKey:T0}});var s0=p(O0(),1);C1();J();var uk=async(f,h)=>{let w=U0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},tk=async(f,h)=>{let w=U0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},fy=async(f,h)=>{let w=U0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},hy=async(f,h)=>{let w=U0("CheckDomainAvailability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},wy=async(f,h)=>{let w=U0("CheckDomainTransferability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},sy=async(f,h)=>{let w=U0("DeleteDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},$y=async(f,h)=>{let w=U0("DeleteTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ry=async(f,h)=>{let w=U0("DisableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ey=async(f,h)=>{let w=U0("DisableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Uy=async(f,h)=>{let w=U0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ty=async(f,h)=>{let w=U0("EnableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Fy=async(f,h)=>{let w=U0("EnableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Cy=async(f,h)=>{let w=U0("GetContactReachabilityStatus"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Iy=async(f,h)=>{let w=U0("GetDomainDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ly=async(f,h)=>{let w=U0("GetDomainSuggestions"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},By=async(f,h)=>{let w=U0("GetOperationDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Gy=async(f,h)=>{let w=U0("ListDomains"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Wy=async(f,h)=>{let w=U0("ListOperations"),s;return s=JSON.stringify(h50(f,h)),E0(h,w,"/",void 0,s)},zy=async(f,h)=>{let w=U0("ListPrices"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ay=async(f,h)=>{let w=U0("ListTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ry=async(f,h)=>{let w=U0("PushDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Xy=async(f,h)=>{let w=U0("RegisterDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Sy=async(f,h)=>{let w=U0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Yy=async(f,h)=>{let w=U0("RenewDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},My=async(f,h)=>{let w=U0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Qy=async(f,h)=>{let w=U0("ResendOperationAuthorization"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ky=async(f,h)=>{let w=U0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Zy=async(f,h)=>{let w=U0("TransferDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Jy=async(f,h)=>{let w=U0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Vy=async(f,h)=>{let w=U0("UpdateDomainContact"),s;return s=JSON.stringify(w50(f,h)),E0(h,w,"/",void 0,s)},Py=async(f,h)=>{let w=U0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Hy=async(f,h)=>{let w=U0("UpdateDomainNameservers"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Ny=async(f,h)=>{let w=U0("UpdateTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Dy=async(f,h)=>{let w=U0("ViewBilling"),s;return s=JSON.stringify(s50(f,h)),E0(h,w,"/",void 0,s)},qy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ky=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},yy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},jy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ly=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},vy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},by=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},my=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},dy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},iy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},cy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},gy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},xy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=C50(w,h),{$metadata:f0(f),...s}},_y=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},ny=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=I50(w,h),{$metadata:f0(f),...s}},ey=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=L50(w,h),{$metadata:f0(f),...s}},ay=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=B50(w,h),{$metadata:f0(f),...s}},py=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=G50(w,h),{$metadata:f0(f),...s}},oy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},uy=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await G1.collectBody(f.body,h),{$metadata:f0(f)}},ty=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},hj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},wj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},sj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);return await G1.collectBody(f.body,h),{$metadata:f0(f)}},$j=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},rj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ej=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Uj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Tj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Fj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Cj=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:f0(f),...s}},Ij=async(f,h)=>{if(f.statusCode>=300)return r0(f,h);let w=await s0.parseJsonBody(f.body,h),s={};return s=A50(w,h),{$metadata:f0(f),...s}},r0=async(f,h)=>{let w={...f,body:await s0.parseJsonErrorBody(f.body,h)},s=s0.loadRestJsonErrorCode(f,w.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await e40(w,h);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await p40(w,h);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await o40(w,h);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await t40(w,h);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await n40(w,h);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await a40(w,h);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await u40(w,h);default:let $=w.body;return R50({output:f,parsedBody:$,errorCode:s})}},n40=async(f,h)=>{let w=f.body,s=v(w),$=new ZU({$metadata:f0(f),...s});return l($,w)},e40=async(f,h)=>{let w=f.body,s=v(w),$=new YU({$metadata:f0(f),...s});return l($,w)},a40=async(f,h)=>{let w=f.body,s=v(w),$=new JU({$metadata:f0(f),...s});return l($,w)},p40=async(f,h)=>{let w=f.body,s=v(w),$=new MU({$metadata:f0(f),...s});return l($,w)},o40=async(f,h)=>{let w=f.body,s=v(w),$=new QU({$metadata:f0(f),...s});return l($,w)},u40=async(f,h)=>{let w=f.body,s=v(w),$=new VU({$metadata:f0(f),...s});return l($,w)},t40=async(f,h)=>{let w=f.body,s=v(w),$=new KU({$metadata:f0(f),...s});return l($,w)},f50=(f,h)=>{return N0(f,{Currency:[],MaxPrice:sY})},h50=(f,h)=>{return N0(f,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:v,SubmittedSince:(w)=>w.getTime()/1000,Type:v})},w50=(f,h)=>{return N0(f,{AdminContact:v,BillingContact:v,Consent:(w)=>f50(w,h),DomainName:[],RegistrantContact:v,TechContact:v})},s50=(f,h)=>{return N0(f,{End:(w)=>w.getTime()/1000,Marker:[],MaxItems:[],Start:(w)=>w.getTime()/1000})},$50=(f,h)=>{return N0(f,{BillDate:(w)=>j(Kf(Y1(w))),DomainName:G,InvoiceId:G,Operation:G,Price:lF})},r50=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return $50(s,h)})},E50=(f,h)=>{return N0(f,{ChangeOwnershipPrice:(w)=>o4(w,h),Name:G,RegistrationPrice:(w)=>o4(w,h),RenewalPrice:(w)=>o4(w,h),RestorationPrice:(w)=>o4(w,h),TransferPrice:(w)=>o4(w,h)})},U50=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return E50(s,h)})},T50=(f,h)=>{return N0(f,{AutoRenew:Ph,DomainName:G,Expiry:(w)=>j(Kf(Y1(w))),TransferLock:Ph})},F50=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return T50(s,h)})},C50=(f,h)=>{return N0(f,{AbuseContactEmail:G,AbuseContactPhone:G,AdminContact:v,AdminPrivacy:Ph,AutoRenew:Ph,BillingContact:v,BillingPrivacy:Ph,CreationDate:(w)=>j(Kf(Y1(w))),DnsSec:G,DnssecKeys:v,DomainName:G,ExpirationDate:(w)=>j(Kf(Y1(w))),Nameservers:v,RegistrantContact:v,RegistrantPrivacy:Ph,RegistrarName:G,RegistrarUrl:G,RegistryDomainId:G,Reseller:G,StatusList:v,TechContact:v,TechPrivacy:Ph,UpdatedDate:(w)=>j(Kf(Y1(w))),WhoIsServer:G})},I50=(f,h)=>{return N0(f,{DomainName:G,LastUpdatedDate:(w)=>j(Kf(Y1(w))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(w)=>j(Kf(Y1(w))),Type:G})},L50=(f,h)=>{return N0(f,{Domains:(w)=>F50(w,h),NextPageMarker:G})},B50=(f,h)=>{return N0(f,{NextPageMarker:G,Operations:(w)=>z50(w,h)})},G50=(f,h)=>{return N0(f,{NextPageMarker:G,Prices:(w)=>U50(w,h)})},W50=(f,h)=>{return N0(f,{DomainName:G,LastUpdatedDate:(w)=>j(Kf(Y1(w))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(w)=>j(Kf(Y1(w))),Type:G})},z50=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return W50(s,h)})},o4=(f,h)=>{return N0(f,{Currency:G,Price:lF})},A50=(f,h)=>{return N0(f,{BillingRecords:(w)=>r50(w,h),NextPageMarker:G})},f0=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var R50=Ts(p1),E0=async(f,h,w,s,$)=>{let{hostname:r,protocol:E="https",port:U,path:T}=await f.endpoint(),F={protocol:E,hostname:r,port:U,method:"POST",path:T.endsWith("/")?T.slice(0,-1)+w:T+w,headers:h};if(s!==void 0)F.hostname=s;if($!==void 0)F.body=$;return new n0(F)};function U0(f){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${f}`}}class hL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(ik,void 0).ser(uk).de(qy).build(){}D();k();J();class wL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(tk).de(ky).build(){}D();k();J();class sL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(fy).de(yy).build(){}D();k();J();class $L extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(hy).de(jy).build(){}D();k();J();class rL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(ck,void 0).ser(wy).de(Oy).build(){}D();k();J();class EL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(sy).de(ly).build(){}D();k();J();class UL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser($y).de(vy).build(){}D();k();J();class TL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(ry).de(by).build(){}D();k();J();class FL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(Ey).de(my).build(){}D();k();J();class CL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Uy).de(dy).build(){}D();k();J();class IL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(Ty).de(iy).build(){}D();k();J();class LL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Fy).de(cy).build(){}D();k();J();class BL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(Cy).de(gy).build(){}D();k();J();class GL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,gk).ser(Iy).de(xy).build(){}D();k();J();class WL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(Ly).de(_y).build(){}D();k();J();class zL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(By).de(ny).build(){}D();k();J();class AL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(Gy).de(ey).build(){}D();k();J();class RL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(Wy).de(ay).build(){}D();k();J();class XL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(zy).de(py).build(){}D();k();J();class SL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(Ay).de(oy).build(){}D();k();J();class YL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(Ry).de(uy).build(){}D();k();J();class ML extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(xk,void 0).ser(Xy).de(ty).build(){}D();k();J();class QL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(Sy).de(fj).build(){}D();k();J();class KL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(Yy).de(hj).build(){}D();k();J();class ZL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,_k).ser(My).de(wj).build(){}D();k();J();class JL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(Qy).de(sj).build(){}D();k();J();class VL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,nk).ser(Ky).de($j).build(){}D();k();J();class PL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(ek,void 0).ser(Zy).de(rj).build(){}D();k();J();class HL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,ak).ser(Jy).de(Ej).build(){}D();k();J();class NL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(pk,void 0).ser(Vy).de(Uj).build(){}D();k();J();class DL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(Py).de(Tj).build(){}D();k();J();class qL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(ok,void 0).ser(Hy).de(Fj).build(){}D();k();J();class kL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(Ny).de(Cj).build(){}D();k();J();class yL extends z.classBuilder().ep(c).m(function(f,h,w,s){return[A(w,this.serialize,this.deserialize),R(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(Dy).de(Ij).build(){}var X50={AcceptDomainTransferFromAnotherAwsAccountCommand:hL,AssociateDelegationSignerToDomainCommand:wL,CancelDomainTransferToAnotherAwsAccountCommand:sL,CheckDomainAvailabilityCommand:$L,CheckDomainTransferabilityCommand:rL,DeleteDomainCommand:EL,DeleteTagsForDomainCommand:UL,DisableDomainAutoRenewCommand:TL,DisableDomainTransferLockCommand:FL,DisassociateDelegationSignerFromDomainCommand:CL,EnableDomainAutoRenewCommand:IL,EnableDomainTransferLockCommand:LL,GetContactReachabilityStatusCommand:BL,GetDomainDetailCommand:GL,GetDomainSuggestionsCommand:WL,GetOperationDetailCommand:zL,ListDomainsCommand:AL,ListOperationsCommand:RL,ListPricesCommand:XL,ListTagsForDomainCommand:SL,PushDomainCommand:YL,RegisterDomainCommand:ML,RejectDomainTransferFromAnotherAwsAccountCommand:QL,RenewDomainCommand:KL,ResendContactReachabilityEmailCommand:ZL,ResendOperationAuthorizationCommand:JL,RetrieveDomainAuthCodeCommand:VL,TransferDomainCommand:PL,TransferDomainToAnotherAwsAccountCommand:HL,UpdateDomainContactCommand:NL,UpdateDomainContactPrivacyCommand:DL,UpdateDomainNameserversCommand:qL,UpdateTagsForDomainCommand:kL,ViewBillingCommand:yL};class u4 extends fL{}Es(X50,u4);import{runAction as S50}from"@stacksjs/actions";import{config as Bj}from"@stacksjs/config";import{Action as Y50}from"@stacksjs/enums";import{err as Fh,handleError as bf,ok as W$}from"@stacksjs/error-handling";import{log as P1}from"@stacksjs/logging";import{path as M50}from"@stacksjs/path";import{fs as Lj}from"@stacksjs/storage";async function IO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Fh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Fh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Fh(bf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return await h.deleteHostedZone({Id:s.Id}),P1.info(`Deleted Hosted Zone for domain: ${f}`),W$("success")}async function LO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return Fh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((r)=>r.Name===`${f}.`);if(!s)return Fh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return Fh(bf(`No DNS records found for domain: ${f}`));for(let r of $.ResourceRecordSets)if(r.Type!=="NS"&&r.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:r}]}});return P1.info(`Deleted DNS records for domain: ${f}`),W$("success")}async function BO0(f){let h=new ch,s=(await h.listHostedZonesByName({DNSName:f})).HostedZones?.find((r)=>r.Name===`${f}.`);if(s)return W$(s);let $=await h.createHostedZone({Name:f,CallerReference:`${Date.now()}`});if(!$.HostedZone)return Fh(bf("Failed to create hosted zone"));return W$($)}function Q50(f){try{let h=M50.projectConfigPath("dns.ts"),s=Lj.readFileSync(h,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${f.map(($)=>`'${$}'`).join(", ")}]`);Lj.writeFileSync(h,s,"utf-8"),P1.info("Nameservers have been set.")}catch(h){console.error("Error updating nameservers:",h)}}async function GO0(f){try{let h=new ch,{HostedZones:w}=await h.listHostedZonesByName({DNSName:f});if(!w)return Fh(bf(`No hosted zones found for domain ${f}`));let s=w[0];if(s&&s.Name===`${f}.`)return W$(s.Id);return W$(null)}catch(h){return Fh(bf(`Failed to find hosted zone for domain ${f}`,h))}}async function K50(f){if(P1.debug("Getting nameservers for domain:",f),!f)return[];try{return(await new u4().getDomainDetail({DomainName:f}))?.Nameservers?.map((s)=>s.Name)||[]}catch(h){bf("Error getting domain detail",h)}}async function Z50(f,h){if(!h)h=Bj.app.url;let w=await K50(h);if(w&&f&&JSON.stringify(w.sort())!==JSON.stringify(f.sort()))return P1.info("Updating your domain nameservers to match the ones in your hosted zone..."),P1.debug("Hosted zone nameservers:",f),P1.debug("Domain nameservers:",w),await new u4().updateDomainNameservers({DomainName:h,Nameservers:f.map(($)=>({Name:$}))}),Q50(f),P1.info("Nameservers updated."),!0;P1.success("Your nameservers are up to date.")}async function WO0(f){if(P1.debug("Checking if domain has been added to cloud..."),!f)f=Bj.app.url;P1.debug("domainName:",f);let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(P1.debug("Existing hosted zones:",w),!w||!w.HostedZones)return!1;let s=w.HostedZones.find(($)=>$.Name===`${f}.`);if(s){P1.debug("Hosted zone found:",s);let r=(await h.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await Z50(r,f),!0}return!1}async function zO0(f){return await S50(Y50.DomainsAdd,f)}import{Buffer as Xj}from"node:buffer";import{Buffer as dL}from"node:buffer";import O50 from"node:dgram";import l50 from"node:https";import v50 from"node:net";import b50 from"node:tls";import{URL as Wj}from"node:url";import{promises as m50}from"node:fs";import{platform as d50}from"node:os";var J50=Object.create,{getPrototypeOf:V50,defineProperty:Gj,getOwnPropertyNames:P50}=Object,H50=Object.prototype.hasOwnProperty,N50=(f,h,w)=>{w=f!=null?J50(V50(f)):{};let s=h||!f||!f.__esModule?Gj(w,"default",{value:f,enumerable:!0}):w;for(let $ of P50(f))if(!H50.call(s,$))Gj(s,$,{get:()=>f[$],enumerable:!0});return s},D50=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),q50=D50((f,h)=>{var w=process||{},s=w.argv||[],$=w.env||{},r=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||w.platform==="win32"||(w.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),E=(F,C,I=F)=>(L)=>{let W=""+L,X=W.indexOf(C,F.length);return~X?F+U(W,C,I,X)+C:F+W+C},U=(F,C,I,L)=>{let W="",X=0;do W+=F.substring(X,L)+I,X=L+C.length,L=F.indexOf(C,X);while(~L);return W+F.substring(X)},T=(F=r)=>{let C=F?E:()=>String;return{isColorSupported:F,reset:C("\x1B[0m","\x1B[0m"),bold:C("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:C("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:C("\x1B[3m","\x1B[23m"),underline:C("\x1B[4m","\x1B[24m"),inverse:C("\x1B[7m","\x1B[27m"),hidden:C("\x1B[8m","\x1B[28m"),strikethrough:C("\x1B[9m","\x1B[29m"),black:C("\x1B[30m","\x1B[39m"),red:C("\x1B[31m","\x1B[39m"),green:C("\x1B[32m","\x1B[39m"),yellow:C("\x1B[33m","\x1B[39m"),blue:C("\x1B[34m","\x1B[39m"),magenta:C("\x1B[35m","\x1B[39m"),cyan:C("\x1B[36m","\x1B[39m"),white:C("\x1B[37m","\x1B[39m"),gray:C("\x1B[90m","\x1B[39m"),bgBlack:C("\x1B[40m","\x1B[49m"),bgRed:C("\x1B[41m","\x1B[49m"),bgGreen:C("\x1B[42m","\x1B[49m"),bgYellow:C("\x1B[43m","\x1B[49m"),bgBlue:C("\x1B[44m","\x1B[49m"),bgMagenta:C("\x1B[45m","\x1B[49m"),bgCyan:C("\x1B[46m","\x1B[49m"),bgWhite:C("\x1B[47m","\x1B[49m"),blackBright:C("\x1B[90m","\x1B[39m"),redBright:C("\x1B[91m","\x1B[39m"),greenBright:C("\x1B[92m","\x1B[39m"),yellowBright:C("\x1B[93m","\x1B[39m"),blueBright:C("\x1B[94m","\x1B[39m"),magentaBright:C("\x1B[95m","\x1B[39m"),cyanBright:C("\x1B[96m","\x1B[39m"),whiteBright:C("\x1B[97m","\x1B[39m"),bgBlackBright:C("\x1B[100m","\x1B[49m"),bgRedBright:C("\x1B[101m","\x1B[49m"),bgGreenBright:C("\x1B[102m","\x1B[49m"),bgYellowBright:C("\x1B[103m","\x1B[49m"),bgBlueBright:C("\x1B[104m","\x1B[49m"),bgMagentaBright:C("\x1B[105m","\x1B[49m"),bgCyanBright:C("\x1B[106m","\x1B[49m"),bgWhiteBright:C("\x1B[107m","\x1B[49m")}};h.exports=T(),h.exports.createColors=T}),gh;((f)=>{f[f.A=1]="A",f[f.NS=2]="NS",f[f.CNAME=5]="CNAME",f[f.SOA=6]="SOA",f[f.PTR=12]="PTR",f[f.MX=15]="MX",f[f.TXT=16]="TXT",f[f.AAAA=28]="AAAA",f[f.SRV=33]="SRV",f[f.NAPTR=35]="NAPTR",f[f.OPT=41]="OPT",f[f.SSHFP=44]="SSHFP",f[f.TLSA=52]="TLSA",f[f.DNSKEY=48]="DNSKEY",f[f.CAA=257]="CAA"})(gh||={});var vL;((f)=>{f[f.IN=1]="IN",f[f.CH=3]="CH",f[f.HS=4]="HS"})(vL||={});var zj;((f)=>{f.Disable="disable",f.Hide="hide",f.Show="show"})(zj||={});var Aj;((f)=>{f[f.NoError=0]="NoError",f[f.FormErr=1]="FormErr",f[f.ServFail=2]="ServFail",f[f.NXDomain=3]="NXDomain",f[f.NotImp=4]="NotImp",f[f.Refused=5]="Refused",f[f.YXDomain=6]="YXDomain",f[f.YXRRSet=7]="YXRRSet",f[f.NXRRSet=8]="NXRRSet",f[f.NotAuth=9]="NotAuth",f[f.NotZone=10]="NotZone"})(Aj||={});var Rj;((f)=>{f.TruncatedPacket="TRUNCATED_PACKET",f.InvalidLength="INVALID_LENGTH",f.InvalidFormat="INVALID_FORMAT",f.InvalidName="INVALID_NAME",f.InvalidLabel="INVALID_LABEL",f.InvalidPointer="INVALID_POINTER",f.InvalidType="INVALID_TYPE",f.InvalidClass="INVALID_CLASS",f.NetworkError="NETWORK_ERROR"})(Rj||={});function k50(f){if(!f)return;let h=Array.isArray(f)?f:[f],w={};for(let s of h)if(s==="aa"||s==="authoritative")w.authoritative=!0;else if(s==="ad"||s==="authentic")w.authenticData=!0;else if(s==="cd"||s==="checking-disabled")w.checkingDisabled=!0;else if(s.startsWith("bufsize="))w.udpPayloadSize=Number.parseInt(s.split("=")[1]);return w}function S0(f,h,w){if(w)console.debug(`[dnsx:${f}] ${h}`)}var y50=12,j50=63;class t4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(f){let h=new t4,w=f.readUInt16BE(0);return h.response=(w&32768)!==0,h.opcode=(w&30720)>>>11,h.authoritative=(w&1024)!==0,h.truncated=(w&512)!==0,h.recursionDesired=(w&256)!==0,h.recursionAvailable=(w&128)!==0,h.authenticData=(w&32)!==0,h.checkingDisabled=(w&16)!==0,h.responseCode=w&15,h}toBuffer(){let f=Xj.alloc(2),h=0;if(this.response)h|=32768;if(h|=(this.opcode&15)<<11,this.authoritative)h|=1024;if(this.truncated)h|=512;if(this.recursionDesired)h|=256;if(this.recursionAvailable)h|=128;if(this.authenticData)h|=32;if(this.checkingDisabled)h|=16;return h|=this.responseCode&15,f.writeUInt16BE(h,0),f}}class bL{buffer;offset;nameOffsets;verbose;constructor(f=512,h){this.buffer=Xj.alloc(f),this.offset=0,this.nameOffsets=new Map,this.verbose=h}writeHeader(f,h,w){S0("encoder",`Writing DNS header: ${JSON.stringify({id:f,flags:{response:h.response,opcode:h.opcode,recursionDesired:h.recursionDesired},counts:w})}`,this.verbose),this.writeUint16(f);let s=h.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(w.qdcount),this.writeUint16(w.ancount),this.writeUint16(w.nscount),this.writeUint16(w.arcount)}writeName(f){S0("encoder",`Writing DNS name: ${f}`,this.verbose);let h=f.split(".");for(let w of h){if(w.length>j50)throw new Error(`Label too long: ${w}`);this.buffer[this.offset++]=w.length,this.buffer.write(w,this.offset),this.offset+=w.length}this.buffer[this.offset++]=0}writeQuestion(f){this.writeName(f.name),this.writeUint16(f.type),this.writeUint16(f.class)}writeUint16(f){this.buffer.writeUInt16BE(f,this.offset),this.offset+=2}writeUint32(f){this.buffer.writeUInt32BE(f,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class mL{buffer;offset;constructor(f){this.buffer=f,this.offset=0}canRead(f){return this.offset+f<=this.buffer.length}readName(){let f=[],h=!1,w=this.offset;for(let s=0;s<5;s++){if(w>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[w];if($===0){if(!h)this.offset=w+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!h)this.offset=w+2,h=!0;w=($&63)<<8|this.buffer[w+1];continue}if(w++,w+$>this.buffer.length)throw new Error("Out of bounds access");let r=this.buffer.slice(w,w+$).toString("ascii");f.push(r),w+=$}return f.join(".")}readHeader(){if(!this.canRead(y50))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let f=this.readUint16(),h=t4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let w={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:f,flags:h,counts:w}}readQuestion(){let f=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16();return{name:f,type:h,class:w}}readAnswer(){let f=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let r=this.readRData(h,$);return{name:f,type:h,class:w,ttl:s,data:r}}readRData(f,h){let w=this.offset,s;switch(f){case 1:if(h!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(h!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(h<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(h);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+h).toString("hex"),this.offset+=h}if(this.offset-w!==h)this.offset=w+h;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let f=this.buffer.readUInt16BE(this.offset);return this.offset+=2,f}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=this.buffer.readUInt32BE(this.offset);return this.offset+=4,f}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=[];for(let h=0;h<4;h++)f.push(this.buffer[this.offset++]);return f.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let f=[];for(let h=0;h<8;h++)f.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return f.join(":")}readString(f){if(!this.canRead(f))throw new Error("Out of bounds access");let h=this.buffer.slice(this.offset,this.offset+f).toString();return this.offset+=f,h}}function Sj(f,h={}){let w=new bL(512,h.verbose),s=new t4;s.recursionDesired=!0,s.response=!1;let $=h.txid??h.id??Math.floor(Math.random()*65536);return w.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),w.writeQuestion({name:f.name,type:typeof f.type==="string"?gh[f.type]:f.type,class:f.class}),w.getBuffer()}function OL(f){let h=new mL(f);if((f.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:w,flags:s,counts:$}=h.readHeader();for(let T=0;T<$.qdcount;T++)h.readQuestion();let r=[];for(let T=0;T<$.ancount;T++)r.push(h.readAnswer());let E=[];for(let T=0;T<$.nscount;T++)E.push(h.readAnswer());let U=[];for(let T=0;T<$.arcount;T++)U.push(h.readAnswer());return{id:w,flags:s,answers:r,authorities:E,additionals:U}}var Yj;((f)=>{f.UDP="udp",f.TCP="tcp",f.TLS="tls",f.HTTPS="https"})(Yj||={});class HU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=O50.createSocket("udp4"),r,E,U=HU.DEFAULT_PORT;if(f.includes(":")){let[F,C]=f.split(":");E=F;let I=Number.parseInt(C,10);if(I>0&&I<65536)U=I}else E=f;$.on("error",(F)=>{clearTimeout(r),$.close(),s(F)}),$.on("message",(F)=>{clearTimeout(r),$.close(),w(F)}),r=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},HU.TIMEOUT);let T=new Uint8Array(h.buffer,h.byteOffset,h.length);$.send(T,U,E,(F)=>{if(F)clearTimeout(r),$.close(),s(F)})})}}class NU{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=new v50.Socket,r,E=new Uint8Array(0),U=-1;$.on("error",(C)=>{clearTimeout(r),$.destroy(),s(C)}),$.on("data",(C)=>{let I=new Uint8Array(E.length+C.length);if(I.set(E),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),E.length),E=I,U===-1&&E.length>=2)U=new DataView(E.buffer,E.byteOffset).getUint16(0)+2;if(U!==-1&&E.length>=U)clearTimeout(r),$.destroy(),w(dL.from(E.slice(2,U)))}),r=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},NU.TIMEOUT);let[T,F=NU.DEFAULT_PORT]=f.split(":");$.connect(Number(F),T,()=>{let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,h.length);let I=new Uint8Array(h.buffer,h.byteOffset,h.length),L=new Uint8Array(C.length+I.length);L.set(C),L.set(I,C.length),$.write(L,(W)=>{if(W)clearTimeout(r),$.destroy(),s(W)})})})}}class DU{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $={host:f.split(":")[0],port:Number(f.split(":")[1])||DU.DEFAULT_PORT,servername:f.split(":")[0]},r,E=b50.connect($,()=>{if(!E.authorized){E.destroy(),s(new Error("TLS authorization failed"));return}let F=new Uint8Array(2);new DataView(F.buffer).setUint16(0,h.length);let C=new Uint8Array(h.buffer,h.byteOffset,h.length),I=new Uint8Array(F.length+C.length);I.set(F),I.set(C,F.length),E.write(I,(L)=>{if(L)clearTimeout(r),E.destroy(),s(L)})}),U=new Uint8Array(0),T=-1;E.on("error",(F)=>{clearTimeout(r),E.destroy(),s(F)}),E.on("data",(F)=>{let C=new Uint8Array(U.length+F.length);if(C.set(U),C.set(new Uint8Array(F.buffer,F.byteOffset,F.length),U.length),U=C,T===-1&&U.length>=2)T=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(T!==-1&&U.length>=T)clearTimeout(r),E.destroy(),w(dL.from(U.slice(2,T)))}),r=setTimeout(()=>{E.destroy(),s(new Error("TLS query timed out"))},DU.TIMEOUT)})}}class z${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(f,h){return new Promise((w,s)=>{let $;try{$=new Wj(f)}catch{$=new Wj(`https://${f}/dns-query`)}let r={method:"POST",headers:{"Content-Type":z$.CONTENT_TYPE,"Content-Length":h.length.toString(),Accept:z$.CONTENT_TYPE},timeout:z$.TIMEOUT},E=l50.request($,r,(U)=>{let T=[];U.on("data",(F)=>{T.push(new Uint8Array(F.buffer,F.byteOffset,F.length))}),U.on("end",()=>{if(U.statusCode!==200){s(new Error(`HTTPS query failed with status ${U.statusCode}`));return}let F=U.headers["content-type"];if(F!==z$.CONTENT_TYPE){s(new Error(`Invalid content type: ${F}`));return}let C=T.reduce((W,X)=>W+X.length,0),I=new Uint8Array(C),L=0;for(let W of T)I.set(W,L),L+=W.length;w(dL.from(I))})});E.on("error",s),E.on("timeout",()=>{E.destroy(),s(new Error("HTTPS query timed out"))}),E.write(new Uint8Array(h.buffer,h.byteOffset,h.length)),E.end()})}}function lL(f){switch(f){case"udp":return new HU;case"tcp":return new NU;case"tls":return new DU;case"https":return new z$}}class H1{options;static DEFAULT_NAMESERVER="1.1.1.1";static RESOLV_CONF_PATH="/etc/resolv.conf";static WINDOWS_DNS_KEY="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Nameserver";validateDomainName(f){if(f.includes(".."))throw new Error(`Invalid domain name: ${f} (consecutive dots)`);if(f.startsWith(".")||f.endsWith("."))throw new Error(`Invalid domain name: ${f} (starts or ends with dot)`);if(f.length>253)throw new Error(`Domain name too long: ${f}`);let h=f.split(".");for(let w of h){if(w.length>63)throw new Error(`Label too long in domain: ${f}`);if(!/^[a-z0-9-]+$/i.test(w))throw new Error(`Invalid characters in domain label: ${w}`)}}validateRecordType(f){if(typeof f==="string"){if(!(f.toUpperCase()in gh))throw new Error(`Invalid record type: ${f}`)}else if(typeof f==="number"){if(!Object.values(gh).filter((h)=>typeof h==="number").includes(f))throw new Error(`Invalid record type number: ${f}`)}else throw new TypeError("Record type must be string or number")}constructor(f){this.options={transport:{type:"udp"},verbose:!1,...f},this.validateOptions()}async query(){try{let f=this.determineTransportType();S0("client",`Selected transport type: ${f}`,this.options.verbose);let h=lL(f);if(!h)throw new Error(`Failed to create transport for type: ${f}`);let w=[],s=await this.resolveNameserver();if(S0("client",`Resolved nameserver: ${s}`,this.options.verbose),!s)throw new Error("Failed to resolve nameserver");let $=this.buildQueries();S0("client",`Built ${$.length} queries`,this.options.verbose);for(let r of $){S0("client",`Processing query: ${JSON.stringify({query:r,nameserver:s,transportType:f})}`,this.options.verbose);let E=Sj(r,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});S0("client",`Built DNS request: ${JSON.stringify({hexData:E.toString("hex"),length:E.length,txid:E.readUInt16BE(0),flags:E.readUInt16BE(2).toString(16)})}`,this.options.verbose);let U=this.options.retries||3;for(let T=0;T<U;T++)try{S0("client",`Attempt ${T+1}/${U}`,this.options.verbose);let F=await h.query(s,E);if(S0("client",`Received DNS response: ${JSON.stringify({hexData:F.toString("hex"),length:F.length,txid:F.readUInt16BE(0),flags:F.readUInt16BE(2).toString(16)})}`,this.options.verbose),F.length<12)throw new Error(`Response too short: ${F.length} bytes`);if(!(F.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let C=OL(F);if(S0("client",`Parsed DNS response: ${JSON.stringify({id:C.id,answerCount:C.answers.length,authorityCount:C.authorities.length,additionalCount:C.additionals.length})}`,this.options.verbose),f==="udp"&&C.flags.truncated){S0("client","Response truncated, retrying with TCP",this.options.verbose);let I=await lL("tcp").query(s,E);w.push(OL(I))}else w.push(C);break}catch(F){if(S0("client",`Attempt ${T+1} failed: ${F.message}`,this.options.verbose),T===U-1)throw S0("client","All retry attempts failed",this.options.verbose),F;let C=2**T*1000;S0("client",`Waiting ${C}ms before retry`,this.options.verbose),await new Promise((I)=>setTimeout(I,C))}}if(w.length===0)throw new Error("No responses received");return w}catch(f){let h=f instanceof Error?f.message:"Unknown error occurred";throw S0("client",`Query failed with error: ${h}`,this.options.verbose),S0("client",`Full error: ${JSON.stringify(f)}`,this.options.verbose),new Error(`DNS query failed: ${h}`)}}buildQueries(){let f=[];if(!this.options.domains?.length)throw new Error("No domains specified");let h=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],w=this.resolveTypes(),s=this.resolveClasses();for(let $ of h)for(let r of w)for(let E of s)f.push({name:$,type:r,class:E});return S0("client",`Built queries: ${JSON.stringify(f)}`,this.options.verbose),f}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((f)=>{if(this.validateRecordType(f),typeof f==="number")return f;let h=f.toUpperCase();return gh[h]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((f)=>{if(typeof f==="number")return f;let h=f.toUpperCase(),w=vL[h];if(w===void 0)throw new Error(`Invalid query class: ${f}`);return w})}validateNameserver(f){if(f.startsWith("https://"))return!0;if(f.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(f))return f.split(".").every((h)=>{let w=Number.parseInt(h,10);return w>=0&&w<=255});if(f.includes(":"))return!1;return!1}async resolveNameserver(){try{if(this.options.nameserver){if(S0("client",`Checking configured nameserver: ${this.options.nameserver}`,this.options.verbose),this.validateNameserver(this.options.nameserver))return this.options.nameserver}let f=d50();S0("client",`Resolving nameserver for platform: ${f}`,this.options.verbose);let h;if(f==="win32")h=await this.resolveWindowsNameserver();else h=await this.resolveUnixNameserver();if(this.validateNameserver(h))return h;return S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to resolve nameserver: ${f.message}`,this.options.verbose),S0("client",`Using default nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let f=(await m50.readFile(H1.RESOLV_CONF_PATH,"utf-8")).split(`
60
+ `),h=[];for(let s of f){let $=s.trim();if($.startsWith("nameserver")){let[,r]=$.split(/\s+/);if(r&&!r.includes("%"))h.push(r)}}let w=h.find((s)=>!s.includes(":"));if(w)return S0("client",`Using IPv4 nameserver from resolv.conf: ${w}`,this.options.verbose),w;return S0("client",`No valid nameserver found in resolv.conf, using fallback: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){return S0("client",`Failed to read resolv.conf: ${f.message}`,this.options.verbose),S0("client",`Using fallback nameserver: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return S0("client",`Using default nameserver for Windows: ${H1.DEFAULT_NAMESERVER}`,this.options.verbose),H1.DEFAULT_NAMESERVER}catch(f){throw S0("client",`Failed to get Windows nameserver: ${f.message}`,this.options.verbose),new Error("Failed to get Windows nameserver")}}determineTransportType(){if(this.options.https)return"https";if(this.options.tls)return"tls";if(this.options.tcp)return"tcp";if(this.options.udp)return"udp";if(typeof this.options.transport==="object")return this.options.transport.type||"udp";return"udp"}validateOptions(){if(this.options.domains)for(let f of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(f);if(this.options.type){let f=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let h of f)this.validateRecordType(h)}if([this.options.udp,this.options.tcp,this.options.tls,this.options.https].filter(Boolean).length>1)throw new Error("Only one transport type can be specified");if(this.options.https&&!this.options.nameserver?.startsWith("https://"))throw new Error("HTTPS transport requires an HTTPS nameserver URL");S0("client","Options validation completed successfully",this.options.verbose)}}var i50=N50(q50(),1),c50={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function g50(f,h){if(h.json)return x50(f,h.showDuration);return _50(f,h)}function x50(f,h){let w={responses:f.map((s)=>({id:s.id,answers:s.answers.map(jL),authorities:s.authorities.map(jL),additionals:s.additionals.map(jL)}))};if(h!==void 0)w.duration={ms:h};return JSON.stringify(w,null,2)}function jL(f){let h={name:f.name,type:gh[f.type]||f.type,ttl:f.ttl};switch(f.type){case 1:case 28:return{...h,address:f.data};case 5:case 12:case 2:return{...h,target:f.data};case 15:return{...h,preference:f.data.preference,exchange:f.data.exchange};case 16:return{...h,text:f.data};case 33:return{...h,priority:f.data.priority,weight:f.data.weight,port:f.data.port,target:f.data.target};case 257:return{...h,flags:f.data.flags,tag:f.data.tag,value:f.data.value};default:return{...h,data:f.data}}}function _50(f,h){let w=[];for(let s of f){if(h.short){if(s.answers.length>0)w.push(PU(s.answers[0],h));continue}if(s.answers.length>0)for(let $ of s.answers)w.push(PU($,h));if(s.authorities.length>0){w.push(`
61
61
  Authority Records:`);for(let $ of s.authorities)w.push(PU($,h))}if(s.additionals.length>0){w.push(`
62
62
  Additional Records:`);for(let $ of s.additionals)w.push(PU($,h))}}if(h.showDuration!==void 0)w.push(`
63
- Query time: ${o40(h.showDuration,h.rawSeconds)}`);return w.join(`
64
- `)}function PU(f,h){let w=gh[f.type]||f.type.toString(),s=_40[w]||"white",$=h.colors.enabled?x40.default[s](w.padEnd(6)):w.padEnd(6),r=p40(f.ttl,h.rawSeconds).padStart(8),E;switch(f.type){case 1:case 28:E=f.data;break;case 5:case 12:case 2:E=f.data;break;case 15:E=`${f.data.preference} ${f.data.exchange}`;break;case 16:E=`"${f.data}"`;break;case 33:E=`${f.data.priority} ${f.data.weight} ${f.data.port} ${f.data.target}`;break;case 257:E=`${f.data.flags} ${f.data.tag} "${f.data.value}"`;break;default:E=JSON.stringify(f.data)}return`${$} ${r} ${f.name.padEnd(30)} ${E}`}function p40(f,h){if(h)return f.toString();if(f<60)return`${f}s`;if(f<3600){let $=Math.floor(f/60),r=f%60;return`${$}m${r}s`}if(f<86400){let $=Math.floor(f/3600),r=Math.floor(f%3600/60);return`${$}h${r}m`}let w=Math.floor(f/86400),s=Math.floor(f%86400/3600);return`${w}d${s}h`}function o40(f,h){if(h)return`${f}ms`;if(f<1000)return`${f}ms`;return`${(f/1000).toFixed(2)}s`}var{create:u40,defineProperty:Jj,getOwnPropertyDescriptor:t40,getOwnPropertyNames:f50,getPrototypeOf:h50}=Object,w50=Object.prototype.hasOwnProperty,s50=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),$50=(f,h,w,s)=>{if(h&&typeof h=="object"||typeof h=="function")for(let $ of f50(h))!w50.call(f,$)&&$!==w&&Jj(f,$,{get:()=>h[$],enumerable:!(s=t40(h,$))||s.enumerable});return f},r50=(f,h,w)=>(w=f!=null?u40(h50(f)):{},$50(h||!f||!f.__esModule?Jj(w,"default",{value:f,enumerable:!0}):w,f)),E50=s50((f,h)=>{function w(E){if(typeof E!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function s(E,U){for(var T="",F=0,C=-1,I=0,L,W=0;W<=E.length;++W){if(W<E.length)L=E.charCodeAt(W);else{if(L===47)break;L=47}if(L===47){if(!(C===W-1||I===1))if(C!==W-1&&I===2){if(T.length<2||F!==2||T.charCodeAt(T.length-1)!==46||T.charCodeAt(T.length-2)!==46){if(T.length>2){var X=T.lastIndexOf("/");if(X!==T.length-1){X===-1?(T="",F=0):(T=T.slice(0,X),F=T.length-1-T.lastIndexOf("/")),C=W,I=0;continue}}else if(T.length===2||T.length===1){T="",F=0,C=W,I=0;continue}}U&&(T.length>0?T+="/..":T="..",F=2)}else T.length>0?T+="/"+E.slice(C+1,W):T=E.slice(C+1,W),F=W-C-1;C=W,I=0}else L===46&&I!==-1?++I:I=-1}return T}function $(E,U){var T=U.dir||U.root,F=U.base||(U.name||"")+(U.ext||"");return T?T===U.root?T+F:T+E+F:F}var r={resolve:function(){for(var E="",U=!1,T,F=arguments.length-1;F>=-1&&!U;F--){var C;F>=0?C=arguments[F]:(T===void 0&&(T=process.cwd()),C=T),w(C),C.length!==0&&(E=C+"/"+E,U=C.charCodeAt(0)===47)}return E=s(E,!U),U?E.length>0?"/"+E:"/":E.length>0?E:"."},normalize:function(E){if(w(E),E.length===0)return".";var U=E.charCodeAt(0)===47,T=E.charCodeAt(E.length-1)===47;return E=s(E,!U),E.length===0&&!U&&(E="."),E.length>0&&T&&(E+="/"),U?"/"+E:E},isAbsolute:function(E){return w(E),E.length>0&&E.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var E,U=0;U<arguments.length;++U){var T=arguments[U];w(T),T.length>0&&(E===void 0?E=T:E+="/"+T)}return E===void 0?".":r.normalize(E)},relative:function(E,U){if(w(E),w(U),E===U||(E=r.resolve(E),U=r.resolve(U),E===U))return"";for(var T=1;T<E.length&&E.charCodeAt(T)===47;++T);for(var F=E.length,C=F-T,I=1;I<U.length&&U.charCodeAt(I)===47;++I);for(var L=U.length,W=L-I,X=C<W?C:W,Q=-1,M=0;M<=X;++M){if(M===X){if(W>X){if(U.charCodeAt(I+M)===47)return U.slice(I+M+1);if(M===0)return U.slice(I+M)}else C>X&&(E.charCodeAt(T+M)===47?Q=M:M===0&&(Q=0));break}var q=E.charCodeAt(T+M),N=U.charCodeAt(I+M);if(q!==N)break;q===47&&(Q=M)}var y="";for(M=T+Q+1;M<=F;++M)(M===F||E.charCodeAt(M)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+U.slice(I+Q):(I+=Q,U.charCodeAt(I)===47&&++I,U.slice(I))},_makeLong:function(E){return E},dirname:function(E){if(w(E),E.length===0)return".";for(var U=E.charCodeAt(0),T=U===47,F=-1,C=!0,I=E.length-1;I>=1;--I)if(U=E.charCodeAt(I),U===47){if(!C){F=I;break}}else C=!1;return F===-1?T?"/":".":T&&F===1?"//":E.slice(0,F)},basename:function(E,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');w(E);var T=0,F=-1,C=!0,I;if(U!==void 0&&U.length>0&&U.length<=E.length){if(U.length===E.length&&U===E)return"";var L=U.length-1,W=-1;for(I=E.length-1;I>=0;--I){var X=E.charCodeAt(I);if(X===47){if(!C){T=I+1;break}}else W===-1&&(C=!1,W=I+1),L>=0&&(X===U.charCodeAt(L)?--L===-1&&(F=I):(L=-1,F=W))}return T===F?F=W:F===-1&&(F=E.length),E.slice(T,F)}else{for(I=E.length-1;I>=0;--I)if(E.charCodeAt(I)===47){if(!C){T=I+1;break}}else F===-1&&(C=!1,F=I+1);return F===-1?"":E.slice(T,F)}},extname:function(E){w(E);for(var U=-1,T=0,F=-1,C=!0,I=0,L=E.length-1;L>=0;--L){var W=E.charCodeAt(L);if(W===47){if(!C){T=L+1;break}continue}F===-1&&(C=!1,F=L+1),W===46?U===-1?U=L:I!==1&&(I=1):U!==-1&&(I=-1)}return U===-1||F===-1||I===0||I===1&&U===F-1&&U===T+1?"":E.slice(U,F)},format:function(E){if(E===null||typeof E!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof E);return $("/",E)},parse:function(E){w(E);var U={root:"",dir:"",base:"",ext:"",name:""};if(E.length===0)return U;var T=E.charCodeAt(0),F=T===47,C;F?(U.root="/",C=1):C=0;for(var I=-1,L=0,W=-1,X=!0,Q=E.length-1,M=0;Q>=C;--Q){if(T=E.charCodeAt(Q),T===47){if(!X){L=Q+1;break}continue}W===-1&&(X=!1,W=Q+1),T===46?I===-1?I=Q:M!==1&&(M=1):I!==-1&&(M=-1)}return I===-1||W===-1||M===0||M===1&&I===W-1&&I===L+1?W!==-1&&(L===0&&F?U.base=U.name=E.slice(1,W):U.base=U.name=E.slice(L,W)):(L===0&&F?(U.name=E.slice(1,I),U.base=E.slice(1,W)):(U.name=E.slice(L,I),U.base=E.slice(L,W)),U.ext=E.slice(I,W)),L>0?U.dir=E.slice(0,L-1):F&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,h.exports=r}),Vj=r50(E50()),g0=Vj,U50=Vj,Kj=function(f){return f},Pj=function(){throw new Error("Not implemented")};g0.parse??=Pj;U50.parse??=Pj;var K$={resolve:g0.resolve.bind(g0),normalize:g0.normalize.bind(g0),isAbsolute:g0.isAbsolute.bind(g0),join:g0.join.bind(g0),relative:g0.relative.bind(g0),toNamespacedPath:Kj,dirname:g0.dirname.bind(g0),basename:g0.basename.bind(g0),extname:g0.extname.bind(g0),format:g0.format.bind(g0),parse:g0.parse.bind(g0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Kj},Zj={sep:"\\",delimiter:";",win32:void 0,...K$,posix:K$};K$.win32=Zj.win32=Zj;K$.posix=K$;var{resolve:T50,normalize:cO0,isAbsolute:gO0,join:xO0,relative:_O0,toNamespacedPath:nO0,dirname:eO0,basename:aO0,extname:pO0,format:oO0,parse:uO0,sep:tO0,delimiter:fl0}=K$;function qU(f,h){if(Array.isArray(h)&&!Array.isArray(f))return h;if(Array.isArray(h)&&Array.isArray(f))return h.map((s,$)=>{let r=f[$];if(Q$(s)&&Q$(r))return qU(r,s);return s});if(!Q$(h)||!Q$(f))return h;let w={...f};for(let s in h)if(Object.prototype.hasOwnProperty.call(h,s)){let $=h[s],r=w[s];if($===null||$===void 0)w[s]=$;else if(Q$($)&&Q$(r))w[s]=qU(r,$);else w[s]=$}return w}function Q$(f){return Boolean(f&&typeof f==="object"&&!Array.isArray(f))}async function F50({name:f,cwd:h,defaultConfig:w,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let r=T50(h||"../../../",`${f}.config`);try{let E=await import(r),U=E.default||E;return qU(w,U)}catch(E){return w}}if(!s)return console.warn("An API endpoint is required to load the client config."),w;try{let r=await fetch(s,{method:"GET",headers:$});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let E=await r.json();return qU(w,E)}catch(r){return console.error("Failed to load client config:",r),w}}var C50={verbose:!0},hl0=await F50({name:"dnsx",defaultConfig:C50});export{J40 as writeNameserversToConfig,P40 as updateNameservers,OL as parseResponse,O40 as parseProtocolTweaks,HO0 as hasUserDomainBeenAddedToCloud,V40 as getNameservers,n40 as formatOutput,PO0 as findHostedZone,JO0 as deleteHostedZoneRecords,ZO0 as deleteHostedZone,S0 as debugLog,lL as createTransport,VO0 as createHostedZone,hl0 as config,Mj as buildQuery,NO0 as addDomain,Sj as WireError,Qj as TransportType,gh as RecordType,vL as QClass,Rj as EDNSMode,Xj as DnsResponseCode,s4 as DnsFlags,bL as DnsEncoder,mL as DnsDecoder,H1 as DnsClient};
63
+ Query time: ${e50(h.showDuration,h.rawSeconds)}`);return w.join(`
64
+ `)}function PU(f,h){let w=gh[f.type]||f.type.toString(),s=c50[w]||"white",$=h.colors.enabled?i50.default[s](w.padEnd(6)):w.padEnd(6),r=n50(f.ttl,h.rawSeconds).padStart(8),E;switch(f.type){case 1:case 28:E=f.data;break;case 5:case 12:case 2:E=f.data;break;case 15:E=`${f.data.preference} ${f.data.exchange}`;break;case 16:E=`"${f.data}"`;break;case 33:E=`${f.data.priority} ${f.data.weight} ${f.data.port} ${f.data.target}`;break;case 257:E=`${f.data.flags} ${f.data.tag} "${f.data.value}"`;break;default:E=JSON.stringify(f.data)}return`${$} ${r} ${f.name.padEnd(30)} ${E}`}function n50(f,h){if(h)return f.toString();if(f<60)return`${f}s`;if(f<3600){let $=Math.floor(f/60),r=f%60;return`${$}m${r}s`}if(f<86400){let $=Math.floor(f/3600),r=Math.floor(f%3600/60);return`${$}h${r}m`}let w=Math.floor(f/86400),s=Math.floor(f%86400/3600);return`${w}d${s}h`}function e50(f,h){if(h)return`${f}ms`;if(f<1000)return`${f}ms`;return`${(f/1000).toFixed(2)}s`}var{create:a50,defineProperty:Kj,getOwnPropertyDescriptor:p50,getOwnPropertyNames:o50,getPrototypeOf:u50}=Object,t50=Object.prototype.hasOwnProperty,fr0=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),hr0=(f,h,w,s)=>{if(h&&typeof h=="object"||typeof h=="function")for(let $ of o50(h))!t50.call(f,$)&&$!==w&&Kj(f,$,{get:()=>h[$],enumerable:!(s=p50(h,$))||s.enumerable});return f},wr0=(f,h,w)=>(w=f!=null?a50(u50(f)):{},hr0(h||!f||!f.__esModule?Kj(w,"default",{value:f,enumerable:!0}):w,f)),sr0=fr0((f,h)=>{function w(E){if(typeof E!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function s(E,U){for(var T="",F=0,C=-1,I=0,L,W=0;W<=E.length;++W){if(W<E.length)L=E.charCodeAt(W);else{if(L===47)break;L=47}if(L===47){if(!(C===W-1||I===1))if(C!==W-1&&I===2){if(T.length<2||F!==2||T.charCodeAt(T.length-1)!==46||T.charCodeAt(T.length-2)!==46){if(T.length>2){var X=T.lastIndexOf("/");if(X!==T.length-1){X===-1?(T="",F=0):(T=T.slice(0,X),F=T.length-1-T.lastIndexOf("/")),C=W,I=0;continue}}else if(T.length===2||T.length===1){T="",F=0,C=W,I=0;continue}}U&&(T.length>0?T+="/..":T="..",F=2)}else T.length>0?T+="/"+E.slice(C+1,W):T=E.slice(C+1,W),F=W-C-1;C=W,I=0}else L===46&&I!==-1?++I:I=-1}return T}function $(E,U){var T=U.dir||U.root,F=U.base||(U.name||"")+(U.ext||"");return T?T===U.root?T+F:T+E+F:F}var r={resolve:function(){for(var E="",U=!1,T,F=arguments.length-1;F>=-1&&!U;F--){var C;F>=0?C=arguments[F]:(T===void 0&&(T=process.cwd()),C=T),w(C),C.length!==0&&(E=C+"/"+E,U=C.charCodeAt(0)===47)}return E=s(E,!U),U?E.length>0?"/"+E:"/":E.length>0?E:"."},normalize:function(E){if(w(E),E.length===0)return".";var U=E.charCodeAt(0)===47,T=E.charCodeAt(E.length-1)===47;return E=s(E,!U),E.length===0&&!U&&(E="."),E.length>0&&T&&(E+="/"),U?"/"+E:E},isAbsolute:function(E){return w(E),E.length>0&&E.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var E,U=0;U<arguments.length;++U){var T=arguments[U];w(T),T.length>0&&(E===void 0?E=T:E+="/"+T)}return E===void 0?".":r.normalize(E)},relative:function(E,U){if(w(E),w(U),E===U||(E=r.resolve(E),U=r.resolve(U),E===U))return"";for(var T=1;T<E.length&&E.charCodeAt(T)===47;++T);for(var F=E.length,C=F-T,I=1;I<U.length&&U.charCodeAt(I)===47;++I);for(var L=U.length,W=L-I,X=C<W?C:W,Q=-1,M=0;M<=X;++M){if(M===X){if(W>X){if(U.charCodeAt(I+M)===47)return U.slice(I+M+1);if(M===0)return U.slice(I+M)}else C>X&&(E.charCodeAt(T+M)===47?Q=M:M===0&&(Q=0));break}var q=E.charCodeAt(T+M),N=U.charCodeAt(I+M);if(q!==N)break;q===47&&(Q=M)}var y="";for(M=T+Q+1;M<=F;++M)(M===F||E.charCodeAt(M)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+U.slice(I+Q):(I+=Q,U.charCodeAt(I)===47&&++I,U.slice(I))},_makeLong:function(E){return E},dirname:function(E){if(w(E),E.length===0)return".";for(var U=E.charCodeAt(0),T=U===47,F=-1,C=!0,I=E.length-1;I>=1;--I)if(U=E.charCodeAt(I),U===47){if(!C){F=I;break}}else C=!1;return F===-1?T?"/":".":T&&F===1?"//":E.slice(0,F)},basename:function(E,U){if(U!==void 0&&typeof U!="string")throw new TypeError('"ext" argument must be a string');w(E);var T=0,F=-1,C=!0,I;if(U!==void 0&&U.length>0&&U.length<=E.length){if(U.length===E.length&&U===E)return"";var L=U.length-1,W=-1;for(I=E.length-1;I>=0;--I){var X=E.charCodeAt(I);if(X===47){if(!C){T=I+1;break}}else W===-1&&(C=!1,W=I+1),L>=0&&(X===U.charCodeAt(L)?--L===-1&&(F=I):(L=-1,F=W))}return T===F?F=W:F===-1&&(F=E.length),E.slice(T,F)}else{for(I=E.length-1;I>=0;--I)if(E.charCodeAt(I)===47){if(!C){T=I+1;break}}else F===-1&&(C=!1,F=I+1);return F===-1?"":E.slice(T,F)}},extname:function(E){w(E);for(var U=-1,T=0,F=-1,C=!0,I=0,L=E.length-1;L>=0;--L){var W=E.charCodeAt(L);if(W===47){if(!C){T=L+1;break}continue}F===-1&&(C=!1,F=L+1),W===46?U===-1?U=L:I!==1&&(I=1):U!==-1&&(I=-1)}return U===-1||F===-1||I===0||I===1&&U===F-1&&U===T+1?"":E.slice(U,F)},format:function(E){if(E===null||typeof E!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof E);return $("/",E)},parse:function(E){w(E);var U={root:"",dir:"",base:"",ext:"",name:""};if(E.length===0)return U;var T=E.charCodeAt(0),F=T===47,C;F?(U.root="/",C=1):C=0;for(var I=-1,L=0,W=-1,X=!0,Q=E.length-1,M=0;Q>=C;--Q){if(T=E.charCodeAt(Q),T===47){if(!X){L=Q+1;break}continue}W===-1&&(X=!1,W=Q+1),T===46?I===-1?I=Q:M!==1&&(M=1):I!==-1&&(M=-1)}return I===-1||W===-1||M===0||M===1&&I===W-1&&I===L+1?W!==-1&&(L===0&&F?U.base=U.name=E.slice(1,W):U.base=U.name=E.slice(L,W)):(L===0&&F?(U.name=E.slice(1,I),U.base=E.slice(1,W)):(U.name=E.slice(L,I),U.base=E.slice(L,W)),U.ext=E.slice(I,W)),L>0?U.dir=E.slice(0,L-1):F&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,h.exports=r}),Zj=wr0(sr0()),g0=Zj,$r0=Zj,Mj=function(f){return f},Jj=function(){throw new Error("Not implemented")};g0.parse??=Jj;$r0.parse??=Jj;var R$={resolve:g0.resolve.bind(g0),normalize:g0.normalize.bind(g0),isAbsolute:g0.isAbsolute.bind(g0),join:g0.join.bind(g0),relative:g0.relative.bind(g0),toNamespacedPath:Mj,dirname:g0.dirname.bind(g0),basename:g0.basename.bind(g0),extname:g0.extname.bind(g0),format:g0.format.bind(g0),parse:g0.parse.bind(g0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Mj},Qj={sep:"\\",delimiter:";",win32:void 0,...R$,posix:R$};R$.win32=Qj.win32=Qj;R$.posix=R$;var{resolve:rr0,normalize:HO0,isAbsolute:NO0,join:DO0,relative:qO0,toNamespacedPath:kO0,dirname:yO0,basename:jO0,extname:OO0,format:lO0,parse:vO0,sep:bO0,delimiter:mO0}=R$;function qU(f,h){if(Array.isArray(h)&&!Array.isArray(f))return h;if(Array.isArray(h)&&Array.isArray(f))return h.map((s,$)=>{let r=f[$];if(A$(s)&&A$(r))return qU(r,s);return s});if(!A$(h)||!A$(f))return h;let w={...f};for(let s in h)if(Object.prototype.hasOwnProperty.call(h,s)){let $=h[s],r=w[s];if($===null||$===void 0)w[s]=$;else if(A$($)&&A$(r))w[s]=qU(r,$);else w[s]=$}return w}function A$(f){return Boolean(f&&typeof f==="object"&&!Array.isArray(f))}async function Er0({name:f,cwd:h,defaultConfig:w,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let r=rr0(h||"../../../",`${f}.config`);try{let E=await import(r),U=E.default||E;return qU(w,U)}catch(E){return w}}if(!s)return console.warn("An API endpoint is required to load the client config."),w;try{let r=await fetch(s,{method:"GET",headers:$});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let E=await r.json();return qU(w,E)}catch(r){return console.error("Failed to load client config:",r),w}}var Ur0={verbose:!0},dO0=await Er0({name:"dnsx",defaultConfig:Ur0});export{Q50 as writeNameserversToConfig,Z50 as updateNameservers,OL as parseResponse,k50 as parseProtocolTweaks,WO0 as hasUserDomainBeenAddedToCloud,K50 as getNameservers,g50 as formatOutput,GO0 as findHostedZone,LO0 as deleteHostedZoneRecords,IO0 as deleteHostedZone,S0 as debugLog,lL as createTransport,BO0 as createHostedZone,dO0 as config,Sj as buildQuery,zO0 as addDomain,Rj as WireError,Yj as TransportType,gh as RecordType,vL as QClass,zj as EDNSMode,Aj as DnsResponseCode,t4 as DnsFlags,bL as DnsEncoder,mL as DnsDecoder,H1 as DnsClient};