@agentlang/lstudio 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{a as On,g as Tn}from"./_commonjsHelpers-D6-XlEtG.js";import{a as En,b as Nn,c as In,r as An}from"./winston-C_8W7sMu.js";import{c as it,r as Pe}from"./_commonjs-dynamic-modules-B7n8ZNar.js";import{r as Fr}from"./util-CuKOeRzE.js";function Fn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(n,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ut={exports:{}},Dr;function Rn(){return Dr||(Dr=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,s,u){function g(L,j){if(!s[L]){if(!n[L]){var ee=typeof it=="function"&&it;if(!j&&ee)return ee(L,!0);if(T)return T(L,!0);throw new Error("Cannot find module '"+L+"'")}j=s[L]={exports:{}},n[L][0].call(j.exports,function(k){var Q=n[L][1][k];return g(Q||k)},j,j.exports,r,n,s,u)}return s[L].exports}for(var T=typeof it=="function"&&it,F=0;F<u.length;F++)g(u[F]);return g})({1:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){var M=r("crypto");function _(c,w){w=v(c,w);var o;return(o=w.algorithm!=="passthrough"?M.createHash(w.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(w,o).dispatch(c),o.update||o.end(""),o.digest?o.digest(w.encoding==="buffer"?void 0:w.encoding):(c=o.read(),w.encoding!=="buffer"?c.toString(w.encoding):c)}(s=n.exports=_).sha1=function(c){return _(c)},s.keys=function(c){return _(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(c){return _(c,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(c){return _(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=M.getHashes?M.getHashes().slice():["sha1","md5"],m=(d.push("passthrough"),["buffer","hex","binary","base64"]);function v(c,w){var o={};if(o.algorithm=(w=w||{}).algorithm||"sha1",o.encoding=w.encoding||"hex",o.excludeValues=!!w.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=w.ignoreUnknown===!0,o.respectType=w.respectType!==!1,o.respectFunctionNames=w.respectFunctionNames!==!1,o.respectFunctionProperties=w.respectFunctionProperties!==!1,o.unorderedArrays=w.unorderedArrays===!0,o.unorderedSets=w.unorderedSets!==!1,o.unorderedObjects=w.unorderedObjects!==!1,o.replacer=w.replacer||void 0,o.excludeKeys=w.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var f=0;f<d.length;++f)d[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=d[f]);if(d.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+d.join(", "));if(m.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+m.join(", "));return o}function S(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function b(c,w,o){o=o||[];function f(a){return w.update?w.update(a,"utf8"):w.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=c.replacer?c.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var y,p=Object.prototype.toString.call(a),P=/\[object (.*)\]/i.exec(p);if(P=(P=P?P[1]:"unknown:["+p+"]").toLowerCase(),0<=(p=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+p+"]");if(o.push(a),T!==void 0&&T.isBuffer&&T.isBuffer(a))return f("buffer:"),f(a);if(P==="object"||P==="function"||P==="asyncfunction")return p=Object.keys(a),c.unorderedObjects&&(p=p.sort()),c.respectType===!1||S(a)||p.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(p=p.filter(function(U){return!c.excludeKeys(U)})),f("object:"+p.length+":"),y=this,p.forEach(function(U){y.dispatch(U),f(":"),c.excludeValues||y.dispatch(a[U]),f(",")});if(!this["_"+P]){if(c.ignoreUnknown)return f("["+P+"]");throw new Error('Unknown object type "'+P+'"')}this["_"+P](a)},_array:function(a,U){U=U!==void 0?U:c.unorderedArrays!==!1;var p=this;if(f("array:"+a.length+":"),!U||a.length<=1)return a.forEach(function(C){return p.dispatch(C)});var P=[],U=a.map(function(C){var R=new D,B=o.slice();return b(c,R,B).dispatch(C),P=P.concat(B.slice(o.length)),R.read().toString()});return o=o.concat(P),U.sort(),this._array(U,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),c.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(c.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{a as On,g as Tn}from"./_commonjsHelpers-D6-XlEtG.js";import{a as En,b as Nn,c as In,r as An}from"./winston-CsyFtChu.js";import{c as it,r as Pe}from"./_commonjs-dynamic-modules-B7n8ZNar.js";import{r as Fr}from"./util-BsyirP-a.js";function Fn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(n,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ut={exports:{}},Dr;function Rn(){return Dr||(Dr=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,s,u){function g(L,j){if(!s[L]){if(!n[L]){var ee=typeof it=="function"&&it;if(!j&&ee)return ee(L,!0);if(T)return T(L,!0);throw new Error("Cannot find module '"+L+"'")}j=s[L]={exports:{}},n[L][0].call(j.exports,function(k){var Q=n[L][1][k];return g(Q||k)},j,j.exports,r,n,s,u)}return s[L].exports}for(var T=typeof it=="function"&&it,F=0;F<u.length;F++)g(u[F]);return g})({1:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){var M=r("crypto");function _(c,w){w=v(c,w);var o;return(o=w.algorithm!=="passthrough"?M.createHash(w.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(w,o).dispatch(c),o.update||o.end(""),o.digest?o.digest(w.encoding==="buffer"?void 0:w.encoding):(c=o.read(),w.encoding!=="buffer"?c.toString(w.encoding):c)}(s=n.exports=_).sha1=function(c){return _(c)},s.keys=function(c){return _(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(c){return _(c,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(c){return _(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=M.getHashes?M.getHashes().slice():["sha1","md5"],m=(d.push("passthrough"),["buffer","hex","binary","base64"]);function v(c,w){var o={};if(o.algorithm=(w=w||{}).algorithm||"sha1",o.encoding=w.encoding||"hex",o.excludeValues=!!w.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=w.ignoreUnknown===!0,o.respectType=w.respectType!==!1,o.respectFunctionNames=w.respectFunctionNames!==!1,o.respectFunctionProperties=w.respectFunctionProperties!==!1,o.unorderedArrays=w.unorderedArrays===!0,o.unorderedSets=w.unorderedSets!==!1,o.unorderedObjects=w.unorderedObjects!==!1,o.replacer=w.replacer||void 0,o.excludeKeys=w.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var f=0;f<d.length;++f)d[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=d[f]);if(d.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+d.join(", "));if(m.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+m.join(", "));return o}function S(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function b(c,w,o){o=o||[];function f(a){return w.update?w.update(a,"utf8"):w.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=c.replacer?c.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var y,p=Object.prototype.toString.call(a),P=/\[object (.*)\]/i.exec(p);if(P=(P=P?P[1]:"unknown:["+p+"]").toLowerCase(),0<=(p=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+p+"]");if(o.push(a),T!==void 0&&T.isBuffer&&T.isBuffer(a))return f("buffer:"),f(a);if(P==="object"||P==="function"||P==="asyncfunction")return p=Object.keys(a),c.unorderedObjects&&(p=p.sort()),c.respectType===!1||S(a)||p.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(p=p.filter(function(U){return!c.excludeKeys(U)})),f("object:"+p.length+":"),y=this,p.forEach(function(U){y.dispatch(U),f(":"),c.excludeValues||y.dispatch(a[U]),f(",")});if(!this["_"+P]){if(c.ignoreUnknown)return f("["+P+"]");throw new Error('Unknown object type "'+P+'"')}this["_"+P](a)},_array:function(a,U){U=U!==void 0?U:c.unorderedArrays!==!1;var p=this;if(f("array:"+a.length+":"),!U||a.length<=1)return a.forEach(function(C){return p.dispatch(C)});var P=[],U=a.map(function(C){var R=new D,B=o.slice();return b(c,R,B).dispatch(C),P=P.concat(B.slice(o.length)),R.read().toString()});return o=o.concat(P),U.sort(),this._array(U,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),c.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,c.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(c.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return f("domwindow")},_bigint:function(a){return f("bigint:"+a.toString())},_process:function(){return f("process")},_timer:function(){return f("timer")},_pipe:function(){return f("pipe")},_tcp:function(){return f("tcp")},_udp:function(){return f("udp")},_tty:function(){return f("tty")},_statwatcher:function(){return f("statwatcher")},_securecontext:function(){return f("securecontext")},_connection:function(){return f("connection")},_zlib:function(){return f("zlib")},_context:function(){return f("context")},_nodescript:function(){return f("nodescript")},_httpparser:function(){return f("httpparser")},_dataview:function(){return f("dataview")},_signal:function(){return f("signal")},_fsevent:function(){return f("fsevent")},_tlswrap:function(){return f("tlswrap")}}}function D(){return{buf:"",write:function(c){this.buf+=c},end:function(c){this.buf+=c},read:function(){return this.buf}}}s.writeToStream=function(c,w,o){return o===void 0&&(o=w,w={}),b(w=v(c,w),o).dispatch(c)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(r,n,s){(function(u,g,T,F,L,j,ee,k,Q){(function(M){var _=typeof Uint8Array<"u"?Uint8Array:Array,d=43,m=47,v=48,S=97,b=65,D=45,c=95;function w(o){return o=o.charCodeAt(0),o===d||o===D?62:o===m||o===c?63:o<v?-1:o<v+10?o-v+26+26:o<b+26?o-b:o<S+26?o-S+26:void 0}M.toByteArray=function(o){var f,a;if(0<o.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var y=o.length,y=o.charAt(y-2)==="="?2:o.charAt(y-1)==="="?1:0,p=new _(3*o.length/4-y),P=0<y?o.length-4:o.length,U=0;function C(R){p[U++]=R}for(f=0;f<P;f+=4,0)C((16711680&(a=w(o.charAt(f))<<18|w(o.charAt(f+1))<<12|w(o.charAt(f+2))<<6|w(o.charAt(f+3))))>>16),C((65280&a)>>8),C(255&a);return y==2?C(255&(a=w(o.charAt(f))<<2|w(o.charAt(f+1))>>4)):y==1&&(C((a=w(o.charAt(f))<<10|w(o.charAt(f+1))<<4|w(o.charAt(f+2))>>2)>>8&255),C(255&a)),p},M.fromByteArray=function(o){var f,a,y,p,P=o.length%3,U="";function C(R){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R)}for(f=0,y=o.length-P;f<y;f+=3)a=(o[f]<<16)+(o[f+1]<<8)+o[f+2],U+=C((p=a)>>18&63)+C(p>>12&63)+C(p>>6&63)+C(63&p);switch(P){case 1:U=(U+=C((a=o[o.length-1])>>2))+C(a<<4&63)+"==";break;case 2:U=(U=(U+=C((a=(o[o.length-2]<<8)+o[o.length-1])>>10))+C(a>>4&63))+C(a<<2&63)+"="}return U}})(s===void 0?this.base64js={}:s)}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(r,n,s){(function(u,g,d,F,L,j,ee,k,Q){var M=r("base64-js"),_=r("ieee754");function d(i,l,h){if(!(this instanceof d))return new d(i,l,h);var O,x,I,$,se=typeof i;if(l==="base64"&&se=="string")for(i=($=i).trim?$.trim():$.replace(/^\s+|\s+$/g,"");i.length%4!=0;)i+="=";if(se=="number")O=V(i);else if(se=="string")O=d.byteLength(i,l);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");O=V(i.length)}if(d._useTypedArrays?x=d._augment(new Uint8Array(O)):((x=this).length=O,x._isBuffer=!0),d._useTypedArrays&&typeof i.byteLength=="number")x._set(i);else if(K($=i)||d.isBuffer($)||$&&typeof $=="object"&&typeof $.length=="number")for(I=0;I<O;I++)d.isBuffer(i)?x[I]=i.readUInt8(I):x[I]=i[I];else if(se=="string")x.write(i,0,l);else if(se=="number"&&!d._useTypedArrays&&!h)for(I=0;I<O;I++)x[I]=0;return x}function m(i,l,h,O){return d._charsWritten=ye((function(x){for(var I=[],$=0;$<x.length;$++)I.push(255&x.charCodeAt($));return I})(l),i,h,O)}function v(i,l,h,O){return d._charsWritten=ye((function(x){for(var I,$,se=[],ue=0;ue<x.length;ue++)$=x.charCodeAt(ue),I=$>>8,$=$%256,se.push($),se.push(I);return se})(l),i,h,O)}function S(i,l,h){var O="";h=Math.min(i.length,h);for(var x=l;x<h;x++)O+=String.fromCharCode(i[x]);return O}function b(i,l,h,I){I||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+1<i.length,"Trying to read beyond buffer length"));var x,I=i.length;if(!(I<=l))return h?(x=i[l],l+1<I&&(x|=i[l+1]<<8)):(x=i[l]<<8,l+1<I&&(x|=i[l+1])),x}function D(i,l,h,I){I||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+3<i.length,"Trying to read beyond buffer length"));var x,I=i.length;if(!(I<=l))return h?(l+2<I&&(x=i[l+2]<<16),l+1<I&&(x|=i[l+1]<<8),x|=i[l],l+3<I&&(x+=i[l+3]<<24>>>0)):(l+1<I&&(x=i[l+1]<<16),l+2<I&&(x|=i[l+2]<<8),l+3<I&&(x|=i[l+3]),x+=i[l]<<24>>>0),x}function c(i,l,h,O){if(O||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+1<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return O=b(i,l,h,!0),32768&O?-1*(65535-O+1):O}function w(i,l,h,O){if(O||(E(typeof h=="boolean","missing or invalid endian"),E(l!=null,"missing offset"),E(l+3<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return O=D(i,l,h,!0),2147483648&O?-1*(4294967295-O+1):O}function o(i,l,h,O){return O||(E(typeof h=="boolean","missing or invalid endian"),E(l+3<i.length,"Trying to read beyond buffer length")),_.read(i,l,h,23,4)}function f(i,l,h,O){return O||(E(typeof h=="boolean","missing or invalid endian"),E(l+7<i.length,"Trying to read beyond buffer length")),_.read(i,l,h,52,8)}function a(i,l,h,O,x){if(x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+1<i.length,"trying to write beyond buffer length"),Lt(l,65535)),x=i.length,!(x<=h))for(var I=0,$=Math.min(x-h,2);I<$;I++)i[h+I]=(l&255<<8*(O?I:1-I))>>>8*(O?I:1-I)}function y(i,l,h,O,x){if(x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"trying to write beyond buffer length"),Lt(l,4294967295)),x=i.length,!(x<=h))for(var I=0,$=Math.min(x-h,4);I<$;I++)i[h+I]=l>>>8*(O?I:3-I)&255}function p(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+1<i.length,"Trying to write beyond buffer length"),Wt(l,32767,-32768)),i.length<=h||a(i,0<=l?l:65535+l+1,h,O,x)}function P(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"Trying to write beyond buffer length"),Wt(l,2147483647,-2147483648)),i.length<=h||y(i,0<=l?l:4294967295+l+1,h,O,x)}function U(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+3<i.length,"Trying to write beyond buffer length"),Sr(l,34028234663852886e22,-34028234663852886e22)),i.length<=h||_.write(i,l,h,O,23,4)}function C(i,l,h,O,x){x||(E(l!=null,"missing value"),E(typeof O=="boolean","missing or invalid endian"),E(h!=null,"missing offset"),E(h+7<i.length,"Trying to write beyond buffer length"),Sr(l,17976931348623157e292,-17976931348623157e292)),i.length<=h||_.write(i,l,h,O,52,8)}s.Buffer=d,s.SlowBuffer=d,s.INSPECT_MAX_BYTES=50,d.poolSize=8192,d._useTypedArrays=(function(){try{var i=new ArrayBuffer(0),l=new Uint8Array(i);return l.foo=function(){return 42},l.foo()===42&&typeof l.subarray=="function"}catch{return!1}})(),d.isEncoding=function(i){switch(String(i).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(i){return!(i==null||!i._isBuffer)},d.byteLength=function(i,l){var h;switch(i+="",l||"utf8"){case"hex":h=i.length/2;break;case"utf8":case"utf-8":h=de(i).length;break;case"ascii":case"binary":case"raw":h=i.length;break;case"base64":h=Te(i).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=2*i.length;break;default:throw new Error("Unknown encoding")}return h},d.concat=function(i,l){if(E(K(i),`Usage: Buffer.concat(list, [totalLength])
@@ -1,4 +1,4 @@
1
- import{f as Er,l as Nr}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{y as Or,t as Lr,N as Ar,L as Cn,v as Fr}from"./winston-1qzyIKCb-D80lrIim.js";import{c as We}from"./__vite-browser-external-DLjrMatA.js";import{r as it}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{E as Rt}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{Y as Ir}from"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./util-CuKOeRzE.js";import"./index-CjpHJARw.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";function Cr(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var kn={exports:{}},Yn;function Ur(){return Yn||(Yn=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,s,u){function y(C,P){if(!s[C]){if(!r[C]){var ee=typeof it=="function"&&it;if(!P&&ee)return ee(C,!0);if(E)return E(C,!0);throw new Error("Cannot find module '"+C+"'")}P=s[C]={exports:{}},r[C][0].call(P.exports,function(M){var Q=r[C][1][M];return y(Q||M)},P,P.exports,n,r,s,u)}return s[C].exports}for(var E=typeof it=="function"&&it,F=0;F<u.length;F++)y(u[F]);return y})({1:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){var k=n("crypto");function g(d,_){_=v(d,_);var o;return(o=_.algorithm!=="passthrough"?k.createHash(_.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(_,o).dispatch(d),o.update||o.end(""),o.digest?o.digest(_.encoding==="buffer"?void 0:_.encoding):(d=o.read(),_.encoding!=="buffer"?d.toString(_.encoding):d)}(s=r.exports=g).sha1=function(d){return g(d)},s.keys=function(d){return g(d,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(d){return g(d,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(d){return g(d,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var c=k.getHashes?k.getHashes().slice():["sha1","md5"],p=(c.push("passthrough"),["buffer","hex","binary","base64"]);function v(d,_){var o={};if(o.algorithm=(_=_||{}).algorithm||"sha1",o.encoding=_.encoding||"hex",o.excludeValues=!!_.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=_.ignoreUnknown===!0,o.respectType=_.respectType!==!1,o.respectFunctionNames=_.respectFunctionNames!==!1,o.respectFunctionProperties=_.respectFunctionProperties!==!1,o.unorderedArrays=_.unorderedArrays===!0,o.unorderedSets=_.unorderedSets!==!1,o.unorderedObjects=_.unorderedObjects!==!1,o.replacer=_.replacer||void 0,o.excludeKeys=_.excludeKeys||void 0,d===void 0)throw new Error("Object argument required.");for(var f=0;f<c.length;++f)c[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=c[f]);if(c.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+c.join(", "));if(p.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+p.join(", "));return o}function S(d){if(typeof d=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(d))!=null}function b(d,_,o){o=o||[];function f(a){return _.update?_.update(a,"utf8"):_.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=d.replacer?d.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var m,w=Object.prototype.toString.call(a),W=/\[object (.*)\]/i.exec(w);if(W=(W=W?W[1]:"unknown:["+w+"]").toLowerCase(),0<=(w=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+w+"]");if(o.push(a),E!==void 0&&E.isBuffer&&E.isBuffer(a))return f("buffer:"),f(a);if(W==="object"||W==="function"||W==="asyncfunction")return w=Object.keys(a),d.unorderedObjects&&(w=w.sort()),d.respectType===!1||S(a)||w.splice(0,0,"prototype","__proto__","constructor"),d.excludeKeys&&(w=w.filter(function(R){return!d.excludeKeys(R)})),f("object:"+w.length+":"),m=this,w.forEach(function(R){m.dispatch(R),f(":"),d.excludeValues||m.dispatch(a[R]),f(",")});if(!this["_"+W]){if(d.ignoreUnknown)return f("["+W+"]");throw new Error('Unknown object type "'+W+'"')}this["_"+W](a)},_array:function(a,R){R=R!==void 0?R:d.unorderedArrays!==!1;var w=this;if(f("array:"+a.length+":"),!R||a.length<=1)return a.forEach(function(j){return w.dispatch(j)});var W=[],R=a.map(function(j){var I=new D,B=o.slice();return b(d,I,B).dispatch(j),W=W.concat(B.slice(o.length)),I.read().toString()});return o=o.concat(W),R.sort(),this._array(R,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),d.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),d.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(d.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{f as Er,l as Nr}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{y as Or,t as Lr,N as Ar,L as Cn,v as Fr}from"./winston-1qzyIKCb-JrB3xUt_.js";import{c as We}from"./__vite-browser-external-DLjrMatA.js";import{r as it}from"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import{E as Rt}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{Y as Ir}from"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./util-BsyirP-a.js";import"./index-CQX5ImE-.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";function Cr(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var kn={exports:{}},Yn;function Ur(){return Yn||(Yn=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,s,u){function y(C,P){if(!s[C]){if(!r[C]){var ee=typeof it=="function"&&it;if(!P&&ee)return ee(C,!0);if(E)return E(C,!0);throw new Error("Cannot find module '"+C+"'")}P=s[C]={exports:{}},r[C][0].call(P.exports,function(M){var Q=r[C][1][M];return y(Q||M)},P,P.exports,n,r,s,u)}return s[C].exports}for(var E=typeof it=="function"&&it,F=0;F<u.length;F++)y(u[F]);return y})({1:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){var k=n("crypto");function g(d,_){_=v(d,_);var o;return(o=_.algorithm!=="passthrough"?k.createHash(_.algorithm):new D).write===void 0&&(o.write=o.update,o.end=o.update),b(_,o).dispatch(d),o.update||o.end(""),o.digest?o.digest(_.encoding==="buffer"?void 0:_.encoding):(d=o.read(),_.encoding!=="buffer"?d.toString(_.encoding):d)}(s=r.exports=g).sha1=function(d){return g(d)},s.keys=function(d){return g(d,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(d){return g(d,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(d){return g(d,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var c=k.getHashes?k.getHashes().slice():["sha1","md5"],p=(c.push("passthrough"),["buffer","hex","binary","base64"]);function v(d,_){var o={};if(o.algorithm=(_=_||{}).algorithm||"sha1",o.encoding=_.encoding||"hex",o.excludeValues=!!_.excludeValues,o.algorithm=o.algorithm.toLowerCase(),o.encoding=o.encoding.toLowerCase(),o.ignoreUnknown=_.ignoreUnknown===!0,o.respectType=_.respectType!==!1,o.respectFunctionNames=_.respectFunctionNames!==!1,o.respectFunctionProperties=_.respectFunctionProperties!==!1,o.unorderedArrays=_.unorderedArrays===!0,o.unorderedSets=_.unorderedSets!==!1,o.unorderedObjects=_.unorderedObjects!==!1,o.replacer=_.replacer||void 0,o.excludeKeys=_.excludeKeys||void 0,d===void 0)throw new Error("Object argument required.");for(var f=0;f<c.length;++f)c[f].toLowerCase()===o.algorithm.toLowerCase()&&(o.algorithm=c[f]);if(c.indexOf(o.algorithm)===-1)throw new Error('Algorithm "'+o.algorithm+'" not supported. supported values: '+c.join(", "));if(p.indexOf(o.encoding)===-1&&o.algorithm!=="passthrough")throw new Error('Encoding "'+o.encoding+'" not supported. supported values: '+p.join(", "));return o}function S(d){if(typeof d=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(d))!=null}function b(d,_,o){o=o||[];function f(a){return _.update?_.update(a,"utf8"):_.write(a,"utf8")}return{dispatch:function(a){return this["_"+((a=d.replacer?d.replacer(a):a)===null?"null":typeof a)](a)},_object:function(a){var m,w=Object.prototype.toString.call(a),W=/\[object (.*)\]/i.exec(w);if(W=(W=W?W[1]:"unknown:["+w+"]").toLowerCase(),0<=(w=o.indexOf(a)))return this.dispatch("[CIRCULAR:"+w+"]");if(o.push(a),E!==void 0&&E.isBuffer&&E.isBuffer(a))return f("buffer:"),f(a);if(W==="object"||W==="function"||W==="asyncfunction")return w=Object.keys(a),d.unorderedObjects&&(w=w.sort()),d.respectType===!1||S(a)||w.splice(0,0,"prototype","__proto__","constructor"),d.excludeKeys&&(w=w.filter(function(R){return!d.excludeKeys(R)})),f("object:"+w.length+":"),m=this,w.forEach(function(R){m.dispatch(R),f(":"),d.excludeValues||m.dispatch(a[R]),f(",")});if(!this["_"+W]){if(d.ignoreUnknown)return f("["+W+"]");throw new Error('Unknown object type "'+W+'"')}this["_"+W](a)},_array:function(a,R){R=R!==void 0?R:d.unorderedArrays!==!1;var w=this;if(f("array:"+a.length+":"),!R||a.length<=1)return a.forEach(function(j){return w.dispatch(j)});var W=[],R=a.map(function(j){var I=new D,B=o.slice();return b(d,I,B).dispatch(j),W=W.concat(B.slice(o.length)),I.read().toString()});return o=o.concat(W),R.sort(),this._array(R,!1)},_date:function(a){return f("date:"+a.toJSON())},_symbol:function(a){return f("symbol:"+a.toString())},_error:function(a){return f("error:"+a.toString())},_boolean:function(a){return f("bool:"+a.toString())},_string:function(a){f("string:"+a.length+":"),f(a.toString())},_function:function(a){f("fn:"),S(a)?this.dispatch("[native]"):this.dispatch(a.toString()),d.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(a.name)),d.respectFunctionProperties&&this._object(a)},_number:function(a){return f("number:"+a.toString())},_xml:function(a){return f("xml:"+a.toString())},_null:function(){return f("Null")},_undefined:function(){return f("Undefined")},_regexp:function(a){return f("regex:"+a.toString())},_uint8array:function(a){return f("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return f("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return f("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return f("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return f("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return f("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return f("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return f("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return f("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return f("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return f("url:"+a.toString())},_map:function(a){return f("map:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_set:function(a){return f("set:"),a=Array.from(a),this._array(a,d.unorderedSets!==!1)},_file:function(a){return f("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(d.ignoreUnknown)return f("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return f("domwindow")},_bigint:function(a){return f("bigint:"+a.toString())},_process:function(){return f("process")},_timer:function(){return f("timer")},_pipe:function(){return f("pipe")},_tcp:function(){return f("tcp")},_udp:function(){return f("udp")},_tty:function(){return f("tty")},_statwatcher:function(){return f("statwatcher")},_securecontext:function(){return f("securecontext")},_connection:function(){return f("connection")},_zlib:function(){return f("zlib")},_context:function(){return f("context")},_nodescript:function(){return f("nodescript")},_httpparser:function(){return f("httpparser")},_dataview:function(){return f("dataview")},_signal:function(){return f("signal")},_fsevent:function(){return f("fsevent")},_tlswrap:function(){return f("tlswrap")}}}function D(){return{buf:"",write:function(d){this.buf+=d},end:function(d){this.buf+=d},read:function(){return this.buf}}}s.writeToStream=function(d,_,o){return o===void 0&&(o=_,_={}),b(_=v(d,_),o).dispatch(d)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,r,s){(function(u,y,E,F,C,P,ee,M,Q){(function(k){var g=typeof Uint8Array<"u"?Uint8Array:Array,c=43,p=47,v=48,S=97,b=65,D=45,d=95;function _(o){return o=o.charCodeAt(0),o===c||o===D?62:o===p||o===d?63:o<v?-1:o<v+10?o-v+26+26:o<b+26?o-b:o<S+26?o-S+26:void 0}k.toByteArray=function(o){var f,a;if(0<o.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var m=o.length,m=o.charAt(m-2)==="="?2:o.charAt(m-1)==="="?1:0,w=new g(3*o.length/4-m),W=0<m?o.length-4:o.length,R=0;function j(I){w[R++]=I}for(f=0;f<W;f+=4,0)j((16711680&(a=_(o.charAt(f))<<18|_(o.charAt(f+1))<<12|_(o.charAt(f+2))<<6|_(o.charAt(f+3))))>>16),j((65280&a)>>8),j(255&a);return m==2?j(255&(a=_(o.charAt(f))<<2|_(o.charAt(f+1))>>4)):m==1&&(j((a=_(o.charAt(f))<<10|_(o.charAt(f+1))<<4|_(o.charAt(f+2))>>2)>>8&255),j(255&a)),w},k.fromByteArray=function(o){var f,a,m,w,W=o.length%3,R="";function j(I){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(I)}for(f=0,m=o.length-W;f<m;f+=3)a=(o[f]<<16)+(o[f+1]<<8)+o[f+2],R+=j((w=a)>>18&63)+j(w>>12&63)+j(w>>6&63)+j(63&w);switch(W){case 1:R=(R+=j((a=o[o.length-1])>>2))+j(a<<4&63)+"==";break;case 2:R=(R=(R+=j((a=(o[o.length-2]<<8)+o[o.length-1])>>10))+j(a>>4&63))+j(a<<2&63)+"="}return R}})(s===void 0?this.base64js={}:s)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,s){(function(u,y,c,F,C,P,ee,M,Q){var k=n("base64-js"),g=n("ieee754");function c(i,l,h){if(!(this instanceof c))return new c(i,l,h);var T,Y,L,$,se=typeof i;if(l==="base64"&&se=="string")for(i=($=i).trim?$.trim():$.replace(/^\s+|\s+$/g,"");i.length%4!=0;)i+="=";if(se=="number")T=z(i);else if(se=="string")T=c.byteLength(i,l);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");T=z(i.length)}if(c._useTypedArrays?Y=c._augment(new Uint8Array(T)):((Y=this).length=T,Y._isBuffer=!0),c._useTypedArrays&&typeof i.byteLength=="number")Y._set(i);else if(X($=i)||c.isBuffer($)||$&&typeof $=="object"&&typeof $.length=="number")for(L=0;L<T;L++)c.isBuffer(i)?Y[L]=i.readUInt8(L):Y[L]=i[L];else if(se=="string")Y.write(i,0,l);else if(se=="number"&&!c._useTypedArrays&&!h)for(L=0;L<T;L++)Y[L]=0;return Y}function p(i,l,h,T){return c._charsWritten=ge((function(Y){for(var L=[],$=0;$<Y.length;$++)L.push(255&Y.charCodeAt($));return L})(l),i,h,T)}function v(i,l,h,T){return c._charsWritten=ge((function(Y){for(var L,$,se=[],ue=0;ue<Y.length;ue++)$=Y.charCodeAt(ue),L=$>>8,$=$%256,se.push($),se.push(L);return se})(l),i,h,T)}function S(i,l,h){var T="";h=Math.min(i.length,h);for(var Y=l;Y<h;Y++)T+=String.fromCharCode(i[Y]);return T}function b(i,l,h,L){L||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+1<i.length,"Trying to read beyond buffer length"));var Y,L=i.length;if(!(L<=l))return h?(Y=i[l],l+1<L&&(Y|=i[l+1]<<8)):(Y=i[l]<<8,l+1<L&&(Y|=i[l+1])),Y}function D(i,l,h,L){L||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+3<i.length,"Trying to read beyond buffer length"));var Y,L=i.length;if(!(L<=l))return h?(l+2<L&&(Y=i[l+2]<<16),l+1<L&&(Y|=i[l+1]<<8),Y|=i[l],l+3<L&&(Y+=i[l+3]<<24>>>0)):(l+1<L&&(Y=i[l+1]<<16),l+2<L&&(Y|=i[l+2]<<8),l+3<L&&(Y|=i[l+3]),Y+=i[l]<<24>>>0),Y}function d(i,l,h,T){if(T||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+1<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return T=b(i,l,h,!0),32768&T?-1*(65535-T+1):T}function _(i,l,h,T){if(T||(N(typeof h=="boolean","missing or invalid endian"),N(l!=null,"missing offset"),N(l+3<i.length,"Trying to read beyond buffer length")),!(i.length<=l))return T=D(i,l,h,!0),2147483648&T?-1*(4294967295-T+1):T}function o(i,l,h,T){return T||(N(typeof h=="boolean","missing or invalid endian"),N(l+3<i.length,"Trying to read beyond buffer length")),g.read(i,l,h,23,4)}function f(i,l,h,T){return T||(N(typeof h=="boolean","missing or invalid endian"),N(l+7<i.length,"Trying to read beyond buffer length")),g.read(i,l,h,52,8)}function a(i,l,h,T,Y){if(Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+1<i.length,"trying to write beyond buffer length"),Ct(l,65535)),Y=i.length,!(Y<=h))for(var L=0,$=Math.min(Y-h,2);L<$;L++)i[h+L]=(l&255<<8*(T?L:1-L))>>>8*(T?L:1-L)}function m(i,l,h,T,Y){if(Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"trying to write beyond buffer length"),Ct(l,4294967295)),Y=i.length,!(Y<=h))for(var L=0,$=Math.min(Y-h,4);L<$;L++)i[h+L]=l>>>8*(T?L:3-L)&255}function w(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+1<i.length,"Trying to write beyond buffer length"),Ut(l,32767,-32768)),i.length<=h||a(i,0<=l?l:65535+l+1,h,T,Y)}function W(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"Trying to write beyond buffer length"),Ut(l,2147483647,-2147483648)),i.length<=h||m(i,0<=l?l:4294967295+l+1,h,T,Y)}function R(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+3<i.length,"Trying to write beyond buffer length"),Mn(l,34028234663852886e22,-34028234663852886e22)),i.length<=h||g.write(i,l,h,T,23,4)}function j(i,l,h,T,Y){Y||(N(l!=null,"missing value"),N(typeof T=="boolean","missing or invalid endian"),N(h!=null,"missing offset"),N(h+7<i.length,"Trying to write beyond buffer length"),Mn(l,17976931348623157e292,-17976931348623157e292)),i.length<=h||g.write(i,l,h,T,52,8)}s.Buffer=c,s.SlowBuffer=c,s.INSPECT_MAX_BYTES=50,c.poolSize=8192,c._useTypedArrays=(function(){try{var i=new ArrayBuffer(0),l=new Uint8Array(i);return l.foo=function(){return 42},l.foo()===42&&typeof l.subarray=="function"}catch{return!1}})(),c.isEncoding=function(i){switch(String(i).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.isBuffer=function(i){return!(i==null||!i._isBuffer)},c.byteLength=function(i,l){var h;switch(i+="",l||"utf8"){case"hex":h=i.length/2;break;case"utf8":case"utf-8":h=ce(i).length;break;case"ascii":case"binary":case"raw":h=i.length;break;case"base64":h=Ee(i).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=2*i.length;break;default:throw new Error("Unknown encoding")}return h},c.concat=function(i,l){if(N(X(i),`Usage: Buffer.concat(list, [totalLength])
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-CzFKSkte.js","assets/normalizeProvider-BrOPyH3l.js","assets/resolveDefaultsModeConfig-DNaeNIKy.js","assets/preload-helper-BlTxHScW.js","assets/index-CjpHJARw.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-B7n8ZNar.js","assets/index-DeCbRrWH.css","assets/loadSts-G4YtvdN8.js","assets/index-Q3k6YkBW.js"])))=>i.map(i=>d[i]);
2
- import{_ as I}from"./preload-helper-BlTxHScW.js";import{a as O,b as N,t as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-BrOPyH3l.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-CzFKSkte.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),n=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const r=o.get(t);return new Promise(n=>{r.onerror=()=>n(null),r.onsuccess=()=>n(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const r=o.delete(t);return new Promise((n,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>n()})})}setItem(t,o){return this.withObjectStore("readwrite",r=>{const n=r.put({id:t,value:o});return new Promise((s,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{r(t.error)},t.onblocked=()=>{r(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const n=t.result;n.onerror=()=>{r(new Error("Failed to create object store"))},n.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(r=>{const n=r.transaction(b,t);return n.oncomplete=()=>r.close(),new Promise((s,i)=>{n.onerror=()=>i(n.error),s(o(n.objectStore(b)))}).catch(s=>{throw r.close(),s})})}}class W{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,o){this.store[t]=o}}const U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:r,customRoleArn:n,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:y}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-CzFKSkte.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),h=g=>r?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new y(Object.assign({},r??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:n,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const o=e.hostname.split("."),r=n=>{const s=parseInt(n,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/loadCognitoIdentity-8jiU5gC4.js","assets/normalizeProvider-BrOPyH3l.js","assets/resolveDefaultsModeConfig-xY0FTeYJ.js","assets/preload-helper-BlTxHScW.js","assets/index-CQX5ImE-.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-ChvoNxcO.js","assets/__vite-browser-external-DLjrMatA.js","assets/inherits_browser-nmOknR35-Bp0mvRSL.js","assets/index-6mKfgpcs-DsgiI2lM.js","assets/_commonjsHelpers-B4e78b8K-W3E8ocG7.js","assets/index-DsIu-45t-Bejjlpz4.js","assets/index-DSosZ5sh-Ceejs_jv.js","assets/index-69shuAsh-DF18H7zf.js","assets/index-BJBOx-Z---hbiLl7B.js","assets/index.browser-BHPvGrwi-6Mh8eUw-.js","assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js","assets/_commonjs-dynamic-modules-B7n8ZNar.js","assets/index-DeCbRrWH.css","assets/loadSts-DupUSbEN.js","assets/index-CBeWVM5M.js"])))=>i.map(i=>d[i]);
2
+ import{_ as I}from"./preload-helper-BlTxHScW.js";import{a as O,b as N,t as x,s as D,H as K,p as H,F as j,n as q}from"./normalizeProvider-BrOPyH3l.js";class A extends Error{name="ProviderError";tryNextLink;constructor(t,o=!0){let r,n=!0;typeof o=="boolean"?(r=void 0,n=o):o!=null&&typeof o=="object"&&(r=o.logger,n=o.tryNextLink??!0),super(t),this.tryNextLink=n,Object.setPrototypeOf(this,A.prototype),r?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${t}`)}static from(t,o=!0){return Object.assign(new this(t.message,o),t)}}class l extends A{name="CredentialsProviderError";constructor(t,o=!0){super(t,o),Object.setPrototypeOf(this,l.prototype)}}function _(e){return Promise.all(Object.keys(e).reduce((t,o)=>{const r=e[o];return typeof r=="string"?t.push([o,r]):t.push(r().then(n=>[o,n])),t},[])).then(t=>t.reduce((o,[r,n])=>(o[r]=n,o),{}))}function k(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:o,CognitoIdentityClient:r}=await I(async()=>{const{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}=await import("./loadCognitoIdentity-8jiU5gC4.js");return{GetCredentialsForIdentityCommand:c,CognitoIdentityClient:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),n=c=>e.clientConfig?.[c]??e.parentClientConfig?.[c]??t?.callerClientConfig?.[c],{Credentials:{AccessKeyId:s=L(e.logger),Expiration:i,SecretKey:d=M(e.logger),SessionToken:u}=$(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new o({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await _(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:d,sessionToken:u,expiration:i}}}function L(e){throw new l("Response from Amazon Cognito contained no access key ID",{logger:e})}function $(e){throw new l("Response from Amazon Cognito contained no credentials",{logger:e})}function M(e){throw new l("Response from Amazon Cognito contained no secret key",{logger:e})}const b="IdentityIds";class B{dbName;constructor(t="aws:cognito-identity-ids"){this.dbName=t}getItem(t){return this.withObjectStore("readonly",o=>{const r=o.get(t);return new Promise(n=>{r.onerror=()=>n(null),r.onsuccess=()=>n(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(t){return this.withObjectStore("readwrite",o=>{const r=o.delete(t);return new Promise((n,s)=>{r.onerror=()=>s(r.error),r.onsuccess=()=>n()})})}setItem(t,o){return this.withObjectStore("readwrite",r=>{const n=r.put({id:t,value:o});return new Promise((s,i)=>{n.onerror=()=>i(n.error),n.onsuccess=()=>s()})})}getDb(){const t=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{t.onsuccess=()=>{o(t.result)},t.onerror=()=>{r(t.error)},t.onblocked=()=>{r(new Error("Unable to access DB"))},t.onupgradeneeded=()=>{const n=t.result;n.onerror=()=>{r(new Error("Failed to create object store"))},n.createObjectStore(b,{keyPath:"id"})}})}withObjectStore(t,o){return this.getDb().then(r=>{const n=r.transaction(b,t);return n.oncomplete=()=>r.close(),new Promise((s,i)=>{n.onerror=()=>i(n.error),s(o(n.objectStore(b)))}).catch(s=>{throw r.close(),s})})}}class W{store;constructor(t={}){this.store=t}getItem(t){return t in this.store?this.store[t]:null}removeItem(t){delete this.store[t]}setItem(t,o){this.store[t]=o}}const U=new W;function F(){return typeof self=="object"&&self.indexedDB?new B:typeof window=="object"&&window.localStorage?window.localStorage:U}function z({accountId:e,cache:t=F(),client:o,clientConfig:r,customRoleArn:n,identityPoolId:s,logins:i,userIdentifier:d=!i||Object.keys(i).length===0?"ANONYMOUS":void 0,logger:u,parentClientConfig:c}){u?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=d?`aws:cognito-identity-credentials:${s}:${d}`:void 0;let a=async w=>{const{GetIdCommand:m,CognitoIdentityClient:y}=await I(async()=>{const{GetIdCommand:g,CognitoIdentityClient:P}=await import("./loadCognitoIdentity-8jiU5gC4.js");return{GetIdCommand:g,CognitoIdentityClient:P}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])),h=g=>r?.[g]??c?.[g]??w?.callerClientConfig?.[g],C=o??new y(Object.assign({},r??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")}));let p=f&&await t.getItem(f);if(!p){const{IdentityId:g=G(u)}=await C.send(new m({AccountId:e,IdentityPoolId:s,Logins:i?await _(i):void 0}));p=g,f&&Promise.resolve(t.setItem(f,p)).catch(()=>{})}return a=k({client:C,customRoleArn:n,logins:i,identityId:p}),a(w)};return w=>a(w).catch(async m=>{throw f&&Promise.resolve(t.removeItem(f)).catch(()=>{}),m})}function G(e){throw new l("Response from Amazon Cognito contained no identity ID",{logger:e})}const ie=e=>k({...e}),ae=e=>z({...e}),V="169.254.170.2",J="169.254.170.23",Y="[fd00:ec2::23]",Q=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===V||e.hostname===J||e.hostname===Y)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const o=e.hostname.split("."),r=n=>{const s=parseInt(n,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new l(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}},T=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),R="The stream has already been transformed.",X=e=>{if(!E(e)&&!T(e)){const n=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${n}`)}let t=!1;const o=async()=>{if(t)throw new Error(R);return t=!0,await D(e)},r=n=>{if(typeof n.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
6
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-G4YtvdN8.js").then(y=>y.w);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));if(!r){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let y="STS client default credentials";if(m[0])y="options.masterCredentials";else if(m[1])y="options.clientConfig.credentials";else{if(m[2])throw y="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?y="caller client's credentialDefaultProvider":m[4]&&(y="AWS SDK default credentials")}const h=[e.clientConfig?.region,s?.region,await o?.({profile:i}),ne];let C="default partition's default region";h[0]?C="options.clientConfig.region":h[1]?C="caller client's region":h[2]&&(C="file or env region");const p=[v(e.clientConfig?.requestHandler),v(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(h))()}, ${y}, ${g}.`),r=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(h),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)r.middlewareStack.use(w);const{Credentials:a}=await r.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},v=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},re=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-Q3k6YkBW.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([20,19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>re({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
6
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return n.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async n=>{const s=await o();if(n==="base64")return O(s);if(n==="hex")return N(s);if(n===void 0||n==="utf8"||n==="utf-8")return x(s);if(typeof TextDecoder=="function")return new TextDecoder(n).decode(s);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(R);if(t=!0,E(e))return r(e);if(T(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},E=e=>typeof Blob=="function"&&e instanceof Blob;function Z(e){return new K({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[o,r])=>(t[o]=r,t),{}),fragment:e.hash})}async function ee(e,t){const r=await X(e.body).transformToString();if(e.statusCode===200){const n=JSON.parse(r);if(typeof n.AccessKeyId!="string"||typeof n.SecretAccessKey!="string"||typeof n.Token!="string"||typeof n.Expiration!="string")throw new l("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.Token,expiration:H(n.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch{}throw Object.assign(new l(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new l(`Server responded with status: ${e.statusCode}`,{logger:t})}const te=(e,t,o)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,o))}return await e()},ce=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let t;const o=e.credentialsFullUri;if(o)t=o;else throw new l("No HTTP credential provider host provided.",{logger:e.logger});const r=new URL(t);Q(r,e.logger);const n=new j;return te(async()=>{const s=Z(r);e.authorizationToken&&(s.headers.Authorization=e.authorizationToken);const i=await n.handle(s);return ee(i.response)},e.maxRetries??3,e.timeout??1e3)},ne="us-east-1",le=(e,t,o)=>{let r;return async(n={})=>{const{callerClientConfig:s}=n,i=e.clientConfig?.profile??s?.profile,d=e.logger??s?.logger;d?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const u={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(u?.SerialNumber){if(!e.mfaCodeProvider)throw new l("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:d});u.TokenCode=await e.mfaCodeProvider(u?.SerialNumber)}const{AssumeRoleCommand:c,STSClient:f}=await I(async()=>{const{AssumeRoleCommand:w,STSClient:m}=await import("./loadSts-DupUSbEN.js").then(y=>y.w);return{AssumeRoleCommand:w,STSClient:m}},__vite__mapDeps([19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));if(!r){const w=typeof t=="function"?t():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void s?.credentials,s?.credentialDefaultProvider?.(),w];let y="STS client default credentials";if(m[0])y="options.masterCredentials";else if(m[1])y="options.clientConfig.credentials";else{if(m[2])throw y="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");m[3]?y="caller client's credentialDefaultProvider":m[4]&&(y="AWS SDK default credentials")}const h=[e.clientConfig?.region,s?.region,await o?.({profile:i}),ne];let C="default partition's default region";h[0]?C="options.clientConfig.region":h[1]?C="caller client's region":h[2]&&(C="file or env region");const p=[v(e.clientConfig?.requestHandler),v(s?.requestHandler)];let g="STS default requestHandler";p[0]?g="options.clientConfig.requestHandler":p[1]&&(g="caller client's requestHandler"),d?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${C}=${await q(S(h))()}, ${y}, ${g}.`),r=new f({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:S(m),logger:d,profile:i,region:S(h),requestHandler:S(p)})}if(e.clientPlugins)for(const w of e.clientPlugins)r.middlewareStack.use(w);const{Credentials:a}=await r.send(new c(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new l(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`,{logger:d});return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},v=e=>e?.metadata?.handlerProtocol==="h2"?void 0:e,S=e=>{for(const t of e)if(t!==void 0)return t},re=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:n,providerId:s,policyArns:i,policy:d,durationSeconds:u}=e;let{roleAssumerWithWebIdentity:c}=e;if(!c){const{getDefaultRoleAssumerWithWebIdentity:f}=await I(async()=>{const{getDefaultRoleAssumerWithWebIdentity:a}=await import("./index-CBeWVM5M.js");return{getDefaultRoleAssumerWithWebIdentity:a}},__vite__mapDeps([20,19,2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]));c=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:s,PolicyArns:i,Policy:d,DurationSeconds:u})},de=e=>re({...e});export{ie as fromCognitoIdentity,ae as fromCognitoIdentityPool,ce as fromHttp,le as fromTemporaryCredentials,de as fromWebToken};
@@ -1 +1 @@
1
- import{H as G,n as M,c as qe,t as xe,d as _e,e as Ve,g as Je,h as We,a as H,i as Ke,f as Qe,s as Xe,F as Ye}from"./normalizeProvider-BrOPyH3l.js";import{i as Ze,b as et,c as Pe,S as ie,m as tt,d as st,e as nt,T as y,f as oe,N as k,h as R,j as rt,L as Re,k as ke,v as it,R as ot,l as at,n as ve,o as ct,E as ut,r as dt,p as pt,q as lt,s as gt,t as ft,u as mt,D as ht,w as St,x as yt,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as xt,I as _t,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Nt,V as Mt,W as Ut,X as $t,C as Oe,g as De}from"./resolveDefaultsModeConfig-DNaeNIKy.js";import"./preload-helper-BlTxHScW.js";import"./index-CjpHJARw.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:n}=s,{handlerProtocol:r=""}=t.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const n=await t(s),{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,p=c??e.outputFilterSensitiveLog,{$metadata:g,...m}=n.output;return o?.info?.({clientName:r,commandName:i,input:d(s.input),output:p(m),metadata:g}),n}catch(n){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(s.input),error:n,metadata:n.$metadata}),n}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=M(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const n=await e();if(!Wt(n)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?r?.warn("userAgentAppId must be a string or undefined."):n.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,n,r,i,o,...a]=e;if(s!=="arn"||n===""||r===""||a.join(ae)==="")return null;const u=a.map(c=>c.split(Qt)).flat();return{partition:n,service:r,region:i,accountId:o,resourceId:u}},Yt=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const n of e){const{regions:r,outputs:i}=n;for(const[o,a]of Object.entries(r))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:r,outputs:i}=n;if(new RegExp(r).test(t))return{...i}}const s=e.find(n=>n.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Ne={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Ne;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function I(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Me=t=>new Date(Date.now()+t),ns=(t,e)=>Math.abs(Me(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return ns(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},rs=async t=>{const e=U("context",t.context),s=U("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(n),o=t?.signingRegion,a=t?.signingRegionSet,u=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:u}};class is{async sign(e,s,n){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await rs(n),{config:i,signer:o}=r;let{signingRegion:a,signingName:u}=r;const c=n.context;if(c?.authSchemes?.length??!1){const[p,g]=c.authSchemes;p?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:Me(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return s=>{const n=s.ServerTime??ce(s.$response);if(n){const r=U("config",e.config),i=r.systemClockOffset;r.systemClockOffset=ue(n,r.systemClockOffset),r.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const n=ce(e);if(n){const r=U("config",s.config);r.systemClockOffset=ue(n,r.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(s=!0),e=c;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=cs(t,d);if(s&&!p.attributed){const g=typeof e=="object"&&e!==null;n=async m=>{const v=await p(m);return g&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=M(t.signer):t.regionInfoProvider?a=()=>M(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:p,signingService:g}=c;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||g||t.serviceId;const m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},P=t.signerConstructor||ie;return new P(m)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await M(t.region)(),properties:{}},c);const d=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;const g={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},m=t.signerConstructor||ie;return new m(g)},Object.assign(t,{systemClockOffset:i,signingEscapePath:r,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let n;return e?e?.memoized?n=e:n=tt(e,nt,st):s?n=M(s(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function cs(t,e){if(e.configBound)return e;const s=async n=>e({...n,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const n=s.getMemberSchemas(),r=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(r){const i=r.getMergedTraits().mediaType;return i||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:p}=o.getMergedTraits();return!a&&!u&&!c&&!d&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,n,r,i,o){let a=s,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},d=y.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{r.message=r.message??r.Message??"UnknownError";const g=y.for("smithy.ts.sdk.synthetic."+a),m=g.getBaseException();if(m){const P=g.getErrorCtor(m)??Error;throw this.decorateServiceException(Object.assign(new P({name:u}),c),r)}throw this.decorateServiceException(Object.assign(new Error(u),c),r)}}decorateServiceException(e,s={}){if(this.queryCompat){const n=e.Message??s.Message,r=oe(e,s);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return oe(e,s)}setQueryCompatError(e,s){const n=s.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[r,i]=n.split(";"),o=Object.entries(e),a={Code:r,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(r=>k.of(r).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let n=0;n<s[4].length;++n){const r=s[4][n],i=s[5][n],o=new k([i,0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const n=t.getSchema();let r=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&r!==0;++i){const o=n[4][i],a=n[5][i],u=new k([a,0],o);let c=o;s&&(c=u.getMergedTraits()[s]??o),c in e&&(yield[o,u],r-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const n=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new R(n,"bigDecimal"):BigInt(n)}return e}const fs=(t,e)=>rt(t,e).then(s=>(e?.utf8Encoder??xe)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:s}),n}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},r=s(t.headers,"x-amzn-errortype");if(r!==void 0)return n(t.headers[r]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class Ss extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const n=s!==null&&typeof s=="object",r=k.of(e);if(n){if(r.isStructSchema()){const o=r.isUnionSchema(),a={};let u;o&&(u=new ls(s,a));for(const[c,d]of ps(r,s,this.settings.jsonName?"jsonName":!1)){const p=this.settings.jsonName?d.getMergedTraits().jsonName??c:c;o&&u.mark(p),s[p]!=null&&(a[c]=this._read(d,s[p]))}return o&&u.writeUnknown(),a}if(Array.isArray(s)&&r.isListSchema()){const o=r.getValueSchema(),a=[],u=!!r.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._read(o,c));return a}if(r.isMapSchema()){const o=r.getValueSchema(),a={},u=!!r.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._read(o,d));return a}}if(r.isBlobSchema()&&typeof s=="string")return _e(s);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(r.isTimestampSchema()&&s!=null)switch(ke(r,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(r.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(r.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(r.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?o[a]=u:o[a]=this._read(r,u);return o}else return structuredClone(s);return s}}const de="Ν";class ys{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof R){const n=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${n}"`,s.string),n}if(typeof s=="bigint"){const n=s.toString(),r=`${de+"b"+this.counter++}_`+n;return this.values.set(`"${r}"`,n),r}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,n]of this.values)e=e.replace(s,n);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const n=new ys;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,s,n){const r=s!==null&&typeof s=="object",i=k.of(e);if(r){if(i.isStructSchema()){const o={};for(const[a,u]of ds(i,s)){const c=this._write(u,s[a],i);if(c!==void 0){const d=u.getMergedTraits().jsonName,p=this.settings.jsonName?d??a:a;o[p]=c}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=s;if(Array.isArray(a)){const[u,c]=a;o[u]=this._write(15,c)}}return o}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],u=!!i.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._write(o,c));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},u=!!i.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?(this.useReplacer=!0,o[a]=u):o[a]=this._write(i,u);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Ss(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=r??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,n){const r=await super.serializeRequest(e,s,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,s,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const o=hs(n,r)??"Unknown",{errorSchema:a,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=k.of(a),d=r.message??r.Message??"Unknown",p=y.for(a[1]).getErrorCtor(a)??Error,g=new p(d),m={};for(const[P,v]of c.structIterator())r[P]!=null&&(m[P]=this.codec.createDeserializer().readObject(v,r[P]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(g,u,{$fault:c.getMergedTraits().error,message:d},m),r)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&I(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?I(t,"RETRY_MODE_ADAPTIVE","F"):I(t,"RETRY_MODE_STANDARD","E"):I(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&I(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":I(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":I(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":I(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const i=r;i.accountId&&I(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))I(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",xs=/[^!$%&'*+\-.^_`|~\w]/g,_s=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const n=t[s];if(e.length+n.length+1<=Ps){e.length?e+=","+n:e+=n;continue}break}return e}const ks=t=>(e,s)=>async n=>{const{request:r}=n;if(!G.isInstance(r))return e(n);const{headers:i}=r,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,n);const u=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const p=[].concat([...a,...o,...c]).join(le),g=[...a.filter(m=>m.startsWith("aws-sdk-")),...c].join(le);return t.runtime!=="browser"?(g&&(i[j]=i[j]?`${i[pe]} ${g}`:g),i[pe]=p):i[j]=p,e({...n,request:r})},F=t=>{const e=t[0].split(L).map(o=>o.replace(xs,ge)).join(L),s=t[1]?.replace(_s,ge),n=e.indexOf(L),r=e.substring(0,n);let i=e.substring(n+1);return r==="api"&&(i=i.toLowerCase()),[r,i,s].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ns=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ms=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.968.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const n=typeof window<"u"?window.navigator:void 0,r=n?.userAgent??"",i=n?.userAgentData?.platform??fe.os(r)??"other",o=void 0,a=n?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??fe.browser(r)??"unknown",d=u?.version??"unknown",p=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${d}`]];t&&p.push([`api/${t}`,e]);const g=await s?.userAgentAppId?.();return g&&p.push([`app/${g}`]),p},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",h="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",b="endpoint",_="tree",q="PartitionResult",V="getAttr",T="stringEquals",Se={[$e]:!1,type:"string"},ye={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[h]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[h]:$,[S]:[{[D]:"UseDualStack"},!0]},f={},N={[D]:"Region"},we={[h]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[h]:$,[S]:[!0,{[h]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[N],js={parameters:{Region:Se,UseDualStack:ye,UseFIPS:ye,Endpoint:Se},rules:[{conditions:[{[h]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:f,headers:f},type:b}],type:_},{conditions:[{[h]:he,[S]:Ae}],rules:[{conditions:[{[h]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[h]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[h]:T,[S]:[N,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:_},{conditions:Ie,rules:[{conditions:[{[h]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:_},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[h]:T,[S]:["aws",{[h]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_}],type:_},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Ne;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??_e,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ns,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??xe}),qs=t=>{const e=ft(t),s=()=>e().then(It),n=Bs(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:n.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??yt,region:t?.region??St("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(r){const i=e.findIndex(o=>o.schemeId===r.schemeId);i===-1?e.push(r):e.splice(i,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){n=r},credentials(){return n}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(n=>n.configure(s)),Object.assign(t,Js(s),xt(s),_t(s),Ks(s))};class dr extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const n=Us(s),r=Kt(n),i=Rt(r),o=kt(i),a=o,u=vt(a),c=Ms(u),d=Qs(c,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async p=>new Ut({"aws.auth#sigv4":p.credentials})})),this.middlewareStack.use(Mt(this.config))}destroy(){super.destroy()}}class E extends $t{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}class J extends E{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends E{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends E{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends E{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends E{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends E{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends E{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends E{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends E{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends E{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class ne extends E{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,ne.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",en="CustomRoleArn",tn="DeveloperUserAlreadyRegisteredException",sn="Expiration",nn="ExternalServiceException",rn="GetCredentialsForIdentity",on="GetCredentialsForIdentityInput",an="GetCredentialsForIdentityResponse",cn="GetId",un="GetIdInput",dn="GetIdResponse",pn="InternalErrorException",re="IdentityId",ln="InvalidIdentityPoolConfigurationException",gn="InvalidParameterException",fn="IdentityPoolId",mn="IdentityProviderToken",He="Logins",hn="LimitExceededException",Sn="LoginsMap",yn="NotAuthorizedException",En="ResourceConflictException",wn="ResourceNotFoundException",Cn="SecretKey",In="SecretKeyString",bn="SessionToken",An="TooManyRequestsException",A="client",w="error",x="httpError",C="message",xn="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",l="com.amazonaws.cognitoidentity";var _n=[0,l,mn,8,0],Pn=[0,l,In,8,0],Rn=[-3,l,Zs,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Rn,ne);var kn=[3,l,Le,0,[Ys,Cn,bn,sn],[0,[()=>Pn,0],0,4]],vn=[-3,l,tn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(vn,se);var On=[-3,l,nn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(On,ee);var Dn=[3,l,on,0,[re,He,en],[0,[()=>Be,0],0]],Tn=[3,l,an,0,[re,Le],[0,[()=>kn,0]]],Nn=[3,l,un,0,[Xs,fn,He],[0,0,[()=>Be,0]]],Mn=[3,l,dn,0,[re],[0]],Un=[-3,l,pn,{[w]:xn},[C],[0]];y.for(l).registerError(Un,J);var $n=[-3,l,ln,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError($n,te);var Fn=[-3,l,gn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Fn,W);var zn=[-3,l,hn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(zn,K);var jn=[-3,l,yn,{[w]:A,[x]:403},[C],[0]];y.for(l).registerError(jn,Q);var Ln=[-3,l,En,{[w]:A,[x]:409},[C],[0]];y.for(l).registerError(Ln,X);var Hn=[-3,l,wn,{[w]:A,[x]:404},[C],[0]];y.for(l).registerError(Hn,Z);var Gn=[-3,l,An,{[w]:A,[x]:429},[C],[0]];y.for(l).registerError(Gn,Y);var Bn=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];y.for(Ge).registerError(Bn,E);var Be=[2,l,Sn,0,[0,0],[()=>_n,0]],qn=[9,l,rn,0,()=>Dn,()=>Tn],Vn=[9,l,cn,0,()=>Nn,()=>Mn];class pr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(qn).build(){}class lr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Vn).build(){}export{dr as CognitoIdentityClient,pr as GetCredentialsForIdentityCommand,lr as GetIdCommand};
1
+ import{H as G,n as M,c as qe,t as xe,d as _e,e as Ve,g as Je,h as We,a as H,i as Ke,f as Qe,s as Xe,F as Ye}from"./normalizeProvider-BrOPyH3l.js";import{i as Ze,b as et,c as Pe,S as ie,m as tt,d as st,e as nt,T as y,f as oe,N as k,h as R,j as rt,L as Re,k as ke,v as it,R as ot,l as at,n as ve,o as ct,E as ut,r as dt,p as pt,q as lt,s as gt,t as ft,u as mt,D as ht,w as St,x as yt,y as Et,z as wt,A as Ct,B as It,F as bt,G as At,H as xt,I as _t,a as Pt,J as Rt,K as kt,M as vt,O as Ot,P as Dt,Q as Tt,U as Nt,V as Mt,W as Ut,X as $t,C as Oe,g as De}from"./resolveDefaultsModeConfig-xY0FTeYJ.js";import"./preload-helper-BlTxHScW.js";import"./index-CQX5ImE-.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-B7n8ZNar.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:n}=s,{handlerProtocol:r=""}=t.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const n=await t(s),{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:c}=a,d=u??e.inputFilterSensitiveLog,p=c??e.outputFilterSensitiveLog,{$metadata:g,...m}=n.output;return o?.info?.({clientName:r,commandName:i,input:d(s.input),output:p(m),metadata:g}),n}catch(n){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:u}=a,c=u??e.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(s.input),error:n,metadata:n.$metadata}),n}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=M(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const n=await e();if(!Wt(n)){const r=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof n!="string"?r?.warn("userAgentAppId must be a string or undefined."):n.length>50&&r?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,n,r,i,o,...a]=e;if(s!=="arn"||n===""||r===""||a.join(ae)==="")return null;const u=a.map(c=>c.split(Qt)).flat();return{partition:n,service:r,region:i,accountId:o,resourceId:u}},Yt=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const n of e){const{regions:r,outputs:i}=n;for(const[o,a]of Object.entries(r))if(o===t)return{...i,...a}}for(const n of e){const{regionRegex:r,outputs:i}=n;if(new RegExp(r).test(t))return{...i}}const s=e.find(n=>n.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},Ne={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Ne;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function I(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Me=t=>new Date(Date.now()+t),ns=(t,e)=>Math.abs(Me(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return ns(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},rs=async t=>{const e=U("context",t.context),s=U("config",t.config),n=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(n),o=t?.signingRegion,a=t?.signingRegionSet,u=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:u}};class is{async sign(e,s,n){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await rs(n),{config:i,signer:o}=r;let{signingRegion:a,signingName:u}=r;const c=n.context;if(c?.authSchemes?.length??!1){const[p,g]=c.authSchemes;p?.name==="sigv4a"&&g?.name==="sigv4"&&(a=g?.signingRegion??a,u=g?.signingName??u)}return await o.sign(e,{signingDate:Me(i.systemClockOffset),signingRegion:a,signingService:u})}errorHandler(e){return s=>{const n=s.ServerTime??ce(s.$response);if(n){const r=U("config",e.config),i=r.systemClockOffset;r.systemClockOffset=ue(n,r.systemClockOffset),r.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const n=ce(e);if(n){const r=U("config",s.config);r.systemClockOffset=ue(n,r.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(c){c&&c!==e&&c!==n&&(s=!0),e=c;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=cs(t,d);if(s&&!p.attributed){const g=typeof e=="object"&&e!==null;n=async m=>{const v=await p(m);return g&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:r=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=M(t.signer):t.regionInfoProvider?a=()=>M(t.region)().then(async c=>[await t.regionInfoProvider(c,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:p,signingService:g}=c;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||g||t.serviceId;const m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},P=t.signerConstructor||ie;return new P(m)}):a=async c=>{c=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await M(t.region)(),properties:{}},c);const d=c.signingRegion,p=c.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;const g={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:r},m=t.signerConstructor||ie;return new m(g)},Object.assign(t,{systemClockOffset:i,signingEscapePath:r,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let n;return e?e?.memoized?n=e:n=tt(e,nt,st):s?n=M(s(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function cs(t,e){if(e.configBound)return e;const s=async n=>e({...n,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const n=s.getMemberSchemas(),r=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(r){const i=r.getMergedTraits().mediaType;return i||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:a,httpQueryParams:u,httpHeader:c,httpLabel:d,httpPrefixHeaders:p}=o.getMergedTraits();return!a&&!u&&!c&&!d&&p===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,n,r,i,o){let a=s,u=e;e.includes("#")&&([a,u]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},d=y.for(a);try{return{errorSchema:o?.(d,u)??d.getSchema(e),errorMetadata:c}}catch{r.message=r.message??r.Message??"UnknownError";const g=y.for("smithy.ts.sdk.synthetic."+a),m=g.getBaseException();if(m){const P=g.getErrorCtor(m)??Error;throw this.decorateServiceException(Object.assign(new P({name:u}),c),r)}throw this.decorateServiceException(Object.assign(new Error(u),c),r)}}decorateServiceException(e,s={}){if(this.queryCompat){const n=e.Message??s.Message,r=oe(e,s);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return oe(e,s)}setQueryCompatError(e,s){const n=s.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[r,i]=n.split(";"),o=Object.entries(e),a={Code:r,Type:i};Object.assign(e,a);for(const[u,c]of o)a[u==="message"?"Message":u]=c;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(r=>k.of(r).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let n=0;n<s[4].length;++n){const r=s[4][n],i=s[5][n],o=new k([i,0],r);!(r in e)&&!o.isIdempotencyToken()||(yield[r,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const n=t.getSchema();let r=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<n[4].length&&r!==0;++i){const o=n[4][i],a=n[5][i],u=new k([a,0],o);let c=o;s&&(c=u.getMergedTraits()[s]??o),c in e&&(yield[o,u],r-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const n=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new R(n,"bigDecimal"):BigInt(n)}return e}const fs=(t,e)=>rt(t,e).then(s=>(e?.utf8Encoder??xe)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:s}),n}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),n=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},r=s(t.headers,"x-amzn-errortype");if(r!==void 0)return n(t.headers[r]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return n(e[i]);if(e.__type!==void 0)return n(e.__type)}};class Ss extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const n=s!==null&&typeof s=="object",r=k.of(e);if(n){if(r.isStructSchema()){const o=r.isUnionSchema(),a={};let u;o&&(u=new ls(s,a));for(const[c,d]of ps(r,s,this.settings.jsonName?"jsonName":!1)){const p=this.settings.jsonName?d.getMergedTraits().jsonName??c:c;o&&u.mark(p),s[p]!=null&&(a[c]=this._read(d,s[p]))}return o&&u.writeUnknown(),a}if(Array.isArray(s)&&r.isListSchema()){const o=r.getValueSchema(),a=[],u=!!r.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._read(o,c));return a}if(r.isMapSchema()){const o=r.getValueSchema(),a={},u=!!r.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._read(o,d));return a}}if(r.isBlobSchema()&&typeof s=="string")return _e(s);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(r.isTimestampSchema()&&s!=null)switch(ke(r,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(r.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(r.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(r.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(r.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?o[a]=u:o[a]=this._read(r,u);return o}else return structuredClone(s);return s}}const de="Ν";class ys{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof R){const n=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${n}"`,s.string),n}if(typeof s=="bigint"){const n=s.toString(),r=`${de+"b"+this.counter++}_`+n;return this.values.set(`"${r}"`,n),r}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,n]of this.values)e=e.replace(s,n);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const n=new ys;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,s,n){const r=s!==null&&typeof s=="object",i=k.of(e);if(r){if(i.isStructSchema()){const o={};for(const[a,u]of ds(i,s)){const c=this._write(u,s[a],i);if(c!==void 0){const d=u.getMergedTraits().jsonName,p=this.settings.jsonName?d??a:a;o[p]=c}}if(i.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:a}=s;if(Array.isArray(a)){const[u,c]=a;o[u]=this._write(15,c)}}return o}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],u=!!i.getMergedTraits().sparse;for(const c of s)(u||c!=null)&&a.push(this._write(o,c));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},u=!!i.getMergedTraits().sparse;for(const[c,d]of Object.entries(s))(u||d!=null)&&(a[c]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&n?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,u]of Object.entries(s))u instanceof R?(this.useReplacer=!0,o[a]=u):o[a]=this._write(i,u);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Ss(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=r??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,n){const r=await super.serializeRequest(e,s,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,s,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const o=hs(n,r)??"Unknown",{errorSchema:a,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=k.of(a),d=r.message??r.Message??"Unknown",p=y.for(a[1]).getErrorCtor(a)??Error,g=new p(d),m={};for(const[P,v]of c.structIterator())r[P]!=null&&(m[P]=this.codec.createDeserializer().readObject(v,r[P]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(g,u,{$fault:c.getMergedTraits().error,message:d},m),r)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&I(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?I(t,"RETRY_MODE_ADAPTIVE","F"):I(t,"RETRY_MODE_STANDARD","E"):I(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&I(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":I(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":I(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":I(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const r=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const i=r;i.accountId&&I(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))I(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",xs=/[^!$%&'*+\-.^_`|~\w]/g,_s=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const n=t[s];if(e.length+n.length+1<=Ps){e.length?e+=","+n:e+=n;continue}break}return e}const ks=t=>(e,s)=>async n=>{const{request:r}=n;if(!G.isInstance(r))return e(n);const{headers:i}=r,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,n);const u=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const c=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const p=[].concat([...a,...o,...c]).join(le),g=[...a.filter(m=>m.startsWith("aws-sdk-")),...c].join(le);return t.runtime!=="browser"?(g&&(i[j]=i[j]?`${i[pe]} ${g}`:g),i[pe]=p):i[j]=p,e({...n,request:r})},F=t=>{const e=t[0].split(L).map(o=>o.replace(xs,ge)).join(L),s=t[1]?.replace(_s,ge),n=e.indexOf(L),r=e.substring(0,n);let i=e.substring(n+1);return r==="api"&&(i=i.toLowerCase()),[r,i,s].filter(o=>o&&o.length>0).reduce((o,a,u)=>{switch(u){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ns=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ms=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.968.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const n=typeof window<"u"?window.navigator:void 0,r=n?.userAgent??"",i=n?.userAgentData?.platform??fe.os(r)??"other",o=void 0,a=n?.userAgentData?.brands??[],u=a[a.length-1],c=u?.brand??fe.browser(r)??"unknown",d=u?.version??"unknown",p=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${c}_${d}`]];t&&p.push([`api/${t}`,e]);const g=await s?.userAgentAppId?.();return g&&p.push([`app/${g}`]),p},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",h="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",b="endpoint",_="tree",q="PartitionResult",V="getAttr",T="stringEquals",Se={[$e]:!1,type:"string"},ye={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[h]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[h]:$,[S]:[{[D]:"UseDualStack"},!0]},f={},N={[D]:"Region"},we={[h]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[h]:$,[S]:[!0,{[h]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[N],js={parameters:{Region:Se,UseDualStack:ye,UseFIPS:ye,Endpoint:Se},rules:[{conditions:[{[h]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:f,headers:f},type:b}],type:_},{conditions:[{[h]:he,[S]:Ae}],rules:[{conditions:[{[h]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[h]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[h]:T,[S]:[N,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:f,headers:f},type:b},{conditions:[{[h]:T,[S]:[N,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:_},{conditions:Ie,rules:[{conditions:[{[h]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:_},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[h]:T,[S]:["aws",{[h]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:f,headers:f},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:f,headers:f},type:b}],type:_},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:_},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:f,headers:f},type:b}],type:_}],type:_},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Ne;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??_e,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ns,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??xe}),qs=t=>{const e=ft(t),s=()=>e().then(It),n=Bs(t);return{...n,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:n.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??yt,region:t?.region??St("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(r){const i=e.findIndex(o=>o.schemeId===r.schemeId);i===-1?e.push(r):e.splice(i,1,r)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(r){s=r},httpAuthSchemeProvider(){return s},setCredentials(r){n=r},credentials(){return n}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(n=>n.configure(s)),Object.assign(t,Js(s),xt(s),_t(s),Ks(s))};class dr extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const n=Us(s),r=Kt(n),i=Rt(r),o=kt(i),a=o,u=vt(a),c=Ms(u),d=Qs(c,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async p=>new Ut({"aws.auth#sigv4":p.credentials})})),this.middlewareStack.use(Mt(this.config))}destroy(){super.destroy()}}class E extends $t{constructor(e){super(e),Object.setPrototypeOf(this,E.prototype)}}class J extends E{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends E{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends E{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends E{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends E{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends E{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends E{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends E{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends E{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends E{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class ne extends E{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,ne.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",en="CustomRoleArn",tn="DeveloperUserAlreadyRegisteredException",sn="Expiration",nn="ExternalServiceException",rn="GetCredentialsForIdentity",on="GetCredentialsForIdentityInput",an="GetCredentialsForIdentityResponse",cn="GetId",un="GetIdInput",dn="GetIdResponse",pn="InternalErrorException",re="IdentityId",ln="InvalidIdentityPoolConfigurationException",gn="InvalidParameterException",fn="IdentityPoolId",mn="IdentityProviderToken",He="Logins",hn="LimitExceededException",Sn="LoginsMap",yn="NotAuthorizedException",En="ResourceConflictException",wn="ResourceNotFoundException",Cn="SecretKey",In="SecretKeyString",bn="SessionToken",An="TooManyRequestsException",A="client",w="error",x="httpError",C="message",xn="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",l="com.amazonaws.cognitoidentity";var _n=[0,l,mn,8,0],Pn=[0,l,In,8,0],Rn=[-3,l,Zs,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Rn,ne);var kn=[3,l,Le,0,[Ys,Cn,bn,sn],[0,[()=>Pn,0],0,4]],vn=[-3,l,tn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(vn,se);var On=[-3,l,nn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(On,ee);var Dn=[3,l,on,0,[re,He,en],[0,[()=>Be,0],0]],Tn=[3,l,an,0,[re,Le],[0,[()=>kn,0]]],Nn=[3,l,un,0,[Xs,fn,He],[0,0,[()=>Be,0]]],Mn=[3,l,dn,0,[re],[0]],Un=[-3,l,pn,{[w]:xn},[C],[0]];y.for(l).registerError(Un,J);var $n=[-3,l,ln,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError($n,te);var Fn=[-3,l,gn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(Fn,W);var zn=[-3,l,hn,{[w]:A,[x]:400},[C],[0]];y.for(l).registerError(zn,K);var jn=[-3,l,yn,{[w]:A,[x]:403},[C],[0]];y.for(l).registerError(jn,Q);var Ln=[-3,l,En,{[w]:A,[x]:409},[C],[0]];y.for(l).registerError(Ln,X);var Hn=[-3,l,wn,{[w]:A,[x]:404},[C],[0]];y.for(l).registerError(Hn,Z);var Gn=[-3,l,An,{[w]:A,[x]:429},[C],[0]];y.for(l).registerError(Gn,Y);var Bn=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];y.for(Ge).registerError(Bn,E);var Be=[2,l,Sn,0,[0,0],[()=>_n,0]],qn=[9,l,rn,0,()=>Dn,()=>Tn],Vn=[9,l,cn,0,()=>Nn,()=>Mn];class pr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(qn).build(){}class lr extends Oe.classBuilder().ep(Ue).m(function(e,s,n,r){return[De(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Vn).build(){}export{dr as CognitoIdentityClient,pr as GetCredentialsForIdentityCommand,lr as GetIdCommand};