@activepieces/piece-amazon-bedrock 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -17
- package/src/i18n/translation.json +0 -26
- package/src/index.js +109 -23
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/custom-api-call.d.ts +0 -16
- package/src/lib/actions/custom-api-call.d.ts.map +0 -1
- package/src/lib/actions/custom-api-call.js +0 -174
- package/src/lib/actions/custom-api-call.js.map +0 -1
- package/src/lib/actions/generate-content-from-image.d.ts +0 -22
- package/src/lib/actions/generate-content-from-image.d.ts.map +0 -1
- package/src/lib/actions/generate-content-from-image.js +0 -126
- package/src/lib/actions/generate-content-from-image.js.map +0 -1
- package/src/lib/actions/generate-embeddings.d.ts +0 -16
- package/src/lib/actions/generate-embeddings.d.ts.map +0 -1
- package/src/lib/actions/generate-embeddings.js +0 -153
- package/src/lib/actions/generate-embeddings.js.map +0 -1
- package/src/lib/actions/generate-image.d.ts +0 -17
- package/src/lib/actions/generate-image.d.ts.map +0 -1
- package/src/lib/actions/generate-image.js +0 -140
- package/src/lib/actions/generate-image.js.map +0 -1
- package/src/lib/actions/send-prompt.d.ts +0 -25
- package/src/lib/actions/send-prompt.d.ts.map +0 -1
- package/src/lib/actions/send-prompt.js +0 -160
- package/src/lib/actions/send-prompt.js.map +0 -1
- package/src/lib/auth.d.ts +0 -6
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -109
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common.d.ts +0 -37
- package/src/lib/common.d.ts.map +0 -1
- package/src/lib/common.js +0 -239
- package/src/lib/common.js.map +0 -1
package/src/index.js
CHANGED
|
@@ -1,23 +1,109 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
description: 'Build generative AI applications with foundation models',
|
|
15
|
-
|
|
16
|
-
minimumSupportedRelease: '0.36.1',
|
|
17
|
-
|
|
18
|
-
categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
"use strict";var A5=Object.create;var su=Object.defineProperty;var R5=Object.getOwnPropertyDescriptor;var P5=Object.getOwnPropertyNames;var C5=Object.getPrototypeOf,T5=Object.prototype.hasOwnProperty;var i=(e,t)=>su(e,"name",{value:t,configurable:!0});var D=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var N=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},bt=(e,t)=>{for(var r in t)su(e,r,{get:t[r],enumerable:!0})},pI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P5(t))!T5.call(e,o)&&o!==r&&su(e,o,{get:()=>t[o],enumerable:!(n=R5(t,o))||n.enumerable});return e};var I=(e,t,r)=>(r=e!=null?A5(C5(e)):{},pI(t||!e||!e.__esModule?su(r,"default",{value:e,enumerable:!0}):r,e)),Q=e=>pI(su({},"__esModule",{value:!0}),e);var Ow=N((Mw,Sp)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function l(g,v){if(g.indexOf("::")!==g.lastIndexOf("::"))return null;let A=0,R=-1,b=(g.match(u.zoneIndex)||[])[0],$,G;for(b&&(b=b.substring(1),g=g.replace(/%.+$/,""));(R=g.indexOf(":",R+1))>=0;)A++;if(g.substr(0,2)==="::"&&A--,g.substr(-2,2)==="::"&&A--,A>v)return null;for(G=v-A,$=":";G--;)$+="0:";return g=g.replace("::",$),g[0]===":"&&(g=g.slice(1)),g[g.length-1]===":"&&(g=g.slice(0,-1)),v=(function(){let Y=g.split(":"),pe=[];for(let me=0;me<Y.length;me++)pe.push(parseInt(Y[me],16));return pe})(),{parts:v,zoneId:b}}i(l,"expandIPv6");function d(g,v,A,R){if(g.length!==v.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,$;for(;R>0;){if($=A-R,$<0&&($=0),g[b]>>$!==v[b]>>$)return!1;R-=A,b+=1}return!0}i(d,"matchCIDR");function _(g){if(o.test(g))return parseInt(g,16);if(g[0]==="0"&&!isNaN(parseInt(g[1],10))){if(n.test(g))return parseInt(g,8);throw new Error(`ipaddr: cannot parse ${g} as octal`)}return parseInt(g,10)}i(_,"parseIntAuto");function y(g,v){for(;g.length<v;)g=`0${g}`;return g}i(y,"padPart");let E={};E.IPv4=(function(){function g(v){if(v.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let A,R;for(A=0;A<v.length;A++)if(R=v[A],!(0<=R&&R<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=v}return i(g,"IPv4"),g.prototype.SpecialRanges={unspecified:[[new g([0,0,0,0]),8]],broadcast:[[new g([255,255,255,255]),32]],multicast:[[new g([224,0,0,0]),4]],linkLocal:[[new g([169,254,0,0]),16]],loopback:[[new g([127,0,0,0]),8]],carrierGradeNat:[[new g([100,64,0,0]),10]],private:[[new g([10,0,0,0]),8],[new g([172,16,0,0]),12],[new g([192,168,0,0]),16]],reserved:[[new g([192,0,0,0]),24],[new g([192,0,2,0]),24],[new g([192,88,99,0]),24],[new g([198,18,0,0]),15],[new g([198,51,100,0]),24],[new g([203,0,113,0]),24],[new g([240,0,0,0]),4]],as112:[[new g([192,175,48,0]),24],[new g([192,31,196,0]),24]],amt:[[new g([192,52,193,0]),24]]},g.prototype.kind=function(){return"ipv4"},g.prototype.match=function(v,A){let R;if(A===void 0&&(R=v,v=R[0],A=R[1]),v.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,v.octets,8,A)},g.prototype.prefixLengthFromSubnetMask=function(){let v=0,A=!1,R={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},b,$,G;for(b=3;b>=0;b-=1)if($=this.octets[b],$ in R){if(G=R[$],A&&G!==0)return null;G!==8&&(A=!0),v+=G}else return null;return 32-v},g.prototype.range=function(){return E.subnetMatch(this,this.SpecialRanges)},g.prototype.toByteArray=function(){return this.octets.slice(0)},g.prototype.toIPv4MappedAddress=function(){return E.IPv6.parse(`::ffff:${this.toString()}`)},g.prototype.toNormalizedString=function(){return this.toString()},g.prototype.toString=function(){return this.octets.join(".")},g})(),E.IPv4.broadcastAddressFromCIDR=function(g){try{let v=this.parseCIDR(g),A=v[0].toByteArray(),R=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),b=[],$=0;for(;$<4;)b.push(parseInt(A[$],10)|parseInt(R[$],10)^255),$++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},E.IPv4.isIPv4=function(g){return this.parser(g)!==null},E.IPv4.isValid=function(g){try{return new this(this.parser(g)),!0}catch{return!1}},E.IPv4.isValidCIDR=function(g){try{return this.parseCIDR(g),!0}catch{return!1}},E.IPv4.isValidFourPartDecimal=function(g){return!!(E.IPv4.isValid(g)&&g.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},E.IPv4.isValidCIDRFourPartDecimal=function(g){let v=g.match(/^(.+)\/(\d+)$/);return!E.IPv4.isValidCIDR(g)||!v?!1:E.IPv4.isValidFourPartDecimal(v[1])},E.IPv4.networkAddressFromCIDR=function(g){let v,A,R,b,$;try{for(v=this.parseCIDR(g),R=v[0].toByteArray(),$=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),b=[],A=0;A<4;)b.push(parseInt(R[A],10)&parseInt($[A],10)),A++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},E.IPv4.parse=function(g){let v=this.parser(g);if(v===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(v)},E.IPv4.parseCIDR=function(g){let v;if(v=g.match(/^(.+)\/(\d+)$/)){let A=parseInt(v[2]);if(A>=0&&A<=32){let R=[this.parse(v[1]),A];return Object.defineProperty(R,"toString",{value:i(function(){return this.join("/")},"value")}),R}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},E.IPv4.parser=function(g){let v,A,R;if(v=g.match(r.fourOctet))return(function(){let b=v.slice(1,6),$=[];for(let G=0;G<b.length;G++)A=b[G],$.push(_(A));return $})();if(v=g.match(r.longValue)){if(R=_(v[1]),R>4294967295||R<0)throw new Error("ipaddr: address outside defined range");return(function(){let b=[],$;for($=0;$<=24;$+=8)b.push(R>>$&255);return b})().reverse()}else return(v=g.match(r.twoOctet))?(function(){let b=v.slice(1,4),$=[];if(R=_(b[1]),R>16777215||R<0)throw new Error("ipaddr: address outside defined range");return $.push(_(b[0])),$.push(R>>16&255),$.push(R>>8&255),$.push(R&255),$})():(v=g.match(r.threeOctet))?(function(){let b=v.slice(1,5),$=[];if(R=_(b[2]),R>65535||R<0)throw new Error("ipaddr: address outside defined range");return $.push(_(b[0])),$.push(_(b[1])),$.push(R>>8&255),$.push(R&255),$})():null},E.IPv4.subnetMaskFromPrefixLength=function(g){if(g=parseInt(g),g<0||g>32)throw new Error("ipaddr: invalid IPv4 prefix length");let v=[0,0,0,0],A=0,R=Math.floor(g/8);for(;A<R;)v[A]=255,A++;return R<4&&(v[R]=Math.pow(2,g%8)-1<<8-g%8),new this(v)},E.IPv6=(function(){function g(v,A){let R,b;if(v.length===16)for(this.parts=[],R=0;R<=14;R+=2)this.parts.push(v[R]<<8|v[R+1]);else if(v.length===8)this.parts=v;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(R=0;R<this.parts.length;R++)if(b=this.parts[R],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");A&&(this.zoneId=A)}return i(g,"IPv6"),g.prototype.SpecialRanges={unspecified:[new g([0,0,0,0,0,0,0,0]),128],linkLocal:[new g([65152,0,0,0,0,0,0,0]),10],multicast:[new g([65280,0,0,0,0,0,0,0]),8],loopback:[new g([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new g([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new g([0,0,0,0,0,65535,0,0]),96],discard:[new g([256,0,0,0,0,0,0,0]),64],rfc6145:[new g([0,0,0,0,65535,0,0,0]),96],rfc6052:[new g([100,65435,0,0,0,0,0,0]),96],"6to4":[new g([8194,0,0,0,0,0,0,0]),16],teredo:[new g([8193,0,0,0,0,0,0,0]),32],benchmarking:[new g([8193,2,0,0,0,0,0,0]),48],amt:[new g([8193,3,0,0,0,0,0,0]),32],as112v6:[[new g([8193,4,274,0,0,0,0,0]),48],[new g([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new g([8193,16,0,0,0,0,0,0]),28],orchid2:[new g([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new g([8193,48,0,0,0,0,0,0]),28],reserved:[[new g([8193,0,0,0,0,0,0,0]),23],[new g([8193,3512,0,0,0,0,0,0]),32]]},g.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},g.prototype.kind=function(){return"ipv6"},g.prototype.match=function(v,A){let R;if(A===void 0&&(R=v,v=R[0],A=R[1]),v.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,v.parts,16,A)},g.prototype.prefixLengthFromSubnetMask=function(){let v=0,A=!1,R={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},b,$;for(let G=7;G>=0;G-=1)if(b=this.parts[G],b in R){if($=R[b],A&&$!==0)return null;$!==16&&(A=!0),v+=$}else return null;return 128-v},g.prototype.range=function(){return E.subnetMatch(this,this.SpecialRanges)},g.prototype.toByteArray=function(){let v,A=[],R=this.parts;for(let b=0;b<R.length;b++)v=R[b],A.push(v>>8),A.push(v&255);return A},g.prototype.toFixedLengthString=function(){let v=(function(){let R=[];for(let b=0;b<this.parts.length;b++)R.push(y(this.parts[b].toString(16),4));return R}).call(this).join(":"),A="";return this.zoneId&&(A=`%${this.zoneId}`),v+A},g.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let v=this.parts.slice(-2),A=v[0],R=v[1];return new E.IPv4([A>>8,A&255,R>>8,R&255])},g.prototype.toNormalizedString=function(){let v=(function(){let R=[];for(let b=0;b<this.parts.length;b++)R.push(this.parts[b].toString(16));return R}).call(this).join(":"),A="";return this.zoneId&&(A=`%${this.zoneId}`),v+A},g.prototype.toRFC5952String=function(){let v=/((^|:)(0(:|$)){2,})/g,A=this.toNormalizedString(),R=0,b=-1,$;for(;$=v.exec(A);)$[0].length>b&&(R=$.index,b=$[0].length);return b<0?A:`${A.substring(0,R)}::${A.substring(R+b)}`},g.prototype.toString=function(){return this.toRFC5952String()},g})(),E.IPv6.broadcastAddressFromCIDR=function(g){try{let v=this.parseCIDR(g),A=v[0].toByteArray(),R=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),b=[],$=0;for(;$<16;)b.push(parseInt(A[$],10)|parseInt(R[$],10)^255),$++;return new this(b)}catch(v){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${v})`)}},E.IPv6.isIPv6=function(g){return this.parser(g)!==null},E.IPv6.isValid=function(g){if(typeof g=="string"&&g.indexOf(":")===-1)return!1;try{let v=this.parser(g);return new this(v.parts,v.zoneId),!0}catch{return!1}},E.IPv6.isValidCIDR=function(g){if(typeof g=="string"&&g.indexOf(":")===-1)return!1;try{return this.parseCIDR(g),!0}catch{return!1}},E.IPv6.networkAddressFromCIDR=function(g){let v,A,R,b,$;try{for(v=this.parseCIDR(g),R=v[0].toByteArray(),$=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),b=[],A=0;A<16;)b.push(parseInt(R[A],10)&parseInt($[A],10)),A++;return new this(b)}catch(G){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${G})`)}},E.IPv6.parse=function(g){let v=this.parser(g);if(v.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(v.parts,v.zoneId)},E.IPv6.parseCIDR=function(g){let v,A,R;if((A=g.match(/^(.+)\/(\d+)$/))&&(v=parseInt(A[2]),v>=0&&v<=128))return R=[this.parse(A[1]),v],Object.defineProperty(R,"toString",{value:i(function(){return this.join("/")},"value")}),R;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},E.IPv6.parser=function(g){let v,A,R,b,$,G;if(R=g.match(u.deprecatedTransitional))return this.parser(`::ffff:${R[1]}`);if(u.native.test(g))return l(g,8);if((R=g.match(u.transitional))&&(G=R[6]||"",v=R[1],R[1].endsWith("::")||(v=v.slice(0,-1)),v=l(v+G,6),v.parts)){for($=[parseInt(R[2]),parseInt(R[3]),parseInt(R[4]),parseInt(R[5])],A=0;A<$.length;A++)if(b=$[A],!(0<=b&&b<=255))return null;return v.parts.push($[0]<<8|$[1]),v.parts.push($[2]<<8|$[3]),{parts:v.parts,zoneId:v.zoneId}}return null},E.IPv6.subnetMaskFromPrefixLength=function(g){if(g=parseInt(g),g<0||g>128)throw new Error("ipaddr: invalid IPv6 prefix length");let v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],A=0,R=Math.floor(g/8);for(;A<R;)v[A]=255,A++;return R<16&&(v[R]=Math.pow(2,g%8)-1<<8-g%8),new this(v)},E.fromByteArray=function(g){let v=g.length;if(v===4)return new E.IPv4(g);if(v===16)return new E.IPv6(g);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},E.isValid=function(g){return E.IPv6.isValid(g)||E.IPv4.isValid(g)},E.isValidCIDR=function(g){return E.IPv6.isValidCIDR(g)||E.IPv4.isValidCIDR(g)},E.parse=function(g){if(E.IPv6.isValid(g))return E.IPv6.parse(g);if(E.IPv4.isValid(g))return E.IPv4.parse(g);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},E.parseCIDR=function(g){try{return E.IPv6.parseCIDR(g)}catch{try{return E.IPv4.parseCIDR(g)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},E.process=function(g){let v=this.parse(g);return v.kind()==="ipv6"&&v.isIPv4MappedAddress()?v.toIPv4Address():v},E.subnetMatch=function(g,v,A){let R,b,$,G;A==null&&(A="unicast");for(b in v)if(Object.prototype.hasOwnProperty.call(v,b)){for($=v[b],$[0]&&!($[0]instanceof Array)&&($=[$]),R=0;R<$.length;R++)if(G=$[R],g.kind()===G[0].kind()&&g.match.apply(g,G))return b}return A},typeof Sp<"u"&&Sp.exports?Sp.exports=E:e.ipaddr=E})(Mw)});var Uo=N(Ke=>{"use strict";Ke.HttpAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(Ke.HttpAuthLocation||(Ke.HttpAuthLocation={}));Ke.HttpApiKeyAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(Ke.HttpApiKeyAuthLocation||(Ke.HttpApiKeyAuthLocation={}));Ke.EndpointURLScheme=void 0;(function(e){e.HTTP="http",e.HTTPS="https"})(Ke.EndpointURLScheme||(Ke.EndpointURLScheme={}));Ke.AlgorithmId=void 0;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Ke.AlgorithmId||(Ke.AlgorithmId={}));var WZ=i(e=>{let t=[];return e.sha256!==void 0&&t.push({algorithmId:i(()=>Ke.AlgorithmId.SHA256,"algorithmId"),checksumConstructor:i(()=>e.sha256,"checksumConstructor")}),e.md5!=null&&t.push({algorithmId:i(()=>Ke.AlgorithmId.MD5,"algorithmId"),checksumConstructor:i(()=>e.md5,"checksumConstructor")}),{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},"getChecksumConfiguration"),JZ=i(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},"resolveChecksumRuntimeConfig"),KZ=i(e=>WZ(e),"getDefaultClientConfiguration"),ZZ=i(e=>JZ(e),"resolveDefaultRuntimeConfig");Ke.FieldPosition=void 0;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(Ke.FieldPosition||(Ke.FieldPosition={}));var XZ="__smithy_context";Ke.IniSectionType=void 0;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(Ke.IniSectionType||(Ke.IniSectionType={}));Ke.RequestHandlerProtocol=void 0;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(Ke.RequestHandlerProtocol||(Ke.RequestHandlerProtocol={}));Ke.SMITHY_CONTEXT_KEY=XZ;Ke.getDefaultClientConfiguration=KZ;Ke.resolveDefaultRuntimeConfig=ZZ});var Me=N(Ti=>{"use strict";var YZ=Uo(),QZ=i(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),"getHttpHandlerExtensionConfiguration"),e9=i(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Iv=class{static{i(this,"Field")}name;kind;values;constructor({name:t,kind:r=YZ.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}},wv=class{static{i(this,"Fields")}entries={};encoding;constructor({fields:t=[],encoding:r="utf-8"}){t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}},$v=class e{static{i(this,"HttpRequest")}method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let r=new e({...t,headers:{...t.headers}});return r.query&&(r.query=t9(r.query)),r}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return e.clone(this)}};function t9(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}i(t9,"cloneQuery");var kv=class{static{i(this,"HttpResponse")}statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};function r9(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}i(r9,"isValidHostname");Ti.Field=Iv;Ti.Fields=wv;Ti.HttpRequest=$v;Ti.HttpResponse=kv;Ti.getHttpHandlerExtensionConfiguration=QZ;Ti.isValidHostname=r9;Ti.resolveHttpHandlerRuntimeConfig=e9});var $$=N(Bs=>{"use strict";var T$=Me();function n9(e){let t=e.signer,r=e.signer,n=Object.assign(e,{eventSigner:t,messageSigner:r}),o=n.eventStreamPayloadHandlerProvider(n);return Object.assign(n,{eventStreamPayloadHandler:o})}i(n9,"resolveEventStreamConfig");var x$=i(e=>(t,r)=>async n=>{let{request:o}=n;return T$.HttpRequest.isInstance(o)?e.eventStreamPayloadHandler.handle(t,n,r):t(n)},"eventStreamHandlingMiddleware"),b$={tags:["EVENT_STREAM","SIGNATURE","HANDLE"],name:"eventStreamHandlingMiddleware",relation:"after",toMiddleware:"awsAuthMiddleware",override:!0},I$=i(e=>async t=>{let{request:r}=t;return T$.HttpRequest.isInstance(r)?(r.headers={...r.headers,"content-type":"application/vnd.amazon.eventstream","x-amz-content-sha256":"STREAMING-AWS4-HMAC-SHA256-EVENTS"},e({...t,request:r})):e(t)},"eventStreamHeaderMiddleware"),w$={step:"build",tags:["EVENT_STREAM","HEADER","CONTENT_TYPE","CONTENT_SHA256"],name:"eventStreamHeaderMiddleware",override:!0},o9=i(e=>({applyToStack:i(t=>{t.addRelativeTo(x$(e),b$),t.add(I$,w$)},"applyToStack")}),"getEventStreamPlugin");Bs.eventStreamHandlingMiddleware=x$;Bs.eventStreamHandlingMiddlewareOptions=b$;Bs.eventStreamHeaderMiddleware=I$;Bs.eventStreamHeaderMiddlewareOptions=w$;Bs.getEventStreamPlugin=o9;Bs.resolveEventStreamConfig=n9});var xi=N(bu=>{"use strict";var i9=Me();function s9(e){return e}i(s9,"resolveHostHeaderConfig");var k$=i(e=>t=>async r=>{if(!i9.HttpRequest.isInstance(r.request))return t(r);let{request:n}=r,{handlerProtocol:o=""}=e.requestHandler.metadata||{};if(o.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let a=n.hostname;n.port!=null&&(a+=`:${n.port}`),n.headers.host=a}return t(r)},"hostHeaderMiddleware"),D$={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},a9=i(e=>({applyToStack:i(t=>{t.add(k$(e),D$)},"applyToStack")}),"getHostHeaderPlugin");bu.getHostHeaderPlugin=a9;bu.hostHeaderMiddleware=k$;bu.hostHeaderMiddlewareOptions=D$;bu.resolveHostHeaderConfig=s9});var bi=N(Ap=>{"use strict";var M$=i(()=>(e,t)=>async r=>{try{let n=await e(r),{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:u={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:d}=u,_=l??t.inputFilterSensitiveLog,y=d??t.outputFilterSensitiveLog,{$metadata:E,...g}=n.output;return c?.info?.({clientName:o,commandName:a,input:_(r.input),output:y(g),metadata:E}),n}catch(n){let{clientName:o,commandName:a,logger:c,dynamoDbDocumentClientOptions:u={}}=t,{overrideInputFilterSensitiveLog:l}=u,d=l??t.inputFilterSensitiveLog;throw c?.error?.({clientName:o,commandName:a,input:d(r.input),error:n,metadata:n.$metadata}),n}},"loggerMiddleware"),O$={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},c9=i(e=>({applyToStack:i(t=>{t.add(M$(),O$)},"applyToStack")}),"getLoggerPlugin");Ap.getLoggerPlugin=c9;Ap.loggerMiddleware=M$;Ap.loggerMiddlewareOptions=O$});var N$={};bt(N$,{InvokeStore:()=>Nv,InvokeStoreBase:()=>wu});var Iu,Dv,wu,Mv,Ov,Nv,L$=D(()=>{Iu={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")},Dv=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");Dv||(globalThis.awslambda=globalThis.awslambda||{});wu=class{static{i(this,"InvokeStoreBase")}static PROTECTED_KEYS=Iu;isProtectedKey(t){return Object.values(Iu).includes(t)}getRequestId(){return this.get(Iu.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(Iu.X_RAY_TRACE_ID)}getTenantId(){return this.get(Iu.TENANT_ID)}},Mv=class extends wu{static{i(this,"InvokeStoreSingle")}currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(t){return this.currentContext?.[t]}set(t,r){if(this.isProtectedKey(t))throw new Error(`Cannot modify protected Lambda context field: ${String(t)}`);this.currentContext=this.currentContext||{},this.currentContext[t]=r}run(t,r){return this.currentContext=t,r()}},Ov=class e extends wu{static{i(this,"InvokeStoreMulti")}als;static async create(){let t=new e,r=await import("node:async_hooks");return t.als=new r.AsyncLocalStorage,t}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(t){return this.als.getStore()?.[t]}set(t,r){if(this.isProtectedKey(t))throw new Error(`Cannot modify protected Lambda context field: ${String(t)}`);let n=this.als.getStore();if(!n)throw new Error("No context available");n[t]=r}run(t,r){return this.als.run(t,r)}};(function(e){let t=null;async function r(n){return t||(t=(async()=>{let a=n===!0||"AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await Ov.create():new Mv;return!Dv&&globalThis.awslambda?.InvokeStore?globalThis.awslambda.InvokeStore:(!Dv&&globalThis.awslambda&&(globalThis.awslambda.InvokeStore=a),a)})()),t}i(r,"getInstanceAsync"),e.getInstanceAsync=r,e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:i(()=>{t=null,globalThis.awslambda?.InvokeStore&&delete globalThis.awslambda.InvokeStore,globalThis.awslambda={InvokeStore:void 0}},"reset")}:void 0})(Nv||(Nv={}))});var z$=N(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.recursionDetectionMiddleware=void 0;var u9=(L$(),Q(N$)),l9=Me(),Lv="X-Amzn-Trace-Id",d9="AWS_LAMBDA_FUNCTION_NAME",p9="_X_AMZN_TRACE_ID",m9=i(()=>e=>async t=>{let{request:r}=t;if(!l9.HttpRequest.isInstance(r))return e(t);let n=Object.keys(r.headers??{}).find(_=>_.toLowerCase()===Lv.toLowerCase())??Lv;if(r.headers.hasOwnProperty(n))return e(t);let o=process.env[d9],a=process.env[p9],l=(await u9.InvokeStore.getInstanceAsync())?.getXRayTraceId()??a,d=i(_=>typeof _=="string"&&_.length>0,"nonEmptyString");return d(o)&&d(l)&&(r.headers[Lv]=l),e({...t,request:r})},"recursionDetectionMiddleware");Rp.recursionDetectionMiddleware=m9});var Ii=N(ja=>{"use strict";var $u=z$(),f9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},g9=i(e=>({applyToStack:i(t=>{t.add($u.recursionDetectionMiddleware(),f9)},"applyToStack")}),"getRecursionDetectionPlugin");ja.getRecursionDetectionPlugin=g9;Object.prototype.hasOwnProperty.call($u,"__proto__")&&!Object.prototype.hasOwnProperty.call(ja,"__proto__")&&Object.defineProperty(ja,"__proto__",{enumerable:!0,value:$u.__proto__});Object.keys($u).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ja,e)&&(ja[e]=$u[e])})});var zv,h9,U$=D(()=>{zv=I(Uo()),h9=i(e=>e[zv.SMITHY_CONTEXT_KEY]||(e[zv.SMITHY_CONTEXT_KEY]={}),"getSmithyContext")});var It=N(Uv=>{"use strict";var B$=Uo(),y9=i(e=>e[B$.SMITHY_CONTEXT_KEY]||(e[B$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),_9=i(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider");Uv.getSmithyContext=y9;Uv.normalizeProvider=_9});var G$,F$=D(()=>{G$=i((e,t)=>{if(!t||t.length===0)return e;let r=[];for(let n of t)for(let o of e)o.schemeId.split("#")[1]===n&&r.push(o);for(let n of e)r.find(({schemeId:o})=>o===n.schemeId)||r.push(n);return r},"resolveAuthOptions")});function E9(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}var j$,ku,Pp=D(()=>{j$=I(It());F$();i(E9,"convertHttpAuthSchemesToMap");ku=i((e,t)=>(r,n)=>async o=>{let a=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,o.input)),c=e.authSchemePreference?await e.authSchemePreference():[],u=G$(a,c),l=E9(e.httpAuthSchemes),d=(0,j$.getSmithyContext)(n),_=[];for(let y of u){let E=l.get(y.schemeId);if(!E){_.push(`HttpAuthScheme \`${y.schemeId}\` was not enabled for this service.`);continue}let g=E.identityProvider(await t.identityProviderConfigProvider(e));if(!g){_.push(`HttpAuthScheme \`${y.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:v={},signingProperties:A={}}=y.propertiesExtractor?.(e,n)||{};y.identityProperties=Object.assign(y.identityProperties||{},v),y.signingProperties=Object.assign(y.signingProperties||{},A),d.selectedHttpAuthScheme={httpAuthOption:y,identity:await g(y.identityProperties),signer:E.signer};break}if(!d.selectedHttpAuthScheme)throw new Error(_.join(`
|
|
2
|
+
`));return r(o)},"httpAuthSchemeMiddleware")});var q$,Bo,V$=D(()=>{Pp();q$={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Bo=i((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i(n=>{n.addRelativeTo(ku(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),q$)},"applyToStack")}),"getHttpAuthSchemeEndpointRuleSetPlugin")});var H$,S9,W$=D(()=>{Pp();H$={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},S9=i((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i(n=>{n.addRelativeTo(ku(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),H$)},"applyToStack")}),"getHttpAuthSchemePlugin")});var J$=D(()=>{Pp();V$();W$()});var K$,Z$,v9,A9,Bv,Gv=D(()=>{K$=I(Me()),Z$=I(It()),v9=i(e=>t=>{throw t},"defaultErrorHandler"),A9=i((e,t)=>{},"defaultSuccessHandler"),Bv=i(e=>(t,r)=>async n=>{if(!K$.HttpRequest.isInstance(n.request))return t(n);let a=(0,Z$.getSmithyContext)(r).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:c={}},identity:u,signer:l}=a,d=await t({...n,request:await l.sign(n.request,u,c)}).catch((l.errorHandler||v9)(c));return(l.successHandler||A9)(d.response,c),d},"httpSigningMiddleware")});var X$,Go,Y$=D(()=>{Gv();X$={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Go=i(e=>({applyToStack:i(t=>{t.addRelativeTo(Bv(e),X$)},"applyToStack")}),"getHttpSigningPlugin")});var Q$=D(()=>{Gv();Y$()});var wi,ek=D(()=>{wi=i(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider")});function tk(e,t,r,n,o){return i(async function*(c,u,...l){let d=u,_=c.startingToken??d[r],y=!0,E;for(;y;){if(d[r]=_,o&&(d[o]=d[o]??c.pageSize),c.client instanceof e)E=await R9(t,c.client,u,c.withCommand,...l);else throw new Error(`Invalid client, expected instance of ${e.name}`);yield E;let g=_;_=P9(E,n),y=!!(_&&(!c.stopOnSameToken||_!==g))}return void 0},"paginateOperation")}var R9,P9,rk=D(()=>{R9=i(async(e,t,r,n=a=>a,...o)=>{let a=new e(r);return a=n(a)??a,await t.send(a,...o)},"makePagedClientRequest");i(tk,"createPaginator");P9=i((e,t)=>{let r=e,n=t.split(".");for(let o of n){if(!r||typeof r!="object")return;r=r[o]}return r},"get")});var Cp=N(nk=>{"use strict";var C9=i(e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer");nk.isArrayBuffer=C9});var qa=N(jv=>{"use strict";var T9=Cp(),Fv=require("buffer"),x9=i((e,t=0,r=e.byteLength-t)=>{if(!T9.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Fv.Buffer.from(e,t,r)},"fromArrayBuffer"),b9=i((e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Fv.Buffer.from(e,t):Fv.Buffer.from(e)},"fromString");jv.fromArrayBuffer=x9;jv.fromString=b9});var ok=N(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.fromBase64=void 0;var I9=qa(),w9=/^[A-Za-z0-9+/]*={0,2}$/,$9=i(e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!w9.exec(e))throw new TypeError("Invalid base64 string.");let t=(0,I9.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},"fromBase64");Tp.fromBase64=$9});var ft=N(xp=>{"use strict";var ik=qa(),sk=i(e=>{let t=ik.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),k9=i(e=>typeof e=="string"?sk(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array"),D9=i(e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return ik.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8");xp.fromUtf8=sk;xp.toUint8Array=k9;xp.toUtf8=D9});var ak=N(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.toBase64=void 0;var M9=qa(),O9=ft(),N9=i(e=>{let t;if(typeof e=="string"?t=(0,O9.fromUtf8)(e):t=e,typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,M9.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")},"toBase64");bp.toBase64=N9});var gt=N(Fo=>{"use strict";var Ip=ok(),wp=ak();Object.prototype.hasOwnProperty.call(Ip,"__proto__")&&!Object.prototype.hasOwnProperty.call(Fo,"__proto__")&&Object.defineProperty(Fo,"__proto__",{enumerable:!0,value:Ip.__proto__});Object.keys(Ip).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Fo,e)&&(Fo[e]=Ip[e])});Object.prototype.hasOwnProperty.call(wp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Fo,"__proto__")&&Object.defineProperty(Fo,"__proto__",{enumerable:!0,value:wp.__proto__});Object.keys(wp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Fo,e)&&(Fo[e]=wp[e])})});var Vv=N($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.ChecksumStream=void 0;var L9=gt(),z9=require("stream"),qv=class extends z9.Duplex{static{i(this,"ChecksumStream")}expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;pendingCallback=null;constructor({expectedChecksum:t,checksum:r,source:n,checksumSourceLocation:o,base64Encoder:a}){if(super(),typeof n.pipe=="function")this.source=n;else throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);this.base64Encoder=a??L9.toBase64,this.expectedChecksum=t,this.checksum=r,this.checksumSourceLocation=o,this.source.pipe(this)}_read(t){if(this.pendingCallback){let r=this.pendingCallback;this.pendingCallback=null,r()}}_write(t,r,n){try{if(this.checksum.update(t),!this.push(t)){this.pendingCallback=n;return}}catch(o){return n(o)}return n()}async _final(t){try{let r=await this.checksum.digest(),n=this.base64Encoder(r);if(this.expectedChecksum!==n)return t(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${n}" in response header "${this.checksumSourceLocation}".`))}catch(r){return t(r)}return this.push(null),t()}};$p.ChecksumStream=qv});var jo=N(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.isBlob=Va.isReadableStream=void 0;var U9=i(e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),"isReadableStream");Va.isReadableStream=U9;var B9=i(e=>typeof Blob=="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob),"isBlob");Va.isBlob=B9});var ck=N(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.ChecksumStream=void 0;var G9=typeof ReadableStream=="function"?ReadableStream:function(){},Hv=class extends G9{static{i(this,"ChecksumStream")}};kp.ChecksumStream=Hv});var uk=N(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.createChecksumStream=void 0;var F9=gt(),j9=jo(),q9=ck(),V9=i(({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:o})=>{if(!(0,j9.isReadableStream)(r))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);let a=o??F9.toBase64;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let c=new TransformStream({start(){},async transform(l,d){t.update(l),d.enqueue(l)},async flush(l){let d=await t.digest(),_=a(d);if(e!==_){let y=new Error(`Checksum mismatch: expected "${e}" but received "${_}" in response header "${n}".`);l.error(y)}else l.terminate()}});r.pipeThrough(c);let u=c.readable;return Object.setPrototypeOf(u,q9.ChecksumStream.prototype),u},"createChecksumStream");Dp.createChecksumStream=V9});var lk=N(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});Wv.createChecksumStream=K9;var H9=jo(),W9=Vv(),J9=uk();function K9(e){return typeof ReadableStream=="function"&&(0,H9.isReadableStream)(e.source)?(0,J9.createChecksumStream)(e):new W9.ChecksumStream(e)}i(K9,"createChecksumStream")});var Kv=N(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.ByteArrayCollector=void 0;var Jv=class{static{i(this,"ByteArrayCollector")}allocByteArray;byteLength=0;byteArrays=[];constructor(t){this.allocByteArray=t}push(t){this.byteArrays.push(t),this.byteLength+=t.byteLength}flush(){if(this.byteArrays.length===1){let n=this.byteArrays[0];return this.reset(),n}let t=this.allocByteArray(this.byteLength),r=0;for(let n=0;n<this.byteArrays.length;++n){let o=this.byteArrays[n];t.set(o,r),r+=o.byteLength}return this.reset(),t}reset(){this.byteArrays=[],this.byteLength=0}};Mp.ByteArrayCollector=Jv});var fk=N(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.createBufferedReadable=void 0;qo.createBufferedReadableStream=dk;qo.merge=pk;qo.flush=Op;qo.sizeOf=Ha;qo.modeOf=mk;var Z9=Kv();function dk(e,t,r){let n=e.getReader(),o=!1,a=0,c=["",new Z9.ByteArrayCollector(d=>new Uint8Array(d))],u=-1,l=i(async d=>{let{value:_,done:y}=await n.read(),E=_;if(y){if(u!==-1){let g=Op(c,u);Ha(g)>0&&d.enqueue(g)}d.close()}else{let g=mk(E,!1);if(u!==g&&(u>=0&&d.enqueue(Op(c,u)),u=g),u===-1){d.enqueue(E);return}let v=Ha(E);a+=v;let A=Ha(c[u]);if(v>=t&&A===0)d.enqueue(E);else{let R=pk(c,u,E);!o&&a>t*2&&(o=!0,r?.warn(`@smithy/util-stream - stream chunk size ${v} is below threshold of ${t}, automatically buffering.`)),R>=t?d.enqueue(Op(c,u)):await l(d)}}},"pull");return new ReadableStream({pull:l})}i(dk,"createBufferedReadableStream");qo.createBufferedReadable=dk;function pk(e,t,r){switch(t){case 0:return e[0]+=r,Ha(e[0]);case 1:case 2:return e[t].push(r),Ha(e[t])}}i(pk,"merge");function Op(e,t){switch(t){case 0:let r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}i(Op,"flush");function Ha(e){return e?.byteLength??e?.length??0}i(Ha,"sizeOf");function mk(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}i(mk,"modeOf")});var hk=N(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});Zv.createBufferedReadable=Q9;var X9=require("node:stream"),gk=Kv(),Vo=fk(),Y9=jo();function Q9(e,t,r){if((0,Y9.isReadableStream)(e))return(0,Vo.createBufferedReadableStream)(e,t,r);let n=new X9.Readable({read(){}}),o=!1,a=0,c=["",new gk.ByteArrayCollector(l=>new Uint8Array(l)),new gk.ByteArrayCollector(l=>Buffer.from(new Uint8Array(l)))],u=-1;return e.on("data",l=>{let d=(0,Vo.modeOf)(l,!0);if(u!==d&&(u>=0&&n.push((0,Vo.flush)(c,u)),u=d),u===-1){n.push(l);return}let _=(0,Vo.sizeOf)(l);a+=_;let y=(0,Vo.sizeOf)(c[u]);if(_>=t&&y===0)n.push(l);else{let E=(0,Vo.merge)(c,u,l);!o&&a>t*2&&(o=!0,r?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${t}, automatically buffering.`)),E>=t&&n.push((0,Vo.flush)(c,u))}}),e.on("end",()=>{if(u!==-1){let l=(0,Vo.flush)(c,u);(0,Vo.sizeOf)(l)>0&&n.push(l)}n.push(null)}),n}i(Q9,"createBufferedReadable")});var yk=N(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.getAwsChunkedEncodingStream=void 0;var eX=i((e,t)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:a,streamHasher:c}=t,u=r!==void 0&&n!==void 0&&o!==void 0&&a!==void 0&&c!==void 0,l=u?c(o,e):void 0,d=e.getReader();return new ReadableStream({async pull(_){let{value:y,done:E}=await d.read();if(E){if(_.enqueue(`0\r
|
|
3
|
+
`),u){let g=r(await l);_.enqueue(`${a}:${g}\r
|
|
4
|
+
`),_.enqueue(`\r
|
|
5
|
+
`)}_.close()}else _.enqueue(`${(n(y)||0).toString(16)}\r
|
|
6
|
+
${y}\r
|
|
7
|
+
`)}})},"getAwsChunkedEncodingStream");Np.getAwsChunkedEncodingStream=eX});var _k=N(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});Xv.getAwsChunkedEncodingStream=oX;var tX=require("node:stream"),rX=yk(),nX=jo();function oX(e,t){let r=e,n=e;if((0,nX.isReadableStream)(n))return(0,rX.getAwsChunkedEncodingStream)(n,t);let{base64Encoder:o,bodyLengthChecker:a,checksumAlgorithmFn:c,checksumLocationName:u,streamHasher:l}=t,d=o!==void 0&&c!==void 0&&u!==void 0&&l!==void 0,_=d?l(c,r):void 0,y=new tX.Readable({read:i(()=>{},"read")});return r.on("data",E=>{let g=a(E)||0;g!==0&&(y.push(`${g.toString(16)}\r
|
|
8
|
+
`),y.push(E),y.push(`\r
|
|
9
|
+
`))}),r.on("end",async()=>{if(y.push(`0\r
|
|
10
|
+
`),d){let E=o(await _);y.push(`${u}:${E}\r
|
|
11
|
+
`),y.push(`\r
|
|
12
|
+
`)}y.push(null)}),y}i(oX,"getAwsChunkedEncodingStream")});var Ek=N(Yv=>{"use strict";Object.defineProperty(Yv,"__esModule",{value:!0});Yv.headStream=iX;async function iX(e,t){let r=0,n=[],o=e.getReader(),a=!1;for(;!a;){let{done:l,value:d}=await o.read();if(d&&(n.push(d),r+=d?.byteLength??0),r>=t)break;a=l}o.releaseLock();let c=new Uint8Array(Math.min(t,r)),u=0;for(let l of n){if(l.byteLength>c.byteLength-u){c.set(l.subarray(0,c.byteLength-u),u);break}else c.set(l,u);u+=l.length}return c}i(iX,"headStream")});var Sk=N(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.headStream=void 0;var sX=require("stream"),aX=Ek(),cX=jo(),uX=i((e,t)=>(0,cX.isReadableStream)(e)?(0,aX.headStream)(e,t):new Promise((r,n)=>{let o=new Qv;o.limit=t,e.pipe(o),e.on("error",a=>{o.end(),n(a)}),o.on("error",n),o.on("finish",function(){let a=new Uint8Array(Buffer.concat(this.buffers));r(a)})}),"headStream");Lp.headStream=uX;var Qv=class extends sX.Writable{static{i(this,"Collector")}buffers=[];limit=1/0;bytesBuffered=0;_write(t,r,n){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){let o=this.bytesBuffered-this.limit,a=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=a.subarray(0,a.byteLength-o),this.emit("finish")}n()}}});var zp=N(eA=>{"use strict";var vk=i(e=>encodeURIComponent(e).replace(/[!'()*]/g,lX),"escapeUri"),lX=i(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),dX=i(e=>e.split("/").map(vk).join("/"),"escapeUriPath");eA.escapeUri=vk;eA.escapeUriPath=dX});var Up=N(Ak=>{"use strict";var tA=zp();function pX(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=tA.escapeUri(r),Array.isArray(n))for(let o=0,a=n.length;o<a;o++)t.push(`${r}=${tA.escapeUri(n[o])}`);else{let o=r;(n||typeof n=="string")&&(o+=`=${tA.escapeUri(n)}`),t.push(o)}}return t.join("&")}i(pX,"buildQueryString");Ak.buildQueryString=pX});var to=N(Mu=>{"use strict";var xk=Me(),bk=Up(),Bp=require("node:https"),Ik=require("node:stream"),Fp=require("node:http2");function jp(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}let n=new Error(String(t));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}i(jp,"buildAbortError");var mX=["ECONNRESET","EPIPE","ETIMEDOUT"],wk=i(e=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t},"getTransformedHeaders"),dr={setTimeout:i((e,t)=>setTimeout(e,t),"setTimeout"),clearTimeout:i(e=>clearTimeout(e),"clearTimeout")},Rk=1e3,fX=i((e,t,r=0)=>{if(!r)return-1;let n=i(o=>{let a=dr.setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-o),c=i(u=>{u?.connecting?u.on("connect",()=>{dr.clearTimeout(a)}):dr.clearTimeout(a)},"doWithSocket");e.socket?c(e.socket):e.on("socket",c)},"registerTimeout");return r<2e3?(n(0),0):dr.setTimeout(n.bind(null,Rk),Rk)},"setConnectionTimeout"),gX=i((e,t,r=0,n,o)=>r?dr.setTimeout(()=>{let a=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let c=Object.assign(new Error(a),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else a+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",o?.warn?.(a)},r):-1,"setRequestTimeout"),hX=3e3,yX=i((e,{keepAlive:t,keepAliveMsecs:r},n=hX)=>{if(t!==!0)return-1;let o=i(()=>{e.socket?e.socket.setKeepAlive(t,r||0):e.on("socket",a=>{a.setKeepAlive(t,r||0)})},"registerListener");return n===0?(o(),0):dr.setTimeout(o,n)},"setSocketKeepAlive"),Pk=3e3,_X=i((e,t,r=0)=>{let n=i(o=>{let a=r-o,c=i(()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))},"onTimeout");e.socket?(e.socket.setTimeout(a,c),e.on("close",()=>e.socket?.removeListener("timeout",c))):e.setTimeout(a,c)},"registerTimeout");return 0<r&&r<6e3?(n(0),0):dr.setTimeout(n.bind(null,r===0?0:Pk),Pk)},"setSocketTimeout"),Ck=6e3;async function $k(e,t,r=Ck,n=!1){let o=t.headers??{},a=o.Expect||o.expect,c=-1,u=!0;!n&&a==="100-continue"&&(u=await Promise.race([new Promise(l=>{c=Number(dr.setTimeout(()=>l(!0),Math.max(Ck,r)))}),new Promise(l=>{e.on("continue",()=>{dr.clearTimeout(c),l(!0)}),e.on("response",()=>{dr.clearTimeout(c),l(!1)}),e.on("error",()=>{dr.clearTimeout(c),l(!1)})})])),u&&EX(e,t.body)}i($k,"writeRequestBody");function EX(e,t){if(t instanceof Ik.Readable){t.pipe(e);return}if(t){let r=Buffer.isBuffer(t);if(r||typeof t=="string"){r&&t.byteLength===0?e.end():e.end(t);return}let o=t;if(typeof o=="object"&&o.buffer&&typeof o.byteOffset=="number"&&typeof o.byteLength=="number"){e.end(Buffer.from(o.buffer,o.byteOffset,o.byteLength));return}e.end(Buffer.from(t));return}e.end()}i(EX,"writeBody");var SX=0,Gp,Tk,rA=class e{static{i(this,"NodeHttpHandler")}config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(t){return typeof t?.handle=="function"?t:new e(t)}static checkSocketUsage(t,r,n=console){let{sockets:o,requests:a,maxSockets:c}=t;if(typeof c!="number"||c===1/0||Date.now()-15e3<r)return r;if(o&&a)for(let l in o){let d=o[l]?.length??0,_=a[l]?.length??0;if(d>=c&&_>=2*c)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${_} additional requests are enqueued.
|
|
13
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
14
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(t){this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(o=>{r(this.resolveDefaultConfig(o))}).catch(n):r(this.resolveDefaultConfig(t))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let o=this.config,a=t.protocol==="https:";return!a&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((c,u)=>{let l,d=[],_=i(async we=>{await l,d.forEach(dr.clearTimeout),c(we)},"resolve"),y=i(async we=>{await l,d.forEach(dr.clearTimeout),u(we)},"reject");if(r?.aborted){let we=jp(r);y(we);return}let E=t.headers??{},g=(E.Expect??E.expect)==="100-continue",v=a?o.httpsAgent:o.httpAgent;g&&!this.externalAgent&&(v=new(a?Bp.Agent:Gp)({keepAlive:!1,maxSockets:1/0})),d.push(dr.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(v,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2e3)+(o.connectionTimeout??1e3)));let A=bk.buildQueryString(t.query||{}),R;if(t.username!=null||t.password!=null){let we=t.username??"",Kt=t.password??"";R=`${we}:${Kt}`}let b=t.path;A&&(b+=`?${A}`),t.fragment&&(b+=`#${t.fragment}`);let $=t.hostname??"";$[0]==="["&&$.endsWith("]")?$=t.hostname.slice(1,-1):$=t.hostname;let G={headers:t.headers,host:$,method:t.method,path:b,port:t.port,agent:v,auth:R},pe=(a?Bp.request:Tk)(G,we=>{let Kt=new xk.HttpResponse({statusCode:we.statusCode||-1,reason:we.statusMessage,headers:wk(we.headers),body:we});_({response:Kt})});if(pe.on("error",we=>{mX.includes(we.code)?y(Object.assign(we,{name:"TimeoutError"})):y(we)}),r){let we=i(()=>{pe.destroy();let Kt=jp(r);y(Kt)},"onAbort");if(typeof r.addEventListener=="function"){let Kt=r;Kt.addEventListener("abort",we,{once:!0}),pe.once("close",()=>Kt.removeEventListener("abort",we))}else r.onabort=we}let me=n??o.requestTimeout;d.push(fX(pe,y,o.connectionTimeout)),d.push(gX(pe,y,me,o.throwOnRequestTimeout,o.logger??console)),d.push(_X(pe,y,o.socketTimeout));let xt=G.agent;typeof xt=="object"&&"keepAlive"in xt&&d.push(yX(pe,{keepAlive:xt.keepAlive,keepAliveMsecs:xt.keepAliveMsecs})),l=$k(pe,t,me,this.externalAgent).catch(we=>(d.forEach(dr.clearTimeout),u(we)))})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:r,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:a,httpAgent:c,httpsAgent:u,throwOnRequestTimeout:l,logger:d}=t||{},_=!0,y=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:o,socketAcquisitionWarningTimeout:a,throwOnRequestTimeout:l,httpAgentProvider:i(async()=>{let{Agent:E,request:g}=await import("node:http");return Tk=g,Gp=E,c instanceof Gp||typeof c?.destroy=="function"?(this.externalAgent=!0,c):new Gp({keepAlive:_,maxSockets:y,...c})},"httpAgentProvider"),httpsAgent:u instanceof Bp.Agent||typeof u?.destroy=="function"?(this.externalAgent=!0,u):new Bp.Agent({keepAlive:_,maxSockets:y,...u}),logger:d}}},vX=new Uint16Array(1),Du=class{static{i(this,"ClientHttp2SessionRef")}id=vX[0]++;total=0;max=0;session;refs=0;constructor(t){t.unref(),this.session=t}retain(){if(this.session.destroyed)throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(this.refs-=1,this.refs===0&&this.session.unref(),this.refs<0))throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}},nA=class{static{i(this,"NodeHttp2ConnectionPool")}sessions=[];maxConcurrency=0;constructor(t){this.sessions=(t??[]).map(r=>new Du(r))}poll(){let t=!1;for(let r of this.sessions){if(r.deref().destroyed){t=!0;continue}if(!this.maxConcurrency||r.useCount()<this.maxConcurrency)return r}if(t)for(let r of this.sessions)r.deref().destroyed&&this.remove(r)}offerLast(t){this.sessions.push(t)}remove(t){let r=this.sessions.indexOf(t);r>-1&&this.sessions.splice(r,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(t){this.maxConcurrency=t}destroy(t){this.remove(t),t.destroy()}},oA=class{static{i(this,"NodeHttp2ConnectionManager")}config;connectionPools=new Map;constructor(t){if(this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,r){let n=this.getUrlString(t),o=this.getPool(n);if(!this.config.disableConcurrency&&!r.isEventStream){let d=o.poll();if(d)return d.retain(),d}let a=new Du(Fp.connect(n)),c=a.deref();this.config.maxConcurrency&&c.settings({maxConcurrentStreams:this.config.maxConcurrency},d=>{if(d)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())});let u=i(()=>{this.removeFromPoolAndClose(n,a)},"graceful"),l=i(()=>{this.removeFromPoolAndCheckedDestroy(n,a)},"ensureDestroyed");return c.on("goaway",u),c.on("error",l),c.on("frameError",l),c.on("close",l),r.requestTimeout&&c.setTimeout(r.requestTimeout,l),o.offerLast(a),a.retain(),a}release(t,r){r.free()}createIsolatedSession(t,r){let n=this.getUrlString(t),o=new Du(Fp.connect(n)),a=o.deref();a.settings({maxConcurrentStreams:1});let c=i(()=>{o.destroy()},"ensureDestroyed");return a.on("error",c),a.on("frameError",c),a.on("close",c),r.requestTimeout&&a.setTimeout(r.requestTimeout,c),o.retain(),o}destroy(){for(let[t,r]of this.connectionPools){for(let n of[...r])n.destroy();this.connectionPools.delete(t)}}setMaxConcurrentStreams(t){if(t&&t<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t;for(let r of this.connectionPools.values())r.setMaxConcurrency(t)}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}debug(){let t={};for(let[r,n]of this.connectionPools){let o=[];for(let a of n)o.push({id:a.id,active:a.useCount(),maxConcurrent:a.max,totalRequests:a.total});t[r]={sessions:o}}return t}removeFromPoolAndClose(t,r){this.connectionPools.get(t)?.remove(r),r.close()}removeFromPoolAndCheckedDestroy(t,r){this.connectionPools.get(t)?.remove(r),r.destroy()}getPool(t){if(!this.connectionPools.has(t)){let r=new nA;this.config.maxConcurrency&&r.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(t,r)}return this.connectionPools.get(t)}getUrlString(t){return t.destination.toString()}},iA=class e{static{i(this,"NodeHttp2Handler")}config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new oA({});static create(t){return typeof t?.handle=="function"?t:new e(t)}constructor(t){this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(o=>{r(o||{})}).catch(n):r(t||{})})}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:r,requestTimeout:n,isEventStream:o}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:d,maxConcurrentStreams:_}=this.config;this.connectionManager.setDisableConcurrentStreams(d??!1),_&&this.connectionManager.setMaxConcurrentStreams(_)}let{requestTimeout:a,disableConcurrentStreams:c}=this.config,u=c||o,l=n??a;return new Promise((d,_)=>{let y=!1,E,g=i(async Ve=>{await E,d(Ve)},"resolve"),v=i(async Ve=>{await E,_(Ve)},"reject");if(r?.aborted){y=!0;let Ve=jp(r);v(Ve);return}let{hostname:A,method:R,port:b,protocol:$,query:G}=t,Y="";if(t.username!=null||t.password!=null){let Ve=t.username??"",tn=t.password??"";Y=`${Ve}:${tn}@`}let pe=`${$}//${Y}${A}${b?`:${b}`:""}`,me={destination:new URL(pe)},xt={requestTimeout:this.config?.sessionTimeout,isEventStream:o},we=u?this.connectionManager.createIsolatedSession(me,xt):this.connectionManager.lease(me,xt),Kt=we.deref(),In=i(Ve=>{u&&we.destroy(),y=!0,v(Ve)},"rejectWithDestroy"),ko=bk.buildQueryString(G??{}),Lr=t.path;ko&&(Lr+=`?${ko}`),t.fragment&&(Lr+=`#${t.fragment}`);let Zt=Kt.request({...t.headers,[Fp.constants.HTTP2_HEADER_PATH]:Lr,[Fp.constants.HTTP2_HEADER_METHOD]:R});if(l&&Zt.setTimeout(l,()=>{Zt.close();let Ve=new Error(`Stream timed out because of no activity for ${l} ms`);Ve.name="TimeoutError",In(Ve)}),r){let Ve=i(()=>{Zt.close();let tn=jp(r);In(tn)},"onAbort");if(typeof r.addEventListener=="function"){let tn=r;tn.addEventListener("abort",Ve,{once:!0}),Zt.once("close",()=>tn.removeEventListener("abort",Ve))}else r.onabort=Ve}Zt.on("frameError",(Ve,tn,Xt)=>{In(new Error(`Frame type id ${Ve} in stream id ${Xt} has failed with code ${tn}.`))}),Zt.on("error",In),Zt.on("aborted",()=>{In(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Zt.rstCode}.`))}),Zt.on("response",Ve=>{let tn=new xk.HttpResponse({statusCode:Ve[":status"]??-1,headers:wk(Ve),body:Zt});y=!0,g({response:tn}),u&&Kt.close()}),Zt.on("close",()=>{u?we.destroy():this.connectionManager.release(me,we),y||In(new Error("Unexpected error: http2 request did not get a response"))}),E=$k(Zt,t,l)})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}},sA=class extends Ik.Writable{static{i(this,"Collector")}bufferedBytes=[];_write(t,r,n){this.bufferedBytes.push(t),n()}},AX=i(e=>RX(e)?PX(e):new Promise((t,r)=>{let n=new sA;e.pipe(n),e.on("error",o=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})}),"streamCollector"),RX=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStreamInstance");async function PX(e){let t=[],r=e.getReader(),n=!1,o=0;for(;!n;){let{done:u,value:l}=await r.read();l&&(t.push(l),o+=l.length),n=u}let a=new Uint8Array(o),c=0;for(let u of t)a.set(u,c),c+=u.length;return a}i(PX,"collectReadableStream");Mu.DEFAULT_REQUEST_TIMEOUT=SX;Mu.NodeHttp2Handler=iA;Mu.NodeHttpHandler=rA;Mu.streamCollector=AX});var cA=N(Vp=>{"use strict";var kk=Me(),CX=Up(),TX=gt();function Dk(e,t){return new Request(e,t)}i(Dk,"createRequest");function xX(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{let n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}i(xX,"requestTimeout");var qp={supported:void 0},aA=class e{static{i(this,"FetchHttpHandler")}config;configProvider;static create(t){return typeof t?.handle=="function"?t:new e(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),qp.supported===void 0&&(qp.supported=typeof Request<"u"&&"keepalive"in Dk("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let o=n??this.config.requestTimeout,a=this.config.keepAlive===!0,c=this.config.credentials;if(r?.aborted){let $=Mk(r);return Promise.reject($)}let u=t.path,l=CX.buildQueryString(t.query||{});l&&(u+=`?${l}`),t.fragment&&(u+=`#${t.fragment}`);let d="";if(t.username!=null||t.password!=null){let $=t.username??"",G=t.password??"";d=`${$}:${G}@`}let{port:_,method:y}=t,E=`${t.protocol}//${d}${t.hostname}${_?`:${_}`:""}${u}`,g=y==="GET"||y==="HEAD"?void 0:t.body,v={body:g,headers:new Headers(t.headers),method:y,credentials:c};this.config?.cache&&(v.cache=this.config.cache),g&&(v.duplex="half"),typeof AbortController<"u"&&(v.signal=r),qp.supported&&(v.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(v,this.config.requestInit(t));let A=i(()=>{},"removeSignalEventListener"),R=Dk(E,v),b=[fetch(R).then($=>{let G=$.headers,Y={};for(let me of G.entries())Y[me[0]]=me[1];return $.body!=null?{response:new kk.HttpResponse({headers:Y,reason:$.statusText,statusCode:$.status,body:$.body})}:$.blob().then(me=>({response:new kk.HttpResponse({headers:Y,reason:$.statusText,statusCode:$.status,body:me})}))}),xX(o)];return r&&b.push(new Promise(($,G)=>{let Y=i(()=>{let pe=Mk(r);G(pe)},"onAbort");if(typeof r.addEventListener=="function"){let pe=r;pe.addEventListener("abort",Y,{once:!0}),A=i(()=>pe.removeEventListener("abort",Y),"removeSignalEventListener")}else r.onabort=Y})),Promise.race(b).finally(A)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}};function Mk(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}let n=new Error(String(t));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}i(Mk,"buildAbortError");var bX=i(async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):IX(e):wX(e),"streamCollector");async function IX(e){let t=await $X(e),r=TX.fromBase64(t);return new Uint8Array(r)}i(IX,"collectBlob");async function wX(e){let t=[],r=e.getReader(),n=!1,o=0;for(;!n;){let{done:u,value:l}=await r.read();l&&(t.push(l),o+=l.length),n=u}let a=new Uint8Array(o),c=0;for(let u of t)a.set(u,c),c+=u.length;return a}i(wX,"collectStream");function $X(e){return new Promise((t,r)=>{let n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));let o=n.result??"",a=o.indexOf(","),c=a>-1?a+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}i($X,"readToBase64");Vp.FetchHttpHandler=aA;Vp.keepAliveSupport=qp;Vp.streamCollector=bX});var Wa=N(lA=>{"use strict";var Ok={},uA={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Ok[e]=t,uA[t]=e}function kX(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in uA)t[r/2]=uA[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}i(kX,"fromHex");function DX(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ok[e[r]];return t}i(DX,"toHex");lA.fromHex=kX;lA.toHex=DX});var Uk=N(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});Hp.sdkStreamMixin=void 0;var MX=cA(),OX=gt(),NX=Wa(),LX=ft(),Nk=jo(),Lk="The stream has already been transformed.",zX=i(e=>{if(!zk(e)&&!(0,Nk.isReadableStream)(e)){let o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1,r=i(async()=>{if(t)throw new Error(Lk);return t=!0,await(0,MX.streamCollector)(e)},"transformToByteArray"),n=i(o=>{if(typeof o.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
15
|
+
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 o.stream()},"blobToWebStream");return Object.assign(e,{transformToByteArray:r,transformToString:i(async o=>{let a=await r();if(o==="base64")return(0,OX.toBase64)(a);if(o==="hex")return(0,NX.toHex)(a);if(o===void 0||o==="utf8"||o==="utf-8")return(0,LX.toUtf8)(a);if(typeof TextDecoder=="function")return new TextDecoder(o).decode(a);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},"transformToString"),transformToWebStream:i(()=>{if(t)throw new Error(Lk);if(t=!0,zk(e))return n(e);if((0,Nk.isReadableStream)(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)},"transformToWebStream")})},"sdkStreamMixin");Hp.sdkStreamMixin=zX;var zk=i(e=>typeof Blob=="function"&&e instanceof Blob,"isBlobInstance")});var Gk=N(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.sdkStreamMixin=void 0;var UX=to(),BX=qa(),dA=require("stream"),GX=Uk(),Bk="The stream has already been transformed.",FX=i(e=>{if(!(e instanceof dA.Readable))try{return(0,GX.sdkStreamMixin)(e)}catch{let o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1,r=i(async()=>{if(t)throw new Error(Bk);return t=!0,await(0,UX.streamCollector)(e)},"transformToByteArray");return Object.assign(e,{transformToByteArray:r,transformToString:i(async n=>{let o=await r();return n===void 0||Buffer.isEncoding(n)?(0,BX.fromArrayBuffer)(o.buffer,o.byteOffset,o.byteLength).toString(n):new TextDecoder(n).decode(o)},"transformToString"),transformToWebStream:i(()=>{if(t)throw new Error(Bk);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof dA.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,dA.Readable.toWeb(e)},"transformToWebStream")})},"sdkStreamMixin");Wp.sdkStreamMixin=FX});var Fk=N(pA=>{"use strict";Object.defineProperty(pA,"__esModule",{value:!0});pA.splitStream=jX;async function jX(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}i(jX,"splitStream")});var Vk=N(mA=>{"use strict";Object.defineProperty(mA,"__esModule",{value:!0});mA.splitStream=VX;var jk=require("stream"),qX=Fk(),qk=jo();async function VX(e){if((0,qk.isReadableStream)(e)||(0,qk.isBlob)(e))return(0,qX.splitStream)(e);let t=new jk.PassThrough,r=new jk.PassThrough;return e.pipe(t),e.pipe(r),[t,r]}i(VX,"splitStream")});var tm=N(ze=>{"use strict";var Hk=gt(),Wk=ft(),Jp=Vv(),Kp=lk(),Zp=hk(),Xp=_k(),Yp=Sk(),Qp=Gk(),em=Vk(),Jk=jo(),fA=class e extends Uint8Array{static{i(this,"Uint8ArrayBlobAdapter")}static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?e.mutate(Hk.fromBase64(t)):e.mutate(Wk.fromUtf8(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,e.prototype),t}transformToString(t="utf-8"){return t==="base64"?Hk.toBase64(this):Wk.toUtf8(this)}};ze.isBlob=Jk.isBlob;ze.isReadableStream=Jk.isReadableStream;ze.Uint8ArrayBlobAdapter=fA;Object.prototype.hasOwnProperty.call(Jp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Jp.__proto__});Object.keys(Jp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Jp[e])});Object.prototype.hasOwnProperty.call(Kp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Kp.__proto__});Object.keys(Kp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Kp[e])});Object.prototype.hasOwnProperty.call(Zp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Zp.__proto__});Object.keys(Zp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Zp[e])});Object.prototype.hasOwnProperty.call(Xp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Xp.__proto__});Object.keys(Xp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Xp[e])});Object.prototype.hasOwnProperty.call(Yp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Yp.__proto__});Object.keys(Yp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Yp[e])});Object.prototype.hasOwnProperty.call(Qp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Qp.__proto__});Object.keys(Qp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Qp[e])});Object.prototype.hasOwnProperty.call(em,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:em.__proto__});Object.keys(em).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=em[e])})});var rm,sn,nm=D(()=>{rm=I(tm()),sn=i(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return rm.Uint8ArrayBlobAdapter.mutate(e);if(!e)return rm.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return rm.Uint8ArrayBlobAdapter.mutate(await r)},"collectBody")});function ro(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var om=D(()=>{i(ro,"extendedEncodeURIComponent")});var $n,gA=D(()=>{$n=i(e=>typeof e=="function"?e():e,"deref")});var Ou,im=D(()=>{Ou=i((e,t,r,n,o)=>({name:t,namespace:e,traits:r,input:n,output:o}),"operation")});var Kk,Zk,Xk,hA,Yk=D(()=>{Kk=I(Me()),Zk=I(It());im();Xk=i(e=>(t,r)=>async n=>{let{response:o}=await t(n),{operationSchema:a}=(0,Zk.getSmithyContext)(r),[,c,u,l,d,_]=a??[];try{let y=await e.protocol.deserializeResponse(Ou(c,u,l,d,_),{...e,...r},o);return{response:o,output:y}}catch(y){if(Object.defineProperty(y,"$response",{value:o,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in y)){let E="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{y.message+=`
|
|
16
|
+
`+E}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(E):r.logger?.warn?.(E)}typeof y.$responseBodyText<"u"&&y.$response&&(y.$response.body=y.$responseBodyText);try{if(Kk.HttpResponse.isInstance(o)){let{headers:g={}}=o,v=Object.entries(g);y.$metadata={httpStatusCode:o.statusCode,requestId:hA(/^x-[\w-]+-request-?id$/,v),extendedRequestId:hA(/^x-[\w-]+-id-2$/,v),cfId:hA(/^x-[\w-]+-cf-id$/,v)}}}catch{}}throw y}},"schemaDeserializationMiddleware"),hA=i((e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],"findHeader")});var eD=N(Qk=>{"use strict";function HX(e){let t={};if(e=e.replace(/^\?/,""),e)for(let r of e.split("&")){let[n,o=null]=r.split("=");n=decodeURIComponent(n),o&&(o=decodeURIComponent(o)),n in t?Array.isArray(t[n])?t[n].push(o):t[n]=[t[n],o]:t[n]=o}return t}i(HX,"parseQueryString");Qk.parseQueryString=HX});var Gr=N(rD=>{"use strict";var WX=eD(),tD=i(e=>{if(typeof e=="string")return tD(new URL(e));let{hostname:t,pathname:r,port:n,protocol:o,search:a}=e,c;return a&&(c=WX.parseQueryString(a)),{hostname:t,port:n?parseInt(n):void 0,protocol:o,path:r,query:c}},"parseUrl");rD.parseUrl=tD});var yA,_A,nD=D(()=>{yA=I(Gr()),_A=i(e=>{if(typeof e=="object"){if("url"in e){let t=(0,yA.parseUrl)(e.url);if(e.headers){t.headers={};for(let r in e.headers)t.headers[r.toLowerCase()]=e.headers[r].join(", ")}return t}return e}return(0,yA.parseUrl)(e)},"toEndpointV1")});var oD={};bt(oD,{toEndpointV1:()=>_A});var EA=D(()=>{nD()});var iD,sD,aD=D(()=>{EA();iD=I(It());im();sD=i(e=>(t,r)=>async n=>{let{operationSchema:o}=(0,iD.getSmithyContext)(r),[,a,c,u,l,d]=o??[],_=r.endpointV2?async()=>_A(r.endpointV2):e.endpoint,y=await e.protocol.serializeRequest(Ou(a,c,u,l,d),n.input,{...e,...r,endpoint:_});return t({...n,request:y})},"schemaSerializationMiddleware")});function Ho(e){return{applyToStack:i(t=>{t.add(sD(e),uD),t.add(Xk(e),cD),e.protocol.setSerdeContext(e)},"applyToStack")}}var cD,uD,lD=D(()=>{Yk();aD();cD={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},uD={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(Ho,"getSchemaSerdePlugin")});var ht,$i=D(()=>{ht=class{static{i(this,"Schema")}name;namespace;traits;static assign(t,r){return Object.assign(t,r)}static[Symbol.hasInstance](t){let r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var sm,JX,dD=D(()=>{$i();sm=class e extends ht{static{i(this,"ListSchema")}static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=e.symbol},JX=i((e,t,r,n)=>ht.assign(new sm,{name:t,namespace:e,traits:r,valueSchema:n}),"list")});var am,KX,pD=D(()=>{$i();am=class e extends ht{static{i(this,"MapSchema")}static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=e.symbol},KX=i((e,t,r,n,o)=>ht.assign(new am,{name:t,namespace:e,traits:r,keySchema:n,valueSchema:o}),"map")});var cm,ZX,mD=D(()=>{$i();cm=class e extends ht{static{i(this,"OperationSchema")}static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=e.symbol},ZX=i((e,t,r,n,o)=>ht.assign(new cm,{name:t,namespace:e,traits:r,input:n,output:o}),"op")});var Ja,XX,SA=D(()=>{$i();Ja=class e extends ht{static{i(this,"StructureSchema")}static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=e.symbol},XX=i((e,t,r,n,o)=>ht.assign(new Ja,{name:t,namespace:e,traits:r,memberNames:n,memberList:o}),"struct")});var um,YX,fD=D(()=>{$i();SA();um=class e extends Ja{static{i(this,"ErrorSchema")}static symbol=Symbol.for("@smithy/err");ctor;symbol=e.symbol},YX=i((e,t,r,n,o,a)=>ht.assign(new um,{name:t,namespace:e,traits:r,memberNames:n,memberList:o,ctor:null}),"error")});function no(e){if(typeof e=="object")return e;if(e=e|0,lm[e])return lm[e];let t={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return lm[e]=t}var lm,vA=D(()=>{lm=[];i(no,"translateTraits")});function Lu(e,t){if(e instanceof ne)return Object.assign(e,{memberName:t,_isMemberSchema:!0});let r=ne;return new r(e,t)}var Nu,dm,pm,ne,AA,gD,hD=D(()=>{gA();vA();Nu={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},dm=[],pm={},ne=class e{static{i(this,"NormalizedSchema")}ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=e.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;let n=[],o=t,a=t;for(this._isMemberSchema=!1;AA(o);)n.push(o[1]),o=o[0],a=$n(o),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let c=n.length-1;c>=0;--c){let u=n[c];Object.assign(this.memberTraits,no(u))}}else this.memberTraits=0;if(a instanceof e){let c=this.memberTraits;Object.assign(this,a),this.memberTraits=Object.assign({},c,a.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??a.memberName;return}if(this.schema=$n(a),gD(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(a),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){let r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){let r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(dm[t])return dm[t]}else if(typeof t=="string"){if(pm[t])return pm[t]}else if(r&&t[Nu.ns])return t[Nu.ns];let n=$n(t);if(n instanceof e)return n;if(AA(n)){let[a,c]=n;if(a instanceof e)return Object.assign(a.getMergedTraits(),no(c)),a;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}let o=new e(n);return r?t[Nu.ns]=o:typeof n=="string"?pm[n]=o:typeof n=="number"?dm[n]=o:o}getSchema(){let t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){let{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){let t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){let t=this.getSchema();if(typeof t!="object")return!1;let r=t[0];return r===3||r===-3||r===4}isUnionSchema(){let t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){let t=this.getSchema();return t===21||t===42}isTimestampSchema(){let t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return no(this.memberTraits)}getOwnTraits(){return no(this.traits)}getKeySchema(){let[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let n=this.getSchema(),o=t?15:n[4]??0;return Lu([o,0],"key")}getValueSchema(){let t=this.getSchema(),[r,n,o]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],a=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||o)?t[3+t[0]]:r?15:void 0;if(a!=null)return Lu([a,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){let r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){let n=r[4].indexOf(t),o=r[5][n];return Lu(AA(o)?o:[o,0],t)}if(this.isDocumentSchema())return Lu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){let t={};try{for(let[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(let[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let t=this.getSchema(),r=t[4].length,n=t[Nu.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let o=0;o<r;++o){let a=t[4][o],c=Lu([t[5][o],0],a);yield n[o]=[a,c]}t[Nu.it]=n}};i(Lu,"member");AA=i(e=>Array.isArray(e)&&e.length===2,"isMemberSchema"),gD=i(e=>Array.isArray(e)&&e.length>=5,"isStaticSchema")});var zu,QX,e7,yD=D(()=>{$i();zu=class e extends ht{static{i(this,"SimpleSchema")}static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=e.symbol},QX=i((e,t,r,n)=>ht.assign(new zu,{name:t,namespace:e,traits:n,schemaRef:r}),"sim"),e7=i((e,t,r,n)=>ht.assign(new zu,{name:t,namespace:e,traits:r,schemaRef:n}),"simAdapter")});var t7,_D=D(()=>{t7={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128}});var ot,ED=D(()=>{ot=class e{static{i(this,"TypeRegistry")}namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return e.registries.has(t)||e.registries.set(t,new e(t)),e.registries.get(t)}copyFrom(t){let{schemas:r,exceptions:n}=this;for(let[o,a]of t.schemas)r.has(o)||r.set(o,a);for(let[o,a]of t.exceptions)n.has(o)||n.set(o,a)}register(t,r){let n=this.normalizeShapeId(t);for(let o of[this,e.for(n.split("#")[0])])o.schemas.set(n,r)}getSchema(t){let r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){let n=t,o=n[1];for(let a of[this,e.for(o)])a.schemas.set(o+"#"+n[2],n),a.exceptions.set(n,r)}getErrorCtor(t){let r=t;return this.exceptions.has(r)?this.exceptions.get(r):e.for(r[1]).exceptions.get(r)}getBaseException(){for(let t of this.exceptions.keys())if(Array.isArray(t)){let[,r,n]=t,o=r+"#"+n;if(o.startsWith("smithy.ts.sdk.synthetic.")&&o.endsWith("ServiceException"))return t}}find(t){for(let r of this.schemas.values())if(t(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}});var Wo={};bt(Wo,{ErrorSchema:()=>um,ListSchema:()=>sm,MapSchema:()=>am,NormalizedSchema:()=>ne,OperationSchema:()=>cm,SCHEMA:()=>t7,Schema:()=>ht,SimpleSchema:()=>zu,StructureSchema:()=>Ja,TypeRegistry:()=>ot,deref:()=>$n,deserializerMiddlewareOption:()=>cD,error:()=>YX,getSchemaSerdePlugin:()=>Ho,isStaticSchema:()=>gD,list:()=>JX,map:()=>KX,op:()=>ZX,operation:()=>Ou,serializerMiddlewareOption:()=>uD,sim:()=>QX,simAdapter:()=>e7,simpleSchemaCacheN:()=>dm,simpleSchemaCacheS:()=>pm,struct:()=>XX,traitsCache:()=>lm,translateTraits:()=>no});var ke=D(()=>{gA();lD();dD();pD();mD();im();fD();hD();$i();yD();SA();_D();vA();ED()});var r7,SD=D(()=>{r7=i((e,t,r=n=>n)=>e,"copyDocumentWithTransform")});var n7,o7,Uu,i7,mm,Bu,s7,RA,PA,CA,TA,a7,c7,vD,u7,l7,gm,d7,xA,p7,Ka,bA,m7,f7,g7,AD,RD,h7,y7,Gs,IA,fm,Gu,wA=D(()=>{n7=i(e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},"parseBoolean"),o7=i(e=>{if(e!=null){if(typeof e=="number"){if((e===0||e===1)&&Gu.warn(fm(`Expected boolean, got ${typeof e}: ${e}`)),e===0)return!1;if(e===1)return!0}if(typeof e=="string"){let t=e.toLowerCase();if((t==="false"||t==="true")&&Gu.warn(fm(`Expected boolean, got ${typeof e}: ${e}`)),t==="false")return!1;if(t==="true")return!0}if(typeof e=="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},"expectBoolean"),Uu=i(e=>{if(e!=null){if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Gu.warn(fm(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},"expectNumber"),i7=Math.ceil(2**127*(2-2**-23)),mm=i(e=>{let t=Uu(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>i7)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},"expectFloat32"),Bu=i(e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},"expectLong"),s7=Bu,RA=i(e=>TA(e,32),"expectInt32"),PA=i(e=>TA(e,16),"expectShort"),CA=i(e=>TA(e,8),"expectByte"),TA=i((e,t)=>{let r=Bu(e);if(r!==void 0&&a7(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},"expectSizedInt"),a7=i((e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},"castInt"),c7=i((e,t)=>{if(e==null)throw t?new TypeError(`Expected a non-null value for ${t}`):new TypeError("Expected a non-null value");return e},"expectNonNull"),vD=i(e=>{if(e==null)return;if(typeof e=="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},"expectObject"),u7=i(e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Gu.warn(fm(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},"expectString"),l7=i(e=>{if(e==null)return;let t=vD(e),r=[];for(let n in t)t[n]!=null&&r.push(n);if(r.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(r.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${r} were not null.`);return t},"expectUnion"),gm=i(e=>Uu(typeof e=="string"?Ka(e):e),"strictParseDouble"),d7=gm,xA=i(e=>mm(typeof e=="string"?Ka(e):e),"strictParseFloat32"),p7=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ka=i(e=>{let t=e.match(p7);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},"parseNumber"),bA=i(e=>typeof e=="string"?AD(e):Uu(e),"limitedParseDouble"),m7=bA,f7=bA,g7=i(e=>typeof e=="string"?AD(e):mm(e),"limitedParseFloat32"),AD=i(e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},"parseFloatString"),RD=i(e=>Bu(typeof e=="string"?Ka(e):e),"strictParseLong"),h7=RD,y7=i(e=>RA(typeof e=="string"?Ka(e):e),"strictParseInt32"),Gs=i(e=>PA(typeof e=="string"?Ka(e):e),"strictParseShort"),IA=i(e=>CA(typeof e=="string"?Ka(e):e),"strictParseByte"),fm=i(e=>String(new TypeError(e).stack||e).split(`
|
|
17
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
18
|
+
`),"stackTraceWarning"),Gu={warn:console.warn}});function ju(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),a=e.getUTCHours(),c=e.getUTCMinutes(),u=e.getUTCSeconds(),l=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,_=c<10?`0${c}`:`${c}`,y=u<10?`0${u}`:`${u}`;return`${_7[n]}, ${l} ${kA[r]} ${t} ${d}:${_}:${y} GMT`}var _7,kA,E7,S7,v7,DA,A7,R7,P7,MA,OA,Fu,C7,T7,x7,$A,b7,I7,w7,oo,$7,k7,Za,PD=D(()=>{wA();_7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],kA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i(ju,"dateToUtcString");E7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),S7=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=E7.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,a,c,u,l,d]=t,_=Gs(Za(n)),y=oo(o,"month",1,12),E=oo(a,"day",1,31);return Fu(_,y,E,{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d})},"parseRfc3339DateTime"),v7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),DA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=v7.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,a,c,u,l,d,_]=t,y=Gs(Za(n)),E=oo(o,"month",1,12),g=oo(a,"day",1,31),v=Fu(y,E,g,{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d});return _.toUpperCase()!="Z"&&v.setTime(v.getTime()-k7(_)),v},"parseRfc3339DateTimeWithOffset"),A7=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$/),R7=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$/),P7=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})$/),MA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=A7.exec(e);if(t){let[r,n,o,a,c,u,l,d]=t;return Fu(Gs(Za(a)),$A(o),oo(n,"day",1,31),{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d})}if(t=R7.exec(e),t){let[r,n,o,a,c,u,l,d]=t;return x7(Fu(C7(a),$A(o),oo(n,"day",1,31),{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d}))}if(t=P7.exec(e),t){let[r,n,o,a,c,u,l,d]=t;return Fu(Gs(Za(d)),$A(n),oo(o.trimLeft(),"day",1,31),{hours:a,minutes:c,seconds:u,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),OA=i(e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=gm(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},"parseEpochTimestamp"),Fu=i((e,t,r,n)=>{let o=t-1;return I7(e,o,r),new Date(Date.UTC(e,o,r,oo(n.hours,"hour",0,23),oo(n.minutes,"minute",0,59),oo(n.seconds,"seconds",0,60),$7(n.fractionalMilliseconds)))},"buildDate"),C7=i(e=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Gs(Za(e));return r<t?r+100:r},"parseTwoDigitYear"),T7=50*365*24*60*60*1e3,x7=i(e=>e.getTime()-new Date().getTime()>T7?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,"adjustRfc850Year"),$A=i(e=>{let t=kA.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},"parseMonthByShortName"),b7=[31,28,31,30,31,30,31,31,30,31,30,31],I7=i((e,t,r)=>{let n=b7[t];if(t===1&&w7(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${kA[t]} in ${e}: ${r}`)},"validateDayOfMonth"),w7=i(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),oo=i((e,t,r,n)=>{let o=IA(Za(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},"parseDateValue"),$7=i(e=>e==null?0:xA("0."+e)*1e3,"parseMilliseconds"),k7=i(e=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},"parseOffsetToMilliseconds"),Za=i(e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},"stripLeadingZeroes")});var Jo={};bt(Jo,{__addDisposableResource:()=>KD,__assign:()=>hm,__asyncDelegator:()=>GD,__asyncGenerator:()=>BD,__asyncValues:()=>FD,__await:()=>Xa,__awaiter:()=>MD,__classPrivateFieldGet:()=>HD,__classPrivateFieldIn:()=>JD,__classPrivateFieldSet:()=>WD,__createBinding:()=>_m,__decorate:()=>xD,__disposeResources:()=>ZD,__esDecorate:()=>ID,__exportStar:()=>ND,__extends:()=>CD,__generator:()=>OD,__importDefault:()=>VD,__importStar:()=>qD,__makeTemplateObject:()=>jD,__metadata:()=>DD,__param:()=>bD,__propKey:()=>$D,__read:()=>zA,__rest:()=>TD,__rewriteRelativeImportExtension:()=>XD,__runInitializers:()=>wD,__setFunctionName:()=>kD,__spread:()=>LD,__spreadArray:()=>UD,__spreadArrays:()=>zD,__values:()=>ym,default:()=>O7});function CD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");NA(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function TD(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function xD(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(a=(o<3?c(a):o>3?c(t,r,a):c(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function bD(e,t){return function(r,n){t(r,n,e)}}function ID(e,t,r,n,o,a){function c(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}i(c,"accept");for(var u=n.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,_=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),y,E=!1,g=r.length-1;g>=0;g--){var v={};for(var A in n)v[A]=A==="access"?{}:n[A];for(var A in n.access)v.access[A]=n.access[A];v.addInitializer=function(b){if(E)throw new TypeError("Cannot add initializers after decoration has completed");a.push(c(b||null))};var R=(0,r[g])(u==="accessor"?{get:_.get,set:_.set}:_[l],v);if(u==="accessor"){if(R===void 0)continue;if(R===null||typeof R!="object")throw new TypeError("Object expected");(y=c(R.get))&&(_.get=y),(y=c(R.set))&&(_.set=y),(y=c(R.init))&&o.unshift(y)}else(y=c(R))&&(u==="field"?o.unshift(y):_[l]=y)}d&&Object.defineProperty(d,n.name,_),E=!0}function wD(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function $D(e){return typeof e=="symbol"?e:"".concat(e)}function kD(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function DD(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function MD(e,t,r,n){function o(a){return a instanceof r?a:new r(function(c){c(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,c){function u(_){try{d(n.next(_))}catch(y){c(y)}}i(u,"fulfilled");function l(_){try{d(n.throw(_))}catch(y){c(y)}}i(l,"rejected");function d(_){_.done?a(_.value):o(_.value).then(u,l)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function OD(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=u(0),c.throw=u(1),c.return=u(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(d){return function(_){return l([d,_])}}function l(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(_){d=[6,_],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function ND(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&_m(t,e,r)}function ym(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:i(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zA(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],c;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){c={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return a}function LD(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(zA(arguments[t]));return e}function zD(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],c=0,u=a.length;c<u;c++,o++)n[o]=a[c];return n}function UD(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function Xa(e){return this instanceof Xa?(this.v=e,this):new Xa(e)}function BD(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",c),o[Symbol.asyncIterator]=function(){return this},o;function c(g){return function(v){return Promise.resolve(v).then(g,y)}}function u(g,v){n[g]&&(o[g]=function(A){return new Promise(function(R,b){a.push([g,A,R,b])>1||l(g,A)})},v&&(o[g]=v(o[g])))}function l(g,v){try{d(n[g](v))}catch(A){E(a[0][3],A)}}function d(g){g.value instanceof Xa?Promise.resolve(g.value.v).then(_,y):E(a[0][2],g)}function _(g){l("next",g)}function y(g){l("throw",g)}function E(g,v){g(v),a.shift(),a.length&&l(a[0][0],a[0][1])}}function GD(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(c){return(r=!r)?{value:Xa(e[o](c)),done:!1}:a?a(c):c}:a}}function FD(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof ym=="function"?ym(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(c){return new Promise(function(u,l){c=e[a](c),o(u,l,c.done,c.value)})}}function o(a,c,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},c)}}function jD(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function qD(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=LA(e),n=0;n<r.length;n++)r[n]!=="default"&&_m(t,e,r[n]);return D7(t,e),t}function VD(e){return e&&e.__esModule?e:{default:e}}function HD(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function WD(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function JD(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function KD(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function ZD(e){function t(a){e.error=e.hasError?new M7(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(c){return t(c),o()})}else n|=1}catch(c){t(c)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i(o,"next"),o()}function XD(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,c){return n?t?".jsx":".js":o&&(!a||!c)?r:o+a+"."+c.toLowerCase()+"js"}):e}var NA,hm,_m,D7,LA,M7,O7,Ko=D(()=>{NA=i(function(e,t){return NA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},NA(e,t)},"extendStatics");i(CD,"__extends");hm=i(function(){return hm=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),hm.apply(this,arguments)},"__assign");i(TD,"__rest");i(xD,"__decorate");i(bD,"__param");i(ID,"__esDecorate");i(wD,"__runInitializers");i($D,"__propKey");i(kD,"__setFunctionName");i(DD,"__metadata");i(MD,"__awaiter");i(OD,"__generator");_m=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});i(ND,"__exportStar");i(ym,"__values");i(zA,"__read");i(LD,"__spread");i(zD,"__spreadArrays");i(UD,"__spreadArray");i(Xa,"__await");i(BD,"__asyncGenerator");i(GD,"__asyncDelegator");i(FD,"__asyncValues");i(jD,"__makeTemplateObject");D7=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},LA=i(function(e){return LA=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},LA(e)},"ownKeys");i(qD,"__importStar");i(VD,"__importDefault");i(HD,"__classPrivateFieldGet");i(WD,"__classPrivateFieldSet");i(JD,"__classPrivateFieldIn");i(KD,"__addDisposableResource");M7=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(ZD,"__disposeResources");i(XD,"__rewriteRelativeImportExtension");O7={__extends:CD,__assign:hm,__rest:TD,__decorate:xD,__param:bD,__esDecorate:ID,__runInitializers:wD,__propKey:$D,__setFunctionName:kD,__metadata:DD,__awaiter:MD,__generator:OD,__createBinding:_m,__exportStar:ND,__values:ym,__read:zA,__spread:LD,__spreadArrays:zD,__spreadArray:UD,__await:Xa,__asyncGenerator:BD,__asyncDelegator:GD,__asyncValues:FD,__makeTemplateObject:jD,__importStar:qD,__importDefault:VD,__classPrivateFieldGet:HD,__classPrivateFieldSet:WD,__classPrivateFieldIn:JD,__addDisposableResource:KD,__disposeResources:ZD,__rewriteRelativeImportExtension:XD}});var QD=N(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.randomUUID=void 0;var N7=(Ko(),Q(Jo)),YD=N7.__importDefault(require("crypto"));Em.randomUUID=YD.default.randomUUID.bind(YD.default)});var UA=N(tM=>{"use strict";var eM=QD(),Yt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),L7=i(()=>{if(eM.randomUUID)return eM.randomUUID();let e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Yt[e[0]]+Yt[e[1]]+Yt[e[2]]+Yt[e[3]]+"-"+Yt[e[4]]+Yt[e[5]]+"-"+Yt[e[6]]+Yt[e[7]]+"-"+Yt[e[8]]+Yt[e[9]]+"-"+Yt[e[10]]+Yt[e[11]]+Yt[e[12]]+Yt[e[13]]+Yt[e[14]]+Yt[e[15]]},"v4");tM.v4=L7});var an,rM=D(()=>{an=I(UA())});var pr,nM=D(()=>{pr=i(function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})},"LazyJsonString");pr.from=e=>e&&typeof e=="object"&&(e instanceof pr||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?pr(String(e)):pr(JSON.stringify(e));pr.fromObject=pr.from});function BA(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var oM=D(()=>{i(BA,"quoteHeader")});function Zo(e,t,r){let n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var GA,FA,jA,iM,sM,z7,U7,B7,G7,F7,Ya,qA,VA,aM=D(()=>{GA="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",FA="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",jA="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",iM="(\\d?\\d)",sM="(\\d{4})",z7=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),U7=new RegExp(`^${GA}, ${iM} ${FA} ${sM} ${jA} GMT$`),B7=new RegExp(`^${GA}, ${iM}-${FA}-(\\d\\d) ${jA} GMT$`),G7=new RegExp(`^${GA} ${FA} ( [1-9]|\\d\\d) ${jA} ${sM}$`),F7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ya=i(e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},"_parseEpochTimestamp"),qA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");let t=z7.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,r,n,o,a,c,u,,l,d]=t;Zo(n,1,12),Zo(o,1,31),Zo(a,0,23),Zo(c,0,59),Zo(u,0,60);let _=new Date(Date.UTC(Number(r),Number(n)-1,Number(o),Number(a),Number(c),Number(u),Number(l)?Math.round(parseFloat(`0.${l}`)*1e3):0));if(_.setUTCFullYear(Number(r)),d.toUpperCase()!="Z"){let[,y,E,g]=/([+-])(\d\d):(\d\d)/.exec(d)||[void 0,"+",0,0],v=y==="-"?1:-1;_.setTime(_.getTime()+v*(Number(E)*60*60*1e3+Number(g)*60*1e3))}return _},"_parseRfc3339DateTimeWithOffset"),VA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,o,a,c,u,l;if((l=U7.exec(e))?[,t,r,n,o,a,c,u]=l:(l=B7.exec(e))?([,t,r,n,o,a,c,u]=l,n=(Number(n)+1900).toString()):(l=G7.exec(e))&&([,r,t,o,a,c,u,n]=l),n&&c){let d=Date.UTC(Number(n),F7.indexOf(r),Number(t),Number(o),Number(a),Number(c),u?Math.round(parseFloat(`0.${u}`)*1e3):0);Zo(t,1,31),Zo(o,0,23),Zo(a,0,59),Zo(c,0,60);let _=new Date(d);return _.setUTCFullYear(Number(n)),_}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)},"_parseRfc7231DateTime");i(Zo,"range")});function HA(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");let n=e.split(t);if(r===1)return n;let o=[],a="";for(let c=0;c<n.length;c++)a===""?a=n[c]:a+=t+n[c],(c+1)%r===0&&(o.push(a),a="");return a!==""&&o.push(a),o}var cM=D(()=>{i(HA,"splitEvery")});var qu,uM=D(()=>{qu=i(e=>{let t=e.length,r=[],n=!1,o,a=0;for(let c=0;c<t;++c){let u=e[c];switch(u){case'"':o!=="\\"&&(n=!n);break;case",":n||(r.push(e.slice(a,c)),a=c+1);break;default:}o=u}return r.push(e.slice(a)),r.map(c=>{c=c.trim();let u=c.length;return u<2?c:(c[0]==='"'&&c[u-1]==='"'&&(c=c.slice(1,u-1)),c.replace(/\\"/g,'"'))})},"splitHeader")});function WA(e){return new Ze(String(e),"bigDecimal")}var lM,Ze,dM=D(()=>{lM=/^-?\d*(\.\d+)?$/,Ze=class e{static{i(this,"NumericValue")}string;type;constructor(t,r){if(this.string=t,this.type=r,!lM.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;let r=t;return e.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&lM.test(r.string)}};i(WA,"nv")});var JA={};bt(JA,{LazyJsonString:()=>pr,NumericValue:()=>Ze,_parseEpochTimestamp:()=>Ya,_parseRfc3339DateTimeWithOffset:()=>qA,_parseRfc7231DateTime:()=>VA,copyDocumentWithTransform:()=>r7,dateToUtcString:()=>ju,expectBoolean:()=>o7,expectByte:()=>CA,expectFloat32:()=>mm,expectInt:()=>s7,expectInt32:()=>RA,expectLong:()=>Bu,expectNonNull:()=>c7,expectNumber:()=>Uu,expectObject:()=>vD,expectShort:()=>PA,expectString:()=>u7,expectUnion:()=>l7,generateIdempotencyToken:()=>an.v4,handleFloat:()=>m7,limitedParseDouble:()=>bA,limitedParseFloat:()=>f7,limitedParseFloat32:()=>g7,logger:()=>Gu,nv:()=>WA,parseBoolean:()=>n7,parseEpochTimestamp:()=>OA,parseRfc3339DateTime:()=>S7,parseRfc3339DateTimeWithOffset:()=>DA,parseRfc7231DateTime:()=>MA,quoteHeader:()=>BA,splitEvery:()=>HA,splitHeader:()=>qu,strictParseByte:()=>IA,strictParseDouble:()=>gm,strictParseFloat:()=>d7,strictParseFloat32:()=>xA,strictParseInt:()=>h7,strictParseInt32:()=>y7,strictParseLong:()=>RD,strictParseShort:()=>Gs});var Qt=D(()=>{SD();PD();rM();nM();wA();oM();aM();cM();uM();dM()});var mr,Qa=D(()=>{mr=class{static{i(this,"SerdeContext")}serdeContext;setSerdeContext(t){this.serdeContext=t}}});var Sm,KA,pM=D(()=>{Sm=I(ft()),KA=class{static{i(this,"EventStreamSerde")}marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:t,serializer:r,deserializer:n,serdeContext:o,defaultContentType:a}){this.marshaller=t,this.serializer=r,this.deserializer=n,this.serdeContext=o,this.defaultContentType=a}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){let o=this.marshaller,a=r.getEventStreamMember(),c=r.getMemberSchema(a),u=this.serializer,l=this.defaultContentType,d=Symbol("initialRequestMarker"),_={async*[Symbol.asyncIterator](){if(n){let y={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:l}};u.write(r,n);let E=u.flush();yield{[d]:!0,headers:y,body:E}}for await(let y of t)yield y}};return o.serialize(_,y=>{if(y[d])return{headers:y.headers,body:y.body};let E="";for(let $ in y)if($!=="__type"){E=$;break}let{additionalHeaders:g,body:v,eventType:A,explicitPayloadContentType:R}=this.writeEventBody(E,c,y);return{headers:{":event-type":{type:"string",value:A},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:R??l},...g},body:v}})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){let o=this.marshaller,a=r.getEventStreamMember(),u=r.getMemberSchema(a).getMemberSchemas(),l=Symbol("initialResponseMarker"),d=o.deserialize(t.body,async E=>{let g="";for(let A in E)if(A!=="__type"){g=A;break}let v=E[g].body;if(g==="initial-response"){let A=await this.deserializer.read(r,v);return delete A[a],{[l]:!0,...A}}else if(g in u){let A=u[g];if(A.isStructSchema()){let R={},b=!1;for(let[$,G]of A.structIterator()){let{eventHeader:Y,eventPayload:pe}=G.getMergedTraits();if(b=b||!!(Y||pe),pe)G.isBlobSchema()?R[$]=v:G.isStringSchema()?R[$]=(this.serdeContext?.utf8Encoder??Sm.toUtf8)(v):G.isStructSchema()&&(R[$]=await this.deserializer.read(G,v));else if(Y){let me=E[g].headers[$]?.value;me!=null&&(G.isNumericSchema()?me&&typeof me=="object"&&"bytes"in me?R[$]=BigInt(me.toString()):R[$]=Number(me):R[$]=me)}}if(b)return{[g]:R};if(v.byteLength===0)return{[g]:{}}}return{[g]:await this.deserializer.read(A,v)}}else return{$unknown:E}}),_=d[Symbol.asyncIterator](),y=await _.next();if(y.done)return d;if(y.value?.[l]){if(!r)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let E in y.value)n[E]=y.value[E]}return{async*[Symbol.asyncIterator](){for(y?.value?.[l]||(yield y.value);;){let{done:E,value:g}=await _.next();if(E)break;yield g}}}}writeEventBody(t,r,n){let o=this.serializer,a=t,c=null,u,l=r.getSchema()[4].includes(t),d={};if(l){let E=r.getMemberSchema(t);if(E.isStructSchema()){for(let[g,v]of E.structIterator()){let{eventHeader:A,eventPayload:R}=v.getMergedTraits();if(R)c=g;else if(A){let b=n[t][g],$="binary";v.isNumericSchema()?(-2)**31<=b&&b<=2**31-1?$="integer":$="long":v.isTimestampSchema()?$="timestamp":v.isStringSchema()?$="string":v.isBooleanSchema()&&($="boolean"),b!=null&&(d[g]={type:$,value:b},delete n[t][g])}}if(c!==null){let g=E.getMemberSchema(c);g.isBlobSchema()?u="application/octet-stream":g.isStringSchema()&&(u="text/plain"),o.write(g,n[t][c])}else o.write(E,n[t])}else if(E.isUnitSchema())o.write(E,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{let[E,g]=n[t];a=E,o.write(15,g)}let _=o.flush()??new Uint8Array;return{body:typeof _=="string"?(this.serdeContext?.utf8Decoder??Sm.fromUtf8)(_):_,eventType:a,explicitPayloadContentType:u,additionalHeaders:d}}}});var mM={};bt(mM,{EventStreamSerde:()=>KA});var fM=D(()=>{pM()});var vm,Fs,Am=D(()=>{ke();vm=I(Me());Qa();Fs=class extends mr{static{i(this,"HttpProtocol")}options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=ot.for(t.defaultNamespace);for(let r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return vm.HttpRequest}getResponseType(){return vm.HttpResponse}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(let[n,o]of r.url.searchParams.entries())t.query[n]=o;if(r.headers)for(let n in r.headers)t.headers[n]=r.headers[n].join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(let n in r.headers)t.headers[n]=r.headers[n];return t}}setHostPrefix(t,r,n){if(this.serdeContext?.disableHostPrefix)return;let o=ne.of(r.input),a=no(r.traits??{});if(a.endpoint){let c=a.endpoint?.[0];if(typeof c=="string"){for(let[u,l]of o.structIterator()){if(!l.getMergedTraits().hostLabel)continue;let d=n[u];if(typeof d!="string")throw new Error(`@smithy/core/schema - ${u} in input must be a string as hostLabel.`);c=c.replace(`{${u}}`,d)}t.hostname=c+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){let{EventStreamSerde:t}=await Promise.resolve().then(()=>(fM(),mM));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,o,a){return[]}getEventStreamMarshaller(){let t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}});var gM,hM,js,yM=D(()=>{ke();Qt();gM=I(Me()),hM=I(tm());nm();om();Am();js=class extends Fs{static{i(this,"HttpBindingProtocol")}async serializeRequest(t,r,n){let o=r&&typeof r=="object"?r:{},a=this.serializer,c={},u={},l=await n.endpoint(),d=ne.of(t?.input),_=[],y=[],E=!1,g,v=new gM.HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:c,headers:u,body:void 0});if(l){this.updateServiceEndpoint(v,l),this.setHostPrefix(v,t,o);let A=no(t.traits);if(A.http){v.method=A.http[0];let[R,b]=A.http[1].split("?");v.path=="/"?v.path=R:v.path+=R;let $=new URLSearchParams(b??"");for(let[G,Y]of $)c[G]=Y}}for(let[A,R]of d.structIterator()){let b=R.getMergedTraits()??{},$=o[A];if($==null&&!R.isIdempotencyToken()){if(b.httpLabel&&(v.path.includes(`{${A}+}`)||v.path.includes(`{${A}}`)))throw new Error(`No value provided for input HTTP label: ${A}.`);continue}if(b.httpPayload)R.isStreaming()?R.isStructSchema()?o[A]&&(g=await this.serializeEventStream({eventStream:o[A],requestSchema:d})):g=$:(a.write(R,$),g=a.flush());else if(b.httpLabel){a.write(R,$);let G=a.flush();v.path.includes(`{${A}+}`)?v.path=v.path.replace(`{${A}+}`,G.split("/").map(ro).join("/")):v.path.includes(`{${A}}`)&&(v.path=v.path.replace(`{${A}}`,ro(G)))}else if(b.httpHeader)a.write(R,$),u[b.httpHeader.toLowerCase()]=String(a.flush());else if(typeof b.httpPrefixHeaders=="string")for(let G in $){let Y=$[G],pe=b.httpPrefixHeaders+G;a.write([R.getValueSchema(),{httpHeader:pe}],Y),u[pe.toLowerCase()]=a.flush()}else b.httpQuery||b.httpQueryParams?this.serializeQuery(R,$,c):(E=!0,_.push(A),y.push(R))}if(E&&o){let[A,R]=(d.getName(!0)??"#Unknown").split("#"),b=d.getSchema()[6],$=[3,A,R,d.getMergedTraits(),_,y,void 0];b?$[6]=b:$.pop(),a.write($,o),g=a.flush()}return v.headers=u,v.query=c,v.body=g,v}serializeQuery(t,r,n){let o=this.serializer,a=t.getMergedTraits();if(a.httpQueryParams){for(let c in r)if(!(c in n)){let u=r[c],l=t.getValueSchema();Object.assign(l.getMergedTraits(),{...a,httpQuery:c,httpQueryParams:void 0}),this.serializeQuery(l,u,n)}return}if(t.isListSchema()){let c=!!t.getMergedTraits().sparse,u=[];for(let l of r){o.write([t.getValueSchema(),a],l);let d=o.flush();(c||d!==void 0)&&u.push(d)}n[a.httpQuery]=u}else o.write([t,a],r),n[a.httpQuery]=o.flush()}async deserializeResponse(t,r,n){let o=this.deserializer,a=ne.of(t.output),c={};if(n.statusCode>=300){let l=await sn(n.body,r);throw l.byteLength>0&&Object.assign(c,await o.read(15,l)),await this.handleError(t,r,n,c,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let l in n.headers){let d=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=d}let u=await this.deserializeHttpMessage(a,r,n,c);if(u.length){let l=await sn(n.body,r);if(l.byteLength>0){let d=await o.read(a,l);for(let _ of u)d[_]!=null&&(c[_]=d[_])}}else u.discardResponseBody&&await sn(n.body,r);return c.$metadata=this.deserializeMetadata(n),c}async deserializeHttpMessage(t,r,n,o,a){let c;o instanceof Set?c=a:c=o;let u=!0,l=this.deserializer,d=ne.of(t),_=[];for(let[y,E]of d.structIterator()){let g=E.getMemberTraits();if(g.httpPayload){if(u=!1,E.isStreaming())E.isStructSchema()?c[y]=await this.deserializeEventStream({response:n,responseSchema:d}):c[y]=(0,hM.sdkStreamMixin)(n.body);else if(n.body){let A=await sn(n.body,r);A.byteLength>0&&(c[y]=await l.read(E,A))}}else if(g.httpHeader){let v=String(g.httpHeader).toLowerCase(),A=n.headers[v];if(A!=null)if(E.isListSchema()){let R=E.getValueSchema();R.getMergedTraits().httpHeader=v;let b;R.isTimestampSchema()&&R.getSchema()===4?b=HA(A,",",2):b=qu(A);let $=[];for(let G of b)$.push(await l.read(R,G.trim()));c[y]=$}else c[y]=await l.read(E,A)}else if(g.httpPrefixHeaders!==void 0){c[y]={};for(let v in n.headers)if(v.startsWith(g.httpPrefixHeaders)){let A=n.headers[v],R=E.getValueSchema();R.getMergedTraits().httpHeader=v,c[y][v.slice(g.httpPrefixHeaders.length)]=await l.read(R,A)}}else g.httpResponseCode?c[y]=n.statusCode:_.push(y)}return _.discardResponseBody=u,_}}});var _M,Xo,EM=D(()=>{ke();_M=I(Me());nm();Am();Xo=class extends Fs{static{i(this,"RpcProtocol")}async serializeRequest(t,r,n){let o=this.serializer,a={},c={},u=await n.endpoint(),l=ne.of(t?.input),d=l.getSchema(),_,y=r&&typeof r=="object"?r:{},E=new _M.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:a,headers:c,body:void 0});if(u&&(this.updateServiceEndpoint(E,u),this.setHostPrefix(E,t,y)),y){let g=l.getEventStreamMember();if(g){if(y[g]){let v={};for(let[A,R]of l.structIterator())A!==g&&y[A]&&(o.write(R,y[A]),v[A]=o.flush());_=await this.serializeEventStream({eventStream:y[g],requestSchema:l,initialRequest:v})}}else o.write(d,y),_=o.flush()}return E.headers=Object.assign(E.headers,c),E.query=a,E.body=_,E.method="POST",E}async deserializeResponse(t,r,n){let o=this.deserializer,a=ne.of(t.output),c={};if(n.statusCode>=300){let l=await sn(n.body,r);throw l.byteLength>0&&Object.assign(c,await o.read(15,l)),await this.handleError(t,r,n,c,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let l in n.headers){let d=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=d}let u=a.getEventStreamMember();if(u)c[u]=await this.deserializeEventStream({response:n,responseSchema:a,initialResponseContainer:c});else{let l=await sn(n.body,r);l.byteLength>0&&Object.assign(c,await o.read(a,l))}return c.$metadata=this.deserializeMetadata(n),c}}});var ZA,XA=D(()=>{om();ZA=i((e,t,r,n,o,a)=>{if(t!=null&&t[r]!==void 0){let c=n();if(c==null||c.length<=0)throw new Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(o,a?c.split("/").map(u=>ro(u)).join("/"):ro(c))}else throw new Error("No value provided for input HTTP label: "+r+".");return e},"resolvedPath")});function YA(e,t){return new Rm(e,t)}var SM,Rm,vM=D(()=>{SM=I(Me());XA();i(YA,"requestBuilder");Rm=class{static{i(this,"RequestBuilder")}input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(t,r){this.input=t,this.context=r}async build(){let{hostname:t,protocol:r="https",port:n,path:o}=await this.context.endpoint();this.path=o;for(let a of this.resolvePathStack)a(this.path);return new SM.HttpRequest({protocol:r,hostname:this.hostname||t,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push(r=>{this.path=`${r?.endsWith("/")?r.slice(0,-1):r||""}`+t}),this}p(t,r,n,o){return this.resolvePathStack.push(a=>{this.path=ZA(a,this.input,t,r,n,o)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}}});function Fr(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();let{httpLabel:r,httpPrefixHeaders:n,httpHeader:o,httpQuery:a}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||o?6:a||r?5:void 0:void 0)??t.timestampFormat.default}var Pm=D(()=>{i(Fr,"determineTimestampFormat")});var QA,AM,qs,eR=D(()=>{ke();Qt();QA=I(gt()),AM=I(ft());Qa();Pm();qs=class extends mr{static{i(this,"FromStringShapeDeserializer")}settings;constructor(t){super(),this.settings=t}read(t,r){let n=ne.of(t);if(n.isListSchema())return qu(r).map(o=>this.read(n.getValueSchema(),o));if(n.isBlobSchema())return(this.serdeContext?.base64Decoder??QA.fromBase64)(r);if(n.isTimestampSchema())switch(Fr(n,this.settings)){case 5:return qA(r);case 6:return VA(r);case 7:return Ya(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(n.isStringSchema()){let o=n.getMergedTraits().mediaType,a=r;if(o)return n.getMergedTraits().httpHeader&&(a=this.base64ToUtf8(a)),(o==="application/json"||o.endsWith("+json"))&&(a=pr.from(a)),a}return n.isNumericSchema()?Number(r):n.isBigIntegerSchema()?BigInt(r):n.isBigDecimalSchema()?new Ze(r,"bigDecimal"):n.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??AM.toUtf8)((this.serdeContext?.base64Decoder??QA.fromBase64)(t))}}});var Cm,Vs,RM=D(()=>{ke();Cm=I(ft());Qa();eR();Vs=class extends mr{static{i(this,"HttpInterceptingShapeDeserializer")}codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new qs(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){let n=ne.of(t),o=n.getMergedTraits(),a=this.serdeContext?.utf8Encoder??Cm.toUtf8;if(o.httpHeader||o.httpResponseCode)return this.stringDeserializer.read(n,a(r));if(o.httpPayload){if(n.isBlobSchema()){let c=this.serdeContext?.utf8Decoder??Cm.fromUtf8;return typeof r=="string"?c(r):r}else if(n.isStringSchema())return"byteLength"in r?a(r):r}return this.codecDeserializer.read(n,r)}}});var tR,Vu,rR=D(()=>{ke();Qt();tR=I(gt());Qa();Pm();Vu=class extends mr{static{i(this,"ToStringShapeSerializer")}settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){let n=ne.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(n.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${n.getName(!0)}`);switch(Fr(n,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=ju(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(this.serdeContext?.base64Encoder??tR.toBase64)(r);return}if(n.isListSchema()&&Array.isArray(r)){let c="";for(let u of r){this.write([n.getValueSchema(),n.getMergedTraits()],u);let l=this.flush(),d=n.getValueSchema().isTimestampSchema()?l:BA(l);c!==""&&(c+=", "),c+=d}this.stringBuffer=c;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":let o=n.getMergedTraits().mediaType,a=r;if(o&&((o==="application/json"||o.endsWith("+json"))&&(a=pr.from(a)),n.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??tR.toBase64)(a.toString());return}this.stringBuffer=r;break;default:n.isIdempotencyToken()?this.stringBuffer=(0,an.v4)():this.stringBuffer=String(r)}}flush(){let t=this.stringBuffer;return this.stringBuffer="",t}}});var Hs,PM=D(()=>{ke();rR();Hs=class{static{i(this,"HttpInterceptingShapeSerializer")}codecSerializer;stringSerializer;buffer;constructor(t,r,n=new Vu(r)){this.codecSerializer=t,this.stringSerializer=n}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){let n=ne.of(t),o=n.getMergedTraits();if(o.httpHeader||o.httpLabel||o.httpQuery){this.stringSerializer.write(n,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(n,r)}flush(){if(this.buffer!==void 0){let t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}});var CM={};bt(CM,{FromStringShapeDeserializer:()=>qs,HttpBindingProtocol:()=>js,HttpInterceptingShapeDeserializer:()=>Vs,HttpInterceptingShapeSerializer:()=>Hs,HttpProtocol:()=>Fs,RequestBuilder:()=>Rm,RpcProtocol:()=>Xo,SerdeContext:()=>mr,ToStringShapeSerializer:()=>Vu,collectBody:()=>sn,determineTimestampFormat:()=>Fr,extendedEncodeURIComponent:()=>ro,requestBuilder:()=>YA,resolvedPath:()=>ZA});var Rr=D(()=>{nm();om();yM();Am();EM();vM();XA();eR();RM();PM();rR();Pm();Qa()});var TM=D(()=>{Rr()});function j7(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}var xM=D(()=>{i(j7,"setFeature")});var kn,bM=D(()=>{kn=class{static{i(this,"DefaultIdentityProviderConfig")}authSchemes=new Map;constructor(t){for(let r in t){let n=t[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(t){return this.authSchemes.get(t)}}});var IM,nR,oR,wM=D(()=>{IM=I(Me()),nR=I(Uo()),oR=class{static{i(this,"HttpApiKeyAuthSigner")}async sign(t,r,n){if(!n)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!r.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let o=IM.HttpRequest.clone(t);if(n.in===nR.HttpApiKeyAuthLocation.QUERY)o.query[n.name]=r.apiKey;else if(n.in===nR.HttpApiKeyAuthLocation.HEADER)o.headers[n.name]=n.scheme?`${n.scheme} ${r.apiKey}`:r.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return o}}});var $M,iR,kM=D(()=>{$M=I(Me()),iR=class{static{i(this,"HttpBearerAuthSigner")}async sign(t,r,n){let o=$M.HttpRequest.clone(t);if(!r.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return o.headers.Authorization=`Bearer ${r.token}`,o}}});var jr,DM=D(()=>{jr=class{static{i(this,"NoAuthSigner")}async sign(t,r,n){return t}}});var MM=D(()=>{wM();kM();DM()});var OM,NM,sR,Tm,aR,LM=D(()=>{OM=i(e=>i(function(r){return Tm(r)&&r.expiration.getTime()-Date.now()<e},"isIdentityExpired"),"createIsIdentityExpiredFunction"),NM=3e5,sR=OM(NM),Tm=i(e=>e.expiration!==void 0,"doesIdentityRequireRefresh"),aR=i((e,t,r)=>{if(e===void 0)return;let n=typeof e!="function"?async()=>Promise.resolve(e):e,o,a,c,u=!1,l=i(async d=>{a||(a=n(d));try{o=await a,c=!0,u=!1}finally{a=void 0}return o},"coalesceProvider");return t===void 0?async d=>((!c||d?.forceRefresh)&&(o=await l(d)),o):async d=>((!c||d?.forceRefresh)&&(o=await l(d)),u?o:r(o)?(t(o)&&await l(d),o):(u=!0,o))},"memoizeIdentityProvider")});var zM=D(()=>{bM();MM();LM()});var fr={};bt(fr,{DefaultIdentityProviderConfig:()=>kn,EXPIRATION_MS:()=>NM,HttpApiKeyAuthSigner:()=>oR,HttpBearerAuthSigner:()=>iR,NoAuthSigner:()=>jr,createIsIdentityExpiredFunction:()=>OM,createPaginator:()=>tk,doesIdentityRequireRefresh:()=>Tm,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Bo,getHttpAuthSchemePlugin:()=>S9,getHttpSigningPlugin:()=>Go,getSmithyContext:()=>h9,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>q$,httpAuthSchemeMiddleware:()=>ku,httpAuthSchemeMiddlewareOptions:()=>H$,httpSigningMiddleware:()=>Bv,httpSigningMiddlewareOptions:()=>X$,isIdentityExpired:()=>sR,memoizeIdentityProvider:()=>aR,normalizeProvider:()=>wi,requestBuilder:()=>YA,setFeature:()=>j7});var Xe=D(()=>{U$();J$();Q$();ek();rk();TM();xM();zM()});var er=N(Yo=>{"use strict";var lR=Uo(),dR=class e{static{i(this,"BinaryDecisionDiagram")}nodes;root;conditions;results;constructor(t,r,n,o){this.nodes=t,this.root=r,this.conditions=n,this.results=o}static from(t,r,n,o){return new e(t,r,n,o)}},pR=class{static{i(this,"EndpointCache")}capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){let n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let o=this.data.keys(),a=0;for(;;){let{value:c,done:u}=o.next();if(this.data.delete(c),u||++a>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="",{parameters:n}=this;if(n.length===0)return!1;for(let o of n){let a=String(t[o]??"");if(a.includes("|;"))return!1;r+=a+"|;"}return r}},Ot=class extends Error{static{i(this,"EndpointError")}constructor(t){super(t),this.name="EndpointError"}},Hu="endpoints";function ki(e){return typeof e!="object"||e==null?e:"ref"in e?`$${ki(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ki).join(", ")})`:JSON.stringify(e,null,2)}i(ki,"toDebugString");var UM={},q7=i((e,t)=>e===t,"booleanEquals");function V7(...e){for(let t of e)if(t!=null)return t}i(V7,"coalesce");var H7=i(e=>{let t=e.split("."),r=[];for(let n of t){let o=n.indexOf("[");if(o!==-1){if(n.indexOf("]")!==n.length-1)throw new Ot(`Path: '${e}' does not end with ']'`);let a=n.slice(o+1,-1);if(Number.isNaN(parseInt(a)))throw new Ot(`Invalid array index: '${a}' in path: '${e}'`);o!==0&&r.push(n.slice(0,o)),r.push(a)}else r.push(n)}return r},"getAttrPathList"),BM=i((e,t)=>H7(t).reduce((r,n)=>{if(typeof r!="object")throw new Ot(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){let o=parseInt(n);return r[o<0?r.length+o:o]}return r[n]},e),"getAttr"),W7=i(e=>e!=null,"isSet"),J7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),mR=i((e,t=!1)=>{if(!t)return J7.test(e);let r=e.split(".");for(let n of r)if(!mR(n))return!1;return!0},"isValidHostLabel");function K7(e,t,r){return e?t:r}i(K7,"ite");var Z7=i(e=>!e,"not"),X7=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}$"),GM=i(e=>X7.test(e)||e.startsWith("[")&&e.endsWith("]"),"isIpAddress"),cR={[lR.EndpointURLScheme.HTTP]:80,[lR.EndpointURLScheme.HTTPS]:443},Y7=i(e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:E,port:g,protocol:v="",path:A="",query:R={}}=e,b=new URL(`${v}//${E}${g?`:${g}`:""}${A}`);return b.search=Object.entries(R).map(([$,G])=>`${$}=${G}`).join("&"),b}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:n,hostname:o,pathname:a,protocol:c,search:u}=t;if(u)return null;let l=c.slice(0,-1);if(!Object.values(lR.EndpointURLScheme).includes(l))return null;let d=GM(o),_=r.includes(`${n}:${cR[l]}`)||typeof e=="string"&&e.includes(`${n}:${cR[l]}`),y=`${n}${_?`:${cR[l]}`:""}`;return{scheme:l,authority:y,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:d}},"parseURL");function Q7(e,t,r){if(r===1)return[e];if(e==="")return[""];let n=e.split(t);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(t))}i(Q7,"split");var eY=i((e,t)=>e===t,"stringEquals"),tY=i((e,t,r,n)=>e==null||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),"substring"),rY=i(e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),nY={booleanEquals:q7,coalesce:V7,getAttr:BM,isSet:W7,isValidHostLabel:mR,ite:K7,not:Z7,parseURL:Y7,split:Q7,stringEquals:eY,substring:tY,uriEncode:rY},FM=i((e,t)=>{let r=[],{referenceRecord:n,endpointParams:o}=t,a=0;for(;a<e.length;){let c=e.indexOf("{",a);if(c===-1){r.push(e.slice(a));break}r.push(e.slice(a,c));let u=e.indexOf("}",c);if(u===-1){r.push(e.slice(c));break}e[c+1]==="{"&&e[u+1]==="}"&&(r.push(e.slice(c+1,u)),a=u+2);let l=e.substring(c+1,u);if(l.includes("#")){let[d,_]=l.split("#");r.push(BM(n[d]??o[d],_))}else r.push(n[l]??o[l]);a=u+1}return r.join("")},"evaluateTemplate"),oY=i(({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],"getReferenceValue"),Wu=i((e,t,r)=>{if(typeof e=="string")return FM(e,r);if(e.fn)return qM.callFunction(e,r);if(e.ref)return oY(e,r);throw new Ot(`'${t}': ${String(e)} is not a string, function or reference.`)},"evaluateExpression"),jM=i(({fn:e,argv:t},r)=>{let n=Array(t.length);for(let c=0;c<n.length;++c){let u=t[c];typeof u=="boolean"||typeof u=="number"?n[c]=u:n[c]=qM.evaluateExpression(u,"arg",r)}let o=e.indexOf(".");if(o!==-1){let u=UM[e.slice(0,o)]?.[e.slice(o+1)];if(typeof u=="function")return u(...n)}let a=nY[e];if(typeof a=="function")return a(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},"callFunction"),qM={evaluateExpression:Wu,callFunction:jM},VM=i((e,t)=>{let{assign:r}=e;if(r&&r in t.referenceRecord)throw new Ot(`'${r}' is already defined in Reference Record.`);let n=jM(e,t);t.logger?.debug?.(`${Hu} evaluateCondition: ${ki(e)} = ${ki(n)}`);let o=n===""?!0:!!n;return r!=null?{result:o,toAssign:{name:r,value:n}}:{result:o}},"evaluateCondition"),HM=i((e,t)=>Object.entries(e??{}).reduce((r,[n,o])=>(r[n]=o.map(a=>{let c=Wu(a,"Header value entry",t);if(typeof c!="string")throw new Ot(`Header '${n}' value '${c}' is not a string`);return c}),r),{}),"getEndpointHeaders"),fR=i((e,t)=>Object.entries(e).reduce((r,[n,o])=>(r[n]=JM.getEndpointProperty(o,t),r),{}),"getEndpointProperties"),WM=i((e,t)=>{if(Array.isArray(e))return e.map(r=>WM(r,t));switch(typeof e){case"string":return FM(e,t);case"object":if(e===null)throw new Ot(`Unexpected endpoint property: ${e}`);return JM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ot(`Unexpected endpoint property type: ${typeof e}`)}},"getEndpointProperty"),JM={getEndpointProperty:WM,getEndpointProperties:fR},KM=i((e,t)=>{let r=Wu(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new Ot(`Endpoint URL must be a string, got ${typeof r}`)},"getEndpointUrl"),uR=1e8,iY=i((e,t)=>{let{nodes:r,root:n,results:o,conditions:a}=e,c=n,u={},l={referenceRecord:u,endpointParams:t.endpointParams,logger:t.logger};for(;c!==1&&c!==-1&&c<uR;){let d=3*(Math.abs(c)-1),[_,y,E]=[r[d],r[d+1],r[d+2]],[g,v,A]=a[_],R=VM({fn:g,assign:A,argv:v},l);if(R.toAssign){let{name:b,value:$}=R.toAssign;u[b]=$}c=c>=0===R.result?y:E}if(c>=uR){let d=o[c-uR];if(d[0]===-1){let[,g]=d;throw new Ot(Wu(g,"Error",l))}let[_,y,E]=d;return{url:KM(_,l),properties:fR(y,l),headers:HM(E??{},l)}}throw new Ot("No matching endpoint.")},"decideEndpoint"),gR=i((e=[],t)=>{let r={},n={...t,referenceRecord:{...t.referenceRecord}},o=!1;for(let a of e){let{result:c,toAssign:u}=VM(a,n);if(!c)return{result:c};u&&(o=!0,r[u.name]=u.value,n.referenceRecord[u.name]=u.value,t.logger?.debug?.(`${Hu} assign: ${u.name} := ${ki(u.value)}`))}return o?{result:!0,referenceRecord:r}:{result:!0}},"evaluateConditions"),sY=i((e,t)=>{let{conditions:r,endpoint:n}=e,{result:o,referenceRecord:a}=gR(r,t);if(!o)return;let c=a?{...t,referenceRecord:{...t.referenceRecord,...a}}:t,{url:u,properties:l,headers:d}=n;t.logger?.debug?.(`${Hu} Resolving endpoint from template: ${ki(n)}`);let _={url:KM(u,c)};return d!=null&&(_.headers=HM(d,c)),l!=null&&(_.properties=fR(l,c)),_},"evaluateEndpointRule"),aY=i((e,t)=>{let{conditions:r,error:n}=e,{result:o,referenceRecord:a}=gR(r,t);if(!o)return;let c=a?{...t,referenceRecord:{...t.referenceRecord,...a}}:t;throw new Ot(Wu(n,"Error",c))},"evaluateErrorRule"),ZM=i((e,t)=>{for(let r of e)if(r.type==="endpoint"){let n=sY(r,t);if(n)return n}else if(r.type==="error")aY(r,t);else if(r.type==="tree"){let n=XM.evaluateTreeRule(r,t);if(n)return n}else throw new Ot(`Unknown endpoint rule: ${r}`);throw new Ot("Rules evaluation failed")},"evaluateRules"),cY=i((e,t)=>{let{conditions:r,rules:n}=e,{result:o,referenceRecord:a}=gR(r,t);if(!o)return;let c=a?{...t,referenceRecord:{...t.referenceRecord,...a}}:t;return XM.evaluateRules(n,c)},"evaluateTreeRule"),XM={evaluateRules:ZM,evaluateTreeRule:cY},uY=i((e,t)=>{let{endpointParams:r,logger:n}=t,{parameters:o,rules:a}=e;t.logger?.debug?.(`${Hu} Initial EndpointParams: ${ki(r)}`);for(let u in o){let l=o[u],d=r[u];if(d==null&&l.default!=null){r[u]=l.default;continue}if(l.required&&d==null)throw new Ot(`Missing required parameter: '${u}'`)}let c=ZM(a,{endpointParams:r,logger:n,referenceRecord:{}});return t.logger?.debug?.(`${Hu} Resolved endpoint: ${ki(c)}`),c},"resolveEndpoint");Yo.BinaryDecisionDiagram=dR;Yo.EndpointCache=pR;Yo.EndpointError=Ot;Yo.customEndpointFunctions=UM;Yo.decideEndpoint=iY;Yo.isIpAddress=GM;Yo.isValidHostLabel=mR;Yo.resolveEndpoint=uY});var Di=N(Dn=>{"use strict";var ec=er(),lY=Gr(),QM=i((e,t=!1)=>{if(t){for(let r of e.split("."))if(!QM(r))return!1;return!0}return!(!ec.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||ec.isIpAddress(e))},"isVirtualHostableS3Bucket"),YM=":",dY="/",pY=i(e=>{let t=e.split(YM);if(t.length<6)return null;let[r,n,o,a,c,...u]=t;if(r!=="arn"||n===""||o===""||u.join(YM)==="")return null;let l=u.map(d=>d.split(dY)).flat();return{partition:n,service:o,region:a,accountId:c,resourceId:l}},"parseArn"),mY=[{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-east-2":{description:"Asia Pacific (Taipei)"},"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-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],fY="1.1",eO={partitions:mY,version:fY},tO=eO,rO="",nO=i(e=>{let{partitions:t}=tO;for(let n of t){let{regions:o,outputs:a}=n;for(let[c,u]of Object.entries(o))if(c===e)return{...a,...u}}for(let n of t){let{regionRegex:o,outputs:a}=n;if(new RegExp(o).test(e))return{...a}}let r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},"partition"),oO=i((e,t="")=>{tO=e,rO=t},"setPartitionInfo"),gY=i(()=>{oO(eO,"")},"useDefaultPartitionInfo"),hY=i(()=>rO,"getUserAgentPrefix"),iO={isVirtualHostableS3Bucket:QM,parseArn:pY,partition:nO};ec.customEndpointFunctions.aws=iO;var yY=i(e=>{if(typeof e.endpointProvider!="function")throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>sO(e.endpointProvider({Region:typeof e.region=="function"?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint=="function"?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint=="function"?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:void 0},{logger:e.logger}))),e},"resolveDefaultAwsRegionalEndpointsConfig"),sO=i(e=>lY.parseUrl(e.url),"toEndpointV1");Dn.EndpointError=ec.EndpointError;Dn.isIpAddress=ec.isIpAddress;Dn.resolveEndpoint=ec.resolveEndpoint;Dn.awsEndpointFunctions=iO;Dn.getUserAgentPrefix=hY;Dn.partition=nO;Dn.resolveDefaultAwsRegionalEndpointsConfig=yY;Dn.setPartitionInfo=oO;Dn.toEndpointV1=sO;Dn.useDefaultPartitionInfo=gY});var xm,io,aO=D(()=>{xm={warningEmitted:!1},io=i(e=>{e&&!xm.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20&&(xm.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
19
|
+
no longer support Node.js ${e} in January 2026.
|
|
20
|
+
|
|
21
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
22
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
23
|
+
|
|
24
|
+
More information can be found at: https://a.co/c895JFp`))},"emitWarningIfUnsupportedVersion")});var _Y,EY,hR,cO=D(()=>{_Y=i(()=>(e,t)=>async r=>(t.__retryLongPoll=!0,e(r)),"longPollMiddleware"),EY={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},hR=i(e=>({applyToStack:i(t=>{t.add(_Y(),EY)},"applyToStack")}),"getLongPollPlugin")});function Mi(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var uO=D(()=>{i(Mi,"setCredentialFeature")});var _R=N(Qo=>{"use strict";var SY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],vY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],AY=["TimeoutError","RequestTimeout","RequestTimeoutException"],RY=[500,502,503,504],PY=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],CY=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],lO=i(e=>e?.$retryable!==void 0,"isRetryableByTrait"),TY=i(e=>SY.includes(e.name),"isClockSkewError"),dO=i(e=>e.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),pO=i(e=>{let t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},"isBrowserNetworkError"),xY=i(e=>e.$metadata?.httpStatusCode===429||vY.includes(e.name)||e.$retryable?.throttling==!0,"isThrottlingError"),yR=i((e,t=0)=>lO(e)||dO(e)||e.name==="InvalidSignatureException"&&e.message?.includes("Signature expired")||AY.includes(e.name)||PY.includes(e?.code||"")||CY.includes(e?.code||"")||RY.includes(e.$metadata?.httpStatusCode||0)||pO(e)||mO(e)||e.cause!==void 0&&t<=10&&yR(e.cause,t+1),"isTransientError"),bY=i(e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!yR(e)}return!1},"isServerError");function mO(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}i(mO,"isNodeJsHttp2TransientError");Qo.isBrowserNetworkError=pO;Qo.isClockSkewCorrectedError=dO;Qo.isClockSkewError=TY;Qo.isNodeJsHttp2TransientError=mO;Qo.isRetryableByTrait=lO;Qo.isServerError=bY;Qo.isThrottlingError=xY;Qo.isTransientError=yR});var Mn=N(it=>{"use strict";var IY=_R();it.RETRY_MODES=void 0;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(it.RETRY_MODES||(it.RETRY_MODES={}));var Im=3,wY=it.RETRY_MODES.STANDARD,wm=class e{static{i(this,"DefaultRateLimiter")}static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let r;this.updateMeasuredRate();let n=t;if(n?.errorType==="THROTTLING"||IY.isThrottlingError(n?.error??t)){let c=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=c,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(c),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());let a=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(a)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){for(this.refillTokenBucket();t>this.availableTokens;){let r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>e.setTimeoutFn(n,r)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){let t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}let r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){let n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}},$Y=100,RR=20*1e3,kY=500,ER=500,DY=5,MY=10,fO=1,OY="amz-sdk-invocation-id",NY="amz-sdk-request",qr=class e{static{i(this,"Retry")}static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return e.v2026?50:100}static throttlingDelay(){return e.v2026?1e3:500}static cost(){return e.v2026?14:5}static throttlingCost(){return e.v2026?5:10}static modifiedCostType(){return e.v2026?"THROTTLING":"TRANSIENT"}},SR=class{static{i(this,"DefaultRetryBackoffStrategy")}x=qr.delay();computeNextBackoffDelay(t){let o=Math.random()*Math.min(this.x*2**t,RR);return Math.floor(o)}setDelayBase(t){this.x=t}},$m=class{static{i(this,"DefaultRetryToken")}delay;count;cost;longPoll;constructor(t,r,n,o){this.delay=t,this.count=r,this.cost=n,this.longPoll=o}getRetryCount(){return this.count}getRetryDelay(){return Math.min(RR,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}},bm={incompatible:1,attempts:2,capacity:3},tc=class{static{i(this,"StandardRetryStrategy")}mode=it.RETRY_MODES.STANDARD;capacity=ER;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){typeof t=="number"?this.maxAttemptsProvider=async()=>t:typeof t=="function"?this.maxAttemptsProvider=t:t&&typeof t=="object"&&(this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff),this.maxAttemptsProvider??=async()=>Im,this.baseDelay??=qr.delay(),this.retryBackoffStrategy??=new SR}async acquireInitialRetryToken(t){return new $m(qr.delay(),0,void 0,qr.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){let n=await this.getMaxAttempts(),o=this.retryCode(t,r,n),a=o===0,c=t.isLongPoll?.();if(a||c){let u=r.errorType;this.retryBackoffStrategy.setDelayBase(u==="THROTTLING"?qr.throttlingDelay():this.baseDelay);let l=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),d=l;if(r.retryAfterHint instanceof Date&&(d=Math.max(l,Math.min(r.retryAfterHint.getTime()-Date.now(),l+5e3))),a){let _=this.getCapacityCost(u);return this.capacity-=_,new $m(d,t.getRetryCount()+1,_,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:qr.v2026&&o===bm.capacity&&c?d:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(ER,this.capacity+(t.getRetryCost()??fO))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Im}`),Im}}retryCode(t,r,n){let o=t.getRetryCount()+1,a=this.isRetryableError(r.errorType)?0:bm.incompatible,c=o<n?0:bm.attempts,u=this.capacity>=this.getCapacityCost(r.errorType)?0:bm.capacity;return a||c||u}getCapacityCost(t){return t===qr.modifiedCostType()?qr.throttlingCost():qr.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}},vR=class{static{i(this,"AdaptiveRetryStrategy")}mode=it.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){let{rateLimiter:n}=r??{};this.rateLimiter=n??new wm,this.standardRetryStrategy=r?new tc({maxAttempts:typeof t=="number"?t:3,...r}):new tc(t)}async acquireInitialRetryToken(t){let r=this.standardRetryStrategy.acquireInitialRetryToken(t);return await this.rateLimiter.getSendToken(),r}async refreshRetryTokenForRetry(t,r){this.rateLimiter.updateClientSendingRate(r);let n=this.standardRetryStrategy.refreshRetryTokenForRetry(t,r);return await this.rateLimiter.getSendToken(),n}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}},AR=class extends tc{static{i(this,"ConfiguredRetryStrategy")}computeNextBackoffDelay;constructor(t,r=qr.delay()){super(typeof t=="function"?t:async()=>t),typeof r=="number"?this.computeNextBackoffDelay=()=>r:this.computeNextBackoffDelay=r}async refreshRetryTokenForRetry(t,r){let n=await super.refreshRetryTokenForRetry(t,r);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}};it.AdaptiveRetryStrategy=vR;it.ConfiguredRetryStrategy=AR;it.DEFAULT_MAX_ATTEMPTS=Im;it.DEFAULT_RETRY_DELAY_BASE=$Y;it.DEFAULT_RETRY_MODE=wY;it.DefaultRateLimiter=wm;it.INITIAL_RETRY_TOKENS=ER;it.INVOCATION_ID_HEADER=OY;it.MAXIMUM_RETRY_DELAY=RR;it.NO_RETRY_INCREMENT=fO;it.REQUEST_HEADER=NY;it.RETRY_COST=DY;it.Retry=qr;it.StandardRetryStrategy=tc;it.THROTTLING_RETRY_DELAY_BASE=kY;it.TIMEOUT_RETRY_COST=MY});function hO(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var gO,yO=D(()=>{gO=I(Mn());gO.Retry.v2026||=typeof process=="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";i(hO,"setFeature")});function _O(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var EO=D(()=>{i(_O,"setTokenFeature")});var Pr={};bt(Pr,{emitWarningIfUnsupportedVersion:()=>io,getLongPollPlugin:()=>hR,setCredentialFeature:()=>Mi,setFeature:()=>hO,setTokenFeature:()=>_O,state:()=>xm});var yt=D(()=>{aO();cO();uO();yO();EO()});var ti=N(rc=>{"use strict";var LY=(Xe(),Q(fr)),zY=Di(),UY=Me(),ei=(yt(),Q(Pr)),SO=Mn(),PO=void 0;function BY(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}i(BY,"isValidUserAgentAppId");function GY(e){let t=LY.normalizeProvider(e.userAgentAppId??PO),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:i(async()=>{let n=await t();if(!BY(n)){let o=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?o?.warn("userAgentAppId must be a string or undefined."):n.length>50&&o?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n},"userAgentAppId")})}i(GY,"resolveUserAgentConfig");var FY=/\d{12}\.ddb/;async function jY(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&ei.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){let a=await t.retryStrategy();if(typeof a.mode=="string")switch(a.mode){case SO.RETRY_MODES.ADAPTIVE:ei.setFeature(e,"RETRY_MODE_ADAPTIVE","F");break;case SO.RETRY_MODES.STANDARD:ei.setFeature(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){let a=e.endpointV2;switch(String(a?.url?.hostname).match(FY)&&ei.setFeature(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":ei.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ei.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ei.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let o=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(o?.$source){let a=o;a.accountId&&ei.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[c,u]of Object.entries(a.$source??{}))ei.setFeature(e,c,u)}}i(jY,"checkFeatures");var vO="user-agent",PR="x-amz-user-agent",AO=" ",CR="/",qY=/[^!$%&'*+\-.^_`|~\w]/g,VY=/[^!$%&'*+\-.^_`|~\w#]/g,RO="-",HY=1024;function WY(e){let t="";for(let r in e){let n=e[r];if(t.length+n.length+1<=HY){t.length?t+=","+n:t+=n;continue}break}return t}i(WY,"encodeFeatures");var CO=i(e=>(t,r)=>async n=>{let{request:o}=n;if(!UY.HttpRequest.isInstance(o))return t(n);let{headers:a}=o,c=r?.userAgent?.map(km)||[],u=(await e.defaultUserAgentProvider()).map(km);await jY(r,e,n);let l=r;u.push(`m/${WY(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);let d=e?.customUserAgent?.map(km)||[],_=await e.userAgentAppId();_&&u.push(km(["app",`${_}`]));let y=zY.getUserAgentPrefix(),E=(y?[y]:[]).concat([...u,...c,...d]).join(AO),g=[...u.filter(v=>v.startsWith("aws-sdk-")),...d].join(AO);return e.runtime!=="browser"?(g&&(a[PR]=a[PR]?`${a[vO]} ${g}`:g),a[vO]=E):a[PR]=E,t({...n,request:o})},"userAgentMiddleware"),km=i(e=>{let t=e[0].split(CR).map(c=>c.replace(qY,RO)).join(CR),r=e[1]?.replace(VY,RO),n=t.indexOf(CR),o=t.substring(0,n),a=t.substring(n+1);return o==="api"&&(a=a.toLowerCase()),[o,a,r].filter(c=>c&&c.length>0).reduce((c,u,l)=>{switch(l){case 0:return u;case 1:return`${c}/${u}`;default:return`${c}#${u}`}},"")},"escapeUserAgent"),TO={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},JY=i(e=>({applyToStack:i(t=>{t.add(CO(e),TO)},"applyToStack")}),"getUserAgentPlugin");rc.DEFAULT_UA_APP_ID=PO;rc.getUserAgentMiddlewareOptions=TO;rc.getUserAgentPlugin=JY;rc.resolveUserAgentConfig=GY;rc.userAgentMiddleware=CO});var bO=N(xO=>{"use strict";var KY=Up();function ZY(e){let{port:t,query:r}=e,{protocol:n,path:o,hostname:a}=e;n&&n.slice(-1)!==":"&&(n+=":"),t&&(a+=`:${t}`),o&&o.charAt(0)!=="/"&&(o=`/${o}`);let c=r?KY.buildQueryString(r):"";c&&c[0]!=="?"&&(c=`?${c}`);let u="";if(e.username!=null||e.password!=null){let d=e.username??"",_=e.password??"";u=`${d}:${_}@`}let l="";return e.fragment&&(l=`#${e.fragment}`),`${n}//${u}${a}${o}${c}${l}`}i(ZY,"formatUrl");xO.formatUrl=ZY});var $O=N((_rt,wO)=>{var Dm=Object.defineProperty,XY=Object.getOwnPropertyDescriptor,YY=Object.getOwnPropertyNames,QY=Object.prototype.hasOwnProperty,eQ=i((e,t)=>Dm(e,"name",{value:t,configurable:!0}),"__name"),tQ=i((e,t)=>{for(var r in t)Dm(e,r,{get:t[r],enumerable:!0})},"__export"),rQ=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of YY(t))!QY.call(e,o)&&o!==r&&Dm(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=XY(t,o))||n.enumerable});return e},"__copyProps"),nQ=i(e=>rQ(Dm({},"__esModule",{value:!0}),e),"__toCommonJS"),IO={};tQ(IO,{isArrayBuffer:i(()=>oQ,"isArrayBuffer")});wO.exports=nQ(IO);var oQ=eQ(e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var OO=N((Srt,MO)=>{var Mm=Object.defineProperty,iQ=Object.getOwnPropertyDescriptor,sQ=Object.getOwnPropertyNames,aQ=Object.prototype.hasOwnProperty,kO=i((e,t)=>Mm(e,"name",{value:t,configurable:!0}),"__name"),cQ=i((e,t)=>{for(var r in t)Mm(e,r,{get:t[r],enumerable:!0})},"__export"),uQ=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sQ(t))!aQ.call(e,o)&&o!==r&&Mm(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=iQ(t,o))||n.enumerable});return e},"__copyProps"),lQ=i(e=>uQ(Mm({},"__esModule",{value:!0}),e),"__toCommonJS"),DO={};cQ(DO,{fromArrayBuffer:i(()=>pQ,"fromArrayBuffer"),fromString:i(()=>mQ,"fromString")});MO.exports=lQ(DO);var dQ=$O(),TR=require("buffer"),pQ=kO((e,t=0,r=e.byteLength-t)=>{if(!(0,dQ.isArrayBuffer)(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return TR.Buffer.from(e,t,r)},"fromArrayBuffer"),mQ=kO((e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?TR.Buffer.from(e,t):TR.Buffer.from(e)},"fromString")});var BO=N((Art,UO)=>{var Om=Object.defineProperty,fQ=Object.getOwnPropertyDescriptor,gQ=Object.getOwnPropertyNames,hQ=Object.prototype.hasOwnProperty,xR=i((e,t)=>Om(e,"name",{value:t,configurable:!0}),"__name"),yQ=i((e,t)=>{for(var r in t)Om(e,r,{get:t[r],enumerable:!0})},"__export"),_Q=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gQ(t))!hQ.call(e,o)&&o!==r&&Om(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=fQ(t,o))||n.enumerable});return e},"__copyProps"),EQ=i(e=>_Q(Om({},"__esModule",{value:!0}),e),"__toCommonJS"),NO={};yQ(NO,{fromUtf8:i(()=>zO,"fromUtf8"),toUint8Array:i(()=>SQ,"toUint8Array"),toUtf8:i(()=>vQ,"toUtf8")});UO.exports=EQ(NO);var LO=OO(),zO=xR(e=>{let t=(0,LO.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),SQ=xR(e=>typeof e=="string"?zO(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array"),vQ=xR(e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,LO.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var GO=N(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.convertToBuffer=void 0;var AQ=BO(),RQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:AQ.fromUtf8;function PQ(e){return e instanceof Uint8Array?e:typeof e=="string"?RQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}i(PQ,"convertToBuffer");Nm.convertToBuffer=PQ});var FO=N(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.isEmptyData=void 0;function CQ(e){return typeof e=="string"?e.length===0:e.byteLength===0}i(CQ,"isEmptyData");Lm.isEmptyData=CQ});var jO=N(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.numToUint8=void 0;function TQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}i(TQ,"numToUint8");zm.numToUint8=TQ});var qO=N(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.uint32ArrayFrom=void 0;function xQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}i(xQ,"uint32ArrayFrom");Um.uint32ArrayFrom=xQ});var Bm=N(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.uint32ArrayFrom=so.numToUint8=so.isEmptyData=so.convertToBuffer=void 0;var bQ=GO();Object.defineProperty(so,"convertToBuffer",{enumerable:!0,get:i(function(){return bQ.convertToBuffer},"get")});var IQ=FO();Object.defineProperty(so,"isEmptyData",{enumerable:!0,get:i(function(){return IQ.isEmptyData},"get")});var wQ=jO();Object.defineProperty(so,"numToUint8",{enumerable:!0,get:i(function(){return wQ.numToUint8},"get")});var $Q=qO();Object.defineProperty(so,"uint32ArrayFrom",{enumerable:!0,get:i(function(){return $Q.uint32ArrayFrom},"get")})});var WO=N(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.AwsCrc32=void 0;var VO=(Ko(),Q(Jo)),bR=Bm(),HO=IR(),kQ=(function(){function e(){this.crc32=new HO.Crc32}return i(e,"AwsCrc32"),e.prototype.update=function(t){(0,bR.isEmptyData)(t)||this.crc32.update((0,bR.convertToBuffer)(t))},e.prototype.digest=function(){return VO.__awaiter(this,void 0,void 0,function(){return VO.__generator(this,function(t){return[2,(0,bR.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new HO.Crc32},e})();Gm.AwsCrc32=kQ});var IR=N(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.AwsCrc32=Oi.Crc32=Oi.crc32=void 0;var DQ=(Ko(),Q(Jo)),MQ=Bm();function OQ(e){return new JO().update(e).digest()}i(OQ,"crc32");Oi.crc32=OQ;var JO=(function(){function e(){this.checksum=4294967295}return i(e,"Crc32"),e.prototype.update=function(t){var r,n;try{for(var o=DQ.__values(t),a=o.next();!a.done;a=o.next()){var c=a.value;this.checksum=this.checksum>>>8^LQ[(this.checksum^c)&255]}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})();Oi.Crc32=JO;var NQ=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],LQ=(0,MQ.uint32ArrayFrom)(NQ),zQ=WO();Object.defineProperty(Oi,"AwsCrc32",{enumerable:!0,get:i(function(){return zQ.AwsCrc32},"get")})});var jm=N(Li=>{"use strict";var YO=IR(),Ws=Wa(),nc=class e{static{i(this,"Int64")}bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&KO(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&KO(t),parseInt(Ws.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function KO(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(KO,"negate");var Fm=class{static{i(this,"HeaderMarshaller")}toUtf8;fromUtf8;constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){let r=[];for(let a of Object.keys(t)){let c=this.fromUtf8(a);r.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(t[a]))}let n=new Uint8Array(r.reduce((a,c)=>a+c.byteLength,0)),o=0;for(let a of r)n.set(a,o),o+=a.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let o=new Uint8Array(9);return o[0]=5,o.set(t.value.bytes,1),o;case"binary":let a=new DataView(new ArrayBuffer(3+t.value.byteLength));a.setUint8(0,6),a.setUint16(1,t.value.byteLength,!1);let c=new Uint8Array(a.buffer);return c.set(t.value,3),c;case"string":let u=this.fromUtf8(t.value),l=new DataView(new ArrayBuffer(3+u.byteLength));l.setUint8(0,7),l.setUint16(1,u.byteLength,!1);let d=new Uint8Array(l.buffer);return d.set(u,3),d;case"timestamp":let _=new Uint8Array(9);return _[0]=8,_.set(nc.fromNumber(t.value.valueOf()).bytes,1),_;case"uuid":if(!WQ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let y=new Uint8Array(17);return y[0]=9,y.set(Ws.fromHex(t.value.replace(/\-/g,"")),1),y}}parse(t){let r={},n=0;for(;n<t.byteLength;){let o=t.getUint8(n++),a=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,o));switch(n+=o,t.getUint8(n++)){case 0:r[a]={type:XO,value:!0};break;case 1:r[a]={type:XO,value:!1};break;case 2:r[a]={type:UQ,value:t.getInt8(n++)};break;case 3:r[a]={type:BQ,value:t.getInt16(n,!1)},n+=2;break;case 4:r[a]={type:GQ,value:t.getInt32(n,!1)},n+=4;break;case 5:r[a]={type:FQ,value:new nc(new Uint8Array(t.buffer,t.byteOffset+n,8))},n+=8;break;case 6:let c=t.getUint16(n,!1);n+=2,r[a]={type:jQ,value:new Uint8Array(t.buffer,t.byteOffset+n,c)},n+=c;break;case 7:let u=t.getUint16(n,!1);n+=2,r[a]={type:qQ,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,u))},n+=u;break;case 8:r[a]={type:VQ,value:new Date(new nc(new Uint8Array(t.buffer,t.byteOffset+n,8)).valueOf())},n+=8;break;case 9:let l=new Uint8Array(t.buffer,t.byteOffset+n,16);n+=16,r[a]={type:HQ,value:`${Ws.toHex(l.subarray(0,4))}-${Ws.toHex(l.subarray(4,6))}-${Ws.toHex(l.subarray(6,8))}-${Ws.toHex(l.subarray(8,10))}-${Ws.toHex(l.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}},ZO;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(ZO||(ZO={}));var XO="boolean",UQ="byte",BQ="short",GQ="integer",FQ="long",jQ="binary",qQ="string",VQ="timestamp",HQ="uuid",WQ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,QO=4,Ni=QO*2,Js=4,JQ=Ni+Js*2;function KQ({byteLength:e,byteOffset:t,buffer:r}){if(e<JQ)throw new Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),o=n.getUint32(0,!1);if(e!==o)throw new Error("Reported message length does not match received message length");let a=n.getUint32(QO,!1),c=n.getUint32(Ni,!1),u=n.getUint32(e-Js,!1),l=new YO.Crc32().update(new Uint8Array(r,t,Ni));if(c!==l.digest())throw new Error(`The prelude checksum specified in the message (${c}) does not match the calculated CRC32 checksum (${l.digest()})`);if(l.update(new Uint8Array(r,t+Ni,e-(Ni+Js))),u!==l.digest())throw new Error(`The message checksum (${l.digest()}) did not match the expected value of ${u}`);return{headers:new DataView(r,t+Ni+Js,a),body:new Uint8Array(r,t+Ni+Js+a,o-a-(Ni+Js+Js))}}i(KQ,"splitMessage");var wR=class{static{i(this,"EventStreamCodec")}headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new Fm(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){let t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){let t=this.messageBuffer;this.messageBuffer=[];let r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){let n=this.headerMarshaller.format(t),o=n.byteLength+r.byteLength+16,a=new Uint8Array(o),c=new DataView(a.buffer,a.byteOffset,a.byteLength),u=new YO.Crc32;return c.setUint32(0,o,!1),c.setUint32(4,n.byteLength,!1),c.setUint32(8,u.update(a.subarray(0,8)).digest(),!1),a.set(n,12),a.set(r,n.byteLength+12),c.setUint32(o-4,u.update(a.subarray(8,o-4)).digest(),!1),a}decode(t){let{headers:r,body:n}=KQ(t);return{headers:this.headerMarshaller.parse(r),body:n}}formatHeaders(t){return this.headerMarshaller.format(t)}},$R=class{static{i(this,"MessageDecoderStream")}options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.decoder.decode(t)}},kR=class{static{i(this,"MessageEncoderStream")}options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}},DR=class{static{i(this,"SmithyMessageDecoderStream")}options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream){let r=await this.options.deserializer(t);r!==void 0&&(yield r)}}},MR=class{static{i(this,"SmithyMessageEncoderStream")}options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.serializer(t)}};Li.EventStreamCodec=wR;Li.HeaderMarshaller=Fm;Li.Int64=nc;Li.MessageDecoderStream=$R;Li.MessageEncoderStream=kR;Li.SmithyMessageDecoderStream=DR;Li.SmithyMessageEncoderStream=MR});var NR=N(OR=>{"use strict";var Ju=jm();function ZQ(e){let t=0,r=0,n=null,o=null,a=i(u=>{if(typeof u!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+u);t=u,r=4,n=new Uint8Array(u),new DataView(n.buffer).setUint32(0,u,!1)},"allocateMessage"),c=i(async function*(){let u=e[Symbol.asyncIterator]();for(;;){let{value:l,done:d}=await u.next();if(d){if(t)if(t===r)yield n;else throw new Error("Truncated event message received.");else return;return}let _=l.length,y=0;for(;y<_;){if(!n){let g=_-y;o||(o=new Uint8Array(4));let v=Math.min(4-r,g);if(o.set(l.slice(y,y+v),r),r+=v,y+=v,r<4)break;a(new DataView(o.buffer).getUint32(0,!1)),o=null}let E=Math.min(t-r,_-y);n.set(l.slice(y,y+E),r),r+=E,y+=E,t&&t===r&&(yield n,n=null,t=0,r=0)}}},"iterator");return{[Symbol.asyncIterator]:c}}i(ZQ,"getChunkedStream");function XQ(e,t){return async function(r){let{value:n}=r.headers[":message-type"];if(n==="error"){let o=new Error(r.headers[":error-message"].value||"UnknownError");throw o.name=r.headers[":error-code"].value,o}else if(n==="exception"){let o=r.headers[":exception-type"].value,a={[o]:r},c=await e(a);if(c.$unknown){let u=new Error(t(r.body));throw u.name=o,u}throw c[o]}else if(n==="event"){let o={[r.headers[":event-type"].value]:r},a=await e(o);return a.$unknown?void 0:a}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}i(XQ,"getMessageUnmarshaller");var qm=class{static{i(this,"EventStreamMarshaller")}eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new Ju.EventStreamCodec(t,r),this.utfEncoder=t}deserialize(t,r){let n=ZQ(t);return new Ju.SmithyMessageDecoderStream({messageStream:new Ju.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:XQ(r,this.utfEncoder)})}serialize(t,r){return new Ju.MessageEncoderStream({messageStream:new Ju.SmithyMessageEncoderStream({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},YQ=i(e=>new qm(e),"eventStreamSerdeProvider");OR.EventStreamMarshaller=qm;OR.eventStreamSerdeProvider=YQ});var rN=N(Ku=>{"use strict";var QQ=NR(),eN=i(e=>({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)return;yield n}}finally{t.releaseLock()}}}),"readableStreamtoIterable"),tN=i(e=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){let{done:n,value:o}=await t.next();if(n)return r.close();r.enqueue(o)}})},"iterableToReadableStream"),Vm=class{static{i(this,"EventStreamMarshaller")}universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new QQ.EventStreamMarshaller({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){let n=eee(t)?eN(t):t;return this.universalMarshaller.deserialize(n,r)}serialize(t,r){let n=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?tN(n):n}},eee=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStream"),tee=i(e=>new Vm(e),"eventStreamSerdeProvider");Ku.EventStreamMarshaller=Vm;Ku.eventStreamSerdeProvider=tee;Ku.iterableToReadableStream=tN;Ku.readableStreamtoIterable=eN});var sN=N(Zu=>{"use strict";var ree=bO(),oN=rN(),nN=cA(),GR=Me(),nee=gt(),oee=jm(),iee=Wa(),iN=i(e=>e.protocol==="ws:"||e.protocol==="wss:","isWebSocketRequest"),see=3e3,LR=class e{static{i(this,"WebSocketFetchHandler")}metadata={handlerProtocol:"websocket/h1.1"};config={};configPromise;httpHandler;sockets={};static create(t,r=new nN.FetchHttpHandler){return typeof t?.handle=="function"?t:new e(t,r)}constructor(t,r=new nN.FetchHttpHandler){this.httpHandler=r;let n=i(o=>(this.config={...o??{}},this.config),"setConfig");typeof t=="function"?(this.config={},this.configPromise=t().then(o=>n(o))):this.configPromise=Promise.resolve(n(t))}destroy(){for(let[t,r]of Object.entries(this.sockets)){for(let n of r)n.close(1e3,"Socket closed through destroy() call");delete this.sockets[t]}}async handle(t){this.config=await this.configPromise;let{logger:r}=this.config;if(!iN(t))return r?.debug?.(`@aws-sdk - ws fetching ${t.protocol}${t.hostname}${t.path}`),this.httpHandler.handle(t);let n=ree.formatUrl(t);r?.debug?.(`@aws-sdk - ws connecting ${n.split("?")[0]}`);let o=new WebSocket(n);this.sockets[n]||(this.sockets[n]=[]),this.sockets[n].push(o),o.binaryType="arraybuffer";let{connectionTimeout:a=see}=this.config;await this.waitForReady(o,a);let{body:c}=t,u=aee(c),l=this.connect(o,u),d=cee(l);return{response:new GR.HttpResponse({statusCode:200,body:d})}}updateHttpClientConfig(t,r){this.configPromise=this.configPromise.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}removeNotUsableSockets(t){this.sockets[t]=(this.sockets[t]??[]).filter(r=>![WebSocket.CLOSING,WebSocket.CLOSED].includes(r.readyState))}waitForReady(t,r){return new Promise((n,o)=>{let a=setTimeout(()=>{this.removeNotUsableSockets(t.url),o({$metadata:{httpStatusCode:500,websocketSynthetic500Error:!0}})},r);t.onopen=()=>{clearTimeout(a),n()}})}connect(t,r){let n=[],o=null,a=null,c=i(d=>{o?(d.error?a(d.error):o({done:d.done,value:d.value}),o=null,a=null):n.push(d)},"push");t.onmessage=d=>{let{data:_}=d;c(typeof _=="string"?{done:!1,value:nee.fromBase64(_)}:{done:!1,value:new Uint8Array(_)})},t.onerror=d=>{t.close(),c({done:!0,error:d})},t.onclose=()=>{this.removeNotUsableSockets(t.url),c({done:!0})};let u={[Symbol.asyncIterator]:()=>({async next(){if(n.length>0){let d=n.shift();if(d.error)throw d.error;return{done:d.done,value:d.value}}return new Promise((d,_)=>{o=d,a=_})}})};return i(async()=>{try{for await(let d of r){if(t.readyState>=WebSocket.CLOSING)break;t.send(d)}}catch(d){c({done:!0,error:d})}finally{t.close(1e3)}},"send")(),u}},aee=i(e=>e[Symbol.asyncIterator]?e:uee(e)?oN.readableStreamtoIterable(e):{[Symbol.asyncIterator]:async function*(){yield e}},"getIterator"),cee=i(e=>typeof ReadableStream=="function"?oN.iterableToReadableStream(e):e,"toReadableStream"),uee=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStream"),lee=i((e,t)=>r=>n=>{let{request:o}=n;if(GR.HttpRequest.isInstance(o)&&e.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")){o.protocol="wss:",o.method="GET",o.path=`${o.path}-websocket`;let{headers:a}=o;delete a["content-type"],delete a["x-amz-content-sha256"];for(let c of Object.keys(a))if(c.indexOf(t.headerPrefix)===0){let u=c.replace(t.headerPrefix,"");o.query[u]=a[c]}a["x-amz-user-agent"]&&(o.query["user-agent"]=a["x-amz-user-agent"]),o.headers={host:a.host??o.hostname}}return r(n)},"websocketEndpointMiddleware"),dee={name:"websocketEndpointMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],relation:"after",toMiddleware:"eventStreamHeaderMiddleware",override:!0},pee=i(()=>e=>async t=>{let r={...t.input},n=await e(t),o=n.output;return r.SessionId&&o.SessionId==null&&(o.SessionId=r.SessionId),n},"injectSessionIdMiddleware"),mee={step:"initialize",name:"injectSessionIdMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],override:!0},fee=i((e,t)=>({applyToStack:i(r=>{r.addRelativeTo(lee(e,t),dee),r.add(pee(),mee)},"applyToStack")}),"getWebSocketPlugin"),zR=class{static{i(this,"WebsocketSignatureV4")}signer;constructor(t){this.signer=t.signer}presign(t,r={}){return this.signer.presign(t,r)}async sign(t,r){return GR.HttpRequest.isInstance(t)&&iN(t)?{...await this.signer.presign({...t,body:""},{...r,expiresIn:60,unsignableHeaders:new Set(Object.keys(t.headers).filter(o=>o!=="host"))}),body:t.body}:this.signer.sign(t,r)}signMessage(t,r){return this.signer.signMessage(t,r)}},gee=i(e=>{let{signer:t}=e;return Object.assign(e,{signer:i(async r=>{let n=await t(r);if(hee(n))return new zR({signer:n});throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor.")},"signer")})},"resolveWebSocketConfig"),hee=i(e=>!!e,"validateSigner"),UR=class extends TransformStream{static{i(this,"EventSigningTransformStream")}constructor(t,r,n,o,a){let c=t,u=a?.();super({start(){},async transform(l,d){try{let _=new Date(Date.now()+await o()),y={":date":{type:"timestamp",value:_}},E=await r.sign({message:{body:l,headers:y},priorSignature:c},{signingDate:_,eventStreamCredentials:await u});c=E.signature;let g=n.encode({headers:{...y,":chunk-signature":{type:"binary",value:iee.fromHex(E.signature)}},body:l});d.enqueue(g)}catch(_){d.error(_)}}})}},BR=class{static{i(this,"EventStreamPayloadHandler")}messageSigner;eventStreamCodec;systemClockOffsetProvider;credentials;constructor(t){this.messageSigner=t.messageSigner,this.eventStreamCodec=new oee.EventStreamCodec(t.utf8Encoder,t.utf8Decoder),this.systemClockOffsetProvider=async()=>t.systemClockOffset??0,this.credentials=t.credentials}async handle(t,r,n={}){let o=r.request,{body:a,headers:c,query:u}=o;if(!(a instanceof ReadableStream))throw new Error("Eventstream payload must be a ReadableStream.");let l=new TransformStream;o.body=l.readable;let _=((c?.authorization??"").match(/Signature=(\w+)$/)??[])[1]??(u&&u["X-Amz-Signature"])??"";n.__staticSignature&&(_="");let y=new UR(_,await this.messageSigner(),this.eventStreamCodec,this.systemClockOffsetProvider,this.credentials);a.pipeThrough(y).pipeThrough(l);let E;try{E=await t(r)}catch(g){let v=a.cancel?.();throw v instanceof Promise&&v.catch(()=>{}),g}return E}},yee=i(e=>new BR(e),"eventStreamPayloadHandlerProvider");Zu.WebSocketFetchHandler=LR;Zu.eventStreamPayloadHandlerProvider=yee;Zu.getWebSocketPlugin=fee;Zu.resolveWebSocketConfig=gee});var Hm=N(oc=>{"use strict";var _ee=i((e,t,r)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}},"booleanSelector"),Eee=i((e,t,r)=>{if(!(t in e))return;let n=parseInt(e[t],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${t}'. Expected number, got '${e[t]}'.`);return n},"numberSelector");oc.SelectorType=void 0;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(oc.SelectorType||(oc.SelectorType={}));oc.booleanSelector=_ee;oc.numberSelector=Eee});var Nt=N(wt=>{"use strict";var tr=Hm(),Wm=It(),See=er(),FR="AWS_USE_DUALSTACK_ENDPOINT",jR="use_dualstack_endpoint",vee=!1,Aee={environmentVariableSelector:i(e=>tr.booleanSelector(e,FR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,jR,tr.SelectorType.CONFIG),"configFileSelector"),default:!1},Ree={environmentVariableSelector:i(e=>tr.booleanSelector(e,FR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,jR,tr.SelectorType.CONFIG),"configFileSelector"),default:void 0},qR="AWS_USE_FIPS_ENDPOINT",VR="use_fips_endpoint",Pee=!1,Cee={environmentVariableSelector:i(e=>tr.booleanSelector(e,qR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,VR,tr.SelectorType.CONFIG),"configFileSelector"),default:!1},Tee={environmentVariableSelector:i(e=>tr.booleanSelector(e,qR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,VR,tr.SelectorType.CONFIG),"configFileSelector"),default:void 0},xee=i(e=>{let{tls:t,endpoint:r,urlParser:n,useDualstackEndpoint:o}=e;return Object.assign(e,{tls:t??!0,endpoint:Wm.normalizeProvider(typeof r=="string"?n(r):r),isCustomEndpoint:!0,useDualstackEndpoint:Wm.normalizeProvider(o??!1)})},"resolveCustomEndpointsConfig"),bee=i(async e=>{let{tls:t=!0}=e,r=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");let o=await e.useDualstackEndpoint(),a=await e.useFipsEndpoint(),{hostname:c}=await e.regionInfoProvider(r,{useDualstackEndpoint:o,useFipsEndpoint:a})??{};if(!c)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${c}`)},"getEndpointFromRegion"),Iee=i(e=>{let t=Wm.normalizeProvider(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:o,tls:a}=e;return Object.assign(e,{tls:a??!0,endpoint:r?Wm.normalizeProvider(typeof r=="string"?o(r):r):()=>bee({...e,useDualstackEndpoint:t,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:t})},"resolveEndpointsConfig"),uN="AWS_REGION",lN="region",wee={environmentVariableSelector:i(e=>e[uN],"environmentVariableSelector"),configFileSelector:i(e=>e[lN],"configFileSelector"),default:i(()=>{throw new Error("Region is missing")},"default")},$ee={preferredFile:"credentials"},aN=new Set,kee=i((e,t=See.isValidHostLabel)=>{if(!aN.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else aN.add(e)},"checkRegion"),dN=i(e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),"isFipsRegion"),Dee=i(e=>dN(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,"getRealRegion"),Mee=i(e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:i(async()=>{let n=typeof t=="function"?await t():t,o=Dee(n);return kee(o),o},"region"),useFipsEndpoint:i(async()=>{let n=typeof t=="string"?t:await t();return dN(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()},"useFipsEndpoint")})},"resolveRegionConfig"),cN=i((e=[],{useFipsEndpoint:t,useDualstackEndpoint:r})=>e.find(({tags:n})=>t===n.includes("fips")&&r===n.includes("dualstack"))?.hostname,"getHostnameFromVariants"),Oee=i((e,{regionHostname:t,partitionHostname:r})=>t||(r?r.replace("{region}",e):void 0),"getResolvedHostname"),Nee=i((e,{partitionHash:t})=>Object.keys(t||{}).find(r=>t[r].regions.includes(e))??"aws","getResolvedPartition"),Lee=i((e,{signingRegion:t,regionRegex:r,useFipsEndpoint:n})=>{if(t)return t;if(n){let o=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),a=e.match(o);if(a)return a[0].slice(1,-1)}},"getResolvedSigningRegion"),zee=i((e,{useFipsEndpoint:t=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:o,partitionHash:a})=>{let c=Nee(e,{partitionHash:a}),u=e in o?e:a[c]?.endpoint??e,l={useFipsEndpoint:t,useDualstackEndpoint:r},d=cN(o[u]?.variants,l),_=cN(a[c]?.variants,l),y=Oee(u,{regionHostname:d,partitionHostname:_});if(y===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:u,useFipsEndpoint:t,useDualstackEndpoint:r}}`);let E=Lee(y,{signingRegion:o[u]?.signingRegion,regionRegex:a[c].regionRegex,useFipsEndpoint:t});return{partition:c,signingService:n,hostname:y,...E&&{signingRegion:E},...o[u]?.signingService&&{signingService:o[u].signingService}}},"getRegionInfo");wt.CONFIG_USE_DUALSTACK_ENDPOINT=jR;wt.CONFIG_USE_FIPS_ENDPOINT=VR;wt.DEFAULT_USE_DUALSTACK_ENDPOINT=vee;wt.DEFAULT_USE_FIPS_ENDPOINT=Pee;wt.ENV_USE_DUALSTACK_ENDPOINT=FR;wt.ENV_USE_FIPS_ENDPOINT=qR;wt.NODE_REGION_CONFIG_FILE_OPTIONS=$ee;wt.NODE_REGION_CONFIG_OPTIONS=wee;wt.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=Aee;wt.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=Cee;wt.REGION_ENV_NAME=uN;wt.REGION_INI_NAME=lN;wt.getRegionInfo=zee;wt.nodeDualstackConfigSelectors=Ree;wt.nodeFipsConfigSelectors=Tee;wt.resolveCustomEndpointsConfig=xee;wt.resolveEndpointsConfig=Iee;wt.resolveRegionConfig=Mee});var mN=N(pN=>{"use strict";var Uee=i(e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),"resolveEventStreamSerdeConfig");pN.resolveEventStreamSerdeConfig=Uee});var zi=N(Jm=>{"use strict";var Bee=Me(),fN="content-length";function gN(e){return t=>async r=>{let n=r.request;if(Bee.HttpRequest.isInstance(n)){let{body:o,headers:a}=n;if(o&&Object.keys(a).map(c=>c.toLowerCase()).indexOf(fN)===-1)try{let c=e(o);n.headers={...n.headers,[fN]:String(c)}}catch{}}return t({...r,request:n})}}i(gN,"contentLengthMiddleware");var hN={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Gee=i(e=>({applyToStack:i(t=>{t.add(gN(e.bodyLengthChecker),hN)},"applyToStack")}),"getContentLengthPlugin");Jm.contentLengthMiddleware=gN;Jm.contentLengthMiddlewareOptions=hN;Jm.getContentLengthPlugin=Gee});var jt=N(Ks=>{"use strict";var ic=class e extends Error{static{i(this,"ProviderError")}name="ProviderError";tryNextLink;constructor(t,r=!0){let n,o=!0;typeof r=="boolean"?(n=void 0,o=r):r!=null&&typeof r=="object"&&(n=r.logger,o=r.tryNextLink??!0),super(t),this.tryNextLink=o,Object.setPrototypeOf(this,e.prototype),n?.debug?.(`@smithy/property-provider ${o?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}},HR=class e extends ic{static{i(this,"CredentialsProviderError")}name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},WR=class e extends ic{static{i(this,"TokenProviderError")}name="TokenProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},Fee=i((...e)=>async()=>{if(e.length===0)throw new ic("No providers in chain");let t;for(let r of e)try{return await r()}catch(n){if(t=n,n?.tryNextLink)continue;throw n}throw t},"chain"),jee=i(e=>()=>Promise.resolve(e),"fromStatic"),qee=i((e,t,r)=>{let n,o,a,c=!1,u=i(async()=>{o||(o=e());try{n=await o,a=!0,c=!1}finally{o=void 0}return n},"coalesceProvider");return t===void 0?async l=>((!a||l?.forceRefresh)&&(n=await u()),n):async l=>((!a||l?.forceRefresh)&&(n=await u()),c?n:r&&!r(n)?(c=!0,n):(t(n)&&await u(),n))},"memoize");Ks.CredentialsProviderError=HR;Ks.ProviderError=ic;Ks.TokenProviderError=WR;Ks.chain=Fee;Ks.fromStatic=jee;Ks.memoize=qee});var KR=N(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.getHomeDir=void 0;var Vee=require("os"),Hee=require("path"),JR={},Wee=i(()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT","getHomeDirCacheKey"),Jee=i(()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:n=`C:${Hee.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${n}${r}`;let o=Wee();return JR[o]||(JR[o]=(0,Vee.homedir)()),JR[o]},"getHomeDir");Km.getHomeDir=Jee});var ZR=N(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.getSSOTokenFilepath=void 0;var Kee=require("crypto"),Zee=require("path"),Xee=KR(),Yee=i(e=>{let r=(0,Kee.createHash)("sha1").update(e).digest("hex");return(0,Zee.join)((0,Xee.getHomeDir)(),".aws","sso","cache",`${r}.json`)},"getSSOTokenFilepath");Zm.getSSOTokenFilepath=Yee});var yN=N(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.getSSOTokenFromFile=Ui.tokenIntercept=void 0;var Qee=require("fs/promises"),ete=ZR();Ui.tokenIntercept={};var tte=i(async e=>{if(Ui.tokenIntercept[e])return Ui.tokenIntercept[e];let t=(0,ete.getSSOTokenFilepath)(e),r=await(0,Qee.readFile)(t,"utf8");return JSON.parse(r)},"getSSOTokenFromFile");Ui.getSSOTokenFromFile=tte});var _N=N(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.readFile=Vr.fileIntercept=Vr.filePromises=void 0;var rte=require("node:fs/promises");Vr.filePromises={};Vr.fileIntercept={};var nte=i((e,t)=>Vr.fileIntercept[e]!==void 0?Vr.fileIntercept[e]:((!Vr.filePromises[e]||t?.ignoreCache)&&(Vr.filePromises[e]=(0,rte.readFile)(e,"utf8")),Vr.filePromises[e]),"readFile");Vr.readFile=nte});var On=N($t=>{"use strict";var Zs=KR(),Xm=ZR(),XR=yN(),Ym=require("path"),Qm=Uo(),sc=_N(),SN="AWS_PROFILE",vN="default",ote=i(e=>e.profile||process.env[SN]||vN,"getProfileName"),Xs=".",ite=i(e=>Object.entries(e).filter(([t])=>{let r=t.indexOf(Xs);return r===-1?!1:Object.values(Qm.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,n])=>{let o=r.indexOf(Xs),a=r.substring(0,o)===Qm.IniSectionType.PROFILE?r.substring(o+1):r;return t[a]=n,t},{...e.default&&{default:e.default}}),"getConfigData"),ste="AWS_CONFIG_FILE",AN=i(()=>process.env[ste]||Ym.join(Zs.getHomeDir(),".aws","config"),"getConfigFilepath"),ate="AWS_SHARED_CREDENTIALS_FILE",cte=i(()=>process.env[ate]||Ym.join(Zs.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ute=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,lte=["__proto__","profile __proto__"],YR=i(e=>{let t={},r,n;for(let o of e.split(/\r?\n/)){let a=o.split(/(^|\s)[;#]/)[0].trim();if(a[0]==="["&&a[a.length-1]==="]"){r=void 0,n=void 0;let u=a.substring(1,a.length-1),l=ute.exec(u);if(l){let[,d,,_]=l;Object.values(Qm.IniSectionType).includes(d)&&(r=[d,_].join(Xs))}else r=u;if(lte.includes(u))throw new Error(`Found invalid profile name "${u}"`)}else if(r){let u=a.indexOf("=");if(![0,-1].includes(u)){let[l,d]=[a.substring(0,u).trim(),a.substring(u+1).trim()];if(d==="")n=l;else{n&&o.trimStart()===o&&(n=void 0),t[r]=t[r]||{};let _=n?[n,l].join(Xs):l;t[r][_]=d}}}}return t},"parseIni"),EN=i(()=>({}),"swallowError$1"),RN=i(async(e={})=>{let{filepath:t=cte(),configFilepath:r=AN()}=e,n=Zs.getHomeDir(),o="~/",a=t;t.startsWith(o)&&(a=Ym.join(n,t.slice(2)));let c=r;r.startsWith(o)&&(c=Ym.join(n,r.slice(2)));let u=await Promise.all([sc.readFile(c,{ignoreCache:e.ignoreCache}).then(YR).then(ite).catch(EN),sc.readFile(a,{ignoreCache:e.ignoreCache}).then(YR).catch(EN)]);return{configFile:u[0],credentialsFile:u[1]}},"loadSharedConfigFiles"),dte=i(e=>Object.entries(e).filter(([t])=>t.startsWith(Qm.IniSectionType.SSO_SESSION+Xs)).reduce((t,[r,n])=>({...t,[r.substring(r.indexOf(Xs)+1)]:n}),{}),"getSsoSessionData"),pte=i(()=>({}),"swallowError"),mte=i(async(e={})=>sc.readFile(e.configFilepath??AN()).then(YR).then(dte).catch(pte),"loadSsoSessionData"),fte=i((...e)=>{let t={};for(let r of e)for(let[n,o]of Object.entries(r))t[n]!==void 0?Object.assign(t[n],o):t[n]=o;return t},"mergeConfigFiles"),gte=i(async e=>{let t=await RN(e);return fte(t.configFile,t.credentialsFile)},"parseKnownFiles"),hte={getFileRecord(){return sc.fileIntercept},interceptFile(e,t){sc.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return XR.tokenIntercept},interceptToken(e,t){XR.tokenIntercept[e]=t}};$t.getSSOTokenFromFile=XR.getSSOTokenFromFile;$t.readFile=sc.readFile;$t.CONFIG_PREFIX_SEPARATOR=Xs;$t.DEFAULT_PROFILE=vN;$t.ENV_PROFILE=SN;$t.externalDataInterceptor=hte;$t.getProfileName=ote;$t.loadSharedConfigFiles=RN;$t.loadSsoSessionData=mte;$t.parseKnownFiles=gte;Object.prototype.hasOwnProperty.call(Zs,"__proto__")&&!Object.prototype.hasOwnProperty.call($t,"__proto__")&&Object.defineProperty($t,"__proto__",{enumerable:!0,value:Zs.__proto__});Object.keys(Zs).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call($t,e)&&($t[e]=Zs[e])});Object.prototype.hasOwnProperty.call(Xm,"__proto__")&&!Object.prototype.hasOwnProperty.call($t,"__proto__")&&Object.defineProperty($t,"__proto__",{enumerable:!0,value:Xm.__proto__});Object.keys(Xm).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call($t,e)&&($t[e]=Xm[e])})});var cn=N(TN=>{"use strict";var Xu=jt(),PN=On();function CN(e){try{let t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch{return e}}i(CN,"getSelectorName");var yte=i((e,t)=>async()=>{try{let r=e(process.env,t);if(r===void 0)throw new Error;return r}catch(r){throw new Xu.CredentialsProviderError(r.message||`Not found in ENV: ${CN(e.toString())}`,{logger:t?.logger})}},"fromEnv"),_te=i((e,{preferredFile:t="config",...r}={})=>async()=>{let n=PN.getProfileName(r),{configFile:o,credentialsFile:a}=await PN.loadSharedConfigFiles(r),c=a[n]||{},u=o[n]||{},l=t==="config"?{...c,...u}:{...u,...c};try{let _=e(l,t==="config"?o:a);if(_===void 0)throw new Error;return _}catch(d){throw new Xu.CredentialsProviderError(d.message||`Not found in config files w/ profile [${n}]: ${CN(e.toString())}`,{logger:r.logger})}},"fromSharedConfigFiles"),Ete=i(e=>typeof e=="function","isFunction"),Ste=i(e=>Ete(e)?async()=>await e():Xu.fromStatic(e),"fromStatic"),vte=i(({environmentVariableSelector:e,configFileSelector:t,default:r},n={})=>{let{signingName:o,logger:a}=n,c={signingName:o,logger:a};return Xu.memoize(Xu.chain(yte(e,c),_te(t,n),Ste(r)))},"loadConfig");TN.loadConfig=vte});var wN=N(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.getEndpointUrlConfig=void 0;var xN=On(),bN="AWS_ENDPOINT_URL",IN="endpoint_url",Ate=i(e=>({environmentVariableSelector:i(t=>{let r=e.split(" ").map(a=>a.toUpperCase()),n=t[[bN,...r].join("_")];if(n)return n;let o=t[bN];if(o)return o},"environmentVariableSelector"),configFileSelector:i((t,r)=>{if(r&&t.services){let o=r[["services",t.services].join(xN.CONFIG_PREFIX_SEPARATOR)];if(o){let a=e.split(" ").map(u=>u.toLowerCase()),c=o[[a.join("_"),IN].join(xN.CONFIG_PREFIX_SEPARATOR)];if(c)return c}}let n=t[IN];if(n)return n},"configFileSelector"),default:void 0}),"getEndpointUrlConfig");ef.getEndpointUrlConfig=Ate});var $N=N(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.getEndpointFromConfig=void 0;var Rte=cn(),Pte=wN(),Cte=i(async e=>(0,Rte.loadConfig)((0,Pte.getEndpointUrlConfig)(e??""))(),"getEndpointFromConfig");tf.getEndpointFromConfig=Cte});var NN=N(ac=>{"use strict";var Tte=Me(),xte=(EA(),Q(oD)),kN=i((e,t)=>(r,n)=>async o=>{let{response:a}=await r(o);try{let c=await t(a,e);return{response:a,output:c}}catch(c){if(Object.defineProperty(c,"$response",{value:a,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in c)){let u="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{c.message+=`
|
|
25
|
+
`+u}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(u):n.logger?.warn?.(u)}typeof c.$responseBodyText<"u"&&c.$response&&(c.$response.body=c.$responseBodyText);try{if(Tte.HttpResponse.isInstance(a)){let{headers:l={}}=a,d=Object.entries(l);c.$metadata={httpStatusCode:a.statusCode,requestId:QR(/^x-[\w-]+-request-?id$/,d),extendedRequestId:QR(/^x-[\w-]+-id-2$/,d),cfId:QR(/^x-[\w-]+-cf-id$/,d)}}}catch{}}throw c}},"deserializerMiddleware"),QR=i((e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],"findHeader"),DN=i((e,t)=>(r,n)=>async o=>{let a=e,c=n.endpointV2?async()=>xte.toEndpointV1(n.endpointV2):a.endpoint;if(!c)throw new Error("No valid endpoint provider available.");let u=await t(o.input,{...e,endpoint:c});return r({...o,request:u})},"serializerMiddleware"),MN={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ON={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function bte(e,t,r){return{applyToStack:i(n=>{n.add(kN(e,r),MN),n.add(DN(e,t),ON)},"applyToStack")}}i(bte,"getSerdePlugin");ac.deserializerMiddleware=kN;ac.deserializerMiddlewareOption=MN;ac.getSerdePlugin=bte;ac.serializerMiddleware=DN;ac.serializerMiddlewareOption=ON});var gr=N(ri=>{"use strict";var Ite=(Xe(),Q(fr)),rf=It(),zN=$N(),LN=Gr(),wte=NN(),$te=i(async e=>{let t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Nte(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ote(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},"resolveParamsForS3"),kte=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Dte=/(\d+\.){3}\d+/,Mte=/\.\./,Ote=i(e=>kte.test(e)&&!Dte.test(e)&&!Mte.test(e),"isDnsCompatibleBucketName"),Nte=i(e=>{let[t,r,n,,,o]=e.split(":"),a=t==="arn"&&e.split(":").length>=6,c=!!(a&&r&&n&&o);if(a&&!c)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return c},"isArnBucketName"),Lte=i((e,t,r,n=!1)=>{let o=i(async()=>{let a;return n?a=r.clientContextParams?.[e]??r[e]??r[t]:a=r[e]??r[t],typeof a=="function"?a():a},"configProvider");return e==="credentialScope"||t==="CredentialScope"?async()=>{let a=typeof r.credentials=="function"?await r.credentials():r.credentials;return a?.credentialScope??a?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{let a=typeof r.credentials=="function"?await r.credentials():r.credentials;return a?.accountId??a?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let a=await o();if(a&&typeof a=="object"){if("url"in a)return a.url.href;if("hostname"in a){let{protocol:c,hostname:u,port:l,path:d}=a;return`${c}//${u}${l?":"+l:""}${d}`}}return a}:o},"createConfigValueProvider"),eP=i(e=>{if(typeof e=="object"){if("url"in e){let t=LN.parseUrl(e.url);if(e.headers){t.headers={};for(let[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return LN.parseUrl(e)},"toEndpointV1"),UN=i(async(e,t,r,n)=>{if(!r.isCustomEndpoint){let c;r.serviceConfiguredEndpoint?c=await r.serviceConfiguredEndpoint():c=await zN.getEndpointFromConfig(r.serviceId),c&&(r.endpoint=()=>Promise.resolve(eP(c)),r.isCustomEndpoint=!0)}let o=await BN(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let a=r.endpointProvider(o,n);if(r.isCustomEndpoint&&r.endpoint){let c=await r.endpoint();if(c?.headers){a.headers??={};for(let[u,l]of Object.entries(c.headers))a.headers[u]=Array.isArray(l)?l:[l]}}return a},"getEndpointFromInstructions"),BN=i(async(e,t,r)=>{let n={},o=t?.getEndpointParameterInstructions?.()||{};for(let[a,c]of Object.entries(o))switch(c.type){case"staticContextParams":n[a]=c.value;break;case"contextParams":n[a]=e[c.name];break;case"clientContextParams":case"builtInParams":n[a]=await Lte(c.name,a,r,c.type!=="builtInParams")();break;case"operationContextParams":n[a]=c.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(c))}return Object.keys(o).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await $te(n),n},"resolveParams"),GN=i(({config:e,instructions:t})=>(r,n)=>async o=>{e.isCustomEndpoint&&Ite.setFeature(n,"ENDPOINT_OVERRIDE","N");let a=await UN(o.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;let c=n.authSchemes?.[0];if(c){n.signing_region=c.signingRegion,n.signing_service=c.signingName;let l=rf.getSmithyContext(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:c.signingRegion,signingRegion:c.signingRegion,signing_service:c.signingName,signingName:c.signingName,signingRegionSet:c.signingRegionSet},c.properties))}return r({...o})},"endpointMiddleware"),FN={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:wte.serializerMiddlewareOption.name},zte=i((e,t)=>({applyToStack:i(r=>{r.addRelativeTo(GN({config:e,instructions:t}),FN)},"applyToStack")}),"getEndpointPlugin"),Ute=i(e=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:o}=e,a=r!=null?async()=>eP(await rf.normalizeProvider(r)()):void 0,u=Object.assign(e,{endpoint:a,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:rf.normalizeProvider(n??!1),useFipsEndpoint:rf.normalizeProvider(o??!1)}),l;return u.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=zN.getEndpointFromConfig(e.serviceId)),l),u},"resolveEndpointConfig"),Bte=i(e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),e},"resolveEndpointRequiredConfig");ri.endpointMiddleware=GN;ri.endpointMiddlewareOptions=FN;ri.getEndpointFromInstructions=UN;ri.getEndpointPlugin=zte;ri.resolveEndpointConfig=Ute;ri.resolveEndpointRequiredConfig=Bte;ri.resolveParams=BN;ri.toEndpointV1=eP});var HN=N(VN=>{"use strict";var Ys=i((e,t)=>{let r=[];if(e&&r.push(e),t)for(let n of t)r.push(n);return r},"getAllAliases"),Bi=i((e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,"getMiddlewareNameWithAliases"),tP=i(()=>{let e=[],t=[],r=!1,n=new Set,o=i(y=>y.sort((E,g)=>jN[g.step]-jN[E.step]||qN[g.priority||"normal"]-qN[E.priority||"normal"]),"sort"),a=i(y=>{let E=!1,g=i(v=>{let A=Ys(v.name,v.aliases);if(A.includes(y)){E=!0;for(let R of A)n.delete(R);return!1}return!0},"filterCb");return e=e.filter(g),t=t.filter(g),E},"removeByName"),c=i(y=>{let E=!1,g=i(v=>{if(v.middleware===y){E=!0;for(let A of Ys(v.name,v.aliases))n.delete(A);return!1}return!0},"filterCb");return e=e.filter(g),t=t.filter(g),E},"removeByReference"),u=i(y=>(e.forEach(E=>{y.add(E.middleware,{...E})}),t.forEach(E=>{y.addRelativeTo(E.middleware,{...E})}),y.identifyOnResolve?.(_.identifyOnResolve()),y),"cloneTo"),l=i(y=>{let E=[];return y.before.forEach(g=>{g.before.length===0&&g.after.length===0?E.push(g):E.push(...l(g))}),E.push(y),y.after.reverse().forEach(g=>{g.before.length===0&&g.after.length===0?E.push(g):E.push(...l(g))}),E},"expandRelativeMiddlewareList"),d=i((y=!1)=>{let E=[],g=[],v={};return e.forEach(R=>{let b={...R,before:[],after:[]};for(let $ of Ys(b.name,b.aliases))v[$]=b;E.push(b)}),t.forEach(R=>{let b={...R,before:[],after:[]};for(let $ of Ys(b.name,b.aliases))v[$]=b;g.push(b)}),g.forEach(R=>{if(R.toMiddleware){let b=v[R.toMiddleware];if(b===void 0){if(y)return;throw new Error(`${R.toMiddleware} is not found when adding ${Bi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&b.after.push(R),R.relation==="before"&&b.before.push(R)}}),o(E).map(l).reduce((R,b)=>(R.push(...b),R),[])},"getMiddlewareList"),_={add:i((y,E={})=>{let{name:g,override:v,aliases:A}=E,R={step:"initialize",priority:"normal",middleware:y,...E},b=Ys(g,A);if(b.length>0){if(b.some($=>n.has($))){if(!v)throw new Error(`Duplicate middleware name '${Bi(g,A)}'`);for(let $ of b){let G=e.findIndex(pe=>pe.name===$||pe.aliases?.some(me=>me===$));if(G===-1)continue;let Y=e[G];if(Y.step!==R.step||R.priority!==Y.priority)throw new Error(`"${Bi(Y.name,Y.aliases)}" middleware with ${Y.priority} priority in ${Y.step} step cannot be overridden by "${Bi(g,A)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(G,1)}}for(let $ of b)n.add($)}e.push(R)},"add"),addRelativeTo:i((y,E)=>{let{name:g,override:v,aliases:A}=E,R={middleware:y,...E},b=Ys(g,A);if(b.length>0){if(b.some($=>n.has($))){if(!v)throw new Error(`Duplicate middleware name '${Bi(g,A)}'`);for(let $ of b){let G=t.findIndex(pe=>pe.name===$||pe.aliases?.some(me=>me===$));if(G===-1)continue;let Y=t[G];if(Y.toMiddleware!==R.toMiddleware||Y.relation!==R.relation)throw new Error(`"${Bi(Y.name,Y.aliases)}" middleware ${Y.relation} "${Y.toMiddleware}" middleware cannot be overridden by "${Bi(g,A)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(G,1)}}for(let $ of b)n.add($)}t.push(R)},"addRelativeTo"),clone:i(()=>u(tP()),"clone"),use:i(y=>{y.applyToStack(_)},"use"),remove:i(y=>typeof y=="string"?a(y):c(y),"remove"),removeByTag:i(y=>{let E=!1,g=i(v=>{let{tags:A,name:R,aliases:b}=v;if(A&&A.includes(y)){let $=Ys(R,b);for(let G of $)n.delete(G);return E=!0,!1}return!0},"filterCb");return e=e.filter(g),t=t.filter(g),E},"removeByTag"),concat:i(y=>{let E=u(tP());return E.use(y),E.identifyOnResolve(r||E.identifyOnResolve()||(y.identifyOnResolve?.()??!1)),E},"concat"),applyToStack:u,identify:i(()=>d(!0).map(y=>{let E=y.step??y.relation+" "+y.toMiddleware;return Bi(y.name,y.aliases)+" - "+E}),"identify"),identifyOnResolve(y){return typeof y=="boolean"&&(r=y),r},resolve:i((y,E)=>{for(let g of d().map(v=>v.middleware).reverse())y=g(y,E);return r&&console.log(_.identify()),y},"resolve")};return _},"constructStack"),jN={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},qN={high:3,normal:2,low:1};VN.constructStack=tP});var ue=N(Ge=>{"use strict";var JN=HN(),nf=Uo(),Gte=(ke(),Q(Wo)),of=(Qt(),Q(JA)),uP=(Rr(),Q(CM)),nP=class{static{i(this,"Client")}config;middlewareStack=JN.constructStack();initConfig;handlers;constructor(t){this.config=t;let{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){let o=typeof r!="function"?r:void 0,a=typeof r=="function"?r:n,c=o===void 0&&this.config.cacheMiddleware===!0,u;if(c){this.handlers||(this.handlers=new WeakMap);let l=this.handlers;l.has(t.constructor)?u=l.get(t.constructor):(u=t.resolveMiddleware(this.middlewareStack,this.config,o),l.set(t.constructor,u))}else delete this.handlers,u=t.resolveMiddleware(this.middlewareStack,this.config,o);if(a)u(t).then(l=>a(null,l.output),l=>a(l)).catch(()=>{});else return u(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},rP="***SensitiveInformation***";function oP(e,t){if(t==null)return t;let r=Gte.NormalizedSchema.of(e);if(r.getMergedTraits().sensitive)return rP;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return rP}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return rP}else if(r.isStructSchema()&&typeof t=="object"){let n=t,o={};for(let[a,c]of r.structIterator())n[a]!=null&&(o[a]=oP(c,n[a]));return o}return t}i(oP,"schemaLogFilter");var sf=class{static{i(this,"Command")}middlewareStack=JN.constructStack();schema;static classBuilder(){return new iP}resolveMiddlewareWithContext(t,r,n,{middlewareFn:o,clientName:a,commandName:c,inputFilterSensitiveLog:u,outputFilterSensitiveLog:l,smithyContext:d,additionalContext:_,CommandCtor:y}){for(let b of o.bind(this)(y,t,r,n))this.middlewareStack.use(b);let E=t.concat(this.middlewareStack),{logger:g}=r,v={logger:g,clientName:a,commandName:c,inputFilterSensitiveLog:u,outputFilterSensitiveLog:l,[nf.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},..._},{requestHandler:A}=r,R=n??{};return d.eventStream&&(R={isEventStream:!0,...R}),E.resolve(b=>A.handle(b.request,R),v)}},iP=class{static{i(this,"ClassBuilder")}_init=i(()=>{},"_init");_ep={};_middlewareFn=i(()=>[],"_middlewareFn");_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){let t=this,r;return r=class extends sf{static{i(this,"CommandRef")}input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,o,a){let c=t._operationSchema,u=c?.[4]??c?.input,l=c?.[5]??c?.output;return this.resolveMiddlewareWithContext(n,o,a,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(c?oP.bind(null,u):d=>d),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(c?oP.bind(null,l):d=>d),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}},Fte="***SensitiveInformation***",jte=i((e,t,r)=>{for(let[a,c]of Object.entries(e)){let u=i(async function(d,_,y){let E=new c(d);if(typeof _=="function")this.send(E,_);else if(typeof y=="function"){if(typeof _!="object")throw new Error(`Expected http options but got ${typeof _}`);this.send(E,_||{},y)}else return this.send(E,_)},"methodImpl"),l=(a[0].toLowerCase()+a.slice(1)).replace(/Command$/,"");t.prototype[l]=u}let{paginators:n={},waiters:o={}}=r??{};for(let[a,c]of Object.entries(n))t.prototype[a]===void 0&&(t.prototype[a]=function(u={},l,...d){return c({...l,client:this},u,...d)});for(let[a,c]of Object.entries(o))t.prototype[a]===void 0&&(t.prototype[a]=async function(u={},l,...d){let _=l;return typeof l=="number"&&(_={maxWaitTime:l}),c({..._,client:this},u,...d)})},"createAggregatedClient"),sP=class e extends Error{static{i(this,"ServiceException")}$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;let r=t;return e.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;let r=t;return this===e?e.isInstance(t):e.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}},KN=i((e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{(e[n]==null||e[n]==="")&&(e[n]=o)});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},"decorateServiceException"),ZN=i(({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=Vte(e),a=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||a||"UnknownError",$fault:"client",$metadata:o});throw KN(c,t)},"throwDefaultError"),qte=i(e=>({output:t,parsedBody:r,errorCode:n})=>{ZN({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})},"withBaseException"),Vte=i(e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),Hte=i(e=>{switch(e){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:3e4};default:return{}}},"loadConfigsForDefaultMode"),WN=!1,Wte=i(e=>{e&&!WN&&parseInt(e.substring(1,e.indexOf(".")))<16&&(WN=!0)},"emitWarningIfUnsupportedVersion"),XN=Object.values(nf.AlgorithmId),Jte=i(e=>{let t=[];for(let r in nf.AlgorithmId){let n=nf.AlgorithmId[r];e[n]!==void 0&&t.push({algorithmId:i(()=>n,"algorithmId"),checksumConstructor:i(()=>e[n],"checksumConstructor")})}for(let[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:i(()=>r,"algorithmId"),checksumConstructor:i(()=>n,"checksumConstructor")});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};let n=r.algorithmId(),o=r.checksumConstructor();XN.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=o:e.checksumAlgorithms[n]=o,t.push(r)},checksumAlgorithms(){return t}}},"getChecksumConfiguration"),Kte=i(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{let n=r.algorithmId();XN.includes(n)&&(t[n]=r.checksumConstructor())}),t},"resolveChecksumRuntimeConfig"),Zte=i(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),"getRetryConfiguration"),Xte=i(e=>{let t={};return t.retryStrategy=e.retryStrategy(),t},"resolveRetryRuntimeConfig"),YN=i(e=>Object.assign(Jte(e),Zte(e)),"getDefaultExtensionConfiguration"),Yte=YN,Qte=i(e=>Object.assign(Kte(e),Xte(e)),"resolveDefaultRuntimeConfig"),ere=i(e=>Array.isArray(e)?e:[e],"getArrayIfSingleItem"),QN=i(e=>{let t="#text";for(let r in e)e.hasOwnProperty(r)&&e[r][t]!==void 0?e[r]=e[r][t]:typeof e[r]=="object"&&e[r]!==null&&(e[r]=QN(e[r]));return e},"getValueFromTextNode"),tre=i(e=>e!=null,"isSerializableHeaderValue"),aP=class{static{i(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function e1(e,t,r){let n,o,a;if(typeof t>"u"&&typeof r>"u")n={},a=e;else{if(n=e,typeof t=="function")return o=t,a=r,ore(n,o,a);a=t}for(let c of Object.keys(a)){if(!Array.isArray(a[c])){n[c]=a[c];continue}t1(n,null,a,c)}return n}i(e1,"map");var rre=i(e=>{let t={};for(let[r,n]of Object.entries(e||{}))t[r]=[,n];return t},"convertMap"),nre=i((e,t)=>{let r={};for(let n in t)t1(r,e,t,n);return r},"take"),ore=i((e,t,r)=>e1(e,Object.entries(r).reduce((n,[o,a])=>(Array.isArray(a)?n[o]=a:typeof a=="function"?n[o]=[t,a()]:n[o]=[t,a],n),{})),"mapWithFilter"),t1=i((e,t,r,n)=>{if(t!==null){let c=r[n];typeof c=="function"&&(c=[,c]);let[u=ire,l=sre,d=n]=c;(typeof u=="function"&&u(t[d])||typeof u!="function"&&u)&&(e[n]=l(t[d]));return}let[o,a]=r[n];if(typeof a=="function"){let c,u=o===void 0&&(c=a())!=null,l=typeof o=="function"&&!!o(void 0)||typeof o!="function"&&!!o;u?e[n]=c:l&&(e[n]=a())}else{let c=o===void 0&&a!=null,u=typeof o=="function"&&!!o(a)||typeof o!="function"&&!!o;(c||u)&&(e[n]=a)}},"applyInstruction"),ire=i(e=>e!=null,"nonNullish"),sre=i(e=>e,"pass"),are=i(e=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},"serializeFloat"),cre=i(e=>e.toISOString().replace(".000Z","Z"),"serializeDateTime"),cP=i(e=>{if(e==null)return{};if(Array.isArray(e))return e.filter(t=>t!=null).map(cP);if(typeof e=="object"){let t={};for(let r of Object.keys(e))e[r]!=null&&(t[r]=cP(e[r]));return t}return e},"_json");Ge.collectBody=uP.collectBody;Ge.extendedEncodeURIComponent=uP.extendedEncodeURIComponent;Ge.resolvedPath=uP.resolvedPath;Ge.Client=nP;Ge.Command=sf;Ge.NoOpLogger=aP;Ge.SENSITIVE_STRING=Fte;Ge.ServiceException=sP;Ge._json=cP;Ge.convertMap=rre;Ge.createAggregatedClient=jte;Ge.decorateServiceException=KN;Ge.emitWarningIfUnsupportedVersion=Wte;Ge.getArrayIfSingleItem=ere;Ge.getDefaultClientConfiguration=Yte;Ge.getDefaultExtensionConfiguration=YN;Ge.getValueFromTextNode=QN;Ge.isSerializableHeaderValue=tre;Ge.loadConfigsForDefaultMode=Hte;Ge.map=e1;Ge.resolveDefaultRuntimeConfig=Qte;Ge.serializeDateTime=cre;Ge.serializeFloat=are;Ge.take=nre;Ge.throwDefaultError=ZN;Ge.withBaseException=qte;Object.prototype.hasOwnProperty.call(of,"__proto__")&&!Object.prototype.hasOwnProperty.call(Ge,"__proto__")&&Object.defineProperty(Ge,"__proto__",{enumerable:!0,value:of.__proto__});Object.keys(of).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Ge,e)&&(Ge[e]=of[e])})});var r1=N(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.isStreamingPayload=void 0;var ure=require("stream"),lre=i(e=>e?.body instanceof ure.Readable||typeof ReadableStream<"u"&&e?.body instanceof ReadableStream,"isStreamingPayload");af.isStreamingPayload=lre});var hr=N(kt=>{"use strict";var st=Mn(),cc=Me(),Gi=_R(),i1=UA(),n1=It(),dre=ue(),pre=r1(),mre=(Qt(),Q(JA)),s1=i(e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),"asSdkError"),fre=i((e,t)=>{let r=e,n=st.NO_RETRY_INCREMENT,o=st.RETRY_COST,a=st.TIMEOUT_RETRY_COST,c=e,u=i(y=>y.name==="TimeoutError"?a:o,"getCapacityAmount"),l=i(y=>u(y)<=c,"hasRetryTokens");return Object.freeze({hasRetryTokens:l,retrieveRetryTokens:i(y=>{if(!l(y))throw new Error("No retry token available");let E=u(y);return c-=E,E},"retrieveRetryTokens"),releaseRetryTokens:i(y=>{c+=y??n,c=Math.min(c,r)},"releaseRetryTokens")})},"getDefaultRetryQuota"),a1=i((e,t)=>Math.floor(Math.min(st.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),"defaultDelayDecider"),c1=i(e=>e?Gi.isRetryableByTrait(e)||Gi.isClockSkewError(e)||Gi.isThrottlingError(e)||Gi.isTransientError(e):!1,"defaultRetryDecider"),cf=class{static{i(this,"StandardRetryStrategy")}maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=st.RETRY_MODES.STANDARD;constructor(t,r){this.maxAttemptsProvider=t,this.retryDecider=r?.retryDecider??c1,this.delayDecider=r?.delayDecider??a1,this.retryQuota=r?.retryQuota??fre(st.INITIAL_RETRY_TOKENS)}shouldRetry(t,r,n){return r<n&&this.retryDecider(t)&&this.retryQuota.hasRetryTokens(t)}async getMaxAttempts(){let t;try{t=await this.maxAttemptsProvider()}catch{t=st.DEFAULT_MAX_ATTEMPTS}return t}async retry(t,r,n){let o,a=0,c=0,u=await this.getMaxAttempts(),{request:l}=r;for(cc.HttpRequest.isInstance(l)&&(l.headers[st.INVOCATION_ID_HEADER]=i1.v4());;)try{cc.HttpRequest.isInstance(l)&&(l.headers[st.REQUEST_HEADER]=`attempt=${a+1}; max=${u}`),n?.beforeRequest&&await n.beforeRequest();let{response:d,output:_}=await t(r);return n?.afterRequest&&n.afterRequest(d),this.retryQuota.releaseRetryTokens(o),_.$metadata.attempts=a+1,_.$metadata.totalRetryDelay=c,{response:d,output:_}}catch(d){let _=s1(d);if(a++,this.shouldRetry(_,a,u)){o=this.retryQuota.retrieveRetryTokens(_);let y=this.delayDecider(Gi.isThrottlingError(_)?st.THROTTLING_RETRY_DELAY_BASE:st.DEFAULT_RETRY_DELAY_BASE,a),E=gre(_.$response),g=Math.max(E||0,y);c+=g,await new Promise(v=>setTimeout(v,g));continue}throw _.$metadata||(_.$metadata={}),_.$metadata.attempts=a,_.$metadata.totalRetryDelay=c,_}}},gre=i(e=>{if(!cc.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(a=>a.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r).getTime()-Date.now():n*1e3},"getDelayFromRetryAfterHeader"),lP=class extends cf{static{i(this,"AdaptiveRetryStrategy")}rateLimiter;constructor(t,r){let{rateLimiter:n,...o}=r??{};super(t,o),this.rateLimiter=n??new st.DefaultRateLimiter,this.mode=st.RETRY_MODES.ADAPTIVE}async retry(t,r){return super.retry(t,r,{beforeRequest:i(async()=>this.rateLimiter.getSendToken(),"beforeRequest"),afterRequest:i(n=>{this.rateLimiter.updateClientSendingRate(n)},"afterRequest")})}},dP="AWS_MAX_ATTEMPTS",pP="max_attempts",hre={environmentVariableSelector:i(e=>{let t=e[dP];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${dP} mast be a number, got "${t}"`);return r},"environmentVariableSelector"),configFileSelector:i(e=>{let t=e[pP];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${pP} mast be a number, got "${t}"`);return r},"configFileSelector"),default:st.DEFAULT_MAX_ATTEMPTS},yre=i(e=>{let{retryStrategy:t,retryMode:r}=e,n=n1.normalizeProvider(e.maxAttempts??st.DEFAULT_MAX_ATTEMPTS),o=t?Promise.resolve(t):void 0,a=i(async()=>await n1.normalizeProvider(r)()===st.RETRY_MODES.ADAPTIVE?new st.AdaptiveRetryStrategy(n):new st.StandardRetryStrategy(n),"getDefault");return Object.assign(e,{maxAttempts:n,retryStrategy:i(()=>o??=a(),"retryStrategy")})},"resolveRetryConfig"),u1="AWS_RETRY_MODE",l1="retry_mode",_re={environmentVariableSelector:i(e=>e[u1],"environmentVariableSelector"),configFileSelector:i(e=>e[l1],"configFileSelector"),default:st.DEFAULT_RETRY_MODE},d1=i(()=>e=>async t=>{let{request:r}=t;return cc.HttpRequest.isInstance(r)&&(delete r.headers[st.INVOCATION_ID_HEADER],delete r.headers[st.REQUEST_HEADER]),e(t)},"omitRetryHeadersMiddleware"),p1={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Ere=i(e=>({applyToStack:i(t=>{t.addRelativeTo(d1(),p1)},"applyToStack")}),"getOmitRetryHeadersPlugin");function m1(e,t){if(cc.HttpResponse.isInstance(e))for(let r of Object.keys(e.headers)){let n=r.toLowerCase();if(n==="retry-after"){let o=e.headers[r],a=NaN;if(o.endsWith("GMT"))try{a=(mre.parseRfc7231DateTime(o).getTime()-Date.now())/1e3}catch(c){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(c)}else o.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?a=Number(o.match(/ GMT, ([\d.]+)$/)?.[1]):o.match(/^((\d+)|(\d+\.\d+))$/)?a=Number(o):Date.parse(o)>=Date.now()&&(a=(Date.parse(o)-Date.now())/1e3);return isNaN(a)?void 0:new Date(Date.now()+a*1e3)}else if(n==="x-amz-retry-after"){let o=e.headers[r],a=Number(o);if(isNaN(a)){t?.trace?.(`Failed to parse x-amz-retry-after=${o}`);return}return new Date(Date.now()+a)}}}i(m1,"parseRetryAfterHeader");function Sre(e,t){return m1(e,t)}i(Sre,"getRetryAfterHint");var f1=i(e=>(t,r)=>async n=>{let o=await e.retryStrategy(),a=await e.maxAttempts();if(vre(o)){o=o;let c=await o.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),u=new Error,l=0,d=0,{request:_}=n,y=cc.HttpRequest.isInstance(_);for(y&&(_.headers[st.INVOCATION_ID_HEADER]=i1.v4());;)try{y&&(_.headers[st.REQUEST_HEADER]=`attempt=${l+1}; max=${a}`);let{response:E,output:g}=await t(n);return o.recordSuccess(c),g.$metadata.attempts=l+1,g.$metadata.totalRetryDelay=d,{response:E,output:g}}catch(E){let g=Are(E,e.logger);if(u=s1(E),y&&pre.isStreamingPayload(_))throw(r.logger instanceof dre.NoOpLogger?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),u;try{c=await o.refreshRetryTokenForRetry(c,g)}catch(A){throw typeof A.$backoff=="number"&&await o1(A.$backoff),u.$metadata||(u.$metadata={}),u.$metadata.attempts=l+1,u.$metadata.totalRetryDelay=d,u}l=c.getRetryCount();let v=c.getRetryDelay();d+=v,await o1(v)}}else return o=o,o?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,n)},"retryMiddleware"),o1=i(e=>new Promise(t=>setTimeout(t,e)),"cooldown"),vre=i(e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u","isRetryStrategyV2"),Are=i((e,t)=>{let r={error:e,errorType:Rre(e)},n=m1(e.$response,t);return n&&(r.retryAfterHint=n),r},"getRetryErrorInfo"),Rre=i(e=>Gi.isThrottlingError(e)?"THROTTLING":Gi.isTransientError(e)?"TRANSIENT":Gi.isServerError(e)?"SERVER_ERROR":"CLIENT_ERROR","getRetryErrorType"),g1={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Pre=i(e=>({applyToStack:i(t=>{t.add(f1(e),g1)},"applyToStack")}),"getRetryPlugin");kt.AdaptiveRetryStrategy=lP;kt.CONFIG_MAX_ATTEMPTS=pP;kt.CONFIG_RETRY_MODE=l1;kt.ENV_MAX_ATTEMPTS=dP;kt.ENV_RETRY_MODE=u1;kt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=hre;kt.NODE_RETRY_MODE_CONFIG_OPTIONS=_re;kt.StandardRetryStrategy=cf;kt.defaultDelayDecider=a1;kt.defaultRetryDecider=c1;kt.getOmitRetryHeadersPlugin=Ere;kt.getRetryAfterHint=Sre;kt.getRetryPlugin=Pre;kt.omitRetryHeadersMiddleware=d1;kt.omitRetryHeadersMiddlewareOptions=p1;kt.resolveRetryConfig=yre;kt.retryMiddleware=f1;kt.retryMiddlewareOptions=g1});var h1,mP,y1=D(()=>{h1=I(Me()),mP=i(e=>h1.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,"getDateHeader")});var uc,fP=D(()=>{uc=i(e=>new Date(Date.now()+e),"getSkewCorrectedDate")});var _1,E1=D(()=>{fP();_1=i((e,t)=>Math.abs(uc(t).getTime()-e)>=3e5,"isClockSkewed")});var gP,S1=D(()=>{E1();gP=i((e,t)=>{let r=Date.parse(e);return _1(r,t)?r-Date.now():t},"getUpdatedSystemClockOffset")});var hP=D(()=>{y1();fP();S1()});var v1,Yu,lc,Lt,yP,_P=D(()=>{v1=I(Me());hP();Yu=i((e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},"throwSigningPropertyError"),lc=i(async e=>{let t=Yu("context",e.context),r=Yu("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],a=await Yu("signer",r.signer)(n),c=e?.signingRegion,u=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:a,signingRegion:c,signingRegionSet:u,signingName:l}},"validateSigningProperties"),Lt=class{static{i(this,"AwsSdkSigV4Signer")}async sign(t,r,n){if(!v1.HttpRequest.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let o=await lc(n),{config:a,signer:c}=o,{signingRegion:u,signingName:l}=o,d=n.context;if(d?.authSchemes?.length??!1){let[y,E]=d.authSchemes;y?.name==="sigv4a"&&E?.name==="sigv4"&&(u=E?.signingRegion??u,l=E?.signingName??l)}return await c.sign(t,{signingDate:uc(a.systemClockOffset),signingRegion:u,signingService:l})}errorHandler(t){return r=>{let n=r.ServerTime??mP(r.$response);if(n){let o=Yu("config",t.config),a=o.systemClockOffset;o.systemClockOffset=gP(n,o.systemClockOffset),o.systemClockOffset!==a&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){let n=mP(t);if(n){let o=Yu("config",r.config);o.systemClockOffset=gP(n,o.systemClockOffset)}}},yP=Lt});var A1,ni,R1=D(()=>{A1=I(Me());hP();_P();ni=class extends Lt{static{i(this,"AwsSdkSigV4ASigner")}async sign(t,r,n){if(!A1.HttpRequest.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:o,signer:a,signingRegion:c,signingRegionSet:u,signingName:l}=await lc(n),_=(await o.sigv4aSigningRegionSet?.()??u??[c]).join(",");return await a.sign(t,{signingDate:uc(o.systemClockOffset),signingRegion:_,signingService:l})}}});var EP,P1=D(()=>{EP=i(e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()):[],"getArrayForCommaSeparatedString")});var uf,SP=D(()=>{uf=i(e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`,"getBearerTokenEnvKey")});var C1,T1,ao,x1=D(()=>{P1();SP();C1="AWS_AUTH_SCHEME_PREFERENCE",T1="auth_scheme_preference",ao={environmentVariableSelector:i((e,t)=>{if(t?.signingName&&uf(t.signingName)in e)return["httpBearerAuth"];if(C1 in e)return EP(e[C1])},"environmentVariableSelector"),configFileSelector:i(e=>{if(T1 in e)return EP(e[T1])},"configFileSelector"),default:[]}});var vP,lf,df,b1=D(()=>{Xe();vP=I(jt()),lf=i(e=>(e.sigv4aSigningRegionSet=wi(e.sigv4aSigningRegionSet),e),"resolveAwsSdkSigV4AConfig"),df={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(t=>t.trim());throw new vP.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map(t=>t.trim());throw new vP.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0}});var Ef=N(xe=>{"use strict";var Fi=Wa(),Qs=ft(),Cre=Cp(),D1=Me(),I1=It(),pf=zp(),M1="X-Amz-Algorithm",O1="X-Amz-Credential",xP="X-Amz-Date",N1="X-Amz-SignedHeaders",L1="X-Amz-Expires",bP="X-Amz-Signature",IP="X-Amz-Security-Token",Tre="X-Amz-Region-Set",wP="authorization",$P=xP.toLowerCase(),z1="date",U1=[wP,$P,z1],B1=bP.toLowerCase(),yf="x-amz-content-sha256",G1=IP.toLowerCase(),xre="host",F1={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},j1=/^proxy-/,q1=/^sec-/,bre=[/^proxy-/i,/^sec-/i],mf="AWS4-HMAC-SHA256",Ire="AWS4-ECDSA-P256-SHA256",V1="AWS4-HMAC-SHA256-PAYLOAD",H1="UNSIGNED-PAYLOAD",W1=50,kP="aws4_request",J1=3600*24*7,dc={},ff=[],gf=i((e,t,r)=>`${e}/${t}/${r}/${kP}`,"createScope"),K1=i(async(e,t,r,n,o)=>{let a=await w1(e,t.secretAccessKey,t.accessKeyId),c=`${r}:${n}:${o}:${Fi.toHex(a)}:${t.sessionToken}`;if(c in dc)return dc[c];for(ff.push(c);ff.length>W1;)delete dc[ff.shift()];let u=`AWS4${t.secretAccessKey}`;for(let l of[r,n,o,kP])u=await w1(e,u,l);return dc[c]=u},"getSigningKey"),wre=i(()=>{ff.length=0,Object.keys(dc).forEach(e=>{delete dc[e]})},"clearCredentialCache"),w1=i((e,t,r)=>{let n=new e(t);return n.update(Qs.toUint8Array(r)),n.digest()},"hmac"),AP=i(({headers:e},t,r)=>{let n={};for(let o of Object.keys(e).sort()){if(e[o]==null)continue;let a=o.toLowerCase();(a in F1||t?.has(a)||j1.test(a)||q1.test(a))&&(!r||r&&!r.has(a))||(n[a]=e[o].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),hf=i(async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===yf)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Cre.isArrayBuffer(t)){let n=new r;return n.update(Qs.toUint8Array(t)),Fi.toHex(await n.digest())}return H1},"getPayloadHash"),RP=class{static{i(this,"HeaderFormatter")}format(t){let r=[];for(let a of Object.keys(t)){let c=Qs.fromUtf8(a);r.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(t[a]))}let n=new Uint8Array(r.reduce((a,c)=>a+c.byteLength,0)),o=0;for(let a of r)n.set(a,o),o+=a.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let o=new Uint8Array(9);return o[0]=5,o.set(t.value.bytes,1),o;case"binary":let a=new DataView(new ArrayBuffer(3+t.value.byteLength));a.setUint8(0,6),a.setUint16(1,t.value.byteLength,!1);let c=new Uint8Array(a.buffer);return c.set(t.value,3),c;case"string":let u=Qs.fromUtf8(t.value),l=new DataView(new ArrayBuffer(3+u.byteLength));l.setUint8(0,7),l.setUint16(1,u.byteLength,!1);let d=new Uint8Array(l.buffer);return d.set(u,3),d;case"timestamp":let _=new Uint8Array(9);return _[0]=8,_.set(PP.fromNumber(t.value.valueOf()).bytes,1),_;case"uuid":if(!$re.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let y=new Uint8Array(17);return y[0]=9,y.set(Fi.fromHex(t.value.replace(/\-/g,"")),1),y}}},$1;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})($1||($1={}));var $re=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,PP=class e{static{i(this,"Int64")}bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&k1(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&k1(t),parseInt(Fi.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function k1(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(k1,"negate");var Z1=i((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader"),X1=i((e,t={})=>{let{headers:r,query:n={}}=D1.HttpRequest.clone(e);for(let o of Object.keys(r)){let a=o.toLowerCase();(a.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(a)||t.hoistableHeaders?.has(a))&&(n[o]=r[o],delete r[o])}return{...e,headers:r,query:n}},"moveHeadersToQuery"),CP=i(e=>{e=D1.HttpRequest.clone(e);for(let t of Object.keys(e.headers))U1.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest"),Y1=i(({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e)){if(n.toLowerCase()===B1)continue;let o=pf.escapeUri(n);t.push(o);let a=e[n];typeof a=="string"?r[o]=`${o}=${pf.escapeUri(a)}`:Array.isArray(a)&&(r[o]=a.slice(0).reduce((c,u)=>c.concat([`${o}=${pf.escapeUri(u)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},"getCanonicalQuery"),kre=i(e=>Dre(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Dre=i(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate"),_f=class{static{i(this,"SignatureV4Base")}service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c=!0}){this.service=o,this.sha256=a,this.uriEscapePath=c,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=I1.normalizeProvider(n),this.credentialProvider=I1.normalizeProvider(r)}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
|
|
26
|
+
${this.getCanonicalPath(t)}
|
|
27
|
+
${Y1(t)}
|
|
28
|
+
${o.map(a=>`${a}:${r[a]}`).join(`
|
|
29
|
+
`)}
|
|
30
|
+
|
|
31
|
+
${o.join(";")}
|
|
32
|
+
${n}`}async createStringToSign(t,r,n,o){let a=new this.sha256;a.update(Qs.toUint8Array(n));let c=await a.digest();return`${o}
|
|
33
|
+
${t}
|
|
34
|
+
${r}
|
|
35
|
+
${Fi.toHex(c)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let a of t.split("/"))a?.length!==0&&a!=="."&&(a===".."?r.pop():r.push(a));let n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return pf.escapeUri(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){let r=kre(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}},TP=class extends _f{static{i(this,"SignatureV4")}headerFormatter=new RP;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c=!0}){super({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c})}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:a,unhoistableHeaders:c,signableHeaders:u,hoistableHeaders:l,signingRegion:d,signingService:_}=r,y=await this.credentialProvider();this.validateResolvedCredentials(y);let E=d??await this.regionProvider(),{longDate:g,shortDate:v}=this.formatDate(n);if(o>J1)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let A=gf(v,E,_??this.service),R=X1(CP(t),{unhoistableHeaders:c,hoistableHeaders:l});y.sessionToken&&(R.query[IP]=y.sessionToken),R.query[M1]=mf,R.query[O1]=`${y.accessKeyId}/${A}`,R.query[xP]=g,R.query[L1]=o.toString(10);let b=AP(R,a,u);return R.query[N1]=this.getCanonicalHeaderList(b),R.query[bP]=await this.getSignature(g,A,this.getSigningKey(y,E,v,_),this.createCanonicalRequest(R,b,await hf(t,this.sha256))),R}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:o,signingRegion:a,signingService:c,eventStreamCredentials:u}){let l=a??await this.regionProvider(),{shortDate:d,longDate:_}=this.formatDate(n),y=gf(d,l,c??this.service),E=await hf({headers:{},body:r},this.sha256),g=new this.sha256;g.update(t);let v=Fi.toHex(await g.digest()),A=[V1,_,y,o,v,E].join(`
|
|
36
|
+
`);return this.signString(A,{signingDate:n,signingRegion:l,signingService:c,eventStreamCredentials:u})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:o,eventStreamCredentials:a}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:o,priorSignature:t.priorSignature,eventStreamCredentials:a}).then(u=>({message:t.message,signature:u}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:o,eventStreamCredentials:a}={}){let c=a??await this.credentialProvider();this.validateResolvedCredentials(c);let u=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),d=new this.sha256(await this.getSigningKey(c,u,l,o));return d.update(Qs.toUint8Array(t)),Fi.toHex(await d.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:a,signingService:c}={}){let u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=a??await this.regionProvider(),d=CP(t),{longDate:_,shortDate:y}=this.formatDate(r),E=gf(y,l,c??this.service);d.headers[$P]=_,u.sessionToken&&(d.headers[G1]=u.sessionToken);let g=await hf(d,this.sha256);!Z1(yf,d.headers)&&this.applyChecksum&&(d.headers[yf]=g);let v=AP(d,o,n),A=await this.getSignature(_,E,this.getSigningKey(u,l,y,c),this.createCanonicalRequest(d,v,g));return d.headers[wP]=`${mf} Credential=${u.accessKeyId}/${E}, SignedHeaders=${this.getCanonicalHeaderList(v)}, Signature=${A}`,d}async getSignature(t,r,n,o){let a=await this.createStringToSign(t,r,o,mf),c=new this.sha256(await n);return c.update(Qs.toUint8Array(a)),Fi.toHex(await c.digest())}getSigningKey(t,r,n,o){return K1(this.sha256,t,n,r,o||this.service)}},Mre={SignatureV4a:null};xe.ALGORITHM_IDENTIFIER=mf;xe.ALGORITHM_IDENTIFIER_V4A=Ire;xe.ALGORITHM_QUERY_PARAM=M1;xe.ALWAYS_UNSIGNABLE_HEADERS=F1;xe.AMZ_DATE_HEADER=$P;xe.AMZ_DATE_QUERY_PARAM=xP;xe.AUTH_HEADER=wP;xe.CREDENTIAL_QUERY_PARAM=O1;xe.DATE_HEADER=z1;xe.EVENT_ALGORITHM_IDENTIFIER=V1;xe.EXPIRES_QUERY_PARAM=L1;xe.GENERATED_HEADERS=U1;xe.HOST_HEADER=xre;xe.KEY_TYPE_IDENTIFIER=kP;xe.MAX_CACHE_SIZE=W1;xe.MAX_PRESIGNED_TTL=J1;xe.PROXY_HEADER_PATTERN=j1;xe.REGION_SET_PARAM=Tre;xe.SEC_HEADER_PATTERN=q1;xe.SHA256_HEADER=yf;xe.SIGNATURE_HEADER=B1;xe.SIGNATURE_QUERY_PARAM=bP;xe.SIGNED_HEADERS_QUERY_PARAM=N1;xe.SignatureV4=TP;xe.SignatureV4Base=_f;xe.TOKEN_HEADER=G1;xe.TOKEN_QUERY_PARAM=IP;xe.UNSIGNABLE_PATTERNS=bre;xe.UNSIGNED_PAYLOAD=H1;xe.clearCredentialCache=wre;xe.createScope=gf;xe.getCanonicalHeaders=AP;xe.getCanonicalQuery=Y1;xe.getPayloadHash=hf;xe.getSigningKey=K1;xe.hasHeader=Z1;xe.moveHeadersToQuery=X1;xe.prepareRequest=CP;xe.signatureV4aContainer=Mre});function Ore(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=aR(t,sR,Tm):r?n=wi(r(Object.assign({},e,{parentClientConfig:e}))):n=i(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider"),n.memoized=!0,n}function Nre(e,t){if(t.configBound)return t;let r=i(async n=>t({...n,callerClientConfig:e}),"fn");return r.memoized=t.memoized,r.configBound=!0,r}var DP,Nn,Q1,eL=D(()=>{yt();Xe();DP=I(Ef()),Nn=i(e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(d){d&&d!==t&&d!==n&&(r=!0),t=d;let _=Ore(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),y=Nre(e,_);if(r&&!y.attributed){let E=typeof t=="object"&&t!==null;n=i(async g=>{let A=await y(g);return E&&(!A.$source||Object.keys(A.$source).length===0)?Mi(A,"CREDENTIALS_CODE","e"):A},"resolvedCredentials"),n.memoized=y.memoized,n.configBound=y.configBound,n.attributed=!0}else n=y},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:o=!0,systemClockOffset:a=e.systemClockOffset||0,sha256:c}=e,u;return e.signer?u=wi(e.signer):e.regionInfoProvider?u=i(()=>wi(e.region)().then(async d=>[await e.regionInfoProvider(d,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},d]).then(([d,_])=>{let{signingRegion:y,signingService:E}=d;e.signingRegion=e.signingRegion||y||_,e.signingName=e.signingName||E||e.serviceId;let g={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:c,uriEscapePath:o},v=e.signerConstructor||DP.SignatureV4;return new v(g)}),"signer"):u=i(async d=>{d=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await wi(e.region)(),properties:{}},d);let _=d.signingRegion,y=d.signingName;e.signingRegion=e.signingRegion||_,e.signingName=e.signingName||y||e.serviceId;let E={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:c,uriEscapePath:o},g=e.signerConstructor||DP.SignatureV4;return new g(E)},"signer"),Object.assign(e,{systemClockOffset:a,signingEscapePath:o,signer:u})},"resolveAwsSdkSigV4Config"),Q1=Nn;i(Ore,"normalizeCredentialProvider");i(Nre,"bindCallerConfig")});var tL=D(()=>{_P();R1();x1();b1();eL()});var pc={};bt(pc,{AWSSDKSigV4Signer:()=>yP,AwsSdkSigV4ASigner:()=>ni,AwsSdkSigV4Signer:()=>Lt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>ao,NODE_SIGV4A_CONFIG_OPTIONS:()=>df,getBearerTokenEnvKey:()=>uf,resolveAWSSDKSigV4Config:()=>Q1,resolveAwsSdkSigV4AConfig:()=>lf,resolveAwsSdkSigV4Config:()=>Nn,validateSigningProperties:()=>lc});var Dt=D(()=>{tL();SP()});var NP=N(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.resolveHttpAuthSchemeConfig=ji.defaultBedrockRuntimeHttpAuthSchemeProvider=ji.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=void 0;var Lre=(Dt(),Q(pc)),MP=(Xe(),Q(fr)),OP=It(),zre=i(async(e,t,r)=>({operation:(0,OP.getSmithyContext)(t).operation,region:await(0,OP.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultBedrockRuntimeHttpAuthSchemeParametersProvider");ji.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=zre;function Ure(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i(Ure,"createAwsAuthSigv4HttpAuthOption");function Bre(e){return{schemeId:"smithy.api#httpBearerAuth",propertiesExtractor:i(({profile:t,filepath:r,configFilepath:n,ignoreCache:o},a)=>({identityProperties:{profile:t,filepath:r,configFilepath:n,ignoreCache:o}}),"propertiesExtractor")}}i(Bre,"createSmithyApiHttpBearerAuthHttpAuthOption");var Gre=i(e=>{let t=[];switch(e.operation){default:t.push(Ure(e)),t.push(Bre(e))}return t},"defaultBedrockRuntimeHttpAuthSchemeProvider");ji.defaultBedrockRuntimeHttpAuthSchemeProvider=Gre;var Fre=i(e=>{let t=(0,MP.memoizeIdentityProvider)(e.token,MP.isIdentityExpired,MP.doesIdentityRequireRefresh),r=(0,Lre.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,OP.normalizeProvider)(e.authSchemePreference??[]),token:t})},"resolveHttpAuthSchemeConfig");ji.resolveHttpAuthSchemeConfig=Fre});var rL=N((Cot,jre)=>{jre.exports={name:"@aws-sdk/client-bedrock-runtime",description:"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",version:"3.1039.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime",test:"yarn g:vitest run --passWithNoTests","test:browser":"yarn g:vitest run -c vitest.config.browser.e2e.mts","test:browser:watch":"yarn g:vitest watch -c vitest.config.browser.e2e.mts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs","test:integration":"yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts","test:integration:watch":"yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts","test:watch":"yarn g:vitest watch --passWithNoTests"},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.974.7","@aws-sdk/credential-provider-node":"^3.972.38","@aws-sdk/eventstream-handler-node":"^3.972.14","@aws-sdk/middleware-eventstream":"^3.972.10","@aws-sdk/middleware-host-header":"^3.972.10","@aws-sdk/middleware-logger":"^3.972.10","@aws-sdk/middleware-recursion-detection":"^3.972.11","@aws-sdk/middleware-user-agent":"^3.972.37","@aws-sdk/middleware-websocket":"^3.972.16","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/token-providers":"3.1039.0","@aws-sdk/types":"^3.973.8","@aws-sdk/util-endpoints":"^3.996.8","@aws-sdk/util-user-agent-browser":"^3.972.10","@aws-sdk/util-user-agent-node":"^3.973.23","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.17","@smithy/eventstream-serde-browser":"^4.2.14","@smithy/eventstream-serde-config-resolver":"^4.3.14","@smithy/eventstream-serde-node":"^4.2.14","@smithy/fetch-http-handler":"^5.3.17","@smithy/hash-node":"^4.2.14","@smithy/invalid-dependency":"^4.2.14","@smithy/middleware-content-length":"^4.2.14","@smithy/middleware-endpoint":"^4.4.32","@smithy/middleware-retry":"^4.5.7","@smithy/middleware-serde":"^4.2.20","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.1","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.13","@smithy/types":"^4.14.1","@smithy/url-parser":"^4.2.14","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.49","@smithy/util-defaults-mode-node":"^4.2.54","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.6","@smithy/util-stream":"^4.5.25","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{"@smithy/snapshot-testing":"^2.0.8","@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3",vitest:"^4.0.17"},engines:{node:">=20.0.0"},typesVersions:{"<4.5":{"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-bedrock-runtime",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock-runtime"}}});var LP=N(qi=>{"use strict";var qre=(yt(),Q(Pr)),Vre=jt(),nL="AWS_ACCESS_KEY_ID",oL="AWS_SECRET_ACCESS_KEY",iL="AWS_SESSION_TOKEN",sL="AWS_CREDENTIAL_EXPIRATION",aL="AWS_CREDENTIAL_SCOPE",cL="AWS_ACCOUNT_ID",Hre=i(e=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let t=process.env[nL],r=process.env[oL],n=process.env[iL],o=process.env[sL],a=process.env[aL],c=process.env[cL];if(t&&r){let u={accessKeyId:t,secretAccessKey:r,...n&&{sessionToken:n},...o&&{expiration:new Date(o)},...a&&{credentialScope:a},...c&&{accountId:c}};return qre.setCredentialFeature(u,"CREDENTIALS_ENV_VARS","g"),u}throw new Vre.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})},"fromEnv");qi.ENV_ACCOUNT_ID=cL;qi.ENV_CREDENTIAL_SCOPE=aL;qi.ENV_EXPIRATION=sL;qi.ENV_KEY=nL;qi.ENV_SECRET=oL;qi.ENV_SESSION=iL;qi.fromEnv=Hre});var el=N(rr=>{"use strict";var co=jt(),Wre=require("url"),Jre=require("buffer"),Kre=require("http"),FP=cn(),Zre=Gr();function Qu(e){return new Promise((t,r)=>{let n=Kre.request({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});n.on("error",o=>{r(Object.assign(new co.ProviderError("Unable to connect to instance metadata service"),o)),n.destroy()}),n.on("timeout",()=>{r(new co.ProviderError("TimeoutError from instance metadata service")),n.destroy()}),n.on("response",o=>{let{statusCode:a=400}=o;(a<200||300<=a)&&(r(Object.assign(new co.ProviderError("Error response received from instance metadata service"),{statusCode:a})),n.destroy());let c=[];o.on("data",u=>{c.push(u)}),o.on("end",()=>{t(Jre.Buffer.concat(c)),n.destroy()})}),n.end()})}i(Qu,"httpRequest");var pL=i(e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string","isImdsCredentials"),mL=i(e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),"fromImdsCredentials"),fL=1e3,gL=0,jP=i(({maxRetries:e=gL,timeout:t=fL})=>({maxRetries:e,timeout:t}),"providerConfigFromInit"),UP=i((e,t)=>{let r=e();for(let n=0;n<t;n++)r=r.catch(e);return r},"retry"),Sf="AWS_CONTAINER_CREDENTIALS_FULL_URI",vf="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",BP="AWS_CONTAINER_AUTHORIZATION_TOKEN",Xre=i((e={})=>{let{timeout:t,maxRetries:r}=jP(e);return()=>UP(async()=>{let n=await rne({logger:e.logger}),o=JSON.parse(await Yre(t,n));if(!pL(o))throw new co.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:e.logger});return mL(o)},r)},"fromContainerMetadata"),Yre=i(async(e,t)=>(process.env[BP]&&(t.headers={...t.headers,Authorization:process.env[BP]}),(await Qu({...t,timeout:e})).toString()),"requestFromEcsImds"),Qre="169.254.170.2",ene={localhost:!0,"127.0.0.1":!0},tne={"http:":!0,"https:":!0},rne=i(async({logger:e})=>{if(process.env[vf])return{hostname:Qre,path:process.env[vf]};if(process.env[Sf]){let t=Wre.parse(process.env[Sf]);if(!t.hostname||!(t.hostname in ene))throw new co.CredentialsProviderError(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in tne))throw new co.CredentialsProviderError(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new co.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${vf} or ${Sf} environment variable is set`,{tryNextLink:!1,logger:e})},"getCmdsUri"),GP=class e extends co.CredentialsProviderError{static{i(this,"InstanceMetadataV1FallbackError")}tryNextLink;name="InstanceMetadataV1FallbackError";constructor(t,r=!0){super(t,r),this.tryNextLink=r,Object.setPrototypeOf(this,e.prototype)}};rr.Endpoint=void 0;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"})(rr.Endpoint||(rr.Endpoint={}));var nne="AWS_EC2_METADATA_SERVICE_ENDPOINT",one="ec2_metadata_service_endpoint",ine={environmentVariableSelector:i(e=>e[nne],"environmentVariableSelector"),configFileSelector:i(e=>e[one],"configFileSelector"),default:void 0},mc;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(mc||(mc={}));var sne="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ane="ec2_metadata_service_endpoint_mode",cne={environmentVariableSelector:i(e=>e[sne],"environmentVariableSelector"),configFileSelector:i(e=>e[ane],"configFileSelector"),default:mc.IPv4},hL=i(async()=>Zre.parseUrl(await une()||await lne()),"getInstanceMetadataEndpoint"),une=i(async()=>FP.loadConfig(ine)(),"getFromEndpointConfig"),lne=i(async()=>{let e=await FP.loadConfig(cne)();switch(e){case mc.IPv4:return rr.Endpoint.IPv4;case mc.IPv6:return rr.Endpoint.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(mc)}`)}},"getFromEndpointModeConfig"),dne=300,pne=300,mne="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",uL=i((e,t)=>{let r=dne+Math.floor(Math.random()*pne),n=new Date(Date.now()+r*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.
|
|
37
|
+
For more information, please visit: `+mne);let o=e.originalExpiration??e.expiration;return{...e,...o?{originalExpiration:o}:{},expiration:n}},"getExtendedInstanceMetadataCredentials"),fne=i((e,t={})=>{let r=t?.logger||console,n;return async()=>{let o;try{o=await e(),o.expiration&&o.expiration.getTime()<Date.now()&&(o=uL(o,r))}catch(a){if(n)r.warn("Credential renew failed: ",a),o=uL(n,r);else throw a}return n=o,o}},"staticStabilityProvider"),yL="/latest/meta-data/iam/security-credentials/",gne="/latest/api/token",zP="AWS_EC2_METADATA_V1_DISABLED",lL="ec2_metadata_v1_disabled",dL="x-aws-ec2-metadata-token",hne=i((e={})=>fne(yne(e),{logger:e.logger}),"fromInstanceMetadata"),yne=i((e={})=>{let t=!1,{logger:r,profile:n}=e,{timeout:o,maxRetries:a}=jP(e),c=i(async(u,l)=>{if(t||l.headers?.[dL]==null){let y=!1,E=!1,g=await FP.loadConfig({environmentVariableSelector:i(v=>{let A=v[zP];if(E=!!A&&A!=="false",A===void 0)throw new co.CredentialsProviderError(`${zP} not set in env, checking config file next.`,{logger:e.logger});return E},"environmentVariableSelector"),configFileSelector:i(v=>{let A=v[lL];return y=!!A&&A!=="false",y},"configFileSelector"),default:!1},{profile:n})();if(e.ec2MetadataV1Disabled||g){let v=[];throw e.ec2MetadataV1Disabled&&v.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),y&&v.push(`config file profile (${lL})`),E&&v.push(`process environment variable (${zP})`),new GP(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${v.join(", ")}].`)}}let _=(await UP(async()=>{let y;try{y=await Ene(l)}catch(E){throw E.statusCode===401&&(t=!1),E}return y},u)).trim();return UP(async()=>{let y;try{y=await Sne(_,l,e)}catch(E){throw E.statusCode===401&&(t=!1),E}return y},u)},"getCredentials");return async()=>{let u=await hL();if(t)return r?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),c(a,{...u,timeout:o});{let l;try{l=(await _ne({...u,timeout:o})).toString()}catch(d){if(d?.statusCode===400)throw Object.assign(d,{message:"EC2 Metadata token request returned error"});return(d.message==="TimeoutError"||[403,404,405].includes(d.statusCode))&&(t=!0),r?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),c(a,{...u,timeout:o})}return c(a,{...u,headers:{[dL]:l},timeout:o})}}},"getInstanceMetadataProvider"),_ne=i(async e=>Qu({...e,path:gne,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),Ene=i(async e=>(await Qu({...e,path:yL})).toString(),"getProfile"),Sne=i(async(e,t,r)=>{let n=JSON.parse((await Qu({...t,path:yL+e})).toString());if(!pL(n))throw new co.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return mL(n)},"getCredentialsFromProfile");rr.DEFAULT_MAX_RETRIES=gL;rr.DEFAULT_TIMEOUT=fL;rr.ENV_CMDS_AUTH_TOKEN=BP;rr.ENV_CMDS_FULL_URI=Sf;rr.ENV_CMDS_RELATIVE_URI=vf;rr.fromContainerMetadata=Xre;rr.fromInstanceMetadata=hne;rr.getInstanceMetadataEndpoint=hL;rr.httpRequest=Qu;rr.providerConfigFromInit=jP});var _L=N(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.checkUrl=void 0;var vne=jt(),Ane="169.254.170.2",Rne="169.254.170.23",Pne="[fd00:ec2::23]",Cne=i((e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===Ane||e.hostname===Rne||e.hostname===Pne)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let r=e.hostname.split("."),n=i(o=>{let a=parseInt(o,10);return 0<=a&&a<=255},"inRange");if(r[0]==="127"&&n(r[1])&&n(r[2])&&n(r[3])&&r.length===4)return}throw new vne.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
38
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
39
|
+
- ECS container host 169.254.170.2
|
|
40
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},"checkUrl");Af.checkUrl=Cne});var EL=N(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.createGetRequest=Ine;Rf.getCredentials=wne;var qP=jt(),Tne=Me(),xne=ue(),bne=tm();function Ine(e){return new Tne.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[r,n])=>(t[r]=n,t),{}),fragment:e.hash})}i(Ine,"createGetRequest");async function wne(e,t){let n=await(0,bne.sdkStreamMixin)(e.body).transformToString();if(e.statusCode===200){let o=JSON.parse(n);if(typeof o.AccessKeyId!="string"||typeof o.SecretAccessKey!="string"||typeof o.Token!="string"||typeof o.Expiration!="string")throw new qP.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.Token,expiration:(0,xne.parseRfc3339DateTime)(o.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let o={};try{o=JSON.parse(n)}catch{}throw Object.assign(new qP.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:o.Code,Message:o.Message})}throw new qP.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t})}i(wne,"getCredentials")});var SL=N(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.retryWrapper=void 0;var $ne=i((e,t,r)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(a=>setTimeout(a,r))}return await e()},"retryWrapper");Pf.retryWrapper=$ne});var RL=N(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.fromHttp=void 0;var kne=(Ko(),Q(Jo)),Dne=(yt(),Q(Pr)),Mne=to(),vL=jt(),One=kne.__importDefault(require("node:fs/promises")),Nne=_L(),AL=EL(),Lne=SL(),zne="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Une="http://169.254.170.2",Bne="AWS_CONTAINER_CREDENTIALS_FULL_URI",Gne="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Fne="AWS_CONTAINER_AUTHORIZATION_TOKEN",jne=i((e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t,r=e.awsContainerCredentialsRelativeUri??process.env[zne],n=e.awsContainerCredentialsFullUri??process.env[Bne],o=e.awsContainerAuthorizationToken??process.env[Fne],a=e.awsContainerAuthorizationTokenFile??process.env[Gne],c=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(r&&n&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),c("awsContainerCredentialsFullUri will take precedence.")),o&&a&&(c("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),c("awsContainerAuthorizationToken will take precedence.")),n)t=n;else if(r)t=`${Une}${r}`;else throw new vL.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
41
|
+
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let u=new URL(t);(0,Nne.checkUrl)(u,e.logger);let l=Mne.NodeHttpHandler.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return(0,Lne.retryWrapper)(async()=>{let d=(0,AL.createGetRequest)(u);o?d.headers.Authorization=o:a&&(d.headers.Authorization=(await One.default.readFile(a)).toString());try{let _=await l.handle(d);return(0,AL.getCredentials)(_.response).then(y=>(0,Dne.setCredentialFeature)(y,"CREDENTIALS_HTTP","z"))}catch(_){throw new vL.CredentialsProviderError(String(_),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3)},"fromHttp");Cf.fromHttp=jne});var VP=N(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.fromHttp=void 0;var qne=RL();Object.defineProperty(Tf,"fromHttp",{enumerable:!0,get:i(function(){return qne.fromHttp},"get")})});function Vne(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function Hne(e){return{schemeId:"smithy.api#noAuth"}}var tl,PL,CL,TL,HP=D(()=>{Dt();tl=I(It()),PL=i(async(e,t,r)=>({operation:(0,tl.getSmithyContext)(t).operation,region:await(0,tl.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSSOOIDCHttpAuthSchemeParametersProvider");i(Vne,"createAwsAuthSigv4HttpAuthOption");i(Hne,"createSmithyApiNoAuthHttpAuthOption");CL=i(e=>{let t=[];return e.operation==="CreateToken"?t.push(Hne(e)):t.push(Vne(e)),t},"defaultSSOOIDCHttpAuthSchemeProvider"),TL=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,tl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var xL,bL,WP=D(()=>{xL=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),"resolveClientEndpointParameters"),bL={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Vi,rl=D(()=>{Vi={name:"@aws-sdk/nested-clients",version:"3.997.5",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:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=20.0.0"},sideEffects:!1,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.974.7","@aws-sdk/middleware-host-header":"^3.972.10","@aws-sdk/middleware-logger":"^3.972.10","@aws-sdk/middleware-recursion-detection":"^3.972.11","@aws-sdk/middleware-user-agent":"^3.972.37","@aws-sdk/region-config-resolver":"^3.972.13","@aws-sdk/signature-v4-multi-region":"^3.996.24","@aws-sdk/types":"^3.973.8","@aws-sdk/util-endpoints":"^3.996.8","@aws-sdk/util-user-agent-browser":"^3.972.10","@aws-sdk/util-user-agent-node":"^3.973.23","@smithy/config-resolver":"^4.4.17","@smithy/core":"^3.23.17","@smithy/fetch-http-handler":"^5.3.17","@smithy/hash-node":"^4.2.14","@smithy/invalid-dependency":"^4.2.14","@smithy/middleware-content-length":"^4.2.14","@smithy/middleware-endpoint":"^4.4.32","@smithy/middleware-retry":"^4.5.7","@smithy/middleware-serde":"^4.2.20","@smithy/middleware-stack":"^4.2.14","@smithy/node-config-provider":"^4.3.14","@smithy/node-http-handler":"^4.6.1","@smithy/protocol-http":"^5.3.14","@smithy/smithy-client":"^4.12.13","@smithy/types":"^4.14.1","@smithy/url-parser":"^4.2.14","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.49","@smithy/util-defaults-mode-node":"^4.2.54","@smithy/util-endpoints":"^3.4.2","@smithy/util-middleware":"^4.2.14","@smithy/util-retry":"^4.3.6","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/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:{"./package.json":"./package.json","./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"},"./signin":{types:"./dist-types/submodules/signin/index.d.ts",module:"./dist-es/submodules/signin/index.js",node:"./dist-cjs/submodules/signin/index.js",import:"./dist-es/submodules/signin/index.js",require:"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{types:"./dist-types/submodules/cognito-identity/index.d.ts",module:"./dist-es/submodules/cognito-identity/index.js",node:"./dist-cjs/submodules/cognito-identity/index.js",import:"./dist-es/submodules/cognito-identity/index.js",require:"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{types:"./dist-types/submodules/sso/index.d.ts",module:"./dist-es/submodules/sso/index.js",node:"./dist-cjs/submodules/sso/index.js",import:"./dist-es/submodules/sso/index.js",require:"./dist-cjs/submodules/sso/index.js"}}}});var Hi=N(ea=>{"use strict";var IL=require("node:os"),nl=require("node:process"),wL=Hm(),$L=require("node:fs/promises"),fc=require("node:path"),Jne=ti(),Kne=i(()=>{let e=["deno","bun","llrt"];for(let t of e)if(nl.versions[t])return[`md/${t}`,nl.versions[t]];return["md/nodejs",nl.versions.node]},"getRuntimeUserAgentPair"),Zne=i(e=>{let t=process.cwd();if(!e)return[t];let r=fc.normalize(e),n=r.split(fc.sep),o=n.indexOf("node_modules"),a=o!==-1?n.slice(0,o).join(fc.sep):r;return t===a?[t]:[a,t]},"getNodeModulesParentDirs"),Xne=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,kL=i((e="")=>{let t=e.match(Xne);if(!t)return;let[r,n,o,a]=[t[1],t[2],t[3],t[4]];return a?`${r}.${n}.${o}-${a}`:`${r}.${n}.${o}`},"getSanitizedTypeScriptVersion"),Yne=["^","~",">=","<=",">","<"],Qne=["latest","beta","dev","rc","insiders","next"],eoe=i((e="")=>{if(Qne.includes(e))return e;let t=Yne.find(n=>e.startsWith(n))??"",r=kL(e.slice(t.length));if(r)return`${t}${r}`},"getSanitizedDevTypeScriptVersion"),uo,toe=fc.join("node_modules","typescript","package.json"),roe=i(async()=>{if(uo===null)return;if(typeof uo=="string")return["md/tsc",uo];let e=!1;try{e=wL.booleanSelector(process.env,"AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED",wL.SelectorType.ENV)||!1}catch{}if(e){uo=null;return}let r=Zne(typeof __dirname<"u"?__dirname:void 0),n;for(let c of r)try{let u=fc.join(c,"package.json"),l=await $L.readFile(u,"utf-8"),{dependencies:d,devDependencies:_}=JSON.parse(l),y=_?.typescript??d?.typescript;if(typeof y!="string")continue;n=y;break}catch{}if(!n){uo=null;return}let o;for(let c of r)try{let u=fc.join(c,toe),l=await $L.readFile(u,"utf-8"),{version:d}=JSON.parse(l),_=kL(d);if(typeof _!="string")continue;o=_;break}catch{}if(o)return uo=o,["md/tsc",uo];let a=eoe(n);if(typeof a!="string"){uo=null;return}return uo=`dev_${a}`,["md/tsc",uo]},"getTypeScriptUserAgentPair"),DL={isCrtAvailable:!1},noe=i(()=>DL.isCrtAvailable?["md/crt-avail"]:null,"isCrtAvailable"),ML=i(({serviceId:e,clientVersion:t})=>{let r=Kne();return async n=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${IL.platform()}`,IL.release()],["lang/js"],r],a=await roe();a&&o.push(a);let c=noe();c&&o.push(c),e&&o.push([`api/${e}`,t]),nl.env.AWS_EXECUTION_ENV&&o.push([`exec-env/${nl.env.AWS_EXECUTION_ENV}`]);let u=await n?.userAgentAppId?.();return u?[...o,[`app/${u}`]]:[...o]}},"createDefaultUserAgentProvider"),ooe=ML,OL="AWS_SDK_UA_APP_ID",NL="sdk_ua_app_id",ioe="sdk-ua-app-id",soe={environmentVariableSelector:i(e=>e[OL],"environmentVariableSelector"),configFileSelector:i(e=>e[NL]??e[ioe],"configFileSelector"),default:Jne.DEFAULT_UA_APP_ID};ea.NODE_APP_ID_CONFIG_OPTIONS=soe;ea.UA_APP_ID_ENV_NAME=OL;ea.UA_APP_ID_INI_NAME=NL;ea.createDefaultUserAgentProvider=ML;ea.crtAvailability=DL;ea.defaultUserAgent=ooe});var Wi=N(UL=>{"use strict";var JP=qa(),aoe=ft(),coe=require("buffer"),LL=require("crypto"),KP=class{static{i(this,"Hash")}algorithmIdentifier;secret;hash;constructor(t,r){this.algorithmIdentifier=t,this.secret=r,this.reset()}update(t,r){this.hash.update(aoe.toUint8Array(zL(t,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?LL.createHmac(this.algorithmIdentifier,zL(this.secret)):LL.createHash(this.algorithmIdentifier)}};function zL(e,t){return coe.Buffer.isBuffer(e)?e:typeof e=="string"?JP.fromString(e,t):ArrayBuffer.isView(e)?JP.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength):JP.fromArrayBuffer(e)}i(zL,"castSourceData");UL.Hash=KP});var Ji=N(BL=>{"use strict";var ZP=require("node:fs"),uoe=i(e=>{if(!e)return 0;if(typeof e=="string")return Buffer.byteLength(e);if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(e instanceof ZP.ReadStream){if(e.path!=null)return ZP.lstatSync(e.path).size;if(typeof e.fd=="number")return ZP.fstatSync(e.fd).size}throw new Error(`Body Length computation failed for ${e}`)},"calculateBodyLength");BL.calculateBodyLength=uoe});var Ki=N(qL=>{"use strict";var loe=Nt(),GL=cn(),doe=jt(),poe="AWS_EXECUTION_ENV",FL="AWS_REGION",jL="AWS_DEFAULT_REGION",moe="AWS_EC2_METADATA_DISABLED",foe=["in-region","cross-region","mobile","standard","legacy"],goe="/latest/meta-data/placement/region",hoe="AWS_DEFAULTS_MODE",yoe="defaults_mode",_oe={environmentVariableSelector:i(e=>e[hoe],"environmentVariableSelector"),configFileSelector:i(e=>e[yoe],"configFileSelector"),default:"legacy"},Eoe=i(({region:e=GL.loadConfig(loe.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=GL.loadConfig(_oe)}={})=>doe.memoize(async()=>{let r=typeof t=="function"?await t():t;switch(r?.toLowerCase()){case"auto":return Soe(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${foe.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),Soe=i(async e=>{if(e){let t=typeof e=="function"?await e():e,r=await voe();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),voe=i(async()=>{if(process.env[poe]&&(process.env[FL]||process.env[jL]))return process.env[FL]??process.env[jL];if(!process.env[moe])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(()=>I(el())),r=await e();return(await t({...r,path:goe})).toString()}catch{}},"inferPhysicalRegion");qL.resolveDefaultsModeConfig=Eoe});function Zi(e){return typeof Buffer<"u"?Buffer.alloc(e):new Uint8Array(e)}function xf(e){return e[XP]=!0,e}var XP,bf=D(()=>{i(Zi,"alloc");XP=Symbol("@smithy/core/cbor::tagSymbol");i(xf,"tag")});function WL(e){Je=e,ii=new DataView(Je.buffer,Je.byteOffset,Je.byteLength)}function lo(e,t){if(e>=t)throw new Error("unexpected end of (decode) payload.");let r=(Je[e]&224)>>5,n=Je[e]&31;switch(r){case 0:case 1:case 6:let o,a;if(n<24)o=n,a=1;else switch(n){case 24:case 25:case 26:case 27:let c=KL[n],u=c+1;if(a=u,t-e<u)throw new Error(`countLength ${c} greater than remaining buf len.`);let l=e+1;c===1?o=Je[l]:c===2?o=ii.getUint16(l):c===4?o=ii.getUint32(l):o=ii.getBigUint64(l);break;default:throw new Error(`unexpected minor value ${n}.`)}if(r===0)return De=a,YP(o);if(r===1){let c;return typeof o=="bigint"?c=BigInt(-1)-o:c=-1-o,De=a,YP(c)}else if(n===2||n===3){let c=al(e+a,t),u=BigInt(0),l=e+a+De;for(let d=l;d<l+c;++d)u=u<<BigInt(8)|BigInt(Je[d]);return De=a+De+c,n===3?-u-BigInt(1):u}else if(n===4){let c=lo(e+a,t),[u,l]=c,d=l<0?-1:1,_="0".repeat(Math.abs(u)+1)+String(BigInt(d)*BigInt(l)),y,E=l<0?"-":"";return y=u===0?_:_.slice(0,_.length+u)+"."+_.slice(u),y=y.replace(/^0+/g,""),y===""&&(y="0"),y[0]==="."&&(y="0"+y),y=E+y,De=a+De,WA(y)}else{let c=lo(e+a,t);return De=a+De,xf({tag:YP(o),value:c})}case 3:case 5:case 4:case 2:if(n===31)switch(r){case 3:return boe(e,t);case 5:return Doe(e,t);case 4:return $oe(e,t);case 2:return Ioe(e,t)}else switch(r){case 3:return xoe(e,t);case 5:return koe(e,t);case 4:return woe(e,t);case 2:return oC(e,t)}default:return Moe(e,t)}}function JL(e,t,r){return Poe&&e.constructor?.name==="Buffer"?e.toString("utf-8",t,r):VL?VL.decode(e.subarray(t,r)):(0,HL.toUtf8)(e.subarray(t,r))}function Coe(e){let t=Number(e);return(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)&&console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${e}) to ${t} with loss of precision.`)),t}function Toe(e,t){let r=e>>7,n=(e&124)>>2,o=(e&3)<<8|t,a=r===0?1:-1,c,u;if(n===0){if(o===0)return 0;c=Math.pow(2,-14),u=0}else{if(n===31)return o===0?a*(1/0):NaN;c=Math.pow(2,n-15),u=1}return u+=o/1024,a*(c*u)}function al(e,t){let r=Je[e]&31;if(r<24)return De=1,r;if(r===24||r===25||r===26||r===27){let n=KL[r];if(De=n+1,t-e<De)throw new Error(`countLength ${n} greater than remaining buf len.`);let o=e+1;return n===1?Je[o]:n===2?ii.getUint16(o):n===4?ii.getUint32(o):Coe(ii.getBigUint64(o))}throw new Error(`unexpected minor value ${r}.`)}function xoe(e,t){let r=al(e,t),n=De;if(e+=n,t-e<r)throw new Error(`string len ${r} greater than remaining buf len.`);let o=JL(Je,e,e+r);return De=n+r,o}function boe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(Je[e]===255){let l=Zi(r.length);return l.set(r,0),De=e-n+2,JL(l,0,l.length)}let o=(Je[e]&224)>>5,a=Je[e]&31;if(o!==3)throw new Error(`unexpected major type ${o} in indefinite string.`);if(a===31)throw new Error("nested indefinite string.");let c=oC(e,t);e+=De;for(let l=0;l<c.length;++l)r.push(c[l])}throw new Error("expected break marker.")}function oC(e,t){let r=al(e,t),n=De;if(e+=n,t-e<r)throw new Error(`unstructured byte string len ${r} greater than remaining buf len.`);let o=Je.subarray(e,e+r);return De=n+r,o}function Ioe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(Je[e]===255){let l=Zi(r.length);return l.set(r,0),De=e-n+2,l}let o=(Je[e]&224)>>5,a=Je[e]&31;if(o!==2)throw new Error(`unexpected major type ${o} in indefinite string.`);if(a===31)throw new Error("nested indefinite string.");let c=oC(e,t);e+=De;for(let l=0;l<c.length;++l)r.push(c[l])}throw new Error("expected break marker.")}function woe(e,t){let r=al(e,t),n=De;e+=n;let o=e,a=Array(r);for(let c=0;c<r;++c){let u=lo(e,t),l=De;a[c]=u,e+=l}return De=n+(e-o),a}function $oe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(Je[e]===255)return De=e-n+2,r;let o=lo(e,t);e+=De,r.push(o)}throw new Error("expected break marker.")}function koe(e,t){let r=al(e,t),n=De;e+=n;let o=e,a={};for(let c=0;c<r;++c){if(e>=t)throw new Error("unexpected end of map payload.");let u=(Je[e]&224)>>5;if(u!==3)throw new Error(`unexpected major type ${u} for map key at index ${e}.`);let l=lo(e,t);e+=De;let d=lo(e,t);e+=De,a[l]=d}return De=n+(e-o),a}function Doe(e,t){e+=1;let r=e,n={};for(;e<t;){if(e>=t)throw new Error("unexpected end of map payload.");if(Je[e]===255)return De=e-r+2,n;let o=(Je[e]&224)>>5;if(o!==3)throw new Error(`unexpected major type ${o} for map key.`);let a=lo(e,t);e+=De;let c=lo(e,t);e+=De,n[a]=c}throw new Error("expected break marker.")}function Moe(e,t){let r=Je[e]&31;switch(r){case 21:case 20:return De=1,r===21;case 22:return De=1,null;case 23:return De=1,null;case 25:if(t-e<3)throw new Error("incomplete float16 at end of buf.");return De=3,Toe(Je[e+1],Je[e+2]);case 26:if(t-e<5)throw new Error("incomplete float32 at end of buf.");return De=5,ii.getFloat32(e+1);case 27:if(t-e<9)throw new Error("incomplete float64 at end of buf.");return De=9,ii.getFloat64(e+1);default:throw new Error(`unexpected minor value ${r}.`)}}function YP(e){if(typeof e=="number")return e;let t=Number(e);return Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER?t:e}var HL,Roe,Poe,Je,ii,VL,De,KL,ZL=D(()=>{Qt();HL=I(ft());bf();Roe=typeof TextDecoder<"u",Poe=typeof Buffer<"u",Je=Zi(0),ii=new DataView(Je.buffer,Je.byteOffset,Je.byteLength),VL=Roe?new TextDecoder:null,De=0;i(WL,"setPayload");i(lo,"decode");i(JL,"bytesToUtf8");i(Coe,"demote");KL={24:1,25:2,26:4,27:8};i(Toe,"bytesToFloat16");i(al,"decodeCount");i(xoe,"decodeUtf8String");i(boe,"decodeUtf8StringIndefinite");i(oC,"decodeUnstructuredByteString");i(Ioe,"decodeUnstructuredByteStringIndefinite");i(woe,"decodeList");i($oe,"decodeListIndefinite");i(koe,"decodeMap");i(Doe,"decodeMapIndefinite");i(Moe,"decodeSpecial");i(YP,"castBigInt")});function sC(e){ve.byteLength-se<e&&(se<16e6?wf(Math.max(ve.byteLength*4,ve.byteLength+e)):wf(ve.byteLength+e+16e6))}function aC(){let e=Zi(se);return e.set(ve.subarray(0,se),0),se=0,e}function wf(e){let t=ve;ve=Zi(e),t&&(t.copy?t.copy(ve,0,0,t.byteLength):ve.set(t,0)),ci=new DataView(ve.buffer,ve.byteOffset,ve.byteLength)}function ai(e,t){t<24?ve[se++]=e<<5|t:t<256?(ve[se++]=e<<5|24,ve[se++]=t):t<65536?(ve[se++]=e<<5|25,ci.setUint16(se,t),se+=2):t<2**32?(ve[se++]=e<<5|26,ci.setUint32(se,t),se+=4):(ve[se++]=e<<5|27,ci.setBigUint64(se,typeof t=="bigint"?t:BigInt(t)),se+=8)}function QL(e){let t=[e];for(;t.length;){let r=t.pop();if(sC(typeof r=="string"?r.length*4:64),typeof r=="string"){if(XL)ai(3,Buffer.byteLength(r)),se+=ve.write(r,se);else{let n=(0,YL.fromUtf8)(r);ai(3,n.byteLength),ve.set(n,se),se+=n.byteLength}continue}else if(typeof r=="number"){if(Number.isInteger(r)){let n=r>=0,o=n?0:1,a=n?r:-r-1;a<24?ve[se++]=o<<5|a:a<256?(ve[se++]=o<<5|24,ve[se++]=a):a<65536?(ve[se++]=o<<5|25,ve[se++]=a>>8,ve[se++]=a):a<4294967296?(ve[se++]=o<<5|26,ci.setUint32(se,a),se+=4):(ve[se++]=o<<5|27,ci.setBigUint64(se,BigInt(a)),se+=8);continue}ve[se++]=251,ci.setFloat64(se,r),se+=8;continue}else if(typeof r=="bigint"){let n=r>=0,o=n?0:1,a=n?r:-r-BigInt(1),c=Number(a);if(c<24)ve[se++]=o<<5|c;else if(c<256)ve[se++]=o<<5|24,ve[se++]=c;else if(c<65536)ve[se++]=o<<5|25,ve[se++]=c>>8,ve[se++]=c&255;else if(c<4294967296)ve[se++]=o<<5|26,ci.setUint32(se,c),se+=4;else if(a<BigInt("18446744073709551616"))ve[se++]=o<<5|27,ci.setBigUint64(se,a),se+=8;else{let u=a.toString(2),l=new Uint8Array(Math.ceil(u.length/8)),d=a,_=0;for(;l.byteLength-++_>=0;)l[l.byteLength-_]=Number(d&BigInt(255)),d>>=BigInt(8);sC(l.byteLength*2),ve[se++]=n?194:195,XL?ai(2,Buffer.byteLength(l)):ai(2,l.byteLength),ve.set(l,se),se+=l.byteLength}continue}else if(r===null){ve[se++]=246;continue}else if(typeof r=="boolean"){ve[se++]=224|(r?21:20);continue}else{if(typeof r>"u")throw new Error("@smithy/core/cbor: client may not serialize undefined value.");if(Array.isArray(r)){for(let n=r.length-1;n>=0;--n)t.push(r[n]);ai(4,r.length);continue}else if(typeof r.byteLength=="number"){sC(r.length*2),ai(2,r.length),ve.set(r,se),se+=r.byteLength;continue}else if(typeof r=="object"){if(r instanceof Ze){let o=r.string.indexOf("."),a=o===-1?0:o-r.string.length+1,c=BigInt(r.string.replace(".",""));ve[se++]=196,t.push(c),t.push(a),ai(4,2);continue}if(r[XP])if("tag"in r&&"value"in r){t.push(r.value),ai(6,r.tag);continue}else throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(r));let n=Object.keys(r);for(let o=n.length-1;o>=0;--o){let a=n[o];t.push(r[a]),t.push(a)}ai(5,n.length);continue}}throw new Error(`data type ${r?.constructor?.name??typeof r} not compatible for encoding.`)}}var YL,XL,Ooe,ve,ci,se,ez=D(()=>{Qt();YL=I(ft());bf();XL=typeof Buffer<"u",Ooe=2048,ve=Zi(Ooe),ci=new DataView(ve.buffer,ve.byteOffset,ve.byteLength),se=0;i(sC,"ensureSpace");i(aC,"toUint8Array");i(wf,"resize");i(ai,"encodeHeader");i(QL,"encode")});var cC,tz=D(()=>{ZL();ez();cC={deserialize(e){return WL(e),lo(0,e.length)},serialize(e){try{return QL(e),aC()}catch(t){throw aC(),t}},resizeEncodingBuffer(e){wf(e)}}});var $f,kf,Df=D(()=>{bf();$f=i(e=>xf({tag:1,value:e.getTime()/1e3}),"dateToTag"),kf=i((e,t)=>{let r=i(o=>{let a=o;return typeof a=="number"&&(a=a.toString()),a.indexOf(",")>=0&&(a=a.split(",")[0]),a.indexOf(":")>=0&&(a=a.split(":")[0]),a.indexOf("#")>=0&&(a=a.split("#")[1]),a},"sanitizeErrorCode");if(t.__type!==void 0)return r(t.__type);let n;for(let o in t)if(o.toLowerCase()==="code"){n=o;break}if(n&&t[n]!==void 0)return r(t[n])},"loadSmithyRpcV2CborErrorCode")});var dC,Mf,uC,lC,pC=D(()=>{Rr();ke();Qt();Qt();dC=I(gt());tz();Df();Mf=class extends mr{static{i(this,"CborCodec")}createSerializer(){let t=new uC;return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new lC;return t.setSerdeContext(this.serdeContext),t}},uC=class extends mr{static{i(this,"CborShapeSerializer")}value;write(t,r){this.value=this.serialize(t,r)}serialize(t,r){let n=ne.of(t);if(r==null)return n.isIdempotencyToken()?(0,an.v4)():r;if(n.isBlobSchema())return typeof r=="string"?(this.serdeContext?.base64Decoder??dC.fromBase64)(r):r;if(n.isTimestampSchema())return typeof r=="number"||typeof r=="bigint"?$f(new Date(Number(r)/1e3|0)):$f(r);if(typeof r=="function"||typeof r=="object"){let o=r;if(n.isListSchema()&&Array.isArray(o)){let c=!!n.getMergedTraits().sparse,u=[],l=0;for(let d of o){let _=this.serialize(n.getValueSchema(),d);(_!=null||c)&&(u[l++]=_)}return u}if(o instanceof Date)return $f(o);let a={};if(n.isMapSchema()){let c=!!n.getMergedTraits().sparse;for(let u in o){let l=this.serialize(n.getValueSchema(),o[u]);(l!=null||c)&&(a[u]=l)}}else if(n.isStructSchema()){for(let[u,l]of n.structIterator()){let d=this.serialize(l,o[u]);d!=null&&(a[u]=d)}if(n.isUnionSchema()&&Array.isArray(o.$unknown)){let[u,l]=o.$unknown;a[u]=l}else if(typeof o.__type=="string")for(let u in o)u in a||(a[u]=this.serialize(15,o[u]))}else if(n.isDocumentSchema())for(let c in o)a[c]=this.serialize(n.getValueSchema(),o[c]);else if(n.isBigDecimalSchema())return o;return a}return r}flush(){let t=cC.serialize(this.value);return this.value=void 0,t}},lC=class extends mr{static{i(this,"CborShapeDeserializer")}read(t,r){let n=cC.deserialize(r);return this.readValue(t,n)}readValue(t,r){let n=ne.of(t);if(n.isTimestampSchema()){if(typeof r=="number")return Ya(r);if(typeof r=="object"&&r.tag===1&&"value"in r)return Ya(r.value)}if(n.isBlobSchema())return typeof r=="string"?(this.serdeContext?.base64Decoder??dC.fromBase64)(r):r;if(typeof r>"u"||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="bigint"||typeof r=="symbol")return r;if(typeof r=="object"){if(r===null)return null;if("byteLength"in r||r instanceof Date||n.isDocumentSchema())return r;if(n.isListSchema()){let a=[],c=n.getValueSchema();for(let u of r){let l=this.readValue(c,u);a.push(l)}return a}let o={};if(n.isMapSchema()){let a=n.getValueSchema();for(let c in r){let u=this.readValue(a,r[c]);o[c]=u}}else if(n.isStructSchema()){let a=n.isUnionSchema(),c;if(a){c=new Set;for(let u in r)u!=="__type"&&c.add(u)}for(let[u,l]of n.structIterator())a&&c.delete(u),r[u]!=null&&(o[u]=this.readValue(l,r[u]));if(a&&c?.size===1){let u=!0;for(let l in o){u=!1;break}if(u){let l=c.values().next().value;o.$unknown=[l,r[l]]}}else if(typeof r.__type=="string")for(let u in r)u in o||(o[u]=r[u])}else if(r instanceof Ze)return r;return o}else return r}}});var rz,Of,nz=D(()=>{Rr();ke();ke();rz=I(It());pC();Df();Of=class extends Xo{static{i(this,"SmithyRpcV2CborProtocol")}codec=new Mf;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:t,errorTypeRegistries:r}){super({defaultNamespace:t,errorTypeRegistries:r})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);if(Object.assign(o.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),$n(t.input)==="unit")delete o.body,delete o.headers["content-type"];else{o.body||(this.serializer.write(15,{}),o.body=this.serializer.flush());try{o.headers["content-length"]=String(o.body.byteLength)}catch{}}let{service:a,operation:c}=(0,rz.getSmithyContext)(n),u=`/service/${a}/operation/${c}`;return o.path.endsWith("/")?o.path+=u.slice(1):o.path+=u,o}async deserializeResponse(t,r,n){return super.deserializeResponse(t,r,n)}async handleError(t,r,n,o,a){let c=kf(n,o)??"Unknown",u={$metadata:a,$fault:n.statusCode<=500?"client":"server"},l=this.options.defaultNamespace;c.includes("#")&&([l]=c.split("#"));let d=this.compositeErrorRegistry,_=ot.for(l);d.copyFrom(_);let y;try{y=d.getSchema(c)}catch{o.Message&&(o.message=o.Message);let $=ot.for("smithy.ts.sdk.synthetic."+l);d.copyFrom($);let G=d.getBaseException();if(G){let Y=d.getErrorCtor(G);throw Object.assign(new Y({name:c}),u,o)}throw Object.assign(new Error(c),u,o)}let E=ne.of(y),g=d.getErrorCtor(y),v=o.message??o.Message??"Unknown",A=new g(v),R={};for(let[b,$]of E.structIterator())R[b]=this.deserializer.readValue($,o[b]);throw Object.assign(A,u,{$fault:E.getMergedTraits().error,message:v},R)}getDefaultContentType(){return"application/cbor"}}});var oz=D(()=>{Df();nz();pC()});var mC,un,hc=D(()=>{ke();mC=I(ue()),un=class{static{i(this,"ProtocolLib")}queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){let n=r.getMemberSchemas(),o=Object.values(n).find(a=>!!a.getMergedTraits().httpPayload);if(o){let a=o.getMergedTraits().mediaType;return a||(o.isStringSchema()?"text/plain":o.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(c=>{let{httpQuery:u,httpQueryParams:l,httpHeader:d,httpLabel:_,httpPrefixHeaders:y}=c.getMergedTraits();return!u&&!l&&!d&&!_&&y===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,o,a,c){let u=t;t.includes("#")&&([,u]=t.split("#"));let l={$metadata:a,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:c?.(this.errorRegistry,u)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{o.message=o.message??o.Message??"UnknownError";let _=this.errorRegistry,y=_.getBaseException();if(y){let v=_.getErrorCtor(y)??Error;throw this.decorateServiceException(Object.assign(new v({name:u}),l),o)}let E=o,g=E?.message??E?.Message??E?.Error?.Message??E?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(g),{name:u},l),o)}}compose(t,r,n){let o=n;r.includes("#")&&([o]=r.split("#"));let a=ot.for(o),c=ot.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(a),t.copyFrom(c),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){let n=t.Message??r.Message,o=(0,mC.decorateServiceException)(t,r);n&&(o.message=n);let a=o.Error??{};a.Type=o.Error?.Type,a.Code=o.Error?.Code,a.Message=o.Error?.message??o.Error?.Message??n,o.Error=a;let c=o.$metadata.requestId;return c&&(o.RequestId=c),o}return(0,mC.decorateServiceException)(t,r)}setQueryCompatError(t,r){let n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){let[o,a]=n.split(";"),c=Object.keys(t),u={Code:o,Type:a};t.Code=o,t.Type=a;for(let l=0;l<c.length;l++){let d=c[l];u[d==="message"?"Message":d]=t[d]}delete u.__type,t.Error=u}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(o=>ne.of(o).getMergedTraits().awsQueryError?.[0]===r)}}}});var Nf,iz=D(()=>{oz();ke();hc();Nf=class extends Of{static{i(this,"AwsSmithyRpcV2CborProtocol")}awsQueryCompatible;mixin;constructor({defaultNamespace:t,errorTypeRegistries:r,awsQueryCompatible:n}){super({defaultNamespace:t,errorTypeRegistries:r}),this.awsQueryCompatible=!!n,this.mixin=new un(this.awsQueryCompatible)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);return this.awsQueryCompatible&&(o.headers["x-amzn-query-mode"]="true"),o}async handleError(t,r,n,o,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(o,n);let c=(()=>{let v=n.headers["x-amzn-query-error"];return v&&this.awsQueryCompatible?v.split(";")[0]:kf(n,o)??"Unknown"})();this.mixin.compose(this.compositeErrorRegistry,c,this.options.defaultNamespace);let{errorSchema:u,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),d=ne.of(u),_=o.message??o.Message??"UnknownError",y=this.compositeErrorRegistry.getErrorCtor(u)??Error,E=new y(_),g={};for(let[v,A]of d.structIterator())o[v]!=null&&(g[v]=this.deserializer.readValue(A,o[v]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(o,g),this.mixin.decorateServiceException(Object.assign(E,l,{$fault:d.getMergedTraits().error,message:_},g),o)}}});var sz,az,cz,uz=D(()=>{sz=i(e=>{if(e==null)return e;if(typeof e=="number"||typeof e=="bigint"){let t=new Error(`Received number ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}if(typeof e=="boolean"){let t=new Error(`Received boolean ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}return e},"_toStr"),az=i(e=>{if(e==null)return e;if(typeof e=="string"){let t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){let r=new Error(`Received string "${e}" where a boolean was expected.`);r.name="Warning",console.warn(r)}return e!==""&&t!=="false"}return e},"_toBool"),cz=i(e=>{if(e==null)return e;if(typeof e=="string"){let t=Number(e);if(t.toString()!==e){let r=new Error(`Received string "${e}" where a number was expected.`);return r.name="Warning",console.warn(r),e}return t}return e},"_toNum")});var nr,es=D(()=>{nr=class{static{i(this,"SerdeContextConfig")}serdeContext;setSerdeContext(t){this.serdeContext=t}}});var yc,fC=D(()=>{yc=class{static{i(this,"UnionSerde")}from;to;keys;constructor(t,r){this.from=t,this.to=r;let n=Object.keys(this.from),o=new Set(n);o.delete("__type"),this.keys=o}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}});function lz(e,t,r){if(r?.source){let n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new Ze(n,"bigDecimal"):BigInt(n)}return t}var dz=D(()=>{Qt();i(lz,"jsonReviver")});var pz,mz,Lf,gC=D(()=>{pz=I(ue()),mz=I(ft()),Lf=i((e,t)=>(0,pz.collectBody)(e,t).then(r=>(t?.utf8Encoder??mz.toUtf8)(r)),"collectBodyString")});var cl,gz,fz,hC,_c,ul=D(()=>{gC();cl=i((e,t)=>Lf(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),"parseJsonBody"),gz=i(async(e,t)=>{let r=await cl(e,t);return r.message=r.message??r.Message,r},"parseJsonErrorBody"),fz=i((e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),"findKey"),hC=i(e=>{let t=e;return typeof t=="number"&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},"sanitizeErrorCode"),_c=i((e,t)=>{let r=fz(e.headers,"x-amzn-errortype");if(r!==void 0)return hC(e.headers[r]);if(t&&typeof t=="object"){let n=fz(t,"code");if(n&&t[n]!==void 0)return hC(t[n]);if(t.__type!==void 0)return hC(t.__type)}},"loadRestJsonErrorCode")});var hz,Ec,yC=D(()=>{Rr();ke();Qt();hz=I(gt());es();fC();dz();ul();Ec=class extends nr{static{i(this,"JsonShapeDeserializer")}settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,lz):await cl(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){let n=r!==null&&typeof r=="object",o=ne.of(t);if(n){if(o.isStructSchema()){let c=r,u=o.isUnionSchema(),l={},d,{jsonName:_}=this.settings;_&&(d={});let y;u&&(y=new yc(c,l));for(let[E,g]of o.structIterator()){let v=E;_&&(v=g.getMergedTraits().jsonName??v,d[v]=E),u&&y.mark(v),c[v]!=null&&(l[E]=this._read(g,c[v]))}if(u)y.writeUnknown();else if(typeof c.__type=="string")for(let E in c){let g=c[E],v=_?d[E]??E:E;v in l||(l[v]=g)}return l}if(Array.isArray(r)&&o.isListSchema()){let c=o.getValueSchema(),u=[];for(let l of r)u.push(this._read(c,l));return u}if(o.isMapSchema()){let c=o.getValueSchema(),u={};for(let l in r)u[l]=this._read(c,r[l]);return u}}if(o.isBlobSchema()&&typeof r=="string")return(0,hz.fromBase64)(r);let a=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof r=="string"&&a)return a==="application/json"||a.endsWith("+json")?pr.from(r):r;if(o.isTimestampSchema()&&r!=null)switch(Fr(o,this.settings)){case 5:return DA(r);case 6:return MA(r);case 7:return OA(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(o.isBigDecimalSchema()&&r!=null){if(r instanceof Ze)return r;let c=r;return c.type==="bigDecimal"&&"string"in c?new Ze(c.string,c.type):new Ze(String(r),"bigDecimal")}if(o.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(o.isDocumentSchema())if(n){let c=Array.isArray(r)?[]:{};for(let u in r){let l=r[u];l instanceof Ze?c[u]=l:c[u]=this._read(o,l)}return c}else return structuredClone(r);return r}}});var yz,zf,_z=D(()=>{Qt();yz="\u039D",zf=class{static{i(this,"JsonReplacer")}values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,r)=>{if(r instanceof Ze){let n=`${yz+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){let n=r.toString(),o=`${yz+"b"+this.counter++}_`+n;return this.values.set(`"${o}"`,n),o}return r}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(let[r,n]of this.values)t=t.replace(r,n);return t}}});var _C,Sc,EC=D(()=>{Rr();ke();Qt();_C=I(gt());es();_z();Sc=class extends nr{static{i(this,"JsonShapeSerializer")}settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=ne.of(t),this.buffer=this._write(this.rootSchema,r)}flush(){let{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);let n=new zf;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=ne.of(t).getName(!0))}_write(t,r,n){let o=r!==null&&typeof r=="object",a=ne.of(t);if(o){if(a.isStructSchema()){let c=r,u={},{jsonName:l}=this.settings,d;l&&(d={});let _=0;for(let[y,E]of a.structIterator()){let g=this._write(E,c[y],a);if(g!==void 0){let v=y;l&&(v=E.getMergedTraits().jsonName??y,d[y]=v),u[v]=g,_++}}if(a.isUnionSchema()&&_===0){let{$unknown:y}=c;if(Array.isArray(y)){let[E,g]=y;u[E]=this._write(15,g)}}else if(typeof c.__type=="string")for(let y in c){let E=c[y],g=l?d[y]??y:y;g in u||(u[g]=this._write(15,E))}return u}if(Array.isArray(r)&&a.isListSchema()){let c=a.getValueSchema(),u=[],l=!!a.getMergedTraits().sparse;for(let d of r)(l||d!=null)&&u.push(this._write(c,d));return u}if(a.isMapSchema()){let c=a.getValueSchema(),u={},l=!!a.getMergedTraits().sparse;for(let d in r){let _=r[d];(l||_!=null)&&(u[d]=this._write(c,_))}return u}if(r instanceof Uint8Array&&(a.isBlobSchema()||a.isDocumentSchema()))return a===this.rootSchema?r:(this.serdeContext?.base64Encoder??_C.toBase64)(r);if(r instanceof Date&&(a.isTimestampSchema()||a.isDocumentSchema()))switch(Fr(a,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return ju(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof Ze&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(a.isStringSchema()){if(typeof r>"u"&&a.isIdempotencyToken())return(0,an.v4)();let c=a.getMergedTraits().mediaType;return r!=null&&c&&(c==="application/json"||c.endsWith("+json"))?pr.from(r):r}if(typeof r=="number"&&a.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&a.isBlobSchema())return a===this.rootSchema?r:(this.serdeContext?.base64Encoder??_C.toBase64)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),a.isDocumentSchema())if(o){let c=Array.isArray(r)?[]:{};for(let u in r){let l=r[u];l instanceof Ze?(this.useReplacer=!0,c[u]=l):c[u]=this._write(a,l)}return c}else return structuredClone(r);return r}}}});var ts,Uf=D(()=>{es();yC();EC();ts=class extends nr{static{i(this,"JsonCodec")}settings;constructor(t){super(),this.settings=t}createSerializer(){let t=new Sc(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new Ec(this.settings);return t.setSerdeContext(this.serdeContext),t}}});var rs,Bf=D(()=>{Rr();ke();hc();Uf();ul();rs=class extends Xo{static{i(this,"AwsJsonRpcProtocol")}serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:a}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=a??new ts({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!o,this.mixin=new un(this.awsQueryCompatible)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);return o.path.endsWith("/")||(o.path+="/"),o.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,o.headers["x-amz-target"]=`${this.serviceTarget}.${t.name}`,this.awsQueryCompatible&&(o.headers["x-amzn-query-mode"]="true"),($n(t.input)==="unit"||!o.body)&&(o.body="{}"),o}getPayloadCodec(){return this.codec}async handleError(t,r,n,o,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(o,n);let c=_c(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,c,this.options.defaultNamespace);let{errorSchema:u,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),d=ne.of(u),_=o.message??o.Message??"UnknownError",y=this.compositeErrorRegistry.getErrorCtor(u)??Error,E=new y(_),g={},v=this.codec.createDeserializer();for(let[A,R]of d.structIterator())o[A]!=null&&(g[A]=v.readObject(R,o[A]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(o,g),this.mixin.decorateServiceException(Object.assign(E,l,{$fault:d.getMergedTraits().error,message:_},g),o)}}});var Gf,Ez=D(()=>{Bf();Gf=class extends rs{static{i(this,"AwsJson1_0Protocol")}constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:a}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:a})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}});var Ff,Sz=D(()=>{Bf();Ff=class extends rs{static{i(this,"AwsJson1_1Protocol")}constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:a}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:a})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}});var po,vz=D(()=>{Rr();ke();hc();Uf();ul();po=class extends js{static{i(this,"AwsRestJsonProtocol")}serializer;deserializer;codec;mixin=new un;constructor({defaultNamespace:t,errorTypeRegistries:r}){super({defaultNamespace:t,errorTypeRegistries:r});let n={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new ts(n),this.serializer=new Hs(this.codec.createSerializer(),n),this.deserializer=new Vs(this.codec.createDeserializer(),n)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(t){this.codec.setSerdeContext(t),super.setSerdeContext(t)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),a=ne.of(t.input);if(!o.headers["content-type"]){let c=this.mixin.resolveRestContentType(this.getDefaultContentType(),a);c&&(o.headers["content-type"]=c)}return o.body==null&&o.headers["content-type"]===this.getDefaultContentType()&&(o.body="{}"),o}async deserializeResponse(t,r,n){let o=await super.deserializeResponse(t,r,n),a=ne.of(t.output);for(let[c,u]of a.structIterator())u.getMemberTraits().httpPayload&&!(c in o)&&(o[c]=null);return o}async handleError(t,r,n,o,a){let c=_c(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,c,this.options.defaultNamespace);let{errorSchema:u,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,a),d=ne.of(u),_=o.message??o.Message??"UnknownError",y=this.compositeErrorRegistry.getErrorCtor(u)??Error,E=new y(_);await this.deserializeHttpMessage(u,r,n,o);let g={},v=this.codec.createDeserializer();for(let[A,R]of d.structIterator()){let b=R.getMergedTraits().jsonName??A;g[A]=v.readObject(R,o[b])}throw this.mixin.decorateServiceException(Object.assign(E,l,{$fault:d.getMergedTraits().error,message:_},g),o)}getDefaultContentType(){return"application/json"}}});var Az,Rz,Pz=D(()=>{Az=I(ue()),Rz=i(e=>{if(e!=null)return typeof e=="object"&&"__type"in e&&delete e.__type,(0,Az.expectUnion)(e)},"awsExpectUnion")});var Tz=N((Kst,Cz)=>{(()=>{"use strict";var e={d:i((S,p)=>{for(var h in p)e.o(p,h)&&!e.o(S,h)&&Object.defineProperty(S,h,{enumerable:!0,get:p[h]})},"d"),o:i((S,p)=>Object.prototype.hasOwnProperty.call(S,p),"o"),r:i(S=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},"r")},t={};e.r(t),e.d(t,{XMLBuilder:i(()=>S5,"XMLBuilder"),XMLParser:i(()=>d5,"XMLParser"),XMLValidator:i(()=>v5,"XMLValidator")});let r=":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",n=new RegExp("^["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function o(S,p){let h=[],C=p.exec(S);for(;C;){let P=[];P.startIndex=p.lastIndex-C[0].length;let x=C.length;for(let L=0;L<x;L++)P.push(C[L]);h.push(P),C=p.exec(S)}return h}i(o,"s");let a=i(function(S){return n.exec(S)!=null},"r"),c=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],u=["__proto__","constructor","prototype"],l={allowBooleanAttributes:!1,unpairedTags:[]};function d(S,p){p=Object.assign({},l,p);let h=[],C=!1,P=!1;S[0]==="\uFEFF"&&(S=S.substr(1));for(let x=0;x<S.length;x++)if(S[x]==="<"&&S[x+1]==="?"){if(x+=2,x=y(S,x),x.err)return x}else{if(S[x]!=="<"){if(_(S[x]))continue;return G("InvalidChar","char '"+S[x]+"' is not expected.",me(S,x))}{let L=x;if(x++,S[x]==="!"){x=E(S,x);continue}{let M=!1;S[x]==="/"&&(M=!0,x++);let U="";for(;x<S.length&&S[x]!==">"&&S[x]!==" "&&S[x]!==" "&&S[x]!==`
|
|
42
|
+
`&&S[x]!=="\r";x++)U+=S[x];if(U=U.trim(),U[U.length-1]==="/"&&(U=U.substring(0,U.length-1),x--),!pe(U)){let Z;return Z=U.trim().length===0?"Invalid space after '<'.":"Tag '"+U+"' is an invalid name.",G("InvalidTag",Z,me(S,x))}let z=A(S,x);if(z===!1)return G("InvalidAttr","Attributes for '"+U+"' have open quote.",me(S,x));let B=z.value;if(x=z.index,B[B.length-1]==="/"){let Z=x-B.length;B=B.substring(0,B.length-1);let te=b(B,p);if(te!==!0)return G(te.err.code,te.err.msg,me(S,Z+te.err.line));C=!0}else if(M){if(!z.tagClosed)return G("InvalidTag","Closing tag '"+U+"' doesn't have proper closing.",me(S,x));if(B.trim().length>0)return G("InvalidTag","Closing tag '"+U+"' can't have attributes or invalid starting.",me(S,L));if(h.length===0)return G("InvalidTag","Closing tag '"+U+"' has not been opened.",me(S,L));{let Z=h.pop();if(U!==Z.tagName){let te=me(S,Z.tagStartPos);return G("InvalidTag","Expected closing tag '"+Z.tagName+"' (opened in line "+te.line+", col "+te.col+") instead of closing tag '"+U+"'.",me(S,L))}h.length==0&&(P=!0)}}else{let Z=b(B,p);if(Z!==!0)return G(Z.err.code,Z.err.msg,me(S,x-B.length+Z.err.line));if(P===!0)return G("InvalidXml","Multiple possible root nodes found.",me(S,x));p.unpairedTags.indexOf(U)!==-1||h.push({tagName:U,tagStartPos:L}),C=!0}for(x++;x<S.length;x++)if(S[x]==="<"){if(S[x+1]==="!"){x++,x=E(S,x);continue}if(S[x+1]!=="?")break;if(x=y(S,++x),x.err)return x}else if(S[x]==="&"){let Z=$(S,x);if(Z==-1)return G("InvalidChar","char '&' is not expected.",me(S,x));x=Z}else if(P===!0&&!_(S[x]))return G("InvalidXml","Extra text at the end",me(S,x));S[x]==="<"&&x--}}}return C?h.length==1?G("InvalidTag","Unclosed tag '"+h[0].tagName+"'.",me(S,h[0].tagStartPos)):!(h.length>0)||G("InvalidXml","Invalid '"+JSON.stringify(h.map(x=>x.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):G("InvalidXml","Start tag expected.",1)}i(d,"l");function _(S){return S===" "||S===" "||S===`
|
|
43
|
+
`||S==="\r"}i(_,"u");function y(S,p){let h=p;for(;p<S.length;p++)if(S[p]=="?"||S[p]==" "){let C=S.substr(h,p-h);if(p>5&&C==="xml")return G("InvalidXml","XML declaration allowed only at the start of the document.",me(S,p));if(S[p]=="?"&&S[p+1]==">"){p++;break}continue}return p}i(y,"p");function E(S,p){if(S.length>p+5&&S[p+1]==="-"&&S[p+2]==="-"){for(p+=3;p<S.length;p++)if(S[p]==="-"&&S[p+1]==="-"&&S[p+2]===">"){p+=2;break}}else if(S.length>p+8&&S[p+1]==="D"&&S[p+2]==="O"&&S[p+3]==="C"&&S[p+4]==="T"&&S[p+5]==="Y"&&S[p+6]==="P"&&S[p+7]==="E"){let h=1;for(p+=8;p<S.length;p++)if(S[p]==="<")h++;else if(S[p]===">"&&(h--,h===0))break}else if(S.length>p+9&&S[p+1]==="["&&S[p+2]==="C"&&S[p+3]==="D"&&S[p+4]==="A"&&S[p+5]==="T"&&S[p+6]==="A"&&S[p+7]==="["){for(p+=8;p<S.length;p++)if(S[p]==="]"&&S[p+1]==="]"&&S[p+2]===">"){p+=2;break}}return p}i(E,"c");let g='"',v="'";function A(S,p){let h="",C="",P=!1;for(;p<S.length;p++){if(S[p]===g||S[p]===v)C===""?C=S[p]:C!==S[p]||(C="");else if(S[p]===">"&&C===""){P=!0;break}h+=S[p]}return C===""&&{value:h,index:p,tagClosed:P}}i(A,"g");let R=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function b(S,p){let h=o(S,R),C={};for(let P=0;P<h.length;P++){if(h[P][1].length===0)return G("InvalidAttr","Attribute '"+h[P][2]+"' has no space in starting.",xt(h[P]));if(h[P][3]!==void 0&&h[P][4]===void 0)return G("InvalidAttr","Attribute '"+h[P][2]+"' is without value.",xt(h[P]));if(h[P][3]===void 0&&!p.allowBooleanAttributes)return G("InvalidAttr","boolean attribute '"+h[P][2]+"' is not allowed.",xt(h[P]));let x=h[P][2];if(!Y(x))return G("InvalidAttr","Attribute '"+x+"' is an invalid name.",xt(h[P]));if(Object.prototype.hasOwnProperty.call(C,x))return G("InvalidAttr","Attribute '"+x+"' is repeated.",xt(h[P]));C[x]=1}return!0}i(b,"x");function $(S,p){if(S[++p]===";")return-1;if(S[p]==="#")return(function(C,P){let x=/\d/;for(C[P]==="x"&&(P++,x=/[\da-fA-F]/);P<C.length;P++){if(C[P]===";")return P;if(!C[P].match(x))break}return-1})(S,++p);let h=0;for(;p<S.length;p++,h++)if(!(S[p].match(/\w/)&&h<20)){if(S[p]===";")break;return-1}return p}i($,"N");function G(S,p,h){return{err:{code:S,msg:p,line:h.line||h,col:h.col}}}i(G,"b");function Y(S){return a(S)}i(Y,"y");function pe(S){return a(S)}i(pe,"E");function me(S,p){let h=S.substring(0,p).split(/\r?\n/);return{line:h.length,col:h[h.length-1].length+1}}i(me,"w");function xt(S){return S.startIndex+S[1].length}i(xt,"v");let we=i(S=>c.includes(S)?"__"+S:S,"S"),Kt={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:i(function(S,p){return p},"tagValueProcessor"),attributeValueProcessor:i(function(S,p){return p},"attributeValueProcessor"),stopNodes:[],alwaysCreateTextNode:!1,isArray:i(()=>!1,"isArray"),commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:i(function(S,p,h){return S},"updateTag"),captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:we};function In(S,p){if(typeof S!="string")return;let h=S.toLowerCase();if(c.some(C=>h===C.toLowerCase()))throw new Error(`[SECURITY] Invalid ${p}: "${S}" is a reserved JavaScript keyword that could cause prototype pollution`);if(u.some(C=>h===C.toLowerCase()))throw new Error(`[SECURITY] Invalid ${p}: "${S}" is a reserved JavaScript keyword that could cause prototype pollution`)}i(In,"A");function ko(S,p){return typeof S=="boolean"?{enabled:S,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof S=="object"&&S!==null?{enabled:S.enabled!==!1,maxEntitySize:Math.max(1,S.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,S.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,S.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,S.maxExpandedLength??1e5),maxEntityCount:Math.max(1,S.maxEntityCount??1e3),allowedTags:S.allowedTags??null,tagFilter:S.tagFilter??null,appliesTo:S.appliesTo??"all"}:ko(!0)}i(ko,"T");let Lr=i(function(S){let p=Object.assign({},Kt,S),h=[{value:p.attributeNamePrefix,name:"attributeNamePrefix"},{value:p.attributesGroupName,name:"attributesGroupName"},{value:p.textNodeName,name:"textNodeName"},{value:p.cdataPropName,name:"cdataPropName"},{value:p.commentPropName,name:"commentPropName"}];for(let{value:C,name:P}of h)C&&In(C,P);return p.onDangerousProperty===null&&(p.onDangerousProperty=we),p.processEntities=ko(p.processEntities,p.htmlEntities),p.unpairedTagsSet=new Set(p.unpairedTags),p.stopNodes&&Array.isArray(p.stopNodes)&&(p.stopNodes=p.stopNodes.map(C=>typeof C=="string"&&C.startsWith("*.")?".."+C.substring(2):C)),p},"C"),Zt;Zt=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class Ve{static{i(this,"O")}constructor(p){this.tagname=p,this.child=[],this[":@"]=Object.create(null)}add(p,h){p==="__proto__"&&(p="#__proto__"),this.child.push({[p]:h})}addChild(p,h){p.tagname==="__proto__"&&(p.tagname="#__proto__"),p[":@"]&&Object.keys(p[":@"]).length>0?this.child.push({[p.tagname]:p.child,":@":p[":@"]}):this.child.push({[p.tagname]:p.child}),h!==void 0&&(this.child[this.child.length-1][Zt]={startIndex:h})}static getMetaDataSymbol(){return Zt}}class tn{static{i(this,"$")}constructor(p){this.suppressValidationErr=!p,this.options=p}readDocType(p,h){let C=Object.create(null),P=0;if(p[h+3]!=="O"||p[h+4]!=="C"||p[h+5]!=="T"||p[h+6]!=="Y"||p[h+7]!=="P"||p[h+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{h+=9;let x=1,L=!1,M=!1,U="";for(;h<p.length;h++)if(p[h]!=="<"||M)if(p[h]===">"){if(M?p[h-1]==="-"&&p[h-2]==="-"&&(M=!1,x--):x--,x===0)break}else p[h]==="["?L=!0:U+=p[h];else{if(L&&Ms(p,"!ENTITY",h)){let z,B;if(h+=7,[z,B,h]=this.readEntityExp(p,h+1,this.suppressValidationErr),B.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&P>=this.options.maxEntityCount)throw new Error(`Entity count (${P+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);C[z]=B,P++}}else if(L&&Ms(p,"!ELEMENT",h)){h+=8;let{index:z}=this.readElementExp(p,h+1);h=z}else if(L&&Ms(p,"!ATTLIST",h))h+=8;else if(L&&Ms(p,"!NOTATION",h)){h+=9;let{index:z}=this.readNotationExp(p,h+1,this.suppressValidationErr);h=z}else{if(!Ms(p,"!--",h))throw new Error("Invalid DOCTYPE");M=!0}x++,U=""}if(x!==0)throw new Error("Unclosed DOCTYPE")}return{entities:C,i:h}}readEntityExp(p,h){let C=h=Xt(p,h);for(;h<p.length&&!/\s/.test(p[h])&&p[h]!=='"'&&p[h]!=="'";)h++;let P=p.substring(C,h);if(iu(P),h=Xt(p,h),!this.suppressValidationErr){if(p.substring(h,h+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(p[h]==="%")throw new Error("Parameter entities are not supported")}let x="";if([h,x]=this.readIdentifierVal(p,h,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&x.length>this.options.maxEntitySize)throw new Error(`Entity "${P}" size (${x.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[P,x,--h]}readNotationExp(p,h){let C=h=Xt(p,h);for(;h<p.length&&!/\s/.test(p[h]);)h++;let P=p.substring(C,h);!this.suppressValidationErr&&iu(P),h=Xt(p,h);let x=p.substring(h,h+6).toUpperCase();if(!this.suppressValidationErr&&x!=="SYSTEM"&&x!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${x}"`);h+=x.length,h=Xt(p,h);let L=null,M=null;if(x==="PUBLIC")[h,L]=this.readIdentifierVal(p,h,"publicIdentifier"),p[h=Xt(p,h)]!=='"'&&p[h]!=="'"||([h,M]=this.readIdentifierVal(p,h,"systemIdentifier"));else if(x==="SYSTEM"&&([h,M]=this.readIdentifierVal(p,h,"systemIdentifier"),!this.suppressValidationErr&&!M))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:P,publicIdentifier:L,systemIdentifier:M,index:--h}}readIdentifierVal(p,h,C){let P="",x=p[h];if(x!=='"'&&x!=="'")throw new Error(`Expected quoted string, found "${x}"`);let L=++h;for(;h<p.length&&p[h]!==x;)h++;if(P=p.substring(L,h),p[h]!==x)throw new Error(`Unterminated ${C} value`);return[++h,P]}readElementExp(p,h){let C=h=Xt(p,h);for(;h<p.length&&!/\s/.test(p[h]);)h++;let P=p.substring(C,h);if(!this.suppressValidationErr&&!a(P))throw new Error(`Invalid element name: "${P}"`);let x="";if(p[h=Xt(p,h)]==="E"&&Ms(p,"MPTY",h))h+=4;else if(p[h]==="A"&&Ms(p,"NY",h))h+=2;else if(p[h]==="("){let L=++h;for(;h<p.length&&p[h]!==")";)h++;if(x=p.substring(L,h),p[h]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${p[h]}"`);return{elementName:P,contentModel:x.trim(),index:h}}readAttlistExp(p,h){let C=h=Xt(p,h);for(;h<p.length&&!/\s/.test(p[h]);)h++;let P=p.substring(C,h);for(iu(P),C=h=Xt(p,h);h<p.length&&!/\s/.test(p[h]);)h++;let x=p.substring(C,h);if(!iu(x))throw new Error(`Invalid attribute name: "${x}"`);h=Xt(p,h);let L="";if(p.substring(h,h+8).toUpperCase()==="NOTATION"){if(L="NOTATION",p[h=Xt(p,h+=8)]!=="(")throw new Error(`Expected '(', found "${p[h]}"`);h++;let U=[];for(;h<p.length&&p[h]!==")";){let z=h;for(;h<p.length&&p[h]!=="|"&&p[h]!==")";)h++;let B=p.substring(z,h);if(B=B.trim(),!iu(B))throw new Error(`Invalid notation name: "${B}"`);U.push(B),p[h]==="|"&&(h++,h=Xt(p,h))}if(p[h]!==")")throw new Error("Unterminated list of notations");h++,L+=" ("+U.join("|")+")"}else{let U=h;for(;h<p.length&&!/\s/.test(p[h]);)h++;L+=p.substring(U,h);let z=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!z.includes(L.toUpperCase()))throw new Error(`Invalid attribute type: "${L}"`)}h=Xt(p,h);let M="";return p.substring(h,h+8).toUpperCase()==="#REQUIRED"?(M="#REQUIRED",h+=8):p.substring(h,h+7).toUpperCase()==="#IMPLIED"?(M="#IMPLIED",h+=7):[h,M]=this.readIdentifierVal(p,h,"ATTLIST"),{elementName:P,attributeName:x,attributeType:L,defaultValue:M,index:h}}}let Xt=i((S,p)=>{for(;p<S.length&&/\s/.test(S[p]);)p++;return p},"I");function Ms(S,p,h){for(let C=0;C<p.length;C++)if(p[C]!==S[h+C+1])return!1;return!0}i(Ms,"D");function iu(S){if(a(S))return S;throw new Error(`Invalid entity name ${S}`)}i(iu,"M");let OJ=/^[-+]?0x[a-fA-F0-9]+$/,NJ=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,LJ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},zJ=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class UJ{static{i(this,"F")}constructor(p){this._matcher=p}get separator(){return this._matcher.separator}getCurrentTag(){let p=this._matcher.path;return p.length>0?p[p.length-1].tag:void 0}getCurrentNamespace(){let p=this._matcher.path;return p.length>0?p[p.length-1].namespace:void 0}getAttrValue(p){let h=this._matcher.path;if(h.length!==0)return h[h.length-1].values?.[p]}hasAttr(p){let h=this._matcher.path;if(h.length===0)return!1;let C=h[h.length-1];return C.values!==void 0&&p in C.values}getPosition(){let p=this._matcher.path;return p.length===0?-1:p[p.length-1].position??0}getCounter(){let p=this._matcher.path;return p.length===0?-1:p[p.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(p,h=!0){return this._matcher.toString(p,h)}toArray(){return this._matcher.path.map(p=>p.tag)}matches(p){return this._matcher.matches(p)}matchesAny(p){return p.matchesAny(this._matcher)}}class zS{static{i(this,"R")}constructor(p={}){this.separator=p.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new UJ(this)}push(p,h=null,C=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let P=this.path.length;this.siblingStacks[P]||(this.siblingStacks[P]=new Map);let x=this.siblingStacks[P],L=C?`${C}:${p}`:p,M=x.get(L)||0,U=0;for(let B of x.values())U+=B;x.set(L,M+1);let z={tag:p,position:U,counter:M};C!=null&&(z.namespace=C),h!=null&&(z.values=h),this.path.push(z)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let p=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),p}updateCurrent(p){if(this.path.length>0){let h=this.path[this.path.length-1];p!=null&&(h.values=p)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(p){if(this.path.length!==0)return this.path[this.path.length-1].values?.[p]}hasAttr(p){if(this.path.length===0)return!1;let h=this.path[this.path.length-1];return h.values!==void 0&&p in h.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(p,h=!0){let C=p||this.separator;if(C===this.separator&&h===!0){if(this._pathStringCache!==null)return this._pathStringCache;let P=this.path.map(x=>x.namespace?`${x.namespace}:${x.tag}`:x.tag).join(C);return this._pathStringCache=P,P}return this.path.map(P=>h&&P.namespace?`${P.namespace}:${P.tag}`:P.tag).join(C)}toArray(){return this.path.map(p=>p.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(p){let h=p.segments;return h.length!==0&&(p.hasDeepWildcard()?this._matchWithDeepWildcard(h):this._matchSimple(h))}_matchSimple(p){if(this.path.length!==p.length)return!1;for(let h=0;h<p.length;h++)if(!this._matchSegment(p[h],this.path[h],h===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(p){let h=this.path.length-1,C=p.length-1;for(;C>=0&&h>=0;){let P=p[C];if(P.type==="deep-wildcard"){if(C--,C<0)return!0;let x=p[C],L=!1;for(let M=h;M>=0;M--)if(this._matchSegment(x,this.path[M],M===this.path.length-1)){h=M-1,C--,L=!0;break}if(!L)return!1}else{if(!this._matchSegment(P,this.path[h],h===this.path.length-1))return!1;h--,C--}}return C<0}_matchSegment(p,h,C){if(p.tag!=="*"&&p.tag!==h.tag||p.namespace!==void 0&&p.namespace!=="*"&&p.namespace!==h.namespace||p.attrName!==void 0&&(!C||!h.values||!(p.attrName in h.values)||p.attrValue!==void 0&&String(h.values[p.attrName])!==String(p.attrValue)))return!1;if(p.position!==void 0){if(!C)return!1;let P=h.counter??0;if(p.position==="first"&&P!==0||p.position==="odd"&&P%2!=1||p.position==="even"&&P%2!=0||p.position==="nth"&&P!==p.positionValue)return!1}return!0}matchesAny(p){return p.matchesAny(this)}snapshot(){return{path:this.path.map(p=>({...p})),siblingStacks:this.siblingStacks.map(p=>new Map(p))}}restore(p){this._pathStringCache=null,this.path=p.path.map(h=>({...h})),this.siblingStacks=p.siblingStacks.map(h=>new Map(h))}readOnly(){return this._view}}class Ma{static{i(this,"G")}constructor(p,h={},C){this.pattern=p,this.separator=h.separator||".",this.segments=this._parse(p),this.data=C,this._hasDeepWildcard=this.segments.some(P=>P.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(P=>P.attrName!==void 0),this._hasPositionSelector=this.segments.some(P=>P.position!==void 0)}_parse(p){let h=[],C=0,P="";for(;C<p.length;)p[C]===this.separator?C+1<p.length&&p[C+1]===this.separator?(P.trim()&&(h.push(this._parseSegment(P.trim())),P=""),h.push({type:"deep-wildcard"}),C+=2):(P.trim()&&h.push(this._parseSegment(P.trim())),P="",C++):(P+=p[C],C++);return P.trim()&&h.push(this._parseSegment(P.trim())),h}_parseSegment(p){let h={type:"tag"},C=null,P=p,x=p.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(x&&(P=x[1]+x[3],x[2])){let B=x[2].slice(1,-1);B&&(C=B)}let L,M,U=P;if(P.includes("::")){let B=P.indexOf("::");if(L=P.substring(0,B).trim(),U=P.substring(B+2).trim(),!L)throw new Error(`Invalid namespace in pattern: ${p}`)}let z=null;if(U.includes(":")){let B=U.lastIndexOf(":"),Z=U.substring(0,B).trim(),te=U.substring(B+1).trim();["first","last","odd","even"].includes(te)||/^nth\(\d+\)$/.test(te)?(M=Z,z=te):M=U}else M=U;if(!M)throw new Error(`Invalid segment pattern: ${p}`);if(h.tag=M,L&&(h.namespace=L),C)if(C.includes("=")){let B=C.indexOf("=");h.attrName=C.substring(0,B).trim(),h.attrValue=C.substring(B+1).trim()}else h.attrName=C.trim();if(z){let B=z.match(/^nth\((\d+)\)$/);B?(h.position="nth",h.positionValue=parseInt(B[1],10)):h.position=z}return h}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class BJ{static{i(this,"B")}constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(p){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(p.pattern))return this;if(this._patterns.add(p.pattern),p.hasDeepWildcard())return this._deepWildcards.push(p),this;let h=p.length,C=p.segments[p.segments.length-1],P=C?.tag;if(P&&P!=="*"){let x=`${h}:${P}`;this._byDepthAndTag.has(x)||this._byDepthAndTag.set(x,[]),this._byDepthAndTag.get(x).push(p)}else this._wildcardByDepth.has(h)||this._wildcardByDepth.set(h,[]),this._wildcardByDepth.get(h).push(p);return this}addAll(p){for(let h of p)this.add(h);return this}has(p){return this._patterns.has(p.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(p){return this.findMatch(p)!==null}findMatch(p){let h=p.getDepth(),C=`${h}:${p.getCurrentTag()}`,P=this._byDepthAndTag.get(C);if(P){for(let L=0;L<P.length;L++)if(p.matches(P[L]))return P[L]}let x=this._wildcardByDepth.get(h);if(x){for(let L=0;L<x.length;L++)if(p.matches(x[L]))return x[L]}for(let L=0;L<this._deepWildcards.length;L++)if(p.matches(this._deepWildcards[L]))return this._deepWildcards[L];return null}}let GJ={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},nI={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},FJ={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},jJ=new Set("!?\\\\/[]$%{}^&*()<>|+");function oI(S){if(S[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${S}"`);for(let p of S)if(jJ.has(p))throw new Error(`[EntityReplacer] Invalid character '${p}' in entity name: "${S}"`);return S}i(oI,"z");function US(...S){let p=Object.create(null);for(let h of S)if(h)for(let C of Object.keys(h)){let P=h[C];if(typeof P=="string")p[C]=P;else if(P&&typeof P=="object"&&P.val!==void 0){let x=P.val;typeof x=="string"&&(p[C]=x)}}return p}i(US,"q");let Os="external",ep="base",BS="all",zr=Object.freeze({allow:0,leave:1,remove:2,throw:3}),qJ=new Set([9,10,13]);class VJ{static{i(this,"tt")}constructor(p={}){var h;this._limit=p.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof p.postCheck=="function"?p.postCheck:P=>P,this._limitTiers=(h=this._limit.applyLimitsTo??Os)&&h!==Os?h===BS?new Set([BS]):h===ep?new Set([ep]):Array.isArray(h)?new Set(h):new Set([Os]):new Set([Os]),this._numericAllowed=p.numericAllowed??!0,this._baseMap=US(nI,p.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(p.remove&&Array.isArray(p.remove)?p.remove:[]),this._leaveSet=new Set(p.leave&&Array.isArray(p.leave)?p.leave:[]);let C=(function(P){if(!P)return{xmlVersion:1,onLevel:zr.allow,nullLevel:zr.remove};let x=P.xmlVersion===1.1?1.1:1,L=zr[P.onNCR]??zr.allow,M=zr[P.nullNCR]??zr.remove;return{xmlVersion:x,onLevel:L,nullLevel:Math.max(M,zr.remove)}})(p.ncr);this._ncrXmlVersion=C.xmlVersion,this._ncrOnLevel=C.onLevel,this._ncrNullLevel=C.nullLevel}setExternalEntities(p){if(p)for(let h of Object.keys(p))oI(h);this._externalMap=US(p)}addExternalEntity(p,h){oI(p),typeof h=="string"&&h.indexOf("&")===-1&&(this._externalMap[p]=h)}addInputEntities(p){this._totalExpansions=0,this._expandedLength=0,this._inputMap=US(p)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(p){this._ncrXmlVersion=p===1.1?1.1:1}decode(p){if(typeof p!="string"||p.length===0)return p;let h=p,C=[],P=p.length,x=0,L=0,M=this._maxTotalExpansions>0,U=this._maxExpandedLength>0,z=M||U;for(;L<P;){if(p.charCodeAt(L)!==38){L++;continue}let Z=L+1;for(;Z<P&&p.charCodeAt(Z)!==59&&Z-L<=32;)Z++;if(Z>=P||p.charCodeAt(Z)!==59){L++;continue}let te=p.slice(L+1,Z);if(te.length===0){L++;continue}let oe,de;if(this._removeSet.has(te))oe="",de===void 0&&(de=Os);else{if(this._leaveSet.has(te)){L++;continue}if(te.charCodeAt(0)===35){let fe=this._resolveNCR(te);if(fe===void 0){L++;continue}oe=fe,de=ep}else{let fe=this._resolveName(te);oe=fe?.value,de=fe?.tier}}if(oe!==void 0){if(L>x&&C.push(p.slice(x,L)),C.push(oe),x=Z+1,L=x,z&&this._tierCounts(de)){if(M&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(U){let fe=oe.length-(te.length+2);if(fe>0&&(this._expandedLength+=fe,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else L++}x<P&&C.push(p.slice(x));let B=C.length===0?p:C.join("");return this._postCheck(B,h)}_tierCounts(p){return!!this._limitTiers.has(BS)||this._limitTiers.has(p)}_resolveName(p){return p in this._inputMap?{value:this._inputMap[p],tier:Os}:p in this._externalMap?{value:this._externalMap[p],tier:Os}:p in this._baseMap?{value:this._baseMap[p],tier:ep}:void 0}_classifyNCR(p){return p===0?this._ncrNullLevel:p>=55296&&p<=57343||this._ncrXmlVersion===1&&p>=1&&p<=31&&!qJ.has(p)?zr.remove:-1}_applyNCRAction(p,h,C){switch(p){case zr.allow:return String.fromCodePoint(C);case zr.remove:return"";case zr.leave:return;case zr.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${h}; (U+${C.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(C)}}_resolveNCR(p){let h=p.charCodeAt(1),C;if(C=h===120||h===88?parseInt(p.slice(2),16):parseInt(p.slice(1),10),Number.isNaN(C)||C<0||C>1114111)return;let P=this._classifyNCR(C);if(!this._numericAllowed&&P<zr.remove)return;let x=P===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,P);return this._applyNCRAction(x,p,C)}}function HJ(S,p){if(!S)return{};let h=p.attributesGroupName?S[p.attributesGroupName]:S;if(!h)return{};let C={};for(let P in h)P.startsWith(p.attributeNamePrefix)?C[P.substring(p.attributeNamePrefix.length)]=h[P]:C[P]=h[P];return C}i(HJ,"et");function WJ(S){if(!S||typeof S!="string")return;let p=S.indexOf(":");if(p!==-1&&p>0){let h=S.substring(0,p);if(h!=="xmlns")return h}}i(WJ,"nt");class JJ{static{i(this,"it")}constructor(p){var h;this.options=p,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=QJ,this.parseTextData=KJ,this.resolveNameSpace=ZJ,this.buildAttributesMap=YJ,this.isItStopNode=n5,this.replaceEntitiesValue=t5,this.readStopNodeData=i5,this.saveTextToParentTag=r5,this.addChild=e5,this.ignoreAttributesFn=typeof(h=this.options.ignoreAttributes)=="function"?h:Array.isArray(h)?x=>{for(let L of h)if(typeof L=="string"&&x===L||L instanceof RegExp&&L.test(x))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let C={...nI};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?C=this.options.htmlEntities:this.options.htmlEntities===!0&&(C={...FJ,...GJ}),this.entityDecoder=new VJ({namedEntities:C,numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new zS,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new BJ;let P=this.options.stopNodes;if(P&&P.length>0){for(let x=0;x<P.length;x++){let L=P[x];typeof L=="string"?this.stopNodeExpressionsSet.add(new Ma(L)):L instanceof Ma&&this.stopNodeExpressionsSet.add(L)}this.stopNodeExpressionsSet.seal()}}}function KJ(S,p,h,C,P,x,L){let M=this.options;if(S!==void 0&&(M.trimValues&&!C&&(S=S.trim()),S.length>0)){L||(S=this.replaceEntitiesValue(S,p,h));let U=M.jPath?h.toString():h,z=M.tagValueProcessor(p,S,U,P,x);return z==null?S:typeof z!=typeof S||z!==S?z:M.trimValues||S.trim()===S?iI(S,M.parseTagValue,M.numberParseOptions):S}}i(KJ,"st");function ZJ(S){if(this.options.removeNSPrefix){let p=S.split(":"),h=S.charAt(0)==="/"?"/":"";if(p[0]==="xmlns")return"";p.length===2&&(S=h+p[1])}return S}i(ZJ,"rt");let XJ=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function YJ(S,p,h,C=!1){let P=this.options;if(C===!0||P.ignoreAttributes!==!0&&typeof S=="string"){let x=o(S,XJ),L=x.length,M={},U=new Array(L),z=!1,B={};for(let oe=0;oe<L;oe++){let de=this.resolveNameSpace(x[oe][1]),fe=x[oe][4];if(de.length&&fe!==void 0){let Et=fe;P.trimValues&&(Et=Et.trim()),Et=this.replaceEntitiesValue(Et,h,this.readonlyMatcher),U[oe]=Et,B[de]=Et,z=!0}}z&&typeof p=="object"&&p.updateCurrent&&p.updateCurrent(B);let Z=P.jPath?p.toString():this.readonlyMatcher,te=!1;for(let oe=0;oe<L;oe++){let de=this.resolveNameSpace(x[oe][1]);if(this.ignoreAttributesFn(de,Z))continue;let fe=P.attributeNamePrefix+de;if(de.length)if(P.transformAttributeName&&(fe=P.transformAttributeName(fe)),fe=sI(fe,P),x[oe][4]!==void 0){let Et=U[oe],Sr=P.attributeValueProcessor(de,Et,Z);M[fe]=Sr==null?Et:typeof Sr!=typeof Et||Sr!==Et?Sr:iI(Et,P.parseAttributeValue,P.numberParseOptions),te=!0}else P.allowBooleanAttributes&&(M[fe]=!0,te=!0)}if(!te)return;if(P.attributesGroupName){let oe={};return oe[P.attributesGroupName]=M,oe}return M}}i(YJ,"at");let QJ=i(function(S){S=S.replace(/\r\n?/g,`
|
|
44
|
+
`);let p=new Ve("!xml"),h=p,C="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let P=this.options,x=new tn(P.processEntities),L=S.length;for(let M=0;M<L;M++)if(S[M]==="<"){let U=S.charCodeAt(M+1);if(U===47){let z=Oa(S,">",M,"Closing Tag is not closed."),B=S.substring(M+2,z).trim();if(P.removeNSPrefix){let te=B.indexOf(":");te!==-1&&(B=B.substr(te+1))}B=FS(P.transformTagName,B,"",P).tagName,h&&(C=this.saveTextToParentTag(C,h,this.readonlyMatcher));let Z=this.matcher.getCurrentTag();if(B&&P.unpairedTagsSet.has(B))throw new Error(`Unpaired tag can not be used as closing tag: </${B}>`);Z&&P.unpairedTagsSet.has(Z)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,h=this.tagsNodeStack.pop(),C="",M=z}else if(U===63){let z=GS(S,M,!1,"?>");if(!z)throw new Error("Pi Tag is not closed.");C=this.saveTextToParentTag(C,h,this.readonlyMatcher);let B=this.buildAttributesMap(z.tagExp,this.matcher,z.tagName,!0);if(B){let Z=B[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(Z)||1)}if(!(P.ignoreDeclaration&&z.tagName==="?xml"||P.ignorePiTags)){let Z=new Ve(z.tagName);Z.add(P.textNodeName,""),z.tagName!==z.tagExp&&z.attrExpPresent&&P.ignoreAttributes!==!0&&(Z[":@"]=B),this.addChild(h,Z,this.readonlyMatcher,M)}M=z.closeIndex+1}else if(U===33&&S.charCodeAt(M+2)===45&&S.charCodeAt(M+3)===45){let z=Oa(S,"-->",M+4,"Comment is not closed.");if(P.commentPropName){let B=S.substring(M+4,z-2);C=this.saveTextToParentTag(C,h,this.readonlyMatcher),h.add(P.commentPropName,[{[P.textNodeName]:B}])}M=z}else if(U===33&&S.charCodeAt(M+2)===68){let z=x.readDocType(S,M);this.entityDecoder.addInputEntities(z.entities),M=z.i}else if(U===33&&S.charCodeAt(M+2)===91){let z=Oa(S,"]]>",M,"CDATA is not closed.")-2,B=S.substring(M+9,z);C=this.saveTextToParentTag(C,h,this.readonlyMatcher);let Z=this.parseTextData(B,h.tagname,this.readonlyMatcher,!0,!1,!0,!0);Z==null&&(Z=""),P.cdataPropName?h.add(P.cdataPropName,[{[P.textNodeName]:B}]):h.add(P.textNodeName,Z),M=z+2}else{let z=GS(S,M,P.removeNSPrefix);if(!z){let Ar=S.substring(Math.max(0,M-50),Math.min(L,M+50));throw new Error(`readTagExp returned undefined at position ${M}. Context: "${Ar}"`)}let B=z.tagName,Z=z.rawTagName,te=z.tagExp,oe=z.attrExpPresent,de=z.closeIndex;if({tagName:B,tagExp:te}=FS(P.transformTagName,B,te,P),P.strictReservedNames&&(B===P.commentPropName||B===P.cdataPropName||B===P.textNodeName||B===P.attributesGroupName))throw new Error(`Invalid tag name: ${B}`);h&&C&&h.tagname!=="!xml"&&(C=this.saveTextToParentTag(C,h,this.readonlyMatcher,!1));let fe=h;fe&&P.unpairedTagsSet.has(fe.tagname)&&(h=this.tagsNodeStack.pop(),this.matcher.pop());let Et=!1;te.length>0&&te.lastIndexOf("/")===te.length-1&&(Et=!0,B[B.length-1]==="/"?(B=B.substr(0,B.length-1),te=B):te=te.substr(0,te.length-1),oe=B!==te);let Sr,vr=null,yi={};Sr=WJ(Z),B!==p.tagname&&this.matcher.push(B,{},Sr),B!==te&&oe&&(vr=this.buildAttributesMap(te,this.matcher,B),vr&&(yi=HJ(vr,P))),B!==p.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let nn=M;if(this.isCurrentNodeStopNode){let Ar="";if(Et)M=z.closeIndex;else if(P.unpairedTagsSet.has(B))M=z.closeIndex;else{let HS=this.readStopNodeData(S,Z,de+1);if(!HS)throw new Error(`Unexpected end of ${Z}`);M=HS.i,Ar=HS.tagContent}let VS=new Ve(B);vr&&(VS[":@"]=vr),VS.add(P.textNodeName,Ar),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(h,VS,this.readonlyMatcher,nn)}else{if(Et){({tagName:B,tagExp:te}=FS(P.transformTagName,B,te,P));let Ar=new Ve(B);vr&&(Ar[":@"]=vr),this.addChild(h,Ar,this.readonlyMatcher,nn),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(P.unpairedTagsSet.has(B)){let Ar=new Ve(B);vr&&(Ar[":@"]=vr),this.addChild(h,Ar,this.readonlyMatcher,nn),this.matcher.pop(),this.isCurrentNodeStopNode=!1,M=z.closeIndex;continue}{let Ar=new Ve(B);if(this.tagsNodeStack.length>P.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(h),vr&&(Ar[":@"]=vr),this.addChild(h,Ar,this.readonlyMatcher,nn),h=Ar}}C="",M=de}}}else C+=S[M];return p.child},"ht");function e5(S,p,h,C){this.options.captureMetaData||(C=void 0);let P=this.options.jPath?h.toString():h,x=this.options.updateTag(p.tagname,P,p[":@"]);x===!1||(typeof x=="string"&&(p.tagname=x),S.addChild(p,C))}i(e5,"lt");function t5(S,p,h){let C=this.options.processEntities;if(!C||!C.enabled)return S;if(C.allowedTags){let P=this.options.jPath?h.toString():h;if(!(Array.isArray(C.allowedTags)?C.allowedTags.includes(p):C.allowedTags(p,P)))return S}if(C.tagFilter){let P=this.options.jPath?h.toString():h;if(!C.tagFilter(p,P))return S}return this.entityDecoder.decode(S)}i(t5,"ut");function r5(S,p,h,C){return S&&(C===void 0&&(C=p.child.length===0),(S=this.parseTextData(S,p.tagname,h,!1,!!p[":@"]&&Object.keys(p[":@"]).length!==0,C))!==void 0&&S!==""&&p.add(this.options.textNodeName,S),S=""),S}i(r5,"pt");function n5(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}i(n5,"ct");function Oa(S,p,h,C){let P=S.indexOf(p,h);if(P===-1)throw new Error(C);return P+p.length-1}i(Oa,"dt");function o5(S,p,h,C){let P=S.indexOf(p,h);if(P===-1)throw new Error(C);return P}i(o5,"ft");function GS(S,p,h,C=">"){let P=(function(Z,te,oe=">"){let de=0,fe=[],Et=Z.length,Sr=oe.charCodeAt(0),vr=oe.length>1?oe.charCodeAt(1):-1;for(let yi=te;yi<Et;yi++){let nn=Z.charCodeAt(yi);if(de)nn===de&&(de=0);else if(nn===34||nn===39)de=nn;else if(nn===Sr){if(vr===-1)return{data:String.fromCharCode(...fe),index:yi};if(Z.charCodeAt(yi+1)===vr)return{data:String.fromCharCode(...fe),index:yi}}else if(nn===9){fe.push(32);continue}fe.push(nn)}})(S,p+1,C);if(!P)return;let x=P.data,L=P.index,M=x.search(/\s/),U=x,z=!0;M!==-1&&(U=x.substring(0,M),x=x.substring(M+1).trimStart());let B=U;if(h){let Z=U.indexOf(":");Z!==-1&&(U=U.substr(Z+1),z=U!==P.data.substr(Z+1))}return{tagName:U,tagExp:x,closeIndex:L,attrExpPresent:z,rawTagName:B}}i(GS,"gt");function i5(S,p,h){let C=h,P=1,x=S.length;for(;h<x;h++)if(S[h]==="<"){let L=S.charCodeAt(h+1);if(L===47){let M=o5(S,">",h,`${p} is not closed`);if(S.substring(h+2,M).trim()===p&&(P--,P===0))return{tagContent:S.substring(C,h),i:M};h=M}else if(L===63)h=Oa(S,"?>",h+1,"StopNode is not closed.");else if(L===33&&S.charCodeAt(h+2)===45&&S.charCodeAt(h+3)===45)h=Oa(S,"-->",h+3,"StopNode is not closed.");else if(L===33&&S.charCodeAt(h+2)===91)h=Oa(S,"]]>",h,"StopNode is not closed.")-2;else{let M=GS(S,h,">");M&&((M&&M.tagName)===p&&M.tagExp[M.tagExp.length-1]!=="/"&&P++,h=M.closeIndex)}}}i(i5,"mt");function iI(S,p,h){if(p&&typeof S=="string"){let C=S.trim();return C==="true"||C!=="false"&&(function(P,x={}){if(x=Object.assign({},LJ,x),!P||typeof P!="string")return P;let L=P.trim();if(L.length===0||x.skipLike!==void 0&&x.skipLike.test(L))return P;if(L==="0")return 0;if(x.hex&&OJ.test(L))return(function(U){if(parseInt)return parseInt(U,16);if(Number.parseInt)return Number.parseInt(U,16);if(window&&window.parseInt)return window.parseInt(U,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(L);if(isFinite(L)){if(L.includes("e")||L.includes("E"))return(function(U,z,B){if(!B.eNotation)return U;let Z=z.match(zJ);if(Z){let te=Z[1]||"",oe=Z[3].indexOf("e")===-1?"E":"e",de=Z[2],fe=te?U[de.length+1]===oe:U[de.length]===oe;return de.length>1&&fe?U:(de.length!==1||!Z[3].startsWith(`.${oe}`)&&Z[3][0]!==oe)&&de.length>0?B.leadingZeros&&!fe?(z=(Z[1]||"")+Z[3],Number(z)):U:Number(z)}return U})(P,L,x);{let U=NJ.exec(L);if(U){let z=U[1]||"",B=U[2],Z=((M=U[3])&&M.indexOf(".")!==-1&&((M=M.replace(/0+$/,""))==="."?M="0":M[0]==="."?M="0"+M:M[M.length-1]==="."&&(M=M.substring(0,M.length-1))),M),te=z?P[B.length+1]===".":P[B.length]===".";if(!x.leadingZeros&&(B.length>1||B.length===1&&!te))return P;{let oe=Number(L),de=String(oe);if(oe===0)return oe;if(de.search(/[eE]/)!==-1)return x.eNotation?oe:P;if(L.indexOf(".")!==-1)return de==="0"||de===Z||de===`${z}${Z}`?oe:P;let fe=B?Z:L;return B?fe===de||z+fe===de?oe:P:fe===de||fe===z+de?oe:P}}return P}}var M;return(function(U,z,B){let Z=z===1/0;switch(B.infinity.toLowerCase()){case"null":return null;case"infinity":return z;case"string":return Z?"Infinity":"-Infinity";default:return U}})(P,Number(L),x)})(S,h)}return S!==void 0?S:""}i(iI,"xt");function FS(S,p,h,C){if(S){let P=S(p);h===p&&(h=P),p=P}return{tagName:p=sI(p,C),tagExp:h}}i(FS,"Nt");function sI(S,p){if(u.includes(S))throw new Error(`[SECURITY] Invalid name: "${S}" is a reserved JavaScript keyword that could cause prototype pollution`);return c.includes(S)?p.onDangerousProperty(S):S}i(sI,"bt");let jS=Ve.getMetaDataSymbol();function s5(S,p){if(!S||typeof S!="object")return{};if(!p)return S;let h={};for(let C in S)C.startsWith(p)?h[C.substring(p.length)]=S[C]:h[C]=S[C];return h}i(s5,"Et");function a5(S,p,h,C){return aI(S,p,h,C)}i(a5,"wt");function aI(S,p,h,C){let P,x={};for(let L=0;L<S.length;L++){let M=S[L],U=c5(M);if(U!==void 0&&U!==p.textNodeName){let z=s5(M[":@"]||{},p.attributeNamePrefix);h.push(U,z)}if(U===p.textNodeName)P===void 0?P=M[U]:P+=""+M[U];else{if(U===void 0)continue;if(M[U]){let z=aI(M[U],p,h,C),B=l5(z,p);if(M[":@"]?u5(z,M[":@"],C,p):Object.keys(z).length!==1||z[p.textNodeName]===void 0||p.alwaysCreateTextNode?Object.keys(z).length===0&&(p.alwaysCreateTextNode?z[p.textNodeName]="":z=""):z=z[p.textNodeName],M[jS]!==void 0&&typeof z=="object"&&z!==null&&(z[jS]=M[jS]),x[U]!==void 0&&Object.prototype.hasOwnProperty.call(x,U))Array.isArray(x[U])||(x[U]=[x[U]]),x[U].push(z);else{let Z=p.jPath?C.toString():C;p.isArray(U,Z,B)?x[U]=[z]:x[U]=z}U!==void 0&&U!==p.textNodeName&&h.pop()}}}return typeof P=="string"?P.length>0&&(x[p.textNodeName]=P):P!==void 0&&(x[p.textNodeName]=P),x}i(aI,"vt");function c5(S){let p=Object.keys(S);for(let h=0;h<p.length;h++){let C=p[h];if(C!==":@")return C}}i(c5,"St");function u5(S,p,h,C){if(p){let P=Object.keys(p),x=P.length;for(let L=0;L<x;L++){let M=P[L],U=M.startsWith(C.attributeNamePrefix)?M.substring(C.attributeNamePrefix.length):M,z=C.jPath?h.toString()+"."+U:h;C.isArray(M,z,!0,!0)?S[M]=[p[M]]:S[M]=p[M]}}}i(u5,"_t");function l5(S,p){let{textNodeName:h}=p,C=Object.keys(S).length;return C===0||!(C!==1||!S[h]&&typeof S[h]!="boolean"&&S[h]!==0)}i(l5,"At");class d5{static{i(this,"Tt")}constructor(p){this.externalEntities={},this.options=Lr(p)}parse(p,h){if(typeof p!="string"&&p.toString)p=p.toString();else if(typeof p!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(h){h===!0&&(h={});let x=d(p,h);if(x!==!0)throw Error(`${x.err.msg}:${x.err.line}:${x.err.col}`)}let C=new JJ(this.options);C.entityDecoder.setExternalEntities(this.externalEntities);let P=C.parseXml(p);return this.options.preserveOrder||P===void 0?P:a5(P,this.options,C.matcher,C.readonlyMatcher)}addEntity(p,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(p.indexOf("&")!==-1||p.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[p]=h}static getMetaDataSymbol(){return Ve.getMetaDataSymbol()}}function p5(S,p){let h="";p.format&&p.indentBy.length>0&&(h=`
|
|
45
|
+
`);let C=[];if(p.stopNodes&&Array.isArray(p.stopNodes))for(let P=0;P<p.stopNodes.length;P++){let x=p.stopNodes[P];typeof x=="string"?C.push(new Ma(x)):x instanceof Ma&&C.push(x)}return cI(S,p,h,new zS,C)}i(p5,"Ct");function cI(S,p,h,C,P){let x="",L=!1;if(p.maxNestedTags&&C.getDepth()>p.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(S)){if(S!=null){let M=S.toString();return M=qS(M,p),M}return""}for(let M=0;M<S.length;M++){let U=S[M],z=lI(U);if(z===void 0)continue;let B=m5(U[":@"],p);C.push(z,B);let Z=g5(C,P);if(z===p.textNodeName){let fe=U[z];Z||(fe=p.tagValueProcessor(z,fe),fe=qS(fe,p)),L&&(x+=h),x+=fe,L=!1,C.pop();continue}if(z===p.cdataPropName){L&&(x+=h);let fe=U[z][0][p.textNodeName];x+=`<![CDATA[${String(fe).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,L=!1,C.pop();continue}if(z===p.commentPropName){let fe=U[z][0][p.textNodeName];x+=h+`<!--${String(fe).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,L=!0,C.pop();continue}if(z[0]==="?"){let fe=dI(U[":@"],p,Z),Et=z==="?xml"?"":h,Sr=U[z][0][p.textNodeName];Sr=Sr.length!==0?" "+Sr:"",x+=Et+`<${z}${Sr}${fe}?>`,L=!0,C.pop();continue}let te=h;te!==""&&(te+=p.indentBy);let oe=h+`<${z}${dI(U[":@"],p,Z)}`,de;de=Z?uI(U[z],p):cI(U[z],p,te,C,P),p.unpairedTags.indexOf(z)!==-1?p.suppressUnpairedNode?x+=oe+">":x+=oe+"/>":de&&de.length!==0||!p.suppressEmptyNode?de&&de.endsWith(">")?x+=oe+`>${de}${h}</${z}>`:(x+=oe+">",de&&h!==""&&(de.includes("/>")||de.includes("</"))?x+=h+p.indentBy+de+h:x+=de,x+=`</${z}>`):x+=oe+"/>",L=!0,C.pop()}return x}i(cI,"Pt");function m5(S,p){if(!S||p.ignoreAttributes)return null;let h={},C=!1;for(let P in S)Object.prototype.hasOwnProperty.call(S,P)&&(h[P.startsWith(p.attributeNamePrefix)?P.substr(p.attributeNamePrefix.length):P]=S[P],C=!0);return C?h:null}i(m5,"Ot");function uI(S,p){if(!Array.isArray(S))return S!=null?S.toString():"";let h="";for(let C=0;C<S.length;C++){let P=S[C],x=lI(P);if(x===p.textNodeName)h+=P[x];else if(x===p.cdataPropName)h+=P[x][0][p.textNodeName];else if(x===p.commentPropName)h+=P[x][0][p.textNodeName];else{if(x&&x[0]==="?")continue;if(x){let L=f5(P[":@"],p),M=uI(P[x],p);M&&M.length!==0?h+=`<${x}${L}>${M}</${x}>`:h+=`<${x}${L}/>`}}}return h}i(uI,"$t");function f5(S,p){let h="";if(S&&!p.ignoreAttributes)for(let C in S){if(!Object.prototype.hasOwnProperty.call(S,C))continue;let P=S[C];P===!0&&p.suppressBooleanAttributes?h+=` ${C.substr(p.attributeNamePrefix.length)}`:h+=` ${C.substr(p.attributeNamePrefix.length)}="${P}"`}return h}i(f5,"It");function lI(S){let p=Object.keys(S);for(let h=0;h<p.length;h++){let C=p[h];if(Object.prototype.hasOwnProperty.call(S,C)&&C!==":@")return C}}i(lI,"Dt");function dI(S,p,h){let C="";if(S&&!p.ignoreAttributes)for(let P in S){if(!Object.prototype.hasOwnProperty.call(S,P))continue;let x;h?x=S[P]:(x=p.attributeValueProcessor(P,S[P]),x=qS(x,p)),x===!0&&p.suppressBooleanAttributes?C+=` ${P.substr(p.attributeNamePrefix.length)}`:C+=` ${P.substr(p.attributeNamePrefix.length)}="${x}"`}return C}i(dI,"Mt");function g5(S,p){if(!p||p.length===0)return!1;for(let h=0;h<p.length;h++)if(S.matches(p[h]))return!0;return!1}i(g5,"jt");function qS(S,p){if(S&&S.length>0&&p.processEntities)for(let h=0;h<p.entities.length;h++){let C=p.entities[h];S=S.replace(C.regex,C.val)}return S}i(qS,"Vt");let h5={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:i(function(S,p){return p},"tagValueProcessor"),attributeValueProcessor:i(function(S,p){return p},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function rn(S){if(this.options=Object.assign({},h5,S),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(h=>typeof h=="string"&&h.startsWith("*.")?".."+h.substring(2):h)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let h=0;h<this.options.stopNodes.length;h++){let C=this.options.stopNodes[h];typeof C=="string"?this.stopNodeExpressions.push(new Ma(C)):C instanceof Ma&&this.stopNodeExpressions.push(C)}var p;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(p=this.options.ignoreAttributes)=="function"?p:Array.isArray(p)?h=>{for(let C of p)if(typeof C=="string"&&h===C||C instanceof RegExp&&C.test(h))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=E5),this.processTextOrObjNode=y5,this.options.format?(this.indentate=_5,this.tagEndChar=`>
|
|
46
|
+
`,this.newLine=`
|
|
47
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}i(rn,"kt");function y5(S,p,h,C){let P=this.extractAttributes(S);if(C.push(p,P),this.checkStopNode(C)){let L=this.buildRawContent(S),M=this.buildAttributesForStopNode(S);return C.pop(),this.buildObjectNode(L,p,M,h)}let x=this.j2x(S,h+1,C);return C.pop(),S[this.options.textNodeName]!==void 0&&Object.keys(S).length===1?this.buildTextValNode(S[this.options.textNodeName],p,x.attrStr,h,C):this.buildObjectNode(x.val,p,x.attrStr,h)}i(y5,"Ft");function _5(S){return this.options.indentBy.repeat(S)}i(_5,"Rt");function E5(S){return!(!S.startsWith(this.options.attributeNamePrefix)||S===this.options.textNodeName)&&S.substr(this.attrPrefixLen)}i(E5,"Gt"),rn.prototype.build=function(S){if(this.options.preserveOrder)return p5(S,this.options);{Array.isArray(S)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(S={[this.options.arrayNodeName]:S});let p=new zS;return this.j2x(S,0,p).val}},rn.prototype.j2x=function(S,p,h){let C="",P="";if(this.options.maxNestedTags&&h.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let x=this.options.jPath?h.toString():h,L=this.checkStopNode(h);for(let M in S)if(Object.prototype.hasOwnProperty.call(S,M))if(S[M]===void 0)this.isAttribute(M)&&(P+="");else if(S[M]===null)this.isAttribute(M)||M===this.options.cdataPropName?P+="":M[0]==="?"?P+=this.indentate(p)+"<"+M+"?"+this.tagEndChar:P+=this.indentate(p)+"<"+M+"/"+this.tagEndChar;else if(S[M]instanceof Date)P+=this.buildTextValNode(S[M],M,"",p,h);else if(typeof S[M]!="object"){let U=this.isAttribute(M);if(U&&!this.ignoreAttributesFn(U,x))C+=this.buildAttrPairStr(U,""+S[M],L);else if(!U)if(M===this.options.textNodeName){let z=this.options.tagValueProcessor(M,""+S[M]);P+=this.replaceEntitiesValue(z)}else{h.push(M);let z=this.checkStopNode(h);if(h.pop(),z){let B=""+S[M];P+=B===""?this.indentate(p)+"<"+M+this.closeTag(M)+this.tagEndChar:this.indentate(p)+"<"+M+">"+B+"</"+M+this.tagEndChar}else P+=this.buildTextValNode(S[M],M,"",p,h)}}else if(Array.isArray(S[M])){let U=S[M].length,z="",B="";for(let Z=0;Z<U;Z++){let te=S[M][Z];if(te!==void 0)if(te===null)M[0]==="?"?P+=this.indentate(p)+"<"+M+"?"+this.tagEndChar:P+=this.indentate(p)+"<"+M+"/"+this.tagEndChar;else if(typeof te=="object")if(this.options.oneListGroup){h.push(M);let oe=this.j2x(te,p+1,h);h.pop(),z+=oe.val,this.options.attributesGroupName&&te.hasOwnProperty(this.options.attributesGroupName)&&(B+=oe.attrStr)}else z+=this.processTextOrObjNode(te,M,p,h);else if(this.options.oneListGroup){let oe=this.options.tagValueProcessor(M,te);oe=this.replaceEntitiesValue(oe),z+=oe}else{h.push(M);let oe=this.checkStopNode(h);if(h.pop(),oe){let de=""+te;z+=de===""?this.indentate(p)+"<"+M+this.closeTag(M)+this.tagEndChar:this.indentate(p)+"<"+M+">"+de+"</"+M+this.tagEndChar}else z+=this.buildTextValNode(te,M,"",p,h)}}this.options.oneListGroup&&(z=this.buildObjectNode(z,M,B,p)),P+=z}else if(this.options.attributesGroupName&&M===this.options.attributesGroupName){let U=Object.keys(S[M]),z=U.length;for(let B=0;B<z;B++)C+=this.buildAttrPairStr(U[B],""+S[M][U[B]],L)}else P+=this.processTextOrObjNode(S[M],M,p,h);return{attrStr:C,val:P}},rn.prototype.buildAttrPairStr=function(S,p,h){return h||(p=this.options.attributeValueProcessor(S,""+p),p=this.replaceEntitiesValue(p)),this.options.suppressBooleanAttributes&&p==="true"?" "+S:" "+S+'="'+p+'"'},rn.prototype.extractAttributes=function(S){if(!S||typeof S!="object")return null;let p={},h=!1;if(this.options.attributesGroupName&&S[this.options.attributesGroupName]){let C=S[this.options.attributesGroupName];for(let P in C)Object.prototype.hasOwnProperty.call(C,P)&&(p[P.startsWith(this.options.attributeNamePrefix)?P.substring(this.options.attributeNamePrefix.length):P]=C[P],h=!0)}else for(let C in S){if(!Object.prototype.hasOwnProperty.call(S,C))continue;let P=this.isAttribute(C);P&&(p[P]=S[C],h=!0)}return h?p:null},rn.prototype.buildRawContent=function(S){if(typeof S=="string")return S;if(typeof S!="object"||S===null)return String(S);if(S[this.options.textNodeName]!==void 0)return S[this.options.textNodeName];let p="";for(let h in S){if(!Object.prototype.hasOwnProperty.call(S,h)||this.isAttribute(h)||this.options.attributesGroupName&&h===this.options.attributesGroupName)continue;let C=S[h];if(h===this.options.textNodeName)p+=C;else if(Array.isArray(C)){for(let P of C)if(typeof P=="string"||typeof P=="number")p+=`<${h}>${P}</${h}>`;else if(typeof P=="object"&&P!==null){let x=this.buildRawContent(P),L=this.buildAttributesForStopNode(P);p+=x===""?`<${h}${L}/>`:`<${h}${L}>${x}</${h}>`}}else if(typeof C=="object"&&C!==null){let P=this.buildRawContent(C),x=this.buildAttributesForStopNode(C);p+=P===""?`<${h}${x}/>`:`<${h}${x}>${P}</${h}>`}else p+=`<${h}>${C}</${h}>`}return p},rn.prototype.buildAttributesForStopNode=function(S){if(!S||typeof S!="object")return"";let p="";if(this.options.attributesGroupName&&S[this.options.attributesGroupName]){let h=S[this.options.attributesGroupName];for(let C in h){if(!Object.prototype.hasOwnProperty.call(h,C))continue;let P=C.startsWith(this.options.attributeNamePrefix)?C.substring(this.options.attributeNamePrefix.length):C,x=h[C];x===!0&&this.options.suppressBooleanAttributes?p+=" "+P:p+=" "+P+'="'+x+'"'}}else for(let h in S){if(!Object.prototype.hasOwnProperty.call(S,h))continue;let C=this.isAttribute(h);if(C){let P=S[h];P===!0&&this.options.suppressBooleanAttributes?p+=" "+C:p+=" "+C+'="'+P+'"'}}return p},rn.prototype.buildObjectNode=function(S,p,h,C){if(S==="")return p[0]==="?"?this.indentate(C)+"<"+p+h+"?"+this.tagEndChar:this.indentate(C)+"<"+p+h+this.closeTag(p)+this.tagEndChar;{let P="</"+p+this.tagEndChar,x="";return p[0]==="?"&&(x="?",P=""),!h&&h!==""||S.indexOf("<")!==-1?this.options.commentPropName!==!1&&p===this.options.commentPropName&&x.length===0?this.indentate(C)+`<!--${S}-->`+this.newLine:this.indentate(C)+"<"+p+h+x+this.tagEndChar+S+this.indentate(C)+P:this.indentate(C)+"<"+p+h+x+">"+S+P}},rn.prototype.closeTag=function(S){let p="";return this.options.unpairedTags.indexOf(S)!==-1?this.options.suppressUnpairedNode||(p="/"):p=this.options.suppressEmptyNode?"/":`></${S}`,p},rn.prototype.checkStopNode=function(S){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let p=0;p<this.stopNodeExpressions.length;p++)if(S.matches(this.stopNodeExpressions[p]))return!0;return!1},rn.prototype.buildTextValNode=function(S,p,h,C,P){if(this.options.cdataPropName!==!1&&p===this.options.cdataPropName){let x=String(S).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(C)+`<![CDATA[${x}]]>`+this.newLine}if(this.options.commentPropName!==!1&&p===this.options.commentPropName){let x=String(S).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(C)+`<!--${x}-->`+this.newLine}if(p[0]==="?")return this.indentate(C)+"<"+p+h+"?"+this.tagEndChar;{let x=this.options.tagValueProcessor(p,S);return x=this.replaceEntitiesValue(x),x===""?this.indentate(C)+"<"+p+h+this.closeTag(p)+this.tagEndChar:this.indentate(C)+"<"+p+h+">"+x+"</"+p+this.tagEndChar}},rn.prototype.replaceEntitiesValue=function(S){if(S&&S.length>0&&this.options.processEntities)for(let p=0;p<this.options.entities.length;p++){let h=this.options.entities[p];S=S.replace(h.regex,h.val)}return S};let S5=rn,v5={validate:d};Cz.exports=t})()});var bz=N(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.EntityDecoderImpl=Ln.CURRENCY=Ln.COMMON_HTML=Ln.XML=void 0;Ln.XML={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Ln.COMMON_HTML={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"};Ln.CURRENCY={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"};var Noe=new Set("!?\\/[]$%{}^&*()<>|+");function xz(e){if(e[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(Noe.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}i(xz,"validateEntityName");function SC(...e){let t=Object.create(null);for(let r of e)if(r)for(let n of Object.keys(r)){let o=r[n];if(typeof o=="string")t[n]=o;else if(o&&typeof o=="object"&&o.val!==void 0){let a=o.val;typeof a=="string"&&(t[n]=a)}}return t}i(SC,"mergeEntityMaps");var ta="external",jf="base",vC="all";function Loe(e){return!e||e===ta?new Set([ta]):e===vC?new Set([vC]):e===jf?new Set([jf]):Array.isArray(e)?new Set(e):new Set([ta])}i(Loe,"parseLimitTiers");var Cr=Object.freeze({allow:0,leave:1,remove:2,throw:3}),zoe=new Set([9,10,13]);function Uoe(e){if(!e)return{xmlVersion:1,onLevel:Cr.allow,nullLevel:Cr.remove};let t=e.xmlVersion===1.1?1.1:1,r=Cr[e.onNCR??"allow"]??Cr.allow,n=Cr[e.nullNCR??"remove"]??Cr.remove,o=Math.max(n,Cr.remove);return{xmlVersion:t,onLevel:r,nullLevel:o}}i(Uoe,"parseNCRConfig");var Boe=class{static{i(this,"EntityDecoderImpl")}_limit;_maxTotalExpansions;_maxExpandedLength;_postCheck;_limitTiers;_numericAllowed;_baseMap;_externalMap;_inputMap;_totalExpansions;_expandedLength;_removeSet;_leaveSet;_ncrXmlVersion;_ncrOnLevel;_ncrNullLevel;constructor(t={}){this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:n=>n,this._limitTiers=Loe(this._limit.applyLimitsTo??ta),this._numericAllowed=t.numericAllowed??!0,this._baseMap=SC(Ln.XML,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);let r=Uoe(t.ncr);this._ncrXmlVersion=r.xmlVersion,this._ncrOnLevel=r.onLevel,this._ncrNullLevel=r.nullLevel}setExternalEntities(t){if(t)for(let r of Object.keys(t))xz(r);this._externalMap=SC(t)}addExternalEntity(t,r){xz(t),typeof r=="string"&&r.indexOf("&")===-1&&(this._externalMap[t]=r)}addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=SC(t)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t==="1.1"||t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0)return t;let r=t,n=[],o=t.length,a=0,c=0,u=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,d=u||l;for(;c<o;){if(t.charCodeAt(c)!==38){c++;continue}let y=c+1;for(;y<o&&t.charCodeAt(y)!==59&&y-c<=32;)y++;if(y>=o||t.charCodeAt(y)!==59){c++;continue}let E=t.slice(c+1,y);if(E.length===0){c++;continue}let g,v;if(this._removeSet.has(E))g="",v===void 0&&(v=ta);else if(this._leaveSet.has(E)){c++;continue}else if(E.charCodeAt(0)===35){let A=this._resolveNCR(E);if(A===void 0){c++;continue}g=A,v=jf}else{let A=this._resolveName(E);g=A?.value,v=A?.tier}if(g===void 0){c++;continue}if(c>a&&n.push(t.slice(a,c)),n.push(g),a=y+1,c=a,d&&this._tierCounts(v)){if(u&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(l){let A=g.length-(E.length+2);if(A>0&&(this._expandedLength+=A,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}a<o&&n.push(t.slice(a));let _=n.length===0?t:n.join("");return this._postCheck(_,r)}_tierCounts(t){return this._limitTiers.has(vC)?!0:this._limitTiers.has(t)}_resolveName(t){if(t in this._inputMap)return{value:this._inputMap[t],tier:ta};if(t in this._externalMap)return{value:this._externalMap[t],tier:ta};if(t in this._baseMap)return{value:this._baseMap[t],tier:jf}}_classifyNCR(t){return t===0?this._ncrNullLevel:t>=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!zoe.has(t)?Cr.remove:-1}_applyNCRAction(t,r,n){switch(t){case Cr.allow:return String.fromCodePoint(n);case Cr.remove:return"";case Cr.leave:return;case Cr.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${r}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(t){let r=t.charCodeAt(1),n;if(r===120||r===88?n=parseInt(t.slice(2),16):n=parseInt(t.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let o=this._classifyNCR(n);if(!this._numericAllowed&&o<Cr.remove)return;let a=o===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,o);return this._applyNCRAction(a,t,n)}};Ln.EntityDecoderImpl=Boe});var Iz=N(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});AC.parseXML=joe;var Goe=Tz(),qf=bz(),Vf=new qf.EntityDecoderImpl({namedEntities:{...qf.XML,...qf.COMMON_HTML,...qf.CURRENCY},numericAllowed:!0,limit:{maxTotalExpansions:1/0},ncr:{xmlVersion:1.1}}),Foe=new Goe.XMLParser({attributeNamePrefix:"",processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,entityDecoder:{setExternalEntities:i(e=>{Vf.setExternalEntities(e)},"setExternalEntities"),addInputEntities:i(e=>{Vf.addInputEntities(e)},"addInputEntities"),reset:i(()=>{Vf.reset()},"reset"),decode:i(e=>Vf.decode(e),"decode"),setXmlVersion:i(e=>{},"setXmlVersion")},ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:i((e,t)=>t.trim()===""&&t.includes(`
|
|
48
|
+
`)?"":void 0,"tagValueProcessor"),maxNestedTags:1/0});function joe(e){return Foe.parse(e,!0)}i(joe,"parseXML")});var Jf=N(Wf=>{"use strict";var qoe=Iz(),Voe=/[&<>"]/g,Hoe={"&":"&","<":"<",">":">",'"':"""};function Woe(e){return e.replace(Voe,t=>Hoe[t])}i(Woe,"escapeAttribute");var Joe=/[&"'<>\r\n\u0085\u2028]/g,Koe={"&":"&",'"':""","'":"'","<":"<",">":">","\r":"
","\n":"
","\x85":"…","\u2028":"
"};function Zoe(e){return e.replace(Joe,t=>Koe[t])}i(Zoe,"escapeElement");var Hf=class{static{i(this,"XmlText")}value;constructor(t){this.value=t}toString(){return Zoe(""+this.value)}},RC=class e{static{i(this,"XmlNode")}name;children;attributes={};static of(t,r,n){let o=new e(t);return r!==void 0&&o.addChildNode(new Hf(r)),n!==void 0&&o.withName(n),o}constructor(t,r=[]){this.name=t,this.children=r}withName(t){return this.name=t,this}addAttribute(t,r){return this.attributes[t]=r,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,r){return r!=null&&(this.attributes[t]=r),this}cc(t,r,n=r){if(t[r]!=null){let o=e.of(r,t[r]).withName(n);this.c(o)}}l(t,r,n,o){t[r]!=null&&o().map(c=>{c.withName(n),this.c(c)})}lc(t,r,n,o){if(t[r]!=null){let a=o(),c=new e(n);a.map(u=>{c.c(u)}),this.c(c)}}toString(){let t=!!this.children.length,r=`<${this.name}`,n=this.attributes;for(let o of Object.keys(n)){let a=n[o];a!=null&&(r+=` ${o}="${Woe(""+a)}"`)}return r+=t?`>${this.children.map(o=>o.toString()).join("")}</${this.name}>`:"/>"}};Wf.parseXML=qoe.parseXML;Wf.XmlNode=RC;Wf.XmlText=Hf});var wz,$z,kz,ns,Kf=D(()=>{wz=I(Jf());Rr();ke();$z=I(ue()),kz=I(ft());es();fC();ns=class extends nr{static{i(this,"XmlShapeDeserializer")}settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new qs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,r,n){let o=ne.of(t),a=o.getMemberSchemas();if(o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(a).find(d=>!!d.getMemberTraits().eventPayload)){let d={},_=Object.keys(a)[0];return a[_].isBlobSchema()?d[_]=r:d[_]=this.read(a[_],r),d}let u=(this.serdeContext?.utf8Encoder??kz.toUtf8)(r),l=this.parseXml(u);return this.readSchema(t,n?l[n]:l)}readSchema(t,r){let n=ne.of(t);if(n.isUnitSchema())return;let o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(r))return this.readSchema(n,[r]);if(r==null)return r;if(typeof r=="object"){let a=!!o.xmlFlattened;if(n.isListSchema()){let u=n.getValueSchema(),l=[],d=u.getMergedTraits().xmlName??"member",_=a?r:(r[0]??r)[d];if(_==null)return l;let y=Array.isArray(_)?_:[_];for(let E of y)l.push(this.readSchema(u,E));return l}let c={};if(n.isMapSchema()){let u=n.getKeySchema(),l=n.getValueSchema(),d;a?d=Array.isArray(r)?r:[r]:d=Array.isArray(r.entry)?r.entry:[r.entry];let _=u.getMergedTraits().xmlName??"key",y=l.getMergedTraits().xmlName??"value";for(let E of d){let g=E[_],v=E[y];c[g]=this.readSchema(l,v)}return c}if(n.isStructSchema()){let u=n.isUnionSchema(),l;u&&(l=new yc(r,c));for(let[d,_]of n.structIterator()){let y=_.getMergedTraits(),E=y.httpPayload?y.xmlName??_.getName():_.getMemberTraits().xmlName??d;u&&l.mark(E),r[E]!=null&&(c[d]=this.readSchema(_,r[E]))}return u&&l.writeUnknown(),c}if(n.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,r)}parseXml(t){if(t.length){let r;try{r=(0,wz.parseXML)(t)}catch(c){throw c&&typeof c=="object"&&Object.defineProperty(c,"$responseBodyText",{value:t}),c}let n="#text",o=Object.keys(r)[0],a=r[o];return a[n]&&(a[o]=a[n],delete a[n]),(0,$z.getValueFromTextNode)(a)}return{}}}});var Dz,Mz,vc,PC=D(()=>{Rr();ke();Qt();Dz=I(ue()),Mz=I(gt());es();vc=class extends nr{static{i(this,"QueryShapeSerializer")}settings;buffer;constructor(t){super(),this.settings=t}write(t,r,n=""){this.buffer===void 0&&(this.buffer="");let o=ne.of(t);if(n&&!n.endsWith(".")&&(n+="."),o.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??Mz.toBase64)(r)));else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema())r!=null?(this.writeKey(n),this.writeValue(String(r))):o.isIdempotencyToken()&&(this.writeKey(n),this.writeValue((0,an.v4)()));else if(o.isBigIntegerSchema())r!=null&&(this.writeKey(n),this.writeValue(String(r)));else if(o.isBigDecimalSchema())r!=null&&(this.writeKey(n),this.writeValue(r instanceof Ze?r.string:String(r)));else if(o.isTimestampSchema()){if(r instanceof Date)switch(this.writeKey(n),Fr(o,this.settings)){case 5:this.writeValue(r.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue((0,Dz.dateToUtcString)(r));break;case 7:this.writeValue(String(r.getTime()/1e3));break}}else if(o.isDocumentSchema())Array.isArray(r)?this.write(79,r,n):r instanceof Date?this.write(4,r,n):r instanceof Uint8Array?this.write(21,r,n):r&&typeof r=="object"?this.write(143,r,n):(this.writeKey(n),this.writeValue(String(r)));else if(o.isListSchema()){if(Array.isArray(r))if(r.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{let a=o.getValueSchema(),c=this.settings.flattenLists||o.getMergedTraits().xmlFlattened,u=1;for(let l of r){if(l==null)continue;let d=a.getMergedTraits(),_=this.getKey("member",d.xmlName,d.ec2QueryName),y=c?`${n}${u}`:`${n}${_}.${u}`;this.write(a,l,y),++u}}}else if(o.isMapSchema()){if(r&&typeof r=="object"){let a=o.getKeySchema(),c=o.getValueSchema(),u=o.getMergedTraits().xmlFlattened,l=1;for(let d in r){let _=r[d];if(_==null)continue;let y=a.getMergedTraits(),E=this.getKey("key",y.xmlName,y.ec2QueryName),g=u?`${n}${l}.${E}`:`${n}entry.${l}.${E}`,v=c.getMergedTraits(),A=this.getKey("value",v.xmlName,v.ec2QueryName),R=u?`${n}${l}.${A}`:`${n}entry.${l}.${A}`;this.write(a,d,g),this.write(c,_,R),++l}}}else if(o.isStructSchema()){if(r&&typeof r=="object"){let a=!1;for(let[c,u]of o.structIterator()){if(r[c]==null&&!u.isIdempotencyToken())continue;let l=u.getMergedTraits(),d=this.getKey(c,l.xmlName,l.ec2QueryName,"struct"),_=`${n}${d}`;this.write(u,r[c],_),a=!0}if(!a&&o.isUnionSchema()){let{$unknown:c}=r;if(Array.isArray(c)){let[u,l]=c,d=`${n}${u}`;this.write(15,l,d)}}}}else if(!o.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");let t=this.buffer;return delete this.buffer,t}getKey(t,r,n,o){let{ec2:a,capitalizeKeys:c}=this.settings;if(a&&n)return n;let u=r??t;return c&&o==="struct"?u[0].toUpperCase()+u.slice(1):u}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ro(t)}=`}writeValue(t){this.buffer+=ro(t)}}});var os,CC=D(()=>{Rr();ke();hc();Kf();PC();os=class extends Xo{static{i(this,"AwsQueryProtocol")}options;serializer;deserializer;mixin=new un;constructor(t){super({defaultNamespace:t.defaultNamespace,errorTypeRegistries:t.errorTypeRegistries}),this.options=t;let r={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new vc(r),this.deserializer=new ns(r)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);o.path.endsWith("/")||(o.path+="/"),o.headers["content-type"]="application/x-www-form-urlencoded",($n(t.input)==="unit"||!o.body)&&(o.body="");let a=t.name.split("#")[1]??t.name;return o.body=`Action=${a}&Version=${this.options.version}`+o.body,o.body.endsWith("&")&&(o.body=o.body.slice(-1)),o}async deserializeResponse(t,r,n){let o=this.deserializer,a=ne.of(t.output),c={};if(n.statusCode>=300){let _=await sn(n.body,r);_.byteLength>0&&Object.assign(c,await o.read(15,_)),await this.handleError(t,r,n,c,this.deserializeMetadata(n))}for(let _ in n.headers){let y=n.headers[_];delete n.headers[_],n.headers[_.toLowerCase()]=y}let u=t.name.split("#")[1]??t.name,l=a.isStructSchema()&&this.useNestedResult()?u+"Result":void 0,d=await sn(n.body,r);return d.byteLength>0&&Object.assign(c,await o.read(a,d,l)),c.$metadata=this.deserializeMetadata(n),c}useNestedResult(){return!0}async handleError(t,r,n,o,a){let c=this.loadQueryErrorCode(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,c,this.options.defaultNamespace);let u=this.loadQueryError(o)??{},l=this.loadQueryErrorMessage(o);u.message=l,u.Error={Type:u.Type,Code:u.Code,Message:l};let{errorSchema:d,errorMetadata:_}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,u,a,this.mixin.findQueryCompatibleError),y=ne.of(d),E=this.compositeErrorRegistry.getErrorCtor(d)??Error,g=new E(l),v={Type:u.Error.Type,Code:u.Error.Code,Error:u.Error};for(let[A,R]of y.structIterator()){let b=R.getMergedTraits().xmlName??A,$=u[b]??o[b];v[A]=this.deserializer.readSchema(R,$)}throw this.mixin.decorateServiceException(Object.assign(g,_,{$fault:y.getMergedTraits().error,message:l},v),o)}loadQueryErrorCode(t,r){let n=(r.Errors?.[0]?.Error??r.Errors?.Error??r.Error)?.Code;if(n!==void 0)return n;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){let r=this.loadQueryError(t);return r?.message??r?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}});var Zf,Oz=D(()=>{CC();Zf=class extends os{static{i(this,"AwsEc2QueryProtocol")}options;constructor(t){super(t),this.options=t;let r={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0};Object.assign(this.serializer.settings,r)}getShapeId(){return"aws.protocols#ec2Query"}useNestedResult(){return!1}}});var Nz=D(()=>{});var Lz,zz,TC,Uz,Xf,xC=D(()=>{Lz=I(Jf()),zz=I(ue());gC();TC=i((e,t)=>Lf(e,t).then(r=>{if(r.length){let n;try{n=(0,Lz.parseXML)(r)}catch(u){throw u&&typeof u=="object"&&Object.defineProperty(u,"$responseBodyText",{value:r}),u}let o="#text",a=Object.keys(n)[0],c=n[a];return c[o]&&(c[a]=c[o],delete c[o]),(0,zz.getValueFromTextNode)(c)}return{}}),"parseXmlBody"),Uz=i(async(e,t)=>{let r=await TC(e,t);return r.Error&&(r.Error.message=r.Error.message??r.Error.Message),r},"parseXmlErrorBody"),Xf=i((e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var yr,bC,Yf,Ac,IC=D(()=>{yr=I(Jf());Rr();ke();Qt();bC=I(ue()),Yf=I(gt());es();Ac=class extends nr{static{i(this,"XmlShapeSerializer")}settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,r){let n=ne.of(t);if(n.isStringSchema()&&typeof r=="string")this.stringBuffer=r;else if(n.isBlobSchema())this.byteBuffer="byteLength"in r?r:(this.serdeContext?.base64Decoder??Yf.fromBase64)(r);else{this.buffer=this.writeStruct(n,r,void 0);let o=n.getMergedTraits();o.httpPayload&&!o.xmlName&&this.buffer.withName(n.getName())}}flush(){if(this.byteBuffer!==void 0){let r=this.byteBuffer;return delete this.byteBuffer,r}if(this.stringBuffer!==void 0){let r=this.stringBuffer;return delete this.stringBuffer,r}let t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,r,n){let o=t.getMergedTraits(),a=t.isMemberSchema()&&!o.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():o.xmlName??t.getName();if(!a||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);let c=yr.XmlNode.of(a),[u,l]=this.getXmlnsAttribute(t,n);for(let[_,y]of t.structIterator()){let E=r[_];if(E!=null||y.isIdempotencyToken()){if(y.getMergedTraits().xmlAttribute){c.addAttribute(y.getMergedTraits().xmlName??_,this.writeSimple(y,E));continue}if(y.isListSchema())this.writeList(y,E,c,l);else if(y.isMapSchema())this.writeMap(y,E,c,l);else if(y.isStructSchema())c.addChildNode(this.writeStruct(y,E,l));else{let g=yr.XmlNode.of(y.getMergedTraits().xmlName??y.getMemberName());this.writeSimpleInto(y,E,g,l),c.addChildNode(g)}}}let{$unknown:d}=r;if(d&&t.isUnionSchema()&&Array.isArray(d)&&Object.keys(r).length===1){let[_,y]=d,E=yr.XmlNode.of(_);if(typeof y!="string")if(r instanceof yr.XmlNode||r instanceof yr.XmlText)c.addChildNode(r);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,y,E,l),c.addChildNode(E)}return l&&c.addAttribute(u,l),c}writeList(t,r,n,o){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);let a=t.getMergedTraits(),c=t.getValueSchema(),u=c.getMergedTraits(),l=!!u.sparse,d=!!a.xmlFlattened,[_,y]=this.getXmlnsAttribute(t,o),E=i((g,v)=>{if(c.isListSchema())this.writeList(c,Array.isArray(v)?v:[v],g,y);else if(c.isMapSchema())this.writeMap(c,v,g,y);else if(c.isStructSchema()){let A=this.writeStruct(c,v,y);g.addChildNode(A.withName(d?a.xmlName??t.getMemberName():u.xmlName??"member"))}else{let A=yr.XmlNode.of(d?a.xmlName??t.getMemberName():u.xmlName??"member");this.writeSimpleInto(c,v,A,y),g.addChildNode(A)}},"writeItem");if(d)for(let g of r)(l||g!=null)&&E(n,g);else{let g=yr.XmlNode.of(a.xmlName??t.getMemberName());y&&g.addAttribute(_,y);for(let v of r)(l||v!=null)&&E(g,v);n.addChildNode(g)}}writeMap(t,r,n,o,a=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);let c=t.getMergedTraits(),u=t.getKeySchema(),d=u.getMergedTraits().xmlName??"key",_=t.getValueSchema(),y=_.getMergedTraits(),E=y.xmlName??"value",g=!!y.sparse,v=!!c.xmlFlattened,[A,R]=this.getXmlnsAttribute(t,o),b=i(($,G,Y)=>{let pe=yr.XmlNode.of(d,G),[me,xt]=this.getXmlnsAttribute(u,R);xt&&pe.addAttribute(me,xt),$.addChildNode(pe);let we=yr.XmlNode.of(E);_.isListSchema()?this.writeList(_,Y,we,R):_.isMapSchema()?this.writeMap(_,Y,we,R,!0):_.isStructSchema()?we=this.writeStruct(_,Y,R):this.writeSimpleInto(_,Y,we,R),$.addChildNode(we)},"addKeyValue");if(v)for(let $ in r){let G=r[$];if(g||G!=null){let Y=yr.XmlNode.of(c.xmlName??t.getMemberName());b(Y,$,G),n.addChildNode(Y)}}else{let $;a||($=yr.XmlNode.of(c.xmlName??t.getMemberName()),R&&$.addAttribute(A,R),n.addChildNode($));for(let G in r){let Y=r[G];if(g||Y!=null){let pe=yr.XmlNode.of("entry");b(pe,G,Y),(a?n:$).addChildNode(pe)}}}}writeSimple(t,r){if(r===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");let n=ne.of(t),o=null;if(r&&typeof r=="object")if(n.isBlobSchema())o=(this.serdeContext?.base64Encoder??Yf.toBase64)(r);else if(n.isTimestampSchema()&&r instanceof Date)switch(Fr(n,this.settings)){case 5:o=r.toISOString().replace(".000Z","Z");break;case 6:o=(0,bC.dateToUtcString)(r);break;case 7:o=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",r),o=(0,bC.dateToUtcString)(r);break}else{if(n.isBigDecimalSchema()&&r)return r instanceof Ze?r.string:String(r);throw n.isMapSchema()||n.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(!0)}`)}if((n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema())&&(o=String(r)),n.isStringSchema()&&(r===void 0&&n.isIdempotencyToken()?o=(0,an.v4)():o=String(r)),o===null)throw new Error(`Unhandled schema-value pair ${n.getName(!0)}=${r}`);return o}writeSimpleInto(t,r,n,o){let a=this.writeSimple(t,r),c=ne.of(t),u=new yr.XmlText(a),[l,d]=this.getXmlnsAttribute(c,o);d&&n.addAttribute(l,d),n.addChildNode(u)}getXmlnsAttribute(t,r){let n=t.getMergedTraits(),[o,a]=n.xmlNamespace??[];return a&&a!==r?[o?`xmlns:${o}`:"xmlns",a]:[void 0,void 0]}}});var Rc,wC=D(()=>{es();Kf();IC();Rc=class extends nr{static{i(this,"XmlCodec")}settings;constructor(t){super(),this.settings=t}createSerializer(){let t=new Ac(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new ns(this.settings);return t.setSerdeContext(this.serdeContext),t}}});var Qf,Bz=D(()=>{Rr();ke();hc();xC();wC();Qf=class extends js{static{i(this,"AwsRestXmlProtocol")}codec;serializer;deserializer;mixin=new un;constructor(t){super(t);let r={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new Rc(r),this.serializer=new Hs(this.codec.createSerializer(),r),this.deserializer=new Vs(this.codec.createDeserializer(),r)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),a=ne.of(t.input);if(!o.headers["content-type"]){let c=this.mixin.resolveRestContentType(this.getDefaultContentType(),a);c&&(o.headers["content-type"]=c)}return typeof o.body=="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("<?xml ")&&!this.hasUnstructuredPayloadBinding(a)&&(o.body='<?xml version="1.0" encoding="UTF-8"?>'+o.body),o}async deserializeResponse(t,r,n){return super.deserializeResponse(t,r,n)}async handleError(t,r,n,o,a){let c=Xf(n,o)??"Unknown";if(this.mixin.compose(this.compositeErrorRegistry,c,this.options.defaultNamespace),o.Error&&typeof o.Error=="object")for(let A of Object.keys(o.Error))o[A]=o.Error[A],A.toLowerCase()==="message"&&(o.message=o.Error[A]);o.RequestId&&!a.requestId&&(a.requestId=o.RequestId);let{errorSchema:u,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,a),d=ne.of(u),_=o.Error?.message??o.Error?.Message??o.message??o.Message??"UnknownError",y=this.compositeErrorRegistry.getErrorCtor(u)??Error,E=new y(_);await this.deserializeHttpMessage(u,r,n,o);let g={},v=this.codec.createDeserializer();for(let[A,R]of d.structIterator()){let b=R.getMergedTraits().xmlName??A,$=o.Error?.[b]??o[b];g[A]=v.readSchema(R,$)}throw this.mixin.decorateServiceException(Object.assign(E,l,{$fault:d.getMergedTraits().error,message:_},g),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(let[,r]of t.structIterator())if(r.getMergedTraits().httpPayload)return!(r.isStructSchema()||r.isMapSchema()||r.isListSchema());return!1}}});var ll={};bt(ll,{AwsEc2QueryProtocol:()=>Zf,AwsJson1_0Protocol:()=>Gf,AwsJson1_1Protocol:()=>Ff,AwsJsonRpcProtocol:()=>rs,AwsQueryProtocol:()=>os,AwsRestJsonProtocol:()=>po,AwsRestXmlProtocol:()=>Qf,AwsSmithyRpcV2CborProtocol:()=>Nf,JsonCodec:()=>ts,JsonShapeDeserializer:()=>Ec,JsonShapeSerializer:()=>Sc,QueryShapeSerializer:()=>vc,XmlCodec:()=>Rc,XmlShapeDeserializer:()=>ns,XmlShapeSerializer:()=>Ac,_toBool:()=>az,_toNum:()=>cz,_toStr:()=>sz,awsExpectUnion:()=>Rz,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>Xf,parseJsonBody:()=>cl,parseJsonErrorBody:()=>gz,parseXmlBody:()=>TC,parseXmlErrorBody:()=>Uz});var mo=D(()=>{iz();uz();Ez();Sz();Bf();vz();Uf();yC();EC();Pz();ul();Oz();CC();Nz();PC();Bz();wC();Kf();IC();xC()});var Vz,dl,ra,eg,Gz,Hz,tg,$C,Fz,kC,Pc,jz,qz,Xoe,Tr,Yoe,Wz,Jz=D(()=>{Vz=I(er()),dl="ref",ra=-1,eg=!0,Gz="isSet",Hz="PartitionResult",tg="booleanEquals",$C="getAttr",Fz={[dl]:"Endpoint"},kC={[dl]:Hz},Pc={},jz=[{[dl]:"Region"}],qz={conditions:[[Gz,[Fz]],[Gz,jz],["aws.partition",jz,Hz],[tg,[{[dl]:"UseFIPS"},eg]],[tg,[{[dl]:"UseDualStack"},eg]],[tg,[{fn:$C,argv:[kC,"supportsDualStack"]},eg]],[tg,[{fn:$C,argv:[kC,"supportsFIPS"]},eg]],["stringEquals",[{fn:$C,argv:[kC,"name"]},"aws-us-gov"]]],results:[[ra],[ra,"Invalid Configuration: FIPS and custom endpoint are not supported"],[ra,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Fz,Pc],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Pc],[ra,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",Pc],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",Pc],[ra,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",Pc],[ra,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",Pc],[ra,"Invalid Configuration: Missing Region"]]},Xoe=2,Tr=1e8,Yoe=new Int32Array([-1,1,-1,0,13,3,1,4,Tr+12,2,5,Tr+12,3,8,6,4,7,Tr+11,5,Tr+9,Tr+10,4,11,9,6,10,Tr+8,7,Tr+6,Tr+7,5,12,Tr+5,6,Tr+4,Tr+5,3,Tr+1,14,4,Tr+2,Tr+3]),Wz=Vz.BinaryDecisionDiagram.from(Yoe,Xoe,qz.conditions,qz.results)});var Kz,Cc,Qoe,Zz,Xz=D(()=>{Kz=I(Di()),Cc=I(er());Jz();Qoe=new Cc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Zz=i((e,t={})=>Qoe.get(e,()=>(0,Cc.decideEndpoint)(Wz,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Cc.customEndpointFunctions.aws=Kz.awsEndpointFunctions});var Yz,zt,rg=D(()=>{Yz=I(ue()),zt=class e extends Yz.ServiceException{static{i(this,"SSOOIDCServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var pl,ml,fl,gl,hl,yl,_l,El,Sl,vl,Al,DC=D(()=>{rg();pl=class e extends zt{static{i(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},ml=class e extends zt{static{i(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},fl=class e extends zt{static{i(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},gl=class e extends zt{static{i(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},hl=class e extends zt{static{i(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},yl=class e extends zt{static{i(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},_l=class e extends zt{static{i(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},El=class e extends zt{static{i(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Sl=class e extends zt{static{i(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(t){super({name:"SlowDownException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},vl=class e extends zt{static{i(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Al=class e extends zt{static{i(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}}});var eie,tie,rie,nie,oie,iie,sie,aie,cie,uie,lie,die,pie,mie,fie,gie,hie,yie,_ie,Eie,fo,Sie,vie,Aie,Rie,Pie,dt,Cie,zn,Tie,xie,Un,bie,Qz,eU,Iie,tU,wie,$ie,kie,At,rU,nU,ln,oU,iU,sU,aU,cU,uU,lU,dU,pU,mU,fU,MC,Die,Mie,Oie,Nie,gU,hU,yU,OC,ng=D(()=>{ke();DC();rg();eie="AccessDeniedException",tie="AuthorizationPendingException",rie="AccessToken",nie="ClientSecret",oie="CreateToken",iie="CreateTokenRequest",sie="CreateTokenResponse",aie="CodeVerifier",cie="ExpiredTokenException",uie="InvalidClientException",lie="InvalidGrantException",die="InvalidRequestException",pie="InternalServerException",mie="InvalidScopeException",fie="IdToken",gie="RefreshToken",hie="SlowDownException",yie="UnauthorizedClientException",_ie="UnsupportedGrantTypeException",Eie="accessToken",fo="client",Sie="clientId",vie="clientSecret",Aie="codeVerifier",Rie="code",Pie="deviceCode",dt="error",Cie="expiresIn",zn="error_description",Tie="grantType",xie="http",Un="httpError",bie="idToken",Qz="reason",eU="refreshToken",Iie="redirectUri",tU="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",wie="scope",$ie="server",kie="tokenType",At="com.amazonaws.ssooidc",rU=ot.for(tU),nU=[-3,tU,"SSOOIDCServiceException",0,[],[]];rU.registerError(nU,zt);ln=ot.for(At),oU=[-3,At,eie,{[dt]:fo,[Un]:400},[dt,Qz,zn],[0,0,0]];ln.registerError(oU,pl);iU=[-3,At,tie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(iU,ml);sU=[-3,At,cie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(sU,fl);aU=[-3,At,pie,{[dt]:$ie,[Un]:500},[dt,zn],[0,0]];ln.registerError(aU,gl);cU=[-3,At,uie,{[dt]:fo,[Un]:401},[dt,zn],[0,0]];ln.registerError(cU,hl);uU=[-3,At,lie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(uU,yl);lU=[-3,At,die,{[dt]:fo,[Un]:400},[dt,Qz,zn],[0,0,0]];ln.registerError(lU,_l);dU=[-3,At,mie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(dU,El);pU=[-3,At,hie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(pU,Sl);mU=[-3,At,yie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(mU,vl);fU=[-3,At,_ie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(fU,Al);MC=[rU,ln],Die=[0,At,rie,8,0],Mie=[0,At,nie,8,0],Oie=[0,At,aie,8,0],Nie=[0,At,fie,8,0],gU=[0,At,gie,8,0],hU=[3,At,iie,0,[Sie,vie,Tie,Pie,Rie,eU,wie,Iie,Aie],[0,[()=>Mie,0],0,0,0,[()=>gU,0],64,0,[()=>Oie,0]],3],yU=[3,At,sie,0,[Eie,kie,Cie,eU,bie],[[()=>Die,0],0,1,[()=>gU,0],[()=>Nie,0]]],OC=[9,At,oie,{[xie]:["POST","/token",200]},()=>hU,()=>yU]});var _U,EU,og,ig,SU,vU=D(()=>{Dt();mo();Xe();_U=I(ue()),EU=I(Gr()),og=I(gt()),ig=I(ft());HP();Xz();ng();SU=i(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??og.fromBase64,base64Encoder:e?.base64Encoder??og.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Zz,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??CL,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Lt},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new jr}],logger:e?.logger??new _U.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:MC,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??EU.parseUrl,utf8Decoder:e?.utf8Decoder??ig.fromUtf8,utf8Encoder:e?.utf8Encoder??ig.toUtf8}),"getRuntimeConfig")});var sg,ss,AU,ag,is,cg,ug,RU,PU,CU,TU,xU=D(()=>{rl();yt();Dt();sg=I(Hi()),ss=I(Nt()),AU=I(Wi()),ag=I(hr()),is=I(cn()),cg=I(to()),ug=I(ue()),RU=I(Ji()),PU=I(Ki()),CU=I(Mn());vU();TU=i(e=>{(0,ug.emitWarningIfUnsupportedVersion)(process.version);let t=(0,PU.resolveDefaultsModeConfig)(e),r=i(()=>t().then(ug.loadConfigsForDefaultMode),"defaultConfigProvider"),n=SU(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,is.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??RU.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,sg.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Vi.version}),maxAttempts:e?.maxAttempts??(0,is.loadConfig)(ag.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,is.loadConfig)(ss.NODE_REGION_CONFIG_OPTIONS,{...ss.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:cg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,is.loadConfig)({...ag.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||CU.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??AU.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??cg.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,is.loadConfig)(ss.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,is.loadConfig)(ss.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,is.loadConfig)(sg.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var IU=N(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.warning=void 0;Tc.stsRegionDefaultResolver=zie;var bU=Nt(),Lie=cn();function zie(e={}){return(0,Lie.loadConfig)({...bU.NODE_REGION_CONFIG_OPTIONS,async default(){return Tc.warning.silence||console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."),"us-east-1"}},{...bU.NODE_REGION_CONFIG_FILE_OPTIONS,...e})}i(zie,"stsRegionDefaultResolver");Tc.warning={silence:!1}});var go=N(dn=>{"use strict";var lg=IU(),Rl=Nt(),Uie=i(e=>({setRegion(t){e.region=t},region(){return e.region}}),"getAwsRegionExtensionConfiguration"),Bie=i(e=>({region:e.region()}),"resolveAwsRegionExtensionConfiguration");dn.NODE_REGION_CONFIG_FILE_OPTIONS=Rl.NODE_REGION_CONFIG_FILE_OPTIONS;dn.NODE_REGION_CONFIG_OPTIONS=Rl.NODE_REGION_CONFIG_OPTIONS;dn.REGION_ENV_NAME=Rl.REGION_ENV_NAME;dn.REGION_INI_NAME=Rl.REGION_INI_NAME;dn.resolveRegionConfig=Rl.resolveRegionConfig;dn.getAwsRegionExtensionConfiguration=Uie;dn.resolveAwsRegionExtensionConfiguration=Bie;Object.prototype.hasOwnProperty.call(lg,"__proto__")&&!Object.prototype.hasOwnProperty.call(dn,"__proto__")&&Object.defineProperty(dn,"__proto__",{enumerable:!0,value:lg.__proto__});Object.keys(lg).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(dn,e)&&(dn[e]=lg[e])})});var wU,$U,kU=D(()=>{wU=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let a=t.findIndex(c=>c.schemeId===o.schemeId);a===-1?t.push(o):t.splice(a,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),$U=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var dg,pg,mg,DU,MU=D(()=>{dg=I(go()),pg=I(Me()),mg=I(ue());kU();DU=i((e,t)=>{let r=Object.assign((0,dg.getAwsRegionExtensionConfiguration)(e),(0,mg.getDefaultExtensionConfiguration)(e),(0,pg.getHttpHandlerExtensionConfiguration)(e),wU(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,dg.resolveAwsRegionExtensionConfiguration)(r),(0,mg.resolveDefaultRuntimeConfig)(r),(0,pg.resolveHttpHandlerRuntimeConfig)(r),$U(r))},"resolveRuntimeExtensions")});var fg,OU,NU,gg,LU,zU,UU,hg,NC,Pl,LC=D(()=>{fg=I(xi()),OU=I(bi()),NU=I(Ii()),gg=I(ti()),LU=I(Nt());Xe();ke();zU=I(zi()),UU=I(gr()),hg=I(hr()),NC=I(ue());HP();WP();xU();MU();Pl=class extends NC.Client{static{i(this,"SSOOIDCClient")}config;constructor(...[t]){let r=TU(t||{});super(r),this.initConfig=r;let n=xL(r),o=(0,gg.resolveUserAgentConfig)(n),a=(0,hg.resolveRetryConfig)(o),c=(0,LU.resolveRegionConfig)(a),u=(0,fg.resolveHostHeaderConfig)(c),l=(0,UU.resolveEndpointConfig)(u),d=TL(l),_=DU(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,gg.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,hg.getRetryPlugin)(this.config)),this.middlewareStack.use((0,zU.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,fg.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,OU.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,NU.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:PL,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var BU,zC,Cl,UC=D(()=>{BU=I(gr()),zC=I(ue());WP();ng();Cl=class extends zC.Command.classBuilder().ep(bL).m(function(t,r,n,o){return[(0,BU.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(OC).build(){static{i(this,"CreateTokenCommand")}}});var GU,Gie,yg,FU=D(()=>{GU=I(ue());UC();LC();Gie={CreateTokenCommand:Cl},yg=class extends Pl{static{i(this,"SSOOIDC")}};(0,GU.createAggregatedClient)(Gie,yg)});var jU=D(()=>{UC()});var Fie,jie,qU=D(()=>{Fie={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},jie={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"}});var VU=D(()=>{});var Tl={};bt(Tl,{$Command:()=>zC.Command,AccessDeniedException:()=>pl,AccessDeniedException$:()=>oU,AccessDeniedExceptionReason:()=>Fie,AuthorizationPendingException:()=>ml,AuthorizationPendingException$:()=>iU,CreateToken$:()=>OC,CreateTokenCommand:()=>Cl,CreateTokenRequest$:()=>hU,CreateTokenResponse$:()=>yU,ExpiredTokenException:()=>fl,ExpiredTokenException$:()=>sU,InternalServerException:()=>gl,InternalServerException$:()=>aU,InvalidClientException:()=>hl,InvalidClientException$:()=>cU,InvalidGrantException:()=>yl,InvalidGrantException$:()=>uU,InvalidRequestException:()=>_l,InvalidRequestException$:()=>lU,InvalidRequestExceptionReason:()=>jie,InvalidScopeException:()=>El,InvalidScopeException$:()=>dU,SSOOIDC:()=>yg,SSOOIDCClient:()=>Pl,SSOOIDCServiceException:()=>zt,SSOOIDCServiceException$:()=>nU,SlowDownException:()=>Sl,SlowDownException$:()=>pU,UnauthorizedClientException:()=>vl,UnauthorizedClientException$:()=>mU,UnsupportedGrantTypeException:()=>Al,UnsupportedGrantTypeException$:()=>fU,__Client:()=>NC.Client,errorTypeRegistries:()=>MC});var xl=D(()=>{LC();FU();jU();ng();qU();DC();VU();rg()});var GC=N(Il=>{"use strict";var qie=(yt(),Q(Pr)),Vie=(Dt(),Q(pc)),Hr=jt(),bl=On(),Hie=require("node:fs"),Wie=i(({logger:e,signingName:t}={})=>async()=>{if(e?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"),!t)throw new Hr.TokenProviderError("Please pass 'signingName' to compute environment variable key",{logger:e});let r=Vie.getBearerTokenEnvKey(t);if(!(r in process.env))throw new Hr.TokenProviderError(`Token not present in '${r}' environment variable`,{logger:e});let n={token:process.env[r]};return qie.setTokenFeature(n,"BEARER_SERVICE_ENV_VARS","3"),n},"fromEnvSigningName"),Jie=300*1e3,BC="To refresh this SSO session run 'aws sso login' with the corresponding profile.",Kie=i(async(e,t={},r)=>{let{SSOOIDCClient:n}=await Promise.resolve().then(()=>(xl(),Tl)),o=i(c=>t.clientConfig?.[c]??t.parentClientConfig?.[c]??r?.[c],"coalesce");return new n(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:o("logger"),userAgentAppId:o("userAgentAppId")}))},"getSsoOidcClient"),Zie=i(async(e,t,r={},n)=>{let{CreateTokenCommand:o}=await Promise.resolve().then(()=>(xl(),Tl));return(await Kie(t,r,n)).send(new o({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken"),HU=i(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Hr.TokenProviderError(`Token is expired. ${BC}`,!1)},"validateTokenExpiry"),na=i((e,t,r=!1)=>{if(typeof t>"u")throw new Hr.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${BC}`,!1)},"validateTokenKey"),{writeFile:Xie}=Hie.promises,Yie=i((e,t)=>{let r=bl.getSSOTokenFilepath(e),n=JSON.stringify(t,null,2);return Xie(r,n)},"writeSSOTokenToFile"),WU=new Date(0),JU=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await bl.parseKnownFiles(e),n=bl.getProfileName({profile:e.profile??t?.profile}),o=r[n];if(o){if(!o.sso_session)throw new Hr.TokenProviderError(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new Hr.TokenProviderError(`Profile '${n}' could not be found in shared credentials file.`,!1);let a=o.sso_session,u=(await bl.loadSsoSessionData(e))[a];if(!u)throw new Hr.TokenProviderError(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let g of["sso_start_url","sso_region"])if(!u[g])throw new Hr.TokenProviderError(`Sso session '${a}' is missing required property '${g}'.`,!1);u.sso_start_url;let l=u.sso_region,d;try{d=await bl.getSSOTokenFromFile(a)}catch{throw new Hr.TokenProviderError(`The SSO session token associated with profile=${n} was not found or is invalid. ${BC}`,!1)}na("accessToken",d.accessToken),na("expiresAt",d.expiresAt);let{accessToken:_,expiresAt:y}=d,E={token:_,expiration:new Date(y)};if(E.expiration.getTime()-Date.now()>Jie)return E;if(Date.now()-WU.getTime()<30*1e3)return HU(E),E;na("clientId",d.clientId,!0),na("clientSecret",d.clientSecret,!0),na("refreshToken",d.refreshToken,!0);try{WU.setTime(Date.now());let g=await Zie(d,l,e,t);na("accessToken",g.accessToken),na("expiresIn",g.expiresIn);let v=new Date(Date.now()+g.expiresIn*1e3);try{await Yie(a,{...d,accessToken:g.accessToken,expiresAt:v.toISOString(),refreshToken:g.refreshToken})}catch{}return{token:g.accessToken,expiration:v}}catch{return HU(E),E}},"fromSso"),Qie=i(({token:e,logger:t})=>async()=>{if(t?.debug("@aws-sdk/token-providers - fromStatic"),!e||!e.token)throw new Hr.TokenProviderError("Please pass a valid token to fromStatic",!1);return e},"fromStatic"),ese=i((e={})=>Hr.memoize(Hr.chain(JU(e),async()=>{throw new Hr.TokenProviderError("Could not load token from any providers",!1)}),t=>t.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,t=>t.expiration!==void 0),"nodeProvider");Il.fromEnvSigningName=Wie;Il.fromSso=JU;Il.fromStatic=Qie;Il.nodeProvider=ese});function tse(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function rse(e){return{schemeId:"smithy.api#noAuth"}}var wl,KU,ZU,XU,FC=D(()=>{Dt();wl=I(It()),KU=i(async(e,t,r)=>({operation:(0,wl.getSmithyContext)(t).operation,region:await(0,wl.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSSOHttpAuthSchemeParametersProvider");i(tse,"createAwsAuthSigv4HttpAuthOption");i(rse,"createSmithyApiNoAuthHttpAuthOption");ZU=i(e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(rse(e)):t.push(tse(e)),t},"defaultSSOHttpAuthSchemeProvider"),XU=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,wl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var YU,QU,jC=D(()=>{YU=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),"resolveClientEndpointParameters"),QU={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var oB,$l,oa,_g,eB,iB,Eg,qC,tB,VC,xc,rB,nB,nse,xr,ose,sB,aB=D(()=>{oB=I(er()),$l="ref",oa=-1,_g=!0,eB="isSet",iB="PartitionResult",Eg="booleanEquals",qC="getAttr",tB={[$l]:"Endpoint"},VC={[$l]:iB},xc={},rB=[{[$l]:"Region"}],nB={conditions:[[eB,[tB]],[eB,rB],["aws.partition",rB,iB],[Eg,[{[$l]:"UseFIPS"},_g]],[Eg,[{[$l]:"UseDualStack"},_g]],[Eg,[{fn:qC,argv:[VC,"supportsDualStack"]},_g]],[Eg,[{fn:qC,argv:[VC,"supportsFIPS"]},_g]],["stringEquals",[{fn:qC,argv:[VC,"name"]},"aws-us-gov"]]],results:[[oa],[oa,"Invalid Configuration: FIPS and custom endpoint are not supported"],[oa,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[tB,xc],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",xc],[oa,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",xc],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",xc],[oa,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",xc],[oa,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",xc],[oa,"Invalid Configuration: Missing Region"]]},nse=2,xr=1e8,ose=new Int32Array([-1,1,-1,0,13,3,1,4,xr+12,2,5,xr+12,3,8,6,4,7,xr+11,5,xr+9,xr+10,4,11,9,6,10,xr+8,7,xr+6,xr+7,5,12,xr+5,6,xr+4,xr+5,3,xr+1,14,4,xr+2,xr+3]),sB=oB.BinaryDecisionDiagram.from(ose,nse,nB.conditions,nB.results)});var cB,bc,ise,uB,lB=D(()=>{cB=I(Di()),bc=I(er());aB();ise=new bc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),uB=i((e,t={})=>ise.get(e,()=>(0,bc.decideEndpoint)(sB,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");bc.customEndpointFunctions.aws=cB.awsEndpointFunctions});var dB,Bn,Sg=D(()=>{dB=I(ue()),Bn=class e extends dB.ServiceException{static{i(this,"SSOServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var kl,Dl,Ml,Ol,HC=D(()=>{Sg();kl=class e extends Bn{static{i(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Dl=class e extends Bn{static{i(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ml=class e extends Bn{static{i(this,"TooManyRequestsException")}name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ol=class e extends Bn{static{i(this,"UnauthorizedException")}name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}}});var sse,ase,cse,use,lse,dse,pse,mse,fse,gse,hse,yse,_se,Ese,Sse,vg,Ag,vse,Ase,Rg,Rse,pB,Pg,Pse,Cse,Tse,mB,xse,bse,Ise,pn,fB,gB,Nl,hB,yB,_B,EB,WC,wse,$se,kse,SB,vB,AB,JC,Cg=D(()=>{ke();HC();Sg();sse="AccessTokenType",ase="GetRoleCredentials",cse="GetRoleCredentialsRequest",use="GetRoleCredentialsResponse",lse="InvalidRequestException",dse="RoleCredentials",pse="ResourceNotFoundException",mse="SecretAccessKeyType",fse="SessionTokenType",gse="TooManyRequestsException",hse="UnauthorizedException",yse="accountId",_se="accessKeyId",Ese="accessToken",Sse="account_id",vg="client",Ag="error",vse="expiration",Ase="http",Rg="httpError",Rse="httpHeader",pB="httpQuery",Pg="message",Pse="roleCredentials",Cse="roleName",Tse="role_name",mB="smithy.ts.sdk.synthetic.com.amazonaws.sso",xse="secretAccessKey",bse="sessionToken",Ise="x-amz-sso_bearer_token",pn="com.amazonaws.sso",fB=ot.for(mB),gB=[-3,mB,"SSOServiceException",0,[],[]];fB.registerError(gB,Bn);Nl=ot.for(pn),hB=[-3,pn,lse,{[Ag]:vg,[Rg]:400},[Pg],[0]];Nl.registerError(hB,kl);yB=[-3,pn,pse,{[Ag]:vg,[Rg]:404},[Pg],[0]];Nl.registerError(yB,Dl);_B=[-3,pn,gse,{[Ag]:vg,[Rg]:429},[Pg],[0]];Nl.registerError(_B,Ml);EB=[-3,pn,hse,{[Ag]:vg,[Rg]:401},[Pg],[0]];Nl.registerError(EB,Ol);WC=[fB,Nl],wse=[0,pn,sse,8,0],$se=[0,pn,mse,8,0],kse=[0,pn,fse,8,0],SB=[3,pn,cse,0,[Cse,yse,Ese],[[0,{[pB]:Tse}],[0,{[pB]:Sse}],[()=>wse,{[Rse]:Ise}]],3],vB=[3,pn,use,0,[Pse],[[()=>AB,0]]],AB=[3,pn,dse,0,[_se,xse,bse,vse],[0,[()=>$se,0],[()=>kse,0],1]],JC=[9,pn,ase,{[Ase]:["GET","/federation/credentials",200]},()=>SB,()=>vB]});var RB,PB,Tg,xg,CB,TB=D(()=>{Dt();mo();Xe();RB=I(ue()),PB=I(Gr()),Tg=I(gt()),xg=I(ft());FC();lB();Cg();CB=i(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Tg.fromBase64,base64Encoder:e?.base64Encoder??Tg.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??uB,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ZU,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Lt},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new jr}],logger:e?.logger??new RB.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:WC,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??PB.parseUrl,utf8Decoder:e?.utf8Decoder??xg.fromUtf8,utf8Encoder:e?.utf8Encoder??xg.toUtf8}),"getRuntimeConfig")});var bg,cs,xB,Ig,as,wg,$g,bB,IB,wB,$B,kB=D(()=>{rl();yt();Dt();bg=I(Hi()),cs=I(Nt()),xB=I(Wi()),Ig=I(hr()),as=I(cn()),wg=I(to()),$g=I(ue()),bB=I(Ji()),IB=I(Ki()),wB=I(Mn());TB();$B=i(e=>{(0,$g.emitWarningIfUnsupportedVersion)(process.version);let t=(0,IB.resolveDefaultsModeConfig)(e),r=i(()=>t().then($g.loadConfigsForDefaultMode),"defaultConfigProvider"),n=CB(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,as.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??bB.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,bg.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Vi.version}),maxAttempts:e?.maxAttempts??(0,as.loadConfig)(Ig.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,as.loadConfig)(cs.NODE_REGION_CONFIG_OPTIONS,{...cs.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:wg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,as.loadConfig)({...Ig.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||wB.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??xB.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??wg.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,as.loadConfig)(cs.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,as.loadConfig)(cs.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,as.loadConfig)(bg.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var DB,MB,OB=D(()=>{DB=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let a=t.findIndex(c=>c.schemeId===o.schemeId);a===-1?t.push(o):t.splice(a,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),MB=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var kg,Dg,Mg,NB,LB=D(()=>{kg=I(go()),Dg=I(Me()),Mg=I(ue());OB();NB=i((e,t)=>{let r=Object.assign((0,kg.getAwsRegionExtensionConfiguration)(e),(0,Mg.getDefaultExtensionConfiguration)(e),(0,Dg.getHttpHandlerExtensionConfiguration)(e),DB(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,kg.resolveAwsRegionExtensionConfiguration)(r),(0,Mg.resolveDefaultRuntimeConfig)(r),(0,Dg.resolveHttpHandlerRuntimeConfig)(r),MB(r))},"resolveRuntimeExtensions")});var Og,zB,UB,Ng,BB,GB,FB,Lg,KC,Ll,ZC=D(()=>{Og=I(xi()),zB=I(bi()),UB=I(Ii()),Ng=I(ti()),BB=I(Nt());Xe();ke();GB=I(zi()),FB=I(gr()),Lg=I(hr()),KC=I(ue());FC();jC();kB();LB();Ll=class extends KC.Client{static{i(this,"SSOClient")}config;constructor(...[t]){let r=$B(t||{});super(r),this.initConfig=r;let n=YU(r),o=(0,Ng.resolveUserAgentConfig)(n),a=(0,Lg.resolveRetryConfig)(o),c=(0,BB.resolveRegionConfig)(a),u=(0,Og.resolveHostHeaderConfig)(c),l=(0,FB.resolveEndpointConfig)(u),d=XU(l),_=NB(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,Ng.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Lg.getRetryPlugin)(this.config)),this.middlewareStack.use((0,GB.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Og.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,zB.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,UB.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:KU,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var jB,XC,zl,YC=D(()=>{jB=I(gr()),XC=I(ue());jC();Cg();zl=class extends XC.Command.classBuilder().ep(QU).m(function(t,r,n,o){return[(0,jB.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(JC).build(){static{i(this,"GetRoleCredentialsCommand")}}});var qB,Dse,zg,VB=D(()=>{qB=I(ue());YC();ZC();Dse={GetRoleCredentialsCommand:zl},zg=class extends Ll{static{i(this,"SSO")}};(0,qB.createAggregatedClient)(Dse,zg)});var HB=D(()=>{YC()});var WB=D(()=>{});var JB={};bt(JB,{$Command:()=>XC.Command,GetRoleCredentials$:()=>JC,GetRoleCredentialsCommand:()=>zl,GetRoleCredentialsRequest$:()=>SB,GetRoleCredentialsResponse$:()=>vB,InvalidRequestException:()=>kl,InvalidRequestException$:()=>hB,ResourceNotFoundException:()=>Dl,ResourceNotFoundException$:()=>yB,RoleCredentials$:()=>AB,SSO:()=>zg,SSOClient:()=>Ll,SSOServiceException:()=>Bn,SSOServiceException$:()=>gB,TooManyRequestsException:()=>Ml,TooManyRequestsException$:()=>_B,UnauthorizedException:()=>Ol,UnauthorizedException$:()=>EB,__Client:()=>KC.Client,errorTypeRegistries:()=>WC});var KB=D(()=>{ZC();VB();HB();Cg();HC();WB();Sg()});var XB=N(QC=>{"use strict";var ZB=(KB(),Q(JB));QC.GetRoleCredentialsCommand=ZB.GetRoleCredentialsCommand;QC.SSOClient=ZB.SSOClient});var eT=N(Bg=>{"use strict";var Gn=jt(),Ug=On(),YB=(yt(),Q(Pr)),Mse=GC(),eG=i(e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),"isSsoProfile"),Ul=!1,QB=i(async({ssoStartUrl:e,ssoSession:t,ssoAccountId:r,ssoRegion:n,ssoRoleName:o,ssoClient:a,clientConfig:c,parentClientConfig:u,callerClientConfig:l,profile:d,filepath:_,configFilepath:y,ignoreCache:E,logger:g})=>{let v,A="To refresh this SSO session run aws sso login with the corresponding profile.";if(t)try{let Lr=await Mse.fromSso({profile:d,filepath:_,configFilepath:y,ignoreCache:E})();v={accessToken:Lr.token,expiresAt:new Date(Lr.expiration).toISOString()}}catch(Lr){throw new Gn.CredentialsProviderError(Lr.message,{tryNextLink:Ul,logger:g})}else try{v=await Ug.getSSOTokenFromFile(e)}catch{throw new Gn.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${A}`,{tryNextLink:Ul,logger:g})}if(new Date(v.expiresAt).getTime()-Date.now()<=0)throw new Gn.CredentialsProviderError(`The SSO session associated with this profile has expired. ${A}`,{tryNextLink:Ul,logger:g});let{accessToken:R}=v,{SSOClient:b,GetRoleCredentialsCommand:$}=await Promise.resolve().then(function(){return XB()}),G=a||new b(Object.assign({},c??{},{logger:c?.logger??l?.logger??u?.logger,region:c?.region??n,userAgentAppId:c?.userAgentAppId??l?.userAgentAppId??u?.userAgentAppId})),Y;try{Y=await G.send(new $({accountId:r,roleName:o,accessToken:R}))}catch(Lr){throw new Gn.CredentialsProviderError(Lr,{tryNextLink:Ul,logger:g})}let{roleCredentials:{accessKeyId:pe,secretAccessKey:me,sessionToken:xt,expiration:we,credentialScope:Kt,accountId:In}={}}=Y;if(!pe||!me||!xt||!we)throw new Gn.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:Ul,logger:g});let ko={accessKeyId:pe,secretAccessKey:me,sessionToken:xt,expiration:new Date(we),...Kt&&{credentialScope:Kt},...In&&{accountId:In}};return t?YB.setCredentialFeature(ko,"CREDENTIALS_SSO","s"):YB.setCredentialFeature(ko,"CREDENTIALS_SSO_LEGACY","u"),ko},"resolveSSOCredentials"),tG=i((e,t)=>{let{sso_start_url:r,sso_account_id:n,sso_region:o,sso_role_name:a}=e;if(!r||!n||!o||!a)throw new Gn.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
|
|
49
|
+
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:t});return e},"validateSsoProfile"),Ose=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:o,ssoRoleName:a,ssoSession:c}=e,{ssoClient:u}=e,l=Ug.getProfileName({profile:e.profile??t?.profile});if(!r&&!n&&!o&&!a&&!c){let _=(await Ug.parseKnownFiles(e))[l];if(!_)throw new Gn.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!eG(_))throw new Gn.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(_?.sso_session){let b=(await Ug.loadSsoSessionData(e))[_.sso_session],$=` configurations in profile ${l} and sso-session ${_.sso_session}`;if(o&&o!==b.sso_region)throw new Gn.CredentialsProviderError("Conflicting SSO region"+$,{tryNextLink:!1,logger:e.logger});if(r&&r!==b.sso_start_url)throw new Gn.CredentialsProviderError("Conflicting SSO start_url"+$,{tryNextLink:!1,logger:e.logger});_.sso_region=b.sso_region,_.sso_start_url=b.sso_start_url}let{sso_start_url:y,sso_account_id:E,sso_region:g,sso_role_name:v,sso_session:A}=tG(_,e.logger);return QB({ssoStartUrl:y,ssoSession:A,ssoAccountId:E,ssoRegion:g,ssoRoleName:v,ssoClient:u,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:l,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else{if(!r||!n||!o||!a)throw new Gn.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});return QB({ssoStartUrl:r,ssoSession:c,ssoAccountId:n,ssoRegion:o,ssoRoleName:a,ssoClient:u,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:l,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}},"fromSSO");Bg.fromSSO=Ose;Bg.isSsoProfile=eG;Bg.validateSsoProfile=tG});function Nse(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function Lse(e){return{schemeId:"smithy.api#noAuth"}}var Bl,rG,nG,oG,tT=D(()=>{Dt();Bl=I(It()),rG=i(async(e,t,r)=>({operation:(0,Bl.getSmithyContext)(t).operation,region:await(0,Bl.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSigninHttpAuthSchemeParametersProvider");i(Nse,"createAwsAuthSigv4HttpAuthOption");i(Lse,"createSmithyApiNoAuthHttpAuthOption");nG=i(e=>{let t=[];return e.operation==="CreateOAuth2Token"?t.push(Lse(e)):t.push(Nse(e)),t},"defaultSigninHttpAuthSchemeProvider"),oG=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,Bl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var iG,sG,rT=D(()=>{iG=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),"resolveClientEndpointParameters"),sG={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var dG,Gl,ia,Gg,aG,pG,Fg,iT,nT,cG,sT,oT,us,uG,lG,zse,or,Use,mG,fG=D(()=>{dG=I(er()),Gl="ref",ia=-1,Gg=!0,aG="isSet",pG="PartitionResult",Fg="booleanEquals",iT="getAttr",nT="stringEquals",cG={[Gl]:"Endpoint"},sT={[Gl]:pG},oT={fn:iT,argv:[sT,"name"]},us={},uG=[{[Gl]:"Region"}],lG={conditions:[[aG,[cG]],[aG,uG],["aws.partition",uG,pG],[Fg,[{[Gl]:"UseFIPS"},Gg]],[Fg,[{[Gl]:"UseDualStack"},Gg]],[Fg,[{fn:iT,argv:[sT,"supportsDualStack"]},Gg]],[Fg,[{fn:iT,argv:[sT,"supportsFIPS"]},Gg]],[nT,[oT,"aws"]],[nT,[oT,"aws-cn"]],[nT,[oT,"aws-us-gov"]]],results:[[ia],[ia,"Invalid Configuration: FIPS and custom endpoint are not supported"],[ia,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[cG,us],["https://{Region}.signin.aws.amazon.com",us],["https://{Region}.signin.amazonaws.cn",us],["https://{Region}.signin.amazonaws-us-gov.com",us],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",us],[ia,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",us],[ia,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",us],[ia,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",us],[ia,"Invalid Configuration: Missing Region"]]},zse=2,or=1e8,Use=new Int32Array([-1,1,-1,0,15,3,1,4,or+14,2,5,or+14,3,11,6,4,10,7,7,or+4,8,8,or+5,9,9,or+6,or+13,5,or+11,or+12,4,13,12,6,or+9,or+10,5,14,or+8,6,or+7,or+8,3,or+1,16,4,or+2,or+3]),mG=dG.BinaryDecisionDiagram.from(Use,zse,lG.conditions,lG.results)});var gG,Ic,Bse,hG,yG=D(()=>{gG=I(Di()),Ic=I(er());fG();Bse=new Ic.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),hG=i((e,t={})=>Bse.get(e,()=>(0,Ic.decideEndpoint)(mG,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Ic.customEndpointFunctions.aws=gG.awsEndpointFunctions});var _G,Fn,jg=D(()=>{_G=I(ue()),Fn=class e extends _G.ServiceException{static{i(this,"SigninServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var Fl,jl,ql,Vl,aT=D(()=>{jg();Fl=class e extends Fn{static{i(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},jl=class e extends Fn{static{i(this,"InternalServerException")}name="InternalServerException";$fault="server";error;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},ql=class e extends Fn{static{i(this,"TooManyRequestsError")}name="TooManyRequestsError";$fault="client";error;constructor(t){super({name:"TooManyRequestsError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},Vl=class e extends Fn{static{i(this,"ValidationException")}name="ValidationException";$fault="client";error;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}}});var Gse,Fse,jse,qse,Vse,Hse,Wse,Jse,Kse,Zse,Xse,EG,SG,cT,vG,AG,Yse,ls,RG,PG,Qse,uT,CG,Wr,Vg,qg,TG,wG,xG,bG,eae,tae,rae,IG,mn,$G,kG,Hl,DG,MG,OG,NG,lT,LG,zG,UG,BG,GG,FG,dT,Hg=D(()=>{ke();aT();jg();Gse="AccessDeniedException",Fse="AccessToken",jse="CreateOAuth2Token",qse="CreateOAuth2TokenRequest",Vse="CreateOAuth2TokenRequestBody",Hse="CreateOAuth2TokenResponseBody",Wse="CreateOAuth2TokenResponse",Jse="InternalServerException",Kse="RefreshToken",Zse="TooManyRequestsError",Xse="ValidationException",EG="accessKeyId",SG="accessToken",cT="client",vG="clientId",AG="codeVerifier",Yse="code",ls="error",RG="expiresIn",PG="grantType",Qse="http",uT="httpError",CG="idToken",Wr="jsonName",Vg="message",qg="refreshToken",TG="redirectUri",wG="smithy.ts.sdk.synthetic.com.amazonaws.signin",xG="secretAccessKey",bG="sessionToken",eae="server",tae="tokenInput",rae="tokenOutput",IG="tokenType",mn="com.amazonaws.signin",$G=ot.for(wG),kG=[-3,wG,"SigninServiceException",0,[],[]];$G.registerError(kG,Fn);Hl=ot.for(mn),DG=[-3,mn,Gse,{[ls]:cT},[ls,Vg],[0,0],2];Hl.registerError(DG,Fl);MG=[-3,mn,Jse,{[ls]:eae,[uT]:500},[ls,Vg],[0,0],2];Hl.registerError(MG,jl);OG=[-3,mn,Zse,{[ls]:cT,[uT]:429},[ls,Vg],[0,0],2];Hl.registerError(OG,ql);NG=[-3,mn,Xse,{[ls]:cT,[uT]:400},[ls,Vg],[0,0],2];Hl.registerError(NG,Vl);lT=[$G,Hl],LG=[0,mn,Kse,8,0],zG=[3,mn,Fse,8,[EG,xG,bG],[[0,{[Wr]:EG}],[0,{[Wr]:xG}],[0,{[Wr]:bG}]],3],UG=[3,mn,qse,0,[tae],[[()=>BG,16]],1],BG=[3,mn,Vse,0,[vG,PG,Yse,TG,AG,qg],[[0,{[Wr]:vG}],[0,{[Wr]:PG}],0,[0,{[Wr]:TG}],[0,{[Wr]:AG}],[()=>LG,{[Wr]:qg}]],2],GG=[3,mn,Wse,0,[rae],[[()=>FG,16]],1],FG=[3,mn,Hse,0,[SG,IG,RG,qg,CG],[[()=>zG,{[Wr]:SG}],[0,{[Wr]:IG}],[1,{[Wr]:RG}],[()=>LG,{[Wr]:qg}],[0,{[Wr]:CG}]],4],dT=[9,mn,jse,{[Qse]:["POST","/v1/token",200]},()=>UG,()=>GG]});var jG,qG,Wg,Jg,VG,HG=D(()=>{Dt();mo();Xe();jG=I(ue()),qG=I(Gr()),Wg=I(gt()),Jg=I(ft());tT();yG();Hg();VG=i(e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Wg.fromBase64,base64Encoder:e?.base64Encoder??Wg.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??hG,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??nG,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Lt},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new jr}],logger:e?.logger??new jG.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:lT,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??qG.parseUrl,utf8Decoder:e?.utf8Decoder??Jg.fromUtf8,utf8Encoder:e?.utf8Encoder??Jg.toUtf8}),"getRuntimeConfig")});var Kg,ps,WG,Zg,ds,Xg,Yg,JG,KG,ZG,XG,YG=D(()=>{rl();yt();Dt();Kg=I(Hi()),ps=I(Nt()),WG=I(Wi()),Zg=I(hr()),ds=I(cn()),Xg=I(to()),Yg=I(ue()),JG=I(Ji()),KG=I(Ki()),ZG=I(Mn());HG();XG=i(e=>{(0,Yg.emitWarningIfUnsupportedVersion)(process.version);let t=(0,KG.resolveDefaultsModeConfig)(e),r=i(()=>t().then(Yg.loadConfigsForDefaultMode),"defaultConfigProvider"),n=VG(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,ds.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??JG.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Kg.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Vi.version}),maxAttempts:e?.maxAttempts??(0,ds.loadConfig)(Zg.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,ds.loadConfig)(ps.NODE_REGION_CONFIG_OPTIONS,{...ps.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:Xg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,ds.loadConfig)({...Zg.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||ZG.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??WG.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Xg.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ds.loadConfig)(ps.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,ds.loadConfig)(ps.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,ds.loadConfig)(Kg.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var QG,eF,tF=D(()=>{QG=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let a=t.findIndex(c=>c.schemeId===o.schemeId);a===-1?t.push(o):t.splice(a,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),eF=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var Qg,eh,th,rF,nF=D(()=>{Qg=I(go()),eh=I(Me()),th=I(ue());tF();rF=i((e,t)=>{let r=Object.assign((0,Qg.getAwsRegionExtensionConfiguration)(e),(0,th.getDefaultExtensionConfiguration)(e),(0,eh.getHttpHandlerExtensionConfiguration)(e),QG(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,Qg.resolveAwsRegionExtensionConfiguration)(r),(0,th.resolveDefaultRuntimeConfig)(r),(0,eh.resolveHttpHandlerRuntimeConfig)(r),eF(r))},"resolveRuntimeExtensions")});var rh,oF,iF,nh,sF,aF,cF,oh,pT,Wl,mT=D(()=>{rh=I(xi()),oF=I(bi()),iF=I(Ii()),nh=I(ti()),sF=I(Nt());Xe();ke();aF=I(zi()),cF=I(gr()),oh=I(hr()),pT=I(ue());tT();rT();YG();nF();Wl=class extends pT.Client{static{i(this,"SigninClient")}config;constructor(...[t]){let r=XG(t||{});super(r),this.initConfig=r;let n=iG(r),o=(0,nh.resolveUserAgentConfig)(n),a=(0,oh.resolveRetryConfig)(o),c=(0,sF.resolveRegionConfig)(a),u=(0,rh.resolveHostHeaderConfig)(c),l=(0,cF.resolveEndpointConfig)(u),d=oG(l),_=rF(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,nh.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,oh.getRetryPlugin)(this.config)),this.middlewareStack.use((0,aF.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,rh.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,oF.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,iF.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:rG,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var uF,fT,Jl,gT=D(()=>{uF=I(gr()),fT=I(ue());rT();Hg();Jl=class extends fT.Command.classBuilder().ep(sG).m(function(t,r,n,o){return[(0,uF.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(dT).build(){static{i(this,"CreateOAuth2TokenCommand")}}});var lF,nae,ih,dF=D(()=>{lF=I(ue());gT();mT();nae={CreateOAuth2TokenCommand:Jl},ih=class extends Wl{static{i(this,"Signin")}};(0,lF.createAggregatedClient)(nae,ih)});var pF=D(()=>{gT()});var oae,mF=D(()=>{oae={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"}});var fF=D(()=>{});var gF={};bt(gF,{$Command:()=>fT.Command,AccessDeniedException:()=>Fl,AccessDeniedException$:()=>DG,AccessToken$:()=>zG,CreateOAuth2Token$:()=>dT,CreateOAuth2TokenCommand:()=>Jl,CreateOAuth2TokenRequest$:()=>UG,CreateOAuth2TokenRequestBody$:()=>BG,CreateOAuth2TokenResponse$:()=>GG,CreateOAuth2TokenResponseBody$:()=>FG,InternalServerException:()=>jl,InternalServerException$:()=>MG,OAuth2ErrorCode:()=>oae,Signin:()=>ih,SigninClient:()=>Wl,SigninServiceException:()=>Fn,SigninServiceException$:()=>kG,TooManyRequestsError:()=>ql,TooManyRequestsError$:()=>OG,ValidationException:()=>Vl,ValidationException$:()=>NG,__Client:()=>pT.Client,errorTypeRegistries:()=>lT});var hF=D(()=>{mT();dF();pF();Hg();mF();aT();fF();jg()});var _F=N(yF=>{"use strict";var iae=(yt(),Q(Pr)),ms=jt(),_T=On(),sae=Me(),sh=require("node:crypto"),hT=require("node:fs"),aae=require("node:os"),yT=require("node:path"),ET=class e{static{i(this,"LoginCredentialsFetcher")}profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(t,r,n){this.profileData=t,this.init=r,this.callerClientConfig=n}async loadCredentials(){let t=await this.loadToken();if(!t)throw new ms.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let r=t.accessToken,n=Date.now();return new Date(r.expiresAt).getTime()-n<=e.REFRESH_THRESHOLD?this.refresh(t):{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,sessionToken:r.sessionToken,accountId:r.accountId,expiration:new Date(r.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(t){let{SigninClient:r,CreateOAuth2TokenCommand:n}=await Promise.resolve().then(()=>(hF(),gF)),{logger:o,userAgentAppId:a}=this.callerClientConfig??{},u=i(y=>y?.metadata?.handlerProtocol==="h2","isH2")(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,l=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,d=new r({credentials:{accessKeyId:"",secretAccessKey:""},region:l,requestHandler:u,logger:o,userAgentAppId:a,...this.init?.clientConfig});this.createDPoPInterceptor(d.middlewareStack);let _={tokenInput:{clientId:t.clientId,refreshToken:t.refreshToken,grantType:"refresh_token"}};try{let y=await d.send(new n(_)),{accessKeyId:E,secretAccessKey:g,sessionToken:v}=y.tokenOutput?.accessToken??{},{refreshToken:A,expiresIn:R}=y.tokenOutput??{};if(!E||!g||!v||!A)throw new ms.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let b=(R??900)*1e3,$=new Date(Date.now()+b),G={...t,accessToken:{...t.accessToken,accessKeyId:E,secretAccessKey:g,sessionToken:v,expiresAt:$.toISOString()},refreshToken:A};await this.saveToken(G);let Y=G.accessToken;return{accessKeyId:Y.accessKeyId,secretAccessKey:Y.secretAccessKey,sessionToken:Y.sessionToken,accountId:Y.accountId,expiration:$}}catch(y){if(y.name==="AccessDeniedException"){let E=y.error,g;switch(E){case"TOKEN_EXPIRED":g="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":g="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":g="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:g=`Failed to refresh token: ${String(y)}. Please re-authenticate using \`aws login\``}throw new ms.CredentialsProviderError(g,{logger:this.logger,tryNextLink:!1})}throw new ms.CredentialsProviderError(`Failed to refresh token: ${String(y)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let t=this.getTokenFilePath();try{let r;try{r=await _T.readFile(t,{ignoreCache:this.init?.ignoreCache})}catch{r=await hT.promises.readFile(t,"utf8")}let n=JSON.parse(r),o=["accessToken","clientId","refreshToken","dpopKey"].filter(a=>!n[a]);if(n.accessToken?.accountId||o.push("accountId"),o.length>0)throw new ms.CredentialsProviderError(`Token validation failed, missing fields: ${o.join(", ")}`,{logger:this.logger,tryNextLink:!1});return n}catch(r){throw new ms.CredentialsProviderError(`Failed to load token from ${t}: ${String(r)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(t){let r=this.getTokenFilePath(),n=yT.dirname(r);try{await hT.promises.mkdir(n,{recursive:!0})}catch{}await hT.promises.writeFile(r,JSON.stringify(t,null,2),"utf8")}getTokenFilePath(){let t=process.env.AWS_LOGIN_CACHE_DIRECTORY??yT.join(aae.homedir(),".aws","login","cache"),r=Buffer.from(this.loginSession,"utf8"),n=sh.createHash("sha256").update(r).digest("hex");return yT.join(t,`${n}.json`)}derToRawSignature(t){let r=2;if(t[r]!==2)throw new Error("Invalid DER signature");r++;let n=t[r++],o=t.subarray(r,r+n);if(r+=n,t[r]!==2)throw new Error("Invalid DER signature");r++;let a=t[r++],c=t.subarray(r,r+a);o=o[0]===0?o.subarray(1):o,c=c[0]===0?c.subarray(1):c;let u=Buffer.concat([Buffer.alloc(32-o.length),o]),l=Buffer.concat([Buffer.alloc(32-c.length),c]);return Buffer.concat([u,l])}createDPoPInterceptor(t){t.add(r=>async n=>{if(sae.HttpRequest.isInstance(n.request)){let o=n.request,a=`${o.protocol}//${o.hostname}${o.port?`:${o.port}`:""}${o.path}`,c=await this.generateDpop(o.method,a);o.headers={...o.headers,DPoP:c}}return r(n)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(t="POST",r){let n=await this.loadToken();try{let o=sh.createPrivateKey({key:n.dpopKey,format:"pem",type:"sec1"}),c=sh.createPublicKey(o).export({format:"der",type:"spki"}),u=-1;for(let $=0;$<c.length;$++)if(c[$]===4){u=$;break}let l=c.slice(u+1,u+33),d=c.slice(u+33,u+65),_={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:l.toString("base64url"),y:d.toString("base64url")}},y={jti:crypto.randomUUID(),htm:t,htu:r,iat:Math.floor(Date.now()/1e3)},E=Buffer.from(JSON.stringify(_)).toString("base64url"),g=Buffer.from(JSON.stringify(y)).toString("base64url"),v=`${E}.${g}`,A=sh.sign("sha256",Buffer.from(v),o),b=this.derToRawSignature(A).toString("base64url");return`${v}.${b}`}catch(o){throw new ms.CredentialsProviderError(`Failed to generate Dpop proof: ${o instanceof Error?o.message:String(o)}`,{logger:this.logger,tryNextLink:!1})}}},cae=i(e=>async({callerClientConfig:t}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let r=await _T.parseKnownFiles(e||{}),n=_T.getProfileName({profile:e?.profile??t?.profile}),o=r[n];if(!o?.login_session)throw new ms.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new ET(o,e,t).loadCredentials();return iae.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")},"fromLoginCredentials");yF.fromLoginCredentials=cae});var EF=N(ST=>{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});ST.toStream=lae;var uae=require("node:stream");function lae(e){return uae.Readable.from(Buffer.from(e))}i(lae,"toStream")});var SF=N(ah=>{"use strict";var dae=i(e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6,"validate"),pae=i(e=>{let t=e.split(":");if(t.length<6||t[0]!=="arn")throw new Error("Malformed ARN");let[,r,n,o,a,...c]=t;return{partition:r,service:n,region:o,accountId:a,resource:c.join(":")}},"parse"),mae=i(e=>{let{partition:t="aws",service:r,region:n,accountId:o,resource:a}=e;if([r,n,o,a].some(c=>typeof c!="string"))throw new Error("Input ARN object is invalid");return`arn:${t}:${r}:${n}:${o}:${a}`},"build");ah.build=mae;ah.parse=pae;ah.validate=dae});var BF=N(Fe=>{"use strict";var Kl=Me(),RF=ue(),fae=EF(),gae=SF(),hae=(mo(),Q(ll)),yae=(ke(),Q(Wo)),_ae=Ef(),ch=Hm(),Eae=(yt(),Q(Pr)),PF=(Xe(),Q(fr)),Sae=It(),vae="content-length",Aae="x-amz-decoded-content-length";function CF(){return(e,t)=>async r=>{let{request:n}=r;if(Kl.HttpRequest.isInstance(n)&&!(vae in n.headers)&&!(Aae in n.headers)){let o="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof t?.logger?.warn=="function"&&!(t.logger instanceof RF.NoOpLogger)?t.logger.warn(o):console.warn(o)}return e({...r})}}i(CF,"checkContentLengthHeader");var TF={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Rae=i(e=>({applyToStack:i(t=>{t.add(CF(),TF)},"applyToStack")}),"getCheckContentLengthHeaderPlugin"),xF=i(e=>(t,r)=>async n=>{let o=await e.region(),a=e.region,c=i(()=>{},"unlock");r.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:i(async()=>r.__s3RegionRedirect,"value")}),c=i(()=>Object.defineProperty(e,"region",{writable:!0,value:a}),"unlock"));try{let u=await t(n);if(r.__s3RegionRedirect){c();let l=await e.region();if(o!==l)throw new Error("Region was not restored following S3 region redirect.")}return u}catch(u){throw c(),u}},"regionRedirectEndpointMiddleware"),bF={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function IF(e){return(t,r)=>async n=>{try{return await t(n)}catch(o){if(e.followRegionRedirects){let a=o?.$metadata?.httpStatusCode,c=r.commandName==="HeadBucketCommand",u=o?.$response?.headers?.["x-amz-bucket-region"];if(u&&(a===301||a===400&&(o?.name==="IllegalLocationConstraintException"||c))){try{let l=u;r.logger?.debug(`Redirecting from ${await e.region()} to ${l}`),r.__s3RegionRedirect=l}catch(l){throw new Error("Region redirect failed: "+l)}return t(n)}}throw o}}}i(IF,"regionRedirectMiddleware");var wF={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Pae=i(e=>({applyToStack:i(t=>{t.add(IF(e),wF),t.addRelativeTo(xF(e),bF)},"applyToStack")}),"getRegionRedirectMiddlewarePlugin"),$F=i(e=>(t,r)=>async n=>{let o=await t(n),{response:a}=o;if(Kl.HttpResponse.isInstance(a)&&a.headers.expires){a.headers.expiresstring=a.headers.expires;try{RF.parseRfc7231DateTime(a.headers.expires)}catch(c){r.logger?.warn(`AWS SDK Warning for ${r.clientName}::${r.commandName} response parsing (${a.headers.expires}): ${c}`),delete a.headers.expires}}return o},"s3ExpiresMiddleware"),kF={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Cae=i(e=>({applyToStack:i(t=>{t.addRelativeTo($F(),kF)},"applyToStack")}),"getS3ExpiresMiddlewarePlugin"),uh=class e{static{i(this,"S3ExpressIdentityCache")}data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){let r=this.data[t];if(r)return r}set(t,r){return this.data[t]=r,r}delete(t){delete this.data[t]}async purgeExpired(){let t=Date.now();if(!(this.lastPurgeTime+e.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(let r in this.data){let n=this.data[r];if(!n.isRefreshing){let o=await n.identity;o.expiration&&o.expiration.getTime()<t&&delete this.data[r]}}}},wc=class{static{i(this,"S3ExpressIdentityCacheEntry")}_identity;isRefreshing;accessed;constructor(t,r=!1,n=Date.now()){this._identity=t,this.isRefreshing=r,this.accessed=n}get identity(){return this.accessed=Date.now(),this._identity}},lh=class e{static{i(this,"S3ExpressIdentityProviderImpl")}createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(t,r=new uh){this.createSessionFn=t,this.cache=r}async getS3ExpressIdentity(t,r){let n=r.Bucket,{cache:o}=this,a=o.get(n);return a?a.identity.then(c=>(c.expiration?.getTime()??0)<Date.now()?o.set(n,new wc(this.getIdentity(n))).identity:((c.expiration?.getTime()??0)<Date.now()+e.REFRESH_WINDOW_MS&&!a.isRefreshing&&(a.isRefreshing=!0,this.getIdentity(n).then(d=>{o.set(n,new wc(Promise.resolve(d)))})),c)):o.set(n,new wc(this.getIdentity(n))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(o=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
|
|
50
|
+
`+o)});let r=await this.createSessionFn(t);if(!r.Credentials?.AccessKeyId||!r.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretAccessKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration?new Date(r.Credentials.Expiration):void 0}}},Tae="Directory",xae="S3Express",bae="sigv4-s3express",vT="X-Amz-S3session-Token",AT=vT.toLowerCase(),Iae="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",wae="s3_disable_express_session_auth",$ae={environmentVariableSelector:i(e=>ch.booleanSelector(e,Iae,ch.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>ch.booleanSelector(e,wae,ch.SelectorType.CONFIG),"configFileSelector"),default:!1},RT=class extends _ae.SignatureV4{static{i(this,"SignatureV4S3Express")}async signWithCredentials(t,r,n){let o=vF(r);t.headers[AT]=r.sessionToken;let a=this;return AF(a,o),a.signRequest(t,n??{})}async presignWithCredentials(t,r,n){let o=vF(r);return delete t.headers[AT],t.headers[vT]=r.sessionToken,t.query=t.query??{},t.query[vT]=r.sessionToken,AF(this,o),this.presign(t,n)}};function vF(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}i(vF,"getCredentialsWithoutSessionToken");function AF(e,t){let r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),n=e.credentialProvider,o=i(()=>(clearTimeout(r),e.credentialProvider=n,Promise.resolve(t)),"overrideCredentialsProviderOnce");e.credentialProvider=o}i(AF,"setSingleOverride");var DF=i(e=>(t,r)=>async n=>{if(r.endpointV2){let o=r.endpointV2,a=o.properties?.authSchemes?.[0]?.name===bae;if((o.properties?.backend===xae||o.properties?.bucketType===Tae)&&(Eae.setFeature(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),a){let u=n.input.Bucket;if(u){let l=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:u});r.s3ExpressIdentity=l,Kl.HttpRequest.isInstance(n.request)&&l.sessionToken&&(n.request.headers[AT]=l.sessionToken)}}}return t(n)},"s3ExpressMiddleware"),MF={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},kae=i(e=>({applyToStack:i(t=>{t.add(DF(e),MF)},"applyToStack")}),"getS3ExpressPlugin"),Dae=i(async(e,t,r,n)=>{let o=await n.signWithCredentials(r,e,{});if(o.headers["X-Amz-Security-Token"]||o.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return o},"signS3Express"),Mae=i(e=>t=>{throw t},"defaultErrorHandler"),Oae=i((e,t)=>{},"defaultSuccessHandler"),Nae=PF.httpSigningMiddlewareOptions,OF=i(e=>(t,r)=>async n=>{if(!Kl.HttpRequest.isInstance(n.request))return t(n);let a=Sae.getSmithyContext(r).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:c={}},identity:u,signer:l}=a,d;r.s3ExpressIdentity?d=await Dae(r.s3ExpressIdentity,c,n.request,await e.signer()):d=await l.sign(n.request,u,c);let _=await t({...n,request:d}).catch((l.errorHandler||Mae)(c));return(l.successHandler||Oae)(_.response,c),_},"s3ExpressHttpSigningMiddleware"),Lae=i(e=>({applyToStack:i(t=>{t.addRelativeTo(OF(e),PF.httpSigningMiddlewareOptions)},"applyToStack")}),"getS3ExpressHttpSigningPlugin"),zae=i((e,{session:t})=>{let[r,n]=t,{forcePathStyle:o,useAccelerateEndpoint:a,disableMultiregionAccessPoints:c,followRegionRedirects:u,s3ExpressIdentityProvider:l,bucketEndpoint:d,expectContinueHeader:_}=e;return Object.assign(e,{forcePathStyle:o??!1,useAccelerateEndpoint:a??!1,disableMultiregionAccessPoints:c??!1,followRegionRedirects:u??!1,s3ExpressIdentityProvider:l??new lh(async y=>r().send(new n({Bucket:y}))),bucketEndpoint:d??!1,expectContinueHeader:_??2097152})},"resolveS3Config"),Uae={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},NF=i(e=>(t,r)=>async n=>{let o=await t(n),{response:a}=o;if(!Kl.HttpResponse.isInstance(a))return o;let{statusCode:c,body:u}=a;if(c<200||c>=300)return o;let l=await Bae(u,e);if(a.body=fae.toStream(l),l.length===0&&Uae[r.commandName]){let _=new Error("S3 aborted request");throw _.$metadata={httpStatusCode:503},_.name="InternalError",_}let d=e.utf8Encoder(l.subarray(l.length-16));return d&&d.endsWith("</Error>")&&(a.statusCode=503),o},"throw200ExceptionsMiddleware"),Bae=i((e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),"collectBody"),LF={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Gae=i(e=>({applyToStack:i(t=>{t.addRelativeTo(NF(e),LF)},"applyToStack")}),"getThrow200ExceptionsPlugin");function Fae(e){return(t,r)=>async n=>{if(e.bucketEndpoint){let o=r.endpointV2;if(o){let a=n.input.Bucket;if(typeof a=="string")try{let c=new URL(a);r.endpointV2={...o,url:c}}catch(c){let u=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${a} could not be parsed as URL.`;throw r.logger?.constructor?.name==="NoOpLogger"?console.warn(u):r.logger?.warn?.(u),c}}}return t(n)}}i(Fae,"bucketEndpointMiddleware");var jae={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function zF({bucketEndpoint:e}){return t=>async r=>{let{input:{Bucket:n}}=r;if(!e&&typeof n=="string"&&!gae.validate(n)&&n.indexOf("/")>=0){let o=new Error(`Bucket name shouldn't contain '/', received '${n}'`);throw o.name="InvalidBucketName",o}return t({...r})}}i(zF,"validateBucketNameMiddleware");var UF={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},qae=i(e=>({applyToStack:i(t=>{t.add(zF(e),UF),t.addRelativeTo(Fae(e),jae)},"applyToStack")}),"getValidateBucketNamePlugin"),PT=class extends hae.AwsRestXmlProtocol{static{i(this,"S3RestXmlProtocol")}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),a=yae.NormalizedSchema.of(t.input),c=a.getSchema(),u=0,l=c[6]??0;if(r&&typeof r=="object")for(let[d,_]of a.structIterator()){if(++u>l)break;if(d==="Bucket"){if(!r.Bucket&&_.getMergedTraits().httpLabel)throw new Error("No value provided for input HTTP label: Bucket.");break}}return o}};Fe.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS=$ae;Fe.S3ExpressIdentityCache=uh;Fe.S3ExpressIdentityCacheEntry=wc;Fe.S3ExpressIdentityProviderImpl=lh;Fe.S3RestXmlProtocol=PT;Fe.SignatureV4S3Express=RT;Fe.checkContentLengthHeader=CF;Fe.checkContentLengthHeaderMiddlewareOptions=TF;Fe.getCheckContentLengthHeaderPlugin=Rae;Fe.getRegionRedirectMiddlewarePlugin=Pae;Fe.getS3ExpiresMiddlewarePlugin=Cae;Fe.getS3ExpressHttpSigningPlugin=Lae;Fe.getS3ExpressPlugin=kae;Fe.getThrow200ExceptionsPlugin=Gae;Fe.getValidateBucketNamePlugin=qae;Fe.regionRedirectEndpointMiddleware=xF;Fe.regionRedirectEndpointMiddlewareOptions=bF;Fe.regionRedirectMiddleware=IF;Fe.regionRedirectMiddlewareOptions=wF;Fe.resolveS3Config=zae;Fe.s3ExpiresMiddleware=$F;Fe.s3ExpiresMiddlewareOptions=kF;Fe.s3ExpressHttpSigningMiddleware=OF;Fe.s3ExpressHttpSigningMiddlewareOptions=Nae;Fe.s3ExpressMiddleware=DF;Fe.s3ExpressMiddlewareOptions=MF;Fe.throw200ExceptionsMiddleware=NF;Fe.throw200ExceptionsMiddlewareOptions=LF;Fe.validateBucketNameMiddleware=zF;Fe.validateBucketNameMiddlewareOptions=UF});var xT=N(TT=>{"use strict";var Vae=BF(),GF=Ef(),Zl={CrtSignerV4:null},CT=class{static{i(this,"SignatureV4MultiRegion")}sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof Zl.CrtSignerV4=="function"?"crt":typeof GF.signatureV4aContainer.SignatureV4a=="function"?"js":"none"}constructor(t){this.sigv4Signer=new Vae.SignatureV4S3Express(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,n={}){if(n.signingRegion==="*"){let o=this.getSigv4aSigner(),a=Zl.CrtSignerV4;if(a&&o instanceof a)return o.signWithCredentials(t,r,n);throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(t,r,n)}async presign(t,r={}){if(r.signingRegion==="*"){let n=this.getSigv4aSigner(),o=Zl.CrtSignerV4;if(o&&n instanceof o)return n.presign(t,r);throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,n={}){if(n.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let t=Zl.CrtSignerV4,r=GF.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!t&&!r)throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(t&&typeof t=="function")this.sigv4aSigner=new t({...this.signerOptions,signingAlgorithm:1});else if(r&&typeof r=="function")this.sigv4aSigner=new r({...this.signerOptions});else throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!r||typeof r!="function")throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new r({...this.signerOptions})}}return this.sigv4aSigner}};TT.SignatureV4MultiRegion=CT;TT.signatureV4CrtContainer=Zl});var ZF,kc,sa,Xl,FF,XF,Yl,qt,bT,jF,qF,VF,HF,WF,Vt,IT,$c,JF,KF,Hae,je,Wae,YF,QF=D(()=>{ZF=I(er()),kc="ref",sa=-1,Xl=!0,FF="isSet",XF="PartitionResult",Yl="booleanEquals",qt="stringEquals",bT="getAttr",jF="us-east-1",qF="sigv4",VF="sts",HF="https://sts.{Region}.{PartitionResult#dnsSuffix}",WF={[kc]:"Endpoint"},Vt={[kc]:"Region"},IT={[kc]:XF},$c={},JF=[Vt],KF={conditions:[[FF,[WF]],[FF,JF],["aws.partition",JF,XF],[Yl,[{[kc]:"UseFIPS"},Xl]],[Yl,[{[kc]:"UseDualStack"},Xl]],[qt,[Vt,"aws-global"]],[Yl,[{[kc]:"UseGlobalEndpoint"},Xl]],[qt,[Vt,"eu-central-1"]],[Yl,[{fn:bT,argv:[IT,"supportsDualStack"]},Xl]],[Yl,[{fn:bT,argv:[IT,"supportsFIPS"]},Xl]],[qt,[Vt,"ap-south-1"]],[qt,[Vt,"eu-north-1"]],[qt,[Vt,"eu-west-1"]],[qt,[Vt,"eu-west-2"]],[qt,[Vt,"eu-west-3"]],[qt,[Vt,"sa-east-1"]],[qt,[Vt,jF]],[qt,[Vt,"us-east-2"]],[qt,[Vt,"us-west-2"]],[qt,[Vt,"us-west-1"]],[qt,[Vt,"ca-central-1"]],[qt,[Vt,"ap-southeast-1"]],[qt,[Vt,"ap-northeast-1"]],[qt,[Vt,"ap-southeast-2"]],[qt,[{fn:bT,argv:[IT,"name"]},"aws-us-gov"]]],results:[[sa],["https://sts.amazonaws.com",{authSchemes:[{name:qF,signingName:VF,signingRegion:jF}]}],[HF,{authSchemes:[{name:qF,signingName:VF,signingRegion:"{Region}"}]}],[sa,"Invalid Configuration: FIPS and custom endpoint are not supported"],[sa,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[WF,$c],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",$c],[sa,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",$c],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",$c],[sa,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",$c],[sa,"DualStack is enabled but this partition does not support DualStack"],[HF,$c],[sa,"Invalid Configuration: Missing Region"]]},Hae=2,je=1e8,Wae=new Int32Array([-1,1,-1,0,30,3,1,4,je+14,2,5,je+14,3,25,6,4,24,7,5,je+1,8,6,9,je+13,7,je+1,10,10,je+1,11,11,je+1,12,12,je+1,13,13,je+1,14,14,je+1,15,15,je+1,16,16,je+1,17,17,je+1,18,18,je+1,19,19,je+1,20,20,je+1,21,21,je+1,22,22,je+1,23,23,je+1,je+2,8,je+11,je+12,4,28,26,9,27,je+10,24,je+8,je+9,8,29,je+7,9,je+6,je+7,3,je+3,31,4,je+4,je+5]),YF=ZF.BinaryDecisionDiagram.from(Wae,Hae,KF.conditions,KF.results)});var e4,Dc,Jae,dh,wT=D(()=>{e4=I(Di()),Dc=I(er());QF();Jae=new Dc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),dh=i((e,t={})=>Jae.get(e,()=>(0,Dc.decideEndpoint)(YF,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Dc.customEndpointFunctions.aws=e4.awsEndpointFunctions});function o4(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function $T(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function i4(e){return{schemeId:"smithy.api#noAuth"}}var t4,r4,Mc,Kae,Zae,n4,Xae,Yae,s4,Qae,a4,kT=D(()=>{Dt();t4=I(xT()),r4=I(gr()),Mc=I(It());wT();Ql();Kae=i(e=>async(t,r,n)=>{if(!n)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let o=await e(t,r,n),a=(0,Mc.getSmithyContext)(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);let c=await(0,r4.resolveParams)(n,{getEndpointParameterInstructions:a},t);return Object.assign(o,c)},"createEndpointRuleSetHttpAuthSchemeParametersProvider"),Zae=i(async(e,t,r)=>({operation:(0,Mc.getSmithyContext)(t).operation,region:await(0,Mc.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"_defaultSTSHttpAuthSchemeParametersProvider"),n4=Kae(Zae);i(o4,"createAwsAuthSigv4HttpAuthOption");i($T,"createAwsAuthSigv4aHttpAuthOption");i(i4,"createSmithyApiNoAuthHttpAuthOption");Xae=i((e,t,r)=>i(o=>{let c=e(o).properties?.authSchemes;if(!c)return t(o);let u=[];for(let l of c){let{name:d,properties:_={},...y}=l,E=d.toLowerCase();d!==E&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${d}' to '${E}'`);let g;if(E==="sigv4a"){g="aws.auth#sigv4a";let R=c.find(b=>{let $=b.name.toLowerCase();return $!=="sigv4a"&&$.startsWith("sigv4")});if(t4.SignatureV4MultiRegion.sigv4aDependency()==="none"&&R)continue}else if(E.startsWith("sigv4"))g="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${E}'`);let v=r[g];if(!v)throw new Error(`Could not find HttpAuthOption create function for '${g}'`);let A=v(o);A.schemeId=g,A.signingProperties={...A.signingProperties||{},...y,..._},u.push(A)}return u},"endpointRuleSetHttpAuthSchemeProvider"),"createEndpointRuleSetHttpAuthSchemeProvider"),Yae=i(e=>{let t=[];return e.operation==="AssumeRoleWithWebIdentity"?(t.push(i4(e)),t.push($T(e))):(t.push(o4(e)),t.push($T(e))),t},"_defaultSTSHttpAuthSchemeProvider"),s4=Xae(dh,Yae,{"aws.auth#sigv4":o4,"aws.auth#sigv4a":$T,"smithy.api#noAuth":i4}),Qae=i(e=>Object.assign(e,{stsClientCtor:ho}),"resolveStsAuthConfig"),a4=i(e=>{let t=Qae(e),r=Nn(t),n=lf(r);return Object.assign(n,{authSchemePreference:(0,Mc.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var c4,ph,mh=D(()=>{c4=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),"resolveClientEndpointParameters"),ph={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 u4,br,fh=D(()=>{u4=I(ue()),br=class e extends u4.ServiceException{static{i(this,"STSServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var ed,td,rd,nd,od,id,sd,DT=D(()=>{fh();ed=class e extends br{static{i(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},td=class e extends br{static{i(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},rd=class e extends br{static{i(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},nd=class e extends br{static{i(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},od=class e extends br{static{i(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},id=class e extends br{static{i(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},sd=class e extends br{static{i(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}}});var ece,tce,rce,nce,oce,ice,MT,sce,ace,cce,uce,OT,lce,l4,dce,pce,mce,fce,gce,hce,yce,_ce,d4,p4,Ece,Sce,vce,Ace,Rce,Pce,m4,Cce,Tce,f4,xce,g4,bce,Ice,NT,wce,$ce,kce,Dce,Mce,Oce,Nce,Lce,zce,Uce,aa,ca,Bce,ua,la,da,Gce,h4,Fce,tt,y4,_4,fs,E4,S4,v4,A4,R4,P4,C4,LT,jce,qce,zT,T4,x4,b4,I4,UT,w4,$4,k4,D4,Vce,Hce,BT,GT,ad=D(()=>{ke();DT();fh();ece="Arn",tce="AccessKeyId",rce="AssumeRole",nce="AssumedRoleId",oce="AssumeRoleRequest",ice="AssumeRoleResponse",MT="AssumedRoleUser",sce="AssumeRoleWithWebIdentity",ace="AssumeRoleWithWebIdentityRequest",cce="AssumeRoleWithWebIdentityResponse",uce="Audience",OT="Credentials",lce="ContextAssertion",l4="DurationSeconds",dce="Expiration",pce="ExternalId",mce="ExpiredTokenException",fce="IDPCommunicationErrorException",gce="IDPRejectedClaimException",hce="InvalidIdentityTokenException",yce="Key",_ce="MalformedPolicyDocumentException",d4="Policy",p4="PolicyArns",Ece="ProviderArn",Sce="ProvidedContexts",vce="ProvidedContextsListType",Ace="ProvidedContext",Rce="PolicyDescriptorType",Pce="ProviderId",m4="PackedPolicySize",Cce="PackedPolicyTooLargeException",Tce="Provider",f4="RoleArn",xce="RegionDisabledException",g4="RoleSessionName",bce="SecretAccessKey",Ice="SubjectFromWebIdentityToken",NT="SourceIdentity",wce="SerialNumber",$ce="SessionToken",kce="Tags",Dce="TokenCode",Mce="TransitiveTagKeys",Oce="Tag",Nce="Value",Lce="WebIdentityToken",zce="arn",Uce="accessKeySecretType",aa="awsQueryError",ca="client",Bce="clientTokenType",ua="error",la="httpError",da="message",Gce="policyDescriptorListType",h4="smithy.ts.sdk.synthetic.com.amazonaws.sts",Fce="tagListType",tt="com.amazonaws.sts",y4=ot.for(h4),_4=[-3,h4,"STSServiceException",0,[],[]];y4.registerError(_4,br);fs=ot.for(tt),E4=[-3,tt,mce,{[aa]:["ExpiredTokenException",400],[ua]:ca,[la]:400},[da],[0]];fs.registerError(E4,ed);S4=[-3,tt,fce,{[aa]:["IDPCommunicationError",400],[ua]:ca,[la]:400},[da],[0]];fs.registerError(S4,sd);v4=[-3,tt,gce,{[aa]:["IDPRejectedClaim",403],[ua]:ca,[la]:403},[da],[0]];fs.registerError(v4,od);A4=[-3,tt,hce,{[aa]:["InvalidIdentityToken",400],[ua]:ca,[la]:400},[da],[0]];fs.registerError(A4,id);R4=[-3,tt,_ce,{[aa]:["MalformedPolicyDocument",400],[ua]:ca,[la]:400},[da],[0]];fs.registerError(R4,td);P4=[-3,tt,Cce,{[aa]:["PackedPolicyTooLarge",400],[ua]:ca,[la]:400},[da],[0]];fs.registerError(P4,rd);C4=[-3,tt,xce,{[aa]:["RegionDisabledException",403],[ua]:ca,[la]:403},[da],[0]];fs.registerError(C4,nd);LT=[y4,fs],jce=[0,tt,Uce,8,0],qce=[0,tt,Bce,8,0],zT=[3,tt,MT,0,[nce,ece],[0,0],2],T4=[3,tt,oce,0,[f4,g4,p4,d4,l4,kce,Mce,pce,wce,Dce,NT,Sce],[0,0,()=>D4,0,1,()=>Hce,64,0,0,0,0,()=>Vce],2],x4=[3,tt,ice,0,[OT,MT,m4,NT],[[()=>UT,0],()=>zT,1,0]],b4=[3,tt,ace,0,[f4,g4,Lce,Pce,p4,d4,l4],[0,0,[()=>qce,0],0,()=>D4,0,1],3],I4=[3,tt,cce,0,[OT,Ice,MT,m4,Tce,uce,NT],[[()=>UT,0],0,()=>zT,1,0,0,0]],UT=[3,tt,OT,0,[tce,bce,$ce,dce],[0,[()=>jce,0],0,4],4],w4=[3,tt,Rce,0,[zce],[0]],$4=[3,tt,Ace,0,[Ece,lce],[0,0]],k4=[3,tt,Oce,0,[yce,Nce],[0,0],2],D4=[1,tt,Gce,0,()=>w4],Vce=[1,tt,vce,0,()=>$4],Hce=[1,tt,Fce,0,()=>k4],BT=[9,tt,rce,0,()=>T4,()=>x4],GT=[9,tt,sce,0,()=>b4,()=>I4]});var M4,O4,N4,gh,hh,L4,z4=D(()=>{Dt();mo();M4=I(xT());Xe();O4=I(ue()),N4=I(Gr()),gh=I(gt()),hh=I(ft());kT();wT();ad();L4=i(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??gh.fromBase64,base64Encoder:e?.base64Encoder??gh.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??dh,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??s4,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Lt},{schemeId:"aws.auth#sigv4a",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4a"),"identityProvider"),signer:new ni},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new jr}],logger:e?.logger??new O4.NoOpLogger,protocol:e?.protocol??os,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:LT,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",signerConstructor:e?.signerConstructor??M4.SignatureV4MultiRegion,urlParser:e?.urlParser??N4.parseUrl,utf8Decoder:e?.utf8Decoder??hh.fromUtf8,utf8Encoder:e?.utf8Encoder??hh.toUtf8}),"getRuntimeConfig")});var yh,gs,U4,_h,ui,Eh,Sh,B4,G4,F4,j4,q4=D(()=>{rl();yt();Dt();yh=I(Hi()),gs=I(Nt());Xe();U4=I(Wi()),_h=I(hr()),ui=I(cn()),Eh=I(to()),Sh=I(ue()),B4=I(Ji()),G4=I(Ki()),F4=I(Mn());z4();j4=i(e=>{(0,Sh.emitWarningIfUnsupportedVersion)(process.version);let t=(0,G4.resolveDefaultsModeConfig)(e),r=i(()=>t().then(Sh.loadConfigsForDefaultMode),"defaultConfigProvider"),n=L4(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,ui.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??B4.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,yh.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Vi.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4")||(async c=>await e.credentialDefaultProvider(c?.__config||{})()),"identityProvider"),signer:new Lt},{schemeId:"aws.auth#sigv4a",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4a"),"identityProvider"),signer:new ni},{schemeId:"smithy.api#noAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new jr}],maxAttempts:e?.maxAttempts??(0,ui.loadConfig)(_h.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,ui.loadConfig)(gs.NODE_REGION_CONFIG_OPTIONS,{...gs.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:Eh.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,ui.loadConfig)({..._h.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||F4.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??U4.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??(0,ui.loadConfig)(df,o),streamCollector:e?.streamCollector??Eh.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ui.loadConfig)(gs.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,ui.loadConfig)(gs.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,ui.loadConfig)(yh.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var V4,H4,W4=D(()=>{V4=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let a=t.findIndex(c=>c.schemeId===o.schemeId);a===-1?t.push(o):t.splice(a,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),H4=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var vh,Ah,Rh,J4,K4=D(()=>{vh=I(go()),Ah=I(Me()),Rh=I(ue());W4();J4=i((e,t)=>{let r=Object.assign((0,vh.getAwsRegionExtensionConfiguration)(e),(0,Rh.getDefaultExtensionConfiguration)(e),(0,Ah.getHttpHandlerExtensionConfiguration)(e),V4(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,vh.resolveAwsRegionExtensionConfiguration)(r),(0,Rh.resolveDefaultRuntimeConfig)(r),(0,Ah.resolveHttpHandlerRuntimeConfig)(r),H4(r))},"resolveRuntimeExtensions")});var Ph,Z4,X4,Ch,Y4,Q4,e2,Th,FT,ho,Ql=D(()=>{Ph=I(xi()),Z4=I(bi()),X4=I(Ii()),Ch=I(ti()),Y4=I(Nt());Xe();ke();Q4=I(zi()),e2=I(gr()),Th=I(hr()),FT=I(ue());kT();mh();q4();K4();ho=class extends FT.Client{static{i(this,"STSClient")}config;constructor(...[t]){let r=j4(t||{});super(r),this.initConfig=r;let n=c4(r),o=(0,Ch.resolveUserAgentConfig)(n),a=(0,Th.resolveRetryConfig)(o),c=(0,Y4.resolveRegionConfig)(a),u=(0,Ph.resolveHostHeaderConfig)(c),l=(0,e2.resolveEndpointConfig)(u),d=a4(l),_=J4(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,Ch.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Th.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Q4.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Ph.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Z4.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,X4.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:n4,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials,"aws.auth#sigv4a":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var t2,r2,pa,xh=D(()=>{t2=I(gr()),r2=I(ue());mh();ad();pa=class extends r2.Command.classBuilder().ep(ph).m(function(t,r,n,o){return[(0,t2.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(BT).build(){static{i(this,"AssumeRoleCommand")}}});var n2,o2,ma,bh=D(()=>{n2=I(gr()),o2=I(ue());mh();ad();ma=class extends o2.Command.classBuilder().ep(ph).m(function(t,r,n,o){return[(0,n2.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(GT).build(){static{i(this,"AssumeRoleWithWebIdentityCommand")}}});var i2,Wce,Ih,s2=D(()=>{i2=I(ue());xh();bh();Ql();Wce={AssumeRoleCommand:pa,AssumeRoleWithWebIdentityCommand:ma},Ih=class extends ho{static{i(this,"STS")}};(0,i2.createAggregatedClient)(Wce,Ih)});var a2=D(()=>{xh();bh()});var c2=D(()=>{});var u2,l2,d2,p2,m2,f2,g2=D(()=>{yt();u2=I(go());xh();bh();l2=i(e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},"getAccountIdFromAssumedRoleUser"),d2=i(async(e,t,r,n={})=>{let o=typeof e=="function"?await e():e,a=typeof t=="function"?await t():t,c="",u=o??a??(c=await(0,u2.stsRegionDefaultResolver)(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (credential provider clientConfig)`,`${a} (contextual client)`,`${c} (STS default: AWS_REGION, profile region, or us-east-1)`),u},"resolveRegion"),p2=i((e,t)=>{let r,n;return async(o,a)=>{if(n=o,!r){let{logger:_=e?.parentClientConfig?.logger,profile:y=e?.parentClientConfig?.profile,region:E,requestHandler:g=e?.parentClientConfig?.requestHandler,credentialProviderLogger:v,userAgentAppId:A=e?.parentClientConfig?.userAgentAppId}=e,R=await d2(E,e?.parentClientConfig?.region,v,{logger:_,profile:y}),b=!f2(g);r=new t({...e,userAgentAppId:A,profile:y,credentialDefaultProvider:i(()=>async()=>n,"credentialDefaultProvider"),region:R,requestHandler:b?g:void 0,logger:_})}let{Credentials:c,AssumedRoleUser:u}=await r.send(new pa(a));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`);let l=l2(u),d={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...l&&{accountId:l}};return Mi(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}},"getDefaultRoleAssumer"),m2=i((e,t)=>{let r;return async n=>{if(!r){let{logger:l=e?.parentClientConfig?.logger,profile:d=e?.parentClientConfig?.profile,region:_,requestHandler:y=e?.parentClientConfig?.requestHandler,credentialProviderLogger:E,userAgentAppId:g=e?.parentClientConfig?.userAgentAppId}=e,v=await d2(_,e?.parentClientConfig?.region,E,{logger:l,profile:d}),A=!f2(y);r=new t({...e,userAgentAppId:g,profile:d,region:v,requestHandler:A?y:void 0,logger:l})}let{Credentials:o,AssumedRoleUser:a}=await r.send(new ma(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let c=l2(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return c&&Mi(u,"RESOLVED_ACCOUNT_ID","T"),Mi(u,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),u}},"getDefaultRoleAssumerWithWebIdentity"),f2=i(e=>e?.metadata?.handlerProtocol==="h2","isH2")});var h2,y2,_2,Jce,E2=D(()=>{g2();Ql();h2=i((e,t)=>t?class extends e{static{i(this,"CustomizableSTSClient")}constructor(n){super(n);for(let o of t)this.middlewareStack.use(o)}}:e,"getCustomizableStsClientCtor"),y2=i((e={},t)=>p2(e,h2(ho,t)),"getDefaultRoleAssumer"),_2=i((e={},t)=>m2(e,h2(ho,t)),"getDefaultRoleAssumerWithWebIdentity"),Jce=i(e=>t=>e({roleAssumer:y2(t),roleAssumerWithWebIdentity:_2(t),...t}),"decorateDefaultCredentialProvider")});var jT={};bt(jT,{AssumeRole$:()=>BT,AssumeRoleCommand:()=>pa,AssumeRoleRequest$:()=>T4,AssumeRoleResponse$:()=>x4,AssumeRoleWithWebIdentity$:()=>GT,AssumeRoleWithWebIdentityCommand:()=>ma,AssumeRoleWithWebIdentityRequest$:()=>b4,AssumeRoleWithWebIdentityResponse$:()=>I4,AssumedRoleUser$:()=>zT,Credentials$:()=>UT,ExpiredTokenException:()=>ed,ExpiredTokenException$:()=>E4,IDPCommunicationErrorException:()=>sd,IDPCommunicationErrorException$:()=>S4,IDPRejectedClaimException:()=>od,IDPRejectedClaimException$:()=>v4,InvalidIdentityTokenException:()=>id,InvalidIdentityTokenException$:()=>A4,MalformedPolicyDocumentException:()=>td,MalformedPolicyDocumentException$:()=>R4,PackedPolicyTooLargeException:()=>rd,PackedPolicyTooLargeException$:()=>P4,PolicyDescriptorType$:()=>w4,ProvidedContext$:()=>$4,RegionDisabledException:()=>nd,RegionDisabledException$:()=>C4,STS:()=>Ih,STSClient:()=>ho,STSServiceException:()=>br,STSServiceException$:()=>_4,Tag$:()=>k4,__Client:()=>FT.Client,decorateDefaultCredentialProvider:()=>Jce,errorTypeRegistries:()=>LT,getDefaultRoleAssumer:()=>y2,getDefaultRoleAssumerWithWebIdentity:()=>_2});var qT=D(()=>{Ql();s2();a2();ad();DT();c2();E2();fh()});var WT=N(S2=>{"use strict";var HT=On(),VT=jt(),Kce=require("node:child_process"),Zce=require("node:util"),Xce=(yt(),Q(Pr)),Yce=i((e,t,r)=>{if(t.Version!==1)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(t.AccessKeyId===void 0||t.SecretAccessKey===void 0)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(t.Expiration){let a=new Date;if(new Date(t.Expiration)<a)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let n=t.AccountId;!n&&r?.[e]?.aws_account_id&&(n=r[e].aws_account_id);let o={accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,...t.SessionToken&&{sessionToken:t.SessionToken},...t.Expiration&&{expiration:new Date(t.Expiration)},...t.CredentialScope&&{credentialScope:t.CredentialScope},...n&&{accountId:n}};return Xce.setCredentialFeature(o,"CREDENTIALS_PROCESS","w"),o},"getValidatedProcessCredentials"),Qce=i(async(e,t,r)=>{let n=t[e];if(t[e]){let o=n.credential_process;if(o!==void 0){let a=Zce.promisify(HT.externalDataInterceptor?.getTokenRecord?.().exec??Kce.exec);try{let{stdout:c}=await a(o),u;try{u=JSON.parse(c.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return Yce(e,u,t)}catch(c){throw new VT.CredentialsProviderError(c.message,{logger:r})}}else throw new VT.CredentialsProviderError(`Profile ${e} did not contain credential_process.`,{logger:r})}else throw new VT.CredentialsProviderError(`Profile ${e} could not be found in shared credentials file.`,{logger:r})},"resolveProcessCredentials"),eue=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let r=await HT.parseKnownFiles(e);return Qce(HT.getProfileName({profile:e.profile??t?.profile}),r,e.logger)},"fromProcess");S2.fromProcess=eue});var JT=N(yo=>{"use strict";var tue=yo&&yo.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),rue=yo&&yo.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nue=yo&&yo.__importStar||(function(){var e=i(function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&tue(r,t,n[o]);return rue(r,t),r}})();Object.defineProperty(yo,"__esModule",{value:!0});yo.fromWebToken=void 0;var oue=i(e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:r,roleSessionName:n,webIdentityToken:o,providerId:a,policyArns:c,policy:u,durationSeconds:l}=e,{roleAssumerWithWebIdentity:d}=e;if(!d){let{getDefaultRoleAssumerWithWebIdentity:_}=await Promise.resolve().then(()=>nue((qT(),Q(jT))));d=_({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return d({RoleArn:r,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:o,ProviderId:a,PolicyArns:c,Policy:u,DurationSeconds:l})},"fromWebToken");yo.fromWebToken=oue});var A2=N(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});wh.fromTokenFile=void 0;var iue=(yt(),Q(Pr)),sue=jt(),aue=On(),cue=require("node:fs"),uue=JT(),v2="AWS_WEB_IDENTITY_TOKEN_FILE",lue="AWS_ROLE_ARN",due="AWS_ROLE_SESSION_NAME",pue=i((e={})=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let r=e?.webIdentityTokenFile??process.env[v2],n=e?.roleArn??process.env[lue],o=e?.roleSessionName??process.env[due];if(!r||!n)throw new sue.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let a=await(0,uue.fromWebToken)({...e,webIdentityToken:aue.externalDataInterceptor?.getTokenRecord?.()[r]??(0,cue.readFileSync)(r,{encoding:"ascii"}),roleArn:n,roleSessionName:o})(t);return r===process.env[v2]&&(0,iue.setCredentialFeature)(a,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),a},"fromTokenFile");wh.fromTokenFile=pue});var KT=N(li=>{"use strict";var $h=A2(),kh=JT();Object.prototype.hasOwnProperty.call($h,"__proto__")&&!Object.prototype.hasOwnProperty.call(li,"__proto__")&&Object.defineProperty(li,"__proto__",{enumerable:!0,value:$h.__proto__});Object.keys($h).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(li,e)&&(li[e]=$h[e])});Object.prototype.hasOwnProperty.call(kh,"__proto__")&&!Object.prototype.hasOwnProperty.call(li,"__proto__")&&Object.defineProperty(li,"__proto__",{enumerable:!0,value:kh.__proto__});Object.keys(kh).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(li,e)&&(li[e]=kh[e])})});var b2=N(x2=>{"use strict";var XT=On(),cd=jt(),di=(yt(),Q(Pr)),mue=_F(),fue=i((e,t,r)=>{let n={EcsContainer:i(async o=>{let{fromHttp:a}=await Promise.resolve().then(()=>I(VP())),{fromContainerMetadata:c}=await Promise.resolve().then(()=>I(el()));return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>cd.chain(a(o??{}),c(o))().then(ZT)},"EcsContainer"),Ec2InstanceMetadata:i(async o=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await Promise.resolve().then(()=>I(el()));return async()=>a(o)().then(ZT)},"Ec2InstanceMetadata"),Environment:i(async o=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await Promise.resolve().then(()=>I(LP()));return async()=>a(o)().then(ZT)},"Environment")};if(e in n)return n[e];throw new cd.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},"resolveCredentialSource"),ZT=i(e=>di.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),"setNamedProvider"),gue=i((e,{profile:t="default",logger:r}={})=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(hue(e,{profile:t,logger:r})||yue(e,{profile:t,logger:r})),"isAssumeRoleProfile"),hue=i((e,{profile:t,logger:r})=>{let n=typeof e.source_profile=="string"&&typeof e.credential_source>"u";return n&&r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),n},"isAssumeRoleWithSourceProfile"),yue=i((e,{profile:t,logger:r})=>{let n=typeof e.credential_source=="string"&&typeof e.source_profile>"u";return n&&r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),n},"isCredentialSourceProfile"),_ue=i(async(e,t,r,n,o={},a)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=t[e],{source_profile:u,region:l}=c;if(!r.roleAssumer){let{getDefaultRoleAssumer:_}=await Promise.resolve().then(()=>(qT(),jT));r.roleAssumer=_({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...n,...r?.parentClientConfig,region:l??r?.parentClientConfig?.region??n?.region}},r.clientPlugins)}if(u&&u in o)throw new cd.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${XT.getProfileName(r)}. Profiles visited: `+Object.keys(o).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${u?`source_profile=[${u}]`:`profile=[${e}]`}`);let d=u?a(u,t,r,n,{...o,[u]:!0},R2(t[u]??{})):(await fue(c.credential_source,e,r.logger)(r))();if(R2(c))return d.then(_=>di.setCredentialFeature(_,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{let _={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:y}=c;if(y){if(!r.mfaCodeProvider)throw new cd.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});_.SerialNumber=y,_.TokenCode=await r.mfaCodeProvider(y)}let E=await d;return r.roleAssumer(E,_).then(g=>di.setCredentialFeature(g,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},"resolveAssumeRoleCredentials"),R2=i(e=>!e.role_arn&&!!e.credential_source,"isCredentialSourceWithoutRoleArn"),Eue=i(e=>!!(e&&e.login_session),"isLoginProfile"),Sue=i(async(e,t,r)=>{let n=await mue.fromLoginCredentials({...t,profile:e})({callerClientConfig:r});return di.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")},"resolveLoginCredentials"),vue=i(e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string","isProcessProfile"),Aue=i(async(e,t)=>Promise.resolve().then(()=>I(WT())).then(({fromProcess:r})=>r({...e,profile:t})().then(n=>di.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v"))),"resolveProcessCredentials"),Rue=i(async(e,t,r={},n)=>{let{fromSSO:o}=await Promise.resolve().then(()=>I(eT()));return o({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:n}).then(a=>t.sso_session?di.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r"):di.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))},"resolveSsoCredentials"),Pue=i(e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),"isSsoProfile"),P2=i(e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,"isStaticCredsProfile"),C2=i(async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return di.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")},"resolveStaticCredentials"),Cue=i(e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,"isWebIdentityProfile"),Tue=i(async(e,t,r)=>Promise.resolve().then(()=>I(KT())).then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r}).then(o=>di.setCredentialFeature(o,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))),"resolveWebIdentityCredentials"),T2=i(async(e,t,r,n,o={},a=!1)=>{let c=t[e];if(Object.keys(o).length>0&&P2(c))return C2(c,r);if(a||gue(c,{profile:e,logger:r.logger}))return _ue(e,t,r,n,o,T2);if(P2(c))return C2(c,r);if(Cue(c))return Tue(c,r,n);if(vue(c))return Aue(r,e);if(Pue(c))return await Rue(e,c,r,n);if(Eue(c))return Sue(e,r,n);throw new cd.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})},"resolveProfileData"),xue=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await XT.parseKnownFiles(e);return T2(XT.getProfileName({profile:e.profile??t?.profile}),r,e,t)},"fromIni");x2.fromIni=xue});var Mh=N(Dh=>{"use strict";var YT=LP(),ud=jt(),bue=On(),I2="AWS_EC2_METADATA_DISABLED",Iue=i(async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:r,fromContainerMetadata:n,fromInstanceMetadata:o}=await Promise.resolve().then(()=>I(el()));if(process.env[r]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:a}=await Promise.resolve().then(()=>I(VP()));return ud.chain(a(e),n(e))}return process.env[I2]&&process.env[I2]!=="false"?async()=>{throw new ud.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})}:(e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),o(e))},"remoteProvider");function wue(e,t){let r=$ue(e),n,o,a,c=i(async u=>{if(u?.forceRefresh)return await r(u);if(a?.expiration&&a?.expiration?.getTime()<Date.now()&&(a=void 0),n)await n;else if(!a||t?.(a))if(a)o||(o=r(u).then(l=>{a=l}).finally(()=>{o=void 0}));else return n=r(u).then(l=>{a=l}).finally(()=>{n=void 0}),c(u);return a},"provider");return c}i(wue,"memoizeChain");var $ue=i(e=>async t=>{let r;for(let n of e)try{return await n(t)}catch(o){if(r=o,o?.tryNextLink)continue;throw o}throw r},"internalCreateChain"),w2=!1,kue=i((e={})=>wue([async()=>{if(e.profile??process.env[bue.ENV_PROFILE])throw process.env[YT.ENV_KEY]&&process.env[YT.ENV_SECRET]&&(w2||((e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
51
|
+
Multiple credential sources detected:
|
|
52
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
53
|
+
This SDK will proceed with the AWS_PROFILE value.
|
|
54
|
+
|
|
55
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
56
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
57
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
58
|
+
`),w2=!0)),new ud.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0});return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),YT.fromEnv(e)()},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:o,ssoRoleName:a,ssoSession:c}=e;if(!r&&!n&&!o&&!a&&!c)throw new ud.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:u}=await Promise.resolve().then(()=>I(eT()));return u(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>I(b2()));return r(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>I(WT()));return r(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>I(KT()));return r(e)(t)},async()=>(e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Iue(e))()),async()=>{throw new ud.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],$2),"defaultProvider"),Due=i(e=>e?.expiration!==void 0,"credentialsWillNeedRefresh"),$2=i(e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired");Dh.credentialsTreatedAsExpired=$2;Dh.credentialsWillNeedRefresh=Due;Dh.defaultProvider=kue});var D2=N(k2=>{"use strict";var Mue=jm(),Oh=require("node:stream"),QT=class extends Oh.Transform{static{i(this,"EventSigningTransformStream")}priorSignature;messageSigner;eventStreamCodec;systemClockOffsetProvider;staticCredentials;constructor(t){super({autoDestroy:!0,readableObjectMode:!0,writableObjectMode:!0,...t}),this.priorSignature=t.priorSignature,this.eventStreamCodec=t.eventStreamCodec,this.messageSigner=t.messageSigner,this.systemClockOffsetProvider=t.systemClockOffsetProvider,this.staticCredentials=t.credentials?.()}async _transform(t,r,n){try{let o=new Date(Date.now()+await this.systemClockOffsetProvider()),a={":date":{type:"timestamp",value:o}},c=await this.messageSigner.sign({message:{body:t,headers:a},priorSignature:this.priorSignature},{signingDate:o,eventStreamCredentials:await this.staticCredentials});this.priorSignature=c.signature;let u=this.eventStreamCodec.encode({headers:{...a,":chunk-signature":{type:"binary",value:Oue(c.signature)}},body:t});return this.push(u),n()}catch(o){n(o)}}};function Oue(e){let t=Buffer.from(e,"hex");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)}i(Oue,"getSignatureBinary");var ex=class{static{i(this,"EventStreamPayloadHandler")}messageSigner;eventStreamCodec;systemClockOffsetProvider;credentials;constructor(t){this.messageSigner=t.messageSigner,this.eventStreamCodec=new Mue.EventStreamCodec(t.utf8Encoder,t.utf8Decoder),this.systemClockOffsetProvider=async()=>t.systemClockOffset??0,this.credentials=t.credentials}async handle(t,r,n={}){let o=r.request,{body:a,query:c}=o;if(!(a instanceof Oh.Readable))throw new Error("Eventstream payload must be a Readable stream.");let u=a;o.body=new Oh.PassThrough({objectMode:!0});let d=o.headers?.authorization?.match(/Signature=([\w]+)$/)?.[1]??c?.["X-Amz-Signature"]??"";n.__staticSignature&&(d="");let _=new QT({priorSignature:d,eventStreamCodec:this.eventStreamCodec,messageSigner:await this.messageSigner(),systemClockOffsetProvider:this.systemClockOffsetProvider,credentials:this.credentials}),y,E=new Promise((v,A)=>{y=i(()=>v(void 0),"resolvePipeline"),Oh.pipeline(u,_,o.body,R=>{R&&A(new Error(`Pipeline error in @aws-sdk/eventstream-handler-node: ${R.message}`,{cause:R}))})}),g;try{g=await Promise.race([t(r),E])}catch(v){throw o.body.end(),v}finally{y()}return g}},Nue=i(e=>new ex(e),"eventStreamPayloadHandlerProvider");k2.eventStreamPayloadHandlerProvider=Nue});var M2=N(tx=>{"use strict";var Lue=NR(),zue=require("stream");async function*Uue(e){let t=!1,r=!1,n=new Array;for(e.on("error",o=>{if(t||(t=!0),o)throw o}),e.on("data",o=>{n.push(o)}),e.on("end",()=>{t=!0});!r;){let o=await new Promise(a=>setTimeout(()=>a(n.shift()),0));o&&(yield o),r=t&&n.length===0}}i(Uue,"readabletoIterable");var Nh=class{static{i(this,"EventStreamMarshaller")}universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new Lue.EventStreamMarshaller({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){let n=typeof t[Symbol.asyncIterator]=="function"?t:Uue(t);return this.universalMarshaller.deserialize(n,r)}serialize(t,r){return zue.Readable.from(this.universalMarshaller.serialize(t,r))}},Bue=i(e=>new Nh(e),"eventStreamSerdeProvider");tx.EventStreamMarshaller=Nh;tx.eventStreamSerdeProvider=Bue});var F2=N(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.bdd=void 0;var Gue=er(),dd="ref",fa=-1,Lh=!0,O2="isSet",G2="PartitionResult",zh="booleanEquals",N2="getAttr",L2={[dd]:"Endpoint"},z2={[dd]:G2},ld={},U2=[{[dd]:"Region"}],B2={conditions:[[O2,[L2]],[O2,U2],["aws.partition",U2,G2],[zh,[{[dd]:"UseFIPS"},Lh]],[zh,[{[dd]:"UseDualStack"},Lh]],[zh,[{fn:N2,argv:[z2,"supportsDualStack"]},Lh]],[zh,[{fn:N2,argv:[z2,"supportsFIPS"]},Lh]]],results:[[fa],[fa,"Invalid Configuration: FIPS and custom endpoint are not supported"],[fa,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[L2,ld],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",ld],[fa,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",ld],[fa,"FIPS is enabled but this partition does not support FIPS"],["https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",ld],[fa,"DualStack is enabled but this partition does not support DualStack"],["https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",ld],[fa,"Invalid Configuration: Missing Region"]]},Fue=2,Jr=1e8,jue=new Int32Array([-1,1,-1,0,12,3,1,4,Jr+11,2,5,Jr+11,3,8,6,4,7,Jr+10,5,Jr+8,Jr+9,4,10,9,6,Jr+6,Jr+7,5,11,Jr+5,6,Jr+4,Jr+5,3,Jr+1,13,4,Jr+2,Jr+3]);Uh.bdd=Gue.BinaryDecisionDiagram.from(jue,Fue,B2.conditions,B2.results)});var j2=N(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.defaultEndpointResolver=void 0;var que=Di(),rx=er(),Vue=F2(),Hue=new rx.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Wue=i((e,t={})=>Hue.get(e,()=>(0,rx.decideEndpoint)(Vue.bdd,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Bh.defaultEndpointResolver=Wue;rx.customEndpointFunctions.aws=que.awsEndpointFunctions});var Gh=N(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.BedrockRuntimeServiceException=Oc.__ServiceException=void 0;var q2=ue();Object.defineProperty(Oc,"__ServiceException",{enumerable:!0,get:i(function(){return q2.ServiceException},"get")});var nx=class e extends q2.ServiceException{static{i(this,"BedrockRuntimeServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Oc.BedrockRuntimeServiceException=nx});var hx=N(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ModelStreamErrorException=Ye.ModelTimeoutException=Ye.ModelNotReadyException=Ye.ModelErrorException=Ye.ServiceUnavailableException=Ye.ServiceQuotaExceededException=Ye.ResourceNotFoundException=Ye.ConflictException=Ye.ValidationException=Ye.ThrottlingException=Ye.InternalServerException=Ye.AccessDeniedException=void 0;var fn=Gh(),ox=class e extends fn.BedrockRuntimeServiceException{static{i(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.AccessDeniedException=ox;var ix=class e extends fn.BedrockRuntimeServiceException{static{i(this,"InternalServerException")}name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.InternalServerException=ix;var sx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ThrottlingException")}name="ThrottlingException";$fault="client";constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ThrottlingException=sx;var ax=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ValidationException")}name="ValidationException";$fault="client";constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ValidationException=ax;var cx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ConflictException")}name="ConflictException";$fault="client";constructor(t){super({name:"ConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ConflictException=cx;var ux=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ResourceNotFoundException=ux;var lx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ServiceQuotaExceededException")}name="ServiceQuotaExceededException";$fault="client";constructor(t){super({name:"ServiceQuotaExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ServiceQuotaExceededException=lx;var dx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ServiceUnavailableException")}name="ServiceUnavailableException";$fault="server";constructor(t){super({name:"ServiceUnavailableException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ServiceUnavailableException=dx;var px=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ModelErrorException")}name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(t){super({name:"ModelErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.originalStatusCode=t.originalStatusCode,this.resourceName=t.resourceName}};Ye.ModelErrorException=px;var mx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ModelNotReadyException")}name="ModelNotReadyException";$fault="client";$retryable={};constructor(t){super({name:"ModelNotReadyException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ModelNotReadyException=mx;var fx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ModelTimeoutException")}name="ModelTimeoutException";$fault="client";constructor(t){super({name:"ModelTimeoutException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};Ye.ModelTimeoutException=fx;var gx=class e extends fn.BedrockRuntimeServiceException{static{i(this,"ModelStreamErrorException")}name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(t){super({name:"ModelStreamErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.originalStatusCode=t.originalStatusCode,this.originalMessage=t.originalMessage}};Ye.ModelStreamErrorException=gx});var Vx=N(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.DocumentPageLocation$=f.DocumentChunkLocation$=f.DocumentCharLocation$=f.DocumentBlock$=f.CountTokensResponse$=f.CountTokensRequest$=f.ConverseTrace$=f.ConverseTokensRequest$=f.ConverseStreamTrace$=f.ConverseStreamResponse$=f.ConverseStreamRequest$=f.ConverseStreamMetrics$=f.ConverseStreamMetadataEvent$=f.ConverseResponse$=f.ConverseRequest$=f.ConverseMetrics$=f.ContentBlockStopEvent$=f.ContentBlockStartEvent$=f.ContentBlockDeltaEvent$=f.CitationSourceContentDelta$=f.CitationsDelta$=f.CitationsContentBlock$=f.CitationsConfig$=f.Citation$=f.CachePointBlock$=f.CacheDetail$=f.BidirectionalOutputPayloadPart$=f.BidirectionalInputPayloadPart$=f.AutoToolChoice$=f.AudioBlock$=f.AsyncInvokeSummary$=f.AsyncInvokeS3OutputDataConfig$=f.ApplyGuardrailResponse$=f.ApplyGuardrailRequest$=f.AppliedGuardrailDetails$=f.AnyToolChoice$=f.errorTypeRegistries=f.ValidationException$=f.ThrottlingException$=f.ServiceUnavailableException$=f.ServiceQuotaExceededException$=f.ResourceNotFoundException$=f.ModelTimeoutException$=f.ModelStreamErrorException$=f.ModelNotReadyException$=f.ModelErrorException$=f.InternalServerException$=f.ConflictException$=f.AccessDeniedException$=f.BedrockRuntimeServiceException$=void 0;f.InvokeModelResponse$=f.InvokeModelRequest$=f.InferenceConfiguration$=f.ImageBlockStart$=f.ImageBlockDelta$=f.ImageBlock$=f.GuardrailWordPolicyAssessment$=f.GuardrailUsage$=f.GuardrailTraceAssessment$=f.GuardrailTopicPolicyAssessment$=f.GuardrailTopic$=f.GuardrailTextCharactersCoverage$=f.GuardrailTextBlock$=f.GuardrailStreamConfiguration$=f.GuardrailSensitiveInformationPolicyAssessment$=f.GuardrailRegexFilter$=f.GuardrailPiiEntityFilter$=f.GuardrailOutputContent$=f.GuardrailManagedWord$=f.GuardrailInvocationMetrics$=f.GuardrailImageCoverage$=f.GuardrailImageBlock$=f.GuardrailCustomWord$=f.GuardrailCoverage$=f.GuardrailConverseTextBlock$=f.GuardrailConverseImageBlock$=f.GuardrailContextualGroundingPolicyAssessment$=f.GuardrailContextualGroundingFilter$=f.GuardrailContentPolicyAssessment$=f.GuardrailContentFilter$=f.GuardrailConfiguration$=f.GuardrailAutomatedReasoningValidFinding$=f.GuardrailAutomatedReasoningTranslationOption$=f.GuardrailAutomatedReasoningTranslationAmbiguousFinding$=f.GuardrailAutomatedReasoningTranslation$=f.GuardrailAutomatedReasoningTooComplexFinding$=f.GuardrailAutomatedReasoningStatement$=f.GuardrailAutomatedReasoningScenario$=f.GuardrailAutomatedReasoningSatisfiableFinding$=f.GuardrailAutomatedReasoningRule$=f.GuardrailAutomatedReasoningPolicyAssessment$=f.GuardrailAutomatedReasoningNoTranslationsFinding$=f.GuardrailAutomatedReasoningLogicWarning$=f.GuardrailAutomatedReasoningInvalidFinding$=f.GuardrailAutomatedReasoningInputTextReference$=f.GuardrailAutomatedReasoningImpossibleFinding$=f.GuardrailAssessment$=f.GetAsyncInvokeResponse$=f.GetAsyncInvokeRequest$=f.ErrorBlock$=void 0;f.DocumentSource$=f.DocumentContentBlock$=f.CountTokensInput$=f.ConverseStreamOutput$=f.ConverseOutput$=f.ContentBlockStart$=f.ContentBlockDelta$=f.ContentBlock$=f.CitationSourceContent$=f.CitationLocation$=f.CitationGeneratedContent$=f.AudioSource$=f.AsyncInvokeOutputDataConfig$=f.WebLocation$=f.VideoBlock$=f.ToolUseBlockStart$=f.ToolUseBlockDelta$=f.ToolUseBlock$=f.ToolSpecification$=f.ToolResultBlockStart$=f.ToolResultBlock$=f.ToolConfiguration$=f.TokenUsage$=f.Tag$=f.SystemTool$=f.StartAsyncInvokeResponse$=f.StartAsyncInvokeRequest$=f.SpecificToolChoice$=f.ServiceTier$=f.SearchResultLocation$=f.SearchResultContentBlock$=f.SearchResultBlock$=f.S3Location$=f.ReasoningTextBlock$=f.PromptRouterTrace$=f.PerformanceConfiguration$=f.PayloadPart$=f.OutputFormat$=f.OutputConfig$=f.MessageStopEvent$=f.MessageStartEvent$=f.Message$=f.ListAsyncInvokesResponse$=f.ListAsyncInvokesRequest$=f.JsonSchemaDefinition$=f.InvokeModelWithResponseStreamResponse$=f.InvokeModelWithResponseStreamRequest$=f.InvokeModelWithBidirectionalStreamResponse$=f.InvokeModelWithBidirectionalStreamRequest$=f.InvokeModelTokensRequest$=void 0;f.StartAsyncInvoke$=f.ListAsyncInvokes$=f.InvokeModelWithResponseStream$=f.InvokeModelWithBidirectionalStream$=f.InvokeModel$=f.GetAsyncInvoke$=f.CountTokens$=f.ConverseStream$=f.Converse$=f.ApplyGuardrail$=f.VideoSource$=f.ToolResultContentBlock$=f.ToolResultBlockDelta$=f.ToolInputSchema$=f.ToolChoice$=f.Tool$=f.SystemContentBlock$=f.ResponseStream$=f.ReasoningContentBlockDelta$=f.ReasoningContentBlock$=f.PromptVariableValues$=f.OutputFormatStructure$=f.InvokeModelWithBidirectionalStreamOutput$=f.InvokeModelWithBidirectionalStreamInput$=f.ImageSource$=f.GuardrailImageSource$=f.GuardrailConverseImageSource$=f.GuardrailConverseContentBlock$=f.GuardrailContentBlock$=f.GuardrailAutomatedReasoningFinding$=void 0;var Jue="Accept",Kue="AudioBlock",Zue="AccessDeniedException",Xue="ApplyGuardrail",Yue="AppliedGuardrailDetails",Que="ApplyGuardrailRequest",ele="ApplyGuardrailResponse",tle="AsyncInvokeMessage",rle="AsyncInvokeOutputDataConfig",nle="AsyncInvokeSummary",ole="AsyncInvokeS3OutputDataConfig",ile="AsyncInvokeSummaries",sle="AudioSource",ale="AnyToolChoice",cle="AutoToolChoice",ule="Body",lle="BidirectionalInputPayloadPart",dle="BidirectionalOutputPayloadPart",ple="Citation",mle="ContentBlocks",fle="ContentBlockDelta",gle="ContentBlockDeltaEvent",hle="ContentBlockStart",yle="ContentBlockStartEvent",_le="ContentBlockStopEvent",Ele="ContentBlock",Sle="CitationsConfig",vle="CitationsContentBlock",Ale="CacheDetail",Rle="CacheDetailsList",Ple="CitationsDelta",Cle="ConflictException",Tle="CitationGeneratedContent",xle="CitationGeneratedContentList",ble="CitationLocation",Ile="ConverseMetrics",wle="ConverseOutput",$le="CachePointBlock",kle="ConverseRequest",Dle="ConverseResponse",Mle="ConverseStream",Ole="CitationSourceContent",Nle="CitationSourceContentDelta",Lle="CitationSourceContentList",zle="CitationSourceContentListDelta",Ule="ConverseStreamMetrics",Ble="ConverseStreamMetadataEvent",Gle="ConverseStreamOutput",Fle="ConverseStreamRequest",jle="ConverseStreamResponse",qle="ConverseStreamTrace",Vle="ConverseTrace",Hle="CountTokensInput",Wle="ConverseTokensRequest",Jle="CountTokensRequest",Kle="CountTokensResponse",_x="Content-Type",Zle="CountTokens",Xle="Citations",Yle="Converse",Qle="DocumentBlock",ede="DocumentContentBlocks",tde="DocumentContentBlock",rde="DocumentCharLocation",nde="DocumentChunkLocation",ode="DocumentPageLocation",ide="DocumentSource",sde="ErrorBlock",ade="GuardrailAssessment",cde="GetAsyncInvoke",ude="GetAsyncInvokeRequest",lde="GetAsyncInvokeResponse",dde="GuardrailAssessmentList",pde="GuardrailAssessmentListMap",mde="GuardrailAssessmentMap",fde="GuardrailAutomatedReasoningDifferenceScenarioList",gde="GuardrailAutomatedReasoningFinding",hde="GuardrailAutomatedReasoningFindingList",yde="GuardrailAutomatedReasoningImpossibleFinding",_de="GuardrailAutomatedReasoningInvalidFinding",Ede="GuardrailAutomatedReasoningInputTextReference",Sde="GuardrailAutomatedReasoningInputTextReferenceList",vde="GuardrailAutomatedReasoningLogicWarning",Ade="GuardrailAutomatedReasoningNoTranslationsFinding",Rde="GuardrailAutomatedReasoningPolicyAssessment",Pde="GuardrailAutomatedReasoningRule",Cde="GuardrailAutomatedReasoningRuleList",Tde="GuardrailAutomatedReasoningScenario",xde="GuardrailAutomatedReasoningSatisfiableFinding",bde="GuardrailAutomatedReasoningStatementList",Ide="GuardrailAutomatedReasoningStatementLogicContent",wde="GuardrailAutomatedReasoningStatementNaturalLanguageContent",$de="GuardrailAutomatedReasoningStatement",kde="GuardrailAutomatedReasoningTranslation",Dde="GuardrailAutomatedReasoningTranslationAmbiguousFinding",Mde="GuardrailAutomatedReasoningTooComplexFinding",Ode="GuardrailAutomatedReasoningTranslationList",Nde="GuardrailAutomatedReasoningTranslationOption",Lde="GuardrailAutomatedReasoningTranslationOptionList",zde="GuardrailAutomatedReasoningValidFinding",Ude="GuardrailConfiguration",Bde="GuardrailContentBlock",Gde="GuardrailContentBlockList",Fde="GuardrailConverseContentBlock",jde="GuardrailContentFilter",qde="GuardrailContentFilterList",Vde="GuardrailContextualGroundingFilter",Hde="GuardrailContextualGroundingFilters",Wde="GuardrailContextualGroundingPolicyAssessment",Jde="GuardrailConverseImageBlock",Kde="GuardrailConverseImageSource",Zde="GuardrailContentPolicyAssessment",Xde="GuardrailConverseTextBlock",Yde="GuardrailCustomWord",Qde="GuardrailCustomWordList",epe="GuardrailCoverage",tpe="GuardrailImageBlock",rpe="GuardrailImageCoverage",npe="GuardrailInvocationMetrics",ope="GuardrailImageSource",ipe="GuardrailManagedWord",spe="GuardrailManagedWordList",ape="GuardrailOutputContent",cpe="GuardrailOutputContentList",upe="GuardrailPiiEntityFilter",lpe="GuardrailPiiEntityFilterList",dpe="GuardrailRegexFilter",ppe="GuardrailRegexFilterList",mpe="GuardrailStreamConfiguration",fpe="GuardrailSensitiveInformationPolicyAssessment",gpe="GuardrailTopic",hpe="GuardrailTraceAssessment",ype="GuardrailTextBlock",_pe="GuardrailTextCharactersCoverage",Epe="GuardrailTopicList",Spe="GuardrailTopicPolicyAssessment",vpe="GuardrailUsage",Ape="GuardrailWordPolicyAssessment",Rpe="ImageBlock",Ppe="ImageBlockDelta",Cpe="ImageBlockStart",Tpe="InferenceConfiguration",xpe="InvokeModel",bpe="InvokeModelRequest",Ipe="InvokeModelResponse",wpe="InvokeModelTokensRequest",$pe="InvokeModelWithBidirectionalStream",kpe="InvokeModelWithBidirectionalStreamInput",Dpe="InvokeModelWithBidirectionalStreamOutput",Mpe="InvokeModelWithBidirectionalStreamRequest",Ope="InvokeModelWithBidirectionalStreamResponse",Npe="InvokeModelWithResponseStream",Lpe="InvokeModelWithResponseStreamRequest",zpe="InvokeModelWithResponseStreamResponse",Upe="ImageSource",Bpe="InternalServerException",Gpe="JsonSchemaDefinition",Fpe="ListAsyncInvokes",jpe="ListAsyncInvokesRequest",qpe="ListAsyncInvokesResponse",Vpe="Message",Hpe="ModelErrorException",Wpe="ModelInputPayload",Jpe="ModelNotReadyException",Kpe="MessageStartEvent",Zpe="ModelStreamErrorException",Xpe="MessageStopEvent",Ype="ModelTimeoutException",Qpe="Messages",eme="OutputConfig",tme="OutputFormat",rme="OutputFormatStructure",nme="PartBody",ome="PerformanceConfiguration",ime="PayloadPart",sme="PromptRouterTrace",ame="PromptVariableMap",cme="PromptVariableValues",ume="ReasoningContentBlock",lme="ReasoningContentBlockDelta",dme="RequestMetadata",pme="ResourceNotFoundException",mme="ResponseStream",fme="ReasoningTextBlock",gme="StartAsyncInvoke",hme="StartAsyncInvokeRequest",yme="StartAsyncInvokeResponse",_me="SystemContentBlocks",Eme="SystemContentBlock",Sme="S3Location",vme="ServiceQuotaExceededException",Ame="SearchResultBlock",Rme="SearchResultContentBlock",Pme="SearchResultContentBlocks",Cme="SearchResultLocation",Tme="ServiceTier",xme="SpecificToolChoice",bme="SystemTool",Ime="ServiceUnavailableException",wme="Tag",$me="ToolConfiguration",kme="ToolChoice",Dme="ThrottlingException",Mme="ToolInputSchema",Ome="TagList",Nme="ToolResultBlock",Lme="ToolResultBlocksDelta",zme="ToolResultBlockDelta",Ume="ToolResultBlockStart",Bme="ToolResultContentBlocks",Gme="ToolResultContentBlock",Fme="ToolSpecification",jme="TokenUsage",qme="ToolUseBlock",Vme="ToolUseBlockDelta",Hme="ToolUseBlockStart",Wme="Tools",Jme="Tool",Kme="VideoBlock",Zme="ValidationException",Xme="VideoSource",Yme="WebLocation",Qme="X-Amzn-Bedrock-Accept",efe="X-Amzn-Bedrock-Content-Type",Y2="X-Amzn-Bedrock-GuardrailIdentifier",Q2="X-Amzn-Bedrock-GuardrailVersion",Fh="X-Amzn-Bedrock-PerformanceConfig-Latency",jh="X-Amzn-Bedrock-Service-Tier",ej="X-Amzn-Bedrock-Trace",hs="action",tfe="appliedGuardrailDetails",rfe="asyncInvokeSummaries",Ex="additionalModelRequestFields",tj="additionalModelResponseFieldPaths",rj="additionalModelResponseFields",nj="actionReason",nfe="automatedReasoningPolicy",ofe="automatedReasoningPolicyUnits",ife="automatedReasoningPolicies",oj="accept",sfe="any",afe="assessments",cfe="audio",ufe="auto",pi="bytes",ij="bucketOwner",ha="body",_o="client",lfe="contentBlockDelta",Sx="contentBlockIndex",dfe="contentBlockStart",pfe="contentBlockStop",mfe="citationsContent",ffe="cacheDetails",gfe="claimsFalseScenario",hfe="contextualGroundingPolicy",yfe="contextualGroundingPolicyUnits",_fe="contentPolicy",Efe="contentPolicyImageUnits",Sfe="contentPolicyUnits",vx="cachePoint",sj="contradictingRules",vfe="cacheReadInputTokens",Ax="clientRequestToken",qh="contentType",aj="claimsTrueScenario",Afe="customWords",Rfe="cacheWriteInputTokens",Rx="chunk",Px="citations",Pfe="citation",cj="claims",Nc="content",Cfe="context",uj="confidence",Tfe="converse",xfe="delta",bfe="documentChar",Ife="documentChunk",Cx="documentIndex",wfe="documentPage",$fe="differenceScenarios",ya="detected",lj="description",kfe="domain",dj="document",_r="error",pj="endTime",Dfe="enabled",Vh="end",_a="format",mj="failureMessage",Mfe="filterStrength",Ofe="findings",fj="filters",gj="guardrail",Nfe="guardrailArn",hj="guardrailCoverage",yj="guardrailConfig",_j="guardContent",Lfe="guardrailId",md="guardrailIdentifier",zfe="guardrailOrigin",Ufe="guardrailOwnership",Bfe="guardrailProcessingLatency",Lc="guardrailVersion",Ej="guarded",Eo="http",gn="httpError",Rt="httpHeader",ga="httpQuery",Tx="input",Hh="invocationArn",Gfe="inputAssessment",Sj="inferenceConfig",Ffe="invocationMetrics",jfe="invokedModelId",qfe="invokeModel",Vfe="inputSchema",xx="internalServerException",bx="inputTokens",Hfe="identifier",Wfe="images",zc="image",Jfe="impossible",Kfe="invalid",Ix="json",Zfe="jsonSchema",Xfe="key",Yfe="kmsKeyId",vj="location",Aj="latencyMs",Rj="lastModifiedTime",Wh="logicWarning",Qfe="latency",ege="logic",Ir="message",Pj="modelArn",Ea="modelId",tge="modelInput",rge="modelOutput",V2="maxResults",nge="messageStart",wx="modelStreamErrorException",oge="messageStop",ige="maxTokens",Cj="modelTimeoutException",sge="managedWordLists",Jh="match",$x="messages",Tj="metrics",age="metadata",mi="name",cge="naturalLanguage",yx="nextToken",uge="noTranslations",lge="outputs",dge="outputAssessments",xj="outputConfig",kx="outputDataConfig",pge="originalMessage",mge="outputScope",bj="originalStatusCode",fge="outputTokens",gge="options",hge="output",Ij="premises",Kh="performanceConfig",Zh="performanceConfigLatency",yge="piiEntities",wj="promptRouter",$j="promptVariables",_ge="policyVersionArn",kj="qualifiers",Ege="regex",Dj="reasoningContent",Mj="redactedContent",Oj="requestMetadata",Sge="resourceName",vge="reasoningText",Age="regexes",Nj="role",Lj="smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime",H2="sortBy",zj="sourceContent",W2="statusEquals",Rge="sensitiveInformationPolicy",Pge="sensitiveInformationPolicyFreeUnits",Cge="sensitiveInformationPolicyUnits",Xh="s3Location",J2="sortOrder",Tge="s3OutputDataConfig",xge="streamProcessingMode",Uj="stopReason",bge="searchResultIndex",Ige="searchResultLocation",Bj="searchResult",wge="supportingRules",$ge="stopSequences",Gj="submitTime",K2="submitTimeAfter",Z2="submitTimeBefore",ys="serviceTier",kge="systemTool",Dge="s3Uri",Dx="serviceUnavailableException",Mge="satisfiable",Oge="score",Nge="schema",Fj="server",jj="signature",jn="source",Yh="status",fd="start",Lge="statements",zge="stream",Qh="streaming",Uge="strict",Bge="structure",Mx="system",qj="ttl",Gge="translationAmbiguous",Ox="toolConfig",Fge="textCharacters",jge="toolChoice",qge="tooComplex",Nx="throttlingException",Vge="textFormat",Hge="topicPolicy",Wge="topicPolicyUnits",Jge="topP",Lx="toolResult",Kge="toolSpec",Zge="totalTokens",zx="toolUse",ey="toolUseId",Xge="tags",Pt="text",Yge="temperature",Qge="threshold",Ux="title",Vj="total",ehe="tools",the="tool",rhe="topics",Uc="trace",ty="translation",nhe="translations",Kr="type",ry="usage",ohe="untranslatedClaims",ihe="untranslatedPremises",she="uri",ahe="url",che="value",Bx="validationException",uhe="valid",Hj="video",lhe="web",dhe="wordPolicy",phe="wordPolicyUnits",w="com.amazonaws.bedrockruntime",Wj=(ke(),Q(Wo)),mhe=Gh(),hn=hx(),Jj=Wj.TypeRegistry.for(Lj);f.BedrockRuntimeServiceException$=[-3,Lj,"BedrockRuntimeServiceException",0,[],[]];Jj.registerError(f.BedrockRuntimeServiceException$,mhe.BedrockRuntimeServiceException);var Zr=Wj.TypeRegistry.for(w);f.AccessDeniedException$=[-3,w,Zue,{[_r]:_o,[gn]:403},[Ir],[0]];Zr.registerError(f.AccessDeniedException$,hn.AccessDeniedException);f.ConflictException$=[-3,w,Cle,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ConflictException$,hn.ConflictException);f.InternalServerException$=[-3,w,Bpe,{[_r]:Fj,[gn]:500},[Ir],[0]];Zr.registerError(f.InternalServerException$,hn.InternalServerException);f.ModelErrorException$=[-3,w,Hpe,{[_r]:_o,[gn]:424},[Ir,bj,Sge],[0,1,0]];Zr.registerError(f.ModelErrorException$,hn.ModelErrorException);f.ModelNotReadyException$=[-3,w,Jpe,{[_r]:_o,[gn]:429},[Ir],[0]];Zr.registerError(f.ModelNotReadyException$,hn.ModelNotReadyException);f.ModelStreamErrorException$=[-3,w,Zpe,{[_r]:_o,[gn]:424},[Ir,bj,pge],[0,1,0]];Zr.registerError(f.ModelStreamErrorException$,hn.ModelStreamErrorException);f.ModelTimeoutException$=[-3,w,Ype,{[_r]:_o,[gn]:408},[Ir],[0]];Zr.registerError(f.ModelTimeoutException$,hn.ModelTimeoutException);f.ResourceNotFoundException$=[-3,w,pme,{[_r]:_o,[gn]:404},[Ir],[0]];Zr.registerError(f.ResourceNotFoundException$,hn.ResourceNotFoundException);f.ServiceQuotaExceededException$=[-3,w,vme,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ServiceQuotaExceededException$,hn.ServiceQuotaExceededException);f.ServiceUnavailableException$=[-3,w,Ime,{[_r]:Fj,[gn]:503},[Ir],[0]];Zr.registerError(f.ServiceUnavailableException$,hn.ServiceUnavailableException);f.ThrottlingException$=[-3,w,Dme,{[_r]:_o,[gn]:429},[Ir],[0]];Zr.registerError(f.ThrottlingException$,hn.ThrottlingException);f.ValidationException$=[-3,w,Zme,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ValidationException$,hn.ValidationException);f.errorTypeRegistries=[Jj,Zr];var Kj=[0,w,tle,8,0],ny=[0,w,ule,8,21],fhe=[0,w,Ide,8,0],Zj=[0,w,wde,8,0],ghe=[0,w,Wpe,8,15],Gx=[0,w,nme,8,21];f.AnyToolChoice$=[3,w,ale,0,[],[]];f.AppliedGuardrailDetails$=[3,w,Yue,0,[Lfe,Lc,Nfe,zfe,Ufe],[0,0,0,64,0]];f.ApplyGuardrailRequest$=[3,w,Que,0,[md,Lc,jn,Nc,mge],[[0,1],[0,1],0,[()=>bhe,0],0],4];f.ApplyGuardrailResponse$=[3,w,ele,0,[ry,hs,lge,afe,nj,hj],[()=>f.GuardrailUsage$,0,()=>Dhe,[()=>Xj,0],0,()=>f.GuardrailCoverage$],4];f.AsyncInvokeS3OutputDataConfig$=[3,w,ole,0,[Dge,Yfe,ij],[0,0,0],1];f.AsyncInvokeSummary$=[3,w,nle,0,[Hh,Pj,Gj,kx,Ax,Yh,mj,Rj,pj],[0,0,5,()=>f.AsyncInvokeOutputDataConfig$,0,0,[()=>Kj,0],5,5],4];f.AudioBlock$=[3,w,Kue,0,[_a,jn,_r],[0,[()=>f.AudioSource$,0],[()=>f.ErrorBlock$,0]],2];f.AutoToolChoice$=[3,w,cle,0,[],[]];f.BidirectionalInputPayloadPart$=[3,w,lle,8,[pi],[[()=>Gx,0]]];f.BidirectionalOutputPayloadPart$=[3,w,dle,8,[pi],[[()=>Gx,0]]];f.CacheDetail$=[3,w,Ale,0,[qj,bx],[0,1],2];f.CachePointBlock$=[3,w,$le,0,[Kr,qj],[0,0],1];f.Citation$=[3,w,ple,0,[Ux,jn,zj,vj],[0,0,()=>She,()=>f.CitationLocation$]];f.CitationsConfig$=[3,w,Sle,0,[Dfe],[2],1];f.CitationsContentBlock$=[3,w,vle,0,[Nc,Px],[()=>_he,()=>Ehe]];f.CitationsDelta$=[3,w,Ple,0,[Ux,jn,zj,vj],[0,0,()=>vhe,()=>f.CitationLocation$]];f.CitationSourceContentDelta$=[3,w,Nle,0,[Pt],[0]];f.ContentBlockDeltaEvent$=[3,w,gle,0,[xfe,Sx],[[()=>f.ContentBlockDelta$,0],1],2];f.ContentBlockStartEvent$=[3,w,yle,0,[fd,Sx],[()=>f.ContentBlockStart$,1],2];f.ContentBlockStopEvent$=[3,w,_le,0,[Sx],[1],1];f.ConverseMetrics$=[3,w,Ile,0,[Aj],[1],1];f.ConverseRequest$=[3,w,kle,0,[Ea,$x,Mx,Sj,Ox,yj,Ex,$j,tj,Oj,Kh,ys,xj],[[0,1],[()=>jx,0],[()=>qx,0],()=>f.InferenceConfiguration$,()=>f.ToolConfiguration$,()=>f.GuardrailConfiguration$,15,[()=>Yj,0],64,[()=>Qj,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$,[()=>f.OutputConfig$,0]],1];f.ConverseResponse$=[3,w,Dle,0,[hge,Uj,ry,Tj,rj,Uc,Kh,ys],[[()=>f.ConverseOutput$,0],0,()=>f.TokenUsage$,()=>f.ConverseMetrics$,15,[()=>f.ConverseTrace$,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$],4];f.ConverseStreamMetadataEvent$=[3,w,Ble,0,[ry,Tj,Uc,Kh,ys],[()=>f.TokenUsage$,()=>f.ConverseStreamMetrics$,[()=>f.ConverseStreamTrace$,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$],2];f.ConverseStreamMetrics$=[3,w,Ule,0,[Aj],[1],1];f.ConverseStreamRequest$=[3,w,Fle,0,[Ea,$x,Mx,Sj,Ox,yj,Ex,$j,tj,Oj,Kh,ys,xj],[[0,1],[()=>jx,0],[()=>qx,0],()=>f.InferenceConfiguration$,()=>f.ToolConfiguration$,()=>f.GuardrailStreamConfiguration$,15,[()=>Yj,0],64,[()=>Qj,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$,[()=>f.OutputConfig$,0]],1];f.ConverseStreamResponse$=[3,w,jle,0,[zge],[[()=>f.ConverseStreamOutput$,16]]];f.ConverseStreamTrace$=[3,w,qle,0,[gj,wj],[[()=>f.GuardrailTraceAssessment$,0],()=>f.PromptRouterTrace$]];f.ConverseTokensRequest$=[3,w,Wle,0,[$x,Mx,Ox,Ex],[[()=>jx,0],[()=>qx,0],()=>f.ToolConfiguration$,15]];f.ConverseTrace$=[3,w,Vle,0,[gj,wj],[[()=>f.GuardrailTraceAssessment$,0],()=>f.PromptRouterTrace$]];f.CountTokensRequest$=[3,w,Jle,0,[Ea,Tx],[[0,1],[()=>f.CountTokensInput$,0]],2];f.CountTokensResponse$=[3,w,Kle,0,[bx],[1],1];f.DocumentBlock$=[3,w,Qle,0,[mi,jn,_a,Cfe,Px],[0,()=>f.DocumentSource$,0,0,()=>f.CitationsConfig$],2];f.DocumentCharLocation$=[3,w,rde,0,[Cx,fd,Vh],[1,1,1]];f.DocumentChunkLocation$=[3,w,nde,0,[Cx,fd,Vh],[1,1,1]];f.DocumentPageLocation$=[3,w,ode,0,[Cx,fd,Vh],[1,1,1]];f.ErrorBlock$=[3,w,sde,8,[Ir],[0]];f.GetAsyncInvokeRequest$=[3,w,ude,0,[Hh],[[0,1]],1];f.GetAsyncInvokeResponse$=[3,w,lde,0,[Hh,Pj,Yh,Gj,kx,Ax,mj,Rj,pj],[0,0,0,5,()=>f.AsyncInvokeOutputDataConfig$,0,[()=>Kj,0],5,5],5];f.GuardrailAssessment$=[3,w,ade,0,[Hge,_fe,dhe,Rge,hfe,nfe,Ffe,tfe],[()=>f.GuardrailTopicPolicyAssessment$,()=>f.GuardrailContentPolicyAssessment$,()=>f.GuardrailWordPolicyAssessment$,()=>f.GuardrailSensitiveInformationPolicyAssessment$,()=>f.GuardrailContextualGroundingPolicyAssessment$,[()=>f.GuardrailAutomatedReasoningPolicyAssessment$,0],()=>f.GuardrailInvocationMetrics$,()=>f.AppliedGuardrailDetails$]];f.GuardrailAutomatedReasoningImpossibleFinding$=[3,w,yde,0,[ty,sj,Wh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],()=>Fx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningInputTextReference$=[3,w,Ede,0,[Pt],[[()=>Zj,0]]];f.GuardrailAutomatedReasoningInvalidFinding$=[3,w,_de,0,[ty,sj,Wh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],()=>Fx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningLogicWarning$=[3,w,vde,0,[Kr,Ij,cj],[0,[()=>pd,0],[()=>pd,0]]];f.GuardrailAutomatedReasoningNoTranslationsFinding$=[3,w,Ade,0,[],[]];f.GuardrailAutomatedReasoningPolicyAssessment$=[3,w,Rde,0,[Ofe],[[()=>Che,0]]];f.GuardrailAutomatedReasoningRule$=[3,w,Pde,0,[Hfe,_ge],[0,0]];f.GuardrailAutomatedReasoningSatisfiableFinding$=[3,w,xde,0,[ty,aj,gfe,Wh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningScenario$=[3,w,Tde,0,[Lge],[[()=>pd,0]]];f.GuardrailAutomatedReasoningStatement$=[3,w,$de,0,[ege,cge],[[()=>fhe,0],[()=>Zj,0]]];f.GuardrailAutomatedReasoningTooComplexFinding$=[3,w,Mde,0,[],[]];f.GuardrailAutomatedReasoningTranslation$=[3,w,kde,0,[Ij,cj,ihe,ohe,uj],[[()=>pd,0],[()=>pd,0],[()=>X2,0],[()=>X2,0],1]];f.GuardrailAutomatedReasoningTranslationAmbiguousFinding$=[3,w,Dde,0,[gge,$fe],[[()=>xhe,0],[()=>Phe,0]]];f.GuardrailAutomatedReasoningTranslationOption$=[3,w,Nde,0,[nhe],[[()=>The,0]]];f.GuardrailAutomatedReasoningValidFinding$=[3,w,zde,0,[ty,aj,wge,Wh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],()=>Fx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailConfiguration$=[3,w,Ude,0,[md,Lc,Uc],[0,0,0]];f.GuardrailContentFilter$=[3,w,jde,0,[Kr,uj,hs,Mfe,ya],[0,0,0,0,2],3];f.GuardrailContentPolicyAssessment$=[3,w,Zde,0,[fj],[()=>Ihe],1];f.GuardrailContextualGroundingFilter$=[3,w,Vde,0,[Kr,Qge,Oge,hs,ya],[0,1,1,0,2],4];f.GuardrailContextualGroundingPolicyAssessment$=[3,w,Wde,0,[fj],[()=>whe]];f.GuardrailConverseImageBlock$=[3,w,Jde,8,[_a,jn],[0,[()=>f.GuardrailConverseImageSource$,0]],2];f.GuardrailConverseTextBlock$=[3,w,Xde,0,[Pt,kj],[0,64],1];f.GuardrailCoverage$=[3,w,epe,0,[Fge,Wfe],[()=>f.GuardrailTextCharactersCoverage$,()=>f.GuardrailImageCoverage$]];f.GuardrailCustomWord$=[3,w,Yde,0,[Jh,hs,ya],[0,0,2],2];f.GuardrailImageBlock$=[3,w,tpe,8,[_a,jn],[0,[()=>f.GuardrailImageSource$,0]],2];f.GuardrailImageCoverage$=[3,w,rpe,0,[Ej,Vj],[1,1]];f.GuardrailInvocationMetrics$=[3,w,npe,0,[Bfe,ry,hj],[1,()=>f.GuardrailUsage$,()=>f.GuardrailCoverage$]];f.GuardrailManagedWord$=[3,w,ipe,0,[Jh,Kr,hs,ya],[0,0,0,2],3];f.GuardrailOutputContent$=[3,w,ape,0,[Pt],[0]];f.GuardrailPiiEntityFilter$=[3,w,upe,0,[Jh,Kr,hs,ya],[0,0,0,2],3];f.GuardrailRegexFilter$=[3,w,dpe,0,[hs,mi,Jh,Ege,ya],[0,0,0,0,2],1];f.GuardrailSensitiveInformationPolicyAssessment$=[3,w,fpe,0,[yge,Age],[()=>Mhe,()=>Ohe],2];f.GuardrailStreamConfiguration$=[3,w,mpe,0,[md,Lc,Uc,xge],[0,0,0,0]];f.GuardrailTextBlock$=[3,w,ype,0,[Pt,kj],[0,64],1];f.GuardrailTextCharactersCoverage$=[3,w,_pe,0,[Ej,Vj],[1,1]];f.GuardrailTopic$=[3,w,gpe,0,[mi,Kr,hs,ya],[0,0,0,2],3];f.GuardrailTopicPolicyAssessment$=[3,w,Spe,0,[rhe],[()=>Nhe],1];f.GuardrailTraceAssessment$=[3,w,hpe,0,[rge,Gfe,dge,nj],[64,[()=>jhe,0],[()=>Fhe,0],0]];f.GuardrailUsage$=[3,w,vpe,0,[Wge,Sfe,phe,Cge,Pge,yfe,Efe,ofe,ife],[1,1,1,1,1,1,1,1,1],6];f.GuardrailWordPolicyAssessment$=[3,w,Ape,0,[Afe,sge],[()=>$he,()=>khe],2];f.ImageBlock$=[3,w,Rpe,0,[_a,jn,_r],[0,[()=>f.ImageSource$,0],[()=>f.ErrorBlock$,0]],2];f.ImageBlockDelta$=[3,w,Ppe,0,[jn,_r],[[()=>f.ImageSource$,0],[()=>f.ErrorBlock$,0]]];f.ImageBlockStart$=[3,w,Cpe,0,[_a],[0],1];f.InferenceConfiguration$=[3,w,Tpe,0,[ige,Yge,Jge,$ge],[1,1,1,64]];f.InvokeModelRequest$=[3,w,bpe,0,[Ea,ha,qh,oj,Uc,md,Lc,Zh,ys],[[0,1],[()=>ny,16],[0,{[Rt]:_x}],[0,{[Rt]:Jue}],[0,{[Rt]:ej}],[0,{[Rt]:Y2}],[0,{[Rt]:Q2}],[0,{[Rt]:Fh}],[0,{[Rt]:jh}]],1];f.InvokeModelResponse$=[3,w,Ipe,0,[ha,qh,Zh,ys],[[()=>ny,16],[0,{[Rt]:_x}],[0,{[Rt]:Fh}],[0,{[Rt]:jh}]],2];f.InvokeModelTokensRequest$=[3,w,wpe,0,[ha],[[()=>ny,0]],1];f.InvokeModelWithBidirectionalStreamRequest$=[3,w,Mpe,0,[Ea,ha],[[0,1],[()=>f.InvokeModelWithBidirectionalStreamInput$,16]],2];f.InvokeModelWithBidirectionalStreamResponse$=[3,w,Ope,0,[ha],[[()=>f.InvokeModelWithBidirectionalStreamOutput$,16]],1];f.InvokeModelWithResponseStreamRequest$=[3,w,Lpe,0,[Ea,ha,qh,oj,Uc,md,Lc,Zh,ys],[[0,1],[()=>ny,16],[0,{[Rt]:_x}],[0,{[Rt]:Qme}],[0,{[Rt]:ej}],[0,{[Rt]:Y2}],[0,{[Rt]:Q2}],[0,{[Rt]:Fh}],[0,{[Rt]:jh}]],1];f.InvokeModelWithResponseStreamResponse$=[3,w,zpe,0,[ha,qh,Zh,ys],[[()=>f.ResponseStream$,16],[0,{[Rt]:efe}],[0,{[Rt]:Fh}],[0,{[Rt]:jh}]],2];f.JsonSchemaDefinition$=[3,w,Gpe,0,[Nge,mi,lj],[0,0,0],1];f.ListAsyncInvokesRequest$=[3,w,jpe,0,[K2,Z2,W2,V2,yx,H2,J2],[[5,{[ga]:K2}],[5,{[ga]:Z2}],[0,{[ga]:W2}],[1,{[ga]:V2}],[0,{[ga]:yx}],[0,{[ga]:H2}],[0,{[ga]:J2}]]];f.ListAsyncInvokesResponse$=[3,w,qpe,0,[yx,rfe],[0,[()=>hhe,0]]];f.Message$=[3,w,Vpe,0,[Nj,Nc],[0,[()=>Ahe,0]],2];f.MessageStartEvent$=[3,w,Kpe,0,[Nj],[0],1];f.MessageStopEvent$=[3,w,Xpe,0,[Uj,rj],[0,15],1];f.OutputConfig$=[3,w,eme,0,[Vge],[[()=>f.OutputFormat$,0]]];f.OutputFormat$=[3,w,tme,0,[Kr,Bge],[0,[()=>f.OutputFormatStructure$,0]],2];f.PayloadPart$=[3,w,ime,8,[pi],[[()=>Gx,0]]];f.PerformanceConfiguration$=[3,w,ome,0,[Qfe],[0]];f.PromptRouterTrace$=[3,w,sme,0,[jfe],[0]];f.ReasoningTextBlock$=[3,w,fme,8,[Pt,jj],[0,0],1];f.S3Location$=[3,w,Sme,0,[she,ij],[0,0],1];f.SearchResultBlock$=[3,w,Ame,0,[jn,Ux,Nc,Px],[0,0,()=>Lhe,()=>f.CitationsConfig$],3];f.SearchResultContentBlock$=[3,w,Rme,0,[Pt],[0],1];f.SearchResultLocation$=[3,w,Cme,0,[bge,fd,Vh],[1,1,1]];f.ServiceTier$=[3,w,Tme,0,[Kr],[0],1];f.SpecificToolChoice$=[3,w,xme,0,[mi],[0],1];f.StartAsyncInvokeRequest$=[3,w,hme,0,[Ea,tge,kx,Ax,Xge],[0,[()=>ghe,0],()=>f.AsyncInvokeOutputDataConfig$,[0,4],()=>zhe],3];f.StartAsyncInvokeResponse$=[3,w,yme,0,[Hh],[0],1];f.SystemTool$=[3,w,bme,0,[mi],[0],1];f.Tag$=[3,w,wme,0,[Xfe,che],[0,0],2];f.TokenUsage$=[3,w,jme,0,[bx,fge,Zge,vfe,Rfe,ffe],[1,1,1,1,1,()=>yhe],3];f.ToolConfiguration$=[3,w,$me,0,[ehe,jge],[()=>Ghe,()=>f.ToolChoice$],1];f.ToolResultBlock$=[3,w,Nme,0,[ey,Nc,Yh,Kr],[0,[()=>Bhe,0],0,0],2];f.ToolResultBlockStart$=[3,w,Ume,0,[ey,Kr,Yh],[0,0,0],1];f.ToolSpecification$=[3,w,Fme,0,[mi,Vfe,lj,Uge],[0,()=>f.ToolInputSchema$,0,2],2];f.ToolUseBlock$=[3,w,qme,0,[ey,mi,Tx,Kr],[0,0,15,0],3];f.ToolUseBlockDelta$=[3,w,Vme,0,[Tx],[0],1];f.ToolUseBlockStart$=[3,w,Hme,0,[ey,mi,Kr],[0,0,0],2];f.VideoBlock$=[3,w,Kme,0,[_a,jn],[0,()=>f.VideoSource$],2];f.WebLocation$=[3,w,Yme,0,[ahe,kfe],[0,0]];var hhe=[1,w,ile,0,[()=>f.AsyncInvokeSummary$,0]],yhe=[1,w,Rle,0,()=>f.CacheDetail$],_he=[1,w,xle,0,()=>f.CitationGeneratedContent$],Ehe=[1,w,Xle,0,()=>f.Citation$],She=[1,w,Lle,0,()=>f.CitationSourceContent$],vhe=[1,w,zle,0,()=>f.CitationSourceContentDelta$],Ahe=[1,w,mle,0,[()=>f.ContentBlock$,0]],Rhe=[1,w,ede,0,()=>f.DocumentContentBlock$],Xj=[1,w,dde,0,[()=>f.GuardrailAssessment$,0]],Phe=[1,w,fde,0,[()=>f.GuardrailAutomatedReasoningScenario$,0]],Che=[1,w,hde,0,[()=>f.GuardrailAutomatedReasoningFinding$,0]],X2=[1,w,Sde,0,[()=>f.GuardrailAutomatedReasoningInputTextReference$,0]],Fx=[1,w,Cde,0,()=>f.GuardrailAutomatedReasoningRule$],pd=[1,w,bde,0,[()=>f.GuardrailAutomatedReasoningStatement$,0]],The=[1,w,Ode,0,[()=>f.GuardrailAutomatedReasoningTranslation$,0]],xhe=[1,w,Lde,0,[()=>f.GuardrailAutomatedReasoningTranslationOption$,0]],bhe=[1,w,Gde,0,[()=>f.GuardrailContentBlock$,0]],Ihe=[1,w,qde,0,()=>f.GuardrailContentFilter$],whe=[1,w,Hde,0,()=>f.GuardrailContextualGroundingFilter$],$he=[1,w,Qde,0,()=>f.GuardrailCustomWord$],khe=[1,w,spe,0,()=>f.GuardrailManagedWord$],Dhe=[1,w,cpe,0,()=>f.GuardrailOutputContent$],Mhe=[1,w,lpe,0,()=>f.GuardrailPiiEntityFilter$],Ohe=[1,w,ppe,0,()=>f.GuardrailRegexFilter$],Nhe=[1,w,Epe,0,()=>f.GuardrailTopic$],jx=[1,w,Qpe,0,[()=>f.Message$,0]],Lhe=[1,w,Pme,0,()=>f.SearchResultContentBlock$],qx=[1,w,_me,0,[()=>f.SystemContentBlock$,0]],zhe=[1,w,Ome,0,()=>f.Tag$],Uhe=[1,w,Lme,0,()=>f.ToolResultBlockDelta$],Bhe=[1,w,Bme,0,[()=>f.ToolResultContentBlock$,0]],Ghe=[1,w,Wme,0,()=>f.Tool$],Fhe=[2,w,pde,0,[0,0],[()=>Xj,0]],jhe=[2,w,mde,0,[0,0],[()=>f.GuardrailAssessment$,0]],Yj=[2,w,ame,8,0,()=>f.PromptVariableValues$],Qj=[2,w,dme,8,0,0];f.AsyncInvokeOutputDataConfig$=[4,w,rle,0,[Tge],[()=>f.AsyncInvokeS3OutputDataConfig$]];f.AudioSource$=[4,w,sle,8,[pi,Xh],[21,()=>f.S3Location$]];f.CitationGeneratedContent$=[4,w,Tle,0,[Pt],[0]];f.CitationLocation$=[4,w,ble,0,[lhe,bfe,wfe,Ife,Ige],[()=>f.WebLocation$,()=>f.DocumentCharLocation$,()=>f.DocumentPageLocation$,()=>f.DocumentChunkLocation$,()=>f.SearchResultLocation$]];f.CitationSourceContent$=[4,w,Ole,0,[Pt],[0]];f.ContentBlock$=[4,w,Ele,0,[Pt,zc,dj,Hj,cfe,zx,Lx,_j,vx,Dj,mfe,Bj],[0,[()=>f.ImageBlock$,0],()=>f.DocumentBlock$,()=>f.VideoBlock$,[()=>f.AudioBlock$,0],()=>f.ToolUseBlock$,[()=>f.ToolResultBlock$,0],[()=>f.GuardrailConverseContentBlock$,0],()=>f.CachePointBlock$,[()=>f.ReasoningContentBlock$,0],()=>f.CitationsContentBlock$,()=>f.SearchResultBlock$]];f.ContentBlockDelta$=[4,w,fle,0,[Pt,zx,Lx,Dj,Pfe,zc],[0,()=>f.ToolUseBlockDelta$,()=>Uhe,[()=>f.ReasoningContentBlockDelta$,0],()=>f.CitationsDelta$,[()=>f.ImageBlockDelta$,0]]];f.ContentBlockStart$=[4,w,hle,0,[zx,Lx,zc],[()=>f.ToolUseBlockStart$,()=>f.ToolResultBlockStart$,()=>f.ImageBlockStart$]];f.ConverseOutput$=[4,w,wle,0,[Ir],[[()=>f.Message$,0]]];f.ConverseStreamOutput$=[4,w,Gle,{[Qh]:1},[nge,dfe,lfe,pfe,oge,age,xx,wx,Bx,Nx,Dx],[()=>f.MessageStartEvent$,()=>f.ContentBlockStartEvent$,[()=>f.ContentBlockDeltaEvent$,0],()=>f.ContentBlockStopEvent$,()=>f.MessageStopEvent$,[()=>f.ConverseStreamMetadataEvent$,0],[()=>f.InternalServerException$,0],[()=>f.ModelStreamErrorException$,0],[()=>f.ValidationException$,0],[()=>f.ThrottlingException$,0],[()=>f.ServiceUnavailableException$,0]]];f.CountTokensInput$=[4,w,Hle,0,[qfe,Tfe],[[()=>f.InvokeModelTokensRequest$,0],[()=>f.ConverseTokensRequest$,0]]];f.DocumentContentBlock$=[4,w,tde,0,[Pt],[0]];f.DocumentSource$=[4,w,ide,0,[pi,Xh,Pt,Nc],[21,()=>f.S3Location$,0,()=>Rhe]];f.GuardrailAutomatedReasoningFinding$=[4,w,gde,0,[uhe,Kfe,Mge,Jfe,Gge,qge,uge],[[()=>f.GuardrailAutomatedReasoningValidFinding$,0],[()=>f.GuardrailAutomatedReasoningInvalidFinding$,0],[()=>f.GuardrailAutomatedReasoningSatisfiableFinding$,0],[()=>f.GuardrailAutomatedReasoningImpossibleFinding$,0],[()=>f.GuardrailAutomatedReasoningTranslationAmbiguousFinding$,0],()=>f.GuardrailAutomatedReasoningTooComplexFinding$,()=>f.GuardrailAutomatedReasoningNoTranslationsFinding$]];f.GuardrailContentBlock$=[4,w,Bde,0,[Pt,zc],[()=>f.GuardrailTextBlock$,[()=>f.GuardrailImageBlock$,0]]];f.GuardrailConverseContentBlock$=[4,w,Fde,0,[Pt,zc],[()=>f.GuardrailConverseTextBlock$,[()=>f.GuardrailConverseImageBlock$,0]]];f.GuardrailConverseImageSource$=[4,w,Kde,8,[pi],[21]];f.GuardrailImageSource$=[4,w,ope,8,[pi],[21]];f.ImageSource$=[4,w,Upe,8,[pi,Xh],[21,()=>f.S3Location$]];f.InvokeModelWithBidirectionalStreamInput$=[4,w,kpe,{[Qh]:1},[Rx],[[()=>f.BidirectionalInputPayloadPart$,0]]];f.InvokeModelWithBidirectionalStreamOutput$=[4,w,Dpe,{[Qh]:1},[Rx,xx,wx,Bx,Nx,Cj,Dx],[[()=>f.BidirectionalOutputPayloadPart$,0],[()=>f.InternalServerException$,0],[()=>f.ModelStreamErrorException$,0],[()=>f.ValidationException$,0],[()=>f.ThrottlingException$,0],[()=>f.ModelTimeoutException$,0],[()=>f.ServiceUnavailableException$,0]]];f.OutputFormatStructure$=[4,w,rme,8,[Zfe],[()=>f.JsonSchemaDefinition$]];f.PromptVariableValues$=[4,w,cme,0,[Pt],[0]];f.ReasoningContentBlock$=[4,w,ume,8,[vge,Mj],[[()=>f.ReasoningTextBlock$,0],21]];f.ReasoningContentBlockDelta$=[4,w,lme,8,[Pt,Mj,jj],[0,21,0]];f.ResponseStream$=[4,w,mme,{[Qh]:1},[Rx,xx,wx,Bx,Nx,Cj,Dx],[[()=>f.PayloadPart$,0],[()=>f.InternalServerException$,0],[()=>f.ModelStreamErrorException$,0],[()=>f.ValidationException$,0],[()=>f.ThrottlingException$,0],[()=>f.ModelTimeoutException$,0],[()=>f.ServiceUnavailableException$,0]]];f.SystemContentBlock$=[4,w,Eme,0,[Pt,_j,vx],[0,[()=>f.GuardrailConverseContentBlock$,0],()=>f.CachePointBlock$]];f.Tool$=[4,w,Jme,0,[Kge,kge,vx],[()=>f.ToolSpecification$,()=>f.SystemTool$,()=>f.CachePointBlock$]];f.ToolChoice$=[4,w,kme,0,[ufe,sfe,the],[()=>f.AutoToolChoice$,()=>f.AnyToolChoice$,()=>f.SpecificToolChoice$]];f.ToolInputSchema$=[4,w,Mme,0,[Ix],[15]];f.ToolResultBlockDelta$=[4,w,zme,0,[Pt,Ix],[0,15]];f.ToolResultContentBlock$=[4,w,Gme,0,[Ix,Pt,zc,dj,Hj,Bj],[15,0,[()=>f.ImageBlock$,0],()=>f.DocumentBlock$,()=>f.VideoBlock$,()=>f.SearchResultBlock$]];f.VideoSource$=[4,w,Xme,0,[pi,Xh],[21,()=>f.S3Location$]];f.ApplyGuardrail$=[9,w,Xue,{[Eo]:["POST","/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply",200]},()=>f.ApplyGuardrailRequest$,()=>f.ApplyGuardrailResponse$];f.Converse$=[9,w,Yle,{[Eo]:["POST","/model/{modelId}/converse",200]},()=>f.ConverseRequest$,()=>f.ConverseResponse$];f.ConverseStream$=[9,w,Mle,{[Eo]:["POST","/model/{modelId}/converse-stream",200]},()=>f.ConverseStreamRequest$,()=>f.ConverseStreamResponse$];f.CountTokens$=[9,w,Zle,{[Eo]:["POST","/model/{modelId}/count-tokens",200]},()=>f.CountTokensRequest$,()=>f.CountTokensResponse$];f.GetAsyncInvoke$=[9,w,cde,{[Eo]:["GET","/async-invoke/{invocationArn}",200]},()=>f.GetAsyncInvokeRequest$,()=>f.GetAsyncInvokeResponse$];f.InvokeModel$=[9,w,xpe,{[Eo]:["POST","/model/{modelId}/invoke",200]},()=>f.InvokeModelRequest$,()=>f.InvokeModelResponse$];f.InvokeModelWithBidirectionalStream$=[9,w,$pe,{[Eo]:["POST","/model/{modelId}/invoke-with-bidirectional-stream",200]},()=>f.InvokeModelWithBidirectionalStreamRequest$,()=>f.InvokeModelWithBidirectionalStreamResponse$];f.InvokeModelWithResponseStream$=[9,w,Npe,{[Eo]:["POST","/model/{modelId}/invoke-with-response-stream",200]},()=>f.InvokeModelWithResponseStreamRequest$,()=>f.InvokeModelWithResponseStreamResponse$];f.ListAsyncInvokes$=[9,w,Fpe,{[Eo]:["GET","/async-invoke",200]},()=>f.ListAsyncInvokesRequest$,()=>f.ListAsyncInvokesResponse$];f.StartAsyncInvoke$=[9,w,gme,{[Eo]:["POST","/async-invoke",200]},()=>f.StartAsyncInvokeRequest$,()=>f.StartAsyncInvokeResponse$]});var r3=N(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.getRuntimeConfig=void 0;var qhe=(Dt(),Q(pc)),Vhe=(mo(),Q(ll)),Hhe=(Xe(),Q(fr)),Whe=ue(),Jhe=Gr(),e3=gt(),t3=ft(),Khe=NP(),Zhe=j2(),Xhe=Vx(),Yhe=i(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??e3.fromBase64,base64Encoder:e?.base64Encoder??e3.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Zhe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Khe.defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new qhe.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#httpBearerAuth"),"identityProvider"),signer:new Hhe.HttpBearerAuthSigner}],logger:e?.logger??new Whe.NoOpLogger,protocol:e?.protocol??Vhe.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.bedrockruntime",errorTypeRegistries:Xhe.errorTypeRegistries,version:"2023-09-30",serviceTarget:"AmazonBedrockFrontendService"},serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Jhe.parseUrl,utf8Decoder:e?.utf8Decoder??t3.fromUtf8,utf8Encoder:e?.utf8Encoder??t3.toUtf8}),"getRuntimeConfig");oy.getRuntimeConfig=Yhe});var u3=N(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.getRuntimeConfig=void 0;var Qhe=(Ko(),Q(Jo)),eye=Qhe.__importDefault(rL()),tye=(yt(),Q(Pr)),n3=(Dt(),Q(pc)),rye=Mh(),nye=D2(),o3=GC(),i3=Hi(),iy=Nt(),oye=(Xe(),Q(fr)),iye=M2(),sye=Wi(),s3=hr(),Sa=cn(),a3=to(),c3=ue(),aye=Ji(),cye=Ki(),uye=Mn(),lye=r3(),dye=i(e=>{(0,c3.emitWarningIfUnsupportedVersion)(process.version);let t=(0,cye.resolveDefaultsModeConfig)(e),r=i(()=>t().then(c3.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,lye.getRuntimeConfig)(e);(0,tye.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger,signingName:"bedrock"};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Sa.loadConfig)(n3.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??aye.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??rye.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,i3.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:eye.default.version}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??nye.eventStreamPayloadHandlerProvider,eventStreamSerdeProvider:e?.eventStreamSerdeProvider??iye.eventStreamSerdeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new n3.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#httpBearerAuth")||(async c=>{try{return await(0,o3.fromEnvSigningName)({signingName:"bedrock"})()}catch{return await(0,o3.nodeProvider)(c)(c)}}),"identityProvider"),signer:new oye.HttpBearerAuthSigner}],maxAttempts:e?.maxAttempts??(0,Sa.loadConfig)(s3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Sa.loadConfig)(iy.NODE_REGION_CONFIG_OPTIONS,{...iy.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:a3.NodeHttp2Handler.create(e?.requestHandler??(async()=>({...await r(),disableConcurrentStreams:!0}))),retryMode:e?.retryMode??(0,Sa.loadConfig)({...s3.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||uye.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??sye.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??a3.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Sa.loadConfig)(iy.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,Sa.loadConfig)(iy.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,Sa.loadConfig)(i3.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");sy.getRuntimeConfig=dye});var Bc=N(ee=>{"use strict";var h3=$$(),l3=xi(),pye=bi(),mye=Ii(),d3=ti(),y3=sN(),fye=Nt(),ay=(Xe(),Q(fr)),gye=(ke(),Q(Wo)),hye=mN(),yye=zi(),qn=gr(),p3=hr(),ir=ue(),m3=NP(),_ye=u3(),f3=go(),g3=Me(),wr=Vx(),cy=hx(),Eye=Gh(),Sye=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),"resolveClientEndpointParameters"),So={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},vye=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials,o=e.token;return{setHttpAuthScheme(a){let c=t.findIndex(u=>u.schemeId===a.schemeId);c===-1?t.push(a):t.splice(c,1,a)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(a){r=a},httpAuthSchemeProvider(){return r},setCredentials(a){n=a},credentials(){return n},setToken(a){o=a},token(){return o}}},"getHttpAuthExtensionConfiguration"),Aye=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials(),token:e.token()}),"resolveHttpAuthRuntimeConfig"),Rye=i((e,t)=>{let r=Object.assign(f3.getAwsRegionExtensionConfiguration(e),ir.getDefaultExtensionConfiguration(e),g3.getHttpHandlerExtensionConfiguration(e),vye(e));return t.forEach(n=>n.configure(r)),Object.assign(e,f3.resolveAwsRegionExtensionConfiguration(r),ir.resolveDefaultRuntimeConfig(r),g3.resolveHttpHandlerRuntimeConfig(r),Aye(r))},"resolveRuntimeExtensions"),gd=class extends ir.Client{static{i(this,"BedrockRuntimeClient")}config;constructor(...[t]){let r=_ye.getRuntimeConfig(t||{});super(r),this.initConfig=r;let n=Sye(r),o=d3.resolveUserAgentConfig(n),a=p3.resolveRetryConfig(o),c=fye.resolveRegionConfig(a),u=l3.resolveHostHeaderConfig(c),l=qn.resolveEndpointConfig(u),d=hye.resolveEventStreamSerdeConfig(l),_=m3.resolveHttpAuthSchemeConfig(d),y=h3.resolveEventStreamConfig(_),E=y3.resolveWebSocketConfig(y),g=Rye(E,t?.extensions||[]);this.config=g,this.middlewareStack.use(gye.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(d3.getUserAgentPlugin(this.config)),this.middlewareStack.use(p3.getRetryPlugin(this.config)),this.middlewareStack.use(yye.getContentLengthPlugin(this.config)),this.middlewareStack.use(l3.getHostHeaderPlugin(this.config)),this.middlewareStack.use(pye.getLoggerPlugin(this.config)),this.middlewareStack.use(mye.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(ay.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:m3.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:i(async v=>new ay.DefaultIdentityProviderConfig({"aws.auth#sigv4":v.credentials,"smithy.api#httpBearerAuth":v.token}),"identityProviderConfigProvider")})),this.middlewareStack.use(ay.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},uy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ApplyGuardrail",{}).n("BedrockRuntimeClient","ApplyGuardrailCommand").sc(wr.ApplyGuardrail$).build(){static{i(this,"ApplyGuardrailCommand")}},ly=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","Converse",{}).n("BedrockRuntimeClient","ConverseCommand").sc(wr.Converse$).build(){static{i(this,"ConverseCommand")}},dy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ConverseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","ConverseStreamCommand").sc(wr.ConverseStream$).build(){static{i(this,"ConverseStreamCommand")}},py=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","CountTokens",{}).n("BedrockRuntimeClient","CountTokensCommand").sc(wr.CountTokens$).build(){static{i(this,"CountTokensCommand")}},my=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","GetAsyncInvoke",{}).n("BedrockRuntimeClient","GetAsyncInvokeCommand").sc(wr.GetAsyncInvoke$).build(){static{i(this,"GetAsyncInvokeCommand")}},fy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").sc(wr.InvokeModel$).build(){static{i(this,"InvokeModelCommand")}},gy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions()),h3.getEventStreamPlugin(n),y3.getWebSocketPlugin(n,{headerPrefix:"x-amz-bedrock-"})]}).s("AmazonBedrockFrontendService","InvokeModelWithBidirectionalStream",{eventStream:{input:!0,output:!0}}).n("BedrockRuntimeClient","InvokeModelWithBidirectionalStreamCommand").sc(wr.InvokeModelWithBidirectionalStream$).build(){static{i(this,"InvokeModelWithBidirectionalStreamCommand")}},hy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").sc(wr.InvokeModelWithResponseStream$).build(){static{i(this,"InvokeModelWithResponseStreamCommand")}},hd=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ListAsyncInvokes",{}).n("BedrockRuntimeClient","ListAsyncInvokesCommand").sc(wr.ListAsyncInvokes$).build(){static{i(this,"ListAsyncInvokesCommand")}},yy=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","StartAsyncInvoke",{}).n("BedrockRuntimeClient","StartAsyncInvokeCommand").sc(wr.StartAsyncInvoke$).build(){static{i(this,"StartAsyncInvokeCommand")}},_3=ay.createPaginator(gd,hd,"nextToken","nextToken","maxResults"),Pye={ApplyGuardrailCommand:uy,ConverseCommand:ly,ConverseStreamCommand:dy,CountTokensCommand:py,GetAsyncInvokeCommand:my,InvokeModelCommand:fy,InvokeModelWithBidirectionalStreamCommand:gy,InvokeModelWithResponseStreamCommand:hy,ListAsyncInvokesCommand:hd,StartAsyncInvokeCommand:yy},Cye={paginateListAsyncInvokes:_3},_y=class extends gd{static{i(this,"BedrockRuntime")}};ir.createAggregatedClient(Pye,_y,{paginators:Cye});var Tye={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},xye={SUBMISSION_TIME:"SubmissionTime"},bye={ASCENDING:"Ascending",DESCENDING:"Descending"},Iye={JPEG:"jpeg",PNG:"png"},wye={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},$ye={FULL:"FULL",INTERVENTIONS:"INTERVENTIONS"},kye={INPUT:"INPUT",OUTPUT:"OUTPUT"},Dye={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",NONE:"NONE"},Mye={ACCOUNT_ENFORCED:"ACCOUNT_ENFORCED",ORGANIZATION_ENFORCED:"ORGANIZATION_ENFORCED",REQUEST:"REQUEST"},Oye={CROSS_ACCOUNT:"CROSS_ACCOUNT",SELF:"SELF"},Nye={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},Lye={BLOCKED:"BLOCKED",NONE:"NONE"},zye={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},Uye={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},Bye={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},Gye={BLOCKED:"BLOCKED",NONE:"NONE"},Fye={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},jye={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED",NONE:"NONE"},qye={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},Vye={BLOCKED:"BLOCKED",NONE:"NONE"},Hye={DENY:"DENY"},Wye={BLOCKED:"BLOCKED",NONE:"NONE"},Jye={PROFANITY:"PROFANITY"},Kye={DISABLED:"disabled",ENABLED:"enabled",ENABLED_FULL:"enabled_full"},Zye={AAC:"aac",FLAC:"flac",M4A:"m4a",MKA:"mka",MKV:"mkv",MP3:"mp3",MP4:"mp4",MPEG:"mpeg",MPGA:"mpga",OGG:"ogg",OPUS:"opus",PCM:"pcm",WAV:"wav",WEBM:"webm",X_AAC:"x-aac"},Xye={FIVE_MINUTES:"5m",ONE_HOUR:"1h"},Yye={DEFAULT:"default"},Qye={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"},e_e={JPEG:"jpeg",PNG:"png"},t_e={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},r_e={GIF:"gif",JPEG:"jpeg",PNG:"png",WEBP:"webp"},n_e={FLV:"flv",MKV:"mkv",MOV:"mov",MP4:"mp4",MPEG:"mpeg",MPG:"mpg",THREE_GP:"three_gp",WEBM:"webm",WMV:"wmv"},o_e={ERROR:"error",SUCCESS:"success"},i_e={SERVER_TOOL_USE:"server_tool_use"},s_e={ASSISTANT:"assistant",USER:"user"},a_e={JSON_SCHEMA:"json_schema"},c_e={OPTIMIZED:"optimized",STANDARD:"standard"},u_e={DEFAULT:"default",FLEX:"flex",PRIORITY:"priority",RESERVED:"reserved"},l_e={CONTENT_FILTERED:"content_filtered",END_TURN:"end_turn",GUARDRAIL_INTERVENED:"guardrail_intervened",MALFORMED_MODEL_OUTPUT:"malformed_model_output",MALFORMED_TOOL_USE:"malformed_tool_use",MAX_TOKENS:"max_tokens",MODEL_CONTEXT_WINDOW_EXCEEDED:"model_context_window_exceeded",STOP_SEQUENCE:"stop_sequence",TOOL_USE:"tool_use"},d_e={ASYNC:"async",SYNC:"sync"},p_e={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_FULL:"ENABLED_FULL"};ee.$Command=ir.Command;ee.__Client=ir.Client;ee.BedrockRuntimeServiceException=Eye.BedrockRuntimeServiceException;ee.ApplyGuardrailCommand=uy;ee.AsyncInvokeStatus=Tye;ee.AudioFormat=Zye;ee.BedrockRuntime=_y;ee.BedrockRuntimeClient=gd;ee.CachePointType=Yye;ee.CacheTTL=Xye;ee.ConversationRole=s_e;ee.ConverseCommand=ly;ee.ConverseStreamCommand=dy;ee.CountTokensCommand=py;ee.DocumentFormat=Qye;ee.GetAsyncInvokeCommand=my;ee.GuardrailAction=Dye;ee.GuardrailAutomatedReasoningLogicWarningType=Nye;ee.GuardrailContentFilterConfidence=zye;ee.GuardrailContentFilterStrength=Uye;ee.GuardrailContentFilterType=Bye;ee.GuardrailContentPolicyAction=Lye;ee.GuardrailContentQualifier=wye;ee.GuardrailContentSource=kye;ee.GuardrailContextualGroundingFilterType=Fye;ee.GuardrailContextualGroundingPolicyAction=Gye;ee.GuardrailConverseContentQualifier=t_e;ee.GuardrailConverseImageFormat=e_e;ee.GuardrailImageFormat=Iye;ee.GuardrailManagedWordType=Jye;ee.GuardrailOrigin=Mye;ee.GuardrailOutputScope=$ye;ee.GuardrailOwnership=Oye;ee.GuardrailPiiEntityType=qye;ee.GuardrailSensitiveInformationPolicyAction=jye;ee.GuardrailStreamProcessingMode=d_e;ee.GuardrailTopicPolicyAction=Vye;ee.GuardrailTopicType=Hye;ee.GuardrailTrace=Kye;ee.GuardrailWordPolicyAction=Wye;ee.ImageFormat=r_e;ee.InvokeModelCommand=fy;ee.InvokeModelWithBidirectionalStreamCommand=gy;ee.InvokeModelWithResponseStreamCommand=hy;ee.ListAsyncInvokesCommand=hd;ee.OutputFormatType=a_e;ee.PerformanceConfigLatency=c_e;ee.ServiceTierType=u_e;ee.SortAsyncInvocationBy=xye;ee.SortOrder=bye;ee.StartAsyncInvokeCommand=yy;ee.StopReason=l_e;ee.ToolResultStatus=o_e;ee.ToolUseType=i_e;ee.Trace=p_e;ee.VideoFormat=n_e;ee.paginateListAsyncInvokes=_3;Object.prototype.hasOwnProperty.call(wr,"__proto__")&&!Object.prototype.hasOwnProperty.call(ee,"__proto__")&&Object.defineProperty(ee,"__proto__",{enumerable:!0,value:wr.__proto__});Object.keys(wr).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ee,e)&&(ee[e]=wr[e])});Object.prototype.hasOwnProperty.call(cy,"__proto__")&&!Object.prototype.hasOwnProperty.call(ee,"__proto__")&&Object.defineProperty(ee,"__proto__",{enumerable:!0,value:cy.__proto__});Object.keys(cy).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ee,e)&&(ee[e]=cy[e])})});var va={};bt(va,{AWSSDKSigV4Signer:()=>yP,AwsEc2QueryProtocol:()=>Zf,AwsJson1_0Protocol:()=>Gf,AwsJson1_1Protocol:()=>Ff,AwsJsonRpcProtocol:()=>rs,AwsQueryProtocol:()=>os,AwsRestJsonProtocol:()=>po,AwsRestXmlProtocol:()=>Qf,AwsSdkSigV4ASigner:()=>ni,AwsSdkSigV4Signer:()=>Lt,AwsSmithyRpcV2CborProtocol:()=>Nf,JsonCodec:()=>ts,JsonShapeDeserializer:()=>Ec,JsonShapeSerializer:()=>Sc,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>ao,NODE_SIGV4A_CONFIG_OPTIONS:()=>df,QueryShapeSerializer:()=>vc,XmlCodec:()=>Rc,XmlShapeDeserializer:()=>ns,XmlShapeSerializer:()=>Ac,_toBool:()=>az,_toNum:()=>cz,_toStr:()=>sz,awsExpectUnion:()=>Rz,emitWarningIfUnsupportedVersion:()=>io,getBearerTokenEnvKey:()=>uf,getLongPollPlugin:()=>hR,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>Xf,parseJsonBody:()=>cl,parseJsonErrorBody:()=>gz,parseXmlBody:()=>TC,parseXmlErrorBody:()=>Uz,resolveAWSSDKSigV4Config:()=>Q1,resolveAwsSdkSigV4AConfig:()=>lf,resolveAwsSdkSigV4Config:()=>Nn,setCredentialFeature:()=>Mi,setFeature:()=>hO,setTokenFeature:()=>_O,state:()=>xm,validateSigningProperties:()=>lc});var Aa=D(()=>{yt();Dt();mo()});var Jx=N(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.resolveHttpAuthSchemeConfig=_s.defaultBedrockHttpAuthSchemeProvider=_s.defaultBedrockHttpAuthSchemeParametersProvider=void 0;var m_e=(Aa(),Q(va)),Hx=(Xe(),Q(fr)),Wx=It(),f_e=i(async(e,t,r)=>({operation:(0,Wx.getSmithyContext)(t).operation,region:await(0,Wx.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultBedrockHttpAuthSchemeParametersProvider");_s.defaultBedrockHttpAuthSchemeParametersProvider=f_e;function g_e(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i(g_e,"createAwsAuthSigv4HttpAuthOption");function h_e(e){return{schemeId:"smithy.api#httpBearerAuth",propertiesExtractor:i(({profile:t,filepath:r,configFilepath:n,ignoreCache:o},a)=>({identityProperties:{profile:t,filepath:r,configFilepath:n,ignoreCache:o}}),"propertiesExtractor")}}i(h_e,"createSmithyApiHttpBearerAuthHttpAuthOption");var y_e=i(e=>{let t=[];switch(e.operation){default:t.push(g_e(e)),t.push(h_e(e))}return t},"defaultBedrockHttpAuthSchemeProvider");_s.defaultBedrockHttpAuthSchemeProvider=y_e;var __e=i(e=>{let t=(0,Hx.memoizeIdentityProvider)(e.token,Hx.isIdentityExpired,Hx.doesIdentityRequireRefresh),r=(0,m_e.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,Wx.normalizeProvider)(e.authSchemePreference??[]),token:t})},"resolveHttpAuthSchemeConfig");_s.resolveHttpAuthSchemeConfig=__e});var G3={};bt(G3,{__addDisposableResource:()=>U3,__assign:()=>Ey,__asyncDelegator:()=>$3,__asyncGenerator:()=>w3,__asyncValues:()=>k3,__await:()=>Gc,__awaiter:()=>P3,__classPrivateFieldGet:()=>N3,__classPrivateFieldIn:()=>z3,__classPrivateFieldSet:()=>L3,__createBinding:()=>vy,__decorate:()=>v3,__disposeResources:()=>B3,__esDecorate:()=>E_e,__exportStar:()=>T3,__extends:()=>E3,__generator:()=>C3,__importDefault:()=>O3,__importStar:()=>M3,__makeTemplateObject:()=>D3,__metadata:()=>R3,__param:()=>A3,__propKey:()=>v_e,__read:()=>Zx,__rest:()=>S3,__runInitializers:()=>S_e,__setFunctionName:()=>A_e,__spread:()=>x3,__spreadArray:()=>I3,__spreadArrays:()=>b3,__values:()=>Sy,default:()=>C_e});function E3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Kx(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function S3(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function v3(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(a=(o<3?c(a):o>3?c(t,r,a):c(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function A3(e,t){return function(r,n){t(r,n,e)}}function E_e(e,t,r,n,o,a){function c(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}i(c,"accept");for(var u=n.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,_=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),y,E=!1,g=r.length-1;g>=0;g--){var v={};for(var A in n)v[A]=A==="access"?{}:n[A];for(var A in n.access)v.access[A]=n.access[A];v.addInitializer=function(b){if(E)throw new TypeError("Cannot add initializers after decoration has completed");a.push(c(b||null))};var R=(0,r[g])(u==="accessor"?{get:_.get,set:_.set}:_[l],v);if(u==="accessor"){if(R===void 0)continue;if(R===null||typeof R!="object")throw new TypeError("Object expected");(y=c(R.get))&&(_.get=y),(y=c(R.set))&&(_.set=y),(y=c(R.init))&&o.unshift(y)}else(y=c(R))&&(u==="field"?o.unshift(y):_[l]=y)}d&&Object.defineProperty(d,n.name,_),E=!0}function S_e(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function v_e(e){return typeof e=="symbol"?e:"".concat(e)}function A_e(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function R3(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function P3(e,t,r,n){function o(a){return a instanceof r?a:new r(function(c){c(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,c){function u(_){try{d(n.next(_))}catch(y){c(y)}}i(u,"fulfilled");function l(_){try{d(n.throw(_))}catch(y){c(y)}}i(l,"rejected");function d(_){_.done?a(_.value):o(_.value).then(u,l)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function C3(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(d){return function(_){return l([d,_])}}function l(d){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(_){d=[6,_],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function T3(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&vy(t,e,r)}function Sy(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:i(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zx(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],c;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){c={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return a}function x3(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Zx(arguments[t]));return e}function b3(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],c=0,u=a.length;c<u;c++,o++)n[o]=a[c];return n}function I3(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function Gc(e){return this instanceof Gc?(this.v=e,this):new Gc(e)}function w3(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o={},c("next"),c("throw"),c("return"),o[Symbol.asyncIterator]=function(){return this},o;function c(E){n[E]&&(o[E]=function(g){return new Promise(function(v,A){a.push([E,g,v,A])>1||u(E,g)})})}function u(E,g){try{l(n[E](g))}catch(v){y(a[0][3],v)}}function l(E){E.value instanceof Gc?Promise.resolve(E.value.v).then(d,_):y(a[0][2],E)}function d(E){u("next",E)}function _(E){u("throw",E)}function y(E,g){E(g),a.shift(),a.length&&u(a[0][0],a[0][1])}}function $3(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(c){return(r=!r)?{value:Gc(e[o](c)),done:!1}:a?a(c):c}:a}}function k3(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Sy=="function"?Sy(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(c){return new Promise(function(u,l){c=e[a](c),o(u,l,c.done,c.value)})}}function o(a,c,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},c)}}function D3(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function M3(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vy(t,e,r);return R_e(t,e),t}function O3(e){return e&&e.__esModule?e:{default:e}}function N3(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function L3(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function z3(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function U3(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function B3(e){function t(n){e.error=e.hasError?new P_e(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}i(t,"fail");function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(a){return t(a),r()})}catch(a){t(a)}}if(e.hasError)throw e.error}return i(r,"next"),r()}var Kx,Ey,vy,R_e,P_e,C_e,F3=D(()=>{Kx=i(function(e,t){return Kx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Kx(e,t)},"extendStatics");i(E3,"__extends");Ey=i(function(){return Ey=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),Ey.apply(this,arguments)},"__assign");i(S3,"__rest");i(v3,"__decorate");i(A3,"__param");i(E_e,"__esDecorate");i(S_e,"__runInitializers");i(v_e,"__propKey");i(A_e,"__setFunctionName");i(R3,"__metadata");i(P3,"__awaiter");i(C3,"__generator");vy=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});i(T3,"__exportStar");i(Sy,"__values");i(Zx,"__read");i(x3,"__spread");i(b3,"__spreadArrays");i(I3,"__spreadArray");i(Gc,"__await");i(w3,"__asyncGenerator");i($3,"__asyncDelegator");i(k3,"__asyncValues");i(D3,"__makeTemplateObject");R_e=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};i(M3,"__importStar");i(O3,"__importDefault");i(N3,"__classPrivateFieldGet");i(L3,"__classPrivateFieldSet");i(z3,"__classPrivateFieldIn");i(U3,"__addDisposableResource");P_e=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(B3,"__disposeResources");C_e={__extends:E3,__assign:Ey,__rest:S3,__decorate:v3,__param:A3,__metadata:R3,__awaiter:P3,__generator:C3,__createBinding:vy,__exportStar:T3,__values:Sy,__read:Zx,__spread:x3,__spreadArrays:b3,__spreadArray:I3,__await:Gc,__asyncGenerator:w3,__asyncDelegator:$3,__asyncValues:k3,__makeTemplateObject:D3,__importStar:M3,__importDefault:O3,__classPrivateFieldGet:N3,__classPrivateFieldSet:L3,__classPrivateFieldIn:z3,__addDisposableResource:U3,__disposeResources:B3}});var j3=N((lft,T_e)=>{T_e.exports={name:"@aws-sdk/client-bedrock",description:"AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",version:"3.1017.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-bedrock","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},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.973.24","@aws-sdk/credential-provider-node":"^3.972.25","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.8","@aws-sdk/middleware-user-agent":"^3.972.25","@aws-sdk/region-config-resolver":"^3.972.9","@aws-sdk/token-providers":"3.1017.0","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.11","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.12","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.27","@smithy/middleware-retry":"^4.4.44","@smithy/middleware-serde":"^4.2.15","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.0","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.7","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.43","@smithy/util-defaults-mode-node":"^4.2.47","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.12","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},engines:{node:">=20.0.0"},typesVersions:{"<4.5":{"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-bedrock",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock"}}});var W3=N(_d=>{"use strict";var x_e=(yt(),Q(Pr)),b_e=(Dt(),Q(pc)),Xr=jt(),yd=On(),I_e=require("node:fs"),w_e=i(({logger:e,signingName:t}={})=>async()=>{if(e?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"),!t)throw new Xr.TokenProviderError("Please pass 'signingName' to compute environment variable key",{logger:e});let r=b_e.getBearerTokenEnvKey(t);if(!(r in process.env))throw new Xr.TokenProviderError(`Token not present in '${r}' environment variable`,{logger:e});let n={token:process.env[r]};return x_e.setTokenFeature(n,"BEARER_SERVICE_ENV_VARS","3"),n},"fromEnvSigningName"),$_e=300*1e3,Xx="To refresh this SSO session run 'aws sso login' with the corresponding profile.",k_e=i(async(e,t={},r)=>{let{SSOOIDCClient:n}=await Promise.resolve().then(()=>(xl(),Tl)),o=i(c=>t.clientConfig?.[c]??t.parentClientConfig?.[c]??r?.[c],"coalesce");return new n(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:o("logger"),userAgentAppId:o("userAgentAppId")}))},"getSsoOidcClient"),D_e=i(async(e,t,r={},n)=>{let{CreateTokenCommand:o}=await Promise.resolve().then(()=>(xl(),Tl));return(await k_e(t,r,n)).send(new o({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken"),q3=i(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Xr.TokenProviderError(`Token is expired. ${Xx}`,!1)},"validateTokenExpiry"),Ra=i((e,t,r=!1)=>{if(typeof t>"u")throw new Xr.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${Xx}`,!1)},"validateTokenKey"),{writeFile:M_e}=I_e.promises,O_e=i((e,t)=>{let r=yd.getSSOTokenFilepath(e),n=JSON.stringify(t,null,2);return M_e(r,n)},"writeSSOTokenToFile"),V3=new Date(0),H3=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await yd.parseKnownFiles(e),n=yd.getProfileName({profile:e.profile??t?.profile}),o=r[n];if(o){if(!o.sso_session)throw new Xr.TokenProviderError(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new Xr.TokenProviderError(`Profile '${n}' could not be found in shared credentials file.`,!1);let a=o.sso_session,u=(await yd.loadSsoSessionData(e))[a];if(!u)throw new Xr.TokenProviderError(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let g of["sso_start_url","sso_region"])if(!u[g])throw new Xr.TokenProviderError(`Sso session '${a}' is missing required property '${g}'.`,!1);u.sso_start_url;let l=u.sso_region,d;try{d=await yd.getSSOTokenFromFile(a)}catch{throw new Xr.TokenProviderError(`The SSO session token associated with profile=${n} was not found or is invalid. ${Xx}`,!1)}Ra("accessToken",d.accessToken),Ra("expiresAt",d.expiresAt);let{accessToken:_,expiresAt:y}=d,E={token:_,expiration:new Date(y)};if(E.expiration.getTime()-Date.now()>$_e)return E;if(Date.now()-V3.getTime()<30*1e3)return q3(E),E;Ra("clientId",d.clientId,!0),Ra("clientSecret",d.clientSecret,!0),Ra("refreshToken",d.refreshToken,!0);try{V3.setTime(Date.now());let g=await D_e(d,l,e,t);Ra("accessToken",g.accessToken),Ra("expiresIn",g.expiresIn);let v=new Date(Date.now()+g.expiresIn*1e3);try{await O_e(a,{...d,accessToken:g.accessToken,expiresAt:v.toISOString(),refreshToken:g.refreshToken})}catch{}return{token:g.accessToken,expiration:v}}catch{return q3(E),E}},"fromSso"),N_e=i(({token:e,logger:t})=>async()=>{if(t?.debug("@aws-sdk/token-providers - fromStatic"),!e||!e.token)throw new Xr.TokenProviderError("Please pass a valid token to fromStatic",!1);return e},"fromStatic"),L_e=i((e={})=>Xr.memoize(Xr.chain(H3(e),async()=>{throw new Xr.TokenProviderError("Could not load token from any providers",!1)}),t=>t.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,t=>t.expiration!==void 0),"nodeProvider");_d.fromEnvSigningName=w_e;_d.fromSso=H3;_d.fromStatic=N_e;_d.nodeProvider=L_e});var a6=N(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.ruleSet=void 0;var o6="required",Ao="fn",Ro="argv",jc="ref",J3=!0,K3="isSet",Sd="booleanEquals",Fc="error",Ed="endpoint",Er="tree",Yx="PartitionResult",Z3={[o6]:!1,type:"string"},X3={[o6]:!0,default:!1,type:"boolean"},Y3={[jc]:"Endpoint"},i6={[Ao]:Sd,[Ro]:[{[jc]:"UseFIPS"},!0]},s6={[Ao]:Sd,[Ro]:[{[jc]:"UseDualStack"},!0]},vo={},Q3={[Ao]:"getAttr",[Ro]:[{[jc]:Yx},"supportsFIPS"]},e6={[Ao]:Sd,[Ro]:[!0,{[Ao]:"getAttr",[Ro]:[{[jc]:Yx},"supportsDualStack"]}]},t6=[i6],r6=[s6],n6=[{[jc]:"Region"}],z_e={version:"1.0",parameters:{Region:Z3,UseDualStack:X3,UseFIPS:X3,Endpoint:Z3},rules:[{conditions:[{[Ao]:K3,[Ro]:[Y3]}],rules:[{conditions:t6,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fc},{rules:[{conditions:r6,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fc},{endpoint:{url:Y3,properties:vo,headers:vo},type:Ed}],type:Er}],type:Er},{rules:[{conditions:[{[Ao]:K3,[Ro]:n6}],rules:[{conditions:[{[Ao]:"aws.partition",[Ro]:n6,assign:Yx}],rules:[{conditions:[i6,s6],rules:[{conditions:[{[Ao]:Sd,[Ro]:[J3,Q3]},e6],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vo,headers:vo},type:Ed}],type:Er}],type:Er},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Fc}],type:Er},{conditions:t6,rules:[{conditions:[{[Ao]:Sd,[Ro]:[Q3,J3]}],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vo,headers:vo},type:Ed}],type:Er}],type:Er},{error:"FIPS is enabled but this partition does not support FIPS",type:Fc}],type:Er},{conditions:r6,rules:[{conditions:[e6],rules:[{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vo,headers:vo},type:Ed}],type:Er}],type:Er},{error:"DualStack is enabled but this partition does not support DualStack",type:Fc}],type:Er},{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dnsSuffix}",properties:vo,headers:vo},type:Ed}],type:Er}],type:Er}],type:Er},{error:"Invalid Configuration: Missing Region",type:Fc}],type:Er}]};Ay.ruleSet=z_e});var c6=N(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.defaultEndpointResolver=void 0;var U_e=Di(),Qx=er(),B_e=a6(),G_e=new Qx.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),F_e=i((e,t={})=>G_e.get(e,()=>(0,Qx.resolveEndpoint)(B_e.ruleSet,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Ry.defaultEndpointResolver=F_e;Qx.customEndpointFunctions.aws=U_e.awsEndpointFunctions});var Py=N(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.BedrockServiceException=qc.__ServiceException=void 0;var u6=ue();Object.defineProperty(qc,"__ServiceException",{enumerable:!0,get:i(function(){return u6.ServiceException},"get")});var e0=class e extends u6.ServiceException{static{i(this,"BedrockServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};qc.BedrockServiceException=e0});var d0=N(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.ServiceUnavailableException=pt.ResourceInUseException=pt.TooManyTagsException=pt.ServiceQuotaExceededException=pt.ConflictException=pt.ValidationException=pt.ThrottlingException=pt.ResourceNotFoundException=pt.InternalServerException=pt.AccessDeniedException=void 0;var Po=Py(),t0=class e extends Po.BedrockServiceException{static{i(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.AccessDeniedException=t0;var r0=class e extends Po.BedrockServiceException{static{i(this,"InternalServerException")}name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.InternalServerException=r0;var n0=class e extends Po.BedrockServiceException{static{i(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ResourceNotFoundException=n0;var o0=class e extends Po.BedrockServiceException{static{i(this,"ThrottlingException")}name="ThrottlingException";$fault="client";constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ThrottlingException=o0;var i0=class e extends Po.BedrockServiceException{static{i(this,"ValidationException")}name="ValidationException";$fault="client";constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ValidationException=i0;var s0=class e extends Po.BedrockServiceException{static{i(this,"ConflictException")}name="ConflictException";$fault="client";constructor(t){super({name:"ConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ConflictException=s0;var a0=class e extends Po.BedrockServiceException{static{i(this,"ServiceQuotaExceededException")}name="ServiceQuotaExceededException";$fault="client";constructor(t){super({name:"ServiceQuotaExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ServiceQuotaExceededException=a0;var c0=class e extends Po.BedrockServiceException{static{i(this,"TooManyTagsException")}name="TooManyTagsException";$fault="client";resourceName;constructor(t){super({name:"TooManyTagsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.resourceName=t.resourceName}};pt.TooManyTagsException=c0;var u0=class e extends Po.BedrockServiceException{static{i(this,"ResourceInUseException")}name="ResourceInUseException";$fault="client";constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ResourceInUseException=u0;var l0=class e extends Po.BedrockServiceException{static{i(this,"ServiceUnavailableException")}name="ServiceUnavailableException";$fault="server";constructor(t){super({name:"ServiceUnavailableException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}};pt.ServiceUnavailableException=l0});var hb=N(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.AutomatedReasoningPolicyBuildWorkflowRepairContent$=s.AutomatedReasoningPolicyBuildWorkflowDocument$=s.AutomatedReasoningPolicyBuildStepMessage$=s.AutomatedReasoningPolicyBuildStep$=s.AutomatedReasoningPolicyBuildResultAssetManifestEntry$=s.AutomatedReasoningPolicyBuildResultAssetManifest$=s.AutomatedReasoningPolicyBuildLogEntry$=s.AutomatedReasoningPolicyBuildLog$=s.AutomatedReasoningPolicyAtomicStatement$=s.AutomatedReasoningPolicyAnnotatedLine$=s.AutomatedReasoningPolicyAnnotatedChunk$=s.AutomatedReasoningPolicyAddVariableMutation$=s.AutomatedReasoningPolicyAddVariableAnnotation$=s.AutomatedReasoningPolicyAddTypeValue$=s.AutomatedReasoningPolicyAddTypeMutation$=s.AutomatedReasoningPolicyAddTypeAnnotation$=s.AutomatedReasoningPolicyAddRuleMutation$=s.AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation$=s.AutomatedReasoningPolicyAddRuleAnnotation$=s.AutomatedReasoningLogicStatement$=s.AutomatedReasoningCheckValidFinding$=s.AutomatedReasoningCheckTranslationOption$=s.AutomatedReasoningCheckTranslationAmbiguousFinding$=s.AutomatedReasoningCheckTranslation$=s.AutomatedReasoningCheckTooComplexFinding$=s.AutomatedReasoningCheckScenario$=s.AutomatedReasoningCheckSatisfiableFinding$=s.AutomatedReasoningCheckRule$=s.AutomatedReasoningCheckNoTranslationsFinding$=s.AutomatedReasoningCheckLogicWarning$=s.AutomatedReasoningCheckInvalidFinding$=s.AutomatedReasoningCheckInputTextReference$=s.AutomatedReasoningCheckImpossibleFinding$=s.AutomatedEvaluationCustomMetricConfig$=s.AutomatedEvaluationConfig$=s.AgreementAvailability$=s.AccountEnforcedGuardrailOutputConfiguration$=s.AccountEnforcedGuardrailInferenceInputConfiguration$=s.errorTypeRegistries=s.ValidationException$=s.TooManyTagsException$=s.ThrottlingException$=s.ServiceUnavailableException$=s.ServiceQuotaExceededException$=s.ResourceNotFoundException$=s.ResourceInUseException$=s.InternalServerException$=s.ConflictException$=s.AccessDeniedException$=s.BedrockServiceException$=void 0;s.CancelAutomatedReasoningPolicyBuildWorkflowResponse$=s.CancelAutomatedReasoningPolicyBuildWorkflowRequest$=s.ByteContentDoc$=s.BedrockEvaluatorModel$=s.BatchDeleteEvaluationJobResponse$=s.BatchDeleteEvaluationJobRequest$=s.BatchDeleteEvaluationJobItem$=s.BatchDeleteEvaluationJobError$=s.AutomatedReasoningPolicyVariableReport$=s.AutomatedReasoningPolicyUpdateVariableMutation$=s.AutomatedReasoningPolicyUpdateVariableAnnotation$=s.AutomatedReasoningPolicyUpdateTypeValue$=s.AutomatedReasoningPolicyUpdateTypeMutation$=s.AutomatedReasoningPolicyUpdateTypeAnnotation$=s.AutomatedReasoningPolicyUpdateRuleMutation$=s.AutomatedReasoningPolicyUpdateRuleAnnotation$=s.AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation$=s.AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation$=s.AutomatedReasoningPolicyTestResult$=s.AutomatedReasoningPolicyTestCase$=s.AutomatedReasoningPolicySummary$=s.AutomatedReasoningPolicyStatementReference$=s.AutomatedReasoningPolicyStatementLocation$=s.AutomatedReasoningPolicySourceDocument$=s.AutomatedReasoningPolicyScenarios$=s.AutomatedReasoningPolicyScenario$=s.AutomatedReasoningPolicyRuleReport$=s.AutomatedReasoningPolicyReportSourceDocument$=s.AutomatedReasoningPolicyPlanning$=s.AutomatedReasoningPolicyIngestContentAnnotation$=s.AutomatedReasoningPolicyGeneratedTestCases$=s.AutomatedReasoningPolicyGeneratedTestCase$=s.AutomatedReasoningPolicyFidelityReport$=s.AutomatedReasoningPolicyDisjointRuleSet$=s.AutomatedReasoningPolicyDeleteVariableMutation$=s.AutomatedReasoningPolicyDeleteVariableAnnotation$=s.AutomatedReasoningPolicyDeleteTypeValue$=s.AutomatedReasoningPolicyDeleteTypeMutation$=s.AutomatedReasoningPolicyDeleteTypeAnnotation$=s.AutomatedReasoningPolicyDeleteRuleMutation$=s.AutomatedReasoningPolicyDeleteRuleAnnotation$=s.AutomatedReasoningPolicyDefinitionVariable$=s.AutomatedReasoningPolicyDefinitionTypeValuePair$=s.AutomatedReasoningPolicyDefinitionTypeValue$=s.AutomatedReasoningPolicyDefinitionType$=s.AutomatedReasoningPolicyDefinitionRule$=s.AutomatedReasoningPolicyDefinitionQualityReport$=s.AutomatedReasoningPolicyDefinition$=s.AutomatedReasoningPolicyBuildWorkflowSummary$=s.AutomatedReasoningPolicyBuildWorkflowSource$=void 0;s.DeleteCustomModelDeploymentRequest$=s.DeleteAutomatedReasoningPolicyTestCaseResponse$=s.DeleteAutomatedReasoningPolicyTestCaseRequest$=s.DeleteAutomatedReasoningPolicyResponse$=s.DeleteAutomatedReasoningPolicyRequest$=s.DeleteAutomatedReasoningPolicyBuildWorkflowResponse$=s.DeleteAutomatedReasoningPolicyBuildWorkflowRequest$=s.DataProcessingDetails$=s.CustomModelUnits$=s.CustomModelSummary$=s.CustomModelDeploymentUpdateDetails$=s.CustomModelDeploymentSummary$=s.CustomMetricEvaluatorModelConfig$=s.CustomMetricDefinition$=s.CustomMetricBedrockEvaluatorModel$=s.CreateProvisionedModelThroughputResponse$=s.CreateProvisionedModelThroughputRequest$=s.CreatePromptRouterResponse$=s.CreatePromptRouterRequest$=s.CreateModelInvocationJobResponse$=s.CreateModelInvocationJobRequest$=s.CreateModelImportJobResponse$=s.CreateModelImportJobRequest$=s.CreateModelCustomizationJobResponse$=s.CreateModelCustomizationJobRequest$=s.CreateModelCopyJobResponse$=s.CreateModelCopyJobRequest$=s.CreateMarketplaceModelEndpointResponse$=s.CreateMarketplaceModelEndpointRequest$=s.CreateInferenceProfileResponse$=s.CreateInferenceProfileRequest$=s.CreateGuardrailVersionResponse$=s.CreateGuardrailVersionRequest$=s.CreateGuardrailResponse$=s.CreateGuardrailRequest$=s.CreateFoundationModelAgreementResponse$=s.CreateFoundationModelAgreementRequest$=s.CreateEvaluationJobResponse$=s.CreateEvaluationJobRequest$=s.CreateCustomModelResponse$=s.CreateCustomModelRequest$=s.CreateCustomModelDeploymentResponse$=s.CreateCustomModelDeploymentRequest$=s.CreateAutomatedReasoningPolicyVersionResponse$=s.CreateAutomatedReasoningPolicyVersionRequest$=s.CreateAutomatedReasoningPolicyTestCaseResponse$=s.CreateAutomatedReasoningPolicyTestCaseRequest$=s.CreateAutomatedReasoningPolicyResponse$=s.CreateAutomatedReasoningPolicyRequest$=s.CloudWatchConfig$=void 0;s.GetAutomatedReasoningPolicyBuildWorkflowRequest$=s.GetAutomatedReasoningPolicyAnnotationsResponse$=s.GetAutomatedReasoningPolicyAnnotationsRequest$=s.GenerationConfiguration$=s.FoundationModelSummary$=s.FoundationModelLifecycle$=s.FoundationModelDetails$=s.FilterAttribute$=s.FieldForReranking$=s.ExternalSourcesRetrieveAndGenerateConfiguration$=s.ExternalSourcesGenerationConfiguration$=s.ExternalSource$=s.ExportAutomatedReasoningPolicyVersionResponse$=s.ExportAutomatedReasoningPolicyVersionRequest$=s.EvaluationSummary$=s.EvaluationRagConfigSummary$=s.EvaluationPrecomputedRetrieveSourceConfig$=s.EvaluationPrecomputedRetrieveAndGenerateSourceConfig$=s.EvaluationPrecomputedInferenceSource$=s.EvaluationOutputDataConfig$=s.EvaluationModelConfigSummary$=s.EvaluationInferenceConfigSummary$=s.EvaluationDatasetMetricConfig$=s.EvaluationDataset$=s.EvaluationBedrockModel$=s.DistillationConfig$=s.DimensionalPriceRate$=s.DeregisterMarketplaceModelEndpointResponse$=s.DeregisterMarketplaceModelEndpointRequest$=s.DeleteProvisionedModelThroughputResponse$=s.DeleteProvisionedModelThroughputRequest$=s.DeletePromptRouterResponse$=s.DeletePromptRouterRequest$=s.DeleteModelInvocationLoggingConfigurationResponse$=s.DeleteModelInvocationLoggingConfigurationRequest$=s.DeleteMarketplaceModelEndpointResponse$=s.DeleteMarketplaceModelEndpointRequest$=s.DeleteInferenceProfileResponse$=s.DeleteInferenceProfileRequest$=s.DeleteImportedModelResponse$=s.DeleteImportedModelRequest$=s.DeleteGuardrailResponse$=s.DeleteGuardrailRequest$=s.DeleteFoundationModelAgreementResponse$=s.DeleteFoundationModelAgreementRequest$=s.DeleteEnforcedGuardrailConfigurationResponse$=s.DeleteEnforcedGuardrailConfigurationRequest$=s.DeleteCustomModelResponse$=s.DeleteCustomModelRequest$=s.DeleteCustomModelDeploymentResponse$=void 0;s.GuardrailContentFilterConfig$=s.GuardrailContentFilter$=s.GuardrailConfiguration$=s.GuardrailAutomatedReasoningPolicyConfig$=s.GuardrailAutomatedReasoningPolicy$=s.GetUseCaseForModelAccessResponse$=s.GetUseCaseForModelAccessRequest$=s.GetProvisionedModelThroughputResponse$=s.GetProvisionedModelThroughputRequest$=s.GetPromptRouterResponse$=s.GetPromptRouterRequest$=s.GetModelInvocationLoggingConfigurationResponse$=s.GetModelInvocationLoggingConfigurationRequest$=s.GetModelInvocationJobResponse$=s.GetModelInvocationJobRequest$=s.GetModelImportJobResponse$=s.GetModelImportJobRequest$=s.GetModelCustomizationJobResponse$=s.GetModelCustomizationJobRequest$=s.GetModelCopyJobResponse$=s.GetModelCopyJobRequest$=s.GetMarketplaceModelEndpointResponse$=s.GetMarketplaceModelEndpointRequest$=s.GetInferenceProfileResponse$=s.GetInferenceProfileRequest$=s.GetImportedModelResponse$=s.GetImportedModelRequest$=s.GetGuardrailResponse$=s.GetGuardrailRequest$=s.GetFoundationModelResponse$=s.GetFoundationModelRequest$=s.GetFoundationModelAvailabilityResponse$=s.GetFoundationModelAvailabilityRequest$=s.GetEvaluationJobResponse$=s.GetEvaluationJobRequest$=s.GetCustomModelResponse$=s.GetCustomModelRequest$=s.GetCustomModelDeploymentResponse$=s.GetCustomModelDeploymentRequest$=s.GetAutomatedReasoningPolicyTestResultResponse$=s.GetAutomatedReasoningPolicyTestResultRequest$=s.GetAutomatedReasoningPolicyTestCaseResponse$=s.GetAutomatedReasoningPolicyTestCaseRequest$=s.GetAutomatedReasoningPolicyResponse$=s.GetAutomatedReasoningPolicyRequest$=s.GetAutomatedReasoningPolicyNextScenarioResponse$=s.GetAutomatedReasoningPolicyNextScenarioRequest$=s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse$=s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest$=s.GetAutomatedReasoningPolicyBuildWorkflowResponse$=void 0;s.ListAutomatedReasoningPolicyTestResultsRequest$=s.ListAutomatedReasoningPolicyTestCasesResponse$=s.ListAutomatedReasoningPolicyTestCasesRequest$=s.ListAutomatedReasoningPolicyBuildWorkflowsResponse$=s.ListAutomatedReasoningPolicyBuildWorkflowsRequest$=s.ListAutomatedReasoningPoliciesResponse$=s.ListAutomatedReasoningPoliciesRequest$=s.LegalTerm$=s.LambdaGraderConfig$=s.KnowledgeBaseVectorSearchConfiguration$=s.KnowledgeBaseRetrieveAndGenerateConfiguration$=s.KnowledgeBaseRetrievalConfiguration$=s.KbInferenceConfig$=s.InvocationLogsConfig$=s.InferenceProfileSummary$=s.InferenceProfileModel$=s.ImportedModelSummary$=s.ImplicitFilterConfiguration$=s.HumanWorkflowConfig$=s.HumanEvaluationCustomMetric$=s.HumanEvaluationConfig$=s.GuardrailWordPolicyConfig$=s.GuardrailWordPolicy$=s.GuardrailWordConfig$=s.GuardrailWord$=s.GuardrailTopicsTierConfig$=s.GuardrailTopicsTier$=s.GuardrailTopicPolicyConfig$=s.GuardrailTopicPolicy$=s.GuardrailTopicConfig$=s.GuardrailTopic$=s.GuardrailSummary$=s.GuardrailSensitiveInformationPolicyConfig$=s.GuardrailSensitiveInformationPolicy$=s.GuardrailRegexConfig$=s.GuardrailRegex$=s.GuardrailPiiEntityConfig$=s.GuardrailPiiEntity$=s.GuardrailManagedWordsConfig$=s.GuardrailManagedWords$=s.GuardrailCrossRegionDetails$=s.GuardrailCrossRegionConfig$=s.GuardrailContextualGroundingPolicyConfig$=s.GuardrailContextualGroundingPolicy$=s.GuardrailContextualGroundingFilterConfig$=s.GuardrailContextualGroundingFilter$=s.GuardrailContentPolicyConfig$=s.GuardrailContentPolicy$=s.GuardrailContentFiltersTierConfig$=s.GuardrailContentFiltersTier$=void 0;s.OutputDataConfig$=s.OrchestrationConfiguration$=s.Offer$=s.ModelInvocationJobSummary$=s.ModelInvocationJobS3OutputDataConfig$=s.ModelInvocationJobS3InputDataConfig$=s.ModelImportJobSummary$=s.ModelEnforcement$=s.ModelCustomizationJobSummary$=s.ModelCopyJobSummary$=s.MetadataConfigurationForReranking$=s.MetadataAttributeSchema$=s.MarketplaceModelEndpointSummary$=s.MarketplaceModelEndpoint$=s.LoggingConfig$=s.ListTagsForResourceResponse$=s.ListTagsForResourceRequest$=s.ListProvisionedModelThroughputsResponse$=s.ListProvisionedModelThroughputsRequest$=s.ListPromptRoutersResponse$=s.ListPromptRoutersRequest$=s.ListModelInvocationJobsResponse$=s.ListModelInvocationJobsRequest$=s.ListModelImportJobsResponse$=s.ListModelImportJobsRequest$=s.ListModelCustomizationJobsResponse$=s.ListModelCustomizationJobsRequest$=s.ListModelCopyJobsResponse$=s.ListModelCopyJobsRequest$=s.ListMarketplaceModelEndpointsResponse$=s.ListMarketplaceModelEndpointsRequest$=s.ListInferenceProfilesResponse$=s.ListInferenceProfilesRequest$=s.ListImportedModelsResponse$=s.ListImportedModelsRequest$=s.ListGuardrailsResponse$=s.ListGuardrailsRequest$=s.ListFoundationModelsResponse$=s.ListFoundationModelsRequest$=s.ListFoundationModelAgreementOffersResponse$=s.ListFoundationModelAgreementOffersRequest$=s.ListEvaluationJobsResponse$=s.ListEvaluationJobsRequest$=s.ListEnforcedGuardrailsConfigurationResponse$=s.ListEnforcedGuardrailsConfigurationRequest$=s.ListCustomModelsResponse$=s.ListCustomModelsRequest$=s.ListCustomModelDeploymentsResponse$=s.ListCustomModelDeploymentsRequest$=s.ListAutomatedReasoningPolicyTestResultsResponse$=void 0;s.UpdateAutomatedReasoningPolicyAnnotationsRequest$=s.UntagResourceResponse$=s.UntagResourceRequest$=s.TrainingMetrics$=s.TrainingDetails$=s.TrainingDataConfig$=s.TextInferenceConfig$=s.TermDetails$=s.TeacherModelConfig$=s.TagResourceResponse$=s.TagResourceRequest$=s.Tag$=s.SupportTerm$=s.StopModelInvocationJobResponse$=s.StopModelInvocationJobRequest$=s.StopModelCustomizationJobResponse$=s.StopModelCustomizationJobRequest$=s.StopEvaluationJobResponse$=s.StopEvaluationJobRequest$=s.StatusDetails$=s.StartAutomatedReasoningPolicyTestWorkflowResponse$=s.StartAutomatedReasoningPolicyTestWorkflowRequest$=s.StartAutomatedReasoningPolicyBuildWorkflowResponse$=s.StartAutomatedReasoningPolicyBuildWorkflowRequest$=s.SageMakerEndpoint$=s.S3ObjectDoc$=s.S3DataSource$=s.S3Config$=s.RoutingCriteria$=s.RFTHyperParameters$=s.RFTConfig$=s.RetrieveConfig$=s.RetrieveAndGenerateConfiguration$=s.RequestMetadataBaseFilters$=s.RegisterMarketplaceModelEndpointResponse$=s.RegisterMarketplaceModelEndpointRequest$=s.RatingScaleItem$=s.QueryTransformationConfiguration$=s.PutUseCaseForModelAccessResponse$=s.PutUseCaseForModelAccessRequest$=s.PutModelInvocationLoggingConfigurationResponse$=s.PutModelInvocationLoggingConfigurationRequest$=s.PutEnforcedGuardrailConfigurationResponse$=s.PutEnforcedGuardrailConfigurationRequest$=s.ProvisionedModelSummary$=s.PromptTemplate$=s.PromptRouterTargetModel$=s.PromptRouterSummary$=s.PricingTerm$=s.PerformanceConfiguration$=void 0;s.RatingScaleItemValue$=s.RAGConfig$=s.ModelInvocationJobOutputDataConfig$=s.ModelInvocationJobInputDataConfig$=s.ModelDataSource$=s.KnowledgeBaseConfig$=s.InvocationLogSource$=s.InferenceProfileModelSource$=s.GraderConfig$=s.EvaluatorModelConfig$=s.EvaluationPrecomputedRagSourceConfig$=s.EvaluationModelConfig$=s.EvaluationInferenceConfig$=s.EvaluationDatasetLocation$=s.EvaluationConfig$=s.EndpointConfig$=s.CustomizationConfig$=s.AutomatedReasoningPolicyWorkflowTypeContent$=s.AutomatedReasoningPolicyTypeValueAnnotation$=s.AutomatedReasoningPolicyMutation$=s.AutomatedReasoningPolicyGenerateFidelityReportContent$=s.AutomatedReasoningPolicyDefinitionElement$=s.AutomatedReasoningPolicyBuildStepContext$=s.AutomatedReasoningPolicyBuildResultAssets$=s.AutomatedReasoningPolicyAnnotation$=s.AutomatedReasoningPolicyAnnotatedContent$=s.AutomatedReasoningCheckFinding$=s.AutomatedEvaluationCustomMetricSource$=s.VpcConfig$=s.VectorSearchRerankingConfiguration$=s.VectorSearchBedrockRerankingModelConfiguration$=s.VectorSearchBedrockRerankingConfiguration$=s.ValidityTerm$=s.ValidatorMetric$=s.Validator$=s.ValidationDetails$=s.ValidationDataConfig$=s.UpdateProvisionedModelThroughputResponse$=s.UpdateProvisionedModelThroughputRequest$=s.UpdateMarketplaceModelEndpointResponse$=s.UpdateMarketplaceModelEndpointRequest$=s.UpdateGuardrailResponse$=s.UpdateGuardrailRequest$=s.UpdateCustomModelDeploymentResponse$=s.UpdateCustomModelDeploymentRequest$=s.UpdateAutomatedReasoningPolicyTestCaseResponse$=s.UpdateAutomatedReasoningPolicyTestCaseRequest$=s.UpdateAutomatedReasoningPolicyResponse$=s.UpdateAutomatedReasoningPolicyRequest$=s.UpdateAutomatedReasoningPolicyAnnotationsResponse$=void 0;s.GetFoundationModelAvailability$=s.GetFoundationModel$=s.GetEvaluationJob$=s.GetCustomModelDeployment$=s.GetCustomModel$=s.GetAutomatedReasoningPolicyTestResult$=s.GetAutomatedReasoningPolicyTestCase$=s.GetAutomatedReasoningPolicyNextScenario$=s.GetAutomatedReasoningPolicyBuildWorkflowResultAssets$=s.GetAutomatedReasoningPolicyBuildWorkflow$=s.GetAutomatedReasoningPolicyAnnotations$=s.GetAutomatedReasoningPolicy$=s.ExportAutomatedReasoningPolicyVersion$=s.DeregisterMarketplaceModelEndpoint$=s.DeleteProvisionedModelThroughput$=s.DeletePromptRouter$=s.DeleteModelInvocationLoggingConfiguration$=s.DeleteMarketplaceModelEndpoint$=s.DeleteInferenceProfile$=s.DeleteImportedModel$=s.DeleteGuardrail$=s.DeleteFoundationModelAgreement$=s.DeleteEnforcedGuardrailConfiguration$=s.DeleteCustomModelDeployment$=s.DeleteCustomModel$=s.DeleteAutomatedReasoningPolicyTestCase$=s.DeleteAutomatedReasoningPolicyBuildWorkflow$=s.DeleteAutomatedReasoningPolicy$=s.CreateProvisionedModelThroughput$=s.CreatePromptRouter$=s.CreateModelInvocationJob$=s.CreateModelImportJob$=s.CreateModelCustomizationJob$=s.CreateModelCopyJob$=s.CreateMarketplaceModelEndpoint$=s.CreateInferenceProfile$=s.CreateGuardrailVersion$=s.CreateGuardrail$=s.CreateFoundationModelAgreement$=s.CreateEvaluationJob$=s.CreateCustomModelDeployment$=s.CreateCustomModel$=s.CreateAutomatedReasoningPolicyVersion$=s.CreateAutomatedReasoningPolicyTestCase$=s.CreateAutomatedReasoningPolicy$=s.CancelAutomatedReasoningPolicyBuildWorkflow$=s.BatchDeleteEvaluationJob$=s.RetrievalFilter$=s.RerankingMetadataSelectiveModeConfiguration$=s.RequestMetadataFilters$=void 0;s.UpdateMarketplaceModelEndpoint$=s.UpdateGuardrail$=s.UpdateCustomModelDeployment$=s.UpdateAutomatedReasoningPolicyTestCase$=s.UpdateAutomatedReasoningPolicyAnnotations$=s.UpdateAutomatedReasoningPolicy$=s.UntagResource$=s.TagResource$=s.StopModelInvocationJob$=s.StopModelCustomizationJob$=s.StopEvaluationJob$=s.StartAutomatedReasoningPolicyTestWorkflow$=s.StartAutomatedReasoningPolicyBuildWorkflow$=s.RegisterMarketplaceModelEndpoint$=s.PutUseCaseForModelAccess$=s.PutModelInvocationLoggingConfiguration$=s.PutEnforcedGuardrailConfiguration$=s.ListTagsForResource$=s.ListProvisionedModelThroughputs$=s.ListPromptRouters$=s.ListModelInvocationJobs$=s.ListModelImportJobs$=s.ListModelCustomizationJobs$=s.ListModelCopyJobs$=s.ListMarketplaceModelEndpoints$=s.ListInferenceProfiles$=s.ListImportedModels$=s.ListGuardrails$=s.ListFoundationModels$=s.ListFoundationModelAgreementOffers$=s.ListEvaluationJobs$=s.ListEnforcedGuardrailsConfiguration$=s.ListCustomModels$=s.ListCustomModelDeployments$=s.ListAutomatedReasoningPolicyTestResults$=s.ListAutomatedReasoningPolicyTestCases$=s.ListAutomatedReasoningPolicyBuildWorkflows$=s.ListAutomatedReasoningPolicies$=s.GetUseCaseForModelAccess$=s.GetProvisionedModelThroughput$=s.GetPromptRouter$=s.GetModelInvocationLoggingConfiguration$=s.GetModelInvocationJob$=s.GetModelImportJob$=s.GetModelCustomizationJob$=s.GetModelCopyJob$=s.GetMarketplaceModelEndpoint$=s.GetInferenceProfile$=s.GetImportedModel$=s.GetGuardrail$=void 0;s.UpdateProvisionedModelThroughput$=void 0;var j_e="AgreementAvailability",q_e="AccessDeniedException",V_e="AutomatedEvaluationConfig",H_e="AutomatedEvaluationCustomMetrics",W_e="AutomatedEvaluationCustomMetricConfig",J_e="AutomatedEvaluationCustomMetricSource",K_e="AccountEnforcedGuardrailInferenceInputConfiguration",Z_e="AccountEnforcedGuardrailOutputConfiguration",X_e="AccountEnforcedGuardrailsOutputConfiguration",Y_e="AutomatedReasoningCheckDifferenceScenarioList",Q_e="AutomatedReasoningCheckFinding",eEe="AutomatedReasoningCheckFindingList",tEe="AutomatedReasoningCheckImpossibleFinding",rEe="AutomatedReasoningCheckInvalidFinding",nEe="AutomatedReasoningCheckInputTextReference",oEe="AutomatedReasoningCheckInputTextReferenceList",iEe="AutomatedReasoningCheckLogicWarning",sEe="AutomatedReasoningCheckNoTranslationsFinding",aEe="AutomatedReasoningCheckRule",cEe="AutomatedReasoningCheckRuleList",uEe="AutomatedReasoningCheckScenario",lEe="AutomatedReasoningCheckSatisfiableFinding",dEe="AutomatedReasoningCheckTranslation",pEe="AutomatedReasoningCheckTranslationAmbiguousFinding",mEe="AutomatedReasoningCheckTooComplexFinding",fEe="AutomatedReasoningCheckTranslationList",gEe="AutomatedReasoningCheckTranslationOption",hEe="AutomatedReasoningCheckTranslationOptionList",yEe="AutomatedReasoningCheckValidFinding",_Ee="AutomatedReasoningLogicStatement",EEe="AutomatedReasoningLogicStatementContent",SEe="AutomatedReasoningLogicStatementList",vEe="AutomatedReasoningNaturalLanguageStatementContent",AEe="AutomatedReasoningPolicyAnnotation",REe="AutomatedReasoningPolicyAnnotatedChunk",PEe="AutomatedReasoningPolicyAnnotatedChunkList",CEe="AutomatedReasoningPolicyAnnotatedContentList",TEe="AutomatedReasoningPolicyAnnotatedContent",xEe="AutomatedReasoningPolicyAnnotationFeedbackNaturalLanguage",bEe="AutomatedReasoningPolicyAnnotationIngestContent",IEe="AutomatedReasoningPolicyAnnotatedLine",wEe="AutomatedReasoningPolicyAnnotationList",$Ee="AutomatedReasoningPolicyAddRuleAnnotation",kEe="AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation",DEe="AutomatedReasoningPolicyAddRuleMutation",MEe="AutomatedReasoningPolicyAnnotationRuleNaturalLanguage",OEe="AutomatedReasoningPolicyAtomicStatement",NEe="AutomatedReasoningPolicyAtomicStatementList",LEe="AutomatedReasoningPolicyAddTypeAnnotation",zEe="AutomatedReasoningPolicyAddTypeMutation",UEe="AutomatedReasoningPolicyAddTypeValue",BEe="AutomatedReasoningPolicyAddVariableAnnotation",GEe="AutomatedReasoningPolicyAddVariableMutation",FEe="AutomatedReasoningPolicyBuildDocumentBlob",jEe="AutomatedReasoningPolicyBuildDocumentDescription",qEe="AutomatedReasoningPolicyBuildDocumentName",VEe="AutomatedReasoningPolicyBuildLog",HEe="AutomatedReasoningPolicyBuildLogEntry",WEe="AutomatedReasoningPolicyBuildLogEntryList",JEe="AutomatedReasoningPolicyBuildResultAssets",KEe="AutomatedReasoningPolicyBuildResultAssetManifest",ZEe="AutomatedReasoningPolicyBuildResultAssetManifestEntry",XEe="AutomatedReasoningPolicyBuildResultAssetManifestList",YEe="AutomatedReasoningPolicyBuildResultAssetName",QEe="AutomatedReasoningPolicyBuildStep",eSe="AutomatedReasoningPolicyBuildStepContext",tSe="AutomatedReasoningPolicyBuildStepList",rSe="AutomatedReasoningPolicyBuildStepMessage",nSe="AutomatedReasoningPolicyBuildStepMessageList",oSe="AutomatedReasoningPolicyBuildWorkflowDocument",iSe="AutomatedReasoningPolicyBuildWorkflowDocumentList",sSe="AutomatedReasoningPolicyBuildWorkflowRepairContent",aSe="AutomatedReasoningPolicyBuildWorkflowSource",cSe="AutomatedReasoningPolicyBuildWorkflowSummary",uSe="AutomatedReasoningPolicyBuildWorkflowSummaries",lSe="AutomatedReasoningPolicyDescription",dSe="AutomatedReasoningPolicyDefinitionElement",pSe="AutomatedReasoningPolicyDefinitionQualityReport",mSe="AutomatedReasoningPolicyDefinitionRule",fSe="AutomatedReasoningPolicyDeleteRuleAnnotation",gSe="AutomatedReasoningPolicyDefinitionRuleAlternateExpression",hSe="AutomatedReasoningPolicyDefinitionRuleExpression",ySe="AutomatedReasoningPolicyDefinitionRuleList",_Se="AutomatedReasoningPolicyDeleteRuleMutation",ESe="AutomatedReasoningPolicyDisjointRuleSet",SSe="AutomatedReasoningPolicyDisjointRuleSetList",vSe="AutomatedReasoningPolicyDefinitionType",ASe="AutomatedReasoningPolicyDeleteTypeAnnotation",RSe="AutomatedReasoningPolicyDefinitionTypeDescription",PSe="AutomatedReasoningPolicyDefinitionTypeList",CSe="AutomatedReasoningPolicyDeleteTypeMutation",TSe="AutomatedReasoningPolicyDefinitionTypeName",xSe="AutomatedReasoningPolicyDefinitionTypeNameList",bSe="AutomatedReasoningPolicyDefinitionTypeValue",ISe="AutomatedReasoningPolicyDefinitionTypeValueDescription",wSe="AutomatedReasoningPolicyDefinitionTypeValueList",$Se="AutomatedReasoningPolicyDefinitionTypeValuePair",kSe="AutomatedReasoningPolicyDefinitionTypeValuePairList",DSe="AutomatedReasoningPolicyDeleteTypeValue",MSe="AutomatedReasoningPolicyDefinitionVariable",OSe="AutomatedReasoningPolicyDeleteVariableAnnotation",NSe="AutomatedReasoningPolicyDefinitionVariableDescription",LSe="AutomatedReasoningPolicyDefinitionVariableList",zSe="AutomatedReasoningPolicyDeleteVariableMutation",USe="AutomatedReasoningPolicyDefinitionVariableName",BSe="AutomatedReasoningPolicyDefinitionVariableNameList",GSe="AutomatedReasoningPolicyDefinition",FSe="AutomatedReasoningPolicyFidelityReport",jSe="AutomatedReasoningPolicyGenerateFidelityReportContent",qSe="AutomatedReasoningPolicyGenerateFidelityReportDocumentList",VSe="AutomatedReasoningPolicyGeneratedTestCase",HSe="AutomatedReasoningPolicyGeneratedTestCaseList",WSe="AutomatedReasoningPolicyGeneratedTestCases",JSe="AutomatedReasoningPolicyIngestContentAnnotation",KSe="AutomatedReasoningPolicyJustificationList",ZSe="AutomatedReasoningPolicyJustificationText",XSe="AutomatedReasoningPolicyLineText",YSe="AutomatedReasoningPolicyMutation",QSe="AutomatedReasoningPolicyName",eve="AutomatedReasoningPolicyPlanning",tve="AutomatedReasoningPolicyRuleReport",rve="AutomatedReasoningPolicyRuleReportMap",nve="AutomatedReasoningPolicyReportSourceDocument",ove="AutomatedReasoningPolicyReportSourceDocumentList",ive="AutomatedReasoningPolicyScenario",sve="AutomatedReasoningPolicyScenarioAlternateExpression",ave="AutomatedReasoningPolicySourceDocument",cve="AutomatedReasoningPolicyScenarioExpression",uve="AutomatedReasoningPolicyStatementLocation",lve="AutomatedReasoningPolicyScenarioList",dve="AutomatedReasoningPolicyStatementReference",pve="AutomatedReasoningPolicyStatementReferenceList",mve="AutomatedReasoningPolicyStatementText",fve="AutomatedReasoningPolicyScenarios",gve="AutomatedReasoningPolicySummary",hve="AutomatedReasoningPolicySummaries",yve="AutomatedReasoningPolicyTestCase",_ve="AutomatedReasoningPolicyTestCaseList",Eve="AutomatedReasoningPolicyTestGuardContent",Sve="AutomatedReasoningPolicyTestList",vve="AutomatedReasoningPolicyTestQueryContent",Ave="AutomatedReasoningPolicyTestResult",Rve="AutomatedReasoningPolicyTypeValueAnnotation",Pve="AutomatedReasoningPolicyTypeValueAnnotationList",Cve="AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation",Tve="AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation",xve="AutomatedReasoningPolicyUpdateRuleAnnotation",bve="AutomatedReasoningPolicyUpdateRuleMutation",Ive="AutomatedReasoningPolicyUpdateTypeAnnotation",wve="AutomatedReasoningPolicyUpdateTypeMutation",$ve="AutomatedReasoningPolicyUpdateTypeValue",kve="AutomatedReasoningPolicyUpdateVariableAnnotation",Dve="AutomatedReasoningPolicyUpdateVariableMutation",Mve="AutomatedReasoningPolicyVariableReport",Ove="AutomatedReasoningPolicyVariableReportMap",Nve="AutomatedReasoningPolicyWorkflowTypeContent",Lve="ByteContentBlob",zve="ByteContentDoc",Uve="BatchDeleteEvaluationJob",Bve="BatchDeleteEvaluationJobError",Gve="BatchDeleteEvaluationJobErrors",Fve="BatchDeleteEvaluationJobItem",jve="BatchDeleteEvaluationJobItems",qve="BatchDeleteEvaluationJobRequest",Vve="BatchDeleteEvaluationJobResponse",Hve="BedrockEvaluatorModel",Wve="BedrockEvaluatorModels",Jve="CreateAutomatedReasoningPolicy",Kve="CancelAutomatedReasoningPolicyBuildWorkflow",Zve="CancelAutomatedReasoningPolicyBuildWorkflowRequest",Xve="CancelAutomatedReasoningPolicyBuildWorkflowResponse",Yve="CreateAutomatedReasoningPolicyRequest",Qve="CreateAutomatedReasoningPolicyResponse",eAe="CreateAutomatedReasoningPolicyTestCase",tAe="CreateAutomatedReasoningPolicyTestCaseRequest",rAe="CreateAutomatedReasoningPolicyTestCaseResponse",nAe="CreateAutomatedReasoningPolicyVersion",oAe="CreateAutomatedReasoningPolicyVersionRequest",iAe="CreateAutomatedReasoningPolicyVersionResponse",sAe="CustomizationConfig",aAe="CreateCustomModel",cAe="CreateCustomModelDeployment",uAe="CreateCustomModelDeploymentRequest",lAe="CreateCustomModelDeploymentResponse",dAe="CreateCustomModelRequest",pAe="CreateCustomModelResponse",mAe="ConflictException",fAe="CreateEvaluationJob",gAe="CreateEvaluationJobRequest",hAe="CreateEvaluationJobResponse",yAe="CreateFoundationModelAgreement",_Ae="CreateFoundationModelAgreementRequest",EAe="CreateFoundationModelAgreementResponse",SAe="CreateGuardrail",vAe="CreateGuardrailRequest",AAe="CreateGuardrailResponse",RAe="CreateGuardrailVersion",PAe="CreateGuardrailVersionRequest",CAe="CreateGuardrailVersionResponse",TAe="CreateInferenceProfile",xAe="CreateInferenceProfileRequest",bAe="CreateInferenceProfileResponse",IAe="CustomMetricBedrockEvaluatorModel",wAe="CustomMetricBedrockEvaluatorModels",$Ae="CreateModelCopyJob",kAe="CreateModelCopyJobRequest",DAe="CreateModelCopyJobResponse",MAe="CreateModelCustomizationJobRequest",OAe="CreateModelCustomizationJobResponse",NAe="CreateModelCustomizationJob",LAe="CustomMetricDefinition",zAe="CustomModelDeploymentSummary",UAe="CustomModelDeploymentSummaryList",BAe="CustomModelDeploymentUpdateDetails",GAe="CustomMetricEvaluatorModelConfig",FAe="CreateModelImportJob",jAe="CreateModelImportJobRequest",qAe="CreateModelImportJobResponse",VAe="CreateModelInvocationJobRequest",HAe="CreateModelInvocationJobResponse",WAe="CreateModelInvocationJob",JAe="CreateMarketplaceModelEndpoint",KAe="CreateMarketplaceModelEndpointRequest",ZAe="CreateMarketplaceModelEndpointResponse",XAe="CustomModelSummary",YAe="CustomModelSummaryList",QAe="CustomModelUnits",eRe="CreateProvisionedModelThroughput",tRe="CreateProvisionedModelThroughputRequest",rRe="CreateProvisionedModelThroughputResponse",nRe="CreatePromptRouter",oRe="CreatePromptRouterRequest",iRe="CreatePromptRouterResponse",sRe="CloudWatchConfig",aRe="DeleteAutomatedReasoningPolicy",cRe="DeleteAutomatedReasoningPolicyBuildWorkflow",uRe="DeleteAutomatedReasoningPolicyBuildWorkflowRequest",lRe="DeleteAutomatedReasoningPolicyBuildWorkflowResponse",dRe="DeleteAutomatedReasoningPolicyRequest",pRe="DeleteAutomatedReasoningPolicyResponse",mRe="DeleteAutomatedReasoningPolicyTestCase",fRe="DeleteAutomatedReasoningPolicyTestCaseRequest",gRe="DeleteAutomatedReasoningPolicyTestCaseResponse",hRe="DistillationConfig",yRe="DeleteCustomModel",_Re="DeleteCustomModelDeployment",ERe="DeleteCustomModelDeploymentRequest",SRe="DeleteCustomModelDeploymentResponse",vRe="DeleteCustomModelRequest",ARe="DeleteCustomModelResponse",RRe="DeleteEnforcedGuardrailConfiguration",PRe="DeleteEnforcedGuardrailConfigurationRequest",CRe="DeleteEnforcedGuardrailConfigurationResponse",TRe="DeleteFoundationModelAgreement",xRe="DeleteFoundationModelAgreementRequest",bRe="DeleteFoundationModelAgreementResponse",IRe="DeleteGuardrail",wRe="DeleteGuardrailRequest",$Re="DeleteGuardrailResponse",kRe="DeleteImportedModel",DRe="DeleteImportedModelRequest",MRe="DeleteImportedModelResponse",ORe="DeleteInferenceProfile",NRe="DeleteInferenceProfileRequest",LRe="DeleteInferenceProfileResponse",zRe="DeleteModelInvocationLoggingConfiguration",URe="DeleteModelInvocationLoggingConfigurationRequest",BRe="DeleteModelInvocationLoggingConfigurationResponse",GRe="DeleteMarketplaceModelEndpoint",FRe="DeleteMarketplaceModelEndpointRequest",jRe="DeleteMarketplaceModelEndpointResponse",qRe="DeregisterMarketplaceModelEndpointRequest",VRe="DeregisterMarketplaceModelEndpointResponse",HRe="DeregisterMarketplaceModelEndpoint",WRe="DataProcessingDetails",JRe="DeleteProvisionedModelThroughput",KRe="DeleteProvisionedModelThroughputRequest",ZRe="DeleteProvisionedModelThroughputResponse",XRe="DimensionalPriceRate",YRe="DeletePromptRouterRequest",QRe="DeletePromptRouterResponse",ePe="DeletePromptRouter",tPe="ExportAutomatedReasoningPolicyVersion",rPe="ExportAutomatedReasoningPolicyVersionRequest",nPe="ExportAutomatedReasoningPolicyVersionResponse",oPe="EvaluationBedrockModel",iPe="EndpointConfig",sPe="EvaluationConfig",aPe="EvaluationDataset",cPe="EvaluationDatasetLocation",uPe="EvaluationDatasetMetricConfig",lPe="EvaluationDatasetMetricConfigs",dPe="EvaluationDatasetName",pPe="EvaluationInferenceConfig",mPe="EvaluationInferenceConfigSummary",fPe="EvaluationJobDescription",gPe="EvaluationJobIdentifier",hPe="EvaluationJobIdentifiers",yPe="EvaluationModelConfigs",_Pe="EvaluationModelConfigSummary",EPe="EvaluationModelConfig",SPe="EvaluatorModelConfig",vPe="EvaluationMetricDescription",APe="EvaluationModelInferenceParams",RPe="EvaluationMetricName",PPe="EvaluationMetricNames",CPe="EvaluationOutputDataConfig",TPe="EvaluationPrecomputedInferenceSource",xPe="EvaluationPrecomputedRetrieveAndGenerateSourceConfig",bPe="EvaluationPrecomputedRetrieveSourceConfig",IPe="EvaluationPrecomputedRagSourceConfig",wPe="EvaluationRagConfigSummary",$Pe="EvaluationSummary",kPe="ExternalSourcesGenerationConfiguration",DPe="ExternalSourcesRetrieveAndGenerateConfiguration",MPe="EvaluationSummaries",OPe="ExternalSource",NPe="ExternalSources",LPe="FilterAttribute",zPe="FieldForReranking",UPe="FieldsForReranking",BPe="FoundationModelDetails",GPe="FoundationModelLifecycle",FPe="FoundationModelSummary",jPe="FoundationModelSummaryList",qPe="GuardrailAutomatedReasoningPolicy",VPe="GetAutomatedReasoningPolicyAnnotations",HPe="GetAutomatedReasoningPolicyAnnotationsRequest",WPe="GetAutomatedReasoningPolicyAnnotationsResponse",JPe="GetAutomatedReasoningPolicyBuildWorkflow",KPe="GetAutomatedReasoningPolicyBuildWorkflowRequest",ZPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssets",XPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest",YPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse",QPe="GetAutomatedReasoningPolicyBuildWorkflowResponse",eCe="GuardrailAutomatedReasoningPolicyConfig",tCe="GetAutomatedReasoningPolicyNextScenario",rCe="GetAutomatedReasoningPolicyNextScenarioRequest",nCe="GetAutomatedReasoningPolicyNextScenarioResponse",oCe="GetAutomatedReasoningPolicyRequest",iCe="GetAutomatedReasoningPolicyResponse",sCe="GetAutomatedReasoningPolicyTestCase",aCe="GetAutomatedReasoningPolicyTestCaseRequest",cCe="GetAutomatedReasoningPolicyTestCaseResponse",uCe="GetAutomatedReasoningPolicyTestResult",lCe="GetAutomatedReasoningPolicyTestResultRequest",dCe="GetAutomatedReasoningPolicyTestResultResponse",pCe="GetAutomatedReasoningPolicy",mCe="GuardrailBlockedMessaging",fCe="GenerationConfiguration",gCe="GuardrailContentFilter",hCe="GuardrailContentFilterAction",yCe="GuardrailContentFilterConfig",_Ce="GuardrailContentFiltersConfig",ECe="GuardrailContentFiltersTier",SCe="GuardrailContentFiltersTierConfig",vCe="GuardrailContentFiltersTierName",ACe="GuardrailContentFilters",RCe="GuardrailContextualGroundingAction",PCe="GuardrailContextualGroundingFilter",CCe="GuardrailContextualGroundingFilterConfig",TCe="GuardrailContextualGroundingFiltersConfig",xCe="GuardrailContextualGroundingFilters",bCe="GuardrailContextualGroundingPolicy",ICe="GuardrailContextualGroundingPolicyConfig",wCe="GetCustomModel",$Ce="GetCustomModelDeployment",kCe="GetCustomModelDeploymentRequest",DCe="GetCustomModelDeploymentResponse",MCe="GetCustomModelRequest",OCe="GetCustomModelResponse",NCe="GuardrailContentPolicy",LCe="GuardrailContentPolicyConfig",zCe="GuardrailCrossRegionConfig",UCe="GuardrailCrossRegionDetails",BCe="GraderConfig",GCe="GuardrailConfiguration",FCe="GuardrailDescription",jCe="GetEvaluationJob",qCe="GetEvaluationJobRequest",VCe="GetEvaluationJobResponse",HCe="GetFoundationModel",WCe="GetFoundationModelAvailability",JCe="GetFoundationModelAvailabilityRequest",KCe="GetFoundationModelAvailabilityResponse",ZCe="GetFoundationModelRequest",XCe="GetFoundationModelResponse",YCe="GuardrailFailureRecommendation",QCe="GuardrailFailureRecommendations",eTe="GetGuardrail",tTe="GetGuardrailRequest",rTe="GetGuardrailResponse",nTe="GetImportedModel",oTe="GetImportedModelRequest",iTe="GetImportedModelResponse",sTe="GetInferenceProfile",aTe="GetInferenceProfileRequest",cTe="GetInferenceProfileResponse",uTe="GuardrailModality",lTe="GetModelCopyJob",dTe="GetModelCopyJobRequest",pTe="GetModelCopyJobResponse",mTe="GetModelCustomizationJobRequest",fTe="GetModelCustomizationJobResponse",gTe="GetModelCustomizationJob",hTe="GetModelImportJob",yTe="GetModelImportJobRequest",_Te="GetModelImportJobResponse",ETe="GetModelInvocationJobRequest",STe="GetModelInvocationJobResponse",vTe="GetModelInvocationJob",ATe="GetModelInvocationLoggingConfiguration",RTe="GetModelInvocationLoggingConfigurationRequest",PTe="GetModelInvocationLoggingConfigurationResponse",CTe="GetMarketplaceModelEndpoint",TTe="GetMarketplaceModelEndpointRequest",xTe="GetMarketplaceModelEndpointResponse",bTe="GuardrailManagedWords",ITe="GuardrailManagedWordsConfig",wTe="GuardrailManagedWordLists",$Te="GuardrailManagedWordListsConfig",kTe="GuardrailModalities",DTe="GuardrailName",MTe="GuardrailPiiEntity",OTe="GuardrailPiiEntityConfig",NTe="GuardrailPiiEntitiesConfig",LTe="GuardrailPiiEntities",zTe="GetProvisionedModelThroughput",UTe="GetProvisionedModelThroughputRequest",BTe="GetProvisionedModelThroughputResponse",GTe="GetPromptRouter",FTe="GetPromptRouterRequest",jTe="GetPromptRouterResponse",qTe="GuardrailRegex",VTe="GuardrailRegexConfig",HTe="GuardrailRegexesConfig",WTe="GuardrailRegexes",JTe="GuardrailSummary",KTe="GuardrailSensitiveInformationPolicy",ZTe="GuardrailSensitiveInformationPolicyConfig",XTe="GuardrailStatusReason",YTe="GuardrailStatusReasons",QTe="GuardrailSummaries",exe="GuardrailTopic",txe="GuardrailTopicAction",rxe="GuardrailTopicConfig",nxe="GuardrailTopicsConfig",oxe="GuardrailTopicDefinition",ixe="GuardrailTopicExample",sxe="GuardrailTopicExamples",axe="GuardrailTopicName",cxe="GuardrailTopicPolicy",uxe="GuardrailTopicPolicyConfig",lxe="GuardrailTopicsTier",dxe="GuardrailTopicsTierConfig",pxe="GuardrailTopicsTierName",mxe="GuardrailTopics",fxe="GetUseCaseForModelAccess",gxe="GetUseCaseForModelAccessRequest",hxe="GetUseCaseForModelAccessResponse",yxe="GuardrailWord",_xe="GuardrailWordAction",Exe="GuardrailWordConfig",Sxe="GuardrailWordsConfig",vxe="GuardrailWordPolicy",Axe="GuardrailWordPolicyConfig",Rxe="GuardrailWords",Pxe="HumanEvaluationConfig",Cxe="HumanEvaluationCustomMetric",Txe="HumanEvaluationCustomMetrics",xxe="HumanTaskInstructions",bxe="HumanWorkflowConfig",Ixe="Identifier",wxe="ImplicitFilterConfiguration",$xe="InvocationLogsConfig",kxe="InvocationLogSource",Dxe="ImportedModelSummary",Mxe="ImportedModelSummaryList",Oxe="InferenceProfileDescription",Nxe="InferenceProfileModel",Lxe="InferenceProfileModelSource",zxe="InferenceProfileModels",Uxe="InferenceProfileSummary",Bxe="InferenceProfileSummaries",Gxe="InternalServerException",Fxe="KnowledgeBaseConfig",jxe="KnowledgeBaseRetrieveAndGenerateConfiguration",qxe="KnowledgeBaseRetrievalConfiguration",Vxe="KnowledgeBaseVectorSearchConfiguration",Hxe="KbInferenceConfig",Wxe="ListAutomatedReasoningPolicies",Jxe="ListAutomatedReasoningPolicyBuildWorkflows",Kxe="ListAutomatedReasoningPolicyBuildWorkflowsRequest",Zxe="ListAutomatedReasoningPolicyBuildWorkflowsResponse",Xxe="ListAutomatedReasoningPoliciesRequest",Yxe="ListAutomatedReasoningPoliciesResponse",Qxe="ListAutomatedReasoningPolicyTestCases",e0e="ListAutomatedReasoningPolicyTestCasesRequest",t0e="ListAutomatedReasoningPolicyTestCasesResponse",r0e="ListAutomatedReasoningPolicyTestResults",n0e="ListAutomatedReasoningPolicyTestResultsRequest",o0e="ListAutomatedReasoningPolicyTestResultsResponse",i0e="LoggingConfig",s0e="ListCustomModels",a0e="ListCustomModelDeployments",c0e="ListCustomModelDeploymentsRequest",u0e="ListCustomModelDeploymentsResponse",l0e="ListCustomModelsRequest",d0e="ListCustomModelsResponse",p0e="ListEnforcedGuardrailsConfiguration",m0e="ListEnforcedGuardrailsConfigurationRequest",f0e="ListEnforcedGuardrailsConfigurationResponse",g0e="ListEvaluationJobs",h0e="ListEvaluationJobsRequest",y0e="ListEvaluationJobsResponse",_0e="ListFoundationModels",E0e="ListFoundationModelAgreementOffers",S0e="ListFoundationModelAgreementOffersRequest",v0e="ListFoundationModelAgreementOffersResponse",A0e="ListFoundationModelsRequest",R0e="ListFoundationModelsResponse",P0e="ListGuardrails",C0e="LambdaGraderConfig",T0e="ListGuardrailsRequest",x0e="ListGuardrailsResponse",b0e="ListImportedModels",I0e="ListImportedModelsRequest",w0e="ListImportedModelsResponse",$0e="ListInferenceProfiles",k0e="ListInferenceProfilesRequest",D0e="ListInferenceProfilesResponse",M0e="ListModelCopyJobs",O0e="ListModelCopyJobsRequest",N0e="ListModelCopyJobsResponse",L0e="ListModelCustomizationJobsRequest",z0e="ListModelCustomizationJobsResponse",U0e="ListModelCustomizationJobs",B0e="ListModelImportJobs",G0e="ListModelImportJobsRequest",F0e="ListModelImportJobsResponse",j0e="ListModelInvocationJobsRequest",q0e="ListModelInvocationJobsResponse",V0e="ListModelInvocationJobs",H0e="ListMarketplaceModelEndpoints",W0e="ListMarketplaceModelEndpointsRequest",J0e="ListMarketplaceModelEndpointsResponse",K0e="ListProvisionedModelThroughputs",Z0e="ListProvisionedModelThroughputsRequest",X0e="ListProvisionedModelThroughputsResponse",Y0e="ListPromptRouters",Q0e="ListPromptRoutersRequest",ebe="ListPromptRoutersResponse",tbe="LegalTerm",rbe="ListTagsForResource",nbe="ListTagsForResourceRequest",obe="ListTagsForResourceResponse",ibe="Message",sbe="MetadataAttributeSchema",abe="MetadataAttributeSchemaList",cbe="MetadataConfigurationForReranking",ube="ModelCopyJobSummary",lbe="ModelCustomizationJobSummary",dbe="ModelCopyJobSummaries",pbe="ModelCustomizationJobSummaries",mbe="ModelDataSource",fbe="ModelEnforcement",gbe="ModelInvocationJobInputDataConfig",hbe="ModelInvocationJobOutputDataConfig",ybe="ModelImportJobSummary",_be="ModelInvocationJobS3InputDataConfig",Ebe="ModelInvocationJobS3OutputDataConfig",Sbe="ModelInvocationJobSummary",vbe="ModelImportJobSummaries",Abe="ModelInvocationJobSummaries",Rbe="MarketplaceModelEndpoint",Pbe="MarketplaceModelEndpointSummary",Cbe="MarketplaceModelEndpointSummaries",Tbe="MetricName",xbe="Offer",bbe="OrchestrationConfiguration",Ibe="OutputDataConfig",wbe="Offers",$be="PerformanceConfiguration",kbe="PutEnforcedGuardrailConfiguration",Dbe="PutEnforcedGuardrailConfigurationRequest",Mbe="PutEnforcedGuardrailConfigurationResponse",Obe="PutModelInvocationLoggingConfiguration",Nbe="PutModelInvocationLoggingConfigurationRequest",Lbe="PutModelInvocationLoggingConfigurationResponse",zbe="ProvisionedModelSummary",Ube="ProvisionedModelSummaries",Bbe="PromptRouterDescription",Gbe="PromptRouterSummary",Fbe="PromptRouterSummaries",jbe="PromptRouterTargetModel",qbe="PromptRouterTargetModels",Vbe="PricingTerm",Hbe="PromptTemplate",Wbe="PutUseCaseForModelAccess",Jbe="PutUseCaseForModelAccessRequest",Kbe="PutUseCaseForModelAccessResponse",Zbe="QueryTransformationConfiguration",Xbe="RetrieveAndGenerateConfiguration",Ybe="RAGConfig",Qbe="RetrieveConfig",eIe="RagConfigs",tIe="RateCard",rIe="RoutingCriteria",nIe="RetrievalFilter",oIe="RetrievalFilterList",iIe="RFTConfig",sIe="RFTHyperParameters",aIe="ResourceInUseException",cIe="RequestMetadataBaseFilters",uIe="RequestMetadataFilters",lIe="RequestMetadataFiltersList",dIe="RequestMetadataMap",pIe="RegisterMarketplaceModelEndpoint",mIe="RegisterMarketplaceModelEndpointRequest",fIe="RegisterMarketplaceModelEndpointResponse",gIe="RerankingMetadataSelectiveModeConfiguration",hIe="ResourceNotFoundException",yIe="RatingScale",_Ie="RatingScaleItem",EIe="RatingScaleItemValue",SIe="StartAutomatedReasoningPolicyBuildWorkflow",vIe="StartAutomatedReasoningPolicyBuildWorkflowRequest",AIe="StartAutomatedReasoningPolicyBuildWorkflowResponse",RIe="StartAutomatedReasoningPolicyTestWorkflow",PIe="StartAutomatedReasoningPolicyTestWorkflowRequest",CIe="StartAutomatedReasoningPolicyTestWorkflowResponse",TIe="S3Config",xIe="StatusDetails",bIe="S3DataSource",IIe="StopEvaluationJob",wIe="StopEvaluationJobRequest",$Ie="StopEvaluationJobResponse",kIe="StopModelCustomizationJob",DIe="StopModelCustomizationJobRequest",MIe="StopModelCustomizationJobResponse",OIe="SageMakerEndpoint",NIe="StopModelInvocationJob",LIe="StopModelInvocationJobRequest",zIe="StopModelInvocationJobResponse",UIe="S3ObjectDoc",BIe="ServiceQuotaExceededException",GIe="SupportTerm",FIe="ServiceUnavailableException",jIe="Tag",qIe="TermDetails",VIe="TrainingDataConfig",HIe="TrainingDetails",WIe="ThrottlingException",JIe="TextInferenceConfig",KIe="TagList",ZIe="TrainingMetrics",XIe="TeacherModelConfig",YIe="TooManyTagsException",QIe="TextPromptTemplate",ewe="TagResource",twe="TagResourceRequest",rwe="TagResourceResponse",nwe="UpdateAutomatedReasoningPolicy",owe="UpdateAutomatedReasoningPolicyAnnotations",iwe="UpdateAutomatedReasoningPolicyAnnotationsRequest",swe="UpdateAutomatedReasoningPolicyAnnotationsResponse",awe="UpdateAutomatedReasoningPolicyRequest",cwe="UpdateAutomatedReasoningPolicyResponse",uwe="UpdateAutomatedReasoningPolicyTestCase",lwe="UpdateAutomatedReasoningPolicyTestCaseRequest",dwe="UpdateAutomatedReasoningPolicyTestCaseResponse",pwe="UpdateCustomModelDeployment",mwe="UpdateCustomModelDeploymentRequest",fwe="UpdateCustomModelDeploymentResponse",gwe="UpdateGuardrail",hwe="UpdateGuardrailRequest",ywe="UpdateGuardrailResponse",_we="UpdateMarketplaceModelEndpoint",Ewe="UpdateMarketplaceModelEndpointRequest",Swe="UpdateMarketplaceModelEndpointResponse",vwe="UpdateProvisionedModelThroughput",Awe="UpdateProvisionedModelThroughputRequest",Rwe="UpdateProvisionedModelThroughputResponse",Pwe="UntagResource",Cwe="UntagResourceRequest",Twe="UntagResourceResponse",xwe="Validator",bwe="VpcConfig",Iwe="ValidationDetails",wwe="ValidationDataConfig",$we="ValidationException",kwe="ValidatorMetric",Dwe="ValidationMetrics",Mwe="VectorSearchBedrockRerankingConfiguration",Owe="VectorSearchBedrockRerankingModelConfiguration",Nwe="VectorSearchRerankingConfiguration",Lwe="ValidityTerm",zwe="Validators",Uwe="annotation",Bwe="agreementAvailability",w6="andAll",Gwe="agreementDuration",Fwe="audioDataDeliveryEnabled",$6="alternateExpression",jwe="acceptEula",p0="assetId",k6="accuracyJustification",qwe="assetManifest",f0="additionalModelRequestFields",Vwe="assetName",D6="addRule",Hwe="addRuleFromNaturalLanguage",Wwe="automatedReasoningPolicy",Jwe="automatedReasoningPolicyBuildWorkflowSummaries",M6="automatedReasoningPolicyConfig",Kwe="automatedReasoningPolicySummaries",g0="accuracyScore",O6="annotationSetHash",Zwe="atomicStatements",Xwe="authorizationStatus",m0="assetType",l6="applicationTypeEquals",Ywe="aggregatedTestFindingsResult",Qwe="addTypeValue",N6="addType",h0="applicationType",L6="addVariable",Hc="action",y0="annotations",e$e="arn",t$e="automated",r$e="byteContent",d6="byCustomizationType",z6="bedrockEvaluatorModels",_0="blockedInputMessaging",p6="byInferenceType",n$e="bedrockKnowledgeBaseIdentifiers",o$e="buildLog",i$e="bedrockModel",$y="baseModelArn",m6="baseModelArnEquals",s$e="baseModelIdentifier",a$e="bedrockModelIdentifiers",c$e="baseModelName",u$e="bucketName",E0="blockedOutputsMessaging",f6="byOutputModality",g6="byProvider",l$e="bedrockRerankingConfiguration",d$e="buildSteps",p$e="batchSize",m$e="buildWorkflowAssets",ar="buildWorkflowId",S0="buildWorkflowType",Ss="client",Mt="createdAt",h6="createdAfter",f$e="createdBy",y6="createdBefore",v0="customizationConfig",A0="commitmentDuration",U6="customerEncryptionKeyId",B6="commitmentExpirationTime",g$e="copyFrom",h$e="claimsFalseScenario",y$e="contextualGroundingPolicy",G6="contextualGroundingPolicyConfig",ky="configId",F6="customMetrics",_$e="customModelArn",E$e="customMetricConfig",S$e="customMetricDefinition",Dy="customModelDeploymentArn",R0="customModelDeploymentIdentifier",v$e="customModelDeploymentName",A$e="customMetricsEvaluatorModelIdentifiers",R$e="customModelKmsKeyId",j6="customModelName",P$e="customModelTags",C$e="customModelUnits",T$e="customModelUnitsPerModelCopy",x$e="customModelUnitsVersion",b$e="contentPolicy",q6="contentPolicyConfig",V6="contradictingRules",H6="crossRegionConfig",W6="crossRegionDetails",at="clientRequestToken",I$e="conflictingRules",w$e="coverageScore",J6="customizationsSupported",Ad="confidenceThreshold",$r="creationTimeAfter",kr="creationTimeBefore",K6="claimsTrueScenario",$$e="contentType",Ht="creationTime",Rd="customizationType",k$e="cloudWatchConfig",Z6="claims",D$e="confidence",M$e="code",X6="content",O$e="context",Ne="description",N$e="documentContent",P0="documentContentType",L$e="distillationConfig",C0="documentDescription",Y6="documentHash",My="definitionHash",Q6="documentId",z$e="datasetLocation",eq="desiredModelArn",tq="datasetMetricConfigs",U$e="desiredModelId",rq="desiredModelUnits",Oy="documentName",B$e="dataProcessingDetails",G$e="desiredProvisionedModelName",nq="deleteRule",F$e="disjointRuleSets",j$e="differenceScenarios",q$e="documentSources",oq="deleteType",V$e="deleteTypeValue",iq="deleteVariable",H$e="data",W$e="dataset",T0="definition",J$e="dimension",x0="document",sq="documents",To="error",Wc="endpointArn",Ny="expectedAggregatedFindingsResult",K$e="entitlementAvailability",aq="evaluationConfig",b0="endpointConfig",Z$e="epochCount",X$e="embeddingDataDeliveryEnabled",Y$e="endpointIdentifier",Q$e="evalInterval",eke="evaluationJobs",tke="errorMessage",cq="evaluatorModelConfig",rke="evaluatorModelIdentifiers",nke="excludedModels",oke="endpointName",ike="endOfLifeTime",ske="expectedResult",ake="executionRole",cke="endpointStatus",uke="externalSourcesConfiguration",lke="endpointStatusMessage",Jc="endTime",dke="evaluationTaskTypes",uq="entries",lq="enabled",I0="equals",pke="errors",Ly="expression",dq="examples",pq="feedback",mq="filtersConfig",fq="formData",mke="flowDefinitionArn",w0="fallbackModel",gq="foundationModelArn",_6="foundationModelArnEquals",vs="failureMessage",fke="failureMessages",gke="fieldName",hke="failureRecommendations",yke="fidelityReport",_ke="fieldsToExclude",Eke="fieldsToInclude",Ske="floatValue",hq="filters",vke="filter",E6="force",Ake="guardrails",zy="guardrailArn",Uy="guardContent",yq="generationConfiguration",Rke="graderConfig",_q="guardrailConfiguration",Pke="guardrailsConfig",Cke="generateFidelityReportContent",Pa="guardrailIdentifier",Tke="guardrailInferenceConfig",Kc="guardrailId",Eq="groundingJustifications",xke="guardrailProfileArn",bke="guardrailProfileIdentifier",Ike="guardrailProfileId",Sq="groundingStatements",wke="greaterThan",vq="generatedTestCases",$ke="greaterThanOrEquals",Ca="guardrailVersion",kke="human",xo="httpError",Dke="httpHeader",By="hyperParameters",F="httpQuery",Mke="humanWorkflowConfig",W="http",Pd="id",yn="inputAction",Aq="inferenceConfig",Oke="inferenceConfigSummary",Nke="ingestContent",$0="inputDataConfig",Lke="imageDataDeliveryEnabled",_n="inputEnabled",zke="implicitFilterConfiguration",Uke="initialInstanceCount",Bke="invocationJobSummaries",Gke="invocationLogsConfig",Fke="invocationLogSource",Gy="inputModalities",Rq="importedModelArn",jke="importedModelKmsKeyArn",qke="importedModelKmsKeyId",k0="importedModelName",Vke="importedModelTags",Hke="inferenceMaxTokens",Wke="includedModels",S6="isOwned",Jke="inferenceParams",D0="inferenceProfileArn",Pq="inferenceProfileIdentifier",Cq="inferenceProfileId",M0="inferenceProfileName",Kke="inferenceProfileSummaries",Tq="instructSupported",Zke="inferenceSourceIdentifier",xq="inputStrength",bq="inputTags",Iq="inferenceTypesSupported",Xke="idempotencyToken",Yke="instanceType",Qke="identifier",eDe="impossible",wq="instructions",tDe="in",rDe="invalid",Gt="jobArn",$q="jobDescription",kq="jobExpirationTime",gi="jobIdentifier",nDe="jobIdentifiers",Mr="jobName",oDe="jobStatus",iDe="jobSummaries",O0="jobTags",Dq="jobType",N0="key",sDe="knowledgeBaseConfiguration",aDe="knowledgeBaseConfig",Mq="knowledgeBaseId",cDe="knowledgeBaseRetrievalConfiguration",uDe="kmsEncryptionKey",Oq="kbInferenceConfig",Nq="kmsKeyArn",L0="kmsKeyId",lDe="keyPrefix",dDe="logic",pDe="lambdaArn",Lq="loggingConfig",mDe="listContains",fDe="largeDataDeliveryS3Config",gDe="lambdaGrader",hDe="logGroupName",En="lastModifiedTime",yDe="lineNumber",_De="learningRate",EDe="lineText",SDe="lessThanOrEquals",vDe="legacyTime",ADe="legalTerm",RDe="lessThan",Cd="lastUpdatedAt",PDe="lastUpdatedAnnotationSetHash",CDe="lastUpdatedDefinitionHash",Fy="logicWarning",TDe="latency",xDe="lines",bDe="line",IDe="location",Or="message",Tt="modelArn",Cy="modelArnEquals",wDe="metadataAttributes",zq="modelArchitecture",$De="modelConfiguration",kDe="modelCopyJobSummaries",DDe="modelCustomizationJobSummaries",MDe="modelConfigSummary",ODe="metadataConfiguration",NDe="modelDetails",Uq="modelDeploymentName",z0="modelDataSource",LDe="modelDeploymentSummaries",Bq="modelEnforcement",As="modelIdentifier",zDe="modelImportJobSummaries",U0="modelInvocationType",Yr="modelId",UDe="modelIdentifiers",B0="modelKmsKeyArn",BDe="modelKmsKeyId",Gq="modelLifecycle",jy="marketplaceModelEndpoint",GDe="marketplaceModelEndpoints",Ta="modelName",FDe="metricNames",jDe="maxPromptLength",Oe="maxResults",qDe="maxResponseLengthForInference",VDe="modelSource",HDe="modelSourceConfig",WDe="modelSourceEquals",Td="modelSourceIdentifier",Ty="modelStatus",G0="modelSummaries",JDe="messageType",KDe="maxTokens",ZDe="modelTags",F0="modelUnits",XDe="managedWordLists",YDe="managedWordListsConfig",QDe="messages",Zc="models",eMe="mutation",We="name",sr="nameContains",j0="notEquals",tMe="notIn",Fq="naturalLanguage",jq="newName",rMe="numberOfResults",nMe="numberOfRerankedResults",ae="nextToken",oMe="noTranslations",iMe="newValue",sMe="owner",Sn="outputAction",aMe="ownerAccountId",qq="orAll",cMe="orchestrationConfiguration",Rs="outputDataConfig",vn="outputEnabled",uMe="offerId",qy="outputModalities",lMe="outputModelArn",dMe="outputModelKmsKeyArn",pMe="outputModelName",mMe="outputModelNameContains",Vq="outputStrength",fMe="overrideSearchType",Hq="offerToken",v6="offerType",gMe="offers",hMe="options",Wq="premises",Ce="policyArn",yMe="performanceConfig",xd="policyDefinition",_Me="policyDefinitionRule",EMe="policyDefinitionType",SMe="policyDefinitionVariable",vMe="priorElement",AMe="publicExtendedAccessTime",RMe="piiEntitiesConfig",PMe="piiEntities",Jq="policyId",CMe="precomputedInferenceSource",TMe="precomputedInferenceSourceIdentifiers",q0="provisionedModelArn",V0="provisionedModelId",H0="provisionedModelName",xMe="provisionedModelSummaries",bMe="pageNumber",Kq="providerName",bd="promptRouterArn",IMe="policyRepairAssets",W0="promptRouterName",wMe="promptRouterSummaries",$Me="precomputedRagSourceConfig",kMe="precomputedRagSourceIdentifiers",Zq="policyScenarios",Xq="promptTemplate",DMe="policyVariable",MMe="policyVersionArn",Yq="pattern",OMe="planning",Qq="policies",NMe="price",Vy="queryContent",LMe="qualityReport",zMe="queryTransformationConfiguration",J0="rule",Vn="roleArn",UMe="retrieveAndGenerateConfig",BMe="retrieveAndGenerateSourceConfig",K0="resourceARN",GMe="regionAvailability",FMe="ruleCount",jMe="ragConfigSummary",qMe="rateCard",VMe="ragConfigs",HMe="regexesConfig",WMe="rerankingConfiguration",JMe="retrievalConfiguration",KMe="retrieveConfig",ZMe="rftConfig",Z0="routingCriteria",XMe="reasoningEffort",eV="ruleId",YMe="ragIdentifiers",X0="ruleIds",QMe="ratingMethod",eOe="requestMetadataFilters",tOe="resourceName",rOe="refundPolicyDescription",nOe="responseQualityDifference",oOe="ruleReports",iOe="ratingScale",sOe="retrieveSourceConfig",tV="ragSourceIdentifier",rV="responseStreamingSupported",aOe="regexes",nV="rules",oV="smithy.ts.sdk.synthetic.com.amazonaws.bedrock",A6="sourceAccountEquals",iV="sourceAccountId",Ut="sortBy",sV="s3BucketOwner",cOe="s3Config",uOe="sourceContent",lOe="stringContains",aV="statusDetails",dOe="s3DataSource",pOe="scenarioExpression",mOe="s3EncryptionKeyId",Dr="statusEquals",fOe="securityGroupIds",gOe="statementId",hOe="s3InputDataConfig",yOe="s3InputFormat",_Oe="sensitiveInformationPolicy",cV="sensitiveInformationPolicyConfig",EOe="subnetIds",SOe="s3Location",uV="statusMessage",Y0="sourceModelArn",R6="sourceModelArnEquals",vOe="selectiveModeConfiguration",lV="sourceModelName",AOe="sageMaker",ROe="selectionMode",Bt="sortOrder",POe="s3OutputDataConfig",COe="startOfLifeTime",TOe="supportingRules",xOe="statusReasons",bOe="stopSequences",IOe="sourceType",P6="submitTimeAfter",C6="submitTimeBefore",dV="submitTime",wOe="supportTerm",hi="s3Uri",$Oe="stringValue",kOe="startsWith",DOe="satisfiable",MOe="scenario",pV="server",OOe="sources",qe="status",NOe="statements",Hy="translation",LOe="translationAmbiguous",zOe="typeCount",xa="testCaseId",UOe="testCaseIds",mV="testCase",BOe="testCases",fV="tierConfig",GOe="topicsConfig",FOe="tooComplex",jOe="termDetails",Q0="trainingDataConfig",qOe="textDataDeliveryEnabled",eb="timeoutDurationInHours",VOe="trainingDetails",HOe="typeEquals",WOe="testFindings",JOe="textInferenceConfig",KOe="tagKeys",ZOe="trainingLoss",gV="trainingMetrics",hV="targetModelArn",XOe="teacherModelConfig",YOe="teacherModelIdentifier",yV="targetModelKmsKeyArn",tb="targetModelName",QOe="targetModelNameContains",rb="targetModelTags",eNe="typeName",Wy="tierName",tNe="topicPolicy",_V="topicPolicyConfig",rNe="textPromptTemplate",nNe="topP",oNe="testResult",iNe="testRunResult",sNe="testRunStatus",aNe="testResults",cNe="trainingSamplePerPrompt",uNe="taskType",Hn="tags",Jy="text",lNe="temperature",EV="threshold",SV="tier",dNe="topics",pNe="translations",Qe="type",mNe="types",fNe="unit",ct="updatedAt",vV="updatedBy",gNe="usageBasedPricingTerm",hNe="untranslatedClaims",yNe="updateDetails",_Ne="updateFromRulesFeedback",ENe="updateFromScenarioFeedback",SNe="untranslatedPremises",vNe="usePromptResponse",AV="updateRule",ANe="updateStatus",RNe="unusedTypes",PNe="unusedTypeValues",CNe="updateTypeValue",RV="updateType",TNe="unusedVariables",PV="updateVariable",xNe="url",bNe="uri",nb="values",INe="variableCount",ba="vpcConfig",wNe="validationDetails",ob="validationDataConfig",$Ne="videoDataDeliveryEnabled",kNe="validationLoss",CV="validationMetrics",DNe="valueName",MNe="variableReports",ONe="vectorSearchConfiguration",NNe="validityTerm",Ia="value",LNe="validators",zNe="valid",TV="variable",xV="variables",bo="version",UNe="vpc",BNe="words",GNe="workflowContent",FNe="wordsConfig",jNe="wordPolicy",bV="wordPolicyConfig",qNe="x-amz-client-token",m="com.amazonaws.bedrock",IV=(ke(),Q(Wo)),VNe=Py(),Io=d0(),wV=IV.TypeRegistry.for(oV);s.BedrockServiceException$=[-3,oV,"BedrockServiceException",0,[],[]];wV.registerError(s.BedrockServiceException$,VNe.BedrockServiceException);var Wn=IV.TypeRegistry.for(m);s.AccessDeniedException$=[-3,m,q_e,{[To]:Ss,[xo]:403},[Or],[0]];Wn.registerError(s.AccessDeniedException$,Io.AccessDeniedException);s.ConflictException$=[-3,m,mAe,{[To]:Ss,[xo]:400},[Or],[0]];Wn.registerError(s.ConflictException$,Io.ConflictException);s.InternalServerException$=[-3,m,Gxe,{[To]:pV,[xo]:500},[Or],[0]];Wn.registerError(s.InternalServerException$,Io.InternalServerException);s.ResourceInUseException$=[-3,m,aIe,{[To]:Ss,[xo]:400},[Or],[0]];Wn.registerError(s.ResourceInUseException$,Io.ResourceInUseException);s.ResourceNotFoundException$=[-3,m,hIe,{[To]:Ss,[xo]:404},[Or],[0]];Wn.registerError(s.ResourceNotFoundException$,Io.ResourceNotFoundException);s.ServiceQuotaExceededException$=[-3,m,BIe,{[To]:Ss,[xo]:400},[Or],[0]];Wn.registerError(s.ServiceQuotaExceededException$,Io.ServiceQuotaExceededException);s.ServiceUnavailableException$=[-3,m,FIe,{[To]:pV,[xo]:503},[Or],[0]];Wn.registerError(s.ServiceUnavailableException$,Io.ServiceUnavailableException);s.ThrottlingException$=[-3,m,WIe,{[To]:Ss,[xo]:429},[Or],[0]];Wn.registerError(s.ThrottlingException$,Io.ThrottlingException);s.TooManyTagsException$=[-3,m,YIe,{[To]:Ss,[xo]:400},[Or,tOe],[0,0]];Wn.registerError(s.TooManyTagsException$,Io.TooManyTagsException);s.ValidationException$=[-3,m,$we,{[To]:Ss,[xo]:400},[Or],[0]];Wn.registerError(s.ValidationException$,Io.ValidationException);s.errorTypeRegistries=[wV,Wn];var HNe=[0,m,EEe,8,0],$V=[0,m,vEe,8,0],kV=[0,m,xEe,8,0],WNe=[0,m,bEe,8,0],JNe=[0,m,MEe,8,0],DV=[0,m,FEe,8,21],ib=[0,m,jEe,8,0],Ky=[0,m,qEe,8,0],KNe=[0,m,YEe,8,0],ZNe=[0,m,gSe,8,0],sb=[0,m,hSe,8,0],ab=[0,m,RSe,8,0],Co=[0,m,TSe,8,0],cb=[0,m,ISe,8,0],ub=[0,m,NSe,8,0],fi=[0,m,USe,8,0],Xc=[0,m,lSe,8,0],lb=[0,m,ZSe,8,0],XNe=[0,m,XSe,8,0],Ps=[0,m,QSe,8,0],YNe=[0,m,sve,8,0],MV=[0,m,cve,8,0],QNe=[0,m,mve,8,0],Zy=[0,m,Eve,8,0],Xy=[0,m,vve,8,0],e1e=[0,m,Lve,8,21],t1e=[0,m,dPe,8,0],OV=[0,m,fPe,8,0],Id=[0,m,gPe,8,0],r1e=[0,m,vPe,8,0],NV=[0,m,RPe,8,0],n1e=[0,m,APe,8,0],Vc=[0,m,mCe,8,0],xy=[0,m,hCe,8,0],LV=[0,m,vCe,8,0],zV=[0,m,RCe,8,0],wd=[0,m,FCe,8,0],o1e=[0,m,YCe,8,0],i1e=[0,m,uTe,8,0],Yy=[0,m,DTe,8,0],s1e=[0,m,XTe,8,0],by=[0,m,txe,8,0],UV=[0,m,oxe,8,0],a1e=[0,m,ixe,8,0],BV=[0,m,axe,8,0],GV=[0,m,pxe,8,0],Es=[0,m,_xe,8,0],c1e=[0,m,xxe,8,0],u1e=[0,m,Ixe,8,0],db=[0,m,Oxe,8,0],FV=[0,m,ibe,8,0],l1e=[0,m,Tbe,8,0],pb=[0,m,Bbe,8,0],d1e=[0,m,QIe,8,0];s.AccountEnforcedGuardrailInferenceInputConfiguration$=[3,m,K_e,0,[Pa,Ca,bq,Bq],[0,0,0,()=>s.ModelEnforcement$],3];s.AccountEnforcedGuardrailOutputConfiguration$=[3,m,Z_e,0,[ky,zy,Kc,bq,Ca,Mt,f$e,ct,vV,sMe,Bq],[0,0,0,0,0,5,0,5,0,0,()=>s.ModelEnforcement$]];s.AgreementAvailability$=[3,m,j_e,0,[qe,tke],[0,0],1];s.AutomatedEvaluationConfig$=[3,m,V_e,0,[tq,cq,E$e],[[()=>WV,0],()=>s.EvaluatorModelConfig$,[()=>s.AutomatedEvaluationCustomMetricConfig$,0]],1];s.AutomatedEvaluationCustomMetricConfig$=[3,m,W_e,0,[F6,cq],[[()=>m1e,0],()=>s.CustomMetricEvaluatorModelConfig$],2];s.AutomatedReasoningCheckImpossibleFinding$=[3,m,tEe,0,[Hy,V6,Fy],[[()=>s.AutomatedReasoningCheckTranslation$,0],()=>mb,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckInputTextReference$=[3,m,nEe,0,[Jy],[[()=>$V,0]]];s.AutomatedReasoningCheckInvalidFinding$=[3,m,rEe,0,[Hy,V6,Fy],[[()=>s.AutomatedReasoningCheckTranslation$,0],()=>mb,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckLogicWarning$=[3,m,iEe,0,[Qe,Wq,Z6],[0,[()=>vd,0],[()=>vd,0]]];s.AutomatedReasoningCheckNoTranslationsFinding$=[3,m,sEe,0,[],[]];s.AutomatedReasoningCheckRule$=[3,m,aEe,0,[Pd,MMe],[0,0]];s.AutomatedReasoningCheckSatisfiableFinding$=[3,m,lEe,0,[Hy,K6,h$e,Fy],[[()=>s.AutomatedReasoningCheckTranslation$,0],[()=>s.AutomatedReasoningCheckScenario$,0],[()=>s.AutomatedReasoningCheckScenario$,0],[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckScenario$=[3,m,uEe,0,[NOe],[[()=>vd,0]]];s.AutomatedReasoningCheckTooComplexFinding$=[3,m,mEe,0,[],[]];s.AutomatedReasoningCheckTranslation$=[3,m,dEe,0,[Z6,D$e,Wq,SNe,hNe],[[()=>vd,0],1,[()=>vd,0],[()=>T6,0],[()=>T6,0]],2];s.AutomatedReasoningCheckTranslationAmbiguousFinding$=[3,m,pEe,0,[hMe,j$e],[[()=>y1e,0],[()=>f1e,0]]];s.AutomatedReasoningCheckTranslationOption$=[3,m,gEe,0,[pNe],[[()=>h1e,0]]];s.AutomatedReasoningCheckValidFinding$=[3,m,yEe,0,[Hy,K6,TOe,Fy],[[()=>s.AutomatedReasoningCheckTranslation$,0],[()=>s.AutomatedReasoningCheckScenario$,0],()=>mb,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningLogicStatement$=[3,m,_Ee,0,[dDe,Fq],[[()=>HNe,0],[()=>$V,0]],1];s.AutomatedReasoningPolicyAddRuleAnnotation$=[3,m,$Ee,0,[Ly],[[()=>sb,0]],1];s.AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation$=[3,m,kEe,0,[Fq],[[()=>JNe,0]],1];s.AutomatedReasoningPolicyAddRuleMutation$=[3,m,DEe,0,[J0],[[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],1];s.AutomatedReasoningPolicyAddTypeAnnotation$=[3,m,LEe,0,[We,Ne,nb],[[()=>Co,0],[()=>ab,0],[()=>jV,0]],3];s.AutomatedReasoningPolicyAddTypeMutation$=[3,m,zEe,0,[Qe],[[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],1];s.AutomatedReasoningPolicyAddTypeValue$=[3,m,UEe,0,[Ia,Ne],[0,[()=>cb,0]],1];s.AutomatedReasoningPolicyAddVariableAnnotation$=[3,m,BEe,0,[We,Qe,Ne],[[()=>fi,0],[()=>Co,0],[()=>ub,0]],3];s.AutomatedReasoningPolicyAddVariableMutation$=[3,m,GEe,0,[TV],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],1];s.AutomatedReasoningPolicyAnnotatedChunk$=[3,m,REe,0,[X6,bMe],[[()=>E1e,0],1],1];s.AutomatedReasoningPolicyAnnotatedLine$=[3,m,IEe,0,[yDe,EDe],[1,[()=>XNe,0]]];s.AutomatedReasoningPolicyAtomicStatement$=[3,m,OEe,0,[Pd,Jy,IDe],[0,[()=>QNe,0],()=>s.AutomatedReasoningPolicyStatementLocation$],3];s.AutomatedReasoningPolicyBuildLog$=[3,m,VEe,0,[uq],[[()=>v1e,0]],1];s.AutomatedReasoningPolicyBuildLogEntry$=[3,m,HEe,0,[Uwe,qe,d$e],[[()=>s.AutomatedReasoningPolicyAnnotation$,0],0,[()=>R1e,0]],3];s.AutomatedReasoningPolicyBuildResultAssetManifest$=[3,m,KEe,0,[uq],[[()=>A1e,0]],1];s.AutomatedReasoningPolicyBuildResultAssetManifestEntry$=[3,m,ZEe,0,[m0,Vwe,p0],[0,[()=>KNe,0],0],1];s.AutomatedReasoningPolicyBuildStep$=[3,m,QEe,0,[O$e,QDe,vMe],[[()=>s.AutomatedReasoningPolicyBuildStepContext$,0],()=>P1e,[()=>s.AutomatedReasoningPolicyDefinitionElement$,0]],2];s.AutomatedReasoningPolicyBuildStepMessage$=[3,m,rSe,0,[Or,JDe],[0,0],2];s.AutomatedReasoningPolicyBuildWorkflowDocument$=[3,m,oSe,0,[x0,P0,Oy,C0],[[()=>DV,0],0,[()=>Ky,0],[()=>ib,0]],3];s.AutomatedReasoningPolicyBuildWorkflowRepairContent$=[3,m,sSe,0,[y0],[[()=>fb,0]],1];s.AutomatedReasoningPolicyBuildWorkflowSource$=[3,m,aSe,0,[xd,GNe],[[()=>s.AutomatedReasoningPolicyDefinition$,0],[()=>s.AutomatedReasoningPolicyWorkflowTypeContent$,0]]];s.AutomatedReasoningPolicyBuildWorkflowSummary$=[3,m,cSe,0,[Ce,ar,qe,S0,Mt,ct],[0,0,0,0,5,5],6];s.AutomatedReasoningPolicyDefinition$=[3,m,GSe,0,[bo,mNe,nV,xV],[0,[()=>b1e,0],[()=>x1e,0],[()=>$1e,0]]];s.AutomatedReasoningPolicyDefinitionQualityReport$=[3,m,pSe,0,[zOe,INe,FMe,RNe,PNe,TNe,I$e,F$e],[1,1,1,[()=>I1e,0],[()=>w1e,0],[()=>qV,0],64,[()=>k1e,0]],8];s.AutomatedReasoningPolicyDefinitionRule$=[3,m,mSe,0,[Pd,Ly,$6],[0,[()=>sb,0],[()=>ZNe,0]],2];s.AutomatedReasoningPolicyDefinitionType$=[3,m,vSe,0,[We,nb,Ne],[[()=>Co,0],[()=>jV,0],[()=>ab,0]],2];s.AutomatedReasoningPolicyDefinitionTypeValue$=[3,m,bSe,0,[Ia,Ne],[0,[()=>cb,0]],1];s.AutomatedReasoningPolicyDefinitionTypeValuePair$=[3,m,$Se,0,[eNe,DNe],[[()=>Co,0],0],2];s.AutomatedReasoningPolicyDefinitionVariable$=[3,m,MSe,0,[We,Qe,Ne],[[()=>fi,0],[()=>Co,0],[()=>ub,0]],3];s.AutomatedReasoningPolicyDeleteRuleAnnotation$=[3,m,fSe,0,[eV],[0],1];s.AutomatedReasoningPolicyDeleteRuleMutation$=[3,m,_Se,0,[Pd],[0],1];s.AutomatedReasoningPolicyDeleteTypeAnnotation$=[3,m,ASe,0,[We],[[()=>Co,0]],1];s.AutomatedReasoningPolicyDeleteTypeMutation$=[3,m,CSe,0,[We],[[()=>Co,0]],1];s.AutomatedReasoningPolicyDeleteTypeValue$=[3,m,DSe,0,[Ia],[0],1];s.AutomatedReasoningPolicyDeleteVariableAnnotation$=[3,m,OSe,0,[We],[[()=>fi,0]],1];s.AutomatedReasoningPolicyDeleteVariableMutation$=[3,m,zSe,0,[We],[[()=>fi,0]],1];s.AutomatedReasoningPolicyDisjointRuleSet$=[3,m,ESe,0,[xV,nV],[[()=>qV,0],64],2];s.AutomatedReasoningPolicyFidelityReport$=[3,m,FSe,0,[w$e,g0,oOe,MNe,q$e],[1,1,[()=>kLe,0],[()=>DLe,0],[()=>O1e,0]],5];s.AutomatedReasoningPolicyGeneratedTestCase$=[3,m,VSe,0,[Vy,Uy,Ny],[[()=>Xy,0],[()=>Zy,0],0],3];s.AutomatedReasoningPolicyGeneratedTestCases$=[3,m,WSe,0,[vq],[[()=>D1e,0]],1];s.AutomatedReasoningPolicyIngestContentAnnotation$=[3,m,JSe,0,[X6],[[()=>WNe,0]],1];s.AutomatedReasoningPolicyPlanning$=[3,m,eve,0,[],[]];s.AutomatedReasoningPolicyReportSourceDocument$=[3,m,nve,0,[Oy,Y6,Q6,Zwe,N$e],[[()=>Ky,0],0,0,[()=>S1e,0],[()=>_1e,0]],5];s.AutomatedReasoningPolicyRuleReport$=[3,m,tve,0,[J0,Sq,Eq,g0,k6],[0,()=>HV,[()=>VV,0],1,[()=>lb,0]],1];s.AutomatedReasoningPolicyScenario$=[3,m,ive,0,[Ly,$6,ske,X0],[[()=>MV,0],[()=>YNe,0],0,64],4];s.AutomatedReasoningPolicyScenarios$=[3,m,fve,0,[Zq],[[()=>N1e,0]],1];s.AutomatedReasoningPolicySourceDocument$=[3,m,ave,0,[x0,P0,Oy,Y6,C0],[[()=>DV,0],0,[()=>Ky,0],0,[()=>ib,0]],4];s.AutomatedReasoningPolicyStatementLocation$=[3,m,uve,0,[xDe],[65],1];s.AutomatedReasoningPolicyStatementReference$=[3,m,dve,0,[Q6,gOe],[0,0],2];s.AutomatedReasoningPolicySummary$=[3,m,gve,0,[Ce,We,bo,Jq,Mt,ct,Ne],[0,[()=>Ps,0],0,0,5,5,[()=>Xc,0]],6];s.AutomatedReasoningPolicyTestCase$=[3,m,yve,0,[xa,Uy,Mt,ct,Vy,Ny,Ad],[0,[()=>Zy,0],5,5,[()=>Xy,0],0,1],4];s.AutomatedReasoningPolicyTestResult$=[3,m,Ave,0,[mV,Ce,sNe,ct,WOe,iNe,Ywe],[[()=>s.AutomatedReasoningPolicyTestCase$,0],0,0,5,[()=>g1e,0],0,0],4];s.AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation$=[3,m,Cve,0,[pq,X0],[[()=>kV,0],64],1];s.AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation$=[3,m,Tve,0,[pOe,X0,pq],[[()=>MV,0],64,[()=>kV,0]],1];s.AutomatedReasoningPolicyUpdateRuleAnnotation$=[3,m,xve,0,[eV,Ly],[0,[()=>sb,0]],2];s.AutomatedReasoningPolicyUpdateRuleMutation$=[3,m,bve,0,[J0],[[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],1];s.AutomatedReasoningPolicyUpdateTypeAnnotation$=[3,m,Ive,0,[We,nb,jq,Ne],[[()=>Co,0],[()=>B1e,0],[()=>Co,0],[()=>ab,0]],2];s.AutomatedReasoningPolicyUpdateTypeMutation$=[3,m,wve,0,[Qe],[[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],1];s.AutomatedReasoningPolicyUpdateTypeValue$=[3,m,$ve,0,[Ia,iMe,Ne],[0,0,[()=>cb,0]],1];s.AutomatedReasoningPolicyUpdateVariableAnnotation$=[3,m,kve,0,[We,jq,Ne],[[()=>fi,0],[()=>fi,0],[()=>ub,0]],1];s.AutomatedReasoningPolicyUpdateVariableMutation$=[3,m,Dve,0,[TV],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],1];s.AutomatedReasoningPolicyVariableReport$=[3,m,Mve,0,[DMe,Sq,Eq,g0,k6],[[()=>fi,0],()=>HV,[()=>VV,0],1,[()=>lb,0]],1];s.BatchDeleteEvaluationJobError$=[3,m,Bve,0,[gi,M$e,Or],[[()=>Id,0],0,0],2];s.BatchDeleteEvaluationJobItem$=[3,m,Fve,0,[gi,oDe],[[()=>Id,0],0],2];s.BatchDeleteEvaluationJobRequest$=[3,m,qve,0,[nDe],[[()=>W1e,0]],1];s.BatchDeleteEvaluationJobResponse$=[3,m,Vve,0,[pke,eke],[[()=>G1e,0],[()=>F1e,0]],2];s.BedrockEvaluatorModel$=[3,m,Hve,0,[As],[0],1];s.ByteContentDoc$=[3,m,zve,0,[Qke,$$e,H$e],[[()=>u1e,0],0,[()=>e1e,0]],3];s.CancelAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,Zve,0,[Ce,ar],[[0,1],[0,1]],2];s.CancelAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,Xve,0,[],[]];s.CloudWatchConfig$=[3,m,sRe,0,[hDe,Vn,fDe],[0,0,()=>s.S3Config$],2];s.CreateAutomatedReasoningPolicyRequest$=[3,m,Yve,0,[We,Ne,at,xd,L0,Hn],[[()=>Ps,0],[()=>Xc,0],[0,4],[()=>s.AutomatedReasoningPolicyDefinition$,0],0,()=>Ct],1];s.CreateAutomatedReasoningPolicyResponse$=[3,m,Qve,0,[Ce,bo,We,Mt,ct,Ne,My],[0,0,[()=>Ps,0],5,5,[()=>Xc,0],0],5];s.CreateAutomatedReasoningPolicyTestCaseRequest$=[3,m,tAe,0,[Ce,Uy,Ny,Vy,at,Ad],[[0,1],[()=>Zy,0],0,[()=>Xy,0],[0,4],1],3];s.CreateAutomatedReasoningPolicyTestCaseResponse$=[3,m,rAe,0,[Ce,xa],[0,0],2];s.CreateAutomatedReasoningPolicyVersionRequest$=[3,m,oAe,0,[Ce,CDe,at,Hn],[[0,1],0,[0,4],()=>Ct],2];s.CreateAutomatedReasoningPolicyVersionResponse$=[3,m,iAe,0,[Ce,bo,We,My,Mt,Ne],[0,0,[()=>Ps,0],0,5,[()=>Xc,0]],5];s.CreateCustomModelDeploymentRequest$=[3,m,uAe,0,[Uq,Tt,Ne,Hn,at],[0,0,0,()=>Ct,[0,4]],2];s.CreateCustomModelDeploymentResponse$=[3,m,lAe,0,[Dy],[0],1];s.CreateCustomModelRequest$=[3,m,dAe,0,[Ta,HDe,B0,Vn,ZDe,at],[0,()=>s.ModelDataSource$,0,0,()=>Ct,[0,4]],2];s.CreateCustomModelResponse$=[3,m,pAe,0,[Tt],[0],1];s.CreateEvaluationJobRequest$=[3,m,gAe,0,[Mr,Vn,aq,Aq,Rs,$q,at,U6,O0,h0],[0,0,[()=>s.EvaluationConfig$,0],[()=>s.EvaluationInferenceConfig$,0],()=>s.EvaluationOutputDataConfig$,[()=>OV,0],[0,4],0,()=>Ct,0],5];s.CreateEvaluationJobResponse$=[3,m,hAe,0,[Gt],[0],1];s.CreateFoundationModelAgreementRequest$=[3,m,_Ae,0,[Hq,Yr],[0,0],2];s.CreateFoundationModelAgreementResponse$=[3,m,EAe,0,[Yr],[0],1];s.CreateGuardrailRequest$=[3,m,vAe,0,[We,_0,E0,Ne,_V,q6,bV,cV,G6,M6,H6,L0,Hn,at],[[()=>Yy,0],[()=>Vc,0],[()=>Vc,0],[()=>wd,0],[()=>s.GuardrailTopicPolicyConfig$,0],[()=>s.GuardrailContentPolicyConfig$,0],[()=>s.GuardrailWordPolicyConfig$,0],()=>s.GuardrailSensitiveInformationPolicyConfig$,[()=>s.GuardrailContextualGroundingPolicyConfig$,0],()=>s.GuardrailAutomatedReasoningPolicyConfig$,()=>s.GuardrailCrossRegionConfig$,0,()=>Ct,[0,4]],3];s.CreateGuardrailResponse$=[3,m,AAe,0,[Kc,zy,bo,Mt],[0,0,0,5],4];s.CreateGuardrailVersionRequest$=[3,m,PAe,0,[Pa,Ne,at],[[0,1],[()=>wd,0],[0,4]],1];s.CreateGuardrailVersionResponse$=[3,m,CAe,0,[Kc,bo],[0,0],2];s.CreateInferenceProfileRequest$=[3,m,xAe,0,[M0,VDe,Ne,at,Hn],[0,()=>s.InferenceProfileModelSource$,[()=>db,0],[0,4],()=>Ct],2];s.CreateInferenceProfileResponse$=[3,m,bAe,0,[D0,qe],[0,0],1];s.CreateMarketplaceModelEndpointRequest$=[3,m,KAe,0,[Td,b0,oke,jwe,at,Hn],[0,()=>s.EndpointConfig$,0,2,[0,4],()=>Ct],3];s.CreateMarketplaceModelEndpointResponse$=[3,m,ZAe,0,[jy],[()=>s.MarketplaceModelEndpoint$],1];s.CreateModelCopyJobRequest$=[3,m,kAe,0,[Y0,tb,BDe,rb,at],[0,0,0,()=>Ct,[0,4]],2];s.CreateModelCopyJobResponse$=[3,m,DAe,0,[Gt],[0],1];s.CreateModelCustomizationJobRequest$=[3,m,MAe,0,[Mr,j6,Vn,s$e,Q0,Rs,at,Rd,R$e,O0,P$e,ob,By,ba,v0],[0,0,0,0,[()=>s.TrainingDataConfig$,0],()=>s.OutputDataConfig$,[0,4],0,0,()=>Ct,()=>Ct,()=>s.ValidationDataConfig$,128,()=>s.VpcConfig$,()=>s.CustomizationConfig$],6];s.CreateModelCustomizationJobResponse$=[3,m,OAe,0,[Gt],[0],1];s.CreateModelImportJobRequest$=[3,m,jAe,0,[Mr,k0,Vn,z0,O0,Vke,at,ba,qke],[0,0,0,()=>s.ModelDataSource$,()=>Ct,()=>Ct,0,()=>s.VpcConfig$,0],4];s.CreateModelImportJobResponse$=[3,m,qAe,0,[Gt],[0],1];s.CreateModelInvocationJobRequest$=[3,m,VAe,0,[Mr,Vn,Yr,$0,Rs,at,ba,eb,Hn,U0],[0,0,0,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,[0,4],()=>s.VpcConfig$,1,()=>Ct,0],5];s.CreateModelInvocationJobResponse$=[3,m,HAe,0,[Gt],[0],1];s.CreatePromptRouterRequest$=[3,m,oRe,0,[W0,Zc,Z0,w0,at,Ne,Hn],[0,()=>gb,()=>s.RoutingCriteria$,()=>s.PromptRouterTargetModel$,[0,4],[()=>pb,0],()=>Ct],4];s.CreatePromptRouterResponse$=[3,m,iRe,0,[bd],[0]];s.CreateProvisionedModelThroughputRequest$=[3,m,tRe,0,[F0,H0,Yr,at,A0,Hn],[1,0,0,[0,4],0,()=>Ct],3];s.CreateProvisionedModelThroughputResponse$=[3,m,rRe,0,[q0],[0],1];s.CustomMetricBedrockEvaluatorModel$=[3,m,IAe,0,[As],[0],1];s.CustomMetricDefinition$=[3,m,LAe,8,[We,wq,iOe],[[()=>l1e,0],0,()=>wLe],2];s.CustomMetricEvaluatorModelConfig$=[3,m,GAe,0,[z6],[()=>q1e],1];s.CustomModelDeploymentSummary$=[3,m,zAe,0,[Dy,v$e,Tt,Mt,qe,Cd,vs],[0,0,0,5,0,5,0],5];s.CustomModelDeploymentUpdateDetails$=[3,m,BAe,0,[Tt,ANe],[0,0],2];s.CustomModelSummary$=[3,m,XAe,0,[Tt,Ta,Ht,$y,c$e,Rd,aMe,Ty],[0,0,5,0,0,0,0,0],5];s.CustomModelUnits$=[3,m,QAe,0,[T$e,x$e],[1,0]];s.DataProcessingDetails$=[3,m,WRe,0,[qe,Ht,En],[0,5,5]];s.DeleteAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,uRe,0,[Ce,ar,Cd],[[0,1],[0,1],[5,{[F]:ct}]],3];s.DeleteAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,lRe,0,[],[]];s.DeleteAutomatedReasoningPolicyRequest$=[3,m,dRe,0,[Ce,E6],[[0,1],[2,{[F]:E6}]],1];s.DeleteAutomatedReasoningPolicyResponse$=[3,m,pRe,0,[],[]];s.DeleteAutomatedReasoningPolicyTestCaseRequest$=[3,m,fRe,0,[Ce,xa,Cd],[[0,1],[0,1],[5,{[F]:ct}]],3];s.DeleteAutomatedReasoningPolicyTestCaseResponse$=[3,m,gRe,0,[],[]];s.DeleteCustomModelDeploymentRequest$=[3,m,ERe,0,[R0],[[0,1]],1];s.DeleteCustomModelDeploymentResponse$=[3,m,SRe,0,[],[]];s.DeleteCustomModelRequest$=[3,m,vRe,0,[As],[[0,1]],1];s.DeleteCustomModelResponse$=[3,m,ARe,0,[],[]];s.DeleteEnforcedGuardrailConfigurationRequest$=[3,m,PRe,0,[ky],[[0,1]],1];s.DeleteEnforcedGuardrailConfigurationResponse$=[3,m,CRe,0,[],[]];s.DeleteFoundationModelAgreementRequest$=[3,m,xRe,0,[Yr],[0],1];s.DeleteFoundationModelAgreementResponse$=[3,m,bRe,0,[],[]];s.DeleteGuardrailRequest$=[3,m,wRe,0,[Pa,Ca],[[0,1],[0,{[F]:Ca}]],1];s.DeleteGuardrailResponse$=[3,m,$Re,0,[],[]];s.DeleteImportedModelRequest$=[3,m,DRe,0,[As],[[0,1]],1];s.DeleteImportedModelResponse$=[3,m,MRe,0,[],[]];s.DeleteInferenceProfileRequest$=[3,m,NRe,0,[Pq],[[0,1]],1];s.DeleteInferenceProfileResponse$=[3,m,LRe,0,[],[]];s.DeleteMarketplaceModelEndpointRequest$=[3,m,FRe,0,[Wc],[[0,1]],1];s.DeleteMarketplaceModelEndpointResponse$=[3,m,jRe,0,[],[]];s.DeleteModelInvocationLoggingConfigurationRequest$=[3,m,URe,0,[],[]];s.DeleteModelInvocationLoggingConfigurationResponse$=[3,m,BRe,0,[],[]];s.DeletePromptRouterRequest$=[3,m,YRe,0,[bd],[[0,1]],1];s.DeletePromptRouterResponse$=[3,m,QRe,0,[],[]];s.DeleteProvisionedModelThroughputRequest$=[3,m,KRe,0,[V0],[[0,1]],1];s.DeleteProvisionedModelThroughputResponse$=[3,m,ZRe,0,[],[]];s.DeregisterMarketplaceModelEndpointRequest$=[3,m,qRe,0,[Wc],[[0,1]],1];s.DeregisterMarketplaceModelEndpointResponse$=[3,m,VRe,0,[],[]];s.DimensionalPriceRate$=[3,m,XRe,0,[J$e,NMe,Ne,fNe],[0,0,0,0]];s.DistillationConfig$=[3,m,hRe,0,[XOe],[()=>s.TeacherModelConfig$],1];s.EvaluationBedrockModel$=[3,m,oPe,0,[As,Jke,yMe],[0,[()=>n1e,0],()=>s.PerformanceConfiguration$],1];s.EvaluationDataset$=[3,m,aPe,0,[We,z$e],[[()=>t1e,0],()=>s.EvaluationDatasetLocation$],1];s.EvaluationDatasetMetricConfig$=[3,m,uPe,0,[uNe,W$e,FDe],[0,[()=>s.EvaluationDataset$,0],[()=>J1e,0]],3];s.EvaluationInferenceConfigSummary$=[3,m,mPe,0,[MDe,jMe],[()=>s.EvaluationModelConfigSummary$,()=>s.EvaluationRagConfigSummary$]];s.EvaluationModelConfigSummary$=[3,m,_Pe,0,[a$e,TMe],[64,64]];s.EvaluationOutputDataConfig$=[3,m,CPe,0,[hi],[0],1];s.EvaluationPrecomputedInferenceSource$=[3,m,TPe,0,[Zke],[0],1];s.EvaluationPrecomputedRetrieveAndGenerateSourceConfig$=[3,m,xPe,0,[tV],[0],1];s.EvaluationPrecomputedRetrieveSourceConfig$=[3,m,bPe,0,[tV],[0],1];s.EvaluationRagConfigSummary$=[3,m,wPe,0,[n$e,kMe],[64,64]];s.EvaluationSummary$=[3,m,$Pe,0,[Gt,Mr,qe,Ht,Dq,dke,UDe,YMe,rke,A$e,Oke,h0],[0,0,0,5,0,64,64,64,64,64,()=>s.EvaluationInferenceConfigSummary$,0],6];s.ExportAutomatedReasoningPolicyVersionRequest$=[3,m,rPe,0,[Ce],[[0,1]],1];s.ExportAutomatedReasoningPolicyVersionResponse$=[3,m,nPe,0,[xd],[[()=>s.AutomatedReasoningPolicyDefinition$,16]],1];s.ExternalSource$=[3,m,OPe,0,[IOe,SOe,r$e],[0,()=>s.S3ObjectDoc$,[()=>s.ByteContentDoc$,0]],1];s.ExternalSourcesGenerationConfiguration$=[3,m,kPe,0,[Xq,_q,Oq,f0],[[()=>s.PromptTemplate$,0],()=>s.GuardrailConfiguration$,()=>s.KbInferenceConfig$,143]];s.ExternalSourcesRetrieveAndGenerateConfiguration$=[3,m,DPe,0,[Tt,OOe,yq],[0,[()=>X1e,0],[()=>s.ExternalSourcesGenerationConfiguration$,0]],2];s.FieldForReranking$=[3,m,zPe,0,[gke],[0],1];s.FilterAttribute$=[3,m,LPe,0,[N0,Ia],[0,15],2];s.FoundationModelDetails$=[3,m,BPe,0,[Tt,Yr,Ta,Kq,Gy,qy,rV,J6,Iq,Gq],[0,0,0,0,64,64,2,64,64,()=>s.FoundationModelLifecycle$],2];s.FoundationModelLifecycle$=[3,m,GPe,0,[qe,COe,ike,vDe,AMe],[0,5,5,5,5],1];s.FoundationModelSummary$=[3,m,FPe,0,[Tt,Yr,Ta,Kq,Gy,qy,rV,J6,Iq,Gq],[0,0,0,0,64,64,2,64,64,()=>s.FoundationModelLifecycle$],2];s.GenerationConfiguration$=[3,m,fCe,0,[Xq,_q,Oq,f0],[[()=>s.PromptTemplate$,0],()=>s.GuardrailConfiguration$,()=>s.KbInferenceConfig$,143]];s.GetAutomatedReasoningPolicyAnnotationsRequest$=[3,m,HPe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyAnnotationsResponse$=[3,m,WPe,0,[Ce,We,ar,y0,O6,ct],[0,[()=>Ps,0],0,[()=>fb,0],0,5],6];s.GetAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,KPe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,QPe,0,[Ce,ar,qe,S0,Mt,ct,Oy,P0,C0],[0,0,0,0,5,5,[()=>Ky,0],0,[()=>ib,0]],6];s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest$=[3,m,XPe,0,[Ce,ar,m0,p0],[[0,1],[0,1],[0,{[F]:m0}],[0,{[F]:p0}]],3];s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse$=[3,m,YPe,0,[Ce,ar,m$e],[0,0,[()=>s.AutomatedReasoningPolicyBuildResultAssets$,0]],2];s.GetAutomatedReasoningPolicyNextScenarioRequest$=[3,m,rCe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyNextScenarioResponse$=[3,m,nCe,0,[Ce,MOe],[0,[()=>s.AutomatedReasoningPolicyScenario$,0]],1];s.GetAutomatedReasoningPolicyRequest$=[3,m,oCe,0,[Ce],[[0,1]],1];s.GetAutomatedReasoningPolicyResponse$=[3,m,iCe,0,[Ce,We,bo,Jq,My,ct,Ne,Nq,Mt],[0,[()=>Ps,0],0,0,0,5,[()=>Xc,0],0,5],6];s.GetAutomatedReasoningPolicyTestCaseRequest$=[3,m,aCe,0,[Ce,xa],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyTestCaseResponse$=[3,m,cCe,0,[Ce,mV],[0,[()=>s.AutomatedReasoningPolicyTestCase$,0]],2];s.GetAutomatedReasoningPolicyTestResultRequest$=[3,m,lCe,0,[Ce,ar,xa],[[0,1],[0,1],[0,1]],3];s.GetAutomatedReasoningPolicyTestResultResponse$=[3,m,dCe,0,[oNe],[[()=>s.AutomatedReasoningPolicyTestResult$,0]],1];s.GetCustomModelDeploymentRequest$=[3,m,kCe,0,[R0],[[0,1]],1];s.GetCustomModelDeploymentResponse$=[3,m,DCe,0,[Dy,Uq,Tt,Mt,qe,Ne,yNe,vs,Cd],[0,0,0,5,0,0,()=>s.CustomModelDeploymentUpdateDetails$,0,5],5];s.GetCustomModelRequest$=[3,m,MCe,0,[As],[[0,1]],1];s.GetCustomModelResponse$=[3,m,OCe,0,[Tt,Ta,Ht,Mr,Gt,$y,Rd,B0,By,Q0,ob,Rs,gV,CV,v0,Ty,vs],[0,0,5,0,0,0,0,0,128,[()=>s.TrainingDataConfig$,0],()=>s.ValidationDataConfig$,()=>s.OutputDataConfig$,()=>s.TrainingMetrics$,()=>ZV,()=>s.CustomizationConfig$,0,0],3];s.GetEvaluationJobRequest$=[3,m,qCe,0,[gi],[[()=>Id,1]],1];s.GetEvaluationJobResponse$=[3,m,VCe,0,[Mr,qe,Gt,Vn,Dq,aq,Aq,Rs,Ht,$q,U6,h0,En,fke],[0,0,0,0,0,[()=>s.EvaluationConfig$,0],[()=>s.EvaluationInferenceConfig$,0],()=>s.EvaluationOutputDataConfig$,5,[()=>OV,0],0,0,5,64],9];s.GetFoundationModelAvailabilityRequest$=[3,m,JCe,0,[Yr],[[0,1]],1];s.GetFoundationModelAvailabilityResponse$=[3,m,KCe,0,[Yr,Bwe,Xwe,K$e,GMe],[0,()=>s.AgreementAvailability$,0,0,0],5];s.GetFoundationModelRequest$=[3,m,ZCe,0,[As],[[0,1]],1];s.GetFoundationModelResponse$=[3,m,XCe,0,[NDe],[()=>s.FoundationModelDetails$]];s.GetGuardrailRequest$=[3,m,tTe,0,[Pa,Ca],[[0,1],[0,{[F]:Ca}]],1];s.GetGuardrailResponse$=[3,m,rTe,0,[We,Kc,zy,bo,qe,Mt,ct,_0,E0,Ne,tNe,b$e,jNe,_Oe,y$e,Wwe,W6,xOe,hke,Nq],[[()=>Yy,0],0,0,0,0,5,5,[()=>Vc,0],[()=>Vc,0],[()=>wd,0],[()=>s.GuardrailTopicPolicy$,0],[()=>s.GuardrailContentPolicy$,0],[()=>s.GuardrailWordPolicy$,0],()=>s.GuardrailSensitiveInformationPolicy$,[()=>s.GuardrailContextualGroundingPolicy$,0],()=>s.GuardrailAutomatedReasoningPolicy$,()=>s.GuardrailCrossRegionDetails$,[()=>lLe,0],[()=>nLe,0],0],9];s.GetImportedModelRequest$=[3,m,oTe,0,[As],[[0,1]],1];s.GetImportedModelResponse$=[3,m,iTe,0,[Tt,Ta,Mr,Gt,z0,Ht,zq,B0,Tq,C$e],[0,0,0,0,()=>s.ModelDataSource$,5,0,0,2,()=>s.CustomModelUnits$]];s.GetInferenceProfileRequest$=[3,m,aTe,0,[Pq],[[0,1]],1];s.GetInferenceProfileResponse$=[3,m,cTe,0,[M0,D0,Zc,Cq,qe,Qe,Ne,Mt,ct],[0,0,()=>KV,0,0,0,[()=>db,0],5,5],6];s.GetMarketplaceModelEndpointRequest$=[3,m,TTe,0,[Wc],[[0,1]],1];s.GetMarketplaceModelEndpointResponse$=[3,m,xTe,0,[jy],[()=>s.MarketplaceModelEndpoint$]];s.GetModelCopyJobRequest$=[3,m,dTe,0,[Gt],[[0,1]],1];s.GetModelCopyJobResponse$=[3,m,pTe,0,[Gt,qe,Ht,hV,iV,Y0,tb,yV,rb,vs,lV],[0,0,5,0,0,0,0,0,()=>Ct,0,0],6];s.GetModelCustomizationJobRequest$=[3,m,mTe,0,[gi],[[0,1]],1];s.GetModelCustomizationJobResponse$=[3,m,fTe,0,[Gt,Mr,pMe,Vn,Ht,$y,Q0,ob,Rs,lMe,at,qe,aV,vs,En,Jc,By,Rd,dMe,gV,CV,ba,v0],[0,0,0,0,5,0,[()=>s.TrainingDataConfig$,0],()=>s.ValidationDataConfig$,()=>s.OutputDataConfig$,0,0,0,()=>s.StatusDetails$,0,5,5,128,0,0,()=>s.TrainingMetrics$,()=>ZV,()=>s.VpcConfig$,()=>s.CustomizationConfig$],9];s.GetModelImportJobRequest$=[3,m,yTe,0,[gi],[[0,1]],1];s.GetModelImportJobResponse$=[3,m,_Te,0,[Gt,Mr,k0,Rq,Vn,z0,qe,vs,Ht,En,Jc,ba,jke],[0,0,0,0,0,()=>s.ModelDataSource$,0,0,5,5,5,()=>s.VpcConfig$,0]];s.GetModelInvocationJobRequest$=[3,m,ETe,0,[gi],[[0,1]],1];s.GetModelInvocationJobResponse$=[3,m,STe,0,[Gt,Yr,Vn,dV,$0,Rs,Mr,at,qe,Or,En,Jc,ba,eb,kq,U0],[0,0,0,5,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,0,0,0,[()=>FV,0],5,5,()=>s.VpcConfig$,1,5,0],6];s.GetModelInvocationLoggingConfigurationRequest$=[3,m,RTe,0,[],[]];s.GetModelInvocationLoggingConfigurationResponse$=[3,m,PTe,0,[Lq],[()=>s.LoggingConfig$]];s.GetPromptRouterRequest$=[3,m,FTe,0,[bd],[[0,1]],1];s.GetPromptRouterResponse$=[3,m,jTe,0,[W0,Z0,bd,Zc,w0,qe,Qe,Ne,Mt,ct],[0,()=>s.RoutingCriteria$,0,()=>gb,()=>s.PromptRouterTargetModel$,0,0,[()=>pb,0],5,5],7];s.GetProvisionedModelThroughputRequest$=[3,m,UTe,0,[V0],[[0,1]],1];s.GetProvisionedModelThroughputResponse$=[3,m,BTe,0,[F0,rq,H0,q0,Tt,eq,gq,qe,Ht,En,vs,A0,B6],[1,1,0,0,0,0,0,0,5,5,0,0,5],10];s.GetUseCaseForModelAccessRequest$=[3,m,gxe,0,[],[]];s.GetUseCaseForModelAccessResponse$=[3,m,hxe,0,[fq],[21],1];s.GuardrailAutomatedReasoningPolicy$=[3,m,qPe,0,[Qq,Ad],[64,1],1];s.GuardrailAutomatedReasoningPolicyConfig$=[3,m,eCe,0,[Qq,Ad],[64,1],1];s.GuardrailConfiguration$=[3,m,GCe,0,[Kc,Ca],[0,0],2];s.GuardrailContentFilter$=[3,m,gCe,0,[Qe,xq,Vq,Gy,qy,yn,Sn,_n,vn],[0,0,0,[()=>Iy,0],[()=>Iy,0],[()=>xy,0],[()=>xy,0],2,2],3];s.GuardrailContentFilterConfig$=[3,m,yCe,0,[Qe,xq,Vq,Gy,qy,yn,Sn,_n,vn],[0,0,0,[()=>Iy,0],[()=>Iy,0],[()=>xy,0],[()=>xy,0],2,2],3];s.GuardrailContentFiltersTier$=[3,m,ECe,0,[Wy],[[()=>LV,0]],1];s.GuardrailContentFiltersTierConfig$=[3,m,SCe,0,[Wy],[[()=>LV,0]],1];s.GuardrailContentPolicy$=[3,m,NCe,0,[hq,SV],[[()=>Q1e,0],[()=>s.GuardrailContentFiltersTier$,0]]];s.GuardrailContentPolicyConfig$=[3,m,LCe,0,[mq,fV],[[()=>eLe,0],[()=>s.GuardrailContentFiltersTierConfig$,0]],1];s.GuardrailContextualGroundingFilter$=[3,m,PCe,0,[Qe,EV,Hc,lq],[0,1,[()=>zV,0],2],2];s.GuardrailContextualGroundingFilterConfig$=[3,m,CCe,0,[Qe,EV,Hc,lq],[0,1,[()=>zV,0],2],2];s.GuardrailContextualGroundingPolicy$=[3,m,bCe,0,[hq],[[()=>tLe,0]],1];s.GuardrailContextualGroundingPolicyConfig$=[3,m,ICe,0,[mq],[[()=>rLe,0]],1];s.GuardrailCrossRegionConfig$=[3,m,zCe,0,[bke],[0],1];s.GuardrailCrossRegionDetails$=[3,m,UCe,0,[Ike,xke],[0,0]];s.GuardrailManagedWords$=[3,m,bTe,0,[Qe,yn,Sn,_n,vn],[0,[()=>Es,0],[()=>Es,0],2,2],1];s.GuardrailManagedWordsConfig$=[3,m,ITe,0,[Qe,yn,Sn,_n,vn],[0,[()=>Es,0],[()=>Es,0],2,2],1];s.GuardrailPiiEntity$=[3,m,MTe,0,[Qe,Hc,yn,Sn,_n,vn],[0,0,0,0,2,2],2];s.GuardrailPiiEntityConfig$=[3,m,OTe,0,[Qe,Hc,yn,Sn,_n,vn],[0,0,0,0,2,2],2];s.GuardrailRegex$=[3,m,qTe,0,[We,Yq,Hc,Ne,yn,Sn,_n,vn],[0,0,0,0,0,0,2,2],3];s.GuardrailRegexConfig$=[3,m,VTe,0,[We,Yq,Hc,Ne,yn,Sn,_n,vn],[0,0,0,0,0,0,2,2],3];s.GuardrailSensitiveInformationPolicy$=[3,m,KTe,0,[PMe,aOe],[()=>sLe,()=>cLe]];s.GuardrailSensitiveInformationPolicyConfig$=[3,m,ZTe,0,[RMe,HMe],[()=>aLe,()=>uLe]];s.GuardrailSummary$=[3,m,JTe,0,[Pd,e$e,qe,We,bo,Mt,ct,Ne,W6],[0,0,0,[()=>Yy,0],0,5,5,[()=>wd,0],()=>s.GuardrailCrossRegionDetails$],7];s.GuardrailTopic$=[3,m,exe,0,[We,T0,dq,Qe,yn,Sn,_n,vn],[[()=>BV,0],[()=>UV,0],[()=>JV,0],0,[()=>by,0],[()=>by,0],2,2],2];s.GuardrailTopicConfig$=[3,m,rxe,0,[We,T0,Qe,dq,yn,Sn,_n,vn],[[()=>BV,0],[()=>UV,0],0,[()=>JV,0],[()=>by,0],[()=>by,0],2,2],3];s.GuardrailTopicPolicy$=[3,m,cxe,0,[dNe,SV],[[()=>pLe,0],[()=>s.GuardrailTopicsTier$,0]],1];s.GuardrailTopicPolicyConfig$=[3,m,uxe,0,[GOe,fV],[[()=>mLe,0],[()=>s.GuardrailTopicsTierConfig$,0]],1];s.GuardrailTopicsTier$=[3,m,lxe,0,[Wy],[[()=>GV,0]],1];s.GuardrailTopicsTierConfig$=[3,m,dxe,0,[Wy],[[()=>GV,0]],1];s.GuardrailWord$=[3,m,yxe,0,[Jy,yn,Sn,_n,vn],[0,[()=>Es,0],[()=>Es,0],2,2],1];s.GuardrailWordConfig$=[3,m,Exe,0,[Jy,yn,Sn,_n,vn],[0,[()=>Es,0],[()=>Es,0],2,2],1];s.GuardrailWordPolicy$=[3,m,vxe,0,[BNe,XDe],[[()=>fLe,0],[()=>oLe,0]]];s.GuardrailWordPolicyConfig$=[3,m,Axe,0,[FNe,YDe],[[()=>gLe,0],[()=>iLe,0]]];s.HumanEvaluationConfig$=[3,m,Pxe,0,[tq,Mke,F6],[[()=>WV,0],[()=>s.HumanWorkflowConfig$,0],[()=>hLe,0]],1];s.HumanEvaluationCustomMetric$=[3,m,Cxe,0,[We,QMe,Ne],[[()=>NV,0],0,[()=>r1e,0]],2];s.HumanWorkflowConfig$=[3,m,bxe,0,[mke,wq],[0,[()=>c1e,0]],1];s.ImplicitFilterConfiguration$=[3,m,wxe,0,[wDe,Tt],[[()=>SLe,0],0],2];s.ImportedModelSummary$=[3,m,Dxe,0,[Tt,Ta,Ht,Tq,zq],[0,0,5,2,0],3];s.InferenceProfileModel$=[3,m,Nxe,0,[Tt],[0]];s.InferenceProfileSummary$=[3,m,Uxe,0,[M0,D0,Zc,Cq,qe,Qe,Ne,Mt,ct],[0,0,()=>KV,0,0,0,[()=>db,0],5,5],6];s.InvocationLogsConfig$=[3,m,$xe,0,[Fke,vNe,eOe],[()=>s.InvocationLogSource$,2,[()=>s.RequestMetadataFilters$,0]],1];s.KbInferenceConfig$=[3,m,Hxe,0,[JOe],[()=>s.TextInferenceConfig$]];s.KnowledgeBaseRetrievalConfiguration$=[3,m,qxe,0,[ONe],[[()=>s.KnowledgeBaseVectorSearchConfiguration$,0]],1];s.KnowledgeBaseRetrieveAndGenerateConfiguration$=[3,m,jxe,0,[Mq,Tt,JMe,yq,cMe],[0,0,[()=>s.KnowledgeBaseRetrievalConfiguration$,0],[()=>s.GenerationConfiguration$,0],()=>s.OrchestrationConfiguration$],2];s.KnowledgeBaseVectorSearchConfiguration$=[3,m,Vxe,0,[rMe,fMe,vke,zke,WMe],[1,0,[()=>s.RetrievalFilter$,0],[()=>s.ImplicitFilterConfiguration$,0],[()=>s.VectorSearchRerankingConfiguration$,0]]];s.LambdaGraderConfig$=[3,m,C0e,0,[pDe],[0],1];s.LegalTerm$=[3,m,tbe,0,[xNe],[0]];s.ListAutomatedReasoningPoliciesRequest$=[3,m,Xxe,0,[Ce,ae,Oe],[[0,{[F]:Ce}],[0,{[F]:ae}],[1,{[F]:Oe}]]];s.ListAutomatedReasoningPoliciesResponse$=[3,m,Yxe,0,[Kwe,ae],[[()=>L1e,0],0],1];s.ListAutomatedReasoningPolicyBuildWorkflowsRequest$=[3,m,Kxe,0,[Ce,ae,Oe],[[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],1];s.ListAutomatedReasoningPolicyBuildWorkflowsResponse$=[3,m,Zxe,0,[Jwe,ae],[()=>T1e,0],1];s.ListAutomatedReasoningPolicyTestCasesRequest$=[3,m,e0e,0,[Ce,ae,Oe],[[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],1];s.ListAutomatedReasoningPolicyTestCasesResponse$=[3,m,t0e,0,[BOe,ae],[[()=>z1e,0],0],1];s.ListAutomatedReasoningPolicyTestResultsRequest$=[3,m,n0e,0,[Ce,ar,ae,Oe],[[0,1],[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],2];s.ListAutomatedReasoningPolicyTestResultsResponse$=[3,m,o0e,0,[aNe,ae],[[()=>U1e,0],0],1];s.ListCustomModelDeploymentsRequest$=[3,m,c0e,0,[y6,h6,sr,Oe,ae,Ut,Bt,Dr,Cy],[[5,{[F]:y6}],[5,{[F]:h6}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}],[0,{[F]:Dr}],[0,{[F]:Cy}]]];s.ListCustomModelDeploymentsResponse$=[3,m,u0e,0,[ae,LDe],[0,()=>V1e]];s.ListCustomModelsRequest$=[3,m,l0e,0,[kr,$r,sr,m6,_6,Oe,ae,Ut,Bt,S6,Ty],[[5,{[F]:kr}],[5,{[F]:$r}],[0,{[F]:sr}],[0,{[F]:m6}],[0,{[F]:_6}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}],[2,{[F]:S6}],[0,{[F]:Ty}]]];s.ListCustomModelsResponse$=[3,m,d0e,0,[ae,G0],[0,()=>H1e]];s.ListEnforcedGuardrailsConfigurationRequest$=[3,m,m0e,0,[ae],[[0,{[F]:ae}]]];s.ListEnforcedGuardrailsConfigurationResponse$=[3,m,f0e,0,[Pke,ae],[()=>p1e,0],1];s.ListEvaluationJobsRequest$=[3,m,h0e,0,[$r,kr,Dr,l6,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:l6}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListEvaluationJobsResponse$=[3,m,y0e,0,[ae,iDe],[0,()=>Z1e]];s.ListFoundationModelAgreementOffersRequest$=[3,m,S0e,0,[Yr,v6],[[0,1],[0,{[F]:v6}]],1];s.ListFoundationModelAgreementOffersResponse$=[3,m,v0e,0,[Yr,gMe],[0,()=>CLe],2];s.ListFoundationModelsRequest$=[3,m,A0e,0,[g6,d6,f6,p6],[[0,{[F]:g6}],[0,{[F]:d6}],[0,{[F]:f6}],[0,{[F]:p6}]]];s.ListFoundationModelsResponse$=[3,m,R0e,0,[G0],[()=>Y1e]];s.ListGuardrailsRequest$=[3,m,T0e,0,[Pa,Oe,ae],[[0,{[F]:Pa}],[1,{[F]:Oe}],[0,{[F]:ae}]]];s.ListGuardrailsResponse$=[3,m,x0e,0,[Ake,ae],[[()=>dLe,0],0],1];s.ListImportedModelsRequest$=[3,m,I0e,0,[kr,$r,sr,Oe,ae,Ut,Bt],[[5,{[F]:kr}],[5,{[F]:$r}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListImportedModelsResponse$=[3,m,w0e,0,[ae,G0],[0,()=>yLe]];s.ListInferenceProfilesRequest$=[3,m,k0e,0,[Oe,ae,HOe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Qe}]]];s.ListInferenceProfilesResponse$=[3,m,D0e,0,[Kke,ae],[[()=>_Le,0],0]];s.ListMarketplaceModelEndpointsRequest$=[3,m,W0e,0,[Oe,ae,WDe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Td}]]];s.ListMarketplaceModelEndpointsResponse$=[3,m,J0e,0,[GDe,ae],[()=>ELe,0]];s.ListModelCopyJobsRequest$=[3,m,O0e,0,[$r,kr,Dr,A6,R6,QOe,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:A6}],[0,{[F]:R6}],[0,{[F]:mMe}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelCopyJobsResponse$=[3,m,N0e,0,[ae,kDe],[0,()=>vLe]];s.ListModelCustomizationJobsRequest$=[3,m,L0e,0,[$r,kr,Dr,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelCustomizationJobsResponse$=[3,m,z0e,0,[ae,DDe],[0,()=>ALe]];s.ListModelImportJobsRequest$=[3,m,G0e,0,[$r,kr,Dr,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelImportJobsResponse$=[3,m,F0e,0,[ae,zDe],[0,()=>RLe]];s.ListModelInvocationJobsRequest$=[3,m,j0e,0,[P6,C6,Dr,sr,Oe,ae,Ut,Bt],[[5,{[F]:P6}],[5,{[F]:C6}],[0,{[F]:Dr}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelInvocationJobsResponse$=[3,m,q0e,0,[ae,Bke],[0,[()=>PLe,0]]];s.ListPromptRoutersRequest$=[3,m,Q0e,0,[Oe,ae,Qe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Qe}]]];s.ListPromptRoutersResponse$=[3,m,ebe,0,[wMe,ae],[[()=>TLe,0],0]];s.ListProvisionedModelThroughputsRequest$=[3,m,Z0e,0,[$r,kr,Dr,Cy,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:Cy}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListProvisionedModelThroughputsResponse$=[3,m,X0e,0,[ae,xMe],[0,()=>xLe]];s.ListTagsForResourceRequest$=[3,m,nbe,0,[K0],[0],1];s.ListTagsForResourceResponse$=[3,m,obe,0,[Hn],[()=>Ct]];s.LoggingConfig$=[3,m,i0e,0,[k$e,cOe,qOe,Lke,X$e,$Ne,Fwe],[()=>s.CloudWatchConfig$,()=>s.S3Config$,2,2,2,2,2]];s.MarketplaceModelEndpoint$=[3,m,Rbe,0,[Wc,Td,Mt,ct,b0,cke,qe,uV,lke],[0,0,5,5,()=>s.EndpointConfig$,0,0,0,0],6];s.MarketplaceModelEndpointSummary$=[3,m,Pbe,0,[Wc,Td,Mt,ct,qe,uV],[0,0,5,5,0,0],4];s.MetadataAttributeSchema$=[3,m,sbe,8,[N0,Qe,Ne],[0,0,0],3];s.MetadataConfigurationForReranking$=[3,m,cbe,0,[ROe,vOe],[0,[()=>s.RerankingMetadataSelectiveModeConfiguration$,0]],1];s.ModelCopyJobSummary$=[3,m,ube,0,[Gt,qe,Ht,hV,iV,Y0,tb,yV,rb,vs,lV],[0,0,5,0,0,0,0,0,()=>Ct,0,0],6];s.ModelCustomizationJobSummary$=[3,m,lbe,0,[Gt,$y,Mr,qe,Ht,aV,En,Jc,_$e,j6,Rd],[0,0,0,0,5,()=>s.StatusDetails$,5,5,0,0,0],5];s.ModelEnforcement$=[3,m,fbe,0,[Wke,nke],[64,64],2];s.ModelImportJobSummary$=[3,m,ybe,0,[Gt,Mr,qe,Ht,En,Jc,Rq,k0],[0,0,0,5,5,5,0,0],4];s.ModelInvocationJobS3InputDataConfig$=[3,m,_be,0,[hi,yOe,sV],[0,0,0],1];s.ModelInvocationJobS3OutputDataConfig$=[3,m,Ebe,0,[hi,mOe,sV],[0,0,0],1];s.ModelInvocationJobSummary$=[3,m,Sbe,0,[Gt,Mr,Yr,Vn,dV,$0,Rs,at,qe,Or,En,Jc,ba,eb,kq,U0],[0,0,0,0,5,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,0,0,[()=>FV,0],5,5,()=>s.VpcConfig$,1,5,0],7];s.Offer$=[3,m,xbe,0,[Hq,jOe,uMe],[0,()=>s.TermDetails$,0],2];s.OrchestrationConfiguration$=[3,m,bbe,0,[zMe],[()=>s.QueryTransformationConfiguration$],1];s.OutputDataConfig$=[3,m,Ibe,0,[hi],[0],1];s.PerformanceConfiguration$=[3,m,$be,0,[TDe],[0]];s.PricingTerm$=[3,m,Vbe,0,[qMe],[()=>ILe],1];s.PromptRouterSummary$=[3,m,Gbe,0,[W0,Z0,bd,Zc,w0,qe,Qe,Ne,Mt,ct],[0,()=>s.RoutingCriteria$,0,()=>gb,()=>s.PromptRouterTargetModel$,0,0,[()=>pb,0],5,5],7];s.PromptRouterTargetModel$=[3,m,jbe,0,[Tt],[0],1];s.PromptTemplate$=[3,m,Hbe,0,[rNe],[[()=>d1e,0]]];s.ProvisionedModelSummary$=[3,m,zbe,0,[H0,q0,Tt,eq,gq,F0,rq,qe,Ht,En,A0,B6],[0,0,0,0,0,1,1,0,5,5,0,5],10];s.PutEnforcedGuardrailConfigurationRequest$=[3,m,Dbe,0,[Tke,ky],[()=>s.AccountEnforcedGuardrailInferenceInputConfiguration$,0],1];s.PutEnforcedGuardrailConfigurationResponse$=[3,m,Mbe,0,[ky,ct,vV],[0,5,0]];s.PutModelInvocationLoggingConfigurationRequest$=[3,m,Nbe,0,[Lq],[()=>s.LoggingConfig$],1];s.PutModelInvocationLoggingConfigurationResponse$=[3,m,Lbe,0,[],[]];s.PutUseCaseForModelAccessRequest$=[3,m,Jbe,0,[fq],[21],1];s.PutUseCaseForModelAccessResponse$=[3,m,Kbe,0,[],[]];s.QueryTransformationConfiguration$=[3,m,Zbe,0,[Qe],[0],1];s.RatingScaleItem$=[3,m,_Ie,0,[T0,Ia],[0,()=>s.RatingScaleItemValue$],2];s.RegisterMarketplaceModelEndpointRequest$=[3,m,mIe,0,[Y$e,Td],[[0,1],0],2];s.RegisterMarketplaceModelEndpointResponse$=[3,m,fIe,0,[jy],[()=>s.MarketplaceModelEndpoint$],1];s.RequestMetadataBaseFilters$=[3,m,cIe,0,[I0,j0],[[()=>wy,0],[()=>wy,0]]];s.RetrieveAndGenerateConfiguration$=[3,m,Xbe,0,[Qe,sDe,uke],[0,[()=>s.KnowledgeBaseRetrieveAndGenerateConfiguration$,0],[()=>s.ExternalSourcesRetrieveAndGenerateConfiguration$,0]],1];s.RetrieveConfig$=[3,m,Qbe,0,[Mq,cDe],[0,[()=>s.KnowledgeBaseRetrievalConfiguration$,0]],2];s.RFTConfig$=[3,m,iIe,0,[Rke,By],[()=>s.GraderConfig$,()=>s.RFTHyperParameters$]];s.RFTHyperParameters$=[3,m,sIe,0,[Z$e,p$e,_De,jDe,cNe,Hke,XMe,Q$e],[1,1,1,1,1,1,0,1]];s.RoutingCriteria$=[3,m,rIe,0,[nOe],[1],1];s.S3Config$=[3,m,TIe,0,[u$e,lDe],[0,0],1];s.S3DataSource$=[3,m,bIe,0,[hi],[0],1];s.S3ObjectDoc$=[3,m,UIe,0,[bNe],[0],1];s.SageMakerEndpoint$=[3,m,OIe,0,[Uke,Yke,ake,uDe,UNe],[1,0,0,0,()=>s.VpcConfig$],3];s.StartAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,vIe,0,[Ce,S0,uOe,at],[[0,1],[0,1],[()=>s.AutomatedReasoningPolicyBuildWorkflowSource$,16],[0,{[Dke]:qNe,[Xke]:1}]],3];s.StartAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,AIe,0,[Ce,ar],[0,0],2];s.StartAutomatedReasoningPolicyTestWorkflowRequest$=[3,m,PIe,0,[Ce,ar,UOe,at],[[0,1],[0,1],64,[0,4]],2];s.StartAutomatedReasoningPolicyTestWorkflowResponse$=[3,m,CIe,0,[Ce],[0],1];s.StatusDetails$=[3,m,xIe,0,[wNe,B$e,VOe],[()=>s.ValidationDetails$,()=>s.DataProcessingDetails$,()=>s.TrainingDetails$]];s.StopEvaluationJobRequest$=[3,m,wIe,0,[gi],[[()=>Id,1]],1];s.StopEvaluationJobResponse$=[3,m,$Ie,0,[],[]];s.StopModelCustomizationJobRequest$=[3,m,DIe,0,[gi],[[0,1]],1];s.StopModelCustomizationJobResponse$=[3,m,MIe,0,[],[]];s.StopModelInvocationJobRequest$=[3,m,LIe,0,[gi],[[0,1]],1];s.StopModelInvocationJobResponse$=[3,m,zIe,0,[],[]];s.SupportTerm$=[3,m,GIe,0,[rOe],[0]];s.Tag$=[3,m,jIe,0,[N0,Ia],[0,0],2];s.TagResourceRequest$=[3,m,twe,0,[K0,Hn],[0,()=>Ct],2];s.TagResourceResponse$=[3,m,rwe,0,[],[]];s.TeacherModelConfig$=[3,m,XIe,0,[YOe,qDe],[0,1],1];s.TermDetails$=[3,m,qIe,0,[gNe,ADe,wOe,NNe],[()=>s.PricingTerm$,()=>s.LegalTerm$,()=>s.SupportTerm$,()=>s.ValidityTerm$],3];s.TextInferenceConfig$=[3,m,JIe,0,[lNe,nNe,KDe,bOe],[1,1,1,64]];s.TrainingDataConfig$=[3,m,VIe,0,[hi,Gke],[0,[()=>s.InvocationLogsConfig$,0]]];s.TrainingDetails$=[3,m,HIe,0,[qe,Ht,En],[0,5,5]];s.TrainingMetrics$=[3,m,ZIe,0,[ZOe],[1]];s.UntagResourceRequest$=[3,m,Cwe,0,[K0,KOe],[0,64],2];s.UntagResourceResponse$=[3,m,Twe,0,[],[]];s.UpdateAutomatedReasoningPolicyAnnotationsRequest$=[3,m,iwe,0,[Ce,ar,y0,PDe],[[0,1],[0,1],[()=>fb,0],0],4];s.UpdateAutomatedReasoningPolicyAnnotationsResponse$=[3,m,swe,0,[Ce,ar,O6,ct],[0,0,0,5],4];s.UpdateAutomatedReasoningPolicyRequest$=[3,m,awe,0,[Ce,xd,We,Ne],[[0,1],[()=>s.AutomatedReasoningPolicyDefinition$,0],[()=>Ps,0],[()=>Xc,0]],2];s.UpdateAutomatedReasoningPolicyResponse$=[3,m,cwe,0,[Ce,We,My,ct],[0,[()=>Ps,0],0,5],4];s.UpdateAutomatedReasoningPolicyTestCaseRequest$=[3,m,lwe,0,[Ce,xa,Uy,Cd,Ny,Vy,Ad,at],[[0,1],[0,1],[()=>Zy,0],5,0,[()=>Xy,0],1,[0,4]],5];s.UpdateAutomatedReasoningPolicyTestCaseResponse$=[3,m,dwe,0,[Ce,xa],[0,0],2];s.UpdateCustomModelDeploymentRequest$=[3,m,mwe,0,[Tt,R0],[0,[0,1]],2];s.UpdateCustomModelDeploymentResponse$=[3,m,fwe,0,[Dy],[0],1];s.UpdateGuardrailRequest$=[3,m,hwe,0,[Pa,We,_0,E0,Ne,_V,q6,bV,cV,G6,M6,H6,L0],[[0,1],[()=>Yy,0],[()=>Vc,0],[()=>Vc,0],[()=>wd,0],[()=>s.GuardrailTopicPolicyConfig$,0],[()=>s.GuardrailContentPolicyConfig$,0],[()=>s.GuardrailWordPolicyConfig$,0],()=>s.GuardrailSensitiveInformationPolicyConfig$,[()=>s.GuardrailContextualGroundingPolicyConfig$,0],()=>s.GuardrailAutomatedReasoningPolicyConfig$,()=>s.GuardrailCrossRegionConfig$,0],4];s.UpdateGuardrailResponse$=[3,m,ywe,0,[Kc,zy,bo,ct],[0,0,0,5],4];s.UpdateMarketplaceModelEndpointRequest$=[3,m,Ewe,0,[Wc,b0,at],[[0,1],()=>s.EndpointConfig$,[0,4]],2];s.UpdateMarketplaceModelEndpointResponse$=[3,m,Swe,0,[jy],[()=>s.MarketplaceModelEndpoint$],1];s.UpdateProvisionedModelThroughputRequest$=[3,m,Awe,0,[V0,G$e,U$e],[[0,1],0,0],1];s.UpdateProvisionedModelThroughputResponse$=[3,m,Rwe,0,[],[]];s.ValidationDataConfig$=[3,m,wwe,0,[LNe],[()=>$Le],1];s.ValidationDetails$=[3,m,Iwe,0,[qe,Ht,En],[0,5,5]];s.Validator$=[3,m,xwe,0,[hi],[0],1];s.ValidatorMetric$=[3,m,kwe,0,[kNe],[1]];s.ValidityTerm$=[3,m,Lwe,0,[Gwe],[0]];s.VectorSearchBedrockRerankingConfiguration$=[3,m,Mwe,0,[$De,nMe,ODe],[()=>s.VectorSearchBedrockRerankingModelConfiguration$,1,[()=>s.MetadataConfigurationForReranking$,0]],1];s.VectorSearchBedrockRerankingModelConfiguration$=[3,m,Owe,0,[Tt,f0],[0,143],1];s.VectorSearchRerankingConfiguration$=[3,m,Nwe,0,[Qe,l$e],[0,[()=>s.VectorSearchBedrockRerankingConfiguration$,0]],1];s.VpcConfig$=[3,m,bwe,0,[EOe,fOe],[64,64],2];var p1e=[1,m,X_e,0,()=>s.AccountEnforcedGuardrailOutputConfiguration$],m1e=[1,m,H_e,0,[()=>s.AutomatedEvaluationCustomMetricSource$,0]],f1e=[1,m,Y_e,0,[()=>s.AutomatedReasoningCheckScenario$,0]],g1e=[1,m,eEe,0,[()=>s.AutomatedReasoningCheckFinding$,0]],T6=[1,m,oEe,0,[()=>s.AutomatedReasoningCheckInputTextReference$,0]],mb=[1,m,cEe,0,()=>s.AutomatedReasoningCheckRule$],h1e=[1,m,fEe,0,[()=>s.AutomatedReasoningCheckTranslation$,0]],y1e=[1,m,hEe,0,[()=>s.AutomatedReasoningCheckTranslationOption$,0]],vd=[1,m,SEe,0,[()=>s.AutomatedReasoningLogicStatement$,0]],_1e=[1,m,PEe,0,[()=>s.AutomatedReasoningPolicyAnnotatedChunk$,0]],E1e=[1,m,CEe,0,[()=>s.AutomatedReasoningPolicyAnnotatedContent$,0]],fb=[1,m,wEe,0,[()=>s.AutomatedReasoningPolicyAnnotation$,0]],S1e=[1,m,NEe,0,[()=>s.AutomatedReasoningPolicyAtomicStatement$,0]],v1e=[1,m,WEe,0,[()=>s.AutomatedReasoningPolicyBuildLogEntry$,0]],A1e=[1,m,XEe,0,[()=>s.AutomatedReasoningPolicyBuildResultAssetManifestEntry$,0]],R1e=[1,m,tSe,0,[()=>s.AutomatedReasoningPolicyBuildStep$,0]],P1e=[1,m,nSe,0,()=>s.AutomatedReasoningPolicyBuildStepMessage$],C1e=[1,m,iSe,0,[()=>s.AutomatedReasoningPolicyBuildWorkflowDocument$,0]],T1e=[1,m,uSe,0,()=>s.AutomatedReasoningPolicyBuildWorkflowSummary$],x1e=[1,m,ySe,0,[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],b1e=[1,m,PSe,0,[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],I1e=[1,m,xSe,0,[()=>Co,0]],jV=[1,m,wSe,0,[()=>s.AutomatedReasoningPolicyDefinitionTypeValue$,0]],w1e=[1,m,kSe,0,[()=>s.AutomatedReasoningPolicyDefinitionTypeValuePair$,0]],$1e=[1,m,LSe,0,[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],qV=[1,m,BSe,0,[()=>fi,0]],k1e=[1,m,SSe,0,[()=>s.AutomatedReasoningPolicyDisjointRuleSet$,0]],D1e=[1,m,HSe,0,[()=>s.AutomatedReasoningPolicyGeneratedTestCase$,0]],M1e=[1,m,qSe,0,[()=>s.AutomatedReasoningPolicyBuildWorkflowDocument$,0]],VV=[1,m,KSe,0,[()=>lb,0]],O1e=[1,m,ove,0,[()=>s.AutomatedReasoningPolicyReportSourceDocument$,0]],N1e=[1,m,lve,0,[()=>s.AutomatedReasoningPolicyScenario$,0]],HV=[1,m,pve,0,()=>s.AutomatedReasoningPolicyStatementReference$],L1e=[1,m,hve,0,[()=>s.AutomatedReasoningPolicySummary$,0]],z1e=[1,m,_ve,0,[()=>s.AutomatedReasoningPolicyTestCase$,0]],U1e=[1,m,Sve,0,[()=>s.AutomatedReasoningPolicyTestResult$,0]],B1e=[1,m,Pve,0,[()=>s.AutomatedReasoningPolicyTypeValueAnnotation$,0]],G1e=[1,m,Gve,0,[()=>s.BatchDeleteEvaluationJobError$,0]],F1e=[1,m,jve,0,[()=>s.BatchDeleteEvaluationJobItem$,0]],j1e=[1,m,Wve,0,()=>s.BedrockEvaluatorModel$],q1e=[1,m,wAe,0,()=>s.CustomMetricBedrockEvaluatorModel$],V1e=[1,m,UAe,0,()=>s.CustomModelDeploymentSummary$],H1e=[1,m,YAe,0,()=>s.CustomModelSummary$],WV=[1,m,lPe,0,[()=>s.EvaluationDatasetMetricConfig$,0]],W1e=[1,m,hPe,0,[()=>Id,0]],J1e=[1,m,PPe,0,[()=>NV,0]],K1e=[1,m,yPe,0,[()=>s.EvaluationModelConfig$,0]],Z1e=[1,m,MPe,0,()=>s.EvaluationSummary$],X1e=[1,m,NPe,0,[()=>s.ExternalSource$,0]],x6=[1,m,UPe,8,()=>s.FieldForReranking$],Y1e=[1,m,jPe,0,()=>s.FoundationModelSummary$],Q1e=[1,m,ACe,0,[()=>s.GuardrailContentFilter$,0]],eLe=[1,m,_Ce,0,[()=>s.GuardrailContentFilterConfig$,0]],tLe=[1,m,xCe,0,[()=>s.GuardrailContextualGroundingFilter$,0]],rLe=[1,m,TCe,0,[()=>s.GuardrailContextualGroundingFilterConfig$,0]],nLe=[1,m,QCe,0,[()=>o1e,0]],oLe=[1,m,wTe,0,[()=>s.GuardrailManagedWords$,0]],iLe=[1,m,$Te,0,[()=>s.GuardrailManagedWordsConfig$,0]],Iy=[1,m,kTe,0,[()=>i1e,0]],sLe=[1,m,LTe,0,()=>s.GuardrailPiiEntity$],aLe=[1,m,NTe,0,()=>s.GuardrailPiiEntityConfig$],cLe=[1,m,WTe,0,()=>s.GuardrailRegex$],uLe=[1,m,HTe,0,()=>s.GuardrailRegexConfig$],lLe=[1,m,YTe,0,[()=>s1e,0]],dLe=[1,m,QTe,0,[()=>s.GuardrailSummary$,0]],JV=[1,m,sxe,0,[()=>a1e,0]],pLe=[1,m,mxe,0,[()=>s.GuardrailTopic$,0]],mLe=[1,m,nxe,0,[()=>s.GuardrailTopicConfig$,0]],fLe=[1,m,Rxe,0,[()=>s.GuardrailWord$,0]],gLe=[1,m,Sxe,0,[()=>s.GuardrailWordConfig$,0]],hLe=[1,m,Txe,0,[()=>s.HumanEvaluationCustomMetric$,0]],yLe=[1,m,Mxe,0,()=>s.ImportedModelSummary$],KV=[1,m,zxe,0,()=>s.InferenceProfileModel$],_Le=[1,m,Bxe,0,[()=>s.InferenceProfileSummary$,0]],ELe=[1,m,Cbe,0,()=>s.MarketplaceModelEndpointSummary$],SLe=[1,m,abe,0,[()=>s.MetadataAttributeSchema$,0]],vLe=[1,m,dbe,0,()=>s.ModelCopyJobSummary$],ALe=[1,m,pbe,0,()=>s.ModelCustomizationJobSummary$],RLe=[1,m,vbe,0,()=>s.ModelImportJobSummary$],PLe=[1,m,Abe,0,[()=>s.ModelInvocationJobSummary$,0]],CLe=[1,m,wbe,0,()=>s.Offer$],TLe=[1,m,Fbe,0,[()=>s.PromptRouterSummary$,0]],gb=[1,m,qbe,0,()=>s.PromptRouterTargetModel$],xLe=[1,m,Ube,0,()=>s.ProvisionedModelSummary$],bLe=[1,m,eIe,0,[()=>s.RAGConfig$,0]],ILe=[1,m,tIe,0,()=>s.DimensionalPriceRate$],wLe=[1,m,yIe,0,()=>s.RatingScaleItem$],b6=[1,m,lIe,0,[()=>s.RequestMetadataBaseFilters$,0]],I6=[1,m,oIe,0,[()=>s.RetrievalFilter$,0]],Ct=[1,m,KIe,0,()=>s.Tag$],ZV=[1,m,Dwe,0,()=>s.ValidatorMetric$],$Le=[1,m,zwe,0,()=>s.Validator$],kLe=[2,m,rve,0,[0,0],[()=>s.AutomatedReasoningPolicyRuleReport$,0]],DLe=[2,m,Ove,0,[()=>fi,0],[()=>s.AutomatedReasoningPolicyVariableReport$,0]],wy=[2,m,dIe,8,0,0];s.AutomatedEvaluationCustomMetricSource$=[4,m,J_e,0,[S$e],[[()=>s.CustomMetricDefinition$,0]]];s.AutomatedReasoningCheckFinding$=[4,m,Q_e,0,[zNe,rDe,DOe,eDe,LOe,FOe,oMe],[[()=>s.AutomatedReasoningCheckValidFinding$,0],[()=>s.AutomatedReasoningCheckInvalidFinding$,0],[()=>s.AutomatedReasoningCheckSatisfiableFinding$,0],[()=>s.AutomatedReasoningCheckImpossibleFinding$,0],[()=>s.AutomatedReasoningCheckTranslationAmbiguousFinding$,0],()=>s.AutomatedReasoningCheckTooComplexFinding$,()=>s.AutomatedReasoningCheckNoTranslationsFinding$]];s.AutomatedReasoningPolicyAnnotatedContent$=[4,m,TEe,0,[bDe],[[()=>s.AutomatedReasoningPolicyAnnotatedLine$,0]]];s.AutomatedReasoningPolicyAnnotation$=[4,m,AEe,0,[N6,RV,oq,L6,PV,iq,D6,AV,nq,Hwe,_Ne,ENe,Nke],[[()=>s.AutomatedReasoningPolicyAddTypeAnnotation$,0],[()=>s.AutomatedReasoningPolicyUpdateTypeAnnotation$,0],[()=>s.AutomatedReasoningPolicyDeleteTypeAnnotation$,0],[()=>s.AutomatedReasoningPolicyAddVariableAnnotation$,0],[()=>s.AutomatedReasoningPolicyUpdateVariableAnnotation$,0],[()=>s.AutomatedReasoningPolicyDeleteVariableAnnotation$,0],[()=>s.AutomatedReasoningPolicyAddRuleAnnotation$,0],[()=>s.AutomatedReasoningPolicyUpdateRuleAnnotation$,0],()=>s.AutomatedReasoningPolicyDeleteRuleAnnotation$,[()=>s.AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation$,0],[()=>s.AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation$,0],[()=>s.AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation$,0],[()=>s.AutomatedReasoningPolicyIngestContentAnnotation$,0]]];s.AutomatedReasoningPolicyBuildResultAssets$=[4,m,JEe,0,[xd,LMe,o$e,vq,Zq,qwe,x0,yke],[[()=>s.AutomatedReasoningPolicyDefinition$,0],[()=>s.AutomatedReasoningPolicyDefinitionQualityReport$,0],[()=>s.AutomatedReasoningPolicyBuildLog$,0],[()=>s.AutomatedReasoningPolicyGeneratedTestCases$,0],[()=>s.AutomatedReasoningPolicyScenarios$,0],[()=>s.AutomatedReasoningPolicyBuildResultAssetManifest$,0],[()=>s.AutomatedReasoningPolicySourceDocument$,0],[()=>s.AutomatedReasoningPolicyFidelityReport$,0]]];s.AutomatedReasoningPolicyBuildStepContext$=[4,m,eSe,0,[OMe,eMe],[()=>s.AutomatedReasoningPolicyPlanning$,[()=>s.AutomatedReasoningPolicyMutation$,0]]];s.AutomatedReasoningPolicyDefinitionElement$=[4,m,dSe,0,[SMe,EMe,_Me],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0],[()=>s.AutomatedReasoningPolicyDefinitionType$,0],[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]]];s.AutomatedReasoningPolicyGenerateFidelityReportContent$=[4,m,jSe,0,[sq],[[()=>M1e,0]]];s.AutomatedReasoningPolicyMutation$=[4,m,YSe,0,[N6,RV,oq,L6,PV,iq,D6,AV,nq],[[()=>s.AutomatedReasoningPolicyAddTypeMutation$,0],[()=>s.AutomatedReasoningPolicyUpdateTypeMutation$,0],[()=>s.AutomatedReasoningPolicyDeleteTypeMutation$,0],[()=>s.AutomatedReasoningPolicyAddVariableMutation$,0],[()=>s.AutomatedReasoningPolicyUpdateVariableMutation$,0],[()=>s.AutomatedReasoningPolicyDeleteVariableMutation$,0],[()=>s.AutomatedReasoningPolicyAddRuleMutation$,0],[()=>s.AutomatedReasoningPolicyUpdateRuleMutation$,0],()=>s.AutomatedReasoningPolicyDeleteRuleMutation$]];s.AutomatedReasoningPolicyTypeValueAnnotation$=[4,m,Rve,0,[Qwe,CNe,V$e],[[()=>s.AutomatedReasoningPolicyAddTypeValue$,0],[()=>s.AutomatedReasoningPolicyUpdateTypeValue$,0],()=>s.AutomatedReasoningPolicyDeleteTypeValue$]];s.AutomatedReasoningPolicyWorkflowTypeContent$=[4,m,Nve,0,[sq,IMe,Cke],[[()=>C1e,0],[()=>s.AutomatedReasoningPolicyBuildWorkflowRepairContent$,0],[()=>s.AutomatedReasoningPolicyGenerateFidelityReportContent$,0]]];s.CustomizationConfig$=[4,m,sAe,0,[L$e,ZMe],[()=>s.DistillationConfig$,()=>s.RFTConfig$]];s.EndpointConfig$=[4,m,iPe,0,[AOe],[()=>s.SageMakerEndpoint$]];s.EvaluationConfig$=[4,m,sPe,0,[t$e,kke],[[()=>s.AutomatedEvaluationConfig$,0],[()=>s.HumanEvaluationConfig$,0]]];s.EvaluationDatasetLocation$=[4,m,cPe,0,[hi],[0]];s.EvaluationInferenceConfig$=[4,m,pPe,0,[Zc,VMe],[[()=>K1e,0],[()=>bLe,0]]];s.EvaluationModelConfig$=[4,m,EPe,0,[i$e,CMe],[[()=>s.EvaluationBedrockModel$,0],()=>s.EvaluationPrecomputedInferenceSource$]];s.EvaluationPrecomputedRagSourceConfig$=[4,m,IPe,0,[sOe,BMe],[()=>s.EvaluationPrecomputedRetrieveSourceConfig$,()=>s.EvaluationPrecomputedRetrieveAndGenerateSourceConfig$]];s.EvaluatorModelConfig$=[4,m,SPe,0,[z6],[()=>j1e]];s.GraderConfig$=[4,m,BCe,0,[gDe],[()=>s.LambdaGraderConfig$]];s.InferenceProfileModelSource$=[4,m,Lxe,0,[g$e],[0]];s.InvocationLogSource$=[4,m,kxe,0,[hi],[0]];s.KnowledgeBaseConfig$=[4,m,Fxe,0,[KMe,UMe],[[()=>s.RetrieveConfig$,0],[()=>s.RetrieveAndGenerateConfiguration$,0]]];s.ModelDataSource$=[4,m,mbe,0,[dOe],[()=>s.S3DataSource$]];s.ModelInvocationJobInputDataConfig$=[4,m,gbe,0,[hOe],[()=>s.ModelInvocationJobS3InputDataConfig$]];s.ModelInvocationJobOutputDataConfig$=[4,m,hbe,0,[POe],[()=>s.ModelInvocationJobS3OutputDataConfig$]];s.RAGConfig$=[4,m,Ybe,0,[aDe,$Me],[[()=>s.KnowledgeBaseConfig$,0],()=>s.EvaluationPrecomputedRagSourceConfig$]];s.RatingScaleItemValue$=[4,m,EIe,0,[$Oe,Ske],[0,1]];s.RequestMetadataFilters$=[4,m,uIe,0,[I0,j0,w6,qq],[[()=>wy,0],[()=>wy,0],[()=>b6,0],[()=>b6,0]]];s.RerankingMetadataSelectiveModeConfiguration$=[4,m,gIe,0,[Eke,_ke],[[()=>x6,0],[()=>x6,0]]];s.RetrievalFilter$=[4,m,nIe,8,[I0,j0,wke,$ke,RDe,SDe,tDe,tMe,kOe,mDe,lOe,w6,qq],[()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,[()=>I6,0],[()=>I6,0]]];s.BatchDeleteEvaluationJob$=[9,m,Uve,{[W]:["POST","/evaluation-jobs/batch-delete",202]},()=>s.BatchDeleteEvaluationJobRequest$,()=>s.BatchDeleteEvaluationJobResponse$];s.CancelAutomatedReasoningPolicyBuildWorkflow$=[9,m,Kve,{[W]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/cancel",202]},()=>s.CancelAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.CancelAutomatedReasoningPolicyBuildWorkflowResponse$];s.CreateAutomatedReasoningPolicy$=[9,m,Jve,{[W]:["POST","/automated-reasoning-policies",200]},()=>s.CreateAutomatedReasoningPolicyRequest$,()=>s.CreateAutomatedReasoningPolicyResponse$];s.CreateAutomatedReasoningPolicyTestCase$=[9,m,eAe,{[W]:["POST","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>s.CreateAutomatedReasoningPolicyTestCaseRequest$,()=>s.CreateAutomatedReasoningPolicyTestCaseResponse$];s.CreateAutomatedReasoningPolicyVersion$=[9,m,nAe,{[W]:["POST","/automated-reasoning-policies/{policyArn}/versions",200]},()=>s.CreateAutomatedReasoningPolicyVersionRequest$,()=>s.CreateAutomatedReasoningPolicyVersionResponse$];s.CreateCustomModel$=[9,m,aAe,{[W]:["POST","/custom-models/create-custom-model",202]},()=>s.CreateCustomModelRequest$,()=>s.CreateCustomModelResponse$];s.CreateCustomModelDeployment$=[9,m,cAe,{[W]:["POST","/model-customization/custom-model-deployments",202]},()=>s.CreateCustomModelDeploymentRequest$,()=>s.CreateCustomModelDeploymentResponse$];s.CreateEvaluationJob$=[9,m,fAe,{[W]:["POST","/evaluation-jobs",202]},()=>s.CreateEvaluationJobRequest$,()=>s.CreateEvaluationJobResponse$];s.CreateFoundationModelAgreement$=[9,m,yAe,{[W]:["POST","/create-foundation-model-agreement",202]},()=>s.CreateFoundationModelAgreementRequest$,()=>s.CreateFoundationModelAgreementResponse$];s.CreateGuardrail$=[9,m,SAe,{[W]:["POST","/guardrails",202]},()=>s.CreateGuardrailRequest$,()=>s.CreateGuardrailResponse$];s.CreateGuardrailVersion$=[9,m,RAe,{[W]:["POST","/guardrails/{guardrailIdentifier}",202]},()=>s.CreateGuardrailVersionRequest$,()=>s.CreateGuardrailVersionResponse$];s.CreateInferenceProfile$=[9,m,TAe,{[W]:["POST","/inference-profiles",201]},()=>s.CreateInferenceProfileRequest$,()=>s.CreateInferenceProfileResponse$];s.CreateMarketplaceModelEndpoint$=[9,m,JAe,{[W]:["POST","/marketplace-model/endpoints",200]},()=>s.CreateMarketplaceModelEndpointRequest$,()=>s.CreateMarketplaceModelEndpointResponse$];s.CreateModelCopyJob$=[9,m,$Ae,{[W]:["POST","/model-copy-jobs",201]},()=>s.CreateModelCopyJobRequest$,()=>s.CreateModelCopyJobResponse$];s.CreateModelCustomizationJob$=[9,m,NAe,{[W]:["POST","/model-customization-jobs",201]},()=>s.CreateModelCustomizationJobRequest$,()=>s.CreateModelCustomizationJobResponse$];s.CreateModelImportJob$=[9,m,FAe,{[W]:["POST","/model-import-jobs",201]},()=>s.CreateModelImportJobRequest$,()=>s.CreateModelImportJobResponse$];s.CreateModelInvocationJob$=[9,m,WAe,{[W]:["POST","/model-invocation-job",200]},()=>s.CreateModelInvocationJobRequest$,()=>s.CreateModelInvocationJobResponse$];s.CreatePromptRouter$=[9,m,nRe,{[W]:["POST","/prompt-routers",200]},()=>s.CreatePromptRouterRequest$,()=>s.CreatePromptRouterResponse$];s.CreateProvisionedModelThroughput$=[9,m,eRe,{[W]:["POST","/provisioned-model-throughput",201]},()=>s.CreateProvisionedModelThroughputRequest$,()=>s.CreateProvisionedModelThroughputResponse$];s.DeleteAutomatedReasoningPolicy$=[9,m,aRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}",202]},()=>s.DeleteAutomatedReasoningPolicyRequest$,()=>s.DeleteAutomatedReasoningPolicyResponse$];s.DeleteAutomatedReasoningPolicyBuildWorkflow$=[9,m,cRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}",202]},()=>s.DeleteAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.DeleteAutomatedReasoningPolicyBuildWorkflowResponse$];s.DeleteAutomatedReasoningPolicyTestCase$=[9,m,mRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",202]},()=>s.DeleteAutomatedReasoningPolicyTestCaseRequest$,()=>s.DeleteAutomatedReasoningPolicyTestCaseResponse$];s.DeleteCustomModel$=[9,m,yRe,{[W]:["DELETE","/custom-models/{modelIdentifier}",200]},()=>s.DeleteCustomModelRequest$,()=>s.DeleteCustomModelResponse$];s.DeleteCustomModelDeployment$=[9,m,_Re,{[W]:["DELETE","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>s.DeleteCustomModelDeploymentRequest$,()=>s.DeleteCustomModelDeploymentResponse$];s.DeleteEnforcedGuardrailConfiguration$=[9,m,RRe,{[W]:["DELETE","/enforcedGuardrailsConfiguration/{configId}",200]},()=>s.DeleteEnforcedGuardrailConfigurationRequest$,()=>s.DeleteEnforcedGuardrailConfigurationResponse$];s.DeleteFoundationModelAgreement$=[9,m,TRe,{[W]:["POST","/delete-foundation-model-agreement",202]},()=>s.DeleteFoundationModelAgreementRequest$,()=>s.DeleteFoundationModelAgreementResponse$];s.DeleteGuardrail$=[9,m,IRe,{[W]:["DELETE","/guardrails/{guardrailIdentifier}",202]},()=>s.DeleteGuardrailRequest$,()=>s.DeleteGuardrailResponse$];s.DeleteImportedModel$=[9,m,kRe,{[W]:["DELETE","/imported-models/{modelIdentifier}",200]},()=>s.DeleteImportedModelRequest$,()=>s.DeleteImportedModelResponse$];s.DeleteInferenceProfile$=[9,m,ORe,{[W]:["DELETE","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>s.DeleteInferenceProfileRequest$,()=>s.DeleteInferenceProfileResponse$];s.DeleteMarketplaceModelEndpoint$=[9,m,GRe,{[W]:["DELETE","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.DeleteMarketplaceModelEndpointRequest$,()=>s.DeleteMarketplaceModelEndpointResponse$];s.DeleteModelInvocationLoggingConfiguration$=[9,m,zRe,{[W]:["DELETE","/logging/modelinvocations",200]},()=>s.DeleteModelInvocationLoggingConfigurationRequest$,()=>s.DeleteModelInvocationLoggingConfigurationResponse$];s.DeletePromptRouter$=[9,m,ePe,{[W]:["DELETE","/prompt-routers/{promptRouterArn}",200]},()=>s.DeletePromptRouterRequest$,()=>s.DeletePromptRouterResponse$];s.DeleteProvisionedModelThroughput$=[9,m,JRe,{[W]:["DELETE","/provisioned-model-throughput/{provisionedModelId}",200]},()=>s.DeleteProvisionedModelThroughputRequest$,()=>s.DeleteProvisionedModelThroughputResponse$];s.DeregisterMarketplaceModelEndpoint$=[9,m,HRe,{[W]:["DELETE","/marketplace-model/endpoints/{endpointArn}/registration",200]},()=>s.DeregisterMarketplaceModelEndpointRequest$,()=>s.DeregisterMarketplaceModelEndpointResponse$];s.ExportAutomatedReasoningPolicyVersion$=[9,m,tPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/export",200]},()=>s.ExportAutomatedReasoningPolicyVersionRequest$,()=>s.ExportAutomatedReasoningPolicyVersionResponse$];s.GetAutomatedReasoningPolicy$=[9,m,pCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}",200]},()=>s.GetAutomatedReasoningPolicyRequest$,()=>s.GetAutomatedReasoningPolicyResponse$];s.GetAutomatedReasoningPolicyAnnotations$=[9,m,VPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations",200]},()=>s.GetAutomatedReasoningPolicyAnnotationsRequest$,()=>s.GetAutomatedReasoningPolicyAnnotationsResponse$];s.GetAutomatedReasoningPolicyBuildWorkflow$=[9,m,JPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}",200]},()=>s.GetAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.GetAutomatedReasoningPolicyBuildWorkflowResponse$];s.GetAutomatedReasoningPolicyBuildWorkflowResultAssets$=[9,m,ZPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/result-assets",200]},()=>s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest$,()=>s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse$];s.GetAutomatedReasoningPolicyNextScenario$=[9,m,tCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/scenarios",200]},()=>s.GetAutomatedReasoningPolicyNextScenarioRequest$,()=>s.GetAutomatedReasoningPolicyNextScenarioResponse$];s.GetAutomatedReasoningPolicyTestCase$=[9,m,sCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>s.GetAutomatedReasoningPolicyTestCaseRequest$,()=>s.GetAutomatedReasoningPolicyTestCaseResponse$];s.GetAutomatedReasoningPolicyTestResult$=[9,m,uCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-cases/{testCaseId}/test-results",200]},()=>s.GetAutomatedReasoningPolicyTestResultRequest$,()=>s.GetAutomatedReasoningPolicyTestResultResponse$];s.GetCustomModel$=[9,m,wCe,{[W]:["GET","/custom-models/{modelIdentifier}",200]},()=>s.GetCustomModelRequest$,()=>s.GetCustomModelResponse$];s.GetCustomModelDeployment$=[9,m,$Ce,{[W]:["GET","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>s.GetCustomModelDeploymentRequest$,()=>s.GetCustomModelDeploymentResponse$];s.GetEvaluationJob$=[9,m,jCe,{[W]:["GET","/evaluation-jobs/{jobIdentifier}",200]},()=>s.GetEvaluationJobRequest$,()=>s.GetEvaluationJobResponse$];s.GetFoundationModel$=[9,m,HCe,{[W]:["GET","/foundation-models/{modelIdentifier}",200]},()=>s.GetFoundationModelRequest$,()=>s.GetFoundationModelResponse$];s.GetFoundationModelAvailability$=[9,m,WCe,{[W]:["GET","/foundation-model-availability/{modelId}",200]},()=>s.GetFoundationModelAvailabilityRequest$,()=>s.GetFoundationModelAvailabilityResponse$];s.GetGuardrail$=[9,m,eTe,{[W]:["GET","/guardrails/{guardrailIdentifier}",200]},()=>s.GetGuardrailRequest$,()=>s.GetGuardrailResponse$];s.GetImportedModel$=[9,m,nTe,{[W]:["GET","/imported-models/{modelIdentifier}",200]},()=>s.GetImportedModelRequest$,()=>s.GetImportedModelResponse$];s.GetInferenceProfile$=[9,m,sTe,{[W]:["GET","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>s.GetInferenceProfileRequest$,()=>s.GetInferenceProfileResponse$];s.GetMarketplaceModelEndpoint$=[9,m,CTe,{[W]:["GET","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.GetMarketplaceModelEndpointRequest$,()=>s.GetMarketplaceModelEndpointResponse$];s.GetModelCopyJob$=[9,m,lTe,{[W]:["GET","/model-copy-jobs/{jobArn}",200]},()=>s.GetModelCopyJobRequest$,()=>s.GetModelCopyJobResponse$];s.GetModelCustomizationJob$=[9,m,gTe,{[W]:["GET","/model-customization-jobs/{jobIdentifier}",200]},()=>s.GetModelCustomizationJobRequest$,()=>s.GetModelCustomizationJobResponse$];s.GetModelImportJob$=[9,m,hTe,{[W]:["GET","/model-import-jobs/{jobIdentifier}",200]},()=>s.GetModelImportJobRequest$,()=>s.GetModelImportJobResponse$];s.GetModelInvocationJob$=[9,m,vTe,{[W]:["GET","/model-invocation-job/{jobIdentifier}",200]},()=>s.GetModelInvocationJobRequest$,()=>s.GetModelInvocationJobResponse$];s.GetModelInvocationLoggingConfiguration$=[9,m,ATe,{[W]:["GET","/logging/modelinvocations",200]},()=>s.GetModelInvocationLoggingConfigurationRequest$,()=>s.GetModelInvocationLoggingConfigurationResponse$];s.GetPromptRouter$=[9,m,GTe,{[W]:["GET","/prompt-routers/{promptRouterArn}",200]},()=>s.GetPromptRouterRequest$,()=>s.GetPromptRouterResponse$];s.GetProvisionedModelThroughput$=[9,m,zTe,{[W]:["GET","/provisioned-model-throughput/{provisionedModelId}",200]},()=>s.GetProvisionedModelThroughputRequest$,()=>s.GetProvisionedModelThroughputResponse$];s.GetUseCaseForModelAccess$=[9,m,fxe,{[W]:["GET","/use-case-for-model-access",200]},()=>s.GetUseCaseForModelAccessRequest$,()=>s.GetUseCaseForModelAccessResponse$];s.ListAutomatedReasoningPolicies$=[9,m,Wxe,{[W]:["GET","/automated-reasoning-policies",200]},()=>s.ListAutomatedReasoningPoliciesRequest$,()=>s.ListAutomatedReasoningPoliciesResponse$];s.ListAutomatedReasoningPolicyBuildWorkflows$=[9,m,Jxe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows",200]},()=>s.ListAutomatedReasoningPolicyBuildWorkflowsRequest$,()=>s.ListAutomatedReasoningPolicyBuildWorkflowsResponse$];s.ListAutomatedReasoningPolicyTestCases$=[9,m,Qxe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>s.ListAutomatedReasoningPolicyTestCasesRequest$,()=>s.ListAutomatedReasoningPolicyTestCasesResponse$];s.ListAutomatedReasoningPolicyTestResults$=[9,m,r0e,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-results",200]},()=>s.ListAutomatedReasoningPolicyTestResultsRequest$,()=>s.ListAutomatedReasoningPolicyTestResultsResponse$];s.ListCustomModelDeployments$=[9,m,a0e,{[W]:["GET","/model-customization/custom-model-deployments",200]},()=>s.ListCustomModelDeploymentsRequest$,()=>s.ListCustomModelDeploymentsResponse$];s.ListCustomModels$=[9,m,s0e,{[W]:["GET","/custom-models",200]},()=>s.ListCustomModelsRequest$,()=>s.ListCustomModelsResponse$];s.ListEnforcedGuardrailsConfiguration$=[9,m,p0e,{[W]:["GET","/enforcedGuardrailsConfiguration",200]},()=>s.ListEnforcedGuardrailsConfigurationRequest$,()=>s.ListEnforcedGuardrailsConfigurationResponse$];s.ListEvaluationJobs$=[9,m,g0e,{[W]:["GET","/evaluation-jobs",200]},()=>s.ListEvaluationJobsRequest$,()=>s.ListEvaluationJobsResponse$];s.ListFoundationModelAgreementOffers$=[9,m,E0e,{[W]:["GET","/list-foundation-model-agreement-offers/{modelId}",200]},()=>s.ListFoundationModelAgreementOffersRequest$,()=>s.ListFoundationModelAgreementOffersResponse$];s.ListFoundationModels$=[9,m,_0e,{[W]:["GET","/foundation-models",200]},()=>s.ListFoundationModelsRequest$,()=>s.ListFoundationModelsResponse$];s.ListGuardrails$=[9,m,P0e,{[W]:["GET","/guardrails",200]},()=>s.ListGuardrailsRequest$,()=>s.ListGuardrailsResponse$];s.ListImportedModels$=[9,m,b0e,{[W]:["GET","/imported-models",200]},()=>s.ListImportedModelsRequest$,()=>s.ListImportedModelsResponse$];s.ListInferenceProfiles$=[9,m,$0e,{[W]:["GET","/inference-profiles",200]},()=>s.ListInferenceProfilesRequest$,()=>s.ListInferenceProfilesResponse$];s.ListMarketplaceModelEndpoints$=[9,m,H0e,{[W]:["GET","/marketplace-model/endpoints",200]},()=>s.ListMarketplaceModelEndpointsRequest$,()=>s.ListMarketplaceModelEndpointsResponse$];s.ListModelCopyJobs$=[9,m,M0e,{[W]:["GET","/model-copy-jobs",200]},()=>s.ListModelCopyJobsRequest$,()=>s.ListModelCopyJobsResponse$];s.ListModelCustomizationJobs$=[9,m,U0e,{[W]:["GET","/model-customization-jobs",200]},()=>s.ListModelCustomizationJobsRequest$,()=>s.ListModelCustomizationJobsResponse$];s.ListModelImportJobs$=[9,m,B0e,{[W]:["GET","/model-import-jobs",200]},()=>s.ListModelImportJobsRequest$,()=>s.ListModelImportJobsResponse$];s.ListModelInvocationJobs$=[9,m,V0e,{[W]:["GET","/model-invocation-jobs",200]},()=>s.ListModelInvocationJobsRequest$,()=>s.ListModelInvocationJobsResponse$];s.ListPromptRouters$=[9,m,Y0e,{[W]:["GET","/prompt-routers",200]},()=>s.ListPromptRoutersRequest$,()=>s.ListPromptRoutersResponse$];s.ListProvisionedModelThroughputs$=[9,m,K0e,{[W]:["GET","/provisioned-model-throughputs",200]},()=>s.ListProvisionedModelThroughputsRequest$,()=>s.ListProvisionedModelThroughputsResponse$];s.ListTagsForResource$=[9,m,rbe,{[W]:["POST","/listTagsForResource",200]},()=>s.ListTagsForResourceRequest$,()=>s.ListTagsForResourceResponse$];s.PutEnforcedGuardrailConfiguration$=[9,m,kbe,{[W]:["PUT","/enforcedGuardrailsConfiguration",200]},()=>s.PutEnforcedGuardrailConfigurationRequest$,()=>s.PutEnforcedGuardrailConfigurationResponse$];s.PutModelInvocationLoggingConfiguration$=[9,m,Obe,{[W]:["PUT","/logging/modelinvocations",200]},()=>s.PutModelInvocationLoggingConfigurationRequest$,()=>s.PutModelInvocationLoggingConfigurationResponse$];s.PutUseCaseForModelAccess$=[9,m,Wbe,{[W]:["POST","/use-case-for-model-access",201]},()=>s.PutUseCaseForModelAccessRequest$,()=>s.PutUseCaseForModelAccessResponse$];s.RegisterMarketplaceModelEndpoint$=[9,m,pIe,{[W]:["POST","/marketplace-model/endpoints/{endpointIdentifier}/registration",200]},()=>s.RegisterMarketplaceModelEndpointRequest$,()=>s.RegisterMarketplaceModelEndpointResponse$];s.StartAutomatedReasoningPolicyBuildWorkflow$=[9,m,SIe,{[W]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowType}/start",200]},()=>s.StartAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.StartAutomatedReasoningPolicyBuildWorkflowResponse$];s.StartAutomatedReasoningPolicyTestWorkflow$=[9,m,RIe,{[W]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-workflows",200]},()=>s.StartAutomatedReasoningPolicyTestWorkflowRequest$,()=>s.StartAutomatedReasoningPolicyTestWorkflowResponse$];s.StopEvaluationJob$=[9,m,IIe,{[W]:["POST","/evaluation-job/{jobIdentifier}/stop",200]},()=>s.StopEvaluationJobRequest$,()=>s.StopEvaluationJobResponse$];s.StopModelCustomizationJob$=[9,m,kIe,{[W]:["POST","/model-customization-jobs/{jobIdentifier}/stop",200]},()=>s.StopModelCustomizationJobRequest$,()=>s.StopModelCustomizationJobResponse$];s.StopModelInvocationJob$=[9,m,NIe,{[W]:["POST","/model-invocation-job/{jobIdentifier}/stop",200]},()=>s.StopModelInvocationJobRequest$,()=>s.StopModelInvocationJobResponse$];s.TagResource$=[9,m,ewe,{[W]:["POST","/tagResource",200]},()=>s.TagResourceRequest$,()=>s.TagResourceResponse$];s.UntagResource$=[9,m,Pwe,{[W]:["POST","/untagResource",200]},()=>s.UntagResourceRequest$,()=>s.UntagResourceResponse$];s.UpdateAutomatedReasoningPolicy$=[9,m,nwe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}",200]},()=>s.UpdateAutomatedReasoningPolicyRequest$,()=>s.UpdateAutomatedReasoningPolicyResponse$];s.UpdateAutomatedReasoningPolicyAnnotations$=[9,m,owe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations",200]},()=>s.UpdateAutomatedReasoningPolicyAnnotationsRequest$,()=>s.UpdateAutomatedReasoningPolicyAnnotationsResponse$];s.UpdateAutomatedReasoningPolicyTestCase$=[9,m,uwe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>s.UpdateAutomatedReasoningPolicyTestCaseRequest$,()=>s.UpdateAutomatedReasoningPolicyTestCaseResponse$];s.UpdateCustomModelDeployment$=[9,m,pwe,{[W]:["PATCH","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",202]},()=>s.UpdateCustomModelDeploymentRequest$,()=>s.UpdateCustomModelDeploymentResponse$];s.UpdateGuardrail$=[9,m,gwe,{[W]:["PUT","/guardrails/{guardrailIdentifier}",202]},()=>s.UpdateGuardrailRequest$,()=>s.UpdateGuardrailResponse$];s.UpdateMarketplaceModelEndpoint$=[9,m,_we,{[W]:["PATCH","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.UpdateMarketplaceModelEndpointRequest$,()=>s.UpdateMarketplaceModelEndpointResponse$];s.UpdateProvisionedModelThroughput$=[9,m,vwe,{[W]:["PATCH","/provisioned-model-throughput/{provisionedModelId}",200]},()=>s.UpdateProvisionedModelThroughputRequest$,()=>s.UpdateProvisionedModelThroughputResponse$]});var QV=N(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.getRuntimeConfig=void 0;var MLe=(Aa(),Q(va)),OLe=(mo(),Q(ll)),NLe=(Xe(),Q(fr)),LLe=ue(),zLe=Gr(),XV=gt(),YV=ft(),ULe=Jx(),BLe=c6(),GLe=hb(),FLe=i(e=>({apiVersion:"2023-04-20",base64Decoder:e?.base64Decoder??XV.fromBase64,base64Encoder:e?.base64Encoder??XV.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??BLe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ULe.defaultBedrockHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new MLe.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#httpBearerAuth"),"identityProvider"),signer:new NLe.HttpBearerAuthSigner}],logger:e?.logger??new LLe.NoOpLogger,protocol:e?.protocol??OLe.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.bedrock",errorTypeRegistries:GLe.errorTypeRegistries,version:"2023-04-20",serviceTarget:"AmazonBedrockControlPlaneService"},serviceId:e?.serviceId??"Bedrock",urlParser:e?.urlParser??zLe.parseUrl,utf8Decoder:e?.utf8Decoder??YV.fromUtf8,utf8Encoder:e?.utf8Encoder??YV.toUtf8}),"getRuntimeConfig");Qy.getRuntimeConfig=FLe});var iH=N(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.getRuntimeConfig=void 0;var jLe=(F3(),Q(G3)),qLe=jLe.__importDefault(j3()),yb=(Aa(),Q(va)),VLe=Mh(),eH=W3(),tH=Hi(),e_=Nt(),HLe=(Xe(),Q(fr)),WLe=Wi(),rH=hr(),wa=cn(),nH=to(),oH=ue(),JLe=Ji(),KLe=Ki(),ZLe=Mn(),XLe=QV(),YLe=i(e=>{(0,oH.emitWarningIfUnsupportedVersion)(process.version);let t=(0,KLe.resolveDefaultsModeConfig)(e),r=i(()=>t().then(oH.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,XLe.getRuntimeConfig)(e);(0,yb.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger,signingName:"bedrock"};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,wa.loadConfig)(yb.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??JLe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??VLe.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,tH.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:qLe.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new yb.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#httpBearerAuth")||(async c=>{try{return await(0,eH.fromEnvSigningName)({signingName:"bedrock"})()}catch{return await(0,eH.nodeProvider)(c)(c)}}),"identityProvider"),signer:new HLe.HttpBearerAuthSigner}],maxAttempts:e?.maxAttempts??(0,wa.loadConfig)(rH.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,wa.loadConfig)(e_.NODE_REGION_CONFIG_OPTIONS,{...e_.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:nH.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,wa.loadConfig)({...rH.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||ZLe.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??WLe.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??nH.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,wa.loadConfig)(e_.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,wa.loadConfig)(e_.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,wa.loadConfig)(tH.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");t_.getRuntimeConfig=YLe});var Yc=N(k=>{"use strict";var sH=xi(),QLe=bi(),eze=Ii(),aH=ti(),tze=Nt(),_t=(Xe(),Q(fr)),rze=(ke(),Q(Wo)),nze=zi(),H=gr(),cH=hr(),q=ue(),uH=Jx(),oze=iH(),lH=go(),dH=Me(),V=hb(),r_=d0(),ize=Py(),sze=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}),"resolveClientEndpointParameters"),J={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},aze=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials,o=e.token;return{setHttpAuthScheme(a){let c=t.findIndex(u=>u.schemeId===a.schemeId);c===-1?t.push(a):t.splice(c,1,a)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(a){r=a},httpAuthSchemeProvider(){return r},setCredentials(a){n=a},credentials(){return n},setToken(a){o=a},token(){return o}}},"getHttpAuthExtensionConfiguration"),cze=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials(),token:e.token()}),"resolveHttpAuthRuntimeConfig"),uze=i((e,t)=>{let r=Object.assign(lH.getAwsRegionExtensionConfiguration(e),q.getDefaultExtensionConfiguration(e),dH.getHttpHandlerExtensionConfiguration(e),aze(e));return t.forEach(n=>n.configure(r)),Object.assign(e,lH.resolveAwsRegionExtensionConfiguration(r),q.resolveDefaultRuntimeConfig(r),dH.resolveHttpHandlerRuntimeConfig(r),cze(r))},"resolveRuntimeExtensions"),mt=class extends q.Client{static{i(this,"BedrockClient")}config;constructor(...[t]){let r=oze.getRuntimeConfig(t||{});super(r),this.initConfig=r;let n=sze(r),o=aH.resolveUserAgentConfig(n),a=cH.resolveRetryConfig(o),c=tze.resolveRegionConfig(a),u=sH.resolveHostHeaderConfig(c),l=H.resolveEndpointConfig(u),d=uH.resolveHttpAuthSchemeConfig(l),_=uze(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(rze.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(aH.getUserAgentPlugin(this.config)),this.middlewareStack.use(cH.getRetryPlugin(this.config)),this.middlewareStack.use(nze.getContentLengthPlugin(this.config)),this.middlewareStack.use(sH.getHostHeaderPlugin(this.config)),this.middlewareStack.use(QLe.getLoggerPlugin(this.config)),this.middlewareStack.use(eze.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_t.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:uH.defaultBedrockHttpAuthSchemeParametersProvider,identityProviderConfigProvider:i(async y=>new _t.DefaultIdentityProviderConfig({"aws.auth#sigv4":y.credentials,"smithy.api#httpBearerAuth":y.token}),"identityProviderConfigProvider")})),this.middlewareStack.use(_t.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},n_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","BatchDeleteEvaluationJob",{}).n("BedrockClient","BatchDeleteEvaluationJobCommand").sc(V.BatchDeleteEvaluationJob$).build(){static{i(this,"BatchDeleteEvaluationJobCommand")}},o_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CancelAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","CancelAutomatedReasoningPolicyBuildWorkflowCommand").sc(V.CancelAutomatedReasoningPolicyBuildWorkflow$).build(){static{i(this,"CancelAutomatedReasoningPolicyBuildWorkflowCommand")}},i_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicy",{}).n("BedrockClient","CreateAutomatedReasoningPolicyCommand").sc(V.CreateAutomatedReasoningPolicy$).build(){static{i(this,"CreateAutomatedReasoningPolicyCommand")}},s_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","CreateAutomatedReasoningPolicyTestCaseCommand").sc(V.CreateAutomatedReasoningPolicyTestCase$).build(){static{i(this,"CreateAutomatedReasoningPolicyTestCaseCommand")}},a_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicyVersion",{}).n("BedrockClient","CreateAutomatedReasoningPolicyVersionCommand").sc(V.CreateAutomatedReasoningPolicyVersion$).build(){static{i(this,"CreateAutomatedReasoningPolicyVersionCommand")}},c_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateCustomModel",{}).n("BedrockClient","CreateCustomModelCommand").sc(V.CreateCustomModel$).build(){static{i(this,"CreateCustomModelCommand")}},u_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateCustomModelDeployment",{}).n("BedrockClient","CreateCustomModelDeploymentCommand").sc(V.CreateCustomModelDeployment$).build(){static{i(this,"CreateCustomModelDeploymentCommand")}},l_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateEvaluationJob",{}).n("BedrockClient","CreateEvaluationJobCommand").sc(V.CreateEvaluationJob$).build(){static{i(this,"CreateEvaluationJobCommand")}},d_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateFoundationModelAgreement",{}).n("BedrockClient","CreateFoundationModelAgreementCommand").sc(V.CreateFoundationModelAgreement$).build(){static{i(this,"CreateFoundationModelAgreementCommand")}},p_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateGuardrail",{}).n("BedrockClient","CreateGuardrailCommand").sc(V.CreateGuardrail$).build(){static{i(this,"CreateGuardrailCommand")}},m_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateGuardrailVersion",{}).n("BedrockClient","CreateGuardrailVersionCommand").sc(V.CreateGuardrailVersion$).build(){static{i(this,"CreateGuardrailVersionCommand")}},f_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateInferenceProfile",{}).n("BedrockClient","CreateInferenceProfileCommand").sc(V.CreateInferenceProfile$).build(){static{i(this,"CreateInferenceProfileCommand")}},g_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateMarketplaceModelEndpoint",{}).n("BedrockClient","CreateMarketplaceModelEndpointCommand").sc(V.CreateMarketplaceModelEndpoint$).build(){static{i(this,"CreateMarketplaceModelEndpointCommand")}},h_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCopyJob",{}).n("BedrockClient","CreateModelCopyJobCommand").sc(V.CreateModelCopyJob$).build(){static{i(this,"CreateModelCopyJobCommand")}},y_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCustomizationJob",{}).n("BedrockClient","CreateModelCustomizationJobCommand").sc(V.CreateModelCustomizationJob$).build(){static{i(this,"CreateModelCustomizationJobCommand")}},__=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelImportJob",{}).n("BedrockClient","CreateModelImportJobCommand").sc(V.CreateModelImportJob$).build(){static{i(this,"CreateModelImportJobCommand")}},E_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelInvocationJob",{}).n("BedrockClient","CreateModelInvocationJobCommand").sc(V.CreateModelInvocationJob$).build(){static{i(this,"CreateModelInvocationJobCommand")}},S_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreatePromptRouter",{}).n("BedrockClient","CreatePromptRouterCommand").sc(V.CreatePromptRouter$).build(){static{i(this,"CreatePromptRouterCommand")}},v_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateProvisionedModelThroughput",{}).n("BedrockClient","CreateProvisionedModelThroughputCommand").sc(V.CreateProvisionedModelThroughput$).build(){static{i(this,"CreateProvisionedModelThroughputCommand")}},A_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyBuildWorkflowCommand").sc(V.DeleteAutomatedReasoningPolicyBuildWorkflow$).build(){static{i(this,"DeleteAutomatedReasoningPolicyBuildWorkflowCommand")}},R_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicy",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyCommand").sc(V.DeleteAutomatedReasoningPolicy$).build(){static{i(this,"DeleteAutomatedReasoningPolicyCommand")}},P_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyTestCaseCommand").sc(V.DeleteAutomatedReasoningPolicyTestCase$).build(){static{i(this,"DeleteAutomatedReasoningPolicyTestCaseCommand")}},C_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteCustomModel",{}).n("BedrockClient","DeleteCustomModelCommand").sc(V.DeleteCustomModel$).build(){static{i(this,"DeleteCustomModelCommand")}},T_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteCustomModelDeployment",{}).n("BedrockClient","DeleteCustomModelDeploymentCommand").sc(V.DeleteCustomModelDeployment$).build(){static{i(this,"DeleteCustomModelDeploymentCommand")}},x_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteEnforcedGuardrailConfiguration",{}).n("BedrockClient","DeleteEnforcedGuardrailConfigurationCommand").sc(V.DeleteEnforcedGuardrailConfiguration$).build(){static{i(this,"DeleteEnforcedGuardrailConfigurationCommand")}},b_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteFoundationModelAgreement",{}).n("BedrockClient","DeleteFoundationModelAgreementCommand").sc(V.DeleteFoundationModelAgreement$).build(){static{i(this,"DeleteFoundationModelAgreementCommand")}},I_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteGuardrail",{}).n("BedrockClient","DeleteGuardrailCommand").sc(V.DeleteGuardrail$).build(){static{i(this,"DeleteGuardrailCommand")}},w_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteImportedModel",{}).n("BedrockClient","DeleteImportedModelCommand").sc(V.DeleteImportedModel$).build(){static{i(this,"DeleteImportedModelCommand")}},$_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteInferenceProfile",{}).n("BedrockClient","DeleteInferenceProfileCommand").sc(V.DeleteInferenceProfile$).build(){static{i(this,"DeleteInferenceProfileCommand")}},k_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteMarketplaceModelEndpoint",{}).n("BedrockClient","DeleteMarketplaceModelEndpointCommand").sc(V.DeleteMarketplaceModelEndpoint$).build(){static{i(this,"DeleteMarketplaceModelEndpointCommand")}},D_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteModelInvocationLoggingConfiguration",{}).n("BedrockClient","DeleteModelInvocationLoggingConfigurationCommand").sc(V.DeleteModelInvocationLoggingConfiguration$).build(){static{i(this,"DeleteModelInvocationLoggingConfigurationCommand")}},M_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeletePromptRouter",{}).n("BedrockClient","DeletePromptRouterCommand").sc(V.DeletePromptRouter$).build(){static{i(this,"DeletePromptRouterCommand")}},O_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteProvisionedModelThroughput",{}).n("BedrockClient","DeleteProvisionedModelThroughputCommand").sc(V.DeleteProvisionedModelThroughput$).build(){static{i(this,"DeleteProvisionedModelThroughputCommand")}},N_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeregisterMarketplaceModelEndpoint",{}).n("BedrockClient","DeregisterMarketplaceModelEndpointCommand").sc(V.DeregisterMarketplaceModelEndpoint$).build(){static{i(this,"DeregisterMarketplaceModelEndpointCommand")}},L_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ExportAutomatedReasoningPolicyVersion",{}).n("BedrockClient","ExportAutomatedReasoningPolicyVersionCommand").sc(V.ExportAutomatedReasoningPolicyVersion$).build(){static{i(this,"ExportAutomatedReasoningPolicyVersionCommand")}},z_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyAnnotations",{}).n("BedrockClient","GetAutomatedReasoningPolicyAnnotationsCommand").sc(V.GetAutomatedReasoningPolicyAnnotations$).build(){static{i(this,"GetAutomatedReasoningPolicyAnnotationsCommand")}},U_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","GetAutomatedReasoningPolicyBuildWorkflowCommand").sc(V.GetAutomatedReasoningPolicyBuildWorkflow$).build(){static{i(this,"GetAutomatedReasoningPolicyBuildWorkflowCommand")}},B_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyBuildWorkflowResultAssets",{}).n("BedrockClient","GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand").sc(V.GetAutomatedReasoningPolicyBuildWorkflowResultAssets$).build(){static{i(this,"GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand")}},G_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicy",{}).n("BedrockClient","GetAutomatedReasoningPolicyCommand").sc(V.GetAutomatedReasoningPolicy$).build(){static{i(this,"GetAutomatedReasoningPolicyCommand")}},F_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyNextScenario",{}).n("BedrockClient","GetAutomatedReasoningPolicyNextScenarioCommand").sc(V.GetAutomatedReasoningPolicyNextScenario$).build(){static{i(this,"GetAutomatedReasoningPolicyNextScenarioCommand")}},j_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","GetAutomatedReasoningPolicyTestCaseCommand").sc(V.GetAutomatedReasoningPolicyTestCase$).build(){static{i(this,"GetAutomatedReasoningPolicyTestCaseCommand")}},q_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyTestResult",{}).n("BedrockClient","GetAutomatedReasoningPolicyTestResultCommand").sc(V.GetAutomatedReasoningPolicyTestResult$).build(){static{i(this,"GetAutomatedReasoningPolicyTestResultCommand")}},V_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetCustomModel",{}).n("BedrockClient","GetCustomModelCommand").sc(V.GetCustomModel$).build(){static{i(this,"GetCustomModelCommand")}},H_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetCustomModelDeployment",{}).n("BedrockClient","GetCustomModelDeploymentCommand").sc(V.GetCustomModelDeployment$).build(){static{i(this,"GetCustomModelDeploymentCommand")}},W_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetEvaluationJob",{}).n("BedrockClient","GetEvaluationJobCommand").sc(V.GetEvaluationJob$).build(){static{i(this,"GetEvaluationJobCommand")}},J_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetFoundationModelAvailability",{}).n("BedrockClient","GetFoundationModelAvailabilityCommand").sc(V.GetFoundationModelAvailability$).build(){static{i(this,"GetFoundationModelAvailabilityCommand")}},K_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetFoundationModel",{}).n("BedrockClient","GetFoundationModelCommand").sc(V.GetFoundationModel$).build(){static{i(this,"GetFoundationModelCommand")}},Z_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetGuardrail",{}).n("BedrockClient","GetGuardrailCommand").sc(V.GetGuardrail$).build(){static{i(this,"GetGuardrailCommand")}},X_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetImportedModel",{}).n("BedrockClient","GetImportedModelCommand").sc(V.GetImportedModel$).build(){static{i(this,"GetImportedModelCommand")}},Y_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetInferenceProfile",{}).n("BedrockClient","GetInferenceProfileCommand").sc(V.GetInferenceProfile$).build(){static{i(this,"GetInferenceProfileCommand")}},Q_=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetMarketplaceModelEndpoint",{}).n("BedrockClient","GetMarketplaceModelEndpointCommand").sc(V.GetMarketplaceModelEndpoint$).build(){static{i(this,"GetMarketplaceModelEndpointCommand")}},eE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCopyJob",{}).n("BedrockClient","GetModelCopyJobCommand").sc(V.GetModelCopyJob$).build(){static{i(this,"GetModelCopyJobCommand")}},tE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCustomizationJob",{}).n("BedrockClient","GetModelCustomizationJobCommand").sc(V.GetModelCustomizationJob$).build(){static{i(this,"GetModelCustomizationJobCommand")}},rE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelImportJob",{}).n("BedrockClient","GetModelImportJobCommand").sc(V.GetModelImportJob$).build(){static{i(this,"GetModelImportJobCommand")}},nE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelInvocationJob",{}).n("BedrockClient","GetModelInvocationJobCommand").sc(V.GetModelInvocationJob$).build(){static{i(this,"GetModelInvocationJobCommand")}},oE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelInvocationLoggingConfiguration",{}).n("BedrockClient","GetModelInvocationLoggingConfigurationCommand").sc(V.GetModelInvocationLoggingConfiguration$).build(){static{i(this,"GetModelInvocationLoggingConfigurationCommand")}},iE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetPromptRouter",{}).n("BedrockClient","GetPromptRouterCommand").sc(V.GetPromptRouter$).build(){static{i(this,"GetPromptRouterCommand")}},sE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetProvisionedModelThroughput",{}).n("BedrockClient","GetProvisionedModelThroughputCommand").sc(V.GetProvisionedModelThroughput$).build(){static{i(this,"GetProvisionedModelThroughputCommand")}},aE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetUseCaseForModelAccess",{}).n("BedrockClient","GetUseCaseForModelAccessCommand").sc(V.GetUseCaseForModelAccess$).build(){static{i(this,"GetUseCaseForModelAccessCommand")}},$d=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicies",{}).n("BedrockClient","ListAutomatedReasoningPoliciesCommand").sc(V.ListAutomatedReasoningPolicies$).build(){static{i(this,"ListAutomatedReasoningPoliciesCommand")}},kd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyBuildWorkflows",{}).n("BedrockClient","ListAutomatedReasoningPolicyBuildWorkflowsCommand").sc(V.ListAutomatedReasoningPolicyBuildWorkflows$).build(){static{i(this,"ListAutomatedReasoningPolicyBuildWorkflowsCommand")}},Dd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyTestCases",{}).n("BedrockClient","ListAutomatedReasoningPolicyTestCasesCommand").sc(V.ListAutomatedReasoningPolicyTestCases$).build(){static{i(this,"ListAutomatedReasoningPolicyTestCasesCommand")}},Md=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyTestResults",{}).n("BedrockClient","ListAutomatedReasoningPolicyTestResultsCommand").sc(V.ListAutomatedReasoningPolicyTestResults$).build(){static{i(this,"ListAutomatedReasoningPolicyTestResultsCommand")}},Od=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListCustomModelDeployments",{}).n("BedrockClient","ListCustomModelDeploymentsCommand").sc(V.ListCustomModelDeployments$).build(){static{i(this,"ListCustomModelDeploymentsCommand")}},Nd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListCustomModels",{}).n("BedrockClient","ListCustomModelsCommand").sc(V.ListCustomModels$).build(){static{i(this,"ListCustomModelsCommand")}},Ld=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListEnforcedGuardrailsConfiguration",{}).n("BedrockClient","ListEnforcedGuardrailsConfigurationCommand").sc(V.ListEnforcedGuardrailsConfiguration$).build(){static{i(this,"ListEnforcedGuardrailsConfigurationCommand")}},zd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListEvaluationJobs",{}).n("BedrockClient","ListEvaluationJobsCommand").sc(V.ListEvaluationJobs$).build(){static{i(this,"ListEvaluationJobsCommand")}},cE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModelAgreementOffers",{}).n("BedrockClient","ListFoundationModelAgreementOffersCommand").sc(V.ListFoundationModelAgreementOffers$).build(){static{i(this,"ListFoundationModelAgreementOffersCommand")}},uE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModels",{}).n("BedrockClient","ListFoundationModelsCommand").sc(V.ListFoundationModels$).build(){static{i(this,"ListFoundationModelsCommand")}},Ud=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListGuardrails",{}).n("BedrockClient","ListGuardrailsCommand").sc(V.ListGuardrails$).build(){static{i(this,"ListGuardrailsCommand")}},Bd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListImportedModels",{}).n("BedrockClient","ListImportedModelsCommand").sc(V.ListImportedModels$).build(){static{i(this,"ListImportedModelsCommand")}},Gd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListInferenceProfiles",{}).n("BedrockClient","ListInferenceProfilesCommand").sc(V.ListInferenceProfiles$).build(){static{i(this,"ListInferenceProfilesCommand")}},Fd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListMarketplaceModelEndpoints",{}).n("BedrockClient","ListMarketplaceModelEndpointsCommand").sc(V.ListMarketplaceModelEndpoints$).build(){static{i(this,"ListMarketplaceModelEndpointsCommand")}},jd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelCopyJobs",{}).n("BedrockClient","ListModelCopyJobsCommand").sc(V.ListModelCopyJobs$).build(){static{i(this,"ListModelCopyJobsCommand")}},qd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelCustomizationJobs",{}).n("BedrockClient","ListModelCustomizationJobsCommand").sc(V.ListModelCustomizationJobs$).build(){static{i(this,"ListModelCustomizationJobsCommand")}},Vd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelImportJobs",{}).n("BedrockClient","ListModelImportJobsCommand").sc(V.ListModelImportJobs$).build(){static{i(this,"ListModelImportJobsCommand")}},Hd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelInvocationJobs",{}).n("BedrockClient","ListModelInvocationJobsCommand").sc(V.ListModelInvocationJobs$).build(){static{i(this,"ListModelInvocationJobsCommand")}},Wd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListPromptRouters",{}).n("BedrockClient","ListPromptRoutersCommand").sc(V.ListPromptRouters$).build(){static{i(this,"ListPromptRoutersCommand")}},Jd=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListProvisionedModelThroughputs",{}).n("BedrockClient","ListProvisionedModelThroughputsCommand").sc(V.ListProvisionedModelThroughputs$).build(){static{i(this,"ListProvisionedModelThroughputsCommand")}},lE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListTagsForResource",{}).n("BedrockClient","ListTagsForResourceCommand").sc(V.ListTagsForResource$).build(){static{i(this,"ListTagsForResourceCommand")}},dE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","PutEnforcedGuardrailConfiguration",{}).n("BedrockClient","PutEnforcedGuardrailConfigurationCommand").sc(V.PutEnforcedGuardrailConfiguration$).build(){static{i(this,"PutEnforcedGuardrailConfigurationCommand")}},pE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","PutModelInvocationLoggingConfiguration",{}).n("BedrockClient","PutModelInvocationLoggingConfigurationCommand").sc(V.PutModelInvocationLoggingConfiguration$).build(){static{i(this,"PutModelInvocationLoggingConfigurationCommand")}},mE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","PutUseCaseForModelAccess",{}).n("BedrockClient","PutUseCaseForModelAccessCommand").sc(V.PutUseCaseForModelAccess$).build(){static{i(this,"PutUseCaseForModelAccessCommand")}},fE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","RegisterMarketplaceModelEndpoint",{}).n("BedrockClient","RegisterMarketplaceModelEndpointCommand").sc(V.RegisterMarketplaceModelEndpoint$).build(){static{i(this,"RegisterMarketplaceModelEndpointCommand")}},gE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StartAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","StartAutomatedReasoningPolicyBuildWorkflowCommand").sc(V.StartAutomatedReasoningPolicyBuildWorkflow$).build(){static{i(this,"StartAutomatedReasoningPolicyBuildWorkflowCommand")}},hE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StartAutomatedReasoningPolicyTestWorkflow",{}).n("BedrockClient","StartAutomatedReasoningPolicyTestWorkflowCommand").sc(V.StartAutomatedReasoningPolicyTestWorkflow$).build(){static{i(this,"StartAutomatedReasoningPolicyTestWorkflowCommand")}},yE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopEvaluationJob",{}).n("BedrockClient","StopEvaluationJobCommand").sc(V.StopEvaluationJob$).build(){static{i(this,"StopEvaluationJobCommand")}},_E=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopModelCustomizationJob",{}).n("BedrockClient","StopModelCustomizationJobCommand").sc(V.StopModelCustomizationJob$).build(){static{i(this,"StopModelCustomizationJobCommand")}},EE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopModelInvocationJob",{}).n("BedrockClient","StopModelInvocationJobCommand").sc(V.StopModelInvocationJob$).build(){static{i(this,"StopModelInvocationJobCommand")}},SE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","TagResource",{}).n("BedrockClient","TagResourceCommand").sc(V.TagResource$).build(){static{i(this,"TagResourceCommand")}},vE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UntagResource",{}).n("BedrockClient","UntagResourceCommand").sc(V.UntagResource$).build(){static{i(this,"UntagResourceCommand")}},AE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicyAnnotations",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyAnnotationsCommand").sc(V.UpdateAutomatedReasoningPolicyAnnotations$).build(){static{i(this,"UpdateAutomatedReasoningPolicyAnnotationsCommand")}},RE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicy",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyCommand").sc(V.UpdateAutomatedReasoningPolicy$).build(){static{i(this,"UpdateAutomatedReasoningPolicyCommand")}},PE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyTestCaseCommand").sc(V.UpdateAutomatedReasoningPolicyTestCase$).build(){static{i(this,"UpdateAutomatedReasoningPolicyTestCaseCommand")}},CE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateCustomModelDeployment",{}).n("BedrockClient","UpdateCustomModelDeploymentCommand").sc(V.UpdateCustomModelDeployment$).build(){static{i(this,"UpdateCustomModelDeploymentCommand")}},TE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateGuardrail",{}).n("BedrockClient","UpdateGuardrailCommand").sc(V.UpdateGuardrail$).build(){static{i(this,"UpdateGuardrailCommand")}},xE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateMarketplaceModelEndpoint",{}).n("BedrockClient","UpdateMarketplaceModelEndpointCommand").sc(V.UpdateMarketplaceModelEndpoint$).build(){static{i(this,"UpdateMarketplaceModelEndpointCommand")}},bE=class extends q.Command.classBuilder().ep(J).m(function(t,r,n,o){return[H.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateProvisionedModelThroughput",{}).n("BedrockClient","UpdateProvisionedModelThroughputCommand").sc(V.UpdateProvisionedModelThroughput$).build(){static{i(this,"UpdateProvisionedModelThroughputCommand")}},pH=_t.createPaginator(mt,$d,"nextToken","nextToken","maxResults"),mH=_t.createPaginator(mt,kd,"nextToken","nextToken","maxResults"),fH=_t.createPaginator(mt,Dd,"nextToken","nextToken","maxResults"),gH=_t.createPaginator(mt,Md,"nextToken","nextToken","maxResults"),hH=_t.createPaginator(mt,Od,"nextToken","nextToken","maxResults"),yH=_t.createPaginator(mt,Nd,"nextToken","nextToken","maxResults"),_H=_t.createPaginator(mt,Ld,"nextToken","nextToken",""),EH=_t.createPaginator(mt,zd,"nextToken","nextToken","maxResults"),SH=_t.createPaginator(mt,Ud,"nextToken","nextToken","maxResults"),vH=_t.createPaginator(mt,Bd,"nextToken","nextToken","maxResults"),AH=_t.createPaginator(mt,Gd,"nextToken","nextToken","maxResults"),RH=_t.createPaginator(mt,Fd,"nextToken","nextToken","maxResults"),PH=_t.createPaginator(mt,jd,"nextToken","nextToken","maxResults"),CH=_t.createPaginator(mt,qd,"nextToken","nextToken","maxResults"),TH=_t.createPaginator(mt,Vd,"nextToken","nextToken","maxResults"),xH=_t.createPaginator(mt,Hd,"nextToken","nextToken","maxResults"),bH=_t.createPaginator(mt,Wd,"nextToken","nextToken","maxResults"),IH=_t.createPaginator(mt,Jd,"nextToken","nextToken","maxResults"),lze={BatchDeleteEvaluationJobCommand:n_,CancelAutomatedReasoningPolicyBuildWorkflowCommand:o_,CreateAutomatedReasoningPolicyCommand:i_,CreateAutomatedReasoningPolicyTestCaseCommand:s_,CreateAutomatedReasoningPolicyVersionCommand:a_,CreateCustomModelCommand:c_,CreateCustomModelDeploymentCommand:u_,CreateEvaluationJobCommand:l_,CreateFoundationModelAgreementCommand:d_,CreateGuardrailCommand:p_,CreateGuardrailVersionCommand:m_,CreateInferenceProfileCommand:f_,CreateMarketplaceModelEndpointCommand:g_,CreateModelCopyJobCommand:h_,CreateModelCustomizationJobCommand:y_,CreateModelImportJobCommand:__,CreateModelInvocationJobCommand:E_,CreatePromptRouterCommand:S_,CreateProvisionedModelThroughputCommand:v_,DeleteAutomatedReasoningPolicyCommand:R_,DeleteAutomatedReasoningPolicyBuildWorkflowCommand:A_,DeleteAutomatedReasoningPolicyTestCaseCommand:P_,DeleteCustomModelCommand:C_,DeleteCustomModelDeploymentCommand:T_,DeleteEnforcedGuardrailConfigurationCommand:x_,DeleteFoundationModelAgreementCommand:b_,DeleteGuardrailCommand:I_,DeleteImportedModelCommand:w_,DeleteInferenceProfileCommand:$_,DeleteMarketplaceModelEndpointCommand:k_,DeleteModelInvocationLoggingConfigurationCommand:D_,DeletePromptRouterCommand:M_,DeleteProvisionedModelThroughputCommand:O_,DeregisterMarketplaceModelEndpointCommand:N_,ExportAutomatedReasoningPolicyVersionCommand:L_,GetAutomatedReasoningPolicyCommand:G_,GetAutomatedReasoningPolicyAnnotationsCommand:z_,GetAutomatedReasoningPolicyBuildWorkflowCommand:U_,GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand:B_,GetAutomatedReasoningPolicyNextScenarioCommand:F_,GetAutomatedReasoningPolicyTestCaseCommand:j_,GetAutomatedReasoningPolicyTestResultCommand:q_,GetCustomModelCommand:V_,GetCustomModelDeploymentCommand:H_,GetEvaluationJobCommand:W_,GetFoundationModelCommand:K_,GetFoundationModelAvailabilityCommand:J_,GetGuardrailCommand:Z_,GetImportedModelCommand:X_,GetInferenceProfileCommand:Y_,GetMarketplaceModelEndpointCommand:Q_,GetModelCopyJobCommand:eE,GetModelCustomizationJobCommand:tE,GetModelImportJobCommand:rE,GetModelInvocationJobCommand:nE,GetModelInvocationLoggingConfigurationCommand:oE,GetPromptRouterCommand:iE,GetProvisionedModelThroughputCommand:sE,GetUseCaseForModelAccessCommand:aE,ListAutomatedReasoningPoliciesCommand:$d,ListAutomatedReasoningPolicyBuildWorkflowsCommand:kd,ListAutomatedReasoningPolicyTestCasesCommand:Dd,ListAutomatedReasoningPolicyTestResultsCommand:Md,ListCustomModelDeploymentsCommand:Od,ListCustomModelsCommand:Nd,ListEnforcedGuardrailsConfigurationCommand:Ld,ListEvaluationJobsCommand:zd,ListFoundationModelAgreementOffersCommand:cE,ListFoundationModelsCommand:uE,ListGuardrailsCommand:Ud,ListImportedModelsCommand:Bd,ListInferenceProfilesCommand:Gd,ListMarketplaceModelEndpointsCommand:Fd,ListModelCopyJobsCommand:jd,ListModelCustomizationJobsCommand:qd,ListModelImportJobsCommand:Vd,ListModelInvocationJobsCommand:Hd,ListPromptRoutersCommand:Wd,ListProvisionedModelThroughputsCommand:Jd,ListTagsForResourceCommand:lE,PutEnforcedGuardrailConfigurationCommand:dE,PutModelInvocationLoggingConfigurationCommand:pE,PutUseCaseForModelAccessCommand:mE,RegisterMarketplaceModelEndpointCommand:fE,StartAutomatedReasoningPolicyBuildWorkflowCommand:gE,StartAutomatedReasoningPolicyTestWorkflowCommand:hE,StopEvaluationJobCommand:yE,StopModelCustomizationJobCommand:_E,StopModelInvocationJobCommand:EE,TagResourceCommand:SE,UntagResourceCommand:vE,UpdateAutomatedReasoningPolicyCommand:RE,UpdateAutomatedReasoningPolicyAnnotationsCommand:AE,UpdateAutomatedReasoningPolicyTestCaseCommand:PE,UpdateCustomModelDeploymentCommand:CE,UpdateGuardrailCommand:TE,UpdateMarketplaceModelEndpointCommand:xE,UpdateProvisionedModelThroughputCommand:bE},dze={paginateListAutomatedReasoningPolicies:pH,paginateListAutomatedReasoningPolicyBuildWorkflows:mH,paginateListAutomatedReasoningPolicyTestCases:fH,paginateListAutomatedReasoningPolicyTestResults:gH,paginateListCustomModelDeployments:hH,paginateListCustomModels:yH,paginateListEnforcedGuardrailsConfiguration:_H,paginateListEvaluationJobs:EH,paginateListGuardrails:SH,paginateListImportedModels:vH,paginateListInferenceProfiles:AH,paginateListMarketplaceModelEndpoints:RH,paginateListModelCopyJobs:PH,paginateListModelCustomizationJobs:CH,paginateListModelImportJobs:TH,paginateListModelInvocationJobs:xH,paginateListPromptRouters:bH,paginateListProvisionedModelThroughputs:IH},IE=class extends mt{static{i(this,"Bedrock")}};q.createAggregatedClient(lze,IE,{paginators:dze});var pze={HONOR:"HONOR",IGNORE:"IGNORE"},mze={ACCOUNT:"ACCOUNT"},fze={AVAILABLE:"AVAILABLE",ERROR:"ERROR",NOT_AVAILABLE:"NOT_AVAILABLE",PENDING:"PENDING"},gze={IMPOSSIBLE:"IMPOSSIBLE",INVALID:"INVALID",NO_TRANSLATION:"NO_TRANSLATION",SATISFIABLE:"SATISFIABLE",TOO_COMPLEX:"TOO_COMPLEX",TRANSLATION_AMBIGUOUS:"TRANSLATION_AMBIGUOUS",VALID:"VALID"},hze={GENERATE_FIDELITY_REPORT:"GENERATE_FIDELITY_REPORT",GENERATE_POLICY_SCENARIOS:"GENERATE_POLICY_SCENARIOS",IMPORT_POLICY:"IMPORT_POLICY",INGEST_CONTENT:"INGEST_CONTENT",REFINE_POLICY:"REFINE_POLICY"},yze={PDF:"pdf",TEXT:"txt"},_ze={BUILDING:"BUILDING",CANCELLED:"CANCELLED",CANCEL_REQUESTED:"CANCEL_REQUESTED",COMPLETED:"COMPLETED",FAILED:"FAILED",PREPROCESSING:"PREPROCESSING",SCHEDULED:"SCHEDULED",TESTING:"TESTING"},Eze={ASSET_MANIFEST:"ASSET_MANIFEST",BUILD_LOG:"BUILD_LOG",FIDELITY_REPORT:"FIDELITY_REPORT",GENERATED_TEST_CASES:"GENERATED_TEST_CASES",POLICY_DEFINITION:"POLICY_DEFINITION",POLICY_SCENARIOS:"POLICY_SCENARIOS",QUALITY_REPORT:"QUALITY_REPORT",SOURCE_DOCUMENT:"SOURCE_DOCUMENT"},Sze={ERROR:"ERROR",INFO:"INFO",WARNING:"WARNING"},vze={APPLIED:"APPLIED",FAILED:"FAILED"},Aze={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},Rze={FAILED:"FAILED",PASSED:"PASSED"},Pze={COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS",NOT_STARTED:"NOT_STARTED",SCHEDULED:"SCHEDULED"},Cze={INCOMPATIBLE_ENDPOINT:"INCOMPATIBLE_ENDPOINT",REGISTERED:"REGISTERED"},Tze={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},xze={UPDATE_COMPLETED:"UpdateCompleted",UPDATE_FAILED:"UpdateFailed",UPDATING:"Updating"},bze={CREATION_TIME:"CreationTime"},Ize={ASCENDING:"Ascending",DESCENDING:"Descending"},wze={HIGH:"high",LOW:"low",MEDIUM:"medium"},$ze={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING",IMPORTED:"IMPORTED",REINFORCEMENT_FINE_TUNING:"REINFORCEMENT_FINE_TUNING"},kze={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},Dze={COMPLETED:"Completed",DELETING:"Deleting",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},Mze={MODEL_EVALUATION:"ModelEvaluation",RAG_EVALUATION:"RagEvaluation"},Oze={CLASSIFICATION:"Classification",CUSTOM:"Custom",GENERATION:"Generation",QUESTION_AND_ANSWER:"QuestionAndAnswer",SUMMARIZATION:"Summarization"},Nze={OPTIMIZED:"optimized",STANDARD:"standard"},Lze={BYTE_CONTENT:"BYTE_CONTENT",S3:"S3"},zze={QUERY_DECOMPOSITION:"QUERY_DECOMPOSITION"},Uze={BOOLEAN:"BOOLEAN",NUMBER:"NUMBER",STRING:"STRING",STRING_LIST:"STRING_LIST"},Bze={HYBRID:"HYBRID",SEMANTIC:"SEMANTIC"},Gze={ALL:"ALL",SELECTIVE:"SELECTIVE"},Fze={BEDROCK_RERANKING_MODEL:"BEDROCK_RERANKING_MODEL"},jze={EXTERNAL_SOURCES:"EXTERNAL_SOURCES",KNOWLEDGE_BASE:"KNOWLEDGE_BASE"},qze={AUTOMATED:"Automated",HUMAN:"Human"},Vze={CREATION_TIME:"CreationTime"},Hze={BLOCK:"BLOCK",NONE:"NONE"},Wze={IMAGE:"IMAGE",TEXT:"TEXT"},Jze={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},Kze={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},Zze={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},Xze={BLOCK:"BLOCK",NONE:"NONE"},Yze={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},Qze={ANONYMIZE:"ANONYMIZE",BLOCK:"BLOCK",NONE:"NONE"},eUe={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},tUe={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},rUe={BLOCK:"BLOCK",NONE:"NONE"},nUe={DENY:"DENY"},oUe={BLOCK:"BLOCK",NONE:"NONE"},iUe={PROFANITY:"PROFANITY"},sUe={CREATING:"CREATING",DELETING:"DELETING",FAILED:"FAILED",READY:"READY",UPDATING:"UPDATING",VERSIONING:"VERSIONING"},aUe={ACTIVE:"ACTIVE"},cUe={APPLICATION:"APPLICATION",SYSTEM_DEFINED:"SYSTEM_DEFINED"},uUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},lUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},dUe={JSONL:"JSONL"},pUe={Converse:"Converse",InvokeModel:"InvokeModel"},mUe={COMPLETED:"Completed",EXPIRED:"Expired",FAILED:"Failed",IN_PROGRESS:"InProgress",PARTIALLY_COMPLETED:"PartiallyCompleted",SCHEDULED:"Scheduled",STOPPED:"Stopped",STOPPING:"Stopping",SUBMITTED:"Submitted",VALIDATING:"Validating"},fUe={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING"},gUe={ON_DEMAND:"ON_DEMAND",PROVISIONED:"PROVISIONED"},hUe={EMBEDDING:"EMBEDDING",IMAGE:"IMAGE",TEXT:"TEXT"},yUe={ACTIVE:"ACTIVE",LEGACY:"LEGACY"},_Ue={AVAILABLE:"AVAILABLE"},EUe={CUSTOM:"custom",DEFAULT:"default"},SUe={ONE_MONTH:"OneMonth",SIX_MONTHS:"SixMonths"},vUe={CREATING:"Creating",FAILED:"Failed",IN_SERVICE:"InService",UPDATING:"Updating"},AUe={CREATION_TIME:"CreationTime"},RUe={AUTHORIZED:"AUTHORIZED",NOT_AUTHORIZED:"NOT_AUTHORIZED"},PUe={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},CUe={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},TUe={ALL:"ALL",PUBLIC:"PUBLIC"},xUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},bUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",NOT_STARTED:"NotStarted",STOPPED:"Stopped",STOPPING:"Stopping"},IUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"};k.$Command=q.Command;k.__Client=q.Client;k.BedrockServiceException=ize.BedrockServiceException;k.AgreementStatus=fze;k.ApplicationType=Mze;k.AttributeType=Uze;k.AuthorizationStatus=RUe;k.AutomatedReasoningCheckLogicWarningType=Aze;k.AutomatedReasoningCheckResult=gze;k.AutomatedReasoningPolicyAnnotationStatus=vze;k.AutomatedReasoningPolicyBuildDocumentContentType=yze;k.AutomatedReasoningPolicyBuildMessageType=Sze;k.AutomatedReasoningPolicyBuildResultAssetType=Eze;k.AutomatedReasoningPolicyBuildWorkflowStatus=_ze;k.AutomatedReasoningPolicyBuildWorkflowType=hze;k.AutomatedReasoningPolicyTestRunResult=Rze;k.AutomatedReasoningPolicyTestRunStatus=Pze;k.BatchDeleteEvaluationJobCommand=n_;k.Bedrock=IE;k.BedrockClient=mt;k.CancelAutomatedReasoningPolicyBuildWorkflowCommand=o_;k.CommitmentDuration=SUe;k.ConfigurationOwner=mze;k.CreateAutomatedReasoningPolicyCommand=i_;k.CreateAutomatedReasoningPolicyTestCaseCommand=s_;k.CreateAutomatedReasoningPolicyVersionCommand=a_;k.CreateCustomModelCommand=c_;k.CreateCustomModelDeploymentCommand=u_;k.CreateEvaluationJobCommand=l_;k.CreateFoundationModelAgreementCommand=d_;k.CreateGuardrailCommand=p_;k.CreateGuardrailVersionCommand=m_;k.CreateInferenceProfileCommand=f_;k.CreateMarketplaceModelEndpointCommand=g_;k.CreateModelCopyJobCommand=h_;k.CreateModelCustomizationJobCommand=y_;k.CreateModelImportJobCommand=__;k.CreateModelInvocationJobCommand=E_;k.CreatePromptRouterCommand=S_;k.CreateProvisionedModelThroughputCommand=v_;k.CustomModelDeploymentStatus=Tze;k.CustomModelDeploymentUpdateStatus=xze;k.CustomizationType=$ze;k.DeleteAutomatedReasoningPolicyBuildWorkflowCommand=A_;k.DeleteAutomatedReasoningPolicyCommand=R_;k.DeleteAutomatedReasoningPolicyTestCaseCommand=P_;k.DeleteCustomModelCommand=C_;k.DeleteCustomModelDeploymentCommand=T_;k.DeleteEnforcedGuardrailConfigurationCommand=x_;k.DeleteFoundationModelAgreementCommand=b_;k.DeleteGuardrailCommand=I_;k.DeleteImportedModelCommand=w_;k.DeleteInferenceProfileCommand=$_;k.DeleteMarketplaceModelEndpointCommand=k_;k.DeleteModelInvocationLoggingConfigurationCommand=D_;k.DeletePromptRouterCommand=M_;k.DeleteProvisionedModelThroughputCommand=O_;k.DeregisterMarketplaceModelEndpointCommand=N_;k.EntitlementAvailability=PUe;k.EvaluationJobStatus=Dze;k.EvaluationJobType=qze;k.EvaluationTaskType=Oze;k.ExportAutomatedReasoningPolicyVersionCommand=L_;k.ExternalSourceType=Lze;k.FineTuningJobStatus=IUe;k.FoundationModelLifecycleStatus=yUe;k.GetAutomatedReasoningPolicyAnnotationsCommand=z_;k.GetAutomatedReasoningPolicyBuildWorkflowCommand=U_;k.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand=B_;k.GetAutomatedReasoningPolicyCommand=G_;k.GetAutomatedReasoningPolicyNextScenarioCommand=F_;k.GetAutomatedReasoningPolicyTestCaseCommand=j_;k.GetAutomatedReasoningPolicyTestResultCommand=q_;k.GetCustomModelCommand=V_;k.GetCustomModelDeploymentCommand=H_;k.GetEvaluationJobCommand=W_;k.GetFoundationModelAvailabilityCommand=J_;k.GetFoundationModelCommand=K_;k.GetGuardrailCommand=Z_;k.GetImportedModelCommand=X_;k.GetInferenceProfileCommand=Y_;k.GetMarketplaceModelEndpointCommand=Q_;k.GetModelCopyJobCommand=eE;k.GetModelCustomizationJobCommand=tE;k.GetModelImportJobCommand=rE;k.GetModelInvocationJobCommand=nE;k.GetModelInvocationLoggingConfigurationCommand=oE;k.GetPromptRouterCommand=iE;k.GetProvisionedModelThroughputCommand=sE;k.GetUseCaseForModelAccessCommand=aE;k.GuardrailContentFilterAction=Hze;k.GuardrailContentFilterType=Kze;k.GuardrailContentFiltersTierName=Zze;k.GuardrailContextualGroundingAction=Xze;k.GuardrailContextualGroundingFilterType=Yze;k.GuardrailFilterStrength=Jze;k.GuardrailManagedWordsType=iUe;k.GuardrailModality=Wze;k.GuardrailPiiEntityType=eUe;k.GuardrailSensitiveInformationAction=Qze;k.GuardrailStatus=sUe;k.GuardrailTopicAction=rUe;k.GuardrailTopicType=nUe;k.GuardrailTopicsTierName=tUe;k.GuardrailWordAction=oUe;k.InferenceProfileStatus=aUe;k.InferenceProfileType=cUe;k.InferenceType=gUe;k.InputTags=pze;k.JobStatusDetails=bUe;k.ListAutomatedReasoningPoliciesCommand=$d;k.ListAutomatedReasoningPolicyBuildWorkflowsCommand=kd;k.ListAutomatedReasoningPolicyTestCasesCommand=Dd;k.ListAutomatedReasoningPolicyTestResultsCommand=Md;k.ListCustomModelDeploymentsCommand=Od;k.ListCustomModelsCommand=Nd;k.ListEnforcedGuardrailsConfigurationCommand=Ld;k.ListEvaluationJobsCommand=zd;k.ListFoundationModelAgreementOffersCommand=cE;k.ListFoundationModelsCommand=uE;k.ListGuardrailsCommand=Ud;k.ListImportedModelsCommand=Bd;k.ListInferenceProfilesCommand=Gd;k.ListMarketplaceModelEndpointsCommand=Fd;k.ListModelCopyJobsCommand=jd;k.ListModelCustomizationJobsCommand=qd;k.ListModelImportJobsCommand=Vd;k.ListModelInvocationJobsCommand=Hd;k.ListPromptRoutersCommand=Wd;k.ListProvisionedModelThroughputsCommand=Jd;k.ListTagsForResourceCommand=lE;k.ModelCopyJobStatus=uUe;k.ModelCustomization=fUe;k.ModelCustomizationJobStatus=xUe;k.ModelImportJobStatus=lUe;k.ModelInvocationJobStatus=mUe;k.ModelInvocationType=pUe;k.ModelModality=hUe;k.ModelStatus=kze;k.OfferType=TUe;k.PerformanceConfigLatency=Nze;k.PromptRouterStatus=_Ue;k.PromptRouterType=EUe;k.ProvisionedModelStatus=vUe;k.PutEnforcedGuardrailConfigurationCommand=dE;k.PutModelInvocationLoggingConfigurationCommand=pE;k.PutUseCaseForModelAccessCommand=mE;k.QueryTransformationType=zze;k.ReasoningEffort=wze;k.RegionAvailability=CUe;k.RegisterMarketplaceModelEndpointCommand=fE;k.RerankingMetadataSelectionMode=Gze;k.RetrieveAndGenerateType=jze;k.S3InputFormat=dUe;k.SearchType=Bze;k.SortByProvisionedModels=AUe;k.SortJobsBy=Vze;k.SortModelsBy=bze;k.SortOrder=Ize;k.StartAutomatedReasoningPolicyBuildWorkflowCommand=gE;k.StartAutomatedReasoningPolicyTestWorkflowCommand=hE;k.Status=Cze;k.StopEvaluationJobCommand=yE;k.StopModelCustomizationJobCommand=_E;k.StopModelInvocationJobCommand=EE;k.TagResourceCommand=SE;k.UntagResourceCommand=vE;k.UpdateAutomatedReasoningPolicyAnnotationsCommand=AE;k.UpdateAutomatedReasoningPolicyCommand=RE;k.UpdateAutomatedReasoningPolicyTestCaseCommand=PE;k.UpdateCustomModelDeploymentCommand=CE;k.UpdateGuardrailCommand=TE;k.UpdateMarketplaceModelEndpointCommand=xE;k.UpdateProvisionedModelThroughputCommand=bE;k.VectorSearchRerankingConfigurationType=Fze;k.paginateListAutomatedReasoningPolicies=pH;k.paginateListAutomatedReasoningPolicyBuildWorkflows=mH;k.paginateListAutomatedReasoningPolicyTestCases=fH;k.paginateListAutomatedReasoningPolicyTestResults=gH;k.paginateListCustomModelDeployments=hH;k.paginateListCustomModels=yH;k.paginateListEnforcedGuardrailsConfiguration=_H;k.paginateListEvaluationJobs=EH;k.paginateListGuardrails=SH;k.paginateListImportedModels=vH;k.paginateListInferenceProfiles=AH;k.paginateListMarketplaceModelEndpoints=RH;k.paginateListModelCopyJobs=PH;k.paginateListModelCustomizationJobs=CH;k.paginateListModelImportJobs=TH;k.paginateListModelInvocationJobs=xH;k.paginateListPromptRouters=bH;k.paginateListProvisionedModelThroughputs=IH;Object.prototype.hasOwnProperty.call(V,"__proto__")&&!Object.prototype.hasOwnProperty.call(k,"__proto__")&&Object.defineProperty(k,"__proto__",{enumerable:!0,value:V.__proto__});Object.keys(V).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(k,e)&&(k[e]=V[e])});Object.prototype.hasOwnProperty.call(r_,"__proto__")&&!Object.prototype.hasOwnProperty.call(k,"__proto__")&&Object.defineProperty(k,"__proto__",{enumerable:!0,value:r_.__proto__});Object.keys(r_).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(k,e)&&(k[e]=r_[e])})});var Eb=N(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.resolveHttpAuthSchemeConfig=Jn.resolveStsAuthConfig=Jn.defaultSTSHttpAuthSchemeProvider=Jn.defaultSTSHttpAuthSchemeParametersProvider=void 0;var DUe=(Aa(),Q(va)),_b=It(),MUe=Sb(),OUe=i(async(e,t,r)=>({operation:(0,_b.getSmithyContext)(t).operation,region:await(0,_b.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSTSHttpAuthSchemeParametersProvider");Jn.defaultSTSHttpAuthSchemeParametersProvider=OUe;function NUe(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i(NUe,"createAwsAuthSigv4HttpAuthOption");function $H(e){return{schemeId:"smithy.api#noAuth"}}i($H,"createSmithyApiNoAuthHttpAuthOption");var LUe=i(e=>{let t=[];switch(e.operation){case"AssumeRoleWithSAML":{t.push($H(e));break}case"AssumeRoleWithWebIdentity":{t.push($H(e));break}default:t.push(NUe(e))}return t},"defaultSTSHttpAuthSchemeProvider");Jn.defaultSTSHttpAuthSchemeProvider=LUe;var zUe=i(e=>Object.assign(e,{stsClientCtor:MUe.STSClient}),"resolveStsAuthConfig");Jn.resolveStsAuthConfig=zUe;var UUe=i(e=>{let t=(0,Jn.resolveStsAuthConfig)(e),r=(0,DUe.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,_b.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig");Jn.resolveHttpAuthSchemeConfig=UUe});var vb=N(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.commonParams=Qc.resolveClientEndpointParameters=void 0;var BUe=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),"resolveClientEndpointParameters");Qc.resolveClientEndpointParameters=BUe;Qc.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 kH=N((Mft,GUe)=>{GUe.exports={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.974.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"premove ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn g:vitest run","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts --mode development","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs","test:watch":"yarn g:vitest watch"},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.973.0","@aws-sdk/credential-provider-node":"^3.972.1","@aws-sdk/middleware-host-header":"^3.972.1","@aws-sdk/middleware-logger":"^3.972.1","@aws-sdk/middleware-recursion-detection":"^3.972.1","@aws-sdk/middleware-user-agent":"^3.972.1","@aws-sdk/region-config-resolver":"^3.972.1","@aws-sdk/types":"^3.973.0","@aws-sdk/util-endpoints":"3.972.0","@aws-sdk/util-user-agent-browser":"^3.972.1","@aws-sdk/util-user-agent-node":"^3.972.1","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.21.0","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.10","@smithy/middleware-retry":"^4.4.26","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.8","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.10.11","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.25","@smithy/util-defaults-mode-node":"^4.2.28","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},engines:{node:">=20.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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var FH=N(Kn=>{"use strict";var eu=er(),FUe=Gr(),MH=i((e,t=!1)=>{if(t){for(let r of e.split("."))if(!MH(r))return!1;return!0}return!(!eu.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||eu.isIpAddress(e))},"isVirtualHostableS3Bucket"),DH=":",jUe="/",qUe=i(e=>{let t=e.split(DH);if(t.length<6)return null;let[r,n,o,a,c,...u]=t;if(r!=="arn"||n===""||o===""||u.join(DH)==="")return null;let l=u.map(d=>d.split(jUe)).flat();return{partition:n,service:o,region:a,accountId:c,resourceId:l}},"parseArn"),VUe=[{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-east-2":{description:"Asia Pacific (Taipei)"},"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-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{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-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],HUe="1.1",OH={partitions:VUe,version:HUe},NH=OH,LH="",zH=i(e=>{let{partitions:t}=NH;for(let n of t){let{regions:o,outputs:a}=n;for(let[c,u]of Object.entries(o))if(c===e)return{...a,...u}}for(let n of t){let{regionRegex:o,outputs:a}=n;if(new RegExp(o).test(e))return{...a}}let r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},"partition"),UH=i((e,t="")=>{NH=e,LH=t},"setPartitionInfo"),WUe=i(()=>{UH(OH,"")},"useDefaultPartitionInfo"),JUe=i(()=>LH,"getUserAgentPrefix"),BH={isVirtualHostableS3Bucket:MH,parseArn:qUe,partition:zH};eu.customEndpointFunctions.aws=BH;var KUe=i(e=>{if(typeof e.endpointProvider!="function")throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>GH(e.endpointProvider({Region:typeof e.region=="function"?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint=="function"?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint=="function"?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:void 0},{logger:e.logger}))),e},"resolveDefaultAwsRegionalEndpointsConfig"),GH=i(e=>FUe.parseUrl(e.url),"toEndpointV1");Object.defineProperty(Kn,"EndpointError",{enumerable:!0,get:i(function(){return eu.EndpointError},"get")});Object.defineProperty(Kn,"isIpAddress",{enumerable:!0,get:i(function(){return eu.isIpAddress},"get")});Object.defineProperty(Kn,"resolveEndpoint",{enumerable:!0,get:i(function(){return eu.resolveEndpoint},"get")});Kn.awsEndpointFunctions=BH;Kn.getUserAgentPrefix=JUe;Kn.partition=zH;Kn.resolveDefaultAwsRegionalEndpointsConfig=KUe;Kn.setPartitionInfo=UH;Kn.toEndpointV1=GH;Kn.useDefaultPartitionInfo=WUe});var lW=N($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.ruleSet=void 0;var eW="required",Te="type",Ue="fn",Be="argv",Ts="ref",jH=!1,Ab=!0,Cs="booleanEquals",Wt="stringEquals",tW="sigv4",rW="sts",nW="us-east-1",rt="endpoint",qH="https://sts.{Region}.{PartitionResult#dnsSuffix}",wo="tree",tu="error",Pb="getAttr",VH={[eW]:!1,[Te]:"string"},Rb={[eW]:!0,default:!1,[Te]:"boolean"},oW={[Ts]:"Endpoint"},HH={[Ue]:"isSet",[Be]:[{[Ts]:"Region"}]},Jt={[Ts]:"Region"},WH={[Ue]:"aws.partition",[Be]:[Jt],assign:"PartitionResult"},iW={[Ts]:"UseFIPS"},sW={[Ts]:"UseDualStack"},cr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:tW,signingName:rW,signingRegion:nW}]},headers:{}},Qr={},JH={conditions:[{[Ue]:Wt,[Be]:[Jt,"aws-global"]}],[rt]:cr,[Te]:rt},aW={[Ue]:Cs,[Be]:[iW,!0]},cW={[Ue]:Cs,[Be]:[sW,!0]},KH={[Ue]:Pb,[Be]:[{[Ts]:"PartitionResult"},"supportsFIPS"]},uW={[Ts]:"PartitionResult"},ZH={[Ue]:Cs,[Be]:[!0,{[Ue]:Pb,[Be]:[uW,"supportsDualStack"]}]},XH=[{[Ue]:"isSet",[Be]:[oW]}],YH=[aW],QH=[cW],ZUe={version:"1.0",parameters:{Region:VH,UseDualStack:Rb,UseFIPS:Rb,Endpoint:VH,UseGlobalEndpoint:Rb},rules:[{conditions:[{[Ue]:Cs,[Be]:[{[Ts]:"UseGlobalEndpoint"},Ab]},{[Ue]:"not",[Be]:XH},HH,WH,{[Ue]:Cs,[Be]:[iW,jH]},{[Ue]:Cs,[Be]:[sW,jH]}],rules:[{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-northeast-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-south-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-southeast-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-southeast-2"]}],endpoint:cr,[Te]:rt},JH,{conditions:[{[Ue]:Wt,[Be]:[Jt,"ca-central-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-central-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-north-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-2"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-3"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"sa-east-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,nW]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-east-2"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-west-1"]}],endpoint:cr,[Te]:rt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-west-2"]}],endpoint:cr,[Te]:rt},{endpoint:{url:qH,properties:{authSchemes:[{name:tW,signingName:rW,signingRegion:"{Region}"}]},headers:Qr},[Te]:rt}],[Te]:wo},{conditions:XH,rules:[{conditions:YH,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Te]:tu},{conditions:QH,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Te]:tu},{endpoint:{url:oW,properties:Qr,headers:Qr},[Te]:rt}],[Te]:wo},{conditions:[HH],rules:[{conditions:[WH],rules:[{conditions:[aW,cW],rules:[{conditions:[{[Ue]:Cs,[Be]:[Ab,KH]},ZH],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Te]:rt}],[Te]:wo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Te]:tu}],[Te]:wo},{conditions:YH,rules:[{conditions:[{[Ue]:Cs,[Be]:[KH,Ab]}],rules:[{conditions:[{[Ue]:Wt,[Be]:[{[Ue]:Pb,[Be]:[uW,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Qr,headers:Qr},[Te]:rt},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qr,headers:Qr},[Te]:rt}],[Te]:wo},{error:"FIPS is enabled but this partition does not support FIPS",[Te]:tu}],[Te]:wo},{conditions:QH,rules:[{conditions:[ZH],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Te]:rt}],[Te]:wo},{error:"DualStack is enabled but this partition does not support DualStack",[Te]:tu}],[Te]:wo},JH,{endpoint:{url:qH,properties:Qr,headers:Qr},[Te]:rt}],[Te]:wo}],[Te]:wo},{error:"Invalid Configuration: Missing Region",[Te]:tu}]};$E.ruleSet=ZUe});var dW=N(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.defaultEndpointResolver=void 0;var XUe=FH(),Cb=er(),YUe=lW(),QUe=new Cb.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),eBe=i((e,t={})=>QUe.get(e,()=>(0,Cb.resolveEndpoint)(YUe.ruleSet,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");kE.defaultEndpointResolver=eBe;Cb.customEndpointFunctions.aws=XUe.awsEndpointFunctions});var fW=N(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.getRuntimeConfig=void 0;var tBe=(Aa(),Q(va)),rBe=(mo(),Q(ll)),nBe=(Xe(),Q(fr)),oBe=ue(),iBe=Gr(),pW=gt(),mW=ft(),sBe=Eb(),aBe=dW(),cBe=i(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??pW.fromBase64,base64Encoder:e?.base64Encoder??pW.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??aBe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??sBe.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new tBe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new nBe.NoAuthSigner}],logger:e?.logger??new oBe.NoOpLogger,protocol:e?.protocol??rBe.AwsQueryProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??iBe.parseUrl,utf8Decoder:e?.utf8Decoder??mW.fromUtf8,utf8Encoder:e?.utf8Encoder??mW.toUtf8}),"getRuntimeConfig");DE.getRuntimeConfig=cBe});var SW=N(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.getRuntimeConfig=void 0;var uBe=(Ko(),Q(Jo)),lBe=uBe.__importDefault(kH()),Tb=(Aa(),Q(va)),gW=Mh(),hW=Hi(),ME=Nt(),dBe=(Xe(),Q(fr)),pBe=Wi(),yW=hr(),$a=cn(),_W=to(),EW=ue(),mBe=Ji(),fBe=Ki(),gBe=Mn(),hBe=fW(),yBe=i(e=>{(0,EW.emitWarningIfUnsupportedVersion)(process.version);let t=(0,fBe.resolveDefaultsModeConfig)(e),r=i(()=>t().then(EW.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,hBe.getRuntimeConfig)(e);(0,Tb.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,$a.loadConfig)(Tb.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??mBe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??gW.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,hW.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:lBe.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4")||(async c=>await(0,gW.defaultProvider)(c?.__config||{})()),"identityProvider"),signer:new Tb.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new dBe.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,$a.loadConfig)(yW.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,$a.loadConfig)(ME.NODE_REGION_CONFIG_OPTIONS,{...ME.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:_W.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,$a.loadConfig)({...yW.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||gBe.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??pBe.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??_W.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,$a.loadConfig)(ME.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,$a.loadConfig)(ME.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,$a.loadConfig)(hW.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");OE.getRuntimeConfig=yBe});var vW=N(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.resolveHttpAuthRuntimeConfig=ru.getHttpAuthExtensionConfiguration=void 0;var _Be=i(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let a=t.findIndex(c=>c.schemeId===o.schemeId);a===-1?t.push(o):t.splice(a,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},"getHttpAuthExtensionConfiguration");ru.getHttpAuthExtensionConfiguration=_Be;var EBe=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig");ru.resolveHttpAuthRuntimeConfig=EBe});var TW=N(NE=>{"use strict";Object.defineProperty(NE,"__esModule",{value:!0});NE.resolveRuntimeExtensions=void 0;var AW=go(),RW=Me(),PW=ue(),CW=vW(),SBe=i((e,t)=>{let r=Object.assign((0,AW.getAwsRegionExtensionConfiguration)(e),(0,PW.getDefaultExtensionConfiguration)(e),(0,RW.getHttpHandlerExtensionConfiguration)(e),(0,CW.getHttpAuthExtensionConfiguration)(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,AW.resolveAwsRegionExtensionConfiguration)(r),(0,PW.resolveDefaultRuntimeConfig)(r),(0,RW.resolveHttpHandlerRuntimeConfig)(r),(0,CW.resolveHttpAuthRuntimeConfig)(r))},"resolveRuntimeExtensions");NE.resolveRuntimeExtensions=SBe});var Sb=N(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.STSClient=nu.__Client=void 0;var xW=xi(),vBe=bi(),ABe=Ii(),bW=ti(),RBe=Nt(),xb=(Xe(),Q(fr)),PBe=(ke(),Q(Wo)),CBe=zi(),TBe=gr(),IW=hr(),$W=ue();Object.defineProperty(nu,"__Client",{enumerable:!0,get:i(function(){return $W.Client},"get")});var wW=Eb(),xBe=vb(),bBe=SW(),IBe=TW(),bb=class extends $W.Client{static{i(this,"STSClient")}config;constructor(...[t]){let r=(0,bBe.getRuntimeConfig)(t||{});super(r),this.initConfig=r;let n=(0,xBe.resolveClientEndpointParameters)(r),o=(0,bW.resolveUserAgentConfig)(n),a=(0,IW.resolveRetryConfig)(o),c=(0,RBe.resolveRegionConfig)(a),u=(0,xW.resolveHostHeaderConfig)(c),l=(0,TBe.resolveEndpointConfig)(u),d=(0,wW.resolveHttpAuthSchemeConfig)(l),_=(0,IBe.resolveRuntimeExtensions)(d,t?.extensions||[]);this.config=_,this.middlewareStack.use((0,PBe.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,bW.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,IW.getRetryPlugin)(this.config)),this.middlewareStack.use((0,CBe.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,xW.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,vBe.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ABe.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,xb.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:wW.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:i(async y=>new xb.DefaultIdentityProviderConfig({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use((0,xb.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}};nu.STSClient=bb});var F8=N(K=>{"use strict";var Kd=Sb(),Nr=ue(),Zn=gr(),Xn=vb(),en=(ke(),Q(Wo)),Ib=(yt(),Q(Pr)),wBe=go(),ur=class e extends Nr.ServiceException{static{i(this,"STSServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},LE=class e extends ur{static{i(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},zE=class e extends ur{static{i(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},UE=class e extends ur{static{i(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},BE=class e extends ur{static{i(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},GE=class e extends ur{static{i(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},FE=class e extends ur{static{i(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},jE=class e extends ur{static{i(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},qE=class e extends ur{static{i(this,"InvalidAuthorizationMessageException")}name="InvalidAuthorizationMessageException";$fault="client";constructor(t){super({name:"InvalidAuthorizationMessageException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},VE=class e extends ur{static{i(this,"ExpiredTradeInTokenException")}name="ExpiredTradeInTokenException";$fault="client";constructor(t){super({name:"ExpiredTradeInTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},HE=class e extends ur{static{i(this,"JWTPayloadSizeExceededException")}name="JWTPayloadSizeExceededException";$fault="client";constructor(t){super({name:"JWTPayloadSizeExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},WE=class e extends ur{static{i(this,"OutboundWebIdentityFederationDisabledException")}name="OutboundWebIdentityFederationDisabledException";$fault="client";constructor(t){super({name:"OutboundWebIdentityFederationDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},JE=class e extends ur{static{i(this,"SessionDurationEscalationException")}name="SessionDurationEscalationException";$fault="client";constructor(t){super({name:"SessionDurationEscalationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},wb="Arn",kW="AccessKeyId",$Be="AssumedPrincipal",kBe="AssumeRole",DBe="AssumedRoleId",MBe="AssumeRoleRequest",OBe="AssumeRoleResponse",NBe="AssumeRootRequest",LBe="AssumeRootResponse",iS="AssumedRoleUser",zBe="AssumeRoleWithSAML",UBe="AssumeRoleWithSAMLRequest",BBe="AssumeRoleWithSAMLResponse",GBe="AssumeRoleWithWebIdentity",FBe="AssumeRoleWithWebIdentityRequest",jBe="AssumeRoleWithWebIdentityResponse",qBe="AssumeRoot",DW="Account",$b="Audience",xs="Credentials",VBe="ContextAssertion",HBe="DecodeAuthorizationMessage",WBe="DecodeAuthorizationMessageRequest",JBe="DecodeAuthorizationMessageResponse",KBe="DecodedMessage",ka="DurationSeconds",MW="Expiration",ZBe="ExternalId",XBe="EncodedMessage",YBe="ExpiredTokenException",QBe="ExpiredTradeInTokenException",OW="FederatedUser",eGe="FederatedUserId",tGe="GetAccessKeyInfo",rGe="GetAccessKeyInfoRequest",nGe="GetAccessKeyInfoResponse",oGe="GetCallerIdentity",iGe="GetCallerIdentityRequest",sGe="GetCallerIdentityResponse",aGe="GetDelegatedAccessToken",cGe="GetDelegatedAccessTokenRequest",uGe="GetDelegatedAccessTokenResponse",lGe="GetFederationToken",dGe="GetFederationTokenRequest",pGe="GetFederationTokenResponse",mGe="GetSessionToken",fGe="GetSessionTokenRequest",gGe="GetSessionTokenResponse",hGe="GetWebIdentityToken",yGe="GetWebIdentityTokenRequest",_Ge="GetWebIdentityTokenResponse",EGe="Issuer",SGe="InvalidAuthorizationMessageException",vGe="IDPCommunicationErrorException",AGe="IDPRejectedClaimException",RGe="InvalidIdentityTokenException",PGe="JWTPayloadSizeExceededException",CGe="Key",TGe="MalformedPolicyDocumentException",xGe="Name",bGe="NameQualifier",IGe="OutboundWebIdentityFederationDisabledException",sS="Policy",aS="PolicyArns",wGe="PrincipalArn",$Ge="ProviderArn",kGe="ProvidedContexts",DGe="ProvidedContextsListType",MGe="ProvidedContext",OGe="PolicyDescriptorType",NGe="ProviderId",Yd="PackedPolicySize",LGe="PackedPolicyTooLargeException",zGe="Provider",kb="RoleArn",UGe="RegionDisabledException",NW="RoleSessionName",BGe="Subject",GGe="SigningAlgorithm",FGe="SecretAccessKey",jGe="SAMLAssertion",qGe="SAMLAssertionType",VGe="SessionDurationEscalationException",HGe="SubjectFromWebIdentityToken",Qd="SourceIdentity",LW="SerialNumber",WGe="SubjectType",JGe="SessionToken",Db="Tags",zW="TokenCode",KGe="TradeInToken",ZGe="TargetPrincipal",XGe="TaskPolicyArn",YGe="TransitiveTagKeys",QGe="Tag",eFe="UserId",tFe="Value",UW="WebIdentityToken",rFe="arn",nFe="accessKeySecretType",An="awsQueryError",Rn="client",oFe="clientTokenType",Pn="error",Cn="httpError",Tn="message",iFe="policyDescriptorListType",BW="smithy.ts.sdk.synthetic.com.amazonaws.sts",sFe="tradeInTokenType",aFe="tagListType",cFe="webIdentityTokenType",X="com.amazonaws.sts",uFe=[0,X,nFe,8,0],lFe=[0,X,oFe,8,0],dFe=[0,X,qGe,8,0],pFe=[0,X,sFe,8,0],mFe=[0,X,cFe,8,0],cS=[3,X,iS,0,[DBe,wb],[0,0],2],GW=[3,X,MBe,0,[kb,NW,aS,sS,ka,Db,YGe,ZBe,LW,zW,Qd,kGe],[0,0,()=>uS,0,1,()=>Ob,64,0,0,0,0,()=>fFe],2],FW=[3,X,OBe,0,[xs,iS,Yd,Qd],[[()=>bs,0],()=>cS,1,0]],jW=[3,X,UBe,0,[kb,wGe,jGe,aS,sS,ka],[0,0,[()=>dFe,0],()=>uS,0,1],3],qW=[3,X,BBe,0,[xs,iS,Yd,BGe,WGe,EGe,$b,bGe,Qd],[[()=>bs,0],()=>cS,1,0,0,0,0,0,0]],VW=[3,X,FBe,0,[kb,NW,UW,NGe,aS,sS,ka],[0,0,[()=>lFe,0],0,()=>uS,0,1],3],HW=[3,X,jBe,0,[xs,HGe,iS,Yd,zGe,$b,Qd],[[()=>bs,0],0,()=>cS,1,0,0,0]],WW=[3,X,NBe,0,[ZGe,XGe,ka],[0,()=>Mb,1],2],JW=[3,X,LBe,0,[xs,Qd],[[()=>bs,0],0]],bs=[3,X,xs,0,[kW,FGe,JGe,MW],[0,[()=>uFe,0],0,4],4],KW=[3,X,WBe,0,[XBe],[0],1],ZW=[3,X,JBe,0,[KBe],[0]],XW=[-3,X,YBe,{[An]:["ExpiredTokenException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(XW,LE);var YW=[-3,X,QBe,{[An]:["ExpiredTradeInTokenException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(YW,VE);var QW=[3,X,OW,0,[eGe,wb],[0,0],2],e8=[3,X,rGe,0,[kW],[0],1],t8=[3,X,nGe,0,[DW],[0]],r8=[3,X,iGe,0,[],[]],n8=[3,X,sGe,0,[eFe,DW,wb],[0,0,0]],o8=[3,X,cGe,0,[KGe],[[()=>pFe,0]],1],i8=[3,X,uGe,0,[xs,Yd,$Be],[[()=>bs,0],1,0]],s8=[3,X,dGe,0,[xGe,sS,aS,ka,Db],[0,0,()=>uS,1,()=>Ob],1],a8=[3,X,pGe,0,[xs,OW,Yd],[[()=>bs,0],()=>QW,1]],c8=[3,X,fGe,0,[ka,LW,zW],[1,0,0]],u8=[3,X,gGe,0,[xs],[[()=>bs,0]]],l8=[3,X,yGe,0,[$b,GGe,ka,Db],[64,0,1,()=>Ob],2],d8=[3,X,_Ge,0,[UW,MW],[[()=>mFe,0],4]],p8=[-3,X,vGe,{[An]:["IDPCommunicationError",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(p8,jE);var m8=[-3,X,AGe,{[An]:["IDPRejectedClaim",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(m8,GE);var f8=[-3,X,SGe,{[An]:["InvalidAuthorizationMessageException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(f8,qE);var g8=[-3,X,RGe,{[An]:["InvalidIdentityToken",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(g8,FE);var h8=[-3,X,PGe,{[An]:["JWTPayloadSizeExceededException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(h8,HE);var y8=[-3,X,TGe,{[An]:["MalformedPolicyDocument",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(y8,zE);var _8=[-3,X,IGe,{[An]:["OutboundWebIdentityFederationDisabledException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(_8,WE);var E8=[-3,X,LGe,{[An]:["PackedPolicyTooLarge",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(E8,UE);var Mb=[3,X,OGe,0,[rFe],[0]],S8=[3,X,MGe,0,[$Ge,VBe],[0,0]],v8=[-3,X,UGe,{[An]:["RegionDisabledException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(v8,BE);var A8=[-3,X,VGe,{[An]:["SessionDurationEscalationException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(A8,JE);var R8=[3,X,QGe,0,[CGe,tFe],[0,0],2],P8=[-3,BW,"STSServiceException",0,[],[]];en.TypeRegistry.for(BW).registerError(P8,ur);var uS=[1,X,iFe,0,()=>Mb],fFe=[1,X,DGe,0,()=>S8],Ob=[1,X,aFe,0,()=>R8],C8=[9,X,kBe,0,()=>GW,()=>FW],T8=[9,X,zBe,0,()=>jW,()=>qW],x8=[9,X,GBe,0,()=>VW,()=>HW],b8=[9,X,qBe,0,()=>WW,()=>JW],I8=[9,X,HBe,0,()=>KW,()=>ZW],w8=[9,X,tGe,0,()=>e8,()=>t8],$8=[9,X,oGe,0,()=>r8,()=>n8],k8=[9,X,aGe,0,()=>o8,()=>i8],D8=[9,X,lGe,0,()=>s8,()=>a8],M8=[9,X,mGe,0,()=>c8,()=>u8],O8=[9,X,hGe,0,()=>l8,()=>d8],Zd=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(C8).build(){static{i(this,"AssumeRoleCommand")}},KE=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").sc(T8).build(){static{i(this,"AssumeRoleWithSAMLCommand")}},Xd=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(x8).build(){static{i(this,"AssumeRoleWithWebIdentityCommand")}},ZE=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoot",{}).n("STSClient","AssumeRootCommand").sc(b8).build(){static{i(this,"AssumeRootCommand")}},XE=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").sc(I8).build(){static{i(this,"DecodeAuthorizationMessageCommand")}},YE=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").sc(w8).build(){static{i(this,"GetAccessKeyInfoCommand")}},QE=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").sc($8).build(){static{i(this,"GetCallerIdentityCommand")}},eS=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetDelegatedAccessToken",{}).n("STSClient","GetDelegatedAccessTokenCommand").sc(k8).build(){static{i(this,"GetDelegatedAccessTokenCommand")}},tS=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").sc(D8).build(){static{i(this,"GetFederationTokenCommand")}},rS=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").sc(M8).build(){static{i(this,"GetSessionTokenCommand")}},nS=class extends Nr.Command.classBuilder().ep(Xn.commonParams).m(function(t,r,n,o){return[Zn.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetWebIdentityToken",{}).n("STSClient","GetWebIdentityTokenCommand").sc(O8).build(){static{i(this,"GetWebIdentityTokenCommand")}},gFe={AssumeRoleCommand:Zd,AssumeRoleWithSAMLCommand:KE,AssumeRoleWithWebIdentityCommand:Xd,AssumeRootCommand:ZE,DecodeAuthorizationMessageCommand:XE,GetAccessKeyInfoCommand:YE,GetCallerIdentityCommand:QE,GetDelegatedAccessTokenCommand:eS,GetFederationTokenCommand:tS,GetSessionTokenCommand:rS,GetWebIdentityTokenCommand:nS},oS=class extends Kd.STSClient{static{i(this,"STS")}};Nr.createAggregatedClient(gFe,oS);var N8=i(e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},"getAccountIdFromAssumedRoleUser"),L8=i(async(e,t,r,n={})=>{let o=typeof e=="function"?await e():e,a=typeof t=="function"?await t():t,c="",u=o??a??(c=await wBe.stsRegionDefaultResolver(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (credential provider clientConfig)`,`${a} (contextual client)`,`${c} (STS default: AWS_REGION, profile region, or us-east-1)`),u},"resolveRegion"),hFe=i((e,t)=>{let r,n;return async(o,a)=>{if(n=o,!r){let{logger:_=e?.parentClientConfig?.logger,profile:y=e?.parentClientConfig?.profile,region:E,requestHandler:g=e?.parentClientConfig?.requestHandler,credentialProviderLogger:v,userAgentAppId:A=e?.parentClientConfig?.userAgentAppId}=e,R=await L8(E,e?.parentClientConfig?.region,v,{logger:_,profile:y}),b=!z8(g);r=new t({...e,userAgentAppId:A,profile:y,credentialDefaultProvider:i(()=>async()=>n,"credentialDefaultProvider"),region:R,requestHandler:b?g:void 0,logger:_})}let{Credentials:c,AssumedRoleUser:u}=await r.send(new Zd(a));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`);let l=N8(u),d={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...l&&{accountId:l}};return Ib.setCredentialFeature(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}},"getDefaultRoleAssumer$1"),yFe=i((e,t)=>{let r;return async n=>{if(!r){let{logger:l=e?.parentClientConfig?.logger,profile:d=e?.parentClientConfig?.profile,region:_,requestHandler:y=e?.parentClientConfig?.requestHandler,credentialProviderLogger:E,userAgentAppId:g=e?.parentClientConfig?.userAgentAppId}=e,v=await L8(_,e?.parentClientConfig?.region,E,{logger:l,profile:d}),A=!z8(y);r=new t({...e,userAgentAppId:g,profile:d,region:v,requestHandler:A?y:void 0,logger:l})}let{Credentials:o,AssumedRoleUser:a}=await r.send(new Xd(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let c=N8(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return c&&Ib.setCredentialFeature(u,"RESOLVED_ACCOUNT_ID","T"),Ib.setCredentialFeature(u,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),u}},"getDefaultRoleAssumerWithWebIdentity$1"),z8=i(e=>e?.metadata?.handlerProtocol==="h2","isH2"),U8=i((e,t)=>t?class extends e{static{i(this,"CustomizableSTSClient")}constructor(n){super(n);for(let o of t)this.middlewareStack.use(o)}}:e,"getCustomizableStsClientCtor"),B8=i((e={},t)=>hFe(e,U8(Kd.STSClient,t)),"getDefaultRoleAssumer"),G8=i((e={},t)=>yFe(e,U8(Kd.STSClient,t)),"getDefaultRoleAssumerWithWebIdentity"),_Fe=i(e=>t=>e({roleAssumer:B8(t),roleAssumerWithWebIdentity:G8(t),...t}),"decorateDefaultCredentialProvider");Object.defineProperty(K,"$Command",{enumerable:!0,get:i(function(){return Nr.Command},"get")});K.AssumeRole$=C8;K.AssumeRoleCommand=Zd;K.AssumeRoleRequest$=GW;K.AssumeRoleResponse$=FW;K.AssumeRoleWithSAML$=T8;K.AssumeRoleWithSAMLCommand=KE;K.AssumeRoleWithSAMLRequest$=jW;K.AssumeRoleWithSAMLResponse$=qW;K.AssumeRoleWithWebIdentity$=x8;K.AssumeRoleWithWebIdentityCommand=Xd;K.AssumeRoleWithWebIdentityRequest$=VW;K.AssumeRoleWithWebIdentityResponse$=HW;K.AssumeRoot$=b8;K.AssumeRootCommand=ZE;K.AssumeRootRequest$=WW;K.AssumeRootResponse$=JW;K.AssumedRoleUser$=cS;K.Credentials$=bs;K.DecodeAuthorizationMessage$=I8;K.DecodeAuthorizationMessageCommand=XE;K.DecodeAuthorizationMessageRequest$=KW;K.DecodeAuthorizationMessageResponse$=ZW;K.ExpiredTokenException=LE;K.ExpiredTokenException$=XW;K.ExpiredTradeInTokenException=VE;K.ExpiredTradeInTokenException$=YW;K.FederatedUser$=QW;K.GetAccessKeyInfo$=w8;K.GetAccessKeyInfoCommand=YE;K.GetAccessKeyInfoRequest$=e8;K.GetAccessKeyInfoResponse$=t8;K.GetCallerIdentity$=$8;K.GetCallerIdentityCommand=QE;K.GetCallerIdentityRequest$=r8;K.GetCallerIdentityResponse$=n8;K.GetDelegatedAccessToken$=k8;K.GetDelegatedAccessTokenCommand=eS;K.GetDelegatedAccessTokenRequest$=o8;K.GetDelegatedAccessTokenResponse$=i8;K.GetFederationToken$=D8;K.GetFederationTokenCommand=tS;K.GetFederationTokenRequest$=s8;K.GetFederationTokenResponse$=a8;K.GetSessionToken$=M8;K.GetSessionTokenCommand=rS;K.GetSessionTokenRequest$=c8;K.GetSessionTokenResponse$=u8;K.GetWebIdentityToken$=O8;K.GetWebIdentityTokenCommand=nS;K.GetWebIdentityTokenRequest$=l8;K.GetWebIdentityTokenResponse$=d8;K.IDPCommunicationErrorException=jE;K.IDPCommunicationErrorException$=p8;K.IDPRejectedClaimException=GE;K.IDPRejectedClaimException$=m8;K.InvalidAuthorizationMessageException=qE;K.InvalidAuthorizationMessageException$=f8;K.InvalidIdentityTokenException=FE;K.InvalidIdentityTokenException$=g8;K.JWTPayloadSizeExceededException=HE;K.JWTPayloadSizeExceededException$=h8;K.MalformedPolicyDocumentException=zE;K.MalformedPolicyDocumentException$=y8;K.OutboundWebIdentityFederationDisabledException=WE;K.OutboundWebIdentityFederationDisabledException$=_8;K.PackedPolicyTooLargeException=UE;K.PackedPolicyTooLargeException$=E8;K.PolicyDescriptorType$=Mb;K.ProvidedContext$=S8;K.RegionDisabledException=BE;K.RegionDisabledException$=v8;K.STS=oS;K.STSServiceException=ur;K.STSServiceException$=P8;K.SessionDurationEscalationException=JE;K.SessionDurationEscalationException$=A8;K.Tag$=R8;K.decorateDefaultCredentialProvider=_Fe;K.getDefaultRoleAssumer=B8;K.getDefaultRoleAssumerWithWebIdentity=G8;Object.keys(Kd).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(K,e)&&Object.defineProperty(K,e,{enumerable:!0,get:i(function(){return Kd[e]},"get")})})});var CJ=N(Ie=>{"use strict";var ks=Wa(),Da=ft(),$Fe=Cp(),iJ=Me(),rJ=It(),xS=zp(),sJ="X-Amz-Algorithm",aJ="X-Amz-Credential",qb="X-Amz-Date",cJ="X-Amz-SignedHeaders",uJ="X-Amz-Expires",Vb="X-Amz-Signature",Hb="X-Amz-Security-Token",kFe="X-Amz-Region-Set",Wb="authorization",Jb=qb.toLowerCase(),lJ="date",dJ=[Wb,Jb,lJ],pJ=Vb.toLowerCase(),kS="x-amz-content-sha256",mJ=Hb.toLowerCase(),DFe="host",fJ={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},gJ=/^proxy-/,hJ=/^sec-/,MFe=[/^proxy-/i,/^sec-/i],bS="AWS4-HMAC-SHA256",OFe="AWS4-ECDSA-P256-SHA256",yJ="AWS4-HMAC-SHA256-PAYLOAD",_J="UNSIGNED-PAYLOAD",EJ=50,Kb="aws4_request",SJ=3600*24*7,ou={},IS=[],wS=i((e,t,r)=>`${e}/${t}/${r}/${Kb}`,"createScope"),vJ=i(async(e,t,r,n,o)=>{let a=await nJ(e,t.secretAccessKey,t.accessKeyId),c=`${r}:${n}:${o}:${ks.toHex(a)}:${t.sessionToken}`;if(c in ou)return ou[c];for(IS.push(c);IS.length>EJ;)delete ou[IS.shift()];let u=`AWS4${t.secretAccessKey}`;for(let l of[r,n,o,Kb])u=await nJ(e,u,l);return ou[c]=u},"getSigningKey"),NFe=i(()=>{IS.length=0,Object.keys(ou).forEach(e=>{delete ou[e]})},"clearCredentialCache"),nJ=i((e,t,r)=>{let n=new e(t);return n.update(Da.toUint8Array(r)),n.digest()},"hmac"),Ub=i(({headers:e},t,r)=>{let n={};for(let o of Object.keys(e).sort()){if(e[o]==null)continue;let a=o.toLowerCase();(a in fJ||t?.has(a)||gJ.test(a)||hJ.test(a))&&(!r||r&&!r.has(a))||(n[a]=e[o].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),$S=i(async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===kS)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||$Fe.isArrayBuffer(t)){let n=new r;return n.update(Da.toUint8Array(t)),ks.toHex(await n.digest())}return _J},"getPayloadHash"),Bb=class{static{i(this,"HeaderFormatter")}format(t){let r=[];for(let a of Object.keys(t)){let c=Da.fromUtf8(a);r.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(t[a]))}let n=new Uint8Array(r.reduce((a,c)=>a+c.byteLength,0)),o=0;for(let a of r)n.set(a,o),o+=a.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let o=new Uint8Array(9);return o[0]=5,o.set(t.value.bytes,1),o;case"binary":let a=new DataView(new ArrayBuffer(3+t.value.byteLength));a.setUint8(0,6),a.setUint16(1,t.value.byteLength,!1);let c=new Uint8Array(a.buffer);return c.set(t.value,3),c;case"string":let u=Da.fromUtf8(t.value),l=new DataView(new ArrayBuffer(3+u.byteLength));l.setUint8(0,7),l.setUint16(1,u.byteLength,!1);let d=new Uint8Array(l.buffer);return d.set(u,3),d;case"timestamp":let _=new Uint8Array(9);return _[0]=8,_.set(Gb.fromNumber(t.value.valueOf()).bytes,1),_;case"uuid":if(!LFe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let y=new Uint8Array(17);return y[0]=9,y.set(ks.fromHex(t.value.replace(/\-/g,"")),1),y}}},LFe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Gb=class e{static{i(this,"Int64")}bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&oJ(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&oJ(t),parseInt(ks.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function oJ(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(oJ,"negate");var AJ=i((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader"),RJ=i((e,t={})=>{let{headers:r,query:n={}}=iJ.HttpRequest.clone(e);for(let o of Object.keys(r)){let a=o.toLowerCase();(a.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(a)||t.hoistableHeaders?.has(a))&&(n[o]=r[o],delete r[o])}return{...e,headers:r,query:n}},"moveHeadersToQuery"),Fb=i(e=>{e=iJ.HttpRequest.clone(e);for(let t of Object.keys(e.headers))dJ.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest"),PJ=i(({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e)){if(n.toLowerCase()===pJ)continue;let o=xS.escapeUri(n);t.push(o);let a=e[n];typeof a=="string"?r[o]=`${o}=${xS.escapeUri(a)}`:Array.isArray(a)&&(r[o]=a.slice(0).reduce((c,u)=>c.concat([`${o}=${xS.escapeUri(u)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},"getCanonicalQuery"),zFe=i(e=>UFe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),UFe=i(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate"),DS=class{static{i(this,"SignatureV4Base")}service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c=!0}){this.service=o,this.sha256=a,this.uriEscapePath=c,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=rJ.normalizeProvider(n),this.credentialProvider=rJ.normalizeProvider(r)}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
|
|
59
|
+
${this.getCanonicalPath(t)}
|
|
60
|
+
${PJ(t)}
|
|
61
|
+
${o.map(a=>`${a}:${r[a]}`).join(`
|
|
62
|
+
`)}
|
|
63
|
+
|
|
64
|
+
${o.join(";")}
|
|
65
|
+
${n}`}async createStringToSign(t,r,n,o){let a=new this.sha256;a.update(Da.toUint8Array(n));let c=await a.digest();return`${o}
|
|
66
|
+
${t}
|
|
67
|
+
${r}
|
|
68
|
+
${ks.toHex(c)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let a of t.split("/"))a?.length!==0&&a!=="."&&(a===".."?r.pop():r.push(a));let n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return xS.escapeUri(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){let r=zFe(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}},jb=class extends DS{static{i(this,"SignatureV4")}headerFormatter=new Bb;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c=!0}){super({applyChecksum:t,credentials:r,region:n,service:o,sha256:a,uriEscapePath:c})}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:a,unhoistableHeaders:c,signableHeaders:u,hoistableHeaders:l,signingRegion:d,signingService:_}=r,y=await this.credentialProvider();this.validateResolvedCredentials(y);let E=d??await this.regionProvider(),{longDate:g,shortDate:v}=this.formatDate(n);if(o>SJ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let A=wS(v,E,_??this.service),R=RJ(Fb(t),{unhoistableHeaders:c,hoistableHeaders:l});y.sessionToken&&(R.query[Hb]=y.sessionToken),R.query[sJ]=bS,R.query[aJ]=`${y.accessKeyId}/${A}`,R.query[qb]=g,R.query[uJ]=o.toString(10);let b=Ub(R,a,u);return R.query[cJ]=this.getCanonicalHeaderList(b),R.query[Vb]=await this.getSignature(g,A,this.getSigningKey(y,E,v,_),this.createCanonicalRequest(R,b,await $S(t,this.sha256))),R}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:o,signingRegion:a,signingService:c}){let u=a??await this.regionProvider(),{shortDate:l,longDate:d}=this.formatDate(n),_=wS(l,u,c??this.service),y=await $S({headers:{},body:r},this.sha256),E=new this.sha256;E.update(t);let g=ks.toHex(await E.digest()),v=[yJ,d,_,o,g,y].join(`
|
|
69
|
+
`);return this.signString(v,{signingDate:n,signingRegion:u,signingService:c})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:o,priorSignature:t.priorSignature}).then(c=>({message:t.message,signature:c}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:o}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=n??await this.regionProvider(),{shortDate:u}=this.formatDate(r),l=new this.sha256(await this.getSigningKey(a,c,u,o));return l.update(Da.toUint8Array(t)),ks.toHex(await l.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:a,signingService:c}={}){let u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=a??await this.regionProvider(),d=Fb(t),{longDate:_,shortDate:y}=this.formatDate(r),E=wS(y,l,c??this.service);d.headers[Jb]=_,u.sessionToken&&(d.headers[mJ]=u.sessionToken);let g=await $S(d,this.sha256);!AJ(kS,d.headers)&&this.applyChecksum&&(d.headers[kS]=g);let v=Ub(d,o,n),A=await this.getSignature(_,E,this.getSigningKey(u,l,y,c),this.createCanonicalRequest(d,v,g));return d.headers[Wb]=`${bS} Credential=${u.accessKeyId}/${E}, SignedHeaders=${this.getCanonicalHeaderList(v)}, Signature=${A}`,d}async getSignature(t,r,n,o){let a=await this.createStringToSign(t,r,o,bS),c=new this.sha256(await n);return c.update(Da.toUint8Array(a)),ks.toHex(await c.digest())}getSigningKey(t,r,n,o){return vJ(this.sha256,t,n,r,o||this.service)}},BFe={SignatureV4a:null};Ie.ALGORITHM_IDENTIFIER=bS;Ie.ALGORITHM_IDENTIFIER_V4A=OFe;Ie.ALGORITHM_QUERY_PARAM=sJ;Ie.ALWAYS_UNSIGNABLE_HEADERS=fJ;Ie.AMZ_DATE_HEADER=Jb;Ie.AMZ_DATE_QUERY_PARAM=qb;Ie.AUTH_HEADER=Wb;Ie.CREDENTIAL_QUERY_PARAM=aJ;Ie.DATE_HEADER=lJ;Ie.EVENT_ALGORITHM_IDENTIFIER=yJ;Ie.EXPIRES_QUERY_PARAM=uJ;Ie.GENERATED_HEADERS=dJ;Ie.HOST_HEADER=DFe;Ie.KEY_TYPE_IDENTIFIER=Kb;Ie.MAX_CACHE_SIZE=EJ;Ie.MAX_PRESIGNED_TTL=SJ;Ie.PROXY_HEADER_PATTERN=gJ;Ie.REGION_SET_PARAM=kFe;Ie.SEC_HEADER_PATTERN=hJ;Ie.SHA256_HEADER=kS;Ie.SIGNATURE_HEADER=pJ;Ie.SIGNATURE_QUERY_PARAM=Vb;Ie.SIGNED_HEADERS_QUERY_PARAM=cJ;Ie.SignatureV4=jb;Ie.SignatureV4Base=DS;Ie.TOKEN_HEADER=mJ;Ie.TOKEN_QUERY_PARAM=Hb;Ie.UNSIGNABLE_PATTERNS=MFe;Ie.UNSIGNED_PAYLOAD=_J;Ie.clearCredentialCache=NFe;Ie.createScope=wS;Ie.getCanonicalHeaders=Ub;Ie.getCanonicalQuery=PJ;Ie.getPayloadHash=$S;Ie.getSigningKey=vJ;Ie.hasHeader=AJ;Ie.moveHeadersToQuery=RJ;Ie.prepareRequest=Fb;Ie.signatureV4aContainer=BFe});var TJ=N(Ds=>{"use strict";var GFe=Uo(),FFe=i(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),"getHttpHandlerExtensionConfiguration"),jFe=i(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Zb=class{static{i(this,"Field")}name;kind;values;constructor({name:t,kind:r=GFe.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}},Xb=class{static{i(this,"Fields")}entries={};encoding;constructor({fields:t=[],encoding:r="utf-8"}){t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}},Yb=class e{static{i(this,"HttpRequest")}method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let r=new e({...t,headers:{...t.headers}});return r.query&&(r.query=qFe(r.query)),r}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return e.clone(this)}};function qFe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}i(qFe,"cloneQuery");var Qb=class{static{i(this,"HttpResponse")}statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};function VFe(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}i(VFe,"isValidHostname");Ds.Field=Zb;Ds.Fields=Xb;Ds.HttpRequest=Yb;Ds.HttpResponse=Qb;Ds.getHttpHandlerExtensionConfiguration=FFe;Ds.isValidHostname=VFe;Ds.resolveHttpHandlerRuntimeConfig=jFe});var eI=N(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.MAX_HASHABLE_LENGTH=xn.INIT=xn.KEY=xn.DIGEST_LENGTH=xn.BLOCK_SIZE=void 0;xn.BLOCK_SIZE=64;xn.DIGEST_LENGTH=32;xn.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);xn.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];xn.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var xJ=N(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.RawSha256=void 0;var bn=eI(),HFe=(function(){function e(){this.state=Int32Array.from(bn.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return i(e,"RawSha256"),e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>bn.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===bn.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%bn.BLOCK_SIZE>=bn.BLOCK_SIZE-8){for(var o=this.bufferLength;o<bn.BLOCK_SIZE;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<bn.BLOCK_SIZE-8;o++)r.setUint8(o,0);r.setUint32(bn.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),r.setUint32(bn.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(bn.DIGEST_LENGTH),o=0;o<8;o++)a[o*4]=this.state[o]>>>24&255,a[o*4+1]=this.state[o]>>>16&255,a[o*4+2]=this.state[o]>>>8&255,a[o*4+3]=this.state[o]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,o=n[0],a=n[1],c=n[2],u=n[3],l=n[4],d=n[5],_=n[6],y=n[7],E=0;E<bn.BLOCK_SIZE;E++){if(E<16)this.temp[E]=(r[E*4]&255)<<24|(r[E*4+1]&255)<<16|(r[E*4+2]&255)<<8|r[E*4+3]&255;else{var g=this.temp[E-2],v=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10;g=this.temp[E-15];var A=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3;this.temp[E]=(v+this.temp[E-7]|0)+(A+this.temp[E-16]|0)}var R=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&d^~l&_)|0)+(y+(bn.KEY[E]+this.temp[E]|0)|0)|0,b=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&c^a&c)|0;y=_,_=d,d=l,l=u+R|0,u=c,c=a,a=o,o=R+b|0}n[0]+=o,n[1]+=a,n[2]+=c,n[3]+=u,n[4]+=l,n[5]+=d,n[6]+=_,n[7]+=y},e})();MS.RawSha256=HFe});var IJ=N(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});LS.Sha256=void 0;var bJ=(Ko(),Q(Jo)),NS=eI(),OS=xJ(),tI=Bm(),WFe=(function(){function e(t){this.secret=t,this.hash=new OS.RawSha256,this.reset()}return i(e,"Sha256"),e.prototype.update=function(t){if(!((0,tI.isEmptyData)(t)||this.error))try{this.hash.update((0,tI.convertToBuffer)(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return bJ.__awaiter(this,void 0,void 0,function(){return bJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new OS.RawSha256,this.secret){this.outer=new OS.RawSha256;var t=JFe(this.secret),r=new Uint8Array(NS.BLOCK_SIZE);r.set(t);for(var n=0;n<NS.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();LS.Sha256=WFe;function JFe(e){var t=(0,tI.convertToBuffer)(e);if(t.byteLength>NS.BLOCK_SIZE){var r=new OS.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(NS.BLOCK_SIZE);return n.set(t),n}i(JFe,"bufferFromSecret")});var wJ=N(rI=>{"use strict";Object.defineProperty(rI,"__esModule",{value:!0});var KFe=(Ko(),Q(Jo));KFe.__exportStar(IJ(),rI)});var QFe={};bt(QFe,{awsBedrock:()=>YFe});module.exports=Q(QFe);var x5=Object.freeze({status:"aborted"});function re(e,t,r){function n(u,l){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:l,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,l);let d=c.prototype,_=Object.keys(d);for(let y=0;y<_.length;y++){let E=_[y];E in u||(u[E]=d[E].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function c(u){var l;let d=r?.Parent?new a:this;n(d,u),(l=d._zod).deferred??(l.deferred=[]);for(let _ of d._zod.deferred)_();return d}return i(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}i(re,"$constructor");var Yn=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},tp=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},WS={};function Do(e){return e&&Object.assign(WS,e),WS}i(Do,"config");function KS(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(KS,"getEnumValues");function fI(e,t){return typeof t=="bigint"?t.toString():t}i(fI,"jsonStringifyReplacer");function np(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(np,"cached");function gI(e){return e==null}i(gI,"nullish");function op(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(op,"cleanRegex");var mI=Symbol("evaluating");function St(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==mI)return n===void 0&&(n=mI,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(St,"defineLazy");var ZS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function au(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(au,"isObject");var b5=np(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function hI(e){if(au(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(au(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(hI,"isPlainObject");var yI=new Set(["string","number","symbol"]);function Na(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Na,"escapeRegex");function ip(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i(ip,"clone");function et(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(et,"normalizeParams");function _I(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(_I,"optionalKeys");var EI={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function La(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(La,"aborted");function _i(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(_i,"prefixIssues");function rp(e){return typeof e=="string"?e:e?.message}i(rp,"unwrapMessage");function Ei(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=rp(e.inst?._zod.def?.error?.(e))??rp(t?.error?.(e))??rp(r.customError?.(e))??rp(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Ei,"finalizeIssue");function SI(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(SI,"getLengthableOrigin");function XS(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(XS,"issue");var vI=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fI,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),AI=re("$ZodError",vI),cu=re("$ZodError",vI,{Parent:Error});var w5=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new Yn;if(c.issues.length){let u=new(o?.Err??e)(c.issues.map(l=>Ei(l,a,Do())));throw ZS(u,o?.callee),u}return c.value},"_parse"),sp=w5(cu),$5=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){let u=new(o?.Err??e)(c.issues.map(l=>Ei(l,a,Do())));throw ZS(u,o?.callee),u}return c.value},"_parseAsync"),ap=$5(cu),k5=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Yn;return a.issues.length?{success:!1,error:new(e??AI)(a.issues.map(c=>Ei(c,o,Do())))}:{success:!0,data:a.value}},"_safeParse"),uu=k5(cu),D5=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(c=>Ei(c,o,Do())))}:{success:!0,data:a.value}},"_safeParseAsync"),lu=D5(cu);var M5="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",O5=new RegExp(`^${M5}$`);var RI=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),PI=/^-?\d+n?$/,CI=/^-?\d+$/,YS=/^-?\d+(?:\.\d+)?$/,TI=/^(?:true|false)$/i;var Si=re("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),N5={number:"number",bigint:"bigint",object:"date"};var xI=re("$ZodCheckGreaterThan",(e,t)=>{Si.init(e,t);let r=N5[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var bI=re("$ZodCheckNumberFormat",(e,t)=>{Si.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,a]=EI[t.format];e._zod.onattach.push(c=>{let u=c._zod.bag;u.format=t.format,u.minimum=o,u.maximum=a,r&&(u.pattern=CI)}),e._zod.check=c=>{let u=c.value;if(r){if(!Number.isInteger(u)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>a&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}});var II=re("$ZodCheckMinLength",(e,t)=>{var r;Si.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!gI(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let c=SI(o);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var QS=re("$ZodCheckStringFormat",(e,t)=>{var r,n;Si.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),wI=re("$ZodCheckRegex",(e,t)=>{QS.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var kI={major:4,minor:3,patch:6};var ut=re("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kI;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((c,u,l)=>{let d=La(c),_;for(let y of u){if(y._zod.def.when){if(!y._zod.def.when(c))continue}else if(d)continue;let E=c.issues.length,g=y._zod.check(c);if(g instanceof Promise&&l?.async===!1)throw new Yn;if(_||g instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await g,c.issues.length!==E&&(d||(d=La(c,E)))});else{if(c.issues.length===E)continue;d||(d=La(c,E))}}return _?_.then(()=>c):c},"runChecks"),a=i((c,u,l)=>{if(La(c))return c.aborted=!0,c;let d=o(u,n,l);if(d instanceof Promise){if(l.async===!1)throw new Yn;return d.then(_=>e._zod.parse(_,l))}return e._zod.parse(d,l)},"handleCanaryResult");e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){let d=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(_=>a(_,c,u)):a(d,c,u)}let l=e._zod.parse(c,u);if(l instanceof Promise){if(u.async===!1)throw new Yn;return l.then(d=>o(d,n,u))}return o(l,n,u)}}St(e,"~standard",()=>({validate:i(o=>{try{let a=uu(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return lu(e,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),lp=re("$ZodString",(e,t)=>{ut.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??RI(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ev=re("$ZodStringFormat",(e,t)=>{QS.init(e,t),lp.init(e,t)});var LI=re("$ZodURL",(e,t)=>{ev.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var tv=re("$ZodNumber",(e,t)=>{ut.init(e,t),e._zod.pattern=e._zod.bag.pattern??YS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}}),zI=re("$ZodNumberFormat",(e,t)=>{bI.init(e,t),tv.init(e,t)}),rv=re("$ZodBoolean",(e,t)=>{ut.init(e,t),e._zod.pattern=TI,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),UI=re("$ZodBigInt",(e,t)=>{ut.init(e,t),e._zod.pattern=PI,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var BI=re("$ZodAny",(e,t)=>{ut.init(e,t),e._zod.parse=r=>r}),GI=re("$ZodUnknown",(e,t)=>{ut.init(e,t),e._zod.parse=r=>r});var FI=re("$ZodVoid",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),jI=re("$ZodDate",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function DI(e,t,r){e.issues.length&&t.issues.push(..._i(r,e.issues)),t.value[r]=e.value}i(DI,"handleArrayResult");var qI=re("$ZodArray",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let a=[];for(let c=0;c<o.length;c++){let u=o[c],l=t.element._zod.run({value:u,issues:[]},n);l instanceof Promise?a.push(l.then(d=>DI(d,r,c))):DI(l,r,c)}return a.length?Promise.all(a).then(()=>r):r}});function up(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(..._i(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(up,"handlePropertyResult");function L5(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=_I(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(L5,"normalizeDef");function z5(e,t,r,n,o,a){let c=[],u=o.keySet,l=o.catchall._zod,d=l.def.type,_=l.optout==="optional";for(let y in t){if(u.has(y))continue;if(d==="never"){c.push(y);continue}let E=l.run({value:t[y],issues:[]},n);E instanceof Promise?e.push(E.then(g=>up(g,r,y,t,_))):up(E,r,y,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(z5,"handleCatchall");var VI=re("$ZodObject",(e,t)=>{if(ut.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let l={...u};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let n=np(()=>L5(t));St(e._zod,"propValues",()=>{let u=t.shape,l={};for(let d in u){let _=u[d]._zod;if(_.values){l[d]??(l[d]=new Set);for(let y of _.values)l[d].add(y)}}return l});let o=au,a=t.catchall,c;e._zod.parse=(u,l)=>{c??(c=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let _=[],y=c.shape;for(let E of c.keys){let g=y[E],v=g._zod.optout==="optional",A=g._zod.run({value:d[E],issues:[]},l);A instanceof Promise?_.push(A.then(R=>up(R,u,E,d,v))):up(A,u,E,d,v)}return a?z5(_,d,u,l,n.value,e):_.length?Promise.all(_).then(()=>u):u}});function MI(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!La(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(c=>Ei(c,n,Do())))}),t)}i(MI,"handleUnionResults");var nv=re("$ZodUnion",(e,t)=>{ut.init(e,t),St(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),St(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),St(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),St(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>op(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let c=!1,u=[];for(let l of t.options){let d=l._zod.run({value:o.value,issues:[]},a);if(d instanceof Promise)u.push(d),c=!0;else{if(d.issues.length===0)return d;u.push(d)}}return c?Promise.all(u).then(l=>MI(l,o,e,a)):MI(u,o,e,a)}});var HI=re("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,nv.init(e,t);let r=e._zod.parse;St(e._zod,"propValues",()=>{let o={};for(let a of t.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[u,l]of Object.entries(c)){o[u]||(o[u]=new Set);for(let d of l)o[u].add(d)}}return o});let n=np(()=>{let o=t.options,a=new Map;for(let c of o){let u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let l of u){if(a.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);a.set(l,c)}}return a});e._zod.parse=(o,a)=>{let c=o.value;if(!au(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),o;let u=n.value.get(c?.[t.discriminator]);return u?u._zod.run(o,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),o)}});var WI=re("$ZodRecord",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!hI(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],c=t.keyType._zod.values;if(c){r.value={};let u=new Set;for(let d of c)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let _=t.valueType._zod.run({value:o[d],issues:[]},n);_ instanceof Promise?a.push(_.then(y=>{y.issues.length&&r.issues.push(..._i(d,y.issues)),r.value[d]=y.value})):(_.issues.length&&r.issues.push(..._i(d,_.issues)),r.value[d]=_.value)}let l;for(let d in o)u.has(d)||(l=l??[],l.push(d));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let l=t.keyType._zod.run({value:u,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&YS.test(u)&&l.issues.length){let y=t.keyType._zod.run({value:Number(u),issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(l=y)}if(l.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(y=>Ei(y,n,Do())),input:u,path:[u],inst:e});continue}let _=t.valueType._zod.run({value:o[u],issues:[]},n);_ instanceof Promise?a.push(_.then(y=>{y.issues.length&&r.issues.push(..._i(u,y.issues)),r.value[l.value]=y.value})):(_.issues.length&&r.issues.push(..._i(u,_.issues)),r.value[l.value]=_.value)}}return a.length?Promise.all(a).then(()=>r):r}});var JI=re("$ZodEnum",(e,t)=>{ut.init(e,t);let r=KS(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>yI.has(typeof o)).map(o=>typeof o=="string"?Na(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let c=o.value;return n.has(c)||o.issues.push({code:"invalid_value",values:r,input:c,inst:e}),o}}),KI=re("$ZodLiteral",(e,t)=>{if(ut.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Na(n):n?Na(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var ZI=re("$ZodTransform",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new tp(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(r.value=c,r));if(o instanceof Promise)throw new Yn;return r.value=o,r}});function OI(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(OI,"handleOptionalResult");var XI=re("$ZodOptional",(e,t)=>{ut.init(e,t),e._zod.optin="optional",e._zod.optout="optional",St(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),St(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${op(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>OI(a,r.value)):OI(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var YI=re("$ZodNullable",(e,t)=>{ut.init(e,t),St(e._zod,"optin",()=>t.innerType._zod.optin),St(e._zod,"optout",()=>t.innerType._zod.optout),St(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${op(r.source)}|null)$`):void 0}),St(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var QI=re("$ZodPipe",(e,t)=>{ut.init(e,t),St(e._zod,"values",()=>t.in._zod.values),St(e._zod,"optin",()=>t.in._zod.optin),St(e._zod,"optout",()=>t.out._zod.optout),St(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(c=>cp(c,t.in,n)):cp(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>cp(a,t.out,n)):cp(o,t.out,n)}});function cp(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(cp,"handlePipeResult");var ew=re("$ZodCustom",(e,t)=>{Si.init(e,t),ut.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(a=>NI(a,r,n,e));NI(o,r,n,e)}});function NI(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(XS(o))}}i(NI,"handleRefineResult");var rw;var ov=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function nw(){return new ov}i(nw,"registry");(rw=globalThis).__zod_globalRegistry??(rw.__zod_globalRegistry=nw());var iv=globalThis.__zod_globalRegistry;function ow(e,t){return new e({type:"string",...et(t)})}i(ow,"_string");function iw(e,t){return new e({type:"string",coerce:!0,...et(t)})}i(iw,"_coercedString");function sw(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}i(sw,"_url");function aw(e,t){return new e({type:"number",checks:[],...et(t)})}i(aw,"_number");function cw(e,t){return new e({type:"number",coerce:!0,checks:[],...et(t)})}i(cw,"_coercedNumber");function uw(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}i(uw,"_int");function lw(e,t){return new e({type:"boolean",...et(t)})}i(lw,"_boolean");function dw(e,t){return new e({type:"boolean",coerce:!0,...et(t)})}i(dw,"_coercedBoolean");function pw(e,t){return new e({type:"bigint",coerce:!0,...et(t)})}i(pw,"_coercedBigint");function mw(e){return new e({type:"any"})}i(mw,"_any");function fw(e){return new e({type:"unknown"})}i(fw,"_unknown");function gw(e,t){return new e({type:"void",...et(t)})}i(gw,"_void");function hw(e,t){return new e({type:"date",coerce:!0,...et(t)})}i(hw,"_coercedDate");function dp(e,t){return new xI({check:"greater_than",...et(t),value:e,inclusive:!0})}i(dp,"_gte");function wn(e,t){return new II({check:"min_length",...et(t),minimum:e})}i(wn,"_minLength");function vi(e,t){return new wI({check:"string_format",format:"regex",...et(t),pattern:e})}i(vi,"_regex");function yw(e,t,r){let n=et(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(yw,"_custom");var vt=re("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ut.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>sp(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>uu(e,r,n),e.parseAsync=async(r,n)=>ap(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>lu(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>ip(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),mp=re("ZodMiniString",(e,t)=>{lp.init(e,t),vt.init(e,t)});function T(e){return ow(mp,e)}i(T,"string");var _w=re("ZodMiniStringFormat",(e,t)=>{ev.init(e,t),mp.init(e,t)});var X5=re("ZodMiniURL",(e,t)=>{LI.init(e,t),_w.init(e,t)});function Ew(e){return sw(X5,e)}i(Ew,"url");var fp=re("ZodMiniNumber",(e,t)=>{tv.init(e,t),vt.init(e,t)});function lr(e){return aw(fp,e)}i(lr,"number");var Y5=re("ZodMiniNumberFormat",(e,t)=>{zI.init(e,t),fp.init(e,t)});function Sw(e){return uw(Y5,e)}i(Sw,"int");var sv=re("ZodMiniBoolean",(e,t)=>{rv.init(e,t),vt.init(e,t)});function He(e){return lw(sv,e)}i(He,"boolean");var vw=re("ZodMiniBigInt",(e,t)=>{UI.init(e,t),vt.init(e,t)});var Q5=re("ZodMiniAny",(e,t)=>{BI.init(e,t),vt.init(e,t)});function pu(){return mw(Q5)}i(pu,"any");var eK=re("ZodMiniUnknown",(e,t)=>{GI.init(e,t),vt.init(e,t)});function _e(){return fw(eK)}i(_e,"unknown");var tK=re("ZodMiniVoid",(e,t)=>{FI.init(e,t),vt.init(e,t)});function Aw(e){return gw(tK,e)}i(Aw,"_void");var Rw=re("ZodMiniDate",(e,t)=>{jI.init(e,t),vt.init(e,t)});var rK=re("ZodMiniArray",(e,t)=>{qI.init(e,t),vt.init(e,t)});function Ae(e,t){return new rK({type:"array",element:e,...et(t)})}i(Ae,"array");var nK=re("ZodMiniObject",(e,t)=>{VI.init(e,t),vt.init(e,t),St(e,"shape",()=>t.shape)});function O(e,t){let r={type:"object",shape:e??{},...et(t)};return new nK(r)}i(O,"object");var oK=re("ZodMiniUnion",(e,t)=>{nv.init(e,t),vt.init(e,t)});function Re(e,t){return new oK({type:"union",options:e,...et(t)})}i(Re,"union");var iK=re("ZodMiniDiscriminatedUnion",(e,t)=>{HI.init(e,t),vt.init(e,t)});function Ai(e,t,r){return new iK({type:"union",options:t,discriminator:e,...et(r)})}i(Ai,"discriminatedUnion");var sK=re("ZodMiniRecord",(e,t)=>{WI.init(e,t),vt.init(e,t)});function Ee(e,t,r){return new sK({type:"record",keyType:e,valueType:t,...et(r)})}i(Ee,"record");var aK=re("ZodMiniEnum",(e,t)=>{JI.init(e,t),vt.init(e,t),e.options=Object.values(t.entries)});function $e(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new aK({type:"enum",entries:r,...et(t)})}i($e,"_enum");var cK=re("ZodMiniLiteral",(e,t)=>{KI.init(e,t),vt.init(e,t)});function le(e,t){return new cK({type:"literal",values:Array.isArray(e)?e:[e],...et(t)})}i(le,"literal");var uK=re("ZodMiniTransform",(e,t)=>{ZI.init(e,t),vt.init(e,t)});function Ri(e){return new uK({type:"transform",transform:e})}i(Ri,"transform");var lK=re("ZodMiniOptional",(e,t)=>{XI.init(e,t),vt.init(e,t)});function j(e){return new lK({type:"optional",innerType:e})}i(j,"optional");var dK=re("ZodMiniNullable",(e,t)=>{YI.init(e,t),vt.init(e,t)});function mu(e){return new dK({type:"nullable",innerType:e})}i(mu,"nullable");var pK=re("ZodMiniPipe",(e,t)=>{QI.init(e,t),vt.init(e,t)});function Pi(e,t){return new pK({type:"pipe",in:e,out:t})}i(Pi,"pipe");var mK=re("ZodMiniCustom",(e,t)=>{ew.init(e,t),vt.init(e,t)});function gp(e,t){return yw(mK,e??(()=>!0),t)}i(gp,"custom");var fu={};bt(fu,{bigint:()=>EK,boolean:()=>_K,date:()=>SK,number:()=>yK,string:()=>hK});function hK(e){return iw(mp,e)}i(hK,"string");function yK(e){return cw(fp,e)}i(yK,"number");function _K(e){return dw(sv,e)}i(_K,"boolean");function EK(e){return pw(vw,e)}i(EK,"bigint");function SK(e){return hw(Rw,e)}i(SK,"date");var cv=O({retryOnFailure:O({defaultValue:j(He()),hide:j(He())}),continueOnFailure:O({defaultValue:j(He()),hide:j(He())})}),av=class{constructor(t,r,n,o,a,c,u,l,d,_,y){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=c;this.requireAuth=u;this.errorHandlingOptions=l;this.outputSchema=d;this.audience=_;this.aiMetadata=y}static{i(this,"IAction")}},Qn=i(e=>new av(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Le=O({displayName:T(),description:j(T())}),Pe=i((e,t)=>O({type:le(t),required:He(),defaultValue:j(pu())}),"TPropertyValue");var Ur=O({...Le.shape,...Pe(T(),"SHORT_TEXT").shape}),Mo=O({...Le.shape,...Pe(T(),"LONG_TEXT").shape});var Cw=O({label:T(),value:_e()}),hp=O({disabled:j(He()),placeholder:j(T()),options:Ae(Cw)});var Br=O({...Le.shape,options:hp,...Pe(_e(),"STATIC_DROPDOWN").shape}),Oo=O({...Le.shape,options:hp,...Pe(Ae(_e()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var uv=O({...Le.shape,...Pe(_e(),"DROPDOWN").shape,refreshers:Ae(T())}),gu=O({...Le.shape,...Pe(Ae(_e()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Ae(T())});var No=O({...Le.shape,...Pe(He(),"CHECKBOX").shape});var Lo=O({...Le.shape,...Pe(lr(),"NUMBER").shape});var hu=O({...Le.shape,...Pe(_e(),"FILE").shape});var yu=O({...Le.shape,...Pe(T(),"DATE_TIME").shape});var Tw=Ee(T(),Re([Ur,Mo,Br,gu,Oo,No,Lo,hu,yu])),_u=O({...Le.shape,properties:Tw,...Pe(Ae(_e()),"ARRAY").shape});var Eu=O({...Le.shape,...Pe(Re([Ee(T(),_e())]),"JSON").shape});var xw=Re([Ur,Br,Eu,_u,Oo]),AK=Ee(T(),xw),lv=O({refreshers:Ae(T()),...Le.shape,...Pe(_e(),"DYNAMIC").shape});var yp=O({...Le.shape,...Pe(Aw(),"MARKDOWN").shape});var Su=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Su||{}),za=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(za||{}),Ua=(b=>(b.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",b.COMMUNICATION="COMMUNICATION",b.COMMERCE="COMMERCE",b.CORE="CORE",b.UNIVERSAL_AI="UNIVERSAL_AI",b.FLOW_CONTROL="FLOW_CONTROL",b.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",b.ACCOUNTING="ACCOUNTING",b.PRODUCTIVITY="PRODUCTIVITY",b.CONTENT_AND_FILES="CONTENT_AND_FILES",b.DEVELOPER_TOOLS="DEVELOPER_TOOLS",b.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",b.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",b.HUMAN_RESOURCES="HUMAN_RESOURCES",b.PAYMENT_PROCESSING="PAYMENT_PROCESSING",b.MARKETING="MARKETING",b.SALES_AND_CRM="SALES_AND_CRM",b))(Ua||{});var vu=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(vu||{}),dv="both_client_credentials_and_authorization_code";var Ns=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Ns||{}),Au=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(Au||{}),RK=O({strategy:$e(Au),paramName:j(T())}),Ru=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Ru||{});var _p=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(_p||{}),bw=O({status:j(lr()),body:j(_e()),headers:j(Ee(T(),T()))}),Iw=O({type:le("DELAY"),resumeDateTime:T(),requestIdToReply:j(T()),handlerId:j(T()),streamStepProgress:j($e(_p))}),ww=O({type:le("WEBHOOK"),requestId:T(),requestIdToReply:j(T()),response:bw,handlerId:j(T()),streamStepProgress:j($e(_p))}),PK=Re([Iw,ww]);var CK=O({body:_e(),rawBody:j(_e()),headers:Ee(T(),T()),queryParams:Ee(T(),T())});var pv=I(require("crypto"),1);var TK=128,Ls,Ba,xK=i(e=>{!Ls||Ls.length<e?(Ls=Buffer.allocUnsafe(e*TK),pv.default.randomFillSync(Ls),Ba=0):Ba+e>Ls.length&&(pv.default.randomFillSync(Ls),Ba=0),Ba+=e},"fillPool"),bK=i(e=>(xK(e|=0),Ls.subarray(Ba-e,Ba)),"random"),IK=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let c="";for(;;){let u=r(o),l=o;for(;l--;)if(c+=e[u[l]&n]||"",c.length===a)return c}}},"customRandom"),kw=i((e,t=21)=>IK(e,t,bK),"customAlphabet");var wK="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Dw=21,D8e=T().check(vi(new RegExp(`^[0-9a-zA-Z]{${Dw}}$`))),$K=kw(wK,Dw);var Ci=Pi(Ri(e=>e instanceof Date?e.toISOString():e),T()),on={id:T(),created:Ci,updated:Ci},nt=i(e=>j(mu(e)),"Nullable");function mv(e){return j(mu($e(e)))}i(mv,"NullableEnum");var N8e=Pi(Ri(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),j(He())),Ep=i(e=>Pi(Ri(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),j(Ae(e))),"OptionalArrayFromQuery");var U8e=Ee(T(),_e());var Cu=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(Cu||{});var X8e=T().check(vi(/^#[0-9A-Fa-f]{6}$/));var Q8e=O({filename:T(),data:_e(),type:le("file"),mimetype:j(T())});var kK=I(Ow());var sJe=O({...on,name:T(),permissions:Ae(T()),platformId:nt(T()),type:T(),userCount:j(lr())});var Nw=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Nw||{}),fv=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(fv||{}),gv=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(gv||{});var hv=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(hv||{});var yv=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(yv||{});var DK=O({mode:$e(Nw),value:_e()}),MK=O({auth:j(T()),fields:Ee(T(),DK)}),OK=O({pieceName:T(),pieceVersion:T(),actionName:T(),predefinedInput:j(MK)}),NK=O({type:le("PIECE"),toolName:T().check(wn(1)),pieceMetadata:OK}),LK=O({type:le("none")}),zK=O({type:le("access_token"),accessToken:T()}),UK=O({type:le("api_key"),apiKey:T(),apiKeyHeader:T()}),BK=O({type:le("headers"),headers:Ee(T(),T())}),GK=Ai("type",[LK,zK,UK,BK]),Lw=O({type:le("FLOW"),toolName:T().check(wn(1)),externalFlowId:T(),flowDisplayName:j(T())}),zw=O({type:le("MCP"),toolName:T().check(wn(1)),serverUrl:Ew(),protocol:$e(gv),auth:GK}),Uw=O({type:le("KNOWLEDGE_BASE"),toolName:T().check(wn(1)),sourceType:$e(fv),sourceId:T(),sourceName:T()}),FK=Ai("type",[NK,Lw,zw,Uw]),jK=O({displayName:T(),description:j(T()),type:$e(hv)}),Bw=O({type:le("MARKDOWN"),markdown:T()}),Ga={type:le("TOOL_CALL"),input:nt(Ee(T(),_e())),output:j(_e()),toolName:T(),status:$e(yv),toolCallId:T(),startTime:T(),endTime:j(T())},DJe=O(Ga),Gw=Ai("toolCallType",[O({...Ga,toolCallType:le("PIECE"),pieceName:T(),pieceVersion:T(),actionName:T()}),O({...Ga,toolCallType:le("FLOW"),displayName:T(),externalFlowId:T()}),O({...Ga,toolCallType:le("MCP"),displayName:T(),serverUrl:T()}),O({...Ga,toolCallType:le("KNOWLEDGE_BASE"),displayName:T(),sourceType:T()}),O({...Ga,toolCallType:le("UNKNOWN"),displayName:T()})]),qK=Re([Bw,Gw]);var _v=(r=>(r.IMAGE="image",r.TEXT="text",r))(_v||{}),zo=O({apiKey:T()}),VK=zo,HK=O({apiKey:T(),apiKeyHash:T()}),WK=zo,JK=zo,KK=zo,ZK=zo,XK=zo,YK=zo,QK=zo,Fw=O({accessKeyId:T().check(wn(1)),secretAccessKey:T().check(wn(1))}),eZ=O({}),tZ=O({}),rZ=O({}),nZ=O({}),oZ=O({}),iZ=O({}),jw=O({modelId:T(),modelName:T(),modelType:$e(_v)}),qw=O({apiKeyHeader:T(),baseUrl:T(),models:Ae(jw),defaultHeaders:j(Ee(T(),T()))}),Vw=O({accountId:T(),gatewayId:T(),models:Ae(jw),vertexProject:j(T()),vertexRegion:j(T())}),Hw=O({resourceName:T(),apiVersion:Pi(Ri(e=>typeof e=="string"&&e.trim().length===0?void 0:e),j(T()))}),Ww=O({region:T().check(wn(1))}),sZ=Re([VK,KK,ZK,XK,YK,JK,WK,HK,Fw,QK]),Jw=Re([qw,Vw,Hw,Ww,eZ,rZ,nZ,oZ,tZ,iZ]),aZ=O({id:T(),name:T(),type:$e(_v)}),cZ=O({id:T(),name:T(),provider:$e(Cu),config:Jw,enabledForChat:He()}),uZ=O({provider:$e(Cu),config:Jw,auth:sZ,platformId:T()});var LJe={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var lZ=O({base64Url:T(),fileName:T(),extension:j(T())}),dZ=O({mimeType:T(),url:T(),fileName:j(T())}),Ev=Re([lZ,dZ]);var pZ=Re([O({type:le("file"),value:Ev}),O({type:le("markdown"),value:T(),files:j(Ae(Ev))})]),mZ=O({sessionId:T(),message:T(),files:j(Ae(T()))});var Zw=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Zw||{}),Xw=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Xw||{}),Sv=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Sv||{});var fZ=Re([O({...on,name:T(),externalId:T(),type:le("STATIC_DROPDOWN"),tableId:T(),projectId:T(),data:O({options:Ae(O({value:T()}))})}),O({...on,name:T(),externalId:T(),type:Re([le("TEXT"),le("NUMBER"),le("DATE")]),tableId:T(),projectId:T()})]),gZ=O({...on,name:T(),folderId:nt(T()),projectId:T(),externalId:T(),status:mv(Xw),trigger:mv(Zw)}),hZ=O({...on,tableId:T(),projectId:T(),cells:Ee(T(),O({updated:T(),created:T(),value:_e(),fieldName:T()}))}),yZ=O({events:Ae($e(Sv)),webhookUrl:T(),flowId:T()}),_Z=O({fields:Ae(O({id:T(),name:T()})),rows:Ae(Ee(T(),T())),name:T()}),EZ=O({projectId:T(),limit:j(fu.number()),cursor:j(T()),name:j(T()),externalIds:Ep(T()),folderId:j(T()),folderIds:Ep(T())}),SZ=O({records:Ae(Ae(O({fieldId:T(),value:Qw()}))),tableId:T()}),vZ=O({cells:j(Ae(O({fieldId:T(),value:Qw()}))),tableId:T(),agentUpdate:j(He())}),Yw=Ai("operator",[zs("eq"),zs("neq"),zs("gt"),zs("gte"),zs("lt"),zs("lte"),zs("co"),Kw("exists"),Kw("not_exists")]),AZ=O({tableId:T(),limit:j(fu.number()),cursor:j(T()),filters:Ep(Yw)});function Qw(){return Pi(Ri(e=>e==null?e:String(e)),mu(T()))}i(Qw,"coerceToString");function zs(e){return O({fieldId:T(),operator:le(e),value:T()})}i(zs,"valueFilter");function Kw(e){return O({fieldId:T(),operator:le(e)})}i(Kw,"existenceFilter");var RZ=O({status:j(lr()),body:j(_e()),headers:j(Ee(T(),T()))}),PZ=O({...on,deleted:nt(Ci),ownerId:T(),displayName:T(),platformId:T(),externalId:nt(T())});var e$=O({name:T(),description:j(T()),type:T(),required:He()}),CZ=O({pieceName:T(),triggerName:T(),input:O({toolName:T(),toolDescription:T(),inputSchema:Ae(e$),returnsResponse:He()})});var t$="^[0-9]+\\.[0-9]+\\.[0-9]+$",r5e=new RegExp(t$),xZ="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",n5e=T().check(vi(new RegExp(t$))),o5e=T().check(vi(new RegExp(xZ))),bZ=O({packageType:le("ARCHIVE"),pieceType:$e(za),pieceName:T(),pieceVersion:T(),archiveId:T(),platformId:T()}),r$=O({packageType:le("REGISTRY"),pieceType:le("OFFICIAL"),pieceName:T(),pieceVersion:T()}),n$=O({packageType:le("REGISTRY"),pieceType:le("CUSTOM"),pieceName:T(),pieceVersion:T(),platformId:T()}),i5e=Re([r$,n$]),s5e=Re([bZ,r$,n$]);var IZ=Ai("type",[O({type:le("CRON_EXPRESSION"),cronExpression:T(),timezone:T()}),O({type:le("INTERVAL"),intervalMs:Sw().check(dp(6e4))})]),a5e=O({...on,type:$e(Ns),projectId:T(),flowId:T(),triggerName:T(),schedule:nt(IZ),flowVersionId:T(),pieceName:T(),pieceVersion:T(),deleted:nt(T()),simulate:He()}),o$=(R=>(R.UNKNOWN="UNKNOWN",R.FLOW_RUN_LOG="FLOW_RUN_LOG",R.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",R.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",R.FLOW_STEP_FILE="FLOW_STEP_FILE",R.SAMPLE_DATA="SAMPLE_DATA",R.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",R.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",R.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",R.PROJECT_RELEASE="PROJECT_RELEASE",R.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",R.PLATFORM_ASSET="PLATFORM_ASSET",R.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",R.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",R.KNOWLEDGE_BASE="KNOWLEDGE_BASE",R.FLOW_BUNDLE="FLOW_BUNDLE",R))(o$||{}),i$=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(i$||{}),s$=(r=>(r.S3="S3",r.DB="DB",r))(s$||{}),c5e=O({...on,projectId:nt(T()),platformId:nt(T()),type:$e(o$),compression:$e(i$),data:j(_e()),location:$e(s$),size:nt(lr()),fileName:nt(T()),s3Key:nt(T()),metadata:nt(Ee(T(),T()))}),a$=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(a$||{}),c$=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(c$||{}),u5e=O({id:T(),email:T(),firstName:T(),status:$e(c$),externalId:nt(T()),platformId:nt(T()),platformRole:$e(a$),lastName:T(),created:Ci,updated:Ci,lastActiveDate:nt(Ci),imageUrl:nt(T())});var vv=O({...Le.shape,...Pe(Ee(T(),_e()),"OBJECT").shape});var p$=O({...Le.shape,...Pe(T(),"COLOR").shape});var Av=Re([Ur,Mo,yp,No,Br,Oo,uv,gu,lv,Lo,_u,vv,Eu,yu,hu,p$]),ce={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var eo=O({displayName:T(),description:j(T())});var m$=O({username:T(),password:T()}),Rv=O({...eo.shape,username:O({displayName:T(),description:j(T())}),password:O({displayName:T(),description:j(T())}),...Pe(m$,"BASIC_AUTH").shape});var DZ=Ee(T(),Re([Ur,Mo,Lo,No,Br])),Pv=O({...eo.shape,props:DZ,...Pe(_e(),"CUSTOM_AUTH").shape});var Us=O({...eo.shape,...Pe(O({auth:T()}),"SECRET_TEXT").shape});var MZ=Ee(T(),Re([Ur,Mo,Us,Lo,No,Br,Oo,yp])),f$=O({...eo.shape,props:MZ,...Pe(_e(),"OIDC").shape});var Cv=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cv||{}),g$=Re([Ur,Us,Br]),h$=Ee(T(),g$),OZ=O({props:j(Ee(T(),g$)),authUrl:T(),tokenUrl:T(),scope:Ae(T()),prompt:j(Re([le("none"),le("consent"),le("login"),le("omit")])),pkce:j(He()),pkceMethod:j(Re([le("plain"),le("S256")])),authorizationMethod:j($e(Cv)),grantType:j(Re([$e(vu),le(dv)])),extra:j(Ee(T(),T()))}),y$=O({access_token:T(),props:j(h$),data:Ee(T(),pu())}),Tv=O({...eo.shape,...OZ.shape,...Pe(y$,"OAUTH2").shape});var Fa=Re([Rv,Pv,f$,Tv,Us]),Tu="Connection",xu={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Tu}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Tu,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Tu}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Tu}},None(){}};var GKe={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var NZ=O({...Le.shape,...Pe(_e(),"CUSTOM").shape,code:T()});var zZ=Re([Av,Fa]),xv=Ee(T(),zZ),aZe=Ee(T(),Av);var _$=Re([O({strategy:le("CRON"),cronExpression:T()}),O({strategy:le("NONE")})]);var E$="2",vp="0.82.0";var bv=class{constructor(t,r,n,o,a,c,u,l,d=vp,_,y="",E){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=l;this.minimumSupportedRelease=d;this.maximumSupportedRelease=_;this.description=y;this.deprecated=E;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:E$}),"getContextInfo");(!UZ(d)||BZ(d,vp))&&(this.minimumSupportedRelease=vp),a.forEach(g=>this._actions[g.name]=g),c.forEach(g=>this._triggers[g.name]=g)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},S$=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new bv(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function UZ(e){return/^\d+\.\d+\.\d+$/.test(e)}i(UZ,"isValidSimpleSemver");function BZ(e,t){let[r,n,o]=e.split(".").map(Number),[a,c,u]=t.split(".").map(Number);return r!==a?r<a:n!==c?n<c:o<u}i(BZ,"isSemverLessThan");var GZ=j(Ee(T(),Ee(T(),T()))),v$=O({id:j(T()),name:T(),displayName:T(),logoUrl:T(),description:T(),authors:Ae(T()),platformId:j(T()),directoryPath:j(T()),auth:j(Re([Fa,Ae(Fa)])),version:T(),categories:j(Ae($e(Ua))),minimumSupportedRelease:j(T()),maximumSupportedRelease:j(T()),deprecated:j(He()),i18n:GZ}),FZ=$e(["human","ai","both"]),A$=O({description:j(T()),idempotent:j(He())}),R$=O({name:T(),displayName:T(),description:T(),props:xv,requireAuth:He(),errorHandlingOptions:j(cv),outputSchema:j(gp()),audience:j(FZ),aiMetadata:j(A$)}),P$=O({name:T(),displayName:T(),description:T(),props:xv,errorHandlingOptions:j(cv),type:$e(Ns),sampleData:_e(),handshakeConfiguration:j(gp()),renewConfiguration:j(_$),testStrategy:$e(Ru),outputSchema:j(gp()),aiMetadata:j(A$)}),jZ=O({...v$.shape,actions:Ee(T(),R$),triggers:Ee(T(),P$)}),qZ=O({...v$.shape,actions:lr(),triggers:lr(),suggestedActions:j(Ae(P$)),suggestedTriggers:j(Ae(R$))}),C$=O({projectUsage:lr(),pieceType:$e(za),packageType:$e(Su),platformId:j(T()),archiveId:j(T())}),a9e=O({...jZ.shape,...C$.shape}),c9e=O({...qZ.shape,...C$.shape}),u9e=O({name:T(),version:T()});var VZ=I(require("path")),HZ=I(require("fs/promises"));var vS=I(Bc());var wE=I(Yc());var wUe=`
|
|
70
|
+
Connect your AWS account using an IAM Role via OIDC \u2014 no permanent keys required.
|
|
71
|
+
|
|
72
|
+
Activepieces acts as an OIDC identity provider. AWS trusts this provider and issues temporary credentials via \`AssumeRoleWithWebIdentity\`.
|
|
73
|
+
|
|
74
|
+
**Setup steps:**
|
|
75
|
+
1. In AWS IAM \u2192 Identity Providers \u2192 Create Provider:
|
|
76
|
+
- Provider type: **OpenID Connect**
|
|
77
|
+
- Provider URL: \`{{frontendUrl}}\`
|
|
78
|
+
- Audience: \`sts.amazonaws.com\`
|
|
79
|
+
|
|
80
|
+
> AWS fetches \`{{frontendUrl}}/.well-known/openid-configuration\` to discover the OIDC metadata. If your frontend and API run on different domains, make sure the API server is reachable at \`{{frontendUrl}}\` (or that your frontend proxies \`/.well-known/*\` to the API), otherwise \`AssumeRoleWithWebIdentity\` will fail.
|
|
81
|
+
2. Create an IAM Role with this trust policy:
|
|
82
|
+
\`\`\`json
|
|
83
|
+
{
|
|
84
|
+
"Version": "2012-10-17",
|
|
85
|
+
"Statement": [{
|
|
86
|
+
"Effect": "Allow",
|
|
87
|
+
"Principal": { "Federated": "arn:aws:iam::YOUR_ACCOUNT_ID:oidc-provider/{{frontendHost}}" },
|
|
88
|
+
"Action": "sts:AssumeRoleWithWebIdentity",
|
|
89
|
+
"Condition": {
|
|
90
|
+
"StringEquals": {
|
|
91
|
+
"{{frontendHost}}:aud": "sts.amazonaws.com"
|
|
92
|
+
},
|
|
93
|
+
"StringLike": {
|
|
94
|
+
"{{frontendHost}}:sub": "platform:{{platformId}}:project:{{projectId}}"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}]
|
|
98
|
+
}
|
|
99
|
+
\`\`\`
|
|
100
|
+
3. Attach Bedrock permissions to the role (e.g. the \`AmazonBedrockFullAccess\` policy) and paste the **Role ARN** below.
|
|
101
|
+
`,wH=[{label:"US East (N. Virginia) [us-east-1]",value:"us-east-1"},{label:"US East (Ohio) [us-east-2]",value:"us-east-2"},{label:"US West (Oregon) [us-west-2]",value:"us-west-2"},{label:"Asia Pacific (Hyderabad) [ap-south-2]",value:"ap-south-2"},{label:"Asia Pacific (Mumbai) [ap-south-1]",value:"ap-south-1"},{label:"Asia Pacific (Osaka) [ap-northeast-3]",value:"ap-northeast-3"},{label:"Asia Pacific (Seoul) [ap-northeast-2]",value:"ap-northeast-2"},{label:"Asia Pacific (Singapore) [ap-southeast-1]",value:"ap-southeast-1"},{label:"Asia Pacific (Sydney) [ap-southeast-2]",value:"ap-southeast-2"},{label:"Asia Pacific (Tokyo) [ap-northeast-1]",value:"ap-northeast-1"},{label:"Canada (Central) [ca-central-1]",value:"ca-central-1"},{label:"Europe (Frankfurt) [eu-central-1]",value:"eu-central-1"},{label:"Europe (Ireland) [eu-west-1]",value:"eu-west-1"},{label:"Europe (London) [eu-west-2]",value:"eu-west-2"},{label:"Europe (Milan) [eu-south-1]",value:"eu-south-1"},{label:"Europe (Paris) [eu-west-3]",value:"eu-west-3"},{label:"Europe (Spain) [eu-south-2]",value:"eu-south-2"},{label:"Europe (Stockholm) [eu-north-1]",value:"eu-north-1"},{label:"Europe (Zurich) [eu-central-2]",value:"eu-central-2"},{label:"South America (S\xE3o Paulo) [sa-east-1]",value:"sa-east-1"}],$Ue=xu.CustomAuth({description:`Connect your AWS account to use Amazon Bedrock AI models.
|
|
102
|
+
|
|
103
|
+
**How to get your credentials:**
|
|
104
|
+
1. Open the [AWS IAM Console](https://console.aws.amazon.com/iam/) and go to **Users**.
|
|
105
|
+
2. Select your user (or create a new one), then go to **Security credentials**.
|
|
106
|
+
3. Click **Create access key** \u2014 copy both the Access Key ID and Secret Access Key.
|
|
107
|
+
4. Make sure the IAM user has the **AmazonBedrockFullAccess** policy attached.
|
|
108
|
+
|
|
109
|
+
**Enable model access:** In the [AWS Bedrock Console](https://console.aws.amazon.com/bedrock/), go to **Model access** and request access to the models you want to use.`,props:{accessKeyId:ce.ShortText({displayName:"Access Key ID",description:"Your AWS access key ID. Found in AWS IAM Console \u2192 Users \u2192 Security credentials.",required:!0}),secretAccessKey:xu.SecretText({displayName:"Secret Access Key",description:"Your AWS secret access key. Only shown once when you create the access key \u2014 store it safely.",required:!0}),region:ce.StaticDropdown({displayName:"Region",required:!0,options:{options:wH}})},validate:i(async({auth:e})=>{try{return await new wE.BedrockClient({credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},region:e.region}).send(new wE.ListFoundationModelsCommand({})),{valid:!0}}catch(t){return{valid:!1,error:t?.message}}},"validate"),required:!0}),kUe=xu.OIDC({displayName:"AWS Bedrock (IAM Role / OIDC)",description:wUe,props:{roleArn:ce.ShortText({displayName:"Role ARN",description:"The ARN of the IAM role to assume (e.g. arn:aws:iam::123456789012:role/MyRole).",required:!0}),region:ce.StaticDropdown({displayName:"Region",options:{options:wH},required:!0})},validate:i(async({auth:e})=>e.roleArn?/^arn:(?:aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[\w+=,.@\-/]{1,512}$/.test(e.roleArn)?{valid:!0}:{valid:!1,error:"Invalid IAM Role ARN format. Expected: arn:aws:iam::123456789012:role/RoleName"}:{valid:!1,error:"Role ARN is required for IAM Role authentication."},"validate"),required:!0}),Ft=[$Ue,kUe];var $o=I(Yc()),be=I(Bc()),gS=I(F8());var EFe="sts.amazonaws.com";async function Is({auth:e,server:t}){if(SS(e)){let r=await hS({auth:e,server:t});return new be.BedrockRuntimeClient({credentials:r,region:e.region})}return new be.BedrockRuntimeClient({credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},region:e.region})}i(Is,"createBedrockRuntimeClient");async function ws(e,t,r){if(!e)return{disabled:!0,placeholder:"Connect your AWS account first",options:[]};try{let n;if(SS(e)){if(!r)return{disabled:!0,options:[],placeholder:"Unable to load models for IAM Role auth in this context."};let d=await hS({auth:e,server:r});n=new $o.BedrockClient({credentials:d,region:e.region})}else n=new $o.BedrockClient({credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},region:e.region});if(t?.useInferenceProfiles){let[d,_]=await Promise.all([n.send(new $o.ListInferenceProfilesCommand({typeEquals:"SYSTEM_DEFINED"})),t?.inputModality?n.send(new $o.ListFoundationModelsCommand({})):Promise.resolve(void 0)]),y=d.inferenceProfileSummaries??[],E;if(t?.inputModality&&_){let A=_.modelSummaries??[];E=new Set(A.filter(R=>R.inputModalities?.includes(t.inputModality)).map(R=>R.modelId).filter(Boolean))}let g=new Set;return{disabled:!1,options:y.filter(A=>{if(!A.inferenceProfileId||A.status!=="ACTIVE"||g.has(A.inferenceProfileId))return!1;if(E){let R=A.models?.[0]?.modelArn?.split("/").pop();if(!R||!E.has(R))return!1}return g.add(A.inferenceProfileId),!0}).map(A=>({label:A.inferenceProfileName??A.inferenceProfileId,value:A.inferenceProfileId}))}}let a=(await n.send(new $o.ListFoundationModelsCommand({byOutputModality:t?.showAll?void 0:t?.outputModality??$o.ModelModality.TEXT}))).modelSummaries??[],c=t?.inputModality?a.filter(d=>d.inputModalities?.includes(t.inputModality)):a,u=new Set;return{disabled:!1,options:c.filter(d=>{if(!d.modelId)return!1;let _=d.modelId.replace(/:\d+:.*$/,"");return u.has(_)?!1:(u.add(_),!0)}).map(d=>({label:`${d.providerName} - ${d.modelName}`,value:d.modelId}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load models. Check your credentials."}}}i(ws,"getBedrockModelOptions");async function hS({auth:e,server:t,durationSeconds:r=vFe}){if(!e.roleArn)throw new Error("Role ARN is required for IAM Role authentication");let n=Math.min(Math.max(r,RFe),PFe),o=`${t.token}:${e.roleArn}:${e.region}:${n}`,a=fS.get(o);if(a&&a.expiresAtMS-Date.now()>AFe)return a.credentials;let c=await fetch(`${t.apiUrl}v1/worker/oidc-token`,{method:"POST",headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},body:JSON.stringify({audience:EFe})});if(!c.ok)throw new Error(`Failed to get OIDC token: ${c.statusText}`);let{token:u}=await c.json(),l=new gS.STSClient({region:e.region}),{Credentials:d}=await l.send(new gS.AssumeRoleWithWebIdentityCommand({RoleArn:e.roleArn,RoleSessionName:"activepieces-execution",WebIdentityToken:u,DurationSeconds:n}));if(!d?.AccessKeyId||!d.SecretAccessKey)throw new Error("Failed to assume role: no credentials returned");let _={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken},y=d.Expiration?.getTime()??Date.now()+n*1e3;return SFe(),fS.set(o,{credentials:_,expiresAtMS:y}),_}i(hS,"getTemporaryCredentials");function SFe(){let e=Date.now();for(let[t,r]of fS)r.expiresAtMS<=e&&fS.delete(t)}i(SFe,"sweepExpiredCredentials");var lS={png:be.ImageFormat.PNG,jpg:be.ImageFormat.JPEG,jpeg:be.ImageFormat.JPEG,gif:be.ImageFormat.GIF,webp:be.ImageFormat.WEBP},dS={pdf:be.DocumentFormat.PDF,csv:be.DocumentFormat.CSV,doc:be.DocumentFormat.DOC,docx:be.DocumentFormat.DOCX,xls:be.DocumentFormat.XLS,xlsx:be.DocumentFormat.XLSX,html:be.DocumentFormat.HTML,htm:be.DocumentFormat.HTML,txt:be.DocumentFormat.TXT,md:be.DocumentFormat.MD},pS={mkv:be.VideoFormat.MKV,mov:be.VideoFormat.MOV,mp4:be.VideoFormat.MP4,webm:be.VideoFormat.WEBM,flv:be.VideoFormat.FLV,mpeg:be.VideoFormat.MPEG,mpg:be.VideoFormat.MPG,wmv:be.VideoFormat.WMV,"3gp":be.VideoFormat.THREE_GP},mS={mp3:be.AudioFormat.MP3,opus:be.AudioFormat.OPUS,wav:be.AudioFormat.WAV,aac:be.AudioFormat.AAC,flac:be.AudioFormat.FLAC,ogg:be.AudioFormat.OGG,mka:be.AudioFormat.MKA,m4a:be.AudioFormat.M4A,pcm:be.AudioFormat.PCM};function yS(e,t){let r=(t.split(".").pop()??"").toLowerCase(),n={uri:`s3://${e}/${t}`};if(lS[r])return{image:{format:lS[r],source:{s3Location:n}}};if(dS[r]){let o=(t.split("/").pop()??"document").replace(/\.[^.]+$/,"");return{document:{format:dS[r],name:o,source:{s3Location:n}}}}if(pS[r])return{video:{format:pS[r],source:{s3Location:n}}};if(mS[r])return{audio:{format:mS[r],source:{s3Location:n}}};throw new Error(`Unsupported file type ".${r}". Supported: images (png, jpg, gif, webp), documents (pdf, csv, doc, docx, xls, xlsx, html, txt, md), videos (mp4, mov, mkv, webm, flv, mpeg, mpg, wmv, 3gp), audio (mp3, wav, aac, flac, ogg, opus, mka, m4a, pcm).`)}i(yS,"buildS3ContentBlock");function _S(e){let t=(e.extension??"").toLowerCase(),r=new Uint8Array(e.data);if(lS[t])return{image:{format:lS[t],source:{bytes:r}}};if(dS[t]){let n=e.filename?.replace(/\.[^.]+$/,"")||"document";return{document:{format:dS[t],name:n,source:{bytes:r}}}}if(pS[t])return{video:{format:pS[t],source:{bytes:r}}};if(mS[t])return{audio:{format:mS[t],source:{bytes:r}}};throw new Error(`Unsupported file type ".${t}". Supported: images (png, jpg, gif, webp), documents (pdf, csv, doc, docx, xls, xlsx, html, txt, md), videos (mp4, mov, mkv, webm, flv, mpeg, mpg, wmv, 3gp), audio (mp3, wav, aac, flac, ogg, opus, mka, m4a, pcm).`)}i(_S,"buildFileContentBlock");function ES(e){return{text:e.output?.message?.content?.filter(n=>"text"in n).map(n=>n.text).join("")??"",stopReason:e.stopReason,usage:e.usage,latencyMs:e.metrics?.latencyMs}}i(ES,"extractConverseTextResponse");function $s(e){let t=e;switch(t.name??"UnknownError"){case"ThrottlingException":return"Request was throttled by AWS Bedrock. Please try again in a moment.";case"ModelNotReadyException":return"The model is not ready. It may still be loading \u2014 please try again shortly.";case"ModelTimeoutException":return"The model timed out while processing your request. Try a shorter prompt or a different model.";case"ModelErrorException":return"The model encountered an internal error. Try again or use a different model.";case"AccessDeniedException":return"Access denied. Ensure your AWS credentials have permission to invoke this model and that the model is enabled in your region.";case"ValidationException":return`Validation error: ${t.message??"Check your input parameters."}`;case"ServiceUnavailableException":return"AWS Bedrock is temporarily unavailable. Please try again later.";case"ServiceQuotaExceededException":return"You have exceeded your AWS Bedrock service quota.";default:return t.message??"An unexpected error occurred."}}i($s,"formatBedrockError");var vFe=3600,AFe=300*1e3,fS=new Map,RFe=900,PFe=43200;function SS(e){return"roleArn"in e}i(SS,"isOidcAuth");var j8=Qn({audience:"both",auth:Ft,name:"send_prompt",displayName:"Ask Bedrock",description:"Send a text prompt to an Amazon Bedrock model.",aiMetadata:{description:"Sends a text prompt to a foundation model on Amazon Bedrock via the Converse API and returns the generated text, with optional system prompt, temperature, top-p, max-tokens, and stop sequences; leave Conversation Memory ID empty for a stateless one-off question or set one to persist message history across runs, and optionally attach a single file either uploaded directly or referenced by S3 bucket and key. This is the general-purpose text entry point for Bedrock - prefer Generate Content from Image for a one-off vision question, Generate Image to produce a picture, or Generate Embeddings for vectors. Requires a model id enabled in the connected AWS region. Not idempotent: each call bills a fresh non-deterministic completion and appends to the stored history whenever a memory key is set.",idempotent:!1},props:{model:ce.Dropdown({displayName:"Model",required:!0,auth:Ft,description:"The foundation model to use for generation.",refreshers:[],options:i(async({auth:e},{server:t})=>e?ws(e.props,{useInferenceProfiles:!0},t):{disabled:!0,placeholder:"Connect your AWS account first",options:[]},"options")}),prompt:ce.LongText({displayName:"Prompt",description:"The message or question to send to the model.",required:!0}),systemPrompt:ce.LongText({displayName:"System Prompt",required:!1,description:`Instructions that set the model's behavior and persona (e.g. "You are a helpful assistant that replies concisely.").`}),temperature:ce.Number({displayName:"Temperature",required:!1,description:"Controls how creative or predictable the response is. Lower values (e.g. 0.2) give focused, consistent answers. Higher values (e.g. 0.9) give more varied, creative output.",defaultValue:.7}),maxTokens:ce.Number({displayName:"Maximum Tokens",required:!1,description:"The maximum length of the response. One token is roughly 4 characters. 2048 tokens \u2248 ~1500 words.",defaultValue:2048}),topP:ce.Number({displayName:"Top P",required:!1,description:"Limits the pool of words the model picks from (0\u20131). Lower values make responses more focused. Leave at 1 to disable this filter and use Temperature instead.",defaultValue:1}),stopSequences:ce.Array({displayName:"Stop Sequences",required:!1,description:'Text strings that, when generated, cause the model to stop immediately (e.g. "END" or "\\n\\n"). Up to 4 sequences.'}),memoryKey:ce.ShortText({displayName:"Conversation Memory ID",required:!1,description:`A unique name for this conversation's memory (e.g. "support-chat-user-123"). When set, the model remembers previous messages in this flow. Leave empty for a single-turn interaction with no memory.`}),attachmentSource:ce.StaticDropdown({displayName:"Attachment Source (Optional)",description:"Optionally include a file alongside your prompt. Choose whether to upload directly or reference one from S3.",required:!1,options:{options:[{label:"Upload a file",value:"file"},{label:"From S3 bucket",value:"s3"}]}}),attachment:ce.DynamicProperties({auth:Ft,displayName:"Attachment",required:!1,refreshers:["attachmentSource"],props:i(async({attachmentSource:e})=>e==="file"?{file:ce.File({displayName:"File",description:"Supported: images (png, jpg, gif, webp), documents (pdf, csv, doc, docx, xls, xlsx, html, txt, md), videos (mp4, mov, mkv, etc.), audio (mp3, wav, aac, flac, etc.). Not all models support all file types.",required:!0})}:e==="s3"?{s3Bucket:ce.ShortText({displayName:"S3 Bucket",description:"The name of your S3 bucket containing the file.",required:!0}),s3Key:ce.ShortText({displayName:"S3 File Path",description:'The path to the file in your S3 bucket (e.g. "documents/report.pdf"). The file extension determines the media type sent to the model.',required:!0})}:{},"props")})},async run({auth:e,propsValue:t,store:r,server:n}){let o=await Is({auth:e.props,server:n}),{model:a,prompt:c,systemPrompt:u,temperature:l,maxTokens:d,topP:_,stopSequences:y,memoryKey:E,attachmentSource:g,attachment:v}=t,A=[];E&&(A=await r.get(E,"COLLECTION")??[]);let R=[{text:c}];g==="file"&&v?.file?R.push(_S(v.file)):g==="s3"&&v?.s3Bucket&&v?.s3Key&&R.push(yS(v.s3Bucket,v.s3Key)),A.push({role:vS.ConversationRole.USER,content:R});try{let b=await o.send(new vS.ConverseCommand({modelId:a,messages:A,...u?{system:[{text:u}]}:{},inferenceConfig:{temperature:l??void 0,maxTokens:d??void 0,topP:_??void 0,stopSequences:y&&y.length>0?y:void 0}})),$=b.output?.message;return $&&A.push($),E&&await r.put(E,A,"COLLECTION"),ES(b)}catch(b){throw new Error($s(b))}}});var AS=I(Bc()),q8=I(Yc());var V8=Qn({audience:"both",auth:Ft,name:"generate_content_from_image",displayName:"Generate Content from Image",description:"Ask a Bedrock model a question about an image.",aiMetadata:{description:"Asks a vision-capable Bedrock foundation model a question about one image and returns the answer as text; the image is supplied either as an uploaded file or by S3 bucket and key, and the model list is filtered to models that accept image input. Pick this for one-off image understanding such as OCR, description, classification, or extraction, and use Ask Bedrock instead when the prompt is text-only, needs conversation memory, or carries a document, video, or audio attachment; use Generate Image to create a picture rather than read one. Not idempotent: each call bills a fresh non-deterministic completion.",idempotent:!1},props:{model:ce.Dropdown({displayName:"Model",required:!0,auth:Ft,description:"The foundation model to use. Must support image input.",refreshers:[],options:i(async({auth:e},{server:t})=>e?ws(e.props,{useInferenceProfiles:!0,inputModality:q8.ModelModality.IMAGE},t):{disabled:!0,placeholder:"Connect your AWS account first",options:[]},"options")}),source:ce.StaticDropdown({displayName:"Image Source",description:"Choose how to provide the image \u2014 upload directly or reference one already in S3.",required:!0,defaultValue:"file",options:{options:[{label:"Upload an image",value:"file"},{label:"From S3 bucket",value:"s3"}]}}),image:ce.DynamicProperties({auth:Ft,displayName:"Image",required:!0,refreshers:["source"],props:i(async({source:e})=>e==="s3"?{s3Bucket:ce.ShortText({displayName:"S3 Bucket",description:"The name of your S3 bucket containing the image.",required:!0}),s3Key:ce.ShortText({displayName:"S3 File Path",description:'The path to the image in your S3 bucket (e.g. "images/photo.png"). Supported: png, jpg, gif, webp.',required:!0})}:{file:ce.File({displayName:"Image File",description:"The image to analyze. Supported formats: PNG, JPEG, GIF, WebP.",required:!0})},"props")}),prompt:ce.LongText({displayName:"Prompt",required:!0,description:"What do you want the model to tell you about the image?"}),systemPrompt:ce.LongText({displayName:"System Prompt",required:!1,description:"Instructions that guide the model behavior."}),temperature:ce.Number({displayName:"Temperature",required:!1,description:"Controls randomness. Lower values produce more deterministic output.",defaultValue:.7}),maxTokens:ce.Number({displayName:"Maximum Tokens",required:!1,description:"The maximum number of tokens to generate.",defaultValue:2048})},async run({auth:e,propsValue:t,server:r}){let n=await Is({auth:e.props,server:r}),{model:o,source:a,image:c,prompt:u,systemPrompt:l,temperature:d,maxTokens:_}=t,y=a==="s3"?yS(c.s3Bucket,c.s3Key):_S(c.file);try{let E=await n.send(new AS.ConverseCommand({modelId:o,messages:[{role:AS.ConversationRole.USER,content:[y,{text:u}]}],...l?{system:[{text:l}]}:{},inferenceConfig:{temperature:d??void 0,maxTokens:_??void 0}}));return ES(E)}catch(E){throw new Error($s(E))}}});var H8=I(Bc()),W8=I(Yc());var J8=Qn({audience:"both",auth:Ft,name:"generate_image",displayName:"Generate Image",description:"Generate an image from a text prompt using Amazon Titan Image Generator or Stability AI models.",aiMetadata:{description:"Generates one image from a text prompt using a Bedrock image model (Amazon Titan Image Generator, Nova Canvas, or Stability AI) and stores it as a file reference; supports a negative prompt, width and height, and a seed for reproducible output. Pick this to create new imagery from a description - use Generate Content from Image to interpret an existing image, and Ask Bedrock for text output. Requires an image-output model enabled in the connected AWS region, at a resolution that model supports. Not idempotent: each call invokes the model and writes a new file, though a fixed seed with the same prompt reproduces the same picture.",idempotent:!1},props:{model:ce.Dropdown({displayName:"Model",required:!0,auth:Ft,description:"The image generation model to use.",refreshers:[],options:i(async({auth:e},{server:t})=>e?ws(e.props,{outputModality:W8.ModelModality.IMAGE},t):{disabled:!0,placeholder:"Connect your AWS account first",options:[]},"options")}),prompt:ce.LongText({displayName:"Prompt",required:!0,description:"A text description of the image you want to generate."}),negativePrompt:ce.LongText({displayName:"Negative Prompt",required:!1,description:"Describe what you do NOT want in the image. Helps refine the output."}),width:ce.Number({displayName:"Width",required:!1,description:"Image width in pixels. Must be supported by the model.",defaultValue:1024}),height:ce.Number({displayName:"Height",required:!1,description:"Image height in pixels. Must be supported by the model.",defaultValue:1024}),seed:ce.Number({displayName:"Seed",required:!1,description:"A seed for reproducible results. Use the same seed and prompt to get the same image."})},async run({auth:e,propsValue:t,files:r,server:n}){let o=await Is({auth:e.props,server:n}),{model:a,prompt:c,negativePrompt:u,width:l,height:d,seed:_}=t,y=a.startsWith("amazon.titan-image"),E=a.startsWith("stability."),g=a.startsWith("amazon.nova-canvas"),v;y?v={taskType:"TEXT_IMAGE",textToImageParams:{text:c,...u?{negativeText:u}:{}},imageGenerationConfig:{numberOfImages:1,width:l??1024,height:d??1024,..._!=null?{seed:_}:{}}}:g?v={taskType:"TEXT_IMAGE",textToImageParams:{text:c,...u?{negativeText:u}:{}},imageGenerationConfig:{numberOfImages:1,width:l??1024,height:d??1024,..._!=null?{seed:_}:{}}}:E?v={text_prompts:[{text:c,weight:1},...u?[{text:u,weight:-1}]:[]],cfg_scale:7,steps:30,width:l??1024,height:d??1024,..._!=null?{seed:_}:{}}:v={text_prompts:[{text:c,weight:1},...u?[{text:u,weight:-1}]:[]],width:l??1024,height:d??1024,..._!=null?{seed:_}:{}};try{let A=await o.send(new H8.InvokeModelCommand({modelId:a,body:Buffer.from(JSON.stringify(v)),contentType:"application/json",accept:"application/json"})),R=JSON.parse(new TextDecoder().decode(A.body)),b;if(R.images&&R.images.length>0?b=R.images[0]:R.artifacts&&R.artifacts.length>0&&(b=R.artifacts[0].base64),!b)throw new Error("No image was returned by the model. The response format may not be supported.");let $=Buffer.from(b,"base64");return{image:await r.write({fileName:"generated-image.png",data:$}),model:a}}catch(A){throw A instanceof Error&&A.message.includes("No image")?A:new Error($s(A))}}});var K8=I(Bc()),Z8=I(Yc());var X8=Qn({audience:"both",auth:Ft,name:"generate_embeddings",displayName:"Generate Embeddings",description:"Generate vector embeddings from text using Amazon Titan Embed, Cohere Embed, or Amazon Nova Multimodal Embeddings models.",aiMetadata:{description:"Converts one text string into a numeric embedding vector using a Bedrock embedding model (Amazon Titan Embed, Cohere Embed, Nova Multimodal, or TwelveLabs), returning the vector and its dimension count; the request shape is adapted per model family, so Vector Dimensions, Normalize, and Embedding Purpose only take effect on the families that support them. Pick this for semantic search, similarity, or clustering pipelines rather than Ask Bedrock, which returns prose. Handles a single text per call - loop for batches - and requires an embedding-capable model enabled in the connected AWS region. Deterministic stateless inference, so repeat calls with the same input are idempotent.",idempotent:!0},props:{model:ce.Dropdown({displayName:"Model",required:!0,auth:Ft,description:"The embedding model to use.",refreshers:[],options:i(async({auth:e},{server:t})=>e?ws(e.props,{outputModality:Z8.ModelModality.EMBEDDING},t):{disabled:!0,placeholder:"Connect your AWS account first",options:[]},"options")}),inputText:ce.LongText({displayName:"Input Text",required:!0,description:"The text to generate embeddings for."}),embeddingPurpose:ce.StaticDropdown({displayName:"Embedding Purpose",required:!1,description:'How the embeddings will be used \u2014 helps the model optimize the output. Only applies to Nova Multimodal Embeddings models. Leave as "Generic Index" if unsure.',defaultValue:"GENERIC_INDEX",options:{options:[{label:"Generic Index",value:"GENERIC_INDEX"},{label:"Generic Retrieval",value:"GENERIC_RETRIEVAL"},{label:"Text Retrieval",value:"TEXT_RETRIEVAL"},{label:"Classification",value:"CLASSIFICATION"},{label:"Clustering",value:"CLUSTERING"}]}}),dimensions:ce.Number({displayName:"Vector Dimensions",required:!1,description:"Size of the output vector. Larger = more accurate but slower/costlier. Titan Embed v2 supports: 256, 512, 1024. Nova Multimodal supports: 256, 384, 1024, 3072. Leave blank to use the model default."}),normalize:ce.Checkbox({displayName:"Normalize Output",required:!1,description:"Scale the output vector so its values range between -1 and 1. Recommended for similarity comparisons. Only supported by Titan Embed v2.",defaultValue:!0})},async run({auth:e,propsValue:t,server:r}){let n=await Is({auth:e.props,server:r}),{model:o,inputText:a,dimensions:c,normalize:u}=t,l=o.startsWith("amazon.titan-embed"),d=o.startsWith("cohere.embed"),_=o.includes("nova")&&o.includes("embed"),y=o.startsWith("twelvelabs."),E;_?E={schemaVersion:"nova-multimodal-embed-v1",taskType:"SINGLE_EMBEDDING",singleEmbeddingParams:{embeddingPurpose:t.embeddingPurpose??"GENERIC_INDEX",...c!=null?{embeddingDimension:c}:{},text:{truncationMode:"END",value:a}}}:l?E={inputText:a,...c!=null?{dimensions:c}:{},...u!=null?{normalize:u}:{}}:d?E={texts:[a],input_type:"search_document",truncate:"END"}:y?E={inputType:"text",inputText:a,textTruncate:"end"}:E={inputText:a};try{let g=await n.send(new K8.InvokeModelCommand({modelId:o,body:Buffer.from(JSON.stringify(E)),contentType:"application/json",accept:"application/json"})),v=JSON.parse(new TextDecoder().decode(g.body)),A;if(v.embedding)A=v.embedding;else if(v.embeddings&&v.embeddings.length>0){let R=v.embeddings[0];Array.isArray(R)?A=R:R?.embedding&&(A=R.embedding)}if(!A)throw new Error("No embedding was returned by the model. The response format may not be supported.");return{embedding:A,dimensions:A.length,model:o}}catch(g){throw g instanceof Error&&g.message.includes("No embedding")?g:new Error($s(g))}}});var eJ=require("node:stream");var RS=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,c)=>{o.append(c,a)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var PS=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Nb,r=new Lb){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Nb=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Lb=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var CS=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var TS=class extends RS{static{i(this,"FetchHttpClient")}constructor(t="",r=new PS){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),c=t.queryParams??{};for(let[G,Y]of Object.entries(c))o.append(G,Y);let u=o.toString(),l=u?`${n}?${u}`:n,d=t.responseType??"json",_=t.followRedirects??!0,y=t.retries??0,{body:E,extraHeaders:g,isStream:v}=CFe(t.body,a),A=xFe({...a,...g}),R=await TFe(async()=>{let G=new AbortController,Y=t.timeout&&t.timeout>0?setTimeout(()=>G.abort(),t.timeout):void 0;try{let pe={method:t.method.toString(),headers:A,body:E,redirect:_?"follow":"manual",signal:G.signal};return v&&(pe.duplex="half"),r?.dispatcher!==void 0&&(pe.dispatcher=r.dispatcher),await fetch(l,pe)}finally{Y!==void 0&&clearTimeout(Y)}},y),b=_?300:400;if(R.status<200||R.status>=b){let G=await Y8(R,d),Y=new CS(t.body,{status:R.status,responseBody:G});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let $=await Y8(R,d);return{status:R.status,headers:bFe(R.headers),body:$}}};function CFe(e,t){if(wFe(e))return{body:void 0,extraHeaders:{},isStream:!1};if(IFe(e)){let n=new eJ.PassThrough;return e.on("error",o=>n.destroy(o)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(CFe,"serializeBody");async function Y8(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(Y8,"parseResponseBody");async function TFe(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Q8(n);continue}return o}catch(o){if(r=o,n<t){await Q8(n);continue}throw o}throw r}i(TFe,"sendWithRetries");function Q8(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Q8,"backoff");function xFe(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}i(xFe,"normalizeHeaders");function bFe(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(bFe,"toHttpHeaders");function IFe(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(IFe,"isNodeFormData");function wFe(e){return e==null}i(wFe,"isNil");var tJ=new TS;var zb=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(zb||{});var $J=I(CJ()),kJ=I(TJ()),DJ=I(wJ());var ZFe=[{label:"Bedrock (Control Plane)",value:"bedrock"},{label:"Bedrock Runtime (Inference)",value:"bedrock-runtime"},{label:"Bedrock Agent (Control Plane)",value:"bedrock-agent"},{label:"Bedrock Agent Runtime (Data Plane)",value:"bedrock-agent-runtime"}];async function XFe({accessKeyId:e,secretAccessKey:t,sessionToken:r,region:n,service:o,method:a,url:c,headers:u,body:l}){let d=new URL(c),_=new kJ.HttpRequest({method:a,protocol:d.protocol,hostname:d.hostname,port:d.port?Number(d.port):void 0,path:d.pathname,query:Object.fromEntries(d.searchParams.entries()),headers:{...u,host:d.hostname},body:l??void 0});return{headers:(await new $J.SignatureV4({credentials:{accessKeyId:e,secretAccessKey:t,sessionToken:r},region:n,service:o,sha256:DJ.Sha256}).sign(_)).headers}}i(XFe,"signAwsRequest");var MJ=Qn({audience:"human",name:"custom_api_call",displayName:"Custom API Call",description:"Make a custom API call to any AWS Bedrock endpoint. Requests are automatically signed with AWS Signature V4.",aiMetadata:{description:"Makes an arbitrary AWS SigV4-signed HTTP request to a chosen Bedrock endpoint - the Bedrock control plane, Bedrock Runtime, Bedrock Agent control plane, or Bedrock Agent Runtime - with your own method, path, query parameters, headers, and JSON body, optionally returning errors as output instead of failing the step. Use as an escape hatch for Bedrock operations this piece does not wrap, such as knowledge bases, guardrails, or agent invocation. Requires the service and path to match the AWS Bedrock API reference for the connected region. Idempotency depends on the call made: GET reads are safe to repeat, while model invocations and mutating writes are not.",idempotent:!1},auth:Ft,requireAuth:!0,props:{service:ce.StaticDropdown({displayName:"Service",description:'Select the AWS Bedrock service endpoint to call. Use "Bedrock" for control plane operations (e.g., ListFoundationModels) and "Bedrock Runtime" for inference operations (e.g., InvokeModel).',required:!0,defaultValue:"bedrock",options:{disabled:!1,options:ZFe}}),method:ce.StaticDropdown({displayName:"Method",description:"HTTP method for the request. Use GET to fetch data, POST/PUT to create or update, DELETE to remove.",required:!0,defaultValue:"GET",options:{disabled:!1,options:Object.values(zb).map(e=>({label:e,value:e}))}}),path:ce.ShortText({displayName:"Path",description:"The API path (e.g., /foundation-models, /model/{modelId}/invoke). See the AWS Bedrock API Reference for available endpoints.",required:!0,defaultValue:"/foundation-models"}),headers:ce.Object({displayName:"Headers",description:"Additional headers to include. Authorization headers are automatically added via AWS Signature V4.",required:!1}),queryParams:ce.Object({displayName:"Query Parameters",description:"Query parameters to include in the request URL.",required:!1}),body:ce.Json({displayName:"Body",description:"JSON body for POST/PUT requests.",required:!1}),failsafe:ce.Checkbox({displayName:"Return Error as Output",description:"When enabled, errors (e.g. 4xx/5xx responses) are returned as output instead of stopping the flow. Useful when you want to handle errors in a later step.",required:!1,defaultValue:!1}),timeout:ce.Number({displayName:"Timeout (in seconds)",description:"How long to wait for a response before the request is cancelled. Defaults to 30 seconds.",required:!1,defaultValue:30})},async run(e){let{service:t,method:r,path:n,headers:o,queryParams:a,body:c,failsafe:u,timeout:l}=e.propsValue,d=e.auth.props,_=d.region,y;SS(d)?y=await hS({auth:d,server:e.server}):y={accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey};let g=`${`https://${t}.${_}.amazonaws.com`}${n.startsWith("/")?n:`/${n}`}`;if(a&&Object.keys(a).length>0){let $=new URLSearchParams;for(let[Y,pe]of Object.entries(a))pe!=null&&$.append(Y,String(pe));let G=$.toString();G&&(g+=`?${G}`)}let v={...o??{}},A=c?JSON.stringify(c):void 0;A&&(v["content-type"]=v["content-type"]??"application/json");let R=await XFe({accessKeyId:y.accessKeyId,secretAccessKey:y.secretAccessKey,sessionToken:y.sessionToken,region:_,service:t,method:r,url:g,headers:v,body:A}),b={method:r,url:g,headers:R.headers,body:A?JSON.parse(A):void 0,timeout:l?l*1e3:3e4};try{let $=await tJ.sendRequest(b);return{status:$.status,headers:$.headers,body:$.body}}catch($){if(u)return{error:$?.message??"Request failed",response:$?.response?.body??null};throw $}}});var YFe=S$({displayName:"AWS Bedrock",description:"Build generative AI applications with foundation models",auth:Ft,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/amazon-bedrock.png",categories:["ARTIFICIAL_INTELLIGENCE"],authors:["onyedikachi-david"],actions:[j8,V8,J8,X8,MJ],triggers:[]});0&&(module.exports={awsBedrock});
|