PageSourceSearch

https://audioboom.com/assets/packs/js/606-389bcbace04ef2622b55.chunk.js

js audioboom.com collected 2026-10-01 07:40:36 UTC 123,367 bytes, 10 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9ed9aa17-32f5-4a95-b7a5-cb0bfea89011",e._sentryDebugIdIdentifier="sentry-dbid-9ed9aa17-32f5-4a95-b7a5-cb0bfea89011")}catch(e){}}();"use strict";(self.webpackChunkaudioboom_web=self.webpackChunkaudioboom_web||[]).push([[606],{15438:function(e,t,r){let i,s;r.d(t,{T:function(){return ii}});let n=e=>{if("function"==typeof e)return e;let t=Promise.resolve(e);return()=>t},a;class o{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){var t;let r=new o({...e,headers:{...e.headers}});return r.query&&(r.query=Object.keys(t=r.query).reduce((e,r)=>{let i=t[r];return{...e,[r]:Array.isArray(i)?[...i]:i}},{})),r}static isInstance(e){return!!e&&"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&"object"==typeof e.query&&"object"==typeof e.headers}clone(){return o.clone(this)}}let l={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},c={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-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)"}}}],version:"1.1"};(A=R||(R={})).STANDARD="standard",A.ADAPTIVE="adaptive";let u=R.STANDARD;class h{static v2026="u">
1typeof process&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return h.v2026?50:100}static throttlingDelay(){return h.v2026?1e3:500}static cost(){return h.v2026?14:5}static throttlingCost(){return h.v2026?5:10}static modifiedCostType(){return h.v2026?"THROTTLING":"TRANSIENT"}}function d(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}h.v2026||="object"==typeof process&&process.env?.AWS_NEW_RETRIES_2026==="true";let f=/\d{12}\.ddb/;async function p(e,t,r){let i=r.request;if(i?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&d(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){let r=await t.retryStrategy();if("string"==typeof r.mode)switch(r.mode){case R.ADAPTIVE:d(e,"RETRY_MODE_ADAPTIVE","F");break;case R.STANDARD:d(e,"RETRY_MODE_STANDARD","E")}}if("function"==typeof t.accountIdEndpointMode){let r=e.endpointV2;switch(String(r?.url?.hostname).match(f)&&d(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":d(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":d(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":d(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}let s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source)for(let[t,r]of(s.accountId&&d(e,"RESOLVED_ACCOUNT_ID","T"),Object.entries(s.$source??{})))d(e,t,r)}let g="user-agent",m="x-amz-user-agent",y=/[^!$%&'*+\-.^_`|~\w]/g,w=/[^!$%&'*+\-.^_`|~\w#]/g,S=e=>{let t=e[0].split("/").map(e=>e.replace(y,"-")).join("/"),r=e[1]?.replace(w,"-"),i=t.indexOf("/"),s=t.substring(0,i),n=t.substring(i+1);return"api"===s&&(n=n.toLowerCase()),[s,n,r].filter(e=>e&&e.length>0).reduce((e,t,r)=>{switch(r){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},b={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},v={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var E,x,T,C,A,R,$,I,k,P=r(92238);let M={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};var O=r(44479);class D{authSchemes=new Map;constructor(e){for(let t in e){if(!(0,O.$)(e,t))continue;let r=e[t];void 0!==r&&this.authSchemes.set(t,r)}}getIdentityProvider(e){return this.authSchemes.get(e)}}let N={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"};var _=r(27959);class j{config;middlewareStack=(0,_.o)();initConfig;handlers;constructor(e){this.config=e;let{protocol:t,protocolSettings:r}=e;r&&"function"==typeof t&&(e.protocol=new t(r))}send(e,t,r){let i,s="function"!=typeof t?t:void 0,n="function"==typeof t?t:r;if(void 0===s&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);let t=this.handlers;t.has(e.constructor)?i=t.get(e.constructor):(i=e.resolveMiddleware(this.middlewareStack,this.config,s),t.set(e.constructor,i))}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,s);if(!n)return i(e).then(e=>e.output);i(e).then(e=>n(null,e.output),e=>n(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}let U=RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),L=(e,t=!1)=>{if(!t)return U.test(e);for(let t of e.split("."))if(!L(t))return!1;return!0},z=new Set,q=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"));var B=r(67670);let F="content-length",H={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0};var V=r(27277);let W=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],G=["TimeoutError","RequestTimeout","RequestTimeoutException"],Q=[500,502,503,504],J=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],K=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND","EAI_AGAIN"],Y=e=>e.$metadata?.httpStatusCode===429||W.includes(e.name)||e.$retryable?.throttling==!0,Z=(e,t=0)=>{var r;let i;return e?.name!=="AbortError"&&(e?.$retryable!==void 0||e.$metadata?.clockSkewCorrected||"InvalidSignatureException"===e.name&&e.message?.includes("Signature expired")||G.includes(e.name)||J.includes(e?.code||"")||K.includes(e?.code||"")||Q.includes(e.$metadata?.httpStatusCode||0)||(i=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]),!!(e&&e instanceof TypeError)&&i.has(e.message))||"ERR_HTTP2_STREAM_ERROR"===(r=e).code&&r.message.includes("NGHTTP2_REFUSED_STREAM")||void 0!==e.cause&&t<=10&&Z(e.cause,t+1))};class X{static setTimeoutFn=(e,t)=>setTimeout(e,t);beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let t;
1if(this.updateMeasuredRate(),e?.errorType==="THROTTLING"||Y(e?.error??e)){let e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(e){if(this.enabled){for(this.refillTokenBucket();e>this.availableTokens;){let t=(e-this.availableTokens)/this.fillRate*1e3;await new Promise(e=>X.setTimeoutFn(e,t)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-e}}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+t),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}
1cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let e=Math.floor(2*this.getCurrentTimeInSeconds())/2;if(this.requestCount++,e>this.lastTxRateBucket){let t=this.requestCount/(e-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(t*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=e}}getPrecise(e){return parseFloat(e.toFixed(8))}}class ee{x=h.delay();computeNextBackoffDelay(e){return Math.floor(Math.random()*Math.min(this.x*2**e,2e4))}setDelayBase(e){this.x=e}}class et{delay;count;cost;longPoll;$retryLog={acquisitionDelay:0};constructor(e,t,r,i){this.delay=e,this.count=t,this.cost=r,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(2e4,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class er{mode=R.STANDARD;retryBackoffStrategy;capacity=500;maxAttemptsProvider;baseDelay;constructor(e){"number"==typeof e?this.maxAttemptsProvider=async()=>e:"function"==typeof e?this.maxAttemptsProvider=e:e&&"object"==typeof e&&(this.maxAttemptsProvider=async()=>e.maxAttempts,this.baseDelay=e.baseDelay,this.retryBackoffStrategy=e.backoff),this.maxAttemptsProvider??=async()=>3,this.baseDelay??=h.delay(),this.retryBackoffStrategy??=new ee}async acquireInitialRetryToken(e){return new et(h.delay(),0,void 0,h.v2026&&e.includes(":longpoll"))}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts(),i=this.retryCode(e,t,r),s=0===i,n=e.isLongPoll?.();if(s||n){let r=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===r?h.throttlingDelay():this.baseDelay);let a=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=a;if(t.retryAfterHint instanceof Date&&(o=Math.max(a,Math.min(t.retryAfterHint.getTime()-Date.now(),a+5e3))),s){let t=this.getCapacityCost(r);this.capacity-=t;let i=new et(0,e.getRetryCount()+1,t,e.isLongPoll?.()??!1);return await new Promise(e=>setTimeout(e,o)),i.$retryLog.acquisitionDelay=o,i}{let e=h.v2026&&3===i&&n?o:0;e>0&&await new Promise(t=>setTimeout(t,e))}}throw Error("No retry token available")}recordSuccess(e){this.capacity=Math.min(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}retryCode(e,t,r){let i=e.getRetryCount()+1,s=1*!this.isRetryableError(t.errorType),n=this.capacity>=this.getCapacityCost(t.errorType)?0:3;return s||(i<r?0:2)||n}getCapacityCost(e){return e===h.modifiedCostType()?h.throttlingCost():h.cost()}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class ei{mode=R.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(e,t){let{rateLimiter:r}=t??{};this.rateLimiter=r??new X,this.standardRetryStrategy=new er(t?{maxAttempts:"number"==typeof e?e:3,...t}:e)}async acquireInitialRetryToken(e){let t=await this.standardRetryStrategy.acquireInitialRetryToken(e);return await this.rateLimiter.getSendToken(),t}async refreshRetryTokenForRetry(e,t){this.rateLimiter.updateClientSendingRate(t);let r=await this.standardRetryStrategy.refreshRetryTokenForRetry(e,t);return await this.rateLimiter.getSendToken(),r}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}let es=e=>e?.body instanceof ReadableStream;class en{trace(){}debug(){}info(){}warn(){}error(){}}let ea="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo=Object.entries(ea).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),el=ea.split(""),ec=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;let r=new ArrayBuffer(t),i=new DataView(r);for(let t=0;t<e.length;t+=4){let r=0,s=0;for(let i=t,n=t+3;i<=n;
1i++)if("="!==e[i]){if(!(e[i]in eo))throw TypeError(`Invalid character ${e[i]} in base64 string.`);r|=eo[e[i]]<<(n-i)*6,s+=6}else r>>=6;let n=t/4*3;r>>=s%8;let a=Math.floor(s/8);for(let e=0;e<a;e++){let t=(a-e-1)*8;i.setUint8(n+e,(r&255<<t)>>t)}}return new Uint8Array(r)};var eu=r(13107);function eh(e){let t,r="object"==typeof(t="string"==typeof e?(0,eu.a)(e):e)&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!i)throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let e=0;e<t.length;e+=3){let r=0,i=0;for(let s=e,n=Math.min(e+3,t.length);s<n;s++)r|=t[s]<<(n-s-1)*8,i+=8;let n=Math.ceil(i/6);r<<=6*n-i;for(let e=1;e<=n;e++){let t=(n-e)*6;s+=el[(r&63<<t)>>t]}s+="==".slice(0,4-n)}return s}function ed(e,t,r,i){return class s extends Uint8Array{static fromString(e,r="utf-8"){if("string"==typeof e)return"base64"===r?s.mutate(i(e)):s.mutate(t(e));throw Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,s.prototype),e}transformToString(t="utf-8"){return"base64"===t?r(this):e(this)}}}var ef=r(36326);let ep=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));Symbol.for("node-only");class eg extends ed(ef.P,eu.a,eh,ec){}let em=(E=e=>crypto.getRandomValues(e),"u">typeof crypto&&"function"==typeof crypto.randomUUID?()=>crypto.randomUUID():()=>{let e=new Uint8Array(16);return E(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,ep[e[0]]+ep[e[1]]+ep[e[2]]+ep[e[3]]+"-"+ep[e[4]]+ep[e[5]]+"-"+ep[e[6]]+ep[e[7]]+"-"+ep[e[8]]+ep[e[9]]+"-"+ep[e[10]]+ep[e[11]]+ep[e[12]]+ep[e[13]]+ep[e[14]]+ep[e[15]]});class ey{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){return!!e&&"number"==typeof e.statusCode&&"object"==typeof e.headers}}let ew=e=>{if(null!=e){if("string"==typeof e){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&eA.warn(eC(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw TypeError(`Expected number, got ${typeof e}: ${e}`)}},eS=e=>{let t=ew(e);if(void 0!==t&&!Number.isNaN(t)&&1/0!==t&&-1/0!==t&&Math.abs(t)>34028234663852886e22)throw TypeError(`Expected 32-bit float, got ${e}`);return t},eb=(e,t)=>{let r=(e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw TypeError(`Expected integer, got ${typeof e}: ${e}`)}})(e);if(void 0!==r&&ev(r,t)!==r)throw TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ev=(e,t)=>
1{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},eE=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,ex=e=>{let t=e.match(eE);if(null===t||t[0].length!==e.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(e)},eT=e=>"string"==typeof e?eb(ex(e),16):eb(e,16),eC=e=>String(TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),eA={warn:console.warn},eR=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);let eI=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/),ek=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),eP=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),eM=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),eO=e=>{if(null==e)return;if("string"!=typeof e)throw TypeError("RFC-7231 date-times must be expressed as strings");let t=ek.exec(e);if(t){let[e,r,i,s,n,a,o,l]=t;return eD(eT(eF(s)),ej(i),eq(r,"day",1,31),{hours:n,minutes:a,seconds:o,fractionalMilliseconds:l})}if(t=eP.exec(e)){let[e,r,i,s,n,a,o,l]=t;return e_(eD(eN(s),ej(i),eq(r,"day",1,31),{hours:n,minutes:a,seconds:o,fractionalMilliseconds:l}))}if(t=eM.exec(e)){let[e,r,i,s,n,a,o,l]=t;return eD(eT(eF(l)),ej(r),eq(i.trimLeft(),"day",1,31),{hours:s,minutes:n,seconds:a,fractionalMilliseconds:o})}throw TypeError("Invalid RFC-7231 date-time value")},eD=(e,t,r,i)=>{let s=t-1;return eL(e,s,r),new Date(Date.UTC(e,s,r,eq(i.hours,"hour",0,23),eq(i.minutes,"minute",0,59),eq(i.seconds,"seconds",0,60),eB(i.fractionalMilliseconds)))},eN=e=>{let t=new Date().getUTCFullYear(),r=100*Math.floor(t/100)+eT(eF(e));return r<t?r+100:r},e_=e=>e.getTime()-new Date().getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,ej=e=>{let t=e$.indexOf(e);if(t<0)throw TypeError(`Invalid month: ${e}`);return t+1},eU=[31,28,31,30,31,30,31,31,30,31,30,31],eL=(e,t,r)=>{let i=eU[t];if(1===t&&ez(e)&&(i=29),r>i)throw TypeError(`Invalid day for ${e$[t]} in ${e}: ${r}`)},ez=e=>e%4==0&&(e%100!=0||e%400==0),eq=(e,t,r,i)=>{var s;let n="string"==typeof(s=eF(e))?eb(ex(s),8):eb(s,8);if(n<r||n>i)throw TypeError(`${t} must be between ${r} and ${i}, inclusive`);return n},eB=e=>{var t;return null==e?0:1e3*("string"==typeof(t="0."+e)?eS(ex(t)):eS(t))},eF=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},eH=e=>e instanceof Error?e:e instanceof Object?Object.assign(Error(),e):"string"==typeof e?Error(e):Error(`AWS SDK error wrapper for ${e}`);function eV(e){return t=>(r,i)=>async s=>{let n=await t.retryStrategy(),a=await t.maxAttempts();if(!eG(n))return n?.mode&&(i.userAgent=[...i.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(r,s);{let l=await n.acquireInitialRetryToken((i.partition_id??"")+(i.__retryLongPoll?":longpoll":"")),c=Error(),u=0,h=0,{request:d}=s,f=o.isInstance(d);for(f&&(d.headers["amz-sdk-invocation-id"]=em());;)try{f&&(d.headers["amz-sdk-request"]=`attempt=${u+1}; max=${a}`);let{response:e,output:t}=await r(s);return n.recordSuccess(l),t.$metadata.attempts=u+1,t.$metadata.totalRetryDelay=h,{response:e,output:t}}catch(a){let r=eQ(a,t.logger);if(c=eH(a),f&&e(d))throw(i.logger instanceof en?console:i.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{l=await n.refreshRetryTokenForRetry(l,r)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=h,c}u=l.getRetryCount();let s=l.getRetryDelay();h+=(l?.$retryLog?.acquisitionDelay??0)+s,s>0&&await eW(s)}}}}let eW=e=>new Promise(t=>setTimeout(t,e)),eG=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,eQ=(e,t)=>{let r={error:e,errorType:eJ(e)},i=function(e,t){if(ey.isInstance(e))for(let r in e.headers){if(!(0,O.$)(e.headers,r))continue;let i=r.toLowerCase();if("retry-after"===i){let i=e.headers[r],s=0/0;if(i.endsWith("GMT"))try{s=(eO(i).getTime()-Date.now())/1e3}catch(e){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(e)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?s=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?s=Number(i):Date.parse(i)>=Date.now()&&(s=(Date.parse(i)-Date.now())/1e3);if(isNaN(s))return;return new Date(Date.now()+1e3*s)}if("x-amz-retry-after"===i){let i=e.headers[r],s=Number(i);if(isNaN(s))return void t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return new Date(Date.now()+s)}}}(e.$response,t);return i&&(r.retryAfterHint=i),r},eJ=e=>Y(e)?"THROTTLING":Z(e)?"TRANSIENT":(e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!Z(e))return!0}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",eK={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};Symbol.for("node-only"),eV(es);let eY=(s=eV(es),e=>({applyToStack:t=>{t.add(s(e),eK)}})),eZ=(e,t,r,i,s)=>({name:t,namespace:e,traits:r,input:i,output:s}),eX=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1];var e0=r(52490);let e1={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},e2={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0},e3=function(e){return e4(e)&&e.expiration.getTime()-Date.now()<3e5},e4=e=>void 0!==e.expiration;var e6=r(19733);let e5=e=>e instanceof Uint8Array?e:"string"==typeof e?(0,eu.a)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e);class e8{format(e){let t=[];for(let r in e){if(!(0,O.$)(e,r))continue;let i=(0,eu.a)(r);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[r]))}let r=new Uint8Array(t.reduce((e,t)=>
1e+t.byteLength,0)),i=0;for(let e of t)r.set(e,i),i+=e.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([+!e.value]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let n=new Uint8Array(s.buffer);return n.set(e.value,3),n;case"string":let a=(0,eu.a)(e.value),o=new DataView(new ArrayBuffer(3+a.byteLength));o.setUint8(0,7),o.setUint16(1,a.byteLength,!1);let l=new Uint8Array(o.buffer);return l.set(a,3),l;case"timestamp":let c=new Uint8Array(9);return c[0]=8,c.set(e7.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!e9.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let u=new Uint8Array(17);return u[0]=9,u.set((0,e6.a)(e.value.replace(/-/g,"")),1),u}}}(x=$||($={}))[x.boolTrue=0]="boolTrue",x[x.boolFalse=1]="boolFalse",x[x.byte=2]="byte",x[x.short=3]="short",x[x.integer=4]="integer",x[x.long=5]="long",x[x.byteArray=6]="byteArray",x[x.string=7]="string",x[x.timestamp=8]="timestamp",x[x.uuid=9]="uuid";let e9=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class e7{bytes;constructor(e){if(this.bytes=e,8!==e.byteLength)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(e));r>-1&&i>0;r--,i/=256)t[r]=i;return e<0&&te(t),new e7(t)}valueOf(){let e=this.bytes.slice(0),t=128&e[0];return t&&te(e),parseInt((0,e6.n)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function te(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}let tt=e=>encodeURIComponent(e).replace(/[!'()*]/g,tr),tr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ti="X-Amz-Date",ts="X-Amz-Signature",tn="X-Amz-Security-Token",ta="authorization",to=ti.toLowerCase(),tl=[ta,to,"date"],tc=ts.toLowerCase(),tu="x-amz-content-sha256",th=tn.toLowerCase(),td={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},tf=/^proxy-/,tp=/^sec-/,tg="AWS4-HMAC-SHA256",tm="aws4_request";class ty{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:r,service:i,sha256:s,uriEscapePath:n=!0}){this.service=i,this.sha256=s,this.uriEscapePath=n,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,V.t)(r),this.credentialProvider=(0,V.t)(t)}createCanonicalRequest(e,t,r){let i=Object.keys(t).sort();return`${e.method}
2${this.getCanonicalPath(e)}
3${(({query:e={}})=>{let t=[],r={};for(let i in e){if(!(0,O.$)(e,i)||i.toLowerCase()===tc)continue;let s=tt(i);t.push(s);let n=e[i];"string"==typeof n?r[s]=`${s}=${tt(n)}`:Array.isArray(n)&&(r[s]=n.slice(0).reduce((e,t)=>e.concat([`${s}=${tt(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>r[e]).filter(e=>e).join("&")})(e)}
4${i.map(e=>`${e}:${t[e]}`).join("\n")}
5
6${i.join(";")}
7${r}`}async createStringToSign(e,t,r,i){let s=new this.sha256;s.update(e5(r));let n=await s.digest();return`${i}
8${e}
9${t}
10${(0,e6.n)(n)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let r of e.split("/"))r?.length!==0&&"."!==r&&(".."===r?t.pop():t.push(r));return tt(`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}formatDate(e){var t;let r=("number"==typeof(t=e)?new Date(1e3*t):"string"==typeof t?new Date(Number(t)?1e3*Number(t):t):t).toISOString().replace(/\.\d{3}Z$/,"Z").replace(/[-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}let tw={},tS=[],tb=(e,t,r)=>`${e}/${t}/${r}/${tm}`,tv=async(e,t,r,i,s)=>{let n=await tE(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${i}:${s}:${(0,e6.n)(n)}:${t.sessionToken}`;if(a in tw)return tw[a];for(tS.push(a);tS.length>50;)delete tw[tS.shift()];let o=`AWS4${t.secretAccessKey}`;for(let t of[r,i,s,tm])o=await tE(e,o,t);return tw[a]=o},tE=(e,t,r)=>{let i=new e(t);return i.update(e5(r)),i.digest()},tx=({headers:e},t,r)=>{let i={};for(let s of Object.keys(e).sort()){if(void 0==e[s])continue;let n=s.toLowerCase();(!(n in td||t?.has(n)||tf.test(n)||tp.test(n))||r&&(!r||r.has(n)))&&(i[n]=e[s].trim().replace(/\s+/g," "))}return i},tT=async({headers:e,body:t},r)=>{for(let t in e)if((0,O.$)(e,t)&&t.toLowerCase()===tu)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)){let e=new r;return e.update(e5(t)),(0,e6.n)(await e.digest())}return"UNSIGNED-PAYLOAD"},tC=e=>{for(let t in(e=o.clone(e)).headers)(0,O.$)(e.headers,t)&&tl.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class tA extends ty{headerFormatter=new e8;constructor({applyChecksum:e,credentials:t,region:r,service:i,sha256:s,uriEscapePath:n=!0}){super({applyChecksum:e,credentials:t,region:r,service:i,sha256:s,uriEscapePath:n})}async presign(e,t={}
10){let{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:n,signableHeaders:a,hoistableHeaders:l,signingRegion:c,signingService:u}=t,h=await this.credentialProvider();this.validateResolvedCredentials(h);let d=c??await this.regionProvider(),{longDate:f,shortDate:p}=this.formatDate(r);if(i>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let g=tb(p,d,u??this.service),m=((e,t={})=>{let{headers:r,query:i={}}=o.clone(e);for(let e in r){if(!(0,O.$)(r,e))continue;let s=e.toLowerCase();("x-amz-"===s.slice(0,6)&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(i[e]=r[e],delete r[e])}return{...e,headers:r,query:i}})(tC(e),{unhoistableHeaders:n,hoistableHeaders:l});h.sessionToken&&(m.query[tn]=h.sessionToken),m.query["X-Amz-Algorithm"]=tg,m.query["X-Amz-Credential"]=`${h.accessKeyId}/${g}`,m.query[ti]=f,m.query["X-Amz-Expires"]=i.toString(10);let y=tx(m,s,a);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(y),m.query[ts]=await this.get
10Signature(f,g,this.getSigningKey(h,d,p,u),this.createCanonicalRequest(m,y,await tT(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:r=new Date,priorSignature:i,signingRegion:s,signingService:n,eventStreamCredentials:a}){let o=s??await this.regionProvider(),{shortDate:l,longDate:c}=this.formatDate(r),u=tb(l,o,n??this.service),h=await tT({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);let f=["AWS4-HMAC-SHA256-PAYLOAD",c,u,i,(0,e6.n)(await d.digest()),h].join("\n");return this.signString(f,{signingDate:r,signingRegion:o,signingService:n,eventStreamCredentials:a})}async signMessage(e,{signingDate:t=new Date,signingRegion:r,signingService:i,eventStreamCredentials:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:r,signingService:i,priorSignature:e.priorSignature,eventStreamCredentials:s}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:r,signingService:i,eventStreamCredentials:s}={}){let n=s??await this.credentialProvider();this.validateResolvedCredentials(n);let a=r??await this.regionProvider(),{shortDate:o}
10=this.formatDate(t),l=new this.sha256(await this.getSigningKey(n,a,o,i));return l.update(e5(e)),(0,e6.n)(await l.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:s,signingService:n}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let o=s??await this.regionProvider(),l=tC(e),{longDate:c,shortDate:u}=this.formatDate(t),h=tb(u,o,n??this.service);l.headers[to]=c,a.sessionToken&&(l.headers[th]=a.sessionToken);let d=await tT(l,this.sha256);!((e,t)=>{for(let r in e=e.toLowerCase(),t)if((0,O.$)(t,r)&&e===r.toLowerCase())return!0;return!1})(tu,l.headers)&&this.applyChecksum&&(l.headers[tu]=d);let f=tx(l,i,r),p=await this.getSignature(c,h,this.getSigningKey(a,o,u,n),this.createCanonicalRequest(l,f,d));return l.headers[ta]=`${tg} Credential=${a.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,l}async getSignature(e,t,r,i){let s=await this.createStringToSign(e,t,i,tg),n=new this.sha256(await r);return n.update(e5(s)),(0,e6.n)(await n.digest())}getSigningKey(e,t,r,i){return tv(this.sha256,e,r,t,i||this.service)}}Symbol.for("node-only");let tR=e=>{let t,r,i=e.credentials,s=!!e.credentials;Object.defineProperty(e,"credentials",{set(r){r&&r!==i&&r!==t&&(s=!0);let a=function(e,{credentials:t,credentialDefaultProvider:r}){let i;return(i=t?t?.memoized?t:((e,t,r)=>{let i,s,n;if(void 0===e)return;let a="function"!=typeof e?async()=>Promise.resolve(e):e,o=!1,l=async e=>{s||(s=a(e));try{i=await s,n=!0,o=!1}finally{s=void 0}return i};return void 0===t?async e=>((!n||e?.forceRefresh)&&(i=await l(e)),i):async e=>((!n||e?.forceRefresh)&&(i=await l(e)),o||(r(i)?t(i)&&await l(e):o=!0),i)})(t,e3,e4):r?n(r(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")}).memoized=!0,i}(e,{credentials:i=r,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;let r=async r=>t({...r,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}(e,a);if(s&&!o.attributed){let e="object"==typeof i&&null!==i;(t=async t=>{let r=await o(t);if(e&&(!r.$source||0===Object.keys(r.$source).length))return r.$source||(r.$source={}),r.$source.CREDENTIALS_CODE="e",r;return r}).memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0}else t=o},get(){return t},enumerable:!0,configurable:!0}),e.credentials=i;let{signingEscapePath:a=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:l}=e;return r=e.signer?n(e.signer):e.regionInfoProvider?()=>n(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,r])=>{let{signingRegion:i,signingService:s}=t;e.signingRegion=e.signingRegion||i||r,e.signingName=e.signingName||s||e.serviceId;let n={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:a};return new(e.signerConstructor||tA)(n)}):async t=>{let r=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await n(e.region)(),properties:{}},t)).signingRegion,i=t.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||i||e.serviceId;let s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:a};return new(e.signerConstructor||tA)(s)},Object.assign(e,{systemClockOffset:o,signingEscapePath:a,signer:r,disableClockSkewCorrection:n(e.disableClockSkewCorrection??!1)})},t$=async(e,t,r)=>({operation:(0,P.u)(t).operation,region:await (0,V.t)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),tI=e=>{let t=[];return e.operation,t.push({schemeId:"aws.auth#sigv4",signingProperties:{name:"athena",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}),t};var tk=r(96016);let tP={os(e){return/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0},browser(e){return/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0}},tM=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},tO=["in-region","cross-region","mobile","standard","legacy"],tD="function"==typeof TextEncoder?new TextEncoder:null,tN=e=>{if("string"==typeof e){if(tD)return tD.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){let i=e.charCodeAt(r);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&r--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw Error(`Body Length computation failed for ${e}`)};
10function t_(e,t){return new Request(e,t)}let tj={supported:void 0};class tU{config;configProvider;static create(e){return"function"==typeof e?.handle?e:new tU(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===tj.supported&&(tj.supported=!!("u">typeof Request&&"keepalive"in t_("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);let i=r??this.config.requestTimeout,s=!0===this.config.keepAlive,n=this.config.credentials,a=this.config.customFetch??fetch;if(t?.aborted)return Promise.reject(tL(t));let o=e.path,l=function(e){let t=[];for(let r of Object.keys(e).sort()){let i=e[r];if(r=tt(r),Array.isArray(i))for(let e=0,s=i.length;e<s;e++)t.push(`${r}=${tt(i[e])}`);else{let e=r;(i||"string"==typeof i)&&(e+=`=${tt(i)}`),t.push(e)}}return t.join("&")}(e.query||{});l&&(o+=`?${l}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){let t=e.username??"",r=e.password??"";c=`${t}:${r}@`}let{port:u,method:h}=e,d=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,f="GET"===h||"HEAD"===h?void 0:e.body,p={body:f,headers:new Headers(e.headers),method:h,credentials:n};this.config?.cache&&(p.cache=this.config.cache),f&&(p.duplex="half"),"u">typeof AbortController&&(p.signal=t),tj.supported&&(p.keepalive=s),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let g=()=>{},m=[a(t_(d,p)).then(e=>{let t=e.headers,r={};for(let e of t.entries())r[e[0]]=e[1];return void 0==e.body?e.blob().then(t=>({response:new ey({headers:r,reason:e.statusText,statusCode:e.status,body:t})})):{response:new ey({headers:r,reason:e.statusText,statusCode:e.status,body:e.body})}}),function(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{let t=Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",r(t)},e)})}(i)];return t&&m.push(new Promise((e,r)=>{let i=()=>{r(tL(t))};"function"==typeof t.addEventListener?(t.addEventListener("abort",i,{once:!0}),g=()=>t.removeEventListener("abort",i)):t.onabort=i})),Promise.race(m).finally(g)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[e]=t,r))}httpHandlerConfigs(){return this.config??{}}}function tL(e){let t=e&&"object"==typeof e&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let e=Error("Request aborted");return e.name="AbortError",e.cause=t,e}let e=Error(String(t));return e.name="AbortError",e}let r=Error("Request aborted");return r.name="AbortError",r}function tz(e,t){if(void 0===t)for(let r of(t=0,e))t+=r.byteLength;let r=new Uint8Array(t),i=0;for(let t of e)r.set(t,i),i+=t.byteLength;return r}let tq=async e=>"function"==typeof Blob&&(e?.constructor?.name===Blob.name||e instanceof Blob)?tB(e):tF(e);async function tB(e){return e.arrayBuffer().then(e=>new Uint8Array(e))}async function tF(e){let t=[],r=e.getReader(),i=0;for(;;){let{done:e,value:s}=await r.read();if(s&&(t.push(s),i+=s.length),e)break}return tz(t,i)}let tH=e=>ey.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,tV=e=>ey.isInstance(e)?e.headers?.age??e.headers?.Age:void 0,tW=(e,t,r,i)=>{if(void 0!==i)return t;let s=Date.parse(e),n=Date.now();return void 0!==r&&n-r>9e5?t:void 0!==r?s-(r+n)/2:s-n},tG=(e,t)=>{if(!t)throw Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},tQ=async e=>{let t=tG("context",e.context),r=tG("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],s=tG("signer",r.signer),n=await s(i),a=e?.signingRegion;return{config:r,signer:n,signingRegion:a,signingRegionSet:e?.signingRegionSet,signingName:e?.signingName}};class tJ{async sign(e,t,r){let i;if(!o.isInstance(e))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await tQ(r),{config:n,signer:a}=s,{signingRegion:l,signingName:c}=s,u=r.context;if(u?.authSchemes?.length){let[e,t]=u.authSchemes;e?.name==="sigv4a"&&t?.name==="sigv4"&&(l=t?.signingRegion??l,c=t?.signingName??c)}let h=await n.disableClockSkewCorrection?.()===!0;return r._disableClockSkewCorrection=h,h||(r._preRequestSystemClockOffset=n.systemClockOffset,r._requestSentAt=Date.now()),await a.sign(e,{signingDate:h?new Date:(i=n.systemClockOffset,new Date(Date.now()+i)),signingRegion:l,signingService:c})}errorHandler(e){return t=>{if(!e._disableClockSkewCorrection){let r=t.ServerTime??tH(t.$response);if(r){let i=tG("config",e.config),s=e._preRequestSystemClockOffset,n=e._requestSentAt,a=tV(t.$response),o=tW(r,i.systemClockOffset,n,a);i.systemClockOffset=o,Math.abs(o)>=24e4&&(o!==s||void 0!==s&&s!==o)&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}}throw t}}successHandler(e,t){if(t._disableClockSkewCorrection)return;let r=tH(e);if(r){let i=tG("config",t.config),s=t._requestSentAt,n=tV(e);i.systemClockOffset=tW(r,i.systemClockOffset,s,n)}}}var tK=r(88754),tY=r(97870),tZ=r(56081);class tX{serdeContext;setSerdeContext(e){this.serdeContext=e}}class t0 extends tX{options;compositeErrorRegistry;constructor(e){for(let t of(super(),this.options=e,this.compositeErrorRegistry=new tY.O(e.defaultNamespace),e.errorTypeRegistries??[]))this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return o}getResponseType(){return ey}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){for(let[r,i]of(e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={}
10),t.url.searchParams.entries()))e.query[r]=i;if(t.headers)for(let r in t.headers)(0,O.$)(t.headers,r)&&(e.headers[r]=t.headers[r].join(", "));return e}if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(let r in t.headers)(0,O.$)(t.headers,r)&&(e.headers[r]=t.headers[r]);return e}setHostPrefix(e,t,r){if(this.serdeContext?.disableHostPrefix)return;let i=tK.l1.of(t.input),s=(0,tZ.c)(t.traits??{});if(s.endpoint){let t=s.endpoint?.[0];if("string"==typeof t){var n;for(let[e,s]of i.structIterator()){if(!s.getMergedTraits().hostLabel)continue;let i=r[e];if("string"!=typeof i)throw Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,i)}if(e.hostname=t+e.hostname,n=e.hostname,!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(n))throw Error(`[${e.hostname}] is not a valid hostname.`)}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}resolveError(e,t,r){let i;for(let s of r)for(let r of t)try{i="*"===r?s.getSchema(e):s.getSchema(r+"#"+e);let t=s.getErrorCtor(i);if(t)return[i,t,"modeled"];{let e=s.getBaseException();if(e){let t=s.getErrorCtor(e);if(t)return[i,t,"synthetic"]}}}catch(e){}for(let e of r){let t=e.getBaseException();if(t){let r=e.getErrorCtor(t);if(r)return[t,r,"synthetic"]}}return[[-3,"","Error",0,[],[],0],Error,"native"]}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r})}async loadEventStreamCapability(){let{EventStreamSerde:e,eventStreamSerdeProvider:t}=await r.e(3762).then(r.bind(r,53762));return new e({marshaller:this.resolveEventStreamMarshaller(t),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType(),compositeErrorRegistry:this.compositeErrorRegistry})}getDefaultContentType(){throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,r,i,s){return[]}getEventStreamMarshaller(){let e=this.serdeContext;if(!e.eventStreamMarshaller)throw Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}resolveEventStreamMarshaller(e){let t=this.serdeContext;return t.eventStreamMarshaller?t.eventStreamMarshaller:e(this.serdeContext)}}let t1=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return eg.mutate(e);if(!e)return eg.mutate(new Uint8Array);let r=t.streamCollector(e);return eg.mutate(await r)};class t2 extends t0{async serializeRequest(e,t,r){let i,s=this.serializer,n={},a={},l=await r.endpoint(),c=tK.l1.of(e?.input),u=c.getSchema(),h=t&&"object"==typeof t?t:{},d=new o({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:a,body:void 0});if(l&&(this.updateServiceEndpoint(d,l),this.setHostPrefix(d,e,h)),h){let e=c.getEventStreamMember();if(e){if(h[e]){let t={};for(let[r]of c.structIterator())r!==e&&null!=h[r]&&(t[r]=h[r]);i=await this.serializeEventStream({eventStream:h[e],requestSchema:c,initialRequest:t})}}else s.write(u,h),i=s.flush()}return d.headers=Object.assign(d.headers,a),d.query=n,d.body=i,d.method="POST",d}async deserializeResponse(e,t,r){let i=this.deserializer,s=tK.l1.of(e.output),n={};if(r.statusCode>=300){let s=await t1(r.body,t);throw s.byteLength>0&&Object.assign(n,await i.read(15,s)),await this.handleError(e,t,r,n,this.deserializeMetadata(r)),Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let e in r.headers){if(!(0,O.$)(r.headers,e))continue;let t=r.headers[e];delete r.headers[e],r.headers[e.toLowerCase()]=t}let a=s.getEventStreamMember();if(a)n[a]=await this.deserializeEventStream({response:r,responseSchema:s,initialResponseContainer:n});else{let e=await t1(r.body,t);e.byteLength>0&&Object.assign(n,await i.read(s,e))}return n.$metadata=this.deserializeMetadata(r),n}}var t3=r(6625),t4=r(73384);class t6{queryCompat;errorRegistry;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){let r=t.getMemberSchemas(),i=Object.values(r).find(e=>!!e.getMergedTraits().httpPayload);if(i){let t=i.getMergedTraits().mediaType;return t?t:i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e}if(!t.isUnitSchema()&&Object.values(r).find(e=>{let{httpQuery:t,httpQueryParams:r,httpHeader:i,httpLabel:s,httpPrefixHeaders:n}=e.getMergedTraits();return!t&&!r&&!i&&!s&&void 0===n}))return e}async getErrorSchemaOrThrowBaseException(e,t,r,i,s,n){let a=e;e.includes("#")&&([,a]=e.split("#"));let o={$metadata:s,$fault:r.statusCode<500?"client":"server"};if(!this.errorRegistry)throw Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:n?.(this.errorRegistry,a)??this.errorRegistry.getSchema(e),errorMetadata:o}}catch(s){i.message=i.message??i.Message??"UnknownError";let e=this.errorRegistry,t=e.getBaseException();if(t){let r=e.getErrorCtor(t)??Error;throw this.decorateServiceException(Object.assign(new r({name:a}),o),i)}let r=i?.message??i?.Message??i?.Error?.Message??i?.Error?.message;throw this.decorateServiceException(Object.assign(Error(r),{name:a},o),i)}}compose(e,t,r){let i=r;t.includes("#")&&([i]=t.split("#"));let s=tY.O.for(i),n=tY.O.for("smithy.ts.sdk.synthetic."+r);e.copyFrom(s),e.copyFrom(n),this.errorRegistry=e}decorateServiceException(e,t={}){if(this.queryCompat){let r=e.Message??t.Message,i=(0,t4.M)(e,t);r&&(i.message=r);let s=i.Error??{};s.Type=i.Error?.Type,s.Code=i.Error?.Code,s.Message=i.Error?.message??i.Error?.Message??r,i.Error=s;let n=i.$metadata.requestId;return n&&(i.RequestId=n),i}return(0,t4.M)(e,t)}setQueryCompatError(e,t){let r=t.headers?.["x-amzn-query-error"];if(void 0!==e&&null!=r){let[t,i]=r.split(";"),s=Object.keys(e),n={Code:t,Type:i};e.Code=t,e.Type=i;for(let t=0;t<s.length;t++){let r=s[t];n["message"===r?"Message":r]=e[r]}delete n.__type,e.Error=n}}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(r){return e.find(e=>tK.l1.of(e).getMergedTraits().awsQueryError?.[0]===t)}}}class t5{serdeContext;setSerdeContext(e){this.serdeContext=e}}function t8(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();let{httpLabel:r,httpPrefixHeaders:i,httpHeader:s,httpQuery:n}=e.getMergedTraits();return(t.httpBindings?"string"==typeof i||s?6:n||r?5:void 0:void 0)??t.timestampFormat.default}let t9=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};t9.from=e=>e&&"object"==typeof e&&(e instanceof t9||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?t9(String(e)):t9(JSON.stringify(e)),t9.fromObject=t9.from;let t7=/^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;class re{string;type;constructor(e,t){if(this.string=e,this.type=t,!t7.test(e))throw Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${e}"`)}toString(){return this.string}static[Symbol.hasInstance](e){return!!e&&"object"==typeof e&&(re.prototype.isPrototypeOf(e)||"bigDecimal"===e.type&&t7.test(e.string))}}class rt{from;to;keys;constructor(e,t){this.from=e,this.to=t;let r=new Set(Object.keys(this.from));r.delete("__type"),this.keys=r}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){let e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}
10function rr(){if(void 0===i)try{if("function"!=typeof Buffer)i=!1;else{let e=JSON.parse(Buffer.from([123,125]));i=null!==e&&"object"==typeof e}}catch{i=!1}return i}function ri(e,t,r){if(r?.source){let e=r.source;if("number"==typeof t){var i;let r,s,n,a,o,l,c,u;if(t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER)return!function(e,t){if(e===String(t)||Object.is(t,-0))return!0;if(/[eE]/.test(e))return rs(e)===rs(String(t));let r=e.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,""),i=String(t);return r===i||!!/[eE]/.test(i)&&r===rs(i)}(e,t)?new re(e,"bigDecimal"):t;return!function(e){let t=e.indexOf(".");if(-1===t)return!1;let r=e.search(/[eE]/);return -1===r||parseInt(e.slice(r+1),10)<r-t-1}(e)?/[eE]/.test(e)?(n=(i=e).search(/[eE]/),a=parseInt(i.slice(n+1),10),o=i.startsWith("-"),-1===(c=(l=i.slice(+!!o,n)).indexOf("."))?(r=l,s=a):(r=l.slice(0,c)+l.slice(c+1),s=a-(l.length-c-1)),u=BigInt(r=r.replace(/0+$/,"")||"0")*10n**BigInt(s+(l.replace(".","").length-r.length)),o?-u:u):BigInt(e):new re(e,"bigDecimal")}}return t}function rs(e){let t,r=e.startsWith("-"),i=r?e.slice(1):e,s=i.search(/[eE]/);if(-1===s)t=i;else{let e,r,n=parseInt(i.slice(s+1),10),a=i.slice(0,s),o=a.indexOf(".");-1===o?(e=a,r=a.length):(e=a.slice(0,o)+a.slice(o+1),r=o),e=e.replace(/0+$/,"")||"0";let l=r+n;t="0"===e?"0":l<=0?"0."+"0".repeat(-l)+e:l>=e.length?e+"0".repeat(l-e.length):e.slice(0,l)+"."+e.slice(l)}return t.includes(".")&&(t=t.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),(r?"-":"")+t}let rn=Symbol.for("@aws-sdk/reviver");function ra(e){let t=tK.l1.of(e),r=t.getSchema();
10if(Array.isArray(r)&&t.isStructSchema()){if(rn in r)return r[rn];let e=ro(t,new Set);return r[rn]=e,e}return ro(t,new Set)}function ro(e,t){let r=e.getSchema();if(t.has(r))return!1;if(t.add(r),e.isBigIntegerSchema()||e.isBigDecimalSchema())return!0;if(e.isStructSchema()){for(let[,r]of e.structIterator())if(ro(r,t))return!0}else if(e.isListSchema()||e.isMapSchema()){if(ro(e.getValueSchema(),t))return!0}else if(e.isDocumentSchema())return!0;return!1}async function rl(e,t,r){let i;if(rr()&&"function"==typeof e?.[Symbol.asyncIterator]){let r=await t1(e,t);"function"==typeof Buffer&&(i=Buffer.isBuffer(r)?r:Buffer.from(r.buffer,r.byteOffset,r.byteLength))}if(i||(i=await t1(e,t).then(e=>(t?.utf8Encoder??ef.P)(e))),0===i.length)return{};let s=r&&ra(r)?ri:void 0;try{return JSON.parse(i,s)}catch(e){throw e?.name==="SyntaxError"&&Object.defineProperty(e,"$responseBodyText",{value:"string"==typeof i?i:i.toString("utf8")}),e}}let rc=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),ru=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t};function rh(e){Object.defineProperty(e,"__proto__",{value:void 0,writable:!0,enumerable:!0,configurable:!0})}class rd extends t5{settings;constructor(e){super(),this.settings=e}async read(e,t){let r,i=ra(e)?ri:void 0;if("string"==typeof t){if(0===t.length)return{};r=JSON.parse(t,i)}else if(t instanceof Uint8Array&&rr()){if(0===t.byteLength)return{};r=JSON.parse(Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength),i)}else r=await rl(t,this.serdeContext,e);return this._read(e,r)}readObject(e,t){return this._read(e,t)}_read(e,t){let r=null!==t&&"object"==typeof t,i=tK.l1.of(e);if(r){if(i.isStructSchema())return this._readStruct(i,t);if(Array.isArray(t)&&i.isListSchema()){let e=i.getValueSchema();if(this.needsTransform(e))for(let r=0;r<t.length;++r)t[r]=this._read(e,t[r]);return t}if(i.isMapSchema()){let e=i.getValueSchema();if(this.needsTransform(e))for(let r in t)"__proto__"===r&&rh(t),t[r]=this._read(e,t[r]);return t}}if(i.isBlobSchema()&&"string"==typeof t)return ec(t);let s=i.getMergedTraits().mediaType;if(i.isStringSchema()&&"string"==typeof t&&s)return"application/json"===s||s.endsWith("+json")?t9.from(t):t;if(i.isTimestampSchema()&&null!=t)switch(t8(i,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw TypeError("RFC-3339 date-times must be expressed as strings");let t=eI.exec(e);if(!t)throw TypeError("Invalid RFC-3339 date-time value");let[r,i,s,n,a,o,l,c,u]=t,h=eD(eT(eF(i)),eq(s,"month",1,12),eq(n,"day",1,31),{hours:a,minutes:o,seconds:l,fractionalMilliseconds:c});return"Z"!=u.toUpperCase()&&h.setTime(h.getTime()-(e=>{let t=e[0],r=1;if("+"==t)r=1;else if("-"==t)r=-1;else throw TypeError(`Offset direction, ${t}, must be "+" or "-"`);return r*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*6e4})(u)),h})(t);case 6:return eO(t);case 7:let n;if(null!=t){if("number"==typeof t)n=t;else if("string"==typeof t)n="string"==typeof t?ew(ex(t)):ew(t);else if("object"==typeof t&&1===t.tag)n=t.value;else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(n)||1/0===n||-1/0===n)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*n))}return;default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(i.isBigIntegerSchema()&&("number"==typeof t||"string"==typeof t))return BigInt(t);if(i.isBigDecimalSchema()&&void 0!=t)return t instanceof re?t:"bigDecimal"===t.type&&"string"in t?new re(t.string,t.type):new re(String(t),"bigDecimal");if(i.isNumericSchema()&&"string"==typeof t){switch(t){case"Infinity":return 1/0;case"-Infinity":return -1/0;case"NaN":return 0/0}return t}if(i.isDocumentSchema()&&r)if(Array.isArray(t))for(let e=0;e<t.length;++e){let r=t[e];r instanceof re||(t[e]=this._read(i,r))}else for(let e in t){"__proto__"===e&&rh(t);let r=t[e];r instanceof re||(t[e]=this._read(i,r))}return t}_readStruct(e,t){let r,i,s=e.isUnionSchema(),n={},a="string"==typeof t.__type,{jsonName:o}=this.settings;for(let[l,c]of(o&&a&&(r={}),s&&(i=new rt(t,n)),e.structIterator())){let e=l;o&&(e=c.getMergedTraits().jsonName??e,a&&(r[e]=l)),s&&i.mark(e),null!=t[e]&&(n[l]=this._read(c,t[e]))}if(s)i.writeUnknown();else if(a)for(let e in t){let i=t[e],s=o?r[e]??e:e;s in n||(n[s]=i)}return n}needsTransform(e){return!!(e.isBlobSchema()||e.isTimestampSchema()||e.isBigIntegerSc
10hema()||e.isBigDecimalSchema()||e.isDocumentSchema()||e.isStructSchema()||e.isListSchema()||e.isMapSchema()||e.isStringSchema()&&e.getMergedTraits().mediaType)}}class rf extends Uint8Array{string=null;static allocUnsafe(e){if("function"==typeof Buffer){let t=Buffer.allocUnsafe(e);return new rf(t.buffer,t.byteOffset,t.byteLength)}return new rf(e)}toString(){return this.s()}valueOf(){return this.s()}includes(e,t){return"string"==typeof e?this.s().includes(e,t):Uint8Array.prototype.includes.call(this,e,t)}indexOf(e,t){return"string"==typeof e?this.s().indexOf(e,t):Uint8Array.prototype.indexOf.call(this,e,t)}lastIndexOf(e,t){if("string"==typeof e)return this.s().lastIndexOf(e,t);let r=Uint8Array.prototype.lastIndexOf;return void 0!==t?r.call(this,e,t):r.call(this,e)}startsWith(e,t){return this.s().startsWith(e,t)}endsWith(e,t){return this.s().endsWith(e,t)}match(e){return this.s().match(e)}replace(e,t){return this.s().replace(e,t)}search(e){return this.s().search(e)}split(e,t){return this.s().split(e,t)}substring(e,t){return this.s().substring(e,t)}trim(){return this.s().trim()}trimStart(){return this.s().trimStart()}trimEnd(){return this.s().trimEnd()}charAt(e){return this.s().charAt(e)}charCodeAt(e){return this.s().charCodeAt(e)}padStart(e,t){return this.s().padStart(e,t)}padEnd(e,t){return this.s().padEnd(e,t)}repeat(e){return this.s().repeat(e)}toUpperCase(){return this.s().toUpperCase()}toLowerCase(){return this.s().toLowerCase()}s(){if(null==this.string){let e=Date.now();e>rp+6e4&&(console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. It has been automatically converted to string. In a future version this will throw an error."),rp=e),this.string=(0,ef.P)(this)}return this.string}}var rp=0;let rg=new TextEncoder,rm=new Uint8Array([116,114,117,101]),ry=new Uint8Array([102,97,108,115,101]),rw=new Uint8Array([110,117,108,108]),rS=Array(128).fill(null);rS[8]="b",rS[9]="t",rS[10]="n",rS[12]="f",rS[13]="r",rS[34]='"',rS[92]="\\";for(let e=0;e<32;e++)null===rS[e]&&(rS[e]="u00"+e.toString(16).padStart(2,"0"));function rb(e){return rf.allocUnsafe(e)}class rv extends t5{settings;json;i=0;rootSchema;rawValue;passthrough=!1;constructor(e){super(),this.settings=e,this.json=rb(2048)}write(e,t){this.i=0,this.rawValue=t,this.rootSchema=tK.l1.of(e),this.passthrough=this.rootSchema.isBlobSchema()||this.rootSchema.isStringSchema(),this.passthrough||this.writeValue(this.rootSchema,t,void 0)}writeDiscriminatedDocument(e,t){this.i=0,this.rootSchema=tK.l1.of(e);let r=this.rootSchema;if(r.isStructSchema()&&null!=t&&"object"==typeof t){this.writeValue(r,t,void 0);let e=`"__type":"${r.getName(!0)??"Unknown"}",`,i=e.length;this.ensure(i),this.json.copyWithin(1+i,1,this.i),rg.encodeInto(e,this.json.subarray(1)),this.i+=i}else this.writeValue(r,t,void 0)}flush(){this.rootSchema=void 0;let e=this.i;this.i=0;let t=this.rawValue;if(this.rawValue=void 0,0===e)return t;let r=this.json.subarray(0,e);return this.json=rb(2048),r}ensure(e){let{i:t,json:r}=this;if(t+e>r.length){let i=2*r.length;for(;i<t+e;)i*=2;let s=rb(i);s.set(this.json),this.json=s}}writeAscii(e){let t=e.length;this.ensure(t);let{i:r,json:i}=this;for(let s=0;s<t;++s)i[r]=e.charCodeAt(s),r+=1;this.i=r}writeAsciiQuoted(e){let t=e.length;this.ensure(t+4);let{json:r,i}=this;r[i++]=34;for(let s=0;s<t;++s)r[i++]=e.charCodeAt(s);r[i++]=34,this.i=i}writeJsonString(e){this.ensure(3*e.length+2),this.json[this.i++]=34;let t=e.length;for(let r=0;r<t;++r){let i=e.charCodeAt(r);if(i>34&&i<92)this.json[this.i++]=i;else if(i<128){let e=rS[i];if(null!==e){this.ensure(e.length+1),this.json[this.i++]=92;for(let t=0;t<e.length;t++)this.json[this.i++]=e.charCodeAt(t)}else this.json[this.i++]=i}else if(i>=55296&&i<=56319){let s=r+1<t?e.charCodeAt(r+1):0;if(s>=56320&&s<=57343){this.ensure(4);let{written:t}=rg.encodeInto(e.substring(r,r+2),this.json.subarray(this.i));this.i+=t,++r}else this.ensure(6),this.writeUnicodeEscape(i)}else if(i>=56320&&i<=57343)this.ensure(6),this.writeUnicodeEscape(i);else{let{i:e,json:t}=this;i<2048?t[e++]=192|i>>6:(t[e++]=224|i>>12,t[e++]=128|i>>6&63),t[e++]=128|63&i,this.i=e}}this.json[this.i++]=34}writeUnicodeEscape(e){let{json:t,i:r}=this;t[r++]=92,t[r++]=117;let i=e.toString(16).padStart(4,"0");for(let e=0;e<4;++e)t[r++]=i.charCodeAt(e);this.i=r}static B64=(()=>{let e=new Uint8Array(64);for(let t=0;t<64;++t)e[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
10+/".charCodeAt(t);return e})();writeBase64(e){let t=4*Math.ceil(e.length/3);this.ensure(t+2);let r=this.json,i=rv.B64,s=this.i;r[s++]=34;let n=e.length,a=n%3,o=n-a;for(let t=0;t<o;t+=3){let n=e[t],a=e[t+1],o=e[t+2];r[s++]=i[n>>2],r[s++]=i[(3&n)<<4|a>>4],r[s++]=i[(15&a)<<2|o>>6],r[s++]=i[63&o]}if(2===a){let t=e[o],n=e[o+1];r[s++]=i[t>>2],r[s++]=i[(3&t)<<4|n>>4],r[s++]=i[(15&n)<<2],r[s++]=61}else if(1===a){let t=e[o];r[s++]=i[t>>2],r[s++]=i[(3&t)<<4],r[s++]=61,r[s++]=61}r[s++]=34,this.i=s}writeValue(e,t,r){if(null==t){if(r?.isStructSchema())return void 0===t&&tK.l1.of(e).isIdempotencyToken()?void this.writeAsciiQuoted(em()):void 0;return this.ensure(4),this.json.set(rw,this.i),void(this.i+=4)}let i=tK.l1.of(e),s="object"==typeof t;if(i.isStringSchema()){let e=i.getMergedTraits().mediaType;if(e&&("application/json"===e||e.endsWith("+json")))return void this.writeJsonString(t9.from(t).toString())}if(s){if(i.isStructSchema())return void this.writeStruct(i,t);if(Array.isArray(t)&&(i.isListSchema()||i.isDocumentSchema()))return void this.writeList(i,t,i.isDocumentSchema());if(i.isMapSchema())return void this.writeMap(i,t,!1);if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return void this.writeBase64(t);if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))return void this.writeTimestamp(i,t);if(t instanceof re)return void this.writeAscii(t.string);if(i.isDocumentSchema())return void(Array.isArray(t)?this.writeList(i,t,!0):this.writeMap(i,t,!0));let e=JSON.stringify(t);return void this.writeAscii(e)}if("string"==typeof t){if(i.isBlobSchema()){let e=(this.serdeContext?.base64Encoder??eh)(t);this.writeAsciiQuoted(e);return}this.writeJsonString(t);return}if("number"==typeof t){if(1/0===Math.abs(t)||Number.isNaN(t))return void this.writeAsciiQuoted(String(t));let e=String(t);return void this.writeAscii(e)}if("boolean"==typeof t){this.ensure(5);let{i:e,json:r}=this;t?(r.set(rm,e),e+=4):(r.set(ry,e),e+=5),this.i=e;return}"bigint"==typeof t?this.writeAscii(t.toString()):this.writeAscii(String(t))}writeStruct(e,t){let r;this.ensure(2),this.json[this.i++]=123;let i=!1,s="string"==typeof t.__type;for(let[n,a]of(s&&(r=new Set),e.structIterator())){let s=t[n];if(null==s&&!a.isIdempotencyToken())continue;i&&(this.ensure(1),this.json[this.i++]=44),i=!0;let o=this.settings.jsonName?a.getMergedTraits().jsonName??n:n;r&&(r.add(n),r.add(o)),this.writeAsciiQuoted(o),this.json[this.i++]=58,this.writeValue(a,s,e)}if(!i&&e.isUnionSchema()){let{$unknown:r}=t;if(Array.isArray(r)){let[t,i]=r;this.writeAsciiQuoted(t),this.ensure(1),this.json[this.i++]=58,this.writeValue(15,i,e)}}else if(s)for(let e in t){if(r.has(e))continue;r.add(e);let s=t[e];i&&(this.ensure(1),this.json[this.i++]=44),i=!0,this.writeAsciiQuoted(e),this.ensure(1),this.json[this.i++]=58,this.writeValue(15,s,void 0)}this.ensure(1),this.json[this.i++]=125}writeList(e,t,r){let i=!!e.getMergedTraits().sparse,s=e.getValueSchema();if(!r&&(s.isStringSchema()||s.isNumericSchema()||s.isBooleanSchema())){let e,r=!1;for(let e=0;e<t.length;++e){let s=t[e];if(Number.isNaN(s)||1/0===s||-1/0===s||null==s&&!i){r=!0;break}}if(r){let r=[];for(let e=0;e<t.length;++e){let s=t[e];(null!=s||i)&&(Number.isNaN(s)||1/0===s||-1/0===s?r.push(String(s)):r.push(s))}e=JSON.stringify(r)}else e=JSON.stringify(t);this.ensure(3*e.length),this.i+=rg.encodeInto(e,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=91;let n=!1;for(let e=0;e<t.length;++e){let a=t[e];(r?void 0!==a:null!=a||i)&&(n&&(this.ensure(1),this.json[this.i++]=44),this.writeValue(s,a,void 0),n=!0)}this.ensure(1),this.json[this.i++]=93}writeMap(e,t,r){let i=!!e.getMergedTraits().sparse,s=e.getValueSchema();if(!r&&(s.isStringSchema()||s.isNumericSchema()||s.isBooleanSchema())){let e;for(let r in t){let s=t[r];Number.isNaN(s)||1/0===s||-1/0===s?((e??={})[r]=s,t[r]=String(s)):null!==s||i||((e??={})[r]=null,t[r]=void 0)}let r=JSON.stringify(t);e&&Object.assign(t,e),this.ensure(3*r.length),this.i+=rg.encodeInto(r,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=123;let n=!0;for(let e in t){let a=t[e];(r?void 0!==a:null!=a||i)&&(n||(this.ensure(1),this.json[this.i++]=44),n=!1,this.writeJsonString(e),this.ensure(1),this.json[this.i++]=58,this.writeValue(s,a,void 0))}this.ensure(1),this.json[this.i++]=125}writeTimestamp(e,t){switch(t8(e,this.settings)){case 5:{let e=t.toISOString().replace(".000Z","Z");this.writeAsciiQuoted(e);return}case 6:let r,i,s,n,a,o,l,c,u,h,d;return void this.writeAsciiQuoted((r=t.getUTCFullYear(),i=t.getUTCMonth(),s=t.getUTCDay(),n=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),l=t.getUTCSeconds(),c=n<10?`0${n}`:`${n}`,u=a<10?`0${a}`:`${a}`,h=o<10?`0${o}`:`${o}`,d=l<10?`0${l}`:`${l}`,`${eR[s]}, ${c} ${e$[i]} ${r} ${u}:${h}:${d} GMT`));default:{let e=String(t.getTime()/1e3);this.writeAscii(e);return}}}}class rE extends t5{settings;constructor(e){super(),this.settings=e}
10createSerializer(){let e=new rv(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){let e=new rd(this.settings);return e.setSerdeContext(this.serdeContext),e}}class rx extends t2{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:r,awsQueryCompatible:i,jsonCodec:s}){super({defaultNamespace:e,errorTypeRegistries:t}),this.serviceTarget=r,this.codec=s??new rE({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new t6(this.awsQueryCompatible)}async serializeRequest(e,t,r){let i=await super.serializeRequest(e,t,r);return i.path.endsWith("/")||(i.path+="/"),i.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,i.headers["x-amz-target"]=`${this.serviceTarget}.${e.name}`,this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),"unit"!==(0,t3.L)(e.input)&&i.body||(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(e,t,r,i,s){let{awsQueryCompatible:n}=this;n&&this.mixin.setQueryCompatError(i,r);let a=((e,t,r=!1)=>(({headers:e},t,r)=>{for(;r.length>0;)switch(r.shift()){case"header":let i=rc(e??{},"x-amzn-errortype");if(void 0!==i)return ru(e[i]);break;case"code":let s=rc(t??{},"code");if(s&&void 0!==t[s])return ru(t[s]);break;case"type":if(t?.__type!==void 0)return ru(t.__type)}})(e,t,r?["code","header","type"]:["type","code","header"]))(r,i,n)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);let{errorSchema:o,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,r,i,s,n?this.mixin.findQueryCompatibleError:void 0),c=tK.l1.of(o),u=i.message??i.Message??"UnknownError",h=new(this.compositeErrorRegistry.getErrorCtor(o)??Error)({}),d={},f=this.codec.createDeserializer();for(let[e,t]of c.structIterator())null!=i[e]&&(d[e]=f.readObject(t,i[e]));throw n&&this.mixin.queryCompatOutput(i,d),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:c.getMergedTraits().error,message:u},d),i)}}class rT extends rx{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:r,awsQueryCompatible:i,jsonCodec:s}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:r,awsQueryCompatible:i,jsonCodec:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class rC{digestLength=32;state=Int32Array.from(rA);w;buffer=new Uint8Array(64);bufferLength=0;bytesHashed=0;finished=!1;inner;outer;constructor(e){if(e){let t=rC.normalizeKey(e);this.inner=new rC,this.outer=new rC;let{inner:r,outer:i}=this,s=new Uint8Array(128);for(let e=0;e<64;++e)s[e]=54^t[e],s[e+64]=92^t[e];r.update(s.subarray(0,64)),i.update(s.subarray(64))}}update(e){if(this.finished)throw Error("Attempted to update an already finished HMAC.");if(this.inner)return void this.inner.update(e);let t=e5(e),r=0,{byteLength:i}=t;if(this.bytesHashed+=i,8*this.bytesHashed>0x1fffffffffffff)throw Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=t[r++],i--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0)}async digest(){let{inner:e,outer:t}=this;if(e&&t){if(this.finished)throw Error("Attempted to digest an already finished HMAC.");this.finished=!0;let r=e.digestSync();return t.update(r),t.digestSync()}return this.digestSync()}reset(){this.state=Int32Array.from(rA),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0}digestSync(){let e=this.state.slice(),t=this.buffer.slice(),r=this.bufferLength,i=8*this.bytesHashed,s=new DataView(t.buffer,t.byteOffset,t.byteLength);if(s.setUint8(r++,128),(r-1)%64>=56){for(let e=r;e<64;++e)s.setUint8(e,0);this.hashBufferWith(e,t),r=0}for(let e=r;e<56;++e)s.setUint8(e,0);s.setUint32(56,Math.floor(i/0x100000000),!1),s.setUint32(60,i,!1),this.hashBufferWith(e,t);let n=new Uint8Array(32);for(let t=0;t<8;++t)n[4*t]=e[t]>>>24&255,n[4*t+1]=e[t]>>>16&255,n[4*t+2]=e[t]>>>8&255,n[4*t+3]=e[t]>>>0&255;return n}static normalizeKey(e){let t=e5(e);if(t.byteLength>64){let e=new rC;e.update(t);let r=e.digestSync(),i=new Uint8Array(64);return i.set(r),i}if(t.byteLength<64){let e=new Uint8Array(64);return e.set(t),e}return t}hashBuffer(){this.hashBufferWith(this.state,this.buffer)}hashBufferWith(e,t){let r=this.w??=new Int32Array(64),i=e[0],s=e[1],n=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7];for(let e=0;e<64;++e){if(e<16)r[e]=(255&t[4*e])<<24|(255&t[4*e+1])<<16|(255&t[4*e+2])<<8|255&t[4*e+3];else{let t=r[e-2],i=(t>>
10>17|t<<15)^(t>>>19|t<<13)^t>>>10,s=((t=r[e-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3;r[e]=(i+r[e-7]|0)+(s+r[e-16]|0)}let h=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&l^~o&c)|0)+(u+(rR[e]+r[e]|0)|0)|0,d=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&n^s&n)|0;u=c,c=l,l=o,o=a+h|0,a=n,n=s,s=i,i=h+d|0}e[0]+=i,e[1]+=s,e[2]+=n,e[3]+=a,e[4]+=o,e[5]+=l,e[6]+=c,e[7]+=u}}let rA=new Int32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),rR=new Int32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),{digest:r$,sign:rI,importKey:rk}=globalThis?.crypto?.subtle??{},rP="function"==typeof r$&&"function"==typeof rI&&"function"==typeof rk?globalThis.crypto.subtle:void 0;class rM{digestLength=32;secret;pending=[];pendingBytes=0;fallback;finished=!1;constructor(e){e&&(this.secret=e5(e))}update(e){if(this.finished)throw Error("Attempted to update an already finished HMAC.");this.fallback?this.fallback.update(e):(this.pending.push(e.slice()),this.pendingBytes+=e.byteLength,this.pendingBytes>=8388608&&this.switchToFallback())}async digest(){if(this.fallback)return this.fallback.digest();if(this.secret&&this.finished)throw Error("Attempted to digest an already finished HMAC.");let e=tz(this.pending);if(rP){if(this.secret){this.finished=!0;let t=await rP.importKey("raw",this.secret,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return new Uint8Array(await rP.sign("HMAC",t,e))}return new Uint8Array(await rP.digest("SHA-256",e))}let t=new rC(this.secret);return t.update(e),t.digest()}reset(){this.pending=[],this.pendingBytes=0,this.fallback=void 0,this.finished=!1}switchToFallback(){let e=new rC(this.secret);for(let t of this.pending)e.update(t);this.fallback=e,this.pending=[],this.pendingBytes=0}}var rO=r(22505);let rD={},rN=RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),r_=e=>rN.test(e)||e.startsWith("[")&&e.endsWith("]"),rj=(e,t=!1)=>{if(t){for(let t of e.split("."))if(!rj(t))return!1;return!0}return!(!L(e)||e.length<3||e.length>63||e!==e.toLowerCase()||r_(e))},rU={isVirtualHostableS3Bucket:rj,parseArn:e=>{let t=e.split(":");if(t.length<6)return null;let[r,i,s,n,a,...o]=t;return"arn"!==r||""===i||""===s||""===o.join(":")?null:{partition:i,service:s,region:n,accountId:a,resourceId:o.map(e=>e.split("/")).flat()}},partition:e=>{let{partitions:t}=c;for(let r of t){let{regions:t,outputs:i}=r;for(let[r,s]of Object.entries(t))if(r===e)return{...i,...s}}for(let r of t){let{regionRegex:t,outputs:i}=r;if(new RegExp(t).test(e))return{...i}}let r=t.find(e=>"aws"===e.id);if(!r)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}}};rD.aws=rU;class rL{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){let r=this.hash(e);if(!1===r)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let e=this.data.keys(),t=0;for(;;){let{value:r,done:i}=e.next();if(this.data.delete(r),i||++t>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(0===r.length)return!1;for(let i of r){let r=String(e[i]??"");if(r.includes("|;"))return!1;t+=r+"|;"}return t}}class rz extends Error{constructor(e){super(e),this.name="EndpointError"}}function rq(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${rq(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(rq).join(", ")})`:JSON.stringify(e,null,2)}let rB=(e,t)=>
10(e=>{let t=e.split("."),r=[];for(let i of t){let t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new rz(`Path: '${e}' does not end with ']'`);let s=i.slice(t+1,-1);if(Number.isNaN(parseInt(s)))throw new rz(`Invalid array index: '${s}' in path: '${e}'`);0!==t&&r.push(i.slice(0,t)),r.push(s)}else r.push(i)}return r})(t).reduce((r,i)=>{if("object"!=typeof r)throw new rz(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){let e=parseInt(i);return r[e<0?r.length+e:e]}return r[i]},e);(T=I||(I={})).HTTP="http",T.HTTPS="https";let rF={[I.HTTP]:80,[I.HTTPS]:443},rH={booleanEquals:(e,t)=>e===t,coalesce:function(...e){for(let t of e)if(null!=t)return t},getAttr:rB,isSet:e=>null!=e,isValidHostLabel:L,ite:function(e,t,r){return e?t:r},not:e=>!e,parseURL:e=>{let t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){let{hostname:t,port:r,protocol:i="",path:s="",query:n={}}=e,a=new URL(`${i}//${t}${r?`:${r}`:""}${s}`);return a.search=Object.entries(n).map(([e,t])=>`${e}=${t}`).join("&"),a}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:i,hostname:s,pathname:n,protocol:a,search:o}=t;if(o)return null;let l=a.slice(0,-1);if(!Object.values(I).includes(l))return null;let c=r_(s),u=r.includes(`${i}:${rF[l]}`)||"string"==typeof e&&e.includes(`${i}:${rF[l]}`),h=`${i}${u?`:${rF[l]}`:""}`;return{scheme:l,authority:h,path:n,normalizedPath:n.endsWith("/")?n:`${n}/`,isIp:c}},split:function(e,t,r){if(1===r)return[e];if(""===e)return[""];let i=e.split(t);return 0===r?i:i.slice(0,r-1).concat(i.slice(1).join(t))},stringEquals:(e,t)=>e===t,substring:(e,t,r,i)=>null==e||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:i?e.substring(e.length-r,e.length-t):e.substring(t,r),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},rV=(e,t)=>{let r=[],{referenceRecord:i,endpointParams:s}=t,n=0;for(;n<e.length;){let t=e.indexOf("{",n);if(-1===t){r.push(e.slice(n));break}r.push(e.slice(n,t));let a=e.indexOf("}",t);if(-1===a){r.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[a+1]&&(r.push(e.slice(t+1,a)),n=a+2);let o=e.substring(t+1,a);if(o.includes("#")){let[e,t]=o.split("#");r.push(rB(i[e]??s[e],t))}else r.push(i[o]??s[o]);n=a+1}return r.join("")},rW=(e,t,r)=>{if("string"==typeof e)return rV(e,r);if(e.fn)return rQ.callFunction(e,r);if(e.ref)return(({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e])(e,r);throw new rz(`'${t}': ${String(e)} is not a string, function or reference.`)},rG=({fn:e,argv:t},r)=>{let i=Array(t.length);for(let e=0;e<i.length;++e){let s=t[e];"boolean"==typeof s||"number"==typeof s?i[e]=s:i[e]=rQ.evaluateExpression(s,"arg",r)}let s=e.indexOf(".");if(-1!==s){let t=rD[e.slice(0,s)],r=t?.[e.slice(s+1)];if("function"==typeof r)return r(...i)}let n=rH[e];if("function"==typeof n)return n(...i);throw Error(`function ${e} not loaded in endpointFunctions.`)},rQ={evaluateExpression:rW,callFunction:rG},rJ=(e,t)=>{let{assign:r}=e;if(r&&r in t.referenceRecord)throw new rz(`'${r}' is already defined in Reference Record.`);let i=rG(e,t);t.logger?.debug?.(`endpoints evaluateCondition: ${rq(e)} = ${rq(i)}`);let s=""===i||!!i;return null!=r?{result:s,toAssign:{name:r,value:i}}:{result:s}},rK=(e,t)=>Object.entries(e).reduce((e,[r,i])=>(e[r]=rZ.getEndpointProperty(i,t),e),{}),rY=(e,t)=>{if(Array.isArray(e))return e.map(e=>rY(e,t));switch(typeof e){case"string":return rV(e,t);case"object":if(null===e)throw new rz(`Unexpected endpoint property: ${e}`);return rZ.getEndpointProperties(e,t);case"boolean":return e;default:throw new rz(`Unexpected endpoint property type: ${typeof e}`)}},rZ={getEndpointProperty:rY,getEndpointProperties:rK},rX="isSet",r0="PartitionResult",r1="booleanEquals",r2="getAttr",r3={ref:"Endpoint"},r4={ref:r0},r6={},r5=[{ref:"Region"}],r8=new Int32Array([-1,1,-1,0,12,3,1,4,1e8+11,2,5,1e8+11,3,8,6,4,7,1e8+10,5,1e8+8,1e8+9,4,10,9,6,1e8+6,1e8+7,5,11,1e8+5,6,1e8+4,1e8+5,3,1e8+1,13,4,1e8+2,1e8+3]),r9=(class e{nodes;root;conditions;results;
10constructor(e,t,r,i){this.nodes=e,this.root=t,this.conditions=r,this.results=i}static from(t,r,i,s){return new e(t,r,i,s)}}).from(r8,2,[[rX,[r3]],[rX,r5],["aws.partition",r5,r0],[r1,[{ref:"UseFIPS"},!0]],[r1,[{ref:"UseDualStack"},!0]],[r1,[{fn:r2,argv:[r4,"supportsDualStack"]},!0]],[r1,[{fn:r2,argv:[r4,"supportsFIPS"]},!0]]],[[-1],[-1,"Invalid Configuration: FIPS and custom endpoint are not supported"],[-1,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[r3,r6],["https://athena-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",r6],[-1,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://athena-fips.{Region}.{PartitionResult#dnsSuffix}",r6],[-1,"FIPS is enabled but this partition does not support FIPS"],["https://athena.{Region}.{PartitionResult#dualStackDnsSuffix}",r6],[-1,"DualStack is enabled but this partition does not support DualStack"],["https://athena.{Region}.{PartitionResult#dnsSuffix}",r6],[-1,"Invalid Configuration: Missing Region"]]),r7=new rL({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ie=(e,t={})=>r7.get(e,()=>((e,t)=>{let{nodes:r,root:i,results:s,conditions:n}=e,a=i,o={},l={referenceRecord:o,endpointParams:t.endpointParams,logger:t.logger};for(;1!==a&&-1!==a&&a<1e8;){let e=3*(Math.abs(a)-1),[t,i,s]=[r[e],r[e+1],r[e+2]],[c,u,h]=n[t],d=rJ({fn:c,assign:h,argv:u},l);if(d.toAssign){let{name:e,value:t}=d.toAssign;o[e]=t}a=a>=0===d.result?i:s}if(a>=1e8){let e=s[a-1e8];if(-1===e[0]){let[,t]=e;throw new rz(rW(t,"Error",l))}let[t,r,i]=e;return{url:((e,t)=>{let r=rW(e,"Endpoint URL",t);if("string"==typeof r)try{return new URL(r)}catch(e){throw console.error(`Failed to construct URL with ${r}`,e),e}throw new rz(`Endpoint URL must be a string, got ${typeof r}`)})(t,l),properties:rK(r,l),headers:Object.entries(i??{}??{}).reduce((e,[t,r])=>(e[t]=r.map(e=>{let r=rW(e,"Header value entry",l);if("string"!=typeof r)throw new rz(`Header '${t}' value '${r}' is not a string`);return r}),e),{})}}throw new rz("No matching endpoint.")})(r9,{endpointParams:e,logger:t.logger}));rD.aws=rU;var it=r(71410);(C=k||(k={})).MD5="md5",C.CRC32="crc32",C.CRC32C="crc32c",C.SHA1="sha1",C.SHA256="sha256";let ir=Object.values(k);class ii extends j{config;constructor(...[e]){var t,r,i;let s,c,d,f,y,w,E=(s=(({defaultsMode:e}={})=>{var t;let r,i,s,n;return t=async()=>{let t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve((()=>{let e=window?.navigator;if(e?.connection){let{effectiveType:t,rtt:r,downlink:i}=e.connection;if("string"==typeof t&&"4g"!==t||Number(r)>100||10>Number(i))return!0}return e?.userAgentData?.mobile||"number"==typeof e?.maxTouchPoints&&e?.maxTouchPoints>1})()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw Error(`Invalid parameter for "defaultsMode", expect ${tO.join(", ")}, got ${t}`)}},n=async()=>{i||(i=t());try{r=await i,s=!0}finally{i=void 0}return r},async e=>((!s||e?.forceRefresh)&&(r=await n()),r)})(t=e||{}),c=()=>s().then(tM),{...d={apiVersion:"2017-05-18",base64Decoder:t?.base64Decoder??ec,base64Encoder:t?.base64Encoder??eh,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??ie,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??tI,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new tJ}],logger:t?.logger??new en,protocol:t?.protocol??rT,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.athena",errorTypeRegistries:it.q1U,version:"2017-05-18",serviceTarget:"AmazonAthena"},serviceId:t?.serviceId??"Athena",sha256:t?.sha256??rM,urlParser:t?.urlParser??rO.D,utf8Decoder:t?.utf8Decoder??eu.a,utf8Encoder:t?.utf8Encoder??ef.P},...t,runtime:"browser",defaultsMode:s,bodyLengthChecker:t?.bodyLengthChecker??tN,credentialDefaultProvider:t?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??(({serviceId:e,clientVersion:t})=>async r=>{let i="u">typeof window?window.navigator:void 0,s=i?.userAgent??"",n=i?.userAgentData?.platform??tP.os(s)??"other",a=i?.userAgentData?.brands??[],o=a[a.length-1],l=o?.brand??tP.browser(s)??"unknown",c=o?.version??"unknown",u=[["aws-sdk-js",t],["ua","2.1"],[`os/${n}`,void 0],["lang/js"],["md/browser",`${l}_${c}`]];e&&u.push([`api/${e}`,t]);let h=await r?.userAgentAppId?.();return h&&u.push([`app/${h}`]),u})({serviceId:d.serviceId,clientVersion:"3.1139.0"}
10),maxAttempts:t?.maxAttempts??3,region:t?.region??(()=>Promise.reject("Region is missing")),requestHandler:tU.create(t?.requestHandler??c),retryMode:t?.retryMode??(async()=>(await c()).retryMode||u),streamCollector:t?.streamCollector??tq,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(!1)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(!1))});super(E),this.initConfig=E;let x=(e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw Error("Region is missing");return Object.assign(e,{region:async()=>{let e,r=q(e="function"==typeof t?await t():t)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;return((e,t=L)=>{if(z.has(e)||t(e))z.add(e);else if("*"===e)console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw Error(`Region not accepted: region="${e}" is not a valid hostname component.`)})(r),r},useFipsEndpoint:async()=>!!q("string"==typeof t?t:await t())||("function"!=typeof r?Promise.resolve(!!r):r())})})((e=>{let{retryStrategy:t,retryMode:r}=e,{defaultMaxAttempts:i=3,defaultBaseDelay:s=h.delay()}=(void 0)??{},n=(0,V.t)(e.maxAttempts??i),a=t?Promise.resolve(t):void 0,o=async()=>{let e=await n();return await (0,V.t)(r)()===R.ADAPTIVE?new ei(n,{maxAttempts:e,baseDelay:s}):new er({maxAttempts:e,baseDelay:s})};return Object.assign(e,{maxAttempts:n,retryStrategy:()=>a??=o()})})(function(e){let t=n(e.userAgentAppId??a),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:"string"==typeof r?[[r]]:r,userAgentAppId:async()=>{let r=await t();if(!(void 0===r||"string"==typeof r&&r.length<=50)){let t=e.logger?.constructor?.name!=="NoOpLogger"&&e.logger?e.logger:console;"string"!=typeof r?t?.warn("userAgentAppId must be a string or undefined."):r.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}((0,tk.v)(E)))),T=((e,t)=>{var r;let i,s,n,a,o,l=Object.assign({setRegion(t){e.region=t},region(){return e.region}},Object.assign((e=>{let t=[];for(let r in k){if(!(0,O.$)(k,r))continue;let i=k[r];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}for(let[r,i]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>i});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};let i=r.algorithmId(),s=r.checksumConstructor();ir.includes(i)?e.checksumAlgorithms[i.toUpperCase()]=s:e.checksumAlgorithms[i]=s,t.push(r)},checksumAlgorithms(){return t}}})(e),{setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),(e.logger&&e.logger.constructor?.name!=="NoOpLogger"&&e.requestHandler?.updateHttpClientConfig?.(Symbol.for("logger"),e.logger),{setHttpHandler(t){e.requestHandler=t},httpHandler(){return e.requestHandler},updateHttpClientConfig(t,r){e.requestHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.requestHandler.httpHandlerConfigs()}}),(n=e.httpAuthSchemes,a=e.httpAuthSchemeProvider,o=e.credentials,{setHttpAuthScheme(e){let t=n.findIndex(t=>t.schemeId===e.schemeId);-1===t?n.push(e):n.splice(t,1,e)},httpAuthSchemes(){return n},setHttpAuthSchemeProvider(e){a=e},httpAuthSchemeProvider(){return a},setCredentials(e){o=e},credentials(){return o}}));t.forEach(e=>e.configure(l));return Object.assign(e,{region:l.region()},Object.assign((i={},(r=l).checksumAlgorithms().forEach(e=>{let t=e.algorithmId();ir.includes(t)&&(i[t]=e.checksumConstructor())}),i),((s={}).retryStrategy=r.retryStrategy(),s)),{requestHandler:l.httpHandler()},{httpAuthSchemes:l.httpAuthSchemes(),httpAuthSchemeProvider:l.httpAuthSchemeProvider(),credentials:l.credentials()})})(Object.assign(tR(r=(0,B.Co)(x)),{authSchemePreference:(0,V.t)(r.authSchemePreference??[])}),e?.extensions||[]);this.config=T,this.middlewareStack.use((i=this.config,{applyToStack:e=>{e.add((e,t)=>async r=>{let{operationSchema:s}=(0,P.u)(t),[,n,a,o,l,c]=s??[],u=t.endpointV2?async()=>(0,e0.a)(t.endpointV2):i.endpoint,h=await i.protocol.serializeRequest(eZ(n,a,o,l,c),r.input,{...i,...t,endpoint:u});return e({...r,request:h})},e2),e.add((e,t)=>async r=>{let{response:s}=await e(r),{operationSchema:n}=(0,P.u)(t),[,a,o,l,c,u]=n??[];try{let e=await i.protocol.deserializeResponse(eZ(a,o,l,c,u),{...i,...t},s);return{response:s,output:e}}catch(e){if(Object.defineProperty(e,"$response",{value:s,enumerable:!1,writable:!1,
10configurable:!1}),!("$metadata"in e)){let r="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n  "+r}catch(e){t.logger&&t.logger?.constructor?.name!=="NoOpLogger"?t.logger?.warn?.(r):console.warn(r)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(ey.isInstance(s)){let{headers:t={},statusCode:r}=s,i=Object.entries(t);e.$metadata={httpStatusCode:r,requestId:eX(/^x-[\w-]+-request-?id$/,i),extendedRequestId:eX(/^x-[\w-]+-id-2$/,i),cfId:eX(/^x-[\w-]+-cf-id$/,i)}}}catch(e){}}throw e}},e1),i.protocol.setSerdeContext(i)}})),this.middlewareStack.use((f=this.config,{applyToStack:e=>{e.add((e,t)=>async r=>{let{request:i}=r;if(!o.isInstance(i))return e(r);let{headers:s}=i,n=t?.userAgent?.map(S)||[],a=(await f.defaultUserAgentProvider()).map(S);await p(t,f,r),a.push(`m/${function(e){let t="";for(let r in e){let i=e[r];if(t.length+i.length+1<=1024){t.length?t+=","+i:t+=i;continue}break}return t}(Object.assign({},t.__smithy_context?.features,t.__aws_sdk_context?.features))}`);let l=f?.customUserAgent?.map(S)||[],c=await f.userAgentAppId();c&&a.push(S(["app",`${c}`]));let u=[].concat([...a,...n,...l]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...l].join(" ");return"browser"!==f.runtime?(h&&(s[m]=s[m]?`${s[g]} ${h}`:h),s[g]=u):s[m]=u,e({...r,request:i})},b)}})),this.middlewareStack.use(eY(this.config)),this.middlewareStack.use((y=this.config,{applyToStack:e=>{var t;e.add((t=y.bodyLengthChecker,e=>async r=>{let i=r.request;if(o.isInstance(i)){let{body:e,headers:r}=i;if(e&&-1===Object.keys(r).map(e=>e.toLowerCase()).indexOf(F))try{let r=t(e);null!=r&&(i.headers={...i.headers,[F]:String(r)})}catch(e){}}return e({...r,request:i})}),H)}})),this.middlewareStack.use((w=this.config,{applyToStack:e=>{e.add(e=>async t=>{if(!o.isInstance(t.request))return e(t);let{request:r}=t,{handlerProtocol:i=""}=w.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 e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return e(t)},l)}})),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async r=>{try{let i=await e(r),{clientName:s,commandName:n,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:c}=o,u=l??t.inputFilterSensitiveLog,h=c??t.outputFilterSensitiveLog,{$metadata:d,...f}=i.output;return a?.info?.({clientName:s,commandName:n,input:u(r.input),output:h(f),metadata:d}),i}catch(l){let{clientName:e,commandName:i,logger:s,dynamoDbDocumentClientOptions:n={}}=t,{overrideInputFilterSensitiveLog:a}=n,o=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:e,commandName:i,input:o(r.input),error:l,metadata:l.$metadata}),l}},v)}})),this.middlewareStack.use((this.config,{applyToStack:e=>{}})),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:i=>{let s;i.addRelativeTo((s={httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r},(t,r)=>async i=>{let n=((e,t)=>{if(!t||0===t.length)return e;let r=[];for(let i of t)for(let t of e)t.schemeId.split("#")[1]===i&&r.push(t);for(let t of e)r.find(({schemeId:e})=>e===t.schemeId)||r.push(t);return r})(e.httpAuthSchemeProvider(await s.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),a=function(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}(e.httpAuthSchemes),o=(0,P.u)(r),l=[];for(let t of n){let i=a.get(t.schemeId);if(!i){l.push(`HttpAuthScheme \`${t.schemeId}\` was not enabled for this service.`);continue}let n=i.identityProvider(await s.identityProviderConfigProvider(e));if(!n){l.push(`HttpAuthScheme \`${t.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:c={},signingProperties:u={}}=t.propertiesExtractor?.(e,r)||{};t.identityProperties=Object.assign(t.identityProperties||{},c),t.signingProperties=Object.assign(t.signingProperties||{}
10,u),o.selectedHttpAuthScheme={httpAuthOption:t,identity:await n(t.identityProperties),signer:i.signer};break}if(!o.selectedHttpAuthScheme)throw Error(l.join("\n"));return t(i)}),M)}}))(this.config,{httpAuthSchemeParametersProvider:t$,identityProviderConfigProvider:async e=>new D({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use((this.config,{applyToStack:e=>{e.addRelativeTo((e,t)=>async r=>{if(!o.isInstance(r.request))return e(r);let i=(0,P.u)(t).selectedHttpAuthScheme;if(!i)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:s={}},identity:n,signer:a}=i,l=await e({...r,request:await a.sign(r.request,n,s)}).catch((a.errorHandler||(e=>e=>{throw e}))(s));return(a.successHandler||((e,t)=>{}))(l.response,s),l},N)}}))}destroy(){super.destroy()}}},5491:function(e,t,r){r.d(t,{lq:function(){return p},yt:function(){return g},G5:function(){return f}});var i,s,n=r(7267),a=r(27959),o=r(88754);let l="***SensitiveInformation***";function c(e,t){if(null==t)return t;let r=o.l1.of(e);if(r.getMergedTraits().sensitive)return l;
10if(r.isListSchema()){if(r.getValueSchema().getMergedTraits().sensitive)return l}else if(r.isMapSchema()){if(r.getKeySchema().getMergedTraits().sensitive||r.getValueSchema().getMergedTraits().sensitive)return l}else if(r.isStructSchema()&&"object"==typeof t){let e={};for(let[i,s]of r.structIterator())null!=t[i]&&(e[i]=c(s,t[i]));return e}return t}class u{middlewareStack=(0,a.o)();schema;static classBuilder(){return new h}resolveMiddlewareWithContext(e,t,r,{middlewareFn:i,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:u,CommandCtor:h}){for(let s of i.bind(this)(h,e,t,r))this.middlewareStack.use(s);let d=e.concat(this.middlewareStack),{logger:f}=t,p=u[n.V],g={logger:f,clientName:s,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,...u,[n.V]:{...p,commandInstance:this,...c,...r?.metricsRecorder===void 0?{}:{metricsRecorder:r.metricsRecorder}}},{requestHandler:m}=t,y=r??{};return y.metricsRecorder&&(y={...y},delete y.metricsRecorder),c.eventStream&&(y={isEventStream:!0,...y}),d.resolve(e=>m.handle(e.request,y),g)}}class h{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){let e,t=this;return e=class extends u{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[e]){super(),this.input=e??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,s){let n=t._operationSchema,a=n?.[4]??n?.input,o=n?.[5]??n?.output;return this.resolveMiddlewareWithContext(r,i,s,{CommandCtor:e,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(n?c.bind(null,a):e=>e),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(n?c.bind(null,o):e=>e),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}var d=r(67670);let f=(i=r(96016).S,s=d.rD,function(e,t,r,n,a={}){let o=Object.assign({},i,e);return u.classBuilder().ep(o).m(function(e,r,i,n){let a=t.call(this,e,r,i,n);return a.unshift(s(i,e.getEndpointParameterInstructions())),a}).s("AmazonAthena",r,a).n("AthenaClient",r.charAt(0).toUpperCase()+r.slice(1)+"Command").sc(n).build()}),p={},g=(e,t,r,i)=>[]},48787:function(e,t,r){r.d(t,{m:function(){return n}});var i=r(5491),s=r(71410);
10class n extends(0,i.G5)(i.lq,i.yt,"GetQueryExecution",s.$A0){}},15179:function(e,t,r){r.d(t,{s:function(){return n}});var i=r(5491),s=r(71410);class n extends(0,i.G5)(i.lq,i.yt,"GetQueryResults",s.vYG){}},15999:function(e,t,r){r.d(t,{W:function(){return n}});var i=r(5491),s=r(71410);class n extends(0,i.G5)(i.lq,i.yt,"StartQueryExecution",s.XKC){}},89045:function(e,t,r){r.d(t,{a:function(){return n}});var i=r(5491),s=r(71410);class n extends(0,i.G5)(i.lq,i.yt,"StopQueryExecution",s.r9W){}},96016:function(e,t,r){r.d(t,["S",0,{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},"v",0,e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"athena"})])},71410:function(e,t,r){r.d(t,{$A0:function(){return ek},vYG:function(){return eP},XKC:function(){return eM},r9W:function(){return eO},q1U:function(){return J}});var i=r(97870),s=r(73384);class n extends s.T{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}class a extends n{name="InternalServerException";$fault="server";Message;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,a.prototype),this.Message=e.Message}}class o extends n{name="InvalidRequestException";$fault="client";AthenaErrorCode;Message;constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),Object.setPrototypeOf(this,o.prototype),this.AthenaErrorCode=e.AthenaErrorCode,this.Message=e.Message}}class l extends n{name="TooManyRequestsException";$fault="client";Message;Reason;constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,l.prototype),this.Message=e.Message,this.Reason=e.Reason}}class c extends n{name="ResourceNotFoundException";$fault="client";Message;ResourceName;constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,c.prototype),this.Message=e.Message,this.ResourceName=e.ResourceName}}class u extends n{name="MetadataException";$fault="client";Message;constructor(e){super({name:"MetadataException",$fault:"client",...e}),Object.setPrototypeOf(this,u.prototype),this.Message=e.Message}}class h extends n{name="SessionAlreadyExistsException";$fault="client";Message;constructor(e){super({name:"SessionAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,h.prototype),this.Message=e.Message}}let d="AclConfiguration",f="AthenaError",p="ColumnInfo",g="Enabled",m="EncryptionConfiguration",y="EngineConfiguration",w="ExecutionParameters",S="EngineVersion",b="KmsKey",v="Message",E="ManagedQueryResultsConfiguration",x="Name",T="NextToken",C="QueryExecutionContext",A="QueryExecutionId",R="QueryExecution",$="QueryResultsS3AccessGrantsConfiguration",I="ResultConfiguration",k="ResultReuseByAgeConfiguration",P="ResultReuseConfiguration",M="ResultReuseInformation",O="ResultSet",D="ResultSetMetadata",N="WorkGroup",_="client",j="error",U="smithy.ts.sdk.synthetic.com.amazonaws.athena",L="com.amazonaws.athena",z=new i.O(U);var q=[-3,U,"AthenaServiceException",0,[],[]];z.registerError(q,n);let B=new i.O(L);var F=[-3,L,"InternalServerException",{[j]:"server"},[v],[0]];B.registerError(F,a);var H=[-3,L,"InvalidRequestException",{[j]:_},["AthenaErrorCode",v],[0,0]];B.registerError(H,o);var V=[-3,L,"MetadataException",{[j]:_},[v],[0]];B.registerError(V,u);var W=[-3,L,"ResourceNotFoundException",{[j]:_},[v,"ResourceName"],[0,0]];B.registerError(W,c);var G=[-3,L,"SessionAlreadyExistsException",{[j]:_},[v],[0]];B.registerError(G,h);var Q=[-3,L,"TooManyRequestsException",{[j]:_},[v,"Reason"],[0,0]];B.registerError(Q,l);let J=[z,B];var K=[3,L,d,0,["S3AclOption"],[0],1],Y=[3,L,f,0,["ErrorCategory","ErrorType","Retryable","ErrorMessage"],[1,1,2,0]],Z=[3,L,"Classification",0,[x,"Properties"],[0,128]],X=[3,L,p,0,[x,"Type","CatalogName","SchemaName","TableName","Label","Precision","Scale","Nullable","CaseSensitive"],[0,0,0,0,0,0,1,1,0,2],2],ee=[3,L,"Datum",0,["VarCharValue"],[0]],et=[3,L,m,0,["EncryptionOption",b],[0,0],1],er=[3,L,y,0,["CoordinatorDpuSize","MaxConcurrentDpus","DefaultExecutorDpuSize","AdditionalConfigs","SparkProperties","Classifications"],[1,1,1,128,128,()=>eA]],ei=[3,L,S,0,["SelectedEngineVersion","EffectiveEngineVersion"],[0,0]],es=[3,L,"GetQueryExecutionInput",0,[A],[0],1],en=[3,L,"GetQueryExecutionOutput",0,[R],[()=>eu]],ea=[3,L,"GetQueryResultsInput",0,[A,T,"MaxResults","QueryResultType"],[0,0,1,0],1],eo=[3,L,"GetQueryResultsOutput",0,["UpdateCount",O,T],[1,()=>eS,0]],el=[3,L,E,0,[g,m],[2,()=>ec],1],ec=[3,L,"ManagedQueryResultsEncryptionConfiguration",0,[b],[0],1],eu=[3,L,R,0,[A,"Query","StatementType",E,I,P,C,"Status","Statistics",N,S,w,"SubstatementType",$],[0,0,0,()=>el,()=>eg,()=>ey,()=>eh,()=>ef,()=>ed,0,()=>ei,64,0,()=>ep]],eh=[3,L,C,0,["Database","Catalog"],[0,0]],ed=[3,L,"QueryExecutionStatistics",0,["EngineExecutionTimeInMillis","DataScannedInBytes","DataManifestLocation","TotalExecutionTimeInMillis","QueryQueueTimeInMillis","ServicePreProcessingTimeInMillis","QueryPlanningTimeInMillis","ServiceProcessingTimeInMillis",M,"DpuCount"],[1,1,0,1,1,1,1,1,()=>ew,1]],ef=[3,L,"QueryExecutionStatus",0,["State","StateChangeReason","SubmissionDateTime","CompletionDateTime",f],[0,0,4,4,()=>Y]],ep=[3,L,$,0,["EnableS3AccessGrants","AuthenticationType","CreateUserLevelPrefix"],[2,0,2],2],eg=[3,L,I,0,["OutputLocation",m,"ExpectedBucketOwner",d],[0,()=>et,0,()=>K]],em=[3,L,k,0,[g,"MaxAgeInMinutes"],[2,1],1],ey=[3,L,P,0,[k],[()=>em]],ew=[3,L,M,0,["ReusedPreviousResult"],[2],1],eS=[3,L,O,0,["Rows",D],[()=>eI,()=>eb]],eb=[3,L,D,0,[p],[()=>eR]],ev=[3,L,"Row",0,["Data"],[()=>e$]],eE=[3,L,"StartQueryExecutionInput",0,["QueryString","ClientRequestToken",C,I,N,w,P,y],[0,[0,4],()=>eh,()=>eg,0,64,()=>ey,()=>er],1],ex=[3,L,"StartQueryExecutionOutput",0,[A],[0]],eT=[3,L,"StopQueryExecutionInput",0,[A],[[0,4]]],eC=[3,L,"StopQueryExecutionOutput",0,[],[]],eA=[1,L,"ClassificationList",0,()=>Z],eR=[1,L,"ColumnInfoList",0,()=>X],e$=[1,L,"datumList",0,()=>ee],eI=[1,L,"RowList",0,()=>ev],ek=[9,L,"GetQueryExecution",0,()=>es,()=>en],eP=[9,L,"GetQueryResults",0,()=>ea,()=>
10eo],eM=[9,L,"StartQueryExecution",2,()=>eE,()=>ex],eO=[9,L,"StopQueryExecution",2,()=>eT,()=>eC]},27959:function(e,t,r){let i=(e,t)=>{let r=[];if(e&&r.push(e),t)for(let e of t)r.push(e);return r},s=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,n=()=>{let e=[],t=[],r=!1,l=new Set,c=r=>(e.forEach(e=>{r.add(e.middleware,{...e})}),t.forEach(e=>{r.addRelativeTo(e.middleware,{...e})}),r.identifyOnResolve?.(d.identifyOnResolve()),r),u=e=>{let t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...u(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...u(e))}),t},h=(r=!1)=>{let n=[],l=[],c={};return e.forEach(e=>{let t={...e,before:[],after:[]};for(let e of i(t.name,t.aliases))c[e]=t;n.push(t)}),t.forEach(e=>{let t={...e,before:[],after:[]};for(let e of i(t.name,t.aliases))c[e]=t;l.push(t)}),l.forEach(e=>{if(e.toMiddleware){let t=c[e.toMiddleware];if(void 0===t){if(r)return;throw Error(`${e.toMiddleware} is not found when adding ${s(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}),n.sort((e,t)=>a[t.step]-a[e.step]||o[t.priority||"normal"]-o[e.priority||"normal"]).map(u).reduce((e,t)=>(e.push(...t),e),[])},d={add:(t,r={})=>{let{name:n,override:a,aliases:o}=r,c={step:"initialize",priority:"normal",middleware:t,...r},u=i(n,o);if(u.length>0){if(u.some(e=>l.has(e))){if(!a)throw Error(`Duplicate middleware name '${s(n,o)}'`);for(let t of u){let r=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===r)continue;let i=e[r];if(i.step!==c.step||c.priority!==i.priority)throw Error(`"${s(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${s(n,o)}" middleware with ${c.priority} priority in ${c.step} step.`);e.splice(r,1)}}for(let e of u)l.add(e)}e.push(c)},addRelativeTo:(e,r)=>{let{name:n,override:a,aliases:o}=r,c={middleware:e,...r},u=i(n,o);if(u.length>0){if(u.some(e=>l.has(e))){if(!a)throw Error(`Duplicate middleware name '${s(n,o)}'`);for(let e of u){let r=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===r)continue;let i=t[r];if(i.toMiddleware!==c.toMiddleware||i.relation!==c.relation)throw Error(`"${s(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${s(n,o)}" middleware ${c.relation} "${c.toMiddleware}" middleware.`);t.splice(r,1)}}for(let e of u)l.add(e)}t.push(c)},clone:()=>c(n()),use:e=>{e.applyToStack(d)},remove:r=>{let s,n;if("string"==typeof r){let s,n;return s=!1,n=e=>{let t=i(e.name,e.aliases);if(t.includes(r)){for(let e of(s=!0,t))l.delete(e);return!1}return!0},e=e.filter(n),t=t.filter(n),s}return s=!1,n=e=>{if(e.middleware===r){for(let t of(s=!0,i(e.name,e.aliases)))l.delete(t);return!1}return!0},e=e.filter(n),t=t.filter(n),s},removeByTag:r=>{let s=!1,n=e=>{let{tags:t,name:n,aliases:a}=e;if(t&&t.includes(r)){for(let e of i(n,a))l.delete(e);return s=!0,!1}return!0};return e=e.filter(n),t=t.filter(n),s},concat:e=>{let t=c(n());return t.use(e),t.identifyOnResolve(r||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:c,identify:()=>h(!0).map(e=>{let t=e.step??e.relation+" "+e.toMiddleware;return s(e.name,e.aliases)+" - "+t}),identifyOnResolve(e){return"boolean"==typeof e&&(r=e),r},resolve:(e,t)=>{for(let r of h().map(e=>e.middleware).reverse())e=r(e,t);return r&&console.log(d.identify()),e}};return d},a={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},o={high:3,normal:2,low:1};r.d(t,["o",0,n])},73384:function(e,t,r){r.d(t,{T:function(){return i}});class i extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){return!!e&&(i.prototype.isPrototypeOf(e)||!!e.$fault&&!!e.$metadata&&("client"===e.$fault||"server"===e.$fault))}static[Symbol.hasInstance](e){if(!e)return!1;if(this===i)return i.isInstance(e);if(i.isInstance(e)){if(this.prototype.isPrototypeOf(e))return!0;let t=this.name;if(!t||!e.name)return!1;if(e.name===t)return!0;let r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;){let e=r.constructor?.name;if(e&&"Error"!==e&&e===t)return!0;r=Object.getPrototypeOf(r)}}return!1}}r.d(t,["M",0,(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,r])=>{(void 0==e[t]||""===e[t])&&(e[t]=r)});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e}])},67670:function(e,t,r){let i;r.d(t,{rD:function(){return b},Co:function(){return S}});let s=async e=>void 0,n=async e=>{let t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),u(t)){if(!0===e.ForcePathStyle)throw Error("Path-style addressing cannot be used with ARN buckets")}else c(t)&&(-1===t.indexOf(".")||String(e.Endpoint).startsWith("http:"))&&t.toLowerCase()===t&&!(t.length<3)||(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP
10=!0),e},a=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,o=/(\d+\.){3}\d+/,l=/\.\./,c=e=>a.test(e)&&!o.test(e)&&!l.test(e),u=e=>{let[t,r,i,,,s]=e.split(":"),n="arn"===t&&e.split(":").length>=6,a=!!(n&&r&&i&&s);if(n&&!a)throw Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},h=(e,t,r,i=!1)=>{let s=async()=>{let s;if(i){let i=r.clientContextParams;s=i?.[e]??r[e]??r[t]}else s=r[e]??r[t];return"function"==typeof s?s():s};return"credentialScope"===e||"CredentialScope"===t?async()=>{let e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{let e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===r.isCustomEndpoint)return;let e=await s();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){let{protocol:t,hostname:r,port:i,path:s}=e;return`${t}//${r}${i?":"+i:""}${s}`}}return e}:s};var d=r(52490);function f(e){return async(t,r,i,s)=>{if(!i.isCustomEndpoint&&!i.ignoreConfiguredEndpointUrls){let t;(t=i.serviceConfiguredEndpoint?await i.serviceConfiguredEndpoint():await e(i.serviceId))&&(i.endpoint=()=>Promise.resolve((0,d.a)(t)),i.isCustomEndpoint=!0,s?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${t}`))}let n=await p(t,r,i);if("function"!=typeof i.endpointProvider)throw Error("config.endpointProvider is not set.");let a=i.endpointProvider(n,s);if(i.isCustomEndpoint&&i.endpoint){let e=await i.endpoint();if(e?.headers)for(let[t,r]of(a.headers??={},Object.entries(e.headers)))a.headers[t]=Array.isArray(r)?r:[r]}return a}}let p=async(e,t,r)=>{let i={},s=t?.getEndpointParameterInstructions?.()||{};for(let[t,n]of Object.entries(s))switch(n.type){case"staticContextParams":i[t]=n.value;break;case"contextParams":i[t]=e[n.name];break;case"clientContextParams":case"builtInParams":i[t]=await h(n.name,t,r,"builtInParams"!==n.type)();break;case"operationContextParams":i[t]=n.get(e);break;default:throw Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(n))}return 0===Object.keys(s).length&&Object.assign(i,r),"s3"===String(r.serviceId).toLowerCase()&&await n(i),i};var g=r(92238);function m(e){let t=f(e);return({config:e,instructions:r})=>(i,s)=>async n=>{e.isCustomEndpoint&&(s.__smithy_context?s.__smithy_context.features||(s.__smithy_context.features={}):s.__smithy_context={features:{}},s.__smithy_context.features.ENDPOINT_OVERRIDE="N");let a=await t(n.input,{getEndpointParameterInstructions(){return r}},{...e},s);s.endpointV2=a,s.authSchemes=a.properties?.authSchemes;let o=s.authSchemes?.[0];if(o){s.signing_region=o.signingRegion,s.signing_service=o.signingName;let e=(0,g.u)(s),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return i({...n})}}let y={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"};var w=r(27277);f(s);let S=e=>{let t,r=e.tls??!0,{endpoint:i,useDualstackEndpoint:n,useFipsEndpoint:a}=e,o=Object.assign(e,{endpoint:null!=i?async()=>(0,d.a)(await (0,w.t)(i)()):void 0,tls:r,isCustomEndpoint:!!i,useDualstackEndpoint:(0,w.t)(n??!1),useFipsEndpoint:(0,w.t)(a??!1),ignoreConfiguredEndpointUrls:!!e.ignoreConfiguredEndpointUrls});return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!t&&(t=s(e.serviceId)),t),o};m(s);let b=(i=m(s),(e,t)=>({applyToStack:r=>{r.addRelativeTo(i({config:e,instructions:t}),y)}}))},97870:function(e,t,r){r.d(t,{O:function(){return i}});class i{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,r=new Map){this.namespace=e,this.schemas=t,this.exceptions=r,i.registries.has(e)||i.registries.set(e,this)}static for(e){return i.registries.get(e)??new i(e)}copyFrom(e){let{schemas:t,exceptions:r}=this;for(let[r,i]of e.schemas)t.has(r)||t.set(r,i);for(let[t,i]of e.exceptions)r.has(t)||r.set(t,i)}register(e,t){let r=this.normalizeShapeId(e);for(let e of[this,i.for(r.split("#")[0])])e.schemas.has(r)||e.schemas.set(r,t)}getSchema(e){let t=this.normalizeShapeId(e);if(!this.schemas.has(t)){if(!e.includes("#")){let t="#"+e,r=[];for(let[e,i]of this.schemas.entries())e.endsWith(t)&&r.push(i);if(1===r.length)return r[0]}throw Error(`@smithy/core/schema - schema not found for ${t}`)}return this.schemas.get(t)}registerError(e,t){let r=e[1],s=r+"#"+e[2];for(let n of[this,i.for(r)])n.schemas.has(s)||n.exceptions.has(e)||(n.schemas.set(s,e),n.exceptions.set(e,t))}getErrorCtor(e){return this.exceptions.has(e)?this.exceptions.get(e):i.for(e[1]).exceptions.get(e)}getBaseException(){for(let e of this.exceptions.keys())if(Array.isArray(e)){let[,t,r]=e,i=t+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return e}}find(e){for(let t of this.schemas.values())if(e(t))return t}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}},6625:function(e,t,r){r.d(t,["L",0,e=>"function"==typeof e?e():e])},88754:function(e,t,r){r.d(t,{l1:function(){return l}});var i=r(6625),s=r(56081);let n={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},a=[],o={};class l{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=l.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;let r=[],n=e,a=e;for(this._isMemberSchema=!1;u(n);)r.push(n[1]),n=n[0],a=(0,i.L)(n),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let e=r.length-1;e>=0;--e){let t=r[e];Object.assign(this.memberTraits,(0,s.c)(t))}}else this.memberTraits=0;if(a instanceof l){let e=this.memberTraits;Object.assign(this,a),this.memberTraits=Object.assign({},e,a.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=t??a.memberName;return}if(this.schema=(0,i.L)(a),h(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(a),this.traits=0),this._isMemberSchema&&!t)throw Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let t=this.prototype.isPrototypeOf(e);return t||"object"!=typeof e||null===e?t:e.symbol===this.symbol}static of(e){let t="function"==typeof e||"object"==typeof e&&null!==e;if("number"==typeof e){if(a[e])return a[e]}else if("string"==typeof e){if(o[e])return o[e]}else if(t&&e[n.ns])return e[n.ns];let r=(0,i.L)(e);if(r instanceof l)return r;if(u(r)){let[t,i]=r;if(t instanceof l)return Object.assign(t.getMergedTraits(),(0,s.c)(i)),t;throw Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}let c=new l(r);return t?e[n.ns]=c:"string"==typeof r?o[r]=c:"number"==typeof r?a[r]=c:c}getSchema(){let e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){let{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){let e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){let e=this.getSchema();if("object"!=typeof e)return!1;let t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){let e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){let e=this.getSchema();return 21===e||42===e}isTimestampSchema(){let e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}
10isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){let{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return(0,s.c)(this.memberTraits)}getOwnTraits(){return(0,s.c)(this.traits)}getKeySchema(){let[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let r=this.getSchema();return c([e?15:r[4]??0,0],"key")}getValueSchema(){let e=this.getSchema(),[t,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],s="number"==typeof e?63&e:e&&"object"==typeof e&&(r||i)?e[3+e[0]]:t?15:void 0;if(null!=s)return c([s,0],r?"value":"member");throw Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){let t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){let r=t[4].indexOf(e),i=t[5][r];return c(u(i)?i:[i,0],e)}if(this.isDocumentSchema())return c([15,0],e);throw Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){let e={};try{for(let[t,r]of this.structIterator())e[t]=r}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema()){for(let[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw Error("@smithy/core/schema - cannot iterate non-struct schema.");let e=this.getSchema(),t=e[4].length,r=e[n.it];if(r&&t===r.length)return void(yield*r);r=Array(t);for(let i=0;i<t;++i){let t=e[4][i],s=c([e[5][i],0],t);yield r[i]=[t,s]}e[n.it]=r}}function c(e,t){return e instanceof l?Object.assign(e,{memberName:t,_isMemberSchema:!0}):new l(e,t)}let u=e=>Array.isArray(e)&&2===e.length,h=e=>Array.isArray(e)&&e.length>=5},56081:function(e,t,r){r.d(t,{c:function(){return s}});let i=[];function s(e){if("object"==typeof e)return e;if(i[e|=0])return i[e];let t={},r=0;for(let i of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)==1&&(t[i]=1);return i[e]=t}},19733:function(e,t,r){r.d(t,{a:function(){return n},n:function(){return a}});let i={},s={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),i[e]=t,s[t]=e}function n(e){if(e.length%2!=0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let i=e.slice(r,r+2).toLowerCase();if(i in s)t[r/2]=s[i];else throw Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`)}return t}function a(e){let t="";for(let r=0;r<e.byteLength;r++)t+=i[e[r]];return t}},13107:function(e,t,r){r.d(t,["a",0,e=>new TextEncoder().encode(e)])},36326:function(e,t,r){r.d(t,["P",0,e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)}])},92238:function(e,t,r){var i=r(7267);r.d(t,["u",0,e=>e[i.V]||(e[i.V]={})])},44479:function(e,t,r){r.d(t,{$:function(){return i}});function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},27277:function(e,t,r){r.d(t,["t",0,e=>{if("function"==typeof e)return e;let t=Promise.resolve(e);return()=>t}])},22505:function(e,t,r){r.d(t,{D:function(){return i}});let i=e=>{let t;if("string"==typeof e)return i(new URL(e));let{hostname:r,pathname:s,port:n,protocol:a,search:o}=e;return o&&(t=function(e){let t={};if(e=e.replace(/^\?/,""))for(let r of e.split("&")){let[e,i=null]=r.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}(o)),{hostname:r,port:n?parseInt(n):void 0,protocol:a,path:s,query:t}}},52490:function(e,t,r){var i=r(44479),s=r(22505);r.d(t,["a",0,e=>{if("object"==typeof e){if("url"in e){let t=(0,s.D)(e.url);if(e.headers)for(let r in t.headers={},e.headers)(0,i.$)(e.headers,r)&&(t.headers[r.toLowerCase()]=e.headers[r].join(", "));return t}return e}return(0,s.D)(e)}])},7267:function(e,t,r){r.d(t,["V",0,"__smithy_context"])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.