@agentlang/lstudio 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{fs-Dc1AXE1h.js → fs-SN_GISgG.js} +1 -1
- package/assets/{index-DbVrN0uV.js → index-BcIn6SxR.js} +1 -1
- package/assets/{index-IWX-nwYi.js → index-CVqRSHuR.js} +10 -10
- package/assets/{index-D4z_hbl0-Bi2lyYpC.js → index-D4z_hbl0-C6JFiSnb.js} +1 -1
- package/assets/{index-BsMGh1HZ.js → index-DPtmoSyi.js} +1 -1
- package/assets/{index-B5cYUcHg.js → index-DdtfPfhz.js} +1 -1
- package/assets/{index-D5i6vPoY.js → index-Dt7PYsXp.js} +1 -1
- package/assets/{index.browser-D5Xow_MQ.js → index.browser-DkAhsqyh.js} +3 -3
- package/assets/{loadCognitoIdentity-DytZoWyS.js → loadCognitoIdentity-BKqxgmy8.js} +1 -1
- package/assets/{loadSts-C6zXLlvL.js → loadSts-DXRSdTW2.js} +1 -1
- package/assets/{replService-jI2rdTkj.js → replService-DyI2_CQH.js} +1 -1
- package/assets/{resolveDefaultsModeConfig-Bx7XDpng.js → resolveDefaultsModeConfig-Dc_krWBD.js} +1 -1
- package/assets/{util-BYzfkJTL.js → util-BpmfkB-j.js} +1 -1
- package/assets/{winston-1qzyIKCb-DGNx4OWn.js → winston-1qzyIKCb-CpJAv47Z.js} +1 -1
- package/assets/{winston-CtxF18qc-itw4XSal.js → winston-CtxF18qc-DLk154Uf.js} +1 -1
- package/assets/{winston-D4mJsFB6.js → winston-TpBd5T0y.js} +1 -1
- package/assets/{winston-BpiA2JJl.js → winston-g6Qr4E6Y.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as x,b as H,H as k,n as y,c as ee,t as te,h as se}from"./normalizeProvider-CtDY37Q6.js";import{Y as re,N as S,h as W,L as ie,f as G,i as ne,a as oe,c as ae,S as $,m as ce,d as ue,b as de,T as N,e as I,v as le,R as ge,j as fe,g as P}from"./resolveDefaultsModeConfig-Bx7XDpng.js";function U(s){return encodeURIComponent(s).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const R="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",M="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",O="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",K="(\\d?\\d)",Q="(\\d{4})",me=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),pe=new RegExp(`^${R}, ${K} ${M} ${Q} ${O} GMT$`),he=new RegExp(`^${R}, ${K}-${M}-(\\d\\d) ${O} GMT$`),we=new RegExp(`^${R} ${M} ( [1-9]|\\d\\d) ${O} ${Q}$`),Se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=s=>{if(s==null)return;let e=NaN;if(typeof s=="number")e=s;else if(typeof s=="string"){if(!/^-?\d*\.?\d+$/.test(s))throw new TypeError("parseEpochTimestamp - numeric string invalid.");e=Number.parseFloat(s)}else typeof s=="object"&&s.tag===1&&(e=s.value);if(isNaN(e)||Math.abs(e)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(e*1e3))},Ee=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC3339 timestamps must be strings");const e=me.exec(s);if(!e)throw new TypeError(`Invalid RFC3339 timestamp format ${s}`);const[,t,r,i,n,o,a,,u,c]=e;w(r,1,12),w(i,1,31),w(n,0,23),w(o,0,59),w(a,0,60);const d=new Date(Date.UTC(Number(t),Number(r)-1,Number(i),Number(n),Number(o),Number(a),Number(u)?Math.round(parseFloat(`0.${u}`)*1e3):0));if(d.setUTCFullYear(Number(t)),c.toUpperCase()!="Z"){const[,l,g,f]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],m=l==="-"?1:-1;d.setTime(d.getTime()+m*(Number(g)*60*60*1e3+Number(f)*60*1e3))}return d},be=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC7231 timestamps must be strings.");let e,t,r,i,n,o,a,u;if((u=pe.exec(s))?[,e,t,r,i,n,o,a]=u:(u=he.exec(s))?([,e,t,r,i,n,o,a]=u,r=(Number(r)+1900).toString()):(u=we.exec(s))&&([,t,e,i,n,o,a,r]=u),r&&o){const c=Date.UTC(Number(r),Se.indexOf(t),Number(e),Number(i),Number(n),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);w(e,1,31),w(i,0,23),w(n,0,59),w(o,0,60);const d=new Date(c);return d.setUTCFullYear(Number(r)),d}throw new TypeError(`Invalid RFC7231 date-time value ${s}.`)};function w(s,e,t){const r=Number(s);if(r<e||r>t)throw new Error(`Value ${r} out of range [${e}, ${t}]`)}const Ce=s=>{const e=s.length,t=[];let r=!1,i,n=0;for(let o=0;o<e;++o){const a=s[o];switch(a){case'"':i!=="\\"&&(r=!r);break;case",":r||(t.push(s.slice(n,o)),n=o+1);break}i=a}return t.push(s.slice(n)),t.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class Ae extends re{settings;constructor(e){super(),this.settings=e}read(e,t){const r=S.of(e);if(r.isListSchema())return Ce(t).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??x)(t);if(r.isTimestampSchema())switch(W(r,this.settings)){case 5:return Ee(t);case 6:return be(t);case 7:return ye(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let n=t;if(i)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),(i==="application/json"||i.endsWith("+json"))&&(n=ie.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new G(t,"bigDecimal"):r.isBooleanSchema()?String(t).toLowerCase()==="true":t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??H)((this.serdeContext?.base64Decoder??x)(e))}}const q=s=>{const e="#text";for(const t in s)s.hasOwnProperty(t)&&s[t][e]!==void 0?s[t]=s[t][e]:typeof s[t]=="object"&&s[t]!==null&&(s[t]=q(s[t]));return s};function ot(s){return s}const Te=s=>e=>async t=>{if(!k.isInstance(t.request))return e(t);const{request:r}=t,{handlerProtocol:i=""}=s.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let n=r.hostname;r.port!=null&&(n+=`:${r.port}`),r.headers.host=n}return e(t)},Ne={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},at=s=>({applyToStack:e=>{e.add(Te(s),Ne)}}),ke=()=>(s,e)=>async t=>{try{const r=await s(t),{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,l=c??e.outputFilterSensitiveLog,{$metadata:g,...f}=r.output;return o?.info?.({clientName:i,commandName:n,input:d(t.input),output:l(f),metadata:g}),r}catch(r){const{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:n,input:c(t.input),error:r,metadata:r.$metadata}),r}},Re={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ct=s=>({applyToStack:e=>{e.add(ke(),Re)}}),Me={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Oe=()=>s=>async e=>s(e),ut=s=>({applyToStack:e=>{e.add(Oe(),Me)}}),De=void 0;function _e(s){return s===void 0?!0:typeof s=="string"&&s.length<=50}function dt(s){const e=y(s.userAgentAppId??De),{customUserAgent:t}=s;return Object.assign(s,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const r=await e();if(!_e(r)){const i=s.logger?.constructor?.name==="NoOpLogger"||!s.logger?console:s.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const X=(s,e=!1)=>{if(e){for(const t of s.split("."))if(!X(t))return!1;return!0}return!(!ne(s)||s.length<3||s.length>63||s!==s.toLowerCase()||oe(s))},F=":",xe="/",$e=s=>{const e=s.split(F);if(e.length<6)return null;const[t,r,i,n,o,...a]=e;if(t!=="arn"||r===""||i===""||a.join(F)==="")return null;const u=a.map(c=>c.split(xe)).flat();return{partition:r,service:i,region:n,accountId:o,resourceId:u}},Ie=[{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)"}}}],Pe={partitions:Ie};let Ue=Pe;const Fe=s=>{const{partitions:e}=Ue;for(const r of e){const{regions:i,outputs:n}=r;for(const[o,a]of Object.entries(i))if(o===s)return{...n,...a}}for(const r of e){const{regionRegex:i,outputs:n}=r;if(new RegExp(i).test(s))return{...n}}const t=e.find(r=>r.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},ze={isVirtualHostableS3Bucket:X,parseArn:$e,partition:Fe};ae.aws=ze;function Le(s,e,t){return s.$source||(s.$source={}),s.$source[e]=t,s}function h(s,e,t){s.__aws_sdk_context?s.__aws_sdk_context.features||(s.__aws_sdk_context.features={}):s.__aws_sdk_context={features:{}},s.__aws_sdk_context.features[e]=t}const z=s=>ee.isInstance(s)?s.headers?.date??s.headers?.Date:void 0,J=s=>new Date(Date.now()+s),ve=(s,e)=>Math.abs(J(e).getTime()-s)>=3e5,L=(s,e)=>{const t=Date.parse(s);return ve(t,e)?t-Date.now():e},E=(s,e)=>{if(!e)throw new Error(`Property \`${s}\` is not resolved for AWS SDK SigV4Auth`);return e},Ve=async s=>{const e=E("context",s.context),t=E("config",s.config),r=e.endpointV2?.properties?.authSchemes?.[0],n=await E("signer",t.signer)(r),o=s?.signingRegion,a=s?.signingRegionSet,u=s?.signingName;return{config:t,signer:n,signingRegion:o,signingRegionSet:a,signingName:u}};class lt{async sign(e,t,r){if(!k.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Ve(r),{config:n,signer:o}=i;let{signingRegion:a,signingName:u}=i;const c=r.context;if(c?.authSchemes?.length??!1){const[l,g]=c.authSchemes;l?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:J(n.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??z(t.$response);if(r){const i=E("config",e.config),n=i.systemClockOffset;i.systemClockOffset=L(r,i.systemClockOffset),i.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=z(e);if(r){const i=E("config",t.config);i.systemClockOffset=L(r,i.systemClockOffset)}}}const gt=s=>{let e=s.credentials,t=!!s.credentials,r;Object.defineProperty(s,"credentials",{set(c){c&&c!==e&&c!==r&&(t=!0),e=c;const d=je(s,{credentials:e,credentialDefaultProvider:s.credentialDefaultProvider}),l=Be(s,d);if(t&&!l.attributed){const g=typeof e=="object"&&e!==null;r=async f=>{const p=await l(f);return g&&(!p.$source||Object.keys(p.$source).length===0)?Le(p,"CREDENTIALS_CODE","e"):p},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),s.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:n=s.systemClockOffset||0,sha256:o}=s;let a;return s.signer?a=y(s.signer):s.regionInfoProvider?a=()=>y(s.region)().then(async c=>[await s.regionInfoProvider(c,{useFipsEndpoint:await s.useFipsEndpoint(),useDualstackEndpoint:await s.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:l,signingService:g}=c;s.signingRegion=s.signingRegion||l||d,s.signingName=s.signingName||g||s.serviceId;const f={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},m=s.signerConstructor||$;return new m(f)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:s.signingName||s.defaultSigningName,signingRegion:await y(s.region)(),properties:{}},c);const d=c.signingRegion,l=c.signingName;s.signingRegion=s.signingRegion||d,s.signingName=s.signingName||l||s.serviceId;const g={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},f=s.signerConstructor||$;return new f(g)},Object.assign(s,{systemClockOffset:n,signingEscapePath:i,signer:a})};function je(s,{credentials:e,credentialDefaultProvider:t}){let r;return e?e?.memoized?r=e:r=ce(e,de,ue):t?r=y(t(Object.assign({},s,{parentClientConfig:s}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Be(s,e){if(e.configBound)return e;const t=async r=>e({...r,callerClientConfig:s});return t.memoized=e.memoized,t.configBound=!0,t}class He{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const r=t.getMemberSchemas(),i=Object.values(r).find(n=>!!n.getMergedTraits().httpPayload);if(i){const n=i.getMergedTraits().mediaType;return n||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!u&&!c&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,r,i,n,o){let a=t,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:n,$fault:r.statusCode<500?"client":"server"},d=N.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{i.message=i.message??i.Message??"UnknownError";const g=N.for("smithy.ts.sdk.synthetic."+a),f=g.getBaseException();if(f){const m=g.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:u}),c),i)}throw this.decorateServiceException(Object.assign(new Error(u),c),i)}}decorateServiceException(e,t={}){if(this.queryCompat){const r=e.Message??t.Message,i=I(e,t);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const n=i.$metadata.requestId;return n&&(i.RequestId=n),i}return I(e,t)}setQueryCompatError(e,t){const r=t.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[i,n]=r.split(";"),o=Object.entries(e),a={Code:i,Type:n};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>S.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class Y{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*We(s,e){if(s.isUnitSchema())return;const t=s.getSchema();for(let r=0;r<t[4].length;++r){const i=t[4][r],n=t[5][r],o=new S([n,0],i);!(i in e)&&!o.isIdempotencyToken()||(yield[i,o])}}class Ge{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}let C;function Ke(s){C||(C=new DOMParser);const e=C.parseFromString(s,"application/xml");if(e.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const t=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const n={},o=Array.from(i.attributes);for(const u of o)n[`${u.name}`]=u.value;const a=Array.from(i.childNodes);for(const u of a){const c=t(u);if(c!=null){const d=u.nodeName;if(a.length===1&&o.length===0&&d==="#text")return c;n[d]?Array.isArray(n[d])?n[d].push(c):n[d]=[n[d],c]:n[d]=c}else if(a.length===1&&o.length===0)return i.textContent}return n}return null};return{[e.documentElement.nodeName]:t(e.documentElement)}}class Qe extends Y{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new Ae(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const i=S.of(e),n=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(n).find(c=>!!c.getMemberTraits().eventPayload)){const c={},d=Object.keys(n)[0];return n[d].isBlobSchema()?c[d]=t:c[d]=this.read(n[d],t),c}const a=(this.serdeContext?.utf8Encoder??H)(t),u=this.parseXml(a);return this.readSchema(e,r?u[r]:u)}readSchema(e,t){const r=S.of(e);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(t==null)return t;if(typeof t=="object"){const n=!!i.sparse,o=!!i.xmlFlattened;if(r.isListSchema()){const u=r.getValueSchema(),c=[],d=u.getMergedTraits().xmlName??"member",l=o?t:(t[0]??t)[d],g=Array.isArray(l)?l:[l];for(const f of g)(f!=null||n)&&c.push(this.readSchema(u,f));return c}const a={};if(r.isMapSchema()){const u=r.getKeySchema(),c=r.getValueSchema();let d;o?d=Array.isArray(t)?t:[t]:d=Array.isArray(t.entry)?t.entry:[t.entry];const l=u.getMergedTraits().xmlName??"key",g=c.getMergedTraits().xmlName??"value";for(const f of d){const m=f[l],p=f[g];(p!=null||n)&&(a[m]=this.readSchema(c,p))}return a}if(r.isStructSchema()){const u=r.isUnionSchema();let c;u&&(c=new Ge(t,a));for(const[d,l]of r.structIterator()){const g=l.getMergedTraits(),f=g.httpPayload?g.xmlName??l.getName():l.getMemberTraits().xmlName??d;u&&c.mark(f),t[f]!=null&&(a[d]=this.readSchema(l,t[f]))}return u&&c.writeUnknown(),a}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let t;try{t=Ke(e)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:e}),o}const r="#text",i=Object.keys(t)[0],n=t[i];return n[r]&&(n[i]=n[r],delete n[r]),q(n)}return{}}}class qe extends Y{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){this.buffer===void 0&&(this.buffer="");const i=S.of(e);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof t=="string"||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??te)(t)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())t!=null?(this.writeKey(r),this.writeValue(String(t))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(le()));else if(i.isBigIntegerSchema())t!=null&&(this.writeKey(r),this.writeValue(String(t)));else if(i.isBigDecimalSchema())t!=null&&(this.writeKey(r),this.writeValue(t instanceof G?t.string:String(t)));else if(i.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),W(i,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(se(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&typeof t=="object"?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(i.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const n=i.getValueSchema(),o=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let a=1;for(const u of t){if(u==null)continue;const c=this.getKey("member",n.getMergedTraits().xmlName),d=o?`${r}${a}`:`${r}${c}.${a}`;this.write(n,u,d),++a}}}else if(i.isMapSchema()){if(t&&typeof t=="object"){const n=i.getKeySchema(),o=i.getValueSchema(),a=i.getMergedTraits().xmlFlattened;let u=1;for(const[c,d]of Object.entries(t)){if(d==null)continue;const l=this.getKey("key",n.getMergedTraits().xmlName),g=a?`${r}${u}.${l}`:`${r}entry.${u}.${l}`,f=this.getKey("value",o.getMergedTraits().xmlName),m=a?`${r}${u}.${f}`:`${r}entry.${u}.${f}`;this.write(n,c,g),this.write(o,d,m),++u}}}else if(i.isStructSchema()){if(t&&typeof t=="object"){let n=!1;for(const[o,a]of We(i,t)){if(t[o]==null&&!a.isIdempotencyToken())continue;const u=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${u}`;this.write(a,t[o],c),n=!0}if(!n&&i.isUnionSchema()){const{$unknown:o}=t;if(Array.isArray(o)){const[a,u]=o,c=`${r}${a}`;this.write(15,u,c)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const r=t??e;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${U(e)}=`}writeValue(e){this.buffer+=U(e)}}class ft extends ge{options;serializer;deserializer;mixin=new He;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qe(t),this.deserializer=new Qe(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(fe(e.input)==="unit"||!i.body)&&(i.body="");const n=e.name.split("#")[1]??e.name;return i.body=`Action=${n}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(e,t,r){const i=this.deserializer,n=S.of(e.output),o={};if(r.statusCode>=300){const l=await P(r.body,t);l.byteLength>0&&Object.assign(o,await i.read(15,l)),await this.handleError(e,t,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const g=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=g}const a=e.name.split("#")[1]??e.name,u=n.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await P(r.body,t);return c.byteLength>0&&Object.assign(o,await i.read(n,c,u)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(e,t,r,i,n){const o=this.loadQueryErrorCode(r,i)??"Unknown",a=this.loadQueryError(i),u=this.loadQueryErrorMessage(i);a.message=u,a.Error={Type:a.Type,Code:a.Code,Message:u};const{errorSchema:c,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,n,this.mixin.findQueryCompatibleError),l=S.of(c),g=N.for(c[1]).getErrorCtor(c)??Error,f=new g(u),m={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[p,D]of l.structIterator()){const _=D.getMergedTraits().xmlName??p,Z=a[_]??i[_];m[p]=this.deserializer.readSchema(D,Z)}throw this.mixin.decorateServiceException(Object.assign(f,d,{$fault:l.getMergedTraits().error,message:u},m),i)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(r!==void 0)return r;if(e.statusCode==404)return"NotFound"}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Xe=/\d{12}\.ddb/;async function Je(s,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&h(s,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const n=await e.retryStrategy();typeof n.acquireInitialRetryToken=="function"?n.constructor?.name?.includes("Adaptive")?h(s,"RETRY_MODE_ADAPTIVE","F"):h(s,"RETRY_MODE_STANDARD","E"):h(s,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const n=s.endpointV2;switch(String(n?.url?.hostname).match(Xe)&&h(s,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":h(s,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":h(s,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":h(s,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=s.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const n=i;n.accountId&&h(s,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(n.$source??{}))h(s,o,a)}}const v="user-agent",A="x-amz-user-agent",V=" ",T="/",Ye=/[^!$%&'*+\-.^_`|~\w]/g,Ze=/[^!$%&'*+\-.^_`|~\w#]/g,j="-",et=1024;function tt(s){let e="";for(const t in s){const r=s[t];if(e.length+r.length+1<=et){e.length?e+=","+r:e+=r;continue}break}return e}const st=s=>(e,t)=>async r=>{const{request:i}=r;if(!k.isInstance(i))return e(r);const{headers:n}=i,o=t?.userAgent?.map(b)||[],a=(await s.defaultUserAgentProvider()).map(b);await Je(t,s,r);const u=t;a.push(`m/${tt(Object.assign({},t.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=s?.customUserAgent?.map(b)||[],d=await s.userAgentAppId();d&&a.push(b(["app",`${d}`]));const l=[].concat([...a,...o,...c]).join(V),g=[...a.filter(f=>f.startsWith("aws-sdk-")),...c].join(V);return s.runtime!=="browser"?(g&&(n[A]=n[A]?`${n[v]} ${g}`:g),n[v]=l):n[A]=l,e({...r,request:i})},b=s=>{const e=s[0].split(T).map(o=>o.replace(Ye,j)).join(T),t=s[1]?.replace(Ze,j),r=e.indexOf(T),i=e.substring(0,r);let n=e.substring(r+1);return i==="api"&&(n=n.toLowerCase()),[i,n,t].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},rt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},mt=s=>({applyToStack:e=>{e.add(st(s),rt)}}),pt=({serviceId:s,clientVersion:e})=>async t=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",n=r?.userAgentData?.platform??B.os(i)??"other",o=void 0,a=r?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??B.browser(i)??"unknown",d=u?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${n}`,o],["lang/js"],["md/browser",`${c}_${d}`]];s&&l.push([`api/${s}`,e]);const g=await t?.userAgentAppId?.();return g&&l.push([`app/${g}`]),l},B={os(s){if(/iPhone|iPad|iPod/.test(s))return"iOS";if(/Macintosh|Mac OS X/.test(s))return"macOS";if(/Windows NT/.test(s))return"Windows";if(/Android/.test(s))return"Android";if(/Linux/.test(s))return"Linux"},browser(s){if(/EdgiOS|EdgA|Edg\//.test(s))return"Microsoft Edge";if(/Firefox\//.test(s))return"Firefox";if(/Chrome\//.test(s))return"Chrome";if(/Safari\//.test(s))return"Safari"}},ht=s=>({setRegion(e){s.region=e},region(){return s.region}}),wt=s=>({region:s.region()});export{ft as A,ze as a,lt as b,pt as c,wt as d,dt as e,mt as f,ht as g,at as h,ct as i,ut as j,ot as k,gt as r,Le as s};
|
|
1
|
+
import{f as x,b as H,H as k,n as y,c as ee,t as te,h as se}from"./normalizeProvider-CtDY37Q6.js";import{Y as re,N as S,h as W,L as ie,f as G,i as ne,a as oe,c as ae,S as $,m as ce,d as ue,b as de,T as N,e as I,v as le,R as ge,j as fe,g as P}from"./resolveDefaultsModeConfig-Dc_krWBD.js";function U(s){return encodeURIComponent(s).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}const R="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",M="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",O="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",K="(\\d?\\d)",Q="(\\d{4})",me=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),pe=new RegExp(`^${R}, ${K} ${M} ${Q} ${O} GMT$`),he=new RegExp(`^${R}, ${K}-${M}-(\\d\\d) ${O} GMT$`),we=new RegExp(`^${R} ${M} ( [1-9]|\\d\\d) ${O} ${Q}$`),Se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=s=>{if(s==null)return;let e=NaN;if(typeof s=="number")e=s;else if(typeof s=="string"){if(!/^-?\d*\.?\d+$/.test(s))throw new TypeError("parseEpochTimestamp - numeric string invalid.");e=Number.parseFloat(s)}else typeof s=="object"&&s.tag===1&&(e=s.value);if(isNaN(e)||Math.abs(e)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(e*1e3))},Ee=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC3339 timestamps must be strings");const e=me.exec(s);if(!e)throw new TypeError(`Invalid RFC3339 timestamp format ${s}`);const[,t,r,i,n,o,a,,u,c]=e;w(r,1,12),w(i,1,31),w(n,0,23),w(o,0,59),w(a,0,60);const d=new Date(Date.UTC(Number(t),Number(r)-1,Number(i),Number(n),Number(o),Number(a),Number(u)?Math.round(parseFloat(`0.${u}`)*1e3):0));if(d.setUTCFullYear(Number(t)),c.toUpperCase()!="Z"){const[,l,g,f]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],m=l==="-"?1:-1;d.setTime(d.getTime()+m*(Number(g)*60*60*1e3+Number(f)*60*1e3))}return d},be=s=>{if(s==null)return;if(typeof s!="string")throw new TypeError("RFC7231 timestamps must be strings.");let e,t,r,i,n,o,a,u;if((u=pe.exec(s))?[,e,t,r,i,n,o,a]=u:(u=he.exec(s))?([,e,t,r,i,n,o,a]=u,r=(Number(r)+1900).toString()):(u=we.exec(s))&&([,t,e,i,n,o,a,r]=u),r&&o){const c=Date.UTC(Number(r),Se.indexOf(t),Number(e),Number(i),Number(n),Number(o),a?Math.round(parseFloat(`0.${a}`)*1e3):0);w(e,1,31),w(i,0,23),w(n,0,59),w(o,0,60);const d=new Date(c);return d.setUTCFullYear(Number(r)),d}throw new TypeError(`Invalid RFC7231 date-time value ${s}.`)};function w(s,e,t){const r=Number(s);if(r<e||r>t)throw new Error(`Value ${r} out of range [${e}, ${t}]`)}const Ce=s=>{const e=s.length,t=[];let r=!1,i,n=0;for(let o=0;o<e;++o){const a=s[o];switch(a){case'"':i!=="\\"&&(r=!r);break;case",":r||(t.push(s.slice(n,o)),n=o+1);break}i=a}return t.push(s.slice(n)),t.map(o=>{o=o.trim();const a=o.length;return a<2?o:(o[0]==='"'&&o[a-1]==='"'&&(o=o.slice(1,a-1)),o.replace(/\\"/g,'"'))})};class Ae extends re{settings;constructor(e){super(),this.settings=e}read(e,t){const r=S.of(e);if(r.isListSchema())return Ce(t).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??x)(t);if(r.isTimestampSchema())switch(W(r,this.settings)){case 5:return Ee(t);case 6:return be(t);case 7:return ye(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let n=t;if(i)return r.getMergedTraits().httpHeader&&(n=this.base64ToUtf8(n)),(i==="application/json"||i.endsWith("+json"))&&(n=ie.from(n)),n}return r.isNumericSchema()?Number(t):r.isBigIntegerSchema()?BigInt(t):r.isBigDecimalSchema()?new G(t,"bigDecimal"):r.isBooleanSchema()?String(t).toLowerCase()==="true":t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??H)((this.serdeContext?.base64Decoder??x)(e))}}const q=s=>{const e="#text";for(const t in s)s.hasOwnProperty(t)&&s[t][e]!==void 0?s[t]=s[t][e]:typeof s[t]=="object"&&s[t]!==null&&(s[t]=q(s[t]));return s};function ot(s){return s}const Te=s=>e=>async t=>{if(!k.isInstance(t.request))return e(t);const{request:r}=t,{handlerProtocol:i=""}=s.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let n=r.hostname;r.port!=null&&(n+=`:${r.port}`),r.headers.host=n}return e(t)},Ne={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},at=s=>({applyToStack:e=>{e.add(Te(s),Ne)}}),ke=()=>(s,e)=>async t=>{try{const r=await s(t),{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,l=c??e.outputFilterSensitiveLog,{$metadata:g,...f}=r.output;return o?.info?.({clientName:i,commandName:n,input:d(t.input),output:l(f),metadata:g}),r}catch(r){const{clientName:i,commandName:n,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:n,input:c(t.input),error:r,metadata:r.$metadata}),r}},Re={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ct=s=>({applyToStack:e=>{e.add(ke(),Re)}}),Me={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Oe=()=>s=>async e=>s(e),ut=s=>({applyToStack:e=>{e.add(Oe(),Me)}}),De=void 0;function _e(s){return s===void 0?!0:typeof s=="string"&&s.length<=50}function dt(s){const e=y(s.userAgentAppId??De),{customUserAgent:t}=s;return Object.assign(s,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const r=await e();if(!_e(r)){const i=s.logger?.constructor?.name==="NoOpLogger"||!s.logger?console:s.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const X=(s,e=!1)=>{if(e){for(const t of s.split("."))if(!X(t))return!1;return!0}return!(!ne(s)||s.length<3||s.length>63||s!==s.toLowerCase()||oe(s))},F=":",xe="/",$e=s=>{const e=s.split(F);if(e.length<6)return null;const[t,r,i,n,o,...a]=e;if(t!=="arn"||r===""||i===""||a.join(F)==="")return null;const u=a.map(c=>c.split(xe)).flat();return{partition:r,service:i,region:n,accountId:o,resourceId:u}},Ie=[{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)"}}}],Pe={partitions:Ie};let Ue=Pe;const Fe=s=>{const{partitions:e}=Ue;for(const r of e){const{regions:i,outputs:n}=r;for(const[o,a]of Object.entries(i))if(o===s)return{...n,...a}}for(const r of e){const{regionRegex:i,outputs:n}=r;if(new RegExp(i).test(s))return{...n}}const t=e.find(r=>r.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},ze={isVirtualHostableS3Bucket:X,parseArn:$e,partition:Fe};ae.aws=ze;function Le(s,e,t){return s.$source||(s.$source={}),s.$source[e]=t,s}function h(s,e,t){s.__aws_sdk_context?s.__aws_sdk_context.features||(s.__aws_sdk_context.features={}):s.__aws_sdk_context={features:{}},s.__aws_sdk_context.features[e]=t}const z=s=>ee.isInstance(s)?s.headers?.date??s.headers?.Date:void 0,J=s=>new Date(Date.now()+s),ve=(s,e)=>Math.abs(J(e).getTime()-s)>=3e5,L=(s,e)=>{const t=Date.parse(s);return ve(t,e)?t-Date.now():e},E=(s,e)=>{if(!e)throw new Error(`Property \`${s}\` is not resolved for AWS SDK SigV4Auth`);return e},Ve=async s=>{const e=E("context",s.context),t=E("config",s.config),r=e.endpointV2?.properties?.authSchemes?.[0],n=await E("signer",t.signer)(r),o=s?.signingRegion,a=s?.signingRegionSet,u=s?.signingName;return{config:t,signer:n,signingRegion:o,signingRegionSet:a,signingName:u}};class lt{async sign(e,t,r){if(!k.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Ve(r),{config:n,signer:o}=i;let{signingRegion:a,signingName:u}=i;const c=r.context;if(c?.authSchemes?.length??!1){const[l,g]=c.authSchemes;l?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:J(n.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return t=>{const r=t.ServerTime??z(t.$response);if(r){const i=E("config",e.config),n=i.systemClockOffset;i.systemClockOffset=L(r,i.systemClockOffset),i.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const r=z(e);if(r){const i=E("config",t.config);i.systemClockOffset=L(r,i.systemClockOffset)}}}const gt=s=>{let e=s.credentials,t=!!s.credentials,r;Object.defineProperty(s,"credentials",{set(c){c&&c!==e&&c!==r&&(t=!0),e=c;const d=je(s,{credentials:e,credentialDefaultProvider:s.credentialDefaultProvider}),l=Be(s,d);if(t&&!l.attributed){const g=typeof e=="object"&&e!==null;r=async f=>{const p=await l(f);return g&&(!p.$source||Object.keys(p.$source).length===0)?Le(p,"CREDENTIALS_CODE","e"):p},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),s.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:n=s.systemClockOffset||0,sha256:o}=s;let a;return s.signer?a=y(s.signer):s.regionInfoProvider?a=()=>y(s.region)().then(async c=>[await s.regionInfoProvider(c,{useFipsEndpoint:await s.useFipsEndpoint(),useDualstackEndpoint:await s.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:l,signingService:g}=c;s.signingRegion=s.signingRegion||l||d,s.signingName=s.signingName||g||s.serviceId;const f={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},m=s.signerConstructor||$;return new m(f)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:s.signingName||s.defaultSigningName,signingRegion:await y(s.region)(),properties:{}},c);const d=c.signingRegion,l=c.signingName;s.signingRegion=s.signingRegion||d,s.signingName=s.signingName||l||s.serviceId;const g={...s,credentials:s.credentials,region:s.signingRegion,service:s.signingName,sha256:o,uriEscapePath:i},f=s.signerConstructor||$;return new f(g)},Object.assign(s,{systemClockOffset:n,signingEscapePath:i,signer:a})};function je(s,{credentials:e,credentialDefaultProvider:t}){let r;return e?e?.memoized?r=e:r=ce(e,de,ue):t?r=y(t(Object.assign({},s,{parentClientConfig:s}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Be(s,e){if(e.configBound)return e;const t=async r=>e({...r,callerClientConfig:s});return t.memoized=e.memoized,t.configBound=!0,t}class He{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const r=t.getMemberSchemas(),i=Object.values(r).find(n=>!!n.getMergedTraits().httpPayload);if(i){const n=i.getMergedTraits().mediaType;return n||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!u&&!c&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,r,i,n,o){let a=t,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:n,$fault:r.statusCode<500?"client":"server"},d=N.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{i.message=i.message??i.Message??"UnknownError";const g=N.for("smithy.ts.sdk.synthetic."+a),f=g.getBaseException();if(f){const m=g.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:u}),c),i)}throw this.decorateServiceException(Object.assign(new Error(u),c),i)}}decorateServiceException(e,t={}){if(this.queryCompat){const r=e.Message??t.Message,i=I(e,t);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const n=i.$metadata.requestId;return n&&(i.RequestId=n),i}return I(e,t)}setQueryCompatError(e,t){const r=t.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[i,n]=r.split(";"),o=Object.entries(e),a={Code:i,Type:n};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>S.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class Y{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*We(s,e){if(s.isUnitSchema())return;const t=s.getSchema();for(let r=0;r<t[4].length;++r){const i=t[4][r],n=t[5][r],o=new S([n,0],i);!(i in e)&&!o.isIdempotencyToken()||(yield[i,o])}}class Ge{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}let C;function Ke(s){C||(C=new DOMParser);const e=C.parseFromString(s,"application/xml");if(e.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const t=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const n={},o=Array.from(i.attributes);for(const u of o)n[`${u.name}`]=u.value;const a=Array.from(i.childNodes);for(const u of a){const c=t(u);if(c!=null){const d=u.nodeName;if(a.length===1&&o.length===0&&d==="#text")return c;n[d]?Array.isArray(n[d])?n[d].push(c):n[d]=[n[d],c]:n[d]=c}else if(a.length===1&&o.length===0)return i.textContent}return n}return null};return{[e.documentElement.nodeName]:t(e.documentElement)}}class Qe extends Y{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new Ae(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,r){const i=S.of(e),n=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(n).find(c=>!!c.getMemberTraits().eventPayload)){const c={},d=Object.keys(n)[0];return n[d].isBlobSchema()?c[d]=t:c[d]=this.read(n[d],t),c}const a=(this.serdeContext?.utf8Encoder??H)(t),u=this.parseXml(a);return this.readSchema(e,r?u[r]:u)}readSchema(e,t){const r=S.of(e);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(t))return this.readSchema(r,[t]);if(t==null)return t;if(typeof t=="object"){const n=!!i.sparse,o=!!i.xmlFlattened;if(r.isListSchema()){const u=r.getValueSchema(),c=[],d=u.getMergedTraits().xmlName??"member",l=o?t:(t[0]??t)[d],g=Array.isArray(l)?l:[l];for(const f of g)(f!=null||n)&&c.push(this.readSchema(u,f));return c}const a={};if(r.isMapSchema()){const u=r.getKeySchema(),c=r.getValueSchema();let d;o?d=Array.isArray(t)?t:[t]:d=Array.isArray(t.entry)?t.entry:[t.entry];const l=u.getMergedTraits().xmlName??"key",g=c.getMergedTraits().xmlName??"value";for(const f of d){const m=f[l],p=f[g];(p!=null||n)&&(a[m]=this.readSchema(c,p))}return a}if(r.isStructSchema()){const u=r.isUnionSchema();let c;u&&(c=new Ge(t,a));for(const[d,l]of r.structIterator()){const g=l.getMergedTraits(),f=g.httpPayload?g.xmlName??l.getName():l.getMemberTraits().xmlName??d;u&&c.mark(f),t[f]!=null&&(a[d]=this.readSchema(l,t[f]))}return u&&c.writeUnknown(),a}if(r.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,t)}parseXml(e){if(e.length){let t;try{t=Ke(e)}catch(o){throw o&&typeof o=="object"&&Object.defineProperty(o,"$responseBodyText",{value:e}),o}const r="#text",i=Object.keys(t)[0],n=t[i];return n[r]&&(n[i]=n[r],delete n[r]),q(n)}return{}}}class qe extends Y{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,r=""){this.buffer===void 0&&(this.buffer="");const i=S.of(e);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof t=="string"||t instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??te)(t)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())t!=null?(this.writeKey(r),this.writeValue(String(t))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(le()));else if(i.isBigIntegerSchema())t!=null&&(this.writeKey(r),this.writeValue(String(t)));else if(i.isBigDecimalSchema())t!=null&&(this.writeKey(r),this.writeValue(t instanceof G?t.string:String(t)));else if(i.isTimestampSchema()){if(t instanceof Date)switch(this.writeKey(r),W(i,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(se(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(t)?this.write(79,t,r):t instanceof Date?this.write(4,t,r):t instanceof Uint8Array?this.write(21,t,r):t&&typeof t=="object"?this.write(143,t,r):(this.writeKey(r),this.writeValue(String(t)));else if(i.isListSchema()){if(Array.isArray(t))if(t.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const n=i.getValueSchema(),o=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let a=1;for(const u of t){if(u==null)continue;const c=this.getKey("member",n.getMergedTraits().xmlName),d=o?`${r}${a}`:`${r}${c}.${a}`;this.write(n,u,d),++a}}}else if(i.isMapSchema()){if(t&&typeof t=="object"){const n=i.getKeySchema(),o=i.getValueSchema(),a=i.getMergedTraits().xmlFlattened;let u=1;for(const[c,d]of Object.entries(t)){if(d==null)continue;const l=this.getKey("key",n.getMergedTraits().xmlName),g=a?`${r}${u}.${l}`:`${r}entry.${u}.${l}`,f=this.getKey("value",o.getMergedTraits().xmlName),m=a?`${r}${u}.${f}`:`${r}entry.${u}.${f}`;this.write(n,c,g),this.write(o,d,m),++u}}}else if(i.isStructSchema()){if(t&&typeof t=="object"){let n=!1;for(const[o,a]of We(i,t)){if(t[o]==null&&!a.isIdempotencyToken())continue;const u=this.getKey(o,a.getMergedTraits().xmlName),c=`${r}${u}`;this.write(a,t[o],c),n=!0}if(!n&&i.isUnionSchema()){const{$unknown:o}=t;if(Array.isArray(o)){const[a,u]=o,c=`${r}${a}`;this.write(15,u,c)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const r=t??e;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${U(e)}=`}writeValue(e){this.buffer+=U(e)}}class ft extends ge{options;serializer;deserializer;mixin=new He;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new qe(t),this.deserializer=new Qe(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,r){const i=await super.serializeRequest(e,t,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(fe(e.input)==="unit"||!i.body)&&(i.body="");const n=e.name.split("#")[1]??e.name;return i.body=`Action=${n}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(e,t,r){const i=this.deserializer,n=S.of(e.output),o={};if(r.statusCode>=300){const l=await P(r.body,t);l.byteLength>0&&Object.assign(o,await i.read(15,l)),await this.handleError(e,t,r,o,this.deserializeMetadata(r))}for(const l in r.headers){const g=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=g}const a=e.name.split("#")[1]??e.name,u=n.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await P(r.body,t);return c.byteLength>0&&Object.assign(o,await i.read(n,c,u)),{$metadata:this.deserializeMetadata(r),...o}}useNestedResult(){return!0}async handleError(e,t,r,i,n){const o=this.loadQueryErrorCode(r,i)??"Unknown",a=this.loadQueryError(i),u=this.loadQueryErrorMessage(i);a.message=u,a.Error={Type:a.Type,Code:a.Code,Message:u};const{errorSchema:c,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,a,n,this.mixin.findQueryCompatibleError),l=S.of(c),g=N.for(c[1]).getErrorCtor(c)??Error,f=new g(u),m={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(const[p,D]of l.structIterator()){const _=D.getMergedTraits().xmlName??p,Z=a[_]??i[_];m[p]=this.deserializer.readSchema(D,Z)}throw this.mixin.decorateServiceException(Object.assign(f,d,{$fault:l.getMergedTraits().error,message:u},m),i)}loadQueryErrorCode(e,t){const r=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(r!==void 0)return r;if(e.statusCode==404)return"NotFound"}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Xe=/\d{12}\.ddb/;async function Je(s,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&h(s,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const n=await e.retryStrategy();typeof n.acquireInitialRetryToken=="function"?n.constructor?.name?.includes("Adaptive")?h(s,"RETRY_MODE_ADAPTIVE","F"):h(s,"RETRY_MODE_STANDARD","E"):h(s,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const n=s.endpointV2;switch(String(n?.url?.hostname).match(Xe)&&h(s,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":h(s,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":h(s,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":h(s,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=s.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const n=i;n.accountId&&h(s,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(n.$source??{}))h(s,o,a)}}const v="user-agent",A="x-amz-user-agent",V=" ",T="/",Ye=/[^!$%&'*+\-.^_`|~\w]/g,Ze=/[^!$%&'*+\-.^_`|~\w#]/g,j="-",et=1024;function tt(s){let e="";for(const t in s){const r=s[t];if(e.length+r.length+1<=et){e.length?e+=","+r:e+=r;continue}break}return e}const st=s=>(e,t)=>async r=>{const{request:i}=r;if(!k.isInstance(i))return e(r);const{headers:n}=i,o=t?.userAgent?.map(b)||[],a=(await s.defaultUserAgentProvider()).map(b);await Je(t,s,r);const u=t;a.push(`m/${tt(Object.assign({},t.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=s?.customUserAgent?.map(b)||[],d=await s.userAgentAppId();d&&a.push(b(["app",`${d}`]));const l=[].concat([...a,...o,...c]).join(V),g=[...a.filter(f=>f.startsWith("aws-sdk-")),...c].join(V);return s.runtime!=="browser"?(g&&(n[A]=n[A]?`${n[v]} ${g}`:g),n[v]=l):n[A]=l,e({...r,request:i})},b=s=>{const e=s[0].split(T).map(o=>o.replace(Ye,j)).join(T),t=s[1]?.replace(Ze,j),r=e.indexOf(T),i=e.substring(0,r);let n=e.substring(r+1);return i==="api"&&(n=n.toLowerCase()),[i,n,t].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},rt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},mt=s=>({applyToStack:e=>{e.add(st(s),rt)}}),pt=({serviceId:s,clientVersion:e})=>async t=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",n=r?.userAgentData?.platform??B.os(i)??"other",o=void 0,a=r?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??B.browser(i)??"unknown",d=u?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${n}`,o],["lang/js"],["md/browser",`${c}_${d}`]];s&&l.push([`api/${s}`,e]);const g=await t?.userAgentAppId?.();return g&&l.push([`app/${g}`]),l},B={os(s){if(/iPhone|iPad|iPod/.test(s))return"iOS";if(/Macintosh|Mac OS X/.test(s))return"macOS";if(/Windows NT/.test(s))return"Windows";if(/Android/.test(s))return"Android";if(/Linux/.test(s))return"Linux"},browser(s){if(/EdgiOS|EdgA|Edg\//.test(s))return"Microsoft Edge";if(/Firefox\//.test(s))return"Firefox";if(/Chrome\//.test(s))return"Chrome";if(/Safari\//.test(s))return"Safari"}},ht=s=>({setRegion(e){s.region=e},region(){return s.region}}),wt=s=>({region:s.region()});export{ft as A,ze as a,lt as b,pt as c,wt as d,dt as e,mt as f,ht as g,at as h,ct as i,ut as j,ot as k,gt as r,Le as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as Pe,a as ye,A as Ae,b as ve,c as Ie,g as Re,d as Ce,e as xe,k as De,f as be,h as _e,i as Te,j as ke,s as N}from"./index-B5cYUcHg.js";import{n as ee,k as we,E as We,r as $e,c as Ue,p as He,l as Fe,o as Oe,q as Le,s as je,D as Me,t as Ne,u as Ke,w as qe,x as ze,y as Ge,z as Ve,A as Be,B as Qe,C as Je,F as Xe,G as Ye,H as Ze,I as et,J as tt,K as nt,M as ot,O as st,P as it,U as rt,Q as at,V as ct,T as P,W as dt,X as lt}from"./resolveDefaultsModeConfig-Bx7XDpng.js";import{b as ut,i as pt,t as mt,f as gt,s as ht,F as ft}from"./normalizeProvider-CtDY37Q6.js";import"./preload-helper-BlTxHScW.js";import"./index-IWX-nwYi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function St(){return async()=>"us-east-1"}const Et=async(e,t,i)=>({operation:we(t).operation,region:await ee(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Pt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,i)=>({signingProperties:{config:t,context:i}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}const At=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(yt());break}default:t.push(Pt(e))}return t},vt=e=>Object.assign(e,{stsClientCtor:ue}),It=e=>{const t=vt(e),i=Pe(t);return Object.assign(i,{authSchemePreference:ee(e.authSchemePreference??[])})},Rt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ct={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"}},xt="3.974.0",Dt={version:xt},te="required",n="type",o="fn",s="argv",y="ref",K=!1,w=!0,E="booleanEquals",l="stringEquals",ne="sigv4",oe="sts",se="us-east-1",a="endpoint",q="https://sts.{Region}.{PartitionResult#dnsSuffix}",h="tree",D="error",$="getAttr",z={[te]:!1,[n]:"string"},W={[te]:!0,default:!1,[n]:"boolean"},ie={[y]:"Endpoint"},G={[o]:"isSet",[s]:[{[y]:"Region"}]},u={[y]:"Region"},V={[o]:"aws.partition",[s]:[u],assign:"PartitionResult"},re={[y]:"UseFIPS"},ae={[y]:"UseDualStack"},p={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:se}]},headers:{}},m={},B={conditions:[{[o]:l,[s]:[u,"aws-global"]}],[a]:p,[n]:a},ce={[o]:E,[s]:[re,!0]},de={[o]:E,[s]:[ae,!0]},Q={[o]:$,[s]:[{[y]:"PartitionResult"},"supportsFIPS"]},le={[y]:"PartitionResult"},J={[o]:E,[s]:[!0,{[o]:$,[s]:[le,"supportsDualStack"]}]},X=[{[o]:"isSet",[s]:[ie]}],Y=[ce],Z=[de],bt={parameters:{Region:z,UseDualStack:W,UseFIPS:W,Endpoint:z,UseGlobalEndpoint:W},rules:[{conditions:[{[o]:E,[s]:[{[y]:"UseGlobalEndpoint"},w]},{[o]:"not",[s]:X},G,V,{[o]:E,[s]:[re,K]},{[o]:E,[s]:[ae,K]}],rules:[{conditions:[{[o]:l,[s]:[u,"ap-northeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-south-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-2"]}],endpoint:p,[n]:a},B,{conditions:[{[o]:l,[s]:[u,"ca-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-north-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-3"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"sa-east-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,se]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-east-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-2"]}],endpoint:p,[n]:a},{endpoint:{url:q,properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:"{Region}"}]},headers:m},[n]:a}],[n]:h},{conditions:X,rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[n]:D},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[n]:D},{endpoint:{url:ie,properties:m,headers:m},[n]:a}],[n]:h},{conditions:[G],rules:[{conditions:[V],rules:[{conditions:[ce,de],rules:[{conditions:[{[o]:E,[s]:[w,Q]},J],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[n]:D}],[n]:h},{conditions:Y,rules:[{conditions:[{[o]:E,[s]:[Q,w]}],rules:[{conditions:[{[o]:l,[s]:[{[o]:$,[s]:[le,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:m,headers:m},[n]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS is enabled but this partition does not support FIPS",[n]:D}],[n]:h},{conditions:Z,rules:[{conditions:[J],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"DualStack is enabled but this partition does not support DualStack",[n]:D}],[n]:h},B,{endpoint:{url:q,properties:m,headers:m},[n]:a}],[n]:h}],[n]:h},{error:"Invalid Configuration: Missing Region",[n]:D}]},_t=bt,Tt=new We({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),kt=(e,t={})=>Tt.get(e,()=>$e(_t,{endpointParams:e,logger:t.logger}));Ue.aws=ye;const wt=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??gt,base64Encoder:e?.base64Encoder??mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??kt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??At,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ve},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Oe}],logger:e?.logger??new Fe,protocol:e?.protocol??Ae,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??He,utf8Decoder:e?.utf8Decoder??pt,utf8Encoder:e?.utf8Encoder??ut}),Wt=e=>{const t=Le(e),i=()=>t().then(Ve),d=wt(e);return{...d,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qe,credentialDefaultProvider:e?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Ie({serviceId:d.serviceId,clientVersion:Dt.version}),maxAttempts:e?.maxAttempts??Ke,region:e?.region??Ne("Region is missing"),requestHandler:ft.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||Me),sha256:e?.sha256??je,streamCollector:e?.streamCollector??ht,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ge)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(ze))}},$t=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,d=e.credentials;return{setHttpAuthScheme(r){const S=t.findIndex(g=>g.schemeId===r.schemeId);S===-1?t.push(r):t.splice(S,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){i=r},httpAuthSchemeProvider(){return i},setCredentials(r){d=r},credentials(){return d}}},Ut=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Ht=(e,t)=>{const i=Object.assign(Re(e),Be(e),Qe(e),$t(e));return t.forEach(d=>d.configure(i)),Object.assign(e,Ce(i),Je(i),Xe(i),Ut(i))};class ue extends Ye{config;constructor(...[t]){const i=Wt(t||{});super(i),this.initConfig=i;const d=Rt(i),r=xe(d),S=Ze(r),g=et(S),A=De(g),_=tt(A),T=It(_),k=Ht(T,t?.extensions||[]);this.config=k,this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(be(this.config)),this.middlewareStack.use(ot(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(it(this.config,{httpAuthSchemeParametersProvider:Et,identityProviderConfigProvider:async b=>new rt({"aws.auth#sigv4":b.credentials})})),this.middlewareStack.use(at(this.config))}destroy(){super.destroy()}}class f extends ct{constructor(t){super(t),Object.setPrototypeOf(this,f.prototype)}}class U extends f{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class H extends f{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class F extends f{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class O extends f{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class L extends f{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}class j extends f{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,j.prototype)}}class M extends f{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,M.prototype)}}const Ft="Arn",Ot="AccessKeyId",Lt="AssumedRoleId",pe="AssumedRoleUser",jt="AssumeRoleWithWebIdentity",Mt="AssumeRoleWithWebIdentityRequest",Nt="AssumeRoleWithWebIdentityResponse",Kt="Audience",me="Credentials",qt="DurationSeconds",zt="Expiration",Gt="ExpiredTokenException",Vt="IDPCommunicationErrorException",Bt="IDPRejectedClaimException",Qt="InvalidIdentityTokenException",Jt="MalformedPolicyDocumentException",Xt="Policy",Yt="PolicyArns",Zt="PolicyDescriptorType",en="ProviderId",tn="PackedPolicySize",nn="PackedPolicyTooLargeException",on="Provider",sn="RoleArn",rn="RegionDisabledException",an="RoleSessionName",cn="SecretAccessKey",dn="SubjectFromWebIdentityToken",ln="SourceIdentity",un="SessionToken",pn="WebIdentityToken",mn="arn",gn="accessKeySecretType",v="awsQueryError",I="client",hn="clientTokenType",R="error",C="httpError",x="message",fn="policyDescriptorListType",ge="smithy.ts.sdk.synthetic.com.amazonaws.sts",c="com.amazonaws.sts";var Sn=[0,c,gn,8,0],En=[0,c,hn,8,0],Pn=[3,c,pe,0,[Lt,Ft],[0,0],2],yn=[3,c,Mt,0,[sn,an,pn,en,Yt,Xt,qt],[0,0,[()=>En,0],0,()=>wn,0,1],3],An=[3,c,Nt,0,[me,dn,pe,tn,on,Kt,ln],[[()=>vn,0],0,()=>Pn,1,0,0,0]],vn=[3,c,me,0,[Ot,cn,un,zt],[0,[()=>Sn,0],0,4],4],In=[-3,c,Gt,{[v]:["ExpiredTokenException",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(In,U);var Rn=[-3,c,Vt,{[v]:["IDPCommunicationError",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Rn,M);var Cn=[-3,c,Bt,{[v]:["IDPRejectedClaim",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Cn,L);var xn=[-3,c,Qt,{[v]:["InvalidIdentityToken",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(xn,j);var Dn=[-3,c,Jt,{[v]:["MalformedPolicyDocument",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Dn,H);var bn=[-3,c,nn,{[v]:["PackedPolicyTooLarge",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(bn,F);var _n=[3,c,Zt,0,[mn],[0]],Tn=[-3,c,rn,{[v]:["RegionDisabledException",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Tn,O);var kn=[-3,ge,"STSServiceException",0,[],[]];P.for(ge).registerError(kn,f);var wn=[1,c,fn,0,()=>_n],Wn=[9,c,jt,0,()=>yn,()=>An];class $n extends dt.classBuilder().ep(Ct).m(function(t,i,d,r){return[lt(d,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Wn).build(){}const Un=e=>{if(typeof e?.Arn=="string"){const t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Hn=async(e,t,i,d={})=>{const r=typeof e=="function"?await e():e,S=typeof t=="function"?await t():t;let g="";const A=r??S??(g=await St()());return i?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${S} (contextual client)`,`${g} (STS default: AWS_REGION, profile region, or us-east-1)`),A},Fn=(e,t)=>{let i;return async d=>{if(!i){const{logger:_=e?.parentClientConfig?.logger,profile:T=e?.parentClientConfig?.profile,region:k,requestHandler:b=e?.parentClientConfig?.requestHandler,credentialProviderLogger:he,userAgentAppId:fe=e?.parentClientConfig?.userAgentAppId}=e,Se=await Hn(k,e?.parentClientConfig?.region,he,{}),Ee=!On(b);i=new t({...e,userAgentAppId:fe,profile:T,region:Se,requestHandler:Ee?b:void 0,logger:_})}const{Credentials:r,AssumedRoleUser:S}=await i.send(new $n(d));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${d.RoleArn}`);const g=Un(S),A={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...g&&{accountId:g}};return g&&N(A,"RESOLVED_ACCOUNT_ID","T"),N(A,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),A}},On=e=>e?.metadata?.handlerProtocol==="h2",Ln=(e,t)=>t?class extends e{constructor(d){super(d);for(const r of t)this.middlewareStack.use(r)}}:e,io=(e={},t)=>Fn(e,Ln(ue,t));export{dt as $Command,Wn as AssumeRoleWithWebIdentity$,$n as AssumeRoleWithWebIdentityCommand,yn as AssumeRoleWithWebIdentityRequest$,An as AssumeRoleWithWebIdentityResponse$,Pn as AssumedRoleUser$,vn as Credentials$,U as ExpiredTokenException,In as ExpiredTokenException$,M as IDPCommunicationErrorException,Rn as IDPCommunicationErrorException$,L as IDPRejectedClaimException,Cn as IDPRejectedClaimException$,j as InvalidIdentityTokenException,xn as InvalidIdentityTokenException$,H as MalformedPolicyDocumentException,Dn as MalformedPolicyDocumentException$,F as PackedPolicyTooLargeException,bn as PackedPolicyTooLargeException$,_n as PolicyDescriptorType$,O as RegionDisabledException,Tn as RegionDisabledException$,ue as STSClient,f as STSServiceException,kn as STSServiceException$,Ye as __Client,io as getDefaultRoleAssumerWithWebIdentity};
|
|
1
|
+
import{r as Pe,a as ye,A as Ae,b as ve,c as Ie,g as Re,d as Ce,e as xe,k as De,f as be,h as _e,i as Te,j as ke,s as N}from"./index-DdtfPfhz.js";import{n as ee,k as we,E as We,r as $e,c as Ue,p as He,l as Fe,o as Oe,q as Le,s as je,D as Me,t as Ne,u as Ke,w as qe,x as ze,y as Ge,z as Ve,A as Be,B as Qe,C as Je,F as Xe,G as Ye,H as Ze,I as et,J as tt,K as nt,M as ot,O as st,P as it,U as rt,Q as at,V as ct,T as P,W as dt,X as lt}from"./resolveDefaultsModeConfig-Dc_krWBD.js";import{b as ut,i as pt,t as mt,f as gt,s as ht,F as ft}from"./normalizeProvider-CtDY37Q6.js";import"./preload-helper-BlTxHScW.js";import"./index-CVqRSHuR.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function St(){return async()=>"us-east-1"}const Et=async(e,t,i)=>({operation:we(t).operation,region:await ee(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Pt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,i)=>({signingProperties:{config:t,context:i}})}}function yt(e){return{schemeId:"smithy.api#noAuth"}}const At=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(yt());break}default:t.push(Pt(e))}return t},vt=e=>Object.assign(e,{stsClientCtor:ue}),It=e=>{const t=vt(e),i=Pe(t);return Object.assign(i,{authSchemePreference:ee(e.authSchemePreference??[])})},Rt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ct={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"}},xt="3.974.0",Dt={version:xt},te="required",n="type",o="fn",s="argv",y="ref",K=!1,w=!0,E="booleanEquals",l="stringEquals",ne="sigv4",oe="sts",se="us-east-1",a="endpoint",q="https://sts.{Region}.{PartitionResult#dnsSuffix}",h="tree",D="error",$="getAttr",z={[te]:!1,[n]:"string"},W={[te]:!0,default:!1,[n]:"boolean"},ie={[y]:"Endpoint"},G={[o]:"isSet",[s]:[{[y]:"Region"}]},u={[y]:"Region"},V={[o]:"aws.partition",[s]:[u],assign:"PartitionResult"},re={[y]:"UseFIPS"},ae={[y]:"UseDualStack"},p={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:se}]},headers:{}},m={},B={conditions:[{[o]:l,[s]:[u,"aws-global"]}],[a]:p,[n]:a},ce={[o]:E,[s]:[re,!0]},de={[o]:E,[s]:[ae,!0]},Q={[o]:$,[s]:[{[y]:"PartitionResult"},"supportsFIPS"]},le={[y]:"PartitionResult"},J={[o]:E,[s]:[!0,{[o]:$,[s]:[le,"supportsDualStack"]}]},X=[{[o]:"isSet",[s]:[ie]}],Y=[ce],Z=[de],bt={parameters:{Region:z,UseDualStack:W,UseFIPS:W,Endpoint:z,UseGlobalEndpoint:W},rules:[{conditions:[{[o]:E,[s]:[{[y]:"UseGlobalEndpoint"},w]},{[o]:"not",[s]:X},G,V,{[o]:E,[s]:[re,K]},{[o]:E,[s]:[ae,K]}],rules:[{conditions:[{[o]:l,[s]:[u,"ap-northeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-south-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"ap-southeast-2"]}],endpoint:p,[n]:a},B,{conditions:[{[o]:l,[s]:[u,"ca-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-central-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-north-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"eu-west-3"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"sa-east-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,se]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-east-2"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-1"]}],endpoint:p,[n]:a},{conditions:[{[o]:l,[s]:[u,"us-west-2"]}],endpoint:p,[n]:a},{endpoint:{url:q,properties:{authSchemes:[{name:ne,signingName:oe,signingRegion:"{Region}"}]},headers:m},[n]:a}],[n]:h},{conditions:X,rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[n]:D},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[n]:D},{endpoint:{url:ie,properties:m,headers:m},[n]:a}],[n]:h},{conditions:[G],rules:[{conditions:[V],rules:[{conditions:[ce,de],rules:[{conditions:[{[o]:E,[s]:[w,Q]},J],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[n]:D}],[n]:h},{conditions:Y,rules:[{conditions:[{[o]:E,[s]:[Q,w]}],rules:[{conditions:[{[o]:l,[s]:[{[o]:$,[s]:[le,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:m,headers:m},[n]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"FIPS is enabled but this partition does not support FIPS",[n]:D}],[n]:h},{conditions:Z,rules:[{conditions:[J],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[n]:a}],[n]:h},{error:"DualStack is enabled but this partition does not support DualStack",[n]:D}],[n]:h},B,{endpoint:{url:q,properties:m,headers:m},[n]:a}],[n]:h}],[n]:h},{error:"Invalid Configuration: Missing Region",[n]:D}]},_t=bt,Tt=new We({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),kt=(e,t={})=>Tt.get(e,()=>$e(_t,{endpointParams:e,logger:t.logger}));Ue.aws=ye;const wt=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??gt,base64Encoder:e?.base64Encoder??mt,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??kt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??At,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ve},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Oe}],logger:e?.logger??new Fe,protocol:e?.protocol??Ae,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??He,utf8Decoder:e?.utf8Decoder??pt,utf8Encoder:e?.utf8Encoder??ut}),Wt=e=>{const t=Le(e),i=()=>t().then(Ve),d=wt(e);return{...d,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qe,credentialDefaultProvider:e?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Ie({serviceId:d.serviceId,clientVersion:Dt.version}),maxAttempts:e?.maxAttempts??Ke,region:e?.region??Ne("Region is missing"),requestHandler:ft.create(e?.requestHandler??i),retryMode:e?.retryMode??(async()=>(await i()).retryMode||Me),sha256:e?.sha256??je,streamCollector:e?.streamCollector??ht,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ge)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(ze))}},$t=e=>{const t=e.httpAuthSchemes;let i=e.httpAuthSchemeProvider,d=e.credentials;return{setHttpAuthScheme(r){const S=t.findIndex(g=>g.schemeId===r.schemeId);S===-1?t.push(r):t.splice(S,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){i=r},httpAuthSchemeProvider(){return i},setCredentials(r){d=r},credentials(){return d}}},Ut=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Ht=(e,t)=>{const i=Object.assign(Re(e),Be(e),Qe(e),$t(e));return t.forEach(d=>d.configure(i)),Object.assign(e,Ce(i),Je(i),Xe(i),Ut(i))};class ue extends Ye{config;constructor(...[t]){const i=Wt(t||{});super(i),this.initConfig=i;const d=Rt(i),r=xe(d),S=Ze(r),g=et(S),A=De(g),_=tt(A),T=It(_),k=Ht(T,t?.extensions||[]);this.config=k,this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(be(this.config)),this.middlewareStack.use(ot(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(it(this.config,{httpAuthSchemeParametersProvider:Et,identityProviderConfigProvider:async b=>new rt({"aws.auth#sigv4":b.credentials})})),this.middlewareStack.use(at(this.config))}destroy(){super.destroy()}}class f extends ct{constructor(t){super(t),Object.setPrototypeOf(this,f.prototype)}}class U extends f{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class H extends f{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class F extends f{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class O extends f{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class L extends f{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}class j extends f{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,j.prototype)}}class M extends f{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,M.prototype)}}const Ft="Arn",Ot="AccessKeyId",Lt="AssumedRoleId",pe="AssumedRoleUser",jt="AssumeRoleWithWebIdentity",Mt="AssumeRoleWithWebIdentityRequest",Nt="AssumeRoleWithWebIdentityResponse",Kt="Audience",me="Credentials",qt="DurationSeconds",zt="Expiration",Gt="ExpiredTokenException",Vt="IDPCommunicationErrorException",Bt="IDPRejectedClaimException",Qt="InvalidIdentityTokenException",Jt="MalformedPolicyDocumentException",Xt="Policy",Yt="PolicyArns",Zt="PolicyDescriptorType",en="ProviderId",tn="PackedPolicySize",nn="PackedPolicyTooLargeException",on="Provider",sn="RoleArn",rn="RegionDisabledException",an="RoleSessionName",cn="SecretAccessKey",dn="SubjectFromWebIdentityToken",ln="SourceIdentity",un="SessionToken",pn="WebIdentityToken",mn="arn",gn="accessKeySecretType",v="awsQueryError",I="client",hn="clientTokenType",R="error",C="httpError",x="message",fn="policyDescriptorListType",ge="smithy.ts.sdk.synthetic.com.amazonaws.sts",c="com.amazonaws.sts";var Sn=[0,c,gn,8,0],En=[0,c,hn,8,0],Pn=[3,c,pe,0,[Lt,Ft],[0,0],2],yn=[3,c,Mt,0,[sn,an,pn,en,Yt,Xt,qt],[0,0,[()=>En,0],0,()=>wn,0,1],3],An=[3,c,Nt,0,[me,dn,pe,tn,on,Kt,ln],[[()=>vn,0],0,()=>Pn,1,0,0,0]],vn=[3,c,me,0,[Ot,cn,un,zt],[0,[()=>Sn,0],0,4],4],In=[-3,c,Gt,{[v]:["ExpiredTokenException",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(In,U);var Rn=[-3,c,Vt,{[v]:["IDPCommunicationError",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Rn,M);var Cn=[-3,c,Bt,{[v]:["IDPRejectedClaim",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Cn,L);var xn=[-3,c,Qt,{[v]:["InvalidIdentityToken",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(xn,j);var Dn=[-3,c,Jt,{[v]:["MalformedPolicyDocument",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(Dn,H);var bn=[-3,c,nn,{[v]:["PackedPolicyTooLarge",400],[R]:I,[C]:400},[x],[0]];P.for(c).registerError(bn,F);var _n=[3,c,Zt,0,[mn],[0]],Tn=[-3,c,rn,{[v]:["RegionDisabledException",403],[R]:I,[C]:403},[x],[0]];P.for(c).registerError(Tn,O);var kn=[-3,ge,"STSServiceException",0,[],[]];P.for(ge).registerError(kn,f);var wn=[1,c,fn,0,()=>_n],Wn=[9,c,jt,0,()=>yn,()=>An];class $n extends dt.classBuilder().ep(Ct).m(function(t,i,d,r){return[lt(d,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Wn).build(){}const Un=e=>{if(typeof e?.Arn=="string"){const t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Hn=async(e,t,i,d={})=>{const r=typeof e=="function"?await e():e,S=typeof t=="function"?await t():t;let g="";const A=r??S??(g=await St()());return i?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${S} (contextual client)`,`${g} (STS default: AWS_REGION, profile region, or us-east-1)`),A},Fn=(e,t)=>{let i;return async d=>{if(!i){const{logger:_=e?.parentClientConfig?.logger,profile:T=e?.parentClientConfig?.profile,region:k,requestHandler:b=e?.parentClientConfig?.requestHandler,credentialProviderLogger:he,userAgentAppId:fe=e?.parentClientConfig?.userAgentAppId}=e,Se=await Hn(k,e?.parentClientConfig?.region,he,{}),Ee=!On(b);i=new t({...e,userAgentAppId:fe,profile:T,region:Se,requestHandler:Ee?b:void 0,logger:_})}const{Credentials:r,AssumedRoleUser:S}=await i.send(new $n(d));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${d.RoleArn}`);const g=Un(S),A={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...g&&{accountId:g}};return g&&N(A,"RESOLVED_ACCOUNT_ID","T"),N(A,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),A}},On=e=>e?.metadata?.handlerProtocol==="h2",Ln=(e,t)=>t?class extends e{constructor(d){super(d);for(const r of t)this.middlewareStack.use(r)}}:e,io=(e={},t)=>Fn(e,Ln(ue,t));export{dt as $Command,Wn as AssumeRoleWithWebIdentity$,$n as AssumeRoleWithWebIdentityCommand,yn as AssumeRoleWithWebIdentityRequest$,An as AssumeRoleWithWebIdentityResponse$,Pn as AssumedRoleUser$,vn as Credentials$,U as ExpiredTokenException,In as ExpiredTokenException$,M as IDPCommunicationErrorException,Rn as IDPCommunicationErrorException$,L as IDPRejectedClaimException,Cn as IDPRejectedClaimException$,j as InvalidIdentityTokenException,xn as InvalidIdentityTokenException$,H as MalformedPolicyDocumentException,Dn as MalformedPolicyDocumentException$,F as PackedPolicyTooLargeException,bn as PackedPolicyTooLargeException$,_n as PolicyDescriptorType$,O as RegionDisabledException,Tn as RegionDisabledException$,ue as STSClient,f as STSServiceException,kn as STSServiceException$,Ye as __Client,io as getDefaultRoleAssumerWithWebIdentity};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-
|
|
2
|
-
import{_ as I}from"./preload-helper-BlTxHScW.js";import{t as O,a as N,b as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-CtDY37Q6.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let n,r=!0;typeof o=="boolean"?(n=void 0,r=o):o!=null&&typeof o=="object"&&(n=o.logger,r=o.tryNextLink??!0),super(t),this.tryNextLink=r,Object.setPrototypeOf(this,A.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const n=e[o];return typeof n=="string"?t.push([o,n]):t.push(n().then(r=>[o,r])),t},[])).then(t=>t.reduce((o,[n,r])=>(o[n]=r,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:n}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-BKqxgmy8.js","assets/normalizeProvider-CtDY37Q6.js","assets/resolveDefaultsModeConfig-Dc_krWBD.js","assets/preload-helper-BlTxHScW.js","assets/index-CVqRSHuR.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-DkOKMH7F.js","assets/index-DYeSZrx6.css","assets/loadSts-DXRSdTW2.js","assets/index-DdtfPfhz.js","assets/index-Dt7PYsXp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as I}from"./preload-helper-BlTxHScW.js";import{t as O,a as N,b as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-CtDY37Q6.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let n,r=!0;typeof o=="boolean"?(n=void 0,r=o):o!=null&&typeof o=="object"&&(n=o.logger,r=o.tryNextLink??!0),super(t),this.tryNextLink=r,Object.setPrototypeOf(this,A.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const n=e[o];return typeof n=="string"?t.push([o,n]):t.push(n().then(r=>[o,r])),t},[])).then(t=>t.reduce((o,[n,r])=>(o[n]=r,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:n}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-BKqxgmy8.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),r=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new n(Object.assign({},e.clientConfig??{},{region:r("region"),profile:r("profile"),userAgentAppId:r("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const n=o.get(t);return new Promise(r=>{n.onerror=()=>r(null),n.onsuccess=()=>r(n.result?n.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const n=o.delete(t);return new Promise((r,s)=>{n.onerror=()=>s(n.error),n.onsuccess=()=>r()})})}setItem(t,o){return this.withObjectStore("readwrite",n=>{const r=n.put({id:t,value:o});return new Promise((s,i)=>{r.onerror=()=>i(r.error),r.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,n)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{n(t.error)},t.onblocked=()=>{n(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const r=t.result;r.onerror=()=>{n(new Error("Failed to create object store"))},r.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(n=>{const r=n.transaction(b,t);return r.oncomplete=()=>n.close(),new Promise((s,i)=>{r.onerror=()=>i(r.error),s(o(r.objectStore(b)))}).catch(s=>{throw n.close(),s})})}}class W{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,o){this.store[t]=o}}const U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:n,customRoleArn:r,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:h}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-BKqxgmy8.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),y=g=>n?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new h(Object.assign({},n??{},{region:y("region"),profile:y("profile"),userAgentAppId:y("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:r,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){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;const o=e.hostname.split("."),n=r=>{const s=parseInt(r,10);return 0<=s&&s<=255};if(o[0]==="127"&&n(o[1])&&n(o[2])&&n(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
3
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
4
|
- ECS container host 169.254.170.2
|
|
5
5
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},T=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),R="The stream has already been transformed.",X=e=>{if(!E(e)&&!T(e)){const r=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${r}`)}let t=!1;const o=async()=>{if(t)throw new Error(R);return t=!0,await D(e)},n=r=>{if(typeof r.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
6
|
-
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 r.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async r=>{const s=await o();if(r==="base64")return O(s);if(r==="hex")return N(s);if(r===void 0||r==="utf8"||r==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(r).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return n(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,n])=>(t[o]=n,t),{}),fragment:e.hash})}async function ee(e,t){const n=await X(e.body).transformToString();if(e.statusCode===200){const r=JSON.parse(n);if(typeof r.AccessKeyId!="string"||typeof r.SecretAccessKey!="string"||typeof r.Token!="string"||typeof r.Expiration!="string")throw new l("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:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:H(r.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(n)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const n=new URL(t);Q(n,e.logger);const r=new j;return te(async()=>{const s=Z(n);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await r.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},re="us-east-1",le=(e,t,o)=>{let n;return async(r={})=>{const{callerClientConfig:s}=r,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-
|
|
6
|
+
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 r.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async r=>{const s=await o();if(r==="base64")return O(s);if(r==="hex")return N(s);if(r===void 0||r==="utf8"||r==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(r).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return n(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,n])=>(t[o]=n,t),{}),fragment:e.hash})}async function ee(e,t){const n=await X(e.body).transformToString();if(e.statusCode===200){const r=JSON.parse(n);if(typeof r.AccessKeyId!="string"||typeof r.SecretAccessKey!="string"||typeof r.Token!="string"||typeof r.Expiration!="string")throw new l("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:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:H(r.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(n)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const n=new URL(t);Q(n,e.logger);const r=new j;return te(async()=>{const s=Z(n);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await r.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},re="us-east-1",le=(e,t,o)=>{let n;return async(r={})=>{const{callerClientConfig:s}=r,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-DXRSdTW2.js");return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20]));if(!n){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let h="STS client default credentials";if(m[0])h="options.masterCredentials";else if(m[1])h="options.clientConfig.credentials";else{if(m[2])throw h="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?h="caller client's credentialDefaultProvider":m[4]&&(h="AWS SDK default credentials")}const y=[e.clientConfig?.region,s?.region,await o?.({profile:i}),re];let C="default partition's default region";y[0]?C="options.clientConfig.region":y[1]?C="caller client's region":y[2]&&(C="file or env region");const p=[v(e.clientConfig?.requestHandler),v(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(y))()}, ${h}, ${g}.`),n=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(y),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)n.middlewareStack.use(w);const{Credentials:a}=await n.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},v=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},ne=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:n,webIdentityToken:r,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-Dt7PYsXp.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([21,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>ne({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as G,n as N,c as qe,b as _e,f as xe,d as Ve,e as Je,g as We,t as H,h as Ke,i as Qe,s as Xe,F as Ye}from"./normalizeProvider-CtDY37Q6.js";import{i as Ze,a as et,c as Pe,S as ie,m as tt,d as st,b as rt,T as E,e as oe,N as k,f as R,g as nt,L as Re,h as ke,v as it,R as ot,j as at,n as ve,k as ct,E as ut,r as dt,p as pt,l as lt,o as gt,q as ft,s as mt,D as ht,t as yt,u as St,w as Et,x as wt,y as Ct,z as It,A as bt,B as At,C as _t,F as xt,G as Pt,H as Rt,I as kt,J as vt,K as Ot,M as Dt,O as Tt,P as Mt,Q as Nt,U as Ut,V as $t,W as Oe,X as De}from"./resolveDefaultsModeConfig-Bx7XDpng.js";import"./preload-helper-BlTxHScW.js";import"./index-IWX-nwYi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:r}=s,{handlerProtocol:n=""}=t.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const r=await t(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:p,...f}=r.output;return o?.info?.({clientName:n,commandName:i,input:d(s.input),output:l(f),metadata:p}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:u(s.input),error:r,metadata:r.$metadata}),r}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await e();if(!Wt(r)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,r,n,i,o,...a]=e;if(s!=="arn"||r===""||n===""||a.join(ae)==="")return null;const c=a.map(u=>u.split(Qt)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:c}},Yt=[{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)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const r of e){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(t))return{...i}}const s=e.find(r=>r.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Me={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Me;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function b(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Ne=t=>new Date(Date.now()+t),rs=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return rs(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},ns=async t=>{const e=U("context",t.context),s=U("config",t.config),r=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(r),o=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class is{async sign(e,s,r){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await ns(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:c}=n;const u=r.context;if(u?.authSchemes?.length??!1){const[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(a=p?.signingRegion??a,c=p?.signingName??c)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return s=>{const r=s.ServerTime??ce(s.$response);if(r){const n=U("config",e.config),i=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const r=ce(e);if(r){const n=U("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,r;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==r&&(s=!0),e=u;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=cs(t,d);if(s&&!l.attributed){const p=typeof e=="object"&&e!==null;r=async f=>{const v=await l(f);return p&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:l,signingService:p}=u;t.signingRegion=t.signingRegion||l||d,t.signingName=t.signingName||p||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},h=t.signerConstructor||ie;return new h(f)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},u);const d=u.signingRegion,l=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||l||t.serviceId;const p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},f=t.signerConstructor||ie;return new f(p)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let r;return e?e?.memoized?r=e:r=tt(e,rt,st):s?r=N(s(Object.assign({},t,{parentClientConfig:t}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function cs(t,e){if(e.configBound)return e;const s=async r=>e({...r,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!c&&!u&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,r,n,i,o){let a=s,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:r.statusCode<500?"client":"server"},d=E.for(a);try{return{errorSchema:o?.(d,c)??d.getSchema(e),errorMetadata:u}}catch{n.message=n.message??n.Message??"UnknownError";const p=E.for("smithy.ts.sdk.synthetic."+a),f=p.getBaseException();if(f){const h=p.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new h({name:c}),u),n)}throw this.decorateServiceException(Object.assign(new Error(c),u),n)}}decorateServiceException(e,s={}){if(this.queryCompat){const r=e.Message??s.Message,n=oe(e,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return oe(e,s)}setQueryCompatError(e,s){const r=s.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(n=>k.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new k([i,0],n);!(n in e)&&!o.isIdempotencyToken()||(yield[n,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const r=t.getSchema();let n=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<r[4].length&&n!==0;++i){const o=r[4][i],a=r[5][i],c=new k([a,0],o);let u=o;s&&(u=c.getMergedTraits()[s]??o),u in e&&(yield[o,c],n-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const r=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||r!==String(e)))return r.includes(".")?new R(r,"bigDecimal"):BigInt(r)}return e}const fs=(t,e)=>nt(t,e).then(s=>(e?.utf8Encoder??_e)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(r){throw r?.name==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:s}),r}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},n=s(t.headers,"x-amzn-errortype");if(n!==void 0)return r(t.headers[n]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return r(e[i]);if(e.__type!==void 0)return r(e.__type)}};class ys extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const r=s!==null&&typeof s=="object",n=k.of(e);if(r){if(n.isStructSchema()){const o=s,a=n.isUnionSchema(),c={};let u;const{jsonName:d}=this.settings;d&&(u={});let l;a&&(l=new ls(o,c));for(const[p,f]of ps(n,o,d?"jsonName":!1)){let h=p;d&&(h=f.getMergedTraits().jsonName??h,u[h]=p),a&&l.mark(h),o[h]!=null&&(c[p]=this._read(f,o[h]))}if(a)l.writeUnknown();else if(typeof o.__type=="string")for(const[p,f]of Object.entries(o)){const h=d?u[p]??p:p;h in c||(c[h]=f)}return c}if(Array.isArray(s)&&n.isListSchema()){const o=n.getValueSchema(),a=[],c=!!n.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._read(o,u));return a}if(n.isMapSchema()){const o=n.getValueSchema(),a={},c=!!n.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._read(o,d));return a}}if(n.isBlobSchema()&&typeof s=="string")return xe(s);const i=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(ke(n,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?o[a]=c:o[a]=this._read(n,c);return o}else return structuredClone(s);return s}}const de="Ν";class Ss{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,(e,s)=>{if(s instanceof R){const r=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${r}"`,s.string),r}if(typeof s=="bigint"){const r=s.toString(),n=`${de+"b"+this.counter++}_`+r;return this.values.set(`"${n}"`,r),n}return s}}replaceInJson(e){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 e;for(const[s,r]of this.values)e=e.replace(s,r);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const r=new Ss;return r.replaceInJson(JSON.stringify(this.buffer,r.createReplacer(),0))}return this.buffer}_write(e,s,r){const n=s!==null&&typeof s=="object",i=k.of(e);if(n){if(i.isStructSchema()){const o=s,a={},{jsonName:c}=this.settings;let u;c&&(u={});for(const[d,l]of ds(i,o)){const p=this._write(l,o[d],i);if(p!==void 0){let f=d;c&&(f=l.getMergedTraits().jsonName??d,u[d]=f),a[f]=p}}if(i.isUnionSchema()&&Object.keys(a).length===0){const{$unknown:d}=o;if(Array.isArray(d)){const[l,p]=d;a[l]=this._write(15,p)}}else if(typeof o.__type=="string")for(const[d,l]of Object.entries(o)){const p=c?u[d]??d:d;p in a||(a[p]=this._write(15,l))}return a}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&r?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new ys(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,r){const n=await super.serializeRequest(e,s,r);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,r,n,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,r);const o=hs(r,n)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,n,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=k.of(a),d=n.message??n.Message??"Unknown",l=E.for(a[1]).getErrorCtor(a)??Error,p=new l(d),f={};for(const[h,v]of u.structIterator())n[h]!=null&&(f[h]=this.codec.createDeserializer().readObject(v,n[h]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,f),this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},f),n)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&b(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?b(t,"RETRY_MODE_ADAPTIVE","F"):b(t,"RETRY_MODE_STANDARD","E"):b(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&b(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":b(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&b(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))b(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",_s=/[^!$%&'*+\-.^_`|~\w]/g,xs=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const r=t[s];if(e.length+r.length+1<=Ps){e.length?e+=","+r:e+=r;continue}break}return e}const ks=t=>(e,s)=>async r=>{const{request:n}=r;if(!G.isInstance(n))return e(r);const{headers:i}=n,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,r);const c=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const l=[].concat([...a,...o,...u]).join(le),p=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(le);return t.runtime!=="browser"?(p&&(i[j]=i[j]?`${i[pe]} ${p}`:p),i[pe]=l):i[j]=l,e({...r,request:n})},F=t=>{const e=t[0].split(L).map(o=>o.replace(_s,ge)).join(L),s=t[1]?.replace(xs,ge),r=e.indexOf(L),n=e.substring(0,r);let i=e.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ms=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ns=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.974.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??fe.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??fe.browser(n)??"unknown",d=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${d}`]];t&&l.push([`api/${t}`,e]);const p=await s?.userAgentAppId?.();return p&&l.push([`app/${p}`]),l},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",y="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",A="endpoint",P="tree",q="PartitionResult",V="getAttr",T="stringEquals",ye={[$e]:!1,type:"string"},Se={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[y]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[y]:$,[S]:[{[D]:"UseDualStack"},!0]},m={},M={[D]:"Region"},we={[y]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[y]:$,[S]:[!0,{[y]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[M],js={parameters:{Region:ye,UseDualStack:Se,UseFIPS:Se,Endpoint:ye},rules:[{conditions:[{[y]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:m,headers:m},type:A}],type:P},{conditions:[{[y]:he,[S]:Ae}],rules:[{conditions:[{[y]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[y]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[y]:T,[S]:[M,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:P},{conditions:Ie,rules:[{conditions:[{[y]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:P},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[y]:T,[S]:["aws",{[y]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P}],type:P},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Me;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ms,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??_e}),qs=t=>{const e=ft(t),s=()=>e().then(It),r=Bs(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:r.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??St,region:t?.region??yt("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,r=t.credentials;return{setHttpAuthScheme(n){const i=e.findIndex(o=>o.schemeId===n.schemeId);i===-1?e.push(n):e.splice(i,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(r=>r.configure(s)),Object.assign(t,Js(s),_t(s),xt(s),Ks(s))};class dn extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const r=Us(s),n=Kt(r),i=Rt(n),o=kt(i),a=o,c=vt(a),u=Ns(c),d=Qs(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Mt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async l=>new Ut({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}class w extends $t{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class J extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends w{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends w{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends w{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class re extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,re.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",er="CustomRoleArn",tr="DeveloperUserAlreadyRegisteredException",sr="Expiration",rr="ExternalServiceException",nr="GetCredentialsForIdentity",ir="GetCredentialsForIdentityInput",or="GetCredentialsForIdentityResponse",ar="GetId",cr="GetIdInput",ur="GetIdResponse",dr="InternalErrorException",ne="IdentityId",pr="InvalidIdentityPoolConfigurationException",lr="InvalidParameterException",gr="IdentityPoolId",fr="IdentityProviderToken",He="Logins",mr="LimitExceededException",hr="LoginsMap",yr="NotAuthorizedException",Sr="ResourceConflictException",Er="ResourceNotFoundException",wr="SecretKey",Cr="SecretKeyString",Ir="SessionToken",br="TooManyRequestsException",_="client",C="error",x="httpError",I="message",Ar="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",g="com.amazonaws.cognitoidentity";var _r=[0,g,fr,8,0],xr=[0,g,Cr,8,0],Pr=[-3,g,Zs,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Pr,re);var Rr=[3,g,Le,0,[Ys,wr,Ir,sr],[0,[()=>xr,0],0,4]],kr=[-3,g,tr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(kr,se);var vr=[-3,g,rr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(vr,ee);var Or=[3,g,ir,0,[ne,He,er],[0,[()=>Be,0],0],1],Dr=[3,g,or,0,[ne,Le],[0,[()=>Rr,0]]],Tr=[3,g,cr,0,[gr,Xs,He],[0,0,[()=>Be,0]],1],Mr=[3,g,ur,0,[ne],[0]],Nr=[-3,g,dr,{[C]:Ar},[I],[0]];E.for(g).registerError(Nr,J);var Ur=[-3,g,pr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Ur,te);var $r=[-3,g,lr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError($r,W);var Fr=[-3,g,mr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Fr,K);var zr=[-3,g,yr,{[C]:_,[x]:403},[I],[0]];E.for(g).registerError(zr,Q);var jr=[-3,g,Sr,{[C]:_,[x]:409},[I],[0]];E.for(g).registerError(jr,X);var Lr=[-3,g,Er,{[C]:_,[x]:404},[I],[0]];E.for(g).registerError(Lr,Z);var Hr=[-3,g,br,{[C]:_,[x]:429},[I],[0]];E.for(g).registerError(Hr,Y);var Gr=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];E.for(Ge).registerError(Gr,w);var Be=[2,g,hr,0,[0,0],[()=>_r,0]],Br=[9,g,nr,0,()=>Or,()=>Dr],qr=[9,g,ar,0,()=>Tr,()=>Mr];class pn extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Br).build(){}class ln extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qr).build(){}export{dn as CognitoIdentityClient,pn as GetCredentialsForIdentityCommand,ln as GetIdCommand};
|
|
1
|
+
import{H as G,n as N,c as qe,b as _e,f as xe,d as Ve,e as Je,g as We,t as H,h as Ke,i as Qe,s as Xe,F as Ye}from"./normalizeProvider-CtDY37Q6.js";import{i as Ze,a as et,c as Pe,S as ie,m as tt,d as st,b as rt,T as E,e as oe,N as k,f as R,g as nt,L as Re,h as ke,v as it,R as ot,j as at,n as ve,k as ct,E as ut,r as dt,p as pt,l as lt,o as gt,q as ft,s as mt,D as ht,t as yt,u as St,w as Et,x as wt,y as Ct,z as It,A as bt,B as At,C as _t,F as xt,G as Pt,H as Rt,I as kt,J as vt,K as Ot,M as Dt,O as Tt,P as Mt,Q as Nt,U as Ut,V as $t,W as Oe,X as De}from"./resolveDefaultsModeConfig-Dc_krWBD.js";import"./preload-helper-BlTxHScW.js";import"./index-CVqRSHuR.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:r}=s,{handlerProtocol:n=""}=t.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const r=await t(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:p,...f}=r.output;return o?.info?.({clientName:n,commandName:i,input:d(s.input),output:l(f),metadata:p}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:u(s.input),error:r,metadata:r.$metadata}),r}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await e();if(!Wt(r)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,r,n,i,o,...a]=e;if(s!=="arn"||r===""||n===""||a.join(ae)==="")return null;const c=a.map(u=>u.split(Qt)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:c}},Yt=[{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)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const r of e){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(t))return{...i}}const s=e.find(r=>r.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Me={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Me;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function b(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Ne=t=>new Date(Date.now()+t),rs=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return rs(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},ns=async t=>{const e=U("context",t.context),s=U("config",t.config),r=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(r),o=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class is{async sign(e,s,r){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await ns(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:c}=n;const u=r.context;if(u?.authSchemes?.length??!1){const[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(a=p?.signingRegion??a,c=p?.signingName??c)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return s=>{const r=s.ServerTime??ce(s.$response);if(r){const n=U("config",e.config),i=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const r=ce(e);if(r){const n=U("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,r;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==r&&(s=!0),e=u;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=cs(t,d);if(s&&!l.attributed){const p=typeof e=="object"&&e!==null;r=async f=>{const v=await l(f);return p&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:l,signingService:p}=u;t.signingRegion=t.signingRegion||l||d,t.signingName=t.signingName||p||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},h=t.signerConstructor||ie;return new h(f)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},u);const d=u.signingRegion,l=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||l||t.serviceId;const p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},f=t.signerConstructor||ie;return new f(p)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let r;return e?e?.memoized?r=e:r=tt(e,rt,st):s?r=N(s(Object.assign({},t,{parentClientConfig:t}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function cs(t,e){if(e.configBound)return e;const s=async r=>e({...r,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!c&&!u&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,r,n,i,o){let a=s,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:r.statusCode<500?"client":"server"},d=E.for(a);try{return{errorSchema:o?.(d,c)??d.getSchema(e),errorMetadata:u}}catch{n.message=n.message??n.Message??"UnknownError";const p=E.for("smithy.ts.sdk.synthetic."+a),f=p.getBaseException();if(f){const h=p.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new h({name:c}),u),n)}throw this.decorateServiceException(Object.assign(new Error(c),u),n)}}decorateServiceException(e,s={}){if(this.queryCompat){const r=e.Message??s.Message,n=oe(e,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return oe(e,s)}setQueryCompatError(e,s){const r=s.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(n=>k.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new k([i,0],n);!(n in e)&&!o.isIdempotencyToken()||(yield[n,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const r=t.getSchema();let n=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<r[4].length&&n!==0;++i){const o=r[4][i],a=r[5][i],c=new k([a,0],o);let u=o;s&&(u=c.getMergedTraits()[s]??o),u in e&&(yield[o,c],n-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const r=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||r!==String(e)))return r.includes(".")?new R(r,"bigDecimal"):BigInt(r)}return e}const fs=(t,e)=>nt(t,e).then(s=>(e?.utf8Encoder??_e)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(r){throw r?.name==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:s}),r}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},n=s(t.headers,"x-amzn-errortype");if(n!==void 0)return r(t.headers[n]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return r(e[i]);if(e.__type!==void 0)return r(e.__type)}};class ys extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const r=s!==null&&typeof s=="object",n=k.of(e);if(r){if(n.isStructSchema()){const o=s,a=n.isUnionSchema(),c={};let u;const{jsonName:d}=this.settings;d&&(u={});let l;a&&(l=new ls(o,c));for(const[p,f]of ps(n,o,d?"jsonName":!1)){let h=p;d&&(h=f.getMergedTraits().jsonName??h,u[h]=p),a&&l.mark(h),o[h]!=null&&(c[p]=this._read(f,o[h]))}if(a)l.writeUnknown();else if(typeof o.__type=="string")for(const[p,f]of Object.entries(o)){const h=d?u[p]??p:p;h in c||(c[h]=f)}return c}if(Array.isArray(s)&&n.isListSchema()){const o=n.getValueSchema(),a=[],c=!!n.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._read(o,u));return a}if(n.isMapSchema()){const o=n.getValueSchema(),a={},c=!!n.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._read(o,d));return a}}if(n.isBlobSchema()&&typeof s=="string")return xe(s);const i=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(ke(n,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?o[a]=c:o[a]=this._read(n,c);return o}else return structuredClone(s);return s}}const de="Ν";class Ss{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,(e,s)=>{if(s instanceof R){const r=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${r}"`,s.string),r}if(typeof s=="bigint"){const r=s.toString(),n=`${de+"b"+this.counter++}_`+r;return this.values.set(`"${n}"`,r),n}return s}}replaceInJson(e){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 e;for(const[s,r]of this.values)e=e.replace(s,r);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const r=new Ss;return r.replaceInJson(JSON.stringify(this.buffer,r.createReplacer(),0))}return this.buffer}_write(e,s,r){const n=s!==null&&typeof s=="object",i=k.of(e);if(n){if(i.isStructSchema()){const o=s,a={},{jsonName:c}=this.settings;let u;c&&(u={});for(const[d,l]of ds(i,o)){const p=this._write(l,o[d],i);if(p!==void 0){let f=d;c&&(f=l.getMergedTraits().jsonName??d,u[d]=f),a[f]=p}}if(i.isUnionSchema()&&Object.keys(a).length===0){const{$unknown:d}=o;if(Array.isArray(d)){const[l,p]=d;a[l]=this._write(15,p)}}else if(typeof o.__type=="string")for(const[d,l]of Object.entries(o)){const p=c?u[d]??d:d;p in a||(a[p]=this._write(15,l))}return a}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&r?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new ys(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,r){const n=await super.serializeRequest(e,s,r);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,r,n,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,r);const o=hs(r,n)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,n,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=k.of(a),d=n.message??n.Message??"Unknown",l=E.for(a[1]).getErrorCtor(a)??Error,p=new l(d),f={};for(const[h,v]of u.structIterator())n[h]!=null&&(f[h]=this.codec.createDeserializer().readObject(v,n[h]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,f),this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},f),n)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&b(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?b(t,"RETRY_MODE_ADAPTIVE","F"):b(t,"RETRY_MODE_STANDARD","E"):b(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&b(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":b(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&b(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))b(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",_s=/[^!$%&'*+\-.^_`|~\w]/g,xs=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const r=t[s];if(e.length+r.length+1<=Ps){e.length?e+=","+r:e+=r;continue}break}return e}const ks=t=>(e,s)=>async r=>{const{request:n}=r;if(!G.isInstance(n))return e(r);const{headers:i}=n,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,r);const c=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const l=[].concat([...a,...o,...u]).join(le),p=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(le);return t.runtime!=="browser"?(p&&(i[j]=i[j]?`${i[pe]} ${p}`:p),i[pe]=l):i[j]=l,e({...r,request:n})},F=t=>{const e=t[0].split(L).map(o=>o.replace(_s,ge)).join(L),s=t[1]?.replace(xs,ge),r=e.indexOf(L),n=e.substring(0,r);let i=e.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ms=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ns=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.974.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??fe.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??fe.browser(n)??"unknown",d=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${d}`]];t&&l.push([`api/${t}`,e]);const p=await s?.userAgentAppId?.();return p&&l.push([`app/${p}`]),l},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",y="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",A="endpoint",P="tree",q="PartitionResult",V="getAttr",T="stringEquals",ye={[$e]:!1,type:"string"},Se={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[y]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[y]:$,[S]:[{[D]:"UseDualStack"},!0]},m={},M={[D]:"Region"},we={[y]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[y]:$,[S]:[!0,{[y]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[M],js={parameters:{Region:ye,UseDualStack:Se,UseFIPS:Se,Endpoint:ye},rules:[{conditions:[{[y]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:m,headers:m},type:A}],type:P},{conditions:[{[y]:he,[S]:Ae}],rules:[{conditions:[{[y]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[y]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[y]:T,[S]:[M,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:P},{conditions:Ie,rules:[{conditions:[{[y]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:P},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[y]:T,[S]:["aws",{[y]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P}],type:P},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Me;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ms,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??_e}),qs=t=>{const e=ft(t),s=()=>e().then(It),r=Bs(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:r.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??St,region:t?.region??yt("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,r=t.credentials;return{setHttpAuthScheme(n){const i=e.findIndex(o=>o.schemeId===n.schemeId);i===-1?e.push(n):e.splice(i,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(r=>r.configure(s)),Object.assign(t,Js(s),_t(s),xt(s),Ks(s))};class dn extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const r=Us(s),n=Kt(r),i=Rt(n),o=kt(i),a=o,c=vt(a),u=Ns(c),d=Qs(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Mt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async l=>new Ut({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}class w extends $t{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class J extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends w{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends w{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends w{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class re extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,re.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",er="CustomRoleArn",tr="DeveloperUserAlreadyRegisteredException",sr="Expiration",rr="ExternalServiceException",nr="GetCredentialsForIdentity",ir="GetCredentialsForIdentityInput",or="GetCredentialsForIdentityResponse",ar="GetId",cr="GetIdInput",ur="GetIdResponse",dr="InternalErrorException",ne="IdentityId",pr="InvalidIdentityPoolConfigurationException",lr="InvalidParameterException",gr="IdentityPoolId",fr="IdentityProviderToken",He="Logins",mr="LimitExceededException",hr="LoginsMap",yr="NotAuthorizedException",Sr="ResourceConflictException",Er="ResourceNotFoundException",wr="SecretKey",Cr="SecretKeyString",Ir="SessionToken",br="TooManyRequestsException",_="client",C="error",x="httpError",I="message",Ar="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",g="com.amazonaws.cognitoidentity";var _r=[0,g,fr,8,0],xr=[0,g,Cr,8,0],Pr=[-3,g,Zs,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Pr,re);var Rr=[3,g,Le,0,[Ys,wr,Ir,sr],[0,[()=>xr,0],0,4]],kr=[-3,g,tr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(kr,se);var vr=[-3,g,rr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(vr,ee);var Or=[3,g,ir,0,[ne,He,er],[0,[()=>Be,0],0],1],Dr=[3,g,or,0,[ne,Le],[0,[()=>Rr,0]]],Tr=[3,g,cr,0,[gr,Xs,He],[0,0,[()=>Be,0]],1],Mr=[3,g,ur,0,[ne],[0]],Nr=[-3,g,dr,{[C]:Ar},[I],[0]];E.for(g).registerError(Nr,J);var Ur=[-3,g,pr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Ur,te);var $r=[-3,g,lr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError($r,W);var Fr=[-3,g,mr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Fr,K);var zr=[-3,g,yr,{[C]:_,[x]:403},[I],[0]];E.for(g).registerError(zr,Q);var jr=[-3,g,Sr,{[C]:_,[x]:409},[I],[0]];E.for(g).registerError(jr,X);var Lr=[-3,g,Er,{[C]:_,[x]:404},[I],[0]];E.for(g).registerError(Lr,Z);var Hr=[-3,g,br,{[C]:_,[x]:429},[I],[0]];E.for(g).registerError(Hr,Y);var Gr=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];E.for(Ge).registerError(Gr,w);var Be=[2,g,hr,0,[0,0],[()=>_r,0]],Br=[9,g,nr,0,()=>Or,()=>Dr],qr=[9,g,ar,0,()=>Tr,()=>Mr];class pn extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Br).build(){}class ln extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qr).build(){}export{dn as CognitoIdentityClient,pn as GetCredentialsForIdentityCommand,ln as GetIdCommand};
|