@aws-amplify/storage 4.5.13 → 4.5.14
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.
|
@@ -22,5 +22,5 @@ var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
22
22
|
*/
|
|
23
23
|
var n=r(67),i=r(68),o=r(69);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function S(e,t,r,n){return F(D(t,e.length-r),e,r,n)}function w(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return w(e,t,r,n)}function _(e,t,r,n){return F(K(t),e,r,n)}function C(e,t,r,n){return F(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),d=0;d<s;++d)if(c[d]!==l[d]){o=c[d],a=l[d];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=B(e[o]);return i}function L(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return o||R(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,o){return o||R(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:D(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(66))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(3);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,r){"use strict";var n=r(3),i=r(42),o=r(43),a=r(15),s=r(44),u=r(47),c=r(48),l=r(18),d=r(8),f=r(9);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,v=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete v["Content-Type"];var m=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+S)}var w=s(e.baseURL,e.url);function E(){if(m){var n="getAllResponseHeaders"in m?u(m.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m};i((function(e){t(e),y()}),(function(e){r(e),y()}),o),m=null}}if(m.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(E)},m.onabort=function(){m&&(r(l("Request aborted",e,"ECONNABORTED",m)),m=null)},m.onerror=function(){r(l("Network Error",e,null,m)),m=null},m.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},n.isStandardBrowserEnv()){var _=(e.withCredentials||c(w))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;_&&(v[e.xsrfHeaderName]=_)}"setRequestHeader"in m&&n.forEach(v,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete v[t]:m.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),g&&"json"!==g&&(m.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){m&&(r(!e||e&&e.type?new f("canceled"):e),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),m.send(p)}))}},function(e,t,r){"use strict";var n=r(16);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},function(e,t){e.exports={version:"0.26.0"}},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(63),i=r(25),o=r(29),a=r(12),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,r){var n=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r(new Error("ImportKey completed without importing key."))},n.onerror=function(){r(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,n.isEmptyData)(e)||(this.operation=this.operation.then((function(r){return r.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},r.process(u(e)),r})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,r){e.onerror=function(){r(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),r(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(64),i=r(25),o=r(12),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,r){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,n.convertToBuffer)(e),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,n.isEmptyData)(e)){var t=(0,n.convertToBuffer)(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,n.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,o.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(89);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(90);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(91);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(92);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)},function(e,t,r){"use strict";const n=r(53),i=r(10),o=r(10),a=r(5).buildOptions,s=r(56);t.parse=function(e,t={},r){if(r){!0===r&&(r={});const t=s.validate(e,r);if(!0!==t)throw Error(t.err.msg)}t.parseTrueNumberOnly&&!1!==t.parseNodeValue&&!t.numParseOptions&&(t.numParseOptions={leadingZeros:!1});let u=a(t,o.defaultOptions,o.props);const c=i.getTraversalObj(e,u);return n.convertToJson(c,u)},t.convertTonimn=r(57).convert2nimn,t.getTraversalObj=i.getTraversalObj,t.convertToJson=n.convertToJson,t.convertToJsonString=r(58).convertToJsonString,t.validate=s.validate,t.j2xParser=r(59),t.parseToNimn=function(e,r,n){return t.convertTonimn(t.getTraversalObj(e,n),r,n)}},function(e,t,r){var n=r(60),i=r(61),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,r(0).__exportStar)(r(62),t);var n=r(24);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return n.Sha256}});var i=r(26);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}])&&a(t,r),e}();t.default=s,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),a=u(r(95)),s=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(r[l]);if(void 0!==d)return d}}if(o>0){var f=Object.keys(i),h=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test:e2e":"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/eventstream-serde-browser":"3.6.1","@aws-sdk/eventstream-serde-config-resolver":"3.6.1","@aws-sdk/eventstream-serde-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-blob-browser":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/hash-stream-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/md5-js":"3.6.1","@aws-sdk/middleware-apply-body-checksum":"3.6.1","@aws-sdk/middleware-bucket-endpoint":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-expect-continue":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-location-constraint":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-sdk-s3":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-ssec":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","@aws-sdk/util-waiter":"3.6.1","@aws-sdk/xml-builder":"3.6.1","fast-xml-parser":"^3.16.0","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}')},function(e,t,r){"use strict";var n=r(3),i=r(14),o=r(36),a=r(20);var s=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(8));s.Axios=o,s.Cancel=r(9),s.CancelToken=r(50),s.isCancel=r(19),s.VERSION=r(21).version,s.all=function(e){return Promise.all(e)},s.spread=r(51),s.isAxiosError=r(52),e.exports=s,e.exports.default=s},function(e,t,r){"use strict";var n=r(3),i=r(15),o=r(37),a=r(38),s=r(20),u=r(49),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&u.assertOptions(r,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var d=[a,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(l),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var f=t;n.length;){var h=n.shift(),p=n.shift();try{f=h(f)}catch(e){p(e);break}}try{o=a(f)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},function(e,t,r){"use strict";var n=r(3);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){"use strict";var n=r(3),i=r(39),o=r(19),a=r(8),s=r(9);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(3),i=r(8);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new p(e,t)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(18);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(3);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(45),i=r(46);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(3),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(3);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(21).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},function(e,t,r){"use strict";var n=r(9);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},function(e,t,r){"use strict";const n=r(5),i=function(e,t,r){const o={};if(!t.alwaysCreateTextNode&&(!e.child||n.isEmptyObject(e.child))&&(!e.attrsMap||n.isEmptyObject(e.attrsMap)))return n.isExist(e.val)?e.val:"";if(n.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)){const i=n.isTagNameInArrayMode(e.tagname,t.arrayMode,r);o[t.textNodeName]=i?[e.val]:e.val}n.merge(o,e.attrsMap,t.arrayMode);const a=Object.keys(e.child);for(let s=0;s<a.length;s++){const u=a[s];if(e.child[u]&&e.child[u].length>1){o[u]=[];for(let r in e.child[u])e.child[u].hasOwnProperty(r)&&o[u].push(i(e.child[u][r],t,u))}else{const a=i(e.child[u][0],t,u),s=!0===t.arrayMode&&"object"==typeof a||n.isTagNameInArrayMode(u,t.arrayMode,r);o[u]=s?[a]:a}}return o};t.convertToJson=i},function(e,t,r){"use strict";e.exports=function(e,t,r){this.tagname=e,this.parent=t,this.child={},this.attrsMap={},this.val=r,this.addChild=function(e){Array.isArray(this.child[e.tagname])?this.child[e.tagname].push(e):this.child[e.tagname]=[e]}}},function(e,t){const r=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,t={}){if(t=Object.assign({},i,t),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(o))return e;if(t.hex&&r.test(o))return Number.parseInt(o,16);{const r=n.exec(o);if(r){const n=r[1],i=r[2];let a=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(r[3]);const s=r[4]||r[6];if(!t.leadingZeros&&i.length>0&&n&&"."!==o[2])return e;if(!t.leadingZeros&&i.length>0&&!n&&"."!==o[1])return e;{const r=Number(o),u=""+r;return-1!==u.search(/[eE]/)||s?t.eNotation?r:e:-1!==o.indexOf(".")?"0"===u&&""===a||u===a||n&&u==="-"+a?r:e:i?a===u||n+a===u?r:e:o===u||o===n+u?r:e}}return e}}},function(e,t,r){"use strict";const n=r(5),i={allowBooleanAttributes:!1},o=["allowBooleanAttributes"];function a(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return f("InvalidXml","XML declaration allowed only at the start of the document.",p(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=n.buildOptions(t,i,o);const r=[];let c=!1,h=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=a(e,i),i.err)return i}else{if("<"!==e[i]){if(" "===e[i]||"\t"===e[i]||"\n"===e[i]||"\r"===e[i])continue;return f("InvalidChar","char '"+e[i]+"' is not expected.",p(e,i))}{let o=i;if(i++,"!"===e[i]){i=s(e,i);continue}{let g=!1;"/"===e[i]&&(g=!0,i++);let y="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)y+=e[i];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),i--),v=y,!n.isName(v)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",f("InvalidTag",t,p(e,i))}const m=u(e,i);if(!1===m)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",p(e,i));let b=m.value;if(i=m.index,"/"===b[b.length-1]){const r=i-b.length;b=b.substring(0,b.length-1);const n=l(b,t);if(!0!==n)return f(n.err.code,n.err.msg,p(e,r+n.err.line));c=!0}else if(g){if(!m.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",p(e,i));if(b.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",p(e,o));{const t=r.pop();if(y!==t.tagName){let r=p(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+y+"'.",p(e,o))}0==r.length&&(h=!0)}}else{const n=l(b,t);if(!0!==n)return f(n.err.code,n.err.msg,p(e,i-b.length+n.err.line));if(!0===h)return f("InvalidXml","Multiple possible root nodes found.",p(e,i));r.push({tagName:y,tagStartPos:o}),c=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=s(e,i);continue}if("?"!==e[i+1])break;if(i=a(e,++i),i.err)return i}else if("&"===e[i]){const t=d(e,i);if(-1==t)return f("InvalidChar","char '&' is not expected.",p(e,i));i=t}"<"===e[i]&&i--}}}var v;return c?1==r.length?f("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",p(e,r[0].tagStartPos)):!(r.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};function u(e,t){let r="",n="",i=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){i=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:i}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(e,t){const r=n.getAllMatches(e,c),i={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return f("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",v(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",v(r[e]));const n=r[e][2];if(!h(n))return f("InvalidAttr","Attribute '"+n+"' is an invalid name.",v(r[e]));if(i.hasOwnProperty(n))return f("InvalidAttr","Attribute '"+n+"' is repeated.",v(r[e]));i[n]=1}return!0}function d(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function f(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function h(e){return n.isName(e)}function p(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function v(e){return e.startIndex+e[1].length}},function(e,t,r){"use strict";const n=function(e){return String.fromCharCode(e)},i={nilChar:n(176),missingChar:n(201),nilPremitive:n(175),missingPremitive:n(200),emptyChar:n(178),emptyValue:n(177),boundryChar:n(179),objStart:n(198),arrStart:n(204),arrayEnd:n(185)},o=[i.nilChar,i.nilPremitive,i.missingChar,i.missingPremitive,i.boundryChar,i.emptyChar,i.emptyValue,i.arrayEnd,i.objStart,i.arrStart],a=function(e,t,r){if("string"==typeof t)return e&&e[0]&&void 0!==e[0].val?s(e[0].val,t):s(e,t);{const o=void 0===(n=e)?i.missingChar:null===n?i.nilChar:!(n.child&&0===Object.keys(n.child).length&&(!n.attrsMap||0===Object.keys(n.attrsMap).length))||i.emptyChar;if(!0===o){let n="";if(Array.isArray(t)){n+=i.arrStart;const o=t[0],c=e.length;if("string"==typeof o)for(let t=0;t<c;t++){const r=s(e[t].val,o);n=u(n,r)}else for(let t=0;t<c;t++){const i=a(e[t],o,r);n=u(n,i)}n+=i.arrayEnd}else{n+=i.objStart;const o=Object.keys(t);Array.isArray(e)&&(e=e[0]);for(let i in o){const s=o[i];let c;c=!r.ignoreAttributes&&e.attrsMap&&e.attrsMap[s]?a(e.attrsMap[s],t[s],r):s===r.textNodeName?a(e.val,t[s],r):a(e.child[s],t[s],r),n=u(n,c)}}return n}return o}var n},s=function(e){switch(e){case void 0:return i.missingPremitive;case null:return i.nilPremitive;case"":return i.emptyValue;default:return e}},u=function(e,t){return c(t[0])||c(e[e.length-1])||(e+=i.boundryChar),e+t},c=function(e){return-1!==o.indexOf(e)};const l=r(10),d=r(5).buildOptions;t.convert2nimn=function(e,t,r){return r=d(r,l.defaultOptions,l.props),a(e,t,r)}},function(e,t,r){"use strict";const n=r(5),i=r(5).buildOptions,o=r(10),a=function(e,t,r){let i="{";const o=Object.keys(e.child);for(let r=0;r<o.length;r++){const n=o[r];if(e.child[n]&&e.child[n].length>1){i+='"'+n+'" : [ ';for(let r in e.child[n])i+=a(e.child[n][r],t)+" , ";i=i.substr(0,i.length-1)+" ] "}else i+='"'+n+'" : '+a(e.child[n][0],t)+" ,"}return n.merge(i,e.attrsMap),n.isEmptyObject(i)?n.isExist(e.val)?e.val:"":(n.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(i+='"'+t.textNodeName+'" : '+(!0!==(s=e.val)&&!1!==s&&isNaN(s)?'"'+s+'"':s)),","===i[i.length-1]&&(i=i.substr(0,i.length-2)),i+"}");var s};t.convertToJsonString=function(e,t){return(t=i(t,o.defaultOptions,o.props)).indentBy=t.indentBy||"",a(e,t,0)}},function(e,t,r){"use strict";const n=r(5).buildOptions,i={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataTagName:!1,cdataPositionChar:"\\c",format:!1,indentBy:" ",supressEmptyNode:!1,tagValueProcessor:function(e){return e},attrValueProcessor:function(e){return e}},o=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","cdataTagName","cdataPositionChar","format","indentBy","supressEmptyNode","tagValueProcessor","attrValueProcessor","rootNodeName"];function a(e){this.options=n(e,i,o),this.options.ignoreAttributes||this.options.attrNodeName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=v),this.options.cdataTagName?this.isCDATA=g:this.isCDATA=function(){return!1},this.replaceCDATAstr=u,this.replaceCDATAarr=c,this.processTextOrObjNode=s,this.options.format?(this.indentate=p,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=h,this.buildObjNode=d):(this.buildTextNode=f,this.buildObjNode=l),this.buildTextValNode=f,this.buildObjectNode=l}function s(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextNode(n.val,t,n.attrStr,r):this.buildObjNode(n.val,t,n.attrStr,r)}function u(e,t){return e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e?e+"<![CDATA["+t+"]]"+this.tagEndChar:e.replace(this.options.cdataPositionChar,"<![CDATA["+t+"]]"+this.tagEndChar)}function c(e,t){if(e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e)return e+"<![CDATA["+t.join("]]><![CDATA[")+"]]"+this.tagEndChar;for(let r in t)e=e.replace(this.options.cdataPositionChar,"<![CDATA["+t[r]+"]]>");return e+this.newLine}function l(e,t,r,n){return r&&-1===e.indexOf("<")?this.indentate(n)+"<"+t+r+">"+e+"</"+t+this.tagEndChar:this.indentate(n)+"<"+t+r+this.tagEndChar+e+this.indentate(n)+"</"+t+this.tagEndChar}function d(e,t,r,n){return""!==e?this.buildObjectNode(e,t,r,n):this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function f(e,t,r,n){return this.indentate(n)+"<"+t+r+">"+this.options.tagValueProcessor(e)+"</"+t+this.tagEndChar}function h(e,t,r,n){return""!==e?this.buildTextValNode(e,t,r,n):this.indentate(n)+"<"+t+r+"/"+this.tagEndChar}function p(e){return this.options.indentBy.repeat(e)}function v(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}function g(e){return e===this.options.cdataTagName}a.prototype.parse=function(e){return Array.isArray(e)&&this.options.rootNodeName&&this.options.rootNodeName.length>1&&(e={[this.options.rootNodeName]:e}),this.j2x(e,0).val},a.prototype.j2x=function(e,t){let r="",n="";for(let i in e)if(void 0===e[i]);else if(null===e[i])n+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)n+=this.buildTextNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);o?r+=" "+o+'="'+this.options.attrValueProcessor(""+e[i])+'"':this.isCDATA(i)?e[this.options.textNodeName]?n+=this.replaceCDATAstr(e[this.options.textNodeName],e[i]):n+=this.replaceCDATAstr("",e[i]):i===this.options.textNodeName?e[this.options.cdataTagName]||(n+=this.options.tagValueProcessor(""+e[i])):n+=this.buildTextNode(e[i],i,"",t)}else if(Array.isArray(e[i]))if(this.isCDATA(i))n+=this.indentate(t),e[this.options.textNodeName]?n+=this.replaceCDATAarr(e[this.options.textNodeName],e[i]):n+=this.replaceCDATAarr("",e[i]);else{const r=e[i].length;for(let o=0;o<r;o++){const r=e[i][o];void 0===r||(n+=null===r?this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof r?this.processTextOrObjNode(r,i,t):this.buildTextNode(r,i,"",t))}}else if(this.options.attrNodeName&&i===this.options.attrNodeName){const t=Object.keys(e[i]),n=t.length;for(let o=0;o<n;o++)r+=" "+t[o]+'="'+this.options.attrValueProcessor(""+e[i][t[o]])+'"'}else n+=this.processTextOrObjNode(e[i],i,t);return{attrStr:r,val:n}},e.exports=a},function(e,t,r){var n,i,o=r(22),a=r(23),s=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,l=t||[],d=(e=e||{}).node||n,f=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==f){var h=o();null==d&&(d=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==f&&(f=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=p-s+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=f;var y=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var m=p/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=f>>>8|128,l[c++]=255&f;for(var b=0;b<6;++b)l[c+b]=d[b];return t||a(l)}},function(e,t,r){var n=r(22),i=r(23);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(24),i=r(26),o=r(73),a=r(81),s=r(83),u=r(12),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new i.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new n.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(65);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(70);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(71);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(72);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(29),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(13).Buffer)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
24
24
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
25
|
-
t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(0).__exportStar)(r(74),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(0),i=r(27),o=r(75),a=r(76),s=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(27),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=0;d<n.BLOCK_SIZE;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var f=this.temp[d-2],h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,p=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(p+this.temp[d-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(n.KEY[d]+this.temp[d]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;l=c,c=u,u=s,s=a+v|0,a=o,o=i,i=r,r=v+g|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(77);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(78);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(79);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(80);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(95),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(82),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(0),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!a(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(84),t),n.__exportStar(r(85),t),n.__exportStar(r(86),t),n.__exportStar(r(87),t),n.__exportStar(r(88),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,i=t.subtle;return n.map((function(e){return i[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(96),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var n=r(0),i=r(28),o=r(6),a=function(){function e(){this.crc32=new o.Crc32}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,(0,i.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},function(e,t,r){"use strict";r.r(t),r.d(t,"Storage",(function(){return ol})),r.d(t,"StorageClass",(function(){return tl})),r.d(t,"AWSS3Provider",(function(){return Xc}));var n=r(2),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;Object.create;var c=r(0),l=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach((function(e){r.add(e.middleware,Object(c.__assign)({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,Object(c.__assign)({},e))})),r},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(c.__spread)(i(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(c.__spread)(i(e)))})),t},o=function(){var r,n=[],o=[],a={};return e.forEach((function(e){var t=Object(c.__assign)(Object(c.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),n.push(t)})),t.forEach((function(e){var t=Object(c.__assign)(Object(c.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=n,r.sort((function(e,t){return d[t.step]-d[e.step]||f[t.priority||"normal"]-f[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,Object(c.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,n){void 0===n&&(n={});var i=n.name,o=n.override,a=Object(c.__assign)({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var s=e.findIndex((function(e){return e.name===i})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'+i+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(s,1)}r.add(i)}e.push(a)},addRelativeTo:function(e,n){var i=n.name,o=n.override,a=Object(c.__assign)({middleware:e},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var s=t.findIndex((function(e){return e.name===i})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'+i+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(s,1)}r.add(i)}t.push(a)},clone:function(){return n(l())},use:function(e){e.applyToStack(a)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(l());return t.use(e),t},applyToStack:n,resolve:function(e,t){var r,n;try{for(var i=Object(c.__values)(o().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e}};return a},d={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},f={high:3,normal:2,low:1},h=function(){function e(e){this.middlewareStack=l(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),p=function(){this.middlewareStack=l()};function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var g=function(e){return Array.isArray(e)?e:[e]},y=function(e){for(var t in e)e.hasOwnProperty(t)&&void 0!==e[t]["#text"]?e[t]=e[t]["#text"]:"object"==typeof e[t]&&null!==e[t]&&(e[t]=y(e[t]));return e},m=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(c.__spread)([null],arguments)),r=new t;return Object.setPrototypeOf(r,e.prototype),r};m.prototype=Object.create(String.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(m,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(c.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(m);var b=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(e){var t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds();return b[n]+", "+(i<10?"0"+i:""+i)+" "+S[r]+" "+t+" "+(o<10?"0"+o:""+o)+":"+(a<10?"0"+a:""+a)+":"+(s<10?"0"+s:""+s)+" GMT"}var E,_,C,A,O,x,k,P,L,T,M,j,N,R,U,z,I,B,D,K,F,q,H,V,G,W,$,Y,Z,X,J,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,le,de,fe,he,pe,ve,ge,ye,me,be,Se,we,Ee,_e,Ce,Ae,Oe,xe,ke,Pe,Le,Te,Me,je,Ne,Re,Ue,ze,Ie,Be,De,Ke,Fe,qe,He,Ve,Ge,We,$e,Ye,Ze,Xe,Je,Qe,et,tt,rt,nt,it,ot,at,st,ut,ct,lt,dt,ft,ht,pt,vt,gt,yt,mt,bt,St,wt,Et,_t,Ct,At,Ot,xt,kt,Pt,Lt,Tt,Mt,jt,Nt,Rt,Ut,zt,It,Bt,Dt,Kt,Ft,qt,Ht,Vt,Gt,Wt,$t,Yt,Zt,Xt,Jt,Qt,er,tr,rr,nr,ir,or,ar,sr,ur,cr,lr,dr,fr,hr,pr,vr,gr,yr,mr,br,Sr,wr,Er,_r,Cr,Ar,Or,xr,kr,Pr,Lr,Tr,Mr,jr,Nr,Rr,Ur,zr,Ir,Br,Dr,Kr,Fr,qr,Hr,Vr,Gr,Wr,$r,Yr,Zr,Xr,Jr,Qr,en,tn,rn,nn,on,an,sn,un,cn,ln,dn,fn,hn,pn,vn,gn,yn,mn,bn,Sn,wn,En,_n,Cn,An,On,xn,kn,Pn,Ln,Tn,Mn,jn,Nn,Rn,Un,zn,In,Bn,Dn,Kn,Fn,qn,Hn,Vn,Gn,Wn,$n,Yn,Zn,Xn,Jn,Qn,ei,ti,ri,ni,ii="***SensitiveInformation***";(E||(E={})).filterSensitiveLog=function(e){return a({},e)},(_||(_={})).filterSensitiveLog=function(e){return a({},e)},(C||(C={})).filterSensitiveLog=function(e){return a({},e)},(A||(A={})).filterSensitiveLog=function(e){return a({},e)},(O||(O={})).filterSensitiveLog=function(e){return a({},e)},(x||(x={})).filterSensitiveLog=function(e){return a({},e)},(k||(k={})).filterSensitiveLog=function(e){return a({},e)},(P||(P={})).filterSensitiveLog=function(e){return a({},e)},(L||(L={})).filterSensitiveLog=function(e){return a({},e)},(T||(T={})).filterSensitiveLog=function(e){return a({},e)},(M||(M={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(j||(j={})).filterSensitiveLog=function(e){return a({},e)},(N||(N={})).filterSensitiveLog=function(e){return a({},e)},(R||(R={})).filterSensitiveLog=function(e){return a({},e)},(U||(U={})).filterSensitiveLog=function(e){return a({},e)},(z||(z={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(I||(I={})).filterSensitiveLog=function(e){return a(a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:ii})},(B||(B={})).filterSensitiveLog=function(e){return a({},e)},(D||(D={})).filterSensitiveLog=function(e){return a({},e)},(K||(K={})).filterSensitiveLog=function(e){return a({},e)},(F||(F={})).filterSensitiveLog=function(e){return a({},e)},(q||(q={})).filterSensitiveLog=function(e){return a({},e)},(H||(H={})).filterSensitiveLog=function(e){return a({},e)},(V||(V={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(G||(G={})).filterSensitiveLog=function(e){return a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(W||(W={})).filterSensitiveLog=function(e){return a({},e)},($||($={})).filterSensitiveLog=function(e){return a({},e)},(Y||(Y={})).filterSensitiveLog=function(e){return a({},e)},(Z||(Z={})).filterSensitiveLog=function(e){return a({},e)},(X||(X={})).filterSensitiveLog=function(e){return a({},e)},(J||(J={})).filterSensitiveLog=function(e){return a({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return a({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return a({},e)},(te||(te={})).filterSensitiveLog=function(e){return a({},e)},(re||(re={})).filterSensitiveLog=function(e){return a({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return a({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return a({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return a({},e)},(ae||(ae={})).filterSensitiveLog=function(e){return a({},e)},(se||(se={})).filterSensitiveLog=function(e){return a({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return a({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return a({},e)},(le||(le={})).filterSensitiveLog=function(e){return a({},e)},(de||(de={})).filterSensitiveLog=function(e){return a({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return a({},e)},(he||(he={})).filterSensitiveLog=function(e){return a({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return a({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return a({},e)},(ge||(ge={})).filterSensitiveLog=function(e){return a({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return a({},e)},(me||(me={})).filterSensitiveLog=function(e){return a({},e)},(be||(be={})).filterSensitiveLog=function(e){return a({},e)},(Se||(Se={})).filterSensitiveLog=function(e){return a({},e)},(we||(we={})).filterSensitiveLog=function(e){return a({},e)},(Ee||(Ee={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:Ee.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(_e||(_e={})),(Ce||(Ce={})).filterSensitiveLog=function(e){return a({},e)},(Ae||(Ae={})).filterSensitiveLog=function(e){return a({},e)},(Oe||(Oe={})).filterSensitiveLog=function(e){return a({},e)},(xe||(xe={})).filterSensitiveLog=function(e){return a({},e)},(ke||(ke={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:_e.filterSensitiveLog(e.Filter)})},(Pe||(Pe={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfiguration&&{AnalyticsConfiguration:ke.filterSensitiveLog(e.AnalyticsConfiguration)})},(Le||(Le={})).filterSensitiveLog=function(e){return a({},e)},(Te||(Te={})).filterSensitiveLog=function(e){return a({},e)},(Me||(Me={})).filterSensitiveLog=function(e){return a({},e)},(je||(je={})).filterSensitiveLog=function(e){return a({},e)},(Ne||(Ne={})).filterSensitiveLog=function(e){return a(a({},e),e.KMSMasterKeyID&&{KMSMasterKeyID:ii})},(Re||(Re={})).filterSensitiveLog=function(e){return a(a({},e),e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:Ne.filterSensitiveLog(e.ApplyServerSideEncryptionByDefault)})},(Ue||(Ue={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return Re.filterSensitiveLog(e)}))})},(ze||(ze={})).filterSensitiveLog=function(e){return a(a({},e),e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ue.filterSensitiveLog(e.ServerSideEncryptionConfiguration)})},(Ie||(Ie={})).filterSensitiveLog=function(e){return a({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return a({},e)},(De||(De={})).filterSensitiveLog=function(e){return a({},e)},(Ke||(Ke={})).filterSensitiveLog=function(e){return a({},e)},(Fe||(Fe={})).filterSensitiveLog=function(e){return a({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return a({},e)},(He||(He={})).filterSensitiveLog=function(e){return a({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return a(a({},e),e.KeyId&&{KeyId:ii})},(Ge||(Ge={})).filterSensitiveLog=function(e){return a({},e)},(We||(We={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMS&&{SSEKMS:Ve.filterSensitiveLog(e.SSEKMS)})},($e||($e={})).filterSensitiveLog=function(e){return a(a({},e),e.Encryption&&{Encryption:We.filterSensitiveLog(e.Encryption)})},(Ye||(Ye={})).filterSensitiveLog=function(e){return a(a({},e),e.S3BucketDestination&&{S3BucketDestination:$e.filterSensitiveLog(e.S3BucketDestination)})},(Ze||(Ze={})).filterSensitiveLog=function(e){return a({},e)},(Xe||(Xe={})).filterSensitiveLog=function(e){return a({},e)},(Je||(Je={})).filterSensitiveLog=function(e){return a(a({},e),e.Destination&&{Destination:Ye.filterSensitiveLog(e.Destination)})},(Qe||(Qe={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfiguration&&{InventoryConfiguration:Je.filterSensitiveLog(e.InventoryConfiguration)})},(et||(et={})).filterSensitiveLog=function(e){return a({},e)},(tt||(tt={})).filterSensitiveLog=function(e){return a({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:rt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(nt||(nt={})),(it||(it={})).filterSensitiveLog=function(e){return a({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return a({},e)},(at||(at={})).filterSensitiveLog=function(e){return a({},e)},(st||(st={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:nt.filterSensitiveLog(e.Filter)})},(ut||(ut={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return st.filterSensitiveLog(e)}))})},(ct||(ct={})).filterSensitiveLog=function(e){return a({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return a({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return a({},e)},(ft||(ft={})).filterSensitiveLog=function(e){return a({},e)},(ht||(ht={})).filterSensitiveLog=function(e){return a({},e)},(pt||(pt={})).filterSensitiveLog=function(e){return a({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return a({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:gt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(yt||(yt={})),(mt||(mt={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:yt.filterSensitiveLog(e.Filter)})},(bt||(bt={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfiguration&&{MetricsConfiguration:mt.filterSensitiveLog(e.MetricsConfiguration)})},(St||(St={})).filterSensitiveLog=function(e){return a({},e)},(wt||(wt={})).filterSensitiveLog=function(e){return a({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return a({},e)},(_t||(_t={})).filterSensitiveLog=function(e){return a({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return a({},e)},(At||(At={})).filterSensitiveLog=function(e){return a({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return a({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return a({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return a({},e)},(Pt||(Pt={})).filterSensitiveLog=function(e){return a({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return a({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return a({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return a({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return a({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return a({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return a({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return a({},e)},(zt||(zt={})).filterSensitiveLog=function(e){return a({},e)},(It||(It={})).filterSensitiveLog=function(e){return a({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return a({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return a({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return a({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return a({},e)},(qt||(qt={})).filterSensitiveLog=function(e){return a({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return a({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:Vt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Gt||(Gt={})),(Wt||(Wt={})).filterSensitiveLog=function(e){return a({},e)},($t||($t={})).filterSensitiveLog=function(e){return a({},e)},(Yt||(Yt={})).filterSensitiveLog=function(e){return a({},e)},(Zt||(Zt={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:Gt.filterSensitiveLog(e.Filter)})},(Xt||(Xt={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return Zt.filterSensitiveLog(e)}))})},(Jt||(Jt={})).filterSensitiveLog=function(e){return a(a({},e),e.ReplicationConfiguration&&{ReplicationConfiguration:Xt.filterSensitiveLog(e.ReplicationConfiguration)})},(Qt||(Qt={})).filterSensitiveLog=function(e){return a({},e)},(er||(er={})).filterSensitiveLog=function(e){return a({},e)},(tr||(tr={})).filterSensitiveLog=function(e){return a({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return a({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return a({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return a({},e)},(or||(or={})).filterSensitiveLog=function(e){return a({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return a({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return a({},e)},(ur||(ur={})).filterSensitiveLog=function(e){return a({},e)},(cr||(cr={})).filterSensitiveLog=function(e){return a({},e)},(lr||(lr={})).filterSensitiveLog=function(e){return a({},e)},(dr||(dr={})).filterSensitiveLog=function(e){return a({},e)},(fr||(fr={})).filterSensitiveLog=function(e){return a({},e)},(hr||(hr={})).filterSensitiveLog=function(e){return a({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(vr||(vr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(gr||(gr={})).filterSensitiveLog=function(e){return a({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return a({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return a({},e)},(br||(br={})).filterSensitiveLog=function(e){return a({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return a({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return a({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return a({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return a({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return a({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return a({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return a({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return a({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return a({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return a({},e)},(Lr||(Lr={})).filterSensitiveLog=function(e){return a({},e)},(Tr||(Tr={})).filterSensitiveLog=function(e){return a({},e)},(Mr||(Mr={})).filterSensitiveLog=function(e){return a({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return a({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return a({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return a({},e)},(Ur||(Ur={})).filterSensitiveLog=function(e){return a({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return a({},e)},(Ir||(Ir={})).filterSensitiveLog=function(e){return a({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return a({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(Kr||(Kr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(Fr||(Fr={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfigurationList&&{AnalyticsConfigurationList:e.AnalyticsConfigurationList.map((function(e){return ke.filterSensitiveLog(e)}))})},(qr||(qr={})).filterSensitiveLog=function(e){return a({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return a({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return a({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map((function(e){return Je.filterSensitiveLog(e)}))})},(Wr||(Wr={})).filterSensitiveLog=function(e){return a({},e)},($r||($r={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfigurationList&&{MetricsConfigurationList:e.MetricsConfigurationList.map((function(e){return mt.filterSensitiveLog(e)}))})},(Yr||(Yr={})).filterSensitiveLog=function(e){return a({},e)},(Zr||(Zr={})).filterSensitiveLog=function(e){return a({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return a({},e)},(Jr||(Jr={})).filterSensitiveLog=function(e){return a({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return a({},e)},(en||(en={})).filterSensitiveLog=function(e){return a({},e)},(tn||(tn={})).filterSensitiveLog=function(e){return a({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return a({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return a({},e)},(on||(on={})).filterSensitiveLog=function(e){return a({},e)},(an||(an={})).filterSensitiveLog=function(e){return a({},e)},(sn||(sn={})).filterSensitiveLog=function(e){return a({},e)},(un||(un={})).filterSensitiveLog=function(e){return a({},e)},(cn||(cn={})).filterSensitiveLog=function(e){return a({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return a({},e)},(dn||(dn={})).filterSensitiveLog=function(e){return a({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return a({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return a({},e)},(pn||(pn={})).filterSensitiveLog=function(e){return a({},e)},(vn||(vn={})).filterSensitiveLog=function(e){return a({},e)},(gn||(gn={})).filterSensitiveLog=function(e){return a({},e)},(yn||(yn={})).filterSensitiveLog=function(e){return a({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfiguration&&{AnalyticsConfiguration:ke.filterSensitiveLog(e.AnalyticsConfiguration)})},(bn||(bn={})).filterSensitiveLog=function(e){return a({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return a({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return a(a({},e),e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ue.filterSensitiveLog(e.ServerSideEncryptionConfiguration)})},(En||(En={})).filterSensitiveLog=function(e){return a({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfiguration&&{InventoryConfiguration:Je.filterSensitiveLog(e.InventoryConfiguration)})},(Cn||(Cn={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return st.filterSensitiveLog(e)}))})},(An||(An={})).filterSensitiveLog=function(e){return a(a({},e),e.LifecycleConfiguration&&{LifecycleConfiguration:Cn.filterSensitiveLog(e.LifecycleConfiguration)})},(On||(On={})).filterSensitiveLog=function(e){return a({},e)},(xn||(xn={})).filterSensitiveLog=function(e){return a({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfiguration&&{MetricsConfiguration:mt.filterSensitiveLog(e.MetricsConfiguration)})},(Pn||(Pn={})).filterSensitiveLog=function(e){return a({},e)},(Ln||(Ln={})).filterSensitiveLog=function(e){return a({},e)},(Tn||(Tn={})).filterSensitiveLog=function(e){return a({},e)},(Mn||(Mn={})).filterSensitiveLog=function(e){return a(a({},e),e.ReplicationConfiguration&&{ReplicationConfiguration:Xt.filterSensitiveLog(e.ReplicationConfiguration)})},(jn||(jn={})).filterSensitiveLog=function(e){return a({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return a({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return a({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return a({},e)},(zn||(zn={})).filterSensitiveLog=function(e){return a({},e)},(In||(In={})).filterSensitiveLog=function(e){return a({},e)},(Bn||(Bn={})).filterSensitiveLog=function(e){return a({},e)},(Dn||(Dn={})).filterSensitiveLog=function(e){return a({},e)},(Kn||(Kn={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(Fn||(Fn={})).filterSensitiveLog=function(e){return a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(qn||(qn={})).filterSensitiveLog=function(e){return a({},e)},(Hn||(Hn={})).filterSensitiveLog=function(e){return a({},e)},(Vn||(Vn={})).filterSensitiveLog=function(e){return a({},e)},(Gn||(Gn={})).filterSensitiveLog=function(e){return a({},e)},(Wn||(Wn={})).filterSensitiveLog=function(e){return a({},e)},($n||($n={})).filterSensitiveLog=function(e){return a({},e)},(Yn||(Yn={})).filterSensitiveLog=function(e){return a({},e)},(Zn||(Zn={})).filterSensitiveLog=function(e){return a({},e)},(Xn||(Xn={})).filterSensitiveLog=function(e){return a({},e)},(Jn||(Jn={})).filterSensitiveLog=function(e){return a({},e)},(Qn||(Qn={})).filterSensitiveLog=function(e){return a({},e)},(ei||(ei={})).filterSensitiveLog=function(e){return a({},e)},(ti||(ti={})).filterSensitiveLog=function(e){return a({},e)},(ri||(ri={})).filterSensitiveLog=function(e){return a({},e)},(ni||(ni={})).filterSensitiveLog=function(e){return a(a({},e),e.KMSKeyId&&{KMSKeyId:ii})};var oi=r(1);var ai=function(){function e(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}return e.prototype.withName=function(e){return this.name=e,this},e.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},e.prototype.addChildNode=function(e){return this.children.push(e),this},e.prototype.removeAttribute=function(e){return delete this.attributes[e],this},e.prototype.toString=function(){var e,t,r=Boolean(this.children.length),n="<"+this.name,i=this.attributes;try{for(var o=Object(c.__values)(Object.keys(i)),a=o.next();!a.done;a=o.next()){var s=a.value,u=i[s];null!=u&&(n+=" "+s+'="'+(""+u).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")+'"')}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n+(r?">"+this.children.map((function(e){return e.toString()})).join("")+"</"+this.name+">":"/>")},e}();var si=function(){function e(e){this.value=e}return e.prototype.toString=function(){return(""+this.value).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e}(),ui=r(30),ci=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":return[3,2]}return[3,4];case 2:return s=[{}],[4,Ei(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},li=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},di=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":return[3,2]}return[3,4];case 2:return s=[{}],[4,_i(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},fi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},hi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},pi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],f={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(f.body=u.sent(),f)])),o="UnknownError",o=Ui(e,r.body),o){case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":return[3,2];case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":return[3,4]}return[3,6];case 2:return s=[{}],[4,bi(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,7];case 4:return c=[{}],[4,wi(r,t)];case 5:return i=a.apply(void 0,[a.apply(void 0,c.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,7];case 6:l=r.body,o=l.code||l.Code||o,i=a(a({},l),{name:""+o,message:l.message||l.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=7;case 7:return d=i.message||i.Message||o,i.message=d,delete i.Message,[2,Promise.reject(Object.assign(new Error(d),i))]}}))}))},vi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":return[3,2]}return[3,4];case 2:return s=[{}],[4,Si(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},gi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},yi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},mi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},bi=function(e,t){return s(void 0,void 0,void 0,(function(){var t,r;return u(this,(function(n){return t={name:"InvalidObjectState",$fault:"client",$metadata:Mi(e),AccessTier:void 0,StorageClass:void 0},void 0!==(r=e.body).AccessTier&&(t.AccessTier=r.AccessTier),void 0!==r.StorageClass&&(t.StorageClass=r.StorageClass),[2,t]}))}))},Si=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchBucket",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},wi=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchKey",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},Ei=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchUpload",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},_i=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"ObjectNotInActiveTierError",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},Ci=function(e,t){var r=new ai("CompletedMultipartUpload");void 0!==e.Parts&&null!==e.Parts&&Ai(e.Parts,t).map((function(e){e=e.withName("Part"),r.addChildNode(e)}));return r},Ai=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r=new ai("CompletedPart");if(void 0!==e.ETag&&null!==e.ETag){var n=new ai("ETag").addChildNode(new si(e.ETag)).withName("ETag");r.addChildNode(n)}if(void 0!==e.PartNumber&&null!==e.PartNumber){n=new ai("PartNumber").addChildNode(new si(String(e.PartNumber))).withName("PartNumber");r.addChildNode(n)}return r}(e).withName("member")}))},Oi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={Prefix:void 0};return void 0!==e.Prefix&&(r.Prefix=e.Prefix),r}(e)}))},xi=function(e,t){var r={ETag:void 0,LastModified:void 0};return void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),r},ki=function(e,t){var r={ID:void 0,DisplayName:void 0};return void 0!==e.ID&&(r.ID=e.ID),void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),r},Pi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={Key:void 0,LastModified:void 0,ETag:void 0,Size:void 0,StorageClass:void 0,Owner:void 0};return void 0!==e.Key&&(r.Key=e.Key),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Size&&(r.Size=parseInt(e.Size)),void 0!==e.StorageClass&&(r.StorageClass=e.StorageClass),void 0!==e.Owner&&(r.Owner=Li(e.Owner,t)),r}(e,t)}))},Li=function(e,t){var r={DisplayName:void 0,ID:void 0};return void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),void 0!==e.ID&&(r.ID=e.ID),r},Ti=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={PartNumber:void 0,LastModified:void 0,ETag:void 0,Size:void 0};return void 0!==e.PartNumber&&(r.PartNumber=parseInt(e.PartNumber)),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Size&&(r.Size=parseInt(e.Size)),r}(e)}))},Mi=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},ji=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Ni=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},Ri=function(e,t){return function(e,t){return ji(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){if(e.length){var t=Object(ui.parse)(e,{attributeNamePrefix:"",ignoreAttributes:!1,parseNodeValue:!1,tagValueProcessor:function(e,t){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<")}}),r=Object.keys(t)[0],n=t[r];return n["#text"]&&(n[r]=n["#text"],delete n["#text"]),y(n)}return{}}))},Ui=function(e,t){return void 0!==t.Code?t.Code:404==e.statusCode?"NotFound":""},zi=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ii=/(\d+\.){3}\d+/,Bi=/\.\./,Di=/\./,Ki=/^(.+\.)?s3[.-]([a-z0-9-]+)\./,Fi=/^s3(-external-1)?\.amazonaws\.com$/,qi=function(e){return Vi(e)?e.replace(/fips-|-fips/,""):e},Hi=function(e){var t=e.match(Ki);return[t[2],e.replace(new RegExp("^"+t[0]),"")]},Vi=function(e){return e.startsWith("fips-")||e.endsWith("-fips")},Gi=function(e,t){return e===t||qi(e)===t||e===qi(t)},Wi=function(e,t){if(void 0===t&&(t={tlsCompatible:!0}),e.length>=64||!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||(null==t?void 0:t.tlsCompatible)&&Di.test(e))throw new Error("Invalid DNS label "+e)},$i=function(e){var t=e.isCustomEndpoint,r=(e.baseHostname,e.dualstackEndpoint),n=e.accelerateEndpoint;if(t){if(r)throw new Error("Dualstack endpoint is not supported with custom endpoint");if(n)throw new Error("Accelerate endpoint is not supported with custom endpoint")}return function(e){return"string"==typeof e.bucketName}(e)?Zi(Object(c.__assign)(Object(c.__assign)({},e),{isCustomEndpoint:t})):Yi(Object(c.__assign)(Object(c.__assign)({},e),{isCustomEndpoint:t}))},Yi=function(e){var t,r=e.isCustomEndpoint,n=e.baseHostname,i=Object(c.__read)(r?[e.clientRegion,n]:(t=n,Fi.test(t)?[t.replace(".amazonaws.com",""),"amazonaws.com"]:Hi(t)),2),o=i[0],a=i[1],s=e.pathStyleEndpoint,u=e.dualstackEndpoint,l=void 0!==u&&u,d=e.accelerateEndpoint,f=void 0!==d&&d,h=e.tlsCompatible,p=void 0===h||h,v=e.useArnRegion,g=e.bucketName,y=e.clientPartition,m=void 0===y?"aws":y,b=e.clientSigningRegion,S=void 0===b?o:b;!function(e){if(e.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!e.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")}({pathStyleEndpoint:s,accelerateEndpoint:f,tlsCompatible:p});var w=g.service,E=g.partition,_=g.accountId,C=g.region,A=g.resource;!function(e){if("s3"!==e&&"s3-outposts"!==e)throw new Error("Expect 's3' or 's3-outposts' in ARN service component")}(w),function(e,t){if(e!==t.clientPartition)throw new Error('Partition in ARN is incompatible, got "'+e+'" but expected "'+t.clientPartition+'"')}(E,{clientPartition:m}),function(e){if(!/[0-9]{12}/.exec(e))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")}(_),function(e,t){if(""===e)throw new Error("ARN region is empty");if(!t.useArnRegion&&!Gi(e,t.clientRegion)&&!Gi(e,t.clientSigningRegion))throw new Error("Region in ARN is incompatible, got "+e+" but expected "+t.clientRegion);if(t.useArnRegion&&Vi(e))throw new Error("Endpoint does not support FIPS region")}(C,{useArnRegion:v,clientRegion:o,clientSigningRegion:S});var O=function(e){var t=e.includes(":")?":":"/",r=Object(c.__read)(e.split(t)),n=r[0],i=r.slice(1);if("accesspoint"===n){if(1!==i.length||""===i[0])throw new Error("Access Point ARN should have one resource accesspoint"+t+"{accesspointname}");return{accesspointName:i[0]}}if("outpost"===n){if(!i[0]||"accesspoint"!==i[1]||!i[2]||3!==i.length)throw new Error("Outpost ARN should have resource outpost"+t+"{outpostId}"+t+"accesspoint"+t+"{accesspointName}");var o=Object(c.__read)(i,3),a=o[0];o[1];return{outpostId:a,accesspointName:o[2]}}throw new Error("ARN resource should begin with 'accesspoint"+t+"' or 'outpost"+t+"'")}(A),x=O.accesspointName,k=O.outpostId;Wi(x+"-"+_,{tlsCompatible:p});var P=v?C:o,L=v?C:S;return k?(function(e){if("s3-outposts"!==e)throw new Error("Expect 's3-posts' in Outpost ARN service component")}(w),Wi(k,{tlsCompatible:p}),function(e){if(e)throw new Error("Dualstack endpoint is not supported with Outpost")}(l),function(e){if(Vi(null!=e?e:""))throw new Error("FIPS region is not supported with Outpost, got "+e)}(P),{bucketEndpoint:!0,hostname:x+"-"+_+"."+k+(r?"":".s3-outposts."+P)+"."+a,signingRegion:L,signingService:"s3-outposts"}):(function(e){if("s3"!==e)throw new Error("Expect 's3' in Accesspoint ARN service component")}(w),{bucketEndpoint:!0,hostname:x+"-"+_+(r?"":".s3-accesspoint"+(l?".dualstack":"")+"."+P)+"."+a,signingRegion:L})},Zi=function(e){var t,r=e.accelerateEndpoint,n=void 0!==r&&r,i=e.clientRegion,o=e.baseHostname,a=e.bucketName,s=e.dualstackEndpoint,u=void 0!==s&&s,l=e.pathStyleEndpoint,d=void 0!==l&&l,f=e.tlsCompatible,h=void 0===f||f,p=e.isCustomEndpoint,v=void 0!==p&&p,g=Object(c.__read)(v?[i,o]:(t=o,Fi.test(t)?["us-east-1","amazonaws.com"]:Hi(t)),2),y=g[0],m=g[1];return d||!function(e){return zi.test(e)&&!Ii.test(e)&&!Bi.test(e)}(a)||h&&Di.test(a)?{bucketEndpoint:!1,hostname:u?"s3.dualstack."+y+"."+m:o}:(n?o="s3-accelerate"+(u?".dualstack":"")+"."+m:u&&(o="s3.dualstack."+y+"."+m),{bucketEndpoint:!0,hostname:a+"."+o})},Xi=function(e){return function(t,r){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E;return Object(c.__generator)(this,(function(_){switch(_.label){case 0:return i=n.input.Bucket,o=e.bucketEndpoint,a=n.request,oi.a.isInstance(a)?e.bucketEndpoint?(a.hostname=i,[3,7]):[3,1]:[3,8];case 1:return"string"==typeof(C=i)&&0===C.indexOf("arn:")&&C.split(":").length>=6?(s=function(e){var t=e.split(":");if(t.length<6||"arn"!==t[0])throw new Error("Malformed ARN");var r=Object(c.__read)(t);return{partition:r[1],service:r[2],region:r[3],accountId:r[4],resource:r.slice(5).join(":")}}(i),u=qi,[4,e.region()]):[3,5];case 2:return m=u.apply(void 0,[_.sent()]),[4,e.regionInfoProvider(m)];case 3:return l=_.sent()||{},d=l.partition,f=l.signingRegion,h=void 0===f?m:f,[4,e.useArnRegion()];case 4:return p=_.sent(),v=$i({bucketName:s,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol,useArnRegion:p,clientPartition:d,clientSigningRegion:h,clientRegion:m,isCustomEndpoint:e.isCustomEndpoint}),w=v.hostname,E=v.bucketEndpoint,g=v.signingRegion,y=v.signingService,g&&g!==h&&(r.signing_region=g),y&&"s3"!==y&&(r.signing_service=y),a.hostname=w,o=E,[3,7];case 5:return b=qi,[4,e.region()];case 6:m=b.apply(void 0,[_.sent()]),S=$i({bucketName:i,clientRegion:m,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol,isCustomEndpoint:e.isCustomEndpoint}),w=S.hostname,E=S.bucketEndpoint,a.hostname=w,o=E,_.label=7;case 7:o&&(a.path=a.path.replace(/^(\/)?[^\/]+/,""),""===a.path&&(a.path="/")),_.label=8;case 8:return[2,t(Object(c.__assign)(Object(c.__assign)({},n),{request:a}))]}var C}))}))}}},Ji={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware",override:!0},Qi=function(e){return{applyToStack:function(t){t.addRelativeTo(Xi(e),Ji)}}};var eo={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},to=function(e){return{applyToStack:function(e){e.add(function(){var e=this;return function(t){return function(r){return Object(c.__awaiter)(e,void 0,void 0,(function(){var e,n;return Object(c.__generator)(this,(function(i){if("string"==typeof(e=r.input.Bucket)&&!("string"==typeof(o=e)&&0===o.indexOf("arn:")&&o.split(":").length>=6)&&e.indexOf("/")>=0)throw(n=new Error("Bucket name shouldn't contain '/', received '"+e+"'")).name="InvalidBucketName",n;var o;return[2,t(Object(c.__assign)({},r))]}))}))}}}(),eo)}}},ro={step:"build",tags:["USE_REGIONAL_ENDPOINT","S3"],name:"useRegionalEndpointMiddleware",override:!0},no=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return n=r.request,!oi.a.isInstance(n)||e.isCustomEndpoint?[2,t(Object(c.__assign)({},r))]:"s3.amazonaws.com"!==n.hostname?[3,1]:(n.hostname="s3.us-east-1.amazonaws.com",[3,3]);case 1:return i="aws-global",[4,e.region()];case 2:i===o.sent()&&(n.hostname="s3.amazonaws.com"),o.label=3;case 3:return[2,t(Object(c.__assign)({},r))]}}))}))}}}(e),ro)}}},io=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},oo=function(e,t){return io(e,t).then((function(e){return t.utf8Encoder(e)}))},ao={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},so=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,l;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,t(r)];case 1:return n=c.sent(),i=n.response,oi.b.isInstance(i)?(o=i.statusCode,a=i.body,o<200&&o>=300?[2,n]:[4,io(a,e)]):[2,n];case 2:return s=c.sent(),[4,oo(s,e)];case 3:if(u=c.sent(),0===s.length)throw(l=new Error("S3 aborted request")).name="InternalError",l;return u&&u.match("<Error>")&&(i.statusCode=400),i.body=s,[2,n]}}))}))}}}(e),ao)}}},uo={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},co={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function lo(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o;return Object(c.__generator)(this,(function(a){switch(a.label){case 0:return[4,r(n)];case 1:return i=a.sent().response,[4,t(i,e)];case 2:return o=a.sent(),[2,{response:i,output:o}]}}))}))}}}(e,r),uo),n.add(function(e,t){return function(r,n){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:i}))]}}))}))}}}(e,t),co)}}}var fo={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},ho=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S;return Object(c.__generator)(this,(function(w){switch(w.label){case 0:t=Object(c.__assign)({},n.input),i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}],w.label=1;case 1:w.trys.push([1,6,7,8]),o=Object(c.__values)(i),a=o.next(),w.label=2;case 2:return a.done?[3,5]:(s=a.value,(u=t[s.target])?(l=ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):"string"==typeof u?e.utf8Decoder(u):new Uint8Array(u),d=e.base64Encoder(l),(f=new e.md5).update(l),h=[Object(c.__assign)({},t)],(S={})[s.target]=d,p=s.hash,g=(v=e).base64Encoder,[4,f.digest()]):[3,4]);case 3:t=c.__assign.apply(void 0,h.concat([(S[p]=g.apply(v,[w.sent()]),S)])),w.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return y=w.sent(),m={error:y},[3,8];case 7:try{a&&!a.done&&(b=o.return)&&b.call(o)}finally{if(m)throw m.error}return[7];case 8:return[2,r(Object(c.__assign)(Object(c.__assign)({},n),{input:t}))]}}))}))}}}(e),fo)}}},po=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(so(t)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CopyObjectCommand",inputFilterSensitiveLog:I.filterSensitiveLog,outputFilterSensitiveLog:z.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.CopySource)&&{"x-amz-copy-source":e.CopySource}),Ni(e.CopySourceIfMatch)&&{"x-amz-copy-source-if-match":e.CopySourceIfMatch}),Ni(e.CopySourceIfModifiedSince)&&{"x-amz-copy-source-if-modified-since":w(e.CopySourceIfModifiedSince).toString()}),Ni(e.CopySourceIfNoneMatch)&&{"x-amz-copy-source-if-none-match":e.CopySourceIfNoneMatch}),Ni(e.CopySourceIfUnmodifiedSince)&&{"x-amz-copy-source-if-unmodified-since":w(e.CopySourceIfUnmodifiedSince).toString()}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.MetadataDirective)&&{"x-amz-metadata-directive":e.MetadataDirective}),Ni(e.TaggingDirective)&&{"x-amz-tagging-directive":e.TaggingDirective}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.CopySourceSSECustomerAlgorithm)&&{"x-amz-copy-source-server-side-encryption-customer-algorithm":e.CopySourceSSECustomerAlgorithm}),Ni(e.CopySourceSSECustomerKey)&&{"x-amz-copy-source-server-side-encryption-customer-key":e.CopySourceSSECustomerKey}),Ni(e.CopySourceSSECustomerKeyMD5)&&{"x-amz-copy-source-server-side-encryption-customer-key-md5":e.CopySourceSSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Ni(e.ExpectedSourceBucketOwner)&&{"x-amz-source-expected-bucket-owner":e.ExpectedSourceBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={"x-id":"CopyObject"},[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"PUT",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,di(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,CopyObjectResult:void 0,CopySourceVersionId:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-copy-source-version-id"]&&(r.CopySourceVersionId=e.headers["x-amz-copy-source-version-id"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return n=i.sent(),r.CopyObjectResult=xi(n,t),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),vo=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"GetObjectCommand",inputFilterSensitiveLog:vr.filterSensitiveLog,outputFilterSensitiveLog:pr.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a({},Ni(e.IfMatch)&&{"if-match":e.IfMatch}),Ni(e.IfModifiedSince)&&{"if-modified-since":w(e.IfModifiedSince).toString()}),Ni(e.IfNoneMatch)&&{"if-none-match":e.IfNoneMatch}),Ni(e.IfUnmodifiedSince)&&{"if-unmodified-since":w(e.IfUnmodifiedSince).toString()}),Ni(e.Range)&&{range:e.Range}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a(a(a(a(a(a(a({"x-id":"GetObject"},void 0!==e.ResponseCacheControl&&{"response-cache-control":e.ResponseCacheControl}),void 0!==e.ResponseContentDisposition&&{"response-content-disposition":e.ResponseContentDisposition}),void 0!==e.ResponseContentEncoding&&{"response-content-encoding":e.ResponseContentEncoding}),void 0!==e.ResponseContentLanguage&&{"response-content-language":e.ResponseContentLanguage}),void 0!==e.ResponseContentType&&{"response-content-type":e.ResponseContentType}),void 0!==e.ResponseExpires&&{"response-expires":(e.ResponseExpires.toISOString().split(".")[0]+"Z").toString()}),void 0!==e.VersionId&&{versionId:e.VersionId}),void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){return 200!==e.statusCode&&e.statusCode>=300?[2,pi(e,t)]:(r={$metadata:Mi(e),AcceptRanges:void 0,Body:void 0,BucketKeyEnabled:void 0,CacheControl:void 0,ContentDisposition:void 0,ContentEncoding:void 0,ContentLanguage:void 0,ContentLength:void 0,ContentRange:void 0,ContentType:void 0,DeleteMarker:void 0,ETag:void 0,Expiration:void 0,Expires:void 0,LastModified:void 0,Metadata:void 0,MissingMeta:void 0,ObjectLockLegalHoldStatus:void 0,ObjectLockMode:void 0,ObjectLockRetainUntilDate:void 0,PartsCount:void 0,ReplicationStatus:void 0,RequestCharged:void 0,Restore:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,StorageClass:void 0,TagCount:void 0,VersionId:void 0,WebsiteRedirectLocation:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["accept-ranges"]&&(r.AcceptRanges=e.headers["accept-ranges"]),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-restore"]&&(r.Restore=e.headers["x-amz-restore"]),void 0!==e.headers["last-modified"]&&(r.LastModified=new Date(e.headers["last-modified"])),void 0!==e.headers["content-length"]&&(r.ContentLength=parseInt(e.headers["content-length"],10)),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-missing-meta"]&&(r.MissingMeta=parseInt(e.headers["x-amz-missing-meta"],10)),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["cache-control"]&&(r.CacheControl=e.headers["cache-control"]),void 0!==e.headers["content-disposition"]&&(r.ContentDisposition=e.headers["content-disposition"]),void 0!==e.headers["content-encoding"]&&(r.ContentEncoding=e.headers["content-encoding"]),void 0!==e.headers["content-language"]&&(r.ContentLanguage=e.headers["content-language"]),void 0!==e.headers["content-range"]&&(r.ContentRange=e.headers["content-range"]),void 0!==e.headers["content-type"]&&(r.ContentType=e.headers["content-type"]),void 0!==e.headers.expires&&(r.Expires=new Date(e.headers.expires)),void 0!==e.headers["x-amz-website-redirect-location"]&&(r.WebsiteRedirectLocation=e.headers["x-amz-website-redirect-location"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-storage-class"]&&(r.StorageClass=e.headers["x-amz-storage-class"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-replication-status"]&&(r.ReplicationStatus=e.headers["x-amz-replication-status"]),void 0!==e.headers["x-amz-mp-parts-count"]&&(r.PartsCount=parseInt(e.headers["x-amz-mp-parts-count"],10)),void 0!==e.headers["x-amz-tagging-count"]&&(r.TagCount=parseInt(e.headers["x-amz-tagging-count"],10)),void 0!==e.headers["x-amz-object-lock-mode"]&&(r.ObjectLockMode=e.headers["x-amz-object-lock-mode"]),void 0!==e.headers["x-amz-object-lock-retain-until-date"]&&(r.ObjectLockRetainUntilDate=new Date(e.headers["x-amz-object-lock-retain-until-date"])),void 0!==e.headers["x-amz-object-lock-legal-hold"]&&(r.ObjectLockLegalHoldStatus=e.headers["x-amz-object-lock-legal-hold"]),Object.keys(e.headers).forEach((function(t){void 0===r.Metadata&&(r.Metadata={}),t.startsWith("x-amz-meta-")&&(r.Metadata[t.substring(11)]=e.headers[t])})),n=e.body,r.Body=n,[2,Promise.resolve(r)])}))}))}(e,t)},t}(p),go=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"DeleteObjectCommand",inputFilterSensitiveLog:se.filterSensitiveLog,outputFilterSensitiveLog:ae.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a({},Ni(e.MFA)&&{"x-amz-mfa":e.MFA}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.BypassGovernanceRetention)&&{"x-amz-bypass-governance-retention":e.BypassGovernanceRetention.toString()}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({"x-id":"DeleteObject"},void 0!==e.VersionId&&{versionId:e.VersionId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,hi(e,t)]:(r={$metadata:Mi(e),DeleteMarker:void 0,RequestCharged:void 0,VersionId:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),yo=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"ListObjectsV2Command",inputFilterSensitiveLog:un.filterSensitiveLog,outputFilterSensitiveLog:sn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",v(i)),o=a(a(a(a(a(a(a({"list-type":"2"},void 0!==e.Delimiter&&{delimiter:e.Delimiter}),void 0!==e.EncodingType&&{"encoding-type":e.EncodingType}),void 0!==e.MaxKeys&&{"max-keys":e.MaxKeys.toString()}),void 0!==e.Prefix&&{prefix:e.Prefix}),void 0!==e.ContinuationToken&&{"continuation-token":e.ContinuationToken}),void 0!==e.FetchOwner&&{"fetch-owner":e.FetchOwner.toString()}),void 0!==e.StartAfter&&{"start-after":e.StartAfter}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,vi(e,t)]:(r={$metadata:Mi(e),CommonPrefixes:void 0,Contents:void 0,ContinuationToken:void 0,Delimiter:void 0,EncodingType:void 0,IsTruncated:void 0,KeyCount:void 0,MaxKeys:void 0,Name:void 0,NextContinuationToken:void 0,Prefix:void 0,StartAfter:void 0},[4,Ri(e.body,t)]);case 1:return""===(n=i.sent()).CommonPrefixes&&(r.CommonPrefixes=[]),void 0!==n.CommonPrefixes&&(r.CommonPrefixes=Oi(g(n.CommonPrefixes),t)),""===n.Contents&&(r.Contents=[]),void 0!==n.Contents&&(r.Contents=Pi(g(n.Contents),t)),void 0!==n.ContinuationToken&&(r.ContinuationToken=n.ContinuationToken),void 0!==n.Delimiter&&(r.Delimiter=n.Delimiter),void 0!==n.EncodingType&&(r.EncodingType=n.EncodingType),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.KeyCount&&(r.KeyCount=parseInt(n.KeyCount)),void 0!==n.MaxKeys&&(r.MaxKeys=parseInt(n.MaxKeys)),void 0!==n.Name&&(r.Name=n.Name),void 0!==n.NextContinuationToken&&(r.NextContinuationToken=n.NextContinuationToken),void 0!==n.Prefix&&(r.Prefix=n.Prefix),void 0!==n.StartAfter&&(r.StartAfter=n.StartAfter),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),mo=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,bo)},bo=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function So(e){var t,r,n=[];try{for(var i=Object(c.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=mo(a),Array.isArray(s))for(var u=0,l=s.length;u<l;u++)n.push(a+"="+mo(s[u]));else{var d=a;(s||"string"==typeof s)&&(d+="="+mo(s)),n.push(d)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}function wo(e){var t=e.port,r=e.query,n=e.protocol,i=e.path,o=e.hostname;n&&":"!==n.substr(-1)&&(n+=":"),t&&(o+=":"+t),i&&"/"!==i.charAt(0)&&(i="/"+i);var a=r?So(r):"";return a&&"?"!==a[0]&&(a="?"+a),n+"//"+o+i+a}function Eo(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i=this;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return r=function(e){return function(e){return Object(c.__awaiter)(i,void 0,void 0,(function(){return Object(c.__generator)(this,(function(t){return[2,{output:{request:e.request},response:void 0}]}))}))}},(n=e.middlewareStack.clone()).add(r,{step:"build",priority:"low"}),[4,t.resolveMiddleware(n,e.config,void 0)(t).then((function(e){return e.output.request}))];case 1:return[2,o.sent()]}}))}))}for(var _o={},Co={},Ao=0;Ao<256;Ao++){var Oo=Ao.toString(16).toLowerCase();1===Oo.length&&(Oo="0"+Oo),_o[Ao]=Oo,Co[Oo]=Ao}function xo(e){for(var t="",r=0;r<e.byteLength;r++)t+=_o[e[r]];return t}var ko="X-Amz-Date".toLowerCase(),Po=["authorization",ko,"date"],Lo="X-Amz-Signature".toLowerCase(),To="X-Amz-Security-Token".toLowerCase(),Mo={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},jo=/^proxy-/,No=/^sec-/,Ro="AWS4-HMAC-SHA256-PAYLOAD",Uo={},zo=[];function Io(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function Bo(e,t,r){var n=new e(t);return n.update(r),n.digest()}function Do(e,t,r){var n,i,o=e.headers,a={};try{for(var s=Object(c.__values)(Object.keys(o).sort()),u=s.next();!u.done;u=s.next()){var l=u.value,d=l.toLowerCase();(d in Mo||(null==t?void 0:t.has(d))||jo.test(d)||No.test(d))&&(!r||r&&!r.has(d))||(a[d]=o[l].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a}var Ko=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Fo)},Fo=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function qo(e,t){var r=e.headers,n=e.body;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:try{for(e=Object(c.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(f=n,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(n),s=xo,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[d.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))}function Ho(e){var t=e.headers,r=e.query,n=Object(c.__rest)(e,["headers","query"]);return Object(c.__assign)(Object(c.__assign)({},n),{headers:Object(c.__assign)({},t),query:r?Vo(r):void 0})}function Vo(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return Object(c.__assign)(Object(c.__assign)({},t),((n={})[r]=Array.isArray(i)?Object(c.__spread)(i):i,n))}),{})}function Go(e){var t,r;e="function"==typeof e.clone?e.clone():Ho(e);try{for(var n=Object(c.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Po.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Wo(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var $o=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Xo(n),this.credentialProvider=Jo(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O;return Object(c.__generator)(this,(function(x){switch(x.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,l=t.signingRegion,d=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),null==l?[3,2]:(p=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return h=p,v=Yo(n),g=v.longDate,y=v.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=Io(y,h,null!=d?d:this.service),b=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():Ho(e),a=o.headers,s=o.query,u=void 0===s?{}:s;try{for(var l=Object(c.__values)(Object.keys(a)),d=l.next();!d.done;d=l.next()){var f=d.value,h=f.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[f]=a[f],delete a[f])}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return Object(c.__assign)(Object(c.__assign)({},e),{headers:a,query:u})}(Go(e),{unhoistableHeaders:s}),f.sessionToken&&(b.query["X-Amz-Security-Token"]=f.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=f.accessKeyId+"/"+m,b.query["X-Amz-Date"]=g,b.query["X-Amz-Expires"]=o.toString(10),S=Do(b,a,u),b.query["X-Amz-SignedHeaders"]=Zo(S),w=b.query,E="X-Amz-Signature",_=this.getSignature,C=[g,m,this.getSigningKey(f,h,y,d)],A=this.createCanonicalRequest,O=[b,S],[4,qo(e,this.sha256)]);case 5:return[4,_.apply(this,C.concat([A.apply(this,O.concat([x.sent()]))]))];case 6:return w[E]=x.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,i,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=c.sent(),c.label=3;case 3:return e=t,i=Yo(o),l=i.shortDate,d=i.longDate,f=Io(l,e,null!=u?u:this.service),[4,qo({headers:{},body:n},this.sha256)];case 4:return h=c.sent(),(p=new this.sha256).update(r),g=xo,[4,p.digest()];case 5:return v=g.apply(void 0,[c.sent()]),y=[Ro,d,f,a,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,l,d,f;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.credentialProvider()];case 1:return t=c.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=c.sent(),c.label=4;case 4:return r=n,s=Yo(i).shortDate,d=(l=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(d.apply(l,[void 0,c.sent()]))).update(e),f=xo,[4,u.digest()];case 6:return[2,f.apply(void 0,[c.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=m.sent(),m.label=4;case 4:return r=n,l=Go(e),d=Yo(i),f=d.longDate,h=d.shortDate,p=Io(h,r,null!=u?u:this.service),l.headers[ko]=f,t.sessionToken&&(l.headers[To]=t.sessionToken),[4,qo(l,this.sha256)];case 5:return v=m.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=Object(c.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",l.headers)&&this.applyChecksum&&(l.headers["x-amz-content-sha256"]=v),g=Do(l,a,o),[4,this.getSignature(f,p,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(l,g,v))];case 6:return y=m.sent(),l.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Zo(g)+", Signature="+y,[2,l]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===Lo)return"continue";o.push(e);var t=i[e];"string"==typeof t?a[e]=Ko(e)+"="+Ko(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([Ko(e)+"="+Ko(r)])}),[]).join("&"))};try{for(var u=Object(c.__values)(Object.keys(i).sort()),l=u.next();!l.done;l=u.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(c.__awaiter)(this,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+xo(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=xo,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:return[4,Bo(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=v.sent(),(a=r+":"+n+":"+i+":"+xo(o)+":"+t.sessionToken)in Uo)return[2,Uo[a]];for(zo.push(a);zo.length>50;)delete Uo[zo.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(c.__values)([r,n,i,"aws4_request"]),l=u.next(),v.label=3;case 3:return l.done?[3,6]:(d=l.value,[4,Bo(e,s,d)]);case 4:s=v.sent(),v.label=5;case 5:return l=u.next(),[3,3];case 6:return[3,9];case 7:return f=v.sent(),h={error:f},[3,9];case 8:try{l&&!l.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,Uo[a]=s]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),Yo=function(e){var t=Wo(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Zo=function(e){return Object.keys(e).sort().join(";")},Xo=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Jo=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Qo=function(){function e(e){var t=Object(c.__assign)({service:e.signingName||e.service||"s3",uriEscapePath:e.uriEscapePath||!1},e);this.signer=new $o(t)}return e.prototype.presign=function(e,t){void 0===t&&(t={});var r=t.unsignableHeaders,n=void 0===r?new Set:r,i=t.unhoistableHeaders,o=void 0===i?new Set:i,a=Object(c.__rest)(t,["unsignableHeaders","unhoistableHeaders"]);return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(t){return n.add("content-type"),Object.keys(e.headers).map((function(e){return e.toLowerCase()})).filter((function(e){return e.startsWith("x-amz-server-side-encryption")})).forEach((function(e){o.add(e)})),e.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",e.headers.host||(e.headers.host=e.hostname),[2,this.signer.presign(e,Object(c.__assign)({expiresIn:900,unsignableHeaders:n,unhoistableHeaders:o},a))]}))}))},e}();var ea,ta,ra,na=r(4),ia=r.n(na);!function(e){e.NO_CREDENTIALS="No credentials",e.NO_SRC_KEY='source param should be an object with the property "key" with value of type string',e.NO_DEST_KEY='destination param should be an object with the property "key" with value of type string',e.INVALID_BLOB="Object must be an instance of Blob"}(ea||(ea={})),function(e){e.CLEANUP_FAILED="Multipart copy clean up failed",e.NO_OBJECT_FOUND="Object does not exist",e.INVALID_QUEUESIZE="Queue size must be a positive number",e.NO_COPYSOURCE="You must specify a copy source",e.MAX_NUM_PARTS_EXCEEDED="Only a maximum of 10000 parts are allowed"}(ta||(ta={})),function(e){e.UPLOAD_PAUSED_MESSAGE="paused"}(ra||(ra={}));var oa=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},aa=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},sa=new n.ConsoleLogger("axios-http-handler");var ua=function(e,t){var r,n;try{for(var i=oa(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=aa(o.value,2),s=a[0],u=a[1];s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=u,delete e[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},ca=[function(e,t){return r=e,"undefined"!=typeof Blob&&r instanceof Blob?(ua(t,"Content-Type"),ua(t,"Accept"),e):ia.a.defaults.transformRequest[0].call(null,e,t);var r}],la=function(){function e(e,t,r){void 0===e&&(e={}),this.httpOptions=e,this.emitter=t,this.cancelTokenSource=r}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=this.httpOptions.requestTimeout,i=t.emitter||this.emitter,o=e.path;if(e.query){var a=So(e.query);a&&(o+="?"+a)}var s=e.port,u=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,c={};c.url=u,c.method=e.method,c.headers=e.headers,delete c.headers.host,e.body?c.data=e.body:c.headers[Object.keys(c.headers).find((function(e){return"content-type"===e.toLowerCase()}))]&&(c.data=null),i&&(c.onUploadProgress=function(e){i.emit("sendUploadProgress",e),sa.debug(e)},c.onDownloadProgress=function(e){i.emit("sendDownloadProgress",e),sa.debug(e)}),this.cancelTokenSource&&(c.cancelToken=this.cancelTokenSource.token),t.cancelTokenSource&&(c.cancelToken=t.cancelTokenSource.token),c.responseType="blob",n.Platform.isReactNative&&(c.transformRequest=ca);var l=[ia.a.request(c).then((function(e){return{response:new oi.b({headers:e.headers,statusCode:e.status,body:e.data})}})).catch((function(e){var t,r;if(e.message!==ra.UPLOAD_PAUSED_MESSAGE&&sa.error(e.message),ia.a.isCancel(e)||!function(e){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,"response")&&void 0!==e.response&&Object.prototype.hasOwnProperty.call(e.response,"status")&&"number"==typeof e.response.status}(e))throw e;return{response:new oi.b({statusCode:e.response.status,body:null===(t=e.response)||void 0===t?void 0:t.data,headers:null===(r=e.response)||void 0===r?void 0:r.headers})}})),da(r)];return Promise.race(l)},e}();function da(e){return void 0===e&&(e=0),new Promise((function(t,r){e&&setTimeout((function(){var t=new Error("Request did not complete within "+e+" ms");t.name="TimeoutError",r(t)}),e)}))}for(var fa="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",ha=function(e,t,r,i,o){if(e){var a={attrs:r};i&&(a.metrics=i),n.Hub.dispatch("storage",{event:t,data:a,message:o},"Storage",fa)}},pa=function(e){return void 0!==e&&e instanceof Blob},va=function(e){return void 0!==e&&e instanceof ArrayBuffer},ga=r(34),ya=r(32),ma=r(6),ba={},Sa={},wa=0;wa<256;wa++){var Ea=wa.toString(16).toLowerCase();1===Ea.length&&(Ea="0"+Ea),ba[wa]=Ea,Sa[Ea]=wa}function _a(e){for(var t="",r=0;r<e.byteLength;r++)t+=ba[e[r]];return t}var Ca=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var r=new Uint8Array(8),n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&Aa(r),new e(r)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&Aa(e),parseInt(_a(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function Aa(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var Oa,xa=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,r,n,i,o=[];try{for(var a=Object(c.__values)(Object.keys(e)),s=a.next();!s.done;s=a.next()){var u=s.value,l=this.fromUtf8(u);o.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(e[u]))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var d=new Uint8Array(o.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var h=Object(c.__values)(o),p=h.next();!p.done;p=h.next()){var v=p.value;d.set(v,f),f+=v.byteLength}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return d},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":var n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":var i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);var o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":var a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(Ca.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!za.test(e.value))throw new Error("Invalid UUID received: "+e.value);var l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),r=0;r<e.length;r+=2){var n=e.substr(r,2).toLowerCase();if(!(n in Sa))throw new Error("Cannot decode unrecognized sequence "+n+" as hexadecimal");t[r/2]=Sa[n]}return t}(e.value.replace(/\-/g,"")),1),l}},e.prototype.parse=function(e){for(var t={},r=0;r<e.byteLength;){var n=e.getUint8(r++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[i]={type:ka,value:!0};break;case 1:t[i]={type:ka,value:!1};break;case 2:t[i]={type:Pa,value:e.getInt8(r++)};break;case 3:t[i]={type:La,value:e.getInt16(r,!1)},r+=2;break;case 4:t[i]={type:Ta,value:e.getInt32(r,!1)},r+=4;break;case 5:t[i]={type:Ma,value:new Ca(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:var o=e.getUint16(r,!1);r+=2,t[i]={type:ja,value:new Uint8Array(e.buffer,e.byteOffset+r,o)},r+=o;break;case 7:var a=e.getUint16(r,!1);r+=2,t[i]={type:Na,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,a))},r+=a;break;case 8:t[i]={type:Ra,value:new Date(new Ca(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:var s=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[i]={type:Ua,value:_a(s.subarray(0,4))+"-"+_a(s.subarray(4,6))+"-"+_a(s.subarray(6,8))+"-"+_a(s.subarray(8,10))+"-"+_a(s.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Oa||(Oa={}));var ka="boolean",Pa="byte",La="short",Ta="integer",Ma="long",ja="binary",Na="string",Ra="timestamp",Ua="uuid",za=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ia=function(){function e(e,t){this.headerMarshaller=new xa(e,t)}return e.prototype.marshall=function(e){var t=e.headers,r=e.body,n=this.headerMarshaller.format(t),i=n.byteLength+r.byteLength+16,o=new Uint8Array(i),a=new DataView(o.buffer,o.byteOffset,o.byteLength),s=new ma.Crc32;return a.setUint32(0,i,!1),a.setUint32(4,n.byteLength,!1),a.setUint32(8,s.update(o.subarray(0,8)).digest(),!1),o.set(n,12),o.set(r,n.byteLength+12),a.setUint32(i-4,s.update(o.subarray(8,i-4)).digest(),!1),o},e.prototype.unmarshall=function(e){var t=function(e){var t=e.byteLength,r=e.byteOffset,n=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var i=new DataView(n,r,t),o=i.getUint32(0,!1);if(t!==o)throw new Error("Reported message length does not match received message length");var a=i.getUint32(4,!1),s=i.getUint32(8,!1),u=i.getUint32(t-4,!1),c=(new ma.Crc32).update(new Uint8Array(n,r,8));if(s!==c.digest())throw new Error("The prelude checksum specified in the message ("+s+") does not match the calculated CRC32 checksum ("+c.digest()+")");if(c.update(new Uint8Array(n,r+8,t-12)),u!==c.digest())throw new Error("The message checksum ("+c.digest()+") did not match the expected value of "+u);return{headers:new DataView(n,r+8+4,a),body:new Uint8Array(n,r+8+4+a,o-a-16)}}(e),r=t.headers,n=t.body;return{headers:this.headerMarshaller.parse(r),body:n}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var Ba=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new Ia(t,r),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){var r,n,i,o,a,s,u;return function(e,t){var r;return(r={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b;return Object(c.__generator)(this,(function(S){switch(S.label){case 0:S.trys.push([0,12,13,18]),r=Object(c.__asyncValues)(e),S.label=1;case 1:return[4,Object(c.__await)(r.next())];case 2:if((n=S.sent()).done)return[3,11];if(i=n.value,o=t.eventMarshaller.unmarshall(i),"error"!==(a=o.headers[":message-type"].value))return[3,3];throw(s=new Error(o.headers[":error-message"].value||"UnknownError")).name=o.headers[":error-code"].value,s;case 3:return"exception"!==a?[3,5]:(u=o.headers[":exception-type"].value,(g={})[u]=o,l=g,[4,Object(c.__await)(t.deserializer(l))]);case 4:if((d=S.sent()).$unknown)throw(f=new Error(t.toUtf8(o.body))).name=u,f;throw d[u];case 5:return"event"!==a?[3,9]:((y={})[o.headers[":event-type"].value]=o,h=y,[4,Object(c.__await)(t.deserializer(h))]);case 6:return(p=S.sent()).$unknown?[3,10]:[4,Object(c.__await)(p)];case 7:return[4,S.sent()];case 8:return S.sent(),[3,10];case 9:throw Error("Unrecognizable event type: "+o.headers[":event-type"].value);case 10:return[3,1];case 11:return[3,18];case 12:return v=S.sent(),m={error:v},[3,18];case 13:return S.trys.push([13,,16,17]),n&&!n.done&&(b=r.return)?[4,Object(c.__await)(b.call(r))]:[3,15];case 14:S.sent(),S.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},r}((r=e,i=0,o=0,a=null,s=null,u=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);i=e,o=4,a=new Uint8Array(e),new DataView(a.buffer).setUint32(0,e,!1)},(n={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var e,t,n,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:e=r[Symbol.asyncIterator](),v.label=1;case 1:return[4,Object(c.__await)(e.next())];case 2:return t=v.sent(),n=t.value,t.done?i?[3,4]:[4,Object(c.__await)(void 0)]:[3,10];case 3:return[2,v.sent()];case 4:return i!==o?[3,7]:[4,Object(c.__await)(a)];case 5:return[4,v.sent()];case 6:return v.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Object(c.__await)(void 0)];case 9:return[2,v.sent()];case 10:l=n.length,d=0,v.label=11;case 11:if(!(d<l))return[3,15];if(!a){if(f=l-d,s||(s=new Uint8Array(4)),h=Math.min(4-o,f),s.set(n.slice(d,d+h),o),d+=h,(o+=h)<4)return[3,15];u(new DataView(s.buffer).getUint32(0,!1)),s=null}return p=Math.min(i-o,l-d),a.set(n.slice(d,d+p),o),o+=p,d+=p,i&&i===o?[4,Object(c.__await)(a)]:[3,14];case 12:return[4,v.sent()];case 13:v.sent(),a=null,i=0,o=0,v.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},n),{eventMarshaller:this.eventMarshaller,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var r,n=this;return(r={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var r,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:d.trys.push([0,7,8,13]),r=Object(c.__asyncValues)(e),d.label=1;case 1:return[4,Object(c.__await)(r.next())];case 2:return(i=d.sent()).done?[3,6]:(o=i.value,a=n.eventMarshaller.marshall(t(o)),[4,Object(c.__await)(a)]);case 3:return[4,d.sent()];case 4:d.sent(),d.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return s=d.sent(),u={error:s},[3,13];case 8:return d.trys.push([8,,11,12]),i&&!i.done&&(l=r.return)?[4,Object(c.__await)(l.call(r))]:[3,10];case 9:d.sent(),d.label=10;case 10:return[3,12];case 11:if(u)throw u.error;return[7];case 12:return[7];case 13:return[4,Object(c.__await)(new Uint8Array(0))];case 14:return[4,d.sent()];case 15:return d.sent(),[2]}}))}))},r},e}(),Da=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new Ia(t,r),this.universalMarshaller=new Ba({utf8Decoder:r,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var r,n,i=Ka(e)?(r=e,(n={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var e,t,n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:e=r.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Object(c.__await)(e.read())];case 3:return t=o.sent(),n=t.done,i=t.value,n?[4,Object(c.__await)(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Object(c.__await)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}}))}))},n):e;return this.universalMarshaller.deserialize(i,t)},e.prototype.serialize=function(e,t){var r,n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(r=n[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return[4,r.next()];case 1:return t=o.sent(),n=t.done,i=t.value,n?[2,e.close()]:(e.enqueue(i),[2])}}))}))}})):n},e}(),Ka=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},Fa=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,qa)},qa=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Ha=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var a=function(e){var t,r,n=[];try{for(var i=Object(c.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=Fa(a),Array.isArray(s))for(var u=0,l=s.length;u<l;u++)n.push(a+"="+Fa(s[u]));else{var d=a;(s||"string"==typeof s)&&(d+="="+Fa(s)),n.push(d)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);a&&(o+="?"+a)}var s=e.port,u=e.method,l=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,d={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(d.signal=r);var f,h=new Request(l,d),p=[fetch(h).then((function(e){var t,r,n=e.headers,i={};try{for(var o=Object(c.__values)(n.entries()),a=o.next();!a.done;a=o.next()){var s=a.value;i[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new oi.b({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new oi.b({headers:i,statusCode:e.status,body:t})}}))})),(f=n,void 0===f&&(f=0),new Promise((function(e,t){f&&setTimeout((function(){var e=new Error("Request did not complete within "+f+" ms");e.name="TimeoutError",t(e)}),f)})))];return r&&p.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(p)},e}(),Va={},Ga=new Array(64),Wa=0,$a="A".charCodeAt(0),Ya="Z".charCodeAt(0);Wa+$a<=Ya;Wa++){var Za=String.fromCharCode(Wa+$a);Va[Za]=Wa,Ga[Wa]=Za}for(Wa=0,$a="a".charCodeAt(0),Ya="z".charCodeAt(0);Wa+$a<=Ya;Wa++){Za=String.fromCharCode(Wa+$a);var Xa=Wa+26;Va[Za]=Xa,Ga[Xa]=Za}for(Wa=0;Wa<10;Wa++){Va[Wa.toString(10)]=Wa+52;Za=Wa.toString(10),Xa=Wa+52;Va[Za]=Xa,Ga[Xa]=Za}Va["+"]=62,Ga[62]="+",Va["/"]=63,Ga[63]="/";function Ja(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,a=0,s=i,u=i+3;s<=u;s++)"="!==e[s]?(o|=Va[e[s]]<<6*(u-s),a+=6):o>>=6;var c=i/4*3;o>>=a%8;for(var l=Math.floor(a/8),d=0;d<l;d++){var f=8*(l-d-1);n.setUint8(c+d,(o&255<<f)>>f)}}return new Uint8Array(r)}function Qa(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}function es(e,t,r){return void 0===r&&(r=1048576),new Promise((function(n,i){var o=new FileReader;o.addEventListener("error",i),o.addEventListener("abort",i);var a=e.size,s=0;function u(){s>=a?n():o.readAsArrayBuffer(e.slice(s,Math.min(a,s+r)))}o.addEventListener("load",(function(e){var r=e.target.result;t(new Uint8Array(r)),s+=r.byteLength,u()})),u()}))}var ts=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},rs=[1732584193,4023233417,2562383102,271733878],ns=function(){function e(){this.state=Uint32Array.from(rs),this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=function(e){if("string"==typeof e)return ts(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0)}},e.prototype.digest=function(){return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,r,n,i,o,a;return Object(c.__generator)(this,(function(s){if(!this.finished){if(t=(e=this).buffer,r=e.bufferLength,n=e.bytesHashed,i=8*n,t.setUint8(this.bufferLength++,128),r%64>=56){for(a=this.bufferLength;a<64;a++)t.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(a=this.bufferLength;a<56;a++)t.setUint8(a,0);t.setUint32(56,i>>>0,!0),t.setUint32(60,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}for(o=new DataView(new ArrayBuffer(16)),a=0;a<4;a++)o.setUint32(4*a,this.state[a],!0);return[2,new Uint8Array(o.buffer,o.byteOffset,o.byteLength)]}))}))},e.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=os(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=os(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=os(i,o,r,n,e.getUint32(8,!0),17,606105819),n=os(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=os(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=os(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=os(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=os(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=os(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=os(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=os(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=os(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=os(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=os(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=os(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=as(r,n=os(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=as(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=as(i,o,r,n,e.getUint32(44,!0),14,643717713),n=as(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=as(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=as(o,r,n,i,e.getUint32(40,!0),9,38016083),i=as(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=as(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=as(r,n,i,o,e.getUint32(36,!0),5,568446438),o=as(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=as(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=as(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=as(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=as(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=as(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=ss(r,n=as(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=ss(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=ss(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=ss(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=ss(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=ss(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=ss(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=ss(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=ss(r,n,i,o,e.getUint32(52,!0),4,681279174),o=ss(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=ss(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=ss(n,i,o,r,e.getUint32(24,!0),23,76029189),r=ss(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=ss(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=ss(i,o,r,n,e.getUint32(60,!0),16,530742520),r=us(r,n=ss(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=us(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=us(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=us(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=us(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=us(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=us(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=us(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=us(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=us(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=us(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=us(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=us(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=us(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=us(i,o,r,n,e.getUint32(8,!0),15,718787259),n=us(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295},e}();function is(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function os(e,t,r,n,i,o,a){return is(t&r|~t&n,e,t,i,o,a)}function as(e,t,r,n,i,o,a){return is(t&n|r&~n,e,t,i,o,a)}function ss(e,t,r,n,i,o,a){return is(t^r^n,e,t,i,o,a)}function us(e,t,r,n,i,o,a){return is(r^(t|~n),e,t,i,o,a)}var cs={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ls=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,r){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(c.__generator)(this,(function(o){return(null===(i=null==e?void 0:e.retryStrategy)||void 0===i?void 0:i.mode)&&(r.userAgent=Object(c.__spread)(r.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,n)]}))}))}}}(e),cs)}}},ds=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fs=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hs=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],ps=[500,502,503,504],vs=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||fs.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},gs=r(31),ys=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},ms=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return ds.includes(e.name)}(e)||vs(e)||function(e){var t;return hs.includes(e.name)||ps.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},bs=function(){function e(e,t){var r,n,i,o,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:ms,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:ys,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(a=o=500,s=o,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(c.__awaiter)(this,void 0,void 0,(function(){var e;return Object(c.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:return n=0,i=0,[4,this.getMaxAttempts()];case 1:o=d.sent(),a=t.request,oi.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(gs.v4)()),s=function(){var s,l,d,f,h;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,5]),oi.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(n+1)+"; max="+o),[4,e(t)];case 1:return s=c.sent(),l=s.response,d=s.output,u.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=n+1,d.$metadata.totalRetryDelay=i,[2,{value:{response:l,output:d}}];case 2:return f=c.sent(),n++,u.shouldRetry(f,n,o)?(r=u.retryQuota.retrieveRetryTokens(f),h=u.delayDecider(vs(f)?500:100,n),i+=h,[4,new Promise((function(e){return setTimeout(e,h)}))]):[3,4];case 3:return c.sent(),[2,"continue"];case 4:throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=n,f.$metadata.totalRetryDelay=i,f;case 5:return[2]}}))},u=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(l=d.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),Ss=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var ws=r(33),Es=r.n(ws),_s=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Cs=new Set(["cn-north-1","cn-northwest-1"]),As=new Set(["us-iso-east-1"]),Os=new Set(["us-isob-east-1"]),xs=new Set(["us-gov-east-1","us-gov-west-1"]);var ks,Ps,Ls,Ts,Ms={apiVersion:"2006-03-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"af-south-1":r={hostname:"s3.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":r={hostname:"s3.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":r={hostname:"s3.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":r={hostname:"s3.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":r={hostname:"s3.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":r={hostname:"s3.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":r={hostname:"s3.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"aws-global":r={hostname:"s3.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"ca-central-1":r={hostname:"s3.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":r={hostname:"s3.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":r={hostname:"s3.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":r={hostname:"s3.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":r={hostname:"s3.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":r={hostname:"s3.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":r={hostname:"s3.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":r={hostname:"s3.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":r={hostname:"s3.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-gov-west-1":r={hostname:"s3-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"me-south-1":r={hostname:"s3.me-south-1.amazonaws.com",partition:"aws"};break;case"s3-external-1":r={hostname:"s3-external-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"sa-east-1":r={hostname:"s3.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":r={hostname:"s3.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":r={hostname:"s3.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":r={hostname:"s3.us-gov-east-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-gov-west-1":r={hostname:"s3.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-iso-east-1":r={hostname:"s3.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":r={hostname:"s3.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":r={hostname:"s3.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":r={hostname:"s3.us-west-2.amazonaws.com",partition:"aws"};break;default:_s.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),Cs.has(e)&&(r={hostname:"s3.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),As.has(e)&&(r={hostname:"s3.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Os.has(e)&&(r={hostname:"s3.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),xs.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(a({signingService:"s3"},r))},serviceId:"S3",signingEscapePath:!1,urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,a=r.protocol,s=r.search;return s&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=Object(c.__values)(e.split("&")),o=i.next();!o.done;o=i.next()){var a=o.value,s=Object(c.__read)(a.split("="),2),u=s[0],l=s[1],d=void 0===l?null:l;u=decodeURIComponent(u),d&&(d=decodeURIComponent(d)),u in n?Array.isArray(n[u])?n[u].push(d):n[u]=[n[u],d]:n[u]=d}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(s)),{hostname:n,port:o?parseInt(o):void 0,protocol:a,path:i,query:t}},useArnRegion:!1},js=a(a({},Ms),{runtime:"browser",base64Decoder:Ja,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,a=Math.min(r+3,e.length);o<a;o++)n|=e[o]<<8*(a-o-1),i+=8;var s=Math.ceil(i/6);n<<=6*s-i;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Ga[(n&63<<c)>>c]}t+="==".slice(0,4-s)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(Ps={serviceId:Ms.serviceId,clientVersion:ga.version},Ls=Ps.serviceId,Ts=Ps.clientVersion,function(){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var e,t,r,n,i,o,a,s,u;return Object(c.__generator)(this,(function(c){return e=(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?Es.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",Ts],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(a=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==a?a:"unknown")+"_"+(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.version)&&void 0!==u?u:"unknown")]],Ls&&t.push(["api/"+Ls,Ts]),[2,t]}))}))}),eventStreamSerdeProvider:function(e){return new Da(e)},maxAttempts:3,md5:ns,region:(ks="Region is missing",function(){return Promise.reject(ks)}),requestHandler:new Ha,sha256:ya.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r;return Object(c.__generator)(this,(function(n){switch(n.label){case 0:return[4,Qa(e)];case 1:return t=n.sent(),r=Ja(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,i,o,a,s;return Object(c.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(a=i.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)},streamHasher:function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r;return Object(c.__generator)(this,(function(n){switch(n.label){case 0:return r=new e,[4,es(t,(function(e){r.update(e)}))];case 1:return n.sent(),[2,r.digest()]}}))}))},utf8Decoder:ts,utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var a="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}),Ns=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},Rs=function(e){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var t,r,n,i,o;return Object(c.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=a.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},Us=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var zs={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Is=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s;return Object(c.__generator)(this,(function(u){return t=n.request,oi.a.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(i))&&(t.headers=Object(c.__assign)(Object(c.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),zs)}}};var Bs={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Ds=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t;return Object(c.__generator)(this,(function(i){return t=n.request,oi.a.isInstance(t)&&t.body&&"node"===e.runtime&&(t.headers=Object(c.__assign)(Object(c.__assign)({},t.headers),{Expect:"100-continue"})),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:t}))]}))}))}}}(e),Bs)}}};for(var Ks={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Fs=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){return oi.a.isInstance(r.request)?(n=r.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),Ks)}}},qs={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Hs=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,l,d,f;return Object(c.__generator)(this,(function(h){switch(h.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=h.sent(),a?("function"==typeof a.info&&(l=u.output,d=l.$metadata,f=Object(c.__rest)(l,["$metadata"]),a.info({clientName:n,commandName:i,input:o(r.input),output:s(f),metadata:d})),[2,u]):[2,u]}}))}))}}),qs)}}},Vs={},Gs={},Ws=0;Ws<256;Ws++){var $s=Ws.toString(16).toLowerCase();1===$s.length&&($s="0"+$s),Vs[Ws]=$s,Gs[$s]=Ws}function Ys(e){for(var t="",r=0;r<e.byteLength;r++)t+=Vs[e[r]];return t}var Zs="X-Amz-Date".toLowerCase(),Xs=["authorization",Zs,"date"],Js="X-Amz-Signature".toLowerCase(),Qs="X-Amz-Security-Token".toLowerCase(),eu={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},tu=/^proxy-/,ru=/^sec-/,nu="AWS4-HMAC-SHA256-PAYLOAD",iu={},ou=[];function au(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function su(e,t,r){var n=new e(t);return n.update(r),n.digest()}function uu(e,t,r){var n,i,o=e.headers,a={};try{for(var s=Object(c.__values)(Object.keys(o).sort()),u=s.next();!u.done;u=s.next()){var l=u.value,d=l.toLowerCase();(d in eu||(null==t?void 0:t.has(d))||tu.test(d)||ru.test(d))&&(!r||r&&!r.has(d))||(a[d]=o[l].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a}var cu=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,lu)},lu=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function du(e,t){var r=e.headers,n=e.body;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:try{for(e=Object(c.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(f=n,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(n),s=Ys,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[d.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))}function fu(e){var t=e.headers,r=e.query,n=Object(c.__rest)(e,["headers","query"]);return Object(c.__assign)(Object(c.__assign)({},n),{headers:Object(c.__assign)({},t),query:r?hu(r):void 0})}function hu(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return Object(c.__assign)(Object(c.__assign)({},t),((n={})[r]=Array.isArray(i)?Object(c.__spread)(i):i,n))}),{})}function pu(e){var t,r;e="function"==typeof e.clone?e.clone():fu(e);try{for(var n=Object(c.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Xs.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function vu(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var gu=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=bu(n),this.credentialProvider=Su(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O;return Object(c.__generator)(this,(function(x){switch(x.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,l=t.signingRegion,d=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),null==l?[3,2]:(p=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return h=p,v=yu(n),g=v.longDate,y=v.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=au(y,h,null!=d?d:this.service),b=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():fu(e),a=o.headers,s=o.query,u=void 0===s?{}:s;try{for(var l=Object(c.__values)(Object.keys(a)),d=l.next();!d.done;d=l.next()){var f=d.value,h=f.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[f]=a[f],delete a[f])}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return Object(c.__assign)(Object(c.__assign)({},e),{headers:a,query:u})}(pu(e),{unhoistableHeaders:s}),f.sessionToken&&(b.query["X-Amz-Security-Token"]=f.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=f.accessKeyId+"/"+m,b.query["X-Amz-Date"]=g,b.query["X-Amz-Expires"]=o.toString(10),S=uu(b,a,u),b.query["X-Amz-SignedHeaders"]=mu(S),w=b.query,E="X-Amz-Signature",_=this.getSignature,C=[g,m,this.getSigningKey(f,h,y,d)],A=this.createCanonicalRequest,O=[b,S],[4,du(e,this.sha256)]);case 5:return[4,_.apply(this,C.concat([A.apply(this,O.concat([x.sent()]))]))];case 6:return w[E]=x.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,i,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=c.sent(),c.label=3;case 3:return e=t,i=yu(o),l=i.shortDate,d=i.longDate,f=au(l,e,null!=u?u:this.service),[4,du({headers:{},body:n},this.sha256)];case 4:return h=c.sent(),(p=new this.sha256).update(r),g=Ys,[4,p.digest()];case 5:return v=g.apply(void 0,[c.sent()]),y=[nu,d,f,a,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,l,d,f;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.credentialProvider()];case 1:return t=c.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=c.sent(),c.label=4;case 4:return r=n,s=yu(i).shortDate,d=(l=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(d.apply(l,[void 0,c.sent()]))).update(e),f=Ys,[4,u.digest()];case 6:return[2,f.apply(void 0,[c.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=m.sent(),m.label=4;case 4:return r=n,l=pu(e),d=yu(i),f=d.longDate,h=d.shortDate,p=au(h,r,null!=u?u:this.service),l.headers[Zs]=f,t.sessionToken&&(l.headers[Qs]=t.sessionToken),[4,du(l,this.sha256)];case 5:return v=m.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=Object(c.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",l.headers)&&this.applyChecksum&&(l.headers["x-amz-content-sha256"]=v),g=uu(l,a,o),[4,this.getSignature(f,p,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(l,g,v))];case 6:return y=m.sent(),l.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+mu(g)+", Signature="+y,[2,l]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===Js)return"continue";o.push(e);var t=i[e];"string"==typeof t?a[e]=cu(e)+"="+cu(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([cu(e)+"="+cu(r)])}),[]).join("&"))};try{for(var u=Object(c.__values)(Object.keys(i).sort()),l=u.next();!l.done;l=u.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(c.__awaiter)(this,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Ys(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=Ys,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:return[4,su(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=v.sent(),(a=r+":"+n+":"+i+":"+Ys(o)+":"+t.sessionToken)in iu)return[2,iu[a]];for(ou.push(a);ou.length>50;)delete iu[ou.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(c.__values)([r,n,i,"aws4_request"]),l=u.next(),v.label=3;case 3:return l.done?[3,6]:(d=l.value,[4,su(e,s,d)]);case 4:s=v.sent(),v.label=5;case 5:return l=u.next(),[3,3];case 6:return[3,9];case 7:return f=v.sent(),h={error:f},[3,9];case 8:try{l&&!l.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,iu[a]=s]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),yu=function(e){var t=vu(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},mu=function(e){return Object.keys(e).sort().join(";")},bu=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Su=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function wu(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Eu=function(e){return new Date(Date.now()+e)};function _u(e){return function(t,r){return function(n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u,l,d,f,h;return Object(c.__generator)(this,(function(p){switch(p.label){case 0:return oi.a.isInstance(n.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=p.sent(),[3,3];case 2:o=e.signer,p.label=3;case 3:return i=o,s=t,u=[Object(c.__assign)({},n)],h={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,s.apply(void 0,[c.__assign.apply(void 0,u.concat([(h.request=p.sent(),h)]))])];case 5:return a=p.sent(),l=a.response.headers,(d=l&&(l.date||l.Date))&&(f=Date.parse(d),v=f,g=e.systemClockOffset,Math.abs(Eu(g).getTime()-v)>=3e5&&(e.systemClockOffset=f-Date.now())),[2,a]}var v,g}))}))}}}var Cu={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Au,Ou,xu,ku,Pu,Lu,Tu,Mu,ju,Nu,Ru,Uu,zu,Iu,Bu,Du,Ku,Fu,qu,Hu,Vu,Gu,Wu,$u,Yu,Zu,Xu,Ju,Qu,ec,tc,rc,nc,ic,oc=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,ac=function(e){var t=Object(c.__read)(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),a=r.substring(i+1);return"api"===o&&(a=a.toLowerCase()),[o,a,n].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(oc,"_")})).join("/")},sc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},uc=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e,t){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,l,d,f;return Object(c.__generator)(this,(function(h){switch(h.label){case 0:return i=n.request,oi.a.isInstance(i)?(o=i.headers,a=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(ac))||[],[4,r.defaultUserAgentProvider()]):[2,e(n)];case 1:return s=h.sent().map(ac),u=(null===(f=null==r?void 0:r.customUserAgent)||void 0===f?void 0:f.map(ac))||[],o["x-amz-user-agent"]=Object(c.__spread)(s,a,u).join(" "),l=Object(c.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==r.runtime&&l&&(o["user-agent"]=o["user-agent"]?o["user-agent"]+" "+l:l),[2,e(Object(c.__assign)(Object(c.__assign)({},n),{request:i}))]}}))}))}}),sc)}}},cc=function(e){function t(t){var r,n,i,o=this,s=function(e){var t,r=this,n=wu(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?wu(e.signer):function(){return wu(e.region)().then((function(t){return Object(c.__awaiter)(r,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var r=Object(c.__read)(t,2),i=r[0],a=r[1],s=i.signingRegion,l=i.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||l||e.serviceId,new gu({credentials:n,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})}))},Object(c.__assign)(Object(c.__assign)({},e),{systemClockOffset:s,signingEscapePath:o,credentials:n,signer:t})}(function(e){var t;return Object(c.__assign)(Object(c.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Ns(e):function(){return Rs(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(c.__assign)(Object(c.__assign)({},e),{region:Us(e.region)})}(a(a({},js),t)))),u=function(e){return Object(c.__assign)(Object(c.__assign)({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(function(e){return Object(c.__assign)(Object(c.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t=e.bucketEndpoint,r=void 0!==t&&t,n=e.forcePathStyle,i=void 0!==n&&n,o=e.useAccelerateEndpoint,a=void 0!==o&&o,s=e.useDualstackEndpoint,u=void 0!==s&&s,l=e.useArnRegion,d=void 0!==l&&l;return Object(c.__assign)(Object(c.__assign)({},e),{bucketEndpoint:r,forcePathStyle:i,useAccelerateEndpoint:a,useDualstackEndpoint:u,useArnRegion:"function"==typeof d?d:function(){return Promise.resolve(d)}})}((n=Ss((r=s).maxAttempts),Object(c.__assign)(Object(c.__assign)({},r),{maxAttempts:n,retryStrategy:r.retryStrategy||new bs(n)})))));return(o=e.call(this,u)||this).config=u,o.middlewareStack.use((i=o.config,{applyToStack:function(e){e.addRelativeTo(_u(i),Cu)}})),o.middlewareStack.use(ls(o.config)),o.middlewareStack.use(Is(o.config)),o.middlewareStack.use(Fs(o.config)),o.middlewareStack.use(Hs(o.config)),o.middlewareStack.use(to(o.config)),o.middlewareStack.use(no(o.config)),o.middlewareStack.use(Ds(o.config)),o.middlewareStack.use(uc(o.config)),o}return o(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(h),lc=function(){return(lc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},dc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},fc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},hc=new n.Logger("S3ClientUtils"),pc={accessKeyId:"",secretAccessKey:""},vc=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},i=e.identityId||t.identityId,o=(void 0!==n.private?n.private:"private/")+i+"/",a=(void 0!==n.protected?n.protected:"protected/")+i+"/",s=void 0!==n.public?n.public:"public/";switch(r){case"private":return o;case"protected":return a;default:return s}},gc=function(e,t){return function(r,i){return function(i){return dc(void 0,void 0,void 0,(function(){var o,a,s,u;return fc(this,(function(c){switch(c.label){case 0:return[4,n.Credentials.get()];case 1:return o=c.sent(),a=n.Credentials.shear(o),s=vc(lc(lc({},e),{credentials:a})),u=Object.assign({},i.input),Object.prototype.hasOwnProperty.call(i.input,"Key")?(u.Key=s+t,i.input=u):Object.prototype.hasOwnProperty.call(i.input,"Prefix")&&(u.Prefix=s+t,i.input=u),[2,r(i)]}}))}))}}},yc=function(e){return function(t,r){return function(r){return dc(void 0,void 0,void 0,(function(){var n,i;return fc(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,t(r)];case 1:return[2,o.sent()];case 2:throw n=o.sent(),(a=n).ServerTime&&"string"==typeof a.Code&&"RequestTimeTooSkewed"===a.Code&&(i=new Date(n.ServerTime),e.systemClockOffset=i.getTime()-Date.now()),n;case 3:return[2]}var a}))}))}}},mc={step:"finalizeRequest",name:"autoAdjustClockskewMiddleware"},bc={step:"initialize",name:"addPrefixMiddleware"},Sc=function(){return dc(void 0,void 0,void 0,(function(){var e,t,r;return fc(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),hc.debug("credentials provider get credentials",t),[2,t]):[2,pc];case 2:return r=i.sent(),hc.warn("credentials provider error",r),[2,pc];case 3:return[2]}}))}))},wc=function(e,t){var r=e.region,i=e.cancelTokenSource,o=e.dangerouslyConnectToHttpEndpointForTesting,a=e.useAccelerateEndpoint,s={};o&&(s={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0});var u=new cc(lc(lc({region:r,credentials:Sc,customUserAgent:Object(n.getAmplifyUserAgent)()},s),{requestHandler:new la({},t,i),useAccelerateEndpoint:a}));return u.middlewareStack.remove("contentLengthMiddleware"),u},Ec=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"PutObjectCommand",inputFilterSensitiveLog:Fn.filterSensitiveLog,outputFilterSensitiveLog:Kn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({"content-type":"application/octet-stream"},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentLength)&&{"content-length":e.ContentLength.toString()}),Ni(e.ContentMD5)&&{"content-md5":e.ContentMD5}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={"x-id":"PutObject"},void 0!==e.Body&&(c=e.Body,s=c),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"PUT",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,yi(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,ETag:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),_c=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CreateMultipartUploadCommand",inputFilterSensitiveLog:G.filterSensitiveLog,outputFilterSensitiveLog:V.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={uploads:""},[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"POST",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,fi(e,t)]:(r={$metadata:Mi(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,BucketKeyEnabled:void 0,Key:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p);(Au||(Au={})).filterSensitiveLog=function(e){return a({},e)},(Ou||(Ou={})).filterSensitiveLog=function(e){return a(a({},e),e.Encryption&&{Encryption:ni.filterSensitiveLog(e.Encryption)})},(xu||(xu={})).filterSensitiveLog=function(e){return a(a({},e),e.S3&&{S3:Ou.filterSensitiveLog(e.S3)})},function(e){e.IGNORE="IGNORE",e.NONE="NONE",e.USE="USE"}(ku||(ku={})),(Pu||(Pu={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.DOCUMENT="DOCUMENT",e.LINES="LINES"}(Lu||(Lu={})),(Tu||(Tu={})).filterSensitiveLog=function(e){return a({},e)},(Mu||(Mu={})).filterSensitiveLog=function(e){return a({},e)},(ju||(ju={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.ALWAYS="ALWAYS",e.ASNEEDED="ASNEEDED"}(Nu||(Nu={})),(Ru||(Ru={})).filterSensitiveLog=function(e){return a({},e)},(Uu||(Uu={})).filterSensitiveLog=function(e){return a({},e)},(zu||(zu={})).filterSensitiveLog=function(e){return a({},e)},(Iu||(Iu={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.SELECT="SELECT"}(Bu||(Bu={})),(Du||(Du={})).filterSensitiveLog=function(e){return a(a({},e),e.OutputLocation&&{OutputLocation:xu.filterSensitiveLog(e.OutputLocation)})},(Ku||(Ku={})).filterSensitiveLog=function(e){return a(a({},e),e.RestoreRequest&&{RestoreRequest:Du.filterSensitiveLog(e.RestoreRequest)})},(Fu||(Fu={})).filterSensitiveLog=function(e){return a({},e)},(qu||(qu={})).filterSensitiveLog=function(e){return a({},e)},(Hu||(Hu={})).filterSensitiveLog=function(e){return a({},e)},(Vu||(Vu={})).filterSensitiveLog=function(e){return a({},e)},(Gu||(Gu={})).filterSensitiveLog=function(e){return a({},e)},(Wu||(Wu={})).filterSensitiveLog=function(e){return a({},e)},($u||($u={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Records?t.Records(e.Records):void 0!==e.Stats?t.Stats(e.Stats):void 0!==e.Progress?t.Progress(e.Progress):void 0!==e.Cont?t.Cont(e.Cont):void 0!==e.End?t.End(e.End):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Records?{Records:Gu.filterSensitiveLog(e.Records)}:void 0!==e.Stats?{Stats:$u.filterSensitiveLog(e.Stats)}:void 0!==e.Progress?{Progress:Vu.filterSensitiveLog(e.Progress)}:void 0!==e.Cont?{Cont:Fu.filterSensitiveLog(e.Cont)}:void 0!==e.End?{End:qu.filterSensitiveLog(e.End)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Yu||(Yu={})),(Zu||(Zu={})).filterSensitiveLog=function(e){return a(a({},e),e.Payload&&{Payload:"STREAMING_CONTENT"})},(Xu||(Xu={})).filterSensitiveLog=function(e){return a({},e)},(Ju||(Ju={})).filterSensitiveLog=function(e){return a({},e)},(Qu||(Qu={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(ec||(ec={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(tc||(tc={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(rc||(rc={})).filterSensitiveLog=function(e){return a({},e)},(nc||(nc={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(ic||(ic={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:ii})};var Cc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"UploadPartCommand",inputFilterSensitiveLog:tc.filterSensitiveLog,outputFilterSensitiveLog:ec.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a({"content-type":"application/octet-stream"},Ni(e.ContentLength)&&{"content-length":e.ContentLength.toString()}),Ni(e.ContentMD5)&&{"content-md5":e.ContentMD5}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a({"x-id":"UploadPart"},void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.Body&&(c=e.Body,s=c),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"PUT",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,mi(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,ETag:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0},void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),Ac=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(so(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CompleteMultipartUploadCommand",inputFilterSensitiveLog:R.filterSensitiveLog,outputFilterSensitiveLog:M.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({"content-type":"application/xml"},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({},void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.MultipartUpload&&(c=Ci(e.MultipartUpload,t),s='<?xml version="1.0" encoding="UTF-8"?>',c.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),s+=c.toString()),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"POST",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,li(e,t)]:(r={$metadata:Mi(e),Bucket:void 0,BucketKeyEnabled:void 0,ETag:void 0,Expiration:void 0,Key:void 0,Location:void 0,RequestCharged:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.ETag&&(r.ETag=n.ETag),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.Location&&(r.Location=n.Location),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),Oc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"AbortMultipartUploadCommand",inputFilterSensitiveLog:C.filterSensitiveLog,outputFilterSensitiveLog:_.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({"x-id":"AbortMultipartUpload"},void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,ci(e,t)]:(r={$metadata:Mi(e),RequestCharged:void 0},void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),xc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"ListPartsCommand",inputFilterSensitiveLog:vn.filterSensitiveLog,outputFilterSensitiveLog:pn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a(a({"x-id":"ListParts"},void 0!==e.MaxParts&&{"max-parts":e.MaxParts.toString()}),void 0!==e.PartNumberMarker&&{"part-number-marker":e.PartNumberMarker}),void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,gi(e,t)]:(r={$metadata:Mi(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Initiator:void 0,IsTruncated:void 0,Key:void 0,MaxParts:void 0,NextPartNumberMarker:void 0,Owner:void 0,PartNumberMarker:void 0,Parts:void 0,RequestCharged:void 0,StorageClass:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Initiator&&(r.Initiator=ki(n.Initiator,t)),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.MaxParts&&(r.MaxParts=parseInt(n.MaxParts)),void 0!==n.NextPartNumberMarker&&(r.NextPartNumberMarker=n.NextPartNumberMarker),void 0!==n.Owner&&(r.Owner=Li(n.Owner,t)),void 0!==n.PartNumberMarker&&(r.PartNumberMarker=n.PartNumberMarker),""===n.Part&&(r.Parts=[]),void 0!==n.Part&&(r.Parts=Ti(g(n.Part),t)),void 0!==n.StorageClass&&(r.StorageClass=n.StorageClass),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),kc=r(7);function Pc(e){return(Pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Lc,Tc,Mc=function(){return(Mc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},jc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Nc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Rc=new n.ConsoleLogger("AWSS3ProviderManagedUpload"),Uc=function(){function e(e,t,r){this.minPartSize=5242880,this.queueSize=4,this.body=null,this.params=null,this.opts=null,this.completedParts=[],this.uploadId=null,this.bytesUploaded=0,this.totalBytesToUpload=0,this.emitter=null,this.params=e,this.opts=t,this.emitter=r,this.s3client=this._createNewS3Client(t,r)}return e.prototype.upload=function(){return jc(this,void 0,void 0,(function(){var e,t,r,n,i,o,a,s=this;return Nc(this,(function(u){switch(u.label){case 0:return u.trys.push([0,10,,12]),e=this,[4,this.validateAndSanitizeBody(this.params.Body)];case 1:return e.body=u.sent(),this.totalBytesToUpload=this.byteLength(this.body),this.totalBytesToUpload<=this.minPartSize?(this.params.Body=this.body,t=new Ec(this.params),[2,this.s3client.send(t)]):[3,2];case 2:return r=this,[4,this.createMultiPartUpload()];case 3:r.uploadId=u.sent(),n=Math.ceil(this.totalBytesToUpload/this.minPartSize),i=this.createParts(),o=0,u.label=4;case 4:return o<n?[4,this.uploadParts(this.uploadId,i.slice(o,o+this.queueSize))]:[3,7];case 5:u.sent(),u.label=6;case 6:return o+=this.queueSize,[3,4];case 7:return i.map((function(e){s.removeEventListener(e)})),[4,this.finishMultiPartUpload(this.uploadId)];case 8:return[2,u.sent()];case 9:return[3,12];case 10:return a=u.sent(),[4,this.cleanup(this.uploadId)];case 11:throw u.sent(),Rc.error("Error. Cancelling the multipart upload."),a;case 12:return[2]}}))}))},e.prototype.createParts=function(){try{for(var e=[],t=0;t<this.totalBytesToUpload;){var r=Math.min(t+this.minPartSize,this.totalBytesToUpload);e.push({bodyPart:this.body.slice(t,r),partNumber:e.length+1,emitter:new kc.EventEmitter,_lastUploadedBytes:0}),t+=this.minPartSize}return e}catch(e){throw Rc.error(e),e}},e.prototype.createMultiPartUpload=function(){return jc(this,void 0,void 0,(function(){var e,t,r;return Nc(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=new _c(this.params),[4,this.s3client.send(e)];case 1:return t=n.sent(),Rc.debug(t.UploadId),[2,t.UploadId];case 2:throw r=n.sent(),Rc.error(r),r;case 3:return[2]}}))}))},e.prototype.uploadParts=function(e,t){return jc(this,void 0,void 0,(function(){var r,n,i,o=this;return Nc(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Promise.all(t.map((function(t){return jc(o,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Nc(this,(function(c){switch(c.label){case 0:return this.setupEventListener(t),r={emitter:t.emitter},n=this.params,i=n.Key,o=n.Bucket,a=n.SSECustomerAlgorithm,s=n.SSECustomerKey,u=n.SSECustomerKeyMD5,[4,this.s3client.send(new Cc(Mc(Mc(Mc({PartNumber:t.partNumber,Body:t.bodyPart,UploadId:e,Key:i,Bucket:o},a&&{SSECustomerAlgorithm:a}),s&&{SSECustomerKey:s}),u&&{SSECustomerKeyMD5:u})),r)];case 1:return[2,c.sent()]}}))}))})))];case 1:for(r=a.sent(),n=0;n<r.length;n++)this.completedParts.push({PartNumber:t[n].partNumber,ETag:r[n].ETag});return[3,3];case 2:throw i=a.sent(),Rc.error("Error happened while uploading a part. Cancelling the multipart upload"),i;case 3:return[2]}}))}))},e.prototype.finishMultiPartUpload=function(e){return jc(this,void 0,void 0,(function(){var t,r,n;return Nc(this,(function(i){switch(i.label){case 0:t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e,MultipartUpload:{Parts:this.completedParts}},r=new Ac(t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.s3client.send(r)];case 2:return[2,i.sent().Key];case 3:throw n=i.sent(),Rc.error("Error happened while finishing the upload."),n;case 4:return[2]}}))}))},e.prototype.cleanup=function(e){return jc(this,void 0,void 0,(function(){var t,r;return Nc(this,(function(n){switch(n.label){case 0:return this.body=null,this.completedParts=[],this.bytesUploaded=0,this.totalBytesToUpload=0,t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e},[4,this.s3client.send(new Oc(t))];case 1:return n.sent(),[4,this.s3client.send(new xc(t))];case 2:if((r=n.sent())&&r.Parts&&r.Parts.length>0)throw new Error("Multipart upload clean up failed.");return[2]}}))}))},e.prototype.removeEventListener=function(e){e.emitter.removeAllListeners("sendUploadProgress"),e.emitter.removeAllListeners("sendDownloadProgress")},e.prototype.setupEventListener=function(e){var t=this;e.emitter.on("sendUploadProgress",(function(r){t.progressChanged(e.partNumber,r.loaded-e._lastUploadedBytes),e._lastUploadedBytes=r.loaded}))},e.prototype.progressChanged=function(e,t){this.bytesUploaded+=t,this.emitter.emit("sendUploadProgress",{loaded:this.bytesUploaded,total:this.totalBytesToUpload,part:e,key:this.params.Key})},e.prototype.byteLength=function(e){if(null==e)return 0;if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"!=typeof e.path)throw new Error("Cannot determine length of "+e)},e.prototype.validateAndSanitizeBody=function(e){return jc(this,void 0,void 0,(function(){return Nc(this,(function(t){return this.isGenericObject(e)?[2,JSON.stringify(e)]:[2,e]}))}))},e.prototype.isGenericObject=function(e){if(null!==e&&"object"===Pc(e))try{return!(this.byteLength(e)>=0)}catch(e){return!0}return!1},e.prototype._createNewS3Client=function(e,t){var r=wc(e,t);return r.middlewareStack.add(gc(this.opts,this.params.Key),bc),r.middlewareStack.add(yc(r.config),mc),r},e}(),zc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ic=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Bc=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Dc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bc(arguments[t]));return e},Kc=new n.Logger("AWSS3UploadTask");!function(e){e[e.INIT=0]="INIT",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.PAUSED=2]="PAUSED",e[e.CANCELLED=3]="CANCELLED",e[e.COMPLETED=4]="COMPLETED"}(Lc||(Lc={})),function(e){e.CANCEL="cancel",e.UPLOAD_COMPLETE="uploadComplete",e.UPLOAD_PROGRESS="uploadPartProgress",e.ERROR="error"}(Tc||(Tc={}));function Fc(e,t){return e.PartNumber-t.PartNumber}var qc=function(){function e(e){var t=e.s3Client,r=e.file,n=e.emitter,i=e.storage,o=e.params,a=e.level,s=e.prefixPromise;this.partSize=5242880,this.queueSize=4,this.inProgress=[],this.completedParts=[],this.queued=[],this.bytesUploaded=0,this.totalBytes=0,this.state=Lc.INIT,this.prefixPromise=s,this.s3client=t,this.s3client.middlewareStack.remove("contentLengthMiddleware"),this.storage=i,this.storageSync=Promise.resolve(),"function"==typeof this.storage.sync&&(this.storageSync=this.storage.sync()),this.params=o,this.file=r,this.totalBytes=this.file.size,this.bytesUploaded=0,this.emitter=n,this.queued=[],this.fileId=this._getFileId(a),this._validateParams(),this.emitter.on(Tc.ERROR,(function(){}))}return Object.defineProperty(e.prototype,"percent",{get:function(){return this.bytesUploaded/this.totalBytes*100},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInProgress",{get:function(){return this.state===Lc.IN_PROGRESS},enumerable:!0,configurable:!0}),e.prototype._listSingleFile=function(e){var t=e.key,r=e.bucket;return zc(this,void 0,void 0,(function(){var e,n,i,o;return Ic(this,(function(a){switch(a.label){case 0:return[4,this.s3client.send(new yo({Bucket:r,Prefix:t}))];case 1:return e=a.sent(),n=e.Contents,i=void 0===n?[]:n,[4,this.prefixPromise];case 2:return o=a.sent(),[2,i.find((function(e){return e.Key===""+o+t}))]}}))}))},e.prototype._getFileId=function(e){return void 0!==(t=this.file)&&t instanceof File?[this.file.name,this.file.lastModified,this.file.size,this.file.type,this.params.Bucket,e,this.params.Key].join("-"):[this.file.size,this.file.type,this.params.Bucket,e,this.params.Key].join("-");var t},e.prototype._findCachedUploadParts=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return e=r.sent(),0!==Object.keys(e).length&&Object.prototype.hasOwnProperty.call(e,this.fileId)?((t=e[this.fileId]).lastTouched=Date.now(),this.storage.setItem("__uploadInProgress",JSON.stringify(e)),[4,this.s3client.send(new xc({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:t.uploadId}))]):[2,{parts:[],uploadId:null}];case 2:return[2,{parts:r.sent().Parts||[],uploadId:t.uploadId}]}}))}))},e.prototype._emitEvent=function(e,t){this.emitter.emit(e,t)},e.prototype._validateParams=function(){if(this.file.size/this.partSize>1e4)throw new Error("Too many parts. Number of parts is "+this.file.size/this.partSize+", maximum is 10000.")},e.prototype._listCachedUploadTasks=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this.storageSync];case 1:return t.sent(),e=this.storage.getItem("__uploadInProgress")||"{}",[2,JSON.parse(e)]}}))}))},e.prototype._cache=function(e){return zc(this,void 0,void 0,(function(){var t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return(t=r.sent())[this.fileId]=e,this.storage.setItem("__uploadInProgress",JSON.stringify(t)),[2]}}))}))},e.prototype._isCached=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return t=(e=Object.prototype.hasOwnProperty).call,[4,this._listCachedUploadTasks()];case 1:return[2,t.apply(e,[r.sent(),this.fileId])]}}))}))},e.prototype._removeFromCache=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return delete(e=t.sent())[this.fileId],this.storage.setItem("__uploadInProgress",JSON.stringify(e)),[2]}}))}))},e.prototype._onPartUploadCompletion=function(e){var t=e.eTag,r=e.partNumber,n=e.chunk;return zc(this,void 0,void 0,(function(){return Ic(this,(function(e){return this.completedParts.push({ETag:t,PartNumber:r}),this.bytesUploaded+=function(e){if("string"==typeof e)return e.length;if(va(e))return e.byteLength;if(pa(e))return e.size;throw new Error("Cannot determine byte length of "+e)}(n),this._emitEvent(Tc.UPLOAD_PROGRESS,{loaded:this.bytesUploaded,total:this.totalBytes}),this.inProgress=this.inProgress.filter((function(e){return e.uploadPartInput.PartNumber!==r})),this.queued.length&&this.state!==Lc.PAUSED&&this._startNextPart(),this._isDone()&&this._completeUpload(),[2]}))}))},e.prototype._completeUpload=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.s3client.send(new Ac({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:this.uploadId,MultipartUpload:{Parts:this.completedParts.sort(Fc)}}))];case 1:return t.sent(),this._verifyFileSize(),this._emitEvent(Tc.UPLOAD_COMPLETE,{key:this.params.Bucket+"/"+this.params.Key}),this._removeFromCache(),this.state=Lc.COMPLETED,[3,3];case 2:return e=t.sent(),Kc.error("error completing upload",e),this._emitEvent(Tc.ERROR,e),[3,3];case 3:return[2]}}))}))},e.prototype._makeUploadPartRequest=function(e,t){return zc(this,void 0,void 0,(function(){var r,n;return Ic(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.s3client.send(new Cc(e),{cancelTokenSource:t})];case 1:return r=i.sent(),[4,this._onPartUploadCompletion({eTag:r.ETag,partNumber:e.PartNumber,chunk:e.Body})];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.state===Lc.PAUSED?Kc.log("upload paused"):this.state===Lc.CANCELLED?Kc.log("upload aborted"):Kc.error("error starting next part of upload: ",n),ia.a.isCancel(n)||n.message===ra.UPLOAD_PAUSED_MESSAGE||(this._emitEvent(Tc.ERROR,n),this.pause()),[3,4];case 4:return[2]}}))}))},e.prototype._startNextPart=function(){if(this.queued.length>0&&this.state!==Lc.PAUSED){var e=ia.a.CancelToken.source(),t=this.queued.shift();this.inProgress.push({uploadPartInput:t,s3Request:this._makeUploadPartRequest(t,e),cancel:e.cancel})}},e.prototype._verifyFileSize=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listSingleFile({key:this.params.Key,bucket:this.params.Bucket})];case 1:if(e=r.sent(),!(t=Boolean(e&&e.Size===this.file.size)))throw new Error("File size does not match between local file and file on s3");return[2,t]}}))}))},e.prototype._isDone=function(){return!this.queued.length&&!this.inProgress.length&&this.bytesUploaded===this.totalBytes},e.prototype._createParts=function(){for(var e=this.file.size,t=[],r=0;r<e;){var n=Math.min(r+this.partSize,e);t.push({Body:this.file.slice(r,n),Key:this.params.Key,Bucket:this.params.Bucket,PartNumber:t.length+1,UploadId:this.uploadId}),r+=this.partSize}return t},e.prototype._initCachedUploadParts=function(e){this.bytesUploaded+=e.reduce((function(e,t){return e+t.Size}),0);var t=new Set(e.map((function(e){return e.PartNumber})));this.queued=this.queued.filter((function(e){return!t.has(e.PartNumber)})),this.completedParts=e.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}})),this._emitEvent(Tc.UPLOAD_PROGRESS,{loaded:this.bytesUploaded,total:this.totalBytes})},e.prototype._initMultipartUpload=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this.s3client.send(new _c(this.params))];case 1:return e=t.sent(),this._cache({uploadId:e.UploadId,lastTouched:Date.now(),bucket:this.params.Bucket,key:this.params.Key,fileName:this.file instanceof File?this.file.name:""}),[2,e.UploadId]}}))}))},e.prototype._initializeUploadTask=function(){return zc(this,void 0,void 0,(function(){var e,t,r,n;return Ic(this,(function(i){switch(i.label){case 0:this.state=Lc.IN_PROGRESS,i.label=1;case 1:return i.trys.push([1,7,,8]),[4,this._isCached()];case 2:return i.sent()?[4,this._findCachedUploadParts()]:[3,4];case 3:return e=i.sent(),t=e.parts,r=e.uploadId,this.uploadId=r,this.queued=this._createParts(),this._initCachedUploadParts(t),this._startUpload(),[3,6];case 4:return this.uploadId?[3,6]:[4,this._initMultipartUpload()];case 5:r=i.sent(),this.uploadId=r,this.queued=this._createParts(),this._startUpload(),i.label=6;case 6:return[3,8];case 7:return n=i.sent(),ia.a.isCancel(n)||Kc.error("Error initializing the upload task",n),[3,8];case 8:return[2]}}))}))},e.prototype.resume=function(){this.state===Lc.CANCELLED?Kc.warn("This task has already been cancelled"):this.state===Lc.COMPLETED?Kc.warn("This task has already been completed"):this.state===Lc.IN_PROGRESS?Kc.warn("Upload task already in progress"):this.uploadId?this._startUpload():this._initializeUploadTask()},e.prototype._startUpload=function(){this.state=Lc.IN_PROGRESS;for(var e=0;e<this.queueSize;e++)this._startNextPart()},e.prototype._cancel=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return this.state!==Lc.CANCELLED?[3,1]:(Kc.warn("This task has already been cancelled"),[2,!1]);case 1:return this.state!==Lc.COMPLETED?[3,2]:(Kc.warn("This task has already been completed"),[2,!1]);case 2:this.pause(),this.queued=[],this.completedParts=[],this.bytesUploaded=0,this.state=Lc.CANCELLED,t.label=3;case 3:return t.trys.push([3,6,,7]),[4,this.s3client.send(new Oc({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:this.uploadId}))];case 4:return t.sent(),[4,this._removeFromCache()];case 5:return t.sent(),[2,!0];case 6:return e=t.sent(),Kc.error("Error cancelling upload task",e),[2,!1];case 7:return[2]}}))}))},e.prototype.pause=function(){var e;this.state===Lc.CANCELLED?Kc.warn("This task has already been cancelled"):this.state===Lc.COMPLETED?Kc.warn("This task has already been completed"):this.state===Lc.PAUSED&&Kc.warn("This task is already paused"),this.state=Lc.PAUSED;var t=this.inProgress.splice(0,this.inProgress.length);t.forEach((function(e){e.cancel(ra.UPLOAD_PAUSED_MESSAGE)})),(e=this.queued).unshift.apply(e,Dc(t.map((function(e){return e.uploadPartInput}))))},e}();function Hc(e){return(Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Vc=function(){return(Vc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Gc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Wc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},$c=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Yc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($c(arguments[t]));return e},Zc=new n.ConsoleLogger("AWSS3Provider"),Xc=function(){function e(e){var t=this;this._config=e||{},this._storage=(new n.StorageHelper).getStorage(),n.Hub.listen("auth",(function(e){var r=e.payload;"signOut"!==r.event&&"signIn"!==r.event||t._storage.removeItem("__uploadInProgress")})),Zc.debug("Storage Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){if(Zc.debug("configure Storage",e),!e)return this._config;var t=n.Parser.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,t.Storage),this._config.bucket||Zc.debug("Do not have bucket yet"),this._config},e.prototype.startResumableUpload=function(e,t){var r=e.s3Client,i=e.emitter,o=e.key,a=e.file,s=e.params,u=t.progressCallback,c=t.completeCallback,l=t.errorCallback,d=t.track,f=void 0!==d&&d;if(!(a instanceof Blob))throw new Error(ea.INVALID_BLOB);i.on(Tc.UPLOAD_PROGRESS,(function(e){u&&("function"==typeof u?u(e):Zc.warn("progressCallback should be a function, not a "+Hc(u)))})),i.on(Tc.UPLOAD_COMPLETE,(function(e){c&&("function"==typeof c?c(e):Zc.warn("completeCallback should be a function, not a "+Hc(c)))})),i.on(Tc.ERROR,(function(e){l&&("function"==typeof l?l(e):Zc.warn("errorCallback should be a function, not a "+Hc(l)))}));var h=n.Credentials.get().then((function(e){var r=n.Credentials.shear(e);return vc(Vc(Vc({},t),{credentials:r}))})),p=new qc({s3Client:r,file:a,emitter:i,level:t.level,storage:this._storage,params:s,prefixPromise:h});return ha(f,"upload",{method:"put",result:"success"},null,"Upload Task created successfully for "+o),p.resume(),p},e.prototype.copy=function(e,t,r){return Gc(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O,x;return Wc(this,(function(k){switch(k.label){case 0:return[4,this._ensureCredentials()];case 1:if(!k.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);if(n=Object.assign({},this._config,r),i=n.acl,o=n.bucket,a=n.cacheControl,s=n.expires,u=n.track,c=n.serverSideEncryption,l=n.SSECustomerAlgorithm,d=n.SSECustomerKey,f=n.SSECustomerKeyMD5,h=n.SSEKMSKeyId,p=e.level,v=void 0===p?"public":p,g=e.identityId,y=e.key,m=t.level,b=void 0===m?"public":m,S=t.key,!y||"string"!=typeof y)throw new Error(ea.NO_SRC_KEY);if(!S||"string"!=typeof S)throw new Error(ea.NO_DEST_KEY);"protected"!==v&&g&&Zc.warn('You may copy files from another user if the source level is "protected", currently it\'s '+v),w=this._prefix(Vc(Vc(Vc({},n),{level:v}),g&&{identityId:g})),E=this._prefix(Vc(Vc({},n),{level:b})),_=o+"/"+w+y,C=""+E+S,Zc.debug("copying "+_+" to "+C),A={Bucket:o,CopySource:_,Key:C,MetadataDirective:"COPY"},a&&(A.CacheControl=a),s&&(A.Expires=s),c&&(A.ServerSideEncryption=c),l&&(A.SSECustomerAlgorithm=l),d&&(A.SSECustomerKey=d),f&&(A.SSECustomerKeyMD5=f),h&&(A.SSEKMSKeyId=h),i&&(A.ACL=i),O=this._createNewS3Client(n),k.label=2;case 2:return k.trys.push([2,4,,5]),[4,O.send(new po(A))];case 3:return k.sent(),ha(u,"copy",{method:"copy",result:"success"},null,"Copy success from "+y+" to "+S),[2,{key:S}];case 4:throw x=k.sent(),ha(u,"copy",{method:"copy",result:"failed"},null,"Copy failed from "+y+" to "+S),x;case 5:return[2]}}))}))},e.prototype.get=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O,x,k;return Wc(this,(function(P){switch(P.label){case 0:return[4,this._ensureCredentials()];case 1:if(!P.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);if(r=Object.assign({},this._config,t),n=r.bucket,i=r.download,o=r.cacheControl,a=r.contentDisposition,s=r.contentEncoding,u=r.contentLanguage,c=r.contentType,l=r.expires,d=r.track,f=r.SSECustomerAlgorithm,h=r.SSECustomerKey,p=r.SSECustomerKeyMD5,v=r.progressCallback,g=this._prefix(r),y=g+e,m=new kc.EventEmitter,b=this._createNewS3Client(r,m),Zc.debug("get "+e+" from "+y),S={Bucket:n,Key:y},o&&(S.ResponseCacheControl=o),a&&(S.ResponseContentDisposition=a),s&&(S.ResponseContentEncoding=s),u&&(S.ResponseContentLanguage=u),c&&(S.ResponseContentType=c),f&&(S.SSECustomerAlgorithm=f),h&&(S.SSECustomerKey=h),p&&(S.SSECustomerKeyMD5=p),!0!==i)return[3,5];w=new vo(S),P.label=2;case 2:return P.trys.push([2,4,,5]),v&&("function"==typeof v?m.on("sendDownloadProgress",(function(e){v(e)})):Zc.warn("progressCallback should be a function, not a "+Hc(v))),[4,b.send(w)];case 3:return E=P.sent(),m.removeAllListeners("sendDownloadProgress"),ha(d,"download",{method:"get",result:"success"},{fileSize:Number(E.Body.size||E.Body.length)},"Download success for "+e),[2,E];case 4:throw _=P.sent(),ha(d,"download",{method:"get",result:"failed"},null,"Download failed with "+_.message),_;case 5:return P.trys.push([5,8,,9]),C=new Qo(Vc({},b.config)),[4,Eo(b,new vo(S))];case 6:return A=P.sent(),x=wo,[4,C.presign(A,{expiresIn:l||900})];case 7:return O=x.apply(void 0,[P.sent()]),ha(d,"getSignedUrl",{method:"get",result:"success"},null,"Signed URL: "+O),[2,O];case 8:throw k=P.sent(),Zc.warn("get signed url error",k),ha(d,"getSignedUrl",{method:"get",result:"failed"},null,"Could not get a signed URL for "+e),k;case 9:return[2]}}))}))},e.prototype.put=function(e,t,r){var n=Object.assign({},this._config,r),i=n.bucket,o=n.track,a=n.progressCallback,s=n.level,u=n.resumable,c=n.contentType,l=n.contentDisposition,d=n.contentEncoding,f=n.cacheControl,h=n.expires,p=n.metadata,v=n.tagging,g=n.acl,y=n.serverSideEncryption,m=n.SSECustomerAlgorithm,b=n.SSECustomerKey,S=n.SSECustomerKeyMD5,w=n.SSEKMSKeyId,E={Bucket:i,Key:e,Body:t,ContentType:c||"binary/octet-stream"};f&&(E.CacheControl=f),l&&(E.ContentDisposition=l),d&&(E.ContentEncoding=d),h&&(E.Expires=h),p&&(E.Metadata=p),v&&(E.Tagging=v),y&&(E.ServerSideEncryption=y),m&&(E.SSECustomerAlgorithm=m),b&&(E.SSECustomerKey=b),S&&(E.SSECustomerKeyMD5=S),w&&(E.SSEKMSKeyId=w);var _=new kc.EventEmitter,C=new Uc(E,n,_);if(g&&(E.ACL=g),!0===u){var A=this._createNewS3Client(n);A.middlewareStack.add(gc(n,e),bc);var O={bucket:i,key:e,s3Client:A,file:t,emitter:_,accessLevel:s,params:E};return this.startResumableUpload(O,r)}try{return a&&("function"==typeof a?_.on("sendUploadProgress",(function(e){a(e)})):Zc.warn("progressCallback should be a function, not a "+Hc(a))),C.upload().then((function(t){return Zc.debug("upload result",t),ha(o,"upload",{method:"put",result:"success"},null,"Upload success for "+e),{key:e}}))}catch(t){throw Zc.warn("error uploading",t),ha(o,"upload",{method:"put",result:"failed"},null,"Error uploading "+e),t}},e.prototype.remove=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l;return Wc(this,(function(d){switch(d.label){case 0:return[4,this._ensureCredentials()];case 1:if(!d.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);r=Object.assign({},this._config,t),n=r.bucket,i=r.track,o=this._prefix(r),a=o+e,s=this._createNewS3Client(r),Zc.debug("remove "+e+" from "+a),u=new go({Bucket:n,Key:a}),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,s.send(u)];case 3:return c=d.sent(),ha(i,"delete",{method:"remove",result:"success"},null,"Deleted "+e+" successfully"),[2,c];case 4:throw l=d.sent(),ha(i,"delete",{method:"remove",result:"failed"},null,"Deletion of "+e+" failed with "+l),l;case 5:return[2]}}))}))},e.prototype._list=function(e,t,r){return Gc(this,void 0,void 0,(function(){var n,i,o,a;return Wc(this,(function(s){switch(s.label){case 0:return n={contents:[],nextToken:""},i=this._createNewS3Client(t),o=new yo(Vc({},e)),[4,i.send(o)];case 1:return(a=s.sent())&&a.Contents&&(n.contents=a.Contents.map((function(e){return{key:e.Key.substr(r.length),eTag:e.ETag,lastModified:e.LastModified,size:e.Size}})),n.nextToken=a.NextContinuationToken),[2,n]}}))}))},e.prototype.list=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l,d,f;return Wc(this,(function(h){switch(h.label){case 0:return[4,this._ensureCredentials()];case 1:if(!h.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);r=Object.assign({},this._config,t),n=r.bucket,i=r.track,o=r.maxKeys,a=this._prefix(r),s=a+e,Zc.debug("list "+e+" from "+s),h.label=2;case 2:if(h.trys.push([2,10,,11]),u=[],c=void 0,l=void 0,d={Bucket:n,Prefix:s,MaxKeys:1e3},"ALL"!==o)return[3,7];h.label=3;case 3:return d.ContinuationToken=c,d.MaxKeys=1e3,[4,this._list(d,r,a)];case 4:l=h.sent(),u.push.apply(u,Yc(l.contents)),l.nextToken&&(c=l.nextToken),h.label=5;case 5:if(l.nextToken)return[3,3];h.label=6;case 6:return[3,9];case 7:return d.MaxKeys=o<1e3||"string"==typeof o?o:1e3,[4,this._list(d,r,a)];case 8:l=h.sent(),u.push.apply(u,Yc(l.contents)),o>1e3&&Zc.warn("maxkeys can be from 0 - 1000 or 'ALL'. To list all files you can set maxKeys to 'ALL'."),h.label=9;case 9:return ha(i,"list",{method:"list",result:"success"},null,u.length+" items returned from list operation"),Zc.debug("list",u),[2,u];case 10:throw f=h.sent(),Zc.warn("list error",f),ha(i,"list",{method:"list",result:"failed"},null,"Listing items failed: "+f.message),f;case 11:return[2]}}))}))},e.prototype._ensureCredentials=function(){return Gc(this,void 0,void 0,(function(){var e,t,r;return Wc(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),Zc.debug("set credentials for storage",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return r=i.sent(),Zc.warn("ensure credentials error",r),[2,!1];case 3:return[2]}}))}))},e.prototype._isWithCredentials=function(e){return"object"===Hc(e)&&e.hasOwnProperty("credentials")},e.prototype._prefix=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},i=e.identityId||t.identityId,o=(void 0!==n.private?n.private:"private/")+i+"/",a=(void 0!==n.protected?n.protected:"protected/")+i+"/",s=void 0!==n.public?n.public:"public/";switch(r){case"private":return o;case"protected":return a;default:return s}},e.prototype._createNewS3Client=function(e,t){var r=wc(e,t);return r.middlewareStack.add(yc(r.config),mc),r},e.CATEGORY="Storage",e.PROVIDER_NAME="AWSS3",e}(),Jc=function(){return(Jc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Qc=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},el=new n.ConsoleLogger("StorageClass"),tl=function(){function e(){this._config={},this._pluggables=[],this._cancelTokenSourceMap=new WeakMap,el.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return e.prototype.getModuleName=function(){return"Storage"},e.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory()){this._pluggables.push(e);return e.configure(this._config[e.getProviderName()])}},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));return void 0===t?(el.debug("No plugin found with providerName",e),null):t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(el.debug("configure Storage"),!e)return this._config;var r=n.Parser.parseMobilehubConfig(e),i=Object.keys(r.Storage),o=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],a=function(e){return o.some((function(t){return t===e}))};return i&&i.find((function(e){return a(e)}))&&!r.Storage.AWSS3&&(r.Storage.AWSS3={}),Object.entries(r.Storage).map((function(e){var t=Qc(e,2),n=t[0],i=t[1];n&&a(n)&&void 0!==i&&(r.Storage.AWSS3[n]=i,delete r.Storage[n])})),Object.keys(r.Storage).forEach((function(e){"string"!=typeof r.Storage[e]&&(t._config[e]=Jc(Jc({},t._config[e]),r.Storage[e]))})),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Xc),this._config},e.prototype.getCancellableTokenSource=function(){return ia.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenSourceMap.set(e,t)},e.prototype.isUploadTask=function(e){return void 0!==e&&"function"==typeof e.pause&&"function"==typeof e.resume},e.prototype.cancel=function(e,t){if(e instanceof qc)return e._cancel();var r=this._cancelTokenSourceMap.get(e);r?r.cancel(t):el.debug("The request does not map to any cancel token")},e.prototype.copy=function(e,t,r){var n=(null==r?void 0:r.provider)||"AWSS3",i=this._pluggables.find((function(e){return e.getProviderName()===n}));if(void 0===i)return el.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider");var o=this.getCancellableTokenSource();if("function"!=typeof i.copy)return Promise.reject(".copy is not implemented on provider "+i.getProviderName());var a=i.copy(e,t,Jc(Jc({},r),{cancelTokenSource:o}));return this.updateRequestToBeCancellable(a,o),a},e.prototype.get=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));if(void 0===n)return el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider");var i=this.getCancellableTokenSource(),o=n.get(e,Jc(Jc({},t),{cancelTokenSource:i}));return this.updateRequestToBeCancellable(o,i),o},e.prototype.isCancelError=function(e){return ia.a.isCancel(e)},e.prototype.put=function(e,t,r){var n=(null==r?void 0:r.provider)||"AWSS3",i=this._pluggables.find((function(e){return e.getProviderName()===n}));if(void 0===i)return el.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider");var o=this.getCancellableTokenSource(),a=i.put(e,t,Jc(Jc({},r),{cancelTokenSource:o}));return this.isUploadTask(a)||this.updateRequestToBeCancellable(a,o),a},e.prototype.remove=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));return void 0===n?(el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")):n.remove(e,t)},e.prototype.list=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));return void 0===n?(el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")):n.list(e,t)},e}(),rl=function(){return(rl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},nl=new n.ConsoleLogger("Storage"),il=null,ol=function(){if(il)return il;nl.debug("Create Storage Instance, debug"),(il=new tl).vault=new tl;var e=il.configure;return il.configure=function(t){nl.debug("storage configure called");var r=rl({},e.call(il,t));Object.keys(r).forEach((function(e){"string"!=typeof r[e]&&(r[e]=rl(rl({},r[e]),{level:"private"}))})),nl.debug("storage vault configure called"),il.vault.configure(r)},il}();n.Amplify.register(ol);t.default=ol},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)}])}));
|
|
25
|
+
t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(0).__exportStar)(r(74),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(0),i=r(27),o=r(75),a=r(76),s=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(27),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=0;d<n.BLOCK_SIZE;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var f=this.temp[d-2],h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,p=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(p+this.temp[d-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(l+(n.KEY[d]+this.temp[d]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;l=c,c=u,u=s,s=a+v|0,a=o,o=i,i=r,r=v+g|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(77);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(78);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(79);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(80);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(95),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(0).__exportStar(r(82),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(0),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!a(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);n.__exportStar(r(84),t),n.__exportStar(r(85),t),n.__exportStar(r(86),t),n.__exportStar(r(87),t),n.__exportStar(r(88),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,i=t.subtle;return n.map((function(e){return i[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(96),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(13).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var n=r(0),i=r(28),o=r(6),a=function(){function e(){this.crc32=new o.Crc32}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,(0,i.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},function(e,t,r){"use strict";r.r(t),r.d(t,"Storage",(function(){return ol})),r.d(t,"StorageClass",(function(){return tl})),r.d(t,"AWSS3Provider",(function(){return Xc}));var n=r(2),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;Object.create;var c=r(0),l=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach((function(e){r.add(e.middleware,Object(c.__assign)({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,Object(c.__assign)({},e))})),r},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(c.__spread)(i(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(c.__spread)(i(e)))})),t},o=function(){var r,n=[],o=[],a={};return e.forEach((function(e){var t=Object(c.__assign)(Object(c.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),n.push(t)})),t.forEach((function(e){var t=Object(c.__assign)(Object(c.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=n,r.sort((function(e,t){return d[t.step]-d[e.step]||f[t.priority||"normal"]-f[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,Object(c.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,n){void 0===n&&(n={});var i=n.name,o=n.override,a=Object(c.__assign)({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var s=e.findIndex((function(e){return e.name===i})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'+i+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(s,1)}r.add(i)}e.push(a)},addRelativeTo:function(e,n){var i=n.name,o=n.override,a=Object(c.__assign)({middleware:e},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var s=t.findIndex((function(e){return e.name===i})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'+i+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(s,1)}r.add(i)}t.push(a)},clone:function(){return n(l())},use:function(e){e.applyToStack(a)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(l());return t.use(e),t},applyToStack:n,resolve:function(e,t){var r,n;try{for(var i=Object(c.__values)(o().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e}};return a},d={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},f={high:3,normal:2,low:1},h=function(){function e(e){this.middlewareStack=l(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),p=function(){this.middlewareStack=l()};function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var g=function(e){return Array.isArray(e)?e:[e]},y=function(e){for(var t in e)e.hasOwnProperty(t)&&void 0!==e[t]["#text"]?e[t]=e[t]["#text"]:"object"==typeof e[t]&&null!==e[t]&&(e[t]=y(e[t]));return e},m=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(c.__spread)([null],arguments)),r=new t;return Object.setPrototypeOf(r,e.prototype),r};m.prototype=Object.create(String.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(m,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(c.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(m);var b=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(e){var t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds();return b[n]+", "+(i<10?"0"+i:""+i)+" "+S[r]+" "+t+" "+(o<10?"0"+o:""+o)+":"+(a<10?"0"+a:""+a)+":"+(s<10?"0"+s:""+s)+" GMT"}var E,_,C,A,O,x,k,P,L,T,M,j,N,R,U,z,I,B,D,K,F,q,H,V,G,W,$,Y,Z,X,J,Q,ee,te,re,ne,ie,oe,ae,se,ue,ce,le,de,fe,he,pe,ve,ge,ye,me,be,Se,we,Ee,_e,Ce,Ae,Oe,xe,ke,Pe,Le,Te,Me,je,Ne,Re,Ue,ze,Ie,Be,De,Ke,Fe,qe,He,Ve,Ge,We,$e,Ye,Ze,Xe,Je,Qe,et,tt,rt,nt,it,ot,at,st,ut,ct,lt,dt,ft,ht,pt,vt,gt,yt,mt,bt,St,wt,Et,_t,Ct,At,Ot,xt,kt,Pt,Lt,Tt,Mt,jt,Nt,Rt,Ut,zt,It,Bt,Dt,Kt,Ft,qt,Ht,Vt,Gt,Wt,$t,Yt,Zt,Xt,Jt,Qt,er,tr,rr,nr,ir,or,ar,sr,ur,cr,lr,dr,fr,hr,pr,vr,gr,yr,mr,br,Sr,wr,Er,_r,Cr,Ar,Or,xr,kr,Pr,Lr,Tr,Mr,jr,Nr,Rr,Ur,zr,Ir,Br,Dr,Kr,Fr,qr,Hr,Vr,Gr,Wr,$r,Yr,Zr,Xr,Jr,Qr,en,tn,rn,nn,on,an,sn,un,cn,ln,dn,fn,hn,pn,vn,gn,yn,mn,bn,Sn,wn,En,_n,Cn,An,On,xn,kn,Pn,Ln,Tn,Mn,jn,Nn,Rn,Un,zn,In,Bn,Dn,Kn,Fn,qn,Hn,Vn,Gn,Wn,$n,Yn,Zn,Xn,Jn,Qn,ei,ti,ri,ni,ii="***SensitiveInformation***";(E||(E={})).filterSensitiveLog=function(e){return a({},e)},(_||(_={})).filterSensitiveLog=function(e){return a({},e)},(C||(C={})).filterSensitiveLog=function(e){return a({},e)},(A||(A={})).filterSensitiveLog=function(e){return a({},e)},(O||(O={})).filterSensitiveLog=function(e){return a({},e)},(x||(x={})).filterSensitiveLog=function(e){return a({},e)},(k||(k={})).filterSensitiveLog=function(e){return a({},e)},(P||(P={})).filterSensitiveLog=function(e){return a({},e)},(L||(L={})).filterSensitiveLog=function(e){return a({},e)},(T||(T={})).filterSensitiveLog=function(e){return a({},e)},(M||(M={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(j||(j={})).filterSensitiveLog=function(e){return a({},e)},(N||(N={})).filterSensitiveLog=function(e){return a({},e)},(R||(R={})).filterSensitiveLog=function(e){return a({},e)},(U||(U={})).filterSensitiveLog=function(e){return a({},e)},(z||(z={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(I||(I={})).filterSensitiveLog=function(e){return a(a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:ii})},(B||(B={})).filterSensitiveLog=function(e){return a({},e)},(D||(D={})).filterSensitiveLog=function(e){return a({},e)},(K||(K={})).filterSensitiveLog=function(e){return a({},e)},(F||(F={})).filterSensitiveLog=function(e){return a({},e)},(q||(q={})).filterSensitiveLog=function(e){return a({},e)},(H||(H={})).filterSensitiveLog=function(e){return a({},e)},(V||(V={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(G||(G={})).filterSensitiveLog=function(e){return a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(W||(W={})).filterSensitiveLog=function(e){return a({},e)},($||($={})).filterSensitiveLog=function(e){return a({},e)},(Y||(Y={})).filterSensitiveLog=function(e){return a({},e)},(Z||(Z={})).filterSensitiveLog=function(e){return a({},e)},(X||(X={})).filterSensitiveLog=function(e){return a({},e)},(J||(J={})).filterSensitiveLog=function(e){return a({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return a({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return a({},e)},(te||(te={})).filterSensitiveLog=function(e){return a({},e)},(re||(re={})).filterSensitiveLog=function(e){return a({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return a({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return a({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return a({},e)},(ae||(ae={})).filterSensitiveLog=function(e){return a({},e)},(se||(se={})).filterSensitiveLog=function(e){return a({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return a({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return a({},e)},(le||(le={})).filterSensitiveLog=function(e){return a({},e)},(de||(de={})).filterSensitiveLog=function(e){return a({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return a({},e)},(he||(he={})).filterSensitiveLog=function(e){return a({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return a({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return a({},e)},(ge||(ge={})).filterSensitiveLog=function(e){return a({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return a({},e)},(me||(me={})).filterSensitiveLog=function(e){return a({},e)},(be||(be={})).filterSensitiveLog=function(e){return a({},e)},(Se||(Se={})).filterSensitiveLog=function(e){return a({},e)},(we||(we={})).filterSensitiveLog=function(e){return a({},e)},(Ee||(Ee={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:Ee.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(_e||(_e={})),(Ce||(Ce={})).filterSensitiveLog=function(e){return a({},e)},(Ae||(Ae={})).filterSensitiveLog=function(e){return a({},e)},(Oe||(Oe={})).filterSensitiveLog=function(e){return a({},e)},(xe||(xe={})).filterSensitiveLog=function(e){return a({},e)},(ke||(ke={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:_e.filterSensitiveLog(e.Filter)})},(Pe||(Pe={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfiguration&&{AnalyticsConfiguration:ke.filterSensitiveLog(e.AnalyticsConfiguration)})},(Le||(Le={})).filterSensitiveLog=function(e){return a({},e)},(Te||(Te={})).filterSensitiveLog=function(e){return a({},e)},(Me||(Me={})).filterSensitiveLog=function(e){return a({},e)},(je||(je={})).filterSensitiveLog=function(e){return a({},e)},(Ne||(Ne={})).filterSensitiveLog=function(e){return a(a({},e),e.KMSMasterKeyID&&{KMSMasterKeyID:ii})},(Re||(Re={})).filterSensitiveLog=function(e){return a(a({},e),e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:Ne.filterSensitiveLog(e.ApplyServerSideEncryptionByDefault)})},(Ue||(Ue={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return Re.filterSensitiveLog(e)}))})},(ze||(ze={})).filterSensitiveLog=function(e){return a(a({},e),e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ue.filterSensitiveLog(e.ServerSideEncryptionConfiguration)})},(Ie||(Ie={})).filterSensitiveLog=function(e){return a({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return a({},e)},(De||(De={})).filterSensitiveLog=function(e){return a({},e)},(Ke||(Ke={})).filterSensitiveLog=function(e){return a({},e)},(Fe||(Fe={})).filterSensitiveLog=function(e){return a({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return a({},e)},(He||(He={})).filterSensitiveLog=function(e){return a({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return a(a({},e),e.KeyId&&{KeyId:ii})},(Ge||(Ge={})).filterSensitiveLog=function(e){return a({},e)},(We||(We={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMS&&{SSEKMS:Ve.filterSensitiveLog(e.SSEKMS)})},($e||($e={})).filterSensitiveLog=function(e){return a(a({},e),e.Encryption&&{Encryption:We.filterSensitiveLog(e.Encryption)})},(Ye||(Ye={})).filterSensitiveLog=function(e){return a(a({},e),e.S3BucketDestination&&{S3BucketDestination:$e.filterSensitiveLog(e.S3BucketDestination)})},(Ze||(Ze={})).filterSensitiveLog=function(e){return a({},e)},(Xe||(Xe={})).filterSensitiveLog=function(e){return a({},e)},(Je||(Je={})).filterSensitiveLog=function(e){return a(a({},e),e.Destination&&{Destination:Ye.filterSensitiveLog(e.Destination)})},(Qe||(Qe={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfiguration&&{InventoryConfiguration:Je.filterSensitiveLog(e.InventoryConfiguration)})},(et||(et={})).filterSensitiveLog=function(e){return a({},e)},(tt||(tt={})).filterSensitiveLog=function(e){return a({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:rt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(nt||(nt={})),(it||(it={})).filterSensitiveLog=function(e){return a({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return a({},e)},(at||(at={})).filterSensitiveLog=function(e){return a({},e)},(st||(st={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:nt.filterSensitiveLog(e.Filter)})},(ut||(ut={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return st.filterSensitiveLog(e)}))})},(ct||(ct={})).filterSensitiveLog=function(e){return a({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return a({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return a({},e)},(ft||(ft={})).filterSensitiveLog=function(e){return a({},e)},(ht||(ht={})).filterSensitiveLog=function(e){return a({},e)},(pt||(pt={})).filterSensitiveLog=function(e){return a({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return a({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:gt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(yt||(yt={})),(mt||(mt={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:yt.filterSensitiveLog(e.Filter)})},(bt||(bt={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfiguration&&{MetricsConfiguration:mt.filterSensitiveLog(e.MetricsConfiguration)})},(St||(St={})).filterSensitiveLog=function(e){return a({},e)},(wt||(wt={})).filterSensitiveLog=function(e){return a({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return a({},e)},(_t||(_t={})).filterSensitiveLog=function(e){return a({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return a({},e)},(At||(At={})).filterSensitiveLog=function(e){return a({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return a({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return a({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return a({},e)},(Pt||(Pt={})).filterSensitiveLog=function(e){return a({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return a({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return a({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return a({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return a({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return a({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return a({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return a({},e)},(zt||(zt={})).filterSensitiveLog=function(e){return a({},e)},(It||(It={})).filterSensitiveLog=function(e){return a({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return a({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return a({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return a({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return a({},e)},(qt||(qt={})).filterSensitiveLog=function(e){return a({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return a({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:we.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:Vt.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Gt||(Gt={})),(Wt||(Wt={})).filterSensitiveLog=function(e){return a({},e)},($t||($t={})).filterSensitiveLog=function(e){return a({},e)},(Yt||(Yt={})).filterSensitiveLog=function(e){return a({},e)},(Zt||(Zt={})).filterSensitiveLog=function(e){return a(a({},e),e.Filter&&{Filter:Gt.filterSensitiveLog(e.Filter)})},(Xt||(Xt={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return Zt.filterSensitiveLog(e)}))})},(Jt||(Jt={})).filterSensitiveLog=function(e){return a(a({},e),e.ReplicationConfiguration&&{ReplicationConfiguration:Xt.filterSensitiveLog(e.ReplicationConfiguration)})},(Qt||(Qt={})).filterSensitiveLog=function(e){return a({},e)},(er||(er={})).filterSensitiveLog=function(e){return a({},e)},(tr||(tr={})).filterSensitiveLog=function(e){return a({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return a({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return a({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return a({},e)},(or||(or={})).filterSensitiveLog=function(e){return a({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return a({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return a({},e)},(ur||(ur={})).filterSensitiveLog=function(e){return a({},e)},(cr||(cr={})).filterSensitiveLog=function(e){return a({},e)},(lr||(lr={})).filterSensitiveLog=function(e){return a({},e)},(dr||(dr={})).filterSensitiveLog=function(e){return a({},e)},(fr||(fr={})).filterSensitiveLog=function(e){return a({},e)},(hr||(hr={})).filterSensitiveLog=function(e){return a({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(vr||(vr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(gr||(gr={})).filterSensitiveLog=function(e){return a({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return a({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return a({},e)},(br||(br={})).filterSensitiveLog=function(e){return a({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return a({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return a({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return a({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return a({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return a({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return a({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return a({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return a({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return a({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return a({},e)},(Lr||(Lr={})).filterSensitiveLog=function(e){return a({},e)},(Tr||(Tr={})).filterSensitiveLog=function(e){return a({},e)},(Mr||(Mr={})).filterSensitiveLog=function(e){return a({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return a({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return a({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return a({},e)},(Ur||(Ur={})).filterSensitiveLog=function(e){return a({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return a({},e)},(Ir||(Ir={})).filterSensitiveLog=function(e){return a({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return a({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(Kr||(Kr={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(Fr||(Fr={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfigurationList&&{AnalyticsConfigurationList:e.AnalyticsConfigurationList.map((function(e){return ke.filterSensitiveLog(e)}))})},(qr||(qr={})).filterSensitiveLog=function(e){return a({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return a({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return a({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map((function(e){return Je.filterSensitiveLog(e)}))})},(Wr||(Wr={})).filterSensitiveLog=function(e){return a({},e)},($r||($r={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfigurationList&&{MetricsConfigurationList:e.MetricsConfigurationList.map((function(e){return mt.filterSensitiveLog(e)}))})},(Yr||(Yr={})).filterSensitiveLog=function(e){return a({},e)},(Zr||(Zr={})).filterSensitiveLog=function(e){return a({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return a({},e)},(Jr||(Jr={})).filterSensitiveLog=function(e){return a({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return a({},e)},(en||(en={})).filterSensitiveLog=function(e){return a({},e)},(tn||(tn={})).filterSensitiveLog=function(e){return a({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return a({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return a({},e)},(on||(on={})).filterSensitiveLog=function(e){return a({},e)},(an||(an={})).filterSensitiveLog=function(e){return a({},e)},(sn||(sn={})).filterSensitiveLog=function(e){return a({},e)},(un||(un={})).filterSensitiveLog=function(e){return a({},e)},(cn||(cn={})).filterSensitiveLog=function(e){return a({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return a({},e)},(dn||(dn={})).filterSensitiveLog=function(e){return a({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return a({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return a({},e)},(pn||(pn={})).filterSensitiveLog=function(e){return a({},e)},(vn||(vn={})).filterSensitiveLog=function(e){return a({},e)},(gn||(gn={})).filterSensitiveLog=function(e){return a({},e)},(yn||(yn={})).filterSensitiveLog=function(e){return a({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return a(a({},e),e.AnalyticsConfiguration&&{AnalyticsConfiguration:ke.filterSensitiveLog(e.AnalyticsConfiguration)})},(bn||(bn={})).filterSensitiveLog=function(e){return a({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return a({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return a(a({},e),e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ue.filterSensitiveLog(e.ServerSideEncryptionConfiguration)})},(En||(En={})).filterSensitiveLog=function(e){return a({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return a(a({},e),e.InventoryConfiguration&&{InventoryConfiguration:Je.filterSensitiveLog(e.InventoryConfiguration)})},(Cn||(Cn={})).filterSensitiveLog=function(e){return a(a({},e),e.Rules&&{Rules:e.Rules.map((function(e){return st.filterSensitiveLog(e)}))})},(An||(An={})).filterSensitiveLog=function(e){return a(a({},e),e.LifecycleConfiguration&&{LifecycleConfiguration:Cn.filterSensitiveLog(e.LifecycleConfiguration)})},(On||(On={})).filterSensitiveLog=function(e){return a({},e)},(xn||(xn={})).filterSensitiveLog=function(e){return a({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return a(a({},e),e.MetricsConfiguration&&{MetricsConfiguration:mt.filterSensitiveLog(e.MetricsConfiguration)})},(Pn||(Pn={})).filterSensitiveLog=function(e){return a({},e)},(Ln||(Ln={})).filterSensitiveLog=function(e){return a({},e)},(Tn||(Tn={})).filterSensitiveLog=function(e){return a({},e)},(Mn||(Mn={})).filterSensitiveLog=function(e){return a(a({},e),e.ReplicationConfiguration&&{ReplicationConfiguration:Xt.filterSensitiveLog(e.ReplicationConfiguration)})},(jn||(jn={})).filterSensitiveLog=function(e){return a({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return a({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return a({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return a({},e)},(zn||(zn={})).filterSensitiveLog=function(e){return a({},e)},(In||(In={})).filterSensitiveLog=function(e){return a({},e)},(Bn||(Bn={})).filterSensitiveLog=function(e){return a({},e)},(Dn||(Dn={})).filterSensitiveLog=function(e){return a({},e)},(Kn||(Kn={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(Fn||(Fn={})).filterSensitiveLog=function(e){return a(a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.SSEKMSKeyId&&{SSEKMSKeyId:ii}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:ii})},(qn||(qn={})).filterSensitiveLog=function(e){return a({},e)},(Hn||(Hn={})).filterSensitiveLog=function(e){return a({},e)},(Vn||(Vn={})).filterSensitiveLog=function(e){return a({},e)},(Gn||(Gn={})).filterSensitiveLog=function(e){return a({},e)},(Wn||(Wn={})).filterSensitiveLog=function(e){return a({},e)},($n||($n={})).filterSensitiveLog=function(e){return a({},e)},(Yn||(Yn={})).filterSensitiveLog=function(e){return a({},e)},(Zn||(Zn={})).filterSensitiveLog=function(e){return a({},e)},(Xn||(Xn={})).filterSensitiveLog=function(e){return a({},e)},(Jn||(Jn={})).filterSensitiveLog=function(e){return a({},e)},(Qn||(Qn={})).filterSensitiveLog=function(e){return a({},e)},(ei||(ei={})).filterSensitiveLog=function(e){return a({},e)},(ti||(ti={})).filterSensitiveLog=function(e){return a({},e)},(ri||(ri={})).filterSensitiveLog=function(e){return a({},e)},(ni||(ni={})).filterSensitiveLog=function(e){return a(a({},e),e.KMSKeyId&&{KMSKeyId:ii})};var oi=r(1);var ai=function(){function e(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}return e.prototype.withName=function(e){return this.name=e,this},e.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},e.prototype.addChildNode=function(e){return this.children.push(e),this},e.prototype.removeAttribute=function(e){return delete this.attributes[e],this},e.prototype.toString=function(){var e,t,r=Boolean(this.children.length),n="<"+this.name,i=this.attributes;try{for(var o=Object(c.__values)(Object.keys(i)),a=o.next();!a.done;a=o.next()){var s=a.value,u=i[s];null!=u&&(n+=" "+s+'="'+(""+u).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")+'"')}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n+(r?">"+this.children.map((function(e){return e.toString()})).join("")+"</"+this.name+">":"/>")},e}();var si=function(){function e(e){this.value=e}return e.prototype.toString=function(){return(""+this.value).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e}(),ui=r(30),ci=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":return[3,2]}return[3,4];case 2:return s=[{}],[4,Ei(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},li=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},di=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":return[3,2]}return[3,4];case 2:return s=[{}],[4,_i(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},fi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},hi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},pi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],f={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(f.body=u.sent(),f)])),o="UnknownError",o=Ui(e,r.body),o){case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":return[3,2];case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":return[3,4]}return[3,6];case 2:return s=[{}],[4,bi(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,7];case 4:return c=[{}],[4,wi(r,t)];case 5:return i=a.apply(void 0,[a.apply(void 0,c.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,7];case 6:l=r.body,o=l.code||l.Code||o,i=a(a({},l),{name:""+o,message:l.message||l.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=7;case 7:return d=i.message||i.Message||o,i.message=d,delete i.Message,[2,Promise.reject(Object.assign(new Error(d),i))]}}))}))},vi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],d={},[4,Ri(e.body,t)];case 1:switch(r=a.apply(void 0,n.concat([(d.body=u.sent(),d)])),o="UnknownError",o=Ui(e,r.body),o){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":return[3,2]}return[3,4];case 2:return s=[{}],[4,Si(r,t)];case 3:return i=a.apply(void 0,[a.apply(void 0,s.concat([u.sent()])),{name:o,$metadata:Mi(e)}]),[3,5];case 4:c=r.body,o=c.code||c.Code||o,i=a(a({},c),{name:""+o,message:c.message||c.Message||o,$fault:"client",$metadata:Mi(e)}),u.label=5;case 5:return l=i.message||i.Message||o,i.message=l,delete i.Message,[2,Promise.reject(Object.assign(new Error(l),i))]}}))}))},gi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},yi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},mi=function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l;return u(this,(function(u){switch(u.label){case 0:return n=[a({},e)],l={},[4,Ri(e.body,t)];case 1:return r=a.apply(void 0,n.concat([(l.body=u.sent(),l)])),o="UnknownError",o=Ui(e,r.body),s=r.body,o=s.code||s.Code||o,i=a(a({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Mi(e)}),c=i.message||i.Message||o,i.message=c,delete i.Message,[2,Promise.reject(Object.assign(new Error(c),i))]}}))}))},bi=function(e,t){return s(void 0,void 0,void 0,(function(){var t,r;return u(this,(function(n){return t={name:"InvalidObjectState",$fault:"client",$metadata:Mi(e),AccessTier:void 0,StorageClass:void 0},void 0!==(r=e.body).AccessTier&&(t.AccessTier=r.AccessTier),void 0!==r.StorageClass&&(t.StorageClass=r.StorageClass),[2,t]}))}))},Si=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchBucket",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},wi=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchKey",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},Ei=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"NoSuchUpload",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},_i=function(e,t){return s(void 0,void 0,void 0,(function(){var t;return u(this,(function(r){return t={name:"ObjectNotInActiveTierError",$fault:"client",$metadata:Mi(e)},e.body,[2,t]}))}))},Ci=function(e,t){var r=new ai("CompletedMultipartUpload");void 0!==e.Parts&&null!==e.Parts&&Ai(e.Parts,t).map((function(e){e=e.withName("Part"),r.addChildNode(e)}));return r},Ai=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r=new ai("CompletedPart");if(void 0!==e.ETag&&null!==e.ETag){var n=new ai("ETag").addChildNode(new si(e.ETag)).withName("ETag");r.addChildNode(n)}if(void 0!==e.PartNumber&&null!==e.PartNumber){n=new ai("PartNumber").addChildNode(new si(String(e.PartNumber))).withName("PartNumber");r.addChildNode(n)}return r}(e).withName("member")}))},Oi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={Prefix:void 0};return void 0!==e.Prefix&&(r.Prefix=e.Prefix),r}(e)}))},xi=function(e,t){var r={ETag:void 0,LastModified:void 0};return void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),r},ki=function(e,t){var r={ID:void 0,DisplayName:void 0};return void 0!==e.ID&&(r.ID=e.ID),void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),r},Pi=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={Key:void 0,LastModified:void 0,ETag:void 0,Size:void 0,StorageClass:void 0,Owner:void 0};return void 0!==e.Key&&(r.Key=e.Key),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Size&&(r.Size=parseInt(e.Size)),void 0!==e.StorageClass&&(r.StorageClass=e.StorageClass),void 0!==e.Owner&&(r.Owner=Li(e.Owner,t)),r}(e,t)}))},Li=function(e,t){var r={DisplayName:void 0,ID:void 0};return void 0!==e.DisplayName&&(r.DisplayName=e.DisplayName),void 0!==e.ID&&(r.ID=e.ID),r},Ti=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){var r={PartNumber:void 0,LastModified:void 0,ETag:void 0,Size:void 0};return void 0!==e.PartNumber&&(r.PartNumber=parseInt(e.PartNumber)),void 0!==e.LastModified&&(r.LastModified=new Date(e.LastModified)),void 0!==e.ETag&&(r.ETag=e.ETag),void 0!==e.Size&&(r.Size=parseInt(e.Size)),r}(e)}))},Mi=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},ji=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Ni=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},Ri=function(e,t){return function(e,t){return ji(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){if(e.length){var t=Object(ui.parse)(e,{attributeNamePrefix:"",ignoreAttributes:!1,parseNodeValue:!1,tagValueProcessor:function(e,t){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<")}}),r=Object.keys(t)[0],n=t[r];return n["#text"]&&(n[r]=n["#text"],delete n["#text"]),y(n)}return{}}))},Ui=function(e,t){return void 0!==t.Code?t.Code:404==e.statusCode?"NotFound":""},zi=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ii=/(\d+\.){3}\d+/,Bi=/\.\./,Di=/\./,Ki=/^(.+\.)?s3[.-]([a-z0-9-]+)\./,Fi=/^s3(-external-1)?\.amazonaws\.com$/,qi=function(e){return Vi(e)?e.replace(/fips-|-fips/,""):e},Hi=function(e){var t=e.match(Ki);return[t[2],e.replace(new RegExp("^"+t[0]),"")]},Vi=function(e){return e.startsWith("fips-")||e.endsWith("-fips")},Gi=function(e,t){return e===t||qi(e)===t||e===qi(t)},Wi=function(e,t){if(void 0===t&&(t={tlsCompatible:!0}),e.length>=64||!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(e)||/(\d+\.){3}\d+/.test(e)||/[.-]{2}/.test(e)||(null==t?void 0:t.tlsCompatible)&&Di.test(e))throw new Error("Invalid DNS label "+e)},$i=function(e){var t=e.isCustomEndpoint,r=(e.baseHostname,e.dualstackEndpoint),n=e.accelerateEndpoint;if(t){if(r)throw new Error("Dualstack endpoint is not supported with custom endpoint");if(n)throw new Error("Accelerate endpoint is not supported with custom endpoint")}return function(e){return"string"==typeof e.bucketName}(e)?Zi(Object(c.__assign)(Object(c.__assign)({},e),{isCustomEndpoint:t})):Yi(Object(c.__assign)(Object(c.__assign)({},e),{isCustomEndpoint:t}))},Yi=function(e){var t,r=e.isCustomEndpoint,n=e.baseHostname,i=Object(c.__read)(r?[e.clientRegion,n]:(t=n,Fi.test(t)?[t.replace(".amazonaws.com",""),"amazonaws.com"]:Hi(t)),2),o=i[0],a=i[1],s=e.pathStyleEndpoint,u=e.dualstackEndpoint,l=void 0!==u&&u,d=e.accelerateEndpoint,f=void 0!==d&&d,h=e.tlsCompatible,p=void 0===h||h,v=e.useArnRegion,g=e.bucketName,y=e.clientPartition,m=void 0===y?"aws":y,b=e.clientSigningRegion,S=void 0===b?o:b;!function(e){if(e.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(e.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!e.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")}({pathStyleEndpoint:s,accelerateEndpoint:f,tlsCompatible:p});var w=g.service,E=g.partition,_=g.accountId,C=g.region,A=g.resource;!function(e){if("s3"!==e&&"s3-outposts"!==e)throw new Error("Expect 's3' or 's3-outposts' in ARN service component")}(w),function(e,t){if(e!==t.clientPartition)throw new Error('Partition in ARN is incompatible, got "'+e+'" but expected "'+t.clientPartition+'"')}(E,{clientPartition:m}),function(e){if(!/[0-9]{12}/.exec(e))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")}(_),function(e,t){if(""===e)throw new Error("ARN region is empty");if(!t.useArnRegion&&!Gi(e,t.clientRegion)&&!Gi(e,t.clientSigningRegion))throw new Error("Region in ARN is incompatible, got "+e+" but expected "+t.clientRegion);if(t.useArnRegion&&Vi(e))throw new Error("Endpoint does not support FIPS region")}(C,{useArnRegion:v,clientRegion:o,clientSigningRegion:S});var O=function(e){var t=e.includes(":")?":":"/",r=Object(c.__read)(e.split(t)),n=r[0],i=r.slice(1);if("accesspoint"===n){if(1!==i.length||""===i[0])throw new Error("Access Point ARN should have one resource accesspoint"+t+"{accesspointname}");return{accesspointName:i[0]}}if("outpost"===n){if(!i[0]||"accesspoint"!==i[1]||!i[2]||3!==i.length)throw new Error("Outpost ARN should have resource outpost"+t+"{outpostId}"+t+"accesspoint"+t+"{accesspointName}");var o=Object(c.__read)(i,3),a=o[0];o[1];return{outpostId:a,accesspointName:o[2]}}throw new Error("ARN resource should begin with 'accesspoint"+t+"' or 'outpost"+t+"'")}(A),x=O.accesspointName,k=O.outpostId;Wi(x+"-"+_,{tlsCompatible:p});var P=v?C:o,L=v?C:S;return k?(function(e){if("s3-outposts"!==e)throw new Error("Expect 's3-posts' in Outpost ARN service component")}(w),Wi(k,{tlsCompatible:p}),function(e){if(e)throw new Error("Dualstack endpoint is not supported with Outpost")}(l),function(e){if(Vi(null!=e?e:""))throw new Error("FIPS region is not supported with Outpost, got "+e)}(P),{bucketEndpoint:!0,hostname:x+"-"+_+"."+k+(r?"":".s3-outposts."+P)+"."+a,signingRegion:L,signingService:"s3-outposts"}):(function(e){if("s3"!==e)throw new Error("Expect 's3' in Accesspoint ARN service component")}(w),{bucketEndpoint:!0,hostname:x+"-"+_+(r?"":".s3-accesspoint"+(l?".dualstack":"")+"."+P)+"."+a,signingRegion:L})},Zi=function(e){var t,r=e.accelerateEndpoint,n=void 0!==r&&r,i=e.clientRegion,o=e.baseHostname,a=e.bucketName,s=e.dualstackEndpoint,u=void 0!==s&&s,l=e.pathStyleEndpoint,d=void 0!==l&&l,f=e.tlsCompatible,h=void 0===f||f,p=e.isCustomEndpoint,v=void 0!==p&&p,g=Object(c.__read)(v?[i,o]:(t=o,Fi.test(t)?["us-east-1","amazonaws.com"]:Hi(t)),2),y=g[0],m=g[1];return d||!function(e){return zi.test(e)&&!Ii.test(e)&&!Bi.test(e)}(a)||h&&Di.test(a)?{bucketEndpoint:!1,hostname:u?"s3.dualstack."+y+"."+m:o}:(n?o="s3-accelerate"+(u?".dualstack":"")+"."+m:u&&(o="s3.dualstack."+y+"."+m),{bucketEndpoint:!0,hostname:a+"."+o})},Xi=function(e){return function(t,r){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E;return Object(c.__generator)(this,(function(_){switch(_.label){case 0:return i=n.input.Bucket,o=e.bucketEndpoint,a=n.request,oi.a.isInstance(a)?e.bucketEndpoint?(a.hostname=i,[3,7]):[3,1]:[3,8];case 1:return"string"==typeof(C=i)&&0===C.indexOf("arn:")&&C.split(":").length>=6?(s=function(e){var t=e.split(":");if(t.length<6||"arn"!==t[0])throw new Error("Malformed ARN");var r=Object(c.__read)(t);return{partition:r[1],service:r[2],region:r[3],accountId:r[4],resource:r.slice(5).join(":")}}(i),u=qi,[4,e.region()]):[3,5];case 2:return m=u.apply(void 0,[_.sent()]),[4,e.regionInfoProvider(m)];case 3:return l=_.sent()||{},d=l.partition,f=l.signingRegion,h=void 0===f?m:f,[4,e.useArnRegion()];case 4:return p=_.sent(),v=$i({bucketName:s,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol,useArnRegion:p,clientPartition:d,clientSigningRegion:h,clientRegion:m,isCustomEndpoint:e.isCustomEndpoint}),w=v.hostname,E=v.bucketEndpoint,g=v.signingRegion,y=v.signingService,g&&g!==h&&(r.signing_region=g),y&&"s3"!==y&&(r.signing_service=y),a.hostname=w,o=E,[3,7];case 5:return b=qi,[4,e.region()];case 6:m=b.apply(void 0,[_.sent()]),S=$i({bucketName:i,clientRegion:m,baseHostname:a.hostname,accelerateEndpoint:e.useAccelerateEndpoint,dualstackEndpoint:e.useDualstackEndpoint,pathStyleEndpoint:e.forcePathStyle,tlsCompatible:"https:"===a.protocol,isCustomEndpoint:e.isCustomEndpoint}),w=S.hostname,E=S.bucketEndpoint,a.hostname=w,o=E,_.label=7;case 7:o&&(a.path=a.path.replace(/^(\/)?[^\/]+/,""),""===a.path&&(a.path="/")),_.label=8;case 8:return[2,t(Object(c.__assign)(Object(c.__assign)({},n),{request:a}))]}var C}))}))}}},Ji={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware",override:!0},Qi=function(e){return{applyToStack:function(t){t.addRelativeTo(Xi(e),Ji)}}};var eo={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},to=function(e){return{applyToStack:function(e){e.add(function(){var e=this;return function(t){return function(r){return Object(c.__awaiter)(e,void 0,void 0,(function(){var e,n;return Object(c.__generator)(this,(function(i){if("string"==typeof(e=r.input.Bucket)&&!("string"==typeof(o=e)&&0===o.indexOf("arn:")&&o.split(":").length>=6)&&e.indexOf("/")>=0)throw(n=new Error("Bucket name shouldn't contain '/', received '"+e+"'")).name="InvalidBucketName",n;var o;return[2,t(Object(c.__assign)({},r))]}))}))}}}(),eo)}}},ro={step:"build",tags:["USE_REGIONAL_ENDPOINT","S3"],name:"useRegionalEndpointMiddleware",override:!0},no=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return n=r.request,!oi.a.isInstance(n)||e.isCustomEndpoint?[2,t(Object(c.__assign)({},r))]:"s3.amazonaws.com"!==n.hostname?[3,1]:(n.hostname="s3.us-east-1.amazonaws.com",[3,3]);case 1:return i="aws-global",[4,e.region()];case 2:i===o.sent()&&(n.hostname="s3.amazonaws.com"),o.label=3;case 3:return[2,t(Object(c.__assign)({},r))]}}))}))}}}(e),ro)}}},io=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},oo=function(e,t){return io(e,t).then((function(e){return t.utf8Encoder(e)}))},ao={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},so=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,l;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,t(r)];case 1:return n=c.sent(),i=n.response,oi.b.isInstance(i)?(o=i.statusCode,a=i.body,o<200&&o>=300?[2,n]:[4,io(a,e)]):[2,n];case 2:return s=c.sent(),[4,oo(s,e)];case 3:if(u=c.sent(),0===s.length)throw(l=new Error("S3 aborted request")).name="InternalError",l;return u&&u.match("<Error>")&&(i.statusCode=400),i.body=s,[2,n]}}))}))}}}(e),ao)}}},uo={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},co={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function lo(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o;return Object(c.__generator)(this,(function(a){switch(a.label){case 0:return[4,r(n)];case 1:return i=a.sent().response,[4,t(i,e)];case 2:return o=a.sent(),[2,{response:i,output:o}]}}))}))}}}(e,r),uo),n.add(function(e,t){return function(r,n){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:i}))]}}))}))}}}(e,t),co)}}}var fo={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},ho=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S;return Object(c.__generator)(this,(function(w){switch(w.label){case 0:t=Object(c.__assign)({},n.input),i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}],w.label=1;case 1:w.trys.push([1,6,7,8]),o=Object(c.__values)(i),a=o.next(),w.label=2;case 2:return a.done?[3,5]:(s=a.value,(u=t[s.target])?(l=ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):"string"==typeof u?e.utf8Decoder(u):new Uint8Array(u),d=e.base64Encoder(l),(f=new e.md5).update(l),h=[Object(c.__assign)({},t)],(S={})[s.target]=d,p=s.hash,g=(v=e).base64Encoder,[4,f.digest()]):[3,4]);case 3:t=c.__assign.apply(void 0,h.concat([(S[p]=g.apply(v,[w.sent()]),S)])),w.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return y=w.sent(),m={error:y},[3,8];case 7:try{a&&!a.done&&(b=o.return)&&b.call(o)}finally{if(m)throw m.error}return[7];case 8:return[2,r(Object(c.__assign)(Object(c.__assign)({},n),{input:t}))]}}))}))}}}(e),fo)}}},po=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(so(t)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CopyObjectCommand",inputFilterSensitiveLog:I.filterSensitiveLog,outputFilterSensitiveLog:z.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.CopySource)&&{"x-amz-copy-source":e.CopySource}),Ni(e.CopySourceIfMatch)&&{"x-amz-copy-source-if-match":e.CopySourceIfMatch}),Ni(e.CopySourceIfModifiedSince)&&{"x-amz-copy-source-if-modified-since":w(e.CopySourceIfModifiedSince).toString()}),Ni(e.CopySourceIfNoneMatch)&&{"x-amz-copy-source-if-none-match":e.CopySourceIfNoneMatch}),Ni(e.CopySourceIfUnmodifiedSince)&&{"x-amz-copy-source-if-unmodified-since":w(e.CopySourceIfUnmodifiedSince).toString()}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.MetadataDirective)&&{"x-amz-metadata-directive":e.MetadataDirective}),Ni(e.TaggingDirective)&&{"x-amz-tagging-directive":e.TaggingDirective}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.CopySourceSSECustomerAlgorithm)&&{"x-amz-copy-source-server-side-encryption-customer-algorithm":e.CopySourceSSECustomerAlgorithm}),Ni(e.CopySourceSSECustomerKey)&&{"x-amz-copy-source-server-side-encryption-customer-key":e.CopySourceSSECustomerKey}),Ni(e.CopySourceSSECustomerKeyMD5)&&{"x-amz-copy-source-server-side-encryption-customer-key-md5":e.CopySourceSSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),Ni(e.ExpectedSourceBucketOwner)&&{"x-amz-source-expected-bucket-owner":e.ExpectedSourceBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={"x-id":"CopyObject"},[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"PUT",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,di(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,CopyObjectResult:void 0,CopySourceVersionId:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-copy-source-version-id"]&&(r.CopySourceVersionId=e.headers["x-amz-copy-source-version-id"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return n=i.sent(),r.CopyObjectResult=xi(n,t),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),vo=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"GetObjectCommand",inputFilterSensitiveLog:vr.filterSensitiveLog,outputFilterSensitiveLog:pr.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a({},Ni(e.IfMatch)&&{"if-match":e.IfMatch}),Ni(e.IfModifiedSince)&&{"if-modified-since":w(e.IfModifiedSince).toString()}),Ni(e.IfNoneMatch)&&{"if-none-match":e.IfNoneMatch}),Ni(e.IfUnmodifiedSince)&&{"if-unmodified-since":w(e.IfUnmodifiedSince).toString()}),Ni(e.Range)&&{range:e.Range}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a(a(a(a(a(a(a({"x-id":"GetObject"},void 0!==e.ResponseCacheControl&&{"response-cache-control":e.ResponseCacheControl}),void 0!==e.ResponseContentDisposition&&{"response-content-disposition":e.ResponseContentDisposition}),void 0!==e.ResponseContentEncoding&&{"response-content-encoding":e.ResponseContentEncoding}),void 0!==e.ResponseContentLanguage&&{"response-content-language":e.ResponseContentLanguage}),void 0!==e.ResponseContentType&&{"response-content-type":e.ResponseContentType}),void 0!==e.ResponseExpires&&{"response-expires":(e.ResponseExpires.toISOString().split(".")[0]+"Z").toString()}),void 0!==e.VersionId&&{versionId:e.VersionId}),void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){return 200!==e.statusCode&&e.statusCode>=300?[2,pi(e,t)]:(r={$metadata:Mi(e),AcceptRanges:void 0,Body:void 0,BucketKeyEnabled:void 0,CacheControl:void 0,ContentDisposition:void 0,ContentEncoding:void 0,ContentLanguage:void 0,ContentLength:void 0,ContentRange:void 0,ContentType:void 0,DeleteMarker:void 0,ETag:void 0,Expiration:void 0,Expires:void 0,LastModified:void 0,Metadata:void 0,MissingMeta:void 0,ObjectLockLegalHoldStatus:void 0,ObjectLockMode:void 0,ObjectLockRetainUntilDate:void 0,PartsCount:void 0,ReplicationStatus:void 0,RequestCharged:void 0,Restore:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,StorageClass:void 0,TagCount:void 0,VersionId:void 0,WebsiteRedirectLocation:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["accept-ranges"]&&(r.AcceptRanges=e.headers["accept-ranges"]),void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-restore"]&&(r.Restore=e.headers["x-amz-restore"]),void 0!==e.headers["last-modified"]&&(r.LastModified=new Date(e.headers["last-modified"])),void 0!==e.headers["content-length"]&&(r.ContentLength=parseInt(e.headers["content-length"],10)),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-missing-meta"]&&(r.MissingMeta=parseInt(e.headers["x-amz-missing-meta"],10)),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["cache-control"]&&(r.CacheControl=e.headers["cache-control"]),void 0!==e.headers["content-disposition"]&&(r.ContentDisposition=e.headers["content-disposition"]),void 0!==e.headers["content-encoding"]&&(r.ContentEncoding=e.headers["content-encoding"]),void 0!==e.headers["content-language"]&&(r.ContentLanguage=e.headers["content-language"]),void 0!==e.headers["content-range"]&&(r.ContentRange=e.headers["content-range"]),void 0!==e.headers["content-type"]&&(r.ContentType=e.headers["content-type"]),void 0!==e.headers.expires&&(r.Expires=new Date(e.headers.expires)),void 0!==e.headers["x-amz-website-redirect-location"]&&(r.WebsiteRedirectLocation=e.headers["x-amz-website-redirect-location"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-storage-class"]&&(r.StorageClass=e.headers["x-amz-storage-class"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),void 0!==e.headers["x-amz-replication-status"]&&(r.ReplicationStatus=e.headers["x-amz-replication-status"]),void 0!==e.headers["x-amz-mp-parts-count"]&&(r.PartsCount=parseInt(e.headers["x-amz-mp-parts-count"],10)),void 0!==e.headers["x-amz-tagging-count"]&&(r.TagCount=parseInt(e.headers["x-amz-tagging-count"],10)),void 0!==e.headers["x-amz-object-lock-mode"]&&(r.ObjectLockMode=e.headers["x-amz-object-lock-mode"]),void 0!==e.headers["x-amz-object-lock-retain-until-date"]&&(r.ObjectLockRetainUntilDate=new Date(e.headers["x-amz-object-lock-retain-until-date"])),void 0!==e.headers["x-amz-object-lock-legal-hold"]&&(r.ObjectLockLegalHoldStatus=e.headers["x-amz-object-lock-legal-hold"]),Object.keys(e.headers).forEach((function(t){void 0===r.Metadata&&(r.Metadata={}),t.startsWith("x-amz-meta-")&&(r.Metadata[t.substring(11)]=e.headers[t])})),n=e.body,r.Body=n,[2,Promise.resolve(r)])}))}))}(e,t)},t}(p),go=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"DeleteObjectCommand",inputFilterSensitiveLog:se.filterSensitiveLog,outputFilterSensitiveLog:ae.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a({},Ni(e.MFA)&&{"x-amz-mfa":e.MFA}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.BypassGovernanceRetention)&&{"x-amz-bypass-governance-retention":e.BypassGovernanceRetention.toString()}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({"x-id":"DeleteObject"},void 0!==e.VersionId&&{versionId:e.VersionId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,hi(e,t)]:(r={$metadata:Mi(e),DeleteMarker:void 0,RequestCharged:void 0,VersionId:void 0},void 0!==e.headers["x-amz-delete-marker"]&&(r.DeleteMarker="true"===e.headers["x-amz-delete-marker"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),yo=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"ListObjectsV2Command",inputFilterSensitiveLog:un.filterSensitiveLog,outputFilterSensitiveLog:sn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return n=n.replace("{Bucket}",v(i)),o=a(a(a(a(a(a(a({"list-type":"2"},void 0!==e.Delimiter&&{delimiter:e.Delimiter}),void 0!==e.EncodingType&&{"encoding-type":e.EncodingType}),void 0!==e.MaxKeys&&{"max-keys":e.MaxKeys.toString()}),void 0!==e.Prefix&&{prefix:e.Prefix}),void 0!==e.ContinuationToken&&{"continuation-token":e.ContinuationToken}),void 0!==e.FetchOwner&&{"fetch-owner":e.FetchOwner.toString()}),void 0!==e.StartAfter&&{"start-after":e.StartAfter}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,vi(e,t)]:(r={$metadata:Mi(e),CommonPrefixes:void 0,Contents:void 0,ContinuationToken:void 0,Delimiter:void 0,EncodingType:void 0,IsTruncated:void 0,KeyCount:void 0,MaxKeys:void 0,Name:void 0,NextContinuationToken:void 0,Prefix:void 0,StartAfter:void 0},[4,Ri(e.body,t)]);case 1:return""===(n=i.sent()).CommonPrefixes&&(r.CommonPrefixes=[]),void 0!==n.CommonPrefixes&&(r.CommonPrefixes=Oi(g(n.CommonPrefixes),t)),""===n.Contents&&(r.Contents=[]),void 0!==n.Contents&&(r.Contents=Pi(g(n.Contents),t)),void 0!==n.ContinuationToken&&(r.ContinuationToken=n.ContinuationToken),void 0!==n.Delimiter&&(r.Delimiter=n.Delimiter),void 0!==n.EncodingType&&(r.EncodingType=n.EncodingType),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.KeyCount&&(r.KeyCount=parseInt(n.KeyCount)),void 0!==n.MaxKeys&&(r.MaxKeys=parseInt(n.MaxKeys)),void 0!==n.Name&&(r.Name=n.Name),void 0!==n.NextContinuationToken&&(r.NextContinuationToken=n.NextContinuationToken),void 0!==n.Prefix&&(r.Prefix=n.Prefix),void 0!==n.StartAfter&&(r.StartAfter=n.StartAfter),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),mo=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,bo)},bo=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function So(e){var t,r,n=[];try{for(var i=Object(c.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=mo(a),Array.isArray(s))for(var u=0,l=s.length;u<l;u++)n.push(a+"="+mo(s[u]));else{var d=a;(s||"string"==typeof s)&&(d+="="+mo(s)),n.push(d)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}function wo(e){var t=e.port,r=e.query,n=e.protocol,i=e.path,o=e.hostname;n&&":"!==n.substr(-1)&&(n+=":"),t&&(o+=":"+t),i&&"/"!==i.charAt(0)&&(i="/"+i);var a=r?So(r):"";return a&&"?"!==a[0]&&(a="?"+a),n+"//"+o+i+a}function Eo(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i=this;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return r=function(e){return function(e){return Object(c.__awaiter)(i,void 0,void 0,(function(){return Object(c.__generator)(this,(function(t){return[2,{output:{request:e.request},response:void 0}]}))}))}},(n=e.middlewareStack.clone()).add(r,{step:"build",priority:"low"}),[4,t.resolveMiddleware(n,e.config,void 0)(t).then((function(e){return e.output.request}))];case 1:return[2,o.sent()]}}))}))}for(var _o={},Co={},Ao=0;Ao<256;Ao++){var Oo=Ao.toString(16).toLowerCase();1===Oo.length&&(Oo="0"+Oo),_o[Ao]=Oo,Co[Oo]=Ao}function xo(e){for(var t="",r=0;r<e.byteLength;r++)t+=_o[e[r]];return t}var ko="X-Amz-Date".toLowerCase(),Po=["authorization",ko,"date"],Lo="X-Amz-Signature".toLowerCase(),To="X-Amz-Security-Token".toLowerCase(),Mo={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},jo=/^proxy-/,No=/^sec-/,Ro="AWS4-HMAC-SHA256-PAYLOAD",Uo={},zo=[];function Io(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function Bo(e,t,r){var n=new e(t);return n.update(r),n.digest()}function Do(e,t,r){var n,i,o=e.headers,a={};try{for(var s=Object(c.__values)(Object.keys(o).sort()),u=s.next();!u.done;u=s.next()){var l=u.value,d=l.toLowerCase();(d in Mo||(null==t?void 0:t.has(d))||jo.test(d)||No.test(d))&&(!r||r&&!r.has(d))||(a[d]=o[l].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a}var Ko=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Fo)},Fo=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function qo(e,t){var r=e.headers,n=e.body;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:try{for(e=Object(c.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(f=n,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(n),s=xo,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[d.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))}function Ho(e){var t=e.headers,r=e.query,n=Object(c.__rest)(e,["headers","query"]);return Object(c.__assign)(Object(c.__assign)({},n),{headers:Object(c.__assign)({},t),query:r?Vo(r):void 0})}function Vo(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return Object(c.__assign)(Object(c.__assign)({},t),((n={})[r]=Array.isArray(i)?Object(c.__spread)(i):i,n))}),{})}function Go(e){var t,r;e="function"==typeof e.clone?e.clone():Ho(e);try{for(var n=Object(c.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Po.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Wo(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var $o=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Xo(n),this.credentialProvider=Jo(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O;return Object(c.__generator)(this,(function(x){switch(x.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,l=t.signingRegion,d=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),null==l?[3,2]:(p=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return h=p,v=Yo(n),g=v.longDate,y=v.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=Io(y,h,null!=d?d:this.service),b=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():Ho(e),a=o.headers,s=o.query,u=void 0===s?{}:s;try{for(var l=Object(c.__values)(Object.keys(a)),d=l.next();!d.done;d=l.next()){var f=d.value,h=f.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[f]=a[f],delete a[f])}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return Object(c.__assign)(Object(c.__assign)({},e),{headers:a,query:u})}(Go(e),{unhoistableHeaders:s}),f.sessionToken&&(b.query["X-Amz-Security-Token"]=f.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=f.accessKeyId+"/"+m,b.query["X-Amz-Date"]=g,b.query["X-Amz-Expires"]=o.toString(10),S=Do(b,a,u),b.query["X-Amz-SignedHeaders"]=Zo(S),w=b.query,E="X-Amz-Signature",_=this.getSignature,C=[g,m,this.getSigningKey(f,h,y,d)],A=this.createCanonicalRequest,O=[b,S],[4,qo(e,this.sha256)]);case 5:return[4,_.apply(this,C.concat([A.apply(this,O.concat([x.sent()]))]))];case 6:return w[E]=x.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,i,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=c.sent(),c.label=3;case 3:return e=t,i=Yo(o),l=i.shortDate,d=i.longDate,f=Io(l,e,null!=u?u:this.service),[4,qo({headers:{},body:n},this.sha256)];case 4:return h=c.sent(),(p=new this.sha256).update(r),g=xo,[4,p.digest()];case 5:return v=g.apply(void 0,[c.sent()]),y=[Ro,d,f,a,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,l,d,f;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.credentialProvider()];case 1:return t=c.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=c.sent(),c.label=4;case 4:return r=n,s=Yo(i).shortDate,d=(l=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(d.apply(l,[void 0,c.sent()]))).update(e),f=xo,[4,u.digest()];case 6:return[2,f.apply(void 0,[c.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=m.sent(),m.label=4;case 4:return r=n,l=Go(e),d=Yo(i),f=d.longDate,h=d.shortDate,p=Io(h,r,null!=u?u:this.service),l.headers[ko]=f,t.sessionToken&&(l.headers[To]=t.sessionToken),[4,qo(l,this.sha256)];case 5:return v=m.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=Object(c.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",l.headers)&&this.applyChecksum&&(l.headers["x-amz-content-sha256"]=v),g=Do(l,a,o),[4,this.getSignature(f,p,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(l,g,v))];case 6:return y=m.sent(),l.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Zo(g)+", Signature="+y,[2,l]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===Lo)return"continue";o.push(e);var t=i[e];"string"==typeof t?a[e]=Ko(e)+"="+Ko(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([Ko(e)+"="+Ko(r)])}),[]).join("&"))};try{for(var u=Object(c.__values)(Object.keys(i).sort()),l=u.next();!l.done;l=u.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(c.__awaiter)(this,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+xo(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=xo,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:return[4,Bo(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=v.sent(),(a=r+":"+n+":"+i+":"+xo(o)+":"+t.sessionToken)in Uo)return[2,Uo[a]];for(zo.push(a);zo.length>50;)delete Uo[zo.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(c.__values)([r,n,i,"aws4_request"]),l=u.next(),v.label=3;case 3:return l.done?[3,6]:(d=l.value,[4,Bo(e,s,d)]);case 4:s=v.sent(),v.label=5;case 5:return l=u.next(),[3,3];case 6:return[3,9];case 7:return f=v.sent(),h={error:f},[3,9];case 8:try{l&&!l.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,Uo[a]=s]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),Yo=function(e){var t=Wo(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Zo=function(e){return Object.keys(e).sort().join(";")},Xo=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Jo=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Qo=function(){function e(e){var t=Object(c.__assign)({service:e.signingName||e.service||"s3",uriEscapePath:e.uriEscapePath||!1},e);this.signer=new $o(t)}return e.prototype.presign=function(e,t){void 0===t&&(t={});var r=t.unsignableHeaders,n=void 0===r?new Set:r,i=t.unhoistableHeaders,o=void 0===i?new Set:i,a=Object(c.__rest)(t,["unsignableHeaders","unhoistableHeaders"]);return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(t){return n.add("content-type"),Object.keys(e.headers).map((function(e){return e.toLowerCase()})).filter((function(e){return e.startsWith("x-amz-server-side-encryption")})).forEach((function(e){o.add(e)})),e.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",e.headers.host||(e.headers.host=e.hostname),[2,this.signer.presign(e,Object(c.__assign)({expiresIn:900,unsignableHeaders:n,unhoistableHeaders:o},a))]}))}))},e}();var ea,ta,ra,na=r(4),ia=r.n(na);!function(e){e.NO_CREDENTIALS="No credentials",e.NO_SRC_KEY='source param should be an object with the property "key" with value of type string',e.NO_DEST_KEY='destination param should be an object with the property "key" with value of type string',e.INVALID_BLOB="Object must be an instance of Blob"}(ea||(ea={})),function(e){e.CLEANUP_FAILED="Multipart copy clean up failed",e.NO_OBJECT_FOUND="Object does not exist",e.INVALID_QUEUESIZE="Queue size must be a positive number",e.NO_COPYSOURCE="You must specify a copy source",e.MAX_NUM_PARTS_EXCEEDED="Only a maximum of 10000 parts are allowed"}(ta||(ta={})),function(e){e.UPLOAD_PAUSED_MESSAGE="paused"}(ra||(ra={}));var oa=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},aa=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},sa=new n.ConsoleLogger("axios-http-handler");var ua=function(e,t){var r,n;try{for(var i=oa(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=aa(o.value,2),s=a[0],u=a[1];s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=u,delete e[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},ca=[function(e,t){return r=e,"undefined"!=typeof Blob&&r instanceof Blob?(ua(t,"Content-Type"),ua(t,"Accept"),e):ia.a.defaults.transformRequest[0].call(null,e,t);var r}],la=function(){function e(e,t,r){void 0===e&&(e={}),this.httpOptions=e,this.emitter=t,this.cancelTokenSource=r}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=this.httpOptions.requestTimeout,i=t.emitter||this.emitter,o=e.path;if(e.query){var a=So(e.query);a&&(o+="?"+a)}var s=e.port,u=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,c={};c.url=u,c.method=e.method,c.headers=e.headers,delete c.headers.host,e.body?c.data=e.body:c.headers[Object.keys(c.headers).find((function(e){return"content-type"===e.toLowerCase()}))]&&(c.data=null),i&&(c.onUploadProgress=function(e){i.emit("sendUploadProgress",e),sa.debug(e)},c.onDownloadProgress=function(e){i.emit("sendDownloadProgress",e),sa.debug(e)}),this.cancelTokenSource&&(c.cancelToken=this.cancelTokenSource.token),t.cancelTokenSource&&(c.cancelToken=t.cancelTokenSource.token),c.responseType="blob",n.Platform.isReactNative&&(c.transformRequest=ca);var l=[ia.a.request(c).then((function(e){return{response:new oi.b({headers:e.headers,statusCode:e.status,body:e.data})}})).catch((function(e){var t,r;if(e.message!==ra.UPLOAD_PAUSED_MESSAGE&&sa.error(e.message),ia.a.isCancel(e)||!function(e){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,"response")&&void 0!==e.response&&Object.prototype.hasOwnProperty.call(e.response,"status")&&"number"==typeof e.response.status}(e))throw e;return{response:new oi.b({statusCode:e.response.status,body:null===(t=e.response)||void 0===t?void 0:t.data,headers:null===(r=e.response)||void 0===r?void 0:r.headers})}})),da(r)];return Promise.race(l)},e}();function da(e){return void 0===e&&(e=0),new Promise((function(t,r){e&&setTimeout((function(){var t=new Error("Request did not complete within "+e+" ms");t.name="TimeoutError",r(t)}),e)}))}for(var fa="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",ha=function(e,t,r,i,o){if(e){var a={attrs:r};i&&(a.metrics=i),n.Hub.dispatch("storage",{event:t,data:a,message:o},"Storage",fa)}},pa=function(e){return void 0!==e&&e instanceof Blob},va=function(e){return void 0!==e&&e instanceof ArrayBuffer},ga=r(34),ya=r(32),ma=r(6),ba={},Sa={},wa=0;wa<256;wa++){var Ea=wa.toString(16).toLowerCase();1===Ea.length&&(Ea="0"+Ea),ba[wa]=Ea,Sa[Ea]=wa}function _a(e){for(var t="",r=0;r<e.byteLength;r++)t+=ba[e[r]];return t}var Ca=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var r=new Uint8Array(8),n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&Aa(r),new e(r)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&Aa(e),parseInt(_a(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function Aa(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var Oa,xa=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,r,n,i,o=[];try{for(var a=Object(c.__values)(Object.keys(e)),s=a.next();!s.done;s=a.next()){var u=s.value,l=this.fromUtf8(u);o.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(e[u]))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var d=new Uint8Array(o.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var h=Object(c.__values)(o),p=h.next();!p.done;p=h.next()){var v=p.value;d.set(v,f),f+=v.byteLength}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return d},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":var n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":var i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);var o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":var a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(Ca.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!za.test(e.value))throw new Error("Invalid UUID received: "+e.value);var l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),r=0;r<e.length;r+=2){var n=e.substr(r,2).toLowerCase();if(!(n in Sa))throw new Error("Cannot decode unrecognized sequence "+n+" as hexadecimal");t[r/2]=Sa[n]}return t}(e.value.replace(/\-/g,"")),1),l}},e.prototype.parse=function(e){for(var t={},r=0;r<e.byteLength;){var n=e.getUint8(r++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[i]={type:ka,value:!0};break;case 1:t[i]={type:ka,value:!1};break;case 2:t[i]={type:Pa,value:e.getInt8(r++)};break;case 3:t[i]={type:La,value:e.getInt16(r,!1)},r+=2;break;case 4:t[i]={type:Ta,value:e.getInt32(r,!1)},r+=4;break;case 5:t[i]={type:Ma,value:new Ca(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:var o=e.getUint16(r,!1);r+=2,t[i]={type:ja,value:new Uint8Array(e.buffer,e.byteOffset+r,o)},r+=o;break;case 7:var a=e.getUint16(r,!1);r+=2,t[i]={type:Na,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,a))},r+=a;break;case 8:t[i]={type:Ra,value:new Date(new Ca(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:var s=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[i]={type:Ua,value:_a(s.subarray(0,4))+"-"+_a(s.subarray(4,6))+"-"+_a(s.subarray(6,8))+"-"+_a(s.subarray(8,10))+"-"+_a(s.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Oa||(Oa={}));var ka="boolean",Pa="byte",La="short",Ta="integer",Ma="long",ja="binary",Na="string",Ra="timestamp",Ua="uuid",za=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ia=function(){function e(e,t){this.headerMarshaller=new xa(e,t)}return e.prototype.marshall=function(e){var t=e.headers,r=e.body,n=this.headerMarshaller.format(t),i=n.byteLength+r.byteLength+16,o=new Uint8Array(i),a=new DataView(o.buffer,o.byteOffset,o.byteLength),s=new ma.Crc32;return a.setUint32(0,i,!1),a.setUint32(4,n.byteLength,!1),a.setUint32(8,s.update(o.subarray(0,8)).digest(),!1),o.set(n,12),o.set(r,n.byteLength+12),a.setUint32(i-4,s.update(o.subarray(8,i-4)).digest(),!1),o},e.prototype.unmarshall=function(e){var t=function(e){var t=e.byteLength,r=e.byteOffset,n=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var i=new DataView(n,r,t),o=i.getUint32(0,!1);if(t!==o)throw new Error("Reported message length does not match received message length");var a=i.getUint32(4,!1),s=i.getUint32(8,!1),u=i.getUint32(t-4,!1),c=(new ma.Crc32).update(new Uint8Array(n,r,8));if(s!==c.digest())throw new Error("The prelude checksum specified in the message ("+s+") does not match the calculated CRC32 checksum ("+c.digest()+")");if(c.update(new Uint8Array(n,r+8,t-12)),u!==c.digest())throw new Error("The message checksum ("+c.digest()+") did not match the expected value of "+u);return{headers:new DataView(n,r+8+4,a),body:new Uint8Array(n,r+8+4+a,o-a-16)}}(e),r=t.headers,n=t.body;return{headers:this.headerMarshaller.parse(r),body:n}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var Ba=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new Ia(t,r),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){var r,n,i,o,a,s,u;return function(e,t){var r;return(r={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b;return Object(c.__generator)(this,(function(S){switch(S.label){case 0:S.trys.push([0,12,13,18]),r=Object(c.__asyncValues)(e),S.label=1;case 1:return[4,Object(c.__await)(r.next())];case 2:if((n=S.sent()).done)return[3,11];if(i=n.value,o=t.eventMarshaller.unmarshall(i),"error"!==(a=o.headers[":message-type"].value))return[3,3];throw(s=new Error(o.headers[":error-message"].value||"UnknownError")).name=o.headers[":error-code"].value,s;case 3:return"exception"!==a?[3,5]:(u=o.headers[":exception-type"].value,(g={})[u]=o,l=g,[4,Object(c.__await)(t.deserializer(l))]);case 4:if((d=S.sent()).$unknown)throw(f=new Error(t.toUtf8(o.body))).name=u,f;throw d[u];case 5:return"event"!==a?[3,9]:((y={})[o.headers[":event-type"].value]=o,h=y,[4,Object(c.__await)(t.deserializer(h))]);case 6:return(p=S.sent()).$unknown?[3,10]:[4,Object(c.__await)(p)];case 7:return[4,S.sent()];case 8:return S.sent(),[3,10];case 9:throw Error("Unrecognizable event type: "+o.headers[":event-type"].value);case 10:return[3,1];case 11:return[3,18];case 12:return v=S.sent(),m={error:v},[3,18];case 13:return S.trys.push([13,,16,17]),n&&!n.done&&(b=r.return)?[4,Object(c.__await)(b.call(r))]:[3,15];case 14:S.sent(),S.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},r}((r=e,i=0,o=0,a=null,s=null,u=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);i=e,o=4,a=new Uint8Array(e),new DataView(a.buffer).setUint32(0,e,!1)},(n={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var e,t,n,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:e=r[Symbol.asyncIterator](),v.label=1;case 1:return[4,Object(c.__await)(e.next())];case 2:return t=v.sent(),n=t.value,t.done?i?[3,4]:[4,Object(c.__await)(void 0)]:[3,10];case 3:return[2,v.sent()];case 4:return i!==o?[3,7]:[4,Object(c.__await)(a)];case 5:return[4,v.sent()];case 6:return v.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Object(c.__await)(void 0)];case 9:return[2,v.sent()];case 10:l=n.length,d=0,v.label=11;case 11:if(!(d<l))return[3,15];if(!a){if(f=l-d,s||(s=new Uint8Array(4)),h=Math.min(4-o,f),s.set(n.slice(d,d+h),o),d+=h,(o+=h)<4)return[3,15];u(new DataView(s.buffer).getUint32(0,!1)),s=null}return p=Math.min(i-o,l-d),a.set(n.slice(d,d+p),o),o+=p,d+=p,i&&i===o?[4,Object(c.__await)(a)]:[3,14];case 12:return[4,v.sent()];case 13:v.sent(),a=null,i=0,o=0,v.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},n),{eventMarshaller:this.eventMarshaller,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var r,n=this;return(r={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var r,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:d.trys.push([0,7,8,13]),r=Object(c.__asyncValues)(e),d.label=1;case 1:return[4,Object(c.__await)(r.next())];case 2:return(i=d.sent()).done?[3,6]:(o=i.value,a=n.eventMarshaller.marshall(t(o)),[4,Object(c.__await)(a)]);case 3:return[4,d.sent()];case 4:d.sent(),d.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return s=d.sent(),u={error:s},[3,13];case 8:return d.trys.push([8,,11,12]),i&&!i.done&&(l=r.return)?[4,Object(c.__await)(l.call(r))]:[3,10];case 9:d.sent(),d.label=10;case 10:return[3,12];case 11:if(u)throw u.error;return[7];case 12:return[7];case 13:return[4,Object(c.__await)(new Uint8Array(0))];case 14:return[4,d.sent()];case 15:return d.sent(),[2]}}))}))},r},e}(),Da=function(){function e(e){var t=e.utf8Encoder,r=e.utf8Decoder;this.eventMarshaller=new Ia(t,r),this.universalMarshaller=new Ba({utf8Decoder:r,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var r,n,i=Ka(e)?(r=e,(n={})[Symbol.asyncIterator]=function(){return Object(c.__asyncGenerator)(this,arguments,(function(){var e,t,n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:e=r.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Object(c.__await)(e.read())];case 3:return t=o.sent(),n=t.done,i=t.value,n?[4,Object(c.__await)(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Object(c.__await)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}}))}))},n):e;return this.universalMarshaller.deserialize(i,t)},e.prototype.serialize=function(e,t){var r,n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(r=n[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return[4,r.next()];case 1:return t=o.sent(),n=t.done,i=t.value,n?[2,e.close()]:(e.enqueue(i),[2])}}))}))}})):n},e}(),Ka=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},Fa=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,qa)},qa=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Ha=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var a=function(e){var t,r,n=[];try{for(var i=Object(c.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=Fa(a),Array.isArray(s))for(var u=0,l=s.length;u<l;u++)n.push(a+"="+Fa(s[u]));else{var d=a;(s||"string"==typeof s)&&(d+="="+Fa(s)),n.push(d)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);a&&(o+="?"+a)}var s=e.port,u=e.method,l=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,d={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(d.signal=r);var f,h=new Request(l,d),p=[fetch(h).then((function(e){var t,r,n=e.headers,i={};try{for(var o=Object(c.__values)(n.entries()),a=o.next();!a.done;a=o.next()){var s=a.value;i[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new oi.b({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new oi.b({headers:i,statusCode:e.status,body:t})}}))})),(f=n,void 0===f&&(f=0),new Promise((function(e,t){f&&setTimeout((function(){var e=new Error("Request did not complete within "+f+" ms");e.name="TimeoutError",t(e)}),f)})))];return r&&p.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(p)},e}(),Va={},Ga=new Array(64),Wa=0,$a="A".charCodeAt(0),Ya="Z".charCodeAt(0);Wa+$a<=Ya;Wa++){var Za=String.fromCharCode(Wa+$a);Va[Za]=Wa,Ga[Wa]=Za}for(Wa=0,$a="a".charCodeAt(0),Ya="z".charCodeAt(0);Wa+$a<=Ya;Wa++){Za=String.fromCharCode(Wa+$a);var Xa=Wa+26;Va[Za]=Xa,Ga[Xa]=Za}for(Wa=0;Wa<10;Wa++){Va[Wa.toString(10)]=Wa+52;Za=Wa.toString(10),Xa=Wa+52;Va[Za]=Xa,Ga[Xa]=Za}Va["+"]=62,Ga[62]="+",Va["/"]=63,Ga[63]="/";function Ja(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,a=0,s=i,u=i+3;s<=u;s++)"="!==e[s]?(o|=Va[e[s]]<<6*(u-s),a+=6):o>>=6;var c=i/4*3;o>>=a%8;for(var l=Math.floor(a/8),d=0;d<l;d++){var f=8*(l-d-1);n.setUint8(c+d,(o&255<<f)>>f)}}return new Uint8Array(r)}function Qa(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}function es(e,t,r){return void 0===r&&(r=1048576),new Promise((function(n,i){var o=new FileReader;o.addEventListener("error",i),o.addEventListener("abort",i);var a=e.size,s=0;function u(){s>=a?n():o.readAsArrayBuffer(e.slice(s,Math.min(a,s+r)))}o.addEventListener("load",(function(e){var r=e.target.result;t(new Uint8Array(r)),s+=r.byteLength,u()})),u()}))}var ts=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},rs=[1732584193,4023233417,2562383102,271733878],ns=function(){function e(){this.state=Uint32Array.from(rs),this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=function(e){if("string"==typeof e)return ts(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0)}},e.prototype.digest=function(){return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,r,n,i,o,a;return Object(c.__generator)(this,(function(s){if(!this.finished){if(t=(e=this).buffer,r=e.bufferLength,n=e.bytesHashed,i=8*n,t.setUint8(this.bufferLength++,128),r%64>=56){for(a=this.bufferLength;a<64;a++)t.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(a=this.bufferLength;a<56;a++)t.setUint8(a,0);t.setUint32(56,i>>>0,!0),t.setUint32(60,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}for(o=new DataView(new ArrayBuffer(16)),a=0;a<4;a++)o.setUint32(4*a,this.state[a],!0);return[2,new Uint8Array(o.buffer,o.byteOffset,o.byteLength)]}))}))},e.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=os(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=os(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=os(i,o,r,n,e.getUint32(8,!0),17,606105819),n=os(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=os(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=os(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=os(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=os(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=os(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=os(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=os(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=os(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=os(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=os(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=os(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=as(r,n=os(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=as(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=as(i,o,r,n,e.getUint32(44,!0),14,643717713),n=as(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=as(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=as(o,r,n,i,e.getUint32(40,!0),9,38016083),i=as(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=as(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=as(r,n,i,o,e.getUint32(36,!0),5,568446438),o=as(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=as(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=as(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=as(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=as(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=as(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=ss(r,n=as(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=ss(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=ss(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=ss(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=ss(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=ss(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=ss(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=ss(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=ss(r,n,i,o,e.getUint32(52,!0),4,681279174),o=ss(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=ss(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=ss(n,i,o,r,e.getUint32(24,!0),23,76029189),r=ss(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=ss(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=ss(i,o,r,n,e.getUint32(60,!0),16,530742520),r=us(r,n=ss(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=us(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=us(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=us(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=us(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=us(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=us(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=us(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=us(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=us(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=us(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=us(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=us(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=us(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=us(i,o,r,n,e.getUint32(8,!0),15,718787259),n=us(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295},e}();function is(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function os(e,t,r,n,i,o,a){return is(t&r|~t&n,e,t,i,o,a)}function as(e,t,r,n,i,o,a){return is(t&n|r&~n,e,t,i,o,a)}function ss(e,t,r,n,i,o,a){return is(t^r^n,e,t,i,o,a)}function us(e,t,r,n,i,o,a){return is(r^(t|~n),e,t,i,o,a)}var cs={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ls=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,r){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(c.__generator)(this,(function(o){return(null===(i=null==e?void 0:e.retryStrategy)||void 0===i?void 0:i.mode)&&(r.userAgent=Object(c.__spread)(r.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,n)]}))}))}}}(e),cs)}}},ds=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fs=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hs=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],ps=[500,502,503,504],vs=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||fs.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},gs=r(31),ys=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},ms=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return ds.includes(e.name)}(e)||vs(e)||function(e){var t;return hs.includes(e.name)||ps.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},bs=function(){function e(e,t){var r,n,i,o,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:ms,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:ys,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(a=o=500,s=o,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(c.__awaiter)(this,void 0,void 0,(function(){var e;return Object(c.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:return n=0,i=0,[4,this.getMaxAttempts()];case 1:o=d.sent(),a=t.request,oi.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(gs.v4)()),s=function(){var s,l,d,f,h;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,5]),oi.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(n+1)+"; max="+o),[4,e(t)];case 1:return s=c.sent(),l=s.response,d=s.output,u.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=n+1,d.$metadata.totalRetryDelay=i,[2,{value:{response:l,output:d}}];case 2:return f=c.sent(),n++,u.shouldRetry(f,n,o)?(r=u.retryQuota.retrieveRetryTokens(f),h=u.delayDecider(vs(f)?500:100,n),i+=h,[4,new Promise((function(e){return setTimeout(e,h)}))]):[3,4];case 3:return c.sent(),[2,"continue"];case 4:throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=n,f.$metadata.totalRetryDelay=i,f;case 5:return[2]}}))},u=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(l=d.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),Ss=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var ws=r(33),Es=r.n(ws),_s=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Cs=new Set(["cn-north-1","cn-northwest-1"]),As=new Set(["us-iso-east-1"]),Os=new Set(["us-isob-east-1"]),xs=new Set(["us-gov-east-1","us-gov-west-1"]);var ks,Ps,Ls,Ts,Ms={apiVersion:"2006-03-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"af-south-1":r={hostname:"s3.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":r={hostname:"s3.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":r={hostname:"s3.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":r={hostname:"s3.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":r={hostname:"s3.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":r={hostname:"s3.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":r={hostname:"s3.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"aws-global":r={hostname:"s3.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"ca-central-1":r={hostname:"s3.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":r={hostname:"s3.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":r={hostname:"s3.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":r={hostname:"s3.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":r={hostname:"s3.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":r={hostname:"s3.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":r={hostname:"s3.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":r={hostname:"s3.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":r={hostname:"s3.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-gov-west-1":r={hostname:"s3-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"me-south-1":r={hostname:"s3.me-south-1.amazonaws.com",partition:"aws"};break;case"s3-external-1":r={hostname:"s3-external-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"sa-east-1":r={hostname:"s3.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":r={hostname:"s3.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":r={hostname:"s3.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":r={hostname:"s3.us-gov-east-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-gov-west-1":r={hostname:"s3.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-iso-east-1":r={hostname:"s3.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":r={hostname:"s3.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":r={hostname:"s3.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":r={hostname:"s3.us-west-2.amazonaws.com",partition:"aws"};break;default:_s.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),Cs.has(e)&&(r={hostname:"s3.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),As.has(e)&&(r={hostname:"s3.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Os.has(e)&&(r={hostname:"s3.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),xs.has(e)&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:"s3.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(a({signingService:"s3"},r))},serviceId:"S3",signingEscapePath:!1,urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,a=r.protocol,s=r.search;return s&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=Object(c.__values)(e.split("&")),o=i.next();!o.done;o=i.next()){var a=o.value,s=Object(c.__read)(a.split("="),2),u=s[0],l=s[1],d=void 0===l?null:l;u=decodeURIComponent(u),d&&(d=decodeURIComponent(d)),u in n?Array.isArray(n[u])?n[u].push(d):n[u]=[n[u],d]:n[u]=d}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(s)),{hostname:n,port:o?parseInt(o):void 0,protocol:a,path:i,query:t}},useArnRegion:!1},js=a(a({},Ms),{runtime:"browser",base64Decoder:Ja,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,a=Math.min(r+3,e.length);o<a;o++)n|=e[o]<<8*(a-o-1),i+=8;var s=Math.ceil(i/6);n<<=6*s-i;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Ga[(n&63<<c)>>c]}t+="==".slice(0,4-s)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(Ps={serviceId:Ms.serviceId,clientVersion:ga.version},Ls=Ps.serviceId,Ts=Ps.clientVersion,function(){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var e,t,r,n,i,o,a,s,u;return Object(c.__generator)(this,(function(c){return e=(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?Es.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",Ts],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(a=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==a?a:"unknown")+"_"+(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.version)&&void 0!==u?u:"unknown")]],Ls&&t.push(["api/"+Ls,Ts]),[2,t]}))}))}),eventStreamSerdeProvider:function(e){return new Da(e)},maxAttempts:3,md5:ns,region:(ks="Region is missing",function(){return Promise.reject(ks)}),requestHandler:new Ha,sha256:ya.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r;return Object(c.__generator)(this,(function(n){switch(n.label){case 0:return[4,Qa(e)];case 1:return t=n.sent(),r=Ja(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,i,o,a,s;return Object(c.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(a=i.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)},streamHasher:function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){var r;return Object(c.__generator)(this,(function(n){switch(n.label){case 0:return r=new e,[4,es(t,(function(e){r.update(e)}))];case 1:return n.sent(),[2,r.digest()]}}))}))},utf8Decoder:ts,utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var a="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}),Ns=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},Rs=function(e){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var t,r,n,i,o;return Object(c.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=a.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},Us=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var zs={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Is=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s;return Object(c.__generator)(this,(function(u){return t=n.request,oi.a.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(i))&&(t.headers=Object(c.__assign)(Object(c.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),zs)}}};var Bs={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Ds=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(c.__awaiter)(t,void 0,void 0,(function(){var t;return Object(c.__generator)(this,(function(i){return t=n.request,oi.a.isInstance(t)&&t.body&&"node"===e.runtime&&(t.headers=Object(c.__assign)(Object(c.__assign)({},t.headers),{Expect:"100-continue"})),[2,r(Object(c.__assign)(Object(c.__assign)({},n),{request:t}))]}))}))}}}(e),Bs)}}};for(var Ks={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Fs=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){return oi.a.isInstance(r.request)?(n=r.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),Ks)}}},qs={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Hs=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,l,d,f;return Object(c.__generator)(this,(function(h){switch(h.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=h.sent(),a?("function"==typeof a.info&&(l=u.output,d=l.$metadata,f=Object(c.__rest)(l,["$metadata"]),a.info({clientName:n,commandName:i,input:o(r.input),output:s(f),metadata:d})),[2,u]):[2,u]}}))}))}}),qs)}}},Vs={},Gs={},Ws=0;Ws<256;Ws++){var $s=Ws.toString(16).toLowerCase();1===$s.length&&($s="0"+$s),Vs[Ws]=$s,Gs[$s]=Ws}function Ys(e){for(var t="",r=0;r<e.byteLength;r++)t+=Vs[e[r]];return t}var Zs="X-Amz-Date".toLowerCase(),Xs=["authorization",Zs,"date"],Js="X-Amz-Signature".toLowerCase(),Qs="X-Amz-Security-Token".toLowerCase(),eu={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},tu=/^proxy-/,ru=/^sec-/,nu="AWS4-HMAC-SHA256-PAYLOAD",iu={},ou=[];function au(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function su(e,t,r){var n=new e(t);return n.update(r),n.digest()}function uu(e,t,r){var n,i,o=e.headers,a={};try{for(var s=Object(c.__values)(Object.keys(o).sort()),u=s.next();!u.done;u=s.next()){var l=u.value,d=l.toLowerCase();(d in eu||(null==t?void 0:t.has(d))||tu.test(d)||ru.test(d))&&(!r||r&&!r.has(d))||(a[d]=o[l].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a}var cu=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,lu)},lu=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function du(e,t){var r=e.headers,n=e.body;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,l;return Object(c.__generator)(this,(function(d){switch(d.label){case 0:try{for(e=Object(c.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(f=n,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(n),s=Ys,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[d.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))}function fu(e){var t=e.headers,r=e.query,n=Object(c.__rest)(e,["headers","query"]);return Object(c.__assign)(Object(c.__assign)({},n),{headers:Object(c.__assign)({},t),query:r?hu(r):void 0})}function hu(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return Object(c.__assign)(Object(c.__assign)({},t),((n={})[r]=Array.isArray(i)?Object(c.__spread)(i):i,n))}),{})}function pu(e){var t,r;e="function"==typeof e.clone?e.clone():fu(e);try{for(var n=Object(c.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;Xs.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function vu(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var gu=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=bu(n),this.credentialProvider=Su(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(c.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O;return Object(c.__generator)(this,(function(x){switch(x.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,l=t.signingRegion,d=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),null==l?[3,2]:(p=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return h=p,v=yu(n),g=v.longDate,y=v.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=au(y,h,null!=d?d:this.service),b=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():fu(e),a=o.headers,s=o.query,u=void 0===s?{}:s;try{for(var l=Object(c.__values)(Object.keys(a)),d=l.next();!d.done;d=l.next()){var f=d.value,h=f.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[f]=a[f],delete a[f])}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return Object(c.__assign)(Object(c.__assign)({},e),{headers:a,query:u})}(pu(e),{unhoistableHeaders:s}),f.sessionToken&&(b.query["X-Amz-Security-Token"]=f.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=f.accessKeyId+"/"+m,b.query["X-Amz-Date"]=g,b.query["X-Amz-Expires"]=o.toString(10),S=uu(b,a,u),b.query["X-Amz-SignedHeaders"]=mu(S),w=b.query,E="X-Amz-Signature",_=this.getSignature,C=[g,m,this.getSigningKey(f,h,y,d)],A=this.createCanonicalRequest,O=[b,S],[4,du(e,this.sha256)]);case 5:return[4,_.apply(this,C.concat([A.apply(this,O.concat([x.sent()]))]))];case 6:return w[E]=x.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var e,t,i,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=c.sent(),c.label=3;case 3:return e=t,i=yu(o),l=i.shortDate,d=i.longDate,f=au(l,e,null!=u?u:this.service),[4,du({headers:{},body:n},this.sha256)];case 4:return h=c.sent(),(p=new this.sha256).update(r),g=Ys,[4,p.digest()];case 5:return v=g.apply(void 0,[c.sent()]),y=[nu,d,f,a,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,l,d,f;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.credentialProvider()];case 1:return t=c.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=c.sent(),c.label=4;case 4:return r=n,s=yu(i).shortDate,d=(l=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(d.apply(l,[void 0,c.sent()]))).update(e),f=Ys,[4,u.digest()];case 6:return[2,f.apply(void 0,[c.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return Object(c.__awaiter)(this,void 0,void 0,(function(){var t,r,n,l,d,f,h,p,v,g,y;return Object(c.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=m.sent(),m.label=4;case 4:return r=n,l=pu(e),d=yu(i),f=d.longDate,h=d.shortDate,p=au(h,r,null!=u?u:this.service),l.headers[Zs]=f,t.sessionToken&&(l.headers[Qs]=t.sessionToken),[4,du(l,this.sha256)];case 5:return v=m.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=Object(c.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",l.headers)&&this.applyChecksum&&(l.headers["x-amz-content-sha256"]=v),g=uu(l,a,o),[4,this.getSignature(f,p,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(l,g,v))];case 6:return y=m.sent(),l.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+mu(g)+", Signature="+y,[2,l]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===Js)return"continue";o.push(e);var t=i[e];"string"==typeof t?a[e]=cu(e)+"="+cu(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([cu(e)+"="+cu(r)])}),[]).join("&"))};try{for(var u=Object(c.__values)(Object.keys(i).sort()),l=u.next();!l.done;l=u.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(c.__awaiter)(this,void 0,void 0,(function(){var n,i;return Object(c.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Ys(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(c.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=Ys,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,l,d,f,h,p;return Object(c.__generator)(this,(function(v){switch(v.label){case 0:return[4,su(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=v.sent(),(a=r+":"+n+":"+i+":"+Ys(o)+":"+t.sessionToken)in iu)return[2,iu[a]];for(ou.push(a);ou.length>50;)delete iu[ou.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(c.__values)([r,n,i,"aws4_request"]),l=u.next(),v.label=3;case 3:return l.done?[3,6]:(d=l.value,[4,su(e,s,d)]);case 4:s=v.sent(),v.label=5;case 5:return l=u.next(),[3,3];case 6:return[3,9];case 7:return f=v.sent(),h={error:f},[3,9];case 8:try{l&&!l.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,iu[a]=s]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),yu=function(e){var t=vu(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},mu=function(e){return Object.keys(e).sort().join(";")},bu=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Su=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function wu(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Eu=function(e){return new Date(Date.now()+e)};function _u(e){return function(t,r){return function(n){return Object(c.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u,l,d,f,h;return Object(c.__generator)(this,(function(p){switch(p.label){case 0:return oi.a.isInstance(n.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=p.sent(),[3,3];case 2:o=e.signer,p.label=3;case 3:return i=o,s=t,u=[Object(c.__assign)({},n)],h={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,s.apply(void 0,[c.__assign.apply(void 0,u.concat([(h.request=p.sent(),h)]))])];case 5:return a=p.sent(),l=a.response.headers,(d=l&&(l.date||l.Date))&&(f=Date.parse(d),v=f,g=e.systemClockOffset,Math.abs(Eu(g).getTime()-v)>=3e5&&(e.systemClockOffset=f-Date.now())),[2,a]}var v,g}))}))}}}var Cu={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Au,Ou,xu,ku,Pu,Lu,Tu,Mu,ju,Nu,Ru,Uu,zu,Iu,Bu,Du,Ku,Fu,qu,Hu,Vu,Gu,Wu,$u,Yu,Zu,Xu,Ju,Qu,ec,tc,rc,nc,ic,oc=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,ac=function(e){var t=Object(c.__read)(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),a=r.substring(i+1);return"api"===o&&(a=a.toLowerCase()),[o,a,n].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(oc,"_")})).join("/")},sc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},uc=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e,t){return function(n){return Object(c.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,l,d,f;return Object(c.__generator)(this,(function(h){switch(h.label){case 0:return i=n.request,oi.a.isInstance(i)?(o=i.headers,a=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(ac))||[],[4,r.defaultUserAgentProvider()]):[2,e(n)];case 1:return s=h.sent().map(ac),u=(null===(f=null==r?void 0:r.customUserAgent)||void 0===f?void 0:f.map(ac))||[],o["x-amz-user-agent"]=Object(c.__spread)(s,a,u).join(" "),l=Object(c.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==r.runtime&&l&&(o["user-agent"]=o["user-agent"]?o["user-agent"]+" "+l:l),[2,e(Object(c.__assign)(Object(c.__assign)({},n),{request:i}))]}}))}))}}),sc)}}},cc=function(e){function t(t){var r,n,i,o=this,s=function(e){var t,r=this,n=wu(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?wu(e.signer):function(){return wu(e.region)().then((function(t){return Object(c.__awaiter)(r,void 0,void 0,(function(){return Object(c.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var r=Object(c.__read)(t,2),i=r[0],a=r[1],s=i.signingRegion,l=i.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||l||e.serviceId,new gu({credentials:n,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})}))},Object(c.__assign)(Object(c.__assign)({},e),{systemClockOffset:s,signingEscapePath:o,credentials:n,signer:t})}(function(e){var t;return Object(c.__assign)(Object(c.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Ns(e):function(){return Rs(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(c.__assign)(Object(c.__assign)({},e),{region:Us(e.region)})}(a(a({},js),t)))),u=function(e){return Object(c.__assign)(Object(c.__assign)({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(function(e){return Object(c.__assign)(Object(c.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t=e.bucketEndpoint,r=void 0!==t&&t,n=e.forcePathStyle,i=void 0!==n&&n,o=e.useAccelerateEndpoint,a=void 0!==o&&o,s=e.useDualstackEndpoint,u=void 0!==s&&s,l=e.useArnRegion,d=void 0!==l&&l;return Object(c.__assign)(Object(c.__assign)({},e),{bucketEndpoint:r,forcePathStyle:i,useAccelerateEndpoint:a,useDualstackEndpoint:u,useArnRegion:"function"==typeof d?d:function(){return Promise.resolve(d)}})}((n=Ss((r=s).maxAttempts),Object(c.__assign)(Object(c.__assign)({},r),{maxAttempts:n,retryStrategy:r.retryStrategy||new bs(n)})))));return(o=e.call(this,u)||this).config=u,o.middlewareStack.use((i=o.config,{applyToStack:function(e){e.addRelativeTo(_u(i),Cu)}})),o.middlewareStack.use(ls(o.config)),o.middlewareStack.use(Is(o.config)),o.middlewareStack.use(Fs(o.config)),o.middlewareStack.use(Hs(o.config)),o.middlewareStack.use(to(o.config)),o.middlewareStack.use(no(o.config)),o.middlewareStack.use(Ds(o.config)),o.middlewareStack.use(uc(o.config)),o}return o(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(h),lc=function(){return(lc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},dc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},fc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},hc=new n.Logger("S3ClientUtils"),pc={accessKeyId:"",secretAccessKey:""},vc=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},i=e.identityId||t.identityId,o=(void 0!==n.private?n.private:"private/")+i+"/",a=(void 0!==n.protected?n.protected:"protected/")+i+"/",s=void 0!==n.public?n.public:"public/";switch(r){case"private":return o;case"protected":return a;default:return s}},gc=function(e,t){return function(r,i){return function(i){return dc(void 0,void 0,void 0,(function(){var o,a,s,u;return fc(this,(function(c){switch(c.label){case 0:return[4,n.Credentials.get()];case 1:return o=c.sent(),a=n.Credentials.shear(o),s=vc(lc(lc({},e),{credentials:a})),u=Object.assign({},i.input),Object.prototype.hasOwnProperty.call(i.input,"Key")?(u.Key=s+t,i.input=u):Object.prototype.hasOwnProperty.call(i.input,"Prefix")&&(u.Prefix=s+t,i.input=u),[2,r(i)]}}))}))}}},yc=function(e){return function(t,r){return function(r){return dc(void 0,void 0,void 0,(function(){var n,i;return fc(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,t(r)];case 1:return[2,o.sent()];case 2:throw n=o.sent(),(a=n).ServerTime&&"string"==typeof a.Code&&"RequestTimeTooSkewed"===a.Code&&(i=new Date(n.ServerTime),e.systemClockOffset=i.getTime()-Date.now()),n;case 3:return[2]}var a}))}))}}},mc={step:"finalizeRequest",name:"autoAdjustClockskewMiddleware"},bc={step:"initialize",name:"addPrefixMiddleware"},Sc=function(){return dc(void 0,void 0,void 0,(function(){var e,t,r;return fc(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),hc.debug("credentials provider get credentials",t),[2,t]):[2,pc];case 2:return r=i.sent(),hc.warn("credentials provider error",r),[2,pc];case 3:return[2]}}))}))},wc=function(e,t){var r=e.region,i=e.cancelTokenSource,o=e.dangerouslyConnectToHttpEndpointForTesting,a=e.useAccelerateEndpoint,s={};o&&(s={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0});var u=new cc(lc(lc({region:r,credentials:Sc,customUserAgent:Object(n.getAmplifyUserAgent)()},s),{requestHandler:new la({},t,i),useAccelerateEndpoint:a}));return u.middlewareStack.remove("contentLengthMiddleware"),u},Ec=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"PutObjectCommand",inputFilterSensitiveLog:Fn.filterSensitiveLog,outputFilterSensitiveLog:Kn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({"content-type":"application/octet-stream"},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentLength)&&{"content-length":e.ContentLength.toString()}),Ni(e.ContentMD5)&&{"content-md5":e.ContentMD5}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={"x-id":"PutObject"},void 0!==e.Body&&(c=e.Body,s=c),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"PUT",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,yi(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,ETag:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),_c=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CreateMultipartUploadCommand",inputFilterSensitiveLog:G.filterSensitiveLog,outputFilterSensitiveLog:V.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},Ni(e.ACL)&&{"x-amz-acl":e.ACL}),Ni(e.CacheControl)&&{"cache-control":e.CacheControl}),Ni(e.ContentDisposition)&&{"content-disposition":e.ContentDisposition}),Ni(e.ContentEncoding)&&{"content-encoding":e.ContentEncoding}),Ni(e.ContentLanguage)&&{"content-language":e.ContentLanguage}),Ni(e.ContentType)&&{"content-type":e.ContentType}),Ni(e.Expires)&&{expires:w(e.Expires).toString()}),Ni(e.GrantFullControl)&&{"x-amz-grant-full-control":e.GrantFullControl}),Ni(e.GrantRead)&&{"x-amz-grant-read":e.GrantRead}),Ni(e.GrantReadACP)&&{"x-amz-grant-read-acp":e.GrantReadACP}),Ni(e.GrantWriteACP)&&{"x-amz-grant-write-acp":e.GrantWriteACP}),Ni(e.ServerSideEncryption)&&{"x-amz-server-side-encryption":e.ServerSideEncryption}),Ni(e.StorageClass)&&{"x-amz-storage-class":e.StorageClass}),Ni(e.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":e.WebsiteRedirectLocation}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":e.SSEKMSKeyId}),Ni(e.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":e.SSEKMSEncryptionContext}),Ni(e.BucketKeyEnabled)&&{"x-amz-server-side-encryption-bucket-key-enabled":e.BucketKeyEnabled.toString()}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.Tagging)&&{"x-amz-tagging":e.Tagging}),Ni(e.ObjectLockMode)&&{"x-amz-object-lock-mode":e.ObjectLockMode}),Ni(e.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(e.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),Ni(e.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":e.ObjectLockLegalHoldStatus}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),void 0!==e.Metadata&&Object.keys(e.Metadata).reduce((function(t,r){var n;return a(a({},t),((n={})["x-amz-meta-"+r.toLowerCase()]=e.Metadata[r],n))}),{})),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o={uploads:""},[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"POST",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,fi(e,t)]:(r={$metadata:Mi(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,BucketKeyEnabled:void 0,Key:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-context"]&&(r.SSEKMSEncryptionContext=e.headers["x-amz-server-side-encryption-context"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p);(Au||(Au={})).filterSensitiveLog=function(e){return a({},e)},(Ou||(Ou={})).filterSensitiveLog=function(e){return a(a({},e),e.Encryption&&{Encryption:ni.filterSensitiveLog(e.Encryption)})},(xu||(xu={})).filterSensitiveLog=function(e){return a(a({},e),e.S3&&{S3:Ou.filterSensitiveLog(e.S3)})},function(e){e.IGNORE="IGNORE",e.NONE="NONE",e.USE="USE"}(ku||(ku={})),(Pu||(Pu={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.DOCUMENT="DOCUMENT",e.LINES="LINES"}(Lu||(Lu={})),(Tu||(Tu={})).filterSensitiveLog=function(e){return a({},e)},(Mu||(Mu={})).filterSensitiveLog=function(e){return a({},e)},(ju||(ju={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.ALWAYS="ALWAYS",e.ASNEEDED="ASNEEDED"}(Nu||(Nu={})),(Ru||(Ru={})).filterSensitiveLog=function(e){return a({},e)},(Uu||(Uu={})).filterSensitiveLog=function(e){return a({},e)},(zu||(zu={})).filterSensitiveLog=function(e){return a({},e)},(Iu||(Iu={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.SELECT="SELECT"}(Bu||(Bu={})),(Du||(Du={})).filterSensitiveLog=function(e){return a(a({},e),e.OutputLocation&&{OutputLocation:xu.filterSensitiveLog(e.OutputLocation)})},(Ku||(Ku={})).filterSensitiveLog=function(e){return a(a({},e),e.RestoreRequest&&{RestoreRequest:Du.filterSensitiveLog(e.RestoreRequest)})},(Fu||(Fu={})).filterSensitiveLog=function(e){return a({},e)},(qu||(qu={})).filterSensitiveLog=function(e){return a({},e)},(Hu||(Hu={})).filterSensitiveLog=function(e){return a({},e)},(Vu||(Vu={})).filterSensitiveLog=function(e){return a({},e)},(Gu||(Gu={})).filterSensitiveLog=function(e){return a({},e)},(Wu||(Wu={})).filterSensitiveLog=function(e){return a({},e)},($u||($u={})).filterSensitiveLog=function(e){return a({},e)},function(e){e.visit=function(e,t){return void 0!==e.Records?t.Records(e.Records):void 0!==e.Stats?t.Stats(e.Stats):void 0!==e.Progress?t.Progress(e.Progress):void 0!==e.Cont?t.Cont(e.Cont):void 0!==e.End?t.End(e.End):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Records?{Records:Gu.filterSensitiveLog(e.Records)}:void 0!==e.Stats?{Stats:$u.filterSensitiveLog(e.Stats)}:void 0!==e.Progress?{Progress:Vu.filterSensitiveLog(e.Progress)}:void 0!==e.Cont?{Cont:Fu.filterSensitiveLog(e.Cont)}:void 0!==e.End?{End:qu.filterSensitiveLog(e.End)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Yu||(Yu={})),(Zu||(Zu={})).filterSensitiveLog=function(e){return a(a({},e),e.Payload&&{Payload:"STREAMING_CONTENT"})},(Xu||(Xu={})).filterSensitiveLog=function(e){return a({},e)},(Ju||(Ju={})).filterSensitiveLog=function(e){return a({},e)},(Qu||(Qu={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(ec||(ec={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(tc||(tc={})).filterSensitiveLog=function(e){return a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii})},(rc||(rc={})).filterSensitiveLog=function(e){return a({},e)},(nc||(nc={})).filterSensitiveLog=function(e){return a(a({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:ii})},(ic||(ic={})).filterSensitiveLog=function(e){return a(a(a({},e),e.SSECustomerKey&&{SSECustomerKey:ii}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:ii})};var Cc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(ho(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"UploadPartCommand",inputFilterSensitiveLog:tc.filterSensitiveLog,outputFilterSensitiveLog:ec.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a(a(a(a(a(a({"content-type":"application/octet-stream"},Ni(e.ContentLength)&&{"content-length":e.ContentLength.toString()}),Ni(e.ContentMD5)&&{"content-md5":e.ContentMD5}),Ni(e.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":e.SSECustomerAlgorithm}),Ni(e.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":e.SSECustomerKey}),Ni(e.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-md5":e.SSECustomerKeyMD5}),Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a({"x-id":"UploadPart"},void 0!==e.PartNumber&&{partNumber:e.PartNumber.toString()}),void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.Body&&(c=e.Body,s=c),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"PUT",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,mi(e,t)]:(r={$metadata:Mi(e),BucketKeyEnabled:void 0,ETag:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0},void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers.etag&&(r.ETag=e.headers.etag),void 0!==e.headers["x-amz-server-side-encryption-customer-algorithm"]&&(r.SSECustomerAlgorithm=e.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==e.headers["x-amz-server-side-encryption-customer-key-md5"]&&(r.SSECustomerKeyMD5=e.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),Ac=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(so(t)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"CompleteMultipartUploadCommand",inputFilterSensitiveLog:R.filterSensitiveLog,outputFilterSensitiveLog:M.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f,h,p;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({"content-type":"application/xml"},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({},void 0!==e.UploadId&&{uploadId:e.UploadId}),void 0!==e.MultipartUpload&&(c=Ci(e.MultipartUpload,t),s='<?xml version="1.0" encoding="UTF-8"?>',c.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),s+=c.toString()),[4,t.endpoint()];case 1:return l=u.sent(),d=l.hostname,f=l.protocol,h=void 0===f?"https":f,p=l.port,[2,new oi.a({protocol:h,hostname:d,port:p,method:"POST",headers:r,path:n,query:o,body:s})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,li(e,t)]:(r={$metadata:Mi(e),Bucket:void 0,BucketKeyEnabled:void 0,ETag:void 0,Expiration:void 0,Key:void 0,Location:void 0,RequestCharged:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==e.headers["x-amz-expiration"]&&(r.Expiration=e.headers["x-amz-expiration"]),void 0!==e.headers["x-amz-server-side-encryption"]&&(r.ServerSideEncryption=e.headers["x-amz-server-side-encryption"]),void 0!==e.headers["x-amz-version-id"]&&(r.VersionId=e.headers["x-amz-version-id"]),void 0!==e.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(r.SSEKMSKeyId=e.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==e.headers["x-amz-server-side-encryption-bucket-key-enabled"]&&(r.BucketKeyEnabled="true"===e.headers["x-amz-server-side-encryption-bucket-key-enabled"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.ETag&&(r.ETag=n.ETag),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.Location&&(r.Location=n.Location),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),Oc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"AbortMultipartUploadCommand",inputFilterSensitiveLog:C.filterSensitiveLog,outputFilterSensitiveLog:_.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a({"x-id":"AbortMultipartUpload"},void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"DELETE",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return 204!==e.statusCode&&e.statusCode>=300?[2,ci(e,t)]:(r={$metadata:Mi(e),RequestCharged:void 0},void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,ji(e.body,t)]);case 1:return n.sent(),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),xc=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return o(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(lo(t,this.serialize,this.deserialize)),this.middlewareStack.use(Qi(t));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"S3Client",commandName:"ListPartsCommand",inputFilterSensitiveLog:vn.filterSensitiveLog,outputFilterSensitiveLog:pn.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n,i,o,s,c,l,d,f;return u(this,(function(u){switch(u.label){case 0:if(r=a(a({},Ni(e.RequestPayer)&&{"x-amz-request-payer":e.RequestPayer}),Ni(e.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":e.ExpectedBucketOwner}),n="/{Bucket}/{Key+}",void 0===e.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=e.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(n=n.replace("{Bucket}",v(i)),void 0===e.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=e.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return n=n.replace("{Key+}",i.split("/").map((function(e){return v(e)})).join("/")),o=a(a(a({"x-id":"ListParts"},void 0!==e.MaxParts&&{"max-parts":e.MaxParts.toString()}),void 0!==e.PartNumberMarker&&{"part-number-marker":e.PartNumberMarker}),void 0!==e.UploadId&&{uploadId:e.UploadId}),[4,t.endpoint()];case 1:return s=u.sent(),c=s.hostname,l=s.protocol,d=void 0===l?"https":l,f=s.port,[2,new oi.a({protocol:d,hostname:c,port:f,method:"GET",headers:r,path:n,query:o,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return s(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,gi(e,t)]:(r={$metadata:Mi(e),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Initiator:void 0,IsTruncated:void 0,Key:void 0,MaxParts:void 0,NextPartNumberMarker:void 0,Owner:void 0,PartNumberMarker:void 0,Parts:void 0,RequestCharged:void 0,StorageClass:void 0,UploadId:void 0},void 0!==e.headers["x-amz-abort-date"]&&(r.AbortDate=new Date(e.headers["x-amz-abort-date"])),void 0!==e.headers["x-amz-abort-rule-id"]&&(r.AbortRuleId=e.headers["x-amz-abort-rule-id"]),void 0!==e.headers["x-amz-request-charged"]&&(r.RequestCharged=e.headers["x-amz-request-charged"]),[4,Ri(e.body,t)]);case 1:return void 0!==(n=i.sent()).Bucket&&(r.Bucket=n.Bucket),void 0!==n.Initiator&&(r.Initiator=ki(n.Initiator,t)),void 0!==n.IsTruncated&&(r.IsTruncated="true"==n.IsTruncated),void 0!==n.Key&&(r.Key=n.Key),void 0!==n.MaxParts&&(r.MaxParts=parseInt(n.MaxParts)),void 0!==n.NextPartNumberMarker&&(r.NextPartNumberMarker=n.NextPartNumberMarker),void 0!==n.Owner&&(r.Owner=Li(n.Owner,t)),void 0!==n.PartNumberMarker&&(r.PartNumberMarker=n.PartNumberMarker),""===n.Part&&(r.Parts=[]),void 0!==n.Part&&(r.Parts=Ti(g(n.Part),t)),void 0!==n.StorageClass&&(r.StorageClass=n.StorageClass),void 0!==n.UploadId&&(r.UploadId=n.UploadId),[2,Promise.resolve(r)]}}))}))}(e,t)},t}(p),kc=r(7);function Pc(e){return(Pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Lc,Tc,Mc=function(){return(Mc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},jc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Nc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Rc=new n.ConsoleLogger("AWSS3ProviderManagedUpload"),Uc=function(){function e(e,t,r){this.minPartSize=5242880,this.queueSize=4,this.body=null,this.params=null,this.opts=null,this.completedParts=[],this.uploadId=null,this.bytesUploaded=0,this.totalBytesToUpload=0,this.emitter=null,this.params=e,this.opts=t,this.emitter=r,this.s3client=this._createNewS3Client(t,r)}return e.prototype.upload=function(){return jc(this,void 0,void 0,(function(){var e,t,r,n,i,o,a,s=this;return Nc(this,(function(u){switch(u.label){case 0:return u.trys.push([0,10,,12]),e=this,[4,this.validateAndSanitizeBody(this.params.Body)];case 1:return e.body=u.sent(),this.totalBytesToUpload=this.byteLength(this.body),this.totalBytesToUpload<=this.minPartSize?(this.params.Body=this.body,t=new Ec(this.params),[2,this.s3client.send(t)]):[3,2];case 2:return r=this,[4,this.createMultiPartUpload()];case 3:r.uploadId=u.sent(),n=Math.ceil(this.totalBytesToUpload/this.minPartSize),i=this.createParts(),o=0,u.label=4;case 4:return o<n?[4,this.uploadParts(this.uploadId,i.slice(o,o+this.queueSize))]:[3,7];case 5:u.sent(),u.label=6;case 6:return o+=this.queueSize,[3,4];case 7:return i.map((function(e){s.removeEventListener(e)})),[4,this.finishMultiPartUpload(this.uploadId)];case 8:return[2,u.sent()];case 9:return[3,12];case 10:return a=u.sent(),[4,this.cleanup(this.uploadId)];case 11:throw u.sent(),Rc.error("Error. Cancelling the multipart upload."),a;case 12:return[2]}}))}))},e.prototype.createParts=function(){try{for(var e=[],t=0;t<this.totalBytesToUpload;){var r=Math.min(t+this.minPartSize,this.totalBytesToUpload);e.push({bodyPart:this.body.slice(t,r),partNumber:e.length+1,emitter:new kc.EventEmitter,_lastUploadedBytes:0}),t+=this.minPartSize}return e}catch(e){throw Rc.error(e),e}},e.prototype.createMultiPartUpload=function(){return jc(this,void 0,void 0,(function(){var e,t,r;return Nc(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=new _c(this.params),[4,this.s3client.send(e)];case 1:return t=n.sent(),Rc.debug(t.UploadId),[2,t.UploadId];case 2:throw r=n.sent(),Rc.error(r),r;case 3:return[2]}}))}))},e.prototype.uploadParts=function(e,t){return jc(this,void 0,void 0,(function(){var r,n,i,o=this;return Nc(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Promise.all(t.map((function(t){return jc(o,void 0,void 0,(function(){var r,n,i,o,a,s,u;return Nc(this,(function(c){switch(c.label){case 0:return this.setupEventListener(t),r={emitter:t.emitter},n=this.params,i=n.Key,o=n.Bucket,a=n.SSECustomerAlgorithm,s=n.SSECustomerKey,u=n.SSECustomerKeyMD5,[4,this.s3client.send(new Cc(Mc(Mc(Mc({PartNumber:t.partNumber,Body:t.bodyPart,UploadId:e,Key:i,Bucket:o},a&&{SSECustomerAlgorithm:a}),s&&{SSECustomerKey:s}),u&&{SSECustomerKeyMD5:u})),r)];case 1:return[2,c.sent()]}}))}))})))];case 1:for(r=a.sent(),n=0;n<r.length;n++)this.completedParts.push({PartNumber:t[n].partNumber,ETag:r[n].ETag});return[3,3];case 2:throw i=a.sent(),Rc.error("Error happened while uploading a part. Cancelling the multipart upload"),i;case 3:return[2]}}))}))},e.prototype.finishMultiPartUpload=function(e){return jc(this,void 0,void 0,(function(){var t,r,n;return Nc(this,(function(i){switch(i.label){case 0:t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e,MultipartUpload:{Parts:this.completedParts}},r=new Ac(t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.s3client.send(r)];case 2:return[2,i.sent().Key];case 3:throw n=i.sent(),Rc.error("Error happened while finishing the upload."),n;case 4:return[2]}}))}))},e.prototype.cleanup=function(e){return jc(this,void 0,void 0,(function(){var t,r;return Nc(this,(function(n){switch(n.label){case 0:return this.body=null,this.completedParts=[],this.bytesUploaded=0,this.totalBytesToUpload=0,t={Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e},[4,this.s3client.send(new Oc(t))];case 1:return n.sent(),[4,this.s3client.send(new xc(t))];case 2:if((r=n.sent())&&r.Parts&&r.Parts.length>0)throw new Error("Multipart upload clean up failed.");return[2]}}))}))},e.prototype.removeEventListener=function(e){e.emitter.removeAllListeners("sendUploadProgress"),e.emitter.removeAllListeners("sendDownloadProgress")},e.prototype.setupEventListener=function(e){var t=this;e.emitter.on("sendUploadProgress",(function(r){t.progressChanged(e.partNumber,r.loaded-e._lastUploadedBytes),e._lastUploadedBytes=r.loaded}))},e.prototype.progressChanged=function(e,t){this.bytesUploaded+=t,this.emitter.emit("sendUploadProgress",{loaded:this.bytesUploaded,total:this.totalBytesToUpload,part:e,key:this.params.Key})},e.prototype.byteLength=function(e){if(null==e)return 0;if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"!=typeof e.path)throw new Error("Cannot determine length of "+e)},e.prototype.validateAndSanitizeBody=function(e){return jc(this,void 0,void 0,(function(){return Nc(this,(function(t){return this.isGenericObject(e)?[2,JSON.stringify(e)]:[2,e]}))}))},e.prototype.isGenericObject=function(e){if(null!==e&&"object"===Pc(e))try{return!(this.byteLength(e)>=0)}catch(e){return!0}return!1},e.prototype._createNewS3Client=function(e,t){var r=wc(e,t);return r.middlewareStack.add(gc(this.opts,this.params.Key),bc),r.middlewareStack.add(yc(r.config),mc),r},e}(),zc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ic=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Bc=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Dc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bc(arguments[t]));return e},Kc=new n.Logger("AWSS3UploadTask");!function(e){e[e.INIT=0]="INIT",e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.PAUSED=2]="PAUSED",e[e.CANCELLED=3]="CANCELLED",e[e.COMPLETED=4]="COMPLETED"}(Lc||(Lc={})),function(e){e.CANCEL="cancel",e.UPLOAD_COMPLETE="uploadComplete",e.UPLOAD_PROGRESS="uploadPartProgress",e.ERROR="error"}(Tc||(Tc={}));function Fc(e,t){return e.PartNumber-t.PartNumber}var qc=function(){function e(e){var t=e.s3Client,r=e.file,n=e.emitter,i=e.storage,o=e.params,a=e.level,s=e.prefixPromise;this.partSize=5242880,this.queueSize=4,this.inProgress=[],this.completedParts=[],this.queued=[],this.bytesUploaded=0,this.totalBytes=0,this.state=Lc.INIT,this.prefixPromise=s,this.s3client=t,this.s3client.middlewareStack.remove("contentLengthMiddleware"),this.storage=i,this.storageSync=Promise.resolve(),"function"==typeof this.storage.sync&&(this.storageSync=this.storage.sync()),this.params=o,this.file=r,this.totalBytes=this.file.size,this.bytesUploaded=0,this.emitter=n,this.queued=[],this.fileId=this._getFileId(a),this._validateParams(),this.emitter.on(Tc.ERROR,(function(){}))}return Object.defineProperty(e.prototype,"percent",{get:function(){return this.bytesUploaded/this.totalBytes*100},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInProgress",{get:function(){return this.state===Lc.IN_PROGRESS},enumerable:!0,configurable:!0}),e.prototype._listSingleFile=function(e){var t=e.key,r=e.bucket;return zc(this,void 0,void 0,(function(){var e,n,i,o;return Ic(this,(function(a){switch(a.label){case 0:return[4,this.s3client.send(new yo({Bucket:r,Prefix:t}))];case 1:return e=a.sent(),n=e.Contents,i=void 0===n?[]:n,[4,this.prefixPromise];case 2:return o=a.sent(),[2,i.find((function(e){return e.Key===""+o+t}))]}}))}))},e.prototype._getFileId=function(e){return void 0!==(t=this.file)&&t instanceof File?[this.file.name,this.file.lastModified,this.file.size,this.file.type,this.params.Bucket,e,this.params.Key].join("-"):[this.file.size,this.file.type,this.params.Bucket,e,this.params.Key].join("-");var t},e.prototype._findCachedUploadParts=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return e=r.sent(),0!==Object.keys(e).length&&Object.prototype.hasOwnProperty.call(e,this.fileId)?((t=e[this.fileId]).lastTouched=Date.now(),this.storage.setItem("__uploadInProgress",JSON.stringify(e)),[4,this.s3client.send(new xc({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:t.uploadId}))]):[2,{parts:[],uploadId:null}];case 2:return[2,{parts:r.sent().Parts||[],uploadId:t.uploadId}]}}))}))},e.prototype._emitEvent=function(e,t){this.emitter.emit(e,t)},e.prototype._validateParams=function(){if(this.file.size/this.partSize>1e4)throw new Error("Too many parts. Number of parts is "+this.file.size/this.partSize+", maximum is 10000.")},e.prototype._listCachedUploadTasks=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this.storageSync];case 1:return t.sent(),e=this.storage.getItem("__uploadInProgress")||"{}",[2,JSON.parse(e)]}}))}))},e.prototype._cache=function(e){return zc(this,void 0,void 0,(function(){var t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return(t=r.sent())[this.fileId]=e,this.storage.setItem("__uploadInProgress",JSON.stringify(t)),[2]}}))}))},e.prototype._isCached=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return t=(e=Object.prototype.hasOwnProperty).call,[4,this._listCachedUploadTasks()];case 1:return[2,t.apply(e,[r.sent(),this.fileId])]}}))}))},e.prototype._removeFromCache=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this._listCachedUploadTasks()];case 1:return delete(e=t.sent())[this.fileId],this.storage.setItem("__uploadInProgress",JSON.stringify(e)),[2]}}))}))},e.prototype._onPartUploadCompletion=function(e){var t=e.eTag,r=e.partNumber,n=e.chunk;return zc(this,void 0,void 0,(function(){return Ic(this,(function(e){return this.completedParts.push({ETag:t,PartNumber:r}),this.bytesUploaded+=function(e){if("string"==typeof e)return e.length;if(va(e))return e.byteLength;if(pa(e))return e.size;throw new Error("Cannot determine byte length of "+e)}(n),this._emitEvent(Tc.UPLOAD_PROGRESS,{loaded:this.bytesUploaded,total:this.totalBytes}),this.inProgress=this.inProgress.filter((function(e){return e.uploadPartInput.PartNumber!==r})),this.queued.length&&this.state!==Lc.PAUSED&&this._startNextPart(),this._isDone()&&this._completeUpload(),[2]}))}))},e.prototype._completeUpload=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.s3client.send(new Ac({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:this.uploadId,MultipartUpload:{Parts:this.completedParts.sort(Fc)}}))];case 1:return t.sent(),this._verifyFileSize(),this._emitEvent(Tc.UPLOAD_COMPLETE,{key:this.params.Bucket+"/"+this.params.Key}),this._removeFromCache(),this.state=Lc.COMPLETED,[3,3];case 2:return e=t.sent(),Kc.error("error completing upload",e),this._emitEvent(Tc.ERROR,e),[3,3];case 3:return[2]}}))}))},e.prototype._makeUploadPartRequest=function(e,t){return zc(this,void 0,void 0,(function(){var r,n;return Ic(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.s3client.send(new Cc(e),{cancelTokenSource:t})];case 1:return r=i.sent(),[4,this._onPartUploadCompletion({eTag:r.ETag,partNumber:e.PartNumber,chunk:e.Body})];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.state===Lc.PAUSED?Kc.log("upload paused"):this.state===Lc.CANCELLED?Kc.log("upload aborted"):Kc.error("error starting next part of upload: ",n),ia.a.isCancel(n)||n.message===ra.UPLOAD_PAUSED_MESSAGE||(this._emitEvent(Tc.ERROR,n),this.pause()),[3,4];case 4:return[2]}}))}))},e.prototype._startNextPart=function(){if(this.queued.length>0&&this.state!==Lc.PAUSED){var e=ia.a.CancelToken.source(),t=this.queued.shift();this.inProgress.push({uploadPartInput:t,s3Request:this._makeUploadPartRequest(t,e),cancel:e.cancel})}},e.prototype._verifyFileSize=function(){return zc(this,void 0,void 0,(function(){var e,t;return Ic(this,(function(r){switch(r.label){case 0:return[4,this._listSingleFile({key:this.params.Key,bucket:this.params.Bucket})];case 1:if(e=r.sent(),!(t=Boolean(e&&e.Size===this.file.size)))throw new Error("File size does not match between local file and file on s3");return[2,t]}}))}))},e.prototype._isDone=function(){return!this.queued.length&&!this.inProgress.length&&this.bytesUploaded===this.totalBytes},e.prototype._createParts=function(){for(var e=this.file.size,t=[],r=0;r<e;){var n=Math.min(r+this.partSize,e);t.push({Body:this.file.slice(r,n),Key:this.params.Key,Bucket:this.params.Bucket,PartNumber:t.length+1,UploadId:this.uploadId}),r+=this.partSize}return t},e.prototype._initCachedUploadParts=function(e){this.bytesUploaded+=e.reduce((function(e,t){return e+t.Size}),0);var t=new Set(e.map((function(e){return e.PartNumber})));this.queued=this.queued.filter((function(e){return!t.has(e.PartNumber)})),this.completedParts=e.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}})),this._emitEvent(Tc.UPLOAD_PROGRESS,{loaded:this.bytesUploaded,total:this.totalBytes})},e.prototype._initMultipartUpload=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return[4,this.s3client.send(new _c(this.params))];case 1:return e=t.sent(),this._cache({uploadId:e.UploadId,lastTouched:Date.now(),bucket:this.params.Bucket,key:this.params.Key,fileName:this.file instanceof File?this.file.name:""}),[2,e.UploadId]}}))}))},e.prototype._initializeUploadTask=function(){return zc(this,void 0,void 0,(function(){var e,t,r,n;return Ic(this,(function(i){switch(i.label){case 0:this.state=Lc.IN_PROGRESS,i.label=1;case 1:return i.trys.push([1,7,,8]),[4,this._isCached()];case 2:return i.sent()?[4,this._findCachedUploadParts()]:[3,4];case 3:return e=i.sent(),t=e.parts,r=e.uploadId,this.uploadId=r,this.queued=this._createParts(),this._initCachedUploadParts(t),this._startUpload(),[3,6];case 4:return this.uploadId?[3,6]:[4,this._initMultipartUpload()];case 5:r=i.sent(),this.uploadId=r,this.queued=this._createParts(),this._startUpload(),i.label=6;case 6:return[3,8];case 7:return n=i.sent(),ia.a.isCancel(n)||Kc.error("Error initializing the upload task",n),[3,8];case 8:return[2]}}))}))},e.prototype.resume=function(){this.state===Lc.CANCELLED?Kc.warn("This task has already been cancelled"):this.state===Lc.COMPLETED?Kc.warn("This task has already been completed"):this.state===Lc.IN_PROGRESS?Kc.warn("Upload task already in progress"):this.uploadId?this._startUpload():this._initializeUploadTask()},e.prototype._startUpload=function(){this.state=Lc.IN_PROGRESS;for(var e=0;e<this.queueSize;e++)this._startNextPart()},e.prototype._cancel=function(){return zc(this,void 0,void 0,(function(){var e;return Ic(this,(function(t){switch(t.label){case 0:return this.state!==Lc.CANCELLED?[3,1]:(Kc.warn("This task has already been cancelled"),[2,!1]);case 1:return this.state!==Lc.COMPLETED?[3,2]:(Kc.warn("This task has already been completed"),[2,!1]);case 2:this.pause(),this.queued=[],this.completedParts=[],this.bytesUploaded=0,this.state=Lc.CANCELLED,t.label=3;case 3:return t.trys.push([3,6,,7]),[4,this.s3client.send(new Oc({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:this.uploadId}))];case 4:return t.sent(),[4,this._removeFromCache()];case 5:return t.sent(),[2,!0];case 6:return e=t.sent(),Kc.error("Error cancelling upload task",e),[2,!1];case 7:return[2]}}))}))},e.prototype.pause=function(){var e;this.state===Lc.CANCELLED?Kc.warn("This task has already been cancelled"):this.state===Lc.COMPLETED?Kc.warn("This task has already been completed"):this.state===Lc.PAUSED&&Kc.warn("This task is already paused"),this.state=Lc.PAUSED;var t=this.inProgress.splice(0,this.inProgress.length);t.forEach((function(e){e.cancel(ra.UPLOAD_PAUSED_MESSAGE)})),(e=this.queued).unshift.apply(e,Dc(t.map((function(e){return e.uploadPartInput}))))},e}();function Hc(e){return(Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Vc=function(){return(Vc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Gc=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Wc=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},$c=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Yc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($c(arguments[t]));return e},Zc=new n.ConsoleLogger("AWSS3Provider"),Xc=function(){function e(e){var t=this;this._config=e||{},this._storage=(new n.StorageHelper).getStorage(),n.Hub.listen("auth",(function(e){var r=e.payload;"signOut"!==r.event&&"signIn"!==r.event||t._storage.removeItem("__uploadInProgress")})),Zc.debug("Storage Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){if(Zc.debug("configure Storage",e),!e)return this._config;var t=n.Parser.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,t.Storage),this._config.bucket||Zc.debug("Do not have bucket yet"),this._config},e.prototype.startResumableUpload=function(e,t){var r=e.s3Client,i=e.emitter,o=e.key,a=e.file,s=e.params,u=t.progressCallback,c=t.completeCallback,l=t.errorCallback,d=t.track,f=void 0!==d&&d;if(!(a instanceof Blob))throw new Error(ea.INVALID_BLOB);i.on(Tc.UPLOAD_PROGRESS,(function(e){u&&("function"==typeof u?u(e):Zc.warn("progressCallback should be a function, not a "+Hc(u)))})),i.on(Tc.UPLOAD_COMPLETE,(function(e){c&&("function"==typeof c?c(e):Zc.warn("completeCallback should be a function, not a "+Hc(c)))})),i.on(Tc.ERROR,(function(e){l&&("function"==typeof l?l(e):Zc.warn("errorCallback should be a function, not a "+Hc(l)))}));var h=n.Credentials.get().then((function(e){var r=n.Credentials.shear(e);return vc(Vc(Vc({},t),{credentials:r}))})),p=new qc({s3Client:r,file:a,emitter:i,level:t.level,storage:this._storage,params:s,prefixPromise:h});return ha(f,"upload",{method:"put",result:"success"},null,"Upload Task created successfully for "+o),p.resume(),p},e.prototype.copy=function(e,t,r){return Gc(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O,x;return Wc(this,(function(k){switch(k.label){case 0:return[4,this._ensureCredentials()];case 1:if(!k.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);if(n=Object.assign({},this._config,r),i=n.acl,o=n.bucket,a=n.cacheControl,s=n.expires,u=n.track,c=n.serverSideEncryption,l=n.SSECustomerAlgorithm,d=n.SSECustomerKey,f=n.SSECustomerKeyMD5,h=n.SSEKMSKeyId,p=e.level,v=void 0===p?"public":p,g=e.identityId,y=e.key,m=t.level,b=void 0===m?"public":m,S=t.key,!y||"string"!=typeof y)throw new Error(ea.NO_SRC_KEY);if(!S||"string"!=typeof S)throw new Error(ea.NO_DEST_KEY);"protected"!==v&&g&&Zc.warn('You may copy files from another user if the source level is "protected", currently it\'s '+v),w=this._prefix(Vc(Vc(Vc({},n),{level:v}),g&&{identityId:g})),E=this._prefix(Vc(Vc({},n),{level:b})),_=o+"/"+w+y,C=""+E+S,Zc.debug("copying "+_+" to "+C),A={Bucket:o,CopySource:_,Key:C,MetadataDirective:"COPY"},a&&(A.CacheControl=a),s&&(A.Expires=s),c&&(A.ServerSideEncryption=c),l&&(A.SSECustomerAlgorithm=l),d&&(A.SSECustomerKey=d),f&&(A.SSECustomerKeyMD5=f),h&&(A.SSEKMSKeyId=h),i&&(A.ACL=i),O=this._createNewS3Client(n),k.label=2;case 2:return k.trys.push([2,4,,5]),[4,O.send(new po(A))];case 3:return k.sent(),ha(u,"copy",{method:"copy",result:"success"},null,"Copy success from "+y+" to "+S),[2,{key:S}];case 4:throw x=k.sent(),ha(u,"copy",{method:"copy",result:"failed"},null,"Copy failed from "+y+" to "+S),x;case 5:return[2]}}))}))},e.prototype.get=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l,d,f,h,p,v,g,y,m,b,S,w,E,_,C,A,O,x,k;return Wc(this,(function(P){switch(P.label){case 0:return[4,this._ensureCredentials()];case 1:if(!P.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);if(r=Object.assign({},this._config,t),n=r.bucket,i=r.download,o=r.cacheControl,a=r.contentDisposition,s=r.contentEncoding,u=r.contentLanguage,c=r.contentType,l=r.expires,d=r.track,f=r.SSECustomerAlgorithm,h=r.SSECustomerKey,p=r.SSECustomerKeyMD5,v=r.progressCallback,g=this._prefix(r),y=g+e,m=new kc.EventEmitter,b=this._createNewS3Client(r,m),Zc.debug("get "+e+" from "+y),S={Bucket:n,Key:y},o&&(S.ResponseCacheControl=o),a&&(S.ResponseContentDisposition=a),s&&(S.ResponseContentEncoding=s),u&&(S.ResponseContentLanguage=u),c&&(S.ResponseContentType=c),f&&(S.SSECustomerAlgorithm=f),h&&(S.SSECustomerKey=h),p&&(S.SSECustomerKeyMD5=p),!0!==i)return[3,5];w=new vo(S),P.label=2;case 2:return P.trys.push([2,4,,5]),v&&("function"==typeof v?m.on("sendDownloadProgress",(function(e){v(e)})):Zc.warn("progressCallback should be a function, not a "+Hc(v))),[4,b.send(w)];case 3:return E=P.sent(),m.removeAllListeners("sendDownloadProgress"),ha(d,"download",{method:"get",result:"success"},{fileSize:Number(E.Body.size||E.Body.length)},"Download success for "+e),[2,E];case 4:throw _=P.sent(),ha(d,"download",{method:"get",result:"failed"},null,"Download failed with "+_.message),_;case 5:return P.trys.push([5,8,,9]),C=new Qo(Vc({},b.config)),[4,Eo(b,new vo(S))];case 6:return A=P.sent(),x=wo,[4,C.presign(A,{expiresIn:l||900})];case 7:return O=x.apply(void 0,[P.sent()]),ha(d,"getSignedUrl",{method:"get",result:"success"},null,"Signed URL: "+O),[2,O];case 8:throw k=P.sent(),Zc.warn("get signed url error",k),ha(d,"getSignedUrl",{method:"get",result:"failed"},null,"Could not get a signed URL for "+e),k;case 9:return[2]}}))}))},e.prototype.put=function(e,t,r){var n=Object.assign({},this._config,r),i=n.bucket,o=n.track,a=n.progressCallback,s=n.level,u=n.resumable,c=n.contentType,l=n.contentDisposition,d=n.contentEncoding,f=n.cacheControl,h=n.expires,p=n.metadata,v=n.tagging,g=n.acl,y=n.serverSideEncryption,m=n.SSECustomerAlgorithm,b=n.SSECustomerKey,S=n.SSECustomerKeyMD5,w=n.SSEKMSKeyId,E={Bucket:i,Key:e,Body:t,ContentType:c||"binary/octet-stream"};f&&(E.CacheControl=f),l&&(E.ContentDisposition=l),d&&(E.ContentEncoding=d),h&&(E.Expires=h),p&&(E.Metadata=p),v&&(E.Tagging=v),y&&(E.ServerSideEncryption=y),m&&(E.SSECustomerAlgorithm=m),b&&(E.SSECustomerKey=b),S&&(E.SSECustomerKeyMD5=S),w&&(E.SSEKMSKeyId=w);var _=new kc.EventEmitter,C=new Uc(E,n,_);if(g&&(E.ACL=g),!0===u){var A=this._createNewS3Client(n);A.middlewareStack.add(gc(n,e),bc);var O={bucket:i,key:e,s3Client:A,file:t,emitter:_,accessLevel:s,params:E};return this.startResumableUpload(O,r)}try{return a&&("function"==typeof a?_.on("sendUploadProgress",(function(e){a(e)})):Zc.warn("progressCallback should be a function, not a "+Hc(a))),C.upload().then((function(t){return Zc.debug("upload result",t),ha(o,"upload",{method:"put",result:"success"},null,"Upload success for "+e),{key:e}}))}catch(t){throw Zc.warn("error uploading",t),ha(o,"upload",{method:"put",result:"failed"},null,"Error uploading "+e),t}},e.prototype.remove=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l;return Wc(this,(function(d){switch(d.label){case 0:return[4,this._ensureCredentials()];case 1:if(!d.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);r=Object.assign({},this._config,t),n=r.bucket,i=r.track,o=this._prefix(r),a=o+e,s=this._createNewS3Client(r),Zc.debug("remove "+e+" from "+a),u=new go({Bucket:n,Key:a}),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,s.send(u)];case 3:return c=d.sent(),ha(i,"delete",{method:"remove",result:"success"},null,"Deleted "+e+" successfully"),[2,c];case 4:throw l=d.sent(),ha(i,"delete",{method:"remove",result:"failed"},null,"Deletion of "+e+" failed with "+l),l;case 5:return[2]}}))}))},e.prototype._list=function(e,t,r){return Gc(this,void 0,void 0,(function(){var n,i,o,a;return Wc(this,(function(s){switch(s.label){case 0:return n={contents:[],nextToken:""},i=this._createNewS3Client(t),o=new yo(Vc({},e)),[4,i.send(o)];case 1:return(a=s.sent())&&a.Contents&&(n.contents=a.Contents.map((function(e){return{key:e.Key.substr(r.length),eTag:e.ETag,lastModified:e.LastModified,size:e.Size}})),n.nextToken=a.NextContinuationToken),[2,n]}}))}))},e.prototype.list=function(e,t){return Gc(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l,d,f;return Wc(this,(function(h){switch(h.label){case 0:return[4,this._ensureCredentials()];case 1:if(!h.sent()||!this._isWithCredentials(this._config))throw new Error(ea.NO_CREDENTIALS);r=Object.assign({},this._config,t),n=r.bucket,i=r.track,o=r.maxKeys,a=this._prefix(r),s=a+e,Zc.debug("list "+e+" from "+s),h.label=2;case 2:if(h.trys.push([2,10,,11]),u=[],c=void 0,l=void 0,d={Bucket:n,Prefix:s,MaxKeys:1e3},"ALL"!==o)return[3,7];h.label=3;case 3:return d.ContinuationToken=c,d.MaxKeys=1e3,[4,this._list(d,r,a)];case 4:l=h.sent(),u.push.apply(u,Yc(l.contents)),l.nextToken&&(c=l.nextToken),h.label=5;case 5:if(l.nextToken)return[3,3];h.label=6;case 6:return[3,9];case 7:return d.MaxKeys=o<1e3||"string"==typeof o?o:1e3,[4,this._list(d,r,a)];case 8:l=h.sent(),u.push.apply(u,Yc(l.contents)),o>1e3&&Zc.warn("maxkeys can be from 0 - 1000 or 'ALL'. To list all files you can set maxKeys to 'ALL'."),h.label=9;case 9:return ha(i,"list",{method:"list",result:"success"},null,u.length+" items returned from list operation"),Zc.debug("list",u),[2,u];case 10:throw f=h.sent(),Zc.warn("list error",f),ha(i,"list",{method:"list",result:"failed"},null,"Listing items failed: "+f.message),f;case 11:return[2]}}))}))},e.prototype._ensureCredentials=function(){return Gc(this,void 0,void 0,(function(){var e,t,r;return Wc(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.Credentials.get()];case 1:return(e=i.sent())?(t=n.Credentials.shear(e),Zc.debug("set credentials for storage",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return r=i.sent(),Zc.warn("ensure credentials error",r),[2,!1];case 3:return[2]}}))}))},e.prototype._isWithCredentials=function(e){return"object"===Hc(e)&&e.hasOwnProperty("credentials")},e.prototype._prefix=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},i=e.identityId||t.identityId,o=(void 0!==n.private?n.private:"private/")+i+"/",a=(void 0!==n.protected?n.protected:"protected/")+i+"/",s=void 0!==n.public?n.public:"public/";switch(r){case"private":return o;case"protected":return a;default:return s}},e.prototype._createNewS3Client=function(e,t){var r=wc(e,t);return r.middlewareStack.add(yc(r.config),mc),r},e.CATEGORY="Storage",e.PROVIDER_NAME="AWSS3",e}(),Jc=function(){return(Jc=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Qc=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},el=new n.ConsoleLogger("StorageClass"),tl=function(){function e(){this._config={},this._pluggables=[],this._cancelTokenSourceMap=new WeakMap,el.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return e.prototype.getModuleName=function(){return"Storage"},e.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory()){this._pluggables.push(e);return e.configure(this._config[e.getProviderName()])}},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));return void 0===t?(el.debug("No plugin found with providerName",e),null):t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(el.debug("configure Storage"),!e)return this._config;var r=n.Parser.parseMobilehubConfig(e),i=Object.keys(r.Storage),o=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],a=function(e){return o.some((function(t){return t===e}))};return i&&i.find((function(e){return a(e)}))&&!r.Storage.AWSS3&&(r.Storage.AWSS3={}),Object.entries(r.Storage).map((function(e){var t=Qc(e,2),n=t[0],i=t[1];n&&a(n)&&void 0!==i&&(r.Storage.AWSS3[n]=i,delete r.Storage[n])})),Object.keys(r.Storage).forEach((function(e){"string"!=typeof r.Storage[e]&&(t._config[e]=Jc(Jc({},t._config[e]),r.Storage[e]))})),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Xc),this._config},e.prototype.getCancellableTokenSource=function(){return ia.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenSourceMap.set(e,t)},e.prototype.isUploadTask=function(e){return void 0!==e&&"function"==typeof e.pause&&"function"==typeof e.resume},e.prototype.cancel=function(e,t){if(e instanceof qc)return e._cancel();var r=this._cancelTokenSourceMap.get(e);r?r.cancel(t):el.debug("The request does not map to any cancel token")},e.prototype.copy=function(e,t,r){var n=(null==r?void 0:r.provider)||"AWSS3",i=this._pluggables.find((function(e){return e.getProviderName()===n}));if(void 0===i)return el.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider");var o=this.getCancellableTokenSource();if("function"!=typeof i.copy)return Promise.reject(".copy is not implemented on provider "+i.getProviderName());var a=i.copy(e,t,Jc(Jc({},r),{cancelTokenSource:o}));return this.updateRequestToBeCancellable(a,o),a},e.prototype.get=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));if(void 0===n)return el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider");var i=this.getCancellableTokenSource(),o=n.get(e,Jc(Jc({},t),{cancelTokenSource:i}));return this.updateRequestToBeCancellable(o,i),o},e.prototype.isCancelError=function(e){return ia.a.isCancel(e)},e.prototype.put=function(e,t,r){var n=(null==r?void 0:r.provider)||"AWSS3",i=this._pluggables.find((function(e){return e.getProviderName()===n}));if(void 0===i)return el.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider");var o=this.getCancellableTokenSource(),a=i.put(e,t,Jc(Jc({},r),{cancelTokenSource:o}));return this.isUploadTask(a)||this.updateRequestToBeCancellable(a,o),a},e.prototype.remove=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));return void 0===n?(el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")):n.remove(e,t)},e.prototype.list=function(e,t){var r=(null==t?void 0:t.provider)||"AWSS3",n=this._pluggables.find((function(e){return e.getProviderName()===r}));return void 0===n?(el.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")):n.list(e,t)},e}(),rl=function(){return(rl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},nl=new n.ConsoleLogger("Storage"),il=null,ol=function(){if(il)return il;nl.debug("Create Storage Instance, debug"),(il=new tl).vault=new tl;var e=il.configure;return il.configure=function(t){nl.debug("storage configure called");var r=rl({},e.call(il,t));Object.keys(r).forEach((function(e){"string"!=typeof r[e]&&(r[e]=rl(rl({},r[e]),{level:"private"}))})),nl.debug("storage vault configure called"),il.vault.configure(r)},il}();n.Amplify.register(ol);t.default=ol},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)}])}));
|
|
26
26
|
//# sourceMappingURL=aws-amplify-storage.min.js.map
|