@activepieces/piece-amazon-bedrock 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +7 -96
  2. package/src/index.js +109 -23
  3. package/src/index.d.ts +0 -6
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/custom-api-call.d.ts +0 -16
  7. package/src/lib/actions/custom-api-call.d.ts.map +0 -1
  8. package/src/lib/actions/custom-api-call.js +0 -173
  9. package/src/lib/actions/custom-api-call.js.map +0 -1
  10. package/src/lib/actions/generate-content-from-image.d.ts +0 -22
  11. package/src/lib/actions/generate-content-from-image.d.ts.map +0 -1
  12. package/src/lib/actions/generate-content-from-image.js +0 -125
  13. package/src/lib/actions/generate-content-from-image.js.map +0 -1
  14. package/src/lib/actions/generate-embeddings.d.ts +0 -16
  15. package/src/lib/actions/generate-embeddings.d.ts.map +0 -1
  16. package/src/lib/actions/generate-embeddings.js +0 -152
  17. package/src/lib/actions/generate-embeddings.js.map +0 -1
  18. package/src/lib/actions/generate-image.d.ts +0 -17
  19. package/src/lib/actions/generate-image.d.ts.map +0 -1
  20. package/src/lib/actions/generate-image.js +0 -139
  21. package/src/lib/actions/generate-image.js.map +0 -1
  22. package/src/lib/actions/send-prompt.d.ts +0 -25
  23. package/src/lib/actions/send-prompt.d.ts.map +0 -1
  24. package/src/lib/actions/send-prompt.js +0 -159
  25. package/src/lib/actions/send-prompt.js.map +0 -1
  26. package/src/lib/auth.d.ts +0 -6
  27. package/src/lib/auth.d.ts.map +0 -1
  28. package/src/lib/auth.js +0 -109
  29. package/src/lib/auth.js.map +0 -1
  30. package/src/lib/common.d.ts +0 -37
  31. package/src/lib/common.d.ts.map +0 -1
  32. package/src/lib/common.js +0 -239
  33. 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
- exports.awsBedrock = void 0;
4
- const pieces_framework_1 = require("@activepieces/pieces-framework");
5
- const shared_1 = require("@activepieces/shared");
6
- const send_prompt_1 = require("./lib/actions/send-prompt");
7
- const generate_content_from_image_1 = require("./lib/actions/generate-content-from-image");
8
- const generate_image_1 = require("./lib/actions/generate-image");
9
- const generate_embeddings_1 = require("./lib/actions/generate-embeddings");
10
- const custom_api_call_1 = require("./lib/actions/custom-api-call");
11
- const auth_1 = require("./lib/auth");
12
- exports.awsBedrock = (0, pieces_framework_1.createPiece)({
13
- displayName: 'AWS Bedrock',
14
- description: 'Build generative AI applications with foundation models',
15
- auth: auth_1.awsBedrockAuth,
16
- minimumSupportedRelease: '0.36.1',
17
- logoUrl: 'https://cdn.activepieces.com/pieces/amazon-bedrock.png',
18
- categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
19
- authors: ["onyedikachi-david"],
20
- actions: [send_prompt_1.sendPrompt, generate_content_from_image_1.generateContentFromImage, generate_image_1.generateImage, generate_embeddings_1.generateEmbeddings, custom_api_call_1.customApiCall],
21
- triggers: [],
22
- });
23
- //# sourceMappingURL=index.js.map
1
+ "use strict";var f5=Object.create;var su=Object.defineProperty;var g5=Object.getOwnPropertyDescriptor;var h5=Object.getOwnPropertyNames;var y5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty;var i=(e,t)=>su(e,"name",{value:t,configurable:!0});var D=(e,t)=>()=>(e&&(t=e(e=0)),t);var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bt=(e,t)=>{for(var r in t)su(e,r,{get:t[r],enumerable:!0})},lI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of h5(t))!_5.call(e,o)&&o!==r&&su(e,o,{get:()=>t[o],enumerable:!(n=g5(t,o))||n.enumerable});return e};var I=(e,t,r)=>(r=e!=null?f5(y5(e)):{},lI(t||!e||!e.__esModule?su(r,"default",{value:e,enumerable:!0}):r,e)),Q=e=>lI(su({},"__esModule",{value:!0}),e);var xw=N((Tw,_p)=>{(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(":"),de=[];for(let me=0;me<Y.length;me++)de.push(parseInt(Y[me],16));return de}(),{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 _p<"u"&&_p.exports?_p.exports=E:e.ipaddr=E})(Tw)});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 FZ=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"),qZ=i(e=>FZ(e),"getDefaultClientConfiguration"),VZ=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 HZ="__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=HZ;Ke.getDefaultClientConfiguration=qZ;Ke.resolveDefaultRuntimeConfig=VZ});var Me=N(Pi=>{"use strict";var WZ=Uo(),JZ=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"),KZ=i(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),xv=class{static{i(this,"Field")}name;kind;values;constructor({name:t,kind:r=WZ.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}},bv=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)}},Iv=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=ZZ(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 ZZ(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}i(ZZ,"cloneQuery");var wv=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 XZ(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}i(XZ,"isValidHostname");Pi.Field=xv;Pi.Fields=bv;Pi.HttpRequest=Iv;Pi.HttpResponse=wv;Pi.getHttpHandlerExtensionConfiguration=JZ;Pi.isValidHostname=XZ;Pi.resolveHttpHandlerRuntimeConfig=KZ});var P$=N(zs=>{"use strict";var E$=Me();function YZ(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(YZ,"resolveEventStreamConfig");var S$=i(e=>(t,r)=>async n=>{let{request:o}=n;return E$.HttpRequest.isInstance(o)?e.eventStreamPayloadHandler.handle(t,n,r):t(n)},"eventStreamHandlingMiddleware"),v$={tags:["EVENT_STREAM","SIGNATURE","HANDLE"],name:"eventStreamHandlingMiddleware",relation:"after",toMiddleware:"awsAuthMiddleware",override:!0},A$=i(e=>async t=>{let{request:r}=t;return E$.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"),R$={step:"build",tags:["EVENT_STREAM","HEADER","CONTENT_TYPE","CONTENT_SHA256"],name:"eventStreamHeaderMiddleware",override:!0},QZ=i(e=>({applyToStack:i(t=>{t.addRelativeTo(S$(e),v$),t.add(A$,R$)},"applyToStack")}),"getEventStreamPlugin");zs.eventStreamHandlingMiddleware=S$;zs.eventStreamHandlingMiddlewareOptions=v$;zs.eventStreamHeaderMiddleware=A$;zs.eventStreamHeaderMiddlewareOptions=R$;zs.getEventStreamPlugin=QZ;zs.resolveEventStreamConfig=YZ});var Ci=N(bu=>{"use strict";var e9=Me();function t9(e){return e}i(t9,"resolveHostHeaderConfig");var C$=i(e=>t=>async r=>{if(!e9.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"),T$={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},r9=i(e=>({applyToStack:i(t=>{t.add(C$(e),T$)},"applyToStack")}),"getHostHeaderPlugin");bu.getHostHeaderPlugin=r9;bu.hostHeaderMiddleware=C$;bu.hostHeaderMiddlewareOptions=T$;bu.resolveHostHeaderConfig=t9});var Ti=N(Sp=>{"use strict";var x$=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"),b$={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},n9=i(e=>({applyToStack:i(t=>{t.add(x$(),b$)},"applyToStack")}),"getLoggerPlugin");Sp.getLoggerPlugin=n9;Sp.loggerMiddleware=x$;Sp.loggerMiddlewareOptions=b$});var I$={};bt(I$,{InvokeStore:()=>Mv,InvokeStoreBase:()=>wu});var Iu,$v,wu,kv,Dv,Mv,w$=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")},$v=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");$v||(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)}},kv=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()}},Dv=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 Dv.create():new kv;return!$v&&globalThis.awslambda?.InvokeStore?globalThis.awslambda.InvokeStore:(!$v&&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})(Mv||(Mv={}))});var $$=N(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.recursionDetectionMiddleware=void 0;var o9=(w$(),Q(I$)),i9=Me(),Ov="X-Amzn-Trace-Id",s9="AWS_LAMBDA_FUNCTION_NAME",a9="_X_AMZN_TRACE_ID",c9=i(()=>e=>async t=>{let{request:r}=t;if(!i9.HttpRequest.isInstance(r))return e(t);let n=Object.keys(r.headers??{}).find(_=>_.toLowerCase()===Ov.toLowerCase())??Ov;if(r.headers.hasOwnProperty(n))return e(t);let o=process.env[s9],a=process.env[a9],l=(await o9.InvokeStore.getInstanceAsync())?.getXRayTraceId()??a,d=i(_=>typeof _=="string"&&_.length>0,"nonEmptyString");return d(o)&&d(l)&&(r.headers[Ov]=l),e({...t,request:r})},"recursionDetectionMiddleware");vp.recursionDetectionMiddleware=c9});var xi=N(ja=>{"use strict";var $u=$$(),u9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},l9=i(e=>({applyToStack:i(t=>{t.add($u.recursionDetectionMiddleware(),u9)},"applyToStack")}),"getRecursionDetectionPlugin");ja.getRecursionDetectionPlugin=l9;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 Nv,d9,k$=D(()=>{Nv=I(Uo()),d9=i(e=>e[Nv.SMITHY_CONTEXT_KEY]||(e[Nv.SMITHY_CONTEXT_KEY]={}),"getSmithyContext")});var It=N(Lv=>{"use strict";var D$=Uo(),p9=i(e=>e[D$.SMITHY_CONTEXT_KEY]||(e[D$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),m9=i(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider");Lv.getSmithyContext=p9;Lv.normalizeProvider=m9});var M$,O$=D(()=>{M$=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 f9(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}var N$,ku,Ap=D(()=>{N$=I(It());O$();i(f9,"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=M$(a,c),l=f9(e.httpAuthSchemes),d=(0,N$.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 L$,Bo,z$=D(()=>{Ap();L$={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}),L$)},"applyToStack")}),"getHttpAuthSchemeEndpointRuleSetPlugin")});var U$,g9,B$=D(()=>{Ap();U$={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},g9=i((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i(n=>{n.addRelativeTo(ku(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),U$)},"applyToStack")}),"getHttpAuthSchemePlugin")});var G$=D(()=>{Ap();z$();B$()});var F$,j$,h9,y9,zv,Uv=D(()=>{F$=I(Me()),j$=I(It()),h9=i(e=>t=>{throw t},"defaultErrorHandler"),y9=i((e,t)=>{},"defaultSuccessHandler"),zv=i(e=>(t,r)=>async n=>{if(!F$.HttpRequest.isInstance(n.request))return t(n);let a=(0,j$.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||h9)(c));return(l.successHandler||y9)(d.response,c),d},"httpSigningMiddleware")});var q$,Go,V$=D(()=>{Uv();q$={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(zv(e),q$)},"applyToStack")}),"getHttpSigningPlugin")});var H$=D(()=>{Uv();V$()});var bi,W$=D(()=>{bi=i(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider")});function J$(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 _9(t,c.client,u,c.withCommand,...l);else throw new Error(`Invalid client, expected instance of ${e.name}`);yield E;let g=_;_=E9(E,n),y=!!(_&&(!c.stopOnSameToken||_!==g))}return void 0},"paginateOperation")}var _9,E9,K$=D(()=>{_9=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(J$,"createPaginator");E9=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 Rp=N(Z$=>{"use strict";var S9=i(e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer");Z$.isArrayBuffer=S9});var qa=N(Gv=>{"use strict";var v9=Rp(),Bv=require("buffer"),A9=i((e,t=0,r=e.byteLength-t)=>{if(!v9.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Bv.Buffer.from(e,t,r)},"fromArrayBuffer"),R9=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?Bv.Buffer.from(e,t):Bv.Buffer.from(e)},"fromString");Gv.fromArrayBuffer=A9;Gv.fromString=R9});var X$=N(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.fromBase64=void 0;var P9=qa(),C9=/^[A-Za-z0-9+/]*={0,2}$/,T9=i(e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!C9.exec(e))throw new TypeError("Invalid base64 string.");let t=(0,P9.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},"fromBase64");Pp.fromBase64=T9});var ft=N(Cp=>{"use strict";var Y$=qa(),Q$=i(e=>{let t=Y$.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),x9=i(e=>typeof e=="string"?Q$(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array"),b9=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 Y$.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8");Cp.fromUtf8=Q$;Cp.toUint8Array=x9;Cp.toUtf8=b9});var ek=N(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.toBase64=void 0;var I9=qa(),w9=ft(),$9=i(e=>{let t;if(typeof e=="string"?t=(0,w9.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,I9.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")},"toBase64");Tp.toBase64=$9});var gt=N(Fo=>{"use strict";var xp=X$(),bp=ek();Object.prototype.hasOwnProperty.call(xp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Fo,"__proto__")&&Object.defineProperty(Fo,"__proto__",{enumerable:!0,value:xp.__proto__});Object.keys(xp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Fo,e)&&(Fo[e]=xp[e])});Object.prototype.hasOwnProperty.call(bp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Fo,"__proto__")&&Object.defineProperty(Fo,"__proto__",{enumerable:!0,value:bp.__proto__});Object.keys(bp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Fo,e)&&(Fo[e]=bp[e])})});var jv=N(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.ChecksumStream=void 0;var k9=gt(),D9=require("stream"),Fv=class extends D9.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??k9.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()}};Ip.ChecksumStream=Fv});var jo=N(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.isBlob=Va.isReadableStream=void 0;var M9=i(e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),"isReadableStream");Va.isReadableStream=M9;var O9=i(e=>typeof Blob=="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob),"isBlob");Va.isBlob=O9});var tk=N(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.ChecksumStream=void 0;var N9=typeof ReadableStream=="function"?ReadableStream:function(){},qv=class extends N9{static{i(this,"ChecksumStream")}};wp.ChecksumStream=qv});var rk=N($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.createChecksumStream=void 0;var L9=gt(),z9=jo(),U9=tk(),B9=i(({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:o})=>{if(!(0,z9.isReadableStream)(r))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);let a=o??L9.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,U9.ChecksumStream.prototype),u},"createChecksumStream");$p.createChecksumStream=B9});var nk=N(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});Vv.createChecksumStream=q9;var G9=jo(),F9=jv(),j9=rk();function q9(e){return typeof ReadableStream=="function"&&(0,G9.isReadableStream)(e.source)?(0,j9.createChecksumStream)(e):new F9.ChecksumStream(e)}i(q9,"createChecksumStream")});var Wv=N(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.ByteArrayCollector=void 0;var Hv=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}};kp.ByteArrayCollector=Hv});var ak=N(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.createBufferedReadable=void 0;qo.createBufferedReadableStream=ok;qo.merge=ik;qo.flush=Dp;qo.sizeOf=Ha;qo.modeOf=sk;var V9=Wv();function ok(e,t,r){let n=e.getReader(),o=!1,a=0,c=["",new V9.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=Dp(c,u);Ha(g)>0&&d.enqueue(g)}d.close()}else{let g=sk(E,!1);if(u!==g&&(u>=0&&d.enqueue(Dp(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=ik(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(Dp(c,u)):await l(d)}}},"pull");return new ReadableStream({pull:l})}i(ok,"createBufferedReadableStream");qo.createBufferedReadable=ok;function ik(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(ik,"merge");function Dp(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(Dp,"flush");function Ha(e){return e?.byteLength??e?.length??0}i(Ha,"sizeOf");function sk(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}i(sk,"modeOf")});var uk=N(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});Jv.createBufferedReadable=J9;var H9=require("node:stream"),ck=Wv(),Vo=ak(),W9=jo();function J9(e,t,r){if((0,W9.isReadableStream)(e))return(0,Vo.createBufferedReadableStream)(e,t,r);let n=new H9.Readable({read(){}}),o=!1,a=0,c=["",new ck.ByteArrayCollector(l=>new Uint8Array(l)),new ck.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(J9,"createBufferedReadable")});var lk=N(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.getAwsChunkedEncodingStream=void 0;var K9=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");Mp.getAwsChunkedEncodingStream=K9});var dk=N(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});Kv.getAwsChunkedEncodingStream=Q9;var Z9=require("node:stream"),X9=lk(),Y9=jo();function Q9(e,t){let r=e,n=e;if((0,Y9.isReadableStream)(n))return(0,X9.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 Z9.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(Q9,"getAwsChunkedEncodingStream")});var pk=N(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});Zv.headStream=eX;async function eX(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(eX,"headStream")});var mk=N(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.headStream=void 0;var tX=require("stream"),rX=pk(),nX=jo(),oX=i((e,t)=>(0,nX.isReadableStream)(e)?(0,rX.headStream)(e,t):new Promise((r,n)=>{let o=new Xv;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");Op.headStream=oX;var Xv=class extends tX.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 Np=N(Yv=>{"use strict";var fk=i(e=>encodeURIComponent(e).replace(/[!'()*]/g,iX),"escapeUri"),iX=i(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),sX=i(e=>e.split("/").map(fk).join("/"),"escapeUriPath");Yv.escapeUri=fk;Yv.escapeUriPath=sX});var Lp=N(gk=>{"use strict";var Qv=Np();function aX(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=Qv.escapeUri(r),Array.isArray(n))for(let o=0,a=n.length;o<a;o++)t.push(`${r}=${Qv.escapeUri(n[o])}`);else{let o=r;(n||typeof n=="string")&&(o+=`=${Qv.escapeUri(n)}`),t.push(o)}}return t.join("&")}i(aX,"buildQueryString");gk.buildQueryString=aX});var to=N(Mu=>{"use strict";var Sk=Me(),vk=Lp(),zp=require("node:https"),Ak=require("node:stream"),Bp=require("node:http2");function Gp(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(Gp,"buildAbortError");var cX=["ECONNRESET","EPIPE","ETIMEDOUT"],Rk=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")},hk=1e3,uX=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,hk),hk)},"setConnectionTimeout"),lX=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"),dX=3e3,pX=i((e,{keepAlive:t,keepAliveMsecs:r},n=dX)=>{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"),yk=3e3,mX=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:yk),yk)},"setSocketTimeout"),_k=6e3;async function Pk(e,t,r=_k,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(_k,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&&fX(e,t.body)}i(Pk,"writeRequestBody");function fX(e,t){if(t instanceof Ak.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(fX,"writeBody");var gX=0,Up,Ek,eA=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=Gp(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?zp.Agent:Up)({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=vk.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},de=(a?zp.request:Ek)(G,we=>{let Kt=new Sk.HttpResponse({statusCode:we.statusCode||-1,reason:we.statusMessage,headers:Rk(we.headers),body:we});_({response:Kt})});if(de.on("error",we=>{cX.includes(we.code)?y(Object.assign(we,{name:"TimeoutError"})):y(we)}),r){let we=i(()=>{de.destroy();let Kt=Gp(r);y(Kt)},"onAbort");if(typeof r.addEventListener=="function"){let Kt=r;Kt.addEventListener("abort",we,{once:!0}),de.once("close",()=>Kt.removeEventListener("abort",we))}else r.onabort=we}let me=n??o.requestTimeout;d.push(uX(de,y,o.connectionTimeout)),d.push(lX(de,y,me,o.throwOnRequestTimeout,o.logger??console)),d.push(mX(de,y,o.socketTimeout));let xt=G.agent;typeof xt=="object"&&"keepAlive"in xt&&d.push(pX(de,{keepAlive:xt.keepAlive,keepAliveMsecs:xt.keepAliveMsecs})),l=Pk(de,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 Ek=g,Up=E,c instanceof Up||typeof c?.destroy=="function"?(this.externalAgent=!0,c):new Up({keepAlive:_,maxSockets:y,...c})},"httpAgentProvider"),httpsAgent:u instanceof zp.Agent||typeof u?.destroy=="function"?(this.externalAgent=!0,u):new zp.Agent({keepAlive:_,maxSockets:y,...u}),logger:d}}},hX=new Uint16Array(1),Du=class{static{i(this,"ClientHttp2SessionRef")}id=hX[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}},tA=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()}},rA=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(Bp.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(Bp.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 tA;this.config.maxConcurrency&&r.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(t,r)}return this.connectionPools.get(t)}getUrlString(t){return t.destination.toString()}},nA=class e{static{i(this,"NodeHttp2Handler")}config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new rA({});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=Gp(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 de=`${$}//${Y}${A}${b?`:${b}`:""}`,me={destination:new URL(de)},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=vk.buildQueryString(G??{}),Lr=t.path;ko&&(Lr+=`?${ko}`),t.fragment&&(Lr+=`#${t.fragment}`);let Zt=Kt.request({...t.headers,[Bp.constants.HTTP2_HEADER_PATH]:Lr,[Bp.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=Gp(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 Sk.HttpResponse({statusCode:Ve[":status"]??-1,headers:Rk(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=Pk(Zt,t,l)})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}},oA=class extends Ak.Writable{static{i(this,"Collector")}bufferedBytes=[];_write(t,r,n){this.bufferedBytes.push(t),n()}},yX=i(e=>_X(e)?EX(e):new Promise((t,r)=>{let n=new oA;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"),_X=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStreamInstance");async function EX(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(EX,"collectReadableStream");Mu.DEFAULT_REQUEST_TIMEOUT=gX;Mu.NodeHttp2Handler=nA;Mu.NodeHttpHandler=eA;Mu.streamCollector=yX});var sA=N(jp=>{"use strict";var Ck=Me(),SX=Lp(),vX=gt();function Tk(e,t){return new Request(e,t)}i(Tk,"createRequest");function AX(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(AX,"requestTimeout");var Fp={supported:void 0},iA=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)),Fp.supported===void 0&&(Fp.supported=typeof Request<"u"&&"keepalive"in Tk("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 $=xk(r);return Promise.reject($)}let u=t.path,l=SX.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),Fp.supported&&(v.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(v,this.config.requestInit(t));let A=i(()=>{},"removeSignalEventListener"),R=Tk(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 Ck.HttpResponse({headers:Y,reason:$.statusText,statusCode:$.status,body:$.body})}:$.blob().then(me=>({response:new Ck.HttpResponse({headers:Y,reason:$.statusText,statusCode:$.status,body:me})}))}),AX(o)];return r&&b.push(new Promise(($,G)=>{let Y=i(()=>{let de=xk(r);G(de)},"onAbort");if(typeof r.addEventListener=="function"){let de=r;de.addEventListener("abort",Y,{once:!0}),A=i(()=>de.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 xk(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(xk,"buildAbortError");var RX=i(async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):PX(e):CX(e),"streamCollector");async function PX(e){let t=await TX(e),r=vX.fromBase64(t);return new Uint8Array(r)}i(PX,"collectBlob");async function CX(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(CX,"collectStream");function TX(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(TX,"readToBase64");jp.FetchHttpHandler=iA;jp.keepAliveSupport=Fp;jp.streamCollector=RX});var Wa=N(cA=>{"use strict";var bk={},aA={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),bk[e]=t,aA[t]=e}function xX(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 aA)t[r/2]=aA[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}i(xX,"fromHex");function bX(e){let t="";for(let r=0;r<e.byteLength;r++)t+=bk[e[r]];return t}i(bX,"toHex");cA.fromHex=xX;cA.toHex=bX});var kk=N(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.sdkStreamMixin=void 0;var IX=sA(),wX=gt(),$X=Wa(),kX=ft(),Ik=jo(),wk="The stream has already been transformed.",DX=i(e=>{if(!$k(e)&&!(0,Ik.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(wk);return t=!0,await(0,IX.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,wX.toBase64)(a);if(o==="hex")return(0,$X.toHex)(a);if(o===void 0||o==="utf8"||o==="utf-8")return(0,kX.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(wk);if(t=!0,$k(e))return n(e);if((0,Ik.isReadableStream)(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)},"transformToWebStream")})},"sdkStreamMixin");qp.sdkStreamMixin=DX;var $k=i(e=>typeof Blob=="function"&&e instanceof Blob,"isBlobInstance")});var Mk=N(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.sdkStreamMixin=void 0;var MX=to(),OX=qa(),uA=require("stream"),NX=kk(),Dk="The stream has already been transformed.",LX=i(e=>{if(!(e instanceof uA.Readable))try{return(0,NX.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(Dk);return t=!0,await(0,MX.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,OX.fromArrayBuffer)(o.buffer,o.byteOffset,o.byteLength).toString(n):new TextDecoder(n).decode(o)},"transformToString"),transformToWebStream:i(()=>{if(t)throw new Error(Dk);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof uA.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,uA.Readable.toWeb(e)},"transformToWebStream")})},"sdkStreamMixin");Vp.sdkStreamMixin=LX});var Ok=N(lA=>{"use strict";Object.defineProperty(lA,"__esModule",{value:!0});lA.splitStream=zX;async function zX(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}i(zX,"splitStream")});var zk=N(dA=>{"use strict";Object.defineProperty(dA,"__esModule",{value:!0});dA.splitStream=BX;var Nk=require("stream"),UX=Ok(),Lk=jo();async function BX(e){if((0,Lk.isReadableStream)(e)||(0,Lk.isBlob)(e))return(0,UX.splitStream)(e);let t=new Nk.PassThrough,r=new Nk.PassThrough;return e.pipe(t),e.pipe(r),[t,r]}i(BX,"splitStream")});var Qp=N(ze=>{"use strict";var Uk=gt(),Bk=ft(),Hp=jv(),Wp=nk(),Jp=uk(),Kp=dk(),Zp=mk(),Xp=Mk(),Yp=zk(),Gk=jo(),pA=class e extends Uint8Array{static{i(this,"Uint8ArrayBlobAdapter")}static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?e.mutate(Uk.fromBase64(t)):e.mutate(Bk.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"?Uk.toBase64(this):Bk.toUtf8(this)}};ze.isBlob=Gk.isBlob;ze.isReadableStream=Gk.isReadableStream;ze.Uint8ArrayBlobAdapter=pA;Object.prototype.hasOwnProperty.call(Hp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Hp.__proto__});Object.keys(Hp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Hp[e])});Object.prototype.hasOwnProperty.call(Wp,"__proto__")&&!Object.prototype.hasOwnProperty.call(ze,"__proto__")&&Object.defineProperty(ze,"__proto__",{enumerable:!0,value:Wp.__proto__});Object.keys(Wp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ze,e)&&(ze[e]=Wp[e])});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])})});var em,sn,tm=D(()=>{em=I(Qp()),sn=i(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return em.Uint8ArrayBlobAdapter.mutate(e);if(!e)return em.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return em.Uint8ArrayBlobAdapter.mutate(await r)},"collectBody")});function ro(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var rm=D(()=>{i(ro,"extendedEncodeURIComponent")});var $n,mA=D(()=>{$n=i(e=>typeof e=="function"?e():e,"deref")});var Ou,nm=D(()=>{Ou=i((e,t,r,n,o)=>({name:t,namespace:e,traits:r,input:n,output:o}),"operation")});var Fk,jk,qk,fA,Vk=D(()=>{Fk=I(Me()),jk=I(It());nm();qk=i(e=>(t,r)=>async n=>{let{response:o}=await t(n),{operationSchema:a}=(0,jk.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(Fk.HttpResponse.isInstance(o)){let{headers:g={}}=o,v=Object.entries(g);y.$metadata={httpStatusCode:o.statusCode,requestId:fA(/^x-[\w-]+-request-?id$/,v),extendedRequestId:fA(/^x-[\w-]+-id-2$/,v),cfId:fA(/^x-[\w-]+-cf-id$/,v)}}}catch{}}throw y}},"schemaDeserializationMiddleware"),fA=i((e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],"findHeader")});var Wk=N(Hk=>{"use strict";function GX(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(GX,"parseQueryString");Hk.parseQueryString=GX});var Gr=N(Kk=>{"use strict";var FX=Wk(),Jk=i(e=>{if(typeof e=="string")return Jk(new URL(e));let{hostname:t,pathname:r,port:n,protocol:o,search:a}=e,c;return a&&(c=FX.parseQueryString(a)),{hostname:t,port:n?parseInt(n):void 0,protocol:o,path:r,query:c}},"parseUrl");Kk.parseUrl=Jk});var gA,hA,Zk=D(()=>{gA=I(Gr()),hA=i(e=>{if(typeof e=="object"){if("url"in e){let t=(0,gA.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,gA.parseUrl)(e)},"toEndpointV1")});var Xk={};bt(Xk,{toEndpointV1:()=>hA});var yA=D(()=>{Zk()});var Yk,Qk,eD=D(()=>{yA();Yk=I(It());nm();Qk=i(e=>(t,r)=>async n=>{let{operationSchema:o}=(0,Yk.getSmithyContext)(r),[,a,c,u,l,d]=o??[],_=r.endpointV2?async()=>hA(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(Qk(e),rD),t.add(qk(e),tD),e.protocol.setSerdeContext(e)},"applyToStack")}}var tD,rD,nD=D(()=>{Vk();eD();tD={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rD={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(Ho,"getSchemaSerdePlugin")});var ht,Ii=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 om,jX,oD=D(()=>{Ii();om=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 om,{name:t,namespace:e,traits:r,valueSchema:n}),"list")});var im,qX,iD=D(()=>{Ii();im=class e extends ht{static{i(this,"MapSchema")}static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=e.symbol},qX=i((e,t,r,n,o)=>ht.assign(new im,{name:t,namespace:e,traits:r,keySchema:n,valueSchema:o}),"map")});var sm,VX,sD=D(()=>{Ii();sm=class e extends ht{static{i(this,"OperationSchema")}static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=e.symbol},VX=i((e,t,r,n,o)=>ht.assign(new sm,{name:t,namespace:e,traits:r,input:n,output:o}),"op")});var Ja,HX,_A=D(()=>{Ii();Ja=class e extends ht{static{i(this,"StructureSchema")}static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=e.symbol},HX=i((e,t,r,n,o)=>ht.assign(new Ja,{name:t,namespace:e,traits:r,memberNames:n,memberList:o}),"struct")});var am,WX,aD=D(()=>{Ii();_A();am=class e extends Ja{static{i(this,"ErrorSchema")}static symbol=Symbol.for("@smithy/err");ctor;symbol=e.symbol},WX=i((e,t,r,n,o,a)=>ht.assign(new am,{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,cm[e])return cm[e];let t={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return cm[e]=t}var cm,EA=D(()=>{cm=[];i(no,"translateTraits")});function Lu(e,t){if(e instanceof re)return Object.assign(e,{memberName:t,_isMemberSchema:!0});let r=re;return new r(e,t)}var Nu,um,lm,re,SA,cD,uD=D(()=>{mA();EA();Nu={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},um=[],lm={},re=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;SA(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),cD(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(um[t])return um[t]}else if(typeof t=="string"){if(lm[t])return lm[t]}else if(r&&t[Nu.ns])return t[Nu.ns];let n=$n(t);if(n instanceof e)return n;if(SA(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"?lm[n]=o:typeof n=="number"?um[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(SA(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");SA=i(e=>Array.isArray(e)&&e.length===2,"isMemberSchema"),cD=i(e=>Array.isArray(e)&&e.length>=5,"isStaticSchema")});var zu,JX,KX,lD=D(()=>{Ii();zu=class e extends ht{static{i(this,"SimpleSchema")}static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=e.symbol},JX=i((e,t,r,n)=>ht.assign(new zu,{name:t,namespace:e,traits:n,schemaRef:r}),"sim"),KX=i((e,t,r,n)=>ht.assign(new zu,{name:t,namespace:e,traits:r,schemaRef:n}),"simAdapter")});var ZX,dD=D(()=>{ZX={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 nt,pD=D(()=>{nt=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:()=>am,ListSchema:()=>om,MapSchema:()=>im,NormalizedSchema:()=>re,OperationSchema:()=>sm,SCHEMA:()=>ZX,Schema:()=>ht,SimpleSchema:()=>zu,StructureSchema:()=>Ja,TypeRegistry:()=>nt,deref:()=>$n,deserializerMiddlewareOption:()=>tD,error:()=>WX,getSchemaSerdePlugin:()=>Ho,isStaticSchema:()=>cD,list:()=>jX,map:()=>qX,op:()=>VX,operation:()=>Ou,serializerMiddlewareOption:()=>rD,sim:()=>JX,simAdapter:()=>KX,simpleSchemaCacheN:()=>um,simpleSchemaCacheS:()=>lm,struct:()=>HX,traitsCache:()=>cm,translateTraits:()=>no});var ke=D(()=>{mA();nD();oD();iD();sD();nm();aD();uD();Ii();lD();_A();dD();EA();pD()});var XX,mD=D(()=>{XX=i((e,t,r=n=>n)=>e,"copyDocumentWithTransform")});var YX,QX,Uu,e7,dm,Bu,t7,vA,AA,RA,PA,r7,n7,fD,o7,i7,mm,s7,CA,a7,Ka,TA,c7,u7,l7,gD,hD,d7,p7,Us,xA,pm,Gu,bA=D(()=>{YX=i(e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},"parseBoolean"),QX=i(e=>{if(e!=null){if(typeof e=="number"){if((e===0||e===1)&&Gu.warn(pm(`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(pm(`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(pm(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},"expectNumber"),e7=Math.ceil(2**127*(2-2**-23)),dm=i(e=>{let t=Uu(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>e7)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"),t7=Bu,vA=i(e=>PA(e,32),"expectInt32"),AA=i(e=>PA(e,16),"expectShort"),RA=i(e=>PA(e,8),"expectByte"),PA=i((e,t)=>{let r=Bu(e);if(r!==void 0&&r7(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},"expectSizedInt"),r7=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"),n7=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"),fD=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"),o7=i(e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Gu.warn(pm(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},"expectString"),i7=i(e=>{if(e==null)return;let t=fD(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"),mm=i(e=>Uu(typeof e=="string"?Ka(e):e),"strictParseDouble"),s7=mm,CA=i(e=>dm(typeof e=="string"?Ka(e):e),"strictParseFloat32"),a7=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ka=i(e=>{let t=e.match(a7);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},"parseNumber"),TA=i(e=>typeof e=="string"?gD(e):Uu(e),"limitedParseDouble"),c7=TA,u7=TA,l7=i(e=>typeof e=="string"?gD(e):dm(e),"limitedParseFloat32"),gD=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"),hD=i(e=>Bu(typeof e=="string"?Ka(e):e),"strictParseLong"),d7=hD,p7=i(e=>vA(typeof e=="string"?Ka(e):e),"strictParseInt32"),Us=i(e=>AA(typeof e=="string"?Ka(e):e),"strictParseShort"),xA=i(e=>RA(typeof e=="string"?Ka(e):e),"strictParseByte"),pm=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`${m7[n]}, ${l} ${wA[r]} ${t} ${d}:${_}:${y} GMT`}var m7,wA,f7,g7,h7,$A,y7,_7,E7,kA,DA,Fu,S7,v7,A7,IA,R7,P7,C7,oo,T7,x7,Za,yD=D(()=>{bA();m7=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i(ju,"dateToUtcString");f7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),g7=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=f7.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,a,c,u,l,d]=t,_=Us(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"),h7=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),$A=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=h7.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,a,c,u,l,d,_]=t,y=Us(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()-x7(_)),v},"parseRfc3339DateTimeWithOffset"),y7=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$/),_7=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$/),E7=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})$/),kA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=y7.exec(e);if(t){let[r,n,o,a,c,u,l,d]=t;return Fu(Us(Za(a)),IA(o),oo(n,"day",1,31),{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d})}if(t=_7.exec(e),t){let[r,n,o,a,c,u,l,d]=t;return A7(Fu(S7(a),IA(o),oo(n,"day",1,31),{hours:c,minutes:u,seconds:l,fractionalMilliseconds:d}))}if(t=E7.exec(e),t){let[r,n,o,a,c,u,l,d]=t;return Fu(Us(Za(d)),IA(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"),DA=i(e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=mm(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 P7(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),T7(n.fractionalMilliseconds)))},"buildDate"),S7=i(e=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Us(Za(e));return r<t?r+100:r},"parseTwoDigitYear"),v7=50*365*24*60*60*1e3,A7=i(e=>e.getTime()-new Date().getTime()>v7?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,"adjustRfc850Year"),IA=i(e=>{let t=wA.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},"parseMonthByShortName"),R7=[31,28,31,30,31,30,31,31,30,31,30,31],P7=i((e,t,r)=>{let n=R7[t];if(t===1&&C7(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${wA[t]} in ${e}: ${r}`)},"validateDayOfMonth"),C7=i(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),oo=i((e,t,r,n)=>{let o=xA(Za(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},"parseDateValue"),T7=i(e=>e==null?0:CA("0."+e)*1e3,"parseMilliseconds"),x7=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:()=>FD,__assign:()=>fm,__asyncDelegator:()=>MD,__asyncGenerator:()=>DD,__asyncValues:()=>OD,__await:()=>Xa,__awaiter:()=>xD,__classPrivateFieldGet:()=>UD,__classPrivateFieldIn:()=>GD,__classPrivateFieldSet:()=>BD,__createBinding:()=>hm,__decorate:()=>SD,__disposeResources:()=>jD,__esDecorate:()=>AD,__exportStar:()=>ID,__extends:()=>_D,__generator:()=>bD,__importDefault:()=>zD,__importStar:()=>LD,__makeTemplateObject:()=>ND,__metadata:()=>TD,__param:()=>vD,__propKey:()=>PD,__read:()=>NA,__rest:()=>ED,__rewriteRelativeImportExtension:()=>qD,__runInitializers:()=>RD,__setFunctionName:()=>CD,__spread:()=>wD,__spreadArray:()=>kD,__spreadArrays:()=>$D,__values:()=>gm,default:()=>w7});function _D(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");MA(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ED(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 SD(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 vD(e,t){return function(r,n){t(r,n,e)}}function AD(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 RD(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 PD(e){return typeof e=="symbol"?e:"".concat(e)}function CD(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 TD(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function xD(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 bD(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 ID(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&hm(t,e,r)}function gm(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 NA(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 wD(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(NA(arguments[t]));return e}function $D(){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 kD(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 DD(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 MD(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 OD(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 gm=="function"?gm(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 ND(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function LD(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=OA(e),n=0;n<r.length;n++)r[n]!=="default"&&hm(t,e,r[n]);return b7(t,e),t}function zD(e){return e&&e.__esModule?e:{default:e}}function UD(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 BD(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 GD(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 FD(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 jD(e){function t(a){e.error=e.hasError?new I7(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 qD(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 MA,fm,hm,b7,OA,I7,w7,Ko=D(()=>{MA=i(function(e,t){return MA=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])},MA(e,t)},"extendStatics");i(_D,"__extends");fm=i(function(){return fm=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"),fm.apply(this,arguments)},"__assign");i(ED,"__rest");i(SD,"__decorate");i(vD,"__param");i(AD,"__esDecorate");i(RD,"__runInitializers");i(PD,"__propKey");i(CD,"__setFunctionName");i(TD,"__metadata");i(xD,"__awaiter");i(bD,"__generator");hm=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(ID,"__exportStar");i(gm,"__values");i(NA,"__read");i(wD,"__spread");i($D,"__spreadArrays");i(kD,"__spreadArray");i(Xa,"__await");i(DD,"__asyncGenerator");i(MD,"__asyncDelegator");i(OD,"__asyncValues");i(ND,"__makeTemplateObject");b7=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},OA=i(function(e){return OA=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},OA(e)},"ownKeys");i(LD,"__importStar");i(zD,"__importDefault");i(UD,"__classPrivateFieldGet");i(BD,"__classPrivateFieldSet");i(GD,"__classPrivateFieldIn");i(FD,"__addDisposableResource");I7=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(jD,"__disposeResources");i(qD,"__rewriteRelativeImportExtension");w7={__extends:_D,__assign:fm,__rest:ED,__decorate:SD,__param:vD,__esDecorate:AD,__runInitializers:RD,__propKey:PD,__setFunctionName:CD,__metadata:TD,__awaiter:xD,__generator:bD,__createBinding:hm,__exportStar:ID,__values:gm,__read:NA,__spread:wD,__spreadArrays:$D,__spreadArray:kD,__await:Xa,__asyncGenerator:DD,__asyncDelegator:MD,__asyncValues:OD,__makeTemplateObject:ND,__importStar:LD,__importDefault:zD,__classPrivateFieldGet:UD,__classPrivateFieldSet:BD,__classPrivateFieldIn:GD,__addDisposableResource:FD,__disposeResources:jD,__rewriteRelativeImportExtension:qD}});var HD=N(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.randomUUID=void 0;var $7=(Ko(),Q(Jo)),VD=$7.__importDefault(require("crypto"));ym.randomUUID=VD.default.randomUUID.bind(VD.default)});var LA=N(JD=>{"use strict";var WD=HD(),Yt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),k7=i(()=>{if(WD.randomUUID)return WD.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");JD.v4=k7});var an,KD=D(()=>{an=I(LA())});var pr,ZD=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 zA(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var XD=D(()=>{i(zA,"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 UA,BA,GA,YD,QD,D7,M7,O7,N7,L7,Ya,FA,jA,eM=D(()=>{UA="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",BA="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",GA="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",YD="(\\d?\\d)",QD="(\\d{4})",D7=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),M7=new RegExp(`^${UA}, ${YD} ${BA} ${QD} ${GA} GMT$`),O7=new RegExp(`^${UA}, ${YD}-${BA}-(\\d\\d) ${GA} GMT$`),N7=new RegExp(`^${UA} ${BA} ( [1-9]|\\d\\d) ${GA} ${QD}$`),L7=["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"),FA=i(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");let t=D7.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"),jA=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=M7.exec(e))?[,t,r,n,o,a,c,u]=l:(l=O7.exec(e))?([,t,r,n,o,a,c,u]=l,n=(Number(n)+1900).toString()):(l=N7.exec(e))&&([,r,t,o,a,c,u,n]=l),n&&c){let d=Date.UTC(Number(n),L7.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 qA(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 tM=D(()=>{i(qA,"splitEvery")});var qu,rM=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 VA(e){return new Ze(String(e),"bigDecimal")}var nM,Ze,oM=D(()=>{nM=/^-?\d*(\.\d+)?$/,Ze=class e{static{i(this,"NumericValue")}string;type;constructor(t,r){if(this.string=t,this.type=r,!nM.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"&&nM.test(r.string)}};i(VA,"nv")});var HA={};bt(HA,{LazyJsonString:()=>pr,NumericValue:()=>Ze,_parseEpochTimestamp:()=>Ya,_parseRfc3339DateTimeWithOffset:()=>FA,_parseRfc7231DateTime:()=>jA,copyDocumentWithTransform:()=>XX,dateToUtcString:()=>ju,expectBoolean:()=>QX,expectByte:()=>RA,expectFloat32:()=>dm,expectInt:()=>t7,expectInt32:()=>vA,expectLong:()=>Bu,expectNonNull:()=>n7,expectNumber:()=>Uu,expectObject:()=>fD,expectShort:()=>AA,expectString:()=>o7,expectUnion:()=>i7,generateIdempotencyToken:()=>an.v4,handleFloat:()=>c7,limitedParseDouble:()=>TA,limitedParseFloat:()=>u7,limitedParseFloat32:()=>l7,logger:()=>Gu,nv:()=>VA,parseBoolean:()=>YX,parseEpochTimestamp:()=>DA,parseRfc3339DateTime:()=>g7,parseRfc3339DateTimeWithOffset:()=>$A,parseRfc7231DateTime:()=>kA,quoteHeader:()=>zA,splitEvery:()=>qA,splitHeader:()=>qu,strictParseByte:()=>xA,strictParseDouble:()=>mm,strictParseFloat:()=>s7,strictParseFloat32:()=>CA,strictParseInt:()=>d7,strictParseInt32:()=>p7,strictParseLong:()=>hD,strictParseShort:()=>Us});var Qt=D(()=>{mD();yD();KD();ZD();bA();XD();eM();tM();rM();oM()});var mr,Qa=D(()=>{mr=class{static{i(this,"SerdeContext")}serdeContext;setSerdeContext(t){this.serdeContext=t}}});var _m,WA,iM=D(()=>{_m=I(ft()),WA=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:de}=G.getMergedTraits();if(b=b||!!(Y||de),de)G.isBlobSchema()?R[$]=v:G.isStringSchema()?R[$]=(this.serdeContext?.utf8Encoder??_m.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??_m.fromUtf8)(_):_,eventType:a,explicitPayloadContentType:u,additionalHeaders:d}}}});var sM={};bt(sM,{EventStreamSerde:()=>WA});var aM=D(()=>{iM()});var Em,Bs,Sm=D(()=>{ke();Em=I(Me());Qa();Bs=class extends mr{static{i(this,"HttpProtocol")}options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=nt.for(t.defaultNamespace);for(let r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Em.HttpRequest}getResponseType(){return Em.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=re.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(()=>(aM(),sM));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 cM,uM,Gs,lM=D(()=>{ke();Qt();cM=I(Me()),uM=I(Qp());tm();rm();Sm();Gs=class extends Bs{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=re.of(t?.input),_=[],y=[],E=!1,g,v=new cM.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],de=b.httpPrefixHeaders+G;a.write([R.getValueSchema(),{httpHeader:de}],Y),u[de.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=re.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=re.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,uM.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=qA(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 dM,Xo,pM=D(()=>{ke();dM=I(Me());tm();Sm();Xo=class extends Bs{static{i(this,"RpcProtocol")}async serializeRequest(t,r,n){let o=this.serializer,a={},c={},u=await n.endpoint(),l=re.of(t?.input),d=l.getSchema(),_,y=r&&typeof r=="object"?r:{},E=new dM.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=re.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 JA,KA=D(()=>{rm();JA=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 ZA(e,t){return new vm(e,t)}var mM,vm,fM=D(()=>{mM=I(Me());KA();i(ZA,"requestBuilder");vm=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 mM.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=JA(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 Am=D(()=>{i(Fr,"determineTimestampFormat")});var XA,gM,Fs,YA=D(()=>{ke();Qt();XA=I(gt()),gM=I(ft());Qa();Am();Fs=class extends mr{static{i(this,"FromStringShapeDeserializer")}settings;constructor(t){super(),this.settings=t}read(t,r){let n=re.of(t);if(n.isListSchema())return qu(r).map(o=>this.read(n.getValueSchema(),o));if(n.isBlobSchema())return(this.serdeContext?.base64Decoder??XA.fromBase64)(r);if(n.isTimestampSchema())switch(Fr(n,this.settings)){case 5:return FA(r);case 6:return jA(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??gM.toUtf8)((this.serdeContext?.base64Decoder??XA.fromBase64)(t))}}});var Rm,js,hM=D(()=>{ke();Rm=I(ft());Qa();YA();js=class extends mr{static{i(this,"HttpInterceptingShapeDeserializer")}codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new Fs(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){let n=re.of(t),o=n.getMergedTraits(),a=this.serdeContext?.utf8Encoder??Rm.toUtf8;if(o.httpHeader||o.httpResponseCode)return this.stringDeserializer.read(n,a(r));if(o.httpPayload){if(n.isBlobSchema()){let c=this.serdeContext?.utf8Decoder??Rm.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 QA,Vu,eR=D(()=>{ke();Qt();QA=I(gt());Qa();Am();Vu=class extends mr{static{i(this,"ToStringShapeSerializer")}settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){let n=re.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??QA.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:zA(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??QA.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 qs,yM=D(()=>{ke();eR();qs=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=re.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 _M={};bt(_M,{FromStringShapeDeserializer:()=>Fs,HttpBindingProtocol:()=>Gs,HttpInterceptingShapeDeserializer:()=>js,HttpInterceptingShapeSerializer:()=>qs,HttpProtocol:()=>Bs,RequestBuilder:()=>vm,RpcProtocol:()=>Xo,SerdeContext:()=>mr,ToStringShapeSerializer:()=>Vu,collectBody:()=>sn,determineTimestampFormat:()=>Fr,extendedEncodeURIComponent:()=>ro,requestBuilder:()=>ZA,resolvedPath:()=>JA});var Rr=D(()=>{tm();rm();lM();Sm();pM();fM();KA();YA();hM();yM();eR();Am();Qa()});var EM=D(()=>{Rr()});function z7(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 SM=D(()=>{i(z7,"setFeature")});var kn,vM=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 AM,tR,rR,RM=D(()=>{AM=I(Me()),tR=I(Uo()),rR=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=AM.HttpRequest.clone(t);if(n.in===tR.HttpApiKeyAuthLocation.QUERY)o.query[n.name]=r.apiKey;else if(n.in===tR.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 PM,nR,CM=D(()=>{PM=I(Me()),nR=class{static{i(this,"HttpBearerAuthSigner")}async sign(t,r,n){let o=PM.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,TM=D(()=>{jr=class{static{i(this,"NoAuthSigner")}async sign(t,r,n){return t}}});var xM=D(()=>{RM();CM();TM()});var bM,IM,oR,Pm,iR,wM=D(()=>{bM=i(e=>i(function(r){return Pm(r)&&r.expiration.getTime()-Date.now()<e},"isIdentityExpired"),"createIsIdentityExpiredFunction"),IM=3e5,oR=bM(IM),Pm=i(e=>e.expiration!==void 0,"doesIdentityRequireRefresh"),iR=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 $M=D(()=>{vM();xM();wM()});var fr={};bt(fr,{DefaultIdentityProviderConfig:()=>kn,EXPIRATION_MS:()=>IM,HttpApiKeyAuthSigner:()=>rR,HttpBearerAuthSigner:()=>nR,NoAuthSigner:()=>jr,createIsIdentityExpiredFunction:()=>bM,createPaginator:()=>J$,doesIdentityRequireRefresh:()=>Pm,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Bo,getHttpAuthSchemePlugin:()=>g9,getHttpSigningPlugin:()=>Go,getSmithyContext:()=>d9,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>L$,httpAuthSchemeMiddleware:()=>ku,httpAuthSchemeMiddlewareOptions:()=>U$,httpSigningMiddleware:()=>zv,httpSigningMiddlewareOptions:()=>q$,isIdentityExpired:()=>oR,memoizeIdentityProvider:()=>iR,normalizeProvider:()=>bi,requestBuilder:()=>ZA,setFeature:()=>z7});var Xe=D(()=>{k$();G$();H$();W$();K$();EM();SM();$M()});var er=N(Yo=>{"use strict";var cR=Uo(),uR=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)}},lR=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 wi(e){return typeof e!="object"||e==null?e:"ref"in e?`$${wi(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(wi).join(", ")})`:JSON.stringify(e,null,2)}i(wi,"toDebugString");var kM={},U7=i((e,t)=>e===t,"booleanEquals");function B7(...e){for(let t of e)if(t!=null)return t}i(B7,"coalesce");var G7=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"),DM=i((e,t)=>G7(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"),F7=i(e=>e!=null,"isSet"),j7=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),dR=i((e,t=!1)=>{if(!t)return j7.test(e);let r=e.split(".");for(let n of r)if(!dR(n))return!1;return!0},"isValidHostLabel");function q7(e,t,r){return e?t:r}i(q7,"ite");var V7=i(e=>!e,"not"),H7=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}$"),MM=i(e=>H7.test(e)||e.startsWith("[")&&e.endsWith("]"),"isIpAddress"),sR={[cR.EndpointURLScheme.HTTP]:80,[cR.EndpointURLScheme.HTTPS]:443},W7=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(cR.EndpointURLScheme).includes(l))return null;let d=MM(o),_=r.includes(`${n}:${sR[l]}`)||typeof e=="string"&&e.includes(`${n}:${sR[l]}`),y=`${n}${_?`:${sR[l]}`:""}`;return{scheme:l,authority:y,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:d}},"parseURL");function J7(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(J7,"split");var K7=i((e,t)=>e===t,"stringEquals"),Z7=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"),X7=i(e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),Y7={booleanEquals:U7,coalesce:B7,getAttr:DM,isSet:F7,isValidHostLabel:dR,ite:q7,not:V7,parseURL:W7,split:J7,stringEquals:K7,substring:Z7,uriEncode:X7},OM=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(DM(n[d]??o[d],_))}else r.push(n[l]??o[l]);a=u+1}return r.join("")},"evaluateTemplate"),Q7=i(({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],"getReferenceValue"),Wu=i((e,t,r)=>{if(typeof e=="string")return OM(e,r);if(e.fn)return LM.callFunction(e,r);if(e.ref)return Q7(e,r);throw new Ot(`'${t}': ${String(e)} is not a string, function or reference.`)},"evaluateExpression"),NM=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]=LM.evaluateExpression(u,"arg",r)}let o=e.indexOf(".");if(o!==-1){let u=kM[e.slice(0,o)]?.[e.slice(o+1)];if(typeof u=="function")return u(...n)}let a=Y7[e];if(typeof a=="function")return a(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},"callFunction"),LM={evaluateExpression:Wu,callFunction:NM},zM=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=NM(e,t);t.logger?.debug?.(`${Hu} evaluateCondition: ${wi(e)} = ${wi(n)}`);let o=n===""?!0:!!n;return r!=null?{result:o,toAssign:{name:r,value:n}}:{result:o}},"evaluateCondition"),UM=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"),pR=i((e,t)=>Object.entries(e).reduce((r,[n,o])=>(r[n]=GM.getEndpointProperty(o,t),r),{}),"getEndpointProperties"),BM=i((e,t)=>{if(Array.isArray(e))return e.map(r=>BM(r,t));switch(typeof e){case"string":return OM(e,t);case"object":if(e===null)throw new Ot(`Unexpected endpoint property: ${e}`);return GM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ot(`Unexpected endpoint property type: ${typeof e}`)}},"getEndpointProperty"),GM={getEndpointProperty:BM,getEndpointProperties:pR},FM=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"),aR=1e8,eY=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<aR;){let d=3*(Math.abs(c)-1),[_,y,E]=[r[d],r[d+1],r[d+2]],[g,v,A]=a[_],R=zM({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>=aR){let d=o[c-aR];if(d[0]===-1){let[,g]=d;throw new Ot(Wu(g,"Error",l))}let[_,y,E]=d;return{url:FM(_,l),properties:pR(y,l),headers:UM(E??{},l)}}throw new Ot("No matching endpoint.")},"decideEndpoint"),mR=i((e=[],t)=>{let r={},n={...t,referenceRecord:{...t.referenceRecord}},o=!1;for(let a of e){let{result:c,toAssign:u}=zM(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} := ${wi(u.value)}`))}return o?{result:!0,referenceRecord:r}:{result:!0}},"evaluateConditions"),tY=i((e,t)=>{let{conditions:r,endpoint:n}=e,{result:o,referenceRecord:a}=mR(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: ${wi(n)}`);let _={url:FM(u,c)};return d!=null&&(_.headers=UM(d,c)),l!=null&&(_.properties=pR(l,c)),_},"evaluateEndpointRule"),rY=i((e,t)=>{let{conditions:r,error:n}=e,{result:o,referenceRecord:a}=mR(r,t);if(!o)return;let c=a?{...t,referenceRecord:{...t.referenceRecord,...a}}:t;throw new Ot(Wu(n,"Error",c))},"evaluateErrorRule"),jM=i((e,t)=>{for(let r of e)if(r.type==="endpoint"){let n=tY(r,t);if(n)return n}else if(r.type==="error")rY(r,t);else if(r.type==="tree"){let n=qM.evaluateTreeRule(r,t);if(n)return n}else throw new Ot(`Unknown endpoint rule: ${r}`);throw new Ot("Rules evaluation failed")},"evaluateRules"),nY=i((e,t)=>{let{conditions:r,rules:n}=e,{result:o,referenceRecord:a}=mR(r,t);if(!o)return;let c=a?{...t,referenceRecord:{...t.referenceRecord,...a}}:t;return qM.evaluateRules(n,c)},"evaluateTreeRule"),qM={evaluateRules:jM,evaluateTreeRule:nY},oY=i((e,t)=>{let{endpointParams:r,logger:n}=t,{parameters:o,rules:a}=e;t.logger?.debug?.(`${Hu} Initial EndpointParams: ${wi(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=jM(a,{endpointParams:r,logger:n,referenceRecord:{}});return t.logger?.debug?.(`${Hu} Resolved endpoint: ${wi(c)}`),c},"resolveEndpoint");Yo.BinaryDecisionDiagram=uR;Yo.EndpointCache=lR;Yo.EndpointError=Ot;Yo.customEndpointFunctions=kM;Yo.decideEndpoint=eY;Yo.isIpAddress=MM;Yo.isValidHostLabel=dR;Yo.resolveEndpoint=oY});var $i=N(Dn=>{"use strict";var ec=er(),iY=Gr(),HM=i((e,t=!1)=>{if(t){for(let r of e.split("."))if(!HM(r))return!1;return!0}return!(!ec.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||ec.isIpAddress(e))},"isVirtualHostableS3Bucket"),VM=":",sY="/",aY=i(e=>{let t=e.split(VM);if(t.length<6)return null;let[r,n,o,a,c,...u]=t;if(r!=="arn"||n===""||o===""||u.join(VM)==="")return null;let l=u.map(d=>d.split(sY)).flat();return{partition:n,service:o,region:a,accountId:c,resourceId:l}},"parseArn"),cY=[{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)"}}}],uY="1.1",WM={partitions:cY,version:uY},JM=WM,KM="",ZM=i(e=>{let{partitions:t}=JM;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"),XM=i((e,t="")=>{JM=e,KM=t},"setPartitionInfo"),lY=i(()=>{XM(WM,"")},"useDefaultPartitionInfo"),dY=i(()=>KM,"getUserAgentPrefix"),YM={isVirtualHostableS3Bucket:HM,parseArn:aY,partition:ZM};ec.customEndpointFunctions.aws=YM;var pY=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()=>QM(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"),QM=i(e=>iY.parseUrl(e.url),"toEndpointV1");Dn.EndpointError=ec.EndpointError;Dn.isIpAddress=ec.isIpAddress;Dn.resolveEndpoint=ec.resolveEndpoint;Dn.awsEndpointFunctions=YM;Dn.getUserAgentPrefix=dY;Dn.partition=ZM;Dn.resolveDefaultAwsRegionalEndpointsConfig=pY;Dn.setPartitionInfo=XM;Dn.toEndpointV1=QM;Dn.useDefaultPartitionInfo=lY});var Cm,io,eO=D(()=>{Cm={warningEmitted:!1},io=i(e=>{e&&!Cm.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20&&(Cm.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 mY,fY,fR,tO=D(()=>{mY=i(()=>(e,t)=>async r=>(t.__retryLongPoll=!0,e(r)),"longPollMiddleware"),fY={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},fR=i(e=>({applyToStack:i(t=>{t.add(mY(),fY)},"applyToStack")}),"getLongPollPlugin")});function ki(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var rO=D(()=>{i(ki,"setCredentialFeature")});var hR=N(Qo=>{"use strict";var gY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],hY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],yY=["TimeoutError","RequestTimeout","RequestTimeoutException"],_Y=[500,502,503,504],EY=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],SY=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],nO=i(e=>e?.$retryable!==void 0,"isRetryableByTrait"),vY=i(e=>gY.includes(e.name),"isClockSkewError"),oO=i(e=>e.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),iO=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"),AY=i(e=>e.$metadata?.httpStatusCode===429||hY.includes(e.name)||e.$retryable?.throttling==!0,"isThrottlingError"),gR=i((e,t=0)=>nO(e)||oO(e)||e.name==="InvalidSignatureException"&&e.message?.includes("Signature expired")||yY.includes(e.name)||EY.includes(e?.code||"")||SY.includes(e?.code||"")||_Y.includes(e.$metadata?.httpStatusCode||0)||iO(e)||sO(e)||e.cause!==void 0&&t<=10&&gR(e.cause,t+1),"isTransientError"),RY=i(e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!gR(e)}return!1},"isServerError");function sO(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}i(sO,"isNodeJsHttp2TransientError");Qo.isBrowserNetworkError=iO;Qo.isClockSkewCorrectedError=oO;Qo.isClockSkewError=vY;Qo.isNodeJsHttp2TransientError=sO;Qo.isRetryableByTrait=nO;Qo.isServerError=RY;Qo.isThrottlingError=AY;Qo.isTransientError=gR});var Mn=N(ot=>{"use strict";var PY=hR();ot.RETRY_MODES=void 0;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(ot.RETRY_MODES||(ot.RETRY_MODES={}));var xm=3,CY=ot.RETRY_MODES.STANDARD,bm=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"||PY.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))}},TY=100,vR=20*1e3,xY=500,yR=500,bY=5,IY=10,aO=1,wY="amz-sdk-invocation-id",$Y="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"}},_R=class{static{i(this,"DefaultRetryBackoffStrategy")}x=qr.delay();computeNextBackoffDelay(t){let o=Math.random()*Math.min(this.x*2**t,vR);return Math.floor(o)}setDelayBase(t){this.x=t}},Im=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(vR,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}},Tm={incompatible:1,attempts:2,capacity:3},tc=class{static{i(this,"StandardRetryStrategy")}mode=ot.RETRY_MODES.STANDARD;capacity=yR;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()=>xm,this.baseDelay??=qr.delay(),this.retryBackoffStrategy??=new _R}async acquireInitialRetryToken(t){return new Im(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 Im(d,t.getRetryCount()+1,_,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:qr.v2026&&o===Tm.capacity&&c?d:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(yR,this.capacity+(t.getRetryCost()??aO))}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 ${xm}`),xm}}retryCode(t,r,n){let o=t.getRetryCount()+1,a=this.isRetryableError(r.errorType)?0:Tm.incompatible,c=o<n?0:Tm.attempts,u=this.capacity>=this.getCapacityCost(r.errorType)?0:Tm.capacity;return a||c||u}getCapacityCost(t){return t===qr.modifiedCostType()?qr.throttlingCost():qr.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}},ER=class{static{i(this,"AdaptiveRetryStrategy")}mode=ot.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){let{rateLimiter:n}=r??{};this.rateLimiter=n??new bm,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()}},SR=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}};ot.AdaptiveRetryStrategy=ER;ot.ConfiguredRetryStrategy=SR;ot.DEFAULT_MAX_ATTEMPTS=xm;ot.DEFAULT_RETRY_DELAY_BASE=TY;ot.DEFAULT_RETRY_MODE=CY;ot.DefaultRateLimiter=bm;ot.INITIAL_RETRY_TOKENS=yR;ot.INVOCATION_ID_HEADER=wY;ot.MAXIMUM_RETRY_DELAY=vR;ot.NO_RETRY_INCREMENT=aO;ot.REQUEST_HEADER=$Y;ot.RETRY_COST=bY;ot.Retry=qr;ot.StandardRetryStrategy=tc;ot.THROTTLING_RETRY_DELAY_BASE=xY;ot.TIMEOUT_RETRY_COST=IY});function uO(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 cO,lO=D(()=>{cO=I(Mn());cO.Retry.v2026||=typeof process=="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";i(uO,"setFeature")});function dO(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var pO=D(()=>{i(dO,"setTokenFeature")});var Pr={};bt(Pr,{emitWarningIfUnsupportedVersion:()=>io,getLongPollPlugin:()=>fR,setCredentialFeature:()=>ki,setFeature:()=>uO,setTokenFeature:()=>dO,state:()=>Cm});var yt=D(()=>{eO();tO();rO();lO();pO()});var ti=N(rc=>{"use strict";var kY=(Xe(),Q(fr)),DY=$i(),MY=Me(),ei=(yt(),Q(Pr)),mO=Mn(),yO=void 0;function OY(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}i(OY,"isValidUserAgentAppId");function NY(e){let t=kY.normalizeProvider(e.userAgentAppId??yO),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:i(async()=>{let n=await t();if(!OY(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(NY,"resolveUserAgentConfig");var LY=/\d{12}\.ddb/;async function zY(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 mO.RETRY_MODES.ADAPTIVE:ei.setFeature(e,"RETRY_MODE_ADAPTIVE","F");break;case mO.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(LY)&&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(zY,"checkFeatures");var fO="user-agent",AR="x-amz-user-agent",gO=" ",RR="/",UY=/[^!$%&'*+\-.^_`|~\w]/g,BY=/[^!$%&'*+\-.^_`|~\w#]/g,hO="-",GY=1024;function FY(e){let t="";for(let r in e){let n=e[r];if(t.length+n.length+1<=GY){t.length?t+=","+n:t+=n;continue}break}return t}i(FY,"encodeFeatures");var _O=i(e=>(t,r)=>async n=>{let{request:o}=n;if(!MY.HttpRequest.isInstance(o))return t(n);let{headers:a}=o,c=r?.userAgent?.map(wm)||[],u=(await e.defaultUserAgentProvider()).map(wm);await zY(r,e,n);let l=r;u.push(`m/${FY(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);let d=e?.customUserAgent?.map(wm)||[],_=await e.userAgentAppId();_&&u.push(wm(["app",`${_}`]));let y=DY.getUserAgentPrefix(),E=(y?[y]:[]).concat([...u,...c,...d]).join(gO),g=[...u.filter(v=>v.startsWith("aws-sdk-")),...d].join(gO);return e.runtime!=="browser"?(g&&(a[AR]=a[AR]?`${a[fO]} ${g}`:g),a[fO]=E):a[AR]=E,t({...n,request:o})},"userAgentMiddleware"),wm=i(e=>{let t=e[0].split(RR).map(c=>c.replace(UY,hO)).join(RR),r=e[1]?.replace(BY,hO),n=t.indexOf(RR),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"),EO={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},jY=i(e=>({applyToStack:i(t=>{t.add(_O(e),EO)},"applyToStack")}),"getUserAgentPlugin");rc.DEFAULT_UA_APP_ID=yO;rc.getUserAgentMiddlewareOptions=EO;rc.getUserAgentPlugin=jY;rc.resolveUserAgentConfig=NY;rc.userAgentMiddleware=_O});var vO=N(SO=>{"use strict";var qY=Lp();function VY(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?qY.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(VY,"formatUrl");SO.formatUrl=VY});var PO=N((mrt,RO)=>{var $m=Object.defineProperty,HY=Object.getOwnPropertyDescriptor,WY=Object.getOwnPropertyNames,JY=Object.prototype.hasOwnProperty,KY=i((e,t)=>$m(e,"name",{value:t,configurable:!0}),"__name"),ZY=i((e,t)=>{for(var r in t)$m(e,r,{get:t[r],enumerable:!0})},"__export"),XY=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of WY(t))!JY.call(e,o)&&o!==r&&$m(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=HY(t,o))||n.enumerable});return e},"__copyProps"),YY=i(e=>XY($m({},"__esModule",{value:!0}),e),"__toCommonJS"),AO={};ZY(AO,{isArrayBuffer:i(()=>QY,"isArrayBuffer")});RO.exports=YY(AO);var QY=KY(e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var bO=N((grt,xO)=>{var km=Object.defineProperty,eQ=Object.getOwnPropertyDescriptor,tQ=Object.getOwnPropertyNames,rQ=Object.prototype.hasOwnProperty,CO=i((e,t)=>km(e,"name",{value:t,configurable:!0}),"__name"),nQ=i((e,t)=>{for(var r in t)km(e,r,{get:t[r],enumerable:!0})},"__export"),oQ=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tQ(t))!rQ.call(e,o)&&o!==r&&km(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=eQ(t,o))||n.enumerable});return e},"__copyProps"),iQ=i(e=>oQ(km({},"__esModule",{value:!0}),e),"__toCommonJS"),TO={};nQ(TO,{fromArrayBuffer:i(()=>aQ,"fromArrayBuffer"),fromString:i(()=>cQ,"fromString")});xO.exports=iQ(TO);var sQ=PO(),PR=require("buffer"),aQ=CO((e,t=0,r=e.byteLength-t)=>{if(!(0,sQ.isArrayBuffer)(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return PR.Buffer.from(e,t,r)},"fromArrayBuffer"),cQ=CO((e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?PR.Buffer.from(e,t):PR.Buffer.from(e)},"fromString")});var DO=N((yrt,kO)=>{var Dm=Object.defineProperty,uQ=Object.getOwnPropertyDescriptor,lQ=Object.getOwnPropertyNames,dQ=Object.prototype.hasOwnProperty,CR=i((e,t)=>Dm(e,"name",{value:t,configurable:!0}),"__name"),pQ=i((e,t)=>{for(var r in t)Dm(e,r,{get:t[r],enumerable:!0})},"__export"),mQ=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lQ(t))!dQ.call(e,o)&&o!==r&&Dm(e,o,{get:i(()=>t[o],"get"),enumerable:!(n=uQ(t,o))||n.enumerable});return e},"__copyProps"),fQ=i(e=>mQ(Dm({},"__esModule",{value:!0}),e),"__toCommonJS"),IO={};pQ(IO,{fromUtf8:i(()=>$O,"fromUtf8"),toUint8Array:i(()=>gQ,"toUint8Array"),toUtf8:i(()=>hQ,"toUtf8")});kO.exports=fQ(IO);var wO=bO(),$O=CR(e=>{let t=(0,wO.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),gQ=CR(e=>typeof e=="string"?$O(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array"),hQ=CR(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,wO.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var MO=N(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.convertToBuffer=void 0;var yQ=DO(),_Q=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:yQ.fromUtf8;function EQ(e){return e instanceof Uint8Array?e:typeof e=="string"?_Q(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}i(EQ,"convertToBuffer");Mm.convertToBuffer=EQ});var OO=N(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.isEmptyData=void 0;function SQ(e){return typeof e=="string"?e.length===0:e.byteLength===0}i(SQ,"isEmptyData");Om.isEmptyData=SQ});var NO=N(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.numToUint8=void 0;function vQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}i(vQ,"numToUint8");Nm.numToUint8=vQ});var LO=N(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.uint32ArrayFrom=void 0;function AQ(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(AQ,"uint32ArrayFrom");Lm.uint32ArrayFrom=AQ});var zm=N(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.uint32ArrayFrom=so.numToUint8=so.isEmptyData=so.convertToBuffer=void 0;var RQ=MO();Object.defineProperty(so,"convertToBuffer",{enumerable:!0,get:i(function(){return RQ.convertToBuffer},"get")});var PQ=OO();Object.defineProperty(so,"isEmptyData",{enumerable:!0,get:i(function(){return PQ.isEmptyData},"get")});var CQ=NO();Object.defineProperty(so,"numToUint8",{enumerable:!0,get:i(function(){return CQ.numToUint8},"get")});var TQ=LO();Object.defineProperty(so,"uint32ArrayFrom",{enumerable:!0,get:i(function(){return TQ.uint32ArrayFrom},"get")})});var BO=N(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.AwsCrc32=void 0;var zO=(Ko(),Q(Jo)),TR=zm(),UO=xR(),xQ=function(){function e(){this.crc32=new UO.Crc32}return i(e,"AwsCrc32"),e.prototype.update=function(t){(0,TR.isEmptyData)(t)||this.crc32.update((0,TR.convertToBuffer)(t))},e.prototype.digest=function(){return zO.__awaiter(this,void 0,void 0,function(){return zO.__generator(this,function(t){return[2,(0,TR.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new UO.Crc32},e}();Um.AwsCrc32=xQ});var xR=N(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.AwsCrc32=Di.Crc32=Di.crc32=void 0;var bQ=(Ko(),Q(Jo)),IQ=zm();function wQ(e){return new GO().update(e).digest()}i(wQ,"crc32");Di.crc32=wQ;var GO=function(){function e(){this.checksum=4294967295}return i(e,"Crc32"),e.prototype.update=function(t){var r,n;try{for(var o=bQ.__values(t),a=o.next();!a.done;a=o.next()){var c=a.value;this.checksum=this.checksum>>>8^kQ[(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}();Di.Crc32=GO;var $Q=[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],kQ=(0,IQ.uint32ArrayFrom)($Q),DQ=BO();Object.defineProperty(Di,"AwsCrc32",{enumerable:!0,get:i(function(){return DQ.AwsCrc32},"get")})});var Gm=N(Oi=>{"use strict";var VO=xR(),Vs=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&&FO(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&FO(t),parseInt(Vs.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function FO(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(FO,"negate");var Bm=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(!FQ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let y=new Uint8Array(17);return y[0]=9,y.set(Vs.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:qO,value:!0};break;case 1:r[a]={type:qO,value:!1};break;case 2:r[a]={type:MQ,value:t.getInt8(n++)};break;case 3:r[a]={type:OQ,value:t.getInt16(n,!1)},n+=2;break;case 4:r[a]={type:NQ,value:t.getInt32(n,!1)},n+=4;break;case 5:r[a]={type:LQ,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:zQ,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:UQ,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,u))},n+=u;break;case 8:r[a]={type:BQ,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:GQ,value:`${Vs.toHex(l.subarray(0,4))}-${Vs.toHex(l.subarray(4,6))}-${Vs.toHex(l.subarray(6,8))}-${Vs.toHex(l.subarray(8,10))}-${Vs.toHex(l.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}},jO;(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"})(jO||(jO={}));var qO="boolean",MQ="byte",OQ="short",NQ="integer",LQ="long",zQ="binary",UQ="string",BQ="timestamp",GQ="uuid",FQ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,HO=4,Mi=HO*2,Hs=4,jQ=Mi+Hs*2;function qQ({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(HO,!1),c=n.getUint32(Mi,!1),u=n.getUint32(e-Hs,!1),l=new VO.Crc32().update(new Uint8Array(r,t,Mi));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+Mi,e-(Mi+Hs))),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+Mi+Hs,a),body:new Uint8Array(r,t+Mi+Hs+a,o-a-(Mi+Hs+Hs))}}i(qQ,"splitMessage");var bR=class{static{i(this,"EventStreamCodec")}headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new Bm(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 VO.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}=qQ(t);return{headers:this.headerMarshaller.parse(r),body:n}}formatHeaders(t){return this.headerMarshaller.format(t)}},IR=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)}},wR=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))}},$R=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)}}},kR=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)}};Oi.EventStreamCodec=bR;Oi.HeaderMarshaller=Bm;Oi.Int64=nc;Oi.MessageDecoderStream=IR;Oi.MessageEncoderStream=wR;Oi.SmithyMessageDecoderStream=$R;Oi.SmithyMessageEncoderStream=kR});var MR=N(DR=>{"use strict";var Ju=Gm();function VQ(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(VQ,"getChunkedStream");function HQ(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(HQ,"getMessageUnmarshaller");var Fm=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=VQ(t);return new Ju.SmithyMessageDecoderStream({messageStream:new Ju.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:HQ(r,this.utfEncoder)})}serialize(t,r){return new Ju.MessageEncoderStream({messageStream:new Ju.SmithyMessageEncoderStream({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},WQ=i(e=>new Fm(e),"eventStreamSerdeProvider");DR.EventStreamMarshaller=Fm;DR.eventStreamSerdeProvider=WQ});var KO=N(Ku=>{"use strict";var JQ=MR(),WO=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"),JO=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"),jm=class{static{i(this,"EventStreamMarshaller")}universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new JQ.EventStreamMarshaller({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){let n=KQ(t)?WO(t):t;return this.universalMarshaller.deserialize(n,r)}serialize(t,r){let n=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?JO(n):n}},KQ=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStream"),ZQ=i(e=>new jm(e),"eventStreamSerdeProvider");Ku.EventStreamMarshaller=jm;Ku.eventStreamSerdeProvider=ZQ;Ku.iterableToReadableStream=JO;Ku.readableStreamtoIterable=WO});var QO=N(Zu=>{"use strict";var XQ=vO(),XO=KO(),ZO=sA(),UR=Me(),YQ=gt(),QQ=Gm(),eee=Wa(),YO=i(e=>e.protocol==="ws:"||e.protocol==="wss:","isWebSocketRequest"),tee=3e3,OR=class e{static{i(this,"WebSocketFetchHandler")}metadata={handlerProtocol:"websocket/h1.1"};config={};configPromise;httpHandler;sockets={};static create(t,r=new ZO.FetchHttpHandler){return typeof t?.handle=="function"?t:new e(t,r)}constructor(t,r=new ZO.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(!YO(t))return r?.debug?.(`@aws-sdk - ws fetching ${t.protocol}${t.hostname}${t.path}`),this.httpHandler.handle(t);let n=XQ.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=tee}=this.config;await this.waitForReady(o,a);let{body:c}=t,u=ree(c),l=this.connect(o,u),d=nee(l);return{response:new UR.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:YQ.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}},ree=i(e=>e[Symbol.asyncIterator]?e:oee(e)?XO.readableStreamtoIterable(e):{[Symbol.asyncIterator]:async function*(){yield e}},"getIterator"),nee=i(e=>typeof ReadableStream=="function"?XO.iterableToReadableStream(e):e,"toReadableStream"),oee=i(e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,"isReadableStream"),iee=i((e,t)=>r=>n=>{let{request:o}=n;if(UR.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"),see={name:"websocketEndpointMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],relation:"after",toMiddleware:"eventStreamHeaderMiddleware",override:!0},aee=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"),cee={step:"initialize",name:"injectSessionIdMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],override:!0},uee=i((e,t)=>({applyToStack:i(r=>{r.addRelativeTo(iee(e,t),see),r.add(aee(),cee)},"applyToStack")}),"getWebSocketPlugin"),NR=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 UR.HttpRequest.isInstance(t)&&YO(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)}},lee=i(e=>{let{signer:t}=e;return Object.assign(e,{signer:i(async r=>{let n=await t(r);if(dee(n))return new NR({signer:n});throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor.")},"signer")})},"resolveWebSocketConfig"),dee=i(e=>!!e,"validateSigner"),LR=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:eee.fromHex(E.signature)}},body:l});d.enqueue(g)}catch(_){d.error(_)}}})}},zR=class{static{i(this,"EventStreamPayloadHandler")}messageSigner;eventStreamCodec;systemClockOffsetProvider;credentials;constructor(t){this.messageSigner=t.messageSigner,this.eventStreamCodec=new QQ.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 LR(_,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}},pee=i(e=>new zR(e),"eventStreamPayloadHandlerProvider");Zu.WebSocketFetchHandler=OR;Zu.eventStreamPayloadHandlerProvider=pee;Zu.getWebSocketPlugin=uee;Zu.resolveWebSocketConfig=lee});var qm=N(oc=>{"use strict";var mee=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"),fee=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=mee;oc.numberSelector=fee});var Nt=N(wt=>{"use strict";var tr=qm(),Vm=It(),gee=er(),BR="AWS_USE_DUALSTACK_ENDPOINT",GR="use_dualstack_endpoint",hee=!1,yee={environmentVariableSelector:i(e=>tr.booleanSelector(e,BR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,GR,tr.SelectorType.CONFIG),"configFileSelector"),default:!1},_ee={environmentVariableSelector:i(e=>tr.booleanSelector(e,BR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,GR,tr.SelectorType.CONFIG),"configFileSelector"),default:void 0},FR="AWS_USE_FIPS_ENDPOINT",jR="use_fips_endpoint",Eee=!1,See={environmentVariableSelector:i(e=>tr.booleanSelector(e,FR,tr.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>tr.booleanSelector(e,jR,tr.SelectorType.CONFIG),"configFileSelector"),default:!1},vee={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},Aee=i(e=>{let{tls:t,endpoint:r,urlParser:n,useDualstackEndpoint:o}=e;return Object.assign(e,{tls:t??!0,endpoint:Vm.normalizeProvider(typeof r=="string"?n(r):r),isCustomEndpoint:!0,useDualstackEndpoint:Vm.normalizeProvider(o??!1)})},"resolveCustomEndpointsConfig"),Ree=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"),Pee=i(e=>{let t=Vm.normalizeProvider(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:o,tls:a}=e;return Object.assign(e,{tls:a??!0,endpoint:r?Vm.normalizeProvider(typeof r=="string"?o(r):r):()=>Ree({...e,useDualstackEndpoint:t,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:t})},"resolveEndpointsConfig"),rN="AWS_REGION",nN="region",Cee={environmentVariableSelector:i(e=>e[rN],"environmentVariableSelector"),configFileSelector:i(e=>e[nN],"configFileSelector"),default:i(()=>{throw new Error("Region is missing")},"default")},Tee={preferredFile:"credentials"},eN=new Set,xee=i((e,t=gee.isValidHostLabel)=>{if(!eN.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 eN.add(e)},"checkRegion"),oN=i(e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),"isFipsRegion"),bee=i(e=>oN(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,"getRealRegion"),Iee=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=bee(n);return xee(o),o},"region"),useFipsEndpoint:i(async()=>{let n=typeof t=="string"?t:await t();return oN(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()},"useFipsEndpoint")})},"resolveRegionConfig"),tN=i((e=[],{useFipsEndpoint:t,useDualstackEndpoint:r})=>e.find(({tags:n})=>t===n.includes("fips")&&r===n.includes("dualstack"))?.hostname,"getHostnameFromVariants"),wee=i((e,{regionHostname:t,partitionHostname:r})=>t||(r?r.replace("{region}",e):void 0),"getResolvedHostname"),$ee=i((e,{partitionHash:t})=>Object.keys(t||{}).find(r=>t[r].regions.includes(e))??"aws","getResolvedPartition"),kee=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"),Dee=i((e,{useFipsEndpoint:t=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:o,partitionHash:a})=>{let c=$ee(e,{partitionHash:a}),u=e in o?e:a[c]?.endpoint??e,l={useFipsEndpoint:t,useDualstackEndpoint:r},d=tN(o[u]?.variants,l),_=tN(a[c]?.variants,l),y=wee(u,{regionHostname:d,partitionHostname:_});if(y===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:u,useFipsEndpoint:t,useDualstackEndpoint:r}}`);let E=kee(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=GR;wt.CONFIG_USE_FIPS_ENDPOINT=jR;wt.DEFAULT_USE_DUALSTACK_ENDPOINT=hee;wt.DEFAULT_USE_FIPS_ENDPOINT=Eee;wt.ENV_USE_DUALSTACK_ENDPOINT=BR;wt.ENV_USE_FIPS_ENDPOINT=FR;wt.NODE_REGION_CONFIG_FILE_OPTIONS=Tee;wt.NODE_REGION_CONFIG_OPTIONS=Cee;wt.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=yee;wt.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=See;wt.REGION_ENV_NAME=rN;wt.REGION_INI_NAME=nN;wt.getRegionInfo=Dee;wt.nodeDualstackConfigSelectors=_ee;wt.nodeFipsConfigSelectors=vee;wt.resolveCustomEndpointsConfig=Aee;wt.resolveEndpointsConfig=Pee;wt.resolveRegionConfig=Iee});var sN=N(iN=>{"use strict";var Mee=i(e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),"resolveEventStreamSerdeConfig");iN.resolveEventStreamSerdeConfig=Mee});var Ni=N(Hm=>{"use strict";var Oee=Me(),aN="content-length";function cN(e){return t=>async r=>{let n=r.request;if(Oee.HttpRequest.isInstance(n)){let{body:o,headers:a}=n;if(o&&Object.keys(a).map(c=>c.toLowerCase()).indexOf(aN)===-1)try{let c=e(o);n.headers={...n.headers,[aN]:String(c)}}catch{}}return t({...r,request:n})}}i(cN,"contentLengthMiddleware");var uN={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Nee=i(e=>({applyToStack:i(t=>{t.add(cN(e.bodyLengthChecker),uN)},"applyToStack")}),"getContentLengthPlugin");Hm.contentLengthMiddleware=cN;Hm.contentLengthMiddlewareOptions=uN;Hm.getContentLengthPlugin=Nee});var jt=N(Ws=>{"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)}},qR=class e extends ic{static{i(this,"CredentialsProviderError")}name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},VR=class e extends ic{static{i(this,"TokenProviderError")}name="TokenProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},Lee=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"),zee=i(e=>()=>Promise.resolve(e),"fromStatic"),Uee=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");Ws.CredentialsProviderError=qR;Ws.ProviderError=ic;Ws.TokenProviderError=VR;Ws.chain=Lee;Ws.fromStatic=zee;Ws.memoize=Uee});var WR=N(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.getHomeDir=void 0;var Bee=require("os"),Gee=require("path"),HR={},Fee=i(()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT","getHomeDirCacheKey"),jee=i(()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:n=`C:${Gee.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${n}${r}`;let o=Fee();return HR[o]||(HR[o]=(0,Bee.homedir)()),HR[o]},"getHomeDir");Wm.getHomeDir=jee});var JR=N(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.getSSOTokenFilepath=void 0;var qee=require("crypto"),Vee=require("path"),Hee=WR(),Wee=i(e=>{let r=(0,qee.createHash)("sha1").update(e).digest("hex");return(0,Vee.join)((0,Hee.getHomeDir)(),".aws","sso","cache",`${r}.json`)},"getSSOTokenFilepath");Jm.getSSOTokenFilepath=Wee});var lN=N(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.getSSOTokenFromFile=Li.tokenIntercept=void 0;var Jee=require("fs/promises"),Kee=JR();Li.tokenIntercept={};var Zee=i(async e=>{if(Li.tokenIntercept[e])return Li.tokenIntercept[e];let t=(0,Kee.getSSOTokenFilepath)(e),r=await(0,Jee.readFile)(t,"utf8");return JSON.parse(r)},"getSSOTokenFromFile");Li.getSSOTokenFromFile=Zee});var dN=N(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.readFile=Vr.fileIntercept=Vr.filePromises=void 0;var Xee=require("node:fs/promises");Vr.filePromises={};Vr.fileIntercept={};var Yee=i((e,t)=>Vr.fileIntercept[e]!==void 0?Vr.fileIntercept[e]:((!Vr.filePromises[e]||t?.ignoreCache)&&(Vr.filePromises[e]=(0,Xee.readFile)(e,"utf8")),Vr.filePromises[e]),"readFile");Vr.readFile=Yee});var On=N($t=>{"use strict";var Js=WR(),Km=JR(),KR=lN(),Zm=require("path"),Xm=Uo(),sc=dN(),mN="AWS_PROFILE",fN="default",Qee=i(e=>e.profile||process.env[mN]||fN,"getProfileName"),Ks=".",ete=i(e=>Object.entries(e).filter(([t])=>{let r=t.indexOf(Ks);return r===-1?!1:Object.values(Xm.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,n])=>{let o=r.indexOf(Ks),a=r.substring(0,o)===Xm.IniSectionType.PROFILE?r.substring(o+1):r;return t[a]=n,t},{...e.default&&{default:e.default}}),"getConfigData"),tte="AWS_CONFIG_FILE",gN=i(()=>process.env[tte]||Zm.join(Js.getHomeDir(),".aws","config"),"getConfigFilepath"),rte="AWS_SHARED_CREDENTIALS_FILE",nte=i(()=>process.env[rte]||Zm.join(Js.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ote=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ite=["__proto__","profile __proto__"],ZR=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=ote.exec(u);if(l){let[,d,,_]=l;Object.values(Xm.IniSectionType).includes(d)&&(r=[d,_].join(Ks))}else r=u;if(ite.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(Ks):l;t[r][_]=d}}}}return t},"parseIni"),pN=i(()=>({}),"swallowError$1"),hN=i(async(e={})=>{let{filepath:t=nte(),configFilepath:r=gN()}=e,n=Js.getHomeDir(),o="~/",a=t;t.startsWith(o)&&(a=Zm.join(n,t.slice(2)));let c=r;r.startsWith(o)&&(c=Zm.join(n,r.slice(2)));let u=await Promise.all([sc.readFile(c,{ignoreCache:e.ignoreCache}).then(ZR).then(ete).catch(pN),sc.readFile(a,{ignoreCache:e.ignoreCache}).then(ZR).catch(pN)]);return{configFile:u[0],credentialsFile:u[1]}},"loadSharedConfigFiles"),ste=i(e=>Object.entries(e).filter(([t])=>t.startsWith(Xm.IniSectionType.SSO_SESSION+Ks)).reduce((t,[r,n])=>({...t,[r.substring(r.indexOf(Ks)+1)]:n}),{}),"getSsoSessionData"),ate=i(()=>({}),"swallowError"),cte=i(async(e={})=>sc.readFile(e.configFilepath??gN()).then(ZR).then(ste).catch(ate),"loadSsoSessionData"),ute=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"),lte=i(async e=>{let t=await hN(e);return ute(t.configFile,t.credentialsFile)},"parseKnownFiles"),dte={getFileRecord(){return sc.fileIntercept},interceptFile(e,t){sc.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return KR.tokenIntercept},interceptToken(e,t){KR.tokenIntercept[e]=t}};$t.getSSOTokenFromFile=KR.getSSOTokenFromFile;$t.readFile=sc.readFile;$t.CONFIG_PREFIX_SEPARATOR=Ks;$t.DEFAULT_PROFILE=fN;$t.ENV_PROFILE=mN;$t.externalDataInterceptor=dte;$t.getProfileName=Qee;$t.loadSharedConfigFiles=hN;$t.loadSsoSessionData=cte;$t.parseKnownFiles=lte;Object.prototype.hasOwnProperty.call(Js,"__proto__")&&!Object.prototype.hasOwnProperty.call($t,"__proto__")&&Object.defineProperty($t,"__proto__",{enumerable:!0,value:Js.__proto__});Object.keys(Js).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call($t,e)&&($t[e]=Js[e])});Object.prototype.hasOwnProperty.call(Km,"__proto__")&&!Object.prototype.hasOwnProperty.call($t,"__proto__")&&Object.defineProperty($t,"__proto__",{enumerable:!0,value:Km.__proto__});Object.keys(Km).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call($t,e)&&($t[e]=Km[e])})});var cn=N(EN=>{"use strict";var Xu=jt(),yN=On();function _N(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(_N,"getSelectorName");var pte=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: ${_N(e.toString())}`,{logger:t?.logger})}},"fromEnv"),mte=i((e,{preferredFile:t="config",...r}={})=>async()=>{let n=yN.getProfileName(r),{configFile:o,credentialsFile:a}=await yN.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}]: ${_N(e.toString())}`,{logger:r.logger})}},"fromSharedConfigFiles"),fte=i(e=>typeof e=="function","isFunction"),gte=i(e=>fte(e)?async()=>await e():Xu.fromStatic(e),"fromStatic"),hte=i(({environmentVariableSelector:e,configFileSelector:t,default:r},n={})=>{let{signingName:o,logger:a}=n,c={signingName:o,logger:a};return Xu.memoize(Xu.chain(pte(e,c),mte(t,n),gte(r)))},"loadConfig");EN.loadConfig=hte});var RN=N(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.getEndpointUrlConfig=void 0;var SN=On(),vN="AWS_ENDPOINT_URL",AN="endpoint_url",yte=i(e=>({environmentVariableSelector:i(t=>{let r=e.split(" ").map(a=>a.toUpperCase()),n=t[[vN,...r].join("_")];if(n)return n;let o=t[vN];if(o)return o},"environmentVariableSelector"),configFileSelector:i((t,r)=>{if(r&&t.services){let o=r[["services",t.services].join(SN.CONFIG_PREFIX_SEPARATOR)];if(o){let a=e.split(" ").map(u=>u.toLowerCase()),c=o[[a.join("_"),AN].join(SN.CONFIG_PREFIX_SEPARATOR)];if(c)return c}}let n=t[AN];if(n)return n},"configFileSelector"),default:void 0}),"getEndpointUrlConfig");Ym.getEndpointUrlConfig=yte});var PN=N(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.getEndpointFromConfig=void 0;var _te=cn(),Ete=RN(),Ste=i(async e=>(0,_te.loadConfig)((0,Ete.getEndpointUrlConfig)(e??""))(),"getEndpointFromConfig");Qm.getEndpointFromConfig=Ste});var IN=N(ac=>{"use strict";var vte=Me(),Ate=(yA(),Q(Xk)),CN=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(vte.HttpResponse.isInstance(a)){let{headers:l={}}=a,d=Object.entries(l);c.$metadata={httpStatusCode:a.statusCode,requestId:XR(/^x-[\w-]+-request-?id$/,d),extendedRequestId:XR(/^x-[\w-]+-id-2$/,d),cfId:XR(/^x-[\w-]+-cf-id$/,d)}}}catch{}}throw c}},"deserializerMiddleware"),XR=i((e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],"findHeader"),TN=i((e,t)=>(r,n)=>async o=>{let a=e,c=n.endpointV2?async()=>Ate.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"),xN={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},bN={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rte(e,t,r){return{applyToStack:i(n=>{n.add(CN(e,r),xN),n.add(TN(e,t),bN)},"applyToStack")}}i(Rte,"getSerdePlugin");ac.deserializerMiddleware=CN;ac.deserializerMiddlewareOption=xN;ac.getSerdePlugin=Rte;ac.serializerMiddleware=TN;ac.serializerMiddlewareOption=bN});var gr=N(ri=>{"use strict";var Pte=(Xe(),Q(fr)),ef=It(),$N=PN(),wN=Gr(),Cte=IN(),Tte=i(async e=>{let t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),$te(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!wte(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"),xte=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,bte=/(\d+\.){3}\d+/,Ite=/\.\./,wte=i(e=>xte.test(e)&&!bte.test(e)&&!Ite.test(e),"isDnsCompatibleBucketName"),$te=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"),kte=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"),YR=i(e=>{if(typeof e=="object"){if("url"in e){let t=wN.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 wN.parseUrl(e)},"toEndpointV1"),kN=i(async(e,t,r,n)=>{if(!r.isCustomEndpoint){let c;r.serviceConfiguredEndpoint?c=await r.serviceConfiguredEndpoint():c=await $N.getEndpointFromConfig(r.serviceId),c&&(r.endpoint=()=>Promise.resolve(YR(c)),r.isCustomEndpoint=!0)}let o=await DN(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"),DN=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 kte(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 Tte(n),n},"resolveParams"),MN=i(({config:e,instructions:t})=>(r,n)=>async o=>{e.isCustomEndpoint&&Pte.setFeature(n,"ENDPOINT_OVERRIDE","N");let a=await kN(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=ef.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"),ON={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Cte.serializerMiddlewareOption.name},Dte=i((e,t)=>({applyToStack:i(r=>{r.addRelativeTo(MN({config:e,instructions:t}),ON)},"applyToStack")}),"getEndpointPlugin"),Mte=i(e=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:o}=e,a=r!=null?async()=>YR(await ef.normalizeProvider(r)()):void 0,u=Object.assign(e,{endpoint:a,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ef.normalizeProvider(n??!1),useFipsEndpoint:ef.normalizeProvider(o??!1)}),l;return u.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=$N.getEndpointFromConfig(e.serviceId)),l),u},"resolveEndpointConfig"),Ote=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=MN;ri.endpointMiddlewareOptions=ON;ri.getEndpointFromInstructions=kN;ri.getEndpointPlugin=Dte;ri.resolveEndpointConfig=Mte;ri.resolveEndpointRequiredConfig=Ote;ri.resolveParams=DN;ri.toEndpointV1=YR});var UN=N(zN=>{"use strict";var Zs=i((e,t)=>{let r=[];if(e&&r.push(e),t)for(let n of t)r.push(n);return r},"getAllAliases"),zi=i((e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,"getMiddlewareNameWithAliases"),QR=i(()=>{let e=[],t=[],r=!1,n=new Set,o=i(y=>y.sort((E,g)=>NN[g.step]-NN[E.step]||LN[g.priority||"normal"]-LN[E.priority||"normal"]),"sort"),a=i(y=>{let E=!1,g=i(v=>{let A=Zs(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 Zs(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 Zs(b.name,b.aliases))v[$]=b;E.push(b)}),t.forEach(R=>{let b={...R,before:[],after:[]};for(let $ of Zs(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 ${zi(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=Zs(g,A);if(b.length>0){if(b.some($=>n.has($))){if(!v)throw new Error(`Duplicate middleware name '${zi(g,A)}'`);for(let $ of b){let G=e.findIndex(de=>de.name===$||de.aliases?.some(me=>me===$));if(G===-1)continue;let Y=e[G];if(Y.step!==R.step||R.priority!==Y.priority)throw new Error(`"${zi(Y.name,Y.aliases)}" middleware with ${Y.priority} priority in ${Y.step} step cannot be overridden by "${zi(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=Zs(g,A);if(b.length>0){if(b.some($=>n.has($))){if(!v)throw new Error(`Duplicate middleware name '${zi(g,A)}'`);for(let $ of b){let G=t.findIndex(de=>de.name===$||de.aliases?.some(me=>me===$));if(G===-1)continue;let Y=t[G];if(Y.toMiddleware!==R.toMiddleware||Y.relation!==R.relation)throw new Error(`"${zi(Y.name,Y.aliases)}" middleware ${Y.relation} "${Y.toMiddleware}" middleware cannot be overridden by "${zi(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(QR()),"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 $=Zs(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(QR());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 zi(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"),NN={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},LN={high:3,normal:2,low:1};zN.constructStack=QR});var ue=N(Ge=>{"use strict";var GN=UN(),tf=Uo(),Nte=(ke(),Q(Wo)),rf=(Qt(),Q(HA)),aP=(Rr(),Q(_M)),tP=class{static{i(this,"Client")}config;middlewareStack=GN.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}},eP="***SensitiveInformation***";function rP(e,t){if(t==null)return t;let r=Nte.NormalizedSchema.of(e);if(r.getMergedTraits().sensitive)return eP;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return eP}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return eP}else if(r.isStructSchema()&&typeof t=="object"){let n=t,o={};for(let[a,c]of r.structIterator())n[a]!=null&&(o[a]=rP(c,n[a]));return o}return t}i(rP,"schemaLogFilter");var nf=class{static{i(this,"Command")}middlewareStack=GN.constructStack();schema;static classBuilder(){return new nP}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,[tf.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)}},nP=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 nf{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?rP.bind(null,u):d=>d),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(c?rP.bind(null,l):d=>d),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}},Lte="***SensitiveInformation***",zte=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"),oP=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}},FN=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"),jN=i(({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=Bte(e),a=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||a||"UnknownError",$fault:"client",$metadata:o});throw FN(c,t)},"throwDefaultError"),Ute=i(e=>({output:t,parsedBody:r,errorCode:n})=>{jN({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})},"withBaseException"),Bte=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"),Gte=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"),BN=!1,Fte=i(e=>{e&&!BN&&parseInt(e.substring(1,e.indexOf(".")))<16&&(BN=!0)},"emitWarningIfUnsupportedVersion"),qN=Object.values(tf.AlgorithmId),jte=i(e=>{let t=[];for(let r in tf.AlgorithmId){let n=tf.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();qN.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=o:e.checksumAlgorithms[n]=o,t.push(r)},checksumAlgorithms(){return t}}},"getChecksumConfiguration"),qte=i(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{let n=r.algorithmId();qN.includes(n)&&(t[n]=r.checksumConstructor())}),t},"resolveChecksumRuntimeConfig"),Vte=i(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),"getRetryConfiguration"),Hte=i(e=>{let t={};return t.retryStrategy=e.retryStrategy(),t},"resolveRetryRuntimeConfig"),VN=i(e=>Object.assign(jte(e),Vte(e)),"getDefaultExtensionConfiguration"),Wte=VN,Jte=i(e=>Object.assign(qte(e),Hte(e)),"resolveDefaultRuntimeConfig"),Kte=i(e=>Array.isArray(e)?e:[e],"getArrayIfSingleItem"),HN=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]=HN(e[r]));return e},"getValueFromTextNode"),Zte=i(e=>e!=null,"isSerializableHeaderValue"),iP=class{static{i(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function WN(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,Qte(n,o,a);a=t}for(let c of Object.keys(a)){if(!Array.isArray(a[c])){n[c]=a[c];continue}JN(n,null,a,c)}return n}i(WN,"map");var Xte=i(e=>{let t={};for(let[r,n]of Object.entries(e||{}))t[r]=[,n];return t},"convertMap"),Yte=i((e,t)=>{let r={};for(let n in t)JN(r,e,t,n);return r},"take"),Qte=i((e,t,r)=>WN(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"),JN=i((e,t,r,n)=>{if(t!==null){let c=r[n];typeof c=="function"&&(c=[,c]);let[u=ere,l=tre,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"),ere=i(e=>e!=null,"nonNullish"),tre=i(e=>e,"pass"),rre=i(e=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},"serializeFloat"),nre=i(e=>e.toISOString().replace(".000Z","Z"),"serializeDateTime"),sP=i(e=>{if(e==null)return{};if(Array.isArray(e))return e.filter(t=>t!=null).map(sP);if(typeof e=="object"){let t={};for(let r of Object.keys(e))e[r]!=null&&(t[r]=sP(e[r]));return t}return e},"_json");Ge.collectBody=aP.collectBody;Ge.extendedEncodeURIComponent=aP.extendedEncodeURIComponent;Ge.resolvedPath=aP.resolvedPath;Ge.Client=tP;Ge.Command=nf;Ge.NoOpLogger=iP;Ge.SENSITIVE_STRING=Lte;Ge.ServiceException=oP;Ge._json=sP;Ge.convertMap=Xte;Ge.createAggregatedClient=zte;Ge.decorateServiceException=FN;Ge.emitWarningIfUnsupportedVersion=Fte;Ge.getArrayIfSingleItem=Kte;Ge.getDefaultClientConfiguration=Wte;Ge.getDefaultExtensionConfiguration=VN;Ge.getValueFromTextNode=HN;Ge.isSerializableHeaderValue=Zte;Ge.loadConfigsForDefaultMode=Gte;Ge.map=WN;Ge.resolveDefaultRuntimeConfig=Jte;Ge.serializeDateTime=nre;Ge.serializeFloat=rre;Ge.take=Yte;Ge.throwDefaultError=jN;Ge.withBaseException=Ute;Object.prototype.hasOwnProperty.call(rf,"__proto__")&&!Object.prototype.hasOwnProperty.call(Ge,"__proto__")&&Object.defineProperty(Ge,"__proto__",{enumerable:!0,value:rf.__proto__});Object.keys(rf).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Ge,e)&&(Ge[e]=rf[e])})});var KN=N(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.isStreamingPayload=void 0;var ore=require("stream"),ire=i(e=>e?.body instanceof ore.Readable||typeof ReadableStream<"u"&&e?.body instanceof ReadableStream,"isStreamingPayload");of.isStreamingPayload=ire});var hr=N(kt=>{"use strict";var it=Mn(),cc=Me(),Ui=hR(),YN=LA(),ZN=It(),sre=ue(),are=KN(),cre=(Qt(),Q(HA)),QN=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"),ure=i((e,t)=>{let r=e,n=it.NO_RETRY_INCREMENT,o=it.RETRY_COST,a=it.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"),e1=i((e,t)=>Math.floor(Math.min(it.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),"defaultDelayDecider"),t1=i(e=>e?Ui.isRetryableByTrait(e)||Ui.isClockSkewError(e)||Ui.isThrottlingError(e)||Ui.isTransientError(e):!1,"defaultRetryDecider"),sf=class{static{i(this,"StandardRetryStrategy")}maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=it.RETRY_MODES.STANDARD;constructor(t,r){this.maxAttemptsProvider=t,this.retryDecider=r?.retryDecider??t1,this.delayDecider=r?.delayDecider??e1,this.retryQuota=r?.retryQuota??ure(it.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=it.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[it.INVOCATION_ID_HEADER]=YN.v4());;)try{cc.HttpRequest.isInstance(l)&&(l.headers[it.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 _=QN(d);if(a++,this.shouldRetry(_,a,u)){o=this.retryQuota.retrieveRetryTokens(_);let y=this.delayDecider(Ui.isThrottlingError(_)?it.THROTTLING_RETRY_DELAY_BASE:it.DEFAULT_RETRY_DELAY_BASE,a),E=lre(_.$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,_}}},lre=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"),cP=class extends sf{static{i(this,"AdaptiveRetryStrategy")}rateLimiter;constructor(t,r){let{rateLimiter:n,...o}=r??{};super(t,o),this.rateLimiter=n??new it.DefaultRateLimiter,this.mode=it.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")})}},uP="AWS_MAX_ATTEMPTS",lP="max_attempts",dre={environmentVariableSelector:i(e=>{let t=e[uP];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${uP} mast be a number, got "${t}"`);return r},"environmentVariableSelector"),configFileSelector:i(e=>{let t=e[lP];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${lP} mast be a number, got "${t}"`);return r},"configFileSelector"),default:it.DEFAULT_MAX_ATTEMPTS},pre=i(e=>{let{retryStrategy:t,retryMode:r}=e,n=ZN.normalizeProvider(e.maxAttempts??it.DEFAULT_MAX_ATTEMPTS),o=t?Promise.resolve(t):void 0,a=i(async()=>await ZN.normalizeProvider(r)()===it.RETRY_MODES.ADAPTIVE?new it.AdaptiveRetryStrategy(n):new it.StandardRetryStrategy(n),"getDefault");return Object.assign(e,{maxAttempts:n,retryStrategy:i(()=>o??=a(),"retryStrategy")})},"resolveRetryConfig"),r1="AWS_RETRY_MODE",n1="retry_mode",mre={environmentVariableSelector:i(e=>e[r1],"environmentVariableSelector"),configFileSelector:i(e=>e[n1],"configFileSelector"),default:it.DEFAULT_RETRY_MODE},o1=i(()=>e=>async t=>{let{request:r}=t;return cc.HttpRequest.isInstance(r)&&(delete r.headers[it.INVOCATION_ID_HEADER],delete r.headers[it.REQUEST_HEADER]),e(t)},"omitRetryHeadersMiddleware"),i1={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},fre=i(e=>({applyToStack:i(t=>{t.addRelativeTo(o1(),i1)},"applyToStack")}),"getOmitRetryHeadersPlugin");function s1(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=(cre.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(s1,"parseRetryAfterHeader");function gre(e,t){return s1(e,t)}i(gre,"getRetryAfterHint");var a1=i(e=>(t,r)=>async n=>{let o=await e.retryStrategy(),a=await e.maxAttempts();if(hre(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[it.INVOCATION_ID_HEADER]=YN.v4());;)try{y&&(_.headers[it.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=yre(E,e.logger);if(u=QN(E),y&&are.isStreamingPayload(_))throw(r.logger instanceof sre.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 XN(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 XN(v)}}else return o=o,o?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,n)},"retryMiddleware"),XN=i(e=>new Promise(t=>setTimeout(t,e)),"cooldown"),hre=i(e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u","isRetryStrategyV2"),yre=i((e,t)=>{let r={error:e,errorType:_re(e)},n=s1(e.$response,t);return n&&(r.retryAfterHint=n),r},"getRetryErrorInfo"),_re=i(e=>Ui.isThrottlingError(e)?"THROTTLING":Ui.isTransientError(e)?"TRANSIENT":Ui.isServerError(e)?"SERVER_ERROR":"CLIENT_ERROR","getRetryErrorType"),c1={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ere=i(e=>({applyToStack:i(t=>{t.add(a1(e),c1)},"applyToStack")}),"getRetryPlugin");kt.AdaptiveRetryStrategy=cP;kt.CONFIG_MAX_ATTEMPTS=lP;kt.CONFIG_RETRY_MODE=n1;kt.ENV_MAX_ATTEMPTS=uP;kt.ENV_RETRY_MODE=r1;kt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=dre;kt.NODE_RETRY_MODE_CONFIG_OPTIONS=mre;kt.StandardRetryStrategy=sf;kt.defaultDelayDecider=e1;kt.defaultRetryDecider=t1;kt.getOmitRetryHeadersPlugin=fre;kt.getRetryAfterHint=gre;kt.getRetryPlugin=Ere;kt.omitRetryHeadersMiddleware=o1;kt.omitRetryHeadersMiddlewareOptions=i1;kt.resolveRetryConfig=pre;kt.retryMiddleware=a1;kt.retryMiddlewareOptions=c1});var u1,dP,l1=D(()=>{u1=I(Me()),dP=i(e=>u1.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,"getDateHeader")});var uc,pP=D(()=>{uc=i(e=>new Date(Date.now()+e),"getSkewCorrectedDate")});var d1,p1=D(()=>{pP();d1=i((e,t)=>Math.abs(uc(t).getTime()-e)>=3e5,"isClockSkewed")});var mP,m1=D(()=>{p1();mP=i((e,t)=>{let r=Date.parse(e);return d1(r,t)?r-Date.now():t},"getUpdatedSystemClockOffset")});var fP=D(()=>{l1();pP();m1()});var f1,Yu,lc,Lt,gP,hP=D(()=>{f1=I(Me());fP();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(!f1.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??dP(r.$response);if(n){let o=Yu("config",t.config),a=o.systemClockOffset;o.systemClockOffset=mP(n,o.systemClockOffset),o.systemClockOffset!==a&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){let n=dP(t);if(n){let o=Yu("config",r.config);o.systemClockOffset=mP(n,o.systemClockOffset)}}},gP=Lt});var g1,ni,h1=D(()=>{g1=I(Me());fP();hP();ni=class extends Lt{static{i(this,"AwsSdkSigV4ASigner")}async sign(t,r,n){if(!g1.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 yP,y1=D(()=>{yP=i(e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()):[],"getArrayForCommaSeparatedString")});var af,_P=D(()=>{af=i(e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`,"getBearerTokenEnvKey")});var _1,E1,ao,S1=D(()=>{y1();_P();_1="AWS_AUTH_SCHEME_PREFERENCE",E1="auth_scheme_preference",ao={environmentVariableSelector:i((e,t)=>{if(t?.signingName&&af(t.signingName)in e)return["httpBearerAuth"];if(_1 in e)return yP(e[_1])},"environmentVariableSelector"),configFileSelector:i(e=>{if(E1 in e)return yP(e[E1])},"configFileSelector"),default:[]}});var EP,cf,uf,v1=D(()=>{Xe();EP=I(jt()),cf=i(e=>(e.sigv4aSigningRegionSet=bi(e.sigv4aSigningRegionSet),e),"resolveAwsSdkSigV4AConfig"),uf={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(t=>t.trim());throw new EP.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 EP.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0}});var yf=N(xe=>{"use strict";var Bi=Wa(),Xs=ft(),Sre=Rp(),T1=Me(),A1=It(),lf=Np(),x1="X-Amz-Algorithm",b1="X-Amz-Credential",CP="X-Amz-Date",I1="X-Amz-SignedHeaders",w1="X-Amz-Expires",TP="X-Amz-Signature",xP="X-Amz-Security-Token",vre="X-Amz-Region-Set",bP="authorization",IP=CP.toLowerCase(),$1="date",k1=[bP,IP,$1],D1=TP.toLowerCase(),gf="x-amz-content-sha256",M1=xP.toLowerCase(),Are="host",O1={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},N1=/^proxy-/,L1=/^sec-/,Rre=[/^proxy-/i,/^sec-/i],df="AWS4-HMAC-SHA256",Pre="AWS4-ECDSA-P256-SHA256",z1="AWS4-HMAC-SHA256-PAYLOAD",U1="UNSIGNED-PAYLOAD",B1=50,wP="aws4_request",G1=60*60*24*7,dc={},pf=[],mf=i((e,t,r)=>`${e}/${t}/${r}/${wP}`,"createScope"),F1=i(async(e,t,r,n,o)=>{let a=await R1(e,t.secretAccessKey,t.accessKeyId),c=`${r}:${n}:${o}:${Bi.toHex(a)}:${t.sessionToken}`;if(c in dc)return dc[c];for(pf.push(c);pf.length>B1;)delete dc[pf.shift()];let u=`AWS4${t.secretAccessKey}`;for(let l of[r,n,o,wP])u=await R1(e,u,l);return dc[c]=u},"getSigningKey"),Cre=i(()=>{pf.length=0,Object.keys(dc).forEach(e=>{delete dc[e]})},"clearCredentialCache"),R1=i((e,t,r)=>{let n=new e(t);return n.update(Xs.toUint8Array(r)),n.digest()},"hmac"),SP=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 O1||t?.has(a)||N1.test(a)||L1.test(a))&&(!r||r&&!r.has(a))||(n[a]=e[o].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),ff=i(async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===gf)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Sre.isArrayBuffer(t)){let n=new r;return n.update(Xs.toUint8Array(t)),Bi.toHex(await n.digest())}return U1},"getPayloadHash"),vP=class{static{i(this,"HeaderFormatter")}format(t){let r=[];for(let a of Object.keys(t)){let c=Xs.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=Xs.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(AP.fromNumber(t.value.valueOf()).bytes,1),_;case"uuid":if(!Tre.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let y=new Uint8Array(17);return y[0]=9,y.set(Bi.fromHex(t.value.replace(/\-/g,"")),1),y}}},P1;(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"})(P1||(P1={}));var Tre=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,AP=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&&C1(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&C1(t),parseInt(Bi.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function C1(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(C1,"negate");var j1=i((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader"),q1=i((e,t={})=>{let{headers:r,query:n={}}=T1.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"),RP=i(e=>{e=T1.HttpRequest.clone(e);for(let t of Object.keys(e.headers))k1.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest"),V1=i(({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e)){if(n.toLowerCase()===D1)continue;let o=lf.escapeUri(n);t.push(o);let a=e[n];typeof a=="string"?r[o]=`${o}=${lf.escapeUri(a)}`:Array.isArray(a)&&(r[o]=a.slice(0).reduce((c,u)=>c.concat([`${o}=${lf.escapeUri(u)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},"getCanonicalQuery"),xre=i(e=>bre(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),bre=i(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate"),hf=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=A1.normalizeProvider(n),this.credentialProvider=A1.normalizeProvider(r)}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
26
+ ${this.getCanonicalPath(t)}
27
+ ${V1(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(Xs.toUint8Array(n));let c=await a.digest();return`${o}
33
+ ${t}
34
+ ${r}
35
+ ${Bi.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 lf.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=xre(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}},PP=class extends hf{static{i(this,"SignatureV4")}headerFormatter=new vP;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>G1)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let A=mf(v,E,_??this.service),R=q1(RP(t),{unhoistableHeaders:c,hoistableHeaders:l});y.sessionToken&&(R.query[xP]=y.sessionToken),R.query[x1]=df,R.query[b1]=`${y.accessKeyId}/${A}`,R.query[CP]=g,R.query[w1]=o.toString(10);let b=SP(R,a,u);return R.query[I1]=this.getCanonicalHeaderList(b),R.query[TP]=await this.getSignature(g,A,this.getSigningKey(y,E,v,_),this.createCanonicalRequest(R,b,await ff(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=mf(d,l,c??this.service),E=await ff({headers:{},body:r},this.sha256),g=new this.sha256;g.update(t);let v=Bi.toHex(await g.digest()),A=[z1,_,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(Xs.toUint8Array(t)),Bi.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=RP(t),{longDate:_,shortDate:y}=this.formatDate(r),E=mf(y,l,c??this.service);d.headers[IP]=_,u.sessionToken&&(d.headers[M1]=u.sessionToken);let g=await ff(d,this.sha256);!j1(gf,d.headers)&&this.applyChecksum&&(d.headers[gf]=g);let v=SP(d,o,n),A=await this.getSignature(_,E,this.getSigningKey(u,l,y,c),this.createCanonicalRequest(d,v,g));return d.headers[bP]=`${df} 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,df),c=new this.sha256(await n);return c.update(Xs.toUint8Array(a)),Bi.toHex(await c.digest())}getSigningKey(t,r,n,o){return F1(this.sha256,t,n,r,o||this.service)}},Ire={SignatureV4a:null};xe.ALGORITHM_IDENTIFIER=df;xe.ALGORITHM_IDENTIFIER_V4A=Pre;xe.ALGORITHM_QUERY_PARAM=x1;xe.ALWAYS_UNSIGNABLE_HEADERS=O1;xe.AMZ_DATE_HEADER=IP;xe.AMZ_DATE_QUERY_PARAM=CP;xe.AUTH_HEADER=bP;xe.CREDENTIAL_QUERY_PARAM=b1;xe.DATE_HEADER=$1;xe.EVENT_ALGORITHM_IDENTIFIER=z1;xe.EXPIRES_QUERY_PARAM=w1;xe.GENERATED_HEADERS=k1;xe.HOST_HEADER=Are;xe.KEY_TYPE_IDENTIFIER=wP;xe.MAX_CACHE_SIZE=B1;xe.MAX_PRESIGNED_TTL=G1;xe.PROXY_HEADER_PATTERN=N1;xe.REGION_SET_PARAM=vre;xe.SEC_HEADER_PATTERN=L1;xe.SHA256_HEADER=gf;xe.SIGNATURE_HEADER=D1;xe.SIGNATURE_QUERY_PARAM=TP;xe.SIGNED_HEADERS_QUERY_PARAM=I1;xe.SignatureV4=PP;xe.SignatureV4Base=hf;xe.TOKEN_HEADER=M1;xe.TOKEN_QUERY_PARAM=xP;xe.UNSIGNABLE_PATTERNS=Rre;xe.UNSIGNED_PAYLOAD=U1;xe.clearCredentialCache=Cre;xe.createScope=mf;xe.getCanonicalHeaders=SP;xe.getCanonicalQuery=V1;xe.getPayloadHash=ff;xe.getSigningKey=F1;xe.hasHeader=j1;xe.moveHeadersToQuery=q1;xe.prepareRequest=RP;xe.signatureV4aContainer=Ire});function wre(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=iR(t,oR,Pm):r?n=bi(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 $re(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 $P,Nn,H1,W1=D(()=>{yt();Xe();$P=I(yf()),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 _=wre(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),y=$re(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)?ki(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=bi(e.signer):e.regionInfoProvider?u=i(()=>bi(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||$P.SignatureV4;return new v(g)}),"signer"):u=i(async d=>{d=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await bi(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||$P.SignatureV4;return new g(E)},"signer"),Object.assign(e,{systemClockOffset:a,signingEscapePath:o,signer:u})},"resolveAwsSdkSigV4Config"),H1=Nn;i(wre,"normalizeCredentialProvider");i($re,"bindCallerConfig")});var J1=D(()=>{hP();h1();S1();v1();W1()});var pc={};bt(pc,{AWSSDKSigV4Signer:()=>gP,AwsSdkSigV4ASigner:()=>ni,AwsSdkSigV4Signer:()=>Lt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>ao,NODE_SIGV4A_CONFIG_OPTIONS:()=>uf,getBearerTokenEnvKey:()=>af,resolveAWSSDKSigV4Config:()=>H1,resolveAwsSdkSigV4AConfig:()=>cf,resolveAwsSdkSigV4Config:()=>Nn,validateSigningProperties:()=>lc});var Dt=D(()=>{J1();_P()});var MP=N(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.resolveHttpAuthSchemeConfig=Gi.defaultBedrockRuntimeHttpAuthSchemeProvider=Gi.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=void 0;var kre=(Dt(),Q(pc)),kP=(Xe(),Q(fr)),DP=It(),Dre=i(async(e,t,r)=>({operation:(0,DP.getSmithyContext)(t).operation,region:await(0,DP.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultBedrockRuntimeHttpAuthSchemeParametersProvider");Gi.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=Dre;function Mre(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i(Mre,"createAwsAuthSigv4HttpAuthOption");function Ore(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(Ore,"createSmithyApiHttpBearerAuthHttpAuthOption");var Nre=i(e=>{let t=[];switch(e.operation){default:t.push(Mre(e)),t.push(Ore(e))}return t},"defaultBedrockRuntimeHttpAuthSchemeProvider");Gi.defaultBedrockRuntimeHttpAuthSchemeProvider=Nre;var Lre=i(e=>{let t=(0,kP.memoizeIdentityProvider)(e.token,kP.isIdentityExpired,kP.doesIdentityRequireRefresh),r=(0,kre.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,DP.normalizeProvider)(e.authSchemePreference??[]),token:t})},"resolveHttpAuthSchemeConfig");Gi.resolveHttpAuthSchemeConfig=Lre});var K1=N((Sot,zre)=>{zre.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 OP=N(Fi=>{"use strict";var Ure=(yt(),Q(Pr)),Bre=jt(),Z1="AWS_ACCESS_KEY_ID",X1="AWS_SECRET_ACCESS_KEY",Y1="AWS_SESSION_TOKEN",Q1="AWS_CREDENTIAL_EXPIRATION",eL="AWS_CREDENTIAL_SCOPE",tL="AWS_ACCOUNT_ID",Gre=i(e=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let t=process.env[Z1],r=process.env[X1],n=process.env[Y1],o=process.env[Q1],a=process.env[eL],c=process.env[tL];if(t&&r){let u={accessKeyId:t,secretAccessKey:r,...n&&{sessionToken:n},...o&&{expiration:new Date(o)},...a&&{credentialScope:a},...c&&{accountId:c}};return Ure.setCredentialFeature(u,"CREDENTIALS_ENV_VARS","g"),u}throw new Bre.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})},"fromEnv");Fi.ENV_ACCOUNT_ID=tL;Fi.ENV_CREDENTIAL_SCOPE=eL;Fi.ENV_EXPIRATION=Q1;Fi.ENV_KEY=Z1;Fi.ENV_SECRET=X1;Fi.ENV_SESSION=Y1;Fi.fromEnv=Gre});var el=N(rr=>{"use strict";var co=jt(),Fre=require("url"),jre=require("buffer"),qre=require("http"),BP=cn(),Vre=Gr();function Qu(e){return new Promise((t,r)=>{let n=qre.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 iL=i(e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string","isImdsCredentials"),sL=i(e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),"fromImdsCredentials"),aL=1e3,cL=0,GP=i(({maxRetries:e=cL,timeout:t=aL})=>({maxRetries:e,timeout:t}),"providerConfigFromInit"),LP=i((e,t)=>{let r=e();for(let n=0;n<t;n++)r=r.catch(e);return r},"retry"),_f="AWS_CONTAINER_CREDENTIALS_FULL_URI",Ef="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",zP="AWS_CONTAINER_AUTHORIZATION_TOKEN",Hre=i((e={})=>{let{timeout:t,maxRetries:r}=GP(e);return()=>LP(async()=>{let n=await Xre({logger:e.logger}),o=JSON.parse(await Wre(t,n));if(!iL(o))throw new co.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:e.logger});return sL(o)},r)},"fromContainerMetadata"),Wre=i(async(e,t)=>(process.env[zP]&&(t.headers={...t.headers,Authorization:process.env[zP]}),(await Qu({...t,timeout:e})).toString()),"requestFromEcsImds"),Jre="169.254.170.2",Kre={localhost:!0,"127.0.0.1":!0},Zre={"http:":!0,"https:":!0},Xre=i(async({logger:e})=>{if(process.env[Ef])return{hostname:Jre,path:process.env[Ef]};if(process.env[_f]){let t=Fre.parse(process.env[_f]);if(!t.hostname||!(t.hostname in Kre))throw new co.CredentialsProviderError(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in Zre))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 ${Ef} or ${_f} environment variable is set`,{tryNextLink:!1,logger:e})},"getCmdsUri"),UP=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 Yre="AWS_EC2_METADATA_SERVICE_ENDPOINT",Qre="ec2_metadata_service_endpoint",ene={environmentVariableSelector:i(e=>e[Yre],"environmentVariableSelector"),configFileSelector:i(e=>e[Qre],"configFileSelector"),default:void 0},mc;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(mc||(mc={}));var tne="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",rne="ec2_metadata_service_endpoint_mode",nne={environmentVariableSelector:i(e=>e[tne],"environmentVariableSelector"),configFileSelector:i(e=>e[rne],"configFileSelector"),default:mc.IPv4},uL=i(async()=>Vre.parseUrl(await one()||await ine()),"getInstanceMetadataEndpoint"),one=i(async()=>BP.loadConfig(ene)(),"getFromEndpointConfig"),ine=i(async()=>{let e=await BP.loadConfig(nne)();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"),sne=5*60,ane=5*60,cne="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",rL=i((e,t)=>{let r=sne+Math.floor(Math.random()*ane),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: `+cne);let o=e.originalExpiration??e.expiration;return{...e,...o?{originalExpiration:o}:{},expiration:n}},"getExtendedInstanceMetadataCredentials"),une=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=rL(o,r))}catch(a){if(n)r.warn("Credential renew failed: ",a),o=rL(n,r);else throw a}return n=o,o}},"staticStabilityProvider"),lL="/latest/meta-data/iam/security-credentials/",lne="/latest/api/token",NP="AWS_EC2_METADATA_V1_DISABLED",nL="ec2_metadata_v1_disabled",oL="x-aws-ec2-metadata-token",dne=i((e={})=>une(pne(e),{logger:e.logger}),"fromInstanceMetadata"),pne=i((e={})=>{let t=!1,{logger:r,profile:n}=e,{timeout:o,maxRetries:a}=GP(e),c=i(async(u,l)=>{if(t||l.headers?.[oL]==null){let y=!1,E=!1,g=await BP.loadConfig({environmentVariableSelector:i(v=>{let A=v[NP];if(E=!!A&&A!=="false",A===void 0)throw new co.CredentialsProviderError(`${NP} not set in env, checking config file next.`,{logger:e.logger});return E},"environmentVariableSelector"),configFileSelector:i(v=>{let A=v[nL];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 (${nL})`),E&&v.push(`process environment variable (${NP})`),new UP(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${v.join(", ")}].`)}}let _=(await LP(async()=>{let y;try{y=await fne(l)}catch(E){throw E.statusCode===401&&(t=!1),E}return y},u)).trim();return LP(async()=>{let y;try{y=await gne(_,l,e)}catch(E){throw E.statusCode===401&&(t=!1),E}return y},u)},"getCredentials");return async()=>{let u=await uL();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 mne({...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:{[oL]:l},timeout:o})}}},"getInstanceMetadataProvider"),mne=i(async e=>Qu({...e,path:lne,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),fne=i(async e=>(await Qu({...e,path:lL})).toString(),"getProfile"),gne=i(async(e,t,r)=>{let n=JSON.parse((await Qu({...t,path:lL+e})).toString());if(!iL(n))throw new co.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return sL(n)},"getCredentialsFromProfile");rr.DEFAULT_MAX_RETRIES=cL;rr.DEFAULT_TIMEOUT=aL;rr.ENV_CMDS_AUTH_TOKEN=zP;rr.ENV_CMDS_FULL_URI=_f;rr.ENV_CMDS_RELATIVE_URI=Ef;rr.fromContainerMetadata=Hre;rr.fromInstanceMetadata=dne;rr.getInstanceMetadataEndpoint=uL;rr.httpRequest=Qu;rr.providerConfigFromInit=GP});var dL=N(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.checkUrl=void 0;var hne=jt(),yne="169.254.170.2",_ne="169.254.170.23",Ene="[fd00:ec2::23]",Sne=i((e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===yne||e.hostname===_ne||e.hostname===Ene)){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 hne.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");Sf.checkUrl=Sne});var pL=N(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.createGetRequest=Pne;vf.getCredentials=Cne;var FP=jt(),vne=Me(),Ane=ue(),Rne=Qp();function Pne(e){return new vne.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(Pne,"createGetRequest");async function Cne(e,t){let n=await(0,Rne.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 FP.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,Ane.parseRfc3339DateTime)(o.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let o={};try{o=JSON.parse(n)}catch{}throw Object.assign(new FP.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:o.Code,Message:o.Message})}throw new FP.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t})}i(Cne,"getCredentials")});var mL=N(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.retryWrapper=void 0;var Tne=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");Af.retryWrapper=Tne});var hL=N(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.fromHttp=void 0;var xne=(Ko(),Q(Jo)),bne=(yt(),Q(Pr)),Ine=to(),fL=jt(),wne=xne.__importDefault(require("node:fs/promises")),$ne=dL(),gL=pL(),kne=mL(),Dne="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Mne="http://169.254.170.2",One="AWS_CONTAINER_CREDENTIALS_FULL_URI",Nne="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Lne="AWS_CONTAINER_AUTHORIZATION_TOKEN",zne=i((e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t,r=e.awsContainerCredentialsRelativeUri??process.env[Dne],n=e.awsContainerCredentialsFullUri??process.env[One],o=e.awsContainerAuthorizationToken??process.env[Lne],a=e.awsContainerAuthorizationTokenFile??process.env[Nne],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=`${Mne}${r}`;else throw new fL.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,$ne.checkUrl)(u,e.logger);let l=Ine.NodeHttpHandler.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return(0,kne.retryWrapper)(async()=>{let d=(0,gL.createGetRequest)(u);o?d.headers.Authorization=o:a&&(d.headers.Authorization=(await wne.default.readFile(a)).toString());try{let _=await l.handle(d);return(0,gL.getCredentials)(_.response).then(y=>(0,bne.setCredentialFeature)(y,"CREDENTIALS_HTTP","z"))}catch(_){throw new fL.CredentialsProviderError(String(_),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3)},"fromHttp");Rf.fromHttp=zne});var jP=N(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.fromHttp=void 0;var Une=hL();Object.defineProperty(Pf,"fromHttp",{enumerable:!0,get:i(function(){return Une.fromHttp},"get")})});function Bne(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function Gne(e){return{schemeId:"smithy.api#noAuth"}}var tl,yL,_L,EL,qP=D(()=>{Dt();tl=I(It()),yL=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(Bne,"createAwsAuthSigv4HttpAuthOption");i(Gne,"createSmithyApiNoAuthHttpAuthOption");_L=i(e=>{let t=[];switch(e.operation){case"CreateToken":{t.push(Gne(e));break}default:t.push(Bne(e))}return t},"defaultSSOOIDCHttpAuthSchemeProvider"),EL=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,tl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var SL,vL,VP=D(()=>{SL=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),"resolveClientEndpointParameters"),vL={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var ji,rl=D(()=>{ji={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 qi=N(Ys=>{"use strict";var AL=require("node:os"),nl=require("node:process"),RL=qm(),PL=require("node:fs/promises"),fc=require("node:path"),jne=ti(),qne=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"),Vne=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"),Hne=/^(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-]+)*)?$/,CL=i((e="")=>{let t=e.match(Hne);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"),Wne=["^","~",">=","<=",">","<"],Jne=["latest","beta","dev","rc","insiders","next"],Kne=i((e="")=>{if(Jne.includes(e))return e;let t=Wne.find(n=>e.startsWith(n))??"",r=CL(e.slice(t.length));if(r)return`${t}${r}`},"getSanitizedDevTypeScriptVersion"),uo,Zne=fc.join("node_modules","typescript","package.json"),Xne=i(async()=>{if(uo===null)return;if(typeof uo=="string")return["md/tsc",uo];let e=!1;try{e=RL.booleanSelector(process.env,"AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED",RL.SelectorType.ENV)||!1}catch{}if(e){uo=null;return}let r=Vne(typeof __dirname<"u"?__dirname:void 0),n;for(let c of r)try{let u=fc.join(c,"package.json"),l=await PL.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,Zne),l=await PL.readFile(u,"utf-8"),{version:d}=JSON.parse(l),_=CL(d);if(typeof _!="string")continue;o=_;break}catch{}if(o)return uo=o,["md/tsc",uo];let a=Kne(n);if(typeof a!="string"){uo=null;return}return uo=`dev_${a}`,["md/tsc",uo]},"getTypeScriptUserAgentPair"),TL={isCrtAvailable:!1},Yne=i(()=>TL.isCrtAvailable?["md/crt-avail"]:null,"isCrtAvailable"),xL=i(({serviceId:e,clientVersion:t})=>{let r=qne();return async n=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${AL.platform()}`,AL.release()],["lang/js"],r],a=await Xne();a&&o.push(a);let c=Yne();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"),Qne=xL,bL="AWS_SDK_UA_APP_ID",IL="sdk_ua_app_id",eoe="sdk-ua-app-id",toe={environmentVariableSelector:i(e=>e[bL],"environmentVariableSelector"),configFileSelector:i(e=>e[IL]??e[eoe],"configFileSelector"),default:jne.DEFAULT_UA_APP_ID};Ys.NODE_APP_ID_CONFIG_OPTIONS=toe;Ys.UA_APP_ID_ENV_NAME=bL;Ys.UA_APP_ID_INI_NAME=IL;Ys.createDefaultUserAgentProvider=xL;Ys.crtAvailability=TL;Ys.defaultUserAgent=Qne});var Vi=N(kL=>{"use strict";var HP=qa(),roe=ft(),noe=require("buffer"),wL=require("crypto"),WP=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(roe.toUint8Array($L(t,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?wL.createHmac(this.algorithmIdentifier,$L(this.secret)):wL.createHash(this.algorithmIdentifier)}};function $L(e,t){return noe.Buffer.isBuffer(e)?e:typeof e=="string"?HP.fromString(e,t):ArrayBuffer.isView(e)?HP.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength):HP.fromArrayBuffer(e)}i($L,"castSourceData");kL.Hash=WP});var Hi=N(DL=>{"use strict";var JP=require("node:fs"),ooe=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 JP.ReadStream){if(e.path!=null)return JP.lstatSync(e.path).size;if(typeof e.fd=="number")return JP.fstatSync(e.fd).size}throw new Error(`Body Length computation failed for ${e}`)},"calculateBodyLength");DL.calculateBodyLength=ooe});var Wi=N(LL=>{"use strict";var ioe=Nt(),ML=cn(),soe=jt(),aoe="AWS_EXECUTION_ENV",OL="AWS_REGION",NL="AWS_DEFAULT_REGION",coe="AWS_EC2_METADATA_DISABLED",uoe=["in-region","cross-region","mobile","standard","legacy"],loe="/latest/meta-data/placement/region",doe="AWS_DEFAULTS_MODE",poe="defaults_mode",moe={environmentVariableSelector:i(e=>e[doe],"environmentVariableSelector"),configFileSelector:i(e=>e[poe],"configFileSelector"),default:"legacy"},foe=i(({region:e=ML.loadConfig(ioe.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=ML.loadConfig(moe)}={})=>soe.memoize(async()=>{let r=typeof t=="function"?await t():t;switch(r?.toLowerCase()){case"auto":return goe(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 ${uoe.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),goe=i(async e=>{if(e){let t=typeof e=="function"?await e():e,r=await hoe();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),hoe=i(async()=>{if(process.env[aoe]&&(process.env[OL]||process.env[NL]))return process.env[OL]??process.env[NL];if(!process.env[coe])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(()=>I(el())),r=await e();return(await t({...r,path:loe})).toString()}catch{}},"inferPhysicalRegion");LL.resolveDefaultsModeConfig=foe});function Ji(e){return typeof Buffer<"u"?Buffer.alloc(e):new Uint8Array(e)}function Cf(e){return e[KP]=!0,e}var KP,Tf=D(()=>{i(Ji,"alloc");KP=Symbol("@smithy/core/cbor::tagSymbol");i(Cf,"tag")});function BL(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=FL[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,ZP(o);if(r===1){let c;return typeof o=="bigint"?c=BigInt(-1)-o:c=-1-o,De=a,ZP(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,VA(y)}else{let c=lo(e+a,t);return De=a+De,Cf({tag:ZP(o),value:c})}case 3:case 5:case 4:case 2:if(n===31)switch(r){case 3:return Roe(e,t);case 5:return boe(e,t);case 4:return Toe(e,t);case 2:return Poe(e,t)}else switch(r){case 3:return Aoe(e,t);case 5:return xoe(e,t);case 4:return Coe(e,t);case 2:return rC(e,t)}default:return Ioe(e,t)}}function GL(e,t,r){return Eoe&&e.constructor?.name==="Buffer"?e.toString("utf-8",t,r):zL?zL.decode(e.subarray(t,r)):(0,UL.toUtf8)(e.subarray(t,r))}function Soe(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 voe(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=FL[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):Soe(ii.getBigUint64(o))}throw new Error(`unexpected minor value ${r}.`)}function Aoe(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=GL(Je,e,e+r);return De=n+r,o}function Roe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(Je[e]===255){let l=Ji(r.length);return l.set(r,0),De=e-n+2,GL(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=rC(e,t);e+=De;for(let l=0;l<c.length;++l)r.push(c[l])}throw new Error("expected break marker.")}function rC(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 Poe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(Je[e]===255){let l=Ji(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=rC(e,t);e+=De;for(let l=0;l<c.length;++l)r.push(c[l])}throw new Error("expected break marker.")}function Coe(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 Toe(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 xoe(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 boe(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 Ioe(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,voe(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 ZP(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 UL,_oe,Eoe,Je,ii,zL,De,FL,jL=D(()=>{Qt();UL=I(ft());Tf();_oe=typeof TextDecoder<"u",Eoe=typeof Buffer<"u",Je=Ji(0),ii=new DataView(Je.buffer,Je.byteOffset,Je.byteLength),zL=_oe?new TextDecoder:null,De=0;i(BL,"setPayload");i(lo,"decode");i(GL,"bytesToUtf8");i(Soe,"demote");FL={[24]:1,[25]:2,[26]:4,[27]:8};i(voe,"bytesToFloat16");i(al,"decodeCount");i(Aoe,"decodeUtf8String");i(Roe,"decodeUtf8StringIndefinite");i(rC,"decodeUnstructuredByteString");i(Poe,"decodeUnstructuredByteStringIndefinite");i(Coe,"decodeList");i(Toe,"decodeListIndefinite");i(xoe,"decodeMap");i(boe,"decodeMapIndefinite");i(Ioe,"decodeSpecial");i(ZP,"castBigInt")});function oC(e){ve.byteLength-se<e&&(se<16e6?bf(Math.max(ve.byteLength*4,ve.byteLength+e)):bf(ve.byteLength+e+16e6))}function iC(){let e=Ji(se);return e.set(ve.subarray(0,se),0),se=0,e}function bf(e){let t=ve;ve=Ji(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 HL(e){let t=[e];for(;t.length;){let r=t.pop();if(oC(typeof r=="string"?r.length*4:64),typeof r=="string"){if(qL)ai(3,Buffer.byteLength(r)),se+=ve.write(r,se);else{let n=(0,VL.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);oC(l.byteLength*2),ve[se++]=n?194:195,qL?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"){oC(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[KP])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 VL,qL,woe,ve,ci,se,WL=D(()=>{Qt();VL=I(ft());Tf();qL=typeof Buffer<"u",woe=2048,ve=Ji(woe),ci=new DataView(ve.buffer,ve.byteOffset,ve.byteLength),se=0;i(oC,"ensureSpace");i(iC,"toUint8Array");i(bf,"resize");i(ai,"encodeHeader");i(HL,"encode")});var sC,JL=D(()=>{jL();WL();sC={deserialize(e){return BL(e),lo(0,e.length)},serialize(e){try{return HL(e),iC()}catch(t){throw iC(),t}},resizeEncodingBuffer(e){bf(e)}}});var If,wf,$f=D(()=>{Tf();If=i(e=>Cf({tag:1,value:e.getTime()/1e3}),"dateToTag"),wf=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 uC,kf,aC,cC,lC=D(()=>{Rr();ke();Qt();Qt();uC=I(gt());JL();$f();kf=class extends mr{static{i(this,"CborCodec")}createSerializer(){let t=new aC;return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new cC;return t.setSerdeContext(this.serdeContext),t}},aC=class extends mr{static{i(this,"CborShapeSerializer")}value;write(t,r){this.value=this.serialize(t,r)}serialize(t,r){let n=re.of(t);if(r==null)return n.isIdempotencyToken()?(0,an.v4)():r;if(n.isBlobSchema())return typeof r=="string"?(this.serdeContext?.base64Decoder??uC.fromBase64)(r):r;if(n.isTimestampSchema())return typeof r=="number"||typeof r=="bigint"?If(new Date(Number(r)/1e3|0)):If(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 If(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=sC.serialize(this.value);return this.value=void 0,t}},cC=class extends mr{static{i(this,"CborShapeDeserializer")}read(t,r){let n=sC.deserialize(r);return this.readValue(t,n)}readValue(t,r){let n=re.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??uC.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 KL,Df,ZL=D(()=>{Rr();ke();ke();KL=I(It());lC();$f();Df=class extends Xo{static{i(this,"SmithyRpcV2CborProtocol")}codec=new kf;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,KL.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=wf(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,_=nt.for(l);d.copyFrom(_);let y;try{y=d.getSchema(c)}catch{o.Message&&(o.message=o.Message);let $=nt.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=re.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 XL=D(()=>{$f();ZL();lC()});var dC,un,hc=D(()=>{ke();dC=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=nt.for(o),c=nt.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,dC.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,dC.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=>re.of(o).getMergedTraits().awsQueryError?.[0]===r)}}}});var Mf,YL=D(()=>{XL();ke();hc();Mf=class extends Df{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]:wf(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=re.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 QL,ez,tz,rz=D(()=>{QL=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"),ez=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"),tz=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,Yi=D(()=>{nr=class{static{i(this,"SerdeContextConfig")}serdeContext;setSerdeContext(t){this.serdeContext=t}}});var yc,pC=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 nz(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 oz=D(()=>{Qt();i(nz,"jsonReviver")});var iz,sz,Of,mC=D(()=>{iz=I(ue()),sz=I(ft()),Of=i((e,t)=>(0,iz.collectBody)(e,t).then(r=>(t?.utf8Encoder??sz.toUtf8)(r)),"collectBodyString")});var cl,cz,az,fC,_c,ul=D(()=>{mC();cl=i((e,t)=>Of(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"),cz=i(async(e,t)=>{let r=await cl(e,t);return r.message=r.message??r.Message,r},"parseJsonErrorBody"),az=i((e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),"findKey"),fC=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=az(e.headers,"x-amzn-errortype");if(r!==void 0)return fC(e.headers[r]);if(t&&typeof t=="object"){let n=az(t,"code");if(n&&t[n]!==void 0)return fC(t[n]);if(t.__type!==void 0)return fC(t.__type)}},"loadRestJsonErrorCode")});var uz,Ec,gC=D(()=>{Rr();ke();Qt();uz=I(gt());Yi();pC();oz();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,nz):await cl(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){let n=r!==null&&typeof r=="object",o=re.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,uz.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 $A(r);case 6:return kA(r);case 7:return DA(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 lz,Nf,dz=D(()=>{Qt();lz="\u039D",Nf=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=`${lz+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){let n=r.toString(),o=`${lz+"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 hC,Sc,yC=D(()=>{Rr();ke();Qt();hC=I(gt());Yi();dz();Sc=class extends nr{static{i(this,"JsonShapeSerializer")}settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=re.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 Nf;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=re.of(t).getName(!0))}_write(t,r,n){let o=r!==null&&typeof r=="object",a=re.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??hC.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??hC.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 Qi,Lf=D(()=>{Yi();gC();yC();Qi=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 es,zf=D(()=>{Rr();ke();hc();Lf();ul();es=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 Qi({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=re.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 Uf,pz=D(()=>{zf();Uf=class extends es{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 Bf,mz=D(()=>{zf();Bf=class extends es{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,fz=D(()=>{Rr();ke();hc();Lf();ul();po=class extends Gs{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 Qi(n),this.serializer=new qs(this.codec.createSerializer(),n),this.deserializer=new js(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=re.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=re.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=re.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 gz,hz,yz=D(()=>{gz=I(ue()),hz=i(e=>{if(e!=null)return typeof e=="object"&&"__type"in e&&delete e.__type,(0,gz.expectUnion)(e)},"awsExpectUnion")});var Ez=N((qst,_z)=>{(()=>{"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(()=>p5,"XMLBuilder"),XMLParser:i(()=>n5,"XMLParser"),XMLValidator:i(()=>m5,"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--),!de(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 de(S){return a(S)}i(de,"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&&ks(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&&ks(p,"!ELEMENT",h)){h+=8;let{index:z}=this.readElementExp(p,h+1);h=z}else if(L&&ks(p,"!ATTLIST",h))h+=8;else if(L&&ks(p,"!NOTATION",h)){h+=9;let{index:z}=this.readNotationExp(p,h+1,this.suppressValidationErr);h=z}else{if(!ks(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"&&ks(p,"MPTY",h))h+=4;else if(p[h]==="A"&&ks(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 ks(S,p,h){for(let C=0;C<p.length;C++)if(p[C]!==S[h+C+1])return!1;return!0}i(ks,"D");function iu(S){if(a(S))return S;throw new Error(`Invalid entity name ${S}`)}i(iu,"M");let xJ=/^[-+]?0x[a-fA-F0-9]+$/,bJ=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,IJ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},wJ=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class $J{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 NS{static{i(this,"R")}constructor(p={}){this.separator=p.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new $J(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 ka{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 kJ{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 DJ={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"},tI={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},MJ={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"},OJ=new Set("!?\\\\/[]$%{}^&*()<>|+");function rI(S){if(S[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${S}"`);for(let p of S)if(OJ.has(p))throw new Error(`[EntityReplacer] Invalid character '${p}' in entity name: "${S}"`);return S}i(rI,"z");function LS(...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(LS,"q");let Ds="external",ep="base",zS="all",zr=Object.freeze({allow:0,leave:1,remove:2,throw:3}),NJ=new Set([9,10,13]);class LJ{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??Ds)&&h!==Ds?h===zS?new Set([zS]):h===ep?new Set([ep]):Array.isArray(h)?new Set(h):new Set([Ds]):new Set([Ds]),this._numericAllowed=p.numericAllowed??!0,this._baseMap=LS(tI,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))rI(h);this._externalMap=LS(p)}addExternalEntity(p,h){rI(p),typeof h=="string"&&h.indexOf("&")===-1&&(this._externalMap[p]=h)}addInputEntities(p){this._totalExpansions=0,this._expandedLength=0,this._inputMap=LS(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,le;if(this._removeSet.has(te))oe="",le===void 0&&(le=Ds);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,le=ep}else{let fe=this._resolveName(te);oe=fe?.value,le=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(le)){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(zS)||this._limitTiers.has(p)}_resolveName(p){return p in this._inputMap?{value:this._inputMap[p],tier:Ds}:p in this._externalMap?{value:this._externalMap[p],tier:Ds}: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&&!NJ.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 zJ(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(zJ,"et");function UJ(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(UJ,"nt");class BJ{static{i(this,"it")}constructor(p){var h;this.options=p,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=VJ,this.parseTextData=GJ,this.resolveNameSpace=FJ,this.buildAttributesMap=qJ,this.isItStopNode=KJ,this.replaceEntitiesValue=WJ,this.readStopNodeData=XJ,this.saveTextToParentTag=JJ,this.addChild=HJ,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={...tI};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?C=this.options.htmlEntities:this.options.htmlEntities===!0&&(C={...MJ,...DJ}),this.entityDecoder=new LJ({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 NS,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new kJ;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 ka(L)):L instanceof ka&&this.stopNodeExpressionsSet.add(L)}this.stopNodeExpressionsSet.seal()}}}function GJ(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?nI(S,M.parseTagValue,M.numberParseOptions):S}}i(GJ,"st");function FJ(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(FJ,"rt");let jJ=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function qJ(S,p,h,C=!1){let P=this.options;if(C===!0||P.ignoreAttributes!==!0&&typeof S=="string"){let x=o(S,jJ),L=x.length,M={},U=new Array(L),z=!1,B={};for(let oe=0;oe<L;oe++){let le=this.resolveNameSpace(x[oe][1]),fe=x[oe][4];if(le.length&&fe!==void 0){let Et=fe;P.trimValues&&(Et=Et.trim()),Et=this.replaceEntitiesValue(Et,h,this.readonlyMatcher),U[oe]=Et,B[le]=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 le=this.resolveNameSpace(x[oe][1]);if(this.ignoreAttributesFn(le,Z))continue;let fe=P.attributeNamePrefix+le;if(le.length)if(P.transformAttributeName&&(fe=P.transformAttributeName(fe)),fe=oI(fe,P),x[oe][4]!==void 0){let Et=U[oe],Sr=P.attributeValueProcessor(le,Et,Z);M[fe]=Sr==null?Et:typeof Sr!=typeof Et||Sr!==Et?Sr:nI(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(qJ,"at");let VJ=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=Da(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=BS(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=US(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=Da(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=Da(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=US(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,le=z.closeIndex;if({tagName:B,tagExp:te}=BS(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=UJ(Z),B!==p.tagname&&this.matcher.push(B,{},Sr),B!==te&&oe&&(vr=this.buildAttributesMap(te,this.matcher,B),vr&&(yi=zJ(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 qS=this.readStopNodeData(S,Z,le+1);if(!qS)throw new Error(`Unexpected end of ${Z}`);M=qS.i,Ar=qS.tagContent}let jS=new Ve(B);vr&&(jS[":@"]=vr),jS.add(P.textNodeName,Ar),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(h,jS,this.readonlyMatcher,nn)}else{if(Et){({tagName:B,tagExp:te}=BS(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=le}}}else C+=S[M];return p.child},"ht");function HJ(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(HJ,"lt");function WJ(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(WJ,"ut");function JJ(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(JJ,"pt");function KJ(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}i(KJ,"ct");function Da(S,p,h,C){let P=S.indexOf(p,h);if(P===-1)throw new Error(C);return P+p.length-1}i(Da,"dt");function ZJ(S,p,h,C){let P=S.indexOf(p,h);if(P===-1)throw new Error(C);return P}i(ZJ,"ft");function US(S,p,h,C=">"){let P=function(Z,te,oe=">"){let le=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(le)nn===le&&(le=0);else if(nn===34||nn===39)le=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(US,"gt");function XJ(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=ZJ(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=Da(S,"?>",h+1,"StopNode is not closed.");else if(L===33&&S.charCodeAt(h+2)===45&&S.charCodeAt(h+3)===45)h=Da(S,"-->",h+3,"StopNode is not closed.");else if(L===33&&S.charCodeAt(h+2)===91)h=Da(S,"]]>",h,"StopNode is not closed.")-2;else{let M=US(S,h,">");M&&((M&&M.tagName)===p&&M.tagExp[M.tagExp.length-1]!=="/"&&P++,h=M.closeIndex)}}}i(XJ,"mt");function nI(S,p,h){if(p&&typeof S=="string"){let C=S.trim();return C==="true"||C!=="false"&&function(P,x={}){if(x=Object.assign({},IJ,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&&xJ.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(wJ);if(Z){let te=Z[1]||"",oe=Z[3].indexOf("e")===-1?"E":"e",le=Z[2],fe=te?U[le.length+1]===oe:U[le.length]===oe;return le.length>1&&fe?U:(le.length!==1||!Z[3].startsWith(`.${oe}`)&&Z[3][0]!==oe)&&le.length>0?B.leadingZeros&&!fe?(z=(Z[1]||"")+Z[3],Number(z)):U:Number(z)}return U}(P,L,x);{let U=bJ.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),le=String(oe);if(oe===0)return oe;if(le.search(/[eE]/)!==-1)return x.eNotation?oe:P;if(L.indexOf(".")!==-1)return le==="0"||le===Z||le===`${z}${Z}`?oe:P;let fe=B?Z:L;return B?fe===le||z+fe===le?oe:P:fe===le||fe===z+le?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(nI,"xt");function BS(S,p,h,C){if(S){let P=S(p);h===p&&(h=P),p=P}return{tagName:p=oI(p,C),tagExp:h}}i(BS,"Nt");function oI(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(oI,"bt");let GS=Ve.getMetaDataSymbol();function YJ(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(YJ,"Et");function QJ(S,p,h,C){return iI(S,p,h,C)}i(QJ,"wt");function iI(S,p,h,C){let P,x={};for(let L=0;L<S.length;L++){let M=S[L],U=e5(M);if(U!==void 0&&U!==p.textNodeName){let z=YJ(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=iI(M[U],p,h,C),B=r5(z,p);if(M[":@"]?t5(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[GS]!==void 0&&typeof z=="object"&&z!==null&&(z[GS]=M[GS]),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(iI,"vt");function e5(S){let p=Object.keys(S);for(let h=0;h<p.length;h++){let C=p[h];if(C!==":@")return C}}i(e5,"St");function t5(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(t5,"_t");function r5(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(r5,"At");class n5{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 BJ(this.options);C.entityDecoder.setExternalEntities(this.externalEntities);let P=C.parseXml(p);return this.options.preserveOrder||P===void 0?P:QJ(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 '&#xD;'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[p]=h}static getMetaDataSymbol(){return Ve.getMetaDataSymbol()}}function o5(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 ka(x)):x instanceof ka&&C.push(x)}return sI(S,p,h,new NS,C)}i(o5,"Ct");function sI(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=FS(M,p),M}return""}for(let M=0;M<S.length;M++){let U=S[M],z=cI(U);if(z===void 0)continue;let B=i5(U[":@"],p);C.push(z,B);let Z=a5(C,P);if(z===p.textNodeName){let fe=U[z];Z||(fe=p.tagValueProcessor(z,fe),fe=FS(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=uI(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}${uI(U[":@"],p,Z)}`,le;le=Z?aI(U[z],p):sI(U[z],p,te,C,P),p.unpairedTags.indexOf(z)!==-1?p.suppressUnpairedNode?x+=oe+">":x+=oe+"/>":le&&le.length!==0||!p.suppressEmptyNode?le&&le.endsWith(">")?x+=oe+`>${le}${h}</${z}>`:(x+=oe+">",le&&h!==""&&(le.includes("/>")||le.includes("</"))?x+=h+p.indentBy+le+h:x+=le,x+=`</${z}>`):x+=oe+"/>",L=!0,C.pop()}return x}i(sI,"Pt");function i5(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(i5,"Ot");function aI(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=cI(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=s5(P[":@"],p),M=aI(P[x],p);M&&M.length!==0?h+=`<${x}${L}>${M}</${x}>`:h+=`<${x}${L}/>`}}}return h}i(aI,"$t");function s5(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(s5,"It");function cI(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(cI,"Dt");function uI(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=FS(x,p)),x===!0&&p.suppressBooleanAttributes?C+=` ${P.substr(p.attributeNamePrefix.length)}`:C+=` ${P.substr(p.attributeNamePrefix.length)}="${x}"`}return C}i(uI,"Mt");function a5(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(a5,"jt");function FS(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(FS,"Vt");let c5={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:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function rn(S){if(this.options=Object.assign({},c5,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 ka(C)):C instanceof ka&&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=d5),this.processTextOrObjNode=u5,this.options.format?(this.indentate=l5,this.tagEndChar=`>
46
+ `,this.newLine=`
47
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}i(rn,"kt");function u5(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(u5,"Ft");function l5(S){return this.options.indentBy.repeat(S)}i(l5,"Rt");function d5(S){return!(!S.startsWith(this.options.attributeNamePrefix)||S===this.options.textNodeName)&&S.substr(this.attrPrefixLen)}i(d5,"Gt"),rn.prototype.build=function(S){if(this.options.preserveOrder)return o5(S,this.options);{Array.isArray(S)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(S={[this.options.arrayNodeName]:S});let p=new NS;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 le=""+te;z+=le===""?this.indentate(p)+"<"+M+this.closeTag(M)+this.tagEndChar:this.indentate(p)+"<"+M+">"+le+"</"+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 p5=rn,m5={validate:d};_z.exports=t})()});var vz=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 $oe=new Set("!?\\/[]$%{}^&*()<>|+");function Sz(e){if(e[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if($oe.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}i(Sz,"validateEntityName");function _C(...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(_C,"mergeEntityMaps");var Qs="external",Gf="base",EC="all";function koe(e){return!e||e===Qs?new Set([Qs]):e===EC?new Set([EC]):e===Gf?new Set([Gf]):Array.isArray(e)?new Set(e):new Set([Qs])}i(koe,"parseLimitTiers");var Cr=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Doe=new Set([9,10,13]);function Moe(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(Moe,"parseNCRConfig");var Ooe=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=koe(this._limit.applyLimitsTo??Qs),this._numericAllowed=t.numericAllowed??!0,this._baseMap=_C(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=Moe(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))Sz(r);this._externalMap=_C(t)}addExternalEntity(t,r){Sz(t),typeof r=="string"&&r.indexOf("&")===-1&&(this._externalMap[t]=r)}addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=_C(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=Qs);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=Gf}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(EC)?!0:this._limitTiers.has(t)}_resolveName(t){if(t in this._inputMap)return{value:this._inputMap[t],tier:Qs};if(t in this._externalMap)return{value:this._externalMap[t],tier:Qs};if(t in this._baseMap)return{value:this._baseMap[t],tier:Gf}}_classifyNCR(t){return t===0?this._ncrNullLevel:t>=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!Doe.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=Ooe});var Az=N(SC=>{"use strict";Object.defineProperty(SC,"__esModule",{value:!0});SC.parseXML=zoe;var Noe=Ez(),Ff=vz(),jf=new Ff.EntityDecoderImpl({namedEntities:{...Ff.XML,...Ff.COMMON_HTML,...Ff.CURRENCY},numericAllowed:!0,limit:{maxTotalExpansions:1/0},ncr:{xmlVersion:1.1}}),Loe=new Noe.XMLParser({attributeNamePrefix:"",processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,entityDecoder:{setExternalEntities:i(e=>{jf.setExternalEntities(e)},"setExternalEntities"),addInputEntities:i(e=>{jf.addInputEntities(e)},"addInputEntities"),reset:i(()=>{jf.reset()},"reset"),decode:i(e=>jf.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 zoe(e){return Loe.parse(e,!0)}i(zoe,"parseXML")});var Hf=N(Vf=>{"use strict";var Uoe=Az(),Boe=/[&<>"]/g,Goe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Foe(e){return e.replace(Boe,t=>Goe[t])}i(Foe,"escapeAttribute");var joe=/[&"'<>\r\n\u0085\u2028]/g,qoe={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;","\r":"&#x0D;","\n":"&#x0A;","\x85":"&#x85;","\u2028":"&#x2028;"};function Voe(e){return e.replace(joe,t=>qoe[t])}i(Voe,"escapeElement");var qf=class{static{i(this,"XmlText")}value;constructor(t){this.value=t}toString(){return Voe(""+this.value)}},vC=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 qf(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}="${Foe(""+a)}"`)}return r+=t?`>${this.children.map(o=>o.toString()).join("")}</${this.name}>`:"/>"}};Vf.parseXML=Uoe.parseXML;Vf.XmlNode=vC;Vf.XmlText=qf});var Rz,Pz,Cz,ts,Wf=D(()=>{Rz=I(Hf());Rr();ke();Pz=I(ue()),Cz=I(ft());Yi();pC();ts=class extends nr{static{i(this,"XmlShapeDeserializer")}settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new Fs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,r,n){let o=re.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??Cz.toUtf8)(r),l=this.parseXml(u);return this.readSchema(t,n?l[n]:l)}readSchema(t,r){let n=re.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,Rz.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,Pz.getValueFromTextNode)(a)}return{}}}});var Tz,xz,vc,AC=D(()=>{Rr();ke();Qt();Tz=I(ue()),xz=I(gt());Yi();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=re.of(t);if(n&&!n.endsWith(".")&&(n+="."),o.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??xz.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,Tz.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 rs,RC=D(()=>{Rr();ke();hc();Wf();AC();rs=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 ts(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=re.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=re.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 Jf,bz=D(()=>{RC();Jf=class extends rs{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 Iz=D(()=>{});var wz,$z,PC,kz,Kf,CC=D(()=>{wz=I(Hf()),$z=I(ue());mC();PC=i((e,t)=>Of(e,t).then(r=>{if(r.length){let n;try{n=(0,wz.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,$z.getValueFromTextNode)(c)}return{}}),"parseXmlBody"),kz=i(async(e,t)=>{let r=await PC(e,t);return r.Error&&(r.Error.message=r.Error.message??r.Error.Message),r},"parseXmlErrorBody"),Kf=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,TC,Zf,Ac,xC=D(()=>{yr=I(Hf());Rr();ke();Qt();TC=I(ue()),Zf=I(gt());Yi();Ac=class extends nr{static{i(this,"XmlShapeSerializer")}settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,r){let n=re.of(t);if(n.isStringSchema()&&typeof r=="string")this.stringBuffer=r;else if(n.isBlobSchema())this.byteBuffer="byteLength"in r?r:(this.serdeContext?.base64Decoder??Zf.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 de=yr.XmlNode.of(d,G),[me,xt]=this.getXmlnsAttribute(u,R);xt&&de.addAttribute(me,xt),$.addChildNode(de);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 de=yr.XmlNode.of("entry");b(de,G,Y),(a?n:$).addChildNode(de)}}}}writeSimple(t,r){if(r===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");let n=re.of(t),o=null;if(r&&typeof r=="object")if(n.isBlobSchema())o=(this.serdeContext?.base64Encoder??Zf.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,TC.dateToUtcString)(r);break;case 7:o=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",r),o=(0,TC.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=re.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,bC=D(()=>{Yi();Wf();xC();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 ts(this.settings);return t.setSerdeContext(this.serdeContext),t}}});var Xf,Dz=D(()=>{Rr();ke();hc();CC();bC();Xf=class extends Gs{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 qs(this.codec.createSerializer(),r),this.deserializer=new js(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=re.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=Kf(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=re.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:()=>Jf,AwsJson1_0Protocol:()=>Uf,AwsJson1_1Protocol:()=>Bf,AwsJsonRpcProtocol:()=>es,AwsQueryProtocol:()=>rs,AwsRestJsonProtocol:()=>po,AwsRestXmlProtocol:()=>Xf,AwsSmithyRpcV2CborProtocol:()=>Mf,JsonCodec:()=>Qi,JsonShapeDeserializer:()=>Ec,JsonShapeSerializer:()=>Sc,QueryShapeSerializer:()=>vc,XmlCodec:()=>Rc,XmlShapeDeserializer:()=>ts,XmlShapeSerializer:()=>Ac,_toBool:()=>ez,_toNum:()=>tz,_toStr:()=>QL,awsExpectUnion:()=>hz,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>Kf,parseJsonBody:()=>cl,parseJsonErrorBody:()=>cz,parseXmlBody:()=>PC,parseXmlErrorBody:()=>kz});var mo=D(()=>{YL();rz();pz();mz();zf();fz();Lf();gC();yC();yz();ul();bz();RC();Iz();AC();Dz();bC();Wf();xC();CC()});var zz,dl,ea,Yf,Mz,Uz,Qf,IC,Oz,wC,Pc,Nz,Lz,Hoe,Tr,Woe,Bz,Gz=D(()=>{zz=I(er()),dl="ref",ea=-1,Yf=!0,Mz="isSet",Uz="PartitionResult",Qf="booleanEquals",IC="getAttr",Oz={[dl]:"Endpoint"},wC={[dl]:Uz},Pc={},Nz=[{[dl]:"Region"}],Lz={conditions:[[Mz,[Oz]],[Mz,Nz],["aws.partition",Nz,Uz],[Qf,[{[dl]:"UseFIPS"},Yf]],[Qf,[{[dl]:"UseDualStack"},Yf]],[Qf,[{fn:IC,argv:[wC,"supportsDualStack"]},Yf]],[Qf,[{fn:IC,argv:[wC,"supportsFIPS"]},Yf]],["stringEquals",[{fn:IC,argv:[wC,"name"]},"aws-us-gov"]]],results:[[ea],[ea,"Invalid Configuration: FIPS and custom endpoint are not supported"],[ea,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Oz,Pc],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Pc],[ea,"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],[ea,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",Pc],[ea,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",Pc],[ea,"Invalid Configuration: Missing Region"]]},Hoe=2,Tr=1e8,Woe=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]),Bz=zz.BinaryDecisionDiagram.from(Woe,Hoe,Lz.conditions,Lz.results)});var Fz,Cc,Joe,jz,qz=D(()=>{Fz=I($i()),Cc=I(er());Gz();Joe=new Cc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),jz=i((e,t={})=>Joe.get(e,()=>(0,Cc.decideEndpoint)(Bz,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Cc.customEndpointFunctions.aws=Fz.awsEndpointFunctions});var Vz,zt,eg=D(()=>{Vz=I(ue()),zt=class e extends Vz.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,$C=D(()=>{eg();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 Koe,Zoe,Xoe,Yoe,Qoe,eie,tie,rie,nie,oie,iie,sie,aie,cie,uie,lie,die,pie,mie,fie,fo,gie,hie,yie,_ie,Eie,dt,Sie,zn,vie,Aie,Un,Rie,Hz,Wz,Pie,Jz,Cie,Tie,xie,At,Kz,Zz,ln,Xz,Yz,Qz,eU,tU,rU,nU,oU,iU,sU,aU,kC,bie,Iie,wie,$ie,cU,uU,lU,DC,tg=D(()=>{ke();$C();eg();Koe="AccessDeniedException",Zoe="AuthorizationPendingException",Xoe="AccessToken",Yoe="ClientSecret",Qoe="CreateToken",eie="CreateTokenRequest",tie="CreateTokenResponse",rie="CodeVerifier",nie="ExpiredTokenException",oie="InvalidClientException",iie="InvalidGrantException",sie="InvalidRequestException",aie="InternalServerException",cie="InvalidScopeException",uie="IdToken",lie="RefreshToken",die="SlowDownException",pie="UnauthorizedClientException",mie="UnsupportedGrantTypeException",fie="accessToken",fo="client",gie="clientId",hie="clientSecret",yie="codeVerifier",_ie="code",Eie="deviceCode",dt="error",Sie="expiresIn",zn="error_description",vie="grantType",Aie="http",Un="httpError",Rie="idToken",Hz="reason",Wz="refreshToken",Pie="redirectUri",Jz="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",Cie="scope",Tie="server",xie="tokenType",At="com.amazonaws.ssooidc",Kz=nt.for(Jz),Zz=[-3,Jz,"SSOOIDCServiceException",0,[],[]];Kz.registerError(Zz,zt);ln=nt.for(At),Xz=[-3,At,Koe,{[dt]:fo,[Un]:400},[dt,Hz,zn],[0,0,0]];ln.registerError(Xz,pl);Yz=[-3,At,Zoe,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(Yz,ml);Qz=[-3,At,nie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(Qz,fl);eU=[-3,At,aie,{[dt]:Tie,[Un]:500},[dt,zn],[0,0]];ln.registerError(eU,gl);tU=[-3,At,oie,{[dt]:fo,[Un]:401},[dt,zn],[0,0]];ln.registerError(tU,hl);rU=[-3,At,iie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(rU,yl);nU=[-3,At,sie,{[dt]:fo,[Un]:400},[dt,Hz,zn],[0,0,0]];ln.registerError(nU,_l);oU=[-3,At,cie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(oU,El);iU=[-3,At,die,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(iU,Sl);sU=[-3,At,pie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(sU,vl);aU=[-3,At,mie,{[dt]:fo,[Un]:400},[dt,zn],[0,0]];ln.registerError(aU,Al);kC=[Kz,ln],bie=[0,At,Xoe,8,0],Iie=[0,At,Yoe,8,0],wie=[0,At,rie,8,0],$ie=[0,At,uie,8,0],cU=[0,At,lie,8,0],uU=[3,At,eie,0,[gie,hie,vie,Eie,_ie,Wz,Cie,Pie,yie],[0,[()=>Iie,0],0,0,0,[()=>cU,0],64,0,[()=>wie,0]],3],lU=[3,At,tie,0,[fie,xie,Sie,Wz,Rie],[[()=>bie,0],0,1,[()=>cU,0],[()=>$ie,0]]],DC=[9,At,Qoe,{[Aie]:["POST","/token",200]},()=>uU,()=>lU]});var dU,pU,rg,ng,mU,fU=D(()=>{Dt();mo();Xe();dU=I(ue()),pU=I(Gr()),rg=I(gt()),ng=I(ft());qP();qz();tg();mU=i(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??rg.fromBase64,base64Encoder:e?.base64Encoder??rg.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??jz,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??_L,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 dU.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:kC,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??pU.parseUrl,utf8Decoder:e?.utf8Decoder??ng.fromUtf8,utf8Encoder:e?.utf8Encoder??ng.toUtf8}),"getRuntimeConfig")});var og,os,gU,ig,ns,sg,ag,hU,yU,_U,EU,SU=D(()=>{rl();yt();Dt();og=I(qi()),os=I(Nt()),gU=I(Vi()),ig=I(hr()),ns=I(cn()),sg=I(to()),ag=I(ue()),hU=I(Hi()),yU=I(Wi()),_U=I(Mn());fU();EU=i(e=>{(0,ag.emitWarningIfUnsupportedVersion)(process.version);let t=(0,yU.resolveDefaultsModeConfig)(e),r=i(()=>t().then(ag.loadConfigsForDefaultMode),"defaultConfigProvider"),n=mU(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,ns.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??hU.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,og.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:ji.version}),maxAttempts:e?.maxAttempts??(0,ns.loadConfig)(ig.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,ns.loadConfig)(os.NODE_REGION_CONFIG_OPTIONS,{...os.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:sg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,ns.loadConfig)({...ig.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||_U.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??gU.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??sg.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ns.loadConfig)(os.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,ns.loadConfig)(os.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,ns.loadConfig)(og.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var AU=N(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.warning=void 0;Tc.stsRegionDefaultResolver=Die;var vU=Nt(),kie=cn();function Die(e={}){return(0,kie.loadConfig)({...vU.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"}},{...vU.NODE_REGION_CONFIG_FILE_OPTIONS,...e})}i(Die,"stsRegionDefaultResolver");Tc.warning={silence:!1}});var go=N(dn=>{"use strict";var cg=AU(),Rl=Nt(),Mie=i(e=>({setRegion(t){e.region=t},region(){return e.region}}),"getAwsRegionExtensionConfiguration"),Oie=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=Mie;dn.resolveAwsRegionExtensionConfiguration=Oie;Object.prototype.hasOwnProperty.call(cg,"__proto__")&&!Object.prototype.hasOwnProperty.call(dn,"__proto__")&&Object.defineProperty(dn,"__proto__",{enumerable:!0,value:cg.__proto__});Object.keys(cg).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(dn,e)&&(dn[e]=cg[e])})});var RU,PU,CU=D(()=>{RU=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"),PU=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var ug,lg,dg,TU,xU=D(()=>{ug=I(go()),lg=I(Me()),dg=I(ue());CU();TU=i((e,t)=>{let r=Object.assign((0,ug.getAwsRegionExtensionConfiguration)(e),(0,dg.getDefaultExtensionConfiguration)(e),(0,lg.getHttpHandlerExtensionConfiguration)(e),RU(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,ug.resolveAwsRegionExtensionConfiguration)(r),(0,dg.resolveDefaultRuntimeConfig)(r),(0,lg.resolveHttpHandlerRuntimeConfig)(r),PU(r))},"resolveRuntimeExtensions")});var pg,bU,IU,mg,wU,$U,kU,fg,MC,Pl,OC=D(()=>{pg=I(Ci()),bU=I(Ti()),IU=I(xi()),mg=I(ti()),wU=I(Nt());Xe();ke();$U=I(Ni()),kU=I(gr()),fg=I(hr()),MC=I(ue());qP();VP();SU();xU();Pl=class extends MC.Client{static{i(this,"SSOOIDCClient")}config;constructor(...[t]){let r=EU(t||{});super(r),this.initConfig=r;let n=SL(r),o=(0,mg.resolveUserAgentConfig)(n),a=(0,fg.resolveRetryConfig)(o),c=(0,wU.resolveRegionConfig)(a),u=(0,pg.resolveHostHeaderConfig)(c),l=(0,kU.resolveEndpointConfig)(u),d=EL(l),_=TU(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,mg.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,fg.getRetryPlugin)(this.config)),this.middlewareStack.use((0,$U.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,pg.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,bU.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,IU.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:yL,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var DU,NC,Cl,LC=D(()=>{DU=I(gr()),NC=I(ue());VP();tg();Cl=class extends NC.Command.classBuilder().ep(vL).m(function(t,r,n,o){return[(0,DU.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(DC).build(){static{i(this,"CreateTokenCommand")}}});var MU,Nie,gg,OU=D(()=>{MU=I(ue());LC();OC();Nie={CreateTokenCommand:Cl},gg=class extends Pl{static{i(this,"SSOOIDC")}};(0,MU.createAggregatedClient)(Nie,gg)});var NU=D(()=>{LC()});var Lie,zie,LU=D(()=>{Lie={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},zie={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"}});var zU=D(()=>{});var Tl={};bt(Tl,{$Command:()=>NC.Command,AccessDeniedException:()=>pl,AccessDeniedException$:()=>Xz,AccessDeniedExceptionReason:()=>Lie,AuthorizationPendingException:()=>ml,AuthorizationPendingException$:()=>Yz,CreateToken$:()=>DC,CreateTokenCommand:()=>Cl,CreateTokenRequest$:()=>uU,CreateTokenResponse$:()=>lU,ExpiredTokenException:()=>fl,ExpiredTokenException$:()=>Qz,InternalServerException:()=>gl,InternalServerException$:()=>eU,InvalidClientException:()=>hl,InvalidClientException$:()=>tU,InvalidGrantException:()=>yl,InvalidGrantException$:()=>rU,InvalidRequestException:()=>_l,InvalidRequestException$:()=>nU,InvalidRequestExceptionReason:()=>zie,InvalidScopeException:()=>El,InvalidScopeException$:()=>oU,SSOOIDC:()=>gg,SSOOIDCClient:()=>Pl,SSOOIDCServiceException:()=>zt,SSOOIDCServiceException$:()=>Zz,SlowDownException:()=>Sl,SlowDownException$:()=>iU,UnauthorizedClientException:()=>vl,UnauthorizedClientException$:()=>sU,UnsupportedGrantTypeException:()=>Al,UnsupportedGrantTypeException$:()=>aU,__Client:()=>MC.Client,errorTypeRegistries:()=>kC});var xl=D(()=>{OC();OU();NU();tg();LU();$C();zU();eg()});var UC=N(Il=>{"use strict";var Uie=(yt(),Q(Pr)),Bie=(Dt(),Q(pc)),Hr=jt(),bl=On(),Gie=require("node:fs"),Fie=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=Bie.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 Uie.setTokenFeature(n,"BEARER_SERVICE_ENV_VARS","3"),n},"fromEnvSigningName"),jie=5*60*1e3,zC="To refresh this SSO session run 'aws sso login' with the corresponding profile.",qie=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"),Vie=i(async(e,t,r={},n)=>{let{CreateTokenCommand:o}=await Promise.resolve().then(()=>(xl(),Tl));return(await qie(t,r,n)).send(new o({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken"),UU=i(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Hr.TokenProviderError(`Token is expired. ${zC}`,!1)},"validateTokenExpiry"),ta=i((e,t,r=!1)=>{if(typeof t>"u")throw new Hr.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${zC}`,!1)},"validateTokenKey"),{writeFile:Hie}=Gie.promises,Wie=i((e,t)=>{let r=bl.getSSOTokenFilepath(e),n=JSON.stringify(t,null,2);return Hie(r,n)},"writeSSOTokenToFile"),BU=new Date(0),GU=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. ${zC}`,!1)}ta("accessToken",d.accessToken),ta("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()-BU.getTime()<30*1e3)return UU(E),E;ta("clientId",d.clientId,!0),ta("clientSecret",d.clientSecret,!0),ta("refreshToken",d.refreshToken,!0);try{BU.setTime(Date.now());let g=await Vie(d,l,e,t);ta("accessToken",g.accessToken),ta("expiresIn",g.expiresIn);let v=new Date(Date.now()+g.expiresIn*1e3);try{await Wie(a,{...d,accessToken:g.accessToken,expiresAt:v.toISOString(),refreshToken:g.refreshToken})}catch{}return{token:g.accessToken,expiration:v}}catch{return UU(E),E}},"fromSso"),Jie=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"),Kie=i((e={})=>Hr.memoize(Hr.chain(GU(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=Fie;Il.fromSso=GU;Il.fromStatic=Jie;Il.nodeProvider=Kie});function Zie(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function Xie(e){return{schemeId:"smithy.api#noAuth"}}var wl,FU,jU,qU,BC=D(()=>{Dt();wl=I(It()),FU=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(Zie,"createAwsAuthSigv4HttpAuthOption");i(Xie,"createSmithyApiNoAuthHttpAuthOption");jU=i(e=>{let t=[];switch(e.operation){case"GetRoleCredentials":{t.push(Xie(e));break}default:t.push(Zie(e))}return t},"defaultSSOHttpAuthSchemeProvider"),qU=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,wl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var VU,HU,GC=D(()=>{VU=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),"resolveClientEndpointParameters"),HU={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var XU,$l,ra,hg,WU,YU,yg,FC,JU,jC,xc,KU,ZU,Yie,xr,Qie,QU,eB=D(()=>{XU=I(er()),$l="ref",ra=-1,hg=!0,WU="isSet",YU="PartitionResult",yg="booleanEquals",FC="getAttr",JU={[$l]:"Endpoint"},jC={[$l]:YU},xc={},KU=[{[$l]:"Region"}],ZU={conditions:[[WU,[JU]],[WU,KU],["aws.partition",KU,YU],[yg,[{[$l]:"UseFIPS"},hg]],[yg,[{[$l]:"UseDualStack"},hg]],[yg,[{fn:FC,argv:[jC,"supportsDualStack"]},hg]],[yg,[{fn:FC,argv:[jC,"supportsFIPS"]},hg]],["stringEquals",[{fn:FC,argv:[jC,"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"],[JU,xc],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",xc],[ra,"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],[ra,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",xc],[ra,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",xc],[ra,"Invalid Configuration: Missing Region"]]},Yie=2,xr=1e8,Qie=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]),QU=XU.BinaryDecisionDiagram.from(Qie,Yie,ZU.conditions,ZU.results)});var tB,bc,ese,rB,nB=D(()=>{tB=I($i()),bc=I(er());eB();ese=new bc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),rB=i((e,t={})=>ese.get(e,()=>(0,bc.decideEndpoint)(QU,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");bc.customEndpointFunctions.aws=tB.awsEndpointFunctions});var oB,Bn,_g=D(()=>{oB=I(ue()),Bn=class e extends oB.ServiceException{static{i(this,"SSOServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var kl,Dl,Ml,Ol,qC=D(()=>{_g();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 tse,rse,nse,ose,ise,sse,ase,cse,use,lse,dse,pse,mse,fse,gse,Eg,Sg,hse,yse,vg,_se,iB,Ag,Ese,Sse,vse,sB,Ase,Rse,Pse,pn,aB,cB,Nl,uB,lB,dB,pB,VC,Cse,Tse,xse,mB,fB,gB,HC,Rg=D(()=>{ke();qC();_g();tse="AccessTokenType",rse="GetRoleCredentials",nse="GetRoleCredentialsRequest",ose="GetRoleCredentialsResponse",ise="InvalidRequestException",sse="RoleCredentials",ase="ResourceNotFoundException",cse="SecretAccessKeyType",use="SessionTokenType",lse="TooManyRequestsException",dse="UnauthorizedException",pse="accountId",mse="accessKeyId",fse="accessToken",gse="account_id",Eg="client",Sg="error",hse="expiration",yse="http",vg="httpError",_se="httpHeader",iB="httpQuery",Ag="message",Ese="roleCredentials",Sse="roleName",vse="role_name",sB="smithy.ts.sdk.synthetic.com.amazonaws.sso",Ase="secretAccessKey",Rse="sessionToken",Pse="x-amz-sso_bearer_token",pn="com.amazonaws.sso",aB=nt.for(sB),cB=[-3,sB,"SSOServiceException",0,[],[]];aB.registerError(cB,Bn);Nl=nt.for(pn),uB=[-3,pn,ise,{[Sg]:Eg,[vg]:400},[Ag],[0]];Nl.registerError(uB,kl);lB=[-3,pn,ase,{[Sg]:Eg,[vg]:404},[Ag],[0]];Nl.registerError(lB,Dl);dB=[-3,pn,lse,{[Sg]:Eg,[vg]:429},[Ag],[0]];Nl.registerError(dB,Ml);pB=[-3,pn,dse,{[Sg]:Eg,[vg]:401},[Ag],[0]];Nl.registerError(pB,Ol);VC=[aB,Nl],Cse=[0,pn,tse,8,0],Tse=[0,pn,cse,8,0],xse=[0,pn,use,8,0],mB=[3,pn,nse,0,[Sse,pse,fse],[[0,{[iB]:vse}],[0,{[iB]:gse}],[()=>Cse,{[_se]:Pse}]],3],fB=[3,pn,ose,0,[Ese],[[()=>gB,0]]],gB=[3,pn,sse,0,[mse,Ase,Rse,hse],[0,[()=>Tse,0],[()=>xse,0],1]],HC=[9,pn,rse,{[yse]:["GET","/federation/credentials",200]},()=>mB,()=>fB]});var hB,yB,Pg,Cg,_B,EB=D(()=>{Dt();mo();Xe();hB=I(ue()),yB=I(Gr()),Pg=I(gt()),Cg=I(ft());BC();nB();Rg();_B=i(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Pg.fromBase64,base64Encoder:e?.base64Encoder??Pg.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??rB,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??jU,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 hB.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:VC,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??yB.parseUrl,utf8Decoder:e?.utf8Decoder??Cg.fromUtf8,utf8Encoder:e?.utf8Encoder??Cg.toUtf8}),"getRuntimeConfig")});var Tg,ss,SB,xg,is,bg,Ig,vB,AB,RB,PB,CB=D(()=>{rl();yt();Dt();Tg=I(qi()),ss=I(Nt()),SB=I(Vi()),xg=I(hr()),is=I(cn()),bg=I(to()),Ig=I(ue()),vB=I(Hi()),AB=I(Wi()),RB=I(Mn());EB();PB=i(e=>{(0,Ig.emitWarningIfUnsupportedVersion)(process.version);let t=(0,AB.resolveDefaultsModeConfig)(e),r=i(()=>t().then(Ig.loadConfigsForDefaultMode),"defaultConfigProvider"),n=_B(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??vB.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Tg.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:ji.version}),maxAttempts:e?.maxAttempts??(0,is.loadConfig)(xg.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:bg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,is.loadConfig)({...xg.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||RB.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??SB.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??bg.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)(Tg.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var TB,xB,bB=D(()=>{TB=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"),xB=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var wg,$g,kg,IB,wB=D(()=>{wg=I(go()),$g=I(Me()),kg=I(ue());bB();IB=i((e,t)=>{let r=Object.assign((0,wg.getAwsRegionExtensionConfiguration)(e),(0,kg.getDefaultExtensionConfiguration)(e),(0,$g.getHttpHandlerExtensionConfiguration)(e),TB(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,wg.resolveAwsRegionExtensionConfiguration)(r),(0,kg.resolveDefaultRuntimeConfig)(r),(0,$g.resolveHttpHandlerRuntimeConfig)(r),xB(r))},"resolveRuntimeExtensions")});var Dg,$B,kB,Mg,DB,MB,OB,Og,WC,Ll,JC=D(()=>{Dg=I(Ci()),$B=I(Ti()),kB=I(xi()),Mg=I(ti()),DB=I(Nt());Xe();ke();MB=I(Ni()),OB=I(gr()),Og=I(hr()),WC=I(ue());BC();GC();CB();wB();Ll=class extends WC.Client{static{i(this,"SSOClient")}config;constructor(...[t]){let r=PB(t||{});super(r),this.initConfig=r;let n=VU(r),o=(0,Mg.resolveUserAgentConfig)(n),a=(0,Og.resolveRetryConfig)(o),c=(0,DB.resolveRegionConfig)(a),u=(0,Dg.resolveHostHeaderConfig)(c),l=(0,OB.resolveEndpointConfig)(u),d=qU(l),_=IB(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,Mg.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Og.getRetryPlugin)(this.config)),this.middlewareStack.use((0,MB.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Dg.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,$B.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,kB.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:FU,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var NB,KC,zl,ZC=D(()=>{NB=I(gr()),KC=I(ue());GC();Rg();zl=class extends KC.Command.classBuilder().ep(HU).m(function(t,r,n,o){return[(0,NB.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(HC).build(){static{i(this,"GetRoleCredentialsCommand")}}});var LB,bse,Ng,zB=D(()=>{LB=I(ue());ZC();JC();bse={GetRoleCredentialsCommand:zl},Ng=class extends Ll{static{i(this,"SSO")}};(0,LB.createAggregatedClient)(bse,Ng)});var UB=D(()=>{ZC()});var BB=D(()=>{});var GB={};bt(GB,{$Command:()=>KC.Command,GetRoleCredentials$:()=>HC,GetRoleCredentialsCommand:()=>zl,GetRoleCredentialsRequest$:()=>mB,GetRoleCredentialsResponse$:()=>fB,InvalidRequestException:()=>kl,InvalidRequestException$:()=>uB,ResourceNotFoundException:()=>Dl,ResourceNotFoundException$:()=>lB,RoleCredentials$:()=>gB,SSO:()=>Ng,SSOClient:()=>Ll,SSOServiceException:()=>Bn,SSOServiceException$:()=>cB,TooManyRequestsException:()=>Ml,TooManyRequestsException$:()=>dB,UnauthorizedException:()=>Ol,UnauthorizedException$:()=>pB,__Client:()=>WC.Client,errorTypeRegistries:()=>VC});var FB=D(()=>{JC();zB();UB();Rg();qC();BB();_g()});var qB=N(XC=>{"use strict";var jB=(FB(),Q(GB));XC.GetRoleCredentialsCommand=jB.GetRoleCredentialsCommand;XC.SSOClient=jB.SSOClient});var YC=N(zg=>{"use strict";var Gn=jt(),Lg=On(),VB=(yt(),Q(Pr)),Ise=UC(),WB=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,HB=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 Ise.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 Lg.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 qB()}),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:de,secretAccessKey:me,sessionToken:xt,expiration:we,credentialScope:Kt,accountId:In}={}}=Y;if(!de||!me||!xt||!we)throw new Gn.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:Ul,logger:g});let ko={accessKeyId:de,secretAccessKey:me,sessionToken:xt,expiration:new Date(we),...Kt&&{credentialScope:Kt},...In&&{accountId:In}};return t?VB.setCredentialFeature(ko,"CREDENTIALS_SSO","s"):VB.setCredentialFeature(ko,"CREDENTIALS_SSO_LEGACY","u"),ko},"resolveSSOCredentials"),JB=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"),wse=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=Lg.getProfileName({profile:e.profile??t?.profile});if(!r&&!n&&!o&&!a&&!c){let _=(await Lg.parseKnownFiles(e))[l];if(!_)throw new Gn.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!WB(_))throw new Gn.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(_?.sso_session){let b=(await Lg.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}=JB(_,e.logger);return HB({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 HB({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");zg.fromSSO=wse;zg.isSsoProfile=WB;zg.validateSsoProfile=JB});function $se(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function kse(e){return{schemeId:"smithy.api#noAuth"}}var Bl,KB,ZB,XB,QC=D(()=>{Dt();Bl=I(It()),KB=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($se,"createAwsAuthSigv4HttpAuthOption");i(kse,"createSmithyApiNoAuthHttpAuthOption");ZB=i(e=>{let t=[];switch(e.operation){case"CreateOAuth2Token":{t.push(kse(e));break}default:t.push($se(e))}return t},"defaultSigninHttpAuthSchemeProvider"),XB=i(e=>{let t=Nn(e);return Object.assign(t,{authSchemePreference:(0,Bl.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var YB,QB,eT=D(()=>{YB=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),"resolveClientEndpointParameters"),QB={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var oG,Gl,na,Ug,eG,iG,Bg,nT,tT,tG,oT,rT,as,rG,nG,Dse,or,Mse,sG,aG=D(()=>{oG=I(er()),Gl="ref",na=-1,Ug=!0,eG="isSet",iG="PartitionResult",Bg="booleanEquals",nT="getAttr",tT="stringEquals",tG={[Gl]:"Endpoint"},oT={[Gl]:iG},rT={fn:nT,argv:[oT,"name"]},as={},rG=[{[Gl]:"Region"}],nG={conditions:[[eG,[tG]],[eG,rG],["aws.partition",rG,iG],[Bg,[{[Gl]:"UseFIPS"},Ug]],[Bg,[{[Gl]:"UseDualStack"},Ug]],[Bg,[{fn:nT,argv:[oT,"supportsDualStack"]},Ug]],[Bg,[{fn:nT,argv:[oT,"supportsFIPS"]},Ug]],[tT,[rT,"aws"]],[tT,[rT,"aws-cn"]],[tT,[rT,"aws-us-gov"]]],results:[[na],[na,"Invalid Configuration: FIPS and custom endpoint are not supported"],[na,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[tG,as],["https://{Region}.signin.aws.amazon.com",as],["https://{Region}.signin.amazonaws.cn",as],["https://{Region}.signin.amazonaws-us-gov.com",as],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",as],[na,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",as],[na,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",as],[na,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",as],[na,"Invalid Configuration: Missing Region"]]},Dse=2,or=1e8,Mse=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]),sG=oG.BinaryDecisionDiagram.from(Mse,Dse,nG.conditions,nG.results)});var cG,Ic,Ose,uG,lG=D(()=>{cG=I($i()),Ic=I(er());aG();Ose=new Ic.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),uG=i((e,t={})=>Ose.get(e,()=>(0,Ic.decideEndpoint)(sG,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Ic.customEndpointFunctions.aws=cG.awsEndpointFunctions});var dG,Fn,Gg=D(()=>{dG=I(ue()),Fn=class e extends dG.ServiceException{static{i(this,"SigninServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var Fl,jl,ql,Vl,iT=D(()=>{Gg();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 Nse,Lse,zse,Use,Bse,Gse,Fse,jse,qse,Vse,Hse,pG,mG,sT,fG,gG,Wse,cs,hG,yG,Jse,aT,_G,Wr,jg,Fg,EG,RG,SG,vG,Kse,Zse,Xse,AG,mn,PG,CG,Hl,TG,xG,bG,IG,cT,wG,$G,kG,DG,MG,OG,uT,qg=D(()=>{ke();iT();Gg();Nse="AccessDeniedException",Lse="AccessToken",zse="CreateOAuth2Token",Use="CreateOAuth2TokenRequest",Bse="CreateOAuth2TokenRequestBody",Gse="CreateOAuth2TokenResponseBody",Fse="CreateOAuth2TokenResponse",jse="InternalServerException",qse="RefreshToken",Vse="TooManyRequestsError",Hse="ValidationException",pG="accessKeyId",mG="accessToken",sT="client",fG="clientId",gG="codeVerifier",Wse="code",cs="error",hG="expiresIn",yG="grantType",Jse="http",aT="httpError",_G="idToken",Wr="jsonName",jg="message",Fg="refreshToken",EG="redirectUri",RG="smithy.ts.sdk.synthetic.com.amazonaws.signin",SG="secretAccessKey",vG="sessionToken",Kse="server",Zse="tokenInput",Xse="tokenOutput",AG="tokenType",mn="com.amazonaws.signin",PG=nt.for(RG),CG=[-3,RG,"SigninServiceException",0,[],[]];PG.registerError(CG,Fn);Hl=nt.for(mn),TG=[-3,mn,Nse,{[cs]:sT},[cs,jg],[0,0],2];Hl.registerError(TG,Fl);xG=[-3,mn,jse,{[cs]:Kse,[aT]:500},[cs,jg],[0,0],2];Hl.registerError(xG,jl);bG=[-3,mn,Vse,{[cs]:sT,[aT]:429},[cs,jg],[0,0],2];Hl.registerError(bG,ql);IG=[-3,mn,Hse,{[cs]:sT,[aT]:400},[cs,jg],[0,0],2];Hl.registerError(IG,Vl);cT=[PG,Hl],wG=[0,mn,qse,8,0],$G=[3,mn,Lse,8,[pG,SG,vG],[[0,{[Wr]:pG}],[0,{[Wr]:SG}],[0,{[Wr]:vG}]],3],kG=[3,mn,Use,0,[Zse],[[()=>DG,16]],1],DG=[3,mn,Bse,0,[fG,yG,Wse,EG,gG,Fg],[[0,{[Wr]:fG}],[0,{[Wr]:yG}],0,[0,{[Wr]:EG}],[0,{[Wr]:gG}],[()=>wG,{[Wr]:Fg}]],2],MG=[3,mn,Fse,0,[Xse],[[()=>OG,16]],1],OG=[3,mn,Gse,0,[mG,AG,hG,Fg,_G],[[()=>$G,{[Wr]:mG}],[0,{[Wr]:AG}],[1,{[Wr]:hG}],[()=>wG,{[Wr]:Fg}],[0,{[Wr]:_G}]],4],uT=[9,mn,zse,{[Jse]:["POST","/v1/token",200]},()=>kG,()=>MG]});var NG,LG,Vg,Hg,zG,UG=D(()=>{Dt();mo();Xe();NG=I(ue()),LG=I(Gr()),Vg=I(gt()),Hg=I(ft());QC();lG();qg();zG=i(e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Vg.fromBase64,base64Encoder:e?.base64Encoder??Vg.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??uG,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ZB,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 NG.NoOpLogger,protocol:e?.protocol??po,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:cT,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??LG.parseUrl,utf8Decoder:e?.utf8Decoder??Hg.fromUtf8,utf8Encoder:e?.utf8Encoder??Hg.toUtf8}),"getRuntimeConfig")});var Wg,ls,BG,Jg,us,Kg,Zg,GG,FG,jG,qG,VG=D(()=>{rl();yt();Dt();Wg=I(qi()),ls=I(Nt()),BG=I(Vi()),Jg=I(hr()),us=I(cn()),Kg=I(to()),Zg=I(ue()),GG=I(Hi()),FG=I(Wi()),jG=I(Mn());UG();qG=i(e=>{(0,Zg.emitWarningIfUnsupportedVersion)(process.version);let t=(0,FG.resolveDefaultsModeConfig)(e),r=i(()=>t().then(Zg.loadConfigsForDefaultMode),"defaultConfigProvider"),n=zG(e);io(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,us.loadConfig)(ao,o),bodyLengthChecker:e?.bodyLengthChecker??GG.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Wg.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:ji.version}),maxAttempts:e?.maxAttempts??(0,us.loadConfig)(Jg.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,us.loadConfig)(ls.NODE_REGION_CONFIG_OPTIONS,{...ls.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:Kg.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,us.loadConfig)({...Jg.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||jG.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??BG.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??Kg.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,us.loadConfig)(ls.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,us.loadConfig)(ls.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,us.loadConfig)(Wg.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var HG,WG,JG=D(()=>{HG=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"),WG=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var Xg,Yg,Qg,KG,ZG=D(()=>{Xg=I(go()),Yg=I(Me()),Qg=I(ue());JG();KG=i((e,t)=>{let r=Object.assign((0,Xg.getAwsRegionExtensionConfiguration)(e),(0,Qg.getDefaultExtensionConfiguration)(e),(0,Yg.getHttpHandlerExtensionConfiguration)(e),HG(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,Xg.resolveAwsRegionExtensionConfiguration)(r),(0,Qg.resolveDefaultRuntimeConfig)(r),(0,Yg.resolveHttpHandlerRuntimeConfig)(r),WG(r))},"resolveRuntimeExtensions")});var eh,XG,YG,th,QG,eF,tF,rh,lT,Wl,dT=D(()=>{eh=I(Ci()),XG=I(Ti()),YG=I(xi()),th=I(ti()),QG=I(Nt());Xe();ke();eF=I(Ni()),tF=I(gr()),rh=I(hr()),lT=I(ue());QC();eT();VG();ZG();Wl=class extends lT.Client{static{i(this,"SigninClient")}config;constructor(...[t]){let r=qG(t||{});super(r),this.initConfig=r;let n=YB(r),o=(0,th.resolveUserAgentConfig)(n),a=(0,rh.resolveRetryConfig)(o),c=(0,QG.resolveRegionConfig)(a),u=(0,eh.resolveHostHeaderConfig)(c),l=(0,tF.resolveEndpointConfig)(u),d=XB(l),_=KG(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,th.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,rh.getRetryPlugin)(this.config)),this.middlewareStack.use((0,eF.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,eh.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,XG.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,YG.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:KB,identityProviderConfigProvider:i(async y=>new kn({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Go(this.config))}destroy(){super.destroy()}}});var rF,pT,Jl,mT=D(()=>{rF=I(gr()),pT=I(ue());eT();qg();Jl=class extends pT.Command.classBuilder().ep(QB).m(function(t,r,n,o){return[(0,rF.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(uT).build(){static{i(this,"CreateOAuth2TokenCommand")}}});var nF,Yse,nh,oF=D(()=>{nF=I(ue());mT();dT();Yse={CreateOAuth2TokenCommand:Jl},nh=class extends Wl{static{i(this,"Signin")}};(0,nF.createAggregatedClient)(Yse,nh)});var iF=D(()=>{mT()});var Qse,sF=D(()=>{Qse={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 aF=D(()=>{});var cF={};bt(cF,{$Command:()=>pT.Command,AccessDeniedException:()=>Fl,AccessDeniedException$:()=>TG,AccessToken$:()=>$G,CreateOAuth2Token$:()=>uT,CreateOAuth2TokenCommand:()=>Jl,CreateOAuth2TokenRequest$:()=>kG,CreateOAuth2TokenRequestBody$:()=>DG,CreateOAuth2TokenResponse$:()=>MG,CreateOAuth2TokenResponseBody$:()=>OG,InternalServerException:()=>jl,InternalServerException$:()=>xG,OAuth2ErrorCode:()=>Qse,Signin:()=>nh,SigninClient:()=>Wl,SigninServiceException:()=>Fn,SigninServiceException$:()=>CG,TooManyRequestsError:()=>ql,TooManyRequestsError$:()=>bG,ValidationException:()=>Vl,ValidationException$:()=>IG,__Client:()=>lT.Client,errorTypeRegistries:()=>cT});var uF=D(()=>{dT();oF();iF();qg();sF();iT();aF();Gg()});var dF=N(lF=>{"use strict";var eae=(yt(),Q(Pr)),ds=jt(),hT=On(),tae=Me(),oh=require("node:crypto"),fT=require("node:fs"),rae=require("node:os"),gT=require("node:path"),yT=class e{static{i(this,"LoginCredentialsFetcher")}profileData;init;callerClientConfig;static REFRESH_THRESHOLD=5*60*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 ds.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(()=>(uF(),cF)),{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 ds.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 ds.CredentialsProviderError(g,{logger:this.logger,tryNextLink:!1})}throw new ds.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 hT.readFile(t,{ignoreCache:this.init?.ignoreCache})}catch{r=await fT.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 ds.CredentialsProviderError(`Token validation failed, missing fields: ${o.join(", ")}`,{logger:this.logger,tryNextLink:!1});return n}catch(r){throw new ds.CredentialsProviderError(`Failed to load token from ${t}: ${String(r)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(t){let r=this.getTokenFilePath(),n=gT.dirname(r);try{await fT.promises.mkdir(n,{recursive:!0})}catch{}await fT.promises.writeFile(r,JSON.stringify(t,null,2),"utf8")}getTokenFilePath(){let t=process.env.AWS_LOGIN_CACHE_DIRECTORY??gT.join(rae.homedir(),".aws","login","cache"),r=Buffer.from(this.loginSession,"utf8"),n=oh.createHash("sha256").update(r).digest("hex");return gT.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(tae.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=oh.createPrivateKey({key:n.dpopKey,format:"pem",type:"sec1"}),c=oh.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=oh.sign("sha256",Buffer.from(v),o),b=this.derToRawSignature(A).toString("base64url");return`${v}.${b}`}catch(o){throw new ds.CredentialsProviderError(`Failed to generate Dpop proof: ${o instanceof Error?o.message:String(o)}`,{logger:this.logger,tryNextLink:!1})}}},nae=i(e=>async({callerClientConfig:t}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let r=await hT.parseKnownFiles(e||{}),n=hT.getProfileName({profile:e?.profile??t?.profile}),o=r[n];if(!o?.login_session)throw new ds.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new yT(o,e,t).loadCredentials();return eae.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")},"fromLoginCredentials");lF.fromLoginCredentials=nae});var pF=N(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.toStream=iae;var oae=require("node:stream");function iae(e){return oae.Readable.from(Buffer.from(e))}i(iae,"toStream")});var mF=N(ih=>{"use strict";var sae=i(e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6,"validate"),aae=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"),cae=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");ih.build=cae;ih.parse=aae;ih.validate=sae});var DF=N(Fe=>{"use strict";var Kl=Me(),hF=ue(),uae=pF(),lae=mF(),dae=(mo(),Q(ll)),pae=(ke(),Q(Wo)),mae=yf(),sh=qm(),fae=(yt(),Q(Pr)),yF=(Xe(),Q(fr)),gae=It(),hae="content-length",yae="x-amz-decoded-content-length";function _F(){return(e,t)=>async r=>{let{request:n}=r;if(Kl.HttpRequest.isInstance(n)&&!(hae in n.headers)&&!(yae 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 hF.NoOpLogger)?t.logger.warn(o):console.warn(o)}return e({...r})}}i(_F,"checkContentLengthHeader");var EF={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},_ae=i(e=>({applyToStack:i(t=>{t.add(_F(),EF)},"applyToStack")}),"getCheckContentLengthHeaderPlugin"),SF=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"),vF={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function AF(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(AF,"regionRedirectMiddleware");var RF={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Eae=i(e=>({applyToStack:i(t=>{t.add(AF(e),RF),t.addRelativeTo(SF(e),vF)},"applyToStack")}),"getRegionRedirectMiddlewarePlugin"),PF=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{hF.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"),CF={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Sae=i(e=>({applyToStack:i(t=>{t.addRelativeTo(PF(),CF)},"applyToStack")}),"getS3ExpiresMiddlewarePlugin"),ah=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}},ch=class e{static{i(this,"S3ExpressIdentityProviderImpl")}createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(t,r=new ah){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}}},vae="Directory",Aae="S3Express",Rae="sigv4-s3express",ET="X-Amz-S3session-Token",ST=ET.toLowerCase(),Pae="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Cae="s3_disable_express_session_auth",Tae={environmentVariableSelector:i(e=>sh.booleanSelector(e,Pae,sh.SelectorType.ENV),"environmentVariableSelector"),configFileSelector:i(e=>sh.booleanSelector(e,Cae,sh.SelectorType.CONFIG),"configFileSelector"),default:!1},vT=class extends mae.SignatureV4{static{i(this,"SignatureV4S3Express")}async signWithCredentials(t,r,n){let o=fF(r);t.headers[ST]=r.sessionToken;let a=this;return gF(a,o),a.signRequest(t,n??{})}async presignWithCredentials(t,r,n){let o=fF(r);return delete t.headers[ST],t.headers[ET]=r.sessionToken,t.query=t.query??{},t.query[ET]=r.sessionToken,gF(this,o),this.presign(t,n)}};function fF(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}i(fF,"getCredentialsWithoutSessionToken");function gF(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(gF,"setSingleOverride");var TF=i(e=>(t,r)=>async n=>{if(r.endpointV2){let o=r.endpointV2,a=o.properties?.authSchemes?.[0]?.name===Rae;if((o.properties?.backend===Aae||o.properties?.bucketType===vae)&&(fae.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[ST]=l.sessionToken)}}}return t(n)},"s3ExpressMiddleware"),xF={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},xae=i(e=>({applyToStack:i(t=>{t.add(TF(e),xF)},"applyToStack")}),"getS3ExpressPlugin"),bae=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"),Iae=i(e=>t=>{throw t},"defaultErrorHandler"),wae=i((e,t)=>{},"defaultSuccessHandler"),$ae=yF.httpSigningMiddlewareOptions,bF=i(e=>(t,r)=>async n=>{if(!Kl.HttpRequest.isInstance(n.request))return t(n);let a=gae.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 bae(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||Iae)(c));return(l.successHandler||wae)(_.response,c),_},"s3ExpressHttpSigningMiddleware"),kae=i(e=>({applyToStack:i(t=>{t.addRelativeTo(bF(e),yF.httpSigningMiddlewareOptions)},"applyToStack")}),"getS3ExpressHttpSigningPlugin"),Dae=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 ch(async y=>r().send(new n({Bucket:y}))),bucketEndpoint:d??!1,expectContinueHeader:_??2097152})},"resolveS3Config"),Mae={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},IF=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 Oae(u,e);if(a.body=uae.toStream(l),l.length===0&&Mae[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"),Oae=i((e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),"collectBody"),wF={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Nae=i(e=>({applyToStack:i(t=>{t.addRelativeTo(IF(e),wF)},"applyToStack")}),"getThrow200ExceptionsPlugin");function Lae(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(Lae,"bucketEndpointMiddleware");var zae={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function $F({bucketEndpoint:e}){return t=>async r=>{let{input:{Bucket:n}}=r;if(!e&&typeof n=="string"&&!lae.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($F,"validateBucketNameMiddleware");var kF={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Uae=i(e=>({applyToStack:i(t=>{t.add($F(e),kF),t.addRelativeTo(Lae(e),zae)},"applyToStack")}),"getValidateBucketNamePlugin"),AT=class extends dae.AwsRestXmlProtocol{static{i(this,"S3RestXmlProtocol")}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),a=pae.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=Tae;Fe.S3ExpressIdentityCache=ah;Fe.S3ExpressIdentityCacheEntry=wc;Fe.S3ExpressIdentityProviderImpl=ch;Fe.S3RestXmlProtocol=AT;Fe.SignatureV4S3Express=vT;Fe.checkContentLengthHeader=_F;Fe.checkContentLengthHeaderMiddlewareOptions=EF;Fe.getCheckContentLengthHeaderPlugin=_ae;Fe.getRegionRedirectMiddlewarePlugin=Eae;Fe.getS3ExpiresMiddlewarePlugin=Sae;Fe.getS3ExpressHttpSigningPlugin=kae;Fe.getS3ExpressPlugin=xae;Fe.getThrow200ExceptionsPlugin=Nae;Fe.getValidateBucketNamePlugin=Uae;Fe.regionRedirectEndpointMiddleware=SF;Fe.regionRedirectEndpointMiddlewareOptions=vF;Fe.regionRedirectMiddleware=AF;Fe.regionRedirectMiddlewareOptions=RF;Fe.resolveS3Config=Dae;Fe.s3ExpiresMiddleware=PF;Fe.s3ExpiresMiddlewareOptions=CF;Fe.s3ExpressHttpSigningMiddleware=bF;Fe.s3ExpressHttpSigningMiddlewareOptions=$ae;Fe.s3ExpressMiddleware=TF;Fe.s3ExpressMiddlewareOptions=xF;Fe.throw200ExceptionsMiddleware=IF;Fe.throw200ExceptionsMiddlewareOptions=wF;Fe.validateBucketNameMiddleware=$F;Fe.validateBucketNameMiddlewareOptions=kF});var CT=N(PT=>{"use strict";var Bae=DF(),MF=yf(),Zl={CrtSignerV4:null},RT=class{static{i(this,"SignatureV4MultiRegion")}sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof Zl.CrtSignerV4=="function"?"crt":typeof MF.signatureV4aContainer.SignatureV4a=="function"?"js":"none"}constructor(t){this.sigv4Signer=new Bae.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=MF.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}};PT.SignatureV4MultiRegion=RT;PT.signatureV4CrtContainer=Zl});var jF,kc,oa,Xl,OF,qF,Yl,qt,TT,NF,LF,zF,UF,BF,Vt,xT,$c,GF,FF,Gae,je,Fae,VF,HF=D(()=>{jF=I(er()),kc="ref",oa=-1,Xl=!0,OF="isSet",qF="PartitionResult",Yl="booleanEquals",qt="stringEquals",TT="getAttr",NF="us-east-1",LF="sigv4",zF="sts",UF="https://sts.{Region}.{PartitionResult#dnsSuffix}",BF={[kc]:"Endpoint"},Vt={[kc]:"Region"},xT={[kc]:qF},$c={},GF=[Vt],FF={conditions:[[OF,[BF]],[OF,GF],["aws.partition",GF,qF],[Yl,[{[kc]:"UseFIPS"},Xl]],[Yl,[{[kc]:"UseDualStack"},Xl]],[qt,[Vt,"aws-global"]],[Yl,[{[kc]:"UseGlobalEndpoint"},Xl]],[qt,[Vt,"eu-central-1"]],[Yl,[{fn:TT,argv:[xT,"supportsDualStack"]},Xl]],[Yl,[{fn:TT,argv:[xT,"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,NF]],[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:TT,argv:[xT,"name"]},"aws-us-gov"]]],results:[[oa],["https://sts.amazonaws.com",{authSchemes:[{name:LF,signingName:zF,signingRegion:NF}]}],[UF,{authSchemes:[{name:LF,signingName:zF,signingRegion:"{Region}"}]}],[oa,"Invalid Configuration: FIPS and custom endpoint are not supported"],[oa,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[BF,$c],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",$c],[oa,"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],[oa,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",$c],[oa,"DualStack is enabled but this partition does not support DualStack"],[UF,$c],[oa,"Invalid Configuration: Missing Region"]]},Gae=2,je=1e8,Fae=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]),VF=jF.BinaryDecisionDiagram.from(Fae,Gae,FF.conditions,FF.results)});var WF,Dc,jae,uh,bT=D(()=>{WF=I($i()),Dc=I(er());HF();jae=new Dc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),uh=i((e,t={})=>jae.get(e,()=>(0,Dc.decideEndpoint)(VF,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");Dc.customEndpointFunctions.aws=WF.awsEndpointFunctions});function XF(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function IT(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}function YF(e){return{schemeId:"smithy.api#noAuth"}}var JF,KF,Mc,qae,Vae,ZF,Hae,Wae,QF,Jae,e4,wT=D(()=>{Dt();JF=I(CT()),KF=I(gr()),Mc=I(It());bT();Ql();qae=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,KF.resolveParams)(n,{getEndpointParameterInstructions:a},t);return Object.assign(o,c)},"createEndpointRuleSetHttpAuthSchemeParametersProvider"),Vae=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"),ZF=qae(Vae);i(XF,"createAwsAuthSigv4HttpAuthOption");i(IT,"createAwsAuthSigv4aHttpAuthOption");i(YF,"createSmithyApiNoAuthHttpAuthOption");Hae=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(JF.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"),Wae=i(e=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(YF(e)),t.push(IT(e));break}default:t.push(XF(e)),t.push(IT(e))}return t},"_defaultSTSHttpAuthSchemeProvider"),QF=Hae(uh,Wae,{"aws.auth#sigv4":XF,"aws.auth#sigv4a":IT,"smithy.api#noAuth":YF}),Jae=i(e=>Object.assign(e,{stsClientCtor:ho}),"resolveStsAuthConfig"),e4=i(e=>{let t=Jae(e),r=Nn(t),n=cf(r);return Object.assign(n,{authSchemePreference:(0,Mc.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var t4,lh,dh=D(()=>{t4=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),"resolveClientEndpointParameters"),lh={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 r4,br,ph=D(()=>{r4=I(ue()),br=class e extends r4.ServiceException{static{i(this,"STSServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var ed,td,rd,nd,od,id,sd,$T=D(()=>{ph();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 Kae,Zae,Xae,Yae,Qae,ece,kT,tce,rce,nce,oce,DT,ice,n4,sce,ace,cce,uce,lce,dce,pce,mce,o4,i4,fce,gce,hce,yce,_ce,Ece,s4,Sce,vce,a4,Ace,c4,Rce,Pce,MT,Cce,Tce,xce,bce,Ice,wce,$ce,kce,Dce,Mce,ia,sa,Oce,aa,ca,ua,Nce,u4,Lce,et,l4,d4,ps,p4,m4,f4,g4,h4,y4,_4,OT,zce,Uce,NT,E4,S4,v4,A4,LT,R4,P4,C4,T4,Bce,Gce,zT,UT,ad=D(()=>{ke();$T();ph();Kae="Arn",Zae="AccessKeyId",Xae="AssumeRole",Yae="AssumedRoleId",Qae="AssumeRoleRequest",ece="AssumeRoleResponse",kT="AssumedRoleUser",tce="AssumeRoleWithWebIdentity",rce="AssumeRoleWithWebIdentityRequest",nce="AssumeRoleWithWebIdentityResponse",oce="Audience",DT="Credentials",ice="ContextAssertion",n4="DurationSeconds",sce="Expiration",ace="ExternalId",cce="ExpiredTokenException",uce="IDPCommunicationErrorException",lce="IDPRejectedClaimException",dce="InvalidIdentityTokenException",pce="Key",mce="MalformedPolicyDocumentException",o4="Policy",i4="PolicyArns",fce="ProviderArn",gce="ProvidedContexts",hce="ProvidedContextsListType",yce="ProvidedContext",_ce="PolicyDescriptorType",Ece="ProviderId",s4="PackedPolicySize",Sce="PackedPolicyTooLargeException",vce="Provider",a4="RoleArn",Ace="RegionDisabledException",c4="RoleSessionName",Rce="SecretAccessKey",Pce="SubjectFromWebIdentityToken",MT="SourceIdentity",Cce="SerialNumber",Tce="SessionToken",xce="Tags",bce="TokenCode",Ice="TransitiveTagKeys",wce="Tag",$ce="Value",kce="WebIdentityToken",Dce="arn",Mce="accessKeySecretType",ia="awsQueryError",sa="client",Oce="clientTokenType",aa="error",ca="httpError",ua="message",Nce="policyDescriptorListType",u4="smithy.ts.sdk.synthetic.com.amazonaws.sts",Lce="tagListType",et="com.amazonaws.sts",l4=nt.for(u4),d4=[-3,u4,"STSServiceException",0,[],[]];l4.registerError(d4,br);ps=nt.for(et),p4=[-3,et,cce,{[ia]:["ExpiredTokenException",400],[aa]:sa,[ca]:400},[ua],[0]];ps.registerError(p4,ed);m4=[-3,et,uce,{[ia]:["IDPCommunicationError",400],[aa]:sa,[ca]:400},[ua],[0]];ps.registerError(m4,sd);f4=[-3,et,lce,{[ia]:["IDPRejectedClaim",403],[aa]:sa,[ca]:403},[ua],[0]];ps.registerError(f4,od);g4=[-3,et,dce,{[ia]:["InvalidIdentityToken",400],[aa]:sa,[ca]:400},[ua],[0]];ps.registerError(g4,id);h4=[-3,et,mce,{[ia]:["MalformedPolicyDocument",400],[aa]:sa,[ca]:400},[ua],[0]];ps.registerError(h4,td);y4=[-3,et,Sce,{[ia]:["PackedPolicyTooLarge",400],[aa]:sa,[ca]:400},[ua],[0]];ps.registerError(y4,rd);_4=[-3,et,Ace,{[ia]:["RegionDisabledException",403],[aa]:sa,[ca]:403},[ua],[0]];ps.registerError(_4,nd);OT=[l4,ps],zce=[0,et,Mce,8,0],Uce=[0,et,Oce,8,0],NT=[3,et,kT,0,[Yae,Kae],[0,0],2],E4=[3,et,Qae,0,[a4,c4,i4,o4,n4,xce,Ice,ace,Cce,bce,MT,gce],[0,0,()=>T4,0,1,()=>Gce,64,0,0,0,0,()=>Bce],2],S4=[3,et,ece,0,[DT,kT,s4,MT],[[()=>LT,0],()=>NT,1,0]],v4=[3,et,rce,0,[a4,c4,kce,Ece,i4,o4,n4],[0,0,[()=>Uce,0],0,()=>T4,0,1],3],A4=[3,et,nce,0,[DT,Pce,kT,s4,vce,oce,MT],[[()=>LT,0],0,()=>NT,1,0,0,0]],LT=[3,et,DT,0,[Zae,Rce,Tce,sce],[0,[()=>zce,0],0,4],4],R4=[3,et,_ce,0,[Dce],[0]],P4=[3,et,yce,0,[fce,ice],[0,0]],C4=[3,et,wce,0,[pce,$ce],[0,0],2],T4=[1,et,Nce,0,()=>R4],Bce=[1,et,hce,0,()=>P4],Gce=[1,et,Lce,0,()=>C4],zT=[9,et,Xae,0,()=>E4,()=>S4],UT=[9,et,tce,0,()=>v4,()=>A4]});var x4,b4,I4,mh,fh,w4,$4=D(()=>{Dt();mo();x4=I(CT());Xe();b4=I(ue()),I4=I(Gr()),mh=I(gt()),fh=I(ft());wT();bT();ad();w4=i(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??mh.fromBase64,base64Encoder:e?.base64Encoder??mh.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??uh,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??QF,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 b4.NoOpLogger,protocol:e?.protocol??rs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:OT,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",signerConstructor:e?.signerConstructor??x4.SignatureV4MultiRegion,urlParser:e?.urlParser??I4.parseUrl,utf8Decoder:e?.utf8Decoder??fh.fromUtf8,utf8Encoder:e?.utf8Encoder??fh.toUtf8}),"getRuntimeConfig")});var gh,ms,k4,hh,ui,yh,_h,D4,M4,O4,N4,L4=D(()=>{rl();yt();Dt();gh=I(qi()),ms=I(Nt());Xe();k4=I(Vi()),hh=I(hr()),ui=I(cn()),yh=I(to()),_h=I(ue()),D4=I(Hi()),M4=I(Wi()),O4=I(Mn());$4();N4=i(e=>{(0,_h.emitWarningIfUnsupportedVersion)(process.version);let t=(0,M4.resolveDefaultsModeConfig)(e),r=i(()=>t().then(_h.loadConfigsForDefaultMode),"defaultConfigProvider"),n=w4(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??D4.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,gh.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:ji.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)(hh.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,ui.loadConfig)(ms.NODE_REGION_CONFIG_OPTIONS,{...ms.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:yh.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,ui.loadConfig)({...hh.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||O4.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??k4.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??(0,ui.loadConfig)(uf,o),streamCollector:e?.streamCollector??yh.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ui.loadConfig)(ms.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,ui.loadConfig)(ms.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,ui.loadConfig)(gh.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig")});var z4,U4,B4=D(()=>{z4=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"),U4=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig")});var Eh,Sh,vh,G4,F4=D(()=>{Eh=I(go()),Sh=I(Me()),vh=I(ue());B4();G4=i((e,t)=>{let r=Object.assign((0,Eh.getAwsRegionExtensionConfiguration)(e),(0,vh.getDefaultExtensionConfiguration)(e),(0,Sh.getHttpHandlerExtensionConfiguration)(e),z4(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,Eh.resolveAwsRegionExtensionConfiguration)(r),(0,vh.resolveDefaultRuntimeConfig)(r),(0,Sh.resolveHttpHandlerRuntimeConfig)(r),U4(r))},"resolveRuntimeExtensions")});var Ah,j4,q4,Rh,V4,H4,W4,Ph,BT,ho,Ql=D(()=>{Ah=I(Ci()),j4=I(Ti()),q4=I(xi()),Rh=I(ti()),V4=I(Nt());Xe();ke();H4=I(Ni()),W4=I(gr()),Ph=I(hr()),BT=I(ue());wT();dh();L4();F4();ho=class extends BT.Client{static{i(this,"STSClient")}config;constructor(...[t]){let r=N4(t||{});super(r),this.initConfig=r;let n=t4(r),o=(0,Rh.resolveUserAgentConfig)(n),a=(0,Ph.resolveRetryConfig)(o),c=(0,V4.resolveRegionConfig)(a),u=(0,Ah.resolveHostHeaderConfig)(c),l=(0,W4.resolveEndpointConfig)(u),d=e4(l),_=G4(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(Ho(this.config)),this.middlewareStack.use((0,Rh.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Ph.getRetryPlugin)(this.config)),this.middlewareStack.use((0,H4.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Ah.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,j4.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,q4.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:ZF,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 J4,K4,la,Ch=D(()=>{J4=I(gr()),K4=I(ue());dh();ad();la=class extends K4.Command.classBuilder().ep(lh).m(function(t,r,n,o){return[(0,J4.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(zT).build(){static{i(this,"AssumeRoleCommand")}}});var Z4,X4,da,Th=D(()=>{Z4=I(gr()),X4=I(ue());dh();ad();da=class extends X4.Command.classBuilder().ep(lh).m(function(t,r,n,o){return[(0,Z4.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(UT).build(){static{i(this,"AssumeRoleWithWebIdentityCommand")}}});var Y4,Fce,xh,Q4=D(()=>{Y4=I(ue());Ch();Th();Ql();Fce={AssumeRoleCommand:la,AssumeRoleWithWebIdentityCommand:da},xh=class extends ho{static{i(this,"STS")}};(0,Y4.createAggregatedClient)(Fce,xh)});var e2=D(()=>{Ch();Th()});var t2=D(()=>{});var r2,n2,o2,i2,s2,a2,c2=D(()=>{yt();r2=I(go());Ch();Th();n2=i(e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},"getAccountIdFromAssumedRoleUser"),o2=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,r2.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"),i2=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 o2(E,e?.parentClientConfig?.region,v,{logger:_,profile:y}),b=!a2(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 la(a));if(!c||!c.AccessKeyId||!c.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`);let l=n2(u),d={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...l&&{accountId:l}};return ki(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}},"getDefaultRoleAssumer"),s2=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 o2(_,e?.parentClientConfig?.region,E,{logger:l,profile:d}),A=!a2(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 da(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let c=n2(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return c&&ki(u,"RESOLVED_ACCOUNT_ID","T"),ki(u,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),u}},"getDefaultRoleAssumerWithWebIdentity"),a2=i(e=>e?.metadata?.handlerProtocol==="h2","isH2")});var u2,l2,d2,jce,p2=D(()=>{c2();Ql();u2=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"),l2=i((e={},t)=>i2(e,u2(ho,t)),"getDefaultRoleAssumer"),d2=i((e={},t)=>s2(e,u2(ho,t)),"getDefaultRoleAssumerWithWebIdentity"),jce=i(e=>t=>e({roleAssumer:l2(t),roleAssumerWithWebIdentity:d2(t),...t}),"decorateDefaultCredentialProvider")});var GT={};bt(GT,{AssumeRole$:()=>zT,AssumeRoleCommand:()=>la,AssumeRoleRequest$:()=>E4,AssumeRoleResponse$:()=>S4,AssumeRoleWithWebIdentity$:()=>UT,AssumeRoleWithWebIdentityCommand:()=>da,AssumeRoleWithWebIdentityRequest$:()=>v4,AssumeRoleWithWebIdentityResponse$:()=>A4,AssumedRoleUser$:()=>NT,Credentials$:()=>LT,ExpiredTokenException:()=>ed,ExpiredTokenException$:()=>p4,IDPCommunicationErrorException:()=>sd,IDPCommunicationErrorException$:()=>m4,IDPRejectedClaimException:()=>od,IDPRejectedClaimException$:()=>f4,InvalidIdentityTokenException:()=>id,InvalidIdentityTokenException$:()=>g4,MalformedPolicyDocumentException:()=>td,MalformedPolicyDocumentException$:()=>h4,PackedPolicyTooLargeException:()=>rd,PackedPolicyTooLargeException$:()=>y4,PolicyDescriptorType$:()=>R4,ProvidedContext$:()=>P4,RegionDisabledException:()=>nd,RegionDisabledException$:()=>_4,STS:()=>xh,STSClient:()=>ho,STSServiceException:()=>br,STSServiceException$:()=>d4,Tag$:()=>C4,__Client:()=>BT.Client,decorateDefaultCredentialProvider:()=>jce,errorTypeRegistries:()=>OT,getDefaultRoleAssumer:()=>l2,getDefaultRoleAssumerWithWebIdentity:()=>d2});var FT=D(()=>{Ql();Q4();e2();ad();$T();t2();p2();ph()});var VT=N(m2=>{"use strict";var qT=On(),jT=jt(),qce=require("node:child_process"),Vce=require("node:util"),Hce=(yt(),Q(Pr)),Wce=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 Hce.setCredentialFeature(o,"CREDENTIALS_PROCESS","w"),o},"getValidatedProcessCredentials"),Jce=i(async(e,t,r)=>{let n=t[e];if(t[e]){let o=n.credential_process;if(o!==void 0){let a=Vce.promisify(qT.externalDataInterceptor?.getTokenRecord?.().exec??qce.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 Wce(e,u,t)}catch(c){throw new jT.CredentialsProviderError(c.message,{logger:r})}}else throw new jT.CredentialsProviderError(`Profile ${e} did not contain credential_process.`,{logger:r})}else throw new jT.CredentialsProviderError(`Profile ${e} could not be found in shared credentials file.`,{logger:r})},"resolveProcessCredentials"),Kce=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let r=await qT.parseKnownFiles(e);return Jce(qT.getProfileName({profile:e.profile??t?.profile}),r,e.logger)},"fromProcess");m2.fromProcess=Kce});var HT=N(yo=>{"use strict";var Zce=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]}),Xce=yo&&yo.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yce=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"&&Zce(r,t,n[o]);return Xce(r,t),r}}();Object.defineProperty(yo,"__esModule",{value:!0});yo.fromWebToken=void 0;var Qce=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(()=>Yce((FT(),Q(GT))));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=Qce});var g2=N(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.fromTokenFile=void 0;var eue=(yt(),Q(Pr)),tue=jt(),rue=On(),nue=require("node:fs"),oue=HT(),f2="AWS_WEB_IDENTITY_TOKEN_FILE",iue="AWS_ROLE_ARN",sue="AWS_ROLE_SESSION_NAME",aue=i((e={})=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let r=e?.webIdentityTokenFile??process.env[f2],n=e?.roleArn??process.env[iue],o=e?.roleSessionName??process.env[sue];if(!r||!n)throw new tue.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let a=await(0,oue.fromWebToken)({...e,webIdentityToken:rue.externalDataInterceptor?.getTokenRecord?.()[r]??(0,nue.readFileSync)(r,{encoding:"ascii"}),roleArn:n,roleSessionName:o})(t);return r===process.env[f2]&&(0,eue.setCredentialFeature)(a,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),a},"fromTokenFile");bh.fromTokenFile=aue});var WT=N(li=>{"use strict";var Ih=g2(),wh=HT();Object.prototype.hasOwnProperty.call(Ih,"__proto__")&&!Object.prototype.hasOwnProperty.call(li,"__proto__")&&Object.defineProperty(li,"__proto__",{enumerable:!0,value:Ih.__proto__});Object.keys(Ih).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(li,e)&&(li[e]=Ih[e])});Object.prototype.hasOwnProperty.call(wh,"__proto__")&&!Object.prototype.hasOwnProperty.call(li,"__proto__")&&Object.defineProperty(li,"__proto__",{enumerable:!0,value:wh.__proto__});Object.keys(wh).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(li,e)&&(li[e]=wh[e])})});var v2=N(S2=>{"use strict";var KT=On(),cd=jt(),di=(yt(),Q(Pr)),cue=dF(),uue=i((e,t,r)=>{let n={EcsContainer:i(async o=>{let{fromHttp:a}=await Promise.resolve().then(()=>I(jP())),{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(JT)},"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(JT)},"Ec2InstanceMetadata"),Environment:i(async o=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await Promise.resolve().then(()=>I(OP()));return async()=>a(o)().then(JT)},"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"),JT=i(e=>di.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),"setNamedProvider"),lue=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&&(due(e,{profile:t,logger:r})||pue(e,{profile:t,logger:r})),"isAssumeRoleProfile"),due=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"),pue=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"),mue=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(()=>(FT(),GT));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 ${KT.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},h2(t[u]??{})):(await uue(c.credential_source,e,r.logger)(r))();if(h2(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"),h2=i(e=>!e.role_arn&&!!e.credential_source,"isCredentialSourceWithoutRoleArn"),fue=i(e=>!!(e&&e.login_session),"isLoginProfile"),gue=i(async(e,t,r)=>{let n=await cue.fromLoginCredentials({...t,profile:e})({callerClientConfig:r});return di.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")},"resolveLoginCredentials"),hue=i(e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string","isProcessProfile"),yue=i(async(e,t)=>Promise.resolve().then(()=>I(VT())).then(({fromProcess:r})=>r({...e,profile:t})().then(n=>di.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v"))),"resolveProcessCredentials"),_ue=i(async(e,t,r={},n)=>{let{fromSSO:o}=await Promise.resolve().then(()=>I(YC()));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"),Eue=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"),y2=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"),_2=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"),Sue=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"),vue=i(async(e,t,r)=>Promise.resolve().then(()=>I(WT())).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"),E2=i(async(e,t,r,n,o={},a=!1)=>{let c=t[e];if(Object.keys(o).length>0&&y2(c))return _2(c,r);if(a||lue(c,{profile:e,logger:r.logger}))return mue(e,t,r,n,o,E2);if(y2(c))return _2(c,r);if(Sue(c))return vue(c,r,n);if(hue(c))return yue(r,e);if(Eue(c))return await _ue(e,c,r,n);if(fue(c))return gue(e,r,n);throw new cd.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})},"resolveProfileData"),Aue=i((e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await KT.parseKnownFiles(e);return E2(KT.getProfileName({profile:e.profile??t?.profile}),r,e,t)},"fromIni");S2.fromIni=Aue});var kh=N($h=>{"use strict";var ZT=OP(),ud=jt(),Rue=On(),A2="AWS_EC2_METADATA_DISABLED",Pue=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(jP()));return ud.chain(a(e),n(e))}return process.env[A2]&&process.env[A2]!=="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 Cue(e,t){let r=Tue(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(Cue,"memoizeChain");var Tue=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"),R2=!1,xue=i((e={})=>Cue([async()=>{if(e.profile??process.env[Rue.ENV_PROFILE])throw process.env[ZT.ENV_KEY]&&process.env[ZT.ENV_SECRET]&&(R2||((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
+ `),R2=!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"),ZT.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(YC()));return u(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>I(v2()));return r(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>I(VT()));return r(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>I(WT()));return r(e)(t)},async()=>(e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Pue(e))()),async()=>{throw new ud.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],P2),"defaultProvider"),bue=i(e=>e?.expiration!==void 0,"credentialsWillNeedRefresh"),P2=i(e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired");$h.credentialsTreatedAsExpired=P2;$h.credentialsWillNeedRefresh=bue;$h.defaultProvider=xue});var T2=N(C2=>{"use strict";var Iue=Gm(),Dh=require("node:stream"),XT=class extends Dh.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:wue(c.signature)}},body:t});return this.push(u),n()}catch(o){n(o)}}};function wue(e){let t=Buffer.from(e,"hex");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)}i(wue,"getSignatureBinary");var YT=class{static{i(this,"EventStreamPayloadHandler")}messageSigner;eventStreamCodec;systemClockOffsetProvider;credentials;constructor(t){this.messageSigner=t.messageSigner,this.eventStreamCodec=new Iue.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 Dh.Readable))throw new Error("Eventstream payload must be a Readable stream.");let u=a;o.body=new Dh.PassThrough({objectMode:!0});let d=o.headers?.authorization?.match(/Signature=([\w]+)$/)?.[1]??c?.["X-Amz-Signature"]??"";n.__staticSignature&&(d="");let _=new XT({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"),Dh.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}},$ue=i(e=>new YT(e),"eventStreamPayloadHandlerProvider");C2.eventStreamPayloadHandlerProvider=$ue});var x2=N(QT=>{"use strict";var kue=MR(),Due=require("stream");async function*Mue(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(Mue,"readabletoIterable");var Mh=class{static{i(this,"EventStreamMarshaller")}universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new kue.EventStreamMarshaller({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){let n=typeof t[Symbol.asyncIterator]=="function"?t:Mue(t);return this.universalMarshaller.deserialize(n,r)}serialize(t,r){return Due.Readable.from(this.universalMarshaller.serialize(t,r))}},Oue=i(e=>new Mh(e),"eventStreamSerdeProvider");QT.EventStreamMarshaller=Mh;QT.eventStreamSerdeProvider=Oue});var O2=N(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});Lh.bdd=void 0;var Nue=er(),dd="ref",pa=-1,Oh=!0,b2="isSet",M2="PartitionResult",Nh="booleanEquals",I2="getAttr",w2={[dd]:"Endpoint"},$2={[dd]:M2},ld={},k2=[{[dd]:"Region"}],D2={conditions:[[b2,[w2]],[b2,k2],["aws.partition",k2,M2],[Nh,[{[dd]:"UseFIPS"},Oh]],[Nh,[{[dd]:"UseDualStack"},Oh]],[Nh,[{fn:I2,argv:[$2,"supportsDualStack"]},Oh]],[Nh,[{fn:I2,argv:[$2,"supportsFIPS"]},Oh]]],results:[[pa],[pa,"Invalid Configuration: FIPS and custom endpoint are not supported"],[pa,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[w2,ld],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",ld],[pa,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",ld],[pa,"FIPS is enabled but this partition does not support FIPS"],["https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",ld],[pa,"DualStack is enabled but this partition does not support DualStack"],["https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",ld],[pa,"Invalid Configuration: Missing Region"]]},Lue=2,Jr=1e8,zue=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]);Lh.bdd=Nue.BinaryDecisionDiagram.from(zue,Lue,D2.conditions,D2.results)});var N2=N(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.defaultEndpointResolver=void 0;var Uue=$i(),ex=er(),Bue=O2(),Gue=new ex.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Fue=i((e,t={})=>Gue.get(e,()=>(0,ex.decideEndpoint)(Bue.bdd,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");zh.defaultEndpointResolver=Fue;ex.customEndpointFunctions.aws=Uue.awsEndpointFunctions});var Uh=N(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.BedrockRuntimeServiceException=Oc.__ServiceException=void 0;var L2=ue();Object.defineProperty(Oc,"__ServiceException",{enumerable:!0,get:i(function(){return L2.ServiceException},"get")});var tx=class e extends L2.ServiceException{static{i(this,"BedrockRuntimeServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Oc.BedrockRuntimeServiceException=tx});var fx=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=Uh(),rx=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=rx;var nx=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=nx;var ox=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=ox;var ix=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=ix;var sx=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=sx;var ax=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=ax;var cx=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=cx;var ux=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=ux;var lx=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=lx;var dx=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=dx;var px=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=px;var mx=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=mx});var jx=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",que="AudioBlock",Vue="AccessDeniedException",Hue="ApplyGuardrail",Wue="AppliedGuardrailDetails",Jue="ApplyGuardrailRequest",Kue="ApplyGuardrailResponse",Zue="AsyncInvokeMessage",Xue="AsyncInvokeOutputDataConfig",Yue="AsyncInvokeSummary",Que="AsyncInvokeS3OutputDataConfig",ele="AsyncInvokeSummaries",tle="AudioSource",rle="AnyToolChoice",nle="AutoToolChoice",ole="Body",ile="BidirectionalInputPayloadPart",sle="BidirectionalOutputPayloadPart",ale="Citation",cle="ContentBlocks",ule="ContentBlockDelta",lle="ContentBlockDeltaEvent",dle="ContentBlockStart",ple="ContentBlockStartEvent",mle="ContentBlockStopEvent",fle="ContentBlock",gle="CitationsConfig",hle="CitationsContentBlock",yle="CacheDetail",_le="CacheDetailsList",Ele="CitationsDelta",Sle="ConflictException",vle="CitationGeneratedContent",Ale="CitationGeneratedContentList",Rle="CitationLocation",Ple="ConverseMetrics",Cle="ConverseOutput",Tle="CachePointBlock",xle="ConverseRequest",ble="ConverseResponse",Ile="ConverseStream",wle="CitationSourceContent",$le="CitationSourceContentDelta",kle="CitationSourceContentList",Dle="CitationSourceContentListDelta",Mle="ConverseStreamMetrics",Ole="ConverseStreamMetadataEvent",Nle="ConverseStreamOutput",Lle="ConverseStreamRequest",zle="ConverseStreamResponse",Ule="ConverseStreamTrace",Ble="ConverseTrace",Gle="CountTokensInput",Fle="ConverseTokensRequest",jle="CountTokensRequest",qle="CountTokensResponse",hx="Content-Type",Vle="CountTokens",Hle="Citations",Wle="Converse",Jle="DocumentBlock",Kle="DocumentContentBlocks",Zle="DocumentContentBlock",Xle="DocumentCharLocation",Yle="DocumentChunkLocation",Qle="DocumentPageLocation",ede="DocumentSource",tde="ErrorBlock",rde="GuardrailAssessment",nde="GetAsyncInvoke",ode="GetAsyncInvokeRequest",ide="GetAsyncInvokeResponse",sde="GuardrailAssessmentList",ade="GuardrailAssessmentListMap",cde="GuardrailAssessmentMap",ude="GuardrailAutomatedReasoningDifferenceScenarioList",lde="GuardrailAutomatedReasoningFinding",dde="GuardrailAutomatedReasoningFindingList",pde="GuardrailAutomatedReasoningImpossibleFinding",mde="GuardrailAutomatedReasoningInvalidFinding",fde="GuardrailAutomatedReasoningInputTextReference",gde="GuardrailAutomatedReasoningInputTextReferenceList",hde="GuardrailAutomatedReasoningLogicWarning",yde="GuardrailAutomatedReasoningNoTranslationsFinding",_de="GuardrailAutomatedReasoningPolicyAssessment",Ede="GuardrailAutomatedReasoningRule",Sde="GuardrailAutomatedReasoningRuleList",vde="GuardrailAutomatedReasoningScenario",Ade="GuardrailAutomatedReasoningSatisfiableFinding",Rde="GuardrailAutomatedReasoningStatementList",Pde="GuardrailAutomatedReasoningStatementLogicContent",Cde="GuardrailAutomatedReasoningStatementNaturalLanguageContent",Tde="GuardrailAutomatedReasoningStatement",xde="GuardrailAutomatedReasoningTranslation",bde="GuardrailAutomatedReasoningTranslationAmbiguousFinding",Ide="GuardrailAutomatedReasoningTooComplexFinding",wde="GuardrailAutomatedReasoningTranslationList",$de="GuardrailAutomatedReasoningTranslationOption",kde="GuardrailAutomatedReasoningTranslationOptionList",Dde="GuardrailAutomatedReasoningValidFinding",Mde="GuardrailConfiguration",Ode="GuardrailContentBlock",Nde="GuardrailContentBlockList",Lde="GuardrailConverseContentBlock",zde="GuardrailContentFilter",Ude="GuardrailContentFilterList",Bde="GuardrailContextualGroundingFilter",Gde="GuardrailContextualGroundingFilters",Fde="GuardrailContextualGroundingPolicyAssessment",jde="GuardrailConverseImageBlock",qde="GuardrailConverseImageSource",Vde="GuardrailContentPolicyAssessment",Hde="GuardrailConverseTextBlock",Wde="GuardrailCustomWord",Jde="GuardrailCustomWordList",Kde="GuardrailCoverage",Zde="GuardrailImageBlock",Xde="GuardrailImageCoverage",Yde="GuardrailInvocationMetrics",Qde="GuardrailImageSource",epe="GuardrailManagedWord",tpe="GuardrailManagedWordList",rpe="GuardrailOutputContent",npe="GuardrailOutputContentList",ope="GuardrailPiiEntityFilter",ipe="GuardrailPiiEntityFilterList",spe="GuardrailRegexFilter",ape="GuardrailRegexFilterList",cpe="GuardrailStreamConfiguration",upe="GuardrailSensitiveInformationPolicyAssessment",lpe="GuardrailTopic",dpe="GuardrailTraceAssessment",ppe="GuardrailTextBlock",mpe="GuardrailTextCharactersCoverage",fpe="GuardrailTopicList",gpe="GuardrailTopicPolicyAssessment",hpe="GuardrailUsage",ype="GuardrailWordPolicyAssessment",_pe="ImageBlock",Epe="ImageBlockDelta",Spe="ImageBlockStart",vpe="InferenceConfiguration",Ape="InvokeModel",Rpe="InvokeModelRequest",Ppe="InvokeModelResponse",Cpe="InvokeModelTokensRequest",Tpe="InvokeModelWithBidirectionalStream",xpe="InvokeModelWithBidirectionalStreamInput",bpe="InvokeModelWithBidirectionalStreamOutput",Ipe="InvokeModelWithBidirectionalStreamRequest",wpe="InvokeModelWithBidirectionalStreamResponse",$pe="InvokeModelWithResponseStream",kpe="InvokeModelWithResponseStreamRequest",Dpe="InvokeModelWithResponseStreamResponse",Mpe="ImageSource",Ope="InternalServerException",Npe="JsonSchemaDefinition",Lpe="ListAsyncInvokes",zpe="ListAsyncInvokesRequest",Upe="ListAsyncInvokesResponse",Bpe="Message",Gpe="ModelErrorException",Fpe="ModelInputPayload",jpe="ModelNotReadyException",qpe="MessageStartEvent",Vpe="ModelStreamErrorException",Hpe="MessageStopEvent",Wpe="ModelTimeoutException",Jpe="Messages",Kpe="OutputConfig",Zpe="OutputFormat",Xpe="OutputFormatStructure",Ype="PartBody",Qpe="PerformanceConfiguration",eme="PayloadPart",tme="PromptRouterTrace",rme="PromptVariableMap",nme="PromptVariableValues",ome="ReasoningContentBlock",ime="ReasoningContentBlockDelta",sme="RequestMetadata",ame="ResourceNotFoundException",cme="ResponseStream",ume="ReasoningTextBlock",lme="StartAsyncInvoke",dme="StartAsyncInvokeRequest",pme="StartAsyncInvokeResponse",mme="SystemContentBlocks",fme="SystemContentBlock",gme="S3Location",hme="ServiceQuotaExceededException",yme="SearchResultBlock",_me="SearchResultContentBlock",Eme="SearchResultContentBlocks",Sme="SearchResultLocation",vme="ServiceTier",Ame="SpecificToolChoice",Rme="SystemTool",Pme="ServiceUnavailableException",Cme="Tag",Tme="ToolConfiguration",xme="ToolChoice",bme="ThrottlingException",Ime="ToolInputSchema",wme="TagList",$me="ToolResultBlock",kme="ToolResultBlocksDelta",Dme="ToolResultBlockDelta",Mme="ToolResultBlockStart",Ome="ToolResultContentBlocks",Nme="ToolResultContentBlock",Lme="ToolSpecification",zme="TokenUsage",Ume="ToolUseBlock",Bme="ToolUseBlockDelta",Gme="ToolUseBlockStart",Fme="Tools",jme="Tool",qme="VideoBlock",Vme="ValidationException",Hme="VideoSource",Wme="WebLocation",Jme="X-Amzn-Bedrock-Accept",Kme="X-Amzn-Bedrock-Content-Type",V2="X-Amzn-Bedrock-GuardrailIdentifier",H2="X-Amzn-Bedrock-GuardrailVersion",Bh="X-Amzn-Bedrock-PerformanceConfig-Latency",Gh="X-Amzn-Bedrock-Service-Tier",W2="X-Amzn-Bedrock-Trace",fs="action",Zme="appliedGuardrailDetails",Xme="asyncInvokeSummaries",yx="additionalModelRequestFields",J2="additionalModelResponseFieldPaths",K2="additionalModelResponseFields",Z2="actionReason",Yme="automatedReasoningPolicy",Qme="automatedReasoningPolicyUnits",efe="automatedReasoningPolicies",X2="accept",tfe="any",rfe="assessments",nfe="audio",ofe="auto",pi="bytes",Y2="bucketOwner",fa="body",_o="client",ife="contentBlockDelta",_x="contentBlockIndex",sfe="contentBlockStart",afe="contentBlockStop",cfe="citationsContent",ufe="cacheDetails",lfe="claimsFalseScenario",dfe="contextualGroundingPolicy",pfe="contextualGroundingPolicyUnits",mfe="contentPolicy",ffe="contentPolicyImageUnits",gfe="contentPolicyUnits",Ex="cachePoint",Q2="contradictingRules",hfe="cacheReadInputTokens",Sx="clientRequestToken",Fh="contentType",ej="claimsTrueScenario",yfe="customWords",_fe="cacheWriteInputTokens",vx="chunk",Ax="citations",Efe="citation",tj="claims",Nc="content",Sfe="context",rj="confidence",vfe="converse",Afe="delta",Rfe="documentChar",Pfe="documentChunk",Rx="documentIndex",Cfe="documentPage",Tfe="differenceScenarios",ga="detected",nj="description",xfe="domain",oj="document",_r="error",ij="endTime",bfe="enabled",jh="end",ha="format",sj="failureMessage",Ife="filterStrength",wfe="findings",aj="filters",cj="guardrail",$fe="guardrailArn",uj="guardrailCoverage",lj="guardrailConfig",dj="guardContent",kfe="guardrailId",md="guardrailIdentifier",Dfe="guardrailOrigin",Mfe="guardrailOwnership",Ofe="guardrailProcessingLatency",Lc="guardrailVersion",pj="guarded",Eo="http",gn="httpError",Rt="httpHeader",ma="httpQuery",Px="input",qh="invocationArn",Nfe="inputAssessment",mj="inferenceConfig",Lfe="invocationMetrics",zfe="invokedModelId",Ufe="invokeModel",Bfe="inputSchema",Cx="internalServerException",Tx="inputTokens",Gfe="identifier",Ffe="images",zc="image",jfe="impossible",qfe="invalid",xx="json",Vfe="jsonSchema",Hfe="key",Wfe="kmsKeyId",fj="location",gj="latencyMs",hj="lastModifiedTime",Vh="logicWarning",Jfe="latency",Kfe="logic",Ir="message",yj="modelArn",ya="modelId",Zfe="modelInput",Xfe="modelOutput",z2="maxResults",Yfe="messageStart",bx="modelStreamErrorException",Qfe="messageStop",ege="maxTokens",_j="modelTimeoutException",tge="managedWordLists",Hh="match",Ix="messages",Ej="metrics",rge="metadata",mi="name",nge="naturalLanguage",gx="nextToken",oge="noTranslations",ige="outputs",sge="outputAssessments",Sj="outputConfig",wx="outputDataConfig",age="originalMessage",cge="outputScope",vj="originalStatusCode",uge="outputTokens",lge="options",dge="output",Aj="premises",Wh="performanceConfig",Jh="performanceConfigLatency",pge="piiEntities",Rj="promptRouter",Pj="promptVariables",mge="policyVersionArn",Cj="qualifiers",fge="regex",Tj="reasoningContent",xj="redactedContent",bj="requestMetadata",gge="resourceName",hge="reasoningText",yge="regexes",Ij="role",wj="smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime",U2="sortBy",$j="sourceContent",B2="statusEquals",_ge="sensitiveInformationPolicy",Ege="sensitiveInformationPolicyFreeUnits",Sge="sensitiveInformationPolicyUnits",Kh="s3Location",G2="sortOrder",vge="s3OutputDataConfig",Age="streamProcessingMode",kj="stopReason",Rge="searchResultIndex",Pge="searchResultLocation",Dj="searchResult",Cge="supportingRules",Tge="stopSequences",Mj="submitTime",F2="submitTimeAfter",j2="submitTimeBefore",gs="serviceTier",xge="systemTool",bge="s3Uri",$x="serviceUnavailableException",Ige="satisfiable",wge="score",$ge="schema",Oj="server",Nj="signature",jn="source",Zh="status",fd="start",kge="statements",Dge="stream",Xh="streaming",Mge="strict",Oge="structure",kx="system",Lj="ttl",Nge="translationAmbiguous",Dx="toolConfig",Lge="textCharacters",zge="toolChoice",Uge="tooComplex",Mx="throttlingException",Bge="textFormat",Gge="topicPolicy",Fge="topicPolicyUnits",jge="topP",Ox="toolResult",qge="toolSpec",Vge="totalTokens",Nx="toolUse",Yh="toolUseId",Hge="tags",Pt="text",Wge="temperature",Jge="threshold",Lx="title",zj="total",Kge="tools",Zge="tool",Xge="topics",Uc="trace",Qh="translation",Yge="translations",Kr="type",ey="usage",Qge="untranslatedClaims",ehe="untranslatedPremises",the="uri",rhe="url",nhe="value",zx="validationException",ohe="valid",Uj="video",ihe="web",she="wordPolicy",ahe="wordPolicyUnits",w="com.amazonaws.bedrockruntime",Bj=(ke(),Q(Wo)),che=Uh(),hn=fx(),Gj=Bj.TypeRegistry.for(wj);f.BedrockRuntimeServiceException$=[-3,wj,"BedrockRuntimeServiceException",0,[],[]];Gj.registerError(f.BedrockRuntimeServiceException$,che.BedrockRuntimeServiceException);var Zr=Bj.TypeRegistry.for(w);f.AccessDeniedException$=[-3,w,Vue,{[_r]:_o,[gn]:403},[Ir],[0]];Zr.registerError(f.AccessDeniedException$,hn.AccessDeniedException);f.ConflictException$=[-3,w,Sle,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ConflictException$,hn.ConflictException);f.InternalServerException$=[-3,w,Ope,{[_r]:Oj,[gn]:500},[Ir],[0]];Zr.registerError(f.InternalServerException$,hn.InternalServerException);f.ModelErrorException$=[-3,w,Gpe,{[_r]:_o,[gn]:424},[Ir,vj,gge],[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,Vpe,{[_r]:_o,[gn]:424},[Ir,vj,age],[0,1,0]];Zr.registerError(f.ModelStreamErrorException$,hn.ModelStreamErrorException);f.ModelTimeoutException$=[-3,w,Wpe,{[_r]:_o,[gn]:408},[Ir],[0]];Zr.registerError(f.ModelTimeoutException$,hn.ModelTimeoutException);f.ResourceNotFoundException$=[-3,w,ame,{[_r]:_o,[gn]:404},[Ir],[0]];Zr.registerError(f.ResourceNotFoundException$,hn.ResourceNotFoundException);f.ServiceQuotaExceededException$=[-3,w,hme,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ServiceQuotaExceededException$,hn.ServiceQuotaExceededException);f.ServiceUnavailableException$=[-3,w,Pme,{[_r]:Oj,[gn]:503},[Ir],[0]];Zr.registerError(f.ServiceUnavailableException$,hn.ServiceUnavailableException);f.ThrottlingException$=[-3,w,bme,{[_r]:_o,[gn]:429},[Ir],[0]];Zr.registerError(f.ThrottlingException$,hn.ThrottlingException);f.ValidationException$=[-3,w,Vme,{[_r]:_o,[gn]:400},[Ir],[0]];Zr.registerError(f.ValidationException$,hn.ValidationException);f.errorTypeRegistries=[Gj,Zr];var Fj=[0,w,Zue,8,0],ty=[0,w,ole,8,21],uhe=[0,w,Pde,8,0],jj=[0,w,Cde,8,0],lhe=[0,w,Fpe,8,15],Ux=[0,w,Ype,8,21];f.AnyToolChoice$=[3,w,rle,0,[],[]];f.AppliedGuardrailDetails$=[3,w,Wue,0,[kfe,Lc,$fe,Dfe,Mfe],[0,0,0,64,0]];f.ApplyGuardrailRequest$=[3,w,Jue,0,[md,Lc,jn,Nc,cge],[[0,1],[0,1],0,[()=>Rhe,0],0],4];f.ApplyGuardrailResponse$=[3,w,Kue,0,[ey,fs,ige,rfe,Z2,uj],[()=>f.GuardrailUsage$,0,()=>bhe,[()=>qj,0],0,()=>f.GuardrailCoverage$],4];f.AsyncInvokeS3OutputDataConfig$=[3,w,Que,0,[bge,Wfe,Y2],[0,0,0],1];f.AsyncInvokeSummary$=[3,w,Yue,0,[qh,yj,Mj,wx,Sx,Zh,sj,hj,ij],[0,0,5,()=>f.AsyncInvokeOutputDataConfig$,0,0,[()=>Fj,0],5,5],4];f.AudioBlock$=[3,w,que,0,[ha,jn,_r],[0,[()=>f.AudioSource$,0],[()=>f.ErrorBlock$,0]],2];f.AutoToolChoice$=[3,w,nle,0,[],[]];f.BidirectionalInputPayloadPart$=[3,w,ile,8,[pi],[[()=>Ux,0]]];f.BidirectionalOutputPayloadPart$=[3,w,sle,8,[pi],[[()=>Ux,0]]];f.CacheDetail$=[3,w,yle,0,[Lj,Tx],[0,1],2];f.CachePointBlock$=[3,w,Tle,0,[Kr,Lj],[0,0],1];f.Citation$=[3,w,ale,0,[Lx,jn,$j,fj],[0,0,()=>ghe,()=>f.CitationLocation$]];f.CitationsConfig$=[3,w,gle,0,[bfe],[2],1];f.CitationsContentBlock$=[3,w,hle,0,[Nc,Ax],[()=>mhe,()=>fhe]];f.CitationsDelta$=[3,w,Ele,0,[Lx,jn,$j,fj],[0,0,()=>hhe,()=>f.CitationLocation$]];f.CitationSourceContentDelta$=[3,w,$le,0,[Pt],[0]];f.ContentBlockDeltaEvent$=[3,w,lle,0,[Afe,_x],[[()=>f.ContentBlockDelta$,0],1],2];f.ContentBlockStartEvent$=[3,w,ple,0,[fd,_x],[()=>f.ContentBlockStart$,1],2];f.ContentBlockStopEvent$=[3,w,mle,0,[_x],[1],1];f.ConverseMetrics$=[3,w,Ple,0,[gj],[1],1];f.ConverseRequest$=[3,w,xle,0,[ya,Ix,kx,mj,Dx,lj,yx,Pj,J2,bj,Wh,gs,Sj],[[0,1],[()=>Gx,0],[()=>Fx,0],()=>f.InferenceConfiguration$,()=>f.ToolConfiguration$,()=>f.GuardrailConfiguration$,15,[()=>Vj,0],64,[()=>Hj,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$,[()=>f.OutputConfig$,0]],1];f.ConverseResponse$=[3,w,ble,0,[dge,kj,ey,Ej,K2,Uc,Wh,gs],[[()=>f.ConverseOutput$,0],0,()=>f.TokenUsage$,()=>f.ConverseMetrics$,15,[()=>f.ConverseTrace$,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$],4];f.ConverseStreamMetadataEvent$=[3,w,Ole,0,[ey,Ej,Uc,Wh,gs],[()=>f.TokenUsage$,()=>f.ConverseStreamMetrics$,[()=>f.ConverseStreamTrace$,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$],2];f.ConverseStreamMetrics$=[3,w,Mle,0,[gj],[1],1];f.ConverseStreamRequest$=[3,w,Lle,0,[ya,Ix,kx,mj,Dx,lj,yx,Pj,J2,bj,Wh,gs,Sj],[[0,1],[()=>Gx,0],[()=>Fx,0],()=>f.InferenceConfiguration$,()=>f.ToolConfiguration$,()=>f.GuardrailStreamConfiguration$,15,[()=>Vj,0],64,[()=>Hj,0],()=>f.PerformanceConfiguration$,()=>f.ServiceTier$,[()=>f.OutputConfig$,0]],1];f.ConverseStreamResponse$=[3,w,zle,0,[Dge],[[()=>f.ConverseStreamOutput$,16]]];f.ConverseStreamTrace$=[3,w,Ule,0,[cj,Rj],[[()=>f.GuardrailTraceAssessment$,0],()=>f.PromptRouterTrace$]];f.ConverseTokensRequest$=[3,w,Fle,0,[Ix,kx,Dx,yx],[[()=>Gx,0],[()=>Fx,0],()=>f.ToolConfiguration$,15]];f.ConverseTrace$=[3,w,Ble,0,[cj,Rj],[[()=>f.GuardrailTraceAssessment$,0],()=>f.PromptRouterTrace$]];f.CountTokensRequest$=[3,w,jle,0,[ya,Px],[[0,1],[()=>f.CountTokensInput$,0]],2];f.CountTokensResponse$=[3,w,qle,0,[Tx],[1],1];f.DocumentBlock$=[3,w,Jle,0,[mi,jn,ha,Sfe,Ax],[0,()=>f.DocumentSource$,0,0,()=>f.CitationsConfig$],2];f.DocumentCharLocation$=[3,w,Xle,0,[Rx,fd,jh],[1,1,1]];f.DocumentChunkLocation$=[3,w,Yle,0,[Rx,fd,jh],[1,1,1]];f.DocumentPageLocation$=[3,w,Qle,0,[Rx,fd,jh],[1,1,1]];f.ErrorBlock$=[3,w,tde,8,[Ir],[0]];f.GetAsyncInvokeRequest$=[3,w,ode,0,[qh],[[0,1]],1];f.GetAsyncInvokeResponse$=[3,w,ide,0,[qh,yj,Zh,Mj,wx,Sx,sj,hj,ij],[0,0,0,5,()=>f.AsyncInvokeOutputDataConfig$,0,[()=>Fj,0],5,5],5];f.GuardrailAssessment$=[3,w,rde,0,[Gge,mfe,she,_ge,dfe,Yme,Lfe,Zme],[()=>f.GuardrailTopicPolicyAssessment$,()=>f.GuardrailContentPolicyAssessment$,()=>f.GuardrailWordPolicyAssessment$,()=>f.GuardrailSensitiveInformationPolicyAssessment$,()=>f.GuardrailContextualGroundingPolicyAssessment$,[()=>f.GuardrailAutomatedReasoningPolicyAssessment$,0],()=>f.GuardrailInvocationMetrics$,()=>f.AppliedGuardrailDetails$]];f.GuardrailAutomatedReasoningImpossibleFinding$=[3,w,pde,0,[Qh,Q2,Vh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],()=>Bx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningInputTextReference$=[3,w,fde,0,[Pt],[[()=>jj,0]]];f.GuardrailAutomatedReasoningInvalidFinding$=[3,w,mde,0,[Qh,Q2,Vh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],()=>Bx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningLogicWarning$=[3,w,hde,0,[Kr,Aj,tj],[0,[()=>pd,0],[()=>pd,0]]];f.GuardrailAutomatedReasoningNoTranslationsFinding$=[3,w,yde,0,[],[]];f.GuardrailAutomatedReasoningPolicyAssessment$=[3,w,_de,0,[wfe],[[()=>She,0]]];f.GuardrailAutomatedReasoningRule$=[3,w,Ede,0,[Gfe,mge],[0,0]];f.GuardrailAutomatedReasoningSatisfiableFinding$=[3,w,Ade,0,[Qh,ej,lfe,Vh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailAutomatedReasoningScenario$=[3,w,vde,0,[kge],[[()=>pd,0]]];f.GuardrailAutomatedReasoningStatement$=[3,w,Tde,0,[Kfe,nge],[[()=>uhe,0],[()=>jj,0]]];f.GuardrailAutomatedReasoningTooComplexFinding$=[3,w,Ide,0,[],[]];f.GuardrailAutomatedReasoningTranslation$=[3,w,xde,0,[Aj,tj,ehe,Qge,rj],[[()=>pd,0],[()=>pd,0],[()=>q2,0],[()=>q2,0],1]];f.GuardrailAutomatedReasoningTranslationAmbiguousFinding$=[3,w,bde,0,[lge,Tfe],[[()=>Ahe,0],[()=>Ehe,0]]];f.GuardrailAutomatedReasoningTranslationOption$=[3,w,$de,0,[Yge],[[()=>vhe,0]]];f.GuardrailAutomatedReasoningValidFinding$=[3,w,Dde,0,[Qh,ej,Cge,Vh],[[()=>f.GuardrailAutomatedReasoningTranslation$,0],[()=>f.GuardrailAutomatedReasoningScenario$,0],()=>Bx,[()=>f.GuardrailAutomatedReasoningLogicWarning$,0]]];f.GuardrailConfiguration$=[3,w,Mde,0,[md,Lc,Uc],[0,0,0]];f.GuardrailContentFilter$=[3,w,zde,0,[Kr,rj,fs,Ife,ga],[0,0,0,0,2],3];f.GuardrailContentPolicyAssessment$=[3,w,Vde,0,[aj],[()=>Phe],1];f.GuardrailContextualGroundingFilter$=[3,w,Bde,0,[Kr,Jge,wge,fs,ga],[0,1,1,0,2],4];f.GuardrailContextualGroundingPolicyAssessment$=[3,w,Fde,0,[aj],[()=>Che]];f.GuardrailConverseImageBlock$=[3,w,jde,8,[ha,jn],[0,[()=>f.GuardrailConverseImageSource$,0]],2];f.GuardrailConverseTextBlock$=[3,w,Hde,0,[Pt,Cj],[0,64],1];f.GuardrailCoverage$=[3,w,Kde,0,[Lge,Ffe],[()=>f.GuardrailTextCharactersCoverage$,()=>f.GuardrailImageCoverage$]];f.GuardrailCustomWord$=[3,w,Wde,0,[Hh,fs,ga],[0,0,2],2];f.GuardrailImageBlock$=[3,w,Zde,8,[ha,jn],[0,[()=>f.GuardrailImageSource$,0]],2];f.GuardrailImageCoverage$=[3,w,Xde,0,[pj,zj],[1,1]];f.GuardrailInvocationMetrics$=[3,w,Yde,0,[Ofe,ey,uj],[1,()=>f.GuardrailUsage$,()=>f.GuardrailCoverage$]];f.GuardrailManagedWord$=[3,w,epe,0,[Hh,Kr,fs,ga],[0,0,0,2],3];f.GuardrailOutputContent$=[3,w,rpe,0,[Pt],[0]];f.GuardrailPiiEntityFilter$=[3,w,ope,0,[Hh,Kr,fs,ga],[0,0,0,2],3];f.GuardrailRegexFilter$=[3,w,spe,0,[fs,mi,Hh,fge,ga],[0,0,0,0,2],1];f.GuardrailSensitiveInformationPolicyAssessment$=[3,w,upe,0,[pge,yge],[()=>Ihe,()=>whe],2];f.GuardrailStreamConfiguration$=[3,w,cpe,0,[md,Lc,Uc,Age],[0,0,0,0]];f.GuardrailTextBlock$=[3,w,ppe,0,[Pt,Cj],[0,64],1];f.GuardrailTextCharactersCoverage$=[3,w,mpe,0,[pj,zj],[1,1]];f.GuardrailTopic$=[3,w,lpe,0,[mi,Kr,fs,ga],[0,0,0,2],3];f.GuardrailTopicPolicyAssessment$=[3,w,gpe,0,[Xge],[()=>$he],1];f.GuardrailTraceAssessment$=[3,w,dpe,0,[Xfe,Nfe,sge,Z2],[64,[()=>zhe,0],[()=>Lhe,0],0]];f.GuardrailUsage$=[3,w,hpe,0,[Fge,gfe,ahe,Sge,Ege,pfe,ffe,Qme,efe],[1,1,1,1,1,1,1,1,1],6];f.GuardrailWordPolicyAssessment$=[3,w,ype,0,[yfe,tge],[()=>The,()=>xhe],2];f.ImageBlock$=[3,w,_pe,0,[ha,jn,_r],[0,[()=>f.ImageSource$,0],[()=>f.ErrorBlock$,0]],2];f.ImageBlockDelta$=[3,w,Epe,0,[jn,_r],[[()=>f.ImageSource$,0],[()=>f.ErrorBlock$,0]]];f.ImageBlockStart$=[3,w,Spe,0,[ha],[0],1];f.InferenceConfiguration$=[3,w,vpe,0,[ege,Wge,jge,Tge],[1,1,1,64]];f.InvokeModelRequest$=[3,w,Rpe,0,[ya,fa,Fh,X2,Uc,md,Lc,Jh,gs],[[0,1],[()=>ty,16],[0,{[Rt]:hx}],[0,{[Rt]:jue}],[0,{[Rt]:W2}],[0,{[Rt]:V2}],[0,{[Rt]:H2}],[0,{[Rt]:Bh}],[0,{[Rt]:Gh}]],1];f.InvokeModelResponse$=[3,w,Ppe,0,[fa,Fh,Jh,gs],[[()=>ty,16],[0,{[Rt]:hx}],[0,{[Rt]:Bh}],[0,{[Rt]:Gh}]],2];f.InvokeModelTokensRequest$=[3,w,Cpe,0,[fa],[[()=>ty,0]],1];f.InvokeModelWithBidirectionalStreamRequest$=[3,w,Ipe,0,[ya,fa],[[0,1],[()=>f.InvokeModelWithBidirectionalStreamInput$,16]],2];f.InvokeModelWithBidirectionalStreamResponse$=[3,w,wpe,0,[fa],[[()=>f.InvokeModelWithBidirectionalStreamOutput$,16]],1];f.InvokeModelWithResponseStreamRequest$=[3,w,kpe,0,[ya,fa,Fh,X2,Uc,md,Lc,Jh,gs],[[0,1],[()=>ty,16],[0,{[Rt]:hx}],[0,{[Rt]:Jme}],[0,{[Rt]:W2}],[0,{[Rt]:V2}],[0,{[Rt]:H2}],[0,{[Rt]:Bh}],[0,{[Rt]:Gh}]],1];f.InvokeModelWithResponseStreamResponse$=[3,w,Dpe,0,[fa,Fh,Jh,gs],[[()=>f.ResponseStream$,16],[0,{[Rt]:Kme}],[0,{[Rt]:Bh}],[0,{[Rt]:Gh}]],2];f.JsonSchemaDefinition$=[3,w,Npe,0,[$ge,mi,nj],[0,0,0],1];f.ListAsyncInvokesRequest$=[3,w,zpe,0,[F2,j2,B2,z2,gx,U2,G2],[[5,{[ma]:F2}],[5,{[ma]:j2}],[0,{[ma]:B2}],[1,{[ma]:z2}],[0,{[ma]:gx}],[0,{[ma]:U2}],[0,{[ma]:G2}]]];f.ListAsyncInvokesResponse$=[3,w,Upe,0,[gx,Xme],[0,[()=>dhe,0]]];f.Message$=[3,w,Bpe,0,[Ij,Nc],[0,[()=>yhe,0]],2];f.MessageStartEvent$=[3,w,qpe,0,[Ij],[0],1];f.MessageStopEvent$=[3,w,Hpe,0,[kj,K2],[0,15],1];f.OutputConfig$=[3,w,Kpe,0,[Bge],[[()=>f.OutputFormat$,0]]];f.OutputFormat$=[3,w,Zpe,0,[Kr,Oge],[0,[()=>f.OutputFormatStructure$,0]],2];f.PayloadPart$=[3,w,eme,8,[pi],[[()=>Ux,0]]];f.PerformanceConfiguration$=[3,w,Qpe,0,[Jfe],[0]];f.PromptRouterTrace$=[3,w,tme,0,[zfe],[0]];f.ReasoningTextBlock$=[3,w,ume,8,[Pt,Nj],[0,0],1];f.S3Location$=[3,w,gme,0,[the,Y2],[0,0],1];f.SearchResultBlock$=[3,w,yme,0,[jn,Lx,Nc,Ax],[0,0,()=>khe,()=>f.CitationsConfig$],3];f.SearchResultContentBlock$=[3,w,_me,0,[Pt],[0],1];f.SearchResultLocation$=[3,w,Sme,0,[Rge,fd,jh],[1,1,1]];f.ServiceTier$=[3,w,vme,0,[Kr],[0],1];f.SpecificToolChoice$=[3,w,Ame,0,[mi],[0],1];f.StartAsyncInvokeRequest$=[3,w,dme,0,[ya,Zfe,wx,Sx,Hge],[0,[()=>lhe,0],()=>f.AsyncInvokeOutputDataConfig$,[0,4],()=>Dhe],3];f.StartAsyncInvokeResponse$=[3,w,pme,0,[qh],[0],1];f.SystemTool$=[3,w,Rme,0,[mi],[0],1];f.Tag$=[3,w,Cme,0,[Hfe,nhe],[0,0],2];f.TokenUsage$=[3,w,zme,0,[Tx,uge,Vge,hfe,_fe,ufe],[1,1,1,1,1,()=>phe],3];f.ToolConfiguration$=[3,w,Tme,0,[Kge,zge],[()=>Nhe,()=>f.ToolChoice$],1];f.ToolResultBlock$=[3,w,$me,0,[Yh,Nc,Zh,Kr],[0,[()=>Ohe,0],0,0],2];f.ToolResultBlockStart$=[3,w,Mme,0,[Yh,Kr,Zh],[0,0,0],1];f.ToolSpecification$=[3,w,Lme,0,[mi,Bfe,nj,Mge],[0,()=>f.ToolInputSchema$,0,2],2];f.ToolUseBlock$=[3,w,Ume,0,[Yh,mi,Px,Kr],[0,0,15,0],3];f.ToolUseBlockDelta$=[3,w,Bme,0,[Px],[0],1];f.ToolUseBlockStart$=[3,w,Gme,0,[Yh,mi,Kr],[0,0,0],2];f.VideoBlock$=[3,w,qme,0,[ha,jn],[0,()=>f.VideoSource$],2];f.WebLocation$=[3,w,Wme,0,[rhe,xfe],[0,0]];var dhe=[1,w,ele,0,[()=>f.AsyncInvokeSummary$,0]],phe=[1,w,_le,0,()=>f.CacheDetail$],mhe=[1,w,Ale,0,()=>f.CitationGeneratedContent$],fhe=[1,w,Hle,0,()=>f.Citation$],ghe=[1,w,kle,0,()=>f.CitationSourceContent$],hhe=[1,w,Dle,0,()=>f.CitationSourceContentDelta$],yhe=[1,w,cle,0,[()=>f.ContentBlock$,0]],_he=[1,w,Kle,0,()=>f.DocumentContentBlock$],qj=[1,w,sde,0,[()=>f.GuardrailAssessment$,0]],Ehe=[1,w,ude,0,[()=>f.GuardrailAutomatedReasoningScenario$,0]],She=[1,w,dde,0,[()=>f.GuardrailAutomatedReasoningFinding$,0]],q2=[1,w,gde,0,[()=>f.GuardrailAutomatedReasoningInputTextReference$,0]],Bx=[1,w,Sde,0,()=>f.GuardrailAutomatedReasoningRule$],pd=[1,w,Rde,0,[()=>f.GuardrailAutomatedReasoningStatement$,0]],vhe=[1,w,wde,0,[()=>f.GuardrailAutomatedReasoningTranslation$,0]],Ahe=[1,w,kde,0,[()=>f.GuardrailAutomatedReasoningTranslationOption$,0]],Rhe=[1,w,Nde,0,[()=>f.GuardrailContentBlock$,0]],Phe=[1,w,Ude,0,()=>f.GuardrailContentFilter$],Che=[1,w,Gde,0,()=>f.GuardrailContextualGroundingFilter$],The=[1,w,Jde,0,()=>f.GuardrailCustomWord$],xhe=[1,w,tpe,0,()=>f.GuardrailManagedWord$],bhe=[1,w,npe,0,()=>f.GuardrailOutputContent$],Ihe=[1,w,ipe,0,()=>f.GuardrailPiiEntityFilter$],whe=[1,w,ape,0,()=>f.GuardrailRegexFilter$],$he=[1,w,fpe,0,()=>f.GuardrailTopic$],Gx=[1,w,Jpe,0,[()=>f.Message$,0]],khe=[1,w,Eme,0,()=>f.SearchResultContentBlock$],Fx=[1,w,mme,0,[()=>f.SystemContentBlock$,0]],Dhe=[1,w,wme,0,()=>f.Tag$],Mhe=[1,w,kme,0,()=>f.ToolResultBlockDelta$],Ohe=[1,w,Ome,0,[()=>f.ToolResultContentBlock$,0]],Nhe=[1,w,Fme,0,()=>f.Tool$],Lhe=[2,w,ade,0,[0,0],[()=>qj,0]],zhe=[2,w,cde,0,[0,0],[()=>f.GuardrailAssessment$,0]],Vj=[2,w,rme,8,0,()=>f.PromptVariableValues$],Hj=[2,w,sme,8,0,0];f.AsyncInvokeOutputDataConfig$=[4,w,Xue,0,[vge],[()=>f.AsyncInvokeS3OutputDataConfig$]];f.AudioSource$=[4,w,tle,8,[pi,Kh],[21,()=>f.S3Location$]];f.CitationGeneratedContent$=[4,w,vle,0,[Pt],[0]];f.CitationLocation$=[4,w,Rle,0,[ihe,Rfe,Cfe,Pfe,Pge],[()=>f.WebLocation$,()=>f.DocumentCharLocation$,()=>f.DocumentPageLocation$,()=>f.DocumentChunkLocation$,()=>f.SearchResultLocation$]];f.CitationSourceContent$=[4,w,wle,0,[Pt],[0]];f.ContentBlock$=[4,w,fle,0,[Pt,zc,oj,Uj,nfe,Nx,Ox,dj,Ex,Tj,cfe,Dj],[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,ule,0,[Pt,Nx,Ox,Tj,Efe,zc],[0,()=>f.ToolUseBlockDelta$,()=>Mhe,[()=>f.ReasoningContentBlockDelta$,0],()=>f.CitationsDelta$,[()=>f.ImageBlockDelta$,0]]];f.ContentBlockStart$=[4,w,dle,0,[Nx,Ox,zc],[()=>f.ToolUseBlockStart$,()=>f.ToolResultBlockStart$,()=>f.ImageBlockStart$]];f.ConverseOutput$=[4,w,Cle,0,[Ir],[[()=>f.Message$,0]]];f.ConverseStreamOutput$=[4,w,Nle,{[Xh]:1},[Yfe,sfe,ife,afe,Qfe,rge,Cx,bx,zx,Mx,$x],[()=>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,Gle,0,[Ufe,vfe],[[()=>f.InvokeModelTokensRequest$,0],[()=>f.ConverseTokensRequest$,0]]];f.DocumentContentBlock$=[4,w,Zle,0,[Pt],[0]];f.DocumentSource$=[4,w,ede,0,[pi,Kh,Pt,Nc],[21,()=>f.S3Location$,0,()=>_he]];f.GuardrailAutomatedReasoningFinding$=[4,w,lde,0,[ohe,qfe,Ige,jfe,Nge,Uge,oge],[[()=>f.GuardrailAutomatedReasoningValidFinding$,0],[()=>f.GuardrailAutomatedReasoningInvalidFinding$,0],[()=>f.GuardrailAutomatedReasoningSatisfiableFinding$,0],[()=>f.GuardrailAutomatedReasoningImpossibleFinding$,0],[()=>f.GuardrailAutomatedReasoningTranslationAmbiguousFinding$,0],()=>f.GuardrailAutomatedReasoningTooComplexFinding$,()=>f.GuardrailAutomatedReasoningNoTranslationsFinding$]];f.GuardrailContentBlock$=[4,w,Ode,0,[Pt,zc],[()=>f.GuardrailTextBlock$,[()=>f.GuardrailImageBlock$,0]]];f.GuardrailConverseContentBlock$=[4,w,Lde,0,[Pt,zc],[()=>f.GuardrailConverseTextBlock$,[()=>f.GuardrailConverseImageBlock$,0]]];f.GuardrailConverseImageSource$=[4,w,qde,8,[pi],[21]];f.GuardrailImageSource$=[4,w,Qde,8,[pi],[21]];f.ImageSource$=[4,w,Mpe,8,[pi,Kh],[21,()=>f.S3Location$]];f.InvokeModelWithBidirectionalStreamInput$=[4,w,xpe,{[Xh]:1},[vx],[[()=>f.BidirectionalInputPayloadPart$,0]]];f.InvokeModelWithBidirectionalStreamOutput$=[4,w,bpe,{[Xh]:1},[vx,Cx,bx,zx,Mx,_j,$x],[[()=>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,Xpe,8,[Vfe],[()=>f.JsonSchemaDefinition$]];f.PromptVariableValues$=[4,w,nme,0,[Pt],[0]];f.ReasoningContentBlock$=[4,w,ome,8,[hge,xj],[[()=>f.ReasoningTextBlock$,0],21]];f.ReasoningContentBlockDelta$=[4,w,ime,8,[Pt,xj,Nj],[0,21,0]];f.ResponseStream$=[4,w,cme,{[Xh]:1},[vx,Cx,bx,zx,Mx,_j,$x],[[()=>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,fme,0,[Pt,dj,Ex],[0,[()=>f.GuardrailConverseContentBlock$,0],()=>f.CachePointBlock$]];f.Tool$=[4,w,jme,0,[qge,xge,Ex],[()=>f.ToolSpecification$,()=>f.SystemTool$,()=>f.CachePointBlock$]];f.ToolChoice$=[4,w,xme,0,[ofe,tfe,Zge],[()=>f.AutoToolChoice$,()=>f.AnyToolChoice$,()=>f.SpecificToolChoice$]];f.ToolInputSchema$=[4,w,Ime,0,[xx],[15]];f.ToolResultBlockDelta$=[4,w,Dme,0,[Pt,xx],[0,15]];f.ToolResultContentBlock$=[4,w,Nme,0,[xx,Pt,zc,oj,Uj,Dj],[15,0,[()=>f.ImageBlock$,0],()=>f.DocumentBlock$,()=>f.VideoBlock$,()=>f.SearchResultBlock$]];f.VideoSource$=[4,w,Hme,0,[pi,Kh],[21,()=>f.S3Location$]];f.ApplyGuardrail$=[9,w,Hue,{[Eo]:["POST","/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply",200]},()=>f.ApplyGuardrailRequest$,()=>f.ApplyGuardrailResponse$];f.Converse$=[9,w,Wle,{[Eo]:["POST","/model/{modelId}/converse",200]},()=>f.ConverseRequest$,()=>f.ConverseResponse$];f.ConverseStream$=[9,w,Ile,{[Eo]:["POST","/model/{modelId}/converse-stream",200]},()=>f.ConverseStreamRequest$,()=>f.ConverseStreamResponse$];f.CountTokens$=[9,w,Vle,{[Eo]:["POST","/model/{modelId}/count-tokens",200]},()=>f.CountTokensRequest$,()=>f.CountTokensResponse$];f.GetAsyncInvoke$=[9,w,nde,{[Eo]:["GET","/async-invoke/{invocationArn}",200]},()=>f.GetAsyncInvokeRequest$,()=>f.GetAsyncInvokeResponse$];f.InvokeModel$=[9,w,Ape,{[Eo]:["POST","/model/{modelId}/invoke",200]},()=>f.InvokeModelRequest$,()=>f.InvokeModelResponse$];f.InvokeModelWithBidirectionalStream$=[9,w,Tpe,{[Eo]:["POST","/model/{modelId}/invoke-with-bidirectional-stream",200]},()=>f.InvokeModelWithBidirectionalStreamRequest$,()=>f.InvokeModelWithBidirectionalStreamResponse$];f.InvokeModelWithResponseStream$=[9,w,$pe,{[Eo]:["POST","/model/{modelId}/invoke-with-response-stream",200]},()=>f.InvokeModelWithResponseStreamRequest$,()=>f.InvokeModelWithResponseStreamResponse$];f.ListAsyncInvokes$=[9,w,Lpe,{[Eo]:["GET","/async-invoke",200]},()=>f.ListAsyncInvokesRequest$,()=>f.ListAsyncInvokesResponse$];f.StartAsyncInvoke$=[9,w,lme,{[Eo]:["POST","/async-invoke",200]},()=>f.StartAsyncInvokeRequest$,()=>f.StartAsyncInvokeResponse$]});var Kj=N(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.getRuntimeConfig=void 0;var Uhe=(Dt(),Q(pc)),Bhe=(mo(),Q(ll)),Ghe=(Xe(),Q(fr)),Fhe=ue(),jhe=Gr(),Wj=gt(),Jj=ft(),qhe=MP(),Vhe=N2(),Hhe=jx(),Whe=i(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??Wj.fromBase64,base64Encoder:e?.base64Encoder??Wj.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Vhe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??qhe.defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Uhe.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#httpBearerAuth"),"identityProvider"),signer:new Ghe.HttpBearerAuthSigner}],logger:e?.logger??new Fhe.NoOpLogger,protocol:e?.protocol??Bhe.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.bedrockruntime",errorTypeRegistries:Hhe.errorTypeRegistries,version:"2023-09-30",serviceTarget:"AmazonBedrockFrontendService"},serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??jhe.parseUrl,utf8Decoder:e?.utf8Decoder??Jj.fromUtf8,utf8Encoder:e?.utf8Encoder??Jj.toUtf8}),"getRuntimeConfig");ry.getRuntimeConfig=Whe});var r3=N(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.getRuntimeConfig=void 0;var Jhe=(Ko(),Q(Jo)),Khe=Jhe.__importDefault(K1()),Zhe=(yt(),Q(Pr)),Zj=(Dt(),Q(pc)),Xhe=kh(),Yhe=T2(),Xj=UC(),Yj=qi(),ny=Nt(),Qhe=(Xe(),Q(fr)),eye=x2(),tye=Vi(),Qj=hr(),_a=cn(),e3=to(),t3=ue(),rye=Hi(),nye=Wi(),oye=Mn(),iye=Kj(),sye=i(e=>{(0,t3.emitWarningIfUnsupportedVersion)(process.version);let t=(0,nye.resolveDefaultsModeConfig)(e),r=i(()=>t().then(t3.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,iye.getRuntimeConfig)(e);(0,Zhe.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger,signingName:"bedrock"};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,_a.loadConfig)(Zj.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??rye.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??Xhe.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Yj.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Khe.default.version}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??Yhe.eventStreamPayloadHandlerProvider,eventStreamSerdeProvider:e?.eventStreamSerdeProvider??eye.eventStreamSerdeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Zj.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#httpBearerAuth")||(async c=>{try{return await(0,Xj.fromEnvSigningName)({signingName:"bedrock"})()}catch{return await(0,Xj.nodeProvider)(c)(c)}}),"identityProvider"),signer:new Qhe.HttpBearerAuthSigner}],maxAttempts:e?.maxAttempts??(0,_a.loadConfig)(Qj.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,_a.loadConfig)(ny.NODE_REGION_CONFIG_OPTIONS,{...ny.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:e3.NodeHttp2Handler.create(e?.requestHandler??(async()=>({...await r(),disableConcurrentStreams:!0}))),retryMode:e?.retryMode??(0,_a.loadConfig)({...Qj.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||oye.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??tye.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??e3.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,_a.loadConfig)(ny.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,_a.loadConfig)(ny.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,_a.loadConfig)(Yj.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");oy.getRuntimeConfig=sye});var Bc=N(ee=>{"use strict";var u3=P$(),n3=Ci(),aye=Ti(),cye=xi(),o3=ti(),l3=QO(),uye=Nt(),iy=(Xe(),Q(fr)),lye=(ke(),Q(Wo)),dye=sN(),pye=Ni(),qn=gr(),i3=hr(),ir=ue(),s3=MP(),mye=r3(),a3=go(),c3=Me(),wr=jx(),sy=fx(),fye=Uh(),gye=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"}},hye=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"),yye=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials(),token:e.token()}),"resolveHttpAuthRuntimeConfig"),_ye=i((e,t)=>{let r=Object.assign(a3.getAwsRegionExtensionConfiguration(e),ir.getDefaultExtensionConfiguration(e),c3.getHttpHandlerExtensionConfiguration(e),hye(e));return t.forEach(n=>n.configure(r)),Object.assign(e,a3.resolveAwsRegionExtensionConfiguration(r),ir.resolveDefaultRuntimeConfig(r),c3.resolveHttpHandlerRuntimeConfig(r),yye(r))},"resolveRuntimeExtensions"),gd=class extends ir.Client{static{i(this,"BedrockRuntimeClient")}config;constructor(...[t]){let r=mye.getRuntimeConfig(t||{});super(r),this.initConfig=r;let n=gye(r),o=o3.resolveUserAgentConfig(n),a=i3.resolveRetryConfig(o),c=uye.resolveRegionConfig(a),u=n3.resolveHostHeaderConfig(c),l=qn.resolveEndpointConfig(u),d=dye.resolveEventStreamSerdeConfig(l),_=s3.resolveHttpAuthSchemeConfig(d),y=u3.resolveEventStreamConfig(_),E=l3.resolveWebSocketConfig(y),g=_ye(E,t?.extensions||[]);this.config=g,this.middlewareStack.use(lye.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(o3.getUserAgentPlugin(this.config)),this.middlewareStack.use(i3.getRetryPlugin(this.config)),this.middlewareStack.use(pye.getContentLengthPlugin(this.config)),this.middlewareStack.use(n3.getHostHeaderPlugin(this.config)),this.middlewareStack.use(aye.getLoggerPlugin(this.config)),this.middlewareStack.use(cye.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(iy.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:s3.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:i(async v=>new iy.DefaultIdentityProviderConfig({"aws.auth#sigv4":v.credentials,"smithy.api#httpBearerAuth":v.token}),"identityProviderConfigProvider")})),this.middlewareStack.use(iy.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},ay=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")}},cy=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")}},uy=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")}},ly=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")}},dy=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")}},py=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")}},my=class extends ir.Command.classBuilder().ep(So).m(function(t,r,n,o){return[qn.getEndpointPlugin(n,t.getEndpointParameterInstructions()),u3.getEventStreamPlugin(n),l3.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")}},fy=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")}},gy=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")}},d3=iy.createPaginator(gd,hd,"nextToken","nextToken","maxResults"),Eye={ApplyGuardrailCommand:ay,ConverseCommand:cy,ConverseStreamCommand:uy,CountTokensCommand:ly,GetAsyncInvokeCommand:dy,InvokeModelCommand:py,InvokeModelWithBidirectionalStreamCommand:my,InvokeModelWithResponseStreamCommand:fy,ListAsyncInvokesCommand:hd,StartAsyncInvokeCommand:gy},Sye={paginateListAsyncInvokes:d3},hy=class extends gd{static{i(this,"BedrockRuntime")}};ir.createAggregatedClient(Eye,hy,{paginators:Sye});var vye={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},Aye={SUBMISSION_TIME:"SubmissionTime"},Rye={ASCENDING:"Ascending",DESCENDING:"Descending"},Pye={JPEG:"jpeg",PNG:"png"},Cye={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},Tye={FULL:"FULL",INTERVENTIONS:"INTERVENTIONS"},xye={INPUT:"INPUT",OUTPUT:"OUTPUT"},bye={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",NONE:"NONE"},Iye={ACCOUNT_ENFORCED:"ACCOUNT_ENFORCED",ORGANIZATION_ENFORCED:"ORGANIZATION_ENFORCED",REQUEST:"REQUEST"},wye={CROSS_ACCOUNT:"CROSS_ACCOUNT",SELF:"SELF"},$ye={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},kye={BLOCKED:"BLOCKED",NONE:"NONE"},Dye={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},Mye={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},Oye={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},Nye={BLOCKED:"BLOCKED",NONE:"NONE"},Lye={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},zye={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED",NONE:"NONE"},Uye={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"},Bye={BLOCKED:"BLOCKED",NONE:"NONE"},Gye={DENY:"DENY"},Fye={BLOCKED:"BLOCKED",NONE:"NONE"},jye={PROFANITY:"PROFANITY"},qye={DISABLED:"disabled",ENABLED:"enabled",ENABLED_FULL:"enabled_full"},Vye={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"},Hye={FIVE_MINUTES:"5m",ONE_HOUR:"1h"},Wye={DEFAULT:"default"},Jye={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"},Kye={JPEG:"jpeg",PNG:"png"},Zye={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},Xye={GIF:"gif",JPEG:"jpeg",PNG:"png",WEBP:"webp"},Yye={FLV:"flv",MKV:"mkv",MOV:"mov",MP4:"mp4",MPEG:"mpeg",MPG:"mpg",THREE_GP:"three_gp",WEBM:"webm",WMV:"wmv"},Qye={ERROR:"error",SUCCESS:"success"},e_e={SERVER_TOOL_USE:"server_tool_use"},t_e={ASSISTANT:"assistant",USER:"user"},r_e={JSON_SCHEMA:"json_schema"},n_e={OPTIMIZED:"optimized",STANDARD:"standard"},o_e={DEFAULT:"default",FLEX:"flex",PRIORITY:"priority",RESERVED:"reserved"},i_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"},s_e={ASYNC:"async",SYNC:"sync"},a_e={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_FULL:"ENABLED_FULL"};ee.$Command=ir.Command;ee.__Client=ir.Client;ee.BedrockRuntimeServiceException=fye.BedrockRuntimeServiceException;ee.ApplyGuardrailCommand=ay;ee.AsyncInvokeStatus=vye;ee.AudioFormat=Vye;ee.BedrockRuntime=hy;ee.BedrockRuntimeClient=gd;ee.CachePointType=Wye;ee.CacheTTL=Hye;ee.ConversationRole=t_e;ee.ConverseCommand=cy;ee.ConverseStreamCommand=uy;ee.CountTokensCommand=ly;ee.DocumentFormat=Jye;ee.GetAsyncInvokeCommand=dy;ee.GuardrailAction=bye;ee.GuardrailAutomatedReasoningLogicWarningType=$ye;ee.GuardrailContentFilterConfidence=Dye;ee.GuardrailContentFilterStrength=Mye;ee.GuardrailContentFilterType=Oye;ee.GuardrailContentPolicyAction=kye;ee.GuardrailContentQualifier=Cye;ee.GuardrailContentSource=xye;ee.GuardrailContextualGroundingFilterType=Lye;ee.GuardrailContextualGroundingPolicyAction=Nye;ee.GuardrailConverseContentQualifier=Zye;ee.GuardrailConverseImageFormat=Kye;ee.GuardrailImageFormat=Pye;ee.GuardrailManagedWordType=jye;ee.GuardrailOrigin=Iye;ee.GuardrailOutputScope=Tye;ee.GuardrailOwnership=wye;ee.GuardrailPiiEntityType=Uye;ee.GuardrailSensitiveInformationPolicyAction=zye;ee.GuardrailStreamProcessingMode=s_e;ee.GuardrailTopicPolicyAction=Bye;ee.GuardrailTopicType=Gye;ee.GuardrailTrace=qye;ee.GuardrailWordPolicyAction=Fye;ee.ImageFormat=Xye;ee.InvokeModelCommand=py;ee.InvokeModelWithBidirectionalStreamCommand=my;ee.InvokeModelWithResponseStreamCommand=fy;ee.ListAsyncInvokesCommand=hd;ee.OutputFormatType=r_e;ee.PerformanceConfigLatency=n_e;ee.ServiceTierType=o_e;ee.SortAsyncInvocationBy=Aye;ee.SortOrder=Rye;ee.StartAsyncInvokeCommand=gy;ee.StopReason=i_e;ee.ToolResultStatus=Qye;ee.ToolUseType=e_e;ee.Trace=a_e;ee.VideoFormat=Yye;ee.paginateListAsyncInvokes=d3;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(sy,"__proto__")&&!Object.prototype.hasOwnProperty.call(ee,"__proto__")&&Object.defineProperty(ee,"__proto__",{enumerable:!0,value:sy.__proto__});Object.keys(sy).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ee,e)&&(ee[e]=sy[e])})});var Ea={};bt(Ea,{AWSSDKSigV4Signer:()=>gP,AwsEc2QueryProtocol:()=>Jf,AwsJson1_0Protocol:()=>Uf,AwsJson1_1Protocol:()=>Bf,AwsJsonRpcProtocol:()=>es,AwsQueryProtocol:()=>rs,AwsRestJsonProtocol:()=>po,AwsRestXmlProtocol:()=>Xf,AwsSdkSigV4ASigner:()=>ni,AwsSdkSigV4Signer:()=>Lt,AwsSmithyRpcV2CborProtocol:()=>Mf,JsonCodec:()=>Qi,JsonShapeDeserializer:()=>Ec,JsonShapeSerializer:()=>Sc,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>ao,NODE_SIGV4A_CONFIG_OPTIONS:()=>uf,QueryShapeSerializer:()=>vc,XmlCodec:()=>Rc,XmlShapeDeserializer:()=>ts,XmlShapeSerializer:()=>Ac,_toBool:()=>ez,_toNum:()=>tz,_toStr:()=>QL,awsExpectUnion:()=>hz,emitWarningIfUnsupportedVersion:()=>io,getBearerTokenEnvKey:()=>af,getLongPollPlugin:()=>fR,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>Kf,parseJsonBody:()=>cl,parseJsonErrorBody:()=>cz,parseXmlBody:()=>PC,parseXmlErrorBody:()=>kz,resolveAWSSDKSigV4Config:()=>H1,resolveAwsSdkSigV4AConfig:()=>cf,resolveAwsSdkSigV4Config:()=>Nn,setCredentialFeature:()=>ki,setFeature:()=>uO,setTokenFeature:()=>dO,state:()=>Cm,validateSigningProperties:()=>lc});var Sa=D(()=>{yt();Dt();mo()});var Hx=N(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.resolveHttpAuthSchemeConfig=hs.defaultBedrockHttpAuthSchemeProvider=hs.defaultBedrockHttpAuthSchemeParametersProvider=void 0;var c_e=(Sa(),Q(Ea)),qx=(Xe(),Q(fr)),Vx=It(),u_e=i(async(e,t,r)=>({operation:(0,Vx.getSmithyContext)(t).operation,region:await(0,Vx.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultBedrockHttpAuthSchemeParametersProvider");hs.defaultBedrockHttpAuthSchemeParametersProvider=u_e;function l_e(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i(l_e,"createAwsAuthSigv4HttpAuthOption");function d_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(d_e,"createSmithyApiHttpBearerAuthHttpAuthOption");var p_e=i(e=>{let t=[];switch(e.operation){default:t.push(l_e(e)),t.push(d_e(e))}return t},"defaultBedrockHttpAuthSchemeProvider");hs.defaultBedrockHttpAuthSchemeProvider=p_e;var m_e=i(e=>{let t=(0,qx.memoizeIdentityProvider)(e.token,qx.isIdentityExpired,qx.doesIdentityRequireRefresh),r=(0,c_e.resolveAwsSdkSigV4Config)(e);return Object.assign(r,{authSchemePreference:(0,Vx.normalizeProvider)(e.authSchemePreference??[]),token:t})},"resolveHttpAuthSchemeConfig");hs.resolveHttpAuthSchemeConfig=m_e});var M3={};bt(M3,{__addDisposableResource:()=>k3,__assign:()=>yy,__asyncDelegator:()=>P3,__asyncGenerator:()=>R3,__asyncValues:()=>C3,__await:()=>Gc,__awaiter:()=>y3,__classPrivateFieldGet:()=>I3,__classPrivateFieldIn:()=>$3,__classPrivateFieldSet:()=>w3,__createBinding:()=>Ey,__decorate:()=>f3,__disposeResources:()=>D3,__esDecorate:()=>f_e,__exportStar:()=>E3,__extends:()=>p3,__generator:()=>_3,__importDefault:()=>b3,__importStar:()=>x3,__makeTemplateObject:()=>T3,__metadata:()=>h3,__param:()=>g3,__propKey:()=>h_e,__read:()=>Jx,__rest:()=>m3,__runInitializers:()=>g_e,__setFunctionName:()=>y_e,__spread:()=>S3,__spreadArray:()=>A3,__spreadArrays:()=>v3,__values:()=>_y,default:()=>S_e});function p3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wx(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function m3(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 f3(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 g3(e,t){return function(r,n){t(r,n,e)}}function f_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 g_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 h_e(e){return typeof e=="symbol"?e:"".concat(e)}function y_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 h3(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function y3(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 _3(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 E3(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ey(t,e,r)}function _y(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 Jx(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 S3(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Jx(arguments[t]));return e}function v3(){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 A3(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 R3(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 P3(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 C3(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 _y=="function"?_y(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 T3(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x3(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)&&Ey(t,e,r);return __e(t,e),t}function b3(e){return e&&e.__esModule?e:{default:e}}function I3(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 w3(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 $3(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 k3(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 D3(e){function t(n){e.error=e.hasError?new E_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 Wx,yy,Ey,__e,E_e,S_e,O3=D(()=>{Wx=i(function(e,t){return Wx=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])},Wx(e,t)},"extendStatics");i(p3,"__extends");yy=i(function(){return yy=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"),yy.apply(this,arguments)},"__assign");i(m3,"__rest");i(f3,"__decorate");i(g3,"__param");i(f_e,"__esDecorate");i(g_e,"__runInitializers");i(h_e,"__propKey");i(y_e,"__setFunctionName");i(h3,"__metadata");i(y3,"__awaiter");i(_3,"__generator");Ey=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(E3,"__exportStar");i(_y,"__values");i(Jx,"__read");i(S3,"__spread");i(v3,"__spreadArrays");i(A3,"__spreadArray");i(Gc,"__await");i(R3,"__asyncGenerator");i(P3,"__asyncDelegator");i(C3,"__asyncValues");i(T3,"__makeTemplateObject");__e=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};i(x3,"__importStar");i(b3,"__importDefault");i(I3,"__classPrivateFieldGet");i(w3,"__classPrivateFieldSet");i($3,"__classPrivateFieldIn");i(k3,"__addDisposableResource");E_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(D3,"__disposeResources");S_e={__extends:p3,__assign:yy,__rest:m3,__decorate:f3,__param:g3,__metadata:h3,__awaiter:y3,__generator:_3,__createBinding:Ey,__exportStar:E3,__values:_y,__read:Jx,__spread:S3,__spreadArrays:v3,__spreadArray:A3,__await:Gc,__asyncGenerator:R3,__asyncDelegator:P3,__asyncValues:C3,__makeTemplateObject:T3,__importStar:x3,__importDefault:b3,__classPrivateFieldGet:I3,__classPrivateFieldSet:w3,__classPrivateFieldIn:$3,__addDisposableResource:k3,__disposeResources:D3}});var N3=N((ift,v_e)=>{v_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 B3=N(_d=>{"use strict";var A_e=(yt(),Q(Pr)),R_e=(Dt(),Q(pc)),Xr=jt(),yd=On(),P_e=require("node:fs"),C_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=R_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 A_e.setTokenFeature(n,"BEARER_SERVICE_ENV_VARS","3"),n},"fromEnvSigningName"),T_e=5*60*1e3,Kx="To refresh this SSO session run 'aws sso login' with the corresponding profile.",x_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"),b_e=i(async(e,t,r={},n)=>{let{CreateTokenCommand:o}=await Promise.resolve().then(()=>(xl(),Tl));return(await x_e(t,r,n)).send(new o({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken"),L3=i(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Xr.TokenProviderError(`Token is expired. ${Kx}`,!1)},"validateTokenExpiry"),va=i((e,t,r=!1)=>{if(typeof t>"u")throw new Xr.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${Kx}`,!1)},"validateTokenKey"),{writeFile:I_e}=P_e.promises,w_e=i((e,t)=>{let r=yd.getSSOTokenFilepath(e),n=JSON.stringify(t,null,2);return I_e(r,n)},"writeSSOTokenToFile"),z3=new Date(0),U3=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. ${Kx}`,!1)}va("accessToken",d.accessToken),va("expiresAt",d.expiresAt);let{accessToken:_,expiresAt:y}=d,E={token:_,expiration:new Date(y)};if(E.expiration.getTime()-Date.now()>T_e)return E;if(Date.now()-z3.getTime()<30*1e3)return L3(E),E;va("clientId",d.clientId,!0),va("clientSecret",d.clientSecret,!0),va("refreshToken",d.refreshToken,!0);try{z3.setTime(Date.now());let g=await b_e(d,l,e,t);va("accessToken",g.accessToken),va("expiresIn",g.expiresIn);let v=new Date(Date.now()+g.expiresIn*1e3);try{await w_e(a,{...d,accessToken:g.accessToken,expiresAt:v.toISOString(),refreshToken:g.refreshToken})}catch{}return{token:g.accessToken,expiration:v}}catch{return L3(E),E}},"fromSso"),$_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"),k_e=i((e={})=>Xr.memoize(Xr.chain(U3(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=C_e;_d.fromSso=U3;_d.fromStatic=$_e;_d.nodeProvider=k_e});var e6=N(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});Sy.ruleSet=void 0;var X3="required",Ao="fn",Ro="argv",jc="ref",G3=!0,F3="isSet",Sd="booleanEquals",Fc="error",Ed="endpoint",Er="tree",Zx="PartitionResult",j3={[X3]:!1,type:"string"},q3={[X3]:!0,default:!1,type:"boolean"},V3={[jc]:"Endpoint"},Y3={[Ao]:Sd,[Ro]:[{[jc]:"UseFIPS"},!0]},Q3={[Ao]:Sd,[Ro]:[{[jc]:"UseDualStack"},!0]},vo={},H3={[Ao]:"getAttr",[Ro]:[{[jc]:Zx},"supportsFIPS"]},W3={[Ao]:Sd,[Ro]:[!0,{[Ao]:"getAttr",[Ro]:[{[jc]:Zx},"supportsDualStack"]}]},J3=[Y3],K3=[Q3],Z3=[{[jc]:"Region"}],D_e={version:"1.0",parameters:{Region:j3,UseDualStack:q3,UseFIPS:q3,Endpoint:j3},rules:[{conditions:[{[Ao]:F3,[Ro]:[V3]}],rules:[{conditions:J3,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fc},{rules:[{conditions:K3,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fc},{endpoint:{url:V3,properties:vo,headers:vo},type:Ed}],type:Er}],type:Er},{rules:[{conditions:[{[Ao]:F3,[Ro]:Z3}],rules:[{conditions:[{[Ao]:"aws.partition",[Ro]:Z3,assign:Zx}],rules:[{conditions:[Y3,Q3],rules:[{conditions:[{[Ao]:Sd,[Ro]:[G3,H3]},W3],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:J3,rules:[{conditions:[{[Ao]:Sd,[Ro]:[H3,G3]}],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:K3,rules:[{conditions:[W3],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}]};Sy.ruleSet=D_e});var t6=N(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.defaultEndpointResolver=void 0;var M_e=$i(),Xx=er(),O_e=e6(),N_e=new Xx.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),L_e=i((e,t={})=>N_e.get(e,()=>(0,Xx.resolveEndpoint)(O_e.ruleSet,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");vy.defaultEndpointResolver=L_e;Xx.customEndpointFunctions.aws=M_e.awsEndpointFunctions});var Ay=N(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.BedrockServiceException=qc.__ServiceException=void 0;var r6=ue();Object.defineProperty(qc,"__ServiceException",{enumerable:!0,get:i(function(){return r6.ServiceException},"get")});var Yx=class e extends r6.ServiceException{static{i(this,"BedrockServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};qc.BedrockServiceException=Yx});var u0=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=Ay(),Qx=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=Qx;var e0=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=e0;var t0=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=t0;var r0=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=r0;var n0=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=n0;var o0=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=o0;var i0=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=i0;var s0=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=s0;var a0=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=a0;var c0=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=c0});var fb=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 z_e="AgreementAvailability",U_e="AccessDeniedException",B_e="AutomatedEvaluationConfig",G_e="AutomatedEvaluationCustomMetrics",F_e="AutomatedEvaluationCustomMetricConfig",j_e="AutomatedEvaluationCustomMetricSource",q_e="AccountEnforcedGuardrailInferenceInputConfiguration",V_e="AccountEnforcedGuardrailOutputConfiguration",H_e="AccountEnforcedGuardrailsOutputConfiguration",W_e="AutomatedReasoningCheckDifferenceScenarioList",J_e="AutomatedReasoningCheckFinding",K_e="AutomatedReasoningCheckFindingList",Z_e="AutomatedReasoningCheckImpossibleFinding",X_e="AutomatedReasoningCheckInvalidFinding",Y_e="AutomatedReasoningCheckInputTextReference",Q_e="AutomatedReasoningCheckInputTextReferenceList",eEe="AutomatedReasoningCheckLogicWarning",tEe="AutomatedReasoningCheckNoTranslationsFinding",rEe="AutomatedReasoningCheckRule",nEe="AutomatedReasoningCheckRuleList",oEe="AutomatedReasoningCheckScenario",iEe="AutomatedReasoningCheckSatisfiableFinding",sEe="AutomatedReasoningCheckTranslation",aEe="AutomatedReasoningCheckTranslationAmbiguousFinding",cEe="AutomatedReasoningCheckTooComplexFinding",uEe="AutomatedReasoningCheckTranslationList",lEe="AutomatedReasoningCheckTranslationOption",dEe="AutomatedReasoningCheckTranslationOptionList",pEe="AutomatedReasoningCheckValidFinding",mEe="AutomatedReasoningLogicStatement",fEe="AutomatedReasoningLogicStatementContent",gEe="AutomatedReasoningLogicStatementList",hEe="AutomatedReasoningNaturalLanguageStatementContent",yEe="AutomatedReasoningPolicyAnnotation",_Ee="AutomatedReasoningPolicyAnnotatedChunk",EEe="AutomatedReasoningPolicyAnnotatedChunkList",SEe="AutomatedReasoningPolicyAnnotatedContentList",vEe="AutomatedReasoningPolicyAnnotatedContent",AEe="AutomatedReasoningPolicyAnnotationFeedbackNaturalLanguage",REe="AutomatedReasoningPolicyAnnotationIngestContent",PEe="AutomatedReasoningPolicyAnnotatedLine",CEe="AutomatedReasoningPolicyAnnotationList",TEe="AutomatedReasoningPolicyAddRuleAnnotation",xEe="AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation",bEe="AutomatedReasoningPolicyAddRuleMutation",IEe="AutomatedReasoningPolicyAnnotationRuleNaturalLanguage",wEe="AutomatedReasoningPolicyAtomicStatement",$Ee="AutomatedReasoningPolicyAtomicStatementList",kEe="AutomatedReasoningPolicyAddTypeAnnotation",DEe="AutomatedReasoningPolicyAddTypeMutation",MEe="AutomatedReasoningPolicyAddTypeValue",OEe="AutomatedReasoningPolicyAddVariableAnnotation",NEe="AutomatedReasoningPolicyAddVariableMutation",LEe="AutomatedReasoningPolicyBuildDocumentBlob",zEe="AutomatedReasoningPolicyBuildDocumentDescription",UEe="AutomatedReasoningPolicyBuildDocumentName",BEe="AutomatedReasoningPolicyBuildLog",GEe="AutomatedReasoningPolicyBuildLogEntry",FEe="AutomatedReasoningPolicyBuildLogEntryList",jEe="AutomatedReasoningPolicyBuildResultAssets",qEe="AutomatedReasoningPolicyBuildResultAssetManifest",VEe="AutomatedReasoningPolicyBuildResultAssetManifestEntry",HEe="AutomatedReasoningPolicyBuildResultAssetManifestList",WEe="AutomatedReasoningPolicyBuildResultAssetName",JEe="AutomatedReasoningPolicyBuildStep",KEe="AutomatedReasoningPolicyBuildStepContext",ZEe="AutomatedReasoningPolicyBuildStepList",XEe="AutomatedReasoningPolicyBuildStepMessage",YEe="AutomatedReasoningPolicyBuildStepMessageList",QEe="AutomatedReasoningPolicyBuildWorkflowDocument",eSe="AutomatedReasoningPolicyBuildWorkflowDocumentList",tSe="AutomatedReasoningPolicyBuildWorkflowRepairContent",rSe="AutomatedReasoningPolicyBuildWorkflowSource",nSe="AutomatedReasoningPolicyBuildWorkflowSummary",oSe="AutomatedReasoningPolicyBuildWorkflowSummaries",iSe="AutomatedReasoningPolicyDescription",sSe="AutomatedReasoningPolicyDefinitionElement",aSe="AutomatedReasoningPolicyDefinitionQualityReport",cSe="AutomatedReasoningPolicyDefinitionRule",uSe="AutomatedReasoningPolicyDeleteRuleAnnotation",lSe="AutomatedReasoningPolicyDefinitionRuleAlternateExpression",dSe="AutomatedReasoningPolicyDefinitionRuleExpression",pSe="AutomatedReasoningPolicyDefinitionRuleList",mSe="AutomatedReasoningPolicyDeleteRuleMutation",fSe="AutomatedReasoningPolicyDisjointRuleSet",gSe="AutomatedReasoningPolicyDisjointRuleSetList",hSe="AutomatedReasoningPolicyDefinitionType",ySe="AutomatedReasoningPolicyDeleteTypeAnnotation",_Se="AutomatedReasoningPolicyDefinitionTypeDescription",ESe="AutomatedReasoningPolicyDefinitionTypeList",SSe="AutomatedReasoningPolicyDeleteTypeMutation",vSe="AutomatedReasoningPolicyDefinitionTypeName",ASe="AutomatedReasoningPolicyDefinitionTypeNameList",RSe="AutomatedReasoningPolicyDefinitionTypeValue",PSe="AutomatedReasoningPolicyDefinitionTypeValueDescription",CSe="AutomatedReasoningPolicyDefinitionTypeValueList",TSe="AutomatedReasoningPolicyDefinitionTypeValuePair",xSe="AutomatedReasoningPolicyDefinitionTypeValuePairList",bSe="AutomatedReasoningPolicyDeleteTypeValue",ISe="AutomatedReasoningPolicyDefinitionVariable",wSe="AutomatedReasoningPolicyDeleteVariableAnnotation",$Se="AutomatedReasoningPolicyDefinitionVariableDescription",kSe="AutomatedReasoningPolicyDefinitionVariableList",DSe="AutomatedReasoningPolicyDeleteVariableMutation",MSe="AutomatedReasoningPolicyDefinitionVariableName",OSe="AutomatedReasoningPolicyDefinitionVariableNameList",NSe="AutomatedReasoningPolicyDefinition",LSe="AutomatedReasoningPolicyFidelityReport",zSe="AutomatedReasoningPolicyGenerateFidelityReportContent",USe="AutomatedReasoningPolicyGenerateFidelityReportDocumentList",BSe="AutomatedReasoningPolicyGeneratedTestCase",GSe="AutomatedReasoningPolicyGeneratedTestCaseList",FSe="AutomatedReasoningPolicyGeneratedTestCases",jSe="AutomatedReasoningPolicyIngestContentAnnotation",qSe="AutomatedReasoningPolicyJustificationList",VSe="AutomatedReasoningPolicyJustificationText",HSe="AutomatedReasoningPolicyLineText",WSe="AutomatedReasoningPolicyMutation",JSe="AutomatedReasoningPolicyName",KSe="AutomatedReasoningPolicyPlanning",ZSe="AutomatedReasoningPolicyRuleReport",XSe="AutomatedReasoningPolicyRuleReportMap",YSe="AutomatedReasoningPolicyReportSourceDocument",QSe="AutomatedReasoningPolicyReportSourceDocumentList",eve="AutomatedReasoningPolicyScenario",tve="AutomatedReasoningPolicyScenarioAlternateExpression",rve="AutomatedReasoningPolicySourceDocument",nve="AutomatedReasoningPolicyScenarioExpression",ove="AutomatedReasoningPolicyStatementLocation",ive="AutomatedReasoningPolicyScenarioList",sve="AutomatedReasoningPolicyStatementReference",ave="AutomatedReasoningPolicyStatementReferenceList",cve="AutomatedReasoningPolicyStatementText",uve="AutomatedReasoningPolicyScenarios",lve="AutomatedReasoningPolicySummary",dve="AutomatedReasoningPolicySummaries",pve="AutomatedReasoningPolicyTestCase",mve="AutomatedReasoningPolicyTestCaseList",fve="AutomatedReasoningPolicyTestGuardContent",gve="AutomatedReasoningPolicyTestList",hve="AutomatedReasoningPolicyTestQueryContent",yve="AutomatedReasoningPolicyTestResult",_ve="AutomatedReasoningPolicyTypeValueAnnotation",Eve="AutomatedReasoningPolicyTypeValueAnnotationList",Sve="AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation",vve="AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation",Ave="AutomatedReasoningPolicyUpdateRuleAnnotation",Rve="AutomatedReasoningPolicyUpdateRuleMutation",Pve="AutomatedReasoningPolicyUpdateTypeAnnotation",Cve="AutomatedReasoningPolicyUpdateTypeMutation",Tve="AutomatedReasoningPolicyUpdateTypeValue",xve="AutomatedReasoningPolicyUpdateVariableAnnotation",bve="AutomatedReasoningPolicyUpdateVariableMutation",Ive="AutomatedReasoningPolicyVariableReport",wve="AutomatedReasoningPolicyVariableReportMap",$ve="AutomatedReasoningPolicyWorkflowTypeContent",kve="ByteContentBlob",Dve="ByteContentDoc",Mve="BatchDeleteEvaluationJob",Ove="BatchDeleteEvaluationJobError",Nve="BatchDeleteEvaluationJobErrors",Lve="BatchDeleteEvaluationJobItem",zve="BatchDeleteEvaluationJobItems",Uve="BatchDeleteEvaluationJobRequest",Bve="BatchDeleteEvaluationJobResponse",Gve="BedrockEvaluatorModel",Fve="BedrockEvaluatorModels",jve="CreateAutomatedReasoningPolicy",qve="CancelAutomatedReasoningPolicyBuildWorkflow",Vve="CancelAutomatedReasoningPolicyBuildWorkflowRequest",Hve="CancelAutomatedReasoningPolicyBuildWorkflowResponse",Wve="CreateAutomatedReasoningPolicyRequest",Jve="CreateAutomatedReasoningPolicyResponse",Kve="CreateAutomatedReasoningPolicyTestCase",Zve="CreateAutomatedReasoningPolicyTestCaseRequest",Xve="CreateAutomatedReasoningPolicyTestCaseResponse",Yve="CreateAutomatedReasoningPolicyVersion",Qve="CreateAutomatedReasoningPolicyVersionRequest",eAe="CreateAutomatedReasoningPolicyVersionResponse",tAe="CustomizationConfig",rAe="CreateCustomModel",nAe="CreateCustomModelDeployment",oAe="CreateCustomModelDeploymentRequest",iAe="CreateCustomModelDeploymentResponse",sAe="CreateCustomModelRequest",aAe="CreateCustomModelResponse",cAe="ConflictException",uAe="CreateEvaluationJob",lAe="CreateEvaluationJobRequest",dAe="CreateEvaluationJobResponse",pAe="CreateFoundationModelAgreement",mAe="CreateFoundationModelAgreementRequest",fAe="CreateFoundationModelAgreementResponse",gAe="CreateGuardrail",hAe="CreateGuardrailRequest",yAe="CreateGuardrailResponse",_Ae="CreateGuardrailVersion",EAe="CreateGuardrailVersionRequest",SAe="CreateGuardrailVersionResponse",vAe="CreateInferenceProfile",AAe="CreateInferenceProfileRequest",RAe="CreateInferenceProfileResponse",PAe="CustomMetricBedrockEvaluatorModel",CAe="CustomMetricBedrockEvaluatorModels",TAe="CreateModelCopyJob",xAe="CreateModelCopyJobRequest",bAe="CreateModelCopyJobResponse",IAe="CreateModelCustomizationJobRequest",wAe="CreateModelCustomizationJobResponse",$Ae="CreateModelCustomizationJob",kAe="CustomMetricDefinition",DAe="CustomModelDeploymentSummary",MAe="CustomModelDeploymentSummaryList",OAe="CustomModelDeploymentUpdateDetails",NAe="CustomMetricEvaluatorModelConfig",LAe="CreateModelImportJob",zAe="CreateModelImportJobRequest",UAe="CreateModelImportJobResponse",BAe="CreateModelInvocationJobRequest",GAe="CreateModelInvocationJobResponse",FAe="CreateModelInvocationJob",jAe="CreateMarketplaceModelEndpoint",qAe="CreateMarketplaceModelEndpointRequest",VAe="CreateMarketplaceModelEndpointResponse",HAe="CustomModelSummary",WAe="CustomModelSummaryList",JAe="CustomModelUnits",KAe="CreateProvisionedModelThroughput",ZAe="CreateProvisionedModelThroughputRequest",XAe="CreateProvisionedModelThroughputResponse",YAe="CreatePromptRouter",QAe="CreatePromptRouterRequest",eRe="CreatePromptRouterResponse",tRe="CloudWatchConfig",rRe="DeleteAutomatedReasoningPolicy",nRe="DeleteAutomatedReasoningPolicyBuildWorkflow",oRe="DeleteAutomatedReasoningPolicyBuildWorkflowRequest",iRe="DeleteAutomatedReasoningPolicyBuildWorkflowResponse",sRe="DeleteAutomatedReasoningPolicyRequest",aRe="DeleteAutomatedReasoningPolicyResponse",cRe="DeleteAutomatedReasoningPolicyTestCase",uRe="DeleteAutomatedReasoningPolicyTestCaseRequest",lRe="DeleteAutomatedReasoningPolicyTestCaseResponse",dRe="DistillationConfig",pRe="DeleteCustomModel",mRe="DeleteCustomModelDeployment",fRe="DeleteCustomModelDeploymentRequest",gRe="DeleteCustomModelDeploymentResponse",hRe="DeleteCustomModelRequest",yRe="DeleteCustomModelResponse",_Re="DeleteEnforcedGuardrailConfiguration",ERe="DeleteEnforcedGuardrailConfigurationRequest",SRe="DeleteEnforcedGuardrailConfigurationResponse",vRe="DeleteFoundationModelAgreement",ARe="DeleteFoundationModelAgreementRequest",RRe="DeleteFoundationModelAgreementResponse",PRe="DeleteGuardrail",CRe="DeleteGuardrailRequest",TRe="DeleteGuardrailResponse",xRe="DeleteImportedModel",bRe="DeleteImportedModelRequest",IRe="DeleteImportedModelResponse",wRe="DeleteInferenceProfile",$Re="DeleteInferenceProfileRequest",kRe="DeleteInferenceProfileResponse",DRe="DeleteModelInvocationLoggingConfiguration",MRe="DeleteModelInvocationLoggingConfigurationRequest",ORe="DeleteModelInvocationLoggingConfigurationResponse",NRe="DeleteMarketplaceModelEndpoint",LRe="DeleteMarketplaceModelEndpointRequest",zRe="DeleteMarketplaceModelEndpointResponse",URe="DeregisterMarketplaceModelEndpointRequest",BRe="DeregisterMarketplaceModelEndpointResponse",GRe="DeregisterMarketplaceModelEndpoint",FRe="DataProcessingDetails",jRe="DeleteProvisionedModelThroughput",qRe="DeleteProvisionedModelThroughputRequest",VRe="DeleteProvisionedModelThroughputResponse",HRe="DimensionalPriceRate",WRe="DeletePromptRouterRequest",JRe="DeletePromptRouterResponse",KRe="DeletePromptRouter",ZRe="ExportAutomatedReasoningPolicyVersion",XRe="ExportAutomatedReasoningPolicyVersionRequest",YRe="ExportAutomatedReasoningPolicyVersionResponse",QRe="EvaluationBedrockModel",ePe="EndpointConfig",tPe="EvaluationConfig",rPe="EvaluationDataset",nPe="EvaluationDatasetLocation",oPe="EvaluationDatasetMetricConfig",iPe="EvaluationDatasetMetricConfigs",sPe="EvaluationDatasetName",aPe="EvaluationInferenceConfig",cPe="EvaluationInferenceConfigSummary",uPe="EvaluationJobDescription",lPe="EvaluationJobIdentifier",dPe="EvaluationJobIdentifiers",pPe="EvaluationModelConfigs",mPe="EvaluationModelConfigSummary",fPe="EvaluationModelConfig",gPe="EvaluatorModelConfig",hPe="EvaluationMetricDescription",yPe="EvaluationModelInferenceParams",_Pe="EvaluationMetricName",EPe="EvaluationMetricNames",SPe="EvaluationOutputDataConfig",vPe="EvaluationPrecomputedInferenceSource",APe="EvaluationPrecomputedRetrieveAndGenerateSourceConfig",RPe="EvaluationPrecomputedRetrieveSourceConfig",PPe="EvaluationPrecomputedRagSourceConfig",CPe="EvaluationRagConfigSummary",TPe="EvaluationSummary",xPe="ExternalSourcesGenerationConfiguration",bPe="ExternalSourcesRetrieveAndGenerateConfiguration",IPe="EvaluationSummaries",wPe="ExternalSource",$Pe="ExternalSources",kPe="FilterAttribute",DPe="FieldForReranking",MPe="FieldsForReranking",OPe="FoundationModelDetails",NPe="FoundationModelLifecycle",LPe="FoundationModelSummary",zPe="FoundationModelSummaryList",UPe="GuardrailAutomatedReasoningPolicy",BPe="GetAutomatedReasoningPolicyAnnotations",GPe="GetAutomatedReasoningPolicyAnnotationsRequest",FPe="GetAutomatedReasoningPolicyAnnotationsResponse",jPe="GetAutomatedReasoningPolicyBuildWorkflow",qPe="GetAutomatedReasoningPolicyBuildWorkflowRequest",VPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssets",HPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest",WPe="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse",JPe="GetAutomatedReasoningPolicyBuildWorkflowResponse",KPe="GuardrailAutomatedReasoningPolicyConfig",ZPe="GetAutomatedReasoningPolicyNextScenario",XPe="GetAutomatedReasoningPolicyNextScenarioRequest",YPe="GetAutomatedReasoningPolicyNextScenarioResponse",QPe="GetAutomatedReasoningPolicyRequest",eCe="GetAutomatedReasoningPolicyResponse",tCe="GetAutomatedReasoningPolicyTestCase",rCe="GetAutomatedReasoningPolicyTestCaseRequest",nCe="GetAutomatedReasoningPolicyTestCaseResponse",oCe="GetAutomatedReasoningPolicyTestResult",iCe="GetAutomatedReasoningPolicyTestResultRequest",sCe="GetAutomatedReasoningPolicyTestResultResponse",aCe="GetAutomatedReasoningPolicy",cCe="GuardrailBlockedMessaging",uCe="GenerationConfiguration",lCe="GuardrailContentFilter",dCe="GuardrailContentFilterAction",pCe="GuardrailContentFilterConfig",mCe="GuardrailContentFiltersConfig",fCe="GuardrailContentFiltersTier",gCe="GuardrailContentFiltersTierConfig",hCe="GuardrailContentFiltersTierName",yCe="GuardrailContentFilters",_Ce="GuardrailContextualGroundingAction",ECe="GuardrailContextualGroundingFilter",SCe="GuardrailContextualGroundingFilterConfig",vCe="GuardrailContextualGroundingFiltersConfig",ACe="GuardrailContextualGroundingFilters",RCe="GuardrailContextualGroundingPolicy",PCe="GuardrailContextualGroundingPolicyConfig",CCe="GetCustomModel",TCe="GetCustomModelDeployment",xCe="GetCustomModelDeploymentRequest",bCe="GetCustomModelDeploymentResponse",ICe="GetCustomModelRequest",wCe="GetCustomModelResponse",$Ce="GuardrailContentPolicy",kCe="GuardrailContentPolicyConfig",DCe="GuardrailCrossRegionConfig",MCe="GuardrailCrossRegionDetails",OCe="GraderConfig",NCe="GuardrailConfiguration",LCe="GuardrailDescription",zCe="GetEvaluationJob",UCe="GetEvaluationJobRequest",BCe="GetEvaluationJobResponse",GCe="GetFoundationModel",FCe="GetFoundationModelAvailability",jCe="GetFoundationModelAvailabilityRequest",qCe="GetFoundationModelAvailabilityResponse",VCe="GetFoundationModelRequest",HCe="GetFoundationModelResponse",WCe="GuardrailFailureRecommendation",JCe="GuardrailFailureRecommendations",KCe="GetGuardrail",ZCe="GetGuardrailRequest",XCe="GetGuardrailResponse",YCe="GetImportedModel",QCe="GetImportedModelRequest",eTe="GetImportedModelResponse",tTe="GetInferenceProfile",rTe="GetInferenceProfileRequest",nTe="GetInferenceProfileResponse",oTe="GuardrailModality",iTe="GetModelCopyJob",sTe="GetModelCopyJobRequest",aTe="GetModelCopyJobResponse",cTe="GetModelCustomizationJobRequest",uTe="GetModelCustomizationJobResponse",lTe="GetModelCustomizationJob",dTe="GetModelImportJob",pTe="GetModelImportJobRequest",mTe="GetModelImportJobResponse",fTe="GetModelInvocationJobRequest",gTe="GetModelInvocationJobResponse",hTe="GetModelInvocationJob",yTe="GetModelInvocationLoggingConfiguration",_Te="GetModelInvocationLoggingConfigurationRequest",ETe="GetModelInvocationLoggingConfigurationResponse",STe="GetMarketplaceModelEndpoint",vTe="GetMarketplaceModelEndpointRequest",ATe="GetMarketplaceModelEndpointResponse",RTe="GuardrailManagedWords",PTe="GuardrailManagedWordsConfig",CTe="GuardrailManagedWordLists",TTe="GuardrailManagedWordListsConfig",xTe="GuardrailModalities",bTe="GuardrailName",ITe="GuardrailPiiEntity",wTe="GuardrailPiiEntityConfig",$Te="GuardrailPiiEntitiesConfig",kTe="GuardrailPiiEntities",DTe="GetProvisionedModelThroughput",MTe="GetProvisionedModelThroughputRequest",OTe="GetProvisionedModelThroughputResponse",NTe="GetPromptRouter",LTe="GetPromptRouterRequest",zTe="GetPromptRouterResponse",UTe="GuardrailRegex",BTe="GuardrailRegexConfig",GTe="GuardrailRegexesConfig",FTe="GuardrailRegexes",jTe="GuardrailSummary",qTe="GuardrailSensitiveInformationPolicy",VTe="GuardrailSensitiveInformationPolicyConfig",HTe="GuardrailStatusReason",WTe="GuardrailStatusReasons",JTe="GuardrailSummaries",KTe="GuardrailTopic",ZTe="GuardrailTopicAction",XTe="GuardrailTopicConfig",YTe="GuardrailTopicsConfig",QTe="GuardrailTopicDefinition",exe="GuardrailTopicExample",txe="GuardrailTopicExamples",rxe="GuardrailTopicName",nxe="GuardrailTopicPolicy",oxe="GuardrailTopicPolicyConfig",ixe="GuardrailTopicsTier",sxe="GuardrailTopicsTierConfig",axe="GuardrailTopicsTierName",cxe="GuardrailTopics",uxe="GetUseCaseForModelAccess",lxe="GetUseCaseForModelAccessRequest",dxe="GetUseCaseForModelAccessResponse",pxe="GuardrailWord",mxe="GuardrailWordAction",fxe="GuardrailWordConfig",gxe="GuardrailWordsConfig",hxe="GuardrailWordPolicy",yxe="GuardrailWordPolicyConfig",_xe="GuardrailWords",Exe="HumanEvaluationConfig",Sxe="HumanEvaluationCustomMetric",vxe="HumanEvaluationCustomMetrics",Axe="HumanTaskInstructions",Rxe="HumanWorkflowConfig",Pxe="Identifier",Cxe="ImplicitFilterConfiguration",Txe="InvocationLogsConfig",xxe="InvocationLogSource",bxe="ImportedModelSummary",Ixe="ImportedModelSummaryList",wxe="InferenceProfileDescription",$xe="InferenceProfileModel",kxe="InferenceProfileModelSource",Dxe="InferenceProfileModels",Mxe="InferenceProfileSummary",Oxe="InferenceProfileSummaries",Nxe="InternalServerException",Lxe="KnowledgeBaseConfig",zxe="KnowledgeBaseRetrieveAndGenerateConfiguration",Uxe="KnowledgeBaseRetrievalConfiguration",Bxe="KnowledgeBaseVectorSearchConfiguration",Gxe="KbInferenceConfig",Fxe="ListAutomatedReasoningPolicies",jxe="ListAutomatedReasoningPolicyBuildWorkflows",qxe="ListAutomatedReasoningPolicyBuildWorkflowsRequest",Vxe="ListAutomatedReasoningPolicyBuildWorkflowsResponse",Hxe="ListAutomatedReasoningPoliciesRequest",Wxe="ListAutomatedReasoningPoliciesResponse",Jxe="ListAutomatedReasoningPolicyTestCases",Kxe="ListAutomatedReasoningPolicyTestCasesRequest",Zxe="ListAutomatedReasoningPolicyTestCasesResponse",Xxe="ListAutomatedReasoningPolicyTestResults",Yxe="ListAutomatedReasoningPolicyTestResultsRequest",Qxe="ListAutomatedReasoningPolicyTestResultsResponse",e0e="LoggingConfig",t0e="ListCustomModels",r0e="ListCustomModelDeployments",n0e="ListCustomModelDeploymentsRequest",o0e="ListCustomModelDeploymentsResponse",i0e="ListCustomModelsRequest",s0e="ListCustomModelsResponse",a0e="ListEnforcedGuardrailsConfiguration",c0e="ListEnforcedGuardrailsConfigurationRequest",u0e="ListEnforcedGuardrailsConfigurationResponse",l0e="ListEvaluationJobs",d0e="ListEvaluationJobsRequest",p0e="ListEvaluationJobsResponse",m0e="ListFoundationModels",f0e="ListFoundationModelAgreementOffers",g0e="ListFoundationModelAgreementOffersRequest",h0e="ListFoundationModelAgreementOffersResponse",y0e="ListFoundationModelsRequest",_0e="ListFoundationModelsResponse",E0e="ListGuardrails",S0e="LambdaGraderConfig",v0e="ListGuardrailsRequest",A0e="ListGuardrailsResponse",R0e="ListImportedModels",P0e="ListImportedModelsRequest",C0e="ListImportedModelsResponse",T0e="ListInferenceProfiles",x0e="ListInferenceProfilesRequest",b0e="ListInferenceProfilesResponse",I0e="ListModelCopyJobs",w0e="ListModelCopyJobsRequest",$0e="ListModelCopyJobsResponse",k0e="ListModelCustomizationJobsRequest",D0e="ListModelCustomizationJobsResponse",M0e="ListModelCustomizationJobs",O0e="ListModelImportJobs",N0e="ListModelImportJobsRequest",L0e="ListModelImportJobsResponse",z0e="ListModelInvocationJobsRequest",U0e="ListModelInvocationJobsResponse",B0e="ListModelInvocationJobs",G0e="ListMarketplaceModelEndpoints",F0e="ListMarketplaceModelEndpointsRequest",j0e="ListMarketplaceModelEndpointsResponse",q0e="ListProvisionedModelThroughputs",V0e="ListProvisionedModelThroughputsRequest",H0e="ListProvisionedModelThroughputsResponse",W0e="ListPromptRouters",J0e="ListPromptRoutersRequest",K0e="ListPromptRoutersResponse",Z0e="LegalTerm",X0e="ListTagsForResource",Y0e="ListTagsForResourceRequest",Q0e="ListTagsForResourceResponse",ebe="Message",tbe="MetadataAttributeSchema",rbe="MetadataAttributeSchemaList",nbe="MetadataConfigurationForReranking",obe="ModelCopyJobSummary",ibe="ModelCustomizationJobSummary",sbe="ModelCopyJobSummaries",abe="ModelCustomizationJobSummaries",cbe="ModelDataSource",ube="ModelEnforcement",lbe="ModelInvocationJobInputDataConfig",dbe="ModelInvocationJobOutputDataConfig",pbe="ModelImportJobSummary",mbe="ModelInvocationJobS3InputDataConfig",fbe="ModelInvocationJobS3OutputDataConfig",gbe="ModelInvocationJobSummary",hbe="ModelImportJobSummaries",ybe="ModelInvocationJobSummaries",_be="MarketplaceModelEndpoint",Ebe="MarketplaceModelEndpointSummary",Sbe="MarketplaceModelEndpointSummaries",vbe="MetricName",Abe="Offer",Rbe="OrchestrationConfiguration",Pbe="OutputDataConfig",Cbe="Offers",Tbe="PerformanceConfiguration",xbe="PutEnforcedGuardrailConfiguration",bbe="PutEnforcedGuardrailConfigurationRequest",Ibe="PutEnforcedGuardrailConfigurationResponse",wbe="PutModelInvocationLoggingConfiguration",$be="PutModelInvocationLoggingConfigurationRequest",kbe="PutModelInvocationLoggingConfigurationResponse",Dbe="ProvisionedModelSummary",Mbe="ProvisionedModelSummaries",Obe="PromptRouterDescription",Nbe="PromptRouterSummary",Lbe="PromptRouterSummaries",zbe="PromptRouterTargetModel",Ube="PromptRouterTargetModels",Bbe="PricingTerm",Gbe="PromptTemplate",Fbe="PutUseCaseForModelAccess",jbe="PutUseCaseForModelAccessRequest",qbe="PutUseCaseForModelAccessResponse",Vbe="QueryTransformationConfiguration",Hbe="RetrieveAndGenerateConfiguration",Wbe="RAGConfig",Jbe="RetrieveConfig",Kbe="RagConfigs",Zbe="RateCard",Xbe="RoutingCriteria",Ybe="RetrievalFilter",Qbe="RetrievalFilterList",eIe="RFTConfig",tIe="RFTHyperParameters",rIe="ResourceInUseException",nIe="RequestMetadataBaseFilters",oIe="RequestMetadataFilters",iIe="RequestMetadataFiltersList",sIe="RequestMetadataMap",aIe="RegisterMarketplaceModelEndpoint",cIe="RegisterMarketplaceModelEndpointRequest",uIe="RegisterMarketplaceModelEndpointResponse",lIe="RerankingMetadataSelectiveModeConfiguration",dIe="ResourceNotFoundException",pIe="RatingScale",mIe="RatingScaleItem",fIe="RatingScaleItemValue",gIe="StartAutomatedReasoningPolicyBuildWorkflow",hIe="StartAutomatedReasoningPolicyBuildWorkflowRequest",yIe="StartAutomatedReasoningPolicyBuildWorkflowResponse",_Ie="StartAutomatedReasoningPolicyTestWorkflow",EIe="StartAutomatedReasoningPolicyTestWorkflowRequest",SIe="StartAutomatedReasoningPolicyTestWorkflowResponse",vIe="S3Config",AIe="StatusDetails",RIe="S3DataSource",PIe="StopEvaluationJob",CIe="StopEvaluationJobRequest",TIe="StopEvaluationJobResponse",xIe="StopModelCustomizationJob",bIe="StopModelCustomizationJobRequest",IIe="StopModelCustomizationJobResponse",wIe="SageMakerEndpoint",$Ie="StopModelInvocationJob",kIe="StopModelInvocationJobRequest",DIe="StopModelInvocationJobResponse",MIe="S3ObjectDoc",OIe="ServiceQuotaExceededException",NIe="SupportTerm",LIe="ServiceUnavailableException",zIe="Tag",UIe="TermDetails",BIe="TrainingDataConfig",GIe="TrainingDetails",FIe="ThrottlingException",jIe="TextInferenceConfig",qIe="TagList",VIe="TrainingMetrics",HIe="TeacherModelConfig",WIe="TooManyTagsException",JIe="TextPromptTemplate",KIe="TagResource",ZIe="TagResourceRequest",XIe="TagResourceResponse",YIe="UpdateAutomatedReasoningPolicy",QIe="UpdateAutomatedReasoningPolicyAnnotations",ewe="UpdateAutomatedReasoningPolicyAnnotationsRequest",twe="UpdateAutomatedReasoningPolicyAnnotationsResponse",rwe="UpdateAutomatedReasoningPolicyRequest",nwe="UpdateAutomatedReasoningPolicyResponse",owe="UpdateAutomatedReasoningPolicyTestCase",iwe="UpdateAutomatedReasoningPolicyTestCaseRequest",swe="UpdateAutomatedReasoningPolicyTestCaseResponse",awe="UpdateCustomModelDeployment",cwe="UpdateCustomModelDeploymentRequest",uwe="UpdateCustomModelDeploymentResponse",lwe="UpdateGuardrail",dwe="UpdateGuardrailRequest",pwe="UpdateGuardrailResponse",mwe="UpdateMarketplaceModelEndpoint",fwe="UpdateMarketplaceModelEndpointRequest",gwe="UpdateMarketplaceModelEndpointResponse",hwe="UpdateProvisionedModelThroughput",ywe="UpdateProvisionedModelThroughputRequest",_we="UpdateProvisionedModelThroughputResponse",Ewe="UntagResource",Swe="UntagResourceRequest",vwe="UntagResourceResponse",Awe="Validator",Rwe="VpcConfig",Pwe="ValidationDetails",Cwe="ValidationDataConfig",Twe="ValidationException",xwe="ValidatorMetric",bwe="ValidationMetrics",Iwe="VectorSearchBedrockRerankingConfiguration",wwe="VectorSearchBedrockRerankingModelConfiguration",$we="VectorSearchRerankingConfiguration",kwe="ValidityTerm",Dwe="Validators",Mwe="annotation",Owe="agreementAvailability",R6="andAll",Nwe="agreementDuration",Lwe="audioDataDeliveryEnabled",P6="alternateExpression",zwe="acceptEula",l0="assetId",C6="accuracyJustification",Uwe="assetManifest",p0="additionalModelRequestFields",Bwe="assetName",T6="addRule",Gwe="addRuleFromNaturalLanguage",Fwe="automatedReasoningPolicy",jwe="automatedReasoningPolicyBuildWorkflowSummaries",x6="automatedReasoningPolicyConfig",qwe="automatedReasoningPolicySummaries",m0="accuracyScore",b6="annotationSetHash",Vwe="atomicStatements",Hwe="authorizationStatus",d0="assetType",n6="applicationTypeEquals",Wwe="aggregatedTestFindingsResult",Jwe="addTypeValue",I6="addType",f0="applicationType",w6="addVariable",Hc="action",g0="annotations",Kwe="arn",Zwe="automated",Xwe="byteContent",o6="byCustomizationType",$6="bedrockEvaluatorModels",h0="blockedInputMessaging",i6="byInferenceType",Ywe="bedrockKnowledgeBaseIdentifiers",Qwe="buildLog",e$e="bedrockModel",Iy="baseModelArn",s6="baseModelArnEquals",t$e="baseModelIdentifier",r$e="bedrockModelIdentifiers",n$e="baseModelName",o$e="bucketName",y0="blockedOutputsMessaging",a6="byOutputModality",c6="byProvider",i$e="bedrockRerankingConfiguration",s$e="buildSteps",a$e="batchSize",c$e="buildWorkflowAssets",ar="buildWorkflowId",_0="buildWorkflowType",_s="client",Mt="createdAt",u6="createdAfter",u$e="createdBy",l6="createdBefore",E0="customizationConfig",S0="commitmentDuration",k6="customerEncryptionKeyId",D6="commitmentExpirationTime",l$e="copyFrom",d$e="claimsFalseScenario",p$e="contextualGroundingPolicy",M6="contextualGroundingPolicyConfig",wy="configId",O6="customMetrics",m$e="customModelArn",f$e="customMetricConfig",g$e="customMetricDefinition",$y="customModelDeploymentArn",v0="customModelDeploymentIdentifier",h$e="customModelDeploymentName",y$e="customMetricsEvaluatorModelIdentifiers",_$e="customModelKmsKeyId",N6="customModelName",E$e="customModelTags",S$e="customModelUnits",v$e="customModelUnitsPerModelCopy",A$e="customModelUnitsVersion",R$e="contentPolicy",L6="contentPolicyConfig",z6="contradictingRules",U6="crossRegionConfig",B6="crossRegionDetails",st="clientRequestToken",P$e="conflictingRules",C$e="coverageScore",G6="customizationsSupported",Ad="confidenceThreshold",$r="creationTimeAfter",kr="creationTimeBefore",F6="claimsTrueScenario",T$e="contentType",Ht="creationTime",Rd="customizationType",x$e="cloudWatchConfig",j6="claims",b$e="confidence",I$e="code",q6="content",w$e="context",Ne="description",$$e="documentContent",A0="documentContentType",k$e="distillationConfig",R0="documentDescription",V6="documentHash",ky="definitionHash",H6="documentId",D$e="datasetLocation",W6="desiredModelArn",J6="datasetMetricConfigs",M$e="desiredModelId",K6="desiredModelUnits",Dy="documentName",O$e="dataProcessingDetails",N$e="desiredProvisionedModelName",Z6="deleteRule",L$e="disjointRuleSets",z$e="differenceScenarios",U$e="documentSources",X6="deleteType",B$e="deleteTypeValue",Y6="deleteVariable",G$e="data",F$e="dataset",P0="definition",j$e="dimension",C0="document",Q6="documents",To="error",Wc="endpointArn",My="expectedAggregatedFindingsResult",q$e="entitlementAvailability",eq="evaluationConfig",T0="endpointConfig",V$e="epochCount",H$e="embeddingDataDeliveryEnabled",W$e="endpointIdentifier",J$e="evalInterval",K$e="evaluationJobs",Z$e="errorMessage",tq="evaluatorModelConfig",X$e="evaluatorModelIdentifiers",Y$e="excludedModels",Q$e="endpointName",eke="endOfLifeTime",tke="expectedResult",rke="executionRole",nke="endpointStatus",oke="externalSourcesConfiguration",ike="endpointStatusMessage",Jc="endTime",ske="evaluationTaskTypes",rq="entries",nq="enabled",x0="equals",ake="errors",Oy="expression",oq="examples",iq="feedback",sq="filtersConfig",aq="formData",cke="flowDefinitionArn",b0="fallbackModel",cq="foundationModelArn",d6="foundationModelArnEquals",Es="failureMessage",uke="failureMessages",lke="fieldName",dke="failureRecommendations",pke="fidelityReport",mke="fieldsToExclude",fke="fieldsToInclude",gke="floatValue",uq="filters",hke="filter",p6="force",yke="guardrails",Ny="guardrailArn",Ly="guardContent",lq="generationConfiguration",_ke="graderConfig",dq="guardrailConfiguration",Eke="guardrailsConfig",Ske="generateFidelityReportContent",Aa="guardrailIdentifier",vke="guardrailInferenceConfig",Kc="guardrailId",pq="groundingJustifications",Ake="guardrailProfileArn",Rke="guardrailProfileIdentifier",Pke="guardrailProfileId",mq="groundingStatements",Cke="greaterThan",fq="generatedTestCases",Tke="greaterThanOrEquals",Ra="guardrailVersion",xke="human",xo="httpError",bke="httpHeader",zy="hyperParameters",F="httpQuery",Ike="humanWorkflowConfig",W="http",Pd="id",yn="inputAction",gq="inferenceConfig",wke="inferenceConfigSummary",$ke="ingestContent",I0="inputDataConfig",kke="imageDataDeliveryEnabled",_n="inputEnabled",Dke="implicitFilterConfiguration",Mke="initialInstanceCount",Oke="invocationJobSummaries",Nke="invocationLogsConfig",Lke="invocationLogSource",Uy="inputModalities",hq="importedModelArn",zke="importedModelKmsKeyArn",Uke="importedModelKmsKeyId",w0="importedModelName",Bke="importedModelTags",Gke="inferenceMaxTokens",Fke="includedModels",m6="isOwned",jke="inferenceParams",$0="inferenceProfileArn",yq="inferenceProfileIdentifier",_q="inferenceProfileId",k0="inferenceProfileName",qke="inferenceProfileSummaries",Eq="instructSupported",Vke="inferenceSourceIdentifier",Sq="inputStrength",vq="inputTags",Aq="inferenceTypesSupported",Hke="idempotencyToken",Wke="instanceType",Jke="identifier",Kke="impossible",Rq="instructions",Zke="in",Xke="invalid",Gt="jobArn",Pq="jobDescription",Cq="jobExpirationTime",gi="jobIdentifier",Yke="jobIdentifiers",Mr="jobName",Qke="jobStatus",eDe="jobSummaries",D0="jobTags",Tq="jobType",M0="key",tDe="knowledgeBaseConfiguration",rDe="knowledgeBaseConfig",xq="knowledgeBaseId",nDe="knowledgeBaseRetrievalConfiguration",oDe="kmsEncryptionKey",bq="kbInferenceConfig",Iq="kmsKeyArn",O0="kmsKeyId",iDe="keyPrefix",sDe="logic",aDe="lambdaArn",wq="loggingConfig",cDe="listContains",uDe="largeDataDeliveryS3Config",lDe="lambdaGrader",dDe="logGroupName",En="lastModifiedTime",pDe="lineNumber",mDe="learningRate",fDe="lineText",gDe="lessThanOrEquals",hDe="legacyTime",yDe="legalTerm",_De="lessThan",Cd="lastUpdatedAt",EDe="lastUpdatedAnnotationSetHash",SDe="lastUpdatedDefinitionHash",By="logicWarning",vDe="latency",ADe="lines",RDe="line",PDe="location",Or="message",Tt="modelArn",Ry="modelArnEquals",CDe="metadataAttributes",$q="modelArchitecture",TDe="modelConfiguration",xDe="modelCopyJobSummaries",bDe="modelCustomizationJobSummaries",IDe="modelConfigSummary",wDe="metadataConfiguration",$De="modelDetails",kq="modelDeploymentName",N0="modelDataSource",kDe="modelDeploymentSummaries",Dq="modelEnforcement",Ss="modelIdentifier",DDe="modelImportJobSummaries",L0="modelInvocationType",Yr="modelId",MDe="modelIdentifiers",z0="modelKmsKeyArn",ODe="modelKmsKeyId",Mq="modelLifecycle",Gy="marketplaceModelEndpoint",NDe="marketplaceModelEndpoints",Pa="modelName",LDe="metricNames",zDe="maxPromptLength",Oe="maxResults",UDe="maxResponseLengthForInference",BDe="modelSource",GDe="modelSourceConfig",FDe="modelSourceEquals",Td="modelSourceIdentifier",Py="modelStatus",U0="modelSummaries",jDe="messageType",qDe="maxTokens",VDe="modelTags",B0="modelUnits",HDe="managedWordLists",WDe="managedWordListsConfig",JDe="messages",Zc="models",KDe="mutation",He="name",sr="nameContains",G0="notEquals",ZDe="notIn",Oq="naturalLanguage",Nq="newName",XDe="numberOfResults",YDe="numberOfRerankedResults",ae="nextToken",QDe="noTranslations",eMe="newValue",tMe="owner",Sn="outputAction",rMe="ownerAccountId",Lq="orAll",nMe="orchestrationConfiguration",vs="outputDataConfig",vn="outputEnabled",oMe="offerId",Fy="outputModalities",iMe="outputModelArn",sMe="outputModelKmsKeyArn",aMe="outputModelName",cMe="outputModelNameContains",zq="outputStrength",uMe="overrideSearchType",Uq="offerToken",f6="offerType",lMe="offers",dMe="options",Bq="premises",Ce="policyArn",pMe="performanceConfig",xd="policyDefinition",mMe="policyDefinitionRule",fMe="policyDefinitionType",gMe="policyDefinitionVariable",hMe="priorElement",yMe="publicExtendedAccessTime",_Me="piiEntitiesConfig",EMe="piiEntities",Gq="policyId",SMe="precomputedInferenceSource",vMe="precomputedInferenceSourceIdentifiers",F0="provisionedModelArn",j0="provisionedModelId",q0="provisionedModelName",AMe="provisionedModelSummaries",RMe="pageNumber",Fq="providerName",bd="promptRouterArn",PMe="policyRepairAssets",V0="promptRouterName",CMe="promptRouterSummaries",TMe="precomputedRagSourceConfig",xMe="precomputedRagSourceIdentifiers",jq="policyScenarios",qq="promptTemplate",bMe="policyVariable",IMe="policyVersionArn",Vq="pattern",wMe="planning",Hq="policies",$Me="price",jy="queryContent",kMe="qualityReport",DMe="queryTransformationConfiguration",H0="rule",Vn="roleArn",MMe="retrieveAndGenerateConfig",OMe="retrieveAndGenerateSourceConfig",W0="resourceARN",NMe="regionAvailability",LMe="ruleCount",zMe="ragConfigSummary",UMe="rateCard",BMe="ragConfigs",GMe="regexesConfig",FMe="rerankingConfiguration",jMe="retrievalConfiguration",qMe="retrieveConfig",VMe="rftConfig",J0="routingCriteria",HMe="reasoningEffort",Wq="ruleId",WMe="ragIdentifiers",K0="ruleIds",JMe="ratingMethod",KMe="requestMetadataFilters",ZMe="resourceName",XMe="refundPolicyDescription",YMe="responseQualityDifference",QMe="ruleReports",eOe="ratingScale",tOe="retrieveSourceConfig",Jq="ragSourceIdentifier",Kq="responseStreamingSupported",rOe="regexes",Zq="rules",Xq="smithy.ts.sdk.synthetic.com.amazonaws.bedrock",g6="sourceAccountEquals",Yq="sourceAccountId",Ut="sortBy",Qq="s3BucketOwner",nOe="s3Config",oOe="sourceContent",iOe="stringContains",eV="statusDetails",sOe="s3DataSource",aOe="scenarioExpression",cOe="s3EncryptionKeyId",Dr="statusEquals",uOe="securityGroupIds",lOe="statementId",dOe="s3InputDataConfig",pOe="s3InputFormat",mOe="sensitiveInformationPolicy",tV="sensitiveInformationPolicyConfig",fOe="subnetIds",gOe="s3Location",rV="statusMessage",Z0="sourceModelArn",h6="sourceModelArnEquals",hOe="selectiveModeConfiguration",nV="sourceModelName",yOe="sageMaker",_Oe="selectionMode",Bt="sortOrder",EOe="s3OutputDataConfig",SOe="startOfLifeTime",vOe="supportingRules",AOe="statusReasons",ROe="stopSequences",POe="sourceType",y6="submitTimeAfter",_6="submitTimeBefore",oV="submitTime",COe="supportTerm",hi="s3Uri",TOe="stringValue",xOe="startsWith",bOe="satisfiable",IOe="scenario",iV="server",wOe="sources",qe="status",$Oe="statements",qy="translation",kOe="translationAmbiguous",DOe="typeCount",Ca="testCaseId",MOe="testCaseIds",sV="testCase",OOe="testCases",aV="tierConfig",NOe="topicsConfig",LOe="tooComplex",zOe="termDetails",X0="trainingDataConfig",UOe="textDataDeliveryEnabled",Y0="timeoutDurationInHours",BOe="trainingDetails",GOe="typeEquals",FOe="testFindings",jOe="textInferenceConfig",qOe="tagKeys",VOe="trainingLoss",cV="trainingMetrics",uV="targetModelArn",HOe="teacherModelConfig",WOe="teacherModelIdentifier",lV="targetModelKmsKeyArn",Q0="targetModelName",JOe="targetModelNameContains",eb="targetModelTags",KOe="typeName",Vy="tierName",ZOe="topicPolicy",dV="topicPolicyConfig",XOe="textPromptTemplate",YOe="topP",QOe="testResult",eNe="testRunResult",tNe="testRunStatus",rNe="testResults",nNe="trainingSamplePerPrompt",oNe="taskType",Hn="tags",Hy="text",iNe="temperature",pV="threshold",mV="tier",sNe="topics",aNe="translations",Qe="type",cNe="types",uNe="unit",at="updatedAt",fV="updatedBy",lNe="usageBasedPricingTerm",dNe="untranslatedClaims",pNe="updateDetails",mNe="updateFromRulesFeedback",fNe="updateFromScenarioFeedback",gNe="untranslatedPremises",hNe="usePromptResponse",gV="updateRule",yNe="updateStatus",_Ne="unusedTypes",ENe="unusedTypeValues",SNe="updateTypeValue",hV="updateType",vNe="unusedVariables",yV="updateVariable",ANe="url",RNe="uri",tb="values",PNe="variableCount",Ta="vpcConfig",CNe="validationDetails",rb="validationDataConfig",TNe="videoDataDeliveryEnabled",xNe="validationLoss",_V="validationMetrics",bNe="valueName",INe="variableReports",wNe="vectorSearchConfiguration",$Ne="validityTerm",xa="value",kNe="validators",DNe="valid",EV="variable",SV="variables",bo="version",MNe="vpc",ONe="words",NNe="workflowContent",LNe="wordsConfig",zNe="wordPolicy",vV="wordPolicyConfig",UNe="x-amz-client-token",m="com.amazonaws.bedrock",AV=(ke(),Q(Wo)),BNe=Ay(),Io=u0(),RV=AV.TypeRegistry.for(Xq);s.BedrockServiceException$=[-3,Xq,"BedrockServiceException",0,[],[]];RV.registerError(s.BedrockServiceException$,BNe.BedrockServiceException);var Wn=AV.TypeRegistry.for(m);s.AccessDeniedException$=[-3,m,U_e,{[To]:_s,[xo]:403},[Or],[0]];Wn.registerError(s.AccessDeniedException$,Io.AccessDeniedException);s.ConflictException$=[-3,m,cAe,{[To]:_s,[xo]:400},[Or],[0]];Wn.registerError(s.ConflictException$,Io.ConflictException);s.InternalServerException$=[-3,m,Nxe,{[To]:iV,[xo]:500},[Or],[0]];Wn.registerError(s.InternalServerException$,Io.InternalServerException);s.ResourceInUseException$=[-3,m,rIe,{[To]:_s,[xo]:400},[Or],[0]];Wn.registerError(s.ResourceInUseException$,Io.ResourceInUseException);s.ResourceNotFoundException$=[-3,m,dIe,{[To]:_s,[xo]:404},[Or],[0]];Wn.registerError(s.ResourceNotFoundException$,Io.ResourceNotFoundException);s.ServiceQuotaExceededException$=[-3,m,OIe,{[To]:_s,[xo]:400},[Or],[0]];Wn.registerError(s.ServiceQuotaExceededException$,Io.ServiceQuotaExceededException);s.ServiceUnavailableException$=[-3,m,LIe,{[To]:iV,[xo]:503},[Or],[0]];Wn.registerError(s.ServiceUnavailableException$,Io.ServiceUnavailableException);s.ThrottlingException$=[-3,m,FIe,{[To]:_s,[xo]:429},[Or],[0]];Wn.registerError(s.ThrottlingException$,Io.ThrottlingException);s.TooManyTagsException$=[-3,m,WIe,{[To]:_s,[xo]:400},[Or,ZMe],[0,0]];Wn.registerError(s.TooManyTagsException$,Io.TooManyTagsException);s.ValidationException$=[-3,m,Twe,{[To]:_s,[xo]:400},[Or],[0]];Wn.registerError(s.ValidationException$,Io.ValidationException);s.errorTypeRegistries=[RV,Wn];var GNe=[0,m,fEe,8,0],PV=[0,m,hEe,8,0],CV=[0,m,AEe,8,0],FNe=[0,m,REe,8,0],jNe=[0,m,IEe,8,0],TV=[0,m,LEe,8,21],nb=[0,m,zEe,8,0],Wy=[0,m,UEe,8,0],qNe=[0,m,WEe,8,0],VNe=[0,m,lSe,8,0],ob=[0,m,dSe,8,0],ib=[0,m,_Se,8,0],Co=[0,m,vSe,8,0],sb=[0,m,PSe,8,0],ab=[0,m,$Se,8,0],fi=[0,m,MSe,8,0],Xc=[0,m,iSe,8,0],cb=[0,m,VSe,8,0],HNe=[0,m,HSe,8,0],As=[0,m,JSe,8,0],WNe=[0,m,tve,8,0],xV=[0,m,nve,8,0],JNe=[0,m,cve,8,0],Jy=[0,m,fve,8,0],Ky=[0,m,hve,8,0],KNe=[0,m,kve,8,21],ZNe=[0,m,sPe,8,0],bV=[0,m,uPe,8,0],Id=[0,m,lPe,8,0],XNe=[0,m,hPe,8,0],IV=[0,m,_Pe,8,0],YNe=[0,m,yPe,8,0],Vc=[0,m,cCe,8,0],Cy=[0,m,dCe,8,0],wV=[0,m,hCe,8,0],$V=[0,m,_Ce,8,0],wd=[0,m,LCe,8,0],QNe=[0,m,WCe,8,0],e1e=[0,m,oTe,8,0],Zy=[0,m,bTe,8,0],t1e=[0,m,HTe,8,0],Ty=[0,m,ZTe,8,0],kV=[0,m,QTe,8,0],r1e=[0,m,exe,8,0],DV=[0,m,rxe,8,0],MV=[0,m,axe,8,0],ys=[0,m,mxe,8,0],n1e=[0,m,Axe,8,0],o1e=[0,m,Pxe,8,0],ub=[0,m,wxe,8,0],OV=[0,m,ebe,8,0],i1e=[0,m,vbe,8,0],lb=[0,m,Obe,8,0],s1e=[0,m,JIe,8,0];s.AccountEnforcedGuardrailInferenceInputConfiguration$=[3,m,q_e,0,[Aa,Ra,vq,Dq],[0,0,0,()=>s.ModelEnforcement$],3];s.AccountEnforcedGuardrailOutputConfiguration$=[3,m,V_e,0,[wy,Ny,Kc,vq,Ra,Mt,u$e,at,fV,tMe,Dq],[0,0,0,0,0,5,0,5,0,0,()=>s.ModelEnforcement$]];s.AgreementAvailability$=[3,m,z_e,0,[qe,Z$e],[0,0],1];s.AutomatedEvaluationConfig$=[3,m,B_e,0,[J6,tq,f$e],[[()=>BV,0],()=>s.EvaluatorModelConfig$,[()=>s.AutomatedEvaluationCustomMetricConfig$,0]],1];s.AutomatedEvaluationCustomMetricConfig$=[3,m,F_e,0,[O6,tq],[[()=>c1e,0],()=>s.CustomMetricEvaluatorModelConfig$],2];s.AutomatedReasoningCheckImpossibleFinding$=[3,m,Z_e,0,[qy,z6,By],[[()=>s.AutomatedReasoningCheckTranslation$,0],()=>db,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckInputTextReference$=[3,m,Y_e,0,[Hy],[[()=>PV,0]]];s.AutomatedReasoningCheckInvalidFinding$=[3,m,X_e,0,[qy,z6,By],[[()=>s.AutomatedReasoningCheckTranslation$,0],()=>db,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckLogicWarning$=[3,m,eEe,0,[Qe,Bq,j6],[0,[()=>vd,0],[()=>vd,0]]];s.AutomatedReasoningCheckNoTranslationsFinding$=[3,m,tEe,0,[],[]];s.AutomatedReasoningCheckRule$=[3,m,rEe,0,[Pd,IMe],[0,0]];s.AutomatedReasoningCheckSatisfiableFinding$=[3,m,iEe,0,[qy,F6,d$e,By],[[()=>s.AutomatedReasoningCheckTranslation$,0],[()=>s.AutomatedReasoningCheckScenario$,0],[()=>s.AutomatedReasoningCheckScenario$,0],[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningCheckScenario$=[3,m,oEe,0,[$Oe],[[()=>vd,0]]];s.AutomatedReasoningCheckTooComplexFinding$=[3,m,cEe,0,[],[]];s.AutomatedReasoningCheckTranslation$=[3,m,sEe,0,[j6,b$e,Bq,gNe,dNe],[[()=>vd,0],1,[()=>vd,0],[()=>E6,0],[()=>E6,0]],2];s.AutomatedReasoningCheckTranslationAmbiguousFinding$=[3,m,aEe,0,[dMe,z$e],[[()=>p1e,0],[()=>u1e,0]]];s.AutomatedReasoningCheckTranslationOption$=[3,m,lEe,0,[aNe],[[()=>d1e,0]]];s.AutomatedReasoningCheckValidFinding$=[3,m,pEe,0,[qy,F6,vOe,By],[[()=>s.AutomatedReasoningCheckTranslation$,0],[()=>s.AutomatedReasoningCheckScenario$,0],()=>db,[()=>s.AutomatedReasoningCheckLogicWarning$,0]]];s.AutomatedReasoningLogicStatement$=[3,m,mEe,0,[sDe,Oq],[[()=>GNe,0],[()=>PV,0]],1];s.AutomatedReasoningPolicyAddRuleAnnotation$=[3,m,TEe,0,[Oy],[[()=>ob,0]],1];s.AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation$=[3,m,xEe,0,[Oq],[[()=>jNe,0]],1];s.AutomatedReasoningPolicyAddRuleMutation$=[3,m,bEe,0,[H0],[[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],1];s.AutomatedReasoningPolicyAddTypeAnnotation$=[3,m,kEe,0,[He,Ne,tb],[[()=>Co,0],[()=>ib,0],[()=>NV,0]],3];s.AutomatedReasoningPolicyAddTypeMutation$=[3,m,DEe,0,[Qe],[[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],1];s.AutomatedReasoningPolicyAddTypeValue$=[3,m,MEe,0,[xa,Ne],[0,[()=>sb,0]],1];s.AutomatedReasoningPolicyAddVariableAnnotation$=[3,m,OEe,0,[He,Qe,Ne],[[()=>fi,0],[()=>Co,0],[()=>ab,0]],3];s.AutomatedReasoningPolicyAddVariableMutation$=[3,m,NEe,0,[EV],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],1];s.AutomatedReasoningPolicyAnnotatedChunk$=[3,m,_Ee,0,[q6,RMe],[[()=>f1e,0],1],1];s.AutomatedReasoningPolicyAnnotatedLine$=[3,m,PEe,0,[pDe,fDe],[1,[()=>HNe,0]]];s.AutomatedReasoningPolicyAtomicStatement$=[3,m,wEe,0,[Pd,Hy,PDe],[0,[()=>JNe,0],()=>s.AutomatedReasoningPolicyStatementLocation$],3];s.AutomatedReasoningPolicyBuildLog$=[3,m,BEe,0,[rq],[[()=>h1e,0]],1];s.AutomatedReasoningPolicyBuildLogEntry$=[3,m,GEe,0,[Mwe,qe,s$e],[[()=>s.AutomatedReasoningPolicyAnnotation$,0],0,[()=>_1e,0]],3];s.AutomatedReasoningPolicyBuildResultAssetManifest$=[3,m,qEe,0,[rq],[[()=>y1e,0]],1];s.AutomatedReasoningPolicyBuildResultAssetManifestEntry$=[3,m,VEe,0,[d0,Bwe,l0],[0,[()=>qNe,0],0],1];s.AutomatedReasoningPolicyBuildStep$=[3,m,JEe,0,[w$e,JDe,hMe],[[()=>s.AutomatedReasoningPolicyBuildStepContext$,0],()=>E1e,[()=>s.AutomatedReasoningPolicyDefinitionElement$,0]],2];s.AutomatedReasoningPolicyBuildStepMessage$=[3,m,XEe,0,[Or,jDe],[0,0],2];s.AutomatedReasoningPolicyBuildWorkflowDocument$=[3,m,QEe,0,[C0,A0,Dy,R0],[[()=>TV,0],0,[()=>Wy,0],[()=>nb,0]],3];s.AutomatedReasoningPolicyBuildWorkflowRepairContent$=[3,m,tSe,0,[g0],[[()=>pb,0]],1];s.AutomatedReasoningPolicyBuildWorkflowSource$=[3,m,rSe,0,[xd,NNe],[[()=>s.AutomatedReasoningPolicyDefinition$,0],[()=>s.AutomatedReasoningPolicyWorkflowTypeContent$,0]]];s.AutomatedReasoningPolicyBuildWorkflowSummary$=[3,m,nSe,0,[Ce,ar,qe,_0,Mt,at],[0,0,0,0,5,5],6];s.AutomatedReasoningPolicyDefinition$=[3,m,NSe,0,[bo,cNe,Zq,SV],[0,[()=>R1e,0],[()=>A1e,0],[()=>T1e,0]]];s.AutomatedReasoningPolicyDefinitionQualityReport$=[3,m,aSe,0,[DOe,PNe,LMe,_Ne,ENe,vNe,P$e,L$e],[1,1,1,[()=>P1e,0],[()=>C1e,0],[()=>LV,0],64,[()=>x1e,0]],8];s.AutomatedReasoningPolicyDefinitionRule$=[3,m,cSe,0,[Pd,Oy,P6],[0,[()=>ob,0],[()=>VNe,0]],2];s.AutomatedReasoningPolicyDefinitionType$=[3,m,hSe,0,[He,tb,Ne],[[()=>Co,0],[()=>NV,0],[()=>ib,0]],2];s.AutomatedReasoningPolicyDefinitionTypeValue$=[3,m,RSe,0,[xa,Ne],[0,[()=>sb,0]],1];s.AutomatedReasoningPolicyDefinitionTypeValuePair$=[3,m,TSe,0,[KOe,bNe],[[()=>Co,0],0],2];s.AutomatedReasoningPolicyDefinitionVariable$=[3,m,ISe,0,[He,Qe,Ne],[[()=>fi,0],[()=>Co,0],[()=>ab,0]],3];s.AutomatedReasoningPolicyDeleteRuleAnnotation$=[3,m,uSe,0,[Wq],[0],1];s.AutomatedReasoningPolicyDeleteRuleMutation$=[3,m,mSe,0,[Pd],[0],1];s.AutomatedReasoningPolicyDeleteTypeAnnotation$=[3,m,ySe,0,[He],[[()=>Co,0]],1];s.AutomatedReasoningPolicyDeleteTypeMutation$=[3,m,SSe,0,[He],[[()=>Co,0]],1];s.AutomatedReasoningPolicyDeleteTypeValue$=[3,m,bSe,0,[xa],[0],1];s.AutomatedReasoningPolicyDeleteVariableAnnotation$=[3,m,wSe,0,[He],[[()=>fi,0]],1];s.AutomatedReasoningPolicyDeleteVariableMutation$=[3,m,DSe,0,[He],[[()=>fi,0]],1];s.AutomatedReasoningPolicyDisjointRuleSet$=[3,m,fSe,0,[SV,Zq],[[()=>LV,0],64],2];s.AutomatedReasoningPolicyFidelityReport$=[3,m,LSe,0,[C$e,m0,QMe,INe,U$e],[1,1,[()=>xLe,0],[()=>bLe,0],[()=>w1e,0]],5];s.AutomatedReasoningPolicyGeneratedTestCase$=[3,m,BSe,0,[jy,Ly,My],[[()=>Ky,0],[()=>Jy,0],0],3];s.AutomatedReasoningPolicyGeneratedTestCases$=[3,m,FSe,0,[fq],[[()=>b1e,0]],1];s.AutomatedReasoningPolicyIngestContentAnnotation$=[3,m,jSe,0,[q6],[[()=>FNe,0]],1];s.AutomatedReasoningPolicyPlanning$=[3,m,KSe,0,[],[]];s.AutomatedReasoningPolicyReportSourceDocument$=[3,m,YSe,0,[Dy,V6,H6,Vwe,$$e],[[()=>Wy,0],0,0,[()=>g1e,0],[()=>m1e,0]],5];s.AutomatedReasoningPolicyRuleReport$=[3,m,ZSe,0,[H0,mq,pq,m0,C6],[0,()=>UV,[()=>zV,0],1,[()=>cb,0]],1];s.AutomatedReasoningPolicyScenario$=[3,m,eve,0,[Oy,P6,tke,K0],[[()=>xV,0],[()=>WNe,0],0,64],4];s.AutomatedReasoningPolicyScenarios$=[3,m,uve,0,[jq],[[()=>$1e,0]],1];s.AutomatedReasoningPolicySourceDocument$=[3,m,rve,0,[C0,A0,Dy,V6,R0],[[()=>TV,0],0,[()=>Wy,0],0,[()=>nb,0]],4];s.AutomatedReasoningPolicyStatementLocation$=[3,m,ove,0,[ADe],[65],1];s.AutomatedReasoningPolicyStatementReference$=[3,m,sve,0,[H6,lOe],[0,0],2];s.AutomatedReasoningPolicySummary$=[3,m,lve,0,[Ce,He,bo,Gq,Mt,at,Ne],[0,[()=>As,0],0,0,5,5,[()=>Xc,0]],6];s.AutomatedReasoningPolicyTestCase$=[3,m,pve,0,[Ca,Ly,Mt,at,jy,My,Ad],[0,[()=>Jy,0],5,5,[()=>Ky,0],0,1],4];s.AutomatedReasoningPolicyTestResult$=[3,m,yve,0,[sV,Ce,tNe,at,FOe,eNe,Wwe],[[()=>s.AutomatedReasoningPolicyTestCase$,0],0,0,5,[()=>l1e,0],0,0],4];s.AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation$=[3,m,Sve,0,[iq,K0],[[()=>CV,0],64],1];s.AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation$=[3,m,vve,0,[aOe,K0,iq],[[()=>xV,0],64,[()=>CV,0]],1];s.AutomatedReasoningPolicyUpdateRuleAnnotation$=[3,m,Ave,0,[Wq,Oy],[0,[()=>ob,0]],2];s.AutomatedReasoningPolicyUpdateRuleMutation$=[3,m,Rve,0,[H0],[[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],1];s.AutomatedReasoningPolicyUpdateTypeAnnotation$=[3,m,Pve,0,[He,tb,Nq,Ne],[[()=>Co,0],[()=>O1e,0],[()=>Co,0],[()=>ib,0]],2];s.AutomatedReasoningPolicyUpdateTypeMutation$=[3,m,Cve,0,[Qe],[[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],1];s.AutomatedReasoningPolicyUpdateTypeValue$=[3,m,Tve,0,[xa,eMe,Ne],[0,0,[()=>sb,0]],1];s.AutomatedReasoningPolicyUpdateVariableAnnotation$=[3,m,xve,0,[He,Nq,Ne],[[()=>fi,0],[()=>fi,0],[()=>ab,0]],1];s.AutomatedReasoningPolicyUpdateVariableMutation$=[3,m,bve,0,[EV],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],1];s.AutomatedReasoningPolicyVariableReport$=[3,m,Ive,0,[bMe,mq,pq,m0,C6],[[()=>fi,0],()=>UV,[()=>zV,0],1,[()=>cb,0]],1];s.BatchDeleteEvaluationJobError$=[3,m,Ove,0,[gi,I$e,Or],[[()=>Id,0],0,0],2];s.BatchDeleteEvaluationJobItem$=[3,m,Lve,0,[gi,Qke],[[()=>Id,0],0],2];s.BatchDeleteEvaluationJobRequest$=[3,m,Uve,0,[Yke],[[()=>F1e,0]],1];s.BatchDeleteEvaluationJobResponse$=[3,m,Bve,0,[ake,K$e],[[()=>N1e,0],[()=>L1e,0]],2];s.BedrockEvaluatorModel$=[3,m,Gve,0,[Ss],[0],1];s.ByteContentDoc$=[3,m,Dve,0,[Jke,T$e,G$e],[[()=>o1e,0],0,[()=>KNe,0]],3];s.CancelAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,Vve,0,[Ce,ar],[[0,1],[0,1]],2];s.CancelAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,Hve,0,[],[]];s.CloudWatchConfig$=[3,m,tRe,0,[dDe,Vn,uDe],[0,0,()=>s.S3Config$],2];s.CreateAutomatedReasoningPolicyRequest$=[3,m,Wve,0,[He,Ne,st,xd,O0,Hn],[[()=>As,0],[()=>Xc,0],[0,4],[()=>s.AutomatedReasoningPolicyDefinition$,0],0,()=>Ct],1];s.CreateAutomatedReasoningPolicyResponse$=[3,m,Jve,0,[Ce,bo,He,Mt,at,Ne,ky],[0,0,[()=>As,0],5,5,[()=>Xc,0],0],5];s.CreateAutomatedReasoningPolicyTestCaseRequest$=[3,m,Zve,0,[Ce,Ly,My,jy,st,Ad],[[0,1],[()=>Jy,0],0,[()=>Ky,0],[0,4],1],3];s.CreateAutomatedReasoningPolicyTestCaseResponse$=[3,m,Xve,0,[Ce,Ca],[0,0],2];s.CreateAutomatedReasoningPolicyVersionRequest$=[3,m,Qve,0,[Ce,SDe,st,Hn],[[0,1],0,[0,4],()=>Ct],2];s.CreateAutomatedReasoningPolicyVersionResponse$=[3,m,eAe,0,[Ce,bo,He,ky,Mt,Ne],[0,0,[()=>As,0],0,5,[()=>Xc,0]],5];s.CreateCustomModelDeploymentRequest$=[3,m,oAe,0,[kq,Tt,Ne,Hn,st],[0,0,0,()=>Ct,[0,4]],2];s.CreateCustomModelDeploymentResponse$=[3,m,iAe,0,[$y],[0],1];s.CreateCustomModelRequest$=[3,m,sAe,0,[Pa,GDe,z0,Vn,VDe,st],[0,()=>s.ModelDataSource$,0,0,()=>Ct,[0,4]],2];s.CreateCustomModelResponse$=[3,m,aAe,0,[Tt],[0],1];s.CreateEvaluationJobRequest$=[3,m,lAe,0,[Mr,Vn,eq,gq,vs,Pq,st,k6,D0,f0],[0,0,[()=>s.EvaluationConfig$,0],[()=>s.EvaluationInferenceConfig$,0],()=>s.EvaluationOutputDataConfig$,[()=>bV,0],[0,4],0,()=>Ct,0],5];s.CreateEvaluationJobResponse$=[3,m,dAe,0,[Gt],[0],1];s.CreateFoundationModelAgreementRequest$=[3,m,mAe,0,[Uq,Yr],[0,0],2];s.CreateFoundationModelAgreementResponse$=[3,m,fAe,0,[Yr],[0],1];s.CreateGuardrailRequest$=[3,m,hAe,0,[He,h0,y0,Ne,dV,L6,vV,tV,M6,x6,U6,O0,Hn,st],[[()=>Zy,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,yAe,0,[Kc,Ny,bo,Mt],[0,0,0,5],4];s.CreateGuardrailVersionRequest$=[3,m,EAe,0,[Aa,Ne,st],[[0,1],[()=>wd,0],[0,4]],1];s.CreateGuardrailVersionResponse$=[3,m,SAe,0,[Kc,bo],[0,0],2];s.CreateInferenceProfileRequest$=[3,m,AAe,0,[k0,BDe,Ne,st,Hn],[0,()=>s.InferenceProfileModelSource$,[()=>ub,0],[0,4],()=>Ct],2];s.CreateInferenceProfileResponse$=[3,m,RAe,0,[$0,qe],[0,0],1];s.CreateMarketplaceModelEndpointRequest$=[3,m,qAe,0,[Td,T0,Q$e,zwe,st,Hn],[0,()=>s.EndpointConfig$,0,2,[0,4],()=>Ct],3];s.CreateMarketplaceModelEndpointResponse$=[3,m,VAe,0,[Gy],[()=>s.MarketplaceModelEndpoint$],1];s.CreateModelCopyJobRequest$=[3,m,xAe,0,[Z0,Q0,ODe,eb,st],[0,0,0,()=>Ct,[0,4]],2];s.CreateModelCopyJobResponse$=[3,m,bAe,0,[Gt],[0],1];s.CreateModelCustomizationJobRequest$=[3,m,IAe,0,[Mr,N6,Vn,t$e,X0,vs,st,Rd,_$e,D0,E$e,rb,zy,Ta,E0],[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,wAe,0,[Gt],[0],1];s.CreateModelImportJobRequest$=[3,m,zAe,0,[Mr,w0,Vn,N0,D0,Bke,st,Ta,Uke],[0,0,0,()=>s.ModelDataSource$,()=>Ct,()=>Ct,0,()=>s.VpcConfig$,0],4];s.CreateModelImportJobResponse$=[3,m,UAe,0,[Gt],[0],1];s.CreateModelInvocationJobRequest$=[3,m,BAe,0,[Mr,Vn,Yr,I0,vs,st,Ta,Y0,Hn,L0],[0,0,0,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,[0,4],()=>s.VpcConfig$,1,()=>Ct,0],5];s.CreateModelInvocationJobResponse$=[3,m,GAe,0,[Gt],[0],1];s.CreatePromptRouterRequest$=[3,m,QAe,0,[V0,Zc,J0,b0,st,Ne,Hn],[0,()=>mb,()=>s.RoutingCriteria$,()=>s.PromptRouterTargetModel$,[0,4],[()=>lb,0],()=>Ct],4];s.CreatePromptRouterResponse$=[3,m,eRe,0,[bd],[0]];s.CreateProvisionedModelThroughputRequest$=[3,m,ZAe,0,[B0,q0,Yr,st,S0,Hn],[1,0,0,[0,4],0,()=>Ct],3];s.CreateProvisionedModelThroughputResponse$=[3,m,XAe,0,[F0],[0],1];s.CustomMetricBedrockEvaluatorModel$=[3,m,PAe,0,[Ss],[0],1];s.CustomMetricDefinition$=[3,m,kAe,8,[He,Rq,eOe],[[()=>i1e,0],0,()=>CLe],2];s.CustomMetricEvaluatorModelConfig$=[3,m,NAe,0,[$6],[()=>U1e],1];s.CustomModelDeploymentSummary$=[3,m,DAe,0,[$y,h$e,Tt,Mt,qe,Cd,Es],[0,0,0,5,0,5,0],5];s.CustomModelDeploymentUpdateDetails$=[3,m,OAe,0,[Tt,yNe],[0,0],2];s.CustomModelSummary$=[3,m,HAe,0,[Tt,Pa,Ht,Iy,n$e,Rd,rMe,Py],[0,0,5,0,0,0,0,0],5];s.CustomModelUnits$=[3,m,JAe,0,[v$e,A$e],[1,0]];s.DataProcessingDetails$=[3,m,FRe,0,[qe,Ht,En],[0,5,5]];s.DeleteAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,oRe,0,[Ce,ar,Cd],[[0,1],[0,1],[5,{[F]:at}]],3];s.DeleteAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,iRe,0,[],[]];s.DeleteAutomatedReasoningPolicyRequest$=[3,m,sRe,0,[Ce,p6],[[0,1],[2,{[F]:p6}]],1];s.DeleteAutomatedReasoningPolicyResponse$=[3,m,aRe,0,[],[]];s.DeleteAutomatedReasoningPolicyTestCaseRequest$=[3,m,uRe,0,[Ce,Ca,Cd],[[0,1],[0,1],[5,{[F]:at}]],3];s.DeleteAutomatedReasoningPolicyTestCaseResponse$=[3,m,lRe,0,[],[]];s.DeleteCustomModelDeploymentRequest$=[3,m,fRe,0,[v0],[[0,1]],1];s.DeleteCustomModelDeploymentResponse$=[3,m,gRe,0,[],[]];s.DeleteCustomModelRequest$=[3,m,hRe,0,[Ss],[[0,1]],1];s.DeleteCustomModelResponse$=[3,m,yRe,0,[],[]];s.DeleteEnforcedGuardrailConfigurationRequest$=[3,m,ERe,0,[wy],[[0,1]],1];s.DeleteEnforcedGuardrailConfigurationResponse$=[3,m,SRe,0,[],[]];s.DeleteFoundationModelAgreementRequest$=[3,m,ARe,0,[Yr],[0],1];s.DeleteFoundationModelAgreementResponse$=[3,m,RRe,0,[],[]];s.DeleteGuardrailRequest$=[3,m,CRe,0,[Aa,Ra],[[0,1],[0,{[F]:Ra}]],1];s.DeleteGuardrailResponse$=[3,m,TRe,0,[],[]];s.DeleteImportedModelRequest$=[3,m,bRe,0,[Ss],[[0,1]],1];s.DeleteImportedModelResponse$=[3,m,IRe,0,[],[]];s.DeleteInferenceProfileRequest$=[3,m,$Re,0,[yq],[[0,1]],1];s.DeleteInferenceProfileResponse$=[3,m,kRe,0,[],[]];s.DeleteMarketplaceModelEndpointRequest$=[3,m,LRe,0,[Wc],[[0,1]],1];s.DeleteMarketplaceModelEndpointResponse$=[3,m,zRe,0,[],[]];s.DeleteModelInvocationLoggingConfigurationRequest$=[3,m,MRe,0,[],[]];s.DeleteModelInvocationLoggingConfigurationResponse$=[3,m,ORe,0,[],[]];s.DeletePromptRouterRequest$=[3,m,WRe,0,[bd],[[0,1]],1];s.DeletePromptRouterResponse$=[3,m,JRe,0,[],[]];s.DeleteProvisionedModelThroughputRequest$=[3,m,qRe,0,[j0],[[0,1]],1];s.DeleteProvisionedModelThroughputResponse$=[3,m,VRe,0,[],[]];s.DeregisterMarketplaceModelEndpointRequest$=[3,m,URe,0,[Wc],[[0,1]],1];s.DeregisterMarketplaceModelEndpointResponse$=[3,m,BRe,0,[],[]];s.DimensionalPriceRate$=[3,m,HRe,0,[j$e,$Me,Ne,uNe],[0,0,0,0]];s.DistillationConfig$=[3,m,dRe,0,[HOe],[()=>s.TeacherModelConfig$],1];s.EvaluationBedrockModel$=[3,m,QRe,0,[Ss,jke,pMe],[0,[()=>YNe,0],()=>s.PerformanceConfiguration$],1];s.EvaluationDataset$=[3,m,rPe,0,[He,D$e],[[()=>ZNe,0],()=>s.EvaluationDatasetLocation$],1];s.EvaluationDatasetMetricConfig$=[3,m,oPe,0,[oNe,F$e,LDe],[0,[()=>s.EvaluationDataset$,0],[()=>j1e,0]],3];s.EvaluationInferenceConfigSummary$=[3,m,cPe,0,[IDe,zMe],[()=>s.EvaluationModelConfigSummary$,()=>s.EvaluationRagConfigSummary$]];s.EvaluationModelConfigSummary$=[3,m,mPe,0,[r$e,vMe],[64,64]];s.EvaluationOutputDataConfig$=[3,m,SPe,0,[hi],[0],1];s.EvaluationPrecomputedInferenceSource$=[3,m,vPe,0,[Vke],[0],1];s.EvaluationPrecomputedRetrieveAndGenerateSourceConfig$=[3,m,APe,0,[Jq],[0],1];s.EvaluationPrecomputedRetrieveSourceConfig$=[3,m,RPe,0,[Jq],[0],1];s.EvaluationRagConfigSummary$=[3,m,CPe,0,[Ywe,xMe],[64,64]];s.EvaluationSummary$=[3,m,TPe,0,[Gt,Mr,qe,Ht,Tq,ske,MDe,WMe,X$e,y$e,wke,f0],[0,0,0,5,0,64,64,64,64,64,()=>s.EvaluationInferenceConfigSummary$,0],6];s.ExportAutomatedReasoningPolicyVersionRequest$=[3,m,XRe,0,[Ce],[[0,1]],1];s.ExportAutomatedReasoningPolicyVersionResponse$=[3,m,YRe,0,[xd],[[()=>s.AutomatedReasoningPolicyDefinition$,16]],1];s.ExternalSource$=[3,m,wPe,0,[POe,gOe,Xwe],[0,()=>s.S3ObjectDoc$,[()=>s.ByteContentDoc$,0]],1];s.ExternalSourcesGenerationConfiguration$=[3,m,xPe,0,[qq,dq,bq,p0],[[()=>s.PromptTemplate$,0],()=>s.GuardrailConfiguration$,()=>s.KbInferenceConfig$,143]];s.ExternalSourcesRetrieveAndGenerateConfiguration$=[3,m,bPe,0,[Tt,wOe,lq],[0,[()=>H1e,0],[()=>s.ExternalSourcesGenerationConfiguration$,0]],2];s.FieldForReranking$=[3,m,DPe,0,[lke],[0],1];s.FilterAttribute$=[3,m,kPe,0,[M0,xa],[0,15],2];s.FoundationModelDetails$=[3,m,OPe,0,[Tt,Yr,Pa,Fq,Uy,Fy,Kq,G6,Aq,Mq],[0,0,0,0,64,64,2,64,64,()=>s.FoundationModelLifecycle$],2];s.FoundationModelLifecycle$=[3,m,NPe,0,[qe,SOe,eke,hDe,yMe],[0,5,5,5,5],1];s.FoundationModelSummary$=[3,m,LPe,0,[Tt,Yr,Pa,Fq,Uy,Fy,Kq,G6,Aq,Mq],[0,0,0,0,64,64,2,64,64,()=>s.FoundationModelLifecycle$],2];s.GenerationConfiguration$=[3,m,uCe,0,[qq,dq,bq,p0],[[()=>s.PromptTemplate$,0],()=>s.GuardrailConfiguration$,()=>s.KbInferenceConfig$,143]];s.GetAutomatedReasoningPolicyAnnotationsRequest$=[3,m,GPe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyAnnotationsResponse$=[3,m,FPe,0,[Ce,He,ar,g0,b6,at],[0,[()=>As,0],0,[()=>pb,0],0,5],6];s.GetAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,qPe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,JPe,0,[Ce,ar,qe,_0,Mt,at,Dy,A0,R0],[0,0,0,0,5,5,[()=>Wy,0],0,[()=>nb,0]],6];s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest$=[3,m,HPe,0,[Ce,ar,d0,l0],[[0,1],[0,1],[0,{[F]:d0}],[0,{[F]:l0}]],3];s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse$=[3,m,WPe,0,[Ce,ar,c$e],[0,0,[()=>s.AutomatedReasoningPolicyBuildResultAssets$,0]],2];s.GetAutomatedReasoningPolicyNextScenarioRequest$=[3,m,XPe,0,[Ce,ar],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyNextScenarioResponse$=[3,m,YPe,0,[Ce,IOe],[0,[()=>s.AutomatedReasoningPolicyScenario$,0]],1];s.GetAutomatedReasoningPolicyRequest$=[3,m,QPe,0,[Ce],[[0,1]],1];s.GetAutomatedReasoningPolicyResponse$=[3,m,eCe,0,[Ce,He,bo,Gq,ky,at,Ne,Iq,Mt],[0,[()=>As,0],0,0,0,5,[()=>Xc,0],0,5],6];s.GetAutomatedReasoningPolicyTestCaseRequest$=[3,m,rCe,0,[Ce,Ca],[[0,1],[0,1]],2];s.GetAutomatedReasoningPolicyTestCaseResponse$=[3,m,nCe,0,[Ce,sV],[0,[()=>s.AutomatedReasoningPolicyTestCase$,0]],2];s.GetAutomatedReasoningPolicyTestResultRequest$=[3,m,iCe,0,[Ce,ar,Ca],[[0,1],[0,1],[0,1]],3];s.GetAutomatedReasoningPolicyTestResultResponse$=[3,m,sCe,0,[QOe],[[()=>s.AutomatedReasoningPolicyTestResult$,0]],1];s.GetCustomModelDeploymentRequest$=[3,m,xCe,0,[v0],[[0,1]],1];s.GetCustomModelDeploymentResponse$=[3,m,bCe,0,[$y,kq,Tt,Mt,qe,Ne,pNe,Es,Cd],[0,0,0,5,0,0,()=>s.CustomModelDeploymentUpdateDetails$,0,5],5];s.GetCustomModelRequest$=[3,m,ICe,0,[Ss],[[0,1]],1];s.GetCustomModelResponse$=[3,m,wCe,0,[Tt,Pa,Ht,Mr,Gt,Iy,Rd,z0,zy,X0,rb,vs,cV,_V,E0,Py,Es],[0,0,5,0,0,0,0,0,128,[()=>s.TrainingDataConfig$,0],()=>s.ValidationDataConfig$,()=>s.OutputDataConfig$,()=>s.TrainingMetrics$,()=>jV,()=>s.CustomizationConfig$,0,0],3];s.GetEvaluationJobRequest$=[3,m,UCe,0,[gi],[[()=>Id,1]],1];s.GetEvaluationJobResponse$=[3,m,BCe,0,[Mr,qe,Gt,Vn,Tq,eq,gq,vs,Ht,Pq,k6,f0,En,uke],[0,0,0,0,0,[()=>s.EvaluationConfig$,0],[()=>s.EvaluationInferenceConfig$,0],()=>s.EvaluationOutputDataConfig$,5,[()=>bV,0],0,0,5,64],9];s.GetFoundationModelAvailabilityRequest$=[3,m,jCe,0,[Yr],[[0,1]],1];s.GetFoundationModelAvailabilityResponse$=[3,m,qCe,0,[Yr,Owe,Hwe,q$e,NMe],[0,()=>s.AgreementAvailability$,0,0,0],5];s.GetFoundationModelRequest$=[3,m,VCe,0,[Ss],[[0,1]],1];s.GetFoundationModelResponse$=[3,m,HCe,0,[$De],[()=>s.FoundationModelDetails$]];s.GetGuardrailRequest$=[3,m,ZCe,0,[Aa,Ra],[[0,1],[0,{[F]:Ra}]],1];s.GetGuardrailResponse$=[3,m,XCe,0,[He,Kc,Ny,bo,qe,Mt,at,h0,y0,Ne,ZOe,R$e,zNe,mOe,p$e,Fwe,B6,AOe,dke,Iq],[[()=>Zy,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$,[()=>iLe,0],[()=>Y1e,0],0],9];s.GetImportedModelRequest$=[3,m,QCe,0,[Ss],[[0,1]],1];s.GetImportedModelResponse$=[3,m,eTe,0,[Tt,Pa,Mr,Gt,N0,Ht,$q,z0,Eq,S$e],[0,0,0,0,()=>s.ModelDataSource$,5,0,0,2,()=>s.CustomModelUnits$]];s.GetInferenceProfileRequest$=[3,m,rTe,0,[yq],[[0,1]],1];s.GetInferenceProfileResponse$=[3,m,nTe,0,[k0,$0,Zc,_q,qe,Qe,Ne,Mt,at],[0,0,()=>FV,0,0,0,[()=>ub,0],5,5],6];s.GetMarketplaceModelEndpointRequest$=[3,m,vTe,0,[Wc],[[0,1]],1];s.GetMarketplaceModelEndpointResponse$=[3,m,ATe,0,[Gy],[()=>s.MarketplaceModelEndpoint$]];s.GetModelCopyJobRequest$=[3,m,sTe,0,[Gt],[[0,1]],1];s.GetModelCopyJobResponse$=[3,m,aTe,0,[Gt,qe,Ht,uV,Yq,Z0,Q0,lV,eb,Es,nV],[0,0,5,0,0,0,0,0,()=>Ct,0,0],6];s.GetModelCustomizationJobRequest$=[3,m,cTe,0,[gi],[[0,1]],1];s.GetModelCustomizationJobResponse$=[3,m,uTe,0,[Gt,Mr,aMe,Vn,Ht,Iy,X0,rb,vs,iMe,st,qe,eV,Es,En,Jc,zy,Rd,sMe,cV,_V,Ta,E0],[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$,()=>jV,()=>s.VpcConfig$,()=>s.CustomizationConfig$],9];s.GetModelImportJobRequest$=[3,m,pTe,0,[gi],[[0,1]],1];s.GetModelImportJobResponse$=[3,m,mTe,0,[Gt,Mr,w0,hq,Vn,N0,qe,Es,Ht,En,Jc,Ta,zke],[0,0,0,0,0,()=>s.ModelDataSource$,0,0,5,5,5,()=>s.VpcConfig$,0]];s.GetModelInvocationJobRequest$=[3,m,fTe,0,[gi],[[0,1]],1];s.GetModelInvocationJobResponse$=[3,m,gTe,0,[Gt,Yr,Vn,oV,I0,vs,Mr,st,qe,Or,En,Jc,Ta,Y0,Cq,L0],[0,0,0,5,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,0,0,0,[()=>OV,0],5,5,()=>s.VpcConfig$,1,5,0],6];s.GetModelInvocationLoggingConfigurationRequest$=[3,m,_Te,0,[],[]];s.GetModelInvocationLoggingConfigurationResponse$=[3,m,ETe,0,[wq],[()=>s.LoggingConfig$]];s.GetPromptRouterRequest$=[3,m,LTe,0,[bd],[[0,1]],1];s.GetPromptRouterResponse$=[3,m,zTe,0,[V0,J0,bd,Zc,b0,qe,Qe,Ne,Mt,at],[0,()=>s.RoutingCriteria$,0,()=>mb,()=>s.PromptRouterTargetModel$,0,0,[()=>lb,0],5,5],7];s.GetProvisionedModelThroughputRequest$=[3,m,MTe,0,[j0],[[0,1]],1];s.GetProvisionedModelThroughputResponse$=[3,m,OTe,0,[B0,K6,q0,F0,Tt,W6,cq,qe,Ht,En,Es,S0,D6],[1,1,0,0,0,0,0,0,5,5,0,0,5],10];s.GetUseCaseForModelAccessRequest$=[3,m,lxe,0,[],[]];s.GetUseCaseForModelAccessResponse$=[3,m,dxe,0,[aq],[21],1];s.GuardrailAutomatedReasoningPolicy$=[3,m,UPe,0,[Hq,Ad],[64,1],1];s.GuardrailAutomatedReasoningPolicyConfig$=[3,m,KPe,0,[Hq,Ad],[64,1],1];s.GuardrailConfiguration$=[3,m,NCe,0,[Kc,Ra],[0,0],2];s.GuardrailContentFilter$=[3,m,lCe,0,[Qe,Sq,zq,Uy,Fy,yn,Sn,_n,vn],[0,0,0,[()=>xy,0],[()=>xy,0],[()=>Cy,0],[()=>Cy,0],2,2],3];s.GuardrailContentFilterConfig$=[3,m,pCe,0,[Qe,Sq,zq,Uy,Fy,yn,Sn,_n,vn],[0,0,0,[()=>xy,0],[()=>xy,0],[()=>Cy,0],[()=>Cy,0],2,2],3];s.GuardrailContentFiltersTier$=[3,m,fCe,0,[Vy],[[()=>wV,0]],1];s.GuardrailContentFiltersTierConfig$=[3,m,gCe,0,[Vy],[[()=>wV,0]],1];s.GuardrailContentPolicy$=[3,m,$Ce,0,[uq,mV],[[()=>J1e,0],[()=>s.GuardrailContentFiltersTier$,0]]];s.GuardrailContentPolicyConfig$=[3,m,kCe,0,[sq,aV],[[()=>K1e,0],[()=>s.GuardrailContentFiltersTierConfig$,0]],1];s.GuardrailContextualGroundingFilter$=[3,m,ECe,0,[Qe,pV,Hc,nq],[0,1,[()=>$V,0],2],2];s.GuardrailContextualGroundingFilterConfig$=[3,m,SCe,0,[Qe,pV,Hc,nq],[0,1,[()=>$V,0],2],2];s.GuardrailContextualGroundingPolicy$=[3,m,RCe,0,[uq],[[()=>Z1e,0]],1];s.GuardrailContextualGroundingPolicyConfig$=[3,m,PCe,0,[sq],[[()=>X1e,0]],1];s.GuardrailCrossRegionConfig$=[3,m,DCe,0,[Rke],[0],1];s.GuardrailCrossRegionDetails$=[3,m,MCe,0,[Pke,Ake],[0,0]];s.GuardrailManagedWords$=[3,m,RTe,0,[Qe,yn,Sn,_n,vn],[0,[()=>ys,0],[()=>ys,0],2,2],1];s.GuardrailManagedWordsConfig$=[3,m,PTe,0,[Qe,yn,Sn,_n,vn],[0,[()=>ys,0],[()=>ys,0],2,2],1];s.GuardrailPiiEntity$=[3,m,ITe,0,[Qe,Hc,yn,Sn,_n,vn],[0,0,0,0,2,2],2];s.GuardrailPiiEntityConfig$=[3,m,wTe,0,[Qe,Hc,yn,Sn,_n,vn],[0,0,0,0,2,2],2];s.GuardrailRegex$=[3,m,UTe,0,[He,Vq,Hc,Ne,yn,Sn,_n,vn],[0,0,0,0,0,0,2,2],3];s.GuardrailRegexConfig$=[3,m,BTe,0,[He,Vq,Hc,Ne,yn,Sn,_n,vn],[0,0,0,0,0,0,2,2],3];s.GuardrailSensitiveInformationPolicy$=[3,m,qTe,0,[EMe,rOe],[()=>tLe,()=>nLe]];s.GuardrailSensitiveInformationPolicyConfig$=[3,m,VTe,0,[_Me,GMe],[()=>rLe,()=>oLe]];s.GuardrailSummary$=[3,m,jTe,0,[Pd,Kwe,qe,He,bo,Mt,at,Ne,B6],[0,0,0,[()=>Zy,0],0,5,5,[()=>wd,0],()=>s.GuardrailCrossRegionDetails$],7];s.GuardrailTopic$=[3,m,KTe,0,[He,P0,oq,Qe,yn,Sn,_n,vn],[[()=>DV,0],[()=>kV,0],[()=>GV,0],0,[()=>Ty,0],[()=>Ty,0],2,2],2];s.GuardrailTopicConfig$=[3,m,XTe,0,[He,P0,Qe,oq,yn,Sn,_n,vn],[[()=>DV,0],[()=>kV,0],0,[()=>GV,0],[()=>Ty,0],[()=>Ty,0],2,2],3];s.GuardrailTopicPolicy$=[3,m,nxe,0,[sNe,mV],[[()=>aLe,0],[()=>s.GuardrailTopicsTier$,0]],1];s.GuardrailTopicPolicyConfig$=[3,m,oxe,0,[NOe,aV],[[()=>cLe,0],[()=>s.GuardrailTopicsTierConfig$,0]],1];s.GuardrailTopicsTier$=[3,m,ixe,0,[Vy],[[()=>MV,0]],1];s.GuardrailTopicsTierConfig$=[3,m,sxe,0,[Vy],[[()=>MV,0]],1];s.GuardrailWord$=[3,m,pxe,0,[Hy,yn,Sn,_n,vn],[0,[()=>ys,0],[()=>ys,0],2,2],1];s.GuardrailWordConfig$=[3,m,fxe,0,[Hy,yn,Sn,_n,vn],[0,[()=>ys,0],[()=>ys,0],2,2],1];s.GuardrailWordPolicy$=[3,m,hxe,0,[ONe,HDe],[[()=>uLe,0],[()=>Q1e,0]]];s.GuardrailWordPolicyConfig$=[3,m,yxe,0,[LNe,WDe],[[()=>lLe,0],[()=>eLe,0]]];s.HumanEvaluationConfig$=[3,m,Exe,0,[J6,Ike,O6],[[()=>BV,0],[()=>s.HumanWorkflowConfig$,0],[()=>dLe,0]],1];s.HumanEvaluationCustomMetric$=[3,m,Sxe,0,[He,JMe,Ne],[[()=>IV,0],0,[()=>XNe,0]],2];s.HumanWorkflowConfig$=[3,m,Rxe,0,[cke,Rq],[0,[()=>n1e,0]],1];s.ImplicitFilterConfiguration$=[3,m,Cxe,0,[CDe,Tt],[[()=>gLe,0],0],2];s.ImportedModelSummary$=[3,m,bxe,0,[Tt,Pa,Ht,Eq,$q],[0,0,5,2,0],3];s.InferenceProfileModel$=[3,m,$xe,0,[Tt],[0]];s.InferenceProfileSummary$=[3,m,Mxe,0,[k0,$0,Zc,_q,qe,Qe,Ne,Mt,at],[0,0,()=>FV,0,0,0,[()=>ub,0],5,5],6];s.InvocationLogsConfig$=[3,m,Txe,0,[Lke,hNe,KMe],[()=>s.InvocationLogSource$,2,[()=>s.RequestMetadataFilters$,0]],1];s.KbInferenceConfig$=[3,m,Gxe,0,[jOe],[()=>s.TextInferenceConfig$]];s.KnowledgeBaseRetrievalConfiguration$=[3,m,Uxe,0,[wNe],[[()=>s.KnowledgeBaseVectorSearchConfiguration$,0]],1];s.KnowledgeBaseRetrieveAndGenerateConfiguration$=[3,m,zxe,0,[xq,Tt,jMe,lq,nMe],[0,0,[()=>s.KnowledgeBaseRetrievalConfiguration$,0],[()=>s.GenerationConfiguration$,0],()=>s.OrchestrationConfiguration$],2];s.KnowledgeBaseVectorSearchConfiguration$=[3,m,Bxe,0,[XDe,uMe,hke,Dke,FMe],[1,0,[()=>s.RetrievalFilter$,0],[()=>s.ImplicitFilterConfiguration$,0],[()=>s.VectorSearchRerankingConfiguration$,0]]];s.LambdaGraderConfig$=[3,m,S0e,0,[aDe],[0],1];s.LegalTerm$=[3,m,Z0e,0,[ANe],[0]];s.ListAutomatedReasoningPoliciesRequest$=[3,m,Hxe,0,[Ce,ae,Oe],[[0,{[F]:Ce}],[0,{[F]:ae}],[1,{[F]:Oe}]]];s.ListAutomatedReasoningPoliciesResponse$=[3,m,Wxe,0,[qwe,ae],[[()=>k1e,0],0],1];s.ListAutomatedReasoningPolicyBuildWorkflowsRequest$=[3,m,qxe,0,[Ce,ae,Oe],[[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],1];s.ListAutomatedReasoningPolicyBuildWorkflowsResponse$=[3,m,Vxe,0,[jwe,ae],[()=>v1e,0],1];s.ListAutomatedReasoningPolicyTestCasesRequest$=[3,m,Kxe,0,[Ce,ae,Oe],[[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],1];s.ListAutomatedReasoningPolicyTestCasesResponse$=[3,m,Zxe,0,[OOe,ae],[[()=>D1e,0],0],1];s.ListAutomatedReasoningPolicyTestResultsRequest$=[3,m,Yxe,0,[Ce,ar,ae,Oe],[[0,1],[0,1],[0,{[F]:ae}],[1,{[F]:Oe}]],2];s.ListAutomatedReasoningPolicyTestResultsResponse$=[3,m,Qxe,0,[rNe,ae],[[()=>M1e,0],0],1];s.ListCustomModelDeploymentsRequest$=[3,m,n0e,0,[l6,u6,sr,Oe,ae,Ut,Bt,Dr,Ry],[[5,{[F]:l6}],[5,{[F]:u6}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}],[0,{[F]:Dr}],[0,{[F]:Ry}]]];s.ListCustomModelDeploymentsResponse$=[3,m,o0e,0,[ae,kDe],[0,()=>B1e]];s.ListCustomModelsRequest$=[3,m,i0e,0,[kr,$r,sr,s6,d6,Oe,ae,Ut,Bt,m6,Py],[[5,{[F]:kr}],[5,{[F]:$r}],[0,{[F]:sr}],[0,{[F]:s6}],[0,{[F]:d6}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}],[2,{[F]:m6}],[0,{[F]:Py}]]];s.ListCustomModelsResponse$=[3,m,s0e,0,[ae,U0],[0,()=>G1e]];s.ListEnforcedGuardrailsConfigurationRequest$=[3,m,c0e,0,[ae],[[0,{[F]:ae}]]];s.ListEnforcedGuardrailsConfigurationResponse$=[3,m,u0e,0,[Eke,ae],[()=>a1e,0],1];s.ListEvaluationJobsRequest$=[3,m,d0e,0,[$r,kr,Dr,n6,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:n6}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListEvaluationJobsResponse$=[3,m,p0e,0,[ae,eDe],[0,()=>V1e]];s.ListFoundationModelAgreementOffersRequest$=[3,m,g0e,0,[Yr,f6],[[0,1],[0,{[F]:f6}]],1];s.ListFoundationModelAgreementOffersResponse$=[3,m,h0e,0,[Yr,lMe],[0,()=>SLe],2];s.ListFoundationModelsRequest$=[3,m,y0e,0,[c6,o6,a6,i6],[[0,{[F]:c6}],[0,{[F]:o6}],[0,{[F]:a6}],[0,{[F]:i6}]]];s.ListFoundationModelsResponse$=[3,m,_0e,0,[U0],[()=>W1e]];s.ListGuardrailsRequest$=[3,m,v0e,0,[Aa,Oe,ae],[[0,{[F]:Aa}],[1,{[F]:Oe}],[0,{[F]:ae}]]];s.ListGuardrailsResponse$=[3,m,A0e,0,[yke,ae],[[()=>sLe,0],0],1];s.ListImportedModelsRequest$=[3,m,P0e,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,C0e,0,[ae,U0],[0,()=>pLe]];s.ListInferenceProfilesRequest$=[3,m,x0e,0,[Oe,ae,GOe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Qe}]]];s.ListInferenceProfilesResponse$=[3,m,b0e,0,[qke,ae],[[()=>mLe,0],0]];s.ListMarketplaceModelEndpointsRequest$=[3,m,F0e,0,[Oe,ae,FDe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Td}]]];s.ListMarketplaceModelEndpointsResponse$=[3,m,j0e,0,[NDe,ae],[()=>fLe,0]];s.ListModelCopyJobsRequest$=[3,m,w0e,0,[$r,kr,Dr,g6,h6,JOe,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:g6}],[0,{[F]:h6}],[0,{[F]:cMe}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelCopyJobsResponse$=[3,m,$0e,0,[ae,xDe],[0,()=>hLe]];s.ListModelCustomizationJobsRequest$=[3,m,k0e,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,D0e,0,[ae,bDe],[0,()=>yLe]];s.ListModelImportJobsRequest$=[3,m,N0e,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,L0e,0,[ae,DDe],[0,()=>_Le]];s.ListModelInvocationJobsRequest$=[3,m,z0e,0,[y6,_6,Dr,sr,Oe,ae,Ut,Bt],[[5,{[F]:y6}],[5,{[F]:_6}],[0,{[F]:Dr}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListModelInvocationJobsResponse$=[3,m,U0e,0,[ae,Oke],[0,[()=>ELe,0]]];s.ListPromptRoutersRequest$=[3,m,J0e,0,[Oe,ae,Qe],[[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Qe}]]];s.ListPromptRoutersResponse$=[3,m,K0e,0,[CMe,ae],[[()=>vLe,0],0]];s.ListProvisionedModelThroughputsRequest$=[3,m,V0e,0,[$r,kr,Dr,Ry,sr,Oe,ae,Ut,Bt],[[5,{[F]:$r}],[5,{[F]:kr}],[0,{[F]:Dr}],[0,{[F]:Ry}],[0,{[F]:sr}],[1,{[F]:Oe}],[0,{[F]:ae}],[0,{[F]:Ut}],[0,{[F]:Bt}]]];s.ListProvisionedModelThroughputsResponse$=[3,m,H0e,0,[ae,AMe],[0,()=>ALe]];s.ListTagsForResourceRequest$=[3,m,Y0e,0,[W0],[0],1];s.ListTagsForResourceResponse$=[3,m,Q0e,0,[Hn],[()=>Ct]];s.LoggingConfig$=[3,m,e0e,0,[x$e,nOe,UOe,kke,H$e,TNe,Lwe],[()=>s.CloudWatchConfig$,()=>s.S3Config$,2,2,2,2,2]];s.MarketplaceModelEndpoint$=[3,m,_be,0,[Wc,Td,Mt,at,T0,nke,qe,rV,ike],[0,0,5,5,()=>s.EndpointConfig$,0,0,0,0],6];s.MarketplaceModelEndpointSummary$=[3,m,Ebe,0,[Wc,Td,Mt,at,qe,rV],[0,0,5,5,0,0],4];s.MetadataAttributeSchema$=[3,m,tbe,8,[M0,Qe,Ne],[0,0,0],3];s.MetadataConfigurationForReranking$=[3,m,nbe,0,[_Oe,hOe],[0,[()=>s.RerankingMetadataSelectiveModeConfiguration$,0]],1];s.ModelCopyJobSummary$=[3,m,obe,0,[Gt,qe,Ht,uV,Yq,Z0,Q0,lV,eb,Es,nV],[0,0,5,0,0,0,0,0,()=>Ct,0,0],6];s.ModelCustomizationJobSummary$=[3,m,ibe,0,[Gt,Iy,Mr,qe,Ht,eV,En,Jc,m$e,N6,Rd],[0,0,0,0,5,()=>s.StatusDetails$,5,5,0,0,0],5];s.ModelEnforcement$=[3,m,ube,0,[Fke,Y$e],[64,64],2];s.ModelImportJobSummary$=[3,m,pbe,0,[Gt,Mr,qe,Ht,En,Jc,hq,w0],[0,0,0,5,5,5,0,0],4];s.ModelInvocationJobS3InputDataConfig$=[3,m,mbe,0,[hi,pOe,Qq],[0,0,0],1];s.ModelInvocationJobS3OutputDataConfig$=[3,m,fbe,0,[hi,cOe,Qq],[0,0,0],1];s.ModelInvocationJobSummary$=[3,m,gbe,0,[Gt,Mr,Yr,Vn,oV,I0,vs,st,qe,Or,En,Jc,Ta,Y0,Cq,L0],[0,0,0,0,5,()=>s.ModelInvocationJobInputDataConfig$,()=>s.ModelInvocationJobOutputDataConfig$,0,0,[()=>OV,0],5,5,()=>s.VpcConfig$,1,5,0],7];s.Offer$=[3,m,Abe,0,[Uq,zOe,oMe],[0,()=>s.TermDetails$,0],2];s.OrchestrationConfiguration$=[3,m,Rbe,0,[DMe],[()=>s.QueryTransformationConfiguration$],1];s.OutputDataConfig$=[3,m,Pbe,0,[hi],[0],1];s.PerformanceConfiguration$=[3,m,Tbe,0,[vDe],[0]];s.PricingTerm$=[3,m,Bbe,0,[UMe],[()=>PLe],1];s.PromptRouterSummary$=[3,m,Nbe,0,[V0,J0,bd,Zc,b0,qe,Qe,Ne,Mt,at],[0,()=>s.RoutingCriteria$,0,()=>mb,()=>s.PromptRouterTargetModel$,0,0,[()=>lb,0],5,5],7];s.PromptRouterTargetModel$=[3,m,zbe,0,[Tt],[0],1];s.PromptTemplate$=[3,m,Gbe,0,[XOe],[[()=>s1e,0]]];s.ProvisionedModelSummary$=[3,m,Dbe,0,[q0,F0,Tt,W6,cq,B0,K6,qe,Ht,En,S0,D6],[0,0,0,0,0,1,1,0,5,5,0,5],10];s.PutEnforcedGuardrailConfigurationRequest$=[3,m,bbe,0,[vke,wy],[()=>s.AccountEnforcedGuardrailInferenceInputConfiguration$,0],1];s.PutEnforcedGuardrailConfigurationResponse$=[3,m,Ibe,0,[wy,at,fV],[0,5,0]];s.PutModelInvocationLoggingConfigurationRequest$=[3,m,$be,0,[wq],[()=>s.LoggingConfig$],1];s.PutModelInvocationLoggingConfigurationResponse$=[3,m,kbe,0,[],[]];s.PutUseCaseForModelAccessRequest$=[3,m,jbe,0,[aq],[21],1];s.PutUseCaseForModelAccessResponse$=[3,m,qbe,0,[],[]];s.QueryTransformationConfiguration$=[3,m,Vbe,0,[Qe],[0],1];s.RatingScaleItem$=[3,m,mIe,0,[P0,xa],[0,()=>s.RatingScaleItemValue$],2];s.RegisterMarketplaceModelEndpointRequest$=[3,m,cIe,0,[W$e,Td],[[0,1],0],2];s.RegisterMarketplaceModelEndpointResponse$=[3,m,uIe,0,[Gy],[()=>s.MarketplaceModelEndpoint$],1];s.RequestMetadataBaseFilters$=[3,m,nIe,0,[x0,G0],[[()=>by,0],[()=>by,0]]];s.RetrieveAndGenerateConfiguration$=[3,m,Hbe,0,[Qe,tDe,oke],[0,[()=>s.KnowledgeBaseRetrieveAndGenerateConfiguration$,0],[()=>s.ExternalSourcesRetrieveAndGenerateConfiguration$,0]],1];s.RetrieveConfig$=[3,m,Jbe,0,[xq,nDe],[0,[()=>s.KnowledgeBaseRetrievalConfiguration$,0]],2];s.RFTConfig$=[3,m,eIe,0,[_ke,zy],[()=>s.GraderConfig$,()=>s.RFTHyperParameters$]];s.RFTHyperParameters$=[3,m,tIe,0,[V$e,a$e,mDe,zDe,nNe,Gke,HMe,J$e],[1,1,1,1,1,1,0,1]];s.RoutingCriteria$=[3,m,Xbe,0,[YMe],[1],1];s.S3Config$=[3,m,vIe,0,[o$e,iDe],[0,0],1];s.S3DataSource$=[3,m,RIe,0,[hi],[0],1];s.S3ObjectDoc$=[3,m,MIe,0,[RNe],[0],1];s.SageMakerEndpoint$=[3,m,wIe,0,[Mke,Wke,rke,oDe,MNe],[1,0,0,0,()=>s.VpcConfig$],3];s.StartAutomatedReasoningPolicyBuildWorkflowRequest$=[3,m,hIe,0,[Ce,_0,oOe,st],[[0,1],[0,1],[()=>s.AutomatedReasoningPolicyBuildWorkflowSource$,16],[0,{[bke]:UNe,[Hke]:1}]],3];s.StartAutomatedReasoningPolicyBuildWorkflowResponse$=[3,m,yIe,0,[Ce,ar],[0,0],2];s.StartAutomatedReasoningPolicyTestWorkflowRequest$=[3,m,EIe,0,[Ce,ar,MOe,st],[[0,1],[0,1],64,[0,4]],2];s.StartAutomatedReasoningPolicyTestWorkflowResponse$=[3,m,SIe,0,[Ce],[0],1];s.StatusDetails$=[3,m,AIe,0,[CNe,O$e,BOe],[()=>s.ValidationDetails$,()=>s.DataProcessingDetails$,()=>s.TrainingDetails$]];s.StopEvaluationJobRequest$=[3,m,CIe,0,[gi],[[()=>Id,1]],1];s.StopEvaluationJobResponse$=[3,m,TIe,0,[],[]];s.StopModelCustomizationJobRequest$=[3,m,bIe,0,[gi],[[0,1]],1];s.StopModelCustomizationJobResponse$=[3,m,IIe,0,[],[]];s.StopModelInvocationJobRequest$=[3,m,kIe,0,[gi],[[0,1]],1];s.StopModelInvocationJobResponse$=[3,m,DIe,0,[],[]];s.SupportTerm$=[3,m,NIe,0,[XMe],[0]];s.Tag$=[3,m,zIe,0,[M0,xa],[0,0],2];s.TagResourceRequest$=[3,m,ZIe,0,[W0,Hn],[0,()=>Ct],2];s.TagResourceResponse$=[3,m,XIe,0,[],[]];s.TeacherModelConfig$=[3,m,HIe,0,[WOe,UDe],[0,1],1];s.TermDetails$=[3,m,UIe,0,[lNe,yDe,COe,$Ne],[()=>s.PricingTerm$,()=>s.LegalTerm$,()=>s.SupportTerm$,()=>s.ValidityTerm$],3];s.TextInferenceConfig$=[3,m,jIe,0,[iNe,YOe,qDe,ROe],[1,1,1,64]];s.TrainingDataConfig$=[3,m,BIe,0,[hi,Nke],[0,[()=>s.InvocationLogsConfig$,0]]];s.TrainingDetails$=[3,m,GIe,0,[qe,Ht,En],[0,5,5]];s.TrainingMetrics$=[3,m,VIe,0,[VOe],[1]];s.UntagResourceRequest$=[3,m,Swe,0,[W0,qOe],[0,64],2];s.UntagResourceResponse$=[3,m,vwe,0,[],[]];s.UpdateAutomatedReasoningPolicyAnnotationsRequest$=[3,m,ewe,0,[Ce,ar,g0,EDe],[[0,1],[0,1],[()=>pb,0],0],4];s.UpdateAutomatedReasoningPolicyAnnotationsResponse$=[3,m,twe,0,[Ce,ar,b6,at],[0,0,0,5],4];s.UpdateAutomatedReasoningPolicyRequest$=[3,m,rwe,0,[Ce,xd,He,Ne],[[0,1],[()=>s.AutomatedReasoningPolicyDefinition$,0],[()=>As,0],[()=>Xc,0]],2];s.UpdateAutomatedReasoningPolicyResponse$=[3,m,nwe,0,[Ce,He,ky,at],[0,[()=>As,0],0,5],4];s.UpdateAutomatedReasoningPolicyTestCaseRequest$=[3,m,iwe,0,[Ce,Ca,Ly,Cd,My,jy,Ad,st],[[0,1],[0,1],[()=>Jy,0],5,0,[()=>Ky,0],1,[0,4]],5];s.UpdateAutomatedReasoningPolicyTestCaseResponse$=[3,m,swe,0,[Ce,Ca],[0,0],2];s.UpdateCustomModelDeploymentRequest$=[3,m,cwe,0,[Tt,v0],[0,[0,1]],2];s.UpdateCustomModelDeploymentResponse$=[3,m,uwe,0,[$y],[0],1];s.UpdateGuardrailRequest$=[3,m,dwe,0,[Aa,He,h0,y0,Ne,dV,L6,vV,tV,M6,x6,U6,O0],[[0,1],[()=>Zy,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,pwe,0,[Kc,Ny,bo,at],[0,0,0,5],4];s.UpdateMarketplaceModelEndpointRequest$=[3,m,fwe,0,[Wc,T0,st],[[0,1],()=>s.EndpointConfig$,[0,4]],2];s.UpdateMarketplaceModelEndpointResponse$=[3,m,gwe,0,[Gy],[()=>s.MarketplaceModelEndpoint$],1];s.UpdateProvisionedModelThroughputRequest$=[3,m,ywe,0,[j0,N$e,M$e],[[0,1],0,0],1];s.UpdateProvisionedModelThroughputResponse$=[3,m,_we,0,[],[]];s.ValidationDataConfig$=[3,m,Cwe,0,[kNe],[()=>TLe],1];s.ValidationDetails$=[3,m,Pwe,0,[qe,Ht,En],[0,5,5]];s.Validator$=[3,m,Awe,0,[hi],[0],1];s.ValidatorMetric$=[3,m,xwe,0,[xNe],[1]];s.ValidityTerm$=[3,m,kwe,0,[Nwe],[0]];s.VectorSearchBedrockRerankingConfiguration$=[3,m,Iwe,0,[TDe,YDe,wDe],[()=>s.VectorSearchBedrockRerankingModelConfiguration$,1,[()=>s.MetadataConfigurationForReranking$,0]],1];s.VectorSearchBedrockRerankingModelConfiguration$=[3,m,wwe,0,[Tt,p0],[0,143],1];s.VectorSearchRerankingConfiguration$=[3,m,$we,0,[Qe,i$e],[0,[()=>s.VectorSearchBedrockRerankingConfiguration$,0]],1];s.VpcConfig$=[3,m,Rwe,0,[fOe,uOe],[64,64],2];var a1e=[1,m,H_e,0,()=>s.AccountEnforcedGuardrailOutputConfiguration$],c1e=[1,m,G_e,0,[()=>s.AutomatedEvaluationCustomMetricSource$,0]],u1e=[1,m,W_e,0,[()=>s.AutomatedReasoningCheckScenario$,0]],l1e=[1,m,K_e,0,[()=>s.AutomatedReasoningCheckFinding$,0]],E6=[1,m,Q_e,0,[()=>s.AutomatedReasoningCheckInputTextReference$,0]],db=[1,m,nEe,0,()=>s.AutomatedReasoningCheckRule$],d1e=[1,m,uEe,0,[()=>s.AutomatedReasoningCheckTranslation$,0]],p1e=[1,m,dEe,0,[()=>s.AutomatedReasoningCheckTranslationOption$,0]],vd=[1,m,gEe,0,[()=>s.AutomatedReasoningLogicStatement$,0]],m1e=[1,m,EEe,0,[()=>s.AutomatedReasoningPolicyAnnotatedChunk$,0]],f1e=[1,m,SEe,0,[()=>s.AutomatedReasoningPolicyAnnotatedContent$,0]],pb=[1,m,CEe,0,[()=>s.AutomatedReasoningPolicyAnnotation$,0]],g1e=[1,m,$Ee,0,[()=>s.AutomatedReasoningPolicyAtomicStatement$,0]],h1e=[1,m,FEe,0,[()=>s.AutomatedReasoningPolicyBuildLogEntry$,0]],y1e=[1,m,HEe,0,[()=>s.AutomatedReasoningPolicyBuildResultAssetManifestEntry$,0]],_1e=[1,m,ZEe,0,[()=>s.AutomatedReasoningPolicyBuildStep$,0]],E1e=[1,m,YEe,0,()=>s.AutomatedReasoningPolicyBuildStepMessage$],S1e=[1,m,eSe,0,[()=>s.AutomatedReasoningPolicyBuildWorkflowDocument$,0]],v1e=[1,m,oSe,0,()=>s.AutomatedReasoningPolicyBuildWorkflowSummary$],A1e=[1,m,pSe,0,[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]],R1e=[1,m,ESe,0,[()=>s.AutomatedReasoningPolicyDefinitionType$,0]],P1e=[1,m,ASe,0,[()=>Co,0]],NV=[1,m,CSe,0,[()=>s.AutomatedReasoningPolicyDefinitionTypeValue$,0]],C1e=[1,m,xSe,0,[()=>s.AutomatedReasoningPolicyDefinitionTypeValuePair$,0]],T1e=[1,m,kSe,0,[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0]],LV=[1,m,OSe,0,[()=>fi,0]],x1e=[1,m,gSe,0,[()=>s.AutomatedReasoningPolicyDisjointRuleSet$,0]],b1e=[1,m,GSe,0,[()=>s.AutomatedReasoningPolicyGeneratedTestCase$,0]],I1e=[1,m,USe,0,[()=>s.AutomatedReasoningPolicyBuildWorkflowDocument$,0]],zV=[1,m,qSe,0,[()=>cb,0]],w1e=[1,m,QSe,0,[()=>s.AutomatedReasoningPolicyReportSourceDocument$,0]],$1e=[1,m,ive,0,[()=>s.AutomatedReasoningPolicyScenario$,0]],UV=[1,m,ave,0,()=>s.AutomatedReasoningPolicyStatementReference$],k1e=[1,m,dve,0,[()=>s.AutomatedReasoningPolicySummary$,0]],D1e=[1,m,mve,0,[()=>s.AutomatedReasoningPolicyTestCase$,0]],M1e=[1,m,gve,0,[()=>s.AutomatedReasoningPolicyTestResult$,0]],O1e=[1,m,Eve,0,[()=>s.AutomatedReasoningPolicyTypeValueAnnotation$,0]],N1e=[1,m,Nve,0,[()=>s.BatchDeleteEvaluationJobError$,0]],L1e=[1,m,zve,0,[()=>s.BatchDeleteEvaluationJobItem$,0]],z1e=[1,m,Fve,0,()=>s.BedrockEvaluatorModel$],U1e=[1,m,CAe,0,()=>s.CustomMetricBedrockEvaluatorModel$],B1e=[1,m,MAe,0,()=>s.CustomModelDeploymentSummary$],G1e=[1,m,WAe,0,()=>s.CustomModelSummary$],BV=[1,m,iPe,0,[()=>s.EvaluationDatasetMetricConfig$,0]],F1e=[1,m,dPe,0,[()=>Id,0]],j1e=[1,m,EPe,0,[()=>IV,0]],q1e=[1,m,pPe,0,[()=>s.EvaluationModelConfig$,0]],V1e=[1,m,IPe,0,()=>s.EvaluationSummary$],H1e=[1,m,$Pe,0,[()=>s.ExternalSource$,0]],S6=[1,m,MPe,8,()=>s.FieldForReranking$],W1e=[1,m,zPe,0,()=>s.FoundationModelSummary$],J1e=[1,m,yCe,0,[()=>s.GuardrailContentFilter$,0]],K1e=[1,m,mCe,0,[()=>s.GuardrailContentFilterConfig$,0]],Z1e=[1,m,ACe,0,[()=>s.GuardrailContextualGroundingFilter$,0]],X1e=[1,m,vCe,0,[()=>s.GuardrailContextualGroundingFilterConfig$,0]],Y1e=[1,m,JCe,0,[()=>QNe,0]],Q1e=[1,m,CTe,0,[()=>s.GuardrailManagedWords$,0]],eLe=[1,m,TTe,0,[()=>s.GuardrailManagedWordsConfig$,0]],xy=[1,m,xTe,0,[()=>e1e,0]],tLe=[1,m,kTe,0,()=>s.GuardrailPiiEntity$],rLe=[1,m,$Te,0,()=>s.GuardrailPiiEntityConfig$],nLe=[1,m,FTe,0,()=>s.GuardrailRegex$],oLe=[1,m,GTe,0,()=>s.GuardrailRegexConfig$],iLe=[1,m,WTe,0,[()=>t1e,0]],sLe=[1,m,JTe,0,[()=>s.GuardrailSummary$,0]],GV=[1,m,txe,0,[()=>r1e,0]],aLe=[1,m,cxe,0,[()=>s.GuardrailTopic$,0]],cLe=[1,m,YTe,0,[()=>s.GuardrailTopicConfig$,0]],uLe=[1,m,_xe,0,[()=>s.GuardrailWord$,0]],lLe=[1,m,gxe,0,[()=>s.GuardrailWordConfig$,0]],dLe=[1,m,vxe,0,[()=>s.HumanEvaluationCustomMetric$,0]],pLe=[1,m,Ixe,0,()=>s.ImportedModelSummary$],FV=[1,m,Dxe,0,()=>s.InferenceProfileModel$],mLe=[1,m,Oxe,0,[()=>s.InferenceProfileSummary$,0]],fLe=[1,m,Sbe,0,()=>s.MarketplaceModelEndpointSummary$],gLe=[1,m,rbe,0,[()=>s.MetadataAttributeSchema$,0]],hLe=[1,m,sbe,0,()=>s.ModelCopyJobSummary$],yLe=[1,m,abe,0,()=>s.ModelCustomizationJobSummary$],_Le=[1,m,hbe,0,()=>s.ModelImportJobSummary$],ELe=[1,m,ybe,0,[()=>s.ModelInvocationJobSummary$,0]],SLe=[1,m,Cbe,0,()=>s.Offer$],vLe=[1,m,Lbe,0,[()=>s.PromptRouterSummary$,0]],mb=[1,m,Ube,0,()=>s.PromptRouterTargetModel$],ALe=[1,m,Mbe,0,()=>s.ProvisionedModelSummary$],RLe=[1,m,Kbe,0,[()=>s.RAGConfig$,0]],PLe=[1,m,Zbe,0,()=>s.DimensionalPriceRate$],CLe=[1,m,pIe,0,()=>s.RatingScaleItem$],v6=[1,m,iIe,0,[()=>s.RequestMetadataBaseFilters$,0]],A6=[1,m,Qbe,0,[()=>s.RetrievalFilter$,0]],Ct=[1,m,qIe,0,()=>s.Tag$],jV=[1,m,bwe,0,()=>s.ValidatorMetric$],TLe=[1,m,Dwe,0,()=>s.Validator$],xLe=[2,m,XSe,0,[0,0],[()=>s.AutomatedReasoningPolicyRuleReport$,0]],bLe=[2,m,wve,0,[()=>fi,0],[()=>s.AutomatedReasoningPolicyVariableReport$,0]],by=[2,m,sIe,8,0,0];s.AutomatedEvaluationCustomMetricSource$=[4,m,j_e,0,[g$e],[[()=>s.CustomMetricDefinition$,0]]];s.AutomatedReasoningCheckFinding$=[4,m,J_e,0,[DNe,Xke,bOe,Kke,kOe,LOe,QDe],[[()=>s.AutomatedReasoningCheckValidFinding$,0],[()=>s.AutomatedReasoningCheckInvalidFinding$,0],[()=>s.AutomatedReasoningCheckSatisfiableFinding$,0],[()=>s.AutomatedReasoningCheckImpossibleFinding$,0],[()=>s.AutomatedReasoningCheckTranslationAmbiguousFinding$,0],()=>s.AutomatedReasoningCheckTooComplexFinding$,()=>s.AutomatedReasoningCheckNoTranslationsFinding$]];s.AutomatedReasoningPolicyAnnotatedContent$=[4,m,vEe,0,[RDe],[[()=>s.AutomatedReasoningPolicyAnnotatedLine$,0]]];s.AutomatedReasoningPolicyAnnotation$=[4,m,yEe,0,[I6,hV,X6,w6,yV,Y6,T6,gV,Z6,Gwe,mNe,fNe,$ke],[[()=>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,kMe,Qwe,fq,jq,Uwe,C0,pke],[[()=>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,KEe,0,[wMe,KDe],[()=>s.AutomatedReasoningPolicyPlanning$,[()=>s.AutomatedReasoningPolicyMutation$,0]]];s.AutomatedReasoningPolicyDefinitionElement$=[4,m,sSe,0,[gMe,fMe,mMe],[[()=>s.AutomatedReasoningPolicyDefinitionVariable$,0],[()=>s.AutomatedReasoningPolicyDefinitionType$,0],[()=>s.AutomatedReasoningPolicyDefinitionRule$,0]]];s.AutomatedReasoningPolicyGenerateFidelityReportContent$=[4,m,zSe,0,[Q6],[[()=>I1e,0]]];s.AutomatedReasoningPolicyMutation$=[4,m,WSe,0,[I6,hV,X6,w6,yV,Y6,T6,gV,Z6],[[()=>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,_ve,0,[Jwe,SNe,B$e],[[()=>s.AutomatedReasoningPolicyAddTypeValue$,0],[()=>s.AutomatedReasoningPolicyUpdateTypeValue$,0],()=>s.AutomatedReasoningPolicyDeleteTypeValue$]];s.AutomatedReasoningPolicyWorkflowTypeContent$=[4,m,$ve,0,[Q6,PMe,Ske],[[()=>S1e,0],[()=>s.AutomatedReasoningPolicyBuildWorkflowRepairContent$,0],[()=>s.AutomatedReasoningPolicyGenerateFidelityReportContent$,0]]];s.CustomizationConfig$=[4,m,tAe,0,[k$e,VMe],[()=>s.DistillationConfig$,()=>s.RFTConfig$]];s.EndpointConfig$=[4,m,ePe,0,[yOe],[()=>s.SageMakerEndpoint$]];s.EvaluationConfig$=[4,m,tPe,0,[Zwe,xke],[[()=>s.AutomatedEvaluationConfig$,0],[()=>s.HumanEvaluationConfig$,0]]];s.EvaluationDatasetLocation$=[4,m,nPe,0,[hi],[0]];s.EvaluationInferenceConfig$=[4,m,aPe,0,[Zc,BMe],[[()=>q1e,0],[()=>RLe,0]]];s.EvaluationModelConfig$=[4,m,fPe,0,[e$e,SMe],[[()=>s.EvaluationBedrockModel$,0],()=>s.EvaluationPrecomputedInferenceSource$]];s.EvaluationPrecomputedRagSourceConfig$=[4,m,PPe,0,[tOe,OMe],[()=>s.EvaluationPrecomputedRetrieveSourceConfig$,()=>s.EvaluationPrecomputedRetrieveAndGenerateSourceConfig$]];s.EvaluatorModelConfig$=[4,m,gPe,0,[$6],[()=>z1e]];s.GraderConfig$=[4,m,OCe,0,[lDe],[()=>s.LambdaGraderConfig$]];s.InferenceProfileModelSource$=[4,m,kxe,0,[l$e],[0]];s.InvocationLogSource$=[4,m,xxe,0,[hi],[0]];s.KnowledgeBaseConfig$=[4,m,Lxe,0,[qMe,MMe],[[()=>s.RetrieveConfig$,0],[()=>s.RetrieveAndGenerateConfiguration$,0]]];s.ModelDataSource$=[4,m,cbe,0,[sOe],[()=>s.S3DataSource$]];s.ModelInvocationJobInputDataConfig$=[4,m,lbe,0,[dOe],[()=>s.ModelInvocationJobS3InputDataConfig$]];s.ModelInvocationJobOutputDataConfig$=[4,m,dbe,0,[EOe],[()=>s.ModelInvocationJobS3OutputDataConfig$]];s.RAGConfig$=[4,m,Wbe,0,[rDe,TMe],[[()=>s.KnowledgeBaseConfig$,0],()=>s.EvaluationPrecomputedRagSourceConfig$]];s.RatingScaleItemValue$=[4,m,fIe,0,[TOe,gke],[0,1]];s.RequestMetadataFilters$=[4,m,oIe,0,[x0,G0,R6,Lq],[[()=>by,0],[()=>by,0],[()=>v6,0],[()=>v6,0]]];s.RerankingMetadataSelectiveModeConfiguration$=[4,m,lIe,0,[fke,mke],[[()=>S6,0],[()=>S6,0]]];s.RetrievalFilter$=[4,m,Ybe,8,[x0,G0,Cke,Tke,_De,gDe,Zke,ZDe,xOe,cDe,iOe,R6,Lq],[()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,()=>s.FilterAttribute$,[()=>A6,0],[()=>A6,0]]];s.BatchDeleteEvaluationJob$=[9,m,Mve,{[W]:["POST","/evaluation-jobs/batch-delete",202]},()=>s.BatchDeleteEvaluationJobRequest$,()=>s.BatchDeleteEvaluationJobResponse$];s.CancelAutomatedReasoningPolicyBuildWorkflow$=[9,m,qve,{[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,Kve,{[W]:["POST","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>s.CreateAutomatedReasoningPolicyTestCaseRequest$,()=>s.CreateAutomatedReasoningPolicyTestCaseResponse$];s.CreateAutomatedReasoningPolicyVersion$=[9,m,Yve,{[W]:["POST","/automated-reasoning-policies/{policyArn}/versions",200]},()=>s.CreateAutomatedReasoningPolicyVersionRequest$,()=>s.CreateAutomatedReasoningPolicyVersionResponse$];s.CreateCustomModel$=[9,m,rAe,{[W]:["POST","/custom-models/create-custom-model",202]},()=>s.CreateCustomModelRequest$,()=>s.CreateCustomModelResponse$];s.CreateCustomModelDeployment$=[9,m,nAe,{[W]:["POST","/model-customization/custom-model-deployments",202]},()=>s.CreateCustomModelDeploymentRequest$,()=>s.CreateCustomModelDeploymentResponse$];s.CreateEvaluationJob$=[9,m,uAe,{[W]:["POST","/evaluation-jobs",202]},()=>s.CreateEvaluationJobRequest$,()=>s.CreateEvaluationJobResponse$];s.CreateFoundationModelAgreement$=[9,m,pAe,{[W]:["POST","/create-foundation-model-agreement",202]},()=>s.CreateFoundationModelAgreementRequest$,()=>s.CreateFoundationModelAgreementResponse$];s.CreateGuardrail$=[9,m,gAe,{[W]:["POST","/guardrails",202]},()=>s.CreateGuardrailRequest$,()=>s.CreateGuardrailResponse$];s.CreateGuardrailVersion$=[9,m,_Ae,{[W]:["POST","/guardrails/{guardrailIdentifier}",202]},()=>s.CreateGuardrailVersionRequest$,()=>s.CreateGuardrailVersionResponse$];s.CreateInferenceProfile$=[9,m,vAe,{[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,TAe,{[W]:["POST","/model-copy-jobs",201]},()=>s.CreateModelCopyJobRequest$,()=>s.CreateModelCopyJobResponse$];s.CreateModelCustomizationJob$=[9,m,$Ae,{[W]:["POST","/model-customization-jobs",201]},()=>s.CreateModelCustomizationJobRequest$,()=>s.CreateModelCustomizationJobResponse$];s.CreateModelImportJob$=[9,m,LAe,{[W]:["POST","/model-import-jobs",201]},()=>s.CreateModelImportJobRequest$,()=>s.CreateModelImportJobResponse$];s.CreateModelInvocationJob$=[9,m,FAe,{[W]:["POST","/model-invocation-job",200]},()=>s.CreateModelInvocationJobRequest$,()=>s.CreateModelInvocationJobResponse$];s.CreatePromptRouter$=[9,m,YAe,{[W]:["POST","/prompt-routers",200]},()=>s.CreatePromptRouterRequest$,()=>s.CreatePromptRouterResponse$];s.CreateProvisionedModelThroughput$=[9,m,KAe,{[W]:["POST","/provisioned-model-throughput",201]},()=>s.CreateProvisionedModelThroughputRequest$,()=>s.CreateProvisionedModelThroughputResponse$];s.DeleteAutomatedReasoningPolicy$=[9,m,rRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}",202]},()=>s.DeleteAutomatedReasoningPolicyRequest$,()=>s.DeleteAutomatedReasoningPolicyResponse$];s.DeleteAutomatedReasoningPolicyBuildWorkflow$=[9,m,nRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}",202]},()=>s.DeleteAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.DeleteAutomatedReasoningPolicyBuildWorkflowResponse$];s.DeleteAutomatedReasoningPolicyTestCase$=[9,m,cRe,{[W]:["DELETE","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",202]},()=>s.DeleteAutomatedReasoningPolicyTestCaseRequest$,()=>s.DeleteAutomatedReasoningPolicyTestCaseResponse$];s.DeleteCustomModel$=[9,m,pRe,{[W]:["DELETE","/custom-models/{modelIdentifier}",200]},()=>s.DeleteCustomModelRequest$,()=>s.DeleteCustomModelResponse$];s.DeleteCustomModelDeployment$=[9,m,mRe,{[W]:["DELETE","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>s.DeleteCustomModelDeploymentRequest$,()=>s.DeleteCustomModelDeploymentResponse$];s.DeleteEnforcedGuardrailConfiguration$=[9,m,_Re,{[W]:["DELETE","/enforcedGuardrailsConfiguration/{configId}",200]},()=>s.DeleteEnforcedGuardrailConfigurationRequest$,()=>s.DeleteEnforcedGuardrailConfigurationResponse$];s.DeleteFoundationModelAgreement$=[9,m,vRe,{[W]:["POST","/delete-foundation-model-agreement",202]},()=>s.DeleteFoundationModelAgreementRequest$,()=>s.DeleteFoundationModelAgreementResponse$];s.DeleteGuardrail$=[9,m,PRe,{[W]:["DELETE","/guardrails/{guardrailIdentifier}",202]},()=>s.DeleteGuardrailRequest$,()=>s.DeleteGuardrailResponse$];s.DeleteImportedModel$=[9,m,xRe,{[W]:["DELETE","/imported-models/{modelIdentifier}",200]},()=>s.DeleteImportedModelRequest$,()=>s.DeleteImportedModelResponse$];s.DeleteInferenceProfile$=[9,m,wRe,{[W]:["DELETE","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>s.DeleteInferenceProfileRequest$,()=>s.DeleteInferenceProfileResponse$];s.DeleteMarketplaceModelEndpoint$=[9,m,NRe,{[W]:["DELETE","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.DeleteMarketplaceModelEndpointRequest$,()=>s.DeleteMarketplaceModelEndpointResponse$];s.DeleteModelInvocationLoggingConfiguration$=[9,m,DRe,{[W]:["DELETE","/logging/modelinvocations",200]},()=>s.DeleteModelInvocationLoggingConfigurationRequest$,()=>s.DeleteModelInvocationLoggingConfigurationResponse$];s.DeletePromptRouter$=[9,m,KRe,{[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,GRe,{[W]:["DELETE","/marketplace-model/endpoints/{endpointArn}/registration",200]},()=>s.DeregisterMarketplaceModelEndpointRequest$,()=>s.DeregisterMarketplaceModelEndpointResponse$];s.ExportAutomatedReasoningPolicyVersion$=[9,m,ZRe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/export",200]},()=>s.ExportAutomatedReasoningPolicyVersionRequest$,()=>s.ExportAutomatedReasoningPolicyVersionResponse$];s.GetAutomatedReasoningPolicy$=[9,m,aCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}",200]},()=>s.GetAutomatedReasoningPolicyRequest$,()=>s.GetAutomatedReasoningPolicyResponse$];s.GetAutomatedReasoningPolicyAnnotations$=[9,m,BPe,{[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,VPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/result-assets",200]},()=>s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest$,()=>s.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse$];s.GetAutomatedReasoningPolicyNextScenario$=[9,m,ZPe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/scenarios",200]},()=>s.GetAutomatedReasoningPolicyNextScenarioRequest$,()=>s.GetAutomatedReasoningPolicyNextScenarioResponse$];s.GetAutomatedReasoningPolicyTestCase$=[9,m,tCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>s.GetAutomatedReasoningPolicyTestCaseRequest$,()=>s.GetAutomatedReasoningPolicyTestCaseResponse$];s.GetAutomatedReasoningPolicyTestResult$=[9,m,oCe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-cases/{testCaseId}/test-results",200]},()=>s.GetAutomatedReasoningPolicyTestResultRequest$,()=>s.GetAutomatedReasoningPolicyTestResultResponse$];s.GetCustomModel$=[9,m,CCe,{[W]:["GET","/custom-models/{modelIdentifier}",200]},()=>s.GetCustomModelRequest$,()=>s.GetCustomModelResponse$];s.GetCustomModelDeployment$=[9,m,TCe,{[W]:["GET","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>s.GetCustomModelDeploymentRequest$,()=>s.GetCustomModelDeploymentResponse$];s.GetEvaluationJob$=[9,m,zCe,{[W]:["GET","/evaluation-jobs/{jobIdentifier}",200]},()=>s.GetEvaluationJobRequest$,()=>s.GetEvaluationJobResponse$];s.GetFoundationModel$=[9,m,GCe,{[W]:["GET","/foundation-models/{modelIdentifier}",200]},()=>s.GetFoundationModelRequest$,()=>s.GetFoundationModelResponse$];s.GetFoundationModelAvailability$=[9,m,FCe,{[W]:["GET","/foundation-model-availability/{modelId}",200]},()=>s.GetFoundationModelAvailabilityRequest$,()=>s.GetFoundationModelAvailabilityResponse$];s.GetGuardrail$=[9,m,KCe,{[W]:["GET","/guardrails/{guardrailIdentifier}",200]},()=>s.GetGuardrailRequest$,()=>s.GetGuardrailResponse$];s.GetImportedModel$=[9,m,YCe,{[W]:["GET","/imported-models/{modelIdentifier}",200]},()=>s.GetImportedModelRequest$,()=>s.GetImportedModelResponse$];s.GetInferenceProfile$=[9,m,tTe,{[W]:["GET","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>s.GetInferenceProfileRequest$,()=>s.GetInferenceProfileResponse$];s.GetMarketplaceModelEndpoint$=[9,m,STe,{[W]:["GET","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.GetMarketplaceModelEndpointRequest$,()=>s.GetMarketplaceModelEndpointResponse$];s.GetModelCopyJob$=[9,m,iTe,{[W]:["GET","/model-copy-jobs/{jobArn}",200]},()=>s.GetModelCopyJobRequest$,()=>s.GetModelCopyJobResponse$];s.GetModelCustomizationJob$=[9,m,lTe,{[W]:["GET","/model-customization-jobs/{jobIdentifier}",200]},()=>s.GetModelCustomizationJobRequest$,()=>s.GetModelCustomizationJobResponse$];s.GetModelImportJob$=[9,m,dTe,{[W]:["GET","/model-import-jobs/{jobIdentifier}",200]},()=>s.GetModelImportJobRequest$,()=>s.GetModelImportJobResponse$];s.GetModelInvocationJob$=[9,m,hTe,{[W]:["GET","/model-invocation-job/{jobIdentifier}",200]},()=>s.GetModelInvocationJobRequest$,()=>s.GetModelInvocationJobResponse$];s.GetModelInvocationLoggingConfiguration$=[9,m,yTe,{[W]:["GET","/logging/modelinvocations",200]},()=>s.GetModelInvocationLoggingConfigurationRequest$,()=>s.GetModelInvocationLoggingConfigurationResponse$];s.GetPromptRouter$=[9,m,NTe,{[W]:["GET","/prompt-routers/{promptRouterArn}",200]},()=>s.GetPromptRouterRequest$,()=>s.GetPromptRouterResponse$];s.GetProvisionedModelThroughput$=[9,m,DTe,{[W]:["GET","/provisioned-model-throughput/{provisionedModelId}",200]},()=>s.GetProvisionedModelThroughputRequest$,()=>s.GetProvisionedModelThroughputResponse$];s.GetUseCaseForModelAccess$=[9,m,uxe,{[W]:["GET","/use-case-for-model-access",200]},()=>s.GetUseCaseForModelAccessRequest$,()=>s.GetUseCaseForModelAccessResponse$];s.ListAutomatedReasoningPolicies$=[9,m,Fxe,{[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,Jxe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>s.ListAutomatedReasoningPolicyTestCasesRequest$,()=>s.ListAutomatedReasoningPolicyTestCasesResponse$];s.ListAutomatedReasoningPolicyTestResults$=[9,m,Xxe,{[W]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-results",200]},()=>s.ListAutomatedReasoningPolicyTestResultsRequest$,()=>s.ListAutomatedReasoningPolicyTestResultsResponse$];s.ListCustomModelDeployments$=[9,m,r0e,{[W]:["GET","/model-customization/custom-model-deployments",200]},()=>s.ListCustomModelDeploymentsRequest$,()=>s.ListCustomModelDeploymentsResponse$];s.ListCustomModels$=[9,m,t0e,{[W]:["GET","/custom-models",200]},()=>s.ListCustomModelsRequest$,()=>s.ListCustomModelsResponse$];s.ListEnforcedGuardrailsConfiguration$=[9,m,a0e,{[W]:["GET","/enforcedGuardrailsConfiguration",200]},()=>s.ListEnforcedGuardrailsConfigurationRequest$,()=>s.ListEnforcedGuardrailsConfigurationResponse$];s.ListEvaluationJobs$=[9,m,l0e,{[W]:["GET","/evaluation-jobs",200]},()=>s.ListEvaluationJobsRequest$,()=>s.ListEvaluationJobsResponse$];s.ListFoundationModelAgreementOffers$=[9,m,f0e,{[W]:["GET","/list-foundation-model-agreement-offers/{modelId}",200]},()=>s.ListFoundationModelAgreementOffersRequest$,()=>s.ListFoundationModelAgreementOffersResponse$];s.ListFoundationModels$=[9,m,m0e,{[W]:["GET","/foundation-models",200]},()=>s.ListFoundationModelsRequest$,()=>s.ListFoundationModelsResponse$];s.ListGuardrails$=[9,m,E0e,{[W]:["GET","/guardrails",200]},()=>s.ListGuardrailsRequest$,()=>s.ListGuardrailsResponse$];s.ListImportedModels$=[9,m,R0e,{[W]:["GET","/imported-models",200]},()=>s.ListImportedModelsRequest$,()=>s.ListImportedModelsResponse$];s.ListInferenceProfiles$=[9,m,T0e,{[W]:["GET","/inference-profiles",200]},()=>s.ListInferenceProfilesRequest$,()=>s.ListInferenceProfilesResponse$];s.ListMarketplaceModelEndpoints$=[9,m,G0e,{[W]:["GET","/marketplace-model/endpoints",200]},()=>s.ListMarketplaceModelEndpointsRequest$,()=>s.ListMarketplaceModelEndpointsResponse$];s.ListModelCopyJobs$=[9,m,I0e,{[W]:["GET","/model-copy-jobs",200]},()=>s.ListModelCopyJobsRequest$,()=>s.ListModelCopyJobsResponse$];s.ListModelCustomizationJobs$=[9,m,M0e,{[W]:["GET","/model-customization-jobs",200]},()=>s.ListModelCustomizationJobsRequest$,()=>s.ListModelCustomizationJobsResponse$];s.ListModelImportJobs$=[9,m,O0e,{[W]:["GET","/model-import-jobs",200]},()=>s.ListModelImportJobsRequest$,()=>s.ListModelImportJobsResponse$];s.ListModelInvocationJobs$=[9,m,B0e,{[W]:["GET","/model-invocation-jobs",200]},()=>s.ListModelInvocationJobsRequest$,()=>s.ListModelInvocationJobsResponse$];s.ListPromptRouters$=[9,m,W0e,{[W]:["GET","/prompt-routers",200]},()=>s.ListPromptRoutersRequest$,()=>s.ListPromptRoutersResponse$];s.ListProvisionedModelThroughputs$=[9,m,q0e,{[W]:["GET","/provisioned-model-throughputs",200]},()=>s.ListProvisionedModelThroughputsRequest$,()=>s.ListProvisionedModelThroughputsResponse$];s.ListTagsForResource$=[9,m,X0e,{[W]:["POST","/listTagsForResource",200]},()=>s.ListTagsForResourceRequest$,()=>s.ListTagsForResourceResponse$];s.PutEnforcedGuardrailConfiguration$=[9,m,xbe,{[W]:["PUT","/enforcedGuardrailsConfiguration",200]},()=>s.PutEnforcedGuardrailConfigurationRequest$,()=>s.PutEnforcedGuardrailConfigurationResponse$];s.PutModelInvocationLoggingConfiguration$=[9,m,wbe,{[W]:["PUT","/logging/modelinvocations",200]},()=>s.PutModelInvocationLoggingConfigurationRequest$,()=>s.PutModelInvocationLoggingConfigurationResponse$];s.PutUseCaseForModelAccess$=[9,m,Fbe,{[W]:["POST","/use-case-for-model-access",201]},()=>s.PutUseCaseForModelAccessRequest$,()=>s.PutUseCaseForModelAccessResponse$];s.RegisterMarketplaceModelEndpoint$=[9,m,aIe,{[W]:["POST","/marketplace-model/endpoints/{endpointIdentifier}/registration",200]},()=>s.RegisterMarketplaceModelEndpointRequest$,()=>s.RegisterMarketplaceModelEndpointResponse$];s.StartAutomatedReasoningPolicyBuildWorkflow$=[9,m,gIe,{[W]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowType}/start",200]},()=>s.StartAutomatedReasoningPolicyBuildWorkflowRequest$,()=>s.StartAutomatedReasoningPolicyBuildWorkflowResponse$];s.StartAutomatedReasoningPolicyTestWorkflow$=[9,m,_Ie,{[W]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-workflows",200]},()=>s.StartAutomatedReasoningPolicyTestWorkflowRequest$,()=>s.StartAutomatedReasoningPolicyTestWorkflowResponse$];s.StopEvaluationJob$=[9,m,PIe,{[W]:["POST","/evaluation-job/{jobIdentifier}/stop",200]},()=>s.StopEvaluationJobRequest$,()=>s.StopEvaluationJobResponse$];s.StopModelCustomizationJob$=[9,m,xIe,{[W]:["POST","/model-customization-jobs/{jobIdentifier}/stop",200]},()=>s.StopModelCustomizationJobRequest$,()=>s.StopModelCustomizationJobResponse$];s.StopModelInvocationJob$=[9,m,$Ie,{[W]:["POST","/model-invocation-job/{jobIdentifier}/stop",200]},()=>s.StopModelInvocationJobRequest$,()=>s.StopModelInvocationJobResponse$];s.TagResource$=[9,m,KIe,{[W]:["POST","/tagResource",200]},()=>s.TagResourceRequest$,()=>s.TagResourceResponse$];s.UntagResource$=[9,m,Ewe,{[W]:["POST","/untagResource",200]},()=>s.UntagResourceRequest$,()=>s.UntagResourceResponse$];s.UpdateAutomatedReasoningPolicy$=[9,m,YIe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}",200]},()=>s.UpdateAutomatedReasoningPolicyRequest$,()=>s.UpdateAutomatedReasoningPolicyResponse$];s.UpdateAutomatedReasoningPolicyAnnotations$=[9,m,QIe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations",200]},()=>s.UpdateAutomatedReasoningPolicyAnnotationsRequest$,()=>s.UpdateAutomatedReasoningPolicyAnnotationsResponse$];s.UpdateAutomatedReasoningPolicyTestCase$=[9,m,owe,{[W]:["PATCH","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>s.UpdateAutomatedReasoningPolicyTestCaseRequest$,()=>s.UpdateAutomatedReasoningPolicyTestCaseResponse$];s.UpdateCustomModelDeployment$=[9,m,awe,{[W]:["PATCH","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",202]},()=>s.UpdateCustomModelDeploymentRequest$,()=>s.UpdateCustomModelDeploymentResponse$];s.UpdateGuardrail$=[9,m,lwe,{[W]:["PUT","/guardrails/{guardrailIdentifier}",202]},()=>s.UpdateGuardrailRequest$,()=>s.UpdateGuardrailResponse$];s.UpdateMarketplaceModelEndpoint$=[9,m,mwe,{[W]:["PATCH","/marketplace-model/endpoints/{endpointArn}",200]},()=>s.UpdateMarketplaceModelEndpointRequest$,()=>s.UpdateMarketplaceModelEndpointResponse$];s.UpdateProvisionedModelThroughput$=[9,m,hwe,{[W]:["PATCH","/provisioned-model-throughput/{provisionedModelId}",200]},()=>s.UpdateProvisionedModelThroughputRequest$,()=>s.UpdateProvisionedModelThroughputResponse$]});var HV=N(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.getRuntimeConfig=void 0;var ILe=(Sa(),Q(Ea)),wLe=(mo(),Q(ll)),$Le=(Xe(),Q(fr)),kLe=ue(),DLe=Gr(),qV=gt(),VV=ft(),MLe=Hx(),OLe=t6(),NLe=fb(),LLe=i(e=>({apiVersion:"2023-04-20",base64Decoder:e?.base64Decoder??qV.fromBase64,base64Encoder:e?.base64Encoder??qV.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??OLe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??MLe.defaultBedrockHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new ILe.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#httpBearerAuth"),"identityProvider"),signer:new $Le.HttpBearerAuthSigner}],logger:e?.logger??new kLe.NoOpLogger,protocol:e?.protocol??wLe.AwsRestJsonProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.bedrock",errorTypeRegistries:NLe.errorTypeRegistries,version:"2023-04-20",serviceTarget:"AmazonBedrockControlPlaneService"},serviceId:e?.serviceId??"Bedrock",urlParser:e?.urlParser??DLe.parseUrl,utf8Decoder:e?.utf8Decoder??VV.fromUtf8,utf8Encoder:e?.utf8Encoder??VV.toUtf8}),"getRuntimeConfig");Xy.getRuntimeConfig=LLe});var YV=N(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.getRuntimeConfig=void 0;var zLe=(O3(),Q(M3)),ULe=zLe.__importDefault(N3()),gb=(Sa(),Q(Ea)),BLe=kh(),WV=B3(),JV=qi(),Yy=Nt(),GLe=(Xe(),Q(fr)),FLe=Vi(),KV=hr(),ba=cn(),ZV=to(),XV=ue(),jLe=Hi(),qLe=Wi(),VLe=Mn(),HLe=HV(),WLe=i(e=>{(0,XV.emitWarningIfUnsupportedVersion)(process.version);let t=(0,qLe.resolveDefaultsModeConfig)(e),r=i(()=>t().then(XV.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,HLe.getRuntimeConfig)(e);(0,gb.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger,signingName:"bedrock"};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,ba.loadConfig)(gb.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??jLe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??BLe.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,JV.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:ULe.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new gb.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#httpBearerAuth")||(async c=>{try{return await(0,WV.fromEnvSigningName)({signingName:"bedrock"})()}catch{return await(0,WV.nodeProvider)(c)(c)}}),"identityProvider"),signer:new GLe.HttpBearerAuthSigner}],maxAttempts:e?.maxAttempts??(0,ba.loadConfig)(KV.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,ba.loadConfig)(Yy.NODE_REGION_CONFIG_OPTIONS,{...Yy.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:ZV.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,ba.loadConfig)({...KV.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||VLe.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??FLe.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??ZV.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,ba.loadConfig)(Yy.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,ba.loadConfig)(Yy.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,ba.loadConfig)(JV.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");Qy.getRuntimeConfig=WLe});var Yc=N(k=>{"use strict";var QV=Ci(),JLe=Ti(),KLe=xi(),eH=ti(),ZLe=Nt(),_t=(Xe(),Q(fr)),XLe=(ke(),Q(Wo)),YLe=Ni(),H=gr(),tH=hr(),q=ue(),rH=Hx(),QLe=YV(),nH=go(),oH=Me(),V=fb(),e_=u0(),eze=Ay(),tze=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"}},rze=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"),nze=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials(),token:e.token()}),"resolveHttpAuthRuntimeConfig"),oze=i((e,t)=>{let r=Object.assign(nH.getAwsRegionExtensionConfiguration(e),q.getDefaultExtensionConfiguration(e),oH.getHttpHandlerExtensionConfiguration(e),rze(e));return t.forEach(n=>n.configure(r)),Object.assign(e,nH.resolveAwsRegionExtensionConfiguration(r),q.resolveDefaultRuntimeConfig(r),oH.resolveHttpHandlerRuntimeConfig(r),nze(r))},"resolveRuntimeExtensions"),mt=class extends q.Client{static{i(this,"BedrockClient")}config;constructor(...[t]){let r=QLe.getRuntimeConfig(t||{});super(r),this.initConfig=r;let n=tze(r),o=eH.resolveUserAgentConfig(n),a=tH.resolveRetryConfig(o),c=ZLe.resolveRegionConfig(a),u=QV.resolveHostHeaderConfig(c),l=H.resolveEndpointConfig(u),d=rH.resolveHttpAuthSchemeConfig(l),_=oze(d,t?.extensions||[]);this.config=_,this.middlewareStack.use(XLe.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(eH.getUserAgentPlugin(this.config)),this.middlewareStack.use(tH.getRetryPlugin(this.config)),this.middlewareStack.use(YLe.getContentLengthPlugin(this.config)),this.middlewareStack.use(QV.getHostHeaderPlugin(this.config)),this.middlewareStack.use(JLe.getLoggerPlugin(this.config)),this.middlewareStack.use(KLe.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(_t.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:rH.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()}},t_=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")}},r_=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")}},n_=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")}},o_=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")}},i_=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")}},s_=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")}},a_=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")}},c_=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")}},u_=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")}},l_=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")}},d_=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")}},p_=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")}},m_=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")}},f_=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")}},g_=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")}},h_=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")}},y_=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")}},__=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")}},E_=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")}},S_=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")}},v_=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")}},A_=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")}},R_=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")}},P_=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")}},C_=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")}},T_=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")}},x_=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")}},b_=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")}},I_=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")}},w_=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")}},$_=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")}},k_=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")}},D_=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")}},M_=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")}},O_=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")}},N_=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")}},L_=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")}},z_=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")}},U_=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")}},B_=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")}},G_=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")}},F_=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")}},j_=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")}},q_=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")}},V_=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")}},H_=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")}},W_=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")}},J_=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")}},K_=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")}},Z_=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")}},X_=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")}},Y_=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")}},Q_=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")}},eE=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")}},tE=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")}},rE=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")}},nE=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")}},oE=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")}},iE=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")}},sE=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")}},aE=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")}},cE=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")}},uE=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")}},lE=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")}},dE=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")}},pE=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")}},mE=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")}},fE=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")}},gE=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")}},hE=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")}},yE=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")}},_E=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")}},EE=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")}},SE=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")}},vE=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")}},AE=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")}},RE=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")}},PE=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")}},CE=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")}},TE=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")}},iH=_t.createPaginator(mt,$d,"nextToken","nextToken","maxResults"),sH=_t.createPaginator(mt,kd,"nextToken","nextToken","maxResults"),aH=_t.createPaginator(mt,Dd,"nextToken","nextToken","maxResults"),cH=_t.createPaginator(mt,Md,"nextToken","nextToken","maxResults"),uH=_t.createPaginator(mt,Od,"nextToken","nextToken","maxResults"),lH=_t.createPaginator(mt,Nd,"nextToken","nextToken","maxResults"),dH=_t.createPaginator(mt,Ld,"nextToken","nextToken",""),pH=_t.createPaginator(mt,zd,"nextToken","nextToken","maxResults"),mH=_t.createPaginator(mt,Ud,"nextToken","nextToken","maxResults"),fH=_t.createPaginator(mt,Bd,"nextToken","nextToken","maxResults"),gH=_t.createPaginator(mt,Gd,"nextToken","nextToken","maxResults"),hH=_t.createPaginator(mt,Fd,"nextToken","nextToken","maxResults"),yH=_t.createPaginator(mt,jd,"nextToken","nextToken","maxResults"),_H=_t.createPaginator(mt,qd,"nextToken","nextToken","maxResults"),EH=_t.createPaginator(mt,Vd,"nextToken","nextToken","maxResults"),SH=_t.createPaginator(mt,Hd,"nextToken","nextToken","maxResults"),vH=_t.createPaginator(mt,Wd,"nextToken","nextToken","maxResults"),AH=_t.createPaginator(mt,Jd,"nextToken","nextToken","maxResults"),ize={BatchDeleteEvaluationJobCommand:t_,CancelAutomatedReasoningPolicyBuildWorkflowCommand:r_,CreateAutomatedReasoningPolicyCommand:n_,CreateAutomatedReasoningPolicyTestCaseCommand:o_,CreateAutomatedReasoningPolicyVersionCommand:i_,CreateCustomModelCommand:s_,CreateCustomModelDeploymentCommand:a_,CreateEvaluationJobCommand:c_,CreateFoundationModelAgreementCommand:u_,CreateGuardrailCommand:l_,CreateGuardrailVersionCommand:d_,CreateInferenceProfileCommand:p_,CreateMarketplaceModelEndpointCommand:m_,CreateModelCopyJobCommand:f_,CreateModelCustomizationJobCommand:g_,CreateModelImportJobCommand:h_,CreateModelInvocationJobCommand:y_,CreatePromptRouterCommand:__,CreateProvisionedModelThroughputCommand:E_,DeleteAutomatedReasoningPolicyCommand:v_,DeleteAutomatedReasoningPolicyBuildWorkflowCommand:S_,DeleteAutomatedReasoningPolicyTestCaseCommand:A_,DeleteCustomModelCommand:R_,DeleteCustomModelDeploymentCommand:P_,DeleteEnforcedGuardrailConfigurationCommand:C_,DeleteFoundationModelAgreementCommand:T_,DeleteGuardrailCommand:x_,DeleteImportedModelCommand:b_,DeleteInferenceProfileCommand:I_,DeleteMarketplaceModelEndpointCommand:w_,DeleteModelInvocationLoggingConfigurationCommand:$_,DeletePromptRouterCommand:k_,DeleteProvisionedModelThroughputCommand:D_,DeregisterMarketplaceModelEndpointCommand:M_,ExportAutomatedReasoningPolicyVersionCommand:O_,GetAutomatedReasoningPolicyCommand:U_,GetAutomatedReasoningPolicyAnnotationsCommand:N_,GetAutomatedReasoningPolicyBuildWorkflowCommand:L_,GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand:z_,GetAutomatedReasoningPolicyNextScenarioCommand:B_,GetAutomatedReasoningPolicyTestCaseCommand:G_,GetAutomatedReasoningPolicyTestResultCommand:F_,GetCustomModelCommand:j_,GetCustomModelDeploymentCommand:q_,GetEvaluationJobCommand:V_,GetFoundationModelCommand:W_,GetFoundationModelAvailabilityCommand:H_,GetGuardrailCommand:J_,GetImportedModelCommand:K_,GetInferenceProfileCommand:Z_,GetMarketplaceModelEndpointCommand:X_,GetModelCopyJobCommand:Y_,GetModelCustomizationJobCommand:Q_,GetModelImportJobCommand:eE,GetModelInvocationJobCommand:tE,GetModelInvocationLoggingConfigurationCommand:rE,GetPromptRouterCommand:nE,GetProvisionedModelThroughputCommand:oE,GetUseCaseForModelAccessCommand:iE,ListAutomatedReasoningPoliciesCommand:$d,ListAutomatedReasoningPolicyBuildWorkflowsCommand:kd,ListAutomatedReasoningPolicyTestCasesCommand:Dd,ListAutomatedReasoningPolicyTestResultsCommand:Md,ListCustomModelDeploymentsCommand:Od,ListCustomModelsCommand:Nd,ListEnforcedGuardrailsConfigurationCommand:Ld,ListEvaluationJobsCommand:zd,ListFoundationModelAgreementOffersCommand:sE,ListFoundationModelsCommand:aE,ListGuardrailsCommand:Ud,ListImportedModelsCommand:Bd,ListInferenceProfilesCommand:Gd,ListMarketplaceModelEndpointsCommand:Fd,ListModelCopyJobsCommand:jd,ListModelCustomizationJobsCommand:qd,ListModelImportJobsCommand:Vd,ListModelInvocationJobsCommand:Hd,ListPromptRoutersCommand:Wd,ListProvisionedModelThroughputsCommand:Jd,ListTagsForResourceCommand:cE,PutEnforcedGuardrailConfigurationCommand:uE,PutModelInvocationLoggingConfigurationCommand:lE,PutUseCaseForModelAccessCommand:dE,RegisterMarketplaceModelEndpointCommand:pE,StartAutomatedReasoningPolicyBuildWorkflowCommand:mE,StartAutomatedReasoningPolicyTestWorkflowCommand:fE,StopEvaluationJobCommand:gE,StopModelCustomizationJobCommand:hE,StopModelInvocationJobCommand:yE,TagResourceCommand:_E,UntagResourceCommand:EE,UpdateAutomatedReasoningPolicyCommand:vE,UpdateAutomatedReasoningPolicyAnnotationsCommand:SE,UpdateAutomatedReasoningPolicyTestCaseCommand:AE,UpdateCustomModelDeploymentCommand:RE,UpdateGuardrailCommand:PE,UpdateMarketplaceModelEndpointCommand:CE,UpdateProvisionedModelThroughputCommand:TE},sze={paginateListAutomatedReasoningPolicies:iH,paginateListAutomatedReasoningPolicyBuildWorkflows:sH,paginateListAutomatedReasoningPolicyTestCases:aH,paginateListAutomatedReasoningPolicyTestResults:cH,paginateListCustomModelDeployments:uH,paginateListCustomModels:lH,paginateListEnforcedGuardrailsConfiguration:dH,paginateListEvaluationJobs:pH,paginateListGuardrails:mH,paginateListImportedModels:fH,paginateListInferenceProfiles:gH,paginateListMarketplaceModelEndpoints:hH,paginateListModelCopyJobs:yH,paginateListModelCustomizationJobs:_H,paginateListModelImportJobs:EH,paginateListModelInvocationJobs:SH,paginateListPromptRouters:vH,paginateListProvisionedModelThroughputs:AH},xE=class extends mt{static{i(this,"Bedrock")}};q.createAggregatedClient(ize,xE,{paginators:sze});var aze={HONOR:"HONOR",IGNORE:"IGNORE"},cze={ACCOUNT:"ACCOUNT"},uze={AVAILABLE:"AVAILABLE",ERROR:"ERROR",NOT_AVAILABLE:"NOT_AVAILABLE",PENDING:"PENDING"},lze={IMPOSSIBLE:"IMPOSSIBLE",INVALID:"INVALID",NO_TRANSLATION:"NO_TRANSLATION",SATISFIABLE:"SATISFIABLE",TOO_COMPLEX:"TOO_COMPLEX",TRANSLATION_AMBIGUOUS:"TRANSLATION_AMBIGUOUS",VALID:"VALID"},dze={GENERATE_FIDELITY_REPORT:"GENERATE_FIDELITY_REPORT",GENERATE_POLICY_SCENARIOS:"GENERATE_POLICY_SCENARIOS",IMPORT_POLICY:"IMPORT_POLICY",INGEST_CONTENT:"INGEST_CONTENT",REFINE_POLICY:"REFINE_POLICY"},pze={PDF:"pdf",TEXT:"txt"},mze={BUILDING:"BUILDING",CANCELLED:"CANCELLED",CANCEL_REQUESTED:"CANCEL_REQUESTED",COMPLETED:"COMPLETED",FAILED:"FAILED",PREPROCESSING:"PREPROCESSING",SCHEDULED:"SCHEDULED",TESTING:"TESTING"},fze={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"},gze={ERROR:"ERROR",INFO:"INFO",WARNING:"WARNING"},hze={APPLIED:"APPLIED",FAILED:"FAILED"},yze={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},_ze={FAILED:"FAILED",PASSED:"PASSED"},Eze={COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS",NOT_STARTED:"NOT_STARTED",SCHEDULED:"SCHEDULED"},Sze={INCOMPATIBLE_ENDPOINT:"INCOMPATIBLE_ENDPOINT",REGISTERED:"REGISTERED"},vze={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},Aze={UPDATE_COMPLETED:"UpdateCompleted",UPDATE_FAILED:"UpdateFailed",UPDATING:"Updating"},Rze={CREATION_TIME:"CreationTime"},Pze={ASCENDING:"Ascending",DESCENDING:"Descending"},Cze={HIGH:"high",LOW:"low",MEDIUM:"medium"},Tze={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING",IMPORTED:"IMPORTED",REINFORCEMENT_FINE_TUNING:"REINFORCEMENT_FINE_TUNING"},xze={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},bze={COMPLETED:"Completed",DELETING:"Deleting",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},Ize={MODEL_EVALUATION:"ModelEvaluation",RAG_EVALUATION:"RagEvaluation"},wze={CLASSIFICATION:"Classification",CUSTOM:"Custom",GENERATION:"Generation",QUESTION_AND_ANSWER:"QuestionAndAnswer",SUMMARIZATION:"Summarization"},$ze={OPTIMIZED:"optimized",STANDARD:"standard"},kze={BYTE_CONTENT:"BYTE_CONTENT",S3:"S3"},Dze={QUERY_DECOMPOSITION:"QUERY_DECOMPOSITION"},Mze={BOOLEAN:"BOOLEAN",NUMBER:"NUMBER",STRING:"STRING",STRING_LIST:"STRING_LIST"},Oze={HYBRID:"HYBRID",SEMANTIC:"SEMANTIC"},Nze={ALL:"ALL",SELECTIVE:"SELECTIVE"},Lze={BEDROCK_RERANKING_MODEL:"BEDROCK_RERANKING_MODEL"},zze={EXTERNAL_SOURCES:"EXTERNAL_SOURCES",KNOWLEDGE_BASE:"KNOWLEDGE_BASE"},Uze={AUTOMATED:"Automated",HUMAN:"Human"},Bze={CREATION_TIME:"CreationTime"},Gze={BLOCK:"BLOCK",NONE:"NONE"},Fze={IMAGE:"IMAGE",TEXT:"TEXT"},jze={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},qze={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},Vze={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},Hze={BLOCK:"BLOCK",NONE:"NONE"},Wze={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},Jze={ANONYMIZE:"ANONYMIZE",BLOCK:"BLOCK",NONE:"NONE"},Kze={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"},Zze={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},Xze={BLOCK:"BLOCK",NONE:"NONE"},Yze={DENY:"DENY"},Qze={BLOCK:"BLOCK",NONE:"NONE"},eUe={PROFANITY:"PROFANITY"},tUe={CREATING:"CREATING",DELETING:"DELETING",FAILED:"FAILED",READY:"READY",UPDATING:"UPDATING",VERSIONING:"VERSIONING"},rUe={ACTIVE:"ACTIVE"},nUe={APPLICATION:"APPLICATION",SYSTEM_DEFINED:"SYSTEM_DEFINED"},oUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},iUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},sUe={JSONL:"JSONL"},aUe={Converse:"Converse",InvokeModel:"InvokeModel"},cUe={COMPLETED:"Completed",EXPIRED:"Expired",FAILED:"Failed",IN_PROGRESS:"InProgress",PARTIALLY_COMPLETED:"PartiallyCompleted",SCHEDULED:"Scheduled",STOPPED:"Stopped",STOPPING:"Stopping",SUBMITTED:"Submitted",VALIDATING:"Validating"},uUe={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING"},lUe={ON_DEMAND:"ON_DEMAND",PROVISIONED:"PROVISIONED"},dUe={EMBEDDING:"EMBEDDING",IMAGE:"IMAGE",TEXT:"TEXT"},pUe={ACTIVE:"ACTIVE",LEGACY:"LEGACY"},mUe={AVAILABLE:"AVAILABLE"},fUe={CUSTOM:"custom",DEFAULT:"default"},gUe={ONE_MONTH:"OneMonth",SIX_MONTHS:"SixMonths"},hUe={CREATING:"Creating",FAILED:"Failed",IN_SERVICE:"InService",UPDATING:"Updating"},yUe={CREATION_TIME:"CreationTime"},_Ue={AUTHORIZED:"AUTHORIZED",NOT_AUTHORIZED:"NOT_AUTHORIZED"},EUe={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},SUe={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},vUe={ALL:"ALL",PUBLIC:"PUBLIC"},AUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},RUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",NOT_STARTED:"NotStarted",STOPPED:"Stopped",STOPPING:"Stopping"},PUe={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"};k.$Command=q.Command;k.__Client=q.Client;k.BedrockServiceException=eze.BedrockServiceException;k.AgreementStatus=uze;k.ApplicationType=Ize;k.AttributeType=Mze;k.AuthorizationStatus=_Ue;k.AutomatedReasoningCheckLogicWarningType=yze;k.AutomatedReasoningCheckResult=lze;k.AutomatedReasoningPolicyAnnotationStatus=hze;k.AutomatedReasoningPolicyBuildDocumentContentType=pze;k.AutomatedReasoningPolicyBuildMessageType=gze;k.AutomatedReasoningPolicyBuildResultAssetType=fze;k.AutomatedReasoningPolicyBuildWorkflowStatus=mze;k.AutomatedReasoningPolicyBuildWorkflowType=dze;k.AutomatedReasoningPolicyTestRunResult=_ze;k.AutomatedReasoningPolicyTestRunStatus=Eze;k.BatchDeleteEvaluationJobCommand=t_;k.Bedrock=xE;k.BedrockClient=mt;k.CancelAutomatedReasoningPolicyBuildWorkflowCommand=r_;k.CommitmentDuration=gUe;k.ConfigurationOwner=cze;k.CreateAutomatedReasoningPolicyCommand=n_;k.CreateAutomatedReasoningPolicyTestCaseCommand=o_;k.CreateAutomatedReasoningPolicyVersionCommand=i_;k.CreateCustomModelCommand=s_;k.CreateCustomModelDeploymentCommand=a_;k.CreateEvaluationJobCommand=c_;k.CreateFoundationModelAgreementCommand=u_;k.CreateGuardrailCommand=l_;k.CreateGuardrailVersionCommand=d_;k.CreateInferenceProfileCommand=p_;k.CreateMarketplaceModelEndpointCommand=m_;k.CreateModelCopyJobCommand=f_;k.CreateModelCustomizationJobCommand=g_;k.CreateModelImportJobCommand=h_;k.CreateModelInvocationJobCommand=y_;k.CreatePromptRouterCommand=__;k.CreateProvisionedModelThroughputCommand=E_;k.CustomModelDeploymentStatus=vze;k.CustomModelDeploymentUpdateStatus=Aze;k.CustomizationType=Tze;k.DeleteAutomatedReasoningPolicyBuildWorkflowCommand=S_;k.DeleteAutomatedReasoningPolicyCommand=v_;k.DeleteAutomatedReasoningPolicyTestCaseCommand=A_;k.DeleteCustomModelCommand=R_;k.DeleteCustomModelDeploymentCommand=P_;k.DeleteEnforcedGuardrailConfigurationCommand=C_;k.DeleteFoundationModelAgreementCommand=T_;k.DeleteGuardrailCommand=x_;k.DeleteImportedModelCommand=b_;k.DeleteInferenceProfileCommand=I_;k.DeleteMarketplaceModelEndpointCommand=w_;k.DeleteModelInvocationLoggingConfigurationCommand=$_;k.DeletePromptRouterCommand=k_;k.DeleteProvisionedModelThroughputCommand=D_;k.DeregisterMarketplaceModelEndpointCommand=M_;k.EntitlementAvailability=EUe;k.EvaluationJobStatus=bze;k.EvaluationJobType=Uze;k.EvaluationTaskType=wze;k.ExportAutomatedReasoningPolicyVersionCommand=O_;k.ExternalSourceType=kze;k.FineTuningJobStatus=PUe;k.FoundationModelLifecycleStatus=pUe;k.GetAutomatedReasoningPolicyAnnotationsCommand=N_;k.GetAutomatedReasoningPolicyBuildWorkflowCommand=L_;k.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand=z_;k.GetAutomatedReasoningPolicyCommand=U_;k.GetAutomatedReasoningPolicyNextScenarioCommand=B_;k.GetAutomatedReasoningPolicyTestCaseCommand=G_;k.GetAutomatedReasoningPolicyTestResultCommand=F_;k.GetCustomModelCommand=j_;k.GetCustomModelDeploymentCommand=q_;k.GetEvaluationJobCommand=V_;k.GetFoundationModelAvailabilityCommand=H_;k.GetFoundationModelCommand=W_;k.GetGuardrailCommand=J_;k.GetImportedModelCommand=K_;k.GetInferenceProfileCommand=Z_;k.GetMarketplaceModelEndpointCommand=X_;k.GetModelCopyJobCommand=Y_;k.GetModelCustomizationJobCommand=Q_;k.GetModelImportJobCommand=eE;k.GetModelInvocationJobCommand=tE;k.GetModelInvocationLoggingConfigurationCommand=rE;k.GetPromptRouterCommand=nE;k.GetProvisionedModelThroughputCommand=oE;k.GetUseCaseForModelAccessCommand=iE;k.GuardrailContentFilterAction=Gze;k.GuardrailContentFilterType=qze;k.GuardrailContentFiltersTierName=Vze;k.GuardrailContextualGroundingAction=Hze;k.GuardrailContextualGroundingFilterType=Wze;k.GuardrailFilterStrength=jze;k.GuardrailManagedWordsType=eUe;k.GuardrailModality=Fze;k.GuardrailPiiEntityType=Kze;k.GuardrailSensitiveInformationAction=Jze;k.GuardrailStatus=tUe;k.GuardrailTopicAction=Xze;k.GuardrailTopicType=Yze;k.GuardrailTopicsTierName=Zze;k.GuardrailWordAction=Qze;k.InferenceProfileStatus=rUe;k.InferenceProfileType=nUe;k.InferenceType=lUe;k.InputTags=aze;k.JobStatusDetails=RUe;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=sE;k.ListFoundationModelsCommand=aE;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=cE;k.ModelCopyJobStatus=oUe;k.ModelCustomization=uUe;k.ModelCustomizationJobStatus=AUe;k.ModelImportJobStatus=iUe;k.ModelInvocationJobStatus=cUe;k.ModelInvocationType=aUe;k.ModelModality=dUe;k.ModelStatus=xze;k.OfferType=vUe;k.PerformanceConfigLatency=$ze;k.PromptRouterStatus=mUe;k.PromptRouterType=fUe;k.ProvisionedModelStatus=hUe;k.PutEnforcedGuardrailConfigurationCommand=uE;k.PutModelInvocationLoggingConfigurationCommand=lE;k.PutUseCaseForModelAccessCommand=dE;k.QueryTransformationType=Dze;k.ReasoningEffort=Cze;k.RegionAvailability=SUe;k.RegisterMarketplaceModelEndpointCommand=pE;k.RerankingMetadataSelectionMode=Nze;k.RetrieveAndGenerateType=zze;k.S3InputFormat=sUe;k.SearchType=Oze;k.SortByProvisionedModels=yUe;k.SortJobsBy=Bze;k.SortModelsBy=Rze;k.SortOrder=Pze;k.StartAutomatedReasoningPolicyBuildWorkflowCommand=mE;k.StartAutomatedReasoningPolicyTestWorkflowCommand=fE;k.Status=Sze;k.StopEvaluationJobCommand=gE;k.StopModelCustomizationJobCommand=hE;k.StopModelInvocationJobCommand=yE;k.TagResourceCommand=_E;k.UntagResourceCommand=EE;k.UpdateAutomatedReasoningPolicyAnnotationsCommand=SE;k.UpdateAutomatedReasoningPolicyCommand=vE;k.UpdateAutomatedReasoningPolicyTestCaseCommand=AE;k.UpdateCustomModelDeploymentCommand=RE;k.UpdateGuardrailCommand=PE;k.UpdateMarketplaceModelEndpointCommand=CE;k.UpdateProvisionedModelThroughputCommand=TE;k.VectorSearchRerankingConfigurationType=Lze;k.paginateListAutomatedReasoningPolicies=iH;k.paginateListAutomatedReasoningPolicyBuildWorkflows=sH;k.paginateListAutomatedReasoningPolicyTestCases=aH;k.paginateListAutomatedReasoningPolicyTestResults=cH;k.paginateListCustomModelDeployments=uH;k.paginateListCustomModels=lH;k.paginateListEnforcedGuardrailsConfiguration=dH;k.paginateListEvaluationJobs=pH;k.paginateListGuardrails=mH;k.paginateListImportedModels=fH;k.paginateListInferenceProfiles=gH;k.paginateListMarketplaceModelEndpoints=hH;k.paginateListModelCopyJobs=yH;k.paginateListModelCustomizationJobs=_H;k.paginateListModelImportJobs=EH;k.paginateListModelInvocationJobs=SH;k.paginateListPromptRouters=vH;k.paginateListProvisionedModelThroughputs=AH;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(e_,"__proto__")&&!Object.prototype.hasOwnProperty.call(k,"__proto__")&&Object.defineProperty(k,"__proto__",{enumerable:!0,value:e_.__proto__});Object.keys(e_).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(k,e)&&(k[e]=e_[e])})});var yb=N(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.resolveHttpAuthSchemeConfig=Jn.resolveStsAuthConfig=Jn.defaultSTSHttpAuthSchemeProvider=Jn.defaultSTSHttpAuthSchemeParametersProvider=void 0;var bUe=(Sa(),Q(Ea)),hb=It(),IUe=_b(),wUe=i(async(e,t,r)=>({operation:(0,hb.getSmithyContext)(t).operation,region:await(0,hb.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSTSHttpAuthSchemeParametersProvider");Jn.defaultSTSHttpAuthSchemeParametersProvider=wUe;function $Ue(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:i((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}i($Ue,"createAwsAuthSigv4HttpAuthOption");function PH(e){return{schemeId:"smithy.api#noAuth"}}i(PH,"createSmithyApiNoAuthHttpAuthOption");var kUe=i(e=>{let t=[];switch(e.operation){case"AssumeRoleWithSAML":{t.push(PH(e));break}case"AssumeRoleWithWebIdentity":{t.push(PH(e));break}default:t.push($Ue(e))}return t},"defaultSTSHttpAuthSchemeProvider");Jn.defaultSTSHttpAuthSchemeProvider=kUe;var DUe=i(e=>Object.assign(e,{stsClientCtor:IUe.STSClient}),"resolveStsAuthConfig");Jn.resolveStsAuthConfig=DUe;var MUe=i(e=>{let t=(0,Jn.resolveStsAuthConfig)(e),r=(0,bUe.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,hb.normalizeProvider)(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig");Jn.resolveHttpAuthSchemeConfig=MUe});var Eb=N(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.commonParams=Qc.resolveClientEndpointParameters=void 0;var OUe=i(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),"resolveClientEndpointParameters");Qc.resolveClientEndpointParameters=OUe;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 CH=N((Ift,NUe)=>{NUe.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 OH=N(Kn=>{"use strict";var eu=er(),LUe=Gr(),xH=i((e,t=!1)=>{if(t){for(let r of e.split("."))if(!xH(r))return!1;return!0}return!(!eu.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||eu.isIpAddress(e))},"isVirtualHostableS3Bucket"),TH=":",zUe="/",UUe=i(e=>{let t=e.split(TH);if(t.length<6)return null;let[r,n,o,a,c,...u]=t;if(r!=="arn"||n===""||o===""||u.join(TH)==="")return null;let l=u.map(d=>d.split(zUe)).flat();return{partition:n,service:o,region:a,accountId:c,resourceId:l}},"parseArn"),BUe=[{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)"}}}],GUe="1.1",bH={partitions:BUe,version:GUe},IH=bH,wH="",$H=i(e=>{let{partitions:t}=IH;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"),kH=i((e,t="")=>{IH=e,wH=t},"setPartitionInfo"),FUe=i(()=>{kH(bH,"")},"useDefaultPartitionInfo"),jUe=i(()=>wH,"getUserAgentPrefix"),DH={isVirtualHostableS3Bucket:xH,parseArn:UUe,partition:$H};eu.customEndpointFunctions.aws=DH;var qUe=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()=>MH(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"),MH=i(e=>LUe.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=DH;Kn.getUserAgentPrefix=jUe;Kn.partition=$H;Kn.resolveDefaultAwsRegionalEndpointsConfig=qUe;Kn.setPartitionInfo=kH;Kn.toEndpointV1=MH;Kn.useDefaultPartitionInfo=FUe});var nW=N(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});IE.ruleSet=void 0;var WH="required",Te="type",Ue="fn",Be="argv",Ps="ref",NH=!1,Sb=!0,Rs="booleanEquals",Wt="stringEquals",JH="sigv4",KH="sts",ZH="us-east-1",tt="endpoint",LH="https://sts.{Region}.{PartitionResult#dnsSuffix}",wo="tree",tu="error",Ab="getAttr",zH={[WH]:!1,[Te]:"string"},vb={[WH]:!0,default:!1,[Te]:"boolean"},XH={[Ps]:"Endpoint"},UH={[Ue]:"isSet",[Be]:[{[Ps]:"Region"}]},Jt={[Ps]:"Region"},BH={[Ue]:"aws.partition",[Be]:[Jt],assign:"PartitionResult"},YH={[Ps]:"UseFIPS"},QH={[Ps]:"UseDualStack"},cr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:JH,signingName:KH,signingRegion:ZH}]},headers:{}},Qr={},GH={conditions:[{[Ue]:Wt,[Be]:[Jt,"aws-global"]}],[tt]:cr,[Te]:tt},eW={[Ue]:Rs,[Be]:[YH,!0]},tW={[Ue]:Rs,[Be]:[QH,!0]},FH={[Ue]:Ab,[Be]:[{[Ps]:"PartitionResult"},"supportsFIPS"]},rW={[Ps]:"PartitionResult"},jH={[Ue]:Rs,[Be]:[!0,{[Ue]:Ab,[Be]:[rW,"supportsDualStack"]}]},qH=[{[Ue]:"isSet",[Be]:[XH]}],VH=[eW],HH=[tW],VUe={version:"1.0",parameters:{Region:zH,UseDualStack:vb,UseFIPS:vb,Endpoint:zH,UseGlobalEndpoint:vb},rules:[{conditions:[{[Ue]:Rs,[Be]:[{[Ps]:"UseGlobalEndpoint"},Sb]},{[Ue]:"not",[Be]:qH},UH,BH,{[Ue]:Rs,[Be]:[YH,NH]},{[Ue]:Rs,[Be]:[QH,NH]}],rules:[{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-northeast-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-south-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-southeast-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"ap-southeast-2"]}],endpoint:cr,[Te]:tt},GH,{conditions:[{[Ue]:Wt,[Be]:[Jt,"ca-central-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-central-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-north-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-2"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"eu-west-3"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"sa-east-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,ZH]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-east-2"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-west-1"]}],endpoint:cr,[Te]:tt},{conditions:[{[Ue]:Wt,[Be]:[Jt,"us-west-2"]}],endpoint:cr,[Te]:tt},{endpoint:{url:LH,properties:{authSchemes:[{name:JH,signingName:KH,signingRegion:"{Region}"}]},headers:Qr},[Te]:tt}],[Te]:wo},{conditions:qH,rules:[{conditions:VH,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Te]:tu},{conditions:HH,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Te]:tu},{endpoint:{url:XH,properties:Qr,headers:Qr},[Te]:tt}],[Te]:wo},{conditions:[UH],rules:[{conditions:[BH],rules:[{conditions:[eW,tW],rules:[{conditions:[{[Ue]:Rs,[Be]:[Sb,FH]},jH],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Te]:tt}],[Te]:wo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Te]:tu}],[Te]:wo},{conditions:VH,rules:[{conditions:[{[Ue]:Rs,[Be]:[FH,Sb]}],rules:[{conditions:[{[Ue]:Wt,[Be]:[{[Ue]:Ab,[Be]:[rW,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Qr,headers:Qr},[Te]:tt},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qr,headers:Qr},[Te]:tt}],[Te]:wo},{error:"FIPS is enabled but this partition does not support FIPS",[Te]:tu}],[Te]:wo},{conditions:HH,rules:[{conditions:[jH],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qr,headers:Qr},[Te]:tt}],[Te]:wo},{error:"DualStack is enabled but this partition does not support DualStack",[Te]:tu}],[Te]:wo},GH,{endpoint:{url:LH,properties:Qr,headers:Qr},[Te]:tt}],[Te]:wo}],[Te]:wo},{error:"Invalid Configuration: Missing Region",[Te]:tu}]};IE.ruleSet=VUe});var oW=N(wE=>{"use strict";Object.defineProperty(wE,"__esModule",{value:!0});wE.defaultEndpointResolver=void 0;var HUe=OH(),Rb=er(),WUe=nW(),JUe=new Rb.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),KUe=i((e,t={})=>JUe.get(e,()=>(0,Rb.resolveEndpoint)(WUe.ruleSet,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");wE.defaultEndpointResolver=KUe;Rb.customEndpointFunctions.aws=HUe.awsEndpointFunctions});var aW=N($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.getRuntimeConfig=void 0;var ZUe=(Sa(),Q(Ea)),XUe=(mo(),Q(ll)),YUe=(Xe(),Q(fr)),QUe=ue(),eBe=Gr(),iW=gt(),sW=ft(),tBe=yb(),rBe=oW(),nBe=i(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??iW.fromBase64,base64Encoder:e?.base64Encoder??iW.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??rBe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??tBe.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new ZUe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:i(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new YUe.NoAuthSigner}],logger:e?.logger??new QUe.NoOpLogger,protocol:e?.protocol??XUe.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??eBe.parseUrl,utf8Decoder:e?.utf8Decoder??sW.fromUtf8,utf8Encoder:e?.utf8Encoder??sW.toUtf8}),"getRuntimeConfig");$E.getRuntimeConfig=nBe});var mW=N(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.getRuntimeConfig=void 0;var oBe=(Ko(),Q(Jo)),iBe=oBe.__importDefault(CH()),Pb=(Sa(),Q(Ea)),cW=kh(),uW=qi(),kE=Nt(),sBe=(Xe(),Q(fr)),aBe=Vi(),lW=hr(),Ia=cn(),dW=to(),pW=ue(),cBe=Hi(),uBe=Wi(),lBe=Mn(),dBe=aW(),pBe=i(e=>{(0,pW.emitWarningIfUnsupportedVersion)(process.version);let t=(0,uBe.resolveDefaultsModeConfig)(e),r=i(()=>t().then(pW.loadConfigsForDefaultMode),"defaultConfigProvider"),n=(0,dBe.getRuntimeConfig)(e);(0,Pb.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,Ia.loadConfig)(Pb.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??cBe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??cW.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,uW.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:iBe.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(a=>a.getIdentityProvider("aws.auth#sigv4")||(async c=>await(0,cW.defaultProvider)(c?.__config||{})()),"identityProvider"),signer:new Pb.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:i(a=>a.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new sBe.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,Ia.loadConfig)(lW.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,Ia.loadConfig)(kE.NODE_REGION_CONFIG_OPTIONS,{...kE.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:dW.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,Ia.loadConfig)({...lW.NODE_RETRY_MODE_CONFIG_OPTIONS,default:i(async()=>(await r()).retryMode||lBe.DEFAULT_RETRY_MODE,"default")},e),sha256:e?.sha256??aBe.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??dW.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,Ia.loadConfig)(kE.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,Ia.loadConfig)(kE.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,Ia.loadConfig)(uW.NODE_APP_ID_CONFIG_OPTIONS,o)}},"getRuntimeConfig");DE.getRuntimeConfig=pBe});var fW=N(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.resolveHttpAuthRuntimeConfig=ru.getHttpAuthExtensionConfiguration=void 0;var mBe=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=mBe;var fBe=i(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig");ru.resolveHttpAuthRuntimeConfig=fBe});var EW=N(ME=>{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.resolveRuntimeExtensions=void 0;var gW=go(),hW=Me(),yW=ue(),_W=fW(),gBe=i((e,t)=>{let r=Object.assign((0,gW.getAwsRegionExtensionConfiguration)(e),(0,yW.getDefaultExtensionConfiguration)(e),(0,hW.getHttpHandlerExtensionConfiguration)(e),(0,_W.getHttpAuthExtensionConfiguration)(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,gW.resolveAwsRegionExtensionConfiguration)(r),(0,yW.resolveDefaultRuntimeConfig)(r),(0,hW.resolveHttpHandlerRuntimeConfig)(r),(0,_W.resolveHttpAuthRuntimeConfig)(r))},"resolveRuntimeExtensions");ME.resolveRuntimeExtensions=gBe});var _b=N(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.STSClient=nu.__Client=void 0;var SW=Ci(),hBe=Ti(),yBe=xi(),vW=ti(),_Be=Nt(),Cb=(Xe(),Q(fr)),EBe=(ke(),Q(Wo)),SBe=Ni(),vBe=gr(),AW=hr(),PW=ue();Object.defineProperty(nu,"__Client",{enumerable:!0,get:i(function(){return PW.Client},"get")});var RW=yb(),ABe=Eb(),RBe=mW(),PBe=EW(),Tb=class extends PW.Client{static{i(this,"STSClient")}config;constructor(...[t]){let r=(0,RBe.getRuntimeConfig)(t||{});super(r),this.initConfig=r;let n=(0,ABe.resolveClientEndpointParameters)(r),o=(0,vW.resolveUserAgentConfig)(n),a=(0,AW.resolveRetryConfig)(o),c=(0,_Be.resolveRegionConfig)(a),u=(0,SW.resolveHostHeaderConfig)(c),l=(0,vBe.resolveEndpointConfig)(u),d=(0,RW.resolveHttpAuthSchemeConfig)(l),_=(0,PBe.resolveRuntimeExtensions)(d,t?.extensions||[]);this.config=_,this.middlewareStack.use((0,EBe.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,vW.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,AW.getRetryPlugin)(this.config)),this.middlewareStack.use((0,SBe.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,SW.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,hBe.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,yBe.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,Cb.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:RW.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:i(async y=>new Cb.DefaultIdentityProviderConfig({"aws.auth#sigv4":y.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use((0,Cb.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}};nu.STSClient=Tb});var O8=N(K=>{"use strict";var Kd=_b(),Nr=ue(),Zn=gr(),Xn=Eb(),en=(ke(),Q(Wo)),xb=(yt(),Q(Pr)),CBe=go(),ur=class e extends Nr.ServiceException{static{i(this,"STSServiceException")}constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},OE=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)}},NE=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)}},LE=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)}},zE=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)}},UE=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)}},BE=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)}},GE=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)}},FE=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)}},jE=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)}},qE=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)}},VE=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)}},HE=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)}},bb="Arn",CW="AccessKeyId",TBe="AssumedPrincipal",xBe="AssumeRole",bBe="AssumedRoleId",IBe="AssumeRoleRequest",wBe="AssumeRoleResponse",$Be="AssumeRootRequest",kBe="AssumeRootResponse",nS="AssumedRoleUser",DBe="AssumeRoleWithSAML",MBe="AssumeRoleWithSAMLRequest",OBe="AssumeRoleWithSAMLResponse",NBe="AssumeRoleWithWebIdentity",LBe="AssumeRoleWithWebIdentityRequest",zBe="AssumeRoleWithWebIdentityResponse",UBe="AssumeRoot",TW="Account",Ib="Audience",Cs="Credentials",BBe="ContextAssertion",GBe="DecodeAuthorizationMessage",FBe="DecodeAuthorizationMessageRequest",jBe="DecodeAuthorizationMessageResponse",qBe="DecodedMessage",wa="DurationSeconds",xW="Expiration",VBe="ExternalId",HBe="EncodedMessage",WBe="ExpiredTokenException",JBe="ExpiredTradeInTokenException",bW="FederatedUser",KBe="FederatedUserId",ZBe="GetAccessKeyInfo",XBe="GetAccessKeyInfoRequest",YBe="GetAccessKeyInfoResponse",QBe="GetCallerIdentity",eGe="GetCallerIdentityRequest",tGe="GetCallerIdentityResponse",rGe="GetDelegatedAccessToken",nGe="GetDelegatedAccessTokenRequest",oGe="GetDelegatedAccessTokenResponse",iGe="GetFederationToken",sGe="GetFederationTokenRequest",aGe="GetFederationTokenResponse",cGe="GetSessionToken",uGe="GetSessionTokenRequest",lGe="GetSessionTokenResponse",dGe="GetWebIdentityToken",pGe="GetWebIdentityTokenRequest",mGe="GetWebIdentityTokenResponse",fGe="Issuer",gGe="InvalidAuthorizationMessageException",hGe="IDPCommunicationErrorException",yGe="IDPRejectedClaimException",_Ge="InvalidIdentityTokenException",EGe="JWTPayloadSizeExceededException",SGe="Key",vGe="MalformedPolicyDocumentException",AGe="Name",RGe="NameQualifier",PGe="OutboundWebIdentityFederationDisabledException",oS="Policy",iS="PolicyArns",CGe="PrincipalArn",TGe="ProviderArn",xGe="ProvidedContexts",bGe="ProvidedContextsListType",IGe="ProvidedContext",wGe="PolicyDescriptorType",$Ge="ProviderId",Yd="PackedPolicySize",kGe="PackedPolicyTooLargeException",DGe="Provider",wb="RoleArn",MGe="RegionDisabledException",IW="RoleSessionName",OGe="Subject",NGe="SigningAlgorithm",LGe="SecretAccessKey",zGe="SAMLAssertion",UGe="SAMLAssertionType",BGe="SessionDurationEscalationException",GGe="SubjectFromWebIdentityToken",Qd="SourceIdentity",wW="SerialNumber",FGe="SubjectType",jGe="SessionToken",$b="Tags",$W="TokenCode",qGe="TradeInToken",VGe="TargetPrincipal",HGe="TaskPolicyArn",WGe="TransitiveTagKeys",JGe="Tag",KGe="UserId",ZGe="Value",kW="WebIdentityToken",XGe="arn",YGe="accessKeySecretType",An="awsQueryError",Rn="client",QGe="clientTokenType",Pn="error",Cn="httpError",Tn="message",eFe="policyDescriptorListType",DW="smithy.ts.sdk.synthetic.com.amazonaws.sts",tFe="tradeInTokenType",rFe="tagListType",nFe="webIdentityTokenType",X="com.amazonaws.sts",oFe=[0,X,YGe,8,0],iFe=[0,X,QGe,8,0],sFe=[0,X,UGe,8,0],aFe=[0,X,tFe,8,0],cFe=[0,X,nFe,8,0],sS=[3,X,nS,0,[bBe,bb],[0,0],2],MW=[3,X,IBe,0,[wb,IW,iS,oS,wa,$b,WGe,VBe,wW,$W,Qd,xGe],[0,0,()=>aS,0,1,()=>Db,64,0,0,0,0,()=>uFe],2],OW=[3,X,wBe,0,[Cs,nS,Yd,Qd],[[()=>Ts,0],()=>sS,1,0]],NW=[3,X,MBe,0,[wb,CGe,zGe,iS,oS,wa],[0,0,[()=>sFe,0],()=>aS,0,1],3],LW=[3,X,OBe,0,[Cs,nS,Yd,OGe,FGe,fGe,Ib,RGe,Qd],[[()=>Ts,0],()=>sS,1,0,0,0,0,0,0]],zW=[3,X,LBe,0,[wb,IW,kW,$Ge,iS,oS,wa],[0,0,[()=>iFe,0],0,()=>aS,0,1],3],UW=[3,X,zBe,0,[Cs,GGe,nS,Yd,DGe,Ib,Qd],[[()=>Ts,0],0,()=>sS,1,0,0,0]],BW=[3,X,$Be,0,[VGe,HGe,wa],[0,()=>kb,1],2],GW=[3,X,kBe,0,[Cs,Qd],[[()=>Ts,0],0]],Ts=[3,X,Cs,0,[CW,LGe,jGe,xW],[0,[()=>oFe,0],0,4],4],FW=[3,X,FBe,0,[HBe],[0],1],jW=[3,X,jBe,0,[qBe],[0]],qW=[-3,X,WBe,{[An]:["ExpiredTokenException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(qW,OE);var VW=[-3,X,JBe,{[An]:["ExpiredTradeInTokenException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(VW,jE);var HW=[3,X,bW,0,[KBe,bb],[0,0],2],WW=[3,X,XBe,0,[CW],[0],1],JW=[3,X,YBe,0,[TW],[0]],KW=[3,X,eGe,0,[],[]],ZW=[3,X,tGe,0,[KGe,TW,bb],[0,0,0]],XW=[3,X,nGe,0,[qGe],[[()=>aFe,0]],1],YW=[3,X,oGe,0,[Cs,Yd,TBe],[[()=>Ts,0],1,0]],QW=[3,X,sGe,0,[AGe,oS,iS,wa,$b],[0,0,()=>aS,1,()=>Db],1],e8=[3,X,aGe,0,[Cs,bW,Yd],[[()=>Ts,0],()=>HW,1]],t8=[3,X,uGe,0,[wa,wW,$W],[1,0,0]],r8=[3,X,lGe,0,[Cs],[[()=>Ts,0]]],n8=[3,X,pGe,0,[Ib,NGe,wa,$b],[64,0,1,()=>Db],2],o8=[3,X,mGe,0,[kW,xW],[[()=>cFe,0],4]],i8=[-3,X,hGe,{[An]:["IDPCommunicationError",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(i8,GE);var s8=[-3,X,yGe,{[An]:["IDPRejectedClaim",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(s8,UE);var a8=[-3,X,gGe,{[An]:["InvalidAuthorizationMessageException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(a8,FE);var c8=[-3,X,_Ge,{[An]:["InvalidIdentityToken",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(c8,BE);var u8=[-3,X,EGe,{[An]:["JWTPayloadSizeExceededException",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(u8,qE);var l8=[-3,X,vGe,{[An]:["MalformedPolicyDocument",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(l8,NE);var d8=[-3,X,PGe,{[An]:["OutboundWebIdentityFederationDisabledException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(d8,VE);var p8=[-3,X,kGe,{[An]:["PackedPolicyTooLarge",400],[Pn]:Rn,[Cn]:400},[Tn],[0]];en.TypeRegistry.for(X).registerError(p8,LE);var kb=[3,X,wGe,0,[XGe],[0]],m8=[3,X,IGe,0,[TGe,BBe],[0,0]],f8=[-3,X,MGe,{[An]:["RegionDisabledException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(f8,zE);var g8=[-3,X,BGe,{[An]:["SessionDurationEscalationException",403],[Pn]:Rn,[Cn]:403},[Tn],[0]];en.TypeRegistry.for(X).registerError(g8,HE);var h8=[3,X,JGe,0,[SGe,ZGe],[0,0],2],y8=[-3,DW,"STSServiceException",0,[],[]];en.TypeRegistry.for(DW).registerError(y8,ur);var aS=[1,X,eFe,0,()=>kb],uFe=[1,X,bGe,0,()=>m8],Db=[1,X,rFe,0,()=>h8],_8=[9,X,xBe,0,()=>MW,()=>OW],E8=[9,X,DBe,0,()=>NW,()=>LW],S8=[9,X,NBe,0,()=>zW,()=>UW],v8=[9,X,UBe,0,()=>BW,()=>GW],A8=[9,X,GBe,0,()=>FW,()=>jW],R8=[9,X,ZBe,0,()=>WW,()=>JW],P8=[9,X,QBe,0,()=>KW,()=>ZW],C8=[9,X,rGe,0,()=>XW,()=>YW],T8=[9,X,iGe,0,()=>QW,()=>e8],x8=[9,X,cGe,0,()=>t8,()=>r8],b8=[9,X,dGe,0,()=>n8,()=>o8],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(_8).build(){static{i(this,"AssumeRoleCommand")}},WE=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(E8).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(S8).build(){static{i(this,"AssumeRoleWithWebIdentityCommand")}},JE=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(v8).build(){static{i(this,"AssumeRootCommand")}},KE=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(A8).build(){static{i(this,"DecodeAuthorizationMessageCommand")}},ZE=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(R8).build(){static{i(this,"GetAccessKeyInfoCommand")}},XE=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(P8).build(){static{i(this,"GetCallerIdentityCommand")}},YE=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(C8).build(){static{i(this,"GetDelegatedAccessTokenCommand")}},QE=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(T8).build(){static{i(this,"GetFederationTokenCommand")}},eS=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(x8).build(){static{i(this,"GetSessionTokenCommand")}},tS=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(b8).build(){static{i(this,"GetWebIdentityTokenCommand")}},lFe={AssumeRoleCommand:Zd,AssumeRoleWithSAMLCommand:WE,AssumeRoleWithWebIdentityCommand:Xd,AssumeRootCommand:JE,DecodeAuthorizationMessageCommand:KE,GetAccessKeyInfoCommand:ZE,GetCallerIdentityCommand:XE,GetDelegatedAccessTokenCommand:YE,GetFederationTokenCommand:QE,GetSessionTokenCommand:eS,GetWebIdentityTokenCommand:tS},rS=class extends Kd.STSClient{static{i(this,"STS")}};Nr.createAggregatedClient(lFe,rS);var I8=i(e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},"getAccountIdFromAssumedRoleUser"),w8=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 CBe.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"),dFe=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 w8(E,e?.parentClientConfig?.region,v,{logger:_,profile:y}),b=!$8(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=I8(u),d={accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.SessionToken,expiration:c.Expiration,...c.CredentialScope&&{credentialScope:c.CredentialScope},...l&&{accountId:l}};return xb.setCredentialFeature(d,"CREDENTIALS_STS_ASSUME_ROLE","i"),d}},"getDefaultRoleAssumer$1"),pFe=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 w8(_,e?.parentClientConfig?.region,E,{logger:l,profile:d}),A=!$8(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=I8(a),u={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...c&&{accountId:c}};return c&&xb.setCredentialFeature(u,"RESOLVED_ACCOUNT_ID","T"),xb.setCredentialFeature(u,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),u}},"getDefaultRoleAssumerWithWebIdentity$1"),$8=i(e=>e?.metadata?.handlerProtocol==="h2","isH2"),k8=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"),D8=i((e={},t)=>dFe(e,k8(Kd.STSClient,t)),"getDefaultRoleAssumer"),M8=i((e={},t)=>pFe(e,k8(Kd.STSClient,t)),"getDefaultRoleAssumerWithWebIdentity"),mFe=i(e=>t=>e({roleAssumer:D8(t),roleAssumerWithWebIdentity:M8(t),...t}),"decorateDefaultCredentialProvider");Object.defineProperty(K,"$Command",{enumerable:!0,get:i(function(){return Nr.Command},"get")});K.AssumeRole$=_8;K.AssumeRoleCommand=Zd;K.AssumeRoleRequest$=MW;K.AssumeRoleResponse$=OW;K.AssumeRoleWithSAML$=E8;K.AssumeRoleWithSAMLCommand=WE;K.AssumeRoleWithSAMLRequest$=NW;K.AssumeRoleWithSAMLResponse$=LW;K.AssumeRoleWithWebIdentity$=S8;K.AssumeRoleWithWebIdentityCommand=Xd;K.AssumeRoleWithWebIdentityRequest$=zW;K.AssumeRoleWithWebIdentityResponse$=UW;K.AssumeRoot$=v8;K.AssumeRootCommand=JE;K.AssumeRootRequest$=BW;K.AssumeRootResponse$=GW;K.AssumedRoleUser$=sS;K.Credentials$=Ts;K.DecodeAuthorizationMessage$=A8;K.DecodeAuthorizationMessageCommand=KE;K.DecodeAuthorizationMessageRequest$=FW;K.DecodeAuthorizationMessageResponse$=jW;K.ExpiredTokenException=OE;K.ExpiredTokenException$=qW;K.ExpiredTradeInTokenException=jE;K.ExpiredTradeInTokenException$=VW;K.FederatedUser$=HW;K.GetAccessKeyInfo$=R8;K.GetAccessKeyInfoCommand=ZE;K.GetAccessKeyInfoRequest$=WW;K.GetAccessKeyInfoResponse$=JW;K.GetCallerIdentity$=P8;K.GetCallerIdentityCommand=XE;K.GetCallerIdentityRequest$=KW;K.GetCallerIdentityResponse$=ZW;K.GetDelegatedAccessToken$=C8;K.GetDelegatedAccessTokenCommand=YE;K.GetDelegatedAccessTokenRequest$=XW;K.GetDelegatedAccessTokenResponse$=YW;K.GetFederationToken$=T8;K.GetFederationTokenCommand=QE;K.GetFederationTokenRequest$=QW;K.GetFederationTokenResponse$=e8;K.GetSessionToken$=x8;K.GetSessionTokenCommand=eS;K.GetSessionTokenRequest$=t8;K.GetSessionTokenResponse$=r8;K.GetWebIdentityToken$=b8;K.GetWebIdentityTokenCommand=tS;K.GetWebIdentityTokenRequest$=n8;K.GetWebIdentityTokenResponse$=o8;K.IDPCommunicationErrorException=GE;K.IDPCommunicationErrorException$=i8;K.IDPRejectedClaimException=UE;K.IDPRejectedClaimException$=s8;K.InvalidAuthorizationMessageException=FE;K.InvalidAuthorizationMessageException$=a8;K.InvalidIdentityTokenException=BE;K.InvalidIdentityTokenException$=c8;K.JWTPayloadSizeExceededException=qE;K.JWTPayloadSizeExceededException$=u8;K.MalformedPolicyDocumentException=NE;K.MalformedPolicyDocumentException$=l8;K.OutboundWebIdentityFederationDisabledException=VE;K.OutboundWebIdentityFederationDisabledException$=d8;K.PackedPolicyTooLargeException=LE;K.PackedPolicyTooLargeException$=p8;K.PolicyDescriptorType$=kb;K.ProvidedContext$=m8;K.RegionDisabledException=zE;K.RegionDisabledException$=f8;K.STS=rS;K.STSServiceException=ur;K.STSServiceException$=y8;K.SessionDurationEscalationException=HE;K.SessionDurationEscalationException$=g8;K.Tag$=h8;K.decorateDefaultCredentialProvider=mFe;K.getDefaultRoleAssumer=D8;K.getDefaultRoleAssumerWithWebIdentity=M8;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 yJ=N(Ie=>{"use strict";var ws=Wa(),$a=ft(),TFe=Rp(),X8=Me(),J8=It(),CS=Np(),Y8="X-Amz-Algorithm",Q8="X-Amz-Credential",Fb="X-Amz-Date",eJ="X-Amz-SignedHeaders",tJ="X-Amz-Expires",jb="X-Amz-Signature",qb="X-Amz-Security-Token",xFe="X-Amz-Region-Set",Vb="authorization",Hb=Fb.toLowerCase(),rJ="date",nJ=[Vb,Hb,rJ],oJ=jb.toLowerCase(),wS="x-amz-content-sha256",iJ=qb.toLowerCase(),bFe="host",sJ={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},aJ=/^proxy-/,cJ=/^sec-/,IFe=[/^proxy-/i,/^sec-/i],TS="AWS4-HMAC-SHA256",wFe="AWS4-ECDSA-P256-SHA256",uJ="AWS4-HMAC-SHA256-PAYLOAD",lJ="UNSIGNED-PAYLOAD",dJ=50,Wb="aws4_request",pJ=60*60*24*7,ou={},xS=[],bS=i((e,t,r)=>`${e}/${t}/${r}/${Wb}`,"createScope"),mJ=i(async(e,t,r,n,o)=>{let a=await K8(e,t.secretAccessKey,t.accessKeyId),c=`${r}:${n}:${o}:${ws.toHex(a)}:${t.sessionToken}`;if(c in ou)return ou[c];for(xS.push(c);xS.length>dJ;)delete ou[xS.shift()];let u=`AWS4${t.secretAccessKey}`;for(let l of[r,n,o,Wb])u=await K8(e,u,l);return ou[c]=u},"getSigningKey"),$Fe=i(()=>{xS.length=0,Object.keys(ou).forEach(e=>{delete ou[e]})},"clearCredentialCache"),K8=i((e,t,r)=>{let n=new e(t);return n.update($a.toUint8Array(r)),n.digest()},"hmac"),Lb=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 sJ||t?.has(a)||aJ.test(a)||cJ.test(a))&&(!r||r&&!r.has(a))||(n[a]=e[o].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),IS=i(async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===wS)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||TFe.isArrayBuffer(t)){let n=new r;return n.update($a.toUint8Array(t)),ws.toHex(await n.digest())}return lJ},"getPayloadHash"),zb=class{static{i(this,"HeaderFormatter")}format(t){let r=[];for(let a of Object.keys(t)){let c=$a.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=$a.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(Ub.fromNumber(t.value.valueOf()).bytes,1),_;case"uuid":if(!kFe.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}}},kFe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Ub=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&&Z8(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&Z8(t),parseInt(ws.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function Z8(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}i(Z8,"negate");var fJ=i((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader"),gJ=i((e,t={})=>{let{headers:r,query:n={}}=X8.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"),Bb=i(e=>{e=X8.HttpRequest.clone(e);for(let t of Object.keys(e.headers))nJ.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest"),hJ=i(({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e)){if(n.toLowerCase()===oJ)continue;let o=CS.escapeUri(n);t.push(o);let a=e[n];typeof a=="string"?r[o]=`${o}=${CS.escapeUri(a)}`:Array.isArray(a)&&(r[o]=a.slice(0).reduce((c,u)=>c.concat([`${o}=${CS.escapeUri(u)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},"getCanonicalQuery"),DFe=i(e=>MFe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),MFe=i(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate"),$S=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=J8.normalizeProvider(n),this.credentialProvider=J8.normalizeProvider(r)}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
59
+ ${this.getCanonicalPath(t)}
60
+ ${hJ(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($a.toUint8Array(n));let c=await a.digest();return`${o}
66
+ ${t}
67
+ ${r}
68
+ ${ws.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 CS.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=DFe(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}},Gb=class extends $S{static{i(this,"SignatureV4")}headerFormatter=new zb;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>pJ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let A=bS(v,E,_??this.service),R=gJ(Bb(t),{unhoistableHeaders:c,hoistableHeaders:l});y.sessionToken&&(R.query[qb]=y.sessionToken),R.query[Y8]=TS,R.query[Q8]=`${y.accessKeyId}/${A}`,R.query[Fb]=g,R.query[tJ]=o.toString(10);let b=Lb(R,a,u);return R.query[eJ]=this.getCanonicalHeaderList(b),R.query[jb]=await this.getSignature(g,A,this.getSigningKey(y,E,v,_),this.createCanonicalRequest(R,b,await IS(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),_=bS(l,u,c??this.service),y=await IS({headers:{},body:r},this.sha256),E=new this.sha256;E.update(t);let g=ws.toHex(await E.digest()),v=[uJ,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($a.toUint8Array(t)),ws.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=Bb(t),{longDate:_,shortDate:y}=this.formatDate(r),E=bS(y,l,c??this.service);d.headers[Hb]=_,u.sessionToken&&(d.headers[iJ]=u.sessionToken);let g=await IS(d,this.sha256);!fJ(wS,d.headers)&&this.applyChecksum&&(d.headers[wS]=g);let v=Lb(d,o,n),A=await this.getSignature(_,E,this.getSigningKey(u,l,y,c),this.createCanonicalRequest(d,v,g));return d.headers[Vb]=`${TS} 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,TS),c=new this.sha256(await n);return c.update($a.toUint8Array(a)),ws.toHex(await c.digest())}getSigningKey(t,r,n,o){return mJ(this.sha256,t,n,r,o||this.service)}},OFe={SignatureV4a:null};Ie.ALGORITHM_IDENTIFIER=TS;Ie.ALGORITHM_IDENTIFIER_V4A=wFe;Ie.ALGORITHM_QUERY_PARAM=Y8;Ie.ALWAYS_UNSIGNABLE_HEADERS=sJ;Ie.AMZ_DATE_HEADER=Hb;Ie.AMZ_DATE_QUERY_PARAM=Fb;Ie.AUTH_HEADER=Vb;Ie.CREDENTIAL_QUERY_PARAM=Q8;Ie.DATE_HEADER=rJ;Ie.EVENT_ALGORITHM_IDENTIFIER=uJ;Ie.EXPIRES_QUERY_PARAM=tJ;Ie.GENERATED_HEADERS=nJ;Ie.HOST_HEADER=bFe;Ie.KEY_TYPE_IDENTIFIER=Wb;Ie.MAX_CACHE_SIZE=dJ;Ie.MAX_PRESIGNED_TTL=pJ;Ie.PROXY_HEADER_PATTERN=aJ;Ie.REGION_SET_PARAM=xFe;Ie.SEC_HEADER_PATTERN=cJ;Ie.SHA256_HEADER=wS;Ie.SIGNATURE_HEADER=oJ;Ie.SIGNATURE_QUERY_PARAM=jb;Ie.SIGNED_HEADERS_QUERY_PARAM=eJ;Ie.SignatureV4=Gb;Ie.SignatureV4Base=$S;Ie.TOKEN_HEADER=iJ;Ie.TOKEN_QUERY_PARAM=qb;Ie.UNSIGNABLE_PATTERNS=IFe;Ie.UNSIGNED_PAYLOAD=lJ;Ie.clearCredentialCache=$Fe;Ie.createScope=bS;Ie.getCanonicalHeaders=Lb;Ie.getCanonicalQuery=hJ;Ie.getPayloadHash=IS;Ie.getSigningKey=mJ;Ie.hasHeader=fJ;Ie.moveHeadersToQuery=gJ;Ie.prepareRequest=Bb;Ie.signatureV4aContainer=OFe});var _J=N($s=>{"use strict";var NFe=Uo(),LFe=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"),zFe=i(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Jb=class{static{i(this,"Field")}name;kind;values;constructor({name:t,kind:r=NFe.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}},Kb=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)}},Zb=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=UFe(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 UFe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}i(UFe,"cloneQuery");var Xb=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 BFe(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}i(BFe,"isValidHostname");$s.Field=Jb;$s.Fields=Kb;$s.HttpRequest=Zb;$s.HttpResponse=Xb;$s.getHttpHandlerExtensionConfiguration=LFe;$s.isValidHostname=BFe;$s.resolveHttpHandlerRuntimeConfig=zFe});var Yb=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 EJ=N(kS=>{"use strict";Object.defineProperty(kS,"__esModule",{value:!0});kS.RawSha256=void 0;var bn=Yb(),GFe=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}();kS.RawSha256=GFe});var vJ=N(OS=>{"use strict";Object.defineProperty(OS,"__esModule",{value:!0});OS.Sha256=void 0;var SJ=(Ko(),Q(Jo)),MS=Yb(),DS=EJ(),Qb=zm(),FFe=function(){function e(t){this.secret=t,this.hash=new DS.RawSha256,this.reset()}return i(e,"Sha256"),e.prototype.update=function(t){if(!((0,Qb.isEmptyData)(t)||this.error))try{this.hash.update((0,Qb.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 SJ.__awaiter(this,void 0,void 0,function(){return SJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new DS.RawSha256,this.secret){this.outer=new DS.RawSha256;var t=jFe(this.secret),r=new Uint8Array(MS.BLOCK_SIZE);r.set(t);for(var n=0;n<MS.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}();OS.Sha256=FFe;function jFe(e){var t=(0,Qb.convertToBuffer)(e);if(t.byteLength>MS.BLOCK_SIZE){var r=new DS.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(MS.BLOCK_SIZE);return n.set(t),n}i(jFe,"bufferFromSecret")});var AJ=N(eI=>{"use strict";Object.defineProperty(eI,"__esModule",{value:!0});var qFe=(Ko(),Q(Jo));qFe.__exportStar(vJ(),eI)});var JFe={};bt(JFe,{awsBedrock:()=>WFe});module.exports=Q(JFe);var E5=Object.freeze({status:"aborted"});function ne(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(ne,"$constructor");var S5=Symbol("zod_brand"),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"}},VS={};function Do(e){return e&&Object.assign(VS,e),VS}i(Do,"config");function WS(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(WS,"getEnumValues");function pI(e,t){return typeof t=="bigint"?t.toString():t}i(pI,"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 mI(e){return e==null}i(mI,"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 dI=Symbol("evaluating");function St(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==dI)return n===void 0&&(n=dI,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(St,"defineLazy");var JS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function au(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(au,"isObject");var v5=np(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function fI(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(fI,"isPlainObject");var gI=new Set(["string","number","symbol"]);function Ma(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Ma,"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 ct(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(ct,"normalizeParams");function hI(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(hI,"optionalKeys");var A5={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 Oa(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(Oa,"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 yI(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(yI,"getLengthableOrigin");function KS(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(KS,"issue");var _I=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,pI,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),EI=ne("$ZodError",_I),cu=ne("$ZodError",_I,{Parent:Error});var P5=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 JS(u,o?.callee),u}return c.value},"_parse"),sp=P5(cu),C5=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 JS(u,o?.callee),u}return c.value},"_parseAsync"),ap=C5(cu),T5=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??EI)(a.issues.map(c=>Ei(c,o,Do())))}:{success:!0,data:a.value}},"_safeParse"),uu=T5(cu),x5=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=x5(cu);var b5="(?:(?:\\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])))",I5=new RegExp(`^${b5}$`);var SI=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),vI=/^-?\d+n?$/;var ZS=/^-?\d+(?:\.\d+)?$/,AI=/^(?:true|false)$/i;var Na=ne("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var RI=ne("$ZodCheckMinLength",(e,t)=>{var r;Na.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!mI(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=yI(o);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var XS=ne("$ZodCheckStringFormat",(e,t)=>{var r,n;Na.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=()=>{})}),PI=ne("$ZodCheckRegex",(e,t)=>{XS.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 TI={major:4,minor:3,patch:6};var ut=ne("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=TI;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=Oa(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=Oa(c,E)))});else{if(c.issues.length===E)continue;d||(d=Oa(c,E))}}return _?_.then(()=>c):c},"runChecks"),a=i((c,u,l)=>{if(Oa(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=ne("$ZodString",(e,t)=>{ut.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??SI(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}}),YS=ne("$ZodStringFormat",(e,t)=>{XS.init(e,t),lp.init(e,t)});var $I=ne("$ZodURL",(e,t)=>{YS.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 kI=ne("$ZodNumber",(e,t)=>{ut.init(e,t),e._zod.pattern=e._zod.bag.pattern??ZS,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}});var QS=ne("$ZodBoolean",(e,t)=>{ut.init(e,t),e._zod.pattern=AI,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}}),DI=ne("$ZodBigInt",(e,t)=>{ut.init(e,t),e._zod.pattern=vI,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 MI=ne("$ZodAny",(e,t)=>{ut.init(e,t),e._zod.parse=r=>r}),OI=ne("$ZodUnknown",(e,t)=>{ut.init(e,t),e._zod.parse=r=>r});var NI=ne("$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}}),LI=ne("$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 xI(e,t,r){e.issues.length&&t.issues.push(..._i(r,e.issues)),t.value[r]=e.value}i(xI,"handleArrayResult");var zI=ne("$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=>xI(d,r,c))):xI(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 w5(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=hI(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(w5,"normalizeDef");function $5(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($5,"handleCatchall");var UI=ne("$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(()=>w5(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?$5(_,d,u,l,n.value,e):_.length?Promise.all(_).then(()=>u):u}});function bI(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=>!Oa(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(bI,"handleUnionResults");var ev=ne("$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=>bI(l,o,e,a)):bI(u,o,e,a)}});var BI=ne("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ev.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 GI=ne("$ZodRecord",(e,t)=>{ut.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!fI(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"&&ZS.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 FI=ne("$ZodEnum",(e,t)=>{ut.init(e,t);let r=WS(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>gI.has(typeof o)).map(o=>typeof o=="string"?Ma(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}}),jI=ne("$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"?Ma(n):n?Ma(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 qI=ne("$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 II(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(II,"handleOptionalResult");var VI=ne("$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=>II(a,r.value)):II(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var HI=ne("$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 WI=ne("$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 JI=ne("$ZodCustom",(e,t)=>{Na.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=>wI(a,r,n,e));wI(o,r,n,e)}});function wI(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(KS(o))}}i(wI,"handleRefineResult");var ZI,O5=Symbol("ZodOutput"),N5=Symbol("ZodInput"),tv=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 XI(){return new tv}i(XI,"registry");(ZI=globalThis).__zod_globalRegistry??(ZI.__zod_globalRegistry=XI());var rv=globalThis.__zod_globalRegistry;function YI(e,t){return new e({type:"string",...ct(t)})}i(YI,"_string");function QI(e,t){return new e({type:"string",coerce:!0,...ct(t)})}i(QI,"_coercedString");function ew(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ct(t)})}i(ew,"_url");function tw(e,t){return new e({type:"number",checks:[],...ct(t)})}i(tw,"_number");function rw(e,t){return new e({type:"number",coerce:!0,checks:[],...ct(t)})}i(rw,"_coercedNumber");function nw(e,t){return new e({type:"boolean",...ct(t)})}i(nw,"_boolean");function ow(e,t){return new e({type:"boolean",coerce:!0,...ct(t)})}i(ow,"_coercedBoolean");function iw(e,t){return new e({type:"bigint",coerce:!0,...ct(t)})}i(iw,"_coercedBigint");function sw(e){return new e({type:"any"})}i(sw,"_any");function aw(e){return new e({type:"unknown"})}i(aw,"_unknown");function cw(e,t){return new e({type:"void",...ct(t)})}i(cw,"_void");function uw(e,t){return new e({type:"date",coerce:!0,...ct(t)})}i(uw,"_coercedDate");function wn(e,t){return new RI({check:"min_length",...ct(t),minimum:e})}i(wn,"_minLength");function Si(e,t){return new PI({check:"string_format",format:"regex",...ct(t),pattern:e})}i(Si,"_regex");function lw(e,t,r){let n=ct(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(lw,"_custom");var vt=ne("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)}),pp=ne("ZodMiniString",(e,t)=>{lp.init(e,t),vt.init(e,t)});function T(e){return YI(pp,e)}i(T,"string");var dw=ne("ZodMiniStringFormat",(e,t)=>{YS.init(e,t),pp.init(e,t)});var H5=ne("ZodMiniURL",(e,t)=>{$I.init(e,t),dw.init(e,t)});function pw(e){return ew(H5,e)}i(pw,"url");var nv=ne("ZodMiniNumber",(e,t)=>{kI.init(e,t),vt.init(e,t)});function lr(e){return tw(nv,e)}i(lr,"number");var ov=ne("ZodMiniBoolean",(e,t)=>{QS.init(e,t),vt.init(e,t)});function We(e){return nw(ov,e)}i(We,"boolean");var mw=ne("ZodMiniBigInt",(e,t)=>{DI.init(e,t),vt.init(e,t)});var W5=ne("ZodMiniAny",(e,t)=>{MI.init(e,t),vt.init(e,t)});function pu(){return sw(W5)}i(pu,"any");var J5=ne("ZodMiniUnknown",(e,t)=>{OI.init(e,t),vt.init(e,t)});function _e(){return aw(J5)}i(_e,"unknown");var K5=ne("ZodMiniVoid",(e,t)=>{NI.init(e,t),vt.init(e,t)});function fw(e){return cw(K5,e)}i(fw,"_void");var gw=ne("ZodMiniDate",(e,t)=>{LI.init(e,t),vt.init(e,t)});var Z5=ne("ZodMiniArray",(e,t)=>{zI.init(e,t),vt.init(e,t)});function Ae(e,t){return new Z5({type:"array",element:e,...ct(t)})}i(Ae,"array");var X5=ne("ZodMiniObject",(e,t)=>{UI.init(e,t),vt.init(e,t),St(e,"shape",()=>t.shape)});function O(e,t){let r={type:"object",shape:e??{},...ct(t)};return new X5(r)}i(O,"object");var Y5=ne("ZodMiniUnion",(e,t)=>{ev.init(e,t),vt.init(e,t)});function Re(e,t){return new Y5({type:"union",options:e,...ct(t)})}i(Re,"union");var Q5=ne("ZodMiniDiscriminatedUnion",(e,t)=>{BI.init(e,t),vt.init(e,t)});function La(e,t,r){return new Q5({type:"union",options:t,discriminator:e,...ct(r)})}i(La,"discriminatedUnion");var eK=ne("ZodMiniRecord",(e,t)=>{GI.init(e,t),vt.init(e,t)});function Ee(e,t,r){return new eK({type:"record",keyType:e,valueType:t,...ct(r)})}i(Ee,"record");var tK=ne("ZodMiniEnum",(e,t)=>{FI.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 tK({type:"enum",entries:r,...ct(t)})}i($e,"_enum");var rK=ne("ZodMiniLiteral",(e,t)=>{jI.init(e,t),vt.init(e,t)});function pe(e,t){return new rK({type:"literal",values:Array.isArray(e)?e:[e],...ct(t)})}i(pe,"literal");var nK=ne("ZodMiniTransform",(e,t)=>{qI.init(e,t),vt.init(e,t)});function vi(e){return new nK({type:"transform",transform:e})}i(vi,"transform");var oK=ne("ZodMiniOptional",(e,t)=>{VI.init(e,t),vt.init(e,t)});function j(e){return new oK({type:"optional",innerType:e})}i(j,"optional");var iK=ne("ZodMiniNullable",(e,t)=>{HI.init(e,t),vt.init(e,t)});function mu(e){return new iK({type:"nullable",innerType:e})}i(mu,"nullable");var sK=ne("ZodMiniPipe",(e,t)=>{WI.init(e,t),vt.init(e,t)});function Ai(e,t){return new sK({type:"pipe",in:e,out:t})}i(Ai,"pipe");var aK=ne("ZodMiniCustom",(e,t)=>{JI.init(e,t),vt.init(e,t)});function mp(e,t){return lw(aK,e??(()=>!0),t)}i(mp,"custom");var fu={};bt(fu,{bigint:()=>fK,boolean:()=>mK,date:()=>gK,number:()=>pK,string:()=>dK});function dK(e){return QI(pp,e)}i(dK,"string");function pK(e){return rw(nv,e)}i(pK,"number");function mK(e){return ow(ov,e)}i(mK,"boolean");function fK(e){return iw(mw,e)}i(fK,"bigint");function gK(e){return uw(gw,e)}i(gK,"date");var sv=O({retryOnFailure:O({defaultValue:j(We()),hide:j(We())}),continueOnFailure:O({defaultValue:j(We()),hide:j(We())})}),iv=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 iv(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:pe(t),required:We(),defaultValue:j(pu())}),"TPropertyValue");var Ur=O({...Le.shape,...Pe(T(),"SHORT_TEXT").shape}),Mo=O({...Le.shape,...Pe(T(),"LONG_TEXT").shape});var yw=O({label:T(),value:_e()}),fp=O({disabled:j(We()),placeholder:j(T()),options:Ae(yw)});var Br=O({...Le.shape,options:fp,...Pe(_e(),"STATIC_DROPDOWN").shape}),Oo=O({...Le.shape,options:fp,...Pe(Ae(_e()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var av=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(We(),"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 _w=Ee(T(),Re([Ur,Mo,Br,gu,Oo,No,Lo,hu,yu])),_u=O({...Le.shape,properties:_w,...Pe(Ae(_e()),"ARRAY").shape});var Eu=O({...Le.shape,...Pe(Re([Ee(T(),_e())]),"JSON").shape});var Ew=Re([Ur,Br,Eu,_u,Oo]),yK=Ee(T(),Ew),cv=O({refreshers:Ae(T()),...Le.shape,...Pe(_e(),"DYNAMIC").shape});var gp=O({...Le.shape,...Pe(fw(),"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||{}),uv="both_client_credentials_and_authorization_code";var Ms=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Ms||{}),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||{}),_K=O({strategy:$e(Au),paramName:j(T())}),Ru=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Ru||{});var hp=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(hp||{}),Sw=O({status:j(lr()),body:j(_e()),headers:j(Ee(T(),T()))}),vw=O({type:pe("DELAY"),resumeDateTime:T(),requestIdToReply:j(T()),handlerId:j(T()),streamStepProgress:j($e(hp))}),Aw=O({type:pe("WEBHOOK"),requestId:T(),requestIdToReply:j(T()),response:Sw,handlerId:j(T()),streamStepProgress:j($e(hp))}),EK=Re([vw,Aw]);var SK=O({body:_e(),rawBody:j(_e()),headers:Ee(T(),T()),queryParams:Ee(T(),T())});var lv=I(require("crypto"),1);var vK=128,Os,Ba,AK=i(e=>{!Os||Os.length<e?(Os=Buffer.allocUnsafe(e*vK),lv.default.randomFillSync(Os),Ba=0):Ba+e>Os.length&&(lv.default.randomFillSync(Os),Ba=0),Ba+=e},"fillPool"),RK=i(e=>(AK(e|=0),Os.subarray(Ba-e,Ba)),"random"),PK=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"),Pw=i((e,t=21)=>PK(e,t,RK),"customAlphabet");var CK="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Cw=21,w8e=T().check(Si(new RegExp(`^[0-9a-zA-Z]{${Cw}}$`))),TK=Pw(CK,Cw);var Ri=Ai(vi(e=>e instanceof Date?e.toISOString():e),T()),on={id:T(),created:Ri,updated:Ri},rt=i(e=>j(mu(e)),"Nullable");function dv(e){return j(mu($e(e)))}i(dv,"NullableEnum");var D8e=Ai(vi(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),j(We())),yp=i(e=>Ai(vi(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),j(Ae(e))),"OptionalArrayFromQuery");var N8e=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 J8e=T().check(Si(/^#[0-9A-Fa-f]{6}$/));var Z8e=O({filename:T(),data:_e(),type:pe("file"),mimetype:j(T())});var xK=I(xw());var nJe=O({...on,name:T(),permissions:Ae(T()),platformId:rt(T()),type:T(),userCount:j(lr())});var bw=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(bw||{}),pv=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(pv||{}),mv=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(mv||{});var fv=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(fv||{});var gv=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(gv||{});var bK=O({mode:$e(bw),value:_e()}),IK=O({auth:j(T()),fields:Ee(T(),bK)}),wK=O({pieceName:T(),pieceVersion:T(),actionName:T(),predefinedInput:j(IK)}),$K=O({type:pe("PIECE"),toolName:T().check(wn(1)),pieceMetadata:wK}),kK=O({type:pe("none")}),DK=O({type:pe("access_token"),accessToken:T()}),MK=O({type:pe("api_key"),apiKey:T(),apiKeyHeader:T()}),OK=O({type:pe("headers"),headers:Ee(T(),T())}),NK=La("type",[kK,DK,MK,OK]),Iw=O({type:pe("FLOW"),toolName:T().check(wn(1)),externalFlowId:T(),flowDisplayName:j(T())}),ww=O({type:pe("MCP"),toolName:T().check(wn(1)),serverUrl:pw(),protocol:$e(mv),auth:NK}),$w=O({type:pe("KNOWLEDGE_BASE"),toolName:T().check(wn(1)),sourceType:$e(pv),sourceId:T(),sourceName:T()}),LK=La("type",[$K,Iw,ww,$w]),zK=O({displayName:T(),description:j(T()),type:$e(fv)}),kw=O({type:pe("MARKDOWN"),markdown:T()}),Ga={type:pe("TOOL_CALL"),input:rt(Ee(T(),_e())),output:j(_e()),toolName:T(),status:$e(gv),toolCallId:T(),startTime:T(),endTime:j(T())},wJe=O(Ga),Dw=La("toolCallType",[O({...Ga,toolCallType:pe("PIECE"),pieceName:T(),pieceVersion:T(),actionName:T()}),O({...Ga,toolCallType:pe("FLOW"),displayName:T(),externalFlowId:T()}),O({...Ga,toolCallType:pe("MCP"),displayName:T(),serverUrl:T()}),O({...Ga,toolCallType:pe("KNOWLEDGE_BASE"),displayName:T(),sourceType:T()}),O({...Ga,toolCallType:pe("UNKNOWN"),displayName:T()})]),UK=Re([kw,Dw]);var hv=(r=>(r.IMAGE="image",r.TEXT="text",r))(hv||{}),zo=O({apiKey:T()}),BK=zo,GK=O({apiKey:T(),apiKeyHash:T()}),FK=zo,jK=zo,qK=zo,VK=zo,HK=zo,WK=zo,JK=zo,Mw=O({accessKeyId:T().check(wn(1)),secretAccessKey:T().check(wn(1))}),KK=O({}),ZK=O({}),XK=O({}),YK=O({}),QK=O({}),eZ=O({}),Ow=O({modelId:T(),modelName:T(),modelType:$e(hv)}),Nw=O({apiKeyHeader:T(),baseUrl:T(),models:Ae(Ow),defaultHeaders:j(Ee(T(),T()))}),Lw=O({accountId:T(),gatewayId:T(),models:Ae(Ow),vertexProject:j(T()),vertexRegion:j(T())}),zw=O({resourceName:T(),apiVersion:Ai(vi(e=>typeof e=="string"&&e.trim().length===0?void 0:e),j(T()))}),Uw=O({region:T().check(wn(1))}),tZ=Re([BK,qK,VK,HK,WK,jK,FK,GK,Mw,JK]),Bw=Re([Nw,Lw,zw,Uw,KK,XK,YK,QK,ZK,eZ]),rZ=O({id:T(),name:T(),type:$e(hv)}),nZ=O({id:T(),name:T(),provider:$e(Cu),config:Bw,enabledForChat:We()}),oZ=O({provider:$e(Cu),config:Bw,auth:tZ,platformId:T()});var MJe={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var iZ=O({base64Url:T(),fileName:T(),extension:j(T())}),sZ=O({mimeType:T(),url:T(),fileName:j(T())}),yv=Re([iZ,sZ]);var aZ=Re([O({type:pe("file"),value:yv}),O({type:pe("markdown"),value:T(),files:j(Ae(yv))})]),cZ=O({sessionId:T(),message:T(),files:j(Ae(T()))});var Fw=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Fw||{}),jw=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(jw||{}),_v=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(_v||{});var uZ=Re([O({...on,name:T(),externalId:T(),type:pe("STATIC_DROPDOWN"),tableId:T(),projectId:T(),data:O({options:Ae(O({value:T()}))})}),O({...on,name:T(),externalId:T(),type:Re([pe("TEXT"),pe("NUMBER"),pe("DATE")]),tableId:T(),projectId:T()})]),lZ=O({...on,name:T(),folderId:rt(T()),projectId:T(),externalId:T(),status:dv(jw),trigger:dv(Fw)}),dZ=O({...on,tableId:T(),projectId:T(),cells:Ee(T(),O({updated:T(),created:T(),value:_e(),fieldName:T()}))}),pZ=O({events:Ae($e(_v)),webhookUrl:T(),flowId:T()}),mZ=O({fields:Ae(O({id:T(),name:T()})),rows:Ae(Ee(T(),T())),name:T()}),fZ=O({projectId:T(),limit:j(fu.number()),cursor:j(T()),name:j(T()),externalIds:yp(T()),folderId:j(T()),folderIds:yp(T())}),gZ=O({records:Ae(Ae(O({fieldId:T(),value:Vw()}))),tableId:T()}),hZ=O({cells:j(Ae(O({fieldId:T(),value:Vw()}))),tableId:T(),agentUpdate:j(We())}),qw=La("operator",[Ns("eq"),Ns("neq"),Ns("gt"),Ns("gte"),Ns("lt"),Ns("lte"),Ns("co"),Gw("exists"),Gw("not_exists")]),yZ=O({tableId:T(),limit:j(fu.number()),cursor:j(T()),filters:yp(qw)});function Vw(){return Ai(vi(e=>e==null?e:String(e)),mu(T()))}i(Vw,"coerceToString");function Ns(e){return O({fieldId:T(),operator:pe(e),value:T()})}i(Ns,"valueFilter");function Gw(e){return O({fieldId:T(),operator:pe(e)})}i(Gw,"existenceFilter");var _Z=O({status:j(lr()),body:j(_e()),headers:j(Ee(T(),T()))}),EZ=O({...on,deleted:rt(Ri),ownerId:T(),displayName:T(),platformId:T(),externalId:rt(T())});var Hw=O({name:T(),description:j(T()),type:T(),required:We()}),SZ=O({pieceName:T(),triggerName:T(),input:O({toolName:T(),toolDescription:T(),inputSchema:Ae(Hw),returnsResponse:We()})});var Ww="^[0-9]+\\.[0-9]+\\.[0-9]+$",QJe=new RegExp(Ww),AZ="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",e5e=T().check(Si(new RegExp(Ww))),t5e=T().check(Si(new RegExp(AZ))),RZ=O({packageType:pe("ARCHIVE"),pieceType:$e(za),pieceName:T(),pieceVersion:T(),archiveId:T(),platformId:T()}),Jw=O({packageType:pe("REGISTRY"),pieceType:pe("OFFICIAL"),pieceName:T(),pieceVersion:T()}),Kw=O({packageType:pe("REGISTRY"),pieceType:pe("CUSTOM"),pieceName:T(),pieceVersion:T(),platformId:T()}),r5e=Re([Jw,Kw]),n5e=Re([RZ,Jw,Kw]),Zw=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Zw||{}),PZ=O({type:$e(Zw),cronExpression:T(),timezone:T()}),o5e=O({...on,type:$e(Ms),projectId:T(),flowId:T(),triggerName:T(),schedule:rt(PZ),flowVersionId:T(),pieceName:T(),pieceVersion:T(),deleted:rt(T()),simulate:We()}),Xw=(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))(Xw||{}),Yw=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Yw||{}),Qw=(r=>(r.S3="S3",r.DB="DB",r))(Qw||{}),i5e=O({...on,projectId:rt(T()),platformId:rt(T()),type:$e(Xw),compression:$e(Yw),data:j(_e()),location:$e(Qw),size:rt(lr()),fileName:rt(T()),s3Key:rt(T()),metadata:rt(Ee(T(),T()))}),e$=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(e$||{}),t$=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(t$||{}),s5e=O({id:T(),email:T(),firstName:T(),status:$e(t$),externalId:rt(T()),platformId:rt(T()),platformRole:$e(e$),lastName:T(),created:Ri,updated:Ri,lastActiveDate:rt(Ri),imageUrl:rt(T())});var Ev=O({...Le.shape,...Pe(Ee(T(),_e()),"OBJECT").shape});var i$=O({...Le.shape,...Pe(T(),"COLOR").shape});var Sv=Re([Ur,Mo,gp,No,Br,Oo,av,gu,cv,Lo,_u,Ev,Eu,yu,hu,i$]),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 s$=O({username:T(),password:T()}),vv=O({...eo.shape,username:O({displayName:T(),description:j(T())}),password:O({displayName:T(),description:j(T())}),...Pe(s$,"BASIC_AUTH").shape});var bZ=Ee(T(),Re([Ur,Mo,Lo,No,Br])),Av=O({...eo.shape,props:bZ,...Pe(_e(),"CUSTOM_AUTH").shape});var Ls=O({...eo.shape,...Pe(O({auth:T()}),"SECRET_TEXT").shape});var IZ=Ee(T(),Re([Ur,Mo,Ls,Lo,No,Br,Oo,gp])),a$=O({...eo.shape,props:IZ,...Pe(_e(),"OIDC").shape});var Rv=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Rv||{}),c$=Re([Ur,Ls,Br]),u$=Ee(T(),c$),wZ=O({props:j(Ee(T(),c$)),authUrl:T(),tokenUrl:T(),scope:Ae(T()),prompt:j(Re([pe("none"),pe("consent"),pe("login"),pe("omit")])),pkce:j(We()),pkceMethod:j(Re([pe("plain"),pe("S256")])),authorizationMethod:j($e(Rv)),grantType:j(Re([$e(vu),pe(uv)])),extra:j(Ee(T(),T()))}),l$=O({access_token:T(),props:j(u$),data:Ee(T(),pu())}),Pv=O({...eo.shape,...wZ.shape,...Pe(l$,"OAUTH2").shape});var Fa=Re([vv,Av,a$,Pv,Ls]),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 zKe={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 $Z=O({...Le.shape,...Pe(_e(),"CUSTOM").shape,code:T()});var DZ=Re([Sv,Fa]),Cv=Ee(T(),DZ),oZe=Ee(T(),Sv);var d$=Re([O({strategy:pe("CRON"),cronExpression:T()}),O({strategy:pe("NONE")})]);var p$="2",Ep="0.82.0";var Tv=class{constructor(t,r,n,o,a,c,u,l,d=Ep,_,y=""){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._actions={};this._triggers={};this.getContextInfo=i(()=>({version:p$}),"getContextInfo");(!MZ(d)||OZ(d,Ep))&&(this.minimumSupportedRelease=Ep),a.forEach(E=>this._actions[E.name]=E),c.forEach(E=>this._triggers[E.name]=E)}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,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},m$=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 Tv(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function MZ(e){return/^\d+\.\d+\.\d+$/.test(e)}i(MZ,"isValidSimpleSemver");function OZ(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(OZ,"isSemverLessThan");var NZ=j(Ee(T(),Ee(T(),T()))),f$=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()),i18n:NZ}),LZ=$e(["human","ai","both"]),g$=O({description:j(T()),idempotent:j(We())}),h$=O({name:T(),displayName:T(),description:T(),props:Cv,requireAuth:We(),errorHandlingOptions:j(sv),outputSchema:j(mp()),audience:j(LZ),aiMetadata:j(g$)}),y$=O({name:T(),displayName:T(),description:T(),props:Cv,errorHandlingOptions:j(sv),type:$e(Ms),sampleData:_e(),handshakeConfiguration:j(mp()),renewConfiguration:j(d$),testStrategy:$e(Ru),outputSchema:j(mp()),aiMetadata:j(g$)}),zZ=O({...f$.shape,actions:Ee(T(),h$),triggers:Ee(T(),y$)}),UZ=O({...f$.shape,actions:lr(),triggers:lr(),suggestedActions:j(Ae(y$)),suggestedTriggers:j(Ae(h$))}),_$=O({projectUsage:lr(),tags:j(Ae(T())),pieceType:$e(za),packageType:$e(Su),platformId:j(T()),archiveId:j(T())}),o9e=O({...zZ.shape,..._$.shape}),i9e=O({...UZ.shape,..._$.shape}),s9e=O({name:T(),version:T()});var BZ=I(require("path")),GZ=I(require("fs/promises"));var ES=I(Bc());var bE=I(Yc());var CUe=`
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
+ `,RH=[{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"}],TUe=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:RH}})},validate:i(async({auth:e})=>{try{return await new bE.BedrockClient({credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},region:e.region}).send(new bE.ListFoundationModelsCommand({})),{valid:!0}}catch(t){return{valid:!1,error:t?.message}}},"validate"),required:!0}),xUe=xu.OIDC({displayName:"AWS Bedrock (IAM Role / OIDC)",description:CUe,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:RH},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=[TUe,xUe];var $o=I(Yc()),be=I(Bc()),mS=I(O8());var fFe="sts.amazonaws.com";async function xs({auth:e,server:t}){if(_S(e)){let r=await fS({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(xs,"createBedrockRuntimeClient");async function bs(e,t,r){if(!e)return{disabled:!0,placeholder:"Connect your AWS account first",options:[]};try{let n;if(_S(e)){if(!r)return{disabled:!0,options:[],placeholder:"Unable to load models for IAM Role auth in this context."};let d=await fS({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(bs,"getBedrockModelOptions");async function fS({auth:e,server:t,durationSeconds:r=hFe}){if(!e.roleArn)throw new Error("Role ARN is required for IAM Role authentication");let n=Math.min(Math.max(r,_Fe),EFe),o=`${t.token}:${e.roleArn}:${e.region}:${n}`,a=pS.get(o);if(a&&a.expiresAtMS-Date.now()>yFe)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:fFe})});if(!c.ok)throw new Error(`Failed to get OIDC token: ${c.statusText}`);let{token:u}=await c.json(),l=new mS.STSClient({region:e.region}),{Credentials:d}=await l.send(new mS.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 gFe(),pS.set(o,{credentials:_,expiresAtMS:y}),_}i(fS,"getTemporaryCredentials");function gFe(){let e=Date.now();for(let[t,r]of pS)r.expiresAtMS<=e&&pS.delete(t)}i(gFe,"sweepExpiredCredentials");var cS={png:be.ImageFormat.PNG,jpg:be.ImageFormat.JPEG,jpeg:be.ImageFormat.JPEG,gif:be.ImageFormat.GIF,webp:be.ImageFormat.WEBP},uS={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},lS={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},dS={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 gS(e,t){let r=(t.split(".").pop()??"").toLowerCase(),n={uri:`s3://${e}/${t}`};if(cS[r])return{image:{format:cS[r],source:{s3Location:n}}};if(uS[r]){let o=(t.split("/").pop()??"document").replace(/\.[^.]+$/,"");return{document:{format:uS[r],name:o,source:{s3Location:n}}}}if(lS[r])return{video:{format:lS[r],source:{s3Location:n}}};if(dS[r])return{audio:{format:dS[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(gS,"buildS3ContentBlock");function hS(e){let t=(e.extension??"").toLowerCase(),r=new Uint8Array(e.data);if(cS[t])return{image:{format:cS[t],source:{bytes:r}}};if(uS[t]){let n=e.filename?.replace(/\.[^.]+$/,"")||"document";return{document:{format:uS[t],name:n,source:{bytes:r}}}}if(lS[t])return{video:{format:lS[t],source:{bytes:r}}};if(dS[t])return{audio:{format:dS[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(hS,"buildFileContentBlock");function yS(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(yS,"extractConverseTextResponse");function Is(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(Is,"formatBedrockError");var hFe=3600,yFe=5*60*1e3,pS=new Map,_Fe=900,EFe=43200;function _S(e){return"roleArn"in e}i(_S,"isOidcAuth");var N8=Qn({audience:"human",auth:Ft,name:"send_prompt",displayName:"Ask Bedrock",description:"Send a text prompt to an Amazon Bedrock model.",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?bs(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 xs({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(hS(v.file)):g==="s3"&&v?.s3Bucket&&v?.s3Key&&R.push(gS(v.s3Bucket,v.s3Key)),A.push({role:ES.ConversationRole.USER,content:R});try{let b=await o.send(new ES.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"),yS(b)}catch(b){throw new Error(Is(b))}}});var SS=I(Bc()),L8=I(Yc());var z8=Qn({audience:"human",auth:Ft,name:"generate_content_from_image",displayName:"Generate Content from Image",description:"Ask a Bedrock model a question about an image.",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?bs(e.props,{useInferenceProfiles:!0,inputModality:L8.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 xs({auth:e.props,server:r}),{model:o,source:a,image:c,prompt:u,systemPrompt:l,temperature:d,maxTokens:_}=t,y=a==="s3"?gS(c.s3Bucket,c.s3Key):hS(c.file);try{let E=await n.send(new SS.ConverseCommand({modelId:o,messages:[{role:SS.ConversationRole.USER,content:[y,{text:u}]}],...l?{system:[{text:l}]}:{},inferenceConfig:{temperature:d??void 0,maxTokens:_??void 0}}));return yS(E)}catch(E){throw new Error(Is(E))}}});var U8=I(Bc()),B8=I(Yc());var G8=Qn({audience:"human",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.",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?bs(e.props,{outputModality:B8.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 xs({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 U8.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(Is(A))}}});var F8=I(Bc()),j8=I(Yc());var q8=Qn({audience:"human",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.",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?bs(e.props,{outputModality:j8.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 xs({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 F8.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(Is(g))}}});var vS=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"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var AS=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Mb,r=new Ob){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Mb=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Ob=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 RS=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 PS=class extends vS{static{i(this,"FetchHttpClient")}constructor(t="",r=new AS){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}=SFe(t.body,a),A=AFe({...a,...g}),R=await vFe(async()=>{let G=new AbortController,Y=t.timeout&&t.timeout>0?setTimeout(()=>G.abort(),t.timeout):void 0;try{let de={method:t.method.toString(),headers:A,body:E,redirect:_?"follow":"manual",signal:G.signal};return v&&(de.duplex="half"),r?.dispatcher!==void 0&&(de.dispatcher=r.dispatcher),await fetch(l,de)}finally{Y!==void 0&&clearTimeout(Y)}},y),b=_?300:400;if(R.status<200||R.status>=b){let G=await V8(R,d),Y=new RS(t.body,{status:R.status,responseBody:G});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let $=await V8(R,d);return{status:R.status,headers:RFe(R.headers),body:$}}};function SFe(e,t){return CFe(e)?{body:void 0,extraHeaders:{},isStream:!1}:PFe(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}: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(SFe,"serializeBody");async function V8(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(V8,"parseResponseBody");async function vFe(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await H8(n);continue}return o}catch(o){if(r=o,n<t){await H8(n);continue}throw o}throw r}i(vFe,"sendWithRetries");function H8(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(H8,"backoff");function AFe(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}i(AFe,"normalizeHeaders");function RFe(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(RFe,"toHttpHeaders");function PFe(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(PFe,"isNodeFormData");function CFe(e){return e==null}i(CFe,"isNil");var W8=new PS;var Nb=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Nb||{});var RJ=I(yJ()),PJ=I(_J()),CJ=I(AJ());var VFe=[{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 HFe({accessKeyId:e,secretAccessKey:t,sessionToken:r,region:n,service:o,method:a,url:c,headers:u,body:l}){let d=new URL(c),_=new PJ.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 RJ.SignatureV4({credentials:{accessKeyId:e,secretAccessKey:t,sessionToken:r},region:n,service:o,sha256:CJ.Sha256}).sign(_)).headers}}i(HFe,"signAwsRequest");var TJ=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.",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:VFe}}),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(Nb).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;_S(d)?y=await fS({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,de]of Object.entries(a))de!=null&&$.append(Y,String(de));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 HFe({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 W8.sendRequest(b);return{status:$.status,headers:$.headers,body:$.body}}catch($){if(u)return{error:$?.message??"Request failed",response:$?.response?.body??null};throw $}}});var WFe=m$({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:[N8,z8,G8,q8,TJ],triggers:[]});0&&(module.exports={awsBedrock});