dynamic-mui 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -449,7 +449,7 @@ ${f}\r
449
449
  If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async i=>{const s=await r();if(i==="base64")return rc(s);if(i==="hex")return Ci(s);if(i===void 0||i==="utf8"||i==="utf-8")return zu(s);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(DV);if(t=!0,_V(e))return o(e);if(jP(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},_V=e=>typeof Blob=="function"&&e instanceof Blob;async function JHe(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const uh=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return iu.mutate(e);if(!e)return iu.mutate(new Uint8Array);const r=t.streamCollector(e);return iu.mutate(await r)};function NV(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Yv=e=>typeof e=="function"?e():e,WW=(e,t,r,o,i)=>({name:t,namespace:e,traits:r,input:o,output:i}),eze=e=>(t,r)=>async o=>{const{response:i}=await t(o),{operationSchema:s}=ml(r),[,a,l,c,u,d]=s??[];try{const f=await e.protocol.deserializeResponse(WW(a,l,c,u,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const p="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
450
450
  `+p}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(p):r.logger?.warn?.(p)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(wu.isInstance(i)){const{headers:h={}}=i,b=Object.entries(h);f.$metadata={httpStatusCode:i.statusCode,requestId:$O(/^x-[\w-]+-request-?id$/,b),extendedRequestId:$O(/^x-[\w-]+-id-2$/,b),cfId:$O(/^x-[\w-]+-cf-id$/,b)}}}catch{}}throw f}},$O=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],tze=e=>(t,r)=>async o=>{const{operationSchema:i}=ml(r),[,s,a,l,c,u]=i??[],d=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint,f=await e.protocol.serializeRequest(WW(s,a,l,c,u),o.input,{...e,...r,endpoint:d});return t({...o,request:f})},nze={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rze={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function KW(e){return{applyToStack:t=>{t.add(tze(e),rze),t.add(eze(e),nze),e.protocol.setSerdeContext(e)}}}function Jd(e){if(typeof e=="object")return e;e=e|0;const t={};let r=0;for(const o of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[o]=1);return t}const FV={it:Symbol.for("@smithy/nor-struct-it")};class or{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=or.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const o=[];let i=t,s=t;for(this._isMemberSchema=!1;jO(i);)o.push(i[1]),i=i[0],s=Yv(i),this._isMemberSchema=!0;if(o.length>0){this.memberTraits={};for(let a=o.length-1;a>=0;--a){const l=o[a];Object.assign(this.memberTraits,Jd(l))}}else this.memberTraits=0;if(s instanceof or){const a=this.memberTraits;Object.assign(this,s),this.memberTraits=Object.assign({},a,s.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??s.memberName;return}if(this.schema=Yv(s),oze(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(s),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=Yv(t);if(r instanceof or)return r;if(jO(r)){const[o,i]=r;if(o instanceof or)return Object.assign(o.getMergedTraits(),Jd(i)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new or(r)}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Jd(this.memberTraits)}getOwnTraits(){return Jd(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const o=this.getSchema(),i=t?15:o[4]??0;return Kp([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,o,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],s=typeof t=="number"?63&t:t&&typeof t=="object"&&(o||i)?t[3+t[0]]:r?15:void 0;if(s!=null)return Kp([s,0],o?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const o=r[4].indexOf(t),i=r[5][o];return Kp(jO(i)?i:[i,0],t)}if(this.isDocumentSchema())return Kp([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,o]of this.structIterator())t[r]=o}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let o=t[FV.it];if(o&&r===o.length){yield*o;return}o=Array(r);for(let i=0;i<r;++i){const s=t[4][i],a=Kp([t[5][i],0],s);yield o[i]=[s,a]}t[FV.it]=o}}function Kp(e,t){if(e instanceof or)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=or;return new r(e,t)}const jO=e=>Array.isArray(e)&&e.length===2,oze=e=>Array.isArray(e)&&e.length>=5;class ti{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,o=new Map){this.namespace=t,this.schemas=r,this.exceptions=o}static for(t){return ti.registries.has(t)||ti.registries.set(t,new ti(t)),ti.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:o}=this;for(const[i,s]of t.schemas)r.has(i)||r.set(i,s);for(const[i,s]of t.exceptions)o.has(i)||o.set(i,s)}register(t,r){const o=this.normalizeShapeId(t);for(const i of[this,ti.for(o.split("#")[0])])i.schemas.set(o,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const o=t,i=o[1];for(const s of[this,ti.for(i)])s.schemas.set(i+"#"+o[2],o),s.exceptions.set(o,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):ti.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,o]=t,i=r+"#"+o;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const VP=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&pze.warn(fze(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ize=Math.ceil(2**127*(2-2**-23)),LV=e=>{const t=VP(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>ize)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},sze=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},$V=e=>YW(e,16),jV=e=>YW(e,8),YW=(e,t)=>{const r=sze(e);if(r!==void 0&&aze(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},aze=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},lze=e=>VP(typeof e=="string"?CC(e):e),cze=e=>LV(typeof e=="string"?CC(e):e),uze=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,CC=e=>{const t=e.match(uze);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},r0=e=>$V(typeof e=="string"?CC(e):e),dze=e=>jV(typeof e=="string"?CC(e):e),fze=e=>String(new TypeError(e).stack||e).split(`
451
451
  `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
452
- `),pze={warn:console.warn},hze=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function o0(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),o=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),a=e.getUTCMinutes(),l=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=s<10?`0${s}`:`${s}`,d=a<10?`0${a}`:`${a}`,f=l<10?`0${l}`:`${l}`;return`${hze[o]}, ${c} ${yM[r]} ${t} ${u}:${d}:${f} GMT`}const mze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),gze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=mze.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,o,i,s,a,l,c,u,d]=t,f=r0(am(o)),p=Xl(i,"month",1,12),h=Xl(s,"day",1,31),b=Zv(f,p,h,{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&b.setTime(b.getTime()-kze(d)),b},bze=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$/),yze=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$/),vze=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})$/),xze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=bze.exec(e);if(t){const[r,o,i,s,a,l,c,u]=t;return Zv(r0(am(s)),BO(i),Xl(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u})}if(t=yze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Tze(Zv(Cze(s),BO(i),Xl(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u}))}if(t=vze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Zv(r0(am(u)),BO(o),Xl(i.trimLeft(),"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Sze=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=lze(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},Zv=(e,t,r,o)=>{const i=t-1;return Pze(e,i,r),new Date(Date.UTC(e,i,r,Xl(o.hours,"hour",0,23),Xl(o.minutes,"minute",0,59),Xl(o.seconds,"seconds",0,60),Ize(o.fractionalMilliseconds)))},Cze=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+r0(am(e));return r<t?r+100:r},wze=50*365*24*60*60*1e3,Tze=e=>e.getTime()-new Date().getTime()>wze?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,BO=e=>{const t=yM.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Oze=[31,28,31,30,31,30,31,31,30,31,30,31],Pze=(e,t,r)=>{let o=Oze[t];if(t===1&&Eze(e)&&(o=29),r>o)throw new TypeError(`Invalid day for ${yM[t]} in ${e}: ${r}`)},Eze=e=>e%4===0&&(e%100!==0||e%400===0),Xl=(e,t,r,o)=>{const i=dze(am(e));if(i<r||i>o)throw new TypeError(`${t} must be between ${r} and ${o}, inclusive`);return i},Ize=e=>e==null?0:cze("0."+e)*1e3,kze=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const o=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(o*60+i)*60*1e3},am=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},BV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),wC=()=>{if(BV)return BV();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ao[e[0]]+Ao[e[1]]+Ao[e[2]]+Ao[e[3]]+"-"+Ao[e[4]]+Ao[e[5]]+"-"+Ao[e[6]]+Ao[e[7]]+"-"+Ao[e[8]]+Ao[e[9]]+"-"+Ao[e[10]]+Ao[e[11]]+Ao[e[12]]+Ao[e[13]]+Ao[e[14]]+Ao[e[15]]},Qa=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Qa.from=e=>e&&typeof e=="object"&&(e instanceof Qa||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Qa(String(e)):Qa(JSON.stringify(e));Qa.fromObject=Qa.from;function Rze(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const vM="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",xM="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",SM="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",ZW="(\\d?\\d)",XW="(\\d{4})",Mze=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Aze=new RegExp(`^${vM}, ${ZW} ${xM} ${XW} ${SM} GMT$`),Dze=new RegExp(`^${vM}, ${ZW}-${xM}-(\\d\\d) ${SM} GMT$`),_ze=new RegExp(`^${vM} ${xM} ( [1-9]|\\d\\d) ${SM} ${XW}$`),Nze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Fze=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},Lze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Mze.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,o,i,s,a,l,,c,u]=t;Ya(o,1,12),Ya(i,1,31),Ya(s,0,23),Ya(a,0,59),Ya(l,0,60);const d=new Date(Date.UTC(Number(r),Number(o)-1,Number(i),Number(s),Number(a),Number(l),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(d.setUTCFullYear(Number(r)),u.toUpperCase()!="Z"){const[,f,p,h]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],b=f==="-"?1:-1;d.setTime(d.getTime()+b*(Number(p)*60*60*1e3+Number(h)*60*1e3))}return d},$ze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,o,i,s,a,l,c;if((c=Aze.exec(e))?[,t,r,o,i,s,a,l]=c:(c=Dze.exec(e))?([,t,r,o,i,s,a,l]=c,o=(Number(o)+1900).toString()):(c=_ze.exec(e))&&([,r,t,i,s,a,l,o]=c),o&&a){const u=Date.UTC(Number(o),Nze.indexOf(r),Number(t),Number(i),Number(s),Number(a),l?Math.round(parseFloat(`0.${l}`)*1e3):0);Ya(t,1,31),Ya(i,0,23),Ya(s,0,59),Ya(a,0,60);const d=new Date(u);return d.setUTCFullYear(Number(o)),d}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function Ya(e,t,r){const o=Number(e);if(o<t||o>r)throw new Error(`Value ${o} out of range [${t}, ${r}]`)}function jze(e,t,r){if(!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const o=e.split(t),i=[];let s="";for(let a=0;a<o.length;a++)s===""?s=o[a]:s+=t+o[a],(a+1)%r===0&&(i.push(s),s="");return s!==""&&i.push(s),i}const QW=e=>{const t=e.length,r=[];let o=!1,i,s=0;for(let a=0;a<t;++a){const l=e[a];switch(l){case'"':i!=="\\"&&(o=!o);break;case",":o||(r.push(e.slice(s,a)),s=a+1);break}i=l}return r.push(e.slice(s)),r.map(a=>{a=a.trim();const l=a.length;return l<2?a:(a[0]==='"'&&a[l-1]==='"'&&(a=a.slice(1,l-1)),a.replace(/\\"/g,'"'))})},VV=/^-?\d*(\.\d+)?$/;class cg{string;type;constructor(t,r){if(this.string=t,this.type=r,!VV.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return cg.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&VV.test(r.string)}}class TC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class JW extends TC{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=ti.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Br}getResponseType(){return wu}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[o,i]of r.url.searchParams.entries())t.query[o]=i;return t}else return t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},t}setHostPrefix(t,r,o){if(this.serdeContext?.disableHostPrefix)return;const i=or.of(r.input),s=Jd(r.traits??{});if(s.endpoint){let a=s.endpoint?.[0];if(typeof a=="string"){const l=[...i.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of l){const u=o[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);a=a.replace(`{${c}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Promise.resolve().then(()=>require("./index-SBEAc6WP.js"));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,o,i,s){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Bze extends JW{async serializeRequest(t,r,o){const i={...r??{}},s=this.serializer,a={},l={},c=await o.endpoint(),u=or.of(t?.input),d=u.getSchema();let f=!1,p;const h=new Br({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:a,headers:l,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,t,i);const b=Jd(t.traits);if(b.http){h.method=b.http[0];const[g,y]=b.http[1].split("?");h.path=="/"?h.path=g:h.path+=g;const x=new URLSearchParams(y??"");Object.assign(a,Object.fromEntries(x))}}for(const[b,g]of u.structIterator()){const y=g.getMergedTraits()??{},x=i[b];if(x==null&&!g.isIdempotencyToken()){if(y.httpLabel&&(h.path.includes(`{${b}+}`)||h.path.includes(`{${b}}`)))throw new Error(`No value provided for input HTTP label: ${b}.`);continue}if(y.httpPayload)g.isStreaming()?g.isStructSchema()?i[b]&&(p=await this.serializeEventStream({eventStream:i[b],requestSchema:u})):p=x:(s.write(g,x),p=s.flush()),delete i[b];else if(y.httpLabel){s.write(g,x);const C=s.flush();h.path.includes(`{${b}+}`)?h.path=h.path.replace(`{${b}+}`,C.split("/").map(NV).join("/")):h.path.includes(`{${b}}`)&&(h.path=h.path.replace(`{${b}}`,NV(C))),delete i[b]}else if(y.httpHeader)s.write(g,x),l[y.httpHeader.toLowerCase()]=String(s.flush()),delete i[b];else if(typeof y.httpPrefixHeaders=="string"){for(const[C,O]of Object.entries(x)){const T=y.httpPrefixHeaders+C;s.write([g.getValueSchema(),{httpHeader:T}],O),l[T.toLowerCase()]=s.flush()}delete i[b]}else y.httpQuery||y.httpQueryParams?(this.serializeQuery(g,x,a),delete i[b]):f=!0}return f&&i&&(s.write(d,i),p=s.flush()),h.headers=l,h.query=a,h.body=p,h}serializeQuery(t,r,o){const i=this.serializer,s=t.getMergedTraits();if(s.httpQueryParams){for(const[a,l]of Object.entries(r))if(!(a in o)){const c=t.getValueSchema();Object.assign(c.getMergedTraits(),{...s,httpQuery:a,httpQueryParams:void 0}),this.serializeQuery(c,l,o)}return}if(t.isListSchema()){const a=!!t.getMergedTraits().sparse,l=[];for(const c of r){i.write([t.getValueSchema(),s],c);const u=i.flush();(a||u!==void 0)&&l.push(u)}o[s.httpQuery]=l}else i.write([t,s],r),o[s.httpQuery]=i.flush()}async deserializeResponse(t,r,o){const i=this.deserializer,s=or.of(t.output),a={};if(o.statusCode>=300){const c=await uh(o.body,r);throw c.byteLength>0&&Object.assign(a,await i.read(15,c)),await this.handleError(t,r,o,a,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const c in o.headers){const u=o.headers[c];delete o.headers[c],o.headers[c.toLowerCase()]=u}const l=await this.deserializeHttpMessage(s,r,o,a);if(l.length){const c=await uh(o.body,r);if(c.byteLength>0){const u=await i.read(s,c);for(const d of l)u[d]!=null&&(a[d]=u[d])}}else l.discardResponseBody&&await uh(o.body,r);return a.$metadata=this.deserializeMetadata(o),a}async deserializeHttpMessage(t,r,o,i,s){let a;i instanceof Set?a=s:a=i;let l=!0;const c=this.deserializer,u=or.of(t),d=[];for(const[f,p]of u.structIterator()){const h=p.getMemberTraits();if(h.httpPayload){if(l=!1,p.isStreaming())p.isStructSchema()?a[f]=await this.deserializeEventStream({response:o,responseSchema:u}):a[f]=GW(o.body);else if(o.body){const g=await uh(o.body,r);g.byteLength>0&&(a[f]=await c.read(p,g))}}else if(h.httpHeader){const b=String(h.httpHeader).toLowerCase(),g=o.headers[b];if(g!=null)if(p.isListSchema()){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b;let x;y.isTimestampSchema()&&y.getSchema()===4?x=jze(g,",",2):x=QW(g);const C=[];for(const O of x)C.push(await c.read(y,O.trim()));a[f]=C}else a[f]=await c.read(p,g)}else if(h.httpPrefixHeaders!==void 0){a[f]={};for(const[b,g]of Object.entries(o.headers))if(b.startsWith(h.httpPrefixHeaders)){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b,a[f][b.slice(h.httpPrefixHeaders.length)]=await c.read(y,g)}}else h.httpResponseCode?a[f]=o.statusCode:d.push(f)}return d.discardResponseBody=l,d}}function OC(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:o,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?typeof o=="string"||i?6:s||r?5:void 0:void 0)??t.timestampFormat.default}class e7 extends TC{settings;constructor(t){super(),this.settings=t}read(t,r){const o=or.of(t);if(o.isListSchema())return QW(r).map(i=>this.read(o.getValueSchema(),i));if(o.isBlobSchema())return(this.serdeContext?.base64Decoder??Tu)(r);if(o.isTimestampSchema())switch(OC(o,this.settings)){case 5:return Lze(r);case 6:return $ze(r);case 7:return Fze(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isStringSchema()){const i=o.getMergedTraits().mediaType;let s=r;if(i)return o.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),(i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),s}return o.isNumericSchema()?Number(r):o.isBigIntegerSchema()?BigInt(r):o.isBigDecimalSchema()?new cg(r,"bigDecimal"):o.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??zu)((this.serdeContext?.base64Decoder??Tu)(t))}}class Vze extends TC{codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new e7(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){const o=or.of(t),i=o.getMergedTraits(),s=this.serdeContext?.utf8Encoder??zu;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(o,s(r));if(i.httpPayload){if(o.isBlobSchema()){const a=this.serdeContext?.utf8Decoder??cl;return typeof r=="string"?a(r):r}else if(o.isStringSchema())return"byteLength"in r?s(r):r}return this.codecDeserializer.read(o,r)}}class Hze extends TC{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(o.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${o.getName(!0)}`);switch(OC(o,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=o0(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(o.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(this.serdeContext?.base64Encoder??rc)(r);return}if(o.isListSchema()&&Array.isArray(r)){let a="";for(const l of r){this.write([o.getValueSchema(),o.getMergedTraits()],l);const c=this.flush(),u=o.getValueSchema().isTimestampSchema()?c:Rze(c);a!==""&&(a+=", "),a+=u}this.stringBuffer=a;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":const i=o.getMergedTraits().mediaType;let s=r;if(i&&((i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),o.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??rc)(s.toString());return}this.stringBuffer=r;break;default:o.isIdempotencyToken()?this.stringBuffer=wC():this.stringBuffer=String(r)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class zze{codecSerializer;stringSerializer;buffer;constructor(t,r,o=new Hze(r)){this.codecSerializer=t,this.stringSerializer=o}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){const o=or.of(t),i=o.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(o,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(o,r)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function qze(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class t7{authSchemes=new Map;constructor(t){for(const[r,o]of Object.entries(t))o!==void 0&&this.authSchemes.set(r,o)}getIdentityProvider(t){return this.authSchemes.get(t)}}const Uze=e=>function(r){return n7(r)&&r.expiration.getTime()-Date.now()<e},Gze=3e5,Wze=Uze(Gze),n7=e=>e.expiration!==void 0,Kze=(e,t,r)=>{if(e===void 0)return;const o=typeof e!="function"?async()=>Promise.resolve(e):e;let i,s,a,l=!1;const c=async u=>{s||(s=o(u));try{i=await s,a=!0,l=!1}finally{s=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await c(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await c(u)),l?i:r(i)?(t(i)&&await c(u),i):(l=!0,i))};class CM extends Error{name="ProviderError";tryNextLink;constructor(t,r=!0){let o,i=!0;typeof r=="boolean"?(o=void 0,i=r):r!=null&&typeof r=="object"&&(o=r.logger,i=r.tryNextLink??!0),super(t),this.tryNextLink=i,Object.setPrototypeOf(this,CM.prototype),o?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}}class dp extends CM{name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,dp.prototype)}}const Yze=(e,t,r)=>{let o,i,s,a=!1;const l=async()=>{i||(i=e());try{o=await i,s=!0,a=!1}finally{i=void 0}return o};return async c=>((!s||c?.forceRefresh)&&(o=await l()),o)},Zze=e=>(e.sigv4aSigningRegionSet=pf(e.sigv4aSigningRegionSet),e),Xze="X-Amz-Algorithm",Qze="X-Amz-Credential",r7="X-Amz-Date",Jze="X-Amz-SignedHeaders",eqe="X-Amz-Expires",o7="X-Amz-Signature",i7="X-Amz-Security-Token",s7="authorization",a7=r7.toLowerCase(),tqe="date",nqe=[s7,a7,tqe],rqe=o7.toLowerCase(),HP="x-amz-content-sha256",oqe=i7.toLowerCase(),iqe={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},sqe=/^proxy-/,aqe=/^sec-/,VO="AWS4-HMAC-SHA256",lqe="AWS4-HMAC-SHA256-PAYLOAD",cqe="UNSIGNED-PAYLOAD",uqe=50,l7="aws4_request",dqe=3600*24*7,Tv={},HO=[],zO=(e,t,r)=>`${e}/${t}/${r}/${l7}`,fqe=async(e,t,r,o,i)=>{const s=await HV(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${o}:${i}:${Ci(s)}:${t.sessionToken}`;if(a in Tv)return Tv[a];for(HO.push(a);HO.length>uqe;)delete Tv[HO.shift()];let l=`AWS4${t.secretAccessKey}`;for(const c of[r,o,i,l7])l=await HV(e,l,c);return Tv[a]=l},HV=(e,t,r)=>{const o=new e(t);return o.update(jf(r)),o.digest()},zV=({headers:e},t,r)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const s=i.toLowerCase();(s in iqe||t?.has(s)||sqe.test(s)||aqe.test(s))&&(!r||r&&!r.has(s))||(o[s]=e[i].trim().replace(/\s+/g," "))}return o},c7=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",qO=async({headers:e,body:t},r)=>{for(const o of Object.keys(e))if(o.toLowerCase()===HP)return e[o];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||c7(t)){const o=new r;return o.update(jf(t)),Ci(await o.digest())}return cqe};class pqe{format(t){const r=[];for(const s of Object.keys(t)){const a=cl(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=cl(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(mqe.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!hqe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(UW(t.value.replace(/\-/g,"")),1),f}}}var qV;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(qV||(qV={}));const hqe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let mqe=class u7{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&UV(r),new u7(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&UV(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function UV(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const gqe=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},bqe=(e,t={})=>{const{headers:r,query:o={}}=Br.clone(e);for(const i of Object.keys(r)){const s=i.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(o[i]=r[i],delete r[i])}return{...e,headers:r,query:o}},GV=e=>{e=Br.clone(e);for(const t of Object.keys(e.headers))nqe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},yqe=({query:e={}})=>{const t=[],r={};for(const o of Object.keys(e)){if(o.toLowerCase()===rqe)continue;const i=su(o);t.push(i);const s=e[o];typeof s=="string"?r[i]=`${i}=${su(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce((a,l)=>a.concat([`${i}=${su(l)}`]),[]).sort().join("&"))}return t.sort().map(o=>r[o]).filter(o=>o).join("&")},vqe=e=>xqe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),xqe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Sqe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){this.service=i,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ks(o),this.credentialProvider=ks(r)}createCanonicalRequest(t,r,o){const i=Object.keys(r).sort();return`${t.method}
452
+ `),pze={warn:console.warn},hze=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function o0(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),o=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),a=e.getUTCMinutes(),l=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=s<10?`0${s}`:`${s}`,d=a<10?`0${a}`:`${a}`,f=l<10?`0${l}`:`${l}`;return`${hze[o]}, ${c} ${yM[r]} ${t} ${u}:${d}:${f} GMT`}const mze=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),gze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=mze.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,o,i,s,a,l,c,u,d]=t,f=r0(am(o)),p=Xl(i,"month",1,12),h=Xl(s,"day",1,31),b=Zv(f,p,h,{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&b.setTime(b.getTime()-kze(d)),b},bze=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$/),yze=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$/),vze=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})$/),xze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=bze.exec(e);if(t){const[r,o,i,s,a,l,c,u]=t;return Zv(r0(am(s)),BO(i),Xl(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u})}if(t=yze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Tze(Zv(Cze(s),BO(i),Xl(o,"day",1,31),{hours:a,minutes:l,seconds:c,fractionalMilliseconds:u}))}if(t=vze.exec(e),t){const[r,o,i,s,a,l,c,u]=t;return Zv(r0(am(u)),BO(o),Xl(i.trimLeft(),"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Sze=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=lze(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},Zv=(e,t,r,o)=>{const i=t-1;return Pze(e,i,r),new Date(Date.UTC(e,i,r,Xl(o.hours,"hour",0,23),Xl(o.minutes,"minute",0,59),Xl(o.seconds,"seconds",0,60),Ize(o.fractionalMilliseconds)))},Cze=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+r0(am(e));return r<t?r+100:r},wze=50*365*24*60*60*1e3,Tze=e=>e.getTime()-new Date().getTime()>wze?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,BO=e=>{const t=yM.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Oze=[31,28,31,30,31,30,31,31,30,31,30,31],Pze=(e,t,r)=>{let o=Oze[t];if(t===1&&Eze(e)&&(o=29),r>o)throw new TypeError(`Invalid day for ${yM[t]} in ${e}: ${r}`)},Eze=e=>e%4===0&&(e%100!==0||e%400===0),Xl=(e,t,r,o)=>{const i=dze(am(e));if(i<r||i>o)throw new TypeError(`${t} must be between ${r} and ${o}, inclusive`);return i},Ize=e=>e==null?0:cze("0."+e)*1e3,kze=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const o=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(o*60+i)*60*1e3},am=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},BV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),wC=()=>{if(BV)return BV();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Ao[e[0]]+Ao[e[1]]+Ao[e[2]]+Ao[e[3]]+"-"+Ao[e[4]]+Ao[e[5]]+"-"+Ao[e[6]]+Ao[e[7]]+"-"+Ao[e[8]]+Ao[e[9]]+"-"+Ao[e[10]]+Ao[e[11]]+Ao[e[12]]+Ao[e[13]]+Ao[e[14]]+Ao[e[15]]},Qa=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Qa.from=e=>e&&typeof e=="object"&&(e instanceof Qa||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Qa(String(e)):Qa(JSON.stringify(e));Qa.fromObject=Qa.from;function Rze(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const vM="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",xM="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",SM="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",ZW="(\\d?\\d)",XW="(\\d{4})",Mze=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Aze=new RegExp(`^${vM}, ${ZW} ${xM} ${XW} ${SM} GMT$`),Dze=new RegExp(`^${vM}, ${ZW}-${xM}-(\\d\\d) ${SM} GMT$`),_ze=new RegExp(`^${vM} ${xM} ( [1-9]|\\d\\d) ${SM} ${XW}$`),Nze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Fze=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},Lze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=Mze.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,r,o,i,s,a,l,,c,u]=t;Ya(o,1,12),Ya(i,1,31),Ya(s,0,23),Ya(a,0,59),Ya(l,0,60);const d=new Date(Date.UTC(Number(r),Number(o)-1,Number(i),Number(s),Number(a),Number(l),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(d.setUTCFullYear(Number(r)),u.toUpperCase()!="Z"){const[,f,p,h]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],b=f==="-"?1:-1;d.setTime(d.getTime()+b*(Number(p)*60*60*1e3+Number(h)*60*1e3))}return d},$ze=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,o,i,s,a,l,c;if((c=Aze.exec(e))?[,t,r,o,i,s,a,l]=c:(c=Dze.exec(e))?([,t,r,o,i,s,a,l]=c,o=(Number(o)+1900).toString()):(c=_ze.exec(e))&&([,r,t,i,s,a,l,o]=c),o&&a){const u=Date.UTC(Number(o),Nze.indexOf(r),Number(t),Number(i),Number(s),Number(a),l?Math.round(parseFloat(`0.${l}`)*1e3):0);Ya(t,1,31),Ya(i,0,23),Ya(s,0,59),Ya(a,0,60);const d=new Date(u);return d.setUTCFullYear(Number(o)),d}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function Ya(e,t,r){const o=Number(e);if(o<t||o>r)throw new Error(`Value ${o} out of range [${t}, ${r}]`)}function jze(e,t,r){if(!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");const o=e.split(t),i=[];let s="";for(let a=0;a<o.length;a++)s===""?s=o[a]:s+=t+o[a],(a+1)%r===0&&(i.push(s),s="");return s!==""&&i.push(s),i}const QW=e=>{const t=e.length,r=[];let o=!1,i,s=0;for(let a=0;a<t;++a){const l=e[a];switch(l){case'"':i!=="\\"&&(o=!o);break;case",":o||(r.push(e.slice(s,a)),s=a+1);break}i=l}return r.push(e.slice(s)),r.map(a=>{a=a.trim();const l=a.length;return l<2?a:(a[0]==='"'&&a[l-1]==='"'&&(a=a.slice(1,l-1)),a.replace(/\\"/g,'"'))})},VV=/^-?\d*(\.\d+)?$/;class cg{string;type;constructor(t,r){if(this.string=t,this.type=r,!VV.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return cg.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&VV.test(r.string)}}class TC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class JW extends TC{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=ti.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Br}getResponseType(){return wu}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[o,i]of r.url.searchParams.entries())t.query[o]=i;return t}else return t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},t}setHostPrefix(t,r,o){if(this.serdeContext?.disableHostPrefix)return;const i=or.of(r.input),s=Jd(r.traits??{});if(s.endpoint){let a=s.endpoint?.[0];if(typeof a=="string"){const l=[...i.structIterator()].filter(([,c])=>c.getMergedTraits().hostLabel);for(const[c]of l){const u=o[c];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${c} in input must be a string as hostLabel.`);a=a.replace(`{${c}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:o})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:o})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Promise.resolve().then(()=>require("./index-_-z1GncQ.js"));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,o,i,s){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Bze extends JW{async serializeRequest(t,r,o){const i={...r??{}},s=this.serializer,a={},l={},c=await o.endpoint(),u=or.of(t?.input),d=u.getSchema();let f=!1,p;const h=new Br({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:a,headers:l,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,t,i);const b=Jd(t.traits);if(b.http){h.method=b.http[0];const[g,y]=b.http[1].split("?");h.path=="/"?h.path=g:h.path+=g;const x=new URLSearchParams(y??"");Object.assign(a,Object.fromEntries(x))}}for(const[b,g]of u.structIterator()){const y=g.getMergedTraits()??{},x=i[b];if(x==null&&!g.isIdempotencyToken()){if(y.httpLabel&&(h.path.includes(`{${b}+}`)||h.path.includes(`{${b}}`)))throw new Error(`No value provided for input HTTP label: ${b}.`);continue}if(y.httpPayload)g.isStreaming()?g.isStructSchema()?i[b]&&(p=await this.serializeEventStream({eventStream:i[b],requestSchema:u})):p=x:(s.write(g,x),p=s.flush()),delete i[b];else if(y.httpLabel){s.write(g,x);const C=s.flush();h.path.includes(`{${b}+}`)?h.path=h.path.replace(`{${b}+}`,C.split("/").map(NV).join("/")):h.path.includes(`{${b}}`)&&(h.path=h.path.replace(`{${b}}`,NV(C))),delete i[b]}else if(y.httpHeader)s.write(g,x),l[y.httpHeader.toLowerCase()]=String(s.flush()),delete i[b];else if(typeof y.httpPrefixHeaders=="string"){for(const[C,O]of Object.entries(x)){const T=y.httpPrefixHeaders+C;s.write([g.getValueSchema(),{httpHeader:T}],O),l[T.toLowerCase()]=s.flush()}delete i[b]}else y.httpQuery||y.httpQueryParams?(this.serializeQuery(g,x,a),delete i[b]):f=!0}return f&&i&&(s.write(d,i),p=s.flush()),h.headers=l,h.query=a,h.body=p,h}serializeQuery(t,r,o){const i=this.serializer,s=t.getMergedTraits();if(s.httpQueryParams){for(const[a,l]of Object.entries(r))if(!(a in o)){const c=t.getValueSchema();Object.assign(c.getMergedTraits(),{...s,httpQuery:a,httpQueryParams:void 0}),this.serializeQuery(c,l,o)}return}if(t.isListSchema()){const a=!!t.getMergedTraits().sparse,l=[];for(const c of r){i.write([t.getValueSchema(),s],c);const u=i.flush();(a||u!==void 0)&&l.push(u)}o[s.httpQuery]=l}else i.write([t,s],r),o[s.httpQuery]=i.flush()}async deserializeResponse(t,r,o){const i=this.deserializer,s=or.of(t.output),a={};if(o.statusCode>=300){const c=await uh(o.body,r);throw c.byteLength>0&&Object.assign(a,await i.read(15,c)),await this.handleError(t,r,o,a,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const c in o.headers){const u=o.headers[c];delete o.headers[c],o.headers[c.toLowerCase()]=u}const l=await this.deserializeHttpMessage(s,r,o,a);if(l.length){const c=await uh(o.body,r);if(c.byteLength>0){const u=await i.read(s,c);for(const d of l)u[d]!=null&&(a[d]=u[d])}}else l.discardResponseBody&&await uh(o.body,r);return a.$metadata=this.deserializeMetadata(o),a}async deserializeHttpMessage(t,r,o,i,s){let a;i instanceof Set?a=s:a=i;let l=!0;const c=this.deserializer,u=or.of(t),d=[];for(const[f,p]of u.structIterator()){const h=p.getMemberTraits();if(h.httpPayload){if(l=!1,p.isStreaming())p.isStructSchema()?a[f]=await this.deserializeEventStream({response:o,responseSchema:u}):a[f]=GW(o.body);else if(o.body){const g=await uh(o.body,r);g.byteLength>0&&(a[f]=await c.read(p,g))}}else if(h.httpHeader){const b=String(h.httpHeader).toLowerCase(),g=o.headers[b];if(g!=null)if(p.isListSchema()){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b;let x;y.isTimestampSchema()&&y.getSchema()===4?x=jze(g,",",2):x=QW(g);const C=[];for(const O of x)C.push(await c.read(y,O.trim()));a[f]=C}else a[f]=await c.read(p,g)}else if(h.httpPrefixHeaders!==void 0){a[f]={};for(const[b,g]of Object.entries(o.headers))if(b.startsWith(h.httpPrefixHeaders)){const y=p.getValueSchema();y.getMergedTraits().httpHeader=b,a[f][b.slice(h.httpPrefixHeaders.length)]=await c.read(y,g)}}else h.httpResponseCode?a[f]=o.statusCode:d.push(f)}return d.discardResponseBody=l,d}}function OC(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:o,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?typeof o=="string"||i?6:s||r?5:void 0:void 0)??t.timestampFormat.default}class e7 extends TC{settings;constructor(t){super(),this.settings=t}read(t,r){const o=or.of(t);if(o.isListSchema())return QW(r).map(i=>this.read(o.getValueSchema(),i));if(o.isBlobSchema())return(this.serdeContext?.base64Decoder??Tu)(r);if(o.isTimestampSchema())switch(OC(o,this.settings)){case 5:return Lze(r);case 6:return $ze(r);case 7:return Fze(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isStringSchema()){const i=o.getMergedTraits().mediaType;let s=r;if(i)return o.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),(i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),s}return o.isNumericSchema()?Number(r):o.isBigIntegerSchema()?BigInt(r):o.isBigDecimalSchema()?new cg(r,"bigDecimal"):o.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??zu)((this.serdeContext?.base64Decoder??Tu)(t))}}class Vze extends TC{codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new e7(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){const o=or.of(t),i=o.getMergedTraits(),s=this.serdeContext?.utf8Encoder??zu;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(o,s(r));if(i.httpPayload){if(o.isBlobSchema()){const a=this.serdeContext?.utf8Decoder??cl;return typeof r=="string"?a(r):r}else if(o.isStringSchema())return"byteLength"in r?s(r):r}return this.codecDeserializer.read(o,r)}}class Hze extends TC{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(o.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${o.getName(!0)}`);switch(OC(o,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=o0(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(o.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(this.serdeContext?.base64Encoder??rc)(r);return}if(o.isListSchema()&&Array.isArray(r)){let a="";for(const l of r){this.write([o.getValueSchema(),o.getMergedTraits()],l);const c=this.flush(),u=o.getValueSchema().isTimestampSchema()?c:Rze(c);a!==""&&(a+=", "),a+=u}this.stringBuffer=a;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":const i=o.getMergedTraits().mediaType;let s=r;if(i&&((i==="application/json"||i.endsWith("+json"))&&(s=Qa.from(s)),o.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??rc)(s.toString());return}this.stringBuffer=r;break;default:o.isIdempotencyToken()?this.stringBuffer=wC():this.stringBuffer=String(r)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class zze{codecSerializer;stringSerializer;buffer;constructor(t,r,o=new Hze(r)){this.codecSerializer=t,this.stringSerializer=o}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){const o=or.of(t),i=o.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(o,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(o,r)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function qze(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class t7{authSchemes=new Map;constructor(t){for(const[r,o]of Object.entries(t))o!==void 0&&this.authSchemes.set(r,o)}getIdentityProvider(t){return this.authSchemes.get(t)}}const Uze=e=>function(r){return n7(r)&&r.expiration.getTime()-Date.now()<e},Gze=3e5,Wze=Uze(Gze),n7=e=>e.expiration!==void 0,Kze=(e,t,r)=>{if(e===void 0)return;const o=typeof e!="function"?async()=>Promise.resolve(e):e;let i,s,a,l=!1;const c=async u=>{s||(s=o(u));try{i=await s,a=!0,l=!1}finally{s=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await c(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await c(u)),l?i:r(i)?(t(i)&&await c(u),i):(l=!0,i))};class CM extends Error{name="ProviderError";tryNextLink;constructor(t,r=!0){let o,i=!0;typeof r=="boolean"?(o=void 0,i=r):r!=null&&typeof r=="object"&&(o=r.logger,i=r.tryNextLink??!0),super(t),this.tryNextLink=i,Object.setPrototypeOf(this,CM.prototype),o?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}}class dp extends CM{name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,dp.prototype)}}const Yze=(e,t,r)=>{let o,i,s,a=!1;const l=async()=>{i||(i=e());try{o=await i,s=!0,a=!1}finally{i=void 0}return o};return async c=>((!s||c?.forceRefresh)&&(o=await l()),o)},Zze=e=>(e.sigv4aSigningRegionSet=pf(e.sigv4aSigningRegionSet),e),Xze="X-Amz-Algorithm",Qze="X-Amz-Credential",r7="X-Amz-Date",Jze="X-Amz-SignedHeaders",eqe="X-Amz-Expires",o7="X-Amz-Signature",i7="X-Amz-Security-Token",s7="authorization",a7=r7.toLowerCase(),tqe="date",nqe=[s7,a7,tqe],rqe=o7.toLowerCase(),HP="x-amz-content-sha256",oqe=i7.toLowerCase(),iqe={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},sqe=/^proxy-/,aqe=/^sec-/,VO="AWS4-HMAC-SHA256",lqe="AWS4-HMAC-SHA256-PAYLOAD",cqe="UNSIGNED-PAYLOAD",uqe=50,l7="aws4_request",dqe=3600*24*7,Tv={},HO=[],zO=(e,t,r)=>`${e}/${t}/${r}/${l7}`,fqe=async(e,t,r,o,i)=>{const s=await HV(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${o}:${i}:${Ci(s)}:${t.sessionToken}`;if(a in Tv)return Tv[a];for(HO.push(a);HO.length>uqe;)delete Tv[HO.shift()];let l=`AWS4${t.secretAccessKey}`;for(const c of[r,o,i,l7])l=await HV(e,l,c);return Tv[a]=l},HV=(e,t,r)=>{const o=new e(t);return o.update(jf(r)),o.digest()},zV=({headers:e},t,r)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const s=i.toLowerCase();(s in iqe||t?.has(s)||sqe.test(s)||aqe.test(s))&&(!r||r&&!r.has(s))||(o[s]=e[i].trim().replace(/\s+/g," "))}return o},c7=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",qO=async({headers:e,body:t},r)=>{for(const o of Object.keys(e))if(o.toLowerCase()===HP)return e[o];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||c7(t)){const o=new r;return o.update(jf(t)),Ci(await o.digest())}return cqe};class pqe{format(t){const r=[];for(const s of Object.keys(t)){const a=cl(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=cl(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(mqe.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!hqe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(UW(t.value.replace(/\-/g,"")),1),f}}}var qV;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(qV||(qV={}));const hqe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let mqe=class u7{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&UV(r),new u7(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&UV(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function UV(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const gqe=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},bqe=(e,t={})=>{const{headers:r,query:o={}}=Br.clone(e);for(const i of Object.keys(r)){const s=i.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(o[i]=r[i],delete r[i])}return{...e,headers:r,query:o}},GV=e=>{e=Br.clone(e);for(const t of Object.keys(e.headers))nqe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},yqe=({query:e={}})=>{const t=[],r={};for(const o of Object.keys(e)){if(o.toLowerCase()===rqe)continue;const i=su(o);t.push(i);const s=e[o];typeof s=="string"?r[i]=`${i}=${su(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce((a,l)=>a.concat([`${i}=${su(l)}`]),[]).sort().join("&"))}return t.sort().map(o=>r[o]).filter(o=>o).join("&")},vqe=e=>xqe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),xqe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Sqe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){this.service=i,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ks(o),this.credentialProvider=ks(r)}createCanonicalRequest(t,r,o){const i=Object.keys(r).sort();return`${t.method}
453
453
  ${this.getCanonicalPath(t)}
454
454
  ${yqe(t)}
455
455
  ${i.map(s=>`${s}:${r[s]}`).join(`
@@ -461,5 +461,5 @@ ${t}
461
461
  ${r}
462
462
  ${Ci(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const s of t.split("/"))s?.length!==0&&s!=="."&&(s===".."?r.pop():r.push(s));const o=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return su(o).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=vqe(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class zP extends Sqe{headerFormatter=new pqe;constructor({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:o,service:i,sha256:s,uriEscapePath:a})}async presign(t,r={}){const{signingDate:o=new Date,expiresIn:i=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:l,hoistableHeaders:c,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const p=u??await this.regionProvider(),{longDate:h,shortDate:b}=this.formatDate(o);if(i>dqe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=zO(b,p,d??this.service),y=bqe(GV(t),{unhoistableHeaders:a,hoistableHeaders:c});f.sessionToken&&(y.query[i7]=f.sessionToken),y.query[Xze]=VO,y.query[Qze]=`${f.accessKeyId}/${g}`,y.query[r7]=h,y.query[eqe]=i.toString(10);const x=zV(y,s,l);return y.query[Jze]=this.getCanonicalHeaderList(x),y.query[o7]=await this.getSignature(h,g,this.getSigningKey(f,p,b,d),this.createCanonicalRequest(y,x,await qO(t,this.sha256))),y}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:o=new Date,priorSignature:i,signingRegion:s,signingService:a}){const l=s??await this.regionProvider(),{shortDate:c,longDate:u}=this.formatDate(o),d=zO(c,l,a??this.service),f=await qO({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const h=Ci(await p.digest()),b=[lqe,u,d,i,h,f].join(`
463
463
  `);return this.signString(b,{signingDate:o,signingRegion:l,signingService:a})}async signMessage(t,{signingDate:r=new Date,signingRegion:o,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:o,signingService:i,priorSignature:t.priorSignature}).then(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:r=new Date,signingRegion:o,signingService:i}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=o??await this.regionProvider(),{shortDate:l}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(s,a,l,i));return c.update(jf(t)),Ci(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:o,unsignableHeaders:i,signingRegion:s,signingService:a}={}){const l=await this.credentialProvider();this.validateResolvedCredentials(l);const c=s??await this.regionProvider(),u=GV(t),{longDate:d,shortDate:f}=this.formatDate(r),p=zO(f,c,a??this.service);u.headers[a7]=d,l.sessionToken&&(u.headers[oqe]=l.sessionToken);const h=await qO(u,this.sha256);!gqe(HP,u.headers)&&this.applyChecksum&&(u.headers[HP]=h);const b=zV(u,i,o),g=await this.getSignature(d,p,this.getSigningKey(l,c,f,a),this.createCanonicalRequest(u,b,h));return u.headers[s7]=`${VO} Credential=${l.accessKeyId}/${p}, SignedHeaders=${this.getCanonicalHeaderList(b)}, Signature=${g}`,u}async getSignature(t,r,o,i){const s=await this.createStringToSign(t,r,i,VO),a=new this.sha256(await o);return a.update(jf(s)),Ci(await a.digest())}getSigningKey(t,r,o,i){return fqe(this.sha256,t,o,r,i||this.service)}}const d7=e=>{let t=e.credentials,r=!!e.credentials,o;Object.defineProperty(e,"credentials",{set(u){u&&u!==t&&u!==o&&(r=!0),t=u;const d=Cqe(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=wqe(e,d);if(r&&!f.attributed){const p=typeof t=="object"&&t!==null;o=async h=>{const g=await f(h);return p&&(!g.$source||Object.keys(g.$source).length===0)?THe(g,"CREDENTIALS_CODE","e"):g},o.memoized=f.memoized,o.configBound=f.configBound,o.attributed=!0}else o=f},get(){return o},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:a}=e;let l;return e.signer?l=pf(e.signer):e.regionInfoProvider?l=()=>pf(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:f,signingService:p}=u;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||p||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},b=e.signerConstructor||zP;return new b(h)}):l=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pf(e.region)(),properties:{}},u);const d=u.signingRegion,f=u.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},h=e.signerConstructor||zP;return new h(p)},Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:l})};function Cqe(e,{credentials:t,credentialDefaultProvider:r}){let o;return t?t?.memoized?o=t:o=Kze(t,Wze,n7):r?o=pf(r(Object.assign({},e,{parentClientConfig:e}))):o=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},o.memoized=!0,o}function wqe(e,t){if(t.configBound)return t;const r=async o=>t({...o,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const WV=typeof TextEncoder=="function"?new TextEncoder:null,f7=e=>{if(typeof e=="string"){if(WV)return WV.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const o=e.charCodeAt(r);o>127&&o<=2047?t++:o>2047&&o<=65535&&(t+=2),o>=56320&&o<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},$c=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const o of t)r.push(o);return r},Ml=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,i0=()=>{let e=[],t=[],r=!1;const o=new Set,i=f=>f.sort((p,h)=>KV[h.step]-KV[p.step]||YV[h.priority||"normal"]-YV[p.priority||"normal"]),s=f=>{let p=!1;const h=b=>{const g=$c(b.name,b.aliases);if(g.includes(f)){p=!0;for(const y of g)o.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),p},a=f=>{let p=!1;const h=b=>{if(b.middleware===f){p=!0;for(const g of $c(b.name,b.aliases))o.delete(g);return!1}return!0};return e=e.filter(h),t=t.filter(h),p},l=f=>(e.forEach(p=>{f.add(p.middleware,{...p})}),t.forEach(p=>{f.addRelativeTo(p.middleware,{...p})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),c=f=>{const p=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?p.push(h):p.push(...c(h))}),p.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?p.push(h):p.push(...c(h))}),p},u=(f=!1)=>{const p=[],h=[],b={};return e.forEach(y=>{const x={...y,before:[],after:[]};for(const C of $c(x.name,x.aliases))b[C]=x;p.push(x)}),t.forEach(y=>{const x={...y,before:[],after:[]};for(const C of $c(x.name,x.aliases))b[C]=x;h.push(x)}),h.forEach(y=>{if(y.toMiddleware){const x=b[y.toMiddleware];if(x===void 0){if(f)return;throw new Error(`${y.toMiddleware} is not found when adding ${Ml(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&x.after.push(y),y.relation==="before"&&x.before.push(y)}}),i(p).map(c).reduce((y,x)=>(y.push(...x),y),[])},d={add:(f,p={})=>{const{name:h,override:b,aliases:g}=p,y={step:"initialize",priority:"normal",middleware:f,...p},x=$c(h,g);if(x.length>0){if(x.some(C=>o.has(C))){if(!b)throw new Error(`Duplicate middleware name '${Ml(h,g)}'`);for(const C of x){const O=e.findIndex(P=>P.name===C||P.aliases?.some(I=>I===C));if(O===-1)continue;const T=e[O];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${Ml(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${Ml(h,g)}" middleware with ${y.priority} priority in ${y.step} step.`);e.splice(O,1)}}for(const C of x)o.add(C)}e.push(y)},addRelativeTo:(f,p)=>{const{name:h,override:b,aliases:g}=p,y={middleware:f,...p},x=$c(h,g);if(x.length>0){if(x.some(C=>o.has(C))){if(!b)throw new Error(`Duplicate middleware name '${Ml(h,g)}'`);for(const C of x){const O=t.findIndex(P=>P.name===C||P.aliases?.some(I=>I===C));if(O===-1)continue;const T=t[O];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${Ml(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${Ml(h,g)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);t.splice(O,1)}}for(const C of x)o.add(C)}t.push(y)},clone:()=>l(i0()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?s(f):a(f),removeByTag:f=>{let p=!1;const h=b=>{const{tags:g,name:y,aliases:x}=b;if(g&&g.includes(f)){const C=$c(y,x);for(const O of C)o.delete(O);return p=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),p},concat:f=>{const p=l(i0());return p.use(f),p.identifyOnResolve(r||p.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),p},applyToStack:l,identify:()=>u(!0).map(f=>{const p=f.step??f.relation+" "+f.toMiddleware;return Ml(f.name,f.aliases)+" - "+p}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,p)=>{for(const h of u().map(b=>b.middleware).reverse())f=h(f,p);return r&&console.log(d.identify()),f}};return d},KV={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},YV={high:3,normal:2,low:1};class p7{config;middlewareStack=i0();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:o}=t;o&&typeof r=="function"&&(t.protocol=new r(o))}send(t,r,o){const i=typeof r!="function"?r:void 0,s=typeof r=="function"?r:o,a=i===void 0&&this.config.cacheMiddleware===!0;let l;if(a){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(t.constructor)?l=c.get(t.constructor):(l=t.resolveMiddleware(this.middlewareStack,this.config,i),c.set(t.constructor,l))}else delete this.handlers,l=t.resolveMiddleware(this.middlewareStack,this.config,i);if(s)l(t).then(c=>s(null,c.output),c=>s(c)).catch(()=>{});else return l(t).then(c=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const UO="***SensitiveInformation***";function qP(e,t){if(t==null)return t;const r=or.of(e);if(r.getMergedTraits().sensitive)return UO;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return UO}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return UO}else if(r.isStructSchema()&&typeof t=="object"){const o=t,i={};for(const[s,a]of r.structIterator())o[s]!=null&&(i[s]=qP(a,o[s]));return i}return t}class PC{middlewareStack=i0();schema;static classBuilder(){return new Tqe}resolveMiddlewareWithContext(t,r,o,{middlewareFn:i,clientName:s,commandName:a,inputFilterSensitiveLog:l,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:d,CommandCtor:f}){for(const y of i.bind(this)(f,t,r,o))this.middlewareStack.use(y);const p=t.concat(this.middlewareStack),{logger:h}=r,b={logger:h,clientName:s,commandName:a,inputFilterSensitiveLog:l,outputFilterSensitiveLog:c,[LP]:{commandInstance:this,...u},...d},{requestHandler:g}=r;return p.resolve(y=>g.handle(y.request,o||{}),b)}}class Tqe{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,o={}){return this._smithyContext={service:t,operation:r,...o},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=o=>o,r=o=>o){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends PC{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[o]){super(),this.input=o??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(o,i,s){const a=t._operationSchema,l=a?.[4]??a?.input,c=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(o,i,s,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?qP.bind(null,l):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?qP.bind(null,c):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Qc extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return Qc.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===Qc?Qc.isInstance(t):Qc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const ZV=(e,t={})=>{Object.entries(t).filter(([,o])=>o!==void 0).forEach(([o,i])=>{(e[o]==null||e[o]==="")&&(e[o]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},h7=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Oqe=e=>{const t=[];for(const r in n0){const o=n0[r];e[o]!==void 0&&t.push({algorithmId:()=>o,checksumConstructor:()=>e[o]})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},Pqe=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},Eqe=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),Iqe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},m7=e=>Object.assign(Oqe(e),Eqe(e)),g7=e=>Object.assign(Pqe(e),Iqe(e)),b7=e=>{const t="#text";for(const r in e)e.hasOwnProperty(r)&&e[r][t]!==void 0?e[r]=e[r][t]:typeof e[r]=="object"&&e[r]!==null&&(e[r]=b7(e[r]));return e};class EC{trace(){}debug(){}info(){}warn(){}error(){}}class y7{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const o=r.getMemberSchemas(),i=Object.values(o).find(s=>!!s.getMergedTraits().httpPayload);if(i){const s=i.getMergedTraits().mediaType;return s||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(o).find(a=>{const{httpQuery:l,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!l&&!c&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,o,i,s,a){let l=r,c=t;t.includes("#")&&([l,c]=t.split("#"));const u={$metadata:s,$fault:o.statusCode<500?"client":"server"},d=ti.for(l);try{return{errorSchema:a?.(d,c)??d.getSchema(t),errorMetadata:u}}catch{i.message=i.message??i.Message??"UnknownError";const p=ti.for("smithy.ts.sdk.synthetic."+l),h=p.getBaseException();if(h){const b=p.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new b({name:c}),u),i)}throw this.decorateServiceException(Object.assign(new Error(c),u),i)}}decorateServiceException(t,r={}){if(this.queryCompat){const o=t.Message??r.Message,i=ZV(t,r);o&&(i.message=o),i.Error={...i.Error,Type:i.Error?.Type,Code:i.Error?.Code,Message:i.Error?.message??i.Error?.Message??o};const s=i.$metadata.requestId;return s&&(i.RequestId=s),i}return ZV(t,r)}setQueryCompatError(t,r){const o=r.headers?.["x-amzn-query-error"];if(t!==void 0&&o!=null){const[i,s]=o.split(";"),a=Object.entries(t),l={Code:i,Type:s};Object.assign(t,l);for(const[c,u]of a)l[c==="message"?"Message":c]=u;delete l.__type,t.Error=l}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>or.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class IC{serdeContext;setSerdeContext(t){this.serdeContext=t}}class v7{from;to;keys;constructor(t,r){this.from=t,this.to=r,this.keys=new Set(Object.keys(this.from).filter(o=>o!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function kqe(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Rqe(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class UP{value;constructor(t){this.value=t}toString(){return Rqe(""+this.value)}}class Jo{name;children;attributes={};static of(t,r,o){const i=new Jo(t);return r!==void 0&&i.addChildNode(new UP(r)),o!==void 0&&i.withName(o),i}constructor(t,r=[]){this.name=t,this.children=r}withName(t){return this.name=t,this}addAttribute(t,r){return this.attributes[t]=r,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,r){return r!=null&&(this.attributes[t]=r),this}cc(t,r,o=r){if(t[r]!=null){const i=Jo.of(r,t[r]).withName(o);this.c(i)}}l(t,r,o,i){t[r]!=null&&i().map(a=>{a.withName(o),this.c(a)})}lc(t,r,o,i){if(t[r]!=null){const s=i(),a=new Jo(o);s.map(l=>{a.c(l)}),this.c(a)}}toString(){const t=!!this.children.length;let r=`<${this.name}`;const o=this.attributes;for(const i of Object.keys(o)){const s=o[i];s!=null&&(r+=` ${i}="${kqe(""+s)}"`)}return r+=t?`>${this.children.map(i=>i.toString()).join("")}</${this.name}>`:"/>"}}let GO;function Mqe(e){GO||(GO=new DOMParser);const t=GO.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const r=o=>{if(o.nodeType===Node.TEXT_NODE&&o.textContent?.trim())return o.textContent;if(o.nodeType===Node.ELEMENT_NODE){const i=o;if(i.attributes.length===0&&i.childNodes.length===0)return"";const s={},a=Array.from(i.attributes);for(const c of a)s[`${c.name}`]=c.value;const l=Array.from(i.childNodes);for(const c of l){const u=r(c);if(u!=null){const d=c.nodeName;if(l.length===1&&a.length===0&&d==="#text")return u;s[d]?Array.isArray(s[d])?s[d].push(u):s[d]=[s[d],u]:s[d]=u}else if(l.length===1&&a.length===0)return i.textContent}return s}return null};return{[t.documentElement.nodeName]:r(t.documentElement)}}class Aqe extends IC{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new e7(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,r,o){const i=or.of(t),s=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(s).find(u=>!!u.getMemberTraits().eventPayload)){const u={},d=Object.keys(s)[0];return s[d].isBlobSchema()?u[d]=r:u[d]=this.read(s[d],r),u}const l=(this.serdeContext?.utf8Encoder??zu)(r),c=this.parseXml(l);return this.readSchema(t,o?c[o]:c)}readSchema(t,r){const o=or.of(t);if(o.isUnitSchema())return;const i=o.getMergedTraits();if(o.isListSchema()&&!Array.isArray(r))return this.readSchema(o,[r]);if(r==null)return r;if(typeof r=="object"){const s=!!i.sparse,a=!!i.xmlFlattened;if(o.isListSchema()){const c=o.getValueSchema(),u=[],d=c.getMergedTraits().xmlName??"member",f=a?r:(r[0]??r)[d],p=Array.isArray(f)?f:[f];for(const h of p)(h!=null||s)&&u.push(this.readSchema(c,h));return u}const l={};if(o.isMapSchema()){const c=o.getKeySchema(),u=o.getValueSchema();let d;a?d=Array.isArray(r)?r:[r]:d=Array.isArray(r.entry)?r.entry:[r.entry];const f=c.getMergedTraits().xmlName??"key",p=u.getMergedTraits().xmlName??"value";for(const h of d){const b=h[f],g=h[p];(g!=null||s)&&(l[b]=this.readSchema(u,g))}return l}if(o.isStructSchema()){const c=o.isUnionSchema();let u;c&&(u=new v7(r,l));for(const[d,f]of o.structIterator()){const p=f.getMergedTraits(),h=p.httpPayload?p.xmlName??f.getName():f.getMemberTraits().xmlName??d;c&&u.mark(h),r[h]!=null&&(l[d]=this.readSchema(f,r[h]))}return c&&u.writeUnknown(),l}if(o.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${o.getName(!0)}`)}return o.isListSchema()?[]:o.isMapSchema()||o.isStructSchema()?{}:this.stringDeserializer.read(o,r)}parseXml(t){if(t.length){let r;try{r=Mqe(t)}catch(a){throw a&&typeof a=="object"&&Object.defineProperty(a,"$responseBodyText",{value:t}),a}const o="#text",i=Object.keys(r)[0],s=r[i];return s[o]&&(s[i]=s[o],delete s[o]),b7(s)}return{}}}const Dqe=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class _qe extends IC{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,r){const o=or.of(t);if(o.isStringSchema()&&typeof r=="string")this.stringBuffer=r;else if(o.isBlobSchema())this.byteBuffer="byteLength"in r?r:(this.serdeContext?.base64Decoder??Tu)(r);else{this.buffer=this.writeStruct(o,r,void 0);const i=o.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(o.getName())}}flush(){if(this.byteBuffer!==void 0){const r=this.byteBuffer;return delete this.byteBuffer,r}if(this.stringBuffer!==void 0){const r=this.stringBuffer;return delete this.stringBuffer,r}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,r,o){const i=t.getMergedTraits(),s=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!s||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const a=Jo.of(s),[l,c]=this.getXmlnsAttribute(t,o);for(const[d,f]of t.structIterator()){const p=r[d];if(p!=null||f.isIdempotencyToken()){if(f.getMergedTraits().xmlAttribute){a.addAttribute(f.getMergedTraits().xmlName??d,this.writeSimple(f,p));continue}if(f.isListSchema())this.writeList(f,p,a,c);else if(f.isMapSchema())this.writeMap(f,p,a,c);else if(f.isStructSchema())a.addChildNode(this.writeStruct(f,p,c));else{const h=Jo.of(f.getMergedTraits().xmlName??f.getMemberName());this.writeSimpleInto(f,p,h,c),a.addChildNode(h)}}}const{$unknown:u}=r;if(u&&t.isUnionSchema()&&Array.isArray(u)&&Object.keys(r).length===1){const[d,f]=u,p=Jo.of(d);if(typeof f!="string")if(r instanceof Jo||r instanceof UP)a.addChildNode(r);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,f,p,c),a.addChildNode(p)}return c&&a.addAttribute(l,c),a}writeList(t,r,o,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const s=t.getMergedTraits(),a=t.getValueSchema(),l=a.getMergedTraits(),c=!!l.sparse,u=!!s.xmlFlattened,[d,f]=this.getXmlnsAttribute(t,i),p=(h,b)=>{if(a.isListSchema())this.writeList(a,Array.isArray(b)?b:[b],h,f);else if(a.isMapSchema())this.writeMap(a,b,h,f);else if(a.isStructSchema()){const g=this.writeStruct(a,b,f);h.addChildNode(g.withName(u?s.xmlName??t.getMemberName():l.xmlName??"member"))}else{const g=Jo.of(u?s.xmlName??t.getMemberName():l.xmlName??"member");this.writeSimpleInto(a,b,g,f),h.addChildNode(g)}};if(u)for(const h of r)(c||h!=null)&&p(o,h);else{const h=Jo.of(s.xmlName??t.getMemberName());f&&h.addAttribute(d,f);for(const b of r)(c||b!=null)&&p(h,b);o.addChildNode(h)}}writeMap(t,r,o,i,s=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const a=t.getMergedTraits(),l=t.getKeySchema(),u=l.getMergedTraits().xmlName??"key",d=t.getValueSchema(),f=d.getMergedTraits(),p=f.xmlName??"value",h=!!f.sparse,b=!!a.xmlFlattened,[g,y]=this.getXmlnsAttribute(t,i),x=(C,O,T)=>{const P=Jo.of(u,O),[I,A]=this.getXmlnsAttribute(l,y);A&&P.addAttribute(I,A),C.addChildNode(P);let _=Jo.of(p);d.isListSchema()?this.writeList(d,T,_,y):d.isMapSchema()?this.writeMap(d,T,_,y,!0):d.isStructSchema()?_=this.writeStruct(d,T,y):this.writeSimpleInto(d,T,_,y),C.addChildNode(_)};if(b){for(const[C,O]of Object.entries(r))if(h||O!=null){const T=Jo.of(a.xmlName??t.getMemberName());x(T,C,O),o.addChildNode(T)}}else{let C;s||(C=Jo.of(a.xmlName??t.getMemberName()),y&&C.addAttribute(g,y),o.addChildNode(C));for(const[O,T]of Object.entries(r))if(h||T!=null){const P=Jo.of("entry");x(P,O,T),(s?o:C).addChildNode(P)}}}writeSimple(t,r){if(r===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const o=or.of(t);let i=null;if(r&&typeof r=="object")if(o.isBlobSchema())i=(this.serdeContext?.base64Encoder??rc)(r);else if(o.isTimestampSchema()&&r instanceof Date)switch(OC(o,this.settings)){case 5:i=r.toISOString().replace(".000Z","Z");break;case 6:i=o0(r);break;case 7:i=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",r),i=o0(r);break}else{if(o.isBigDecimalSchema()&&r)return r instanceof cg?r.string:String(r);throw o.isMapSchema()||o.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${o.getName(!0)}`)}if((o.isBooleanSchema()||o.isNumericSchema()||o.isBigIntegerSchema()||o.isBigDecimalSchema())&&(i=String(r)),o.isStringSchema()&&(r===void 0&&o.isIdempotencyToken()?i=wC():i=String(r)),i===null)throw new Error(`Unhandled schema-value pair ${o.getName(!0)}=${r}`);return i}writeSimpleInto(t,r,o,i){const s=this.writeSimple(t,r),a=or.of(t),l=new UP(s),[c,u]=this.getXmlnsAttribute(a,i);u&&o.addAttribute(c,u),o.addChildNode(l)}getXmlnsAttribute(t,r){const o=t.getMergedTraits(),[i,s]=o.xmlNamespace??[];return s&&s!==r?[i?`xmlns:${i}`:"xmlns",s]:[void 0,void 0]}}class Nqe extends IC{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new _qe(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Aqe(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Fqe extends Bze{codec;serializer;deserializer;mixin=new y7;constructor(t){super(t);const r={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new Nqe(r),this.serializer=new zze(this.codec.createSerializer(),r),this.deserializer=new Vze(this.codec.createDeserializer(),r)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,r,o){const i=await super.serializeRequest(t,r,o),s=or.of(t.input);if(!i.headers["content-type"]){const a=this.mixin.resolveRestContentType(this.getDefaultContentType(),s);a&&(i.headers["content-type"]=a)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("<?xml ")&&!this.hasUnstructuredPayloadBinding(s)&&(i.body='<?xml version="1.0" encoding="UTF-8"?>'+i.body),i}async deserializeResponse(t,r,o){return super.deserializeResponse(t,r,o)}async handleError(t,r,o,i,s){const a=Dqe(o,i)??"Unknown";if(i.Error&&typeof i.Error=="object")for(const b of Object.keys(i.Error))i[b]=i.Error[b],b.toLowerCase()==="message"&&(i.message=i.Error[b]);i.RequestId&&!s.requestId&&(s.requestId=i.RequestId);const{errorSchema:l,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,o,i,s),u=or.of(l),d=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",f=ti.for(l[1]).getErrorCtor(l)??Error,p=new f(d);await this.deserializeHttpMessage(l,r,o,i);const h={};for(const[b,g]of u.structIterator()){const y=g.getMergedTraits().xmlName??b,x=i.Error?.[y]??i[y];h[b]=this.codec.createDeserializer().readSchema(g,x)}throw this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},h),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,r]of t.structIterator())if(r.getMergedTraits().httpPayload)return!(r.isStructSchema()||r.isMapSchema()||r.isListSchema());return!1}}const GP=[Jn.CRC32,Jn.CRC32C,Jn.CRC64NVME,Jn.SHA1,Jn.SHA256],Lqe=[Jn.SHA256,Jn.SHA1,Jn.CRC32,Jn.CRC32C,Jn.CRC64NVME],$qe=(e,{requestChecksumRequired:t,requestAlgorithmMember:r,requestChecksumCalculation:o})=>{if(!r)return o===$f.WHEN_SUPPORTED||t?$P:void 0;if(!e[r])return;const i=e[r];if(!GP.includes(i))throw new Error(`The checksum algorithm "${i}" is not supported by the client. Select one of ${GP}.`);return i},wM=e=>e===Jn.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,jqe=(e,t)=>{const r=e.toLowerCase();for(const o of Object.keys(t))if(r===o.toLowerCase())return!0;return!1},Bqe=(e,t)=>{const r=e.toLowerCase();for(const o of Object.keys(t))if(o.toLowerCase().startsWith(r))return!0;return!1},x7=e=>e!==void 0&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!c7(e);function TM(e,t,r,o){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(d){try{u(o.next(d))}catch(f){a(f)}}function c(d){try{u(o.throw(d))}catch(f){a(f)}}function u(d){d.done?s(d.value):i(d.value).then(l,c)}u((o=o.apply(e,t||[])).next())})}function OM(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(u){return function(d){return c([u,d])}}function c(u){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(o=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{o=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function S7(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const Vqe=e=>new TextEncoder().encode(e);var Hqe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Vqe;function oc(e){return e instanceof Uint8Array?e:typeof e=="string"?Hqe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function lm(e){return typeof e=="string"?e.length===0:e.byteLength===0}function C7(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function w7(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var zqe=(function(){function e(){this.crc32c=new XV}return e.prototype.update=function(t){lm(t)||this.crc32c.update(oc(t))},e.prototype.digest=function(){return TM(this,void 0,void 0,function(){return OM(this,function(t){return[2,C7(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new XV},e})(),XV=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,o;try{for(var i=S7(t),s=i.next();!s.done;s=i.next()){var a=s.value;this.checksum=this.checksum>>>8^Uqe[(this.checksum^a)&255]}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),qqe=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],Uqe=w7(qqe);const Gqe=()=>{const t=new Array(8);for(let r=0;r<8;r++){const o=new Array(512);for(let i=0;i<256;i++){let s=BigInt(i);for(let a=0;a<8*(r+1);a++)s&1n?s=s>>1n^0x9a6c9329ac4bc9b5n:s=s>>1n;o[i*2]=Number(s>>32n&0xffffffffn),o[i*2+1]=Number(s&0xffffffffn)}t[r]=new Uint32Array(o)}return t};let WO,dh,WP,KP,YP,ZP,XP,QP,JP;const Wqe=()=>{WO||(WO=Gqe(),[dh,WP,KP,YP,ZP,XP,QP,JP]=WO)};class Kqe{c1=0;c2=0;constructor(){Wqe(),this.reset()}update(t){const r=t.length;let o=0,i=this.c1,s=this.c2;for(;o+8<=r;){const a=((s^t[o++])&255)<<1,l=((s>>>8^t[o++])&255)<<1,c=((s>>>16^t[o++])&255)<<1,u=((s>>>24^t[o++])&255)<<1,d=((i^t[o++])&255)<<1,f=((i>>>8^t[o++])&255)<<1,p=((i>>>16^t[o++])&255)<<1,h=((i>>>24^t[o++])&255)<<1;i=JP[a]^QP[l]^XP[c]^ZP[u]^YP[d]^KP[f]^WP[p]^dh[h],s=JP[a+1]^QP[l+1]^XP[c+1]^ZP[u+1]^YP[d+1]^KP[f+1]^WP[p+1]^dh[h+1]}for(;o<r;){const a=((s^t[o])&255)<<1;s=(s>>>8|(i&255)<<24)>>>0,i=i>>>8^dh[a],s^=dh[a+1],o++}this.c1=i,this.c2=s}async digest(){const t=this.c1^4294967295,r=this.c2^4294967295;return new Uint8Array([t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255])}reset(){this.c1=4294967295,this.c2=4294967295}}var Yqe=(function(){function e(){this.crc32=new s0}return e.prototype.update=function(t){lm(t)||this.crc32.update(oc(t))},e.prototype.digest=function(){return TM(this,void 0,void 0,function(){return OM(this,function(t){return[2,C7(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new s0},e})(),s0=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,o;try{for(var i=S7(t),s=i.next();!s.done;s=i.next()){var a=s.value;this.checksum=this.checksum>>>8^Xqe[(this.checksum^a)&255]}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),Zqe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Xqe=w7(Zqe);const Qqe=()=>Yqe,T7=(e,t)=>{switch(e){case Jn.MD5:return t.md5;case Jn.CRC32:return Qqe();case Jn.CRC32C:return zqe;case Jn.CRC64NVME:return Kqe;case Jn.SHA1:return t.sha1;case Jn.SHA256:return t.sha256;default:throw new Error(`Unsupported checksum algorithm: ${e}`)}},O7=(e,t)=>{const r=new e;return r.update(jf(t||"")),r.digest()},Jqe={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},e3e=(e,t)=>(r,o)=>async i=>{if(!Br.isInstance(i.request)||Bqe("x-amz-checksum-",i.request.headers))return r(i);const{request:s,input:a}=i,{body:l,headers:c}=s,{base64Encoder:u,streamHasher:d}=e,{requestChecksumRequired:f,requestAlgorithmMember:p}=t,h=await e.requestChecksumCalculation(),b=p?.name,g=p?.httpHeader;b&&!a[b]&&(h===$f.WHEN_SUPPORTED||f)&&(a[b]=$P,g&&(c[g]=$P));const y=$qe(a,{requestChecksumRequired:f,requestAlgorithmMember:p?.name,requestChecksumCalculation:h});let x=l,C=c;if(y){switch(y){case Jn.CRC32:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case Jn.CRC32C:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case Jn.CRC64NVME:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case Jn.SHA1:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case Jn.SHA256:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const O=wM(y),T=T7(y,e);if(x7(l)){const{getAwsChunkedEncodingStream:P,bodyLengthChecker:I}=e;x=P(typeof e.requestStreamBufferSize=="number"&&e.requestStreamBufferSize>=8*1024?HHe(l,e.requestStreamBufferSize,o.logger):l,{base64Encoder:u,bodyLengthChecker:I,checksumLocationName:O,checksumAlgorithmFn:T,streamHasher:d}),C={...c,"content-encoding":c["content-encoding"]?`${c["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":c["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":O},delete C["content-length"]}else if(!jqe(O,c)){const P=await O7(T,l);C={...c,[O]:u(P)}}}try{return await r({...i,request:{...s,headers:C,body:x}})}catch(O){if(O instanceof Error&&O.name==="InvalidChunkSizeError")try{O.message.endsWith(".")||(O.message+="."),O.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw O}},t3e={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},n3e=(e,t)=>(r,o)=>async i=>{const s=i.input,{requestValidationModeMember:a}=t,l=await e.requestChecksumCalculation(),c=await e.responseChecksumValidation();switch(l){case $f.WHEN_REQUIRED:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case $f.WHEN_SUPPORTED:Gr(o,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(c){case NO.WHEN_REQUIRED:Gr(o,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case NO.WHEN_SUPPORTED:Gr(o,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return a&&!s[a]&&c===NO.WHEN_SUPPORTED&&(s[a]="ENABLED"),r(i)},P7=(e=[])=>{const t=[];for(const r of Lqe)!e.includes(r)||!GP.includes(r)||t.push(r);return t},r3e=e=>{const t=e.lastIndexOf("-");if(t!==-1){const r=e.slice(t+1);if(!r.startsWith("0")){const o=parseInt(r,10);if(!isNaN(o)&&o>=1&&o<=1e4)return!0}}return!1},o3e=async(e,{checksumAlgorithmFn:t,base64Encoder:r})=>r(await O7(t,e)),i3e=async(e,{config:t,responseAlgorithms:r,logger:o})=>{const i=P7(r),{body:s,headers:a}=e;for(const l of i){const c=wM(l),u=a[c];if(u){let d;try{d=T7(l,t)}catch(h){if(l===Jn.CRC64NVME){o?.warn(`Skipping ${Jn.CRC64NVME} checksum validation: ${h.message}`);continue}throw h}const{base64Encoder:f}=t;if(x7(s)){e.body=jHe({expectedChecksum:u,checksumSourceLocation:c,checksum:new d,source:s,base64Encoder:f});return}const p=await o3e(s,{checksumAlgorithmFn:d,base64Encoder:f});if(p===u)break;throw new Error(`Checksum mismatch: expected "${p}" but received "${u}" in response header "${c}".`)}}},s3e={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},a3e=(e,t)=>(r,o)=>async i=>{if(!Br.isInstance(i.request))return r(i);const s=i.input,a=await r(i),l=a.response,{requestValidationModeMember:c,responseAlgorithms:u}=t;if(c&&s[c]==="ENABLED"){const{clientName:d,commandName:f}=o;if(d==="S3Client"&&f==="GetObjectCommand"&&P7(u).every(h=>{const b=wM(h),g=l.headers[b];return!g||r3e(g)}))return a;await i3e(l,{config:e,responseAlgorithms:u,logger:o.logger})}return a},l3e=(e,t)=>({applyToStack:r=>{r.add(e3e(e,t),Jqe),r.addRelativeTo(n3e(e,t),t3e),r.addRelativeTo(a3e(e,t),s3e)}}),c3e=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:r,requestStreamBufferSize:o}=e;return Object.assign(e,{requestChecksumCalculation:ks(t??CHe),responseChecksumValidation:ks(r??wHe),requestStreamBufferSize:Number(o??0)})};function u3e(e){return e}const d3e=e=>t=>async r=>{if(!Br.isInstance(r.request))return t(r);const{request:o}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let s=o.hostname;o.port!=null&&(s+=`:${o.port}`),o.headers.host=s}return t(r)},f3e={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},E7=e=>({applyToStack:t=>{t.add(d3e(e),f3e)}}),p3e=()=>(e,t)=>async r=>{try{const o=await e(r),{clientName:i,commandName:s,logger:a,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=l,d=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=o.output;return a?.info?.({clientName:i,commandName:s,input:d(r.input),output:f(h),metadata:p}),o}catch(o){const{clientName:i,commandName:s,logger:a,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:c}=l,u=c??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:s,input:u(r.input),error:o,metadata:o.$metadata}),o}},h3e={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},I7=e=>({applyToStack:t=>{t.add(p3e(),h3e)}}),m3e={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},g3e=()=>e=>async t=>e(t),k7=e=>({applyToStack:t=>{t.add(g3e(),m3e)}}),b3e="content-length",y3e="x-amz-decoded-content-length";function v3e(){return(e,t)=>async r=>{const{request:o}=r;if(Br.isInstance(o)&&!(b3e in o.headers)&&!(y3e in o.headers)){const i="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof t?.logger?.warn=="function"&&!(t.logger instanceof EC)?t.logger.warn(i):console.warn(i)}return e({...r})}}const x3e={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},S3e=e=>({applyToStack:t=>{t.add(v3e(),x3e)}}),C3e=e=>(t,r)=>async o=>{const i=await e.region(),s=e.region;let a=()=>{};r.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>r.__s3RegionRedirect}),a=()=>Object.defineProperty(e,"region",{writable:!0,value:s}));try{const l=await t(o);if(r.__s3RegionRedirect){a();const c=await e.region();if(i!==c)throw new Error("Region was not restored following S3 region redirect.")}return l}catch(l){throw a(),l}},w3e={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function T3e(e){return(t,r)=>async o=>{try{return await t(o)}catch(i){if(e.followRegionRedirects){const s=i?.$metadata?.httpStatusCode,a=r.commandName==="HeadBucketCommand",l=i?.$response?.headers?.["x-amz-bucket-region"];if(l&&(s===301||s===400&&(i?.name==="IllegalLocationConstraintException"||a))){try{const c=l;r.logger?.debug(`Redirecting from ${await e.region()} to ${c}`),r.__s3RegionRedirect=c}catch(c){throw new Error("Region redirect failed: "+c)}return t(o)}}throw i}}}const O3e={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},P3e=e=>({applyToStack:t=>{t.add(T3e(e),O3e),t.addRelativeTo(C3e(e),w3e)}});class PM{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const r=this.data[t];if(r)return r}set(t,r){return this.data[t]=r,r}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+PM.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const r in this.data){const o=this.data[r];if(!o.isRefreshing){const i=await o.identity;i.expiration&&i.expiration.getTime()<t&&delete this.data[r]}}}}class KO{_identity;isRefreshing;accessed;constructor(t,r=!1,o=Date.now()){this._identity=t,this.isRefreshing=r,this.accessed=o}get identity(){return this.accessed=Date.now(),this._identity}}class EM{createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(t,r=new PM){this.createSessionFn=t,this.cache=r}async getS3ExpressIdentity(t,r){const o=r.Bucket,{cache:i}=this,s=i.get(o);return s?s.identity.then(a=>(a.expiration?.getTime()??0)<Date.now()?i.set(o,new KO(this.getIdentity(o))).identity:((a.expiration?.getTime()??0)<Date.now()+EM.REFRESH_WINDOW_MS&&!s.isRefreshing&&(s.isRefreshing=!0,this.getIdentity(o).then(u=>{i.set(o,new KO(Promise.resolve(u)))})),a)):i.set(o,new KO(this.getIdentity(o))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
464
- `+i)});const r=await this.createSessionFn(t);if(!r.Credentials?.AccessKeyId||!r.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretAccessKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration?new Date(r.Credentials.Expiration):void 0}}}const E3e="Directory",I3e="S3Express",k3e="sigv4-s3express",eE="X-Amz-S3session-Token",tE=eE.toLowerCase();class R3e extends zP{async signWithCredentials(t,r,o){const i=QV(r);t.headers[tE]=r.sessionToken;const s=this;return JV(s,i),s.signRequest(t,o??{})}async presignWithCredentials(t,r,o){const i=QV(r);return delete t.headers[tE],t.headers[eE]=r.sessionToken,t.query=t.query??{},t.query[eE]=r.sessionToken,JV(this,i),this.presign(t,o)}}function QV(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function JV(e,t){const r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),o=e.credentialProvider,i=()=>(clearTimeout(r),e.credentialProvider=o,Promise.resolve(t));e.credentialProvider=i}const M3e=e=>(t,r)=>async o=>{if(r.endpointV2){const i=r.endpointV2,s=i.properties?.authSchemes?.[0]?.name===k3e;if((i.properties?.backend===I3e||i.properties?.bucketType===E3e)&&(Gr(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),s){const l=o.input.Bucket;if(l){const c=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:l});r.s3ExpressIdentity=c,Br.isInstance(o.request)&&c.sessionToken&&(o.request.headers[tE]=c.sessionToken)}}}return t(o)},A3e={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},D3e=e=>({applyToStack:t=>{t.add(M3e(e),A3e)}}),_3e=async(e,t,r,o)=>{const i=await o.signWithCredentials(r,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},N3e=e=>t=>{throw t},F3e=(e,t)=>{},L3e=e=>(t,r)=>async o=>{if(!Br.isInstance(o.request))return t(o);const s=ml(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:l,signer:c}=s;let u;r.s3ExpressIdentity?u=await _3e(r.s3ExpressIdentity,a,o.request,await e.signer()):u=await c.sign(o.request,l,a);const d=await t({...o,request:u}).catch((c.errorHandler||N3e)(a));return(c.successHandler||F3e)(d.response,a),d},$3e=e=>({applyToStack:t=>{t.addRelativeTo(L3e(e),VW)}}),j3e=(e,{session:t})=>{const[r,o]=t,{forcePathStyle:i,useAccelerateEndpoint:s,disableMultiregionAccessPoints:a,followRegionRedirects:l,s3ExpressIdentityProvider:c,bucketEndpoint:u,expectContinueHeader:d}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:s??!1,disableMultiregionAccessPoints:a??!1,followRegionRedirects:l??!1,s3ExpressIdentityProvider:c??new EM(async f=>r().send(new o({Bucket:f}))),bucketEndpoint:u??!1,expectContinueHeader:d??2097152})},B3e={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},V3e=3e3,H3e=e=>(t,r)=>async o=>{const i=await t(o),{response:s}=i;if(!wu.isInstance(s))return i;const{statusCode:a,body:l}=s;if(a<200||a>=300||!(typeof l?.stream=="function"||typeof l?.pipe=="function"||typeof l?.tee=="function"))return i;let u=l,d=l;l&&typeof l=="object"&&!(l instanceof Uint8Array)&&([u,d]=await JHe(l)),s.body=d;const f=await z3e(u,{streamCollector:async h=>GHe(h,V3e)});typeof u?.destroy=="function"&&u.destroy();const p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&B3e[r.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return p&&p.endsWith("</Error>")&&(s.statusCode=400),i},z3e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),q3e={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},R7=e=>({applyToStack:t=>{t.addRelativeTo(H3e(e),q3e)}}),U3e=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function G3e(e){return(t,r)=>async o=>{if(e.bucketEndpoint){const i=r.endpointV2;if(i){const s=o.input.Bucket;if(typeof s=="string")try{const a=new URL(s);r.endpointV2={...i,url:a}}catch(a){const l=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${s} could not be parsed as URL.`;throw r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l),a}}}return t(o)}}const W3e={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function K3e({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:o}}=r;if(!e&&typeof o=="string"&&!U3e(o)&&o.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${o}'`);throw i.name="InvalidBucketName",i}return t({...r})}}const Y3e={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Z3e=e=>({applyToStack:t=>{t.add(K3e(e),Y3e),t.addRelativeTo(G3e(e),W3e)}}),X3e=void 0;function Q3e(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function M7(e){const t=pf(e.userAgentAppId??X3e),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const o=await t();if(!Q3e(o)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof o!="string"?i?.warn("userAgentAppId must be a string or undefined."):o.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class A7{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const o=this.hash(t);if(o===!1)return r();if(!this.data.has(o)){if(this.data.size>this.capacity+10){const i=this.data.keys();let s=0;for(;;){const{value:a,done:l}=i.next();if(this.data.delete(a),l||++s>10)break}}this.data.set(o,r())}return this.data.get(o)}size(){return this.data.size}hash(t){let r="";const{parameters:o}=this;if(o.length===0)return!1;for(const i of o){const s=String(t[i]??"");if(s.includes("|;"))return!1;r+=s+"|;"}return r}}const J3e=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),IM=e=>J3e.test(e)||e.startsWith("[")&&e.endsWith("]"),e5e=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ug=(e,t=!1)=>{if(!t)return e5e.test(e);const r=e.split(".");for(const o of r)if(!ug(o))return!1;return!0},cm={},um="endpoints";function ic(e){return typeof e!="object"||e==null?e:"ref"in e?`$${ic(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ic).join(", ")})`:JSON.stringify(e,null,2)}class Xi extends Error{constructor(t){super(t),this.name="EndpointError"}}const t5e=(e,t)=>e===t,n5e=e=>{const t=e.split("."),r=[];for(const o of t){const i=o.indexOf("[");if(i!==-1){if(o.indexOf("]")!==o.length-1)throw new Xi(`Path: '${e}' does not end with ']'`);const s=o.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Xi(`Invalid array index: '${s}' in path: '${e}'`);i!==0&&r.push(o.slice(0,i)),r.push(s)}else r.push(o)}return r},D7=(e,t)=>n5e(t).reduce((r,o)=>{if(typeof r!="object")throw new Xi(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(o)]:r[o]},e),r5e=e=>e!=null,o5e=e=>!e,YO={[sm.HTTP]:80,[sm.HTTPS]:443},i5e=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:p,port:h,protocol:b="",path:g="",query:y={}}=e,x=new URL(`${b}//${p}${h?`:${h}`:""}${g}`);return x.search=Object.entries(y).map(([C,O])=>`${C}=${O}`).join("&"),x}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:o,hostname:i,pathname:s,protocol:a,search:l}=t;if(l)return null;const c=a.slice(0,-1);if(!Object.values(sm).includes(c))return null;const u=IM(i),d=r.includes(`${o}:${YO[c]}`)||typeof e=="string"&&e.includes(`${o}:${YO[c]}`),f=`${o}${d?`:${YO[c]}`:""}`;return{scheme:c,authority:f,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},s5e=(e,t)=>e===t,a5e=(e,t,r,o)=>t>=r||e.length<r?null:o?e.substring(e.length-r,e.length-t):e.substring(t,r),l5e=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),c5e={booleanEquals:t5e,getAttr:D7,isSet:r5e,isValidHostLabel:ug,not:o5e,parseURL:i5e,stringEquals:s5e,substring:a5e,uriEncode:l5e},_7=(e,t)=>{const r=[],o={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const s=e.indexOf("{",i);if(s===-1){r.push(e.slice(i));break}r.push(e.slice(i,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),i=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[c,u]=l.split("#");r.push(D7(o[c],u))}else r.push(o[l]);i=a+1}return r.join("")},u5e=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],kC=(e,t,r)=>{if(typeof e=="string")return _7(e,r);if(e.fn)return F7.callFunction(e,r);if(e.ref)return u5e(e,r);throw new Xi(`'${t}': ${String(e)} is not a string, function or reference.`)},N7=({fn:e,argv:t},r)=>{const o=t.map(s=>["boolean","number"].includes(typeof s)?s:F7.evaluateExpression(s,"arg",r)),i=e.split(".");return i[0]in cm&&i[1]!=null?cm[i[0]][i[1]](...o):c5e[e](...o)},F7={evaluateExpression:kC,callFunction:N7},d5e=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new Xi(`'${e}' is already defined in Reference Record.`);const o=N7(t,r);return r.logger?.debug?.(`${um} evaluateCondition: ${ic(t)} = ${ic(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},kM=(e=[],t)=>{const r={};for(const o of e){const{result:i,toAssign:s}=d5e(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!i)return{result:i};s&&(r[s.name]=s.value,t.logger?.debug?.(`${um} assign: ${s.name} := ${ic(s.value)}`))}return{result:!0,referenceRecord:r}},f5e=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:i.map(s=>{const a=kC(s,"Header value entry",t);if(typeof a!="string")throw new Xi(`Header '${o}' value '${a}' is not a string`);return a})}),{}),L7=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:j7.getEndpointProperty(i,t)}),{}),$7=(e,t)=>{if(Array.isArray(e))return e.map(r=>$7(r,t));switch(typeof e){case"string":return _7(e,t);case"object":if(e===null)throw new Xi(`Unexpected endpoint property: ${e}`);return j7.getEndpointProperties(e,t);case"boolean":return e;default:throw new Xi(`Unexpected endpoint property type: ${typeof e}`)}},j7={getEndpointProperty:$7,getEndpointProperties:L7},p5e=(e,t)=>{const r=kC(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new Xi(`Endpoint URL must be a string, got ${typeof r}`)},h5e=(e,t)=>{const{conditions:r,endpoint:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(!i)return;const a={...t,referenceRecord:{...t.referenceRecord,...s}},{url:l,properties:c,headers:u}=o;return t.logger?.debug?.(`${um} Resolving endpoint from template: ${ic(o)}`),{...u!=null&&{headers:f5e(u,a)},...c!=null&&{properties:L7(c,a)},url:p5e(l,a)}},m5e=(e,t)=>{const{conditions:r,error:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(i)throw new Xi(kC(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},B7=(e,t)=>{for(const r of e)if(r.type==="endpoint"){const o=h5e(r,t);if(o)return o}else if(r.type==="error")m5e(r,t);else if(r.type==="tree"){const o=V7.evaluateTreeRule(r,t);if(o)return o}else throw new Xi(`Unknown endpoint rule: ${r}`);throw new Xi("Rules evaluation failed")},g5e=(e,t)=>{const{conditions:r,rules:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(i)return V7.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...s}})},V7={evaluateRules:B7,evaluateTreeRule:g5e},H7=(e,t)=>{const{endpointParams:r,logger:o}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${um} Initial EndpointParams: ${ic(r)}`);const a=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,d])=>[u,d.default]);if(a.length>0)for(const[u,d]of a)r[u]=r[u]??d;const l=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of l)if(r[u]==null)throw new Xi(`Missing required parameter: '${u}'`);const c=B7(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${um} Resolved endpoint: ${ic(c)}`),c},z7=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!z7(r))return!1;return!0}return!(!ug(e)||e.length<3||e.length>63||e!==e.toLowerCase()||IM(e))},eH=":",b5e="/",y5e=e=>{const t=e.split(eH);if(t.length<6)return null;const[r,o,i,s,a,...l]=t;if(r!=="arn"||o===""||i===""||l.join(eH)==="")return null;const c=l.map(u=>u.split(b5e)).flat();return{partition:o,service:i,region:s,accountId:a,resourceId:c}},v5e=[{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)"}}}],x5e={partitions:v5e};let S5e=x5e;const C5e=e=>{const{partitions:t}=S5e;for(const o of t){const{regions:i,outputs:s}=o;for(const[a,l]of Object.entries(i))if(a===e)return{...s,...l}}for(const o of t){const{regionRegex:i,outputs:s}=o;if(new RegExp(i).test(e))return{...s}}const r=t.find(o=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},q7={isVirtualHostableS3Bucket:z7,parseArn:y5e,partition:C5e};cm.aws=q7;function w5e(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[o,i=null]=r.split("=");o=decodeURIComponent(o),i&&(i=decodeURIComponent(i)),o in t?Array.isArray(t[o])?t[o].push(i):t[o]=[t[o],i]:t[o]=i}return t}const dm=e=>{if(typeof e=="string")return dm(new URL(e));const{hostname:t,pathname:r,port:o,protocol:i,search:s}=e;let a;return s&&(a=w5e(s)),{hostname:t,port:o?parseInt(o):void 0,protocol:i,path:r,query:a}},T5e=/\d{12}\.ddb/;async function O5e(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Gr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const s=await t.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?Gr(e,"RETRY_MODE_ADAPTIVE","F"):Gr(e,"RETRY_MODE_STANDARD","E"):Gr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const s=e.endpointV2;switch(String(s?.url?.hostname).match(T5e)&&Gr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Gr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const s=i;s.accountId&&Gr(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,l]of Object.entries(s.$source??{}))Gr(e,a,l)}}const tH="user-agent",ZO="x-amz-user-agent",nH=" ",XO="/",P5e=/[^!$%&'*+\-.^_`|~\w]/g,E5e=/[^!$%&'*+\-.^_`|~\w#]/g,rH="-",I5e=1024;function k5e(e){let t="";for(const r in e){const o=e[r];if(t.length+o.length+1<=I5e){t.length?t+=","+o:t+=o;continue}break}return t}const R5e=e=>(t,r)=>async o=>{const{request:i}=o;if(!Br.isInstance(i))return t(o);const{headers:s}=i,a=r?.userAgent?.map(Ov)||[],l=(await e.defaultUserAgentProvider()).map(Ov);await O5e(r,e,o);const c=r;l.push(`m/${k5e(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Ov)||[],d=await e.userAgentAppId();d&&l.push(Ov(["app",`${d}`]));const f=[].concat([...l,...a,...u]).join(nH),p=[...l.filter(h=>h.startsWith("aws-sdk-")),...u].join(nH);return e.runtime!=="browser"?(p&&(s[ZO]=s[ZO]?`${s[tH]} ${p}`:p),s[tH]=f):s[ZO]=f,t({...o,request:i})},Ov=e=>{const t=e[0].split(XO).map(a=>a.replace(P5e,rH)).join(XO),r=e[1]?.replace(E5e,rH),o=t.indexOf(XO),i=t.substring(0,o);let s=t.substring(o+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},M5e={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},U7=e=>({applyToStack:t=>{t.add(R5e(e),M5e)}}),G7=!1,W7=!1,oH=new Set,A5e=(e,t=ug)=>{if(!oH.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else oH.add(e)},K7=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),D5e=e=>K7(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Y7=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const o=typeof t=="function"?await t():t,i=D5e(o);return A5e(i),i},useFipsEndpoint:async()=>{const o=typeof t=="string"?t:await t();return K7(o)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},_5e=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),iH="content-length";function N5e(e){return t=>async r=>{const o=r.request;if(Br.isInstance(o)){const{body:i,headers:s}=o;if(i&&Object.keys(s).map(a=>a.toLowerCase()).indexOf(iH)===-1)try{const a=e(i);o.headers={...o.headers,[iH]:String(a)}}catch{}}return t({...r,request:o})}}const F5e={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Z7=e=>({applyToStack:t=>{t.add(N5e(e.bodyLengthChecker),F5e)}}),L5e=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),H5e(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!V5e(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},$5e=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,j5e=/(\d+\.){3}\d+/,B5e=/\.\./,V5e=e=>$5e.test(e)&&!j5e.test(e)&&!B5e.test(e),H5e=e=>{const[t,r,o,,,i]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,a=!!(s&&r&&o&&i);if(s&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},z5e=(e,t,r,o=!1)=>{const i=async()=>{let s;return o?s=r.clientContextParams?.[e]??r[e]??r[t]:s=r[e]??r[t],typeof s=="function"?s():s};return e==="credentialScope"||t==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const s=await i();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:a,hostname:l,port:c,path:u}=s;return`${a}//${l}${c?":"+c:""}${u}`}}return s}:i},X7=async e=>{},Q7=e=>typeof e=="object"?"url"in e?dm(e.url):e:dm(e),q5e=async(e,t,r,o)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await X7(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(Q7(a)),r.isCustomEndpoint=!0)}const i=await J7(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,o)},J7=async(e,t,r)=>{const o={},i=t?.getEndpointParameterInstructions?.()||{};for(const[s,a]of Object.entries(i))switch(a.type){case"staticContextParams":o[s]=a.value;break;case"contextParams":o[s]=e[a.name];break;case"clientContextParams":case"builtInParams":o[s]=await z5e(a.name,s,r,a.type!=="builtInParams")();break;case"operationContextParams":o[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(o,r),String(r.serviceId).toLowerCase()==="s3"&&await L5e(o),o},U5e=({config:e,instructions:t})=>(r,o)=>async i=>{e.isCustomEndpoint&&qze(o,"ENDPOINT_OVERRIDE","N");const s=await q5e(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;const a=o.authSchemes?.[0];if(a){o.signing_region=a.signingRegion,o.signing_service=a.signingName;const c=ml(o)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},G5e={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:MHe.name},RM=(e,t)=>({applyToStack:r=>{r.addRelativeTo(U5e({config:e,instructions:t}),G5e)}}),eK=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:i}=e,s=r!=null?async()=>Q7(await ks(r)()):void 0,l=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ks(o??!1),useFipsEndpoint:ks(i??!1)});let c;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=X7(e.serviceId)),c),l};var Bf;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Bf||(Bf={}));const fm=3,tK=Bf.STANDARD,W5e=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],K5e=["TimeoutError","RequestTimeout","RequestTimeoutException"],Y5e=[500,502,503,504],Z5e=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],X5e=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Q5e=e=>e?.$retryable!==void 0,J5e=e=>e.$metadata?.clockSkewCorrected,e4e=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},nK=e=>e.$metadata?.httpStatusCode===429||W5e.includes(e.name)||e.$retryable?.throttling==!0,MM=(e,t=0)=>Q5e(e)||J5e(e)||K5e.includes(e.name)||Z5e.includes(e?.code||"")||X5e.includes(e?.code||"")||Y5e.includes(e.$metadata?.httpStatusCode||0)||e4e(e)||e.cause!==void 0&&t<=10&&MM(e.cause,t+1),t4e=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!MM(e)}return!1};class AM{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(o=>AM.setTimeoutFn(o,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),nK(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const o=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(o*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const nE=100,rK=20*1e3,n4e=500,sH=500,r4e=5,o4e=10,i4e=1,s4e="amz-sdk-invocation-id",a4e="amz-sdk-request",l4e=()=>{let e=nE;return{computeNextBackoffDelay:o=>Math.floor(Math.min(rK,Math.random()*2**o*e)),setDelayBase:o=>{e=o}}},aH=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(rK,e),getRetryCost:()=>r});class oK{maxAttempts;mode=Bf.STANDARD;capacity=sH;retryBackoffStrategy=l4e();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return aH({retryDelay:nE,retryCount:0})}async refreshRetryTokenForRetry(t,r){const o=await this.getMaxAttempts();if(this.shouldRetry(t,r,o)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?n4e:nE);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,l=this.getCapacityCost(i);return this.capacity-=l,aH({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:l})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(sH,this.capacity+(t.getRetryCost()??i4e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${fm}`),fm}}shouldRetry(t,r,o){return t.getRetryCount()+1<o&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?o4e:r4e}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class c4e{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=Bf.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;const{rateLimiter:o}=r??{};this.rateLimiter=o??new AM,this.standardRetryStrategy=new oK(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const u4e=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),iK=e=>{const{retryStrategy:t,retryMode:r,maxAttempts:o}=e,i=ks(o??fm);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await ks(r)()===Bf.ADAPTIVE?new c4e(i):new oK(i))})},d4e=e=>e?.body instanceof ReadableStream,f4e=e=>(t,r)=>async o=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(p4e(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,u=0;const{request:d}=o,f=Br.isInstance(d);for(f&&(d.headers[s4e]=wC());;)try{f&&(d.headers[a4e]=`attempt=${c+1}; max=${s}`);const{response:p,output:h}=await t(o);return i.recordSuccess(a),h.$metadata.attempts=c+1,h.$metadata.totalRetryDelay=u,{response:p,output:h}}catch(p){const h=h4e(p);if(l=u4e(p),f&&d4e(d))throw(r.logger instanceof EC?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,h)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=u,l}c=a.getRetryCount();const b=a.getRetryDelay();u+=b,await new Promise(g=>setTimeout(g,b))}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,o)},p4e=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",h4e=e=>{const t={error:e,errorType:m4e(e)},r=b4e(e.$response);return r&&(t.retryAfterHint=r),t},m4e=e=>nK(e)?"THROTTLING":MM(e)?"TRANSIENT":t4e(e)?"SERVER_ERROR":"CLIENT_ERROR",g4e={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},sK=e=>({applyToStack:t=>{t.add(f4e(e),g4e)}}),b4e=e=>{if(!wu.isInstance(e))return;const t=Object.keys(e.headers).find(s=>s.toLowerCase()==="retry-after");if(!t)return;const r=e.headers[t],o=Number(r);return Number.isNaN(o)?new Date(r):new Date(o*1e3)};class aK{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new R3e(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,r,o)}async presign(t,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,o)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const DM="required",ue="type",Be="rules",be="conditions",ke="fn",Re="argv",Pt="ref",tn="assign",dt="url",ft="properties",Ja="backend",go="authSchemes",Wr="disableDoubleEncoding",Kr="signingName",Eo="signingRegion",pt="headers",_M="signingRegionSet",y4e=6,v4e=!1,ca=!0,qi="isSet",jr="booleanEquals",vt="error",a0="aws.partition",wn="stringEquals",wr="getAttr",Or="name",Qn="substring",lH="bucketSuffix",NM="parseURL",Ke="endpoint",Ve="tree",l0="aws.isVirtualHostableS3Bucket",c0="{url#scheme}://{Bucket}.{url#authority}{url#path}",Sa="not",cH="accessPointSuffix",Xv="{url#scheme}://{url#authority}{url#path}",lK="hardwareType",cK="regionPrefix",uH="bucketAliasSuffix",rE="outpostId",qu="isValidHostLabel",FM="sigv4a",pm="s3-outposts",Vf="s3",uK="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",dK="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",dH="https://{Bucket}.s3.{partitionResult#dnsSuffix}",fK="aws.parseArn",pK="bucketArn",hK="arnType",u0="",LM="s3-object-lambda",mK="accesspoint",$M="accessPointName",fH="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",pH="mrapPartition",hH="outpostType",mH="arnPrefix",gK="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",gH="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",bH="https://s3.{partitionResult#dnsSuffix}",Fd={[DM]:!1,[ue]:"string"},Ld={[DM]:!0,default:!1,[ue]:"boolean"},Yp={[DM]:!1,[ue]:"boolean"},gs={[ke]:jr,[Re]:[{[Pt]:"Accelerate"},!0]},rr={[ke]:jr,[Re]:[{[Pt]:"UseFIPS"},!0]},Yn={[ke]:jr,[Re]:[{[Pt]:"UseDualStack"},!0]},Lr={[ke]:qi,[Re]:[{[Pt]:"Endpoint"}]},bK={[ke]:a0,[Re]:[{[Pt]:"Region"}],[tn]:"partitionResult"},yH={[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"partitionResult"},Or]},"aws-cn"]},kh={[ke]:qi,[Re]:[{[Pt]:"Bucket"}]},xn={[Pt]:"Bucket"},vH={[be]:[gs],[vt]:"S3Express does not support S3 Accelerate.",[ue]:vt},xH={[be]:[Lr,{[ke]:NM,[Re]:[{[Pt]:"Endpoint"}],[tn]:"url"}],[Be]:[{[be]:[{[ke]:qi,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"},!0]}],[Be]:[{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ke]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:l0,[Re]:[xn,!1]}],[Be]:[{[Ke]:{[dt]:c0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve},{[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt}],[ue]:Ve},{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ke]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:l0,[Re]:[xn,!1]}],[Be]:[{[Ke]:{[dt]:c0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve},{[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt}],[ue]:Ve},Xo={[ke]:NM,[Re]:[{[Pt]:"Endpoint"}],[tn]:"url"},QO={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]},yK={[Pt]:"url"},vK={[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"},ji={[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},qt={},xK={[ke]:l0,[Re]:[xn,!1]},SH={[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt},CH={[ke]:qi,[Re]:[{[Pt]:"UseS3ExpressControlEndpoint"}]},wH={[ke]:jr,[Re]:[{[Pt]:"UseS3ExpressControlEndpoint"},!0]},Qt={[ke]:Sa,[Re]:[Lr]},hn={[ke]:jr,[Re]:[{[Pt]:"UseDualStack"},!1]},an={[ke]:jr,[Re]:[{[Pt]:"UseFIPS"},!1]},Pv={[vt]:"Unrecognized S3Express bucket name format.",[ue]:vt},TH={[ke]:Sa,[Re]:[kh]},OH={[Pt]:lK},PH={[be]:[Qt],[vt]:"Expected a endpoint to be specified but no endpoint was found",[ue]:vt},Ev={[go]:[{[Wr]:!0,[Or]:FM,[Kr]:pm,[_M]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:pm,[Eo]:"{Region}"}]},JO={[ke]:jr,[Re]:[{[Pt]:"ForcePathStyle"},!1]},x4e={[Pt]:"ForcePathStyle"},Ur={[ke]:jr,[Re]:[{[Pt]:"Accelerate"},!1]},to={[ke]:wn,[Re]:[{[Pt]:"Region"},"aws-global"]},fo={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"us-east-1"}]},bn={[ke]:Sa,[Re]:[to]},po={[ke]:jr,[Re]:[{[Pt]:"UseGlobalEndpoint"},!0]},EH={[dt]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{Region}"}]},[pt]:{}},Yr={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{Region}"}]},ho={[ke]:jr,[Re]:[{[Pt]:"UseGlobalEndpoint"},!1]},IH={[dt]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},kH={[dt]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},RH={[dt]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},e1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[yK,"isIp"]},!1]},t1={[dt]:uK,[ft]:Yr,[pt]:{}},oE={[dt]:c0,[ft]:Yr,[pt]:{}},MH={[Ke]:oE,[ue]:Ke},n1={[dt]:dK,[ft]:Yr,[pt]:{}},AH={[dt]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},Iv={[vt]:"Invalid region: region was not a valid DNS name.",[ue]:vt},Ti={[Pt]:pK},SK={[Pt]:hK},r1={[ke]:wr,[Re]:[Ti,"service"]},jM={[Pt]:$M},DH={[be]:[Yn],[vt]:"S3 Object Lambda does not support Dual-stack",[ue]:vt},_H={[be]:[gs],[vt]:"S3 Object Lambda does not support S3 Accelerate",[ue]:vt},NH={[be]:[{[ke]:qi,[Re]:[{[Pt]:"DisableAccessPoints"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableAccessPoints"},!0]}],[vt]:"Access points are not supported for this operation",[ue]:vt},o1={[be]:[{[ke]:qi,[Re]:[{[Pt]:"UseArnRegion"}]},{[ke]:jr,[Re]:[{[Pt]:"UseArnRegion"},!1]},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},"{Region}"]}]}],[vt]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[ue]:vt},CK={[ke]:wr,[Re]:[{[Pt]:"bucketPartition"},Or]},wK={[ke]:wr,[Re]:[Ti,"accountId"]},i1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:LM,[Eo]:"{bucketArn#region}"}]},FH={[vt]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[ue]:vt},s1={[vt]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[ue]:vt},a1={[vt]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[ue]:vt},l1={[vt]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[ue]:vt},LH={[vt]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[ue]:vt},$H={[vt]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[ue]:vt},Zp={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{bucketArn#region}"}]},jH={[go]:[{[Wr]:!0,[Or]:FM,[Kr]:pm,[_M]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:pm,[Eo]:"{bucketArn#region}"}]},BH={[ke]:fK,[Re]:[xn]},VH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},HH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},zH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},c1={[dt]:gK,[ft]:Yr,[pt]:{}},qH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},UH={[Pt]:"UseObjectLambdaEndpoint"},u1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:LM,[Eo]:"{Region}"}]},GH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},WH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},KH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},d1={[dt]:Xv,[ft]:Yr,[pt]:{}},YH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},f1=[{[Pt]:"Region"}],S4e=[{[Pt]:"Endpoint"}],C4e=[xn],p1=[gs],$d=[Lr,Xo],ZH=[{[ke]:qi,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"},!0]}],w4e=[vK],h1=[xK],hs=[bK],m1=[rr,Yn],Rh=[rr,hn],Mh=[an,Yn],Ah=[an,hn],XH=[{[ke]:Qn,[Re]:[xn,6,14,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,14,16,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],ua=[{[be]:[rr,Yn],[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Rh,[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Mh,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Ah,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke}],QH=[{[ke]:Qn,[Re]:[xn,6,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],JH=[{[ke]:Qn,[Re]:[xn,6,19,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,19,21,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],ez=[{[ke]:Qn,[Re]:[xn,6,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],tz=[{[ke]:Qn,[Re]:[xn,6,26,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,26,28,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],da=[{[be]:[rr,Yn],[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Rh,[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Mh,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Ah,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],nz=[xn,0,7,!0],rz=[{[ke]:Qn,[Re]:[xn,7,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],oz=[{[ke]:Qn,[Re]:[xn,7,16,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,16,18,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],iz=[{[ke]:Qn,[Re]:[xn,7,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],sz=[{[ke]:Qn,[Re]:[xn,7,21,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,21,23,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],az=[{[ke]:Qn,[Re]:[xn,7,27,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,27,29,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],T4e=[kh],lz=[{[ke]:qu,[Re]:[{[Pt]:rE},!1]}],cz=[{[ke]:wn,[Re]:[{[Pt]:cK},"beta"]}],O4e=["*"],uz=[{[ke]:qu,[Re]:[{[Pt]:"Region"},!1]}],Al=[{[ke]:wn,[Re]:[{[Pt]:"Region"},"us-east-1"]}],g1=[{[ke]:wn,[Re]:[SK,mK]}],dz=[{[ke]:wr,[Re]:[Ti,"resourceId[1]"],[tn]:$M},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[jM,u0]}]}],P4e=[Ti,"resourceId[1]"],fz=[Yn],b1=[{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},u0]}]}],pz=[{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[2]"]}]}]}],E4e=[Ti,"resourceId[2]"],y1=[{[ke]:a0,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]}],[tn]:"bucketPartition"}],hz=[{[ke]:wn,[Re]:[CK,{[ke]:wr,[Re]:[{[Pt]:"partitionResult"},Or]}]}],v1=[{[ke]:qu,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},!0]}],x1=[{[ke]:qu,[Re]:[wK,!1]}],mz=[{[ke]:qu,[Re]:[jM,!1]}],kv=[rr],gz=[{[ke]:qu,[Re]:[{[Pt]:"Region"},!0]}],I4e={parameters:{Bucket:Fd,Region:Fd,UseFIPS:Ld,UseDualStack:Ld,Endpoint:Fd,ForcePathStyle:Ld,Accelerate:Ld,UseGlobalEndpoint:Ld,UseObjectLambdaEndpoint:Yp,Key:Fd,Prefix:Fd,CopySource:Fd,DisableAccessPoints:Yp,DisableMultiRegionAccessPoints:Ld,UseArnRegion:Yp,UseS3ExpressControlEndpoint:Yp,DisableS3ExpressSessionAuth:Yp},[Be]:[{[be]:[{[ke]:qi,[Re]:f1}],[Be]:[{[be]:[gs,rr],error:"Accelerate cannot be used with FIPS",[ue]:vt},{[be]:[Yn,Lr],error:"Cannot set dual-stack in combination with a custom endpoint.",[ue]:vt},{[be]:[Lr,rr],error:"A custom endpoint cannot be combined with FIPS",[ue]:vt},{[be]:[Lr,gs],error:"A custom endpoint cannot be combined with S3 Accelerate",[ue]:vt},{[be]:[rr,bK,yH],error:"Partition does not support FIPS",[ue]:vt},{[be]:[kh,{[ke]:Qn,[Re]:[xn,0,y4e,ca],[tn]:lH},{[ke]:wn,[Re]:[{[Pt]:lH},"--x-s3"]}],[Be]:[vH,xH,{[be]:[CH,wH],[Be]:[{[be]:hs,[Be]:[{[be]:[vK,Qt],[Be]:[{[be]:m1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:h1,[Be]:[{[be]:hs,[Be]:[{[be]:ZH,[Be]:[{[be]:XH,[Be]:ua,[ue]:Ve},{[be]:QH,[Be]:ua,[ue]:Ve},{[be]:JH,[Be]:ua,[ue]:Ve},{[be]:ez,[Be]:ua,[ue]:Ve},{[be]:tz,[Be]:ua,[ue]:Ve},Pv],[ue]:Ve},{[be]:XH,[Be]:da,[ue]:Ve},{[be]:QH,[Be]:da,[ue]:Ve},{[be]:JH,[Be]:da,[ue]:Ve},{[be]:ez,[Be]:da,[ue]:Ve},{[be]:tz,[Be]:da,[ue]:Ve},Pv],[ue]:Ve}],[ue]:Ve},SH],[ue]:Ve},{[be]:[kh,{[ke]:Qn,[Re]:nz,[tn]:cH},{[ke]:wn,[Re]:[{[Pt]:cH},"--xa-s3"]}],[Be]:[vH,xH,{[be]:h1,[Be]:[{[be]:hs,[Be]:[{[be]:ZH,[Be]:[{[be]:rz,[Be]:ua,[ue]:Ve},{[be]:oz,[Be]:ua,[ue]:Ve},{[be]:iz,[Be]:ua,[ue]:Ve},{[be]:sz,[Be]:ua,[ue]:Ve},{[be]:az,[Be]:ua,[ue]:Ve},Pv],[ue]:Ve},{[be]:rz,[Be]:da,[ue]:Ve},{[be]:oz,[Be]:da,[ue]:Ve},{[be]:iz,[Be]:da,[ue]:Ve},{[be]:sz,[Be]:da,[ue]:Ve},{[be]:az,[Be]:da,[ue]:Ve},Pv],[ue]:Ve}],[ue]:Ve},SH],[ue]:Ve},{[be]:[TH,CH,wH],[Be]:[{[be]:hs,[Be]:[{[be]:$d,endpoint:{[dt]:Xv,[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:m1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[kh,{[ke]:Qn,[Re]:[xn,49,50,ca],[tn]:lK},{[ke]:Qn,[Re]:[xn,8,12,ca],[tn]:cK},{[ke]:Qn,[Re]:nz,[tn]:uH},{[ke]:Qn,[Re]:[xn,32,49,ca],[tn]:rE},{[ke]:a0,[Re]:f1,[tn]:"regionPartition"},{[ke]:wn,[Re]:[{[Pt]:uH},"--op-s3"]}],[Be]:[{[be]:lz,[Be]:[{[be]:h1,[Be]:[{[be]:[{[ke]:wn,[Re]:[OH,"e"]}],[Be]:[{[be]:cz,[Be]:[PH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.ec2.{url#authority}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[OH,"o"]}],[Be]:[{[be]:cz,[Be]:[PH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.{url#authority}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[ue]:vt}],[ue]:Ve},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[ue]:vt}],[ue]:Ve},{[be]:T4e,[Be]:[{[be]:[Lr,{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[{[ke]:NM,[Re]:S4e}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[ue]:vt},{[be]:[JO,xK],[Be]:[{[be]:hs,[Be]:[{[be]:uz,[Be]:[{[be]:[gs,yH],error:"S3 Accelerate cannot be used in this region",[ue]:vt},{[be]:[Yn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:EH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,rr,Ur,Qt,bn,ho],endpoint:EH,[ue]:Ke},{[be]:[hn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:IH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,rr,Ur,Qt,bn,ho],endpoint:IH,[ue]:Ke},{[be]:[Yn,an,gs,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,an,gs,Qt,bn,po],[Be]:[{endpoint:kH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,an,gs,Qt,bn,ho],endpoint:kH,[ue]:Ke},{[be]:[Yn,an,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,an,Ur,Qt,bn,po],[Be]:[{endpoint:RH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,an,Ur,Qt,bn,ho],endpoint:RH,[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,QO,to],endpoint:{[dt]:uK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,e1,to],endpoint:{[dt]:c0,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,QO,bn,po],[Be]:[{[be]:Al,endpoint:t1,[ue]:Ke},{endpoint:t1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,e1,bn,po],[Be]:[{[be]:Al,endpoint:oE,[ue]:Ke},MH],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,QO,bn,ho],endpoint:t1,[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,e1,bn,ho],endpoint:oE,[ue]:Ke},{[be]:[hn,an,gs,Qt,to],endpoint:{[dt]:dK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,gs,Qt,bn,po],[Be]:[{[be]:Al,endpoint:n1,[ue]:Ke},{endpoint:n1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,gs,Qt,bn,ho],endpoint:n1,[ue]:Ke},{[be]:[hn,an,Ur,Qt,to],endpoint:{[dt]:dH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Qt,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:dH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:AH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,Ur,Qt,bn,ho],endpoint:AH,[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[Lr,Xo,{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[yK,"scheme"]},"http"]},{[ke]:l0,[Re]:[xn,ca]},JO,an,hn,Ur],[Be]:[{[be]:hs,[Be]:[{[be]:uz,[Be]:[MH],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[JO,{[ke]:fK,[Re]:C4e,[tn]:pK}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[0]"],[tn]:hK},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[SK,u0]}]}],[Be]:[{[be]:[{[ke]:wn,[Re]:[r1,LM]}],[Be]:[{[be]:g1,[Be]:[{[be]:dz,[Be]:[DH,_H,{[be]:b1,[Be]:[NH,{[be]:pz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:hz,[Be]:[{[be]:v1,[Be]:[{[be]:[{[ke]:wn,[Re]:[wK,u0]}],error:"Invalid ARN: Missing account id",[ue]:vt},{[be]:x1,[Be]:[{[be]:mz,[Be]:[{[be]:$d,endpoint:{[dt]:fH,[ft]:i1,[pt]:qt},[ue]:Ke},{[be]:kv,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:i1,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:i1,[pt]:qt},[ue]:Ke}],[ue]:Ve},FH],[ue]:Ve},s1],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},LH],[ue]:Ve},{error:"Invalid ARN: bucket ARN is missing a region",[ue]:vt}],[ue]:Ve},$H],[ue]:Ve},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[ue]:vt}],[ue]:Ve},{[be]:g1,[Be]:[{[be]:dz,[Be]:[{[be]:b1,[Be]:[{[be]:g1,[Be]:[{[be]:b1,[Be]:[NH,{[be]:pz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:[{[ke]:wn,[Re]:[CK,"{partitionResult#name}"]}],[Be]:[{[be]:v1,[Be]:[{[be]:[{[ke]:wn,[Re]:[r1,Vf]}],[Be]:[{[be]:x1,[Be]:[{[be]:mz,[Be]:[{[be]:p1,error:"Access Points do not support S3 Accelerate",[ue]:vt},{[be]:m1,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Lr,Xo],endpoint:{[dt]:fH,[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke}],[ue]:Ve},FH],[ue]:Ve},s1],[ue]:Ve},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[ue]:vt}],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},LH],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qu,[Re]:[jM,ca]}],[Be]:[{[be]:fz,error:"S3 MRAP does not support dual-stack",[ue]:vt},{[be]:kv,error:"S3 MRAP does not support FIPS",[ue]:vt},{[be]:p1,error:"S3 MRAP does not support S3 Accelerate",[ue]:vt},{[be]:[{[ke]:jr,[Re]:[{[Pt]:"DisableMultiRegionAccessPoints"},ca]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[ue]:vt},{[be]:[{[ke]:a0,[Re]:f1,[tn]:pH}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Pt]:pH},Or]},{[ke]:wr,[Re]:[Ti,"partition"]}]}],[Be]:[{endpoint:{[dt]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[ft]:{[go]:[{[Wr]:ca,name:FM,[Kr]:Vf,[_M]:O4e}]},[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[ue]:vt}],[ue]:Ve}],[ue]:Ve},{error:"Invalid Access Point Name",[ue]:vt}],[ue]:Ve},$H],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[r1,pm]}],[Be]:[{[be]:fz,error:"S3 Outposts does not support Dual-stack",[ue]:vt},{[be]:kv,error:"S3 Outposts does not support FIPS",[ue]:vt},{[be]:p1,error:"S3 Outposts does not support S3 Accelerate",[ue]:vt},{[be]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[ue]:vt},{[be]:[{[ke]:wr,[Re]:P4e,[tn]:rE}],[Be]:[{[be]:lz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:hz,[Be]:[{[be]:v1,[Be]:[{[be]:x1,[Be]:[{[be]:[{[ke]:wr,[Re]:E4e,[tn]:hH}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[3]"],[tn]:$M}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[Pt]:hH},mK]}],[Be]:[{[be]:$d,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[ft]:jH,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:jH,[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: expected an access point name",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: Expected a 4-component resource",[ue]:vt}],[ue]:Ve},s1],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: The Outpost Id was not set",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: No ARN type specified",[ue]:vt}],[ue]:Ve},{[be]:[{[ke]:Qn,[Re]:[xn,0,4,v4e],[tn]:mH},{[ke]:wn,[Re]:[{[Pt]:mH},"arn:"]},{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[BH]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[ue]:vt},{[be]:[{[ke]:jr,[Re]:[x4e,ca]},BH],error:"Path-style addressing cannot be used with ARN buckets",[ue]:vt},{[be]:w4e,[Be]:[{[be]:hs,[Be]:[{[be]:[Ur],[Be]:[{[be]:[Yn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,Qt,rr,bn,po],[Be]:[{endpoint:VH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,Qt,rr,bn,ho],endpoint:VH,[ue]:Ke},{[be]:[hn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Qt,rr,bn,po],[Be]:[{endpoint:HH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Qt,rr,bn,ho],endpoint:HH,[ue]:Ke},{[be]:[Yn,Qt,an,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,Qt,an,bn,po],[Be]:[{endpoint:zH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,Qt,an,bn,ho],endpoint:zH,[ue]:Ke},{[be]:[hn,Lr,Xo,an,to],endpoint:{[dt]:gK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Lr,Xo,an,bn,po],[Be]:[{[be]:Al,endpoint:c1,[ue]:Ke},{endpoint:c1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Lr,Xo,an,bn,ho],endpoint:c1,[ue]:Ke},{[be]:[hn,Qt,an,to],endpoint:{[dt]:gH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Qt,an,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:gH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:qH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Qt,an,bn,ho],endpoint:qH,[ue]:Ke}],[ue]:Ve},{error:"Path-style addressing cannot be used with S3 Accelerate",[ue]:vt}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qi,[Re]:[UH]},{[ke]:jr,[Re]:[UH,ca]}],[Be]:[{[be]:hs,[Be]:[{[be]:gz,[Be]:[DH,_H,{[be]:$d,endpoint:{[dt]:Xv,[ft]:u1,[pt]:qt},[ue]:Ke},{[be]:kv,endpoint:{[dt]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:u1,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[ft]:u1,[pt]:qt},[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[TH],[Be]:[{[be]:hs,[Be]:[{[be]:gz,[Be]:[{[be]:[rr,Yn,Qt,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[rr,Yn,Qt,bn,po],[Be]:[{endpoint:GH,[ue]:Ke}],[ue]:Ve},{[be]:[rr,Yn,Qt,bn,ho],endpoint:GH,[ue]:Ke},{[be]:[rr,hn,Qt,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[rr,hn,Qt,bn,po],[Be]:[{endpoint:WH,[ue]:Ke}],[ue]:Ve},{[be]:[rr,hn,Qt,bn,ho],endpoint:WH,[ue]:Ke},{[be]:[an,Yn,Qt,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,Yn,Qt,bn,po],[Be]:[{endpoint:KH,[ue]:Ke}],[ue]:Ve},{[be]:[an,Yn,Qt,bn,ho],endpoint:KH,[ue]:Ke},{[be]:[an,hn,Lr,Xo,to],endpoint:{[dt]:Xv,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Lr,Xo,bn,po],[Be]:[{[be]:Al,endpoint:d1,[ue]:Ke},{endpoint:d1,[ue]:Ke}],[ue]:Ve},{[be]:[an,hn,Lr,Xo,bn,ho],endpoint:d1,[ue]:Ke},{[be]:[an,hn,Qt,to],endpoint:{[dt]:bH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Qt,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:bH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:YH,[ue]:Ke}],[ue]:Ve},{[be]:[an,hn,Qt,bn,ho],endpoint:YH,[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"A region must be set when sending requests to S3.",[ue]:vt}]},k4e=I4e,R4e=new A7({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),TK=(e,t={})=>R4e.get(e,()=>H7(k4e,{endpointParams:e,logger:t.logger}));cm.aws=q7;const M4e=e=>async(t,r,o)=>{if(!o)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,r,o),s=ml(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);const a=await J7(o,{getEndpointParameterInstructions:s},t);return Object.assign(i,a)},A4e=async(e,t,r)=>({operation:ml(t).operation,region:await ks(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),D4e=M4e(A4e);function OK(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function PK(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}const _4e=(e,t,r)=>i=>{const a=e(i).properties?.authSchemes;if(!a)return t(i);const l=[];for(const c of a){const{name:u,properties:d={},...f}=c,p=u.toLowerCase();u!==p&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${u}' to '${p}'`);let h;if(p==="sigv4a"){h="aws.auth#sigv4a";const y=a.find(x=>{const C=x.name.toLowerCase();return C!=="sigv4a"&&C.startsWith("sigv4")});if(aK.sigv4aDependency()==="none"&&y)continue}else if(p.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${p}'`);const b=r[h];if(!b)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);const g=b(i);g.schemeId=h,g.signingProperties={...g.signingProperties||{},...f,...d},l.push(g)}return l},N4e=e=>{const t=[];switch(e.operation){default:t.push(OK(e)),t.push(PK(e))}return t},F4e=_4e(TK,N4e,{"aws.auth#sigv4":OK,"aws.auth#sigv4a":PK}),L4e=e=>{const t=d7(e),r=Zze(t);return Object.assign(r,{authSchemePreference:ks(e.authSchemePreference??[])})},$4e=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),EK={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class xo extends Qc{constructor(t){super(t),Object.setPrototypeOf(this,xo.prototype)}}class BM extends xo{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,BM.prototype)}}class VM extends xo{name="AccessDenied";$fault="client";constructor(t){super({name:"AccessDenied",$fault:"client",...t}),Object.setPrototypeOf(this,VM.prototype)}}class HM extends xo{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,HM.prototype)}}class zM extends xo{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,zM.prototype)}}class qM extends xo{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,qM.prototype)}}class UM extends xo{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,UM.prototype)}}class GM extends xo{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,GM.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class WM extends xo{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,WM.prototype)}}class KM extends xo{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,KM.prototype)}}class YM extends xo{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,YM.prototype)}}class ZM extends xo{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,ZM.prototype)}}class XM extends xo{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,XM.prototype)}}class QM extends xo{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,QM.prototype)}}class JM extends xo{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,JM.prototype)}}class eA extends xo{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,eA.prototype)}}const j4e="ACL",B4e="AccessDenied",bz="AccessKeyId",V4e="AccessTier",IK="Bucket",H4e="BucketAlreadyExists",z4e="BucketAlreadyOwnedByYou",RC="BucketKeyEnabled",q4e="Body",U4e="ChecksumAlgorithm",G4e="CacheControl",kK="ChecksumCRC32",RK="ChecksumCRC32C",MK="ChecksumCRC64NVME",W4e="Cache-Control",K4e="Content-Disposition",Y4e="ContentDisposition",Z4e="Content-Encoding",X4e="ContentEncoding",Q4e="ContentLanguage",J4e="Content-Language",eUe="Content-Length",tUe="ContentLength",nUe="Content-MD5",rUe="ContentMD5",AK="ChecksumSHA1",DK="ChecksumSHA256",oUe="CreateSessionOutput",iUe="CreateSessionResult",sUe="CreateSessionRequest",aUe="CreateSession",lUe="ChecksumType",cUe="Content-Type",uUe="ContentType",yz="Credentials",iE="Expiration",dUe="ExpectedBucketOwner",fUe="EncryptionTypeMismatch",vz="ETag",xz="Expires",pUe="GrantFullControl",hUe="GrantRead",mUe="GrantReadACP",gUe="GrantWriteACP",bUe="IfMatch",yUe="If-Match",vUe="IfNoneMatch",xUe="If-None-Match",SUe="InvalidObjectState",CUe="IdempotencyParameterMismatch",wUe="InvalidRequest",TUe="InvalidWriteOffset",OUe="Key",PUe="Metadata",EUe="NotFound",IUe="NoSuchBucket",kUe="NoSuchKey",RUe="NoSuchUpload",MUe="ObjectAlreadyInActiveTierError",AUe="ObjectLockLegalHoldStatus",DUe="ObjectLockMode",_Ue="ObjectLockRetainUntilDate",NUe="ObjectNotInActiveTierError",FUe="PutObject",LUe="PutObjectOutput",$Ue="PutObjectRequest",jUe="RequestCharged",BUe="RequestPayer",Sz="SecretAccessKey",VUe="StreamingBlob",_K="StorageClass",HUe="SessionCredentialValue",zUe="SessionCredentials",qUe="SessionMode",MC="ServerSideEncryption",NK="SSECustomerAlgorithm",FK="SSECustomerKey",LK="SSECustomerKeyMD5",dg="SSEKMSEncryptionContext",fg="SSEKMSKeyId",Cz="SessionToken",UUe="Size",GUe="TooManyParts",WUe="Tagging",KUe="VersionId",YUe="WriteOffsetBytes",ZUe="WebsiteRedirectLocation",di="client",fi="error",$K="http",XUe="httpChecksum",Ii="httpError",Ot="httpHeader",QUe="httpPrefixHeaders",jK="smithy.ts.sdk.synthetic.com.amazonaws.s3",JUe="streaming",ef="xmlName",e9e="x-amz-acl",BK="x-amz-checksum-crc32",VK="x-amz-checksum-crc32c",HK="x-amz-checksum-crc64nvme",zK="x-amz-checksum-sha1",qK="x-amz-checksum-sha256",t9e="x-amz-create-session-mode",n9e="x-amz-checksum-type",r9e="x-amz-expiration",o9e="x-amz-expected-bucket-owner",i9e="x-amz-grant-full-control",s9e="x-amz-grant-read",a9e="x-amz-grant-read-acp",l9e="x-amz-grant-write-acp",c9e="x-amz-meta-",u9e="x-amz-object-lock-legal-hold",d9e="x-amz-object-lock-mode",f9e="x-amz-object-lock-retain-until-date",p9e="x-amz-object-size",h9e="x-amz-request-charged",m9e="x-amz-request-payer",g9e="x-amz-storage-class",b9e="x-amz-sdk-checksum-algorithm",AC="x-amz-server-side-encryption",DC="x-amz-server-side-encryption-aws-kms-key-id",_C="x-amz-server-side-encryption-bucket-key-enabled",NC="x-amz-server-side-encryption-context",UK="x-amz-server-side-encryption-customer-algorithm",y9e="x-amz-server-side-encryption-customer-key",GK="x-amz-server-side-encryption-customer-key-MD5",v9e="x-amz-tagging",x9e="x-amz-version-id",S9e="x-amz-write-offset-bytes",C9e="x-amz-website-redirect-location",Zn="com.amazonaws.s3",WK=ti.for(jK);var w9e=[-3,jK,"S3ServiceException",0,[],[]];WK.registerError(w9e,xo);const Go=ti.for(Zn);var T9e=[-3,Zn,B4e,{[fi]:di,[Ii]:403},[],[]];Go.registerError(T9e,VM);var O9e=[-3,Zn,H4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(O9e,zM);var P9e=[-3,Zn,z4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(P9e,qM);var E9e=[-3,Zn,fUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(E9e,YM);var I9e=[-3,Zn,CUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(I9e,JM);var k9e=[-3,Zn,SUe,{[fi]:di,[Ii]:403},[_K,V4e],[0,0]];Go.registerError(k9e,GM);var R9e=[-3,Zn,wUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(R9e,ZM);var M9e=[-3,Zn,TUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(M9e,XM);var A9e=[-3,Zn,IUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(A9e,UM);var D9e=[-3,Zn,kUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(D9e,WM);var _9e=[-3,Zn,RUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(_9e,BM);var N9e=[-3,Zn,EUe,{[fi]:di},[],[]];Go.registerError(N9e,KM);var F9e=[-3,Zn,MUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(F9e,eA);var L9e=[-3,Zn,NUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(L9e,HM);var $9e=[-3,Zn,GUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError($9e,QM);const j9e=[WK,Go];var wz=[0,Zn,HUe,8,0],B9e=[0,Zn,FK,8,0],FC=[0,Zn,dg,8,0],LC=[0,Zn,fg,8,0],V9e=[0,Zn,VUe,{[JUe]:1},42],H9e=[3,Zn,oUe,{[ef]:iUe},[yz,MC,fg,dg,RC],[[()=>G9e,{[ef]:yz}],[0,{[Ot]:AC}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}]],1],z9e=[3,Zn,sUe,0,[IK,qUe,MC,fg,dg,RC],[[0,1],[0,{[Ot]:t9e}],[0,{[Ot]:AC}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}]],1],q9e=[3,Zn,LUe,0,[iE,vz,kK,RK,MK,AK,DK,lUe,MC,KUe,NK,LK,fg,dg,RC,UUe,jUe],[[0,{[Ot]:r9e}],[0,{[Ot]:vz}],[0,{[Ot]:BK}],[0,{[Ot]:VK}],[0,{[Ot]:HK}],[0,{[Ot]:zK}],[0,{[Ot]:qK}],[0,{[Ot]:n9e}],[0,{[Ot]:AC}],[0,{[Ot]:x9e}],[0,{[Ot]:UK}],[0,{[Ot]:GK}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}],[1,{[Ot]:p9e}],[0,{[Ot]:h9e}]]],U9e=[3,Zn,$Ue,0,[IK,OUe,j4e,q4e,G4e,Y4e,X4e,Q4e,tUe,rUe,uUe,U4e,kK,RK,MK,AK,DK,xz,bUe,vUe,pUe,hUe,mUe,gUe,YUe,PUe,MC,_K,ZUe,NK,FK,LK,fg,dg,RC,BUe,WUe,DUe,_Ue,AUe,dUe],[[0,1],[0,1],[0,{[Ot]:e9e}],[()=>V9e,16],[0,{[Ot]:W4e}],[0,{[Ot]:K4e}],[0,{[Ot]:Z4e}],[0,{[Ot]:J4e}],[1,{[Ot]:eUe}],[0,{[Ot]:nUe}],[0,{[Ot]:cUe}],[0,{[Ot]:b9e}],[0,{[Ot]:BK}],[0,{[Ot]:VK}],[0,{[Ot]:HK}],[0,{[Ot]:zK}],[0,{[Ot]:qK}],[4,{[Ot]:xz}],[0,{[Ot]:yUe}],[0,{[Ot]:xUe}],[0,{[Ot]:i9e}],[0,{[Ot]:s9e}],[0,{[Ot]:a9e}],[0,{[Ot]:l9e}],[1,{[Ot]:S9e}],[128,{[QUe]:c9e}],[0,{[Ot]:AC}],[0,{[Ot]:g9e}],[0,{[Ot]:C9e}],[0,{[Ot]:UK}],[()=>B9e,{[Ot]:y9e}],[0,{[Ot]:GK}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}],[0,{[Ot]:m9e}],[0,{[Ot]:v9e}],[0,{[Ot]:d9e}],[5,{[Ot]:f9e}],[0,{[Ot]:u9e}],[0,{[Ot]:o9e}]],2],G9e=[3,Zn,zUe,0,[bz,Sz,Cz,iE],[[0,{[ef]:bz}],[()=>wz,{[ef]:Sz}],[()=>wz,{[ef]:Cz}],[4,{[ef]:iE}]],4],W9e=[9,Zn,aUe,{[$K]:["GET","/?session",200]},()=>z9e,()=>H9e],K9e=[9,Zn,FUe,{[XUe]:"-",[$K]:["PUT","/{Key+}?x-id=PutObject",200]},()=>U9e,()=>q9e];class Y9e extends PC.classBuilder().ep({...EK,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,r,o,i){return[RM(o,t.getEndpointParameterInstructions()),R7(o)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(W9e).build(){}const Z9e="3.996.0",X9e={version:Z9e},Q9e=e=>new TextEncoder().encode(e);function Tz(e){return typeof e=="string"?e.length===0:e.byteLength===0}var KK={name:"SHA-1"},Oz={name:"HMAC",hash:KK},J9e=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const e6e={};function Ql(){return typeof window<"u"?window:typeof self<"u"?self:e6e}var t6e=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(r,o){Ql().crypto.subtle.importKey("raw",Pz(t),Oz,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!Tz(t)){var r=Pz(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Ql().crypto.subtle.sign(Oz,r,t.toHash).then(function(o){return new Uint8Array(o)})}):Tz(this.toHash)?Promise.resolve(J9e):Promise.resolve().then(function(){return Ql().crypto.subtle.digest(KK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function Pz(e){return typeof e=="string"?Q9e(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var n6e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function YK(e){if(r6e(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return o6e(t)}return!1}function r6e(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function o6e(e){return e&&n6e.every(function(t){return typeof e[t]=="function"})}var i6e=(function(){function e(t){if(YK(Ql()))this.hash=new t6e(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,r){this.hash.update(oc(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})(),ZK={name:"SHA-256"},Ez={name:"HMAC",hash:ZK},s6e=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),a6e=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!lm(t)){var r=oc(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Ql().crypto.subtle.sign(Ez,r,t.toHash).then(function(o){return new Uint8Array(o)})}):lm(this.toHash)?Promise.resolve(s6e):Promise.resolve().then(function(){return Ql().crypto.subtle.digest(ZK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,o){Ql().crypto.subtle.importKey("raw",oc(t.secret),Ez,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))},e})(),ys=64,l6e=32,c6e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),u6e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],d6e=Math.pow(2,53)-1,Qv=(function(){function e(){this.state=Int32Array.from(u6e),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,o=t.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>d6e)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=t[r++],o--,this.bufferLength===ys&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(r.setUint8(this.bufferLength++,128),o%ys>=ys-8){for(var i=this.bufferLength;i<ys;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ys-8;i++)r.setUint8(i,0);r.setUint32(ys-8,Math.floor(t/4294967296),!0),r.setUint32(ys-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(l6e),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,o=t.state,i=o[0],s=o[1],a=o[2],l=o[3],c=o[4],u=o[5],d=o[6],f=o[7],p=0;p<ys;p++){if(p<16)this.temp[p]=(r[p*4]&255)<<24|(r[p*4+1]&255)<<16|(r[p*4+2]&255)<<8|r[p*4+3]&255;else{var h=this.temp[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[p-15];var g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[p]=(b+this.temp[p-7]|0)+(g+this.temp[p-16]|0)}var y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&d)|0)+(f+(c6e[p]+this.temp[p]|0)|0)|0,x=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&a^s&a)|0;f=d,d=u,u=c,c=l+y|0,l=a,a=s,s=i,i=y+x|0}o[0]+=i,o[1]+=s,o[2]+=a,o[3]+=l,o[4]+=c,o[5]+=u,o[6]+=d,o[7]+=f},e})(),f6e=(function(){function e(t){this.secret=t,this.hash=new Qv,this.reset()}return e.prototype.update=function(t){if(!(lm(t)||this.error))try{this.hash.update(oc(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return TM(this,void 0,void 0,function(){return OM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Qv,this.secret){this.outer=new Qv;var t=p6e(this.secret),r=new Uint8Array(ys);r.set(t);for(var o=0;o<ys;o++)t[o]^=54,r[o]^=92;this.hash.update(t),this.outer.update(r);for(var o=0;o<t.byteLength;o++)t[o]=0}},e})();function p6e(e){var t=oc(e);if(t.byteLength>ys){var r=new Qv;r.update(t),t=r.digest()}var o=new Uint8Array(ys);return o.set(t),o}var XK=(function(){function e(t){YK(Ql())?this.hash=new a6e(t):this.hash=new f6e(t)}return e.prototype.update=function(t,r){this.hash.update(oc(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const QK=({serviceId:e,clientVersion:t})=>async r=>{const o=typeof window<"u"?window.navigator:void 0,i=o?.userAgent??"",s=o?.userAgentData?.platform??Iz.os(i)??"other",a=void 0,l=o?.userAgentData?.brands??[],c=l[l.length-1],u=c?.brand??Iz.browser(i)??"unknown",d=c?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const p=await r?.userAgentAppId?.();return p&&f.push([`app/${p}`]),f},Iz={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}};class Dh{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&kz(r),new Dh(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&kz(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function kz(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class h6e{toUtf8;fromUtf8;constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){const r=[];for(const s of Object.keys(t)){const a=this.fromUtf8(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Dh.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!w6e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(UW(t.value.replace(/\-/g,"")),1),f}}parse(t){const r={};let o=0;for(;o<t.byteLength;){const i=t.getUint8(o++),s=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,i));switch(o+=i,t.getUint8(o++)){case 0:r[s]={type:Mz,value:!0};break;case 1:r[s]={type:Mz,value:!1};break;case 2:r[s]={type:m6e,value:t.getInt8(o++)};break;case 3:r[s]={type:g6e,value:t.getInt16(o,!1)},o+=2;break;case 4:r[s]={type:b6e,value:t.getInt32(o,!1)},o+=4;break;case 5:r[s]={type:y6e,value:new Dh(new Uint8Array(t.buffer,t.byteOffset+o,8))},o+=8;break;case 6:const a=t.getUint16(o,!1);o+=2,r[s]={type:v6e,value:new Uint8Array(t.buffer,t.byteOffset+o,a)},o+=a;break;case 7:const l=t.getUint16(o,!1);o+=2,r[s]={type:x6e,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,l))},o+=l;break;case 8:r[s]={type:S6e,value:new Date(new Dh(new Uint8Array(t.buffer,t.byteOffset+o,8)).valueOf())},o+=8;break;case 9:const c=new Uint8Array(t.buffer,t.byteOffset+o,16);o+=16,r[s]={type:C6e,value:`${Ci(c.subarray(0,4))}-${Ci(c.subarray(4,6))}-${Ci(c.subarray(6,8))}-${Ci(c.subarray(8,10))}-${Ci(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}}var Rz;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Rz||(Rz={}));const Mz="boolean",m6e="byte",g6e="short",b6e="integer",y6e="long",v6e="binary",x6e="string",S6e="timestamp",C6e="uuid",w6e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,JK=4,Nl=JK*2,zc=4,T6e=Nl+zc*2;function O6e({byteLength:e,byteOffset:t,buffer:r}){if(e<T6e)throw new Error("Provided message too short to accommodate event stream message overhead");const o=new DataView(r,t,e),i=o.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=o.getUint32(JK,!1),a=o.getUint32(Nl,!1),l=o.getUint32(e-zc,!1),c=new s0().update(new Uint8Array(r,t,Nl));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+Nl,e-(Nl+zc))),l!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${l}`);return{headers:new DataView(r,t+Nl+zc,s),body:new Uint8Array(r,t+Nl+zc+s,i-s-(Nl+zc+zc))}}class P6e{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new h6e(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){const t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){const t=this.messageBuffer;this.messageBuffer=[];const r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){const o=this.headerMarshaller.format(t),i=o.byteLength+r.byteLength+16,s=new Uint8Array(i),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new s0;return a.setUint32(0,i,!1),a.setUint32(4,o.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(o,12),s.set(r,o.byteLength+12),a.setUint32(i-4,l.update(s.subarray(8,i-4)).digest(),!1),s}decode(t){const{headers:r,body:o}=O6e(t);return{headers:this.headerMarshaller.parse(r),body:o}}formatHeaders(t){return this.headerMarshaller.format(t)}}class E6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.decoder.decode(t)}}class I6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class k6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream){const r=await this.options.deserializer(t);r!==void 0&&(yield r)}}}class R6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.serializer(t)}}function M6e(e){let t=0,r=0,o=null,i=null;const s=l=>{if(typeof l!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+l);t=l,r=4,o=new Uint8Array(l),new DataView(o.buffer).setUint32(0,l,!1)},a=async function*(){const l=e[Symbol.asyncIterator]();for(;;){const{value:c,done:u}=await l.next();if(u){if(t)if(t===r)yield o;else throw new Error("Truncated event message received.");else return;return}const d=c.length;let f=0;for(;f<d;){if(!o){const h=d-f;i||(i=new Uint8Array(4));const b=Math.min(4-r,h);if(i.set(c.slice(f,f+b),r),r+=b,f+=b,r<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const p=Math.min(t-r,d-f);o.set(c.slice(f,f+p),r),r+=p,f+=p,t&&t===r&&(yield o,o=null,t=0,r=0)}}};return{[Symbol.asyncIterator]:a}}function A6e(e,t){return async function(r){const{value:o}=r.headers[":message-type"];if(o==="error"){const i=new Error(r.headers[":error-message"].value||"UnknownError");throw i.name=r.headers[":error-code"].value,i}else if(o==="exception"){const i=r.headers[":exception-type"].value,s={[i]:r},a=await e(s);if(a.$unknown){const l=new Error(t(r.body));throw l.name=i,l}throw a[i]}else if(o==="event"){const i={[r.headers[":event-type"].value]:r},s=await e(i);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}let D6e=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new P6e(t,r),this.utfEncoder=t}deserialize(t,r){const o=M6e(t);return new k6e({messageStream:new E6e({inputStream:o,decoder:this.eventStreamCodec}),deserializer:A6e(r,this.utfEncoder)})}serialize(t,r){return new I6e({messageStream:new R6e({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const _6e=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)return;yield o}}finally{t.releaseLock()}}}),N6e=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){const{done:o,value:i}=await t.next();if(o)return r.close();r.enqueue(i)}})};class F6e{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new D6e({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){const o=L6e(t)?_6e(t):t;return this.universalMarshaller.deserialize(o,r)}serialize(t,r){const o=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?N6e(o):o}}const L6e=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,$6e=e=>new F6e(e);async function j6e(e,t,r=1024*1024){const o=e.size;let i=0;for(;i<o;){const s=e.slice(i,Math.min(o,i+r));t(new Uint8Array(await s.arrayBuffer())),i+=s.size}}const B6e=async function(t,r){const o=new t;return await j6e(r,i=>{o.update(i)}),o.digest()},eY=e=>()=>Promise.reject(e),Dl=64,V6e=16,H6e=[1732584193,4023233417,2562383102,271733878];class z6e{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(q6e(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const r=U6e(t);let o=0,{byteLength:i}=r;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,r[o++]),i--,this.bufferLength===Dl&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:r,bufferLength:o,bytesHashed:i}=this,s=i*8;if(r.setUint8(this.bufferLength++,128),o%Dl>=Dl-8){for(let a=this.bufferLength;a<Dl;a++)r.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<Dl-8;a++)r.setUint8(a,0);r.setUint32(Dl-8,s>>>0,!0),r.setUint32(Dl-4,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(V6e));for(let r=0;r<4;r++)t.setUint32(r*4,this.state[r],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:r}=this;let o=r[0],i=r[1],s=r[2],a=r[3];o=Do(o,i,s,a,t.getUint32(0,!0),7,3614090360),a=Do(a,o,i,s,t.getUint32(4,!0),12,3905402710),s=Do(s,a,o,i,t.getUint32(8,!0),17,606105819),i=Do(i,s,a,o,t.getUint32(12,!0),22,3250441966),o=Do(o,i,s,a,t.getUint32(16,!0),7,4118548399),a=Do(a,o,i,s,t.getUint32(20,!0),12,1200080426),s=Do(s,a,o,i,t.getUint32(24,!0),17,2821735955),i=Do(i,s,a,o,t.getUint32(28,!0),22,4249261313),o=Do(o,i,s,a,t.getUint32(32,!0),7,1770035416),a=Do(a,o,i,s,t.getUint32(36,!0),12,2336552879),s=Do(s,a,o,i,t.getUint32(40,!0),17,4294925233),i=Do(i,s,a,o,t.getUint32(44,!0),22,2304563134),o=Do(o,i,s,a,t.getUint32(48,!0),7,1804603682),a=Do(a,o,i,s,t.getUint32(52,!0),12,4254626195),s=Do(s,a,o,i,t.getUint32(56,!0),17,2792965006),i=Do(i,s,a,o,t.getUint32(60,!0),22,1236535329),o=_o(o,i,s,a,t.getUint32(4,!0),5,4129170786),a=_o(a,o,i,s,t.getUint32(24,!0),9,3225465664),s=_o(s,a,o,i,t.getUint32(44,!0),14,643717713),i=_o(i,s,a,o,t.getUint32(0,!0),20,3921069994),o=_o(o,i,s,a,t.getUint32(20,!0),5,3593408605),a=_o(a,o,i,s,t.getUint32(40,!0),9,38016083),s=_o(s,a,o,i,t.getUint32(60,!0),14,3634488961),i=_o(i,s,a,o,t.getUint32(16,!0),20,3889429448),o=_o(o,i,s,a,t.getUint32(36,!0),5,568446438),a=_o(a,o,i,s,t.getUint32(56,!0),9,3275163606),s=_o(s,a,o,i,t.getUint32(12,!0),14,4107603335),i=_o(i,s,a,o,t.getUint32(32,!0),20,1163531501),o=_o(o,i,s,a,t.getUint32(52,!0),5,2850285829),a=_o(a,o,i,s,t.getUint32(8,!0),9,4243563512),s=_o(s,a,o,i,t.getUint32(28,!0),14,1735328473),i=_o(i,s,a,o,t.getUint32(48,!0),20,2368359562),o=No(o,i,s,a,t.getUint32(20,!0),4,4294588738),a=No(a,o,i,s,t.getUint32(32,!0),11,2272392833),s=No(s,a,o,i,t.getUint32(44,!0),16,1839030562),i=No(i,s,a,o,t.getUint32(56,!0),23,4259657740),o=No(o,i,s,a,t.getUint32(4,!0),4,2763975236),a=No(a,o,i,s,t.getUint32(16,!0),11,1272893353),s=No(s,a,o,i,t.getUint32(28,!0),16,4139469664),i=No(i,s,a,o,t.getUint32(40,!0),23,3200236656),o=No(o,i,s,a,t.getUint32(52,!0),4,681279174),a=No(a,o,i,s,t.getUint32(0,!0),11,3936430074),s=No(s,a,o,i,t.getUint32(12,!0),16,3572445317),i=No(i,s,a,o,t.getUint32(24,!0),23,76029189),o=No(o,i,s,a,t.getUint32(36,!0),4,3654602809),a=No(a,o,i,s,t.getUint32(48,!0),11,3873151461),s=No(s,a,o,i,t.getUint32(60,!0),16,530742520),i=No(i,s,a,o,t.getUint32(8,!0),23,3299628645),o=Fo(o,i,s,a,t.getUint32(0,!0),6,4096336452),a=Fo(a,o,i,s,t.getUint32(28,!0),10,1126891415),s=Fo(s,a,o,i,t.getUint32(56,!0),15,2878612391),i=Fo(i,s,a,o,t.getUint32(20,!0),21,4237533241),o=Fo(o,i,s,a,t.getUint32(48,!0),6,1700485571),a=Fo(a,o,i,s,t.getUint32(12,!0),10,2399980690),s=Fo(s,a,o,i,t.getUint32(40,!0),15,4293915773),i=Fo(i,s,a,o,t.getUint32(4,!0),21,2240044497),o=Fo(o,i,s,a,t.getUint32(32,!0),6,1873313359),a=Fo(a,o,i,s,t.getUint32(60,!0),10,4264355552),s=Fo(s,a,o,i,t.getUint32(24,!0),15,2734768916),i=Fo(i,s,a,o,t.getUint32(52,!0),21,1309151649),o=Fo(o,i,s,a,t.getUint32(16,!0),6,4149444226),a=Fo(a,o,i,s,t.getUint32(44,!0),10,3174756917),s=Fo(s,a,o,i,t.getUint32(8,!0),15,718787259),i=Fo(i,s,a,o,t.getUint32(36,!0),21,3951481745),r[0]=o+r[0]&4294967295,r[1]=i+r[1]&4294967295,r[2]=s+r[2]&4294967295,r[3]=a+r[3]&4294967295}reset(){this.state=Uint32Array.from(H6e),this.buffer=new DataView(new ArrayBuffer(Dl)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function $C(e,t,r,o,i,s){return t=(t+e&4294967295)+(o+s&4294967295)&4294967295,(t<<i|t>>>32-i)+r&4294967295}function Do(e,t,r,o,i,s,a){return $C(t&r|~t&o,e,t,i,s,a)}function _o(e,t,r,o,i,s,a){return $C(t&o|r&~o,e,t,i,s,a)}function No(e,t,r,o,i,s,a){return $C(t^r^o,e,t,i,s,a)}function Fo(e,t,r,o,i,s,a){return $C(r^(t|~o),e,t,i,s,a)}function q6e(e){return typeof e=="string"?e.length===0:e.byteLength===0}function U6e(e){return typeof e=="string"?cl(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const G6e=["in-region","cross-region","mobile","standard","legacy"],tY=({defaultsMode:e}={})=>Yze(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(W6e()?"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 new Error(`Invalid parameter for "defaultsMode", expect ${G6e.join(", ")}, got ${t}`)}}),W6e=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:o}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(o)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},K6e=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Tu,base64Encoder:e?.base64Encoder??rc,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??TK,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??UHe,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??F4e,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new gM},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new PHe}],logger:e?.logger??new EC,protocol:e?.protocol??Fqe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:j9e,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??GW,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??aK,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??dm,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??cl,utf8Encoder:e?.utf8Encoder??zu}),Y6e=e=>{const t=tY(e),r=()=>t().then(h7),o=K6e(e);return{...o,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??f7,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??QK({serviceId:o.serviceId,clientVersion:X9e.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$6e,maxAttempts:e?.maxAttempts??fm,md5:e?.md5??z6e,region:e?.region??eY("Region is missing"),requestHandler:SC.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||tK),sha1:e?.sha1??i6e,sha256:e?.sha256??XK,streamCollector:e?.streamCollector??bM,streamHasher:e?.streamHasher??B6e,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(G7)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(W7))}},nY=e=>({setRegion(t){e.region=t},region(){return e.region}}),rY=e=>({region:e.region()}),Z6e=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(i){const s=t.findIndex(a=>a.schemeId===i.schemeId);s===-1?t.push(i):t.splice(s,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){o=i},credentials(){return o}}},X6e=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Q6e=(e,t)=>{const r=Object.assign(nY(e),m7(e),LW(e),Z6e(e));return t.forEach(o=>o.configure(r)),Object.assign(e,rY(r),g7(r),$W(r),X6e(r))};class J6e extends p7{config;constructor(...[t]){const r=Y6e(t||{});super(r),this.initConfig=r;const o=$4e(r),i=M7(o),s=c3e(i),a=iK(s),l=Y7(a),c=l,u=eK(c),d=_5e(u),f=L4e(d),p=j3e(f,{session:[()=>this,Y9e]}),h=Q6e(p,t?.extensions||[]);this.config=h,this.middlewareStack.use(KW(this.config)),this.middlewareStack.use(U7(this.config)),this.middlewareStack.use(sK(this.config)),this.middlewareStack.use(Z7(this.config)),this.middlewareStack.use(E7(this.config)),this.middlewareStack.use(I7(this.config)),this.middlewareStack.use(k7(this.config)),this.middlewareStack.use(BW(this.config,{httpAuthSchemeParametersProvider:D4e,identityProviderConfigProvider:async b=>new t7({"aws.auth#sigv4":b.credentials,"aws.auth#sigv4a":b.credentials})})),this.middlewareStack.use(HW(this.config)),this.middlewareStack.use(Z3e(this.config)),this.middlewareStack.use(SHe(this.config)),this.middlewareStack.use(P3e(this.config)),this.middlewareStack.use(D3e(this.config)),this.middlewareStack.use($3e(this.config))}destroy(){super.destroy()}}function eGe(e){return t=>async r=>{const o={...r.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const s of i){const a=o[s.target];if(a){let l;typeof a=="string"?rGe(a,e)?l=e.base64Decoder(a):(l=e.utf8Decoder(a),o[s.target]=e.base64Encoder(l)):(l=ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),o[s.target]=e.base64Encoder(l));const c=new e.md5;c.update(l),o[s.hash]=e.base64Encoder(await c.digest())}}return t({...r,input:o})}}const tGe={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},nGe=e=>({applyToStack:t=>{t.add(eGe(e),tGe)}});function rGe(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}class oGe extends PC.classBuilder().ep({...EK,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,r,o,i){return[RM(o,t.getEndpointParameterInstructions()),l3e(o,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),S3e(),R7(o),nGe(o)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(K9e).build(){}function oY(e){return Promise.all(Object.keys(e).reduce((t,r)=>{const o=e[r];return typeof o=="string"?t.push([r,o]):t.push(o().then(i=>[r,i])),t},[])).then(t=>t.reduce((r,[o,i])=>(r[o]=i,r),{}))}function iGe(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:o}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-w_zdYDHl.js")),i=u=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??t?.callerClientConfig?.[u],{Credentials:{AccessKeyId:s=sGe(e.logger),Expiration:a,SecretKey:l=lGe(e.logger),SessionToken:c}=aGe(e.logger)}=await(e.client??new o(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await oY(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:l,sessionToken:c,expiration:a}}}function sGe(e){throw new dp("Response from Amazon Cognito contained no access key ID",{logger:e})}function aGe(e){throw new dp("Response from Amazon Cognito contained no credentials",{logger:e})}function lGe(e){throw new dp("Response from Amazon Cognito contained no secret key",{logger:e})}const S1="IdentityIds";class cGe{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",r=>{const o=r.get(t);return new Promise(i=>{o.onerror=()=>i(null),o.onsuccess=()=>i(o.result?o.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",r=>{const o=r.delete(t);return new Promise((i,s)=>{o.onerror=()=>s(o.error),o.onsuccess=()=>i()})})}setItem(t,r){return this.withObjectStore("readwrite",o=>{const i=o.put({id:t,value:r});return new Promise((s,a)=>{i.onerror=()=>a(i.error),i.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((r,o)=>{t.onsuccess=()=>{r(t.result)},t.onerror=()=>{o(t.error)},t.onblocked=()=>{o(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const i=t.result;i.onerror=()=>{o(new Error("Failed to create object store"))},i.createObjectStore(S1,{keyPath:"id"})}})}withObjectStore(t,r){return this.getDb().then(o=>{const i=o.transaction(S1,t);return i.oncomplete=()=>o.close(),new Promise((s,a)=>{i.onerror=()=>a(i.error),s(r(i.objectStore(S1)))}).catch(s=>{throw o.close(),s})})}}class uGe{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,r){this.store[t]=r}}const dGe=new uGe;function fGe(){return typeof self=="object"&&self.indexedDB?new cGe:typeof window=="object"&&window.localStorage?window.localStorage:dGe}function pGe({accountId:e,cache:t=fGe(),client:r,clientConfig:o,customRoleArn:i,identityPoolId:s,logins:a,userIdentifier:l=!a||Object.keys(a).length===0?"ANONYMOUS":void 0,logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const d=l?`aws:cognito-identity-credentials:${s}:${l}`:void 0;let f=async p=>{const{GetIdCommand:h,CognitoIdentityClient:b}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-w_zdYDHl.js")),g=C=>o?.[C]??u?.[C]??p?.callerClientConfig?.[C],y=r??new b(Object.assign({},o??{},{region:g("region"),profile:g("profile"),userAgentAppId:g("userAgentAppId")}));let x=d&&await t.getItem(d);if(!x){const{IdentityId:C=hGe(c)}=await y.send(new h({AccountId:e,IdentityPoolId:s,Logins:a?await oY(a):void 0}));x=C,d&&Promise.resolve(t.setItem(d,x)).catch(()=>{})}return f=iGe({client:y,customRoleArn:i,logins:a,identityId:x}),f(p)};return p=>f(p).catch(async h=>{throw d&&Promise.resolve(t.removeItem(d)).catch(()=>{}),h})}function hGe(e){throw new dp("Response from Amazon Cognito contained no identity ID",{logger:e})}const mGe=e=>pGe({...e});function gGe(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],o=atob(t[1]);let i=o.length;const s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new Blob([s],{type:r})}async function bGe(e,t,r,o,i,s=""){if(!i||!r||!o)return console.warn("Missing AWS Config (Pool ID, Bucket, or Region). Returning data URL as fallback."),e;try{const a=new J6e({region:o,credentials:mGe({clientConfig:{region:o},identityPoolId:i}),requestChecksumCalculation:"WHEN_REQUIRED",forcePathStyle:!0}),l=gGe(e);let c=s.trim();c&&!c.endsWith("/")&&(c+="/");const u=c?`${c}${t}`:`signatures/${t}`,d=new oGe({Bucket:r,Key:u,Body:l,ContentType:l.type});return await a.send(d),`https://${r}/${u}`}catch(a){throw console.error("Error uploading to S3:",a),a}}function yGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},label:s="Signature",bucket:a="",region:l="",identityPoolId:c="",path:u="",disabled:d=!1,CanvasProps:f={}}=e,p=Je.useRef(null),[h,b]=Je.useState(!1),[g,y]=Je.useState(e.value||null),x=t?.validation?.some(T=>T.rule==="mandatory")||!1;Je.useEffect(()=>{e.value&&p.current&&p.current.fromDataURL(e.value)},[e.value]);const C=()=>{p.current&&p.current.clear(),y(null),r&&r({id:o,value:""})},O=async()=>{if(!p.current||p.current.isEmpty())return;b(!0);const T=p.current.getTrimmedCanvas().toDataURL("image/png"),P=`${o}-${Date.now()}.png`;try{const I=await bGe(T,P,a,l,c,u);y(I),r&&r({id:o,value:I})}catch(I){console.error("Signature upload failed",I)}finally{b(!1)}};return w.jsxs(At.Box,{sx:{width:"100%",...i.sx},children:[w.jsxs(At.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},children:[s,x&&w.jsx(At.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(At.Box,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",bgcolor:"background.paper"},children:w.jsx(xC,{ref:p,penColor:"black",canvasProps:{className:"sigCanvas",style:{width:"100%",height:150,pointerEvents:d?"none":"auto",...f?.style}},backgroundColor:"transparent"})}),w.jsxs(At.Box,{sx:{display:"flex",gap:2,alignItems:"center",mt:1},children:[w.jsx(At.Button,{variant:"outlined",color:"secondary",onClick:C,size:"small",disabled:d||h,children:"Clear"}),w.jsx(At.Button,{variant:"contained",color:"primary",onClick:O,size:"small",disabled:d||h||g!==null,startIcon:h?w.jsx(At.CircularProgress,{size:16,color:"inherit"}):null,children:g?"Saved":"Save"}),g&&w.jsx(At.Typography,{variant:"caption",color:"success.main",children:"Signature Saved!"})]})]})}const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function vGe(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}let C1;const xGe=new Uint8Array(16);function SGe(){if(!C1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");C1=crypto.getRandomValues.bind(crypto)}return C1(xGe)}const CGe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Az={randomUUID:CGe};function wGe(e,t,r){e=e||{};const o=e.random??e.rng?.()??SGe();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,vGe(o)}function tA(e,t,r){return Az.randomUUID&&!e?Az.randomUUID():wGe(e)}function TGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Group",subFields:s=[]}=e,a=Je.useMemo(()=>tA(),[]);return w.jsxs(At.Paper,{elevation:1,sx:{p:2,mb:2,...o.sx},...o,children:[w.jsx(At.Typography,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:600},children:i}),w.jsx(At.Box,{children:w.jsx(pg,{guid:a,data:s,patch:t,onChange:r})})]})}function OGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Accordion",subFields:s=[]}=e,a=Je.useMemo(()=>tA(),[]);return w.jsxs(At.Accordion,{...o,children:[w.jsx(At.AccordionSummary,{expandIcon:w.jsx(At.Icon,{children:"expand_more"}),children:w.jsx(At.Typography,{children:i})}),w.jsx(At.AccordionDetails,{children:w.jsx(pg,{guid:a,data:s,patch:t,onChange:r})})]})}function PGe(e){const{children:t,value:r,index:o,...i}=e;return w.jsx("div",{role:"tabpanel",hidden:r!==o,id:`simple-tabpanel-${o}`,"aria-labelledby":`simple-tab-${o}`,...i,children:r===o&&w.jsx(At.Box,{sx:{p:3},children:t})})}function EGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},tabs:i=[]}=e,[s,a]=Je.useState(0),l=Je.useMemo(()=>i.map(()=>tA()),[i.length]),c=(u,d)=>{a(d)};return w.jsxs(At.Box,{sx:{width:"100%"},children:[w.jsx(At.Box,{sx:{borderBottom:1,borderColor:"divider"},children:w.jsx(At.Tabs,{value:s,onChange:c,...o,children:i.map((u,d)=>w.jsx(At.Tab,{label:u.label},d))})}),i.map((u,d)=>w.jsx(PGe,{value:s,index:d,children:w.jsx(pg,{guid:l[d],data:u.subFields||[],patch:t,onChange:r})},d))]})}function IGe({attributes:e={},rules:t={},onChange:r}){const{MuiAttributes:o={},id:i="",options:s=[],label:a="Combo Box"}=e,[l,c]=Je.useState(e.value||null),[u,d]=Je.useState(!1),[f,p]=Je.useState("");Je.useEffect(()=>{e.value&&c(e.value)},[]),ka(()=>{c(e.value)},[e.value]);const h=x=>{let C=!0,O="";if(t?.validation){for(const T of t.validation)if(T.rule==="mandatory"&&!x){C=!1,O=T.message||"Required";break}}return{isValid:C,message:O}},b=(x,C)=>{c(C);const O=h(C);d(!O.isValid),p(O.message),r&&r({id:i,value:C})},g=()=>{const x=h(l);d(!x.isValid),p(x.message)},y=t?.validation?.some(x=>x.rule==="mandatory")||!1;return w.jsx(pS,{disablePortal:!0,id:i,options:s,value:l,onChange:b,fullWidth:!0,renderInput:x=>w.jsx(uc,{...x,label:a,required:y,error:u,helperText:f,onBlur:g}),...o})}function kGe(e){return Qe("MuiImageList",e)}Ye("MuiImageList",["root","masonry","quilted","standard","woven"]);const nA=S.createContext({});process.env.NODE_ENV!=="production"&&(nA.displayName="ImageListContext");const RGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r]},kGe,t)},MGe=ie("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),iY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageList"}),{children:i,className:s,cols:a=2,component:l="ul",rowHeight:c="auto",gap:u=4,style:d,variant:f="standard",...p}=o,h=S.useMemo(()=>({rowHeight:c,gap:u,variant:f}),[c,u,f]),b=f==="masonry"?{columnCount:a,columnGap:u,...d}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:u,...d},g={...o,component:l,gap:u,rowHeight:c,variant:f},y=RGe(g);return w.jsx(MGe,{as:l,className:Te(y.root,y[f],s),ref:r,style:b,ownerState:g,...p,children:w.jsx(nA.Provider,{value:h,children:i})})});process.env.NODE_ENV!=="production"&&(iY.propTypes={children:n.node.isRequired,classes:n.object,className:n.string,cols:el,component:n.elementType,gap:n.number,rowHeight:n.oneOfType([n.oneOf(["auto"]),n.number]),style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object]),variant:n.oneOfType([n.oneOf(["masonry","quilted","standard","woven"]),n.string])});function AGe(e){return Qe("MuiImageListItem",e)}const w1=Ye("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),DGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r],img:["img"]},AGe,t)},_Ge=ie("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${w1.img}`]:t.img},t.root,t[r.variant]]}})({display:"block",position:"relative",[`& .${w1.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${w1.img}`]:{height:"auto",flexGrow:1}}}]}),sY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageListItem"}),{children:i,className:s,cols:a=1,component:l="li",rows:c=1,style:u,...d}=o,{rowHeight:f="auto",gap:p,variant:h}=S.useContext(nA);let b="auto";h==="woven"?b=void 0:f!=="auto"&&(b=f*c+p*(c-1));const g={...o,cols:a,component:l,gap:p,rowHeight:f,rows:c,variant:h},y=DGe(g);return w.jsx(_Ge,{as:l,className:Te(y.root,y[h],s),ref:r,style:{height:b,gridColumnEnd:h!=="masonry"?`span ${a}`:void 0,gridRowEnd:h!=="masonry"?`span ${c}`:void 0,marginBottom:h==="masonry"?p:void 0,breakInside:h==="masonry"?"avoid":void 0,...u},ownerState:g,...d,children:S.Children.map(i,x=>S.isValidElement(x)?(process.env.NODE_ENV!=="production"&&Sm.isFragment(x)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
465
- `)),x.type==="img"||nf(x,["Image"])?S.cloneElement(x,{className:Te(y.img,x.props.className)}):x):null)})});process.env.NODE_ENV!=="production"&&(sY.propTypes={children:n.node,classes:n.object,className:n.string,cols:el,component:n.elementType,rows:el,style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object])});function NGe({attributes:e={}}){const{MuiAttributes:t={},items:r=[],width:o=500,height:i=450,cols:s=3,rowHeight:a=164}=e;return w.jsx(iY,{sx:{width:o,height:i},cols:s,rowHeight:a,...t,children:r.map(l=>w.jsx(sY,{children:w.jsx("img",{srcSet:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format&dpr=2 2x`,src:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format`,alt:l.title,loading:"lazy"})},l.img))})}function FGe({attributes:e={},rules:t={}}){const{label:r="",value:o="",MuiAttributes:i={},url:s="",target:a="_blank",displayText:l=""}=e,c=t?.validation?.some(f=>f.rule==="mandatory")||!1,u=s||o||"#",d=l||r||u;return w.jsxs(At.Box,{sx:{width:"100%",...i.sx},children:[r&&l&&w.jsxs(At.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},children:[r,c&&w.jsx(At.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(At.Link,{href:u,target:a,rel:a==="_blank"?"noopener noreferrer":void 0,...i,children:d})]})}const rA={Typography:wie,TextField:sye,Table:Zke,DateTime:wRe,DateTimePicker:TRe,TimePicker:ORe,Select:RRe,CheckBox:MRe,Switch:DRe,Radio:JRe,Stepper:rMe,Bar:OBe,Line:sVe,Pie:IVe,MixChart:kVe,Divider:RVe,Chip:MVe,List:AVe,NumberField:oHe,MultiTextbox:iHe,Signature:yGe,Group:TGe,Accordion:OGe,Tabs:EGe,AutoComplete:IGe,ImgList:NGe,Hyperlink:FGe};function aY(e){const{map:t}=e;if(!t)return w.jsx("div",{});const r=rA[t];return r?w.jsx(r,{...e}):w.jsx("div",{})}const LGe={MUI:{map:lE}},Si={},$Ge=e=>e?Si[e]:Si,jGe=e=>{const t=Object.keys(Si);e?delete Si[e]:t.forEach(r=>delete Si[r])},BGe=e=>e?.filter(t=>t?.rules?.validation?.some(r=>r.rule==="mandatory")),VGe=(e,t)=>BGe(e)?.reduce((o,i)=>(i?.rules?.validation?.forEach(s=>{const a=i?.id||i?.props?.id;if(!a)return;const l=Si[t]?.[a]?.toString();l&&yx[s.rule](l,s.value)||o.push({...s,id:i.id})}),o),[]),HGe={};function pg({data:e=[],patch:t=HGe,guid:r,formRef:o,onSubmit:i,onChange:s,onStepChange:a,MuiGridAttributes:l={spacing:2},activeStep:c=0,onFieldClick:u,onFieldDoubleClick:d,onFieldContextMenu:f}){const[p,h]=Je.useState(t),[b,g]=Je.useState(0),y=LGe.MUI,x=Je.useMemo(()=>Tge(T5(e,p,r,Si)),[p,e,r]);Je.useEffect(()=>{T1(Si[r])&&(Si[r]=t)},[]),ka(()=>{h({...t})},[t]);const C=Je.useCallback(({id:I,value:A,option:_})=>{Si[r]||(Si[r]={}),Si[r][I]=A,g(D=>D+1),typeof s=="function"&&s({id:I,value:A,option:_})},[r,s]),O=Je.useCallback((I,A,_)=>{if(typeof I=="function"){const D=VGe(A,_);I(Si,D,A,_)}},[]),T=(I,A,_)=>{typeof a=="function"&&a(I,A,_)},P=(I,A)=>{const{type:_="",style:D={},className:M="",visible:L=!1,rules:k={},subforms:N=[]}=I,V=I.props||{},H=I.layout||{},$=I?.id||V?.id,j=y.map[_]||{},{options:q={}}=j,U=$?Si[r]?.[$]:void 0,B=N.find(F=>Array.isArray(U)?U.includes(F.conditionValue):F.conditionValue===U);return w.jsxs(At.Grid,{style:{...D,cursor:u?"pointer":"default",position:"relative",transition:"background-color 0.2s, box-shadow 0.2s",borderRadius:4},...H,className:`${M} ${L?"show":"hidden"}`,onClick:F=>{},onDoubleClick:F=>{d&&(F.stopPropagation(),d(I))},onContextMenu:F=>{f&&(F.preventDefault(),F.stopPropagation(),f(F,I))},children:[w.jsx(aY,{map:j.map,option:q.type||"",control:I,attributes:V,rules:k,onChange:C,onStepUpdate:T,currentStep:c,patch:t},`dynamic-comp-${$||A}`),B&&B.data&&w.jsx(At.Box,{sx:{mt:2,pl:2,borderLeft:"2px solid",borderColor:"divider",width:"100%"},children:w.jsx(pg,{guid:`${r}-subform-${$}`,data:B.data,patch:t,onChange:C,MuiGridAttributes:{spacing:1}})})]},$||`layout-comp-${A}`)};return w.jsxs(w.Fragment,{children:[w.jsx(At.Grid,{container:!0,...l,children:x.wrows.map((I,A)=>w.jsx(Je.Fragment,{children:I.map(P)},`row-${A}`))},`layout-grid-${r}`),x.worows.map((I,A)=>{const _=I?.id||I?.props?.id;return w.jsx("div",{style:I.style||{},className:`${I.className||""} ${I.visible?"show":"hidden"}`,children:P(I,A)},_||`layout-comp-${A}`)}),w.jsx("button",{"aria-label":"button",type:"button",ref:o||null,onClick:()=>O(i,e,r),style:{display:"none"}})]})}exports.AwsSdkSigV4Signer=gM;exports.ClearFormData=jGe;exports.Client=p7;exports.Command=PC;exports.Controls=rA;exports.DEFAULT_MAX_ATTEMPTS=fm;exports.DEFAULT_RETRY_MODE=tK;exports.DEFAULT_USE_DUALSTACK_ENDPOINT=G7;exports.DEFAULT_USE_FIPS_ENDPOINT=W7;exports.DefaultIdentityProviderConfig=t7;exports.DynamicComponent=aY;exports.EndpointCache=A7;exports.FetchHttpHandler=SC;exports.FormData=$Ge;exports.FormGenerator=pg;exports.HttpProtocol=JW;exports.HttpRequest=Br;exports.LazyJsonString=Qa;exports.NoOpLogger=EC;exports.NormalizedSchema=or;exports.NumericValue=cg;exports.ProtocolLib=y7;exports.SerdeContextConfig=IC;exports.ServiceException=Qc;exports.Sha256=XK;exports.TypeRegistry=ti;exports.UnionSerde=v7;exports.calculateBodyLength=f7;exports.collectBody=uh;exports.createDefaultUserAgentProvider=QK;exports.customEndpointFunctions=cm;exports.dateToUtcString=o0;exports.deref=Yv;exports.determineTimestampFormat=OC;exports.fromBase64=Tu;exports.fromUtf8=cl;exports.getAwsRegionExtensionConfiguration=nY;exports.getContentLengthPlugin=Z7;exports.getDefaultExtensionConfiguration=m7;exports.getEndpointPlugin=RM;exports.getHostHeaderPlugin=E7;exports.getHttpAuthSchemeEndpointRuleSetPlugin=BW;exports.getHttpHandlerExtensionConfiguration=LW;exports.getHttpSigningPlugin=HW;exports.getLoggerPlugin=I7;exports.getRecursionDetectionPlugin=k7;exports.getRetryPlugin=sK;exports.getSchemaSerdePlugin=KW;exports.getSmithyContext=ml;exports.getUserAgentPlugin=U7;exports.invalidProvider=eY;exports.isIpAddress=IM;exports.isValidHostLabel=ug;exports.loadConfigsForDefaultMode=h7;exports.mui=lE;exports.normalizeProvider=ks;exports.parseEpochTimestamp=Sze;exports.parseRfc3339DateTimeWithOffset=gze;exports.parseRfc7231DateTime=xze;exports.parseUrl=dm;exports.resolveAwsRegionExtensionConfiguration=rY;exports.resolveAwsSdkSigV4Config=d7;exports.resolveDefaultRuntimeConfig=g7;exports.resolveDefaultsModeConfig=tY;exports.resolveEndpoint=H7;exports.resolveEndpointConfig=eK;exports.resolveHostHeaderConfig=u3e;exports.resolveHttpHandlerRuntimeConfig=$W;exports.resolveRegionConfig=Y7;exports.resolveRetryConfig=iK;exports.resolveUserAgentConfig=M7;exports.streamCollector=bM;exports.toBase64=rc;exports.toUtf8=zu;exports.v4=wC;
464
+ `+i)});const r=await this.createSessionFn(t);if(!r.Credentials?.AccessKeyId||!r.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretAccessKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration?new Date(r.Credentials.Expiration):void 0}}}const E3e="Directory",I3e="S3Express",k3e="sigv4-s3express",eE="X-Amz-S3session-Token",tE=eE.toLowerCase();class R3e extends zP{async signWithCredentials(t,r,o){const i=QV(r);t.headers[tE]=r.sessionToken;const s=this;return JV(s,i),s.signRequest(t,o??{})}async presignWithCredentials(t,r,o){const i=QV(r);return delete t.headers[tE],t.headers[eE]=r.sessionToken,t.query=t.query??{},t.query[eE]=r.sessionToken,JV(this,i),this.presign(t,o)}}function QV(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function JV(e,t){const r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),o=e.credentialProvider,i=()=>(clearTimeout(r),e.credentialProvider=o,Promise.resolve(t));e.credentialProvider=i}const M3e=e=>(t,r)=>async o=>{if(r.endpointV2){const i=r.endpointV2,s=i.properties?.authSchemes?.[0]?.name===k3e;if((i.properties?.backend===I3e||i.properties?.bucketType===E3e)&&(Gr(r,"S3_EXPRESS_BUCKET","J"),r.isS3ExpressBucket=!0),s){const l=o.input.Bucket;if(l){const c=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:l});r.s3ExpressIdentity=c,Br.isInstance(o.request)&&c.sessionToken&&(o.request.headers[tE]=c.sessionToken)}}}return t(o)},A3e={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},D3e=e=>({applyToStack:t=>{t.add(M3e(e),A3e)}}),_3e=async(e,t,r,o)=>{const i=await o.signWithCredentials(r,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},N3e=e=>t=>{throw t},F3e=(e,t)=>{},L3e=e=>(t,r)=>async o=>{if(!Br.isInstance(o.request))return t(o);const s=ml(r).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:l,signer:c}=s;let u;r.s3ExpressIdentity?u=await _3e(r.s3ExpressIdentity,a,o.request,await e.signer()):u=await c.sign(o.request,l,a);const d=await t({...o,request:u}).catch((c.errorHandler||N3e)(a));return(c.successHandler||F3e)(d.response,a),d},$3e=e=>({applyToStack:t=>{t.addRelativeTo(L3e(e),VW)}}),j3e=(e,{session:t})=>{const[r,o]=t,{forcePathStyle:i,useAccelerateEndpoint:s,disableMultiregionAccessPoints:a,followRegionRedirects:l,s3ExpressIdentityProvider:c,bucketEndpoint:u,expectContinueHeader:d}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:s??!1,disableMultiregionAccessPoints:a??!1,followRegionRedirects:l??!1,s3ExpressIdentityProvider:c??new EM(async f=>r().send(new o({Bucket:f}))),bucketEndpoint:u??!1,expectContinueHeader:d??2097152})},B3e={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},V3e=3e3,H3e=e=>(t,r)=>async o=>{const i=await t(o),{response:s}=i;if(!wu.isInstance(s))return i;const{statusCode:a,body:l}=s;if(a<200||a>=300||!(typeof l?.stream=="function"||typeof l?.pipe=="function"||typeof l?.tee=="function"))return i;let u=l,d=l;l&&typeof l=="object"&&!(l instanceof Uint8Array)&&([u,d]=await JHe(l)),s.body=d;const f=await z3e(u,{streamCollector:async h=>GHe(h,V3e)});typeof u?.destroy=="function"&&u.destroy();const p=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&B3e[r.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return p&&p.endsWith("</Error>")&&(s.statusCode=400),i},z3e=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),q3e={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},R7=e=>({applyToStack:t=>{t.addRelativeTo(H3e(e),q3e)}}),U3e=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function G3e(e){return(t,r)=>async o=>{if(e.bucketEndpoint){const i=r.endpointV2;if(i){const s=o.input.Bucket;if(typeof s=="string")try{const a=new URL(s);r.endpointV2={...i,url:a}}catch(a){const l=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${s} could not be parsed as URL.`;throw r.logger?.constructor?.name==="NoOpLogger"?console.warn(l):r.logger?.warn?.(l),a}}}return t(o)}}const W3e={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function K3e({bucketEndpoint:e}){return t=>async r=>{const{input:{Bucket:o}}=r;if(!e&&typeof o=="string"&&!U3e(o)&&o.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${o}'`);throw i.name="InvalidBucketName",i}return t({...r})}}const Y3e={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Z3e=e=>({applyToStack:t=>{t.add(K3e(e),Y3e),t.addRelativeTo(G3e(e),W3e)}}),X3e=void 0;function Q3e(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function M7(e){const t=pf(e.userAgentAppId??X3e),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const o=await t();if(!Q3e(o)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof o!="string"?i?.warn("userAgentAppId must be a string or undefined."):o.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class A7{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const o=this.hash(t);if(o===!1)return r();if(!this.data.has(o)){if(this.data.size>this.capacity+10){const i=this.data.keys();let s=0;for(;;){const{value:a,done:l}=i.next();if(this.data.delete(a),l||++s>10)break}}this.data.set(o,r())}return this.data.get(o)}size(){return this.data.size}hash(t){let r="";const{parameters:o}=this;if(o.length===0)return!1;for(const i of o){const s=String(t[i]??"");if(s.includes("|;"))return!1;r+=s+"|;"}return r}}const J3e=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),IM=e=>J3e.test(e)||e.startsWith("[")&&e.endsWith("]"),e5e=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ug=(e,t=!1)=>{if(!t)return e5e.test(e);const r=e.split(".");for(const o of r)if(!ug(o))return!1;return!0},cm={},um="endpoints";function ic(e){return typeof e!="object"||e==null?e:"ref"in e?`$${ic(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ic).join(", ")})`:JSON.stringify(e,null,2)}class Xi extends Error{constructor(t){super(t),this.name="EndpointError"}}const t5e=(e,t)=>e===t,n5e=e=>{const t=e.split("."),r=[];for(const o of t){const i=o.indexOf("[");if(i!==-1){if(o.indexOf("]")!==o.length-1)throw new Xi(`Path: '${e}' does not end with ']'`);const s=o.slice(i+1,-1);if(Number.isNaN(parseInt(s)))throw new Xi(`Invalid array index: '${s}' in path: '${e}'`);i!==0&&r.push(o.slice(0,i)),r.push(s)}else r.push(o)}return r},D7=(e,t)=>n5e(t).reduce((r,o)=>{if(typeof r!="object")throw new Xi(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(o)]:r[o]},e),r5e=e=>e!=null,o5e=e=>!e,YO={[sm.HTTP]:80,[sm.HTTPS]:443},i5e=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:p,port:h,protocol:b="",path:g="",query:y={}}=e,x=new URL(`${b}//${p}${h?`:${h}`:""}${g}`);return x.search=Object.entries(y).map(([C,O])=>`${C}=${O}`).join("&"),x}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:o,hostname:i,pathname:s,protocol:a,search:l}=t;if(l)return null;const c=a.slice(0,-1);if(!Object.values(sm).includes(c))return null;const u=IM(i),d=r.includes(`${o}:${YO[c]}`)||typeof e=="string"&&e.includes(`${o}:${YO[c]}`),f=`${o}${d?`:${YO[c]}`:""}`;return{scheme:c,authority:f,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},s5e=(e,t)=>e===t,a5e=(e,t,r,o)=>t>=r||e.length<r?null:o?e.substring(e.length-r,e.length-t):e.substring(t,r),l5e=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),c5e={booleanEquals:t5e,getAttr:D7,isSet:r5e,isValidHostLabel:ug,not:o5e,parseURL:i5e,stringEquals:s5e,substring:a5e,uriEncode:l5e},_7=(e,t)=>{const r=[],o={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const s=e.indexOf("{",i);if(s===-1){r.push(e.slice(i));break}r.push(e.slice(i,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),i=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[c,u]=l.split("#");r.push(D7(o[c],u))}else r.push(o[l]);i=a+1}return r.join("")},u5e=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],kC=(e,t,r)=>{if(typeof e=="string")return _7(e,r);if(e.fn)return F7.callFunction(e,r);if(e.ref)return u5e(e,r);throw new Xi(`'${t}': ${String(e)} is not a string, function or reference.`)},N7=({fn:e,argv:t},r)=>{const o=t.map(s=>["boolean","number"].includes(typeof s)?s:F7.evaluateExpression(s,"arg",r)),i=e.split(".");return i[0]in cm&&i[1]!=null?cm[i[0]][i[1]](...o):c5e[e](...o)},F7={evaluateExpression:kC,callFunction:N7},d5e=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new Xi(`'${e}' is already defined in Reference Record.`);const o=N7(t,r);return r.logger?.debug?.(`${um} evaluateCondition: ${ic(t)} = ${ic(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},kM=(e=[],t)=>{const r={};for(const o of e){const{result:i,toAssign:s}=d5e(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!i)return{result:i};s&&(r[s.name]=s.value,t.logger?.debug?.(`${um} assign: ${s.name} := ${ic(s.value)}`))}return{result:!0,referenceRecord:r}},f5e=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:i.map(s=>{const a=kC(s,"Header value entry",t);if(typeof a!="string")throw new Xi(`Header '${o}' value '${a}' is not a string`);return a})}),{}),L7=(e,t)=>Object.entries(e).reduce((r,[o,i])=>({...r,[o]:j7.getEndpointProperty(i,t)}),{}),$7=(e,t)=>{if(Array.isArray(e))return e.map(r=>$7(r,t));switch(typeof e){case"string":return _7(e,t);case"object":if(e===null)throw new Xi(`Unexpected endpoint property: ${e}`);return j7.getEndpointProperties(e,t);case"boolean":return e;default:throw new Xi(`Unexpected endpoint property type: ${typeof e}`)}},j7={getEndpointProperty:$7,getEndpointProperties:L7},p5e=(e,t)=>{const r=kC(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new Xi(`Endpoint URL must be a string, got ${typeof r}`)},h5e=(e,t)=>{const{conditions:r,endpoint:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(!i)return;const a={...t,referenceRecord:{...t.referenceRecord,...s}},{url:l,properties:c,headers:u}=o;return t.logger?.debug?.(`${um} Resolving endpoint from template: ${ic(o)}`),{...u!=null&&{headers:f5e(u,a)},...c!=null&&{properties:L7(c,a)},url:p5e(l,a)}},m5e=(e,t)=>{const{conditions:r,error:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(i)throw new Xi(kC(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},B7=(e,t)=>{for(const r of e)if(r.type==="endpoint"){const o=h5e(r,t);if(o)return o}else if(r.type==="error")m5e(r,t);else if(r.type==="tree"){const o=V7.evaluateTreeRule(r,t);if(o)return o}else throw new Xi(`Unknown endpoint rule: ${r}`);throw new Xi("Rules evaluation failed")},g5e=(e,t)=>{const{conditions:r,rules:o}=e,{result:i,referenceRecord:s}=kM(r,t);if(i)return V7.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...s}})},V7={evaluateRules:B7,evaluateTreeRule:g5e},H7=(e,t)=>{const{endpointParams:r,logger:o}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${um} Initial EndpointParams: ${ic(r)}`);const a=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,d])=>[u,d.default]);if(a.length>0)for(const[u,d]of a)r[u]=r[u]??d;const l=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of l)if(r[u]==null)throw new Xi(`Missing required parameter: '${u}'`);const c=B7(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${um} Resolved endpoint: ${ic(c)}`),c},z7=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!z7(r))return!1;return!0}return!(!ug(e)||e.length<3||e.length>63||e!==e.toLowerCase()||IM(e))},eH=":",b5e="/",y5e=e=>{const t=e.split(eH);if(t.length<6)return null;const[r,o,i,s,a,...l]=t;if(r!=="arn"||o===""||i===""||l.join(eH)==="")return null;const c=l.map(u=>u.split(b5e)).flat();return{partition:o,service:i,region:s,accountId:a,resourceId:c}},v5e=[{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)"}}}],x5e={partitions:v5e};let S5e=x5e;const C5e=e=>{const{partitions:t}=S5e;for(const o of t){const{regions:i,outputs:s}=o;for(const[a,l]of Object.entries(i))if(a===e)return{...s,...l}}for(const o of t){const{regionRegex:i,outputs:s}=o;if(new RegExp(i).test(e))return{...s}}const r=t.find(o=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},q7={isVirtualHostableS3Bucket:z7,parseArn:y5e,partition:C5e};cm.aws=q7;function w5e(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[o,i=null]=r.split("=");o=decodeURIComponent(o),i&&(i=decodeURIComponent(i)),o in t?Array.isArray(t[o])?t[o].push(i):t[o]=[t[o],i]:t[o]=i}return t}const dm=e=>{if(typeof e=="string")return dm(new URL(e));const{hostname:t,pathname:r,port:o,protocol:i,search:s}=e;let a;return s&&(a=w5e(s)),{hostname:t,port:o?parseInt(o):void 0,protocol:i,path:r,query:a}},T5e=/\d{12}\.ddb/;async function O5e(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Gr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const s=await t.retryStrategy();typeof s.acquireInitialRetryToken=="function"?s.constructor?.name?.includes("Adaptive")?Gr(e,"RETRY_MODE_ADAPTIVE","F"):Gr(e,"RETRY_MODE_STANDARD","E"):Gr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const s=e.endpointV2;switch(String(s?.url?.hostname).match(T5e)&&Gr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Gr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const s=i;s.accountId&&Gr(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,l]of Object.entries(s.$source??{}))Gr(e,a,l)}}const tH="user-agent",ZO="x-amz-user-agent",nH=" ",XO="/",P5e=/[^!$%&'*+\-.^_`|~\w]/g,E5e=/[^!$%&'*+\-.^_`|~\w#]/g,rH="-",I5e=1024;function k5e(e){let t="";for(const r in e){const o=e[r];if(t.length+o.length+1<=I5e){t.length?t+=","+o:t+=o;continue}break}return t}const R5e=e=>(t,r)=>async o=>{const{request:i}=o;if(!Br.isInstance(i))return t(o);const{headers:s}=i,a=r?.userAgent?.map(Ov)||[],l=(await e.defaultUserAgentProvider()).map(Ov);await O5e(r,e,o);const c=r;l.push(`m/${k5e(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Ov)||[],d=await e.userAgentAppId();d&&l.push(Ov(["app",`${d}`]));const f=[].concat([...l,...a,...u]).join(nH),p=[...l.filter(h=>h.startsWith("aws-sdk-")),...u].join(nH);return e.runtime!=="browser"?(p&&(s[ZO]=s[ZO]?`${s[tH]} ${p}`:p),s[tH]=f):s[ZO]=f,t({...o,request:i})},Ov=e=>{const t=e[0].split(XO).map(a=>a.replace(P5e,rH)).join(XO),r=e[1]?.replace(E5e,rH),o=t.indexOf(XO),i=t.substring(0,o);let s=t.substring(o+1);return i==="api"&&(s=s.toLowerCase()),[i,s,r].filter(a=>a&&a.length>0).reduce((a,l,c)=>{switch(c){case 0:return l;case 1:return`${a}/${l}`;default:return`${a}#${l}`}},"")},M5e={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},U7=e=>({applyToStack:t=>{t.add(R5e(e),M5e)}}),G7=!1,W7=!1,oH=new Set,A5e=(e,t=ug)=>{if(!oH.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else oH.add(e)},K7=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),D5e=e=>K7(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Y7=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const o=typeof t=="function"?await t():t,i=D5e(o);return A5e(i),i},useFipsEndpoint:async()=>{const o=typeof t=="string"?t:await t();return K7(o)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},_5e=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),iH="content-length";function N5e(e){return t=>async r=>{const o=r.request;if(Br.isInstance(o)){const{body:i,headers:s}=o;if(i&&Object.keys(s).map(a=>a.toLowerCase()).indexOf(iH)===-1)try{const a=e(i);o.headers={...o.headers,[iH]:String(a)}}catch{}}return t({...r,request:o})}}const F5e={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Z7=e=>({applyToStack:t=>{t.add(N5e(e.bodyLengthChecker),F5e)}}),L5e=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),H5e(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!V5e(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},$5e=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,j5e=/(\d+\.){3}\d+/,B5e=/\.\./,V5e=e=>$5e.test(e)&&!j5e.test(e)&&!B5e.test(e),H5e=e=>{const[t,r,o,,,i]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,a=!!(s&&r&&o&&i);if(s&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},z5e=(e,t,r,o=!1)=>{const i=async()=>{let s;return o?s=r.clientContextParams?.[e]??r[e]??r[t]:s=r[e]??r[t],typeof s=="function"?s():s};return e==="credentialScope"||t==="CredentialScope"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const s=await i();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:a,hostname:l,port:c,path:u}=s;return`${a}//${l}${c?":"+c:""}${u}`}}return s}:i},X7=async e=>{},Q7=e=>typeof e=="object"?"url"in e?dm(e.url):e:dm(e),q5e=async(e,t,r,o)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await X7(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(Q7(a)),r.isCustomEndpoint=!0)}const i=await J7(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,o)},J7=async(e,t,r)=>{const o={},i=t?.getEndpointParameterInstructions?.()||{};for(const[s,a]of Object.entries(i))switch(a.type){case"staticContextParams":o[s]=a.value;break;case"contextParams":o[s]=e[a.name];break;case"clientContextParams":case"builtInParams":o[s]=await z5e(a.name,s,r,a.type!=="builtInParams")();break;case"operationContextParams":o[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(o,r),String(r.serviceId).toLowerCase()==="s3"&&await L5e(o),o},U5e=({config:e,instructions:t})=>(r,o)=>async i=>{e.isCustomEndpoint&&qze(o,"ENDPOINT_OVERRIDE","N");const s=await q5e(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;const a=o.authSchemes?.[0];if(a){o.signing_region=a.signingRegion,o.signing_service=a.signingName;const c=ml(o)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},G5e={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:MHe.name},RM=(e,t)=>({applyToStack:r=>{r.addRelativeTo(U5e({config:e,instructions:t}),G5e)}}),eK=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:i}=e,s=r!=null?async()=>Q7(await ks(r)()):void 0,l=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ks(o??!1),useFipsEndpoint:ks(i??!1)});let c;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=X7(e.serviceId)),c),l};var Bf;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Bf||(Bf={}));const fm=3,tK=Bf.STANDARD,W5e=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],K5e=["TimeoutError","RequestTimeout","RequestTimeoutException"],Y5e=[500,502,503,504],Z5e=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],X5e=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Q5e=e=>e?.$retryable!==void 0,J5e=e=>e.$metadata?.clockSkewCorrected,e4e=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},nK=e=>e.$metadata?.httpStatusCode===429||W5e.includes(e.name)||e.$retryable?.throttling==!0,MM=(e,t=0)=>Q5e(e)||J5e(e)||K5e.includes(e.name)||Z5e.includes(e?.code||"")||X5e.includes(e?.code||"")||Y5e.includes(e.$metadata?.httpStatusCode||0)||e4e(e)||e.cause!==void 0&&t<=10&&MM(e.cause,t+1),t4e=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!MM(e)}return!1};class AM{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(o=>AM.setTimeoutFn(o,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),nK(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const o=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(o*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const nE=100,rK=20*1e3,n4e=500,sH=500,r4e=5,o4e=10,i4e=1,s4e="amz-sdk-invocation-id",a4e="amz-sdk-request",l4e=()=>{let e=nE;return{computeNextBackoffDelay:o=>Math.floor(Math.min(rK,Math.random()*2**o*e)),setDelayBase:o=>{e=o}}},aH=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(rK,e),getRetryCost:()=>r});class oK{maxAttempts;mode=Bf.STANDARD;capacity=sH;retryBackoffStrategy=l4e();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return aH({retryDelay:nE,retryCount:0})}async refreshRetryTokenForRetry(t,r){const o=await this.getMaxAttempts();if(this.shouldRetry(t,r,o)){const i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?n4e:nE);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,s):s,l=this.getCapacityCost(i);return this.capacity-=l,aH({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:l})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(sH,this.capacity+(t.getRetryCost()??i4e))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${fm}`),fm}}shouldRetry(t,r,o){return t.getRetryCount()+1<o&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?o4e:r4e}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class c4e{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=Bf.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;const{rateLimiter:o}=r??{};this.rateLimiter=o??new AM,this.standardRetryStrategy=new oK(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const u4e=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),iK=e=>{const{retryStrategy:t,retryMode:r,maxAttempts:o}=e,i=ks(o??fm);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await ks(r)()===Bf.ADAPTIVE?new c4e(i):new oK(i))})},d4e=e=>e?.body instanceof ReadableStream,f4e=e=>(t,r)=>async o=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(p4e(i)){i=i;let a=await i.acquireInitialRetryToken(r.partition_id),l=new Error,c=0,u=0;const{request:d}=o,f=Br.isInstance(d);for(f&&(d.headers[s4e]=wC());;)try{f&&(d.headers[a4e]=`attempt=${c+1}; max=${s}`);const{response:p,output:h}=await t(o);return i.recordSuccess(a),h.$metadata.attempts=c+1,h.$metadata.totalRetryDelay=u,{response:p,output:h}}catch(p){const h=h4e(p);if(l=u4e(p),f&&d4e(d))throw(r.logger instanceof EC?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),l;try{a=await i.refreshRetryTokenForRetry(a,h)}catch{throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=c+1,l.$metadata.totalRetryDelay=u,l}c=a.getRetryCount();const b=a.getRetryDelay();u+=b,await new Promise(g=>setTimeout(g,b))}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,o)},p4e=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",h4e=e=>{const t={error:e,errorType:m4e(e)},r=b4e(e.$response);return r&&(t.retryAfterHint=r),t},m4e=e=>nK(e)?"THROTTLING":MM(e)?"TRANSIENT":t4e(e)?"SERVER_ERROR":"CLIENT_ERROR",g4e={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},sK=e=>({applyToStack:t=>{t.add(f4e(e),g4e)}}),b4e=e=>{if(!wu.isInstance(e))return;const t=Object.keys(e.headers).find(s=>s.toLowerCase()==="retry-after");if(!t)return;const r=e.headers[t],o=Number(r);return Number.isNaN(o)?new Date(r):new Date(o*1e3)};class aK{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new R3e(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,r,o)}async presign(t,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,o={}){if(o.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,o)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const DM="required",ue="type",Be="rules",be="conditions",ke="fn",Re="argv",Pt="ref",tn="assign",dt="url",ft="properties",Ja="backend",go="authSchemes",Wr="disableDoubleEncoding",Kr="signingName",Eo="signingRegion",pt="headers",_M="signingRegionSet",y4e=6,v4e=!1,ca=!0,qi="isSet",jr="booleanEquals",vt="error",a0="aws.partition",wn="stringEquals",wr="getAttr",Or="name",Qn="substring",lH="bucketSuffix",NM="parseURL",Ke="endpoint",Ve="tree",l0="aws.isVirtualHostableS3Bucket",c0="{url#scheme}://{Bucket}.{url#authority}{url#path}",Sa="not",cH="accessPointSuffix",Xv="{url#scheme}://{url#authority}{url#path}",lK="hardwareType",cK="regionPrefix",uH="bucketAliasSuffix",rE="outpostId",qu="isValidHostLabel",FM="sigv4a",pm="s3-outposts",Vf="s3",uK="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",dK="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",dH="https://{Bucket}.s3.{partitionResult#dnsSuffix}",fK="aws.parseArn",pK="bucketArn",hK="arnType",u0="",LM="s3-object-lambda",mK="accesspoint",$M="accessPointName",fH="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",pH="mrapPartition",hH="outpostType",mH="arnPrefix",gK="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",gH="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",bH="https://s3.{partitionResult#dnsSuffix}",Fd={[DM]:!1,[ue]:"string"},Ld={[DM]:!0,default:!1,[ue]:"boolean"},Yp={[DM]:!1,[ue]:"boolean"},gs={[ke]:jr,[Re]:[{[Pt]:"Accelerate"},!0]},rr={[ke]:jr,[Re]:[{[Pt]:"UseFIPS"},!0]},Yn={[ke]:jr,[Re]:[{[Pt]:"UseDualStack"},!0]},Lr={[ke]:qi,[Re]:[{[Pt]:"Endpoint"}]},bK={[ke]:a0,[Re]:[{[Pt]:"Region"}],[tn]:"partitionResult"},yH={[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"partitionResult"},Or]},"aws-cn"]},kh={[ke]:qi,[Re]:[{[Pt]:"Bucket"}]},xn={[Pt]:"Bucket"},vH={[be]:[gs],[vt]:"S3Express does not support S3 Accelerate.",[ue]:vt},xH={[be]:[Lr,{[ke]:NM,[Re]:[{[Pt]:"Endpoint"}],[tn]:"url"}],[Be]:[{[be]:[{[ke]:qi,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"},!0]}],[Be]:[{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ke]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:l0,[Re]:[xn,!1]}],[Be]:[{[Ke]:{[dt]:c0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve},{[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt}],[ue]:Ve},{[be]:[{[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]}],[Be]:[{[be]:[{[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"}],[Be]:[{[Ke]:{[dt]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:l0,[Re]:[xn,!1]}],[Be]:[{[Ke]:{[dt]:c0,[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],[ue]:Ve},{[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt}],[ue]:Ve},Xo={[ke]:NM,[Re]:[{[Pt]:"Endpoint"}],[tn]:"url"},QO={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[{[Pt]:"url"},"isIp"]},!0]},yK={[Pt]:"url"},vK={[ke]:"uriEncode",[Re]:[xn],[tn]:"uri_encoded_bucket"},ji={[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:"s3express",[Eo]:"{Region}"}]},qt={},xK={[ke]:l0,[Re]:[xn,!1]},SH={[vt]:"S3Express bucket name is not a valid virtual hostable name.",[ue]:vt},CH={[ke]:qi,[Re]:[{[Pt]:"UseS3ExpressControlEndpoint"}]},wH={[ke]:jr,[Re]:[{[Pt]:"UseS3ExpressControlEndpoint"},!0]},Qt={[ke]:Sa,[Re]:[Lr]},hn={[ke]:jr,[Re]:[{[Pt]:"UseDualStack"},!1]},an={[ke]:jr,[Re]:[{[Pt]:"UseFIPS"},!1]},Pv={[vt]:"Unrecognized S3Express bucket name format.",[ue]:vt},TH={[ke]:Sa,[Re]:[kh]},OH={[Pt]:lK},PH={[be]:[Qt],[vt]:"Expected a endpoint to be specified but no endpoint was found",[ue]:vt},Ev={[go]:[{[Wr]:!0,[Or]:FM,[Kr]:pm,[_M]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:pm,[Eo]:"{Region}"}]},JO={[ke]:jr,[Re]:[{[Pt]:"ForcePathStyle"},!1]},x4e={[Pt]:"ForcePathStyle"},Ur={[ke]:jr,[Re]:[{[Pt]:"Accelerate"},!1]},to={[ke]:wn,[Re]:[{[Pt]:"Region"},"aws-global"]},fo={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"us-east-1"}]},bn={[ke]:Sa,[Re]:[to]},po={[ke]:jr,[Re]:[{[Pt]:"UseGlobalEndpoint"},!0]},EH={[dt]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{Region}"}]},[pt]:{}},Yr={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{Region}"}]},ho={[ke]:jr,[Re]:[{[Pt]:"UseGlobalEndpoint"},!1]},IH={[dt]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},kH={[dt]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},RH={[dt]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},e1={[ke]:jr,[Re]:[{[ke]:wr,[Re]:[yK,"isIp"]},!1]},t1={[dt]:uK,[ft]:Yr,[pt]:{}},oE={[dt]:c0,[ft]:Yr,[pt]:{}},MH={[Ke]:oE,[ue]:Ke},n1={[dt]:dK,[ft]:Yr,[pt]:{}},AH={[dt]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},Iv={[vt]:"Invalid region: region was not a valid DNS name.",[ue]:vt},Ti={[Pt]:pK},SK={[Pt]:hK},r1={[ke]:wr,[Re]:[Ti,"service"]},jM={[Pt]:$M},DH={[be]:[Yn],[vt]:"S3 Object Lambda does not support Dual-stack",[ue]:vt},_H={[be]:[gs],[vt]:"S3 Object Lambda does not support S3 Accelerate",[ue]:vt},NH={[be]:[{[ke]:qi,[Re]:[{[Pt]:"DisableAccessPoints"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableAccessPoints"},!0]}],[vt]:"Access points are not supported for this operation",[ue]:vt},o1={[be]:[{[ke]:qi,[Re]:[{[Pt]:"UseArnRegion"}]},{[ke]:jr,[Re]:[{[Pt]:"UseArnRegion"},!1]},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},"{Region}"]}]}],[vt]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[ue]:vt},CK={[ke]:wr,[Re]:[{[Pt]:"bucketPartition"},Or]},wK={[ke]:wr,[Re]:[Ti,"accountId"]},i1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:LM,[Eo]:"{bucketArn#region}"}]},FH={[vt]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[ue]:vt},s1={[vt]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[ue]:vt},a1={[vt]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[ue]:vt},l1={[vt]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[ue]:vt},LH={[vt]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[ue]:vt},$H={[vt]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[ue]:vt},Zp={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:Vf,[Eo]:"{bucketArn#region}"}]},jH={[go]:[{[Wr]:!0,[Or]:FM,[Kr]:pm,[_M]:["*"]},{[Wr]:!0,[Or]:"sigv4",[Kr]:pm,[Eo]:"{bucketArn#region}"}]},BH={[ke]:fK,[Re]:[xn]},VH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},HH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},zH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},c1={[dt]:gK,[ft]:Yr,[pt]:{}},qH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:Yr,[pt]:{}},UH={[Pt]:"UseObjectLambdaEndpoint"},u1={[go]:[{[Wr]:!0,[Or]:"sigv4",[Kr]:LM,[Eo]:"{Region}"}]},GH={[dt]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},WH={[dt]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},KH={[dt]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},d1={[dt]:Xv,[ft]:Yr,[pt]:{}},YH={[dt]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[ft]:Yr,[pt]:{}},f1=[{[Pt]:"Region"}],S4e=[{[Pt]:"Endpoint"}],C4e=[xn],p1=[gs],$d=[Lr,Xo],ZH=[{[ke]:qi,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"}]},{[ke]:jr,[Re]:[{[Pt]:"DisableS3ExpressSessionAuth"},!0]}],w4e=[vK],h1=[xK],hs=[bK],m1=[rr,Yn],Rh=[rr,hn],Mh=[an,Yn],Ah=[an,hn],XH=[{[ke]:Qn,[Re]:[xn,6,14,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,14,16,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],ua=[{[be]:[rr,Yn],[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Rh,[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Mh,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke},{[be]:Ah,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:{}},[ue]:Ke}],QH=[{[ke]:Qn,[Re]:[xn,6,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],JH=[{[ke]:Qn,[Re]:[xn,6,19,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,19,21,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],ez=[{[ke]:Qn,[Re]:[xn,6,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],tz=[{[ke]:Qn,[Re]:[xn,6,26,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,26,28,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],da=[{[be]:[rr,Yn],[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Rh,[Ke]:{[dt]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Mh,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke},{[be]:Ah,[Ke]:{[dt]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[ft]:{[Ja]:"S3Express",[go]:[{[Wr]:!0,[Or]:"sigv4-s3express",[Kr]:"s3express",[Eo]:"{Region}"}]},[pt]:{}},[ue]:Ke}],nz=[xn,0,7,!0],rz=[{[ke]:Qn,[Re]:[xn,7,15,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,15,17,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],oz=[{[ke]:Qn,[Re]:[xn,7,16,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,16,18,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],iz=[{[ke]:Qn,[Re]:[xn,7,20,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,20,22,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],sz=[{[ke]:Qn,[Re]:[xn,7,21,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,21,23,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],az=[{[ke]:Qn,[Re]:[xn,7,27,!0],[tn]:"s3expressAvailabilityZoneId"},{[ke]:Qn,[Re]:[xn,27,29,!0],[tn]:"s3expressAvailabilityZoneDelim"},{[ke]:wn,[Re]:[{[Pt]:"s3expressAvailabilityZoneDelim"},"--"]}],T4e=[kh],lz=[{[ke]:qu,[Re]:[{[Pt]:rE},!1]}],cz=[{[ke]:wn,[Re]:[{[Pt]:cK},"beta"]}],O4e=["*"],uz=[{[ke]:qu,[Re]:[{[Pt]:"Region"},!1]}],Al=[{[ke]:wn,[Re]:[{[Pt]:"Region"},"us-east-1"]}],g1=[{[ke]:wn,[Re]:[SK,mK]}],dz=[{[ke]:wr,[Re]:[Ti,"resourceId[1]"],[tn]:$M},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[jM,u0]}]}],P4e=[Ti,"resourceId[1]"],fz=[Yn],b1=[{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},u0]}]}],pz=[{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[2]"]}]}]}],E4e=[Ti,"resourceId[2]"],y1=[{[ke]:a0,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]}],[tn]:"bucketPartition"}],hz=[{[ke]:wn,[Re]:[CK,{[ke]:wr,[Re]:[{[Pt]:"partitionResult"},Or]}]}],v1=[{[ke]:qu,[Re]:[{[ke]:wr,[Re]:[Ti,"region"]},!0]}],x1=[{[ke]:qu,[Re]:[wK,!1]}],mz=[{[ke]:qu,[Re]:[jM,!1]}],kv=[rr],gz=[{[ke]:qu,[Re]:[{[Pt]:"Region"},!0]}],I4e={parameters:{Bucket:Fd,Region:Fd,UseFIPS:Ld,UseDualStack:Ld,Endpoint:Fd,ForcePathStyle:Ld,Accelerate:Ld,UseGlobalEndpoint:Ld,UseObjectLambdaEndpoint:Yp,Key:Fd,Prefix:Fd,CopySource:Fd,DisableAccessPoints:Yp,DisableMultiRegionAccessPoints:Ld,UseArnRegion:Yp,UseS3ExpressControlEndpoint:Yp,DisableS3ExpressSessionAuth:Yp},[Be]:[{[be]:[{[ke]:qi,[Re]:f1}],[Be]:[{[be]:[gs,rr],error:"Accelerate cannot be used with FIPS",[ue]:vt},{[be]:[Yn,Lr],error:"Cannot set dual-stack in combination with a custom endpoint.",[ue]:vt},{[be]:[Lr,rr],error:"A custom endpoint cannot be combined with FIPS",[ue]:vt},{[be]:[Lr,gs],error:"A custom endpoint cannot be combined with S3 Accelerate",[ue]:vt},{[be]:[rr,bK,yH],error:"Partition does not support FIPS",[ue]:vt},{[be]:[kh,{[ke]:Qn,[Re]:[xn,0,y4e,ca],[tn]:lH},{[ke]:wn,[Re]:[{[Pt]:lH},"--x-s3"]}],[Be]:[vH,xH,{[be]:[CH,wH],[Be]:[{[be]:hs,[Be]:[{[be]:[vK,Qt],[Be]:[{[be]:m1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:ji,[pt]:qt},[ue]:Ke}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:h1,[Be]:[{[be]:hs,[Be]:[{[be]:ZH,[Be]:[{[be]:XH,[Be]:ua,[ue]:Ve},{[be]:QH,[Be]:ua,[ue]:Ve},{[be]:JH,[Be]:ua,[ue]:Ve},{[be]:ez,[Be]:ua,[ue]:Ve},{[be]:tz,[Be]:ua,[ue]:Ve},Pv],[ue]:Ve},{[be]:XH,[Be]:da,[ue]:Ve},{[be]:QH,[Be]:da,[ue]:Ve},{[be]:JH,[Be]:da,[ue]:Ve},{[be]:ez,[Be]:da,[ue]:Ve},{[be]:tz,[Be]:da,[ue]:Ve},Pv],[ue]:Ve}],[ue]:Ve},SH],[ue]:Ve},{[be]:[kh,{[ke]:Qn,[Re]:nz,[tn]:cH},{[ke]:wn,[Re]:[{[Pt]:cH},"--xa-s3"]}],[Be]:[vH,xH,{[be]:h1,[Be]:[{[be]:hs,[Be]:[{[be]:ZH,[Be]:[{[be]:rz,[Be]:ua,[ue]:Ve},{[be]:oz,[Be]:ua,[ue]:Ve},{[be]:iz,[Be]:ua,[ue]:Ve},{[be]:sz,[Be]:ua,[ue]:Ve},{[be]:az,[Be]:ua,[ue]:Ve},Pv],[ue]:Ve},{[be]:rz,[Be]:da,[ue]:Ve},{[be]:oz,[Be]:da,[ue]:Ve},{[be]:iz,[Be]:da,[ue]:Ve},{[be]:sz,[Be]:da,[ue]:Ve},{[be]:az,[Be]:da,[ue]:Ve},Pv],[ue]:Ve}],[ue]:Ve},SH],[ue]:Ve},{[be]:[TH,CH,wH],[Be]:[{[be]:hs,[Be]:[{[be]:$d,endpoint:{[dt]:Xv,[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:m1,endpoint:{[dt]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[ft]:ji,[pt]:qt},[ue]:Ke}],[ue]:Ve}],[ue]:Ve},{[be]:[kh,{[ke]:Qn,[Re]:[xn,49,50,ca],[tn]:lK},{[ke]:Qn,[Re]:[xn,8,12,ca],[tn]:cK},{[ke]:Qn,[Re]:nz,[tn]:uH},{[ke]:Qn,[Re]:[xn,32,49,ca],[tn]:rE},{[ke]:a0,[Re]:f1,[tn]:"regionPartition"},{[ke]:wn,[Re]:[{[Pt]:uH},"--op-s3"]}],[Be]:[{[be]:lz,[Be]:[{[be]:h1,[Be]:[{[be]:[{[ke]:wn,[Re]:[OH,"e"]}],[Be]:[{[be]:cz,[Be]:[PH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.ec2.{url#authority}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[OH,"o"]}],[Be]:[{[be]:cz,[Be]:[PH,{[be]:$d,endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.{url#authority}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{endpoint:{[dt]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[ft]:Ev,[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[ue]:vt}],[ue]:Ve},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[ue]:vt}],[ue]:Ve},{[be]:T4e,[Be]:[{[be]:[Lr,{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[{[ke]:NM,[Re]:S4e}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[ue]:vt},{[be]:[JO,xK],[Be]:[{[be]:hs,[Be]:[{[be]:uz,[Be]:[{[be]:[gs,yH],error:"S3 Accelerate cannot be used in this region",[ue]:vt},{[be]:[Yn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:EH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,rr,Ur,Qt,bn,ho],endpoint:EH,[ue]:Ke},{[be]:[hn,rr,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,rr,Ur,Qt,bn,po],[Be]:[{endpoint:IH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,rr,Ur,Qt,bn,ho],endpoint:IH,[ue]:Ke},{[be]:[Yn,an,gs,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,an,gs,Qt,bn,po],[Be]:[{endpoint:kH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,an,gs,Qt,bn,ho],endpoint:kH,[ue]:Ke},{[be]:[Yn,an,Ur,Qt,to],endpoint:{[dt]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,an,Ur,Qt,bn,po],[Be]:[{endpoint:RH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,an,Ur,Qt,bn,ho],endpoint:RH,[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,QO,to],endpoint:{[dt]:uK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,e1,to],endpoint:{[dt]:c0,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,QO,bn,po],[Be]:[{[be]:Al,endpoint:t1,[ue]:Ke},{endpoint:t1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,e1,bn,po],[Be]:[{[be]:Al,endpoint:oE,[ue]:Ke},MH],[ue]:Ve},{[be]:[hn,an,Ur,Lr,Xo,QO,bn,ho],endpoint:t1,[ue]:Ke},{[be]:[hn,an,Ur,Lr,Xo,e1,bn,ho],endpoint:oE,[ue]:Ke},{[be]:[hn,an,gs,Qt,to],endpoint:{[dt]:dK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,gs,Qt,bn,po],[Be]:[{[be]:Al,endpoint:n1,[ue]:Ke},{endpoint:n1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,gs,Qt,bn,ho],endpoint:n1,[ue]:Ke},{[be]:[hn,an,Ur,Qt,to],endpoint:{[dt]:dH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,an,Ur,Qt,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:dH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:AH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,an,Ur,Qt,bn,ho],endpoint:AH,[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[Lr,Xo,{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[yK,"scheme"]},"http"]},{[ke]:l0,[Re]:[xn,ca]},JO,an,hn,Ur],[Be]:[{[be]:hs,[Be]:[{[be]:uz,[Be]:[MH],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[JO,{[ke]:fK,[Re]:C4e,[tn]:pK}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[0]"],[tn]:hK},{[ke]:Sa,[Re]:[{[ke]:wn,[Re]:[SK,u0]}]}],[Be]:[{[be]:[{[ke]:wn,[Re]:[r1,LM]}],[Be]:[{[be]:g1,[Be]:[{[be]:dz,[Be]:[DH,_H,{[be]:b1,[Be]:[NH,{[be]:pz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:hz,[Be]:[{[be]:v1,[Be]:[{[be]:[{[ke]:wn,[Re]:[wK,u0]}],error:"Invalid ARN: Missing account id",[ue]:vt},{[be]:x1,[Be]:[{[be]:mz,[Be]:[{[be]:$d,endpoint:{[dt]:fH,[ft]:i1,[pt]:qt},[ue]:Ke},{[be]:kv,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:i1,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:i1,[pt]:qt},[ue]:Ke}],[ue]:Ve},FH],[ue]:Ve},s1],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},LH],[ue]:Ve},{error:"Invalid ARN: bucket ARN is missing a region",[ue]:vt}],[ue]:Ve},$H],[ue]:Ve},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[ue]:vt}],[ue]:Ve},{[be]:g1,[Be]:[{[be]:dz,[Be]:[{[be]:b1,[Be]:[{[be]:g1,[Be]:[{[be]:b1,[Be]:[NH,{[be]:pz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:[{[ke]:wn,[Re]:[CK,"{partitionResult#name}"]}],[Be]:[{[be]:v1,[Be]:[{[be]:[{[ke]:wn,[Re]:[r1,Vf]}],[Be]:[{[be]:x1,[Be]:[{[be]:mz,[Be]:[{[be]:p1,error:"Access Points do not support S3 Accelerate",[ue]:vt},{[be]:m1,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Rh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Mh,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Lr,Xo],endpoint:{[dt]:fH,[ft]:Zp,[pt]:qt},[ue]:Ke},{[be]:Ah,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:Zp,[pt]:qt},[ue]:Ke}],[ue]:Ve},FH],[ue]:Ve},s1],[ue]:Ve},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[ue]:vt}],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},LH],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qu,[Re]:[jM,ca]}],[Be]:[{[be]:fz,error:"S3 MRAP does not support dual-stack",[ue]:vt},{[be]:kv,error:"S3 MRAP does not support FIPS",[ue]:vt},{[be]:p1,error:"S3 MRAP does not support S3 Accelerate",[ue]:vt},{[be]:[{[ke]:jr,[Re]:[{[Pt]:"DisableMultiRegionAccessPoints"},ca]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[ue]:vt},{[be]:[{[ke]:a0,[Re]:f1,[tn]:pH}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[ke]:wr,[Re]:[{[Pt]:pH},Or]},{[ke]:wr,[Re]:[Ti,"partition"]}]}],[Be]:[{endpoint:{[dt]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[ft]:{[go]:[{[Wr]:ca,name:FM,[Kr]:Vf,[_M]:O4e}]},[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[ue]:vt}],[ue]:Ve}],[ue]:Ve},{error:"Invalid Access Point Name",[ue]:vt}],[ue]:Ve},$H],[ue]:Ve},{[be]:[{[ke]:wn,[Re]:[r1,pm]}],[Be]:[{[be]:fz,error:"S3 Outposts does not support Dual-stack",[ue]:vt},{[be]:kv,error:"S3 Outposts does not support FIPS",[ue]:vt},{[be]:p1,error:"S3 Outposts does not support S3 Accelerate",[ue]:vt},{[be]:[{[ke]:qi,[Re]:[{[ke]:wr,[Re]:[Ti,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[ue]:vt},{[be]:[{[ke]:wr,[Re]:P4e,[tn]:rE}],[Be]:[{[be]:lz,[Be]:[o1,{[be]:y1,[Be]:[{[be]:hs,[Be]:[{[be]:hz,[Be]:[{[be]:v1,[Be]:[{[be]:x1,[Be]:[{[be]:[{[ke]:wr,[Re]:E4e,[tn]:hH}],[Be]:[{[be]:[{[ke]:wr,[Re]:[Ti,"resourceId[3]"],[tn]:$M}],[Be]:[{[be]:[{[ke]:wn,[Re]:[{[Pt]:hH},mK]}],[Be]:[{[be]:$d,endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[ft]:jH,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[ft]:jH,[pt]:qt},[ue]:Ke}],[ue]:Ve},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: expected an access point name",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: Expected a 4-component resource",[ue]:vt}],[ue]:Ve},s1],[ue]:Ve},a1],[ue]:Ve},l1],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: The Outpost Id was not set",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[ue]:vt}],[ue]:Ve},{error:"Invalid ARN: No ARN type specified",[ue]:vt}],[ue]:Ve},{[be]:[{[ke]:Qn,[Re]:[xn,0,4,v4e],[tn]:mH},{[ke]:wn,[Re]:[{[Pt]:mH},"arn:"]},{[ke]:Sa,[Re]:[{[ke]:qi,[Re]:[BH]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[ue]:vt},{[be]:[{[ke]:jr,[Re]:[x4e,ca]},BH],error:"Path-style addressing cannot be used with ARN buckets",[ue]:vt},{[be]:w4e,[Be]:[{[be]:hs,[Be]:[{[be]:[Ur],[Be]:[{[be]:[Yn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,Qt,rr,bn,po],[Be]:[{endpoint:VH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,Qt,rr,bn,ho],endpoint:VH,[ue]:Ke},{[be]:[hn,Qt,rr,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Qt,rr,bn,po],[Be]:[{endpoint:HH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Qt,rr,bn,ho],endpoint:HH,[ue]:Ke},{[be]:[Yn,Qt,an,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[Yn,Qt,an,bn,po],[Be]:[{endpoint:zH,[ue]:Ke}],[ue]:Ve},{[be]:[Yn,Qt,an,bn,ho],endpoint:zH,[ue]:Ke},{[be]:[hn,Lr,Xo,an,to],endpoint:{[dt]:gK,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Lr,Xo,an,bn,po],[Be]:[{[be]:Al,endpoint:c1,[ue]:Ke},{endpoint:c1,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Lr,Xo,an,bn,ho],endpoint:c1,[ue]:Ke},{[be]:[hn,Qt,an,to],endpoint:{[dt]:gH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[hn,Qt,an,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:gH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:qH,[ue]:Ke}],[ue]:Ve},{[be]:[hn,Qt,an,bn,ho],endpoint:qH,[ue]:Ke}],[ue]:Ve},{error:"Path-style addressing cannot be used with S3 Accelerate",[ue]:vt}],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{[be]:[{[ke]:qi,[Re]:[UH]},{[ke]:jr,[Re]:[UH,ca]}],[Be]:[{[be]:hs,[Be]:[{[be]:gz,[Be]:[DH,_H,{[be]:$d,endpoint:{[dt]:Xv,[ft]:u1,[pt]:qt},[ue]:Ke},{[be]:kv,endpoint:{[dt]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[ft]:u1,[pt]:qt},[ue]:Ke},{endpoint:{[dt]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[ft]:u1,[pt]:qt},[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve},{[be]:[TH],[Be]:[{[be]:hs,[Be]:[{[be]:gz,[Be]:[{[be]:[rr,Yn,Qt,to],endpoint:{[dt]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[rr,Yn,Qt,bn,po],[Be]:[{endpoint:GH,[ue]:Ke}],[ue]:Ve},{[be]:[rr,Yn,Qt,bn,ho],endpoint:GH,[ue]:Ke},{[be]:[rr,hn,Qt,to],endpoint:{[dt]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[rr,hn,Qt,bn,po],[Be]:[{endpoint:WH,[ue]:Ke}],[ue]:Ve},{[be]:[rr,hn,Qt,bn,ho],endpoint:WH,[ue]:Ke},{[be]:[an,Yn,Qt,to],endpoint:{[dt]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,Yn,Qt,bn,po],[Be]:[{endpoint:KH,[ue]:Ke}],[ue]:Ve},{[be]:[an,Yn,Qt,bn,ho],endpoint:KH,[ue]:Ke},{[be]:[an,hn,Lr,Xo,to],endpoint:{[dt]:Xv,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Lr,Xo,bn,po],[Be]:[{[be]:Al,endpoint:d1,[ue]:Ke},{endpoint:d1,[ue]:Ke}],[ue]:Ve},{[be]:[an,hn,Lr,Xo,bn,ho],endpoint:d1,[ue]:Ke},{[be]:[an,hn,Qt,to],endpoint:{[dt]:bH,[ft]:fo,[pt]:qt},[ue]:Ke},{[be]:[an,hn,Qt,bn,po],[Be]:[{[be]:Al,endpoint:{[dt]:bH,[ft]:Yr,[pt]:qt},[ue]:Ke},{endpoint:YH,[ue]:Ke}],[ue]:Ve},{[be]:[an,hn,Qt,bn,ho],endpoint:YH,[ue]:Ke}],[ue]:Ve},Iv],[ue]:Ve}],[ue]:Ve}],[ue]:Ve},{error:"A region must be set when sending requests to S3.",[ue]:vt}]},k4e=I4e,R4e=new A7({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),TK=(e,t={})=>R4e.get(e,()=>H7(k4e,{endpointParams:e,logger:t.logger}));cm.aws=q7;const M4e=e=>async(t,r,o)=>{if(!o)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,r,o),s=ml(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!s)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);const a=await J7(o,{getEndpointParameterInstructions:s},t);return Object.assign(i,a)},A4e=async(e,t,r)=>({operation:ml(t).operation,region:await ks(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),D4e=M4e(A4e);function OK(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function PK(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}const _4e=(e,t,r)=>i=>{const a=e(i).properties?.authSchemes;if(!a)return t(i);const l=[];for(const c of a){const{name:u,properties:d={},...f}=c,p=u.toLowerCase();u!==p&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${u}' to '${p}'`);let h;if(p==="sigv4a"){h="aws.auth#sigv4a";const y=a.find(x=>{const C=x.name.toLowerCase();return C!=="sigv4a"&&C.startsWith("sigv4")});if(aK.sigv4aDependency()==="none"&&y)continue}else if(p.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${p}'`);const b=r[h];if(!b)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);const g=b(i);g.schemeId=h,g.signingProperties={...g.signingProperties||{},...f,...d},l.push(g)}return l},N4e=e=>{const t=[];switch(e.operation){default:t.push(OK(e)),t.push(PK(e))}return t},F4e=_4e(TK,N4e,{"aws.auth#sigv4":OK,"aws.auth#sigv4a":PK}),L4e=e=>{const t=d7(e),r=Zze(t);return Object.assign(r,{authSchemePreference:ks(e.authSchemePreference??[])})},$4e=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),EK={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class xo extends Qc{constructor(t){super(t),Object.setPrototypeOf(this,xo.prototype)}}class BM extends xo{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,BM.prototype)}}class VM extends xo{name="AccessDenied";$fault="client";constructor(t){super({name:"AccessDenied",$fault:"client",...t}),Object.setPrototypeOf(this,VM.prototype)}}class HM extends xo{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,HM.prototype)}}class zM extends xo{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,zM.prototype)}}class qM extends xo{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,qM.prototype)}}class UM extends xo{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,UM.prototype)}}class GM extends xo{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,GM.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class WM extends xo{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,WM.prototype)}}class KM extends xo{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,KM.prototype)}}class YM extends xo{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,YM.prototype)}}class ZM extends xo{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,ZM.prototype)}}class XM extends xo{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,XM.prototype)}}class QM extends xo{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,QM.prototype)}}class JM extends xo{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,JM.prototype)}}class eA extends xo{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,eA.prototype)}}const j4e="ACL",B4e="AccessDenied",bz="AccessKeyId",V4e="AccessTier",IK="Bucket",H4e="BucketAlreadyExists",z4e="BucketAlreadyOwnedByYou",RC="BucketKeyEnabled",q4e="Body",U4e="ChecksumAlgorithm",G4e="CacheControl",kK="ChecksumCRC32",RK="ChecksumCRC32C",MK="ChecksumCRC64NVME",W4e="Cache-Control",K4e="Content-Disposition",Y4e="ContentDisposition",Z4e="Content-Encoding",X4e="ContentEncoding",Q4e="ContentLanguage",J4e="Content-Language",eUe="Content-Length",tUe="ContentLength",nUe="Content-MD5",rUe="ContentMD5",AK="ChecksumSHA1",DK="ChecksumSHA256",oUe="CreateSessionOutput",iUe="CreateSessionResult",sUe="CreateSessionRequest",aUe="CreateSession",lUe="ChecksumType",cUe="Content-Type",uUe="ContentType",yz="Credentials",iE="Expiration",dUe="ExpectedBucketOwner",fUe="EncryptionTypeMismatch",vz="ETag",xz="Expires",pUe="GrantFullControl",hUe="GrantRead",mUe="GrantReadACP",gUe="GrantWriteACP",bUe="IfMatch",yUe="If-Match",vUe="IfNoneMatch",xUe="If-None-Match",SUe="InvalidObjectState",CUe="IdempotencyParameterMismatch",wUe="InvalidRequest",TUe="InvalidWriteOffset",OUe="Key",PUe="Metadata",EUe="NotFound",IUe="NoSuchBucket",kUe="NoSuchKey",RUe="NoSuchUpload",MUe="ObjectAlreadyInActiveTierError",AUe="ObjectLockLegalHoldStatus",DUe="ObjectLockMode",_Ue="ObjectLockRetainUntilDate",NUe="ObjectNotInActiveTierError",FUe="PutObject",LUe="PutObjectOutput",$Ue="PutObjectRequest",jUe="RequestCharged",BUe="RequestPayer",Sz="SecretAccessKey",VUe="StreamingBlob",_K="StorageClass",HUe="SessionCredentialValue",zUe="SessionCredentials",qUe="SessionMode",MC="ServerSideEncryption",NK="SSECustomerAlgorithm",FK="SSECustomerKey",LK="SSECustomerKeyMD5",dg="SSEKMSEncryptionContext",fg="SSEKMSKeyId",Cz="SessionToken",UUe="Size",GUe="TooManyParts",WUe="Tagging",KUe="VersionId",YUe="WriteOffsetBytes",ZUe="WebsiteRedirectLocation",di="client",fi="error",$K="http",XUe="httpChecksum",Ii="httpError",Ot="httpHeader",QUe="httpPrefixHeaders",jK="smithy.ts.sdk.synthetic.com.amazonaws.s3",JUe="streaming",ef="xmlName",e9e="x-amz-acl",BK="x-amz-checksum-crc32",VK="x-amz-checksum-crc32c",HK="x-amz-checksum-crc64nvme",zK="x-amz-checksum-sha1",qK="x-amz-checksum-sha256",t9e="x-amz-create-session-mode",n9e="x-amz-checksum-type",r9e="x-amz-expiration",o9e="x-amz-expected-bucket-owner",i9e="x-amz-grant-full-control",s9e="x-amz-grant-read",a9e="x-amz-grant-read-acp",l9e="x-amz-grant-write-acp",c9e="x-amz-meta-",u9e="x-amz-object-lock-legal-hold",d9e="x-amz-object-lock-mode",f9e="x-amz-object-lock-retain-until-date",p9e="x-amz-object-size",h9e="x-amz-request-charged",m9e="x-amz-request-payer",g9e="x-amz-storage-class",b9e="x-amz-sdk-checksum-algorithm",AC="x-amz-server-side-encryption",DC="x-amz-server-side-encryption-aws-kms-key-id",_C="x-amz-server-side-encryption-bucket-key-enabled",NC="x-amz-server-side-encryption-context",UK="x-amz-server-side-encryption-customer-algorithm",y9e="x-amz-server-side-encryption-customer-key",GK="x-amz-server-side-encryption-customer-key-MD5",v9e="x-amz-tagging",x9e="x-amz-version-id",S9e="x-amz-write-offset-bytes",C9e="x-amz-website-redirect-location",Zn="com.amazonaws.s3",WK=ti.for(jK);var w9e=[-3,jK,"S3ServiceException",0,[],[]];WK.registerError(w9e,xo);const Go=ti.for(Zn);var T9e=[-3,Zn,B4e,{[fi]:di,[Ii]:403},[],[]];Go.registerError(T9e,VM);var O9e=[-3,Zn,H4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(O9e,zM);var P9e=[-3,Zn,z4e,{[fi]:di,[Ii]:409},[],[]];Go.registerError(P9e,qM);var E9e=[-3,Zn,fUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(E9e,YM);var I9e=[-3,Zn,CUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(I9e,JM);var k9e=[-3,Zn,SUe,{[fi]:di,[Ii]:403},[_K,V4e],[0,0]];Go.registerError(k9e,GM);var R9e=[-3,Zn,wUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(R9e,ZM);var M9e=[-3,Zn,TUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError(M9e,XM);var A9e=[-3,Zn,IUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(A9e,UM);var D9e=[-3,Zn,kUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(D9e,WM);var _9e=[-3,Zn,RUe,{[fi]:di,[Ii]:404},[],[]];Go.registerError(_9e,BM);var N9e=[-3,Zn,EUe,{[fi]:di},[],[]];Go.registerError(N9e,KM);var F9e=[-3,Zn,MUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(F9e,eA);var L9e=[-3,Zn,NUe,{[fi]:di,[Ii]:403},[],[]];Go.registerError(L9e,HM);var $9e=[-3,Zn,GUe,{[fi]:di,[Ii]:400},[],[]];Go.registerError($9e,QM);const j9e=[WK,Go];var wz=[0,Zn,HUe,8,0],B9e=[0,Zn,FK,8,0],FC=[0,Zn,dg,8,0],LC=[0,Zn,fg,8,0],V9e=[0,Zn,VUe,{[JUe]:1},42],H9e=[3,Zn,oUe,{[ef]:iUe},[yz,MC,fg,dg,RC],[[()=>G9e,{[ef]:yz}],[0,{[Ot]:AC}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}]],1],z9e=[3,Zn,sUe,0,[IK,qUe,MC,fg,dg,RC],[[0,1],[0,{[Ot]:t9e}],[0,{[Ot]:AC}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}]],1],q9e=[3,Zn,LUe,0,[iE,vz,kK,RK,MK,AK,DK,lUe,MC,KUe,NK,LK,fg,dg,RC,UUe,jUe],[[0,{[Ot]:r9e}],[0,{[Ot]:vz}],[0,{[Ot]:BK}],[0,{[Ot]:VK}],[0,{[Ot]:HK}],[0,{[Ot]:zK}],[0,{[Ot]:qK}],[0,{[Ot]:n9e}],[0,{[Ot]:AC}],[0,{[Ot]:x9e}],[0,{[Ot]:UK}],[0,{[Ot]:GK}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}],[1,{[Ot]:p9e}],[0,{[Ot]:h9e}]]],U9e=[3,Zn,$Ue,0,[IK,OUe,j4e,q4e,G4e,Y4e,X4e,Q4e,tUe,rUe,uUe,U4e,kK,RK,MK,AK,DK,xz,bUe,vUe,pUe,hUe,mUe,gUe,YUe,PUe,MC,_K,ZUe,NK,FK,LK,fg,dg,RC,BUe,WUe,DUe,_Ue,AUe,dUe],[[0,1],[0,1],[0,{[Ot]:e9e}],[()=>V9e,16],[0,{[Ot]:W4e}],[0,{[Ot]:K4e}],[0,{[Ot]:Z4e}],[0,{[Ot]:J4e}],[1,{[Ot]:eUe}],[0,{[Ot]:nUe}],[0,{[Ot]:cUe}],[0,{[Ot]:b9e}],[0,{[Ot]:BK}],[0,{[Ot]:VK}],[0,{[Ot]:HK}],[0,{[Ot]:zK}],[0,{[Ot]:qK}],[4,{[Ot]:xz}],[0,{[Ot]:yUe}],[0,{[Ot]:xUe}],[0,{[Ot]:i9e}],[0,{[Ot]:s9e}],[0,{[Ot]:a9e}],[0,{[Ot]:l9e}],[1,{[Ot]:S9e}],[128,{[QUe]:c9e}],[0,{[Ot]:AC}],[0,{[Ot]:g9e}],[0,{[Ot]:C9e}],[0,{[Ot]:UK}],[()=>B9e,{[Ot]:y9e}],[0,{[Ot]:GK}],[()=>LC,{[Ot]:DC}],[()=>FC,{[Ot]:NC}],[2,{[Ot]:_C}],[0,{[Ot]:m9e}],[0,{[Ot]:v9e}],[0,{[Ot]:d9e}],[5,{[Ot]:f9e}],[0,{[Ot]:u9e}],[0,{[Ot]:o9e}]],2],G9e=[3,Zn,zUe,0,[bz,Sz,Cz,iE],[[0,{[ef]:bz}],[()=>wz,{[ef]:Sz}],[()=>wz,{[ef]:Cz}],[4,{[ef]:iE}]],4],W9e=[9,Zn,aUe,{[$K]:["GET","/?session",200]},()=>z9e,()=>H9e],K9e=[9,Zn,FUe,{[XUe]:"-",[$K]:["PUT","/{Key+}?x-id=PutObject",200]},()=>U9e,()=>q9e];class Y9e extends PC.classBuilder().ep({...EK,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,r,o,i){return[RM(o,t.getEndpointParameterInstructions()),R7(o)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(W9e).build(){}const Z9e="3.996.0",X9e={version:Z9e},Q9e=e=>new TextEncoder().encode(e);function Tz(e){return typeof e=="string"?e.length===0:e.byteLength===0}var KK={name:"SHA-1"},Oz={name:"HMAC",hash:KK},J9e=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const e6e={};function Ql(){return typeof window<"u"?window:typeof self<"u"?self:e6e}var t6e=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(r,o){Ql().crypto.subtle.importKey("raw",Pz(t),Oz,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!Tz(t)){var r=Pz(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Ql().crypto.subtle.sign(Oz,r,t.toHash).then(function(o){return new Uint8Array(o)})}):Tz(this.toHash)?Promise.resolve(J9e):Promise.resolve().then(function(){return Ql().crypto.subtle.digest(KK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function Pz(e){return typeof e=="string"?Q9e(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var n6e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function YK(e){if(r6e(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return o6e(t)}return!1}function r6e(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function o6e(e){return e&&n6e.every(function(t){return typeof e[t]=="function"})}var i6e=(function(){function e(t){if(YK(Ql()))this.hash=new t6e(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,r){this.hash.update(oc(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})(),ZK={name:"SHA-256"},Ez={name:"HMAC",hash:ZK},s6e=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),a6e=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!lm(t)){var r=oc(t),o=new Uint8Array(this.toHash.byteLength+r.byteLength);o.set(this.toHash,0),o.set(r,this.toHash.byteLength),this.toHash=o}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return Ql().crypto.subtle.sign(Ez,r,t.toHash).then(function(o){return new Uint8Array(o)})}):lm(this.toHash)?Promise.resolve(s6e):Promise.resolve().then(function(){return Ql().crypto.subtle.digest(ZK,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,o){Ql().crypto.subtle.importKey("raw",oc(t.secret),Ez,!1,["sign"]).then(r,o)}),this.key.catch(function(){}))},e})(),ys=64,l6e=32,c6e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),u6e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],d6e=Math.pow(2,53)-1,Qv=(function(){function e(){this.state=Int32Array.from(u6e),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,o=t.byteLength;if(this.bytesHashed+=o,this.bytesHashed*8>d6e)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;o>0;)this.buffer[this.bufferLength++]=t[r++],o--,this.bufferLength===ys&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),o=this.bufferLength;if(r.setUint8(this.bufferLength++,128),o%ys>=ys-8){for(var i=this.bufferLength;i<ys;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ys-8;i++)r.setUint8(i,0);r.setUint32(ys-8,Math.floor(t/4294967296),!0),r.setUint32(ys-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(l6e),i=0;i<8;i++)s[i*4]=this.state[i]>>>24&255,s[i*4+1]=this.state[i]>>>16&255,s[i*4+2]=this.state[i]>>>8&255,s[i*4+3]=this.state[i]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,o=t.state,i=o[0],s=o[1],a=o[2],l=o[3],c=o[4],u=o[5],d=o[6],f=o[7],p=0;p<ys;p++){if(p<16)this.temp[p]=(r[p*4]&255)<<24|(r[p*4+1]&255)<<16|(r[p*4+2]&255)<<8|r[p*4+3]&255;else{var h=this.temp[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[p-15];var g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[p]=(b+this.temp[p-7]|0)+(g+this.temp[p-16]|0)}var y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&d)|0)+(f+(c6e[p]+this.temp[p]|0)|0)|0,x=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&s^i&a^s&a)|0;f=d,d=u,u=c,c=l+y|0,l=a,a=s,s=i,i=y+x|0}o[0]+=i,o[1]+=s,o[2]+=a,o[3]+=l,o[4]+=c,o[5]+=u,o[6]+=d,o[7]+=f},e})(),f6e=(function(){function e(t){this.secret=t,this.hash=new Qv,this.reset()}return e.prototype.update=function(t){if(!(lm(t)||this.error))try{this.hash.update(oc(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return TM(this,void 0,void 0,function(){return OM(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Qv,this.secret){this.outer=new Qv;var t=p6e(this.secret),r=new Uint8Array(ys);r.set(t);for(var o=0;o<ys;o++)t[o]^=54,r[o]^=92;this.hash.update(t),this.outer.update(r);for(var o=0;o<t.byteLength;o++)t[o]=0}},e})();function p6e(e){var t=oc(e);if(t.byteLength>ys){var r=new Qv;r.update(t),t=r.digest()}var o=new Uint8Array(ys);return o.set(t),o}var XK=(function(){function e(t){YK(Ql())?this.hash=new a6e(t):this.hash=new f6e(t)}return e.prototype.update=function(t,r){this.hash.update(oc(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const QK=({serviceId:e,clientVersion:t})=>async r=>{const o=typeof window<"u"?window.navigator:void 0,i=o?.userAgent??"",s=o?.userAgentData?.platform??Iz.os(i)??"other",a=void 0,l=o?.userAgentData?.brands??[],c=l[l.length-1],u=c?.brand??Iz.browser(i)??"unknown",d=c?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const p=await r?.userAgentAppId?.();return p&&f.push([`app/${p}`]),f},Iz={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}};class Dh{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let o=7,i=Math.abs(Math.round(t));o>-1&&i>0;o--,i/=256)r[o]=i;return t<0&&kz(r),new Dh(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&kz(t),parseInt(Ci(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function kz(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class h6e{toUtf8;fromUtf8;constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){const r=[];for(const s of Object.keys(t)){const a=this.fromUtf8(s);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const o=new Uint8Array(r.reduce((s,a)=>s+a.byteLength,0));let i=0;for(const s of r)o.set(s,i),i+=s.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,6),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const l=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+l.byteLength));c.setUint8(0,7),c.setUint16(1,l.byteLength,!1);const u=new Uint8Array(c.buffer);return u.set(l,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Dh.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!w6e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(UW(t.value.replace(/\-/g,"")),1),f}}parse(t){const r={};let o=0;for(;o<t.byteLength;){const i=t.getUint8(o++),s=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,i));switch(o+=i,t.getUint8(o++)){case 0:r[s]={type:Mz,value:!0};break;case 1:r[s]={type:Mz,value:!1};break;case 2:r[s]={type:m6e,value:t.getInt8(o++)};break;case 3:r[s]={type:g6e,value:t.getInt16(o,!1)},o+=2;break;case 4:r[s]={type:b6e,value:t.getInt32(o,!1)},o+=4;break;case 5:r[s]={type:y6e,value:new Dh(new Uint8Array(t.buffer,t.byteOffset+o,8))},o+=8;break;case 6:const a=t.getUint16(o,!1);o+=2,r[s]={type:v6e,value:new Uint8Array(t.buffer,t.byteOffset+o,a)},o+=a;break;case 7:const l=t.getUint16(o,!1);o+=2,r[s]={type:x6e,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+o,l))},o+=l;break;case 8:r[s]={type:S6e,value:new Date(new Dh(new Uint8Array(t.buffer,t.byteOffset+o,8)).valueOf())},o+=8;break;case 9:const c=new Uint8Array(t.buffer,t.byteOffset+o,16);o+=16,r[s]={type:C6e,value:`${Ci(c.subarray(0,4))}-${Ci(c.subarray(4,6))}-${Ci(c.subarray(6,8))}-${Ci(c.subarray(8,10))}-${Ci(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}}var Rz;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Rz||(Rz={}));const Mz="boolean",m6e="byte",g6e="short",b6e="integer",y6e="long",v6e="binary",x6e="string",S6e="timestamp",C6e="uuid",w6e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,JK=4,Nl=JK*2,zc=4,T6e=Nl+zc*2;function O6e({byteLength:e,byteOffset:t,buffer:r}){if(e<T6e)throw new Error("Provided message too short to accommodate event stream message overhead");const o=new DataView(r,t,e),i=o.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=o.getUint32(JK,!1),a=o.getUint32(Nl,!1),l=o.getUint32(e-zc,!1),c=new s0().update(new Uint8Array(r,t,Nl));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+Nl,e-(Nl+zc))),l!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${l}`);return{headers:new DataView(r,t+Nl+zc,s),body:new Uint8Array(r,t+Nl+zc+s,i-s-(Nl+zc+zc))}}class P6e{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,r){this.headerMarshaller=new h6e(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){const t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){const t=this.messageBuffer;this.messageBuffer=[];const r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){const o=this.headerMarshaller.format(t),i=o.byteLength+r.byteLength+16,s=new Uint8Array(i),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new s0;return a.setUint32(0,i,!1),a.setUint32(4,o.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(o,12),s.set(r,o.byteLength+12),a.setUint32(i-4,l.update(s.subarray(8,i-4)).digest(),!1),s}decode(t){const{headers:r,body:o}=O6e(t);return{headers:this.headerMarshaller.parse(r),body:o}}formatHeaders(t){return this.headerMarshaller.format(t)}}class E6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.decoder.decode(t)}}class I6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class k6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream){const r=await this.options.deserializer(t);r!==void 0&&(yield r)}}}class R6e{options;constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.serializer(t)}}function M6e(e){let t=0,r=0,o=null,i=null;const s=l=>{if(typeof l!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+l);t=l,r=4,o=new Uint8Array(l),new DataView(o.buffer).setUint32(0,l,!1)},a=async function*(){const l=e[Symbol.asyncIterator]();for(;;){const{value:c,done:u}=await l.next();if(u){if(t)if(t===r)yield o;else throw new Error("Truncated event message received.");else return;return}const d=c.length;let f=0;for(;f<d;){if(!o){const h=d-f;i||(i=new Uint8Array(4));const b=Math.min(4-r,h);if(i.set(c.slice(f,f+b),r),r+=b,f+=b,r<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const p=Math.min(t-r,d-f);o.set(c.slice(f,f+p),r),r+=p,f+=p,t&&t===r&&(yield o,o=null,t=0,r=0)}}};return{[Symbol.asyncIterator]:a}}function A6e(e,t){return async function(r){const{value:o}=r.headers[":message-type"];if(o==="error"){const i=new Error(r.headers[":error-message"].value||"UnknownError");throw i.name=r.headers[":error-code"].value,i}else if(o==="exception"){const i=r.headers[":exception-type"].value,s={[i]:r},a=await e(s);if(a.$unknown){const l=new Error(t(r.body));throw l.name=i,l}throw a[i]}else if(o==="event"){const i={[r.headers[":event-type"].value]:r},s=await e(i);return s.$unknown?void 0:s}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}let D6e=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new P6e(t,r),this.utfEncoder=t}deserialize(t,r){const o=M6e(t);return new k6e({messageStream:new E6e({inputStream:o,decoder:this.eventStreamCodec}),deserializer:A6e(r,this.utfEncoder)})}serialize(t,r){return new I6e({messageStream:new R6e({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const _6e=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)return;yield o}}finally{t.releaseLock()}}}),N6e=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){const{done:o,value:i}=await t.next();if(o)return r.close();r.enqueue(i)}})};class F6e{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:r}){this.universalMarshaller=new D6e({utf8Decoder:r,utf8Encoder:t})}deserialize(t,r){const o=L6e(t)?_6e(t):t;return this.universalMarshaller.deserialize(o,r)}serialize(t,r){const o=this.universalMarshaller.serialize(t,r);return typeof ReadableStream=="function"?N6e(o):o}}const L6e=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,$6e=e=>new F6e(e);async function j6e(e,t,r=1024*1024){const o=e.size;let i=0;for(;i<o;){const s=e.slice(i,Math.min(o,i+r));t(new Uint8Array(await s.arrayBuffer())),i+=s.size}}const B6e=async function(t,r){const o=new t;return await j6e(r,i=>{o.update(i)}),o.digest()},eY=e=>()=>Promise.reject(e),Dl=64,V6e=16,H6e=[1732584193,4023233417,2562383102,271733878];class z6e{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(q6e(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const r=U6e(t);let o=0,{byteLength:i}=r;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,r[o++]),i--,this.bufferLength===Dl&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:r,bufferLength:o,bytesHashed:i}=this,s=i*8;if(r.setUint8(this.bufferLength++,128),o%Dl>=Dl-8){for(let a=this.bufferLength;a<Dl;a++)r.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<Dl-8;a++)r.setUint8(a,0);r.setUint32(Dl-8,s>>>0,!0),r.setUint32(Dl-4,Math.floor(s/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(V6e));for(let r=0;r<4;r++)t.setUint32(r*4,this.state[r],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:r}=this;let o=r[0],i=r[1],s=r[2],a=r[3];o=Do(o,i,s,a,t.getUint32(0,!0),7,3614090360),a=Do(a,o,i,s,t.getUint32(4,!0),12,3905402710),s=Do(s,a,o,i,t.getUint32(8,!0),17,606105819),i=Do(i,s,a,o,t.getUint32(12,!0),22,3250441966),o=Do(o,i,s,a,t.getUint32(16,!0),7,4118548399),a=Do(a,o,i,s,t.getUint32(20,!0),12,1200080426),s=Do(s,a,o,i,t.getUint32(24,!0),17,2821735955),i=Do(i,s,a,o,t.getUint32(28,!0),22,4249261313),o=Do(o,i,s,a,t.getUint32(32,!0),7,1770035416),a=Do(a,o,i,s,t.getUint32(36,!0),12,2336552879),s=Do(s,a,o,i,t.getUint32(40,!0),17,4294925233),i=Do(i,s,a,o,t.getUint32(44,!0),22,2304563134),o=Do(o,i,s,a,t.getUint32(48,!0),7,1804603682),a=Do(a,o,i,s,t.getUint32(52,!0),12,4254626195),s=Do(s,a,o,i,t.getUint32(56,!0),17,2792965006),i=Do(i,s,a,o,t.getUint32(60,!0),22,1236535329),o=_o(o,i,s,a,t.getUint32(4,!0),5,4129170786),a=_o(a,o,i,s,t.getUint32(24,!0),9,3225465664),s=_o(s,a,o,i,t.getUint32(44,!0),14,643717713),i=_o(i,s,a,o,t.getUint32(0,!0),20,3921069994),o=_o(o,i,s,a,t.getUint32(20,!0),5,3593408605),a=_o(a,o,i,s,t.getUint32(40,!0),9,38016083),s=_o(s,a,o,i,t.getUint32(60,!0),14,3634488961),i=_o(i,s,a,o,t.getUint32(16,!0),20,3889429448),o=_o(o,i,s,a,t.getUint32(36,!0),5,568446438),a=_o(a,o,i,s,t.getUint32(56,!0),9,3275163606),s=_o(s,a,o,i,t.getUint32(12,!0),14,4107603335),i=_o(i,s,a,o,t.getUint32(32,!0),20,1163531501),o=_o(o,i,s,a,t.getUint32(52,!0),5,2850285829),a=_o(a,o,i,s,t.getUint32(8,!0),9,4243563512),s=_o(s,a,o,i,t.getUint32(28,!0),14,1735328473),i=_o(i,s,a,o,t.getUint32(48,!0),20,2368359562),o=No(o,i,s,a,t.getUint32(20,!0),4,4294588738),a=No(a,o,i,s,t.getUint32(32,!0),11,2272392833),s=No(s,a,o,i,t.getUint32(44,!0),16,1839030562),i=No(i,s,a,o,t.getUint32(56,!0),23,4259657740),o=No(o,i,s,a,t.getUint32(4,!0),4,2763975236),a=No(a,o,i,s,t.getUint32(16,!0),11,1272893353),s=No(s,a,o,i,t.getUint32(28,!0),16,4139469664),i=No(i,s,a,o,t.getUint32(40,!0),23,3200236656),o=No(o,i,s,a,t.getUint32(52,!0),4,681279174),a=No(a,o,i,s,t.getUint32(0,!0),11,3936430074),s=No(s,a,o,i,t.getUint32(12,!0),16,3572445317),i=No(i,s,a,o,t.getUint32(24,!0),23,76029189),o=No(o,i,s,a,t.getUint32(36,!0),4,3654602809),a=No(a,o,i,s,t.getUint32(48,!0),11,3873151461),s=No(s,a,o,i,t.getUint32(60,!0),16,530742520),i=No(i,s,a,o,t.getUint32(8,!0),23,3299628645),o=Fo(o,i,s,a,t.getUint32(0,!0),6,4096336452),a=Fo(a,o,i,s,t.getUint32(28,!0),10,1126891415),s=Fo(s,a,o,i,t.getUint32(56,!0),15,2878612391),i=Fo(i,s,a,o,t.getUint32(20,!0),21,4237533241),o=Fo(o,i,s,a,t.getUint32(48,!0),6,1700485571),a=Fo(a,o,i,s,t.getUint32(12,!0),10,2399980690),s=Fo(s,a,o,i,t.getUint32(40,!0),15,4293915773),i=Fo(i,s,a,o,t.getUint32(4,!0),21,2240044497),o=Fo(o,i,s,a,t.getUint32(32,!0),6,1873313359),a=Fo(a,o,i,s,t.getUint32(60,!0),10,4264355552),s=Fo(s,a,o,i,t.getUint32(24,!0),15,2734768916),i=Fo(i,s,a,o,t.getUint32(52,!0),21,1309151649),o=Fo(o,i,s,a,t.getUint32(16,!0),6,4149444226),a=Fo(a,o,i,s,t.getUint32(44,!0),10,3174756917),s=Fo(s,a,o,i,t.getUint32(8,!0),15,718787259),i=Fo(i,s,a,o,t.getUint32(36,!0),21,3951481745),r[0]=o+r[0]&4294967295,r[1]=i+r[1]&4294967295,r[2]=s+r[2]&4294967295,r[3]=a+r[3]&4294967295}reset(){this.state=Uint32Array.from(H6e),this.buffer=new DataView(new ArrayBuffer(Dl)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function $C(e,t,r,o,i,s){return t=(t+e&4294967295)+(o+s&4294967295)&4294967295,(t<<i|t>>>32-i)+r&4294967295}function Do(e,t,r,o,i,s,a){return $C(t&r|~t&o,e,t,i,s,a)}function _o(e,t,r,o,i,s,a){return $C(t&o|r&~o,e,t,i,s,a)}function No(e,t,r,o,i,s,a){return $C(t^r^o,e,t,i,s,a)}function Fo(e,t,r,o,i,s,a){return $C(r^(t|~o),e,t,i,s,a)}function q6e(e){return typeof e=="string"?e.length===0:e.byteLength===0}function U6e(e){return typeof e=="string"?cl(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const G6e=["in-region","cross-region","mobile","standard","legacy"],tY=({defaultsMode:e}={})=>Yze(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(W6e()?"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 new Error(`Invalid parameter for "defaultsMode", expect ${G6e.join(", ")}, got ${t}`)}}),W6e=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:o}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(o)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},K6e=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Tu,base64Encoder:e?.base64Encoder??rc,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??TK,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??UHe,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??F4e,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new gM},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new PHe}],logger:e?.logger??new EC,protocol:e?.protocol??Fqe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:j9e,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??GW,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??aK,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??dm,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??cl,utf8Encoder:e?.utf8Encoder??zu}),Y6e=e=>{const t=tY(e),r=()=>t().then(h7),o=K6e(e);return{...o,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??f7,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??QK({serviceId:o.serviceId,clientVersion:X9e.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$6e,maxAttempts:e?.maxAttempts??fm,md5:e?.md5??z6e,region:e?.region??eY("Region is missing"),requestHandler:SC.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||tK),sha1:e?.sha1??i6e,sha256:e?.sha256??XK,streamCollector:e?.streamCollector??bM,streamHasher:e?.streamHasher??B6e,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(G7)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(W7))}},nY=e=>({setRegion(t){e.region=t},region(){return e.region}}),rY=e=>({region:e.region()}),Z6e=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,o=e.credentials;return{setHttpAuthScheme(i){const s=t.findIndex(a=>a.schemeId===i.schemeId);s===-1?t.push(i):t.splice(s,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){o=i},credentials(){return o}}},X6e=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Q6e=(e,t)=>{const r=Object.assign(nY(e),m7(e),LW(e),Z6e(e));return t.forEach(o=>o.configure(r)),Object.assign(e,rY(r),g7(r),$W(r),X6e(r))};class J6e extends p7{config;constructor(...[t]){const r=Y6e(t||{});super(r),this.initConfig=r;const o=$4e(r),i=M7(o),s=c3e(i),a=iK(s),l=Y7(a),c=l,u=eK(c),d=_5e(u),f=L4e(d),p=j3e(f,{session:[()=>this,Y9e]}),h=Q6e(p,t?.extensions||[]);this.config=h,this.middlewareStack.use(KW(this.config)),this.middlewareStack.use(U7(this.config)),this.middlewareStack.use(sK(this.config)),this.middlewareStack.use(Z7(this.config)),this.middlewareStack.use(E7(this.config)),this.middlewareStack.use(I7(this.config)),this.middlewareStack.use(k7(this.config)),this.middlewareStack.use(BW(this.config,{httpAuthSchemeParametersProvider:D4e,identityProviderConfigProvider:async b=>new t7({"aws.auth#sigv4":b.credentials,"aws.auth#sigv4a":b.credentials})})),this.middlewareStack.use(HW(this.config)),this.middlewareStack.use(Z3e(this.config)),this.middlewareStack.use(SHe(this.config)),this.middlewareStack.use(P3e(this.config)),this.middlewareStack.use(D3e(this.config)),this.middlewareStack.use($3e(this.config))}destroy(){super.destroy()}}function eGe(e){return t=>async r=>{const o={...r.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const s of i){const a=o[s.target];if(a){let l;typeof a=="string"?rGe(a,e)?l=e.base64Decoder(a):(l=e.utf8Decoder(a),o[s.target]=e.base64Encoder(l)):(l=ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),o[s.target]=e.base64Encoder(l));const c=new e.md5;c.update(l),o[s.hash]=e.base64Encoder(await c.digest())}}return t({...r,input:o})}}const tGe={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},nGe=e=>({applyToStack:t=>{t.add(eGe(e),tGe)}});function rGe(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}class oGe extends PC.classBuilder().ep({...EK,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,r,o,i){return[RM(o,t.getEndpointParameterInstructions()),l3e(o,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),S3e(),R7(o),nGe(o)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(K9e).build(){}function oY(e){return Promise.all(Object.keys(e).reduce((t,r)=>{const o=e[r];return typeof o=="string"?t.push([r,o]):t.push(o().then(i=>[r,i])),t},[])).then(t=>t.reduce((r,[o,i])=>(r[o]=i,r),{}))}function iGe(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:o}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-DysGc_XM.js")),i=u=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??t?.callerClientConfig?.[u],{Credentials:{AccessKeyId:s=sGe(e.logger),Expiration:a,SecretKey:l=lGe(e.logger),SessionToken:c}=aGe(e.logger)}=await(e.client??new o(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await oY(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:l,sessionToken:c,expiration:a}}}function sGe(e){throw new dp("Response from Amazon Cognito contained no access key ID",{logger:e})}function aGe(e){throw new dp("Response from Amazon Cognito contained no credentials",{logger:e})}function lGe(e){throw new dp("Response from Amazon Cognito contained no secret key",{logger:e})}const S1="IdentityIds";class cGe{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",r=>{const o=r.get(t);return new Promise(i=>{o.onerror=()=>i(null),o.onsuccess=()=>i(o.result?o.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",r=>{const o=r.delete(t);return new Promise((i,s)=>{o.onerror=()=>s(o.error),o.onsuccess=()=>i()})})}setItem(t,r){return this.withObjectStore("readwrite",o=>{const i=o.put({id:t,value:r});return new Promise((s,a)=>{i.onerror=()=>a(i.error),i.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((r,o)=>{t.onsuccess=()=>{r(t.result)},t.onerror=()=>{o(t.error)},t.onblocked=()=>{o(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const i=t.result;i.onerror=()=>{o(new Error("Failed to create object store"))},i.createObjectStore(S1,{keyPath:"id"})}})}withObjectStore(t,r){return this.getDb().then(o=>{const i=o.transaction(S1,t);return i.oncomplete=()=>o.close(),new Promise((s,a)=>{i.onerror=()=>a(i.error),s(r(i.objectStore(S1)))}).catch(s=>{throw o.close(),s})})}}class uGe{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,r){this.store[t]=r}}const dGe=new uGe;function fGe(){return typeof self=="object"&&self.indexedDB?new cGe:typeof window=="object"&&window.localStorage?window.localStorage:dGe}function pGe({accountId:e,cache:t=fGe(),client:r,clientConfig:o,customRoleArn:i,identityPoolId:s,logins:a,userIdentifier:l=!a||Object.keys(a).length===0?"ANONYMOUS":void 0,logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const d=l?`aws:cognito-identity-credentials:${s}:${l}`:void 0;let f=async p=>{const{GetIdCommand:h,CognitoIdentityClient:b}=await Promise.resolve().then(()=>require("./loadCognitoIdentity-DysGc_XM.js")),g=C=>o?.[C]??u?.[C]??p?.callerClientConfig?.[C],y=r??new b(Object.assign({},o??{},{region:g("region"),profile:g("profile"),userAgentAppId:g("userAgentAppId")}));let x=d&&await t.getItem(d);if(!x){const{IdentityId:C=hGe(c)}=await y.send(new h({AccountId:e,IdentityPoolId:s,Logins:a?await oY(a):void 0}));x=C,d&&Promise.resolve(t.setItem(d,x)).catch(()=>{})}return f=iGe({client:y,customRoleArn:i,logins:a,identityId:x}),f(p)};return p=>f(p).catch(async h=>{throw d&&Promise.resolve(t.removeItem(d)).catch(()=>{}),h})}function hGe(e){throw new dp("Response from Amazon Cognito contained no identity ID",{logger:e})}const mGe=e=>pGe({...e});function gGe(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],o=atob(t[1]);let i=o.length;const s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new Blob([s],{type:r})}async function bGe(e,t,r,o,i,s=""){if(!i||!r||!o)return console.warn("Missing AWS Config (Pool ID, Bucket, or Region). Returning data URL as fallback."),e;try{const a=new J6e({region:o,credentials:mGe({clientConfig:{region:o},identityPoolId:i}),requestChecksumCalculation:"WHEN_REQUIRED",forcePathStyle:!0}),l=gGe(e);let c=s.trim();c&&!c.endsWith("/")&&(c+="/");const u=c?`${c}${t}`:`signatures/${t}`,d=new oGe({Bucket:r,Key:u,Body:l,ContentType:l.type});return await a.send(d),`https://${r}/${u}`}catch(a){throw console.error("Error uploading to S3:",a),a}}function yGe({attributes:e={},rules:t={},onChange:r}){const{id:o="",MuiAttributes:i={},label:s="Signature",bucket:a="",region:l="",identityPoolId:c="",path:u="",disabled:d=!1,CanvasProps:f={}}=e,p=Je.useRef(null),[h,b]=Je.useState(!1),[g,y]=Je.useState(e.value||null),x=t?.validation?.some(T=>T.rule==="mandatory")||!1;Je.useEffect(()=>{e.value&&p.current&&p.current.fromDataURL(e.value)},[e.value]);const C=()=>{p.current&&p.current.clear(),y(null),r&&r({id:o,value:""})},O=async()=>{if(!p.current||p.current.isEmpty())return;b(!0);const T=p.current.getTrimmedCanvas().toDataURL("image/png"),P=`${o}-${Date.now()}.png`;try{const I=await bGe(T,P,a,l,c,u);y(I),r&&r({id:o,value:I})}catch(I){console.error("Signature upload failed",I)}finally{b(!1)}};return w.jsxs(At.Box,{sx:{width:"100%",...i.sx},children:[w.jsxs(At.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},children:[s,x&&w.jsx(At.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(At.Box,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",bgcolor:"background.paper"},children:w.jsx(xC,{ref:p,penColor:"black",canvasProps:{className:"sigCanvas",style:{width:"100%",height:150,pointerEvents:d?"none":"auto",...f?.style}},backgroundColor:"transparent"})}),w.jsxs(At.Box,{sx:{display:"flex",gap:2,alignItems:"center",mt:1},children:[w.jsx(At.Button,{variant:"outlined",color:"secondary",onClick:C,size:"small",disabled:d||h,children:"Clear"}),w.jsx(At.Button,{variant:"contained",color:"primary",onClick:O,size:"small",disabled:d||h||g!==null,startIcon:h?w.jsx(At.CircularProgress,{size:16,color:"inherit"}):null,children:g?"Saved":"Save"}),g&&w.jsx(At.Typography,{variant:"caption",color:"success.main",children:"Signature Saved!"})]})]})}const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function vGe(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}let C1;const xGe=new Uint8Array(16);function SGe(){if(!C1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");C1=crypto.getRandomValues.bind(crypto)}return C1(xGe)}const CGe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Az={randomUUID:CGe};function wGe(e,t,r){e=e||{};const o=e.random??e.rng?.()??SGe();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,vGe(o)}function tA(e,t,r){return Az.randomUUID&&!e?Az.randomUUID():wGe(e)}function TGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Group",subFields:s=[]}=e,a=Je.useMemo(()=>tA(),[]);return w.jsxs(At.Paper,{elevation:1,sx:{p:2,mb:2,...o.sx},...o,children:[w.jsx(At.Typography,{variant:"subtitle1",gutterBottom:!0,sx:{fontWeight:600},children:i}),w.jsx(At.Box,{children:w.jsx(pg,{guid:a,data:s,patch:t,onChange:r})})]})}function OGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},label:i="Accordion",subFields:s=[]}=e,a=Je.useMemo(()=>tA(),[]);return w.jsxs(At.Accordion,{...o,children:[w.jsx(At.AccordionSummary,{expandIcon:w.jsx(At.Icon,{children:"expand_more"}),children:w.jsx(At.Typography,{children:i})}),w.jsx(At.AccordionDetails,{children:w.jsx(pg,{guid:a,data:s,patch:t,onChange:r})})]})}function PGe(e){const{children:t,value:r,index:o,...i}=e;return w.jsx("div",{role:"tabpanel",hidden:r!==o,id:`simple-tabpanel-${o}`,"aria-labelledby":`simple-tab-${o}`,...i,children:r===o&&w.jsx(At.Box,{sx:{p:3},children:t})})}function EGe({attributes:e={},patch:t,onChange:r}){const{MuiAttributes:o={},tabs:i=[]}=e,[s,a]=Je.useState(0),l=Je.useMemo(()=>i.map(()=>tA()),[i.length]),c=(u,d)=>{a(d)};return w.jsxs(At.Box,{sx:{width:"100%"},children:[w.jsx(At.Box,{sx:{borderBottom:1,borderColor:"divider"},children:w.jsx(At.Tabs,{value:s,onChange:c,...o,children:i.map((u,d)=>w.jsx(At.Tab,{label:u.label},d))})}),i.map((u,d)=>w.jsx(PGe,{value:s,index:d,children:w.jsx(pg,{guid:l[d],data:u.subFields||[],patch:t,onChange:r})},d))]})}function IGe({attributes:e={},rules:t={},onChange:r}){const{MuiAttributes:o={},id:i="",options:s=[],label:a="Combo Box"}=e,[l,c]=Je.useState(e.value||null),[u,d]=Je.useState(!1),[f,p]=Je.useState("");Je.useEffect(()=>{e.value&&c(e.value)},[]),ka(()=>{c(e.value)},[e.value]);const h=x=>{let C=!0,O="";if(t?.validation){for(const T of t.validation)if(T.rule==="mandatory"&&!x){C=!1,O=T.message||"Required";break}}return{isValid:C,message:O}},b=(x,C)=>{c(C);const O=h(C);d(!O.isValid),p(O.message),r&&r({id:i,value:C})},g=()=>{const x=h(l);d(!x.isValid),p(x.message)},y=t?.validation?.some(x=>x.rule==="mandatory")||!1;return w.jsx(pS,{disablePortal:!0,id:i,options:s,value:l,onChange:b,fullWidth:!0,renderInput:x=>w.jsx(uc,{...x,label:a,required:y,error:u,helperText:f,onBlur:g}),...o})}function kGe(e){return Qe("MuiImageList",e)}Ye("MuiImageList",["root","masonry","quilted","standard","woven"]);const nA=S.createContext({});process.env.NODE_ENV!=="production"&&(nA.displayName="ImageListContext");const RGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r]},kGe,t)},MGe=ie("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),iY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageList"}),{children:i,className:s,cols:a=2,component:l="ul",rowHeight:c="auto",gap:u=4,style:d,variant:f="standard",...p}=o,h=S.useMemo(()=>({rowHeight:c,gap:u,variant:f}),[c,u,f]),b=f==="masonry"?{columnCount:a,columnGap:u,...d}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:u,...d},g={...o,component:l,gap:u,rowHeight:c,variant:f},y=RGe(g);return w.jsx(MGe,{as:l,className:Te(y.root,y[f],s),ref:r,style:b,ownerState:g,...p,children:w.jsx(nA.Provider,{value:h,children:i})})});process.env.NODE_ENV!=="production"&&(iY.propTypes={children:n.node.isRequired,classes:n.object,className:n.string,cols:el,component:n.elementType,gap:n.number,rowHeight:n.oneOfType([n.oneOf(["auto"]),n.number]),style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object]),variant:n.oneOfType([n.oneOf(["masonry","quilted","standard","woven"]),n.string])});function AGe(e){return Qe("MuiImageListItem",e)}const w1=Ye("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),DGe=e=>{const{classes:t,variant:r}=e;return Ie({root:["root",r],img:["img"]},AGe,t)},_Ge=ie("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${w1.img}`]:t.img},t.root,t[r.variant]]}})({display:"block",position:"relative",[`& .${w1.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${w1.img}`]:{height:"auto",flexGrow:1}}}]}),sY=S.forwardRef(function(t,r){const o=Dt({props:t,name:"MuiImageListItem"}),{children:i,className:s,cols:a=1,component:l="li",rows:c=1,style:u,...d}=o,{rowHeight:f="auto",gap:p,variant:h}=S.useContext(nA);let b="auto";h==="woven"?b=void 0:f!=="auto"&&(b=f*c+p*(c-1));const g={...o,cols:a,component:l,gap:p,rowHeight:f,rows:c,variant:h},y=DGe(g);return w.jsx(_Ge,{as:l,className:Te(y.root,y[h],s),ref:r,style:{height:b,gridColumnEnd:h!=="masonry"?`span ${a}`:void 0,gridRowEnd:h!=="masonry"?`span ${c}`:void 0,marginBottom:h==="masonry"?p:void 0,breakInside:h==="masonry"?"avoid":void 0,...u},ownerState:g,...d,children:S.Children.map(i,x=>S.isValidElement(x)?(process.env.NODE_ENV!=="production"&&Sm.isFragment(x)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
465
+ `)),x.type==="img"||nf(x,["Image"])?S.cloneElement(x,{className:Te(y.img,x.props.className)}):x):null)})});process.env.NODE_ENV!=="production"&&(sY.propTypes={children:n.node,classes:n.object,className:n.string,cols:el,component:n.elementType,rows:el,style:n.object,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object])});function NGe({attributes:e={}}){const{MuiAttributes:t={},items:r=[],width:o=500,height:i=450,cols:s=3,rowHeight:a=164}=e;return w.jsx(iY,{sx:{width:o,height:i},cols:s,rowHeight:a,...t,children:r.map(l=>w.jsx(sY,{children:w.jsx("img",{srcSet:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format&dpr=2 2x`,src:`${l.img}?w=${a}&h=${a}&fit=crop&auto=format`,alt:l.title,loading:"lazy"})},l.img))})}function FGe({attributes:e={},rules:t={}}){const{label:r="",value:o="",MuiAttributes:i={},url:s="",target:a="_blank",displayText:l=""}=e,c=t?.validation?.some(f=>f.rule==="mandatory")||!1,u=s||o||"#",d=l||r||u;return w.jsxs(At.Box,{sx:{width:"100%"},...i.container,children:[r&&l&&w.jsxs(At.Typography,{variant:"subtitle2",gutterBottom:!0,sx:{display:"flex"},...i.displayText,children:[r,c&&w.jsx(At.Box,{component:"span",sx:{color:"error.main",ml:.5},children:"*"})]}),w.jsx(At.Link,{href:u,target:a,rel:a==="_blank"?"noopener noreferrer":void 0,...i.link,children:d})]})}const rA={Typography:wie,TextField:sye,Table:Zke,DateTime:wRe,DateTimePicker:TRe,TimePicker:ORe,Select:RRe,CheckBox:MRe,Switch:DRe,Radio:JRe,Stepper:rMe,Bar:OBe,Line:sVe,Pie:IVe,MixChart:kVe,Divider:RVe,Chip:MVe,List:AVe,NumberField:oHe,MultiTextbox:iHe,Signature:yGe,Group:TGe,Accordion:OGe,Tabs:EGe,AutoComplete:IGe,ImgList:NGe,Hyperlink:FGe};function aY(e){const{map:t}=e;if(!t)return w.jsx("div",{});const r=rA[t];return r?w.jsx(r,{...e}):w.jsx("div",{})}const LGe={MUI:{map:lE}},Si={},$Ge=e=>e?Si[e]:Si,jGe=e=>{const t=Object.keys(Si);e?delete Si[e]:t.forEach(r=>delete Si[r])},BGe=e=>e?.filter(t=>t?.rules?.validation?.some(r=>r.rule==="mandatory")),VGe=(e,t)=>BGe(e)?.reduce((o,i)=>(i?.rules?.validation?.forEach(s=>{const a=i?.id||i?.props?.id;if(!a)return;const l=Si[t]?.[a]?.toString();l&&yx[s.rule](l,s.value)||o.push({...s,id:i.id})}),o),[]),HGe={};function pg({data:e=[],patch:t=HGe,guid:r,formRef:o,onSubmit:i,onChange:s,onStepChange:a,MuiGridAttributes:l={spacing:2},activeStep:c=0,onFieldClick:u,onFieldDoubleClick:d,onFieldContextMenu:f}){const[p,h]=Je.useState(t),[b,g]=Je.useState(0),y=LGe.MUI,x=Je.useMemo(()=>Tge(T5(e,p,r,Si)),[p,e,r]);Je.useEffect(()=>{T1(Si[r])&&(Si[r]=t)},[]),ka(()=>{h({...t})},[t]);const C=Je.useCallback(({id:I,value:A,option:_})=>{Si[r]||(Si[r]={}),Si[r][I]=A,g(D=>D+1),typeof s=="function"&&s({id:I,value:A,option:_})},[r,s]),O=Je.useCallback((I,A,_)=>{if(typeof I=="function"){const D=VGe(A,_);I(Si,D,A,_)}},[]),T=(I,A,_)=>{typeof a=="function"&&a(I,A,_)},P=(I,A)=>{const{type:_="",style:D={},className:M="",visible:L=!1,rules:k={},subforms:N=[]}=I,V=I.props||{},H=I.layout||{},$=I?.id||V?.id,j=y.map[_]||{},{options:q={}}=j,U=$?Si[r]?.[$]:void 0,B=N.find(F=>Array.isArray(U)?U.includes(F.conditionValue):F.conditionValue===U);return w.jsxs(At.Grid,{style:{...D,cursor:u?"pointer":"default",position:"relative",transition:"background-color 0.2s, box-shadow 0.2s",borderRadius:4},...H,className:`${M} ${L?"show":"hidden"}`,onClick:F=>{},onDoubleClick:F=>{d&&(F.stopPropagation(),d(I))},onContextMenu:F=>{f&&(F.preventDefault(),F.stopPropagation(),f(F,I))},children:[w.jsx(aY,{map:j.map,option:q.type||"",control:I,attributes:V,rules:k,onChange:C,onStepUpdate:T,currentStep:c,patch:t},`dynamic-comp-${$||A}`),B&&B.data&&w.jsx(At.Box,{sx:{mt:2,pl:2,borderLeft:"2px solid",borderColor:"divider",width:"100%"},children:w.jsx(pg,{guid:`${r}-subform-${$}`,data:B.data,patch:t,onChange:C,MuiGridAttributes:{spacing:1}})})]},$||`layout-comp-${A}`)};return w.jsxs(w.Fragment,{children:[w.jsx(At.Grid,{container:!0,...l,children:x.wrows.map((I,A)=>w.jsx(Je.Fragment,{children:I.map(P)},`row-${A}`))},`layout-grid-${r}`),x.worows.map((I,A)=>{const _=I?.id||I?.props?.id;return w.jsx("div",{style:I.style||{},className:`${I.className||""} ${I.visible?"show":"hidden"}`,children:P(I,A)},_||`layout-comp-${A}`)}),w.jsx("button",{"aria-label":"button",type:"button",ref:o||null,onClick:()=>O(i,e,r),style:{display:"none"}})]})}exports.AwsSdkSigV4Signer=gM;exports.ClearFormData=jGe;exports.Client=p7;exports.Command=PC;exports.Controls=rA;exports.DEFAULT_MAX_ATTEMPTS=fm;exports.DEFAULT_RETRY_MODE=tK;exports.DEFAULT_USE_DUALSTACK_ENDPOINT=G7;exports.DEFAULT_USE_FIPS_ENDPOINT=W7;exports.DefaultIdentityProviderConfig=t7;exports.DynamicComponent=aY;exports.EndpointCache=A7;exports.FetchHttpHandler=SC;exports.FormData=$Ge;exports.FormGenerator=pg;exports.HttpProtocol=JW;exports.HttpRequest=Br;exports.LazyJsonString=Qa;exports.NoOpLogger=EC;exports.NormalizedSchema=or;exports.NumericValue=cg;exports.ProtocolLib=y7;exports.SerdeContextConfig=IC;exports.ServiceException=Qc;exports.Sha256=XK;exports.TypeRegistry=ti;exports.UnionSerde=v7;exports.calculateBodyLength=f7;exports.collectBody=uh;exports.createDefaultUserAgentProvider=QK;exports.customEndpointFunctions=cm;exports.dateToUtcString=o0;exports.deref=Yv;exports.determineTimestampFormat=OC;exports.fromBase64=Tu;exports.fromUtf8=cl;exports.getAwsRegionExtensionConfiguration=nY;exports.getContentLengthPlugin=Z7;exports.getDefaultExtensionConfiguration=m7;exports.getEndpointPlugin=RM;exports.getHostHeaderPlugin=E7;exports.getHttpAuthSchemeEndpointRuleSetPlugin=BW;exports.getHttpHandlerExtensionConfiguration=LW;exports.getHttpSigningPlugin=HW;exports.getLoggerPlugin=I7;exports.getRecursionDetectionPlugin=k7;exports.getRetryPlugin=sK;exports.getSchemaSerdePlugin=KW;exports.getSmithyContext=ml;exports.getUserAgentPlugin=U7;exports.invalidProvider=eY;exports.isIpAddress=IM;exports.isValidHostLabel=ug;exports.loadConfigsForDefaultMode=h7;exports.mui=lE;exports.normalizeProvider=ks;exports.parseEpochTimestamp=Sze;exports.parseRfc3339DateTimeWithOffset=gze;exports.parseRfc7231DateTime=xze;exports.parseUrl=dm;exports.resolveAwsRegionExtensionConfiguration=rY;exports.resolveAwsSdkSigV4Config=d7;exports.resolveDefaultRuntimeConfig=g7;exports.resolveDefaultsModeConfig=tY;exports.resolveEndpoint=H7;exports.resolveEndpointConfig=eK;exports.resolveHostHeaderConfig=u3e;exports.resolveHttpHandlerRuntimeConfig=$W;exports.resolveRegionConfig=Y7;exports.resolveRetryConfig=iK;exports.resolveUserAgentConfig=M7;exports.streamCollector=bM;exports.toBase64=rc;exports.toUtf8=zu;exports.v4=wC;