@agentlang/lstudio 0.1.5 → 0.1.7
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/AwsJson1_1Protocol-D5imyDS5.js +1 -0
- package/assets/{__vite-browser-external-DJy8wZt7.js → __vite-browser-external-DLjrMatA.js} +1 -1
- package/assets/{index-BOLaQ9_Z.js → index-2WvsM2Rj.js} +1 -1
- package/assets/index-BGkQxT4m-C1mCQewh.js +17 -0
- package/assets/{index-D1jV2j2Y.js → index-BLr5FjlG.js} +1 -1
- package/assets/index-C6bfAjj7.css +1 -0
- package/assets/{index-CzztApPS.js → index-ChZaKyS0.js} +1738 -1161
- package/assets/{index-CRBN_oZa.js → index-D0wSo38b.js} +1 -1
- package/assets/index-D3JY9UxM.js +1 -0
- package/assets/{index-Cgd01XOu-DZ3EXoBB.js → index-D4z_hbl0-BL_vRy6b.js} +1 -1
- package/assets/{index-BoNKy6Ic.js → index-DjgOAzh3.js} +1 -1
- package/assets/{index-Ynim4IDh.js → index-DzJU27LV.js} +1 -1
- package/assets/{index-BfpeqTCw.js → index-R10cjt6U.js} +1 -1
- package/assets/index-l2SiVppQ.js +15 -0
- package/assets/{index-DdrtU5Ny-B6H3P3T_.js → index-r7-q4_iF-Cr8pMb-3.js} +1 -1
- package/assets/{index-DIt05veo.js → index-rEhqCN8O.js} +1 -1
- package/assets/{index.browser-DJzU6L_M.js → index.browser-dM8WwrJj.js} +3 -3
- package/assets/loadCognitoIdentity-DyM-BCEF.js +1 -0
- package/assets/loadSts-D2HsS8iB.js +1 -0
- package/assets/{normalizeProvider-BrOPyH3l.js → normalizeProvider-EC8cbfMc.js} +1 -1
- package/assets/{replService-zmzywhSy.js → replService-CEBAk8sW.js} +1 -1
- package/assets/{winston-D1zwHYTY-CkaOApIk.js → winston-1qzyIKCb-BdlBoF8R.js} +4 -4
- package/assets/{winston-D8lBg2T-.js → winston-C4UOaon2.js} +1 -1
- package/assets/{winston-D0VJZ3P8-x1CFZMA0.js → winston-CtxF18qc-Cn1Quo2c.js} +1 -1
- package/assets/{winston-DaXMbKRs.js → winston-DDcfL10c.js} +4 -4
- package/index.html +5 -5
- package/package.json +1 -1
- package/sql-wasm.js +188 -0
- package/sql-wasm.wasm +0 -0
- package/assets/index-BVDalg8J.js +0 -15
- package/assets/index-Dy4QD7s1-DSfoLCzX.js +0 -17
- package/assets/index-cBigiEzZ.js +0 -1
- package/assets/index-x3OTdjFX.css +0 -1
- package/assets/loadCognitoIdentity-CJ88jpa8.js +0 -1
- package/assets/loadSts-C3D0kgNq.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as V,m as Le,d as Ge,i as qe,T as y,b as J,N as b,c as R,e as Be,L as ue,f as pe,v as Ve,R as Je,h as Ke,n as le,j as Qe,E as We,r as Xe,k as Ye,l as Ze,p as et,o as tt,q as nt,s as st,t as rt,D as it,u as ot,w as at,x as ct,y as dt,z as ut,A as pt,B as lt,F as gt,G as ft,H as mt,I as ht,J as yt,K as Et,a as St,M as Ct,O as It,P as xt,Q as _t,U as wt,V as At,W as Pt,X as Rt,Y as bt,Z as vt,_ as kt,$ as Tt,a0 as Dt,a1 as Ot,C as ge,g as fe}from"./index-BVDalg8J.js";import{n as N,c as Nt,H as me,t as he,d as ye,e as Mt,g as Ut,h as $t,a as Ee,i as Ft,f as zt,s as jt,F as Ht}from"./normalizeProvider-BrOPyH3l.js";import"./preload-helper-BlTxHScW.js";import"./index-CzztApPS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DJy8wZt7.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-6mKfgpcs-DsgiI2lM.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"./index-D1jV2j2Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-DIt05veo.js";import"./inherits_browser-5Fj3Mjxs.js";const Lt=void 0;function Gt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function qt(t){const e=N(t.userAgentAppId??Lt),{customUserAgent:n}=t;return Object.assign(t,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const s=await e();if(!Gt(s)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof s!="string"?r?.warn("userAgentAppId must be a string or undefined."):s.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}function Bt(t,e,n){return t.$source||(t.$source={}),t.$source[e]=n,t}function x(t,e,n){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]=n}const K=t=>Nt.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Se=t=>new Date(Date.now()+t),Vt=(t,e)=>Math.abs(Se(e).getTime()-t)>=3e5,Q=(t,e)=>{const n=Date.parse(t);return Vt(n,e)?n-Date.now():e},M=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},Jt=async t=>{const e=M("context",t.context),n=M("config",t.config),s=e.endpointV2?.properties?.authSchemes?.[0],o=await M("signer",n.signer)(s),i=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:n,signer:o,signingRegion:i,signingRegionSet:a,signingName:c}};class Kt{async sign(e,n,s){if(!me.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await Jt(s),{config:o,signer:i}=r;let{signingRegion:a,signingName:c}=r;const d=s.context;if(d?.authSchemes?.length??!1){const[l,f]=d.authSchemes;l?.name==="sigv4a"&&f?.name==="sigv4"&&(a=f?.signingRegion??a,c=f?.signingName??c)}return await i.sign(e,{signingDate:Se(o.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return n=>{const s=n.ServerTime??K(n.$response);if(s){const r=M("config",e.config),o=r.systemClockOffset;r.systemClockOffset=Q(s,r.systemClockOffset),r.systemClockOffset!==o&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(e,n){const s=K(e);if(s){const r=M("config",n.config);r.systemClockOffset=Q(s,r.systemClockOffset)}}}const Qt=t=>{let e=t.credentials,n=!!t.credentials,s;Object.defineProperty(t,"credentials",{set(d){d&&d!==e&&d!==s&&(n=!0),e=d;const p=Wt(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=Xt(t,p);n&&!l.attributed?(s=async f=>l(f).then(E=>Bt(E,"CREDENTIALS_CODE","e")),s.memoized=l.memoized,s.configBound=l.configBound,s.attributed=!0):s=l},get(){return s},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:o=t.systemClockOffset||0,sha256:i}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async d=>[await t.regionInfoProvider(d,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},d]).then(([d,p])=>{const{signingRegion:l,signingService:f}=d;t.signingRegion=t.signingRegion||l||p,t.signingName=t.signingName||f||t.serviceId;const E={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},v=t.signerConstructor||V;return new v(E)}):a=async d=>{d=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},d);const p=d.signingRegion,l=d.signingName;t.signingRegion=t.signingRegion||p,t.signingName=t.signingName||l||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:r},E=t.signerConstructor||V;return new E(f)},Object.assign(t,{systemClockOffset:o,signingEscapePath:r,signer:a})};function Wt(t,{credentials:e,credentialDefaultProvider:n}){let s;return e?e?.memoized?s=e:s=Le(e,qe,Ge):n?s=N(n(Object.assign({},t,{parentClientConfig:t}))):s=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},s.memoized=!0,s}function Xt(t,e){if(e.configBound)return e;const n=async s=>e({...s,callerClientConfig:t});return n.memoized=e.memoized,n.configBound=!0,n}class Yt{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,n){const s=n.getMemberSchemas(),r=Object.values(s).find(o=>!!o.getMergedTraits().httpPayload);if(r){const o=r.getMergedTraits().mediaType;return o||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!n.isUnitSchema()&&Object.values(s).find(i=>{const{httpQuery:a,httpQueryParams:c,httpHeader:d,httpLabel:p,httpPrefixHeaders:l}=i.getMergedTraits();return!a&&!c&&!d&&!p&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,n,s,r,o,i){let a=n,c=e;e.includes("#")&&([a,c]=e.split("#"));const d={$metadata:o,$fault:s.statusCode<500?"client":"server"},p=y.for(a);try{return{errorSchema:i?.(p,c)??p.getSchema(e),errorMetadata:d}}catch{r.message=r.message??r.Message??"UnknownError";const f=y.for("smithy.ts.sdk.synthetic."+a),E=f.getBaseException();if(E){const v=f.getErrorCtor(E)??Error;throw this.decorateServiceException(Object.assign(new v({name:c}),d),r)}throw this.decorateServiceException(Object.assign(new Error(c),d),r)}}decorateServiceException(e,n={}){if(this.queryCompat){const s=e.Message??n.Message,r=J(e,n);return s&&(r.Message=s,r.message=s),r}return J(e,n)}setQueryCompatError(e,n){const s=n.headers?.["x-amzn-query-error"];if(e!==void 0&&s!=null){const[r,o]=s.split(";"),i=Object.entries(e),a={Code:r,Type:o};Object.assign(e,a);for(const[c,d]of i)a[c]=d;delete a.__type,e.Error=a}}queryCompatOutput(e,n){e.Error&&(n.Error=e.Error),e.Type&&(n.Type=e.Type),e.Code&&(n.Code=e.Code)}}class H{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*Zt(t,e){if(t.isUnitSchema())return;const n=t.getSchema();for(let s=0;s<n[4].length;++s){const r=n[4][s],o=new b([n[5][s],0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*en(t,e,n){if(t.isUnitSchema())return;const s=t.getSchema();let r=Object.keys(e).length;for(let o=0;o<s[4].length&&r!==0;++o){const i=s[4][o],a=new b([s[5][o],0],i);let c=i;n&&(c=a.getMergedTraits()[n]??i),c in e&&(yield[i,a],r-=1)}}function tn(t,e,n){if(n?.source){const s=n.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||s!==String(e)))return s.includes(".")?new R(s,"bigDecimal"):BigInt(s)}return e}const nn=(t,e)=>Be(t,e).then(n=>(e?.utf8Encoder??he)(n)),sn=(t,e)=>nn(t,e).then(n=>{if(n.length)try{return JSON.parse(n)}catch(s){throw s?.name==="SyntaxError"&&Object.defineProperty(s,"$responseBodyText",{value:n}),s}return{}}),rn=(t,e)=>{const n=(o,i)=>Object.keys(o).find(a=>a.toLowerCase()===i.toLowerCase()),s=o=>{let i=o;return typeof i=="number"&&(i=i.toString()),i.indexOf(",")>=0&&(i=i.split(",")[0]),i.indexOf(":")>=0&&(i=i.split(":")[0]),i.indexOf("#")>=0&&(i=i.split("#")[1]),i},r=n(t.headers,"x-amzn-errortype");if(r!==void 0)return s(t.headers[r]);if(e&&typeof e=="object"){const o=n(e,"code");if(o&&e[o]!==void 0)return s(e[o]);if(e.__type!==void 0)return s(e.__type)}};class on extends H{settings;constructor(e){super(),this.settings=e}async read(e,n){return this._read(e,typeof n=="string"?JSON.parse(n,tn):await sn(n,this.serdeContext))}readObject(e,n){return this._read(e,n)}_read(e,n){const s=n!==null&&typeof n=="object",r=b.of(e);if(r.isListSchema()&&Array.isArray(n)){const i=r.getValueSchema(),a=[],c=!!r.getMergedTraits().sparse;for(const d of n)(c||d!=null)&&a.push(this._read(i,d));return a}else if(r.isMapSchema()&&s){const i=r.getValueSchema(),a={},c=!!r.getMergedTraits().sparse;for(const[d,p]of Object.entries(n))(c||p!=null)&&(a[d]=this._read(i,p));return a}else if(r.isStructSchema()&&s){const i={};for(const[a,c]of en(r,n,this.settings.jsonName?"jsonName":!1)){const d=this.settings.jsonName?c.getMergedTraits().jsonName??a:a,p=this._read(c,n[d]);p!=null&&(i[a]=p)}return i}if(r.isBlobSchema()&&typeof n=="string")return ye(n);const o=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof n=="string"&&o&&(o==="application/json"||o.endsWith("+json")))return ue.from(n);if(r.isTimestampSchema()&&n!=null)switch(pe(r,this.settings)){case 5:return $t(n);case 6:return Ut(n);case 7:return Mt(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isBigIntegerSchema()&&(typeof n=="number"||typeof n=="string"))return BigInt(n);if(r.isBigDecimalSchema()&&n!=null){if(n instanceof R)return n;const i=n;return i.type==="bigDecimal"&&"string"in i?new R(i.string,i.type):new R(String(n),"bigDecimal")}if(r.isNumericSchema()&&typeof n=="string")switch(n){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}if(r.isDocumentSchema())if(s){const i=Array.isArray(n)?[]:{};for(const[a,c]of Object.entries(n))c instanceof R?i[a]=c:i[a]=this._read(r,c);return i}else return structuredClone(n);return n}}const W="Ν";class an{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,n)=>{if(n instanceof R){const s=`${W+"nv"+this.counter++}_`+n.string;return this.values.set(`"${s}"`,n.string),s}if(typeof n=="bigint"){const s=n.toString(),r=`${W+"b"+this.counter++}_`+s;return this.values.set(`"${r}"`,s),r}return n}}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[n,s]of this.values)e=e.replace(n,s);return e}}class cn extends H{settings;buffer;rootSchema;constructor(e){super(),this.settings=e}write(e,n){this.rootSchema=b.of(e),this.buffer=this._write(this.rootSchema,n)}writeDiscriminatedDocument(e,n){this.write(e,n),typeof this.buffer=="object"&&(this.buffer.__type=b.of(e).getName(!0))}flush(){const{rootSchema:e}=this;if(this.rootSchema=void 0,e?.isStructSchema()||e?.isDocumentSchema()){const n=new an;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,n,s){const r=n!==null&&typeof n=="object",o=b.of(e);if(o.isListSchema()&&Array.isArray(n)){const i=o.getValueSchema(),a=[],c=!!o.getMergedTraits().sparse;for(const d of n)(c||d!=null)&&a.push(this._write(i,d));return a}else if(o.isMapSchema()&&r){const i=o.getValueSchema(),a={},c=!!o.getMergedTraits().sparse;for(const[d,p]of Object.entries(n))(c||p!=null)&&(a[d]=this._write(i,p));return a}else if(o.isStructSchema()&&r){const i={};for(const[a,c]of Zt(o,n)){const d=this._write(c,n[a],o);if(d!==void 0){const p=this.settings.jsonName?c.getMergedTraits().jsonName??a:a;i[p]=d}}return i}if(!(n===null&&s?.isStructSchema())){if(o.isBlobSchema()&&(n instanceof Uint8Array||typeof n=="string")||o.isDocumentSchema()&&n instanceof Uint8Array)return o===this.rootSchema?n:(this.serdeContext?.base64Encoder??Ee)(n);if((o.isTimestampSchema()||o.isDocumentSchema())&&n instanceof Date)switch(pe(o,this.settings)){case 5:return n.toISOString().replace(".000Z","Z");case 6:return Ft(n);case 7:return n.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",n),n.getTime()/1e3}if(o.isNumericSchema()&&typeof n=="number"&&(Math.abs(n)===1/0||isNaN(n)))return String(n);if(o.isStringSchema()){if(typeof n>"u"&&o.isIdempotencyToken())return Ve();const i=o.getMergedTraits().mediaType;if(n!=null&&i&&(i==="application/json"||i.endsWith("+json")))return ue.from(n)}if(o.isDocumentSchema())if(r){const i=Array.isArray(n)?[]:{};for(const[a,c]of Object.entries(n))c instanceof R?i[a]=c:i[a]=this._write(o,c);return i}else return structuredClone(n);return n}}}class dn extends H{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new cn(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new on(this.settings);return e.setSerdeContext(this.serdeContext),e}}class un extends Je{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s}){super({defaultNamespace:e}),this.serviceTarget=n,this.codec=new dn({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!s,this.mixin=new Yt(this.awsQueryCompatible)}async serializeRequest(e,n,s){const r=await super.serializeRequest(e,n,s);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(Ke(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,n,s,r,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,s);const i=rn(s,r)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,r,o),d=b.of(a),p=r.message??r.Message??"Unknown",l=y.for(a[1]).getErrorCtor(a)??Error,f=new l(p),E={};for(const[v,B]of d.structIterator()){const He=B.getMergedTraits().jsonName??v;E[v]=this.codec.createDeserializer().readObject(B,r[He])}throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,E),this.mixin.decorateServiceException(Object.assign(f,c,{$fault:d.getMergedTraits().error,message:p},E),r)}}class pn extends un{constructor({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s}){super({defaultNamespace:e,serviceTarget:n,awsQueryCompatible:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const ln=/\d{12}\.ddb/;async function gn(t,e,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&x(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const o=await e.retryStrategy();typeof o.acquireInitialRetryToken=="function"?o.constructor?.name?.includes("Adaptive")?x(t,"RETRY_MODE_ADAPTIVE","F"):x(t,"RETRY_MODE_STANDARD","E"):x(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const o=t.endpointV2;switch(String(o?.url?.hostname).match(ln)&&x(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":x(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const o=r;o.accountId&&x(t,"RESOLVED_ACCOUNT_ID","T");for(const[i,a]of Object.entries(o.$source??{}))x(t,i,a)}}const X="user-agent",z="x-amz-user-agent",Y=" ",j="/",fn=/[^!$%&'*+\-.^_`|~\w]/g,mn=/[^!$%&'*+\-.^_`|~\w#]/g,Z="-",hn=1024;function yn(t){let e="";for(const n in t){const s=t[n];if(e.length+s.length+1<=hn){e.length?e+=","+s:e+=s;continue}break}return e}const En=t=>(e,n)=>async s=>{const{request:r}=s;if(!me.isInstance(r))return e(s);const{headers:o}=r,i=n?.userAgent?.map($)||[],a=(await t.defaultUserAgentProvider()).map($);await gn(n,t,s);const c=n;a.push(`m/${yn(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const d=t?.customUserAgent?.map($)||[],p=await t.userAgentAppId();p&&a.push($(["app",`${p}`]));const l=[].concat([...a,...i,...d]).join(Y),f=[...a.filter(E=>E.startsWith("aws-sdk-")),...d].join(Y);return t.runtime!=="browser"?(f&&(o[z]=o[z]?`${o[X]} ${f}`:f),o[X]=l):o[z]=l,e({...s,request:r})},$=t=>{const e=t[0].split(j).map(i=>i.replace(fn,Z)).join(j),n=t[1]?.replace(mn,Z),s=e.indexOf(j),r=e.substring(0,s);let o=e.substring(s+1);return r==="api"&&(o=o.toLowerCase()),[r,o,n].filter(i=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},Sn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Cn=t=>({applyToStack:e=>{e.add(En(t),Sn)}}),In=async(t,e,n)=>({operation:Qe(e).operation,region:await le(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function xn(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,n)=>({signingProperties:{config:e,context:n}})}}function F(t){return{schemeId:"smithy.api#noAuth"}}const _n=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(F());break}case"GetId":{e.push(F());break}case"GetOpenIdToken":{e.push(F());break}case"UnlinkIdentity":{e.push(F());break}default:e.push(xn(t))}return e},wn=t=>{const e=Qt(t);return Object.assign(e,{authSchemePreference:le(t.authSchemePreference??[])})},An=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ce={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Pn="3.940.0",Rn={version:Pn},Ie="required",m="fn",h="argv",T="ref",ee=!0,te="isSet",U="booleanEquals",k="error",_="endpoint",P="tree",L="PartitionResult",G="getAttr",D="stringEquals",ne={[Ie]:!1,type:"string"},se={[Ie]:!0,default:!1,type:"boolean"},re={[T]:"Endpoint"},xe={[m]:U,[h]:[{[T]:"UseFIPS"},!0]},_e={[m]:U,[h]:[{[T]:"UseDualStack"},!0]},g={},O={[T]:"Region"},ie={[m]:G,[h]:[{[T]:L},"supportsFIPS"]},we={[T]:L},oe={[m]:U,[h]:[!0,{[m]:G,[h]:[we,"supportsDualStack"]}]},ae=[xe],ce=[_e],de=[O],bn={parameters:{Region:ne,UseDualStack:se,UseFIPS:se,Endpoint:ne},rules:[{conditions:[{[m]:te,[h]:[re]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:k},{conditions:ce,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:k},{endpoint:{url:re,properties:g,headers:g},type:_}],type:P},{conditions:[{[m]:te,[h]:de}],rules:[{conditions:[{[m]:"aws.partition",[h]:de,assign:L}],rules:[{conditions:[xe,_e],rules:[{conditions:[{[m]:U,[h]:[ee,ie]},oe],rules:[{conditions:[{[m]:D,[h]:[O,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:g,headers:g},type:_},{conditions:[{[m]:D,[h]:[O,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:g,headers:g},type:_},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:k}],type:P},{conditions:ae,rules:[{conditions:[{[m]:U,[h]:[ie,ee]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:k}],type:P},{conditions:ce,rules:[{conditions:[oe],rules:[{conditions:[{[m]:D,[h]:["aws",{[m]:G,[h]:[we,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:g,headers:g},type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:_}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:k}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:_}],type:P}],type:P},{error:"Invalid Configuration: Missing Region",type:k}]},vn=bn,kn=new We({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Tn=(t,e={})=>kn.get(t,()=>Xe(vn,{endpointParams:t,logger:e.logger}));Ze.aws=Ye;const Dn=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??ye,base64Encoder:t?.base64Encoder??Ee,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Tn,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??_n,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Kt},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new nt}],logger:t?.logger??new tt,protocol:t?.protocol??new pn({defaultNamespace:"com.amazonaws.cognitoidentity",serviceTarget:"AWSCognitoIdentityService",awsQueryCompatible:!1}),serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??et,utf8Decoder:t?.utf8Decoder??zt,utf8Encoder:t?.utf8Encoder??he}),On=t=>{const e=st(t),n=()=>e().then(lt),s=Dn(t);return{...s,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??dt,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??ct({serviceId:s.serviceId,clientVersion:Rn.version}),maxAttempts:t?.maxAttempts??at,region:t?.region??ot("Region is missing"),requestHandler:Ht.create(t?.requestHandler??n),retryMode:t?.retryMode??(async()=>(await n()).retryMode||it),sha256:t?.sha256??rt,streamCollector:t?.streamCollector??jt,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(pt)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(ut))}},Nn=t=>{const e=t.httpAuthSchemes;let n=t.httpAuthSchemeProvider,s=t.credentials;return{setHttpAuthScheme(r){const o=e.findIndex(i=>i.schemeId===r.schemeId);o===-1?e.push(r):e.splice(o,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){s=r},credentials(){return s}}},Mn=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Un=(t,e)=>{const n=Object.assign(gt(t),ft(t),mt(t),Nn(t));return e.forEach(s=>s.configure(n)),Object.assign(t,ht(n),yt(n),Et(n),Mn(n))};class dr extends St{config;constructor(...[e]){const n=On(e||{});super(n),this.initConfig=n;const s=An(n),r=qt(s),o=Ct(r),i=It(o),a=Tt(i),c=xt(a),d=wn(c),p=Un(d,e?.extensions||[]);this.config=p,this.middlewareStack.use(_t(this.config)),this.middlewareStack.use(Cn(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(At(this.config)),this.middlewareStack.use(Pt(this.config)),this.middlewareStack.use(Rt(this.config)),this.middlewareStack.use(bt(this.config)),this.middlewareStack.use(vt(this.config,{httpAuthSchemeParametersProvider:In,identityProviderConfigProvider:async l=>new Dt({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(kt(this.config))}destroy(){super.destroy()}}let S=class Ae extends Ot{constructor(e){super(e),Object.setPrototypeOf(this,Ae.prototype)}},$n=class Pe extends S{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Pe.prototype)}},Fn=class Re extends S{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,Re.prototype)}},zn=class be extends S{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,be.prototype)}},jn=class ve extends S{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,ve.prototype)}},Hn=class ke extends S{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ke.prototype)}},Ln=class Te extends S{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Te.prototype)}},Gn=class De extends S{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,De.prototype)}},qn=class Oe extends S{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Oe.prototype)}},Bn=class Ne extends S{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ne.prototype)}},Vn=class Me extends S{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Me.prototype)}},Jn=class Ue extends S{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ue.prototype)}};const Kn="AccountId",Qn="AccessKeyId",$e="Credentials",Wn="ConcurrentModificationException",Xn="CustomRoleArn",Yn="DeveloperUserAlreadyRegisteredException",Zn="Expiration",es="ExternalServiceException",ts="GetCredentialsForIdentity",ns="GetCredentialsForIdentityInput",ss="GetCredentialsForIdentityResponse",rs="GetId",is="GetIdInput",os="GetIdResponse",as="InternalErrorException",q="IdentityId",cs="InvalidIdentityPoolConfigurationException",ds="InvalidParameterException",us="IdentityPoolId",ps="IdentityProviderToken",Fe="Logins",ls="LimitExceededException",gs="LoginsMap",fs="NotAuthorizedException",ms="ResourceConflictException",hs="ResourceNotFoundException",ys="SecretKey",Es="SecretKeyString",Ss="SessionToken",Cs="TooManyRequestsException",w="client",C="error",A="httpError",I="message",Is="server",ze="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",u="com.amazonaws.cognitoidentity";var xs=[0,u,ps,8,0],_s=[0,u,Es,8,0],ws=[-3,u,Wn,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(ws,Jn);var As=[3,u,$e,0,[Qn,ys,Ss,Zn],[0,[()=>_s,0],0,4]],Ps=[-3,u,Yn,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ps,Vn);var Rs=[-3,u,es,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Rs,qn);var bs=[3,u,ns,0,[q,Fe,Xn],[0,[()=>je,0],0]],vs=[3,u,ss,0,[q,$e],[0,[()=>As,0]]],ks=[3,u,is,0,[Kn,us,Fe],[0,0,[()=>je,0]]],Ts=[3,u,os,0,[q],[0]],Ds=[-3,u,as,{[C]:Is},[I],[0]];y.for(u).registerError(Ds,$n);var Os=[-3,u,cs,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Os,Bn);var Ns=[-3,u,ds,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ns,Fn);var Ms=[-3,u,ls,{[C]:w,[A]:400},[I],[0]];y.for(u).registerError(Ms,zn);var Us=[-3,u,fs,{[C]:w,[A]:403},[I],[0]];y.for(u).registerError(Us,jn);var $s=[-3,u,ms,{[C]:w,[A]:409},[I],[0]];y.for(u).registerError($s,Hn);var Fs=[-3,u,hs,{[C]:w,[A]:404},[I],[0]];y.for(u).registerError(Fs,Gn);var zs=[-3,u,Cs,{[C]:w,[A]:429},[I],[0]];y.for(u).registerError(zs,Ln);var js=[-3,ze,"CognitoIdentityServiceException",0,[],[]];y.for(ze).registerError(js,S);var je=[2,u,gs,0,[0,0],[()=>xs,0]],Hs=[9,u,ts,0,()=>bs,()=>vs],Ls=[9,u,rs,0,()=>ks,()=>Ts];class ur extends ge.classBuilder().ep(Ce).m(function(e,n,s,r){return[fe(s,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Hs).build(){}class pr extends ge.classBuilder().ep(Ce).m(function(e,n,s,r){return[fe(s,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Ls).build(){}export{dr as CognitoIdentityClient,ur as GetCredentialsForIdentityCommand,pr as GetIdCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as ut,N as D,f as Ce,L as lt,c as _e,S as oe,m as mt,d as pt,i as gt,T as A,b as ie,v as ht,R as ft,h as yt,e as ae,n as Re,j as Et,E as St,r as wt,k as bt,l as Tt,p as Pt,o as At,q as Ct,s as _t,t as Rt,D as xt,u as It,w as Dt,x as kt,y as vt,z as Nt,A as Mt,B as $t,F as Ot,G as Ut,H as Ft,I as zt,J as Lt,K as jt,a as Ht,M as Vt,O as Wt,P as Kt,Q as Bt,U as qt,V as Qt,W as Gt,X as Xt,Y as Jt,Z as Yt,_ as Zt,$ as es,a0 as ts,a1 as ss,C as rs,g as ns}from"./index-BVDalg8J.js";import{d as X,t as J,n as L,c as os,H as xe,a as Ie,i as is,f as as,s as cs,F as ds}from"./normalizeProvider-BrOPyH3l.js";function ce(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Y="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Z="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",ee="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",De="(\\d?\\d)",ke="(\\d{4})",us=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),ls=new RegExp(`^${Y}, ${De} ${Z} ${ke} ${ee} GMT$`),ms=new RegExp(`^${Y}, ${De}-${Z}-(\\d\\d) ${ee} GMT$`),ps=new RegExp(`^${Y} ${Z} ( [1-9]|\\d\\d) ${ee} ${ke}$`),gs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hs=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},fs=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=us.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,o,i,a,,d,c]=t;R(r,1,12),R(n,1,31),R(o,0,23),R(i,0,59),R(a,0,60);const u=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(o),Number(i),Number(a),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(u.setUTCFullYear(Number(s)),c.toUpperCase()!="Z"){const[,l,f,E]=/([+-])(\d\d):(\d\d)/.exec(c)||[void 0,"+",0,0],P=l==="-"?1:-1;u.setTime(u.getTime()+P*(Number(f)*60*60*1e3+Number(E)*60*1e3))}return u},ys=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,o,i,a,d;if((d=ls.exec(e))?[,t,s,r,n,o,i,a]=d:(d=ms.exec(e))?([,t,s,r,n,o,i,a]=d,r=(Number(r)+1900).toString()):(d=ps.exec(e))&&([,s,t,n,o,i,a,r]=d),r&&i){const c=Date.UTC(Number(r),gs.indexOf(s),Number(t),Number(n),Number(o),Number(i),a?Math.round(parseFloat(`0.${a}`)*1e3):0);R(t,1,31),R(n,0,23),R(o,0,59),R(i,0,60);const u=new Date(c);return u.setUTCFullYear(Number(r)),u}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function R(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}const Es=e=>{const t=e.length,s=[];let r=!1,n,o=0;for(let i=0;i<t;++i){const a=e[i];switch(a){case'"':n!=="\\"&&(r=!r);break;case",":r||(s.push(e.slice(o,i)),o=i+1);break}n=a}return s.push(e.slice(o)),s.map(i=>{i=i.trim();const a=i.length;return a<2?i:(i[0]==='"'&&i[a-1]==='"'&&(i=i.slice(1,a-1)),i.replace(/\\"/g,'"'))})};class Ss extends ut{settings;constructor(t){super(),this.settings=t}read(t,s){const r=D.of(t);if(r.isListSchema())return Es(s).map(n=>this.read(r.getValueSchema(),n));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??X)(s);if(r.isTimestampSchema())switch(Ce(r,this.settings)){case 5:return fs(s);case 6:return ys(s);case 7:return hs(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isStringSchema()){const n=r.getMergedTraits().mediaType;let o=s;if(n)return r.getMergedTraits().httpHeader&&(o=this.base64ToUtf8(o)),(n==="application/json"||n.endsWith("+json"))&&(o=lt.from(o)),o}return r.isNumericSchema()?Number(s):r.isBigIntegerSchema()?BigInt(s):r.isBigDecimalSchema()?new _e(s,"bigDecimal"):r.isBooleanSchema()?String(s).toLowerCase()==="true":s}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??J)((this.serdeContext?.base64Decoder??X)(t))}}const ve=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&e[s][t]!==void 0?e[s]=e[s][t]:typeof e[s]=="object"&&e[s]!==null&&(e[s]=ve(e[s]));return e};let K;function ws(e){K||(K=new DOMParser);const t=K.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const n=r;if(n.attributes.length===0&&n.childNodes.length===0)return"";const o={},i=Array.from(n.attributes);for(const d of i)o[`${d.name}`]=d.value;const a=Array.from(n.childNodes);for(const d of a){const c=s(d);if(c!=null){const u=d.nodeName;if(a.length===1&&i.length===0&&u==="#text")return c;o[u]?Array.isArray(o[u])?o[u].push(c):o[u]=[o[u],c]:o[u]=c}else if(a.length===1&&i.length===0)return n.textContent}return o}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}const bs=void 0;function Ts(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Ps(e){const t=L(e.userAgentAppId??bs),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await t();if(!Ts(r)){const n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.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}})}function As(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function C(e,t,s){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=s}const de=e=>os.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ne=e=>new Date(Date.now()+e),Cs=(e,t)=>Math.abs(Ne(t).getTime()-e)>=3e5,ue=(e,t)=>{const s=Date.parse(e);return Cs(s,t)?s-Date.now():t},j=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},_s=async e=>{const t=j("context",e.context),s=j("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],o=await j("signer",s.signer)(r),i=e?.signingRegion,a=e?.signingRegionSet,d=e?.signingName;return{config:s,signer:o,signingRegion:i,signingRegionSet:a,signingName:d}};class Rs{async sign(t,s,r){if(!xe.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await _s(r),{config:o,signer:i}=n;let{signingRegion:a,signingName:d}=n;const c=r.context;if(c?.authSchemes?.length??!1){const[l,f]=c.authSchemes;l?.name==="sigv4a"&&f?.name==="sigv4"&&(a=f?.signingRegion??a,d=f?.signingName??d)}return await i.sign(t,{signingDate:Ne(o.systemClockOffset),signingRegion:a,signingService:d})}errorHandler(t){return s=>{const r=s.ServerTime??de(s.$response);if(r){const n=j("config",t.config),o=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==o&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(t,s){const r=de(t);if(r){const n=j("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const xs=e=>{let t=e.credentials,s=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==r&&(s=!0),t=c;const u=Is(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=Ds(e,u);s&&!l.attributed?(r=async f=>l(f).then(E=>As(E,"CREDENTIALS_CODE","e")),r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0):r=l},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:n=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;let a;return e.signer?a=L(e.signer):e.regionInfoProvider?a=()=>L(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,u])=>{const{signingRegion:l,signingService:f}=c;e.signingRegion=e.signingRegion||l||u,e.signingName=e.signingName||f||e.serviceId;const E={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},P=e.signerConstructor||oe;return new P(E)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await L(e.region)(),properties:{}},c);const u=c.signingRegion,l=c.signingName;e.signingRegion=e.signingRegion||u,e.signingName=e.signingName||l||e.serviceId;const f={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n},E=e.signerConstructor||oe;return new E(f)},Object.assign(e,{systemClockOffset:o,signingEscapePath:n,signer:a})};function Is(e,{credentials:t,credentialDefaultProvider:s}){let r;return t?t?.memoized?r=t:r=mt(t,gt,pt):s?r=L(s(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function Ds(e,t){if(t.configBound)return t;const s=async r=>t({...r,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}class ks{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,s){const r=s.getMemberSchemas(),n=Object.values(r).find(o=>!!o.getMergedTraits().httpPayload);if(n){const o=n.getMergedTraits().mediaType;return o||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":t)}else if(!s.isUnitSchema()&&Object.values(r).find(i=>{const{httpQuery:a,httpQueryParams:d,httpHeader:c,httpLabel:u,httpPrefixHeaders:l}=i.getMergedTraits();return!a&&!d&&!c&&!u&&l===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,s,r,n,o,i){let a=s,d=t;t.includes("#")&&([a,d]=t.split("#"));const c={$metadata:o,$fault:r.statusCode<500?"client":"server"},u=A.for(a);try{return{errorSchema:i?.(u,d)??u.getSchema(t),errorMetadata:c}}catch{n.message=n.message??n.Message??"UnknownError";const f=A.for("smithy.ts.sdk.synthetic."+a),E=f.getBaseException();if(E){const P=f.getErrorCtor(E)??Error;throw this.decorateServiceException(Object.assign(new P({name:d}),c),n)}throw this.decorateServiceException(Object.assign(new Error(d),c),n)}}decorateServiceException(t,s={}){if(this.queryCompat){const r=t.Message??s.Message,n=ie(t,s);return r&&(n.Message=r,n.message=r),n}return ie(t,s)}setQueryCompatError(t,s){const r=s.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[n,o]=r.split(";"),i=Object.entries(t),a={Code:n,Type:o};Object.assign(t,a);for(const[d,c]of i)a[d]=c;delete a.__type,t.Error=a}}queryCompatOutput(t,s){t.Error&&(s.Error=t.Error),t.Type&&(s.Type=t.Type),t.Code&&(s.Code=t.Code)}}class Me{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*vs(e,t){if(e.isUnitSchema())return;const s=e.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],o=new D([s[5][r],0],n);!(n in t)&&!o.isIdempotencyToken()||(yield[n,o])}}class Ns extends Me{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new Ss(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,s,r){const n=D.of(t),o=n.getMemberSchemas();if(n.isStructSchema()&&n.isMemberSchema()&&!!Object.values(o).find(c=>!!c.getMemberTraits().eventPayload)){const c={},u=Object.keys(o)[0];return o[u].isBlobSchema()?c[u]=s:c[u]=this.read(o[u],s),c}const a=(this.serdeContext?.utf8Encoder??J)(s),d=this.parseXml(a);return this.readSchema(t,r?d[r]:d)}readSchema(t,s){const r=D.of(t);if(r.isUnitSchema())return;const n=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(s))return this.readSchema(r,[s]);if(s==null)return s;if(typeof s=="object"){const o=!!n.sparse,i=!!n.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),c=[],u=d.getMergedTraits().xmlName??"member",l=i?s:(s[0]??s)[u],f=Array.isArray(l)?l:[l];for(const E of f)(E!=null||o)&&c.push(this.readSchema(d,E));return c}const a={};if(r.isMapSchema()){const d=r.getKeySchema(),c=r.getValueSchema();let u;i?u=Array.isArray(s)?s:[s]:u=Array.isArray(s.entry)?s.entry:[s.entry];const l=d.getMergedTraits().xmlName??"key",f=c.getMergedTraits().xmlName??"value";for(const E of u){const P=E[l],x=E[f];(x!=null||o)&&(a[P]=this.readSchema(c,x))}return a}if(r.isStructSchema()){for(const[d,c]of r.structIterator()){const u=c.getMergedTraits(),l=u.httpPayload?u.xmlName??c.getName():c.getMemberTraits().xmlName??d;s[l]!=null&&(a[d]=this.readSchema(c,s[l]))}return a}if(r.isDocumentSchema())return s;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,s)}parseXml(t){if(t.length){let s;try{s=ws(t)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:t}),i}const r="#text",n=Object.keys(s)[0],o=s[n];return o[r]&&(o[n]=o[r],delete o[r]),ve(o)}return{}}}class Ms extends Me{settings;buffer;constructor(t){super(),this.settings=t}write(t,s,r=""){this.buffer===void 0&&(this.buffer="");const n=D.of(t);if(r&&!r.endsWith(".")&&(r+="."),n.isBlobSchema())(typeof s=="string"||s instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Ie)(s)));else if(n.isBooleanSchema()||n.isNumericSchema()||n.isStringSchema())s!=null?(this.writeKey(r),this.writeValue(String(s))):n.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(ht()));else if(n.isBigIntegerSchema())s!=null&&(this.writeKey(r),this.writeValue(String(s)));else if(n.isBigDecimalSchema())s!=null&&(this.writeKey(r),this.writeValue(s instanceof _e?s.string:String(s)));else if(n.isTimestampSchema()){if(s instanceof Date)switch(this.writeKey(r),Ce(n,this.settings)){case 5:this.writeValue(s.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(is(s));break;case 7:this.writeValue(String(s.getTime()/1e3));break}}else{if(n.isDocumentSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${n.getName(!0)}`);if(n.isListSchema()){if(Array.isArray(s))if(s.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const o=n.getValueSchema(),i=this.settings.flattenLists||n.getMergedTraits().xmlFlattened;let a=1;for(const d of s){if(d==null)continue;const c=this.getKey("member",o.getMergedTraits().xmlName),u=i?`${r}${a}`:`${r}${c}.${a}`;this.write(o,d,u),++a}}}else if(n.isMapSchema()){if(s&&typeof s=="object"){const o=n.getKeySchema(),i=n.getValueSchema(),a=n.getMergedTraits().xmlFlattened;let d=1;for(const[c,u]of Object.entries(s)){if(u==null)continue;const l=this.getKey("key",o.getMergedTraits().xmlName),f=a?`${r}${d}.${l}`:`${r}entry.${d}.${l}`,E=this.getKey("value",i.getMergedTraits().xmlName),P=a?`${r}${d}.${E}`:`${r}entry.${d}.${E}`;this.write(o,c,f),this.write(i,u,P),++d}}}else if(n.isStructSchema()){if(s&&typeof s=="object")for(const[o,i]of vs(n,s)){if(s[o]==null&&!i.isIdempotencyToken())continue;const a=this.getKey(o,i.getMergedTraits().xmlName),d=`${r}${a}`;this.write(i,s[o],d)}}else if(!n.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${n.getName(!0)}`)}}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,s){const r=s??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ce(t)}=`}writeValue(t){this.buffer+=ce(t)}}class $s extends ft{options;serializer;deserializer;mixin=new ks;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const s={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Ms(s),this.deserializer=new Ns(s)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,s,r){const n=await super.serializeRequest(t,s,r);n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":"application/x-www-form-urlencoded"}),(yt(t.input)==="unit"||!n.body)&&(n.body="");const o=t.name.split("#")[1]??t.name;return n.body=`Action=${o}&Version=${this.options.version}`+n.body,n.body.endsWith("&")&&(n.body=n.body.slice(-1)),n}async deserializeResponse(t,s,r){const n=this.deserializer,o=D.of(t.output),i={};if(r.statusCode>=300){const l=await ae(r.body,s);l.byteLength>0&&Object.assign(i,await n.read(15,l)),await this.handleError(t,s,r,i,this.deserializeMetadata(r))}for(const l in r.headers){const f=r.headers[l];delete r.headers[l],r.headers[l.toLowerCase()]=f}const a=t.name.split("#")[1]??t.name,d=o.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,c=await ae(r.body,s);return c.byteLength>0&&Object.assign(i,await n.read(o,c,d)),{$metadata:this.deserializeMetadata(r),...i}}useNestedResult(){return!0}async handleError(t,s,r,n,o){const i=this.loadQueryErrorCode(r,n)??"Unknown",a=this.loadQueryError(n),d=this.loadQueryErrorMessage(n);a.message=d,a.Error={Type:a.Type,Code:a.Code,Message:d};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,r,a,o,(x,z)=>{try{return x.getSchema(z)}catch{return x.find(W=>D.of(W).getMergedTraits().awsQueryError?.[0]===z)}}),l=D.of(c),f=A.for(c[1]).getErrorCtor(c)??Error,E=new f(d),P={Error:a.Error};for(const[x,z]of l.structIterator()){const V=z.getMergedTraits().xmlName??x,W=a[V]??n[V];P[x]=this.deserializer.readSchema(z,W)}throw this.mixin.decorateServiceException(Object.assign(E,u,{$fault:l.getMergedTraits().error,message:d},P),n)}loadQueryErrorCode(t,s){const r=(s.Errors?.[0]?.Error??s.Errors?.Error??s.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const s=this.loadQueryError(t);return s?.message??s?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Os=/\d{12}\.ddb/;async function Us(e,t,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&C(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();typeof o.acquireInitialRetryToken=="function"?o.constructor?.name?.includes("Adaptive")?C(e,"RETRY_MODE_ADAPTIVE","F"):C(e,"RETRY_MODE_STANDARD","E"):C(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Os)&&C(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":C(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":C(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":C(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const o=n;o.accountId&&C(e,"RESOLVED_ACCOUNT_ID","T");for(const[i,a]of Object.entries(o.$source??{}))C(e,i,a)}}const le="user-agent",B="x-amz-user-agent",me=" ",q="/",Fs=/[^!$%&'*+\-.^_`|~\w]/g,zs=/[^!$%&'*+\-.^_`|~\w#]/g,pe="-",Ls=1024;function js(e){let t="";for(const s in e){const r=e[s];if(t.length+r.length+1<=Ls){t.length?t+=","+r:t+=r;continue}break}return t}const Hs=e=>(t,s)=>async r=>{const{request:n}=r;if(!xe.isInstance(n))return t(r);const{headers:o}=n,i=s?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);await Us(s,e,r);const d=s;a.push(`m/${js(Object.assign({},s.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(H)||[],u=await e.userAgentAppId();u&&a.push(H(["app",`${u}`]));const l=[].concat([...a,...i,...c]).join(me),f=[...a.filter(E=>E.startsWith("aws-sdk-")),...c].join(me);return e.runtime!=="browser"?(f&&(o[B]=o[B]?`${o[le]} ${f}`:f),o[le]=l):o[B]=l,t({...r,request:n})},H=e=>{const t=e[0].split(q).map(i=>i.replace(Fs,pe)).join(q),s=e[1]?.replace(zs,pe),r=t.indexOf(q),n=t.substring(0,r);let o=t.substring(r+1);return n==="api"&&(o=o.toLowerCase()),[n,o,s].filter(i=>i&&i.length>0).reduce((i,a,d)=>{switch(d){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},Vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ws=e=>({applyToStack:t=>{t.add(Hs(e),Vs)}}),Ks=async(e,t,s)=>({operation:Et(t).operation,region:await Re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Bs(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function qs(e){return{schemeId:"smithy.api#noAuth"}}const Qs=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(qs());break}default:t.push(Bs(e))}return t},Gs=e=>Object.assign(e,{stsClientCtor:Ke}),Xs=e=>{const t=Gs(e),s=xs(t);return Object.assign(s,{authSchemePreference:Re(e.authSchemePreference??[])})},Js=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),Ys={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"}},Zs="3.940.0",er={version:Zs},$e="required",m="type",p="fn",g="argv",k="ref",ge=!1,Q=!0,I="booleanEquals",S="stringEquals",Oe="sigv4",Ue="sts",Fe="us-east-1",y="endpoint",he="https://sts.{Region}.{PartitionResult#dnsSuffix}",_="tree",F="error",te="getAttr",fe={[$e]:!1,[m]:"string"},G={[$e]:!0,default:!1,[m]:"boolean"},ze={[k]:"Endpoint"},ye={[p]:"isSet",[g]:[{[k]:"Region"}]},w={[k]:"Region"},Ee={[p]:"aws.partition",[g]:[w],assign:"PartitionResult"},Le={[k]:"UseFIPS"},je={[k]:"UseDualStack"},b={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:Fe}]},headers:{}},T={},Se={conditions:[{[p]:S,[g]:[w,"aws-global"]}],[y]:b,[m]:y},He={[p]:I,[g]:[Le,!0]},Ve={[p]:I,[g]:[je,!0]},we={[p]:te,[g]:[{[k]:"PartitionResult"},"supportsFIPS"]},We={[k]:"PartitionResult"},be={[p]:I,[g]:[!0,{[p]:te,[g]:[We,"supportsDualStack"]}]},Te=[{[p]:"isSet",[g]:[ze]}],Pe=[He],Ae=[Ve],tr={parameters:{Region:fe,UseDualStack:G,UseFIPS:G,Endpoint:fe,UseGlobalEndpoint:G},rules:[{conditions:[{[p]:I,[g]:[{[k]:"UseGlobalEndpoint"},Q]},{[p]:"not",[g]:Te},ye,Ee,{[p]:I,[g]:[Le,ge]},{[p]:I,[g]:[je,ge]}],rules:[{conditions:[{[p]:S,[g]:[w,"ap-northeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-south-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"ap-southeast-2"]}],endpoint:b,[m]:y},Se,{conditions:[{[p]:S,[g]:[w,"ca-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-central-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-north-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"eu-west-3"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"sa-east-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,Fe]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-east-2"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-1"]}],endpoint:b,[m]:y},{conditions:[{[p]:S,[g]:[w,"us-west-2"]}],endpoint:b,[m]:y},{endpoint:{url:he,properties:{authSchemes:[{name:Oe,signingName:Ue,signingRegion:"{Region}"}]},headers:T},[m]:y}],[m]:_},{conditions:Te,rules:[{conditions:Pe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[m]:F},{conditions:Ae,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[m]:F},{endpoint:{url:ze,properties:T,headers:T},[m]:y}],[m]:_},{conditions:[ye],rules:[{conditions:[Ee],rules:[{conditions:[He,Ve],rules:[{conditions:[{[p]:I,[g]:[Q,we]},be],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[m]:F}],[m]:_},{conditions:Pe,rules:[{conditions:[{[p]:I,[g]:[we,Q]}],rules:[{conditions:[{[p]:S,[g]:[{[p]:te,[g]:[We,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:T,headers:T},[m]:y},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"FIPS is enabled but this partition does not support FIPS",[m]:F}],[m]:_},{conditions:Ae,rules:[{conditions:[be],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:T,headers:T},[m]:y}],[m]:_},{error:"DualStack is enabled but this partition does not support DualStack",[m]:F}],[m]:_},Se,{endpoint:{url:he,properties:T,headers:T},[m]:y}],[m]:_}],[m]:_},{error:"Invalid Configuration: Missing Region",[m]:F}]},sr=tr,rr=new St({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),nr=(e,t={})=>rr.get(e,()=>wt(sr,{endpointParams:e,logger:t.logger}));Tt.aws=bt;const or=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??X,base64Encoder:e?.base64Encoder??Ie,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nr,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qs,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Rs},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ct}],logger:e?.logger??new At,protocol:e?.protocol??new $s({defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15"}),serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??Pt,utf8Decoder:e?.utf8Decoder??as,utf8Encoder:e?.utf8Encoder??J}),ir=e=>{const t=_t(e),s=()=>t().then($t),r=or(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??vt,credentialDefaultProvider:e?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??kt({serviceId:r.serviceId,clientVersion:er.version}),maxAttempts:e?.maxAttempts??Dt,region:e?.region??It("Region is missing"),requestHandler:ds.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||xt),sha256:e?.sha256??Rt,streamCollector:e?.streamCollector??cs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Mt)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Nt))}},ar=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(n){const o=t.findIndex(i=>i.schemeId===n.schemeId);o===-1?t.push(n):t.splice(o,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},cr=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),dr=(e,t)=>{const s=Object.assign(Ot(e),Ut(e),Ft(e),ar(e));return t.forEach(r=>r.configure(s)),Object.assign(e,zt(s),Lt(s),jt(s),cr(s))};class Ke extends Ht{config;constructor(...[t]){const s=ir(t||{});super(s),this.initConfig=s;const r=Js(s),n=Ps(r),o=Vt(n),i=Wt(o),a=es(i),d=Kt(a),c=Xs(d),u=dr(c,t?.extensions||[]);this.config=u,this.middlewareStack.use(Bt(this.config)),this.middlewareStack.use(Ws(this.config)),this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(Qt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Xt(this.config)),this.middlewareStack.use(Jt(this.config)),this.middlewareStack.use(Yt(this.config,{httpAuthSchemeParametersProvider:Ks,identityProviderConfigProvider:async l=>new ts({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Zt(this.config))}destroy(){super.destroy()}}let v=class Be extends ss{constructor(t){super(t),Object.setPrototypeOf(this,Be.prototype)}},ur=class qe extends v{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,qe.prototype)}},lr=class Qe extends v{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,Qe.prototype)}},mr=class Ge extends v{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,Ge.prototype)}},pr=class Xe extends v{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Xe.prototype)}},gr=class Je extends v{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,Je.prototype)}},hr=class Ye extends v{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,Ye.prototype)}},fr=class Ze extends v{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,Ze.prototype)}};const yr="Arn",Er="AccessKeyId",Sr="AssumeRole",wr="AssumedRoleId",br="AssumeRoleRequest",Tr="AssumeRoleResponse",se="AssumedRoleUser",Pr="AssumeRoleWithWebIdentity",Ar="AssumeRoleWithWebIdentityRequest",Cr="AssumeRoleWithWebIdentityResponse",_r="Audience",re="Credentials",Rr="ContextAssertion",et="DurationSeconds",xr="Expiration",Ir="ExternalId",Dr="ExpiredTokenException",kr="IDPCommunicationErrorException",vr="IDPRejectedClaimException",Nr="InvalidIdentityTokenException",Mr="Key",$r="MalformedPolicyDocumentException",tt="Policy",st="PolicyArns",Or="ProviderArn",Ur="ProvidedContexts",Fr="ProvidedContextsListType",zr="ProvidedContext",Lr="PolicyDescriptorType",jr="ProviderId",rt="PackedPolicySize",Hr="PackedPolicyTooLargeException",Vr="Provider",nt="RoleArn",Wr="RegionDisabledException",ot="RoleSessionName",Kr="SecretAccessKey",Br="SubjectFromWebIdentityToken",ne="SourceIdentity",qr="SerialNumber",Qr="SessionToken",Gr="Tags",Xr="TokenCode",Jr="TransitiveTagKeys",Yr="Tag",Zr="Value",en="WebIdentityToken",tn="arn",sn="accessKeySecretType",N="awsQueryError",M="client",rn="clientTokenType",$="error",O="httpError",U="message",nn="policyDescriptorListType",it="smithy.ts.sdk.synthetic.com.amazonaws.sts",on="tagListType",h="com.amazonaws.sts";var an=[0,h,sn,8,0],cn=[0,h,rn,8,0],at=[3,h,se,0,[wr,yr],[0,0]],dn=[3,h,br,0,[nt,ot,st,tt,et,Gr,Jr,Ir,qr,Xr,ne,Ur],[0,0,()=>dt,0,1,()=>Cn,64,0,0,0,0,()=>An]],un=[3,h,Tr,0,[re,se,rt,ne],[[()=>ct,0],()=>at,1,0]],ln=[3,h,Ar,0,[nt,ot,en,jr,st,tt,et],[0,0,[()=>cn,0],0,()=>dt,0,1]],mn=[3,h,Cr,0,[re,Br,se,rt,Vr,_r,ne],[[()=>ct,0],0,()=>at,1,0,0,0]],ct=[3,h,re,0,[Er,Kr,Qr,xr],[0,[()=>an,0],0,4]],pn=[-3,h,Dr,{[$]:M,[O]:400,[N]:["ExpiredTokenException",400]},[U],[0]];A.for(h).registerError(pn,ur);var gn=[-3,h,kr,{[$]:M,[O]:400,[N]:["IDPCommunicationError",400]},[U],[0]];A.for(h).registerError(gn,fr);var hn=[-3,h,vr,{[$]:M,[O]:403,[N]:["IDPRejectedClaim",403]},[U],[0]];A.for(h).registerError(hn,gr);var fn=[-3,h,Nr,{[$]:M,[O]:400,[N]:["InvalidIdentityToken",400]},[U],[0]];A.for(h).registerError(fn,hr);var yn=[-3,h,$r,{[$]:M,[O]:400,[N]:["MalformedPolicyDocument",400]},[U],[0]];A.for(h).registerError(yn,lr);var En=[-3,h,Hr,{[$]:M,[O]:400,[N]:["PackedPolicyTooLarge",400]},[U],[0]];A.for(h).registerError(En,mr);var Sn=[3,h,Lr,0,[tn],[0]],wn=[3,h,zr,0,[Or,Rr],[0,0]],bn=[-3,h,Wr,{[$]:M,[O]:403,[N]:["RegionDisabledException",403]},[U],[0]];A.for(h).registerError(bn,pr);var Tn=[3,h,Yr,0,[Mr,Zr],[0,0]],Pn=[-3,it,"STSServiceException",0,[],[]];A.for(it).registerError(Pn,v);var dt=[1,h,nn,0,()=>Sn],An=[1,h,Fr,0,()=>wn],Cn=[1,h,on,0,()=>Tn],_n=[9,h,Sr,0,()=>dn,()=>un],Dn=[9,h,Pr,0,()=>ln,()=>mn];class Rn extends rs.classBuilder().ep(Ys).m(function(t,s,r,n){return[ns(r,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(_n).build(){}const kn=Object.freeze(Object.defineProperty({__proto__:null,AssumeRoleCommand:Rn,STSClient:Ke},Symbol.toStringTag,{value:"Module"}));export{Dn as A,ur as E,gr as I,lr as M,mr as P,pr as R,Ke as S,v as a,Rn as b,Ys as c,hr as d,fr as e,kn as l,As as s};
|