parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c63)throw e.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!o.test(t))throw r.util.error(new Error,{code:"ValidationError",message:t+" is not hostname compatible."})})}module.exports={populateHostPrefix:t}; },{"../util":"Srp3","../core":"9hd5"}],"ko2o":[function(require,module,exports) { var e=require("../util"),t=require("../json/builder"),r=require("../json/parser"),s=require("./helpers").populateHostPrefix;function o(e){var r=e.httpRequest,o=e.service.api,a=o.targetPrefix+"."+o.operations[e.operation].name,n=o.jsonVersion||"1.0",i=o.operations[e.operation].input,p=new t;1===n&&(n="1.0"),r.body=p.build(e.params||{},i),r.headers["Content-Type"]="application/x-amz-json-"+n,r.headers["X-Amz-Target"]=a,s(e)}function a(t){var r={},s=t.httpResponse;if(r.code=s.headers["x-amzn-errortype"]||"UnknownError","string"==typeof r.code&&(r.code=r.code.split(":")[0]),s.body.length>0)try{var o=JSON.parse(s.body.toString());(o.__type||o.code)&&(r.code=(o.__type||o.code).split("#").pop()),"RequestEntityTooLarge"===r.code?r.message="Request body must be less than 1 MB":r.message=o.message||o.Message||null}catch(o){r.statusCode=s.statusCode,r.message=s.statusMessage}else r.statusCode=s.statusCode,r.message=s.statusCode.toString();t.error=e.error(new Error,r)}function n(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var s=e.request.service.api.operations[e.request.operation].output||{},o=new r;e.data=o.parse(t,s)}}module.exports={buildRequest:o,extractError:a,extractData:n}; },{"../util":"Srp3","../json/builder":"V8M7","../json/parser":"/gAi","./helpers":"SEae"}],"hEfR":[function(require,module,exports) { var e=require("../util");function n(){}function t(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function a(n,a,r,i){e.each(r.members,function(e,r){var u=a[e];if(null!=u){var l=t(r);o(l=n?n+"."+l:l,u,r,i)}})}function r(n,t,a,r){var i=1;e.each(t,function(e,t){var u=(a.flattened?".":".entry.")+i+++".",l=u+(a.key.name||"key"),c=u+(a.value.name||"value");o(n+l,e,a.key,r),o(n+c,t,a.value,r)})}function i(n,a,r,i){var u=r.member||{};0!==a.length?e.arrayEach(a,function(e,a){var l="."+(a+1);if("ec2"===r.api.protocol)l+="";else if(r.flattened){if(u.name){var c=n.split(".");c.pop(),c.push(t(u)),n=c.join(".")}}else l="."+(u.name?u.name:"member")+l;o(n+l,e,u,i)}):i.call(this,n,null)}function o(e,n,t,o){null!=n&&("structure"===t.type?a(e,n,t,o):"list"===t.type?i(e,n,t,o):"map"===t.type?r(e,n,t,o):o(e,t.toWireFormat(n).toString()))}n.prototype.serialize=function(e,n,t){a("",e,n,t)},module.exports=n; },{"../util":"Srp3"}],"pQS9":[function(require,module,exports) { var r=require("../util").memoizedProperty;function t(t,e,o,i){r(this,i(t),function(){return o(t,e)})}function e(r,e,o,i,n){i=i||String;for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(t.call(this,u,r[u],o,i),n&&n(u,r[u]))}module.exports=e; },{"../util":"Srp3"}],"/Ee+":[function(require,module,exports) { var t=require("./collection"),e=require("../util");function i(t,i,s){null!=s&&e.property.apply(this,arguments)}function s(t,i){t.constructor.prototype[i]||e.memoizedProperty.apply(this,arguments)}function r(t,e,s){e=e||{},i(this,"shape",t.shape),i(this,"api",e.api,!1),i(this,"type",t.type),i(this,"enum",t.enum),i(this,"min",t.min),i(this,"max",t.max),i(this,"pattern",t.pattern),i(this,"location",t.location||this.location||"body"),i(this,"name",this.name||t.xmlName||t.queryName||t.locationName||s),i(this,"isStreaming",t.streaming||this.isStreaming||!1),i(this,"requiresLength",t.requiresLength,!1),i(this,"isComposite",t.isComposite||!1),i(this,"isShape",!0,!1),i(this,"isQueryName",Boolean(t.queryName),!1),i(this,"isLocationName",Boolean(t.locationName),!1),i(this,"isIdempotent",!0===t.idempotencyToken),i(this,"isJsonValue",!0===t.jsonvalue),i(this,"isSensitive",!0===t.sensitive||t.prototype&&!0===t.prototype.sensitive),i(this,"isEventStream",Boolean(t.eventstream),!1),i(this,"isEvent",Boolean(t.event),!1),i(this,"isEventPayload",Boolean(t.eventpayload),!1),i(this,"isEventHeader",Boolean(t.eventheader),!1),i(this,"isTimestampFormatSet",Boolean(t.timestampFormat)||t.prototype&&!0===t.prototype.isTimestampFormatSet,!1),i(this,"endpointDiscoveryId",Boolean(t.endpointdiscoveryid),!1),i(this,"hostLabel",Boolean(t.hostLabel),!1),e.documentation&&(i(this,"documentation",t.documentation),i(this,"documentationUrl",t.documentationUrl)),t.xmlAttribute&&i(this,"isXmlAttribute",t.xmlAttribute||!1),i(this,"defaultValue",null),this.toWireFormat=function(t){return null==t?"":t},this.toType=function(t){return t}}function n(t){r.apply(this,arguments),i(this,"isComposite",!0),t.flattened&&i(this,"flattened",t.flattened||!1)}function a(e,a){var o=this,m=null,p=!this.isShape;n.apply(this,arguments),p&&(i(this,"defaultValue",function(){return{}}),i(this,"members",{}),i(this,"memberNames",[]),i(this,"required",[]),i(this,"isRequired",function(){return!1})),e.members&&(i(this,"members",new t(e.members,a,function(t,e){return r.create(e,a,t)})),s(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)}),e.event&&(s(this,"eventPayloadMemberName",function(){for(var t=o.members,e=o.memberNames,i=0,s=e.length;i-1?e||"":e,this.isJsonValue?JSON.parse(e):e&&"function"==typeof e.toString?e.toString():e},this.toWireFormat=function(t){return this.isJsonValue?JSON.stringify(t):t}}function h(){r.apply(this,arguments),this.toType=function(t){return null==t?null:parseFloat(t)},this.toWireFormat=this.toType}function l(){r.apply(this,arguments),this.toType=function(t){return null==t?null:parseInt(t,10)},this.toWireFormat=this.toType}function c(){r.apply(this,arguments),this.toType=function(t){var i=e.base64.decode(t);if(this.isSensitive&&e.isNode()&&"function"==typeof e.Buffer.alloc){var s=e.Buffer.alloc(i.length,i);i.fill(0),i=s}return i},this.toWireFormat=e.base64.encode}function f(){c.apply(this,arguments)}function y(){r.apply(this,arguments),this.toType=function(t){return"boolean"==typeof t?t:null==t?null:"true"===t}}r.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},r.types={structure:a,list:o,map:m,boolean:y,timestamp:p,float:h,integer:l,string:u,base64:f,binary:c},r.resolve=function(t,e){if(t.shape){var i=e.api.shapes[t.shape];if(!i)throw new Error("Cannot find shape reference: "+t.shape);return i}return null},r.create=function(t,e,i){if(t.isShape)return t;var s=r.resolve(t,e);if(s){var n=Object.keys(t);e.documentation||(n=n.filter(function(t){return!t.match(/documentation/)}));var a=function(){s.constructor.call(this,t,e,i)};return a.prototype=s,new a}t.type||(t.members?t.type="structure":t.member?t.type="list":t.key?t.type="map":t.type="string");var o=t.type;if(r.normalizedTypes[t.type]&&(t.type=r.normalizedTypes[t.type]),r.types[t.type])return new r.types[t.type](t,e,i);throw new Error("Unrecognized shape type: "+o)},r.shapes={StructureShape:a,ListShape:o,MapShape:m,StringShape:u,BooleanShape:y,Base64Shape:f},module.exports=r; },{"./collection":"pQS9","../util":"Srp3"}],"1eJR":[function(require,module,exports) { var e=require("../core"),r=require("../util"),t=require("../query/query_param_serializer"),s=require("../model/shape"),a=require("./helpers").populateHostPrefix;function o(e){var s=e.service.api.operations[e.operation],o=e.httpRequest;o.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",o.params={Version:e.service.api.apiVersion,Action:s.name},(new t).serialize(e.params,s.input,function(e,r){o.params[e]=r}),o.body=r.queryParamsToString(o.params),a(e)}function p(t){var s,a=t.httpResponse.body.toString();if(a.match("=0?"&":"?";var p=[];e.arrayEach(Object.keys(o).sort(),function(t){Array.isArray(o[t])||(o[t]=[o[t]]);for(var a=0;a0){var c=(a=new e.XML.Parser).parse(n.toString(),i);t.update(s.data,c)}}module.exports={buildRequest:a,extractError:o,extractData:n}; },{"../core":"9hd5","../util":"Srp3","./rest":"xf3G"}],"jWDF":[function(require,module,exports) { function e(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}module.exports={escapeAttribute:e}; },{}],"67Ly":[function(require,module,exports) { var t=require("./escape-attribute").escapeAttribute;function e(t,e){void 0===e&&(e=[]),this.name=t,this.children=e,this.attributes={}}e.prototype.addAttribute=function(t,e){return this.attributes[t]=e,this},e.prototype.addChildNode=function(t){return this.children.push(t),this},e.prototype.removeAttribute=function(t){return delete this.attributes[t],this},e.prototype.toString=function(){for(var e=Boolean(this.children.length),i="<"+this.name,r=this.attributes,n=0,o=Object.keys(r);n"+this.children.map(function(t){return t.toString()}).join("")+"":"/>")},module.exports={XmlNode:e}; },{"./escape-attribute":"jWDF"}],"f0sP":[function(require,module,exports) { function e(e){return e.replace(/&/g,"&").replace(//g,">")}module.exports={escapeElement:e}; },{}],"NGBk":[function(require,module,exports) { var e=require("./escape-element").escapeElement;function t(e){this.value=e}t.prototype.toString=function(){return e(""+this.value)},module.exports={XmlText:t}; },{"./escape-element":"f0sP"}],"uC/K":[function(require,module,exports) { var e=require("../util"),a=require("./xml-node").XmlNode,r=require("./xml-text").XmlText;function n(){}function t(e,a,r){switch(r.type){case"structure":return i(e,a,r);case"map":return m(e,a,r);case"list":return d(e,a,r);default:return l(e,a,r)}}function i(r,n,i){e.arrayEach(i.memberNames,function(e){var m=i.members[e];if("body"===m.location){var d=n[e],l=m.name;if(null!=d)if(m.isXmlAttribute)r.addAttribute(l,d);else if(m.flattened)t(r,d,m);else{var u=new a(l);r.addChildNode(u),o(u,m),t(u,d,m)}}})}function m(r,n,i){var m=i.key.name||"key",d=i.value.name||"value";e.each(n,function(e,n){var l=new a(i.flattened?i.name:"entry");r.addChildNode(l);var o=new a(m),u=new a(d);l.addChildNode(o),l.addChildNode(u),t(o,e,i.key),t(u,n,i.value)})}function d(r,n,i){i.flattened?e.arrayEach(n,function(e){var n=i.member.name||i.name,m=new a(n);r.addChildNode(m),t(m,e,i.member)}):e.arrayEach(n,function(e){var n=i.member.name||"member",m=new a(n);r.addChildNode(m),t(m,e,i.member)})}function l(e,a,n){e.addChildNode(new r(n.toWireFormat(a)))}function o(e,a,r){var n,t="xmlns";a.xmlNamespaceUri?(n=a.xmlNamespaceUri,a.xmlNamespacePrefix&&(t+=":"+a.xmlNamespacePrefix)):r&&a.api.xmlNamespaceUri&&(n=a.api.xmlNamespaceUri),n&&e.addAttribute(t,n)}n.prototype.toXML=function(e,r,n,i){var m=new a(n);return o(m,r,!0),t(m,e,r),m.children.length>0||i?m.toString():""},module.exports=n; },{"../util":"Srp3","./xml-node":"67Ly","./xml-text":"NGBk"}],"TZKf":[function(require,module,exports) { var t=require("./shape"),e=require("../util"),r=e.property,n=e.memoizedProperty;function i(e,i,o){var s=this;o=o||{},r(this,"name",i.name||e),r(this,"api",o.api,!1),i.http=i.http||{},r(this,"endpoint",i.endpoint),r(this,"httpMethod",i.http.method||"POST"),r(this,"httpPath",i.http.requestUri||"/"),r(this,"authtype",i.authtype||""),r(this,"endpointDiscoveryRequired",i.endpointdiscovery?i.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),n(this,"input",function(){return i.input?t.create(i.input,o):new t.create({type:"structure"},o)}),n(this,"output",function(){return i.output?t.create(i.output,o):new t.create({type:"structure"},o)}),n(this,"errors",function(){var e=[];if(!i.errors)return null;for(var r=0;r-1&&n.splice(i,1)}return this},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this},emit:function(t,e,n){n||(n=function(){});var r=this.listeners(t),i=r.length;return this.callListeners(r,e,n),i>0},callListeners:function(e,n,r,i){var s=this,o=i||null;function u(i){if(i&&(o=t.util.error(o||new Error,i),s._haltHandlersOnError))return r.call(s,o);s.callListeners(e,n,r,o)}for(;e.length>0;){var a=e.shift();if(a._isAsync)return void a.apply(s,n.concat([u]));try{a.apply(s,n)}catch(c){o=t.util.error(o||new Error,c)}if(o&&s._haltHandlersOnError)return void r.call(s,o)}r.call(s,o)},addListeners:function(e){var n=this;return e._events&&(e=e._events),t.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),t.util.arrayEach(r,function(t){n.on(e,t)})}),n},addNamedListener:function(t,e,n,r){return this[t]=n,this.addListener(e,n,r),this},addNamedAsyncListener:function(t,e,n,r){return n._isAsync=!0,this.addNamedListener(t,e,n,r)},addNamedListeners:function(t){var e=this;return t(function(){e.addNamedListener.apply(e,arguments)},function(){e.addNamedAsyncListener.apply(e,arguments)}),this}}),t.SequentialExecutor.prototype.addListener=t.SequentialExecutor.prototype.on,module.exports=t.SequentialExecutor; },{"./core":"9hd5"}],"2ZWc":[function(require,module,exports) { module.exports={rules:{"*/*":{endpoint:"{service}.{region}.amazonaws.com"},"cn-*/*":{endpoint:"{service}.{region}.amazonaws.com.cn"},"*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/iam":"globalSSL","*/sts":"globalSSL","*/importexport":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2",globalEndpoint:!0},"*/route53":{endpoint:"https://{service}.amazonaws.com",signatureVersion:"v3https",globalEndpoint:!0},"*/waf":"globalSSL","us-gov-*/iam":"globalGovCloud","us-gov-*/sts":{endpoint:"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{endpoint:"{service}.amazonaws.com",signatureVersion:"s3"},"us-east-1/sdb":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2"},"*/sdb":{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"v2"}},patterns:{globalSSL:{endpoint:"https://{service}.amazonaws.com",globalEndpoint:!0},globalGovCloud:{endpoint:"{service}.us-gov.amazonaws.com"},s3signature:{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"s3"}}}; },{}],"ABti":[function(require,module,exports) { var n=require("./util"),i=require("./region_config_data.json");function o(n){if(!n)return null;var i=n.split("-");return i.length<3?null:i.slice(0,i.length-2).join("-")+"-*"}function r(n){var i=n.config.region,r=o(i),e=n.api.endpointPrefix;return[[i,e],[r,e],[i,"*"],[r,"*"],["*",e],["*","*"]].map(function(n){return n[0]&&n[1]?n.join("/"):null})}function e(i,o){n.each(o,function(n,o){"globalEndpoint"!==n&&(void 0!==i.config[n]&&null!==i.config[n]||(i.config[n]=o))})}function t(o){for(var t=r(o),a=0;a1)for(var n=1;n=0;n--)if("*"!==i[n][i[n].length-1]&&(r=i[n]),i[n].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,i,r){if("function"==typeof i&&(r=i,i=null),i=i||{},this.config.params){var n=this.api.operations[e];n&&(i=t.util.copy(i),t.util.each(this.config.params,function(e,t){n.input.members[e]&&(void 0!==i[e]&&null!==i[e]||(i[e]=t))}))}var s=new t.Request(this,e,i);return this.addAllRequestListeners(s),this.attachMonitoringEmitter(s),r&&s.send(r),s},makeUnauthenticatedRequest:function(e,t,i){"function"==typeof t&&(i=t,t={});var r=this.makeRequest(e,t).toUnauthenticated();return i?r.send(i):r},waitFor:function(e,i,r){return new t.ResourceWaiter(this,e).wait(i,r)},addAllRequestListeners:function(e){for(var i=[t.events,t.EventListeners.Core,this.serviceInterface(),t.EventListeners.CorePost],r=0;r299?(n.code&&(i.FinalAwsException=n.code),n.message&&(i.FinalAwsExceptionMessage=n.message)):((n.code||n.name)&&(i.FinalSdkException=n.code||n.name),n.message&&(i.FinalSdkExceptionMessage=n.message))}return i},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],i={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},r=e.response;return r.httpResponse.statusCode&&(i.HttpStatusCode=r.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(i.AccessKey=e.service.config.credentials.accessKeyId),r.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(i.SessionToken=e.httpRequest.headers["x-amz-security-token"]),r.httpResponse.headers["x-amzn-requestid"]&&(i.XAmznRequestId=r.httpResponse.headers["x-amzn-requestid"]),r.httpResponse.headers["x-amz-request-id"]&&(i.XAmzRequestId=r.httpResponse.headers["x-amz-request-id"]),r.httpResponse.headers["x-amz-id-2"]&&(i.XAmzId2=r.httpResponse.headers["x-amz-id-2"]),i):i},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),i=e.response,r=i.error;return i.httpResponse.statusCode>299?(r.code&&(t.AwsException=r.code),r.message&&(t.AwsExceptionMessage=r.message)):((r.code||r.name)&&(t.SdkException=r.code||r.name),r.message&&(t.SdkExceptionMessage=r.message)),t},attachMonitoringEmitter:function(e){var i,r,n,s,o,a,c=0,u=this;e.on("validate",function(){s=t.util.realClock.now(),a=Date.now()},!0),e.on("sign",function(){r=t.util.realClock.now(),i=Date.now(),o=e.httpRequest.region,c++},!0),e.on("validateResponse",function(){n=Math.round(t.util.realClock.now()-r)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var t=u.apiAttemptEvent(e);t.Timestamp=i,t.AttemptLatency=n>=0?n:0,t.Region=o,u.emit("apiCallAttempt",[t])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var s=u.attemptFailEvent(e);s.Timestamp=i,n=n||Math.round(t.util.realClock.now()-r),s.AttemptLatency=n>=0?n:0,s.Region=o,u.emit("apiCallAttempt",[s])}),e.addNamedListener("API_CALL","complete",function(){var i=u.apiCallEvent(e);if(i.AttemptCount=c,!(i.AttemptCount<=0)){i.Timestamp=a;var r=Math.round(t.util.realClock.now()-s);i.Latency=r>=0?r:0;var n=e.response;"number"==typeof n.retryCount&&"number"==typeof n.maxRetries&&n.retryCount>=n.maxRetries&&(i.MaxRetriesExceeded=1),u.emit("apiCall",[i])}})},setupRequestListeners:function(e){},getSignerClass:function(e){var i,r=null,n="";e&&(n=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:"");return i=this.config.signatureVersion?this.config.signatureVersion:"v4"===n||"v4-unsigned-body"===n?"v4":this.api.signatureVersion,t.Signers.RequestSigner.getVersion(i)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return t.EventListeners.Query;case"json":return t.EventListeners.Json;case"rest-json":return t.EventListeners.RestJson;case"rest-xml":return t.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e){return t.util.calculateRetryDelay(e,this.config.retryDelayOptions)},retryableError:function(e){return!!this.timeoutError(e)||(!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||e.statusCode>=500)))},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e4},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new t.Endpoint(e,this.config)},paginationConfig:function(e,i){var r=this.api.operations[e].paginator;if(!r){if(i){var n=new Error;throw t.util.error(n,"No pagination configuration for "+e)}return null}return r}}),t.util.update(t.Service,{defineMethods:function(e){t.util.each(e.prototype.api.operations,function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,i){return this.makeUnauthenticatedRequest(t,e,i)}:e.prototype[t]=function(e,i){return this.makeRequest(t,e,i)})})},defineService:function(e,i,r){t.Service._serviceMap[e]=!0,Array.isArray(i)||(r=i,i=[]);var s=n(t.Service,r||{});if("string"==typeof e){t.Service.addVersions(s,i);var o=s.serviceIdentifier||e;s.serviceIdentifier=o}else s.prototype.api=e,t.Service.defineMethods(s);if(t.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&t.util.clientSideMonitoring){var a=t.util.clientSideMonitoring.Publisher,c=(0,t.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(c),c.enabled&&(t.Service._clientSideMonitoring=!0)}return t.SequentialExecutor.call(s.prototype),t.Service.addDefaultMonitoringListeners(s.prototype),s},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var i=0;ithis.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var s=this;this.needsRefresh()?this.refresh(function(t){t||(s.expired=!1),e&&e(t)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(s,t){var i=this;1===i.refreshCallbacks.push(s)&&i.load(function(s){e.util.arrayEach(i.refreshCallbacks,function(i){t?i(s):e.util.defer(function(){i(s)})}),i.refreshCallbacks.length=0})},load:function(e){e()}}),e.Credentials.addPromisesToClass=function(s){this.prototype.getPromise=e.util.promisifyMethod("get",s),this.prototype.refreshPromise=e.util.promisifyMethod("refresh",s)},e.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},e.util.addPromises(e.Credentials); },{"./core":"9hd5"}],"Q0mg":[function(require,module,exports) { var e=require("../core");e.CredentialProviderChain=e.util.inherit(e.Credentials,{constructor:function(r){this.providers=r||e.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(r){var i=this;if(0===i.providers.length)return r(new Error("No providers")),i;if(1===i.resolveCallbacks.push(r)){var o=0,t=i.providers.slice(0);!function r(l,s){if(!l&&s||o===t.length)return e.util.arrayEach(i.resolveCallbacks,function(e){e(l,s)}),void(i.resolveCallbacks.length=0);var n=t[o++];(s="function"==typeof n?n.call():n).get?s.get(function(e){r(e,e?null:s)}):r(null,s)}()}return i}}),e.CredentialProviderChain.defaultProviders=[],e.CredentialProviderChain.addPromisesToClass=function(r){this.prototype.resolvePromise=e.util.promisifyMethod("resolve",r)},e.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},e.util.addPromises(e.CredentialProviderChain); },{"../core":"9hd5"}],"EvfU":[function(require,module,exports) { var e,t=require("./core");require("./credentials"),require("./credentials/credential_provider_chain"),t.Config=t.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),t.util.each.call(this,this.keys,function(t,i){this.set(t,e[t],i)})},getCredentials:function(e){var i,n=this;function r(t){e(t,t?null:n.credentials)}function s(e,i){return new t.util.error(i||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}n.credentials?"function"==typeof n.credentials.get?n.credentials.get(function(e){e&&(e=s("Could not load credentials from "+n.credentials.constructor.name,e)),r(e)}):(i=null,n.credentials.accessKeyId&&n.credentials.secretAccessKey||(i=s("Missing credentials")),r(i)):n.credentialProvider?n.credentialProvider.resolve(function(e,t){e&&(e=s("Could not load credentials from any providers",e)),n.credentials=t,r(e)}):r(s("No credentials to load"))},update:function(e,i){i=i||!1,e=this.extractCredentials(e),t.util.each.call(this,e,function(e,n){(i||Object.prototype.hasOwnProperty.call(this.keys,e)||t.Service.hasService(e))&&this.set(e,n)})},loadFromPath:function(e){this.clear();var i=JSON.parse(t.util.readFileSync(e)),n=new t.FileSystemCredentials(e),r=new t.CredentialProviderChain;return r.providers.unshift(n),r.resolve(function(e,t){if(e)throw e;i.credentials=t}),this.constructor(i),this},clear:function(){t.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,i,n){void 0===i?(void 0===n&&(n=this.keys[e]),this[e]="function"==typeof n?n.call(this):n):"httpOptions"===e&&this[e]?this[e]=t.util.merge(this[e],i):this[e]=i},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:!1,endpointCacheSize:1e3,hostPrefixEnabled:!0},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=t.util.copy(e)).credentials=new t.Credentials(e)),e},setPromisesDependency:function(i){e=i,null===i&&"function"==typeof Promise&&(e=Promise);var n=[t.Request,t.Credentials,t.CredentialProviderChain];t.S3&&t.S3.ManagedUpload&&n.push(t.S3.ManagedUpload),t.util.addPromises(n,e)},getPromisesDependency:function(){return e}}),t.config=new t.Config; },{"./core":"9hd5","./credentials":"Dp8z","./credentials/credential_provider_chain":"Q0mg"}],"y+hC":[function(require,module,exports) { var t=require("./core"),e=t.util.inherit;t.Endpoint=e({constructor:function(e,s){if(t.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return t.util.copy(e);e.match(/^http/)||(e=((s&&void 0!==s.sslEnabled?s.sslEnabled:t.config.sslEnabled)?"https":"http")+"://"+e);t.util.update(this,t.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),t.HttpRequest=e({constructor:function(e,s){e=new t.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=s,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=t.util.userAgent()},getUserAgentHeaderName:function(){return(t.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(t){"string"==typeof t&&t&&(this._userAgent+=" "+t),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=t.util.queryStringParse(e),t.util.queryParamsToString(e)):""},updateEndpoint:function(e){var s=new t.Endpoint(e);this.endpoint=s,this.path=s.path||"/"}}),t.HttpResponse=e({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),t.HttpClient=e({}),t.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}; },{"./core":"9hd5"}],"3fu9":[function(require,module,exports) { var process = require("process"); var e=require("process"),n=require("./core"),i=require("./util"),r=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function t(e){var n=e.service,i=n.api||{},r=(i.operations,{});return n.config.region&&(r.region=n.config.region),i.serviceId&&(r.serviceId=i.serviceId),n.config.credentials.accessKeyId&&(r.accessKeyId=n.config.credentials.accessKeyId),r}function o(e,n,r){r&&null!=n&&"structure"===r.type&&r.required&&r.required.length>0&&i.arrayEach(r.required,function(i){var t=r.members[i];if(!0===t.endpointDiscoveryId){var a=t.isLocationName?t.name:i;e[a]=String(n[i])}else o(e,n[i],t)})}function a(e,n){var i={};return o(i,e.params,n),i}function s(e){var r=e.service,o=r.api,s=o.operations?o.operations[e.operation]:void 0,d=a(e,s?s.input:void 0),p=t(e);Object.keys(d).length>0&&(p=i.update(p,d),s&&(p.operation=s.name));var u=n.endpointCache.get(p);if(!u||1!==u.length||""!==u[0].Address)if(u&&u.length>0)e.httpRequest.updateEndpoint(u[0].Address);else{var v=r.makeRequest(o.endpointOperation,{Operation:s.name,Identifiers:d});c(v),v.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),v.removeListener("retry",n.EventListeners.Core.RETRY_CHECK),n.endpointCache.put(p,[{Address:"",CachePeriodInMinutes:1}]),v.send(function(e,i){i&&i.Endpoints?n.endpointCache.put(p,i.Endpoints):e&&n.endpointCache.put(p,[{Address:"",CachePeriodInMinutes:1}])})}}var d={};function p(e,r){var o=e.service,s=o.api,p=s.operations?s.operations[e.operation]:void 0,u=p?p.input:void 0,v=a(e,u),l=t(e);Object.keys(v).length>0&&(l=i.update(l,v),p&&(l.operation=p.name));var f=n.EndpointCache.getKeyString(l),E=n.endpointCache.get(f);if(E&&1===E.length&&""===E[0].Address)return d[f]||(d[f]=[]),void d[f].push({request:e,callback:r});if(E&&E.length>0)e.httpRequest.updateEndpoint(E[0].Address),r();else{var g=o.makeRequest(s.endpointOperation,{Operation:p.name,Identifiers:v});g.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),c(g),n.endpointCache.put(f,[{Address:"",CachePeriodInMinutes:60}]),g.send(function(t,o){if(t){var a={code:"EndpointDiscoveryException",message:"Request cannot be fulfilled without specifying an endpoint",retryable:!1};if(e.response.error=i.error(t,a),n.endpointCache.remove(l),d[f]){var s=d[f];i.arrayEach(s,function(e){e.request.response.error=i.error(t,a),e.callback()}),delete d[f]}}else if(o&&(n.endpointCache.put(f,o.Endpoints),e.httpRequest.updateEndpoint(o.Endpoints[0].Address),d[f])){s=d[f];i.arrayEach(s,function(e){e.request.httpRequest.updateEndpoint(o.Endpoints[0].Address),e.callback()}),delete d[f]}r()})}}function c(e){var n=e.service.api.apiVersion;n&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=n)}function u(e){var r=e.error,o=e.httpResponse;if(r&&("InvalidEndpointException"===r.code||421===o.statusCode)){var s=e.request,d=s.service.api.operations||{},p=a(s,d[s.operation]?d[s.operation].input:void 0),c=t(s);Object.keys(p).length>0&&(c=i.update(c,p),d[s.operation]&&(c.operation=d[s.operation].name)),n.endpointCache.remove(c)}}function v(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw i.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var r=n.config[e.serviceIdentifier]||{};return Boolean(n.config.endpoint||r.endpoint||e._originalConfig&&e._originalConfig.endpoint)}function l(e){return["false","0"].indexOf(e)>=0}function f(t){if(!0===(t.service||{}).config.endpointDiscoveryEnabled)return!0;if(i.isBrowser())return!1;for(var o=0;o=u)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return e}}),c=o[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(t)?r.showHidden=t:t&&exports._extend(r,t),j(r.showHidden)&&(r.showHidden=!1),j(r.depth)&&(r.depth=2),j(r.colors)&&(r.colors=!1),j(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),p(r,e,r.depth)}function u(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function c(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function p(e,t,r){if(e.customInspect&&t&&P(t.inspect)&&t.inspect!==exports.inspect&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return v(n)||(n=p(e,n,r)),n}var o=l(e,t);if(o)return o;var i=Object.keys(t),u=c(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),E(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(t);if(0===i.length){if(P(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(z(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return f(t)}var b,h="",m=!1,x=["{","}"];(d(t)&&(m=!0,x=["[","]"]),P(t))&&(h=" [Function"+(t.name?": "+t.name:"")+"]");return w(t)&&(h=" "+RegExp.prototype.toString.call(t)),z(t)&&(h=" "+Date.prototype.toUTCString.call(t)),E(t)&&(h=" "+f(t)),0!==i.length||m&&0!=t.length?r<0?w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),b=m?a(e,t,r,u,i):i.map(function(n){return y(e,t,r,u,n,m)}),e.seen.pop(),g(b,h,x)):x[0]+h+x[1]}function l(e,t){if(j(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return x(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function a(e,t,r,n,o){for(var i=[],u=0,s=t.length;u-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),j(u)){if(i&&o.match(/^\d+$/))return s;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+s}function g(e,t,r){return e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return null==e}function x(e){return"number"==typeof e}function v(e){return"string"==typeof e}function O(e){return"symbol"==typeof e}function j(e){return void 0===e}function w(e){return S(e)&&"[object RegExp]"===T(e)}function S(e){return"object"==typeof e&&null!==e}function z(e){return S(e)&&"[object Date]"===T(e)}function E(e){return S(e)&&("[object Error]"===T(e)||e instanceof Error)}function P(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function T(e){return Object.prototype.toString.call(e)}function N(e){return e<10?"0"+e.toString(10):e.toString(10)}exports.debuglog=function(t){if(j(n)&&(n=""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(n)){var r=e.pid;o[t]=function(){var e=exports.format.apply(exports,arguments);console.error("%s %d: %s",t,r,e)}}else o[t]=function(){};return o[t]},exports.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=d,exports.isBoolean=b,exports.isNull=h,exports.isNullOrUndefined=m,exports.isNumber=x,exports.isString=v,exports.isSymbol=O,exports.isUndefined=j,exports.isRegExp=w,exports.isObject=S,exports.isDate=z,exports.isError=E,exports.isFunction=P,exports.isPrimitive=D,exports.isBuffer=require("./support/isBuffer");var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[N(e.getHours()),N(e.getMinutes()),N(e.getSeconds())].join(":");return[e.getDate(),F[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}exports.log=function(){console.log("%s - %s",k(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var J="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function H(r){if("function"!=typeof r)throw new TypeError('The "original" argument must be of type Function');function n(){for(var t=[],n=0;n=0)return t.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",r();e.util.computeSha256(n,function(e,s){e?r(e):(t.httpRequest.headers["X-Amz-Content-Sha256"]=s,r())})}else r()}}),t("SET_CONTENT_LENGTH","afterBuild",function(t){var r=s(t),i=e.util.getRequestPayloadShape(t);if(void 0===t.httpRequest.headers["Content-Length"])try{var n=e.util.string.byteLength(t.httpRequest.body);t.httpRequest.headers["Content-Length"]=n}catch(o){if(i&&i.isStreaming){if(i.requiresLength)throw o;if(r.indexOf("unsigned-body")>=0)return void(t.httpRequest.headers["Transfer-Encoding"]="chunked");throw o}throw o}}),t("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),t("RESTART","restart",function(){var t=this.response.error;t&&t.retryable&&(this.httpRequest=new e.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],function(e){e?r(e):n()}):n()}),t("HTTP_HEADERS","httpHeaders",function(t,r,s,i){s.httpResponse.statusCode=t,s.httpResponse.statusMessage=i,s.httpResponse.headers=r,s.httpResponse.body=new e.util.Buffer(""),s.httpResponse.buffers=[],s.httpResponse.numBytes=0;var n=r.date||r.Date,o=s.request.service;if(n){var a=Date.parse(n);o.config.correctClockSkew&&o.isClockSkewed(a)&&o.applyClockOffset(a)}}),t("HTTP_DATA","httpData",function(t,r){if(t){if(e.util.isNode()){r.httpResponse.numBytes+=t.length;var s=r.httpResponse.headers["content-length"],i={loaded:r.httpResponse.numBytes,total:s};r.request.emit("httpDownloadProgress",[i,r])}r.httpResponse.buffers.push(new e.util.Buffer(t))}}),t("HTTP_DONE","httpDone",function(t){if(t.httpResponse.buffers&&t.httpResponse.buffers.length>0){var r=e.util.buffer.concat(t.httpResponse.buffers);t.httpResponse.body=r}delete t.httpResponse.numBytes,delete t.httpResponse.buffers}),t("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),t("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),t("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),t("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)}),t("REDIRECT","retry",function(t){t.error&&t.error.statusCode>=300&&t.error.statusCode<400&&t.httpResponse.headers.location&&(this.httpRequest.endpoint=new e.Endpoint(t.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,t.error.redirect=!0,t.error.retryable=!0)}),t("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount":!0,"=":!0,"!":!0},v={" ":!0,"\t":!0,"\n":!0};function y(e){return e>="0"&&e<="9"||"-"===e}function g(){}g.prototype={tokenize:function(e){var t,r,n,i,s=[];for(this._current=0;this._current="a"&&i<="z"||i>="A"&&i<="Z"||"_"===i)t=this._current,r=this._consumeUnquotedIdentifier(e),s.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==f[e[this._current]])s.push({type:f[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(y(e[this._current]))n=this._consumeNumber(e),s.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),s.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),s.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),s.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var a=this._consumeLiteral(e);s.push({type:"Literal",value:a,start:t})}else if(void 0!==d[e[this._current]])s.push(this._consumeOperator(e));else if(void 0!==v[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,s.push({type:"And",value:"&&",start:t})):s.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var u=new Error("Unknown character:"+e[this._current]);throw u.name="LexerError",u}t=this._current,this._current++,"|"===e[this._current]?(this._current++,s.push({type:"Or",value:"||",start:t})):s.push({type:"Pipe",value:"|",start:t})}return s},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(r,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(t){return!1}}};var m={};function k(){}function b(e){this.runtime=e}function x(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[_]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[o,c]},{types:[u]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[o]},{types:[o]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[o,c,h]}]},map:{_func:this._functionMap,_signature:[{types:[l]},{types:[c]}]},max:{_func:this._functionMax,_signature:[{types:[_,p]}]},merge:{_func:this._functionMerge,_signature:[{types:[h],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[c]},{types:[l]}]},sum:{_func:this._functionSum,_signature:[{types:[_]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[o]},{types:[o]}]},min:{_func:this._functionMin,_signature:[{types:[_,p]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[c]},{types:[l]}]},type:{_func:this._functionType,_signature:[{types:[u]}]},keys:{_func:this._functionKeys,_signature:[{types:[h]}]},values:{_func:this._functionValues,_signature:[{types:[h]}]},sort:{_func:this._functionSort,_signature:[{types:[p,_]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[c]},{types:[l]}]},join:{_func:this._functionJoin,_signature:[{types:[o]},{types:[p]}]},reverse:{_func:this._functionReverse,_signature:[{types:[o,c]}]},to_array:{_func:this._functionToArray,_signature:[{types:[u]}]},to_string:{_func:this._functionToString,_signature:[{types:[u]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[u]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[u],variadic:!0}]}}}m.EOF=0,m.UnquotedIdentifier=0,m.QuotedIdentifier=0,m.Rbracket=0,m.Rparen=0,m.Comma=0,m.Rbrace=0,m.Number=0,m.Current=0,m.Expref=0,m.Pipe=1,m.Or=2,m.And=3,m.EQ=5,m.GT=5,m.LT=5,m.GTE=5,m.LTE=5,m.NE=5,m.Flatten=9,m.Star=20,m.Filter=21,m.Dot=40,m.Not=45,m.Lbrace=50,m.Lbracket=55,m.Lparen=60,k.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new g).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(m[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],i=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),i.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},b.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,s){var a,u,o,c,h,l,_,p,f;switch(e.type){case"Field":return null===s?null:r(s)?void 0===(l=s[e.name])?null:l:null;case"Subexpression":for(o=this.visit(e.children[0],s),f=1;f0)for(f=g;fm;f+=k)o.push(s[f]);return o;case"Projection":var b=this.visit(e.children[0],s);if(!t(b))return null;for(p=[],f=0;fh;break;case"GTE":o=c>=h;break;case"LT":o=c=e&&(t=r<0?e-1:e),t}},x.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n,i,s,a;if(r[r.length-1].variadic){if(t.length=0;n--)r+=t[n];return r}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],i=e[1],s=0;s0){if(this._getTypeName(e[0][0])===a)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n0){if(this._getTypeName(e[0][0])===a)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;nu?1:au&&(u=r,t=i[c]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],s=this.createKeyFunction(n,[a,o]),u=1/0,c=0;c=0){u=!0;var h=0}var l=function(){u&&h!==a?s.emit("error",t.util.error(new Error("Stream content length mismatch. Received "+h+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===t.HttpClient.streamsApiVersion?s.end():s.emit("end")},c=o.httpResponse.createUnbufferedStream();if(2===t.HttpClient.streamsApiVersion)if(u){var d=new r.PassThrough;d._write=function(e){return e&&e.length&&(h+=e.length),r.PassThrough.prototype._write.apply(this,arguments)},d.on("end",l),s.on("error",function(e){u=!1,c.unpipe(d),d.emit("end"),d.end()}),c.pipe(d).pipe(s,{end:!1})}else c.pipe(s);else u&&c.on("data",function(e){e&&e.length&&(h+=e.length)}),c.on("data",function(e){s.emit("data",e)}),c.on("end",l);c.on("error",function(e){u=!1,s.emit("error",e)})}}),s},emitEvent:function(e,r,n){"function"==typeof r&&(n=r,r=null),n||(n=function(){}),r||(r=this.eventParameters(e,this.response)),t.SequentialExecutor.prototype.emit.call(this,e,r,function(e){e&&(this.response.error=e),n.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,r){return r||"function"!=typeof e||(r=e,e=null),(new t.Signers.Presign).sign(this.toGet(),e,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",t.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",t.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),t.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(e,r){t.on("complete",function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))}),t.runTo()})}},t.Request.deletePromisesFromClass=function(){delete this.prototype.promise},t.util.addPromises(t.Request),t.util.mixin(t.Request,t.SequentialExecutor); },{"./core":"9hd5","./state_machine":"EBbK","jmespath":"Bwjj","process":"R3IB"}],"dySX":[function(require,module,exports) { var e=require("./core"),t=e.util.inherit,s=require("jmespath");e.Response=t({constructor:function(t){this.request=t,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new e.HttpResponse,t&&(this.maxRetries=t.service.numRetries(),this.maxRedirects=t.service.config.maxRedirects)},nextPage:function(t){var s,r=this.request.service,n=this.request.operation;try{s=r.paginationConfig(n,!0)}catch(h){this.error=h}if(!this.hasNextPage()){if(t)t(this.error,null);else if(this.error)throw this.error;return null}var i=e.util.copy(this.request.params);if(this.nextPageTokens){var o=s.inputToken;"string"==typeof o&&(o=[o]);for(var a=0;ac&&delete r[t.shift()]),l},emptyCache:function(){r={},t=[]}}; },{"../core":"9hd5"}],"xoWJ":[function(require,module,exports) { var e=require("../core"),t=require("./v4_credentials"),s=e.util.inherit,i="presigned-expires";e.Signers.V4=s(e.Signers.RequestSigner,{constructor:function(t,s,i){e.Signers.RequestSigner.call(this,t),this.serviceName=s,i=i||{},this.signatureCache="boolean"!=typeof i.signatureCache||i.signatureCache,this.operation=i.operation,this.signatureVersion=i.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(t,s){var i=e.util.date.iso8601(s).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(t,i):this.addHeaders(t,i),this.request.headers.Authorization=this.authorization(t,i)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(t,s){var r=this.credentialString(s),n={"X-Amz-Date":s,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":t.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers[i],"X-Amz-SignedHeaders":this.signedHeaders()};t.sessionToken&&(n["X-Amz-Security-Token"]=t.sessionToken),this.request.headers["Content-Type"]&&(n["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(n["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(n["Cache-Control"]=this.request.headers["Cache-Control"]),e.util.each.call(this,this.request.headers,function(e,t){if(e!==i&&this.isSignableHeader(e)){var s=e.toLowerCase();0===s.indexOf("x-amz-meta-")?n[s]=t:0===s.indexOf("x-amz-")&&(n[e]=t)}});var a=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=a+e.util.queryParamsToString(n)},authorization:function(e,t){var s=[],i=this.credentialString(t);return s.push(this.algorithm+" Credential="+e.accessKeyId+"/"+i),s.push("SignedHeaders="+this.signedHeaders()),s.push("Signature="+this.signature(e,t)),s.join(", ")},signature:function(s,i){var r=t.getSigningKey(s,i.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return e.util.crypto.hmac(r,this.stringToSign(i),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var t=[],s=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(s=e.util.uriEscapePath(s)),t.push(this.request.method),t.push(s),t.push(this.request.search()),t.push(this.canonicalHeaders()+"\n"),t.push(this.signedHeaders()),t.push(this.hexEncodedBodyHash()),t.join("\n")},canonicalHeaders:function(){var t=[];e.util.each.call(this,this.request.headers,function(e,s){t.push([e,s])}),t.sort(function(e,t){return e[0].toLowerCase()604800){throw e.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1})}t.httpRequest.headers[r]=i}else{if(s!==e.Signers.S3)throw e.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var n=t.service?t.service.getSkewCorrectedDate():e.util.date.getDate();t.httpRequest.headers[r]=parseInt(e.util.date.unixTimestamp(n)+i,10).toString()}}function s(t){var i=t.httpRequest.endpoint,s=e.util.urlParse(t.httpRequest.path),n={};s.search&&(n=e.util.queryStringParse(s.search.substr(1)));var a=t.httpRequest.headers.Authorization.split(" ");if("AWS"===a[0])a=a[1].split(":"),n.AWSAccessKeyId=a[0],n.Signature=a[1],e.util.each(t.httpRequest.headers,function(e,t){e===r&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete n[e],e=e.toLowerCase()),n[e]=t}),delete t.httpRequest.headers[r],delete n.Authorization,delete n.Host;else if("AWS4-HMAC-SHA256"===a[0]){a.shift();var o=a.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Amz-Signature"]=o,delete n.Expires}i.pathname=s.pathname,i.search=e.util.queryParamsToString(n)}e.Signers.Presign=t({sign:function(t,n,a){if(t.httpRequest.headers[r]=n||3600,t.on("build",i),t.on("sign",s),t.removeListener("afterBuild",e.EventListeners.Core.SET_CONTENT_LENGTH),t.removeListener("afterBuild",e.EventListeners.Core.COMPUTE_SHA256),t.emit("beforePresign",[t]),!a){if(t.build(),t.response.error)throw t.response.error;return e.util.urlFormat(t.httpRequest.endpoint)}t.build(function(){this.response.error?a(this.response.error):a(null,e.util.urlFormat(t.httpRequest.endpoint))})}}),module.exports=e.Signers.Presign; },{"../core":"9hd5"}],"kGO1":[function(require,module,exports) { var e=require("../core"),r=e.util.inherit;e.Signers.RequestSigner=r({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),e.Signers.RequestSigner.getVersion=function(r){switch(r){case"v2":return e.Signers.V2;case"v3":return e.Signers.V3;case"s3v4":case"v4":return e.Signers.V4;case"s3":return e.Signers.S3;case"v3https":return e.Signers.V3Https}throw new Error("Unknown signing version "+r)},require("./v2"),require("./v3"),require("./v3https"),require("./v4"),require("./s3"),require("./presign"); },{"../core":"9hd5","./v2":"o51L","./v3":"nNK6","./v3https":"lAFA","./v4":"xoWJ","./s3":"qgIz","./presign":"dxzw"}],"tfJa":[function(require,module,exports) { var e=require("./core");e.ParamValidator=e.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(t,r,i){if(this.errors=[],this.validateMember(t,r||{},i||"params"),this.errors.length>1){var a=this.errors.join("\n* ");throw a="There were "+this.errors.length+" validation errors:\n* "+a,e.util.error(new Error(a),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(t,r){this.errors.push(e.util.error(new Error(r),{code:t}))},validateStructure:function(e,t,r){var i;this.validateType(t,r,["object"],"structure");for(var a=0;e.required&&a= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,i){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+i+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(t,r,i,a){if(null==t)return!1;for(var n=!1,o=0;o>>((3&o)<<3)&255;return r}} },{}],"O4sp":[function(require,module,exports) { for(var r=[],o=0;o<256;++o)r[o]=(o+256).toString(16).substr(1);function t(o,t){var n=t||0,u=r;return[u[o[n++]],u[o[n++]],u[o[n++]],u[o[n++]],"-",u[o[n++]],u[o[n++]],"-",u[o[n++]],u[o[n++]],"-",u[o[n++]],u[o[n++]],"-",u[o[n++]],u[o[n++]],u[o[n++]],u[o[n++]],u[o[n++]],u[o[n++]]].join("")}module.exports=t; },{}],"acME":[function(require,module,exports) { var e,r,o=require("./lib/rng"),s=require("./lib/bytesToUuid"),i=0,n=0;function c(c,l,u){var v=l&&u||0,a=l||[],d=(c=c||{}).node||e,t=void 0!==c.clockseq?c.clockseq:r;if(null==d||null==t){var m=o();null==d&&(d=e=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==t&&(t=r=16383&(m[6]<<8|m[7]))}var q=void 0!==c.msecs?c.msecs:(new Date).getTime(),f=void 0!==c.nsecs?c.nsecs:n+1,b=q-i+(f-n)/1e4;if(b<0&&void 0===c.clockseq&&(t=t+1&16383),(b<0||q>i)&&void 0===c.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=q,n=f,r=t;var k=(1e4*(268435455&(q+=122192928e5))+f)%4294967296;a[v++]=k>>>24&255,a[v++]=k>>>16&255,a[v++]=k>>>8&255,a[v++]=255&k;var w=q/4294967296*1e4&268435455;a[v++]=w>>>8&255,a[v++]=255&w,a[v++]=w>>>24&15|16,a[v++]=w>>>16&255,a[v++]=t>>>8|128,a[v++]=255&t;for(var g=0;g<6;++g)a[v+g]=d[g];return l||s(a)}module.exports=c; },{"./lib/rng":"ogM3","./lib/bytesToUuid":"O4sp"}],"37UO":[function(require,module,exports) { var r=require("./lib/rng"),n=require("./lib/bytesToUuid");function e(e,i,u){var a=i&&u||0;"string"==typeof e&&(i="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||r)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,i)for(var o=0;o<16;++o)i[a+o]=l[o];return i||n(l)}module.exports=e; },{"./lib/rng":"ogM3","./lib/bytesToUuid":"O4sp"}],"gV9a":[function(require,module,exports) { var e=require("./v1"),r=require("./v4"),v=r;v.v1=e,v.v4=r,module.exports=v; },{"./v1":"acME","./v4":"37UO"}],"Srp3":[function(require,module,exports) { var process = require("process"); var e,r=require("process"),t={environment:"nodejs",engine:function(){if(t.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=r.platform+"/"+r.version;return e},userAgent:function(){var e=t.environment,r="aws-sdk-"+e+"/"+require("./core").VERSION;return"nodejs"===e&&(r+=" "+t.engine()),r},uriEscape:function(e){var r=encodeURIComponent(e);return r=(r=r.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var r=[];return t.arrayEach(e.split("/"),function(e){r.push(t.uriEscape(e))}),r.join("/")},urlParse:function(e){return t.url.parse(e)},urlFormat:function(e){return t.url.format(e)},queryStringParse:function(e){return t.querystring.parse(e)},queryParamsToString:function(e){var r=[],n=t.uriEscape,o=Object.keys(e).sort();return t.arrayEach(o,function(o){var a=e[o],i=n(o),u=i+"=";if(Array.isArray(a)){var f=[];t.arrayEach(a,function(e){f.push(n(e))}),u=i+"="+f.sort().join("&"+i+"=")}else null!=a&&(u=i+"="+n(a));r.push(u)}),r.join("&")},readFileSync:function(e){return t.isBrowser()?null:require("fs").readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw t.error(new Error("Cannot base64 encode number "+e));return null==e?e:("function"==typeof t.Buffer.from&&t.Buffer.from!==Uint8Array.from?t.Buffer.from(e):new t.Buffer(e)).toString("base64")},decode:function(e){if("number"==typeof e)throw t.error(new Error("Cannot base64 decode number "+e));return null==e?e:"function"==typeof t.Buffer.from&&t.Buffer.from!==Uint8Array.from?t.Buffer.from(e,"base64"):new t.Buffer(e,"base64")}},buffer:{toStream:function(e){t.Buffer.isBuffer(e)||(e=new t.Buffer(e));var r=new t.stream.Readable,n=0;return r._read=function(t){if(n>=e.length)return r.push(null);var o=n+t;o>e.length&&(o=e.length),r.push(e.slice(n,o)),n=o},r},concat:function(e){var r,n,o=0,a=0;for(n=0;n>>8^r[255&(n^e.readUInt8(o))]}return(-1^n)>>>0},hmac:function(e,r,n,o){return n||(n="binary"),"buffer"===n&&(n=void 0),o||(o="sha256"),"string"==typeof r&&(r=new t.Buffer(r)),t.crypto.lib.createHmac(o,e).update(r).digest(n)},md5:function(e,r,n){return t.crypto.hash("md5",e,r,n)},sha256:function(e,r,n){return t.crypto.hash("sha256",e,r,n)},hash:function(e,r,n,o){var a=t.crypto.createHash(e);n||(n="binary"),"buffer"===n&&(n=void 0),"string"==typeof r&&(r=new t.Buffer(r));var i=t.arraySliceFn(r),u=t.Buffer.isBuffer(r);if(t.isBrowser()&&"undefined"!=typeof ArrayBuffer&&r&&r.buffer instanceof ArrayBuffer&&(u=!0),o&&"object"==typeof r&&"function"==typeof r.on&&!u)r.on("data",function(e){a.update(e)}),r.on("error",function(e){o(e)}),r.on("end",function(){o(null,a.digest(n))});else{if(!o||!i||u||"undefined"==typeof FileReader){t.isBrowser()&&"object"==typeof r&&!u&&(r=new t.Buffer(new Uint8Array(r)));var f=a.update(r).digest(n);return o&&o(null,f),f}var s=0,c=new FileReader;c.onerror=function(){o(new Error("Failed to read data."))},c.onload=function(){var e=new t.Buffer(new Uint8Array(c.result));a.update(e),s+=e.length,c._continueReading()},c._continueReading=function(){if(s>=r.size)o(null,a.digest(n));else{var e=s+524288;e>r.size&&(e=r.size),c.readAsArrayBuffer(i.call(r,s,e))}},c._continueReading()}},toHex:function(e){for(var r=[],t=0;t=3e5,!1),e.config.isClockSkewed},applyClockOffset:function(r){r&&(e.config.systemClockOffset=r-(new Date).getTime())},extractRequestId:function(e){var r=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!r&&e.data&&e.data.ResponseMetadata&&(r=e.data.ResponseMetadata.RequestId),r&&(e.requestId=r),e.error&&(e.error.requestId=r)},addPromises:function(r,t){var n=!1;void 0===t&&e&&e.config&&(t=e.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(n=!0),Array.isArray(r)||(r=[r]);for(var o=0;o=500||429===n});a&&i.retryable&&(i.retryAfter=a),f(i)}})},f)};e.util.defer(s)},uuid:{v4:function(){return require("uuid").v4()}},convertPayloadToString:function(e){var r=e.request,t=r.operation,n=r.service.api.operations[t].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof r&&"function"==typeof r.nextTick?r.nextTick(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var r=e.service.api.operations;if(r){var t=(r||{})[e.operation];if(t&&t.input&&t.input.payload)return t.input.members[t.input.payload]}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};module.exports=t; },{"./core":"9hd5","fs":"prme","../apis/metadata.json":"W1ma","uuid":"gV9a","process":"R3IB"}],"FRly":[function(require,module,exports) { "use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){for(var n,o=h(r),a=o[0],u=o[1],i=new e(c(r,a,u)),f=0,A=u>0?a-4:a,d=0;d>16&255,i[f++]=n>>8&255,i[f++]=255&n;return 2===u&&(n=t[r.charCodeAt(d)]<<2|t[r.charCodeAt(d+1)]>>4,i[f++]=255&n),1===u&&(n=t[r.charCodeAt(d)]<<10|t[r.charCodeAt(d+1)]<<4|t[r.charCodeAt(d+2)]>>2,i[f++]=n>>8&255,i[f++]=255&n),i}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; },{}],"Quj6":[function(require,module,exports) { exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],"aq/z":[function(require,module,exports) { var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; },{}],"S4UE":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=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),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"FRly","ieee754":"Quj6","isarray":"aq/z","buffer":"S4UE"}],"aMB2":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=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),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"FRly","ieee754":"Quj6","isarray":"aq/z","buffer":"S4UE"}],"ljbF":[function(require,module,exports) { var r=require("buffer/").Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(r){return t.indexOf(Object.prototype.toString.call(r))>-1});var t=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];function e(r){return"string"==typeof r?0===r.length:0===r.byteLength}function n(t){return"string"==typeof t&&(t=new r(t,"utf8")),ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}module.exports=exports={isEmptyData:e,convertToBuffer:n}; },{"buffer/":"aMB2"}],"DTg6":[function(require,module,exports) { var t=require("./browserHashUtils");function e(t,e){this.hash=new t,this.outer=new t;var i=r(t,e),s=new Uint8Array(t.BLOCK_SIZE);s.set(i);for(var h=0;he.BLOCK_SIZE){var s=new e;s.update(i),i=s.digest()}var h=new Uint8Array(e.BLOCK_SIZE);return h.set(i),h}module.exports=exports=e,e.prototype.update=function(e){if(t.isEmptyData(e)||this.error)return this;try{this.hash.update(t.convertToBuffer(e))}catch(r){this.error=r}return this},e.prototype.digest=function(t){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(t)}; },{"./browserHashUtils":"ljbF"}],"sJ6n":[function(require,module,exports) { var t=require("./browserHashUtils"),e=require("buffer/").Buffer,i=64,n=16,g=[1732584193,4023233417,2562383102,271733878];function r(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(i)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function U(t,e,i,n,g,r){return((e=(e+t&4294967295)+(n+r&4294967295)&4294967295)<>>32-g)+i&4294967295}function f(t,e,i,n,g,r,f){return U(e&i|~e&n,t,e,g,r,f)}function s(t,e,i,n,g,r,f){return U(e&n|i&~n,t,e,g,r,f)}function h(t,e,i,n,g,r,f){return U(e^i^n,t,e,g,r,f)}function u(t,e,i,n,g,r,f){return U(i^(e|~n),t,e,g,r,f)}module.exports=exports=r,r.BLOCK_SIZE=i,r.prototype.update=function(e){if(t.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=t.convertToBuffer(e),g=0,r=n.byteLength;for(this.bytesHashed+=r;r>0;)this.buffer.setUint8(this.bufferLength++,n[g++]),r--,this.bufferLength===i&&(this.hashBuffer(),this.bufferLength=0);return this},r.prototype.digest=function(t){if(!this.finished){var g=this.buffer,r=this.bufferLength,U=8*this.bytesHashed;if(g.setUint8(this.bufferLength++,128),r%i>=i-8){for(var f=this.bufferLength;f>>0,!0),g.setUint32(i-4,Math.floor(U/4294967296),!0),this.hashBuffer(),this.finished=!0}var s=new DataView(new ArrayBuffer(n));for(f=0;f<4;f++)s.setUint32(4*f,this.state[f],!0);var h=new e(s.buffer,s.byteOffset,s.byteLength);return t?h.toString(t):h},r.prototype.hashBuffer=function(){var t=this.buffer,e=this.state,i=e[0],n=e[1],g=e[2],r=e[3];i=f(i,n,g,r,t.getUint32(0,!0),7,3614090360),r=f(r,i,n,g,t.getUint32(4,!0),12,3905402710),g=f(g,r,i,n,t.getUint32(8,!0),17,606105819),n=f(n,g,r,i,t.getUint32(12,!0),22,3250441966),i=f(i,n,g,r,t.getUint32(16,!0),7,4118548399),r=f(r,i,n,g,t.getUint32(20,!0),12,1200080426),g=f(g,r,i,n,t.getUint32(24,!0),17,2821735955),n=f(n,g,r,i,t.getUint32(28,!0),22,4249261313),i=f(i,n,g,r,t.getUint32(32,!0),7,1770035416),r=f(r,i,n,g,t.getUint32(36,!0),12,2336552879),g=f(g,r,i,n,t.getUint32(40,!0),17,4294925233),n=f(n,g,r,i,t.getUint32(44,!0),22,2304563134),i=f(i,n,g,r,t.getUint32(48,!0),7,1804603682),r=f(r,i,n,g,t.getUint32(52,!0),12,4254626195),g=f(g,r,i,n,t.getUint32(56,!0),17,2792965006),i=s(i,n=f(n,g,r,i,t.getUint32(60,!0),22,1236535329),g,r,t.getUint32(4,!0),5,4129170786),r=s(r,i,n,g,t.getUint32(24,!0),9,3225465664),g=s(g,r,i,n,t.getUint32(44,!0),14,643717713),n=s(n,g,r,i,t.getUint32(0,!0),20,3921069994),i=s(i,n,g,r,t.getUint32(20,!0),5,3593408605),r=s(r,i,n,g,t.getUint32(40,!0),9,38016083),g=s(g,r,i,n,t.getUint32(60,!0),14,3634488961),n=s(n,g,r,i,t.getUint32(16,!0),20,3889429448),i=s(i,n,g,r,t.getUint32(36,!0),5,568446438),r=s(r,i,n,g,t.getUint32(56,!0),9,3275163606),g=s(g,r,i,n,t.getUint32(12,!0),14,4107603335),n=s(n,g,r,i,t.getUint32(32,!0),20,1163531501),i=s(i,n,g,r,t.getUint32(52,!0),5,2850285829),r=s(r,i,n,g,t.getUint32(8,!0),9,4243563512),g=s(g,r,i,n,t.getUint32(28,!0),14,1735328473),i=h(i,n=s(n,g,r,i,t.getUint32(48,!0),20,2368359562),g,r,t.getUint32(20,!0),4,4294588738),r=h(r,i,n,g,t.getUint32(32,!0),11,2272392833),g=h(g,r,i,n,t.getUint32(44,!0),16,1839030562),n=h(n,g,r,i,t.getUint32(56,!0),23,4259657740),i=h(i,n,g,r,t.getUint32(4,!0),4,2763975236),r=h(r,i,n,g,t.getUint32(16,!0),11,1272893353),g=h(g,r,i,n,t.getUint32(28,!0),16,4139469664),n=h(n,g,r,i,t.getUint32(40,!0),23,3200236656),i=h(i,n,g,r,t.getUint32(52,!0),4,681279174),r=h(r,i,n,g,t.getUint32(0,!0),11,3936430074),g=h(g,r,i,n,t.getUint32(12,!0),16,3572445317),n=h(n,g,r,i,t.getUint32(24,!0),23,76029189),i=h(i,n,g,r,t.getUint32(36,!0),4,3654602809),r=h(r,i,n,g,t.getUint32(48,!0),11,3873151461),g=h(g,r,i,n,t.getUint32(60,!0),16,530742520),i=u(i,n=h(n,g,r,i,t.getUint32(8,!0),23,3299628645),g,r,t.getUint32(0,!0),6,4096336452),r=u(r,i,n,g,t.getUint32(28,!0),10,1126891415),g=u(g,r,i,n,t.getUint32(56,!0),15,2878612391),n=u(n,g,r,i,t.getUint32(20,!0),21,4237533241),i=u(i,n,g,r,t.getUint32(48,!0),6,1700485571),r=u(r,i,n,g,t.getUint32(12,!0),10,2399980690),g=u(g,r,i,n,t.getUint32(40,!0),15,4293915773),n=u(n,g,r,i,t.getUint32(4,!0),21,2240044497),i=u(i,n,g,r,t.getUint32(32,!0),6,1873313359),r=u(r,i,n,g,t.getUint32(60,!0),10,4264355552),g=u(g,r,i,n,t.getUint32(24,!0),15,2734768916),n=u(n,g,r,i,t.getUint32(52,!0),21,1309151649),i=u(i,n,g,r,t.getUint32(16,!0),6,4149444226),r=u(r,i,n,g,t.getUint32(44,!0),10,3174756917),g=u(g,r,i,n,t.getUint32(8,!0),15,718787259),n=u(n,g,r,i,t.getUint32(36,!0),21,3951481745),e[0]=i+e[0]&4294967295,e[1]=n+e[1]&4294967295,e[2]=g+e[2]&4294967295,e[3]=r+e[3]&4294967295}; },{"./browserHashUtils":"ljbF","buffer/":"aMB2"}],"EqNI":[function(require,module,exports) { var t=require("buffer/").Buffer,h=require("./browserHashUtils"),i=64,s=20,e=new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),o=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],r=Math.pow(2,53)-1;function f(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}module.exports=exports=f,f.BLOCK_SIZE=i,f.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(h.isEmptyData(t))return this;var i=(t=h.convertToBuffer(t)).length;this.totalLength+=8*i;for(var s=0;s14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var i=24;i>=0;i-=8)this.write(this.totalLength>>i);var e=new t(s),o=new DataView(e.buffer);return o.setUint32(0,this.h0,!1),o.setUint32(4,this.h1,!1),o.setUint32(8,this.h2,!1),o.setUint32(12,this.h3,!1),o.setUint32(16,this.h4,!1),h?e.toString(h):e},f.prototype.processBlock=function(){for(var t=16;t<80;t++){var h=this.block[t-3]^this.block[t-8]^this.block[t-14]^this.block[t-16];this.block[t]=h<<1|h>>>31}var i,s,e=this.h0,o=this.h1,r=this.h2,f=this.h3,n=this.h4;for(t=0;t<80;t++){t<20?(i=f^o&(r^f),s=1518500249):t<40?(i=o^r^f,s=1859775393):t<60?(i=o&r|f&(o|r),s=2400959708):(i=o^r^f,s=3395469782);var a=(e<<5|e>>>27)+i+n+s+(0|this.block[t]);n=f,f=r,r=o<<30|o>>>2,o=e,e=a}for(this.h0=this.h0+e|0,this.h1=this.h1+o|0,this.h2=this.h2+r|0,this.h3=this.h3+f|0,this.h4=this.h4+n|0,this.offset=0,t=0;t<16;t++)this.block[t]=0}; },{"buffer/":"aMB2","./browserHashUtils":"ljbF"}],"JfHK":[function(require,module,exports) { var t=require("buffer/").Buffer,e=require("./browserHashUtils"),s=64,h=32,i=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]),r=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Math.pow(2,53)-1;function n(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}module.exports=exports=n,n.BLOCK_SIZE=s,n.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(e.isEmptyData(t))return this;var h=0,i=(t=e.convertToBuffer(t)).byteLength;if(this.bytesHashed+=i,8*this.bytesHashed>f)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;i>0;)this.buffer[this.bufferLength++]=t[h++],i--,this.bufferLength===s&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var i=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),f=this.bufferLength;if(r.setUint8(this.bufferLength++,128),f%s>=s-8){for(var n=this.bufferLength;n>>24&255,a[4*n+1]=this.state[n]>>>16&255,a[4*n+2]=this.state[n]>>>8&255,a[4*n+3]=this.state[n]>>>0&255;return e?a.toString(e):a},n.prototype.hashBuffer=function(){for(var t=this.buffer,e=this.state,h=e[0],r=e[1],f=e[2],n=e[3],a=e[4],u=e[5],o=e[6],b=e[7],p=0;p>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=this.temp[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[p]=(y+this.temp[p-7]|0)+(g+this.temp[p-16]|0)}var m=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&o)|0)+(b+(i[p]+this.temp[p]|0)|0)|0,w=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&r^h&f^r&f)|0;b=o,o=u,u=a,a=n+m|0,n=f,f=r,r=h,h=m+w|0}e[0]+=h,e[1]+=r,e[2]+=f,e[3]+=n,e[4]+=a,e[5]+=u,e[6]+=o,e[7]+=b}; },{"buffer/":"aMB2","./browserHashUtils":"ljbF"}],"jxQV":[function(require,module,exports) { var r=require("./browserHmac"),e=require("./browserMd5"),t=require("./browserSha1"),n=require("./browserSha256");module.exports=exports={createHash:function(r){if("md5"===(r=r.toLowerCase()))return new e;if("sha256"===r)return new n;if("sha1"===r)return new t;throw new Error("Hash algorithm "+r+" is not supported in the browser SDK")},createHmac:function(o,i){if("md5"===(o=o.toLowerCase()))return new r(e,i);if("sha256"===o)return new r(n,i);if("sha1"===o)return new r(t,i);throw new Error("HMAC algorithm "+o+" is not supported in the browser SDK")},createSign:function(){throw new Error("createSign is not implemented in the browser")}}; },{"./browserHmac":"DTg6","./browserMd5":"sJ6n","./browserSha1":"EqNI","./browserSha256":"JfHK"}],"nZAc":[function(require,module,exports) { var global = arguments[3]; var define; var o,e=arguments[3];!function(n){var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,t="object"==typeof module&&module&&!module.nodeType&&module,u="object"==typeof e&&e;u.global!==u&&u.window!==u&&u.self!==u||(n=u);var i,f,c=2147483647,l=36,s=1,p=26,a=38,d=700,h=72,v=128,g="-",w=/^xn--/,x=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-s,b=Math.floor,j=String.fromCharCode;function A(o){throw new RangeError(m[o])}function I(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function E(o,e){var n=o.split("@"),r="";return n.length>1&&(r=n[0]+"@",o=n[1]),r+I((o=o.replace(y,".")).split("."),e).join(".")}function F(o){for(var e,n,r=[],t=0,u=o.length;t=55296&&e<=56319&&t65535&&(e+=j((o-=65536)>>>10&1023|55296),o=56320|1023&o),e+=j(o)}).join("")}function S(o,e){return o+22+75*(o<26)-((0!=e)<<5)}function T(o,e,n){var r=0;for(o=n?b(o/d):o>>1,o+=b(o/e);o>C*p>>1;r+=l)o=b(o/C);return b(r+(C+1)*o/(o+a))}function L(o){var e,n,r,t,u,i,f,a,d,w,x,y=[],m=o.length,C=0,j=v,I=h;for((n=o.lastIndexOf(g))<0&&(n=0),r=0;r=128&&A("not-basic"),y.push(o.charCodeAt(r));for(t=n>0?n+1:0;t=m&&A("invalid-input"),((a=(x=o.charCodeAt(t++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:l)>=l||a>b((c-C)/i))&&A("overflow"),C+=a*i,!(a<(d=f<=I?s:f>=I+p?p:f-I));f+=l)i>b(c/(w=l-d))&&A("overflow"),i*=w;I=T(C-u,e=y.length+1,0==u),b(C/e)>c-j&&A("overflow"),j+=b(C/e),C%=e,y.splice(C++,0,j)}return O(y)}function M(o){var e,n,r,t,u,i,f,a,d,w,x,y,m,C,I,E=[];for(y=(o=F(o)).length,e=v,n=0,u=h,i=0;i=e&&xb((c-n)/(m=r+1))&&A("overflow"),n+=(f-e)*m,e=f,i=0;ic&&A("overflow"),x==e){for(a=n,d=l;!(a<(w=d<=u?s:d>=u+p?p:d-u));d+=l)I=a-w,C=l-w,E.push(j(S(w+I%C,0))),a=b(I/C);E.push(j(S(a,0))),u=T(n,m,r==t),n=0,++r}++n,++e}return E.join("")}if(i={version:"1.4.1",ucs2:{decode:F,encode:O},decode:L,encode:M,toASCII:function(o){return E(o,function(o){return x.test(o)?"xn--"+M(o):o})},toUnicode:function(o){return E(o,function(o){return w.test(o)?L(o.slice(4).toLowerCase()):o})}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",function(){return i});else if(r&&t)if(module.exports==r)t.exports=i;else for(f in i)i.hasOwnProperty(f)&&(r[f]=i[f]);else n.punycode=i}(this); },{}],"oYmJ":[function(require,module,exports) { "use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(t,n,o,a){n=n||"&",o=o||"=";var s={};if("string"!=typeof t||0===t.length)return s;var p=/\+/g;t=t.split(n);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var i=0;i=0?(y=b.substr(0,d),l=b.substr(d+1)):(y=b,l=""),f=decodeURIComponent(y),v=decodeURIComponent(l),r(s,f)?e(s[f])?s[f].push(v):s[f]=[s[f],v]:s[f]=v}return s};var e=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)}; },{}],"Dhir":[function(require,module,exports) { "use strict";var n=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};module.exports=function(o,u,c,a){return u=u||"&",c=c||"=",null===o&&(o=void 0),"object"==typeof o?r(t(o),function(t){var a=encodeURIComponent(n(t))+c;return e(o[t])?r(o[t],function(e){return a+encodeURIComponent(n(e))}).join(u):a+encodeURIComponent(n(o[t]))}).join(u):a?encodeURIComponent(n(a))+c+encodeURIComponent(n(o)):""};var e=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function r(n,e){if(n.map)return n.map(e);for(var r=[],t=0;t",'"',"`"," ","\r","\n","\t"],o=["{","}","|","\\","^","`"].concat(a),r=["'"].concat(o),n=["%","/","?",";","#"].concat(r),i=["/","?","#"],l=255,p=/^[a-z0-9A-Z_-]{0,63}$/,c=/^([a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=require("querystring");function y(t,s,e){if(t&&x(t)&&t instanceof h)return t;var a=new h;return a.parse(t,s,e),a}function g(t){return q(t)&&(t=y(t)),t instanceof h?t.format():h.prototype.format.call(t)}function b(t,h){return y(t,!1,!0).resolve(h)}function j(t,h){return t?y(t,!1,!0).resolveObject(h):h}function q(t){return"string"==typeof t}function x(t){return"object"==typeof t&&null!==t}function d(t){return null===t}function O(t){return null==t}h.prototype.parse=function(h,e,a){if(!q(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var o=h;o=o.trim();var y=s.exec(o);if(y){var g=(y=y[0]).toLowerCase();this.protocol=g,o=o.substr(y.length)}if(a||y||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var b="//"===o.substr(0,2);!b||y&&f[y]||(o=o.substr(2),this.slashes=!0)}if(!f[y]&&(b||y&&!m[y])){for(var j,x,d=-1,O=0;O127?U+="x":U+=k[z];if(!U.match(p)){var R=C.slice(0,O),Z=C.slice(O+1),$=k.match(c);$&&(R.push($[1]),Z.unshift($[2])),Z.length&&(o="/"+Z.join(".")+o),this.hostname=R.join(".");break}}}if(this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),!w){var _=this.hostname.split("."),H=[];for(O=0;O<_.length;++O){var L=_[O];H.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+t.encode(L):L)}this.hostname=H.join(".")}var P=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+P,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!u[g])for(O=0,I=r.length;O0)&&e.host.split("@"))&&(e.auth=j.shift(),e.host=e.hostname=j.shift());return e.search=t.search,e.query=t.query,d(e.pathname)&&d(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var v=c.slice(-1)[0],y=(e.host||t.host)&&("."===v||".."===v)||""===v,g=0,b=c.length;b>=0;b--)"."==(v=c[b])?c.splice(b,1):".."===v?(c.splice(b,1),g++):g&&(c.splice(b,1),g--);if(!l&&!p)for(;g--;g)c.unshift("..");!l||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),y&&"/"!==c.join("/").substr(-1)&&c.push("");var j,x=""===c[0]||c[0]&&"/"===c[0].charAt(0);u&&(e.hostname=e.host=x?"":c.length?c.shift():"",(j=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=j.shift(),e.host=e.hostname=j.shift()));return(l=l||e.host&&c.length)&&!x&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),d(e.pathname)&&d(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},h.prototype.parseHost=function(){var t=this.host,h=e.exec(t);h&&(":"!==(h=h[0])&&(this.port=h.substr(1)),t=t.substr(0,t.length-h.length)),t&&(this.hostname=t)}; },{"punycode":"nZAc","querystring":"RFxb"}],"9XyQ":[function(require,module,exports) { "use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var p=1e3;o&&"number"==typeof o.maxKeys&&(p=o.maxKeys);var u=e.length;p>0&&u>p&&(u=p);for(var c=0;c=0?(i=d.substr(0,m),y=d.substr(m+1)):(i=d,y=""),f=decodeURIComponent(i),l=decodeURIComponent(y),r(s,f)?Array.isArray(s[f])?s[f].push(l):s[f]=[s[f],l]:s[f]=l}return s}; },{}],"swIA":[function(require,module,exports) { "use strict";var e=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};module.exports=function(n,o,t,r){return o=o||"&",t=t||"=",null===n&&(n=void 0),"object"==typeof n?Object.keys(n).map(function(r){var u=encodeURIComponent(e(r))+t;return Array.isArray(n[r])?n[r].map(function(n){return u+encodeURIComponent(e(n))}).join(o):u+encodeURIComponent(e(n[r]))}).join(o):r?encodeURIComponent(e(r))+t+encodeURIComponent(e(n)):""}; },{}],"CM+/":[function(require,module,exports) { "use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode"); },{"./decode":"9XyQ","./encode":"swIA"}],"3U90":[function(require,module,exports) { module.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}; },{}],"sf+l":[function(require,module,exports) { function e(e){for(var r=[],n=0;n-1&&(r[t]++,0===r[t]);t--);}e.fromNumber=function(r){if(r>0x8000000000000000||r<-0x8000000000000000)throw new Error(r+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),n=7,f=Math.abs(Math.round(r));n>-1&&f>0;n--,f/=256)t[n]=f;return r<0&&o(t),new e(t)},e.prototype.valueOf=function(){var r=this.bytes.slice(0),t=128&r[0];return t&&o(r),parseInt(r.toString("hex"),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},module.exports={Int64:e}; },{"../core":"9hd5","./to-buffer":"2m15"}],"q3tc":[function(require,module,exports) { var e=require("../core").util,r=require("./to-buffer").toBuffer,t=4,o=2*t,s=4,c=o+2*s;function a(a){if(e.Buffer.isBuffer(a)||(a=r(a)),a.length0&&f.length>o&&!f.warned){f.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=f.length,r(p)}return e}function p(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var f=o[e];if(void 0===f)return!1;if("function"==typeof f)n(f,this,t);else{var p=f.length,v=c(f,p);for(r=0;r=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():l(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):a.call(e,t)},o.prototype.listenerCount=a,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}; },{}],"xVez":[function(require,module,exports) { var e=require("../core"),t=require("events").EventEmitter;require("../http"),e.XHRClient=e.util.inherit({handleRequest:function(r,n,s,o){var i=this,a=r.endpoint,u=new t,d=a.protocol+"//"+a.hostname;80!==a.port&&443!==a.port&&(d+=":"+a.port),d+=r.path;var h=new XMLHttpRequest,p=!1;r.stream=h,h.addEventListener("readystatechange",function(){try{if(0===h.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!p&&(u.statusCode=h.status,u.headers=i.parseHeaders(h.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,h.statusText),p=!0),this.readyState===this.DONE&&i.finishRequest(h,u)},!1),h.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),h.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),h.addEventListener("timeout",function(){o(e.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),h.addEventListener("error",function(){o(e.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),h.addEventListener("abort",function(){o(e.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),s(u),h.open(r.method,d,!1!==n.xhrAsync),e.util.each(r.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&h.setRequestHeader(e,t)}),n.timeout&&!1!==n.xhrAsync&&(h.timeout=n.timeout),n.xhrWithCredentials&&(h.withCredentials=!0);try{h.responseType="arraybuffer"}catch(c){}try{r.body?h.send(r.body):h.send()}catch(f){if(!r.body||"object"!=typeof r.body.buffer)throw f;h.send(r.body.buffer)}return u},parseHeaders:function(t){var r={};return e.util.arrayEach(t.split(/\r?\n/),function(e){var t=e.split(":",1)[0],n=e.substring(t.length+2);t.length>0&&(r[t.toLowerCase()]=n)}),r},finishRequest:function(t,r){var n;if("arraybuffer"===t.responseType&&t.response){var s=t.response;n=new e.util.Buffer(s.byteLength);for(var o=new Uint8Array(s),i=0;i=1&&i.doneParts===i.numParts&&i.finishMultiPart()}))}r&&i.fillQueue.call(i)},abort:function(){!0===this.isDoneChunking&&1===this.totalPartNumbers&&this.singlePart?this.singlePart.abort():this.cleanup(t.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1}))},validateBody:function(){if(this.body=this.service.config.params.Body,"string"==typeof this.body)this.body=new t.util.Buffer(this.body);else if(!this.body)throw new Error("params.Body is required");this.sliceFn=t.util.arraySliceFn(this.body)},bindServiceObject:function(e){e=e||{};if(this.service){var i=this.service,r=t.util.copy(i.config);r.signatureVersion=i.getSignatureVersion(),this.service=new i.constructor.__super__(r),this.service.config.params=t.util.merge(this.service.config.params||{},e)}else this.service=new t.S3({params:e})},adjustTotalBytes:function(){try{this.totalBytes=e(this.body)}catch(i){}if(this.totalBytes){var t=Math.ceil(this.totalBytes/this.maxTotalParts);t>this.partSize&&(this.partSize=t)}else this.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var t=e(this.body);if(0===t)return this.isDoneChunking=!0,this.numParts=1,void this.nextChunk(this.body);for(;this.activeParts=this.queueSize)){var t=this.body.read(this.partSize-this.partBufferLength)||this.body.read();if(t&&(this.partBuffers.push(t),this.partBufferLength+=t.length,this.totalChunkedBytes+=t.length),this.partBufferLength>=this.partSize){var e=1===this.partBuffers.length?this.partBuffers[0]:i.concat(this.partBuffers);if(this.partBuffers=[],this.partBufferLength=0,e.length>this.partSize){var r=e.slice(this.partSize);this.partBuffers.push(r),this.partBufferLength+=r.length,e=e.slice(0,this.partSize)}this.nextChunk(e)}this.isDoneChunking&&!this.isDoneSending&&(e=1===this.partBuffers.length?this.partBuffers[0]:i.concat(this.partBuffers),this.partBuffers=[],this.partBufferLength=0,this.totalBytes=this.totalChunkedBytes,this.isDoneSending=!0,(0===this.numParts||e.length>0)&&(this.numParts++,this.nextChunk(e))),this.body.read(0)}},nextChunk:function(e){var i=this;if(i.failed)return null;var r=++i.totalPartNumbers;if(i.isDoneChunking&&1===r){var s={Body:e};this.tags&&(s.Tagging=this.getTaggingHeader());var a=i.service.putObject(s);return a._managedUpload=i,a.on("httpUploadProgress",i.progress).send(i.finishSinglePart),i.singlePart=a,null}if(i.service.config.params.ContentMD5){var n=t.util.error(new Error("The Content-MD5 you specified is invalid for multi-part uploads."),{code:"InvalidDigest",retryable:!1});return i.cleanup(n),null}if(i.completeInfo[r]&&null!==i.completeInfo[r].ETag)return null;i.activeParts++,i.service.config.params.UploadId?i.uploadPart(e,r):i.multipartReq?i.queueChunks(e,r):(i.multipartReq=i.service.createMultipartUpload(),i.multipartReq.on("success",function(t){i.service.config.params.UploadId=t.data.UploadId,i.multipartReq=null}),i.queueChunks(e,r),i.multipartReq.on("error",function(t){i.cleanup(t)}),i.multipartReq.send())},getTaggingHeader:function(){for(var e=[],i=0;i1&&(t="Multiple configuration errors:\n"+r.join("\n")),t)throw e.util.error(new Error,{name:"InvalidEndpoint",message:t})},shouldDisableBodySigning:function(t){var r=this.getSignerClass();return!0===this.config.s3DisableBodySigning&&r===e.Signers.V4&&"https:"===t.httpRequest.endpoint.protocol},setupRequestListeners:function(t){t.addListener("validate",this.validateScheme),t.addListener("validate",this.validateBucketEndpoint),t.addListener("validate",this.correctBucketRegionFromCache),t.addListener("validate",this.validateBucketName,!0),t.addListener("build",this.addContentType),t.addListener("build",this.populateURI),t.addListener("build",this.computeContentMd5),t.addListener("build",this.computeSseCustomerKeyMd5),t.addListener("afterBuild",this.addExpect100Continue),t.removeListener("validate",e.EventListeners.Core.VALIDATE_REGION),t.addListener("extractError",this.extractError),t.onAsync("extractError",this.requestBucketRegion),t.addListener("extractData",this.extractData),t.addListener("extractData",e.util.hoistPayloadMember),t.addListener("beforePresign",this.prepareSignedUrl),e.util.isBrowser()&&t.onAsync("retry",this.reqRegionForNetworkingError),this.shouldDisableBodySigning(t)&&(t.removeListener("afterBuild",e.EventListeners.Core.COMPUTE_SHA256),t.addListener("afterBuild",this.disableBodySigning))},validateScheme:function(t){var r=t.params,n=t.httpRequest.endpoint.protocol;if((r.SSECustomerKey||r.CopySourceSSECustomerKey)&&"https:"!==n){throw e.util.error(new Error,{code:"ConfigError",message:"Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration"})}},validateBucketEndpoint:function(t){if(!t.params.Bucket&&t.service.config.s3BucketEndpoint){throw e.util.error(new Error,{code:"ConfigError",message:"Cannot send requests to root API with `s3BucketEndpoint` set."})}},validateBucketName:function(t){var r=t.service.getSignatureVersion(t),n=t.params&&t.params.Bucket,i=t.params&&t.params.Key,o=n&&n.indexOf("/");if(n&&o>=0)if("string"==typeof i&&o>0){t.params=e.util.copy(t.params);var s=n.substr(o+1)||"";t.params.Key=s+"/"+i,t.params.Bucket=n.substr(0,o)}else if("v4"===r){var a="Bucket names cannot contain forward slashes. Bucket: "+n;throw e.util.error(new Error,{code:"InvalidBucket",message:a})}},isValidAccelerateOperation:function(e){return-1===["createBucket","deleteBucket","listBuckets"].indexOf(e)},populateURI:function(e){var t=e.httpRequest,r=e.params.Bucket,n=e.service,i=t.endpoint;if(r&&!n.pathStyleBucketName(r)){n.config.useAccelerateEndpoint&&n.isValidAccelerateOperation(e.operation)?n.config.useDualstack?i.hostname=r+".s3-accelerate.dualstack.amazonaws.com":i.hostname=r+".s3-accelerate.amazonaws.com":n.config.s3BucketEndpoint||(i.hostname=r+"."+i.hostname);var o=i.port;i.host=80!==o&&443!==o?i.hostname+":"+i.port:i.hostname,t.virtualHostedBucket=r,n.removeVirtualHostedBucketFromPath(e)}},removeVirtualHostedBucketFromPath:function(t){var r=t.httpRequest,n=r.virtualHostedBucket;if(n&&r.path){if(t.params&&t.params.Key){var i="/"+e.util.uriEscapePath(t.params.Key);if(0===r.path.indexOf(i)&&(r.path.length===i.length||"?"===r.path[i.length]))return}r.path=r.path.replace(new RegExp("/"+n),""),"/"!==r.path[0]&&(r.path="/"+r.path)}},addExpect100Continue:function(t){var r=t.httpRequest.headers["Content-Length"];e.util.isNode()&&(r>=1048576||t.params.Body instanceof e.util.stream.Stream)&&(t.httpRequest.headers.Expect="100-continue")},addContentType:function(t){var r=t.httpRequest;if("GET"!==r.method&&"HEAD"!==r.method){r.headers["Content-Type"]||(r.headers["Content-Type"]="application/octet-stream");var n=r.headers["Content-Type"];if(e.util.isBrowser())if("string"!=typeof r.body||n.match(/;\s*charset=/)){r.headers["Content-Type"]=n.replace(/(;\s*charset=)(.+)$/,function(e,t,r){return t+r.toUpperCase()})}else{r.headers["Content-Type"]+="; charset=UTF-8"}}else delete r.headers["Content-Type"]},computableChecksumOperations:{putBucketCors:!0,putBucketLifecycle:!0,putBucketLifecycleConfiguration:!0,putBucketTagging:!0,deleteObjects:!0,putBucketReplication:!0,putObjectLegalHold:!0,putObjectRetention:!0,putObjectLockConfiguration:!0},willComputeChecksums:function(t){if(this.computableChecksumOperations[t.operation])return!0;if(!this.config.computeChecksums)return!1;if(!e.util.Buffer.isBuffer(t.httpRequest.body)&&"string"!=typeof t.httpRequest.body)return!1;var r=t.service.api.operations[t.operation].input.members;return!(!t.service.shouldDisableBodySigning(t)||Object.prototype.hasOwnProperty.call(t.httpRequest.headers,"presigned-expires")||!r.ContentMD5||t.params.ContentMD5)||!(t.service.getSignerClass(t)===e.Signers.V4&&r.ContentMD5&&!r.ContentMD5.required)&&(!(!r.ContentMD5||t.params.ContentMD5)||void 0)},computeContentMd5:function(t){if(t.service.willComputeChecksums(t)){var r=e.util.crypto.md5(t.httpRequest.body,"base64");t.httpRequest.headers["Content-MD5"]=r}},computeSseCustomerKeyMd5:function(t){e.util.each({SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},function(r,n){if(t.params[r]){var i=e.util.crypto.md5(t.params[r],"base64");t.httpRequest.headers[n]=i}})},pathStyleBucketName:function(e){return!!this.config.s3ForcePathStyle||!this.config.s3BucketEndpoint&&(!this.dnsCompatibleBucketName(e)||!(!this.config.sslEnabled||!e.match(/\./)))},dnsCompatibleBucketName:function(e){var t=e,r=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),n=new RegExp(/(\d+\.){3}\d+/),i=new RegExp(/\.\./);return!(!t.match(r)||t.match(n)||t.match(i))},successfulResponse:function(e){var t=e.request,n=e.httpResponse;return(!r[t.operation]||!n.body.toString().match(""))&&n.statusCode<300},retryableError:function(t,i){return!(!r[i.operation]||200!==t.statusCode)||(!i._requestRegionForBucket||!i.service.bucketRegionCache[i._requestRegionForBucket])&&(!(!t||"RequestTimeout"!==t.code)||(t&&-1!=n.indexOf(t.code)&&t.region&&t.region!=i.httpRequest.region?(i.httpRequest.region=t.region,301===t.statusCode&&i.service.updateReqBucketRegion(i),!0):e.Service.prototype.retryableError.call(this,t,i)))},updateReqBucketRegion:function(t,r){var n=t.httpRequest;if("string"==typeof r&&r.length&&(n.region=r),n.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)){var i=t.service,o=i.config,s=o.s3BucketEndpoint;s&&delete o.s3BucketEndpoint;var a=e.util.copy(o);delete a.endpoint,a.region=n.region,n.endpoint=new e.S3(a).endpoint,i.populateURI(t),o.s3BucketEndpoint=s,n.headers.Host=n.endpoint.host,"validate"===t._asm.currentState&&(t.removeListener("build",i.populateURI),t.addListener("build",i.removeVirtualHostedBucketFromPath))}},extractData:function(e){var t=e.request;if("getBucketLocation"===t.operation){var r=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,e.data.LocationConstraint=r?r[1]:""}var n=t.params.Bucket||null;if("deleteBucket"!==t.operation||"string"!=typeof n||e.error){var i=(e.httpResponse.headers||{})["x-amz-bucket-region"]||null;if(!i&&"createBucket"===t.operation&&!e.error){var o=t.params.CreateBucketConfiguration;i=o?"EU"===o.LocationConstraint?"eu-west-1":o.LocationConstraint:"us-east-1"}i&&n&&i!==t.service.bucketRegionCache[n]&&(t.service.bucketRegionCache[n]=i)}else t.service.clearBucketRegionCache(n);t.service.extractRequestIds(e)},extractError:function(t){var r,n={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},i=t.request,o=t.httpResponse.statusCode,s=t.httpResponse.body||"",a=(t.httpResponse.headers||{})["x-amz-bucket-region"]||null,u=i.params.Bucket||null,c=i.service.bucketRegionCache;if(a&&u&&a!==c[u]&&(c[u]=a),n[o]&&0===s.length)u&&!a&&(r=c[u]||null)!==i.httpRequest.region&&(a=r),t.error=e.util.error(new Error,{code:n[o],message:null,region:a});else{var d=(new e.XML.Parser).parse(s.toString());d.Region&&!a?(a=d.Region,u&&a!==c[u]&&(c[u]=a)):!u||a||d.Region||(r=c[u]||null)!==i.httpRequest.region&&(a=r),t.error=e.util.error(new Error,{code:d.Code||o,message:d.Message||null,region:a})}i.service.extractRequestIds(t)},requestBucketRegion:function(t,r){var i=t.error,o=t.request,s=o.params.Bucket||null;if(!i||!s||i.region||"listObjects"===o.operation||e.util.isNode()&&"headBucket"===o.operation||400===i.statusCode&&"headObject"!==o.operation||-1===n.indexOf(i.code))return r();var a=e.util.isNode()?"headBucket":"listObjects",u={Bucket:s};"listObjects"===a&&(u.MaxKeys=0);var c=o.service[a](u);c._requestRegionForBucket=s,c.send(function(){var e=o.service.bucketRegionCache[s]||null;i.region=e,r()})},reqRegionForNetworkingError:function(t,r){if(!e.util.isBrowser())return r();var n=t.error,i=t.request,o=i.params.Bucket;if(!n||"NetworkingError"!==n.code||!o||"us-east-1"===i.httpRequest.region)return r();var s=i.service,a=s.bucketRegionCache,u=a[o]||null;if(u&&u!==i.httpRequest.region)s.updateReqBucketRegion(i,u),r();else if(s.dnsCompatibleBucketName(o))if(i.httpRequest.virtualHostedBucket){var c=s.listObjects({Bucket:o,MaxKeys:0});s.updateReqBucketRegion(c,"us-east-1"),c._requestRegionForBucket=o,c.send(function(){var e=s.bucketRegionCache[o]||null;e&&e!==i.httpRequest.region&&s.updateReqBucketRegion(i,e),r()})}else r();else s.updateReqBucketRegion(i,"us-east-1"),"us-east-1"!==a[o]&&(a[o]="us-east-1"),r()},bucketRegionCache:{},clearBucketRegionCache:function(e){var t=this.bucketRegionCache;e?"string"==typeof e&&(e=[e]):e=Object.keys(t);for(var r=0;r0&&e.startsWith("2158")}if(f&&!m()){var g=window.prompt("Enter the admin password.");localStorage.setItem("_diorama_adminSecret",g)}var v=m();if(v){var p=document.getElementById("admin-header");p.style.display="block",p.addEventListener("click",function(e){"admin-logout-link"===e.target.className&&(localStorage.removeItem("_diorama_adminSecret"),window.location.reload())},!1)}var w=function(e){return e.t5De20cKEJ1d=localStorage.getItem("_diorama_adminSecret"),JSON.stringify(e)},y=new e({params:{Bucket:r}}),b=document.getElementById("file-chooser"),k=document.getElementById("results"),E=document.getElementById("see-more-button"),T=document.getElementById("see-more-div"),x=function(e){return"https://s3.amazonaws.com/"+r+"/"+e},C=function(e){return"thumbnails/"+e+".jpg"},I=function(e){return"thumbnails/"+e+".mp4"},L=function(e){return"thumbnails/"+e+".d.jpg"},M=function(e){return"scenes/"+e},S=function(e,n){return"users/"+e+"/"+n},N=function(e,n){return"collections/"+e+"/"+n},D=function(e){return x(C(e))},_=function(e){return x(I(e))},j=function(e){return x(L(e))},A=function(e){return x(M(e))},B=new TextDecoder("utf-8"),O=function(e){return e};function H(e,n){fetch(u+"?id="+e,{method:"GET"}).then(function(e){200!=e.status?(console.error(e),n(null)):e.json().then(function(e){n(e)}).catch(function(e){console.error(e)})}).catch(function(e){console.error(e),n(null)})}function P(e,n,t){v&&(console.log("toggle feature '"+e+"'"),fetch(u,{method:"POST",body:w({scene:e,featured:n})}).then(function(e){200!=e.status?(console.error(e),e.body.json().then(function(e){console.error(e),t(null)}).catch(function(e){console.error(e),t(null)})):e.json().then(function(e){console.log("toggle successful"),t(e)})}).catch(function(e){console.error(e),t(null)}))}function R(e,n){v&&window.confirm("Are you sure you want to delete this scene?")&&fetch(l,{method:"DELETE",body:w({scene:e}),headers:{"Content-Type":"application/json"}}).then(function(e){200!=e.status?(console.error(e),n(!1)):(console.log("Delete successful."),n(!0))}).catch(function(e){console.error("could not delete"),console.error(e),n(!1)})}function U(e,n,a,r){var s="";if(a&&v){var i='- ...';r||(i=""),s='
\n'+('Delete')+i+"\n
"}var c="";c=h?'\n \n ':'';var u='\n \n ';return'
\n

made by someone '+n+"

\n "+(r?c+u:''+c+"")+"\n "+s+"\n
\n "}function z(e){var n='\n \x3c!--
\n \n
--\x3e\n
\n Open in the Looking Glass\n

\n or input this code in the app: '+e+"\n

\n
\n ";k.innerHTML="\n

Check out this #content I made with Content Creator Simulator!

\n "+U(e,"",v,!0)+n,H(e,function(e){var n=Q(new Date(e.lastModified)),t=document.getElementsByClassName("last-modified")[0];if(t&&(t.innerText=n),v){var o=document.getElementsByClassName("feature-link")[0];e.featured?(o.innerText="Unfeature",o.setAttribute("data-was-featured","1")):(o.innerText="Feature",o.setAttribute("data-was-featured","0"))}})}function F(e){var n=e.target;if("delete-link"===n.className||"feature-link"===n.className){var t=n.getAttribute("data-guid");if(t&&t.length>0)if("delete-link"==n.className)R(t,function(e){if(e){var t=n.parentNode;t.parentNode.parentNode.removeChild(t.parentNode)}});else if("feature-link"===n.className){var o=n.getAttribute("data-was-featured"),a=!1;if("1"===o)a=!1;else{if("0"!==o)throw"Unexpected data-was-featured";a=!0}P(t,a,function(e){"1"===o?(n.innerText="Feature",n.setAttribute("data-was-featured","0")):"0"===o&&(n.innerText="Unfeature",n.setAttribute("data-was-featured","1")),console.log("WAT",e)})}else console.log("unknown classname");return e.preventDefault(),!1}}var K=[],q="scenes/";function G(){var e=K.splice(0,20),n=[];e.forEach(function(e){var t=e.Key.substr(q.length);n.push(U(t,Q(e.LastModified),!0,!1))}),k.innerHTML=k.innerHTML+n.join(""),K.length>0&&(T.style.display="block")}function J(e){return T.style.display="none",G(),e.preventDefault(),!1}function W(){y.listObjects({Bucket:r,Prefix:q},function(e,n){e?k.innerHTML="ERROR: "+e:(n.Contents.sort(function(e,n){return n.LastModified-e.LastModified}),n.Contents=n.Contents.filter(function(e){return e.Key!==q}),K=n.Contents,G())})}function Q(e){var n=Math.round((+new Date-e)/1e3),t="a while ago";return n<30?t="just now":n<60?t=n+" seconds ago":n<120?t="a minute ago":n<3600?t=Math.floor(n/60)+" minutes ago":1==Math.floor(n/3600)?t="1 hour ago":n<86400?t=Math.floor(n/3600)+" hours ago":n<172800&&(t="yesterday"),t}var V=d.get("s");V||(V=d.get("scene")),T.style.display="none",E.addEventListener("click",J,!1),V?z(V):W(),v&&k.addEventListener("click",F,!1); },{"aws-sdk/clients/S3":"LqWa","aws-sdk/global":"Hz9g"}]},{},["YFtF"], null) //# sourceMappingURL=/scenebrowse.b5d54af7.js.map